| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989 | <template>	<view style="padding-bottom: 100upx;">		<view class="text-center text-red bg-white">{{form.remek}}</view>		<view class="hb" style="width: 100%;">			<view class="flex text-center text-white text-lg bg">				<view class="title_btn flex-sub bg" @click="cut(1)" :class="title_color==1?'bgCol2': ''">个人认证				</view>				<view class="title_btn flex-sub bg" @click="cut(2)" :class="title_color==2?'bgCol2': ''">企业认证				</view>			</view>			<view class=" padding" v-if="title_color==1">				<view class=" padding bg radius">					<u-form :model="form" ref="uForm" label-position="top" :label-style='lableStyle'>						<u-form-item label="真实姓名" :border-bottom='false'>							<u-input placeholder="请输入真实姓名" v-model="form.name" maxlength="11" />						</u-form-item>						<u-form-item label="证件号码" :border-bottom='false'>							<u-input placeholder="请输入身份证号码" v-model="form.idNumber" />						</u-form-item>						<u-form-item label="出生日期" :border-bottom='false'>							<u-input placeholder="请填写(必填)" v-model="form.birthdate" type="select"								@click="birthData()" />						</u-form-item>						<u-form-item label="性别" :border-bottom='false'>							<u-input placeholder="请填写(必填)" v-model="form.sex" type="select" @click="bindSex()" />						</u-form-item>						<u-form-item label="联系方式" :border-bottom='false'>							<u-input placeholder="请填写(必填)" v-model="form.phone" type="number" maxlength="11" />						</u-form-item>					</u-form>				</view>				<view class=" padding bg radius margin-top">					<view>						<view class="text-lg margin-top-sm">上传身份证正面</view>						<view class="flex" style="overflow: hidden;flex-direction: initial;">							<view v-if="form.front.length">								<view class="margin-top flex margin-right-sm">									<view class="flex"										style="width: 200rpx;height: 200rpx;margin-right: 10rpx;position: relative;">										<image :src="form.front" style="width: 100%;height: 100%;"></image>										<view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"											@click="frontRemove(1)">											<u-icon name="close-circle-fill" color="#2979ff" size="50rpx"></u-icon>										</view>									</view>								</view>							</view>							<view class="margin-top" @click="addImage(1)" v-if="form.front.length<=0">								<view style="width: 200rpx;height: 200rpx;background: #f4f5f6;"									class="flex justify-center align-center">									<view>										<view class="text-center">											<image src="../../static/images/my/add.png"												style="width: 65rpx;height: 55rpx;"></image>										</view>										<view class="text-center">添加图片</view>									</view>								</view>							</view>						</view>					</view>					<view>						<view class="text-lg margin-top-sm">上传身份证反面</view>						<view class="flex" style="overflow: hidden;flex-direction: initial;">							<view v-if="form.back.length">								<view class="margin-top flex margin-right-sm">									<view class="flex"										style="width: 200rpx;height: 200rpx;margin-right: 10rpx;position: relative;">										<image :src="form.back" style="width: 100%;height: 100%;"></image>										<view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"											@click="backRemove()">											<u-icon name="close-circle-fill" color="#2979ff" size="50rpx"></u-icon>										</view>									</view>								</view>							</view>							<view class="margin-top" @click="addImage(2)" v-if="form.back.length<=0">								<view style="width: 200rpx;height: 200rpx;background: #f4f5f6;"									class="flex justify-center align-center">									<view>										<view class="text-center">											<image src="../../static/images/my/add.png"												style="width: 65rpx;height: 55rpx;"></image>										</view>										<view class="text-center">添加图片</view>									</view>								</view>							</view>						</view>					</view>					<view>						<view class="text-lg margin-top-sm">母婴护理师证</view>						<view class="flex" style="overflow: hidden;flex-wrap: wrap;">							<view v-if="infantImg.length">								<view class="margin-top flex margin-right-sm flex-wrap">									<view class="flex"										style="width: 200rpx;height: 200rpx;margin-right: 5rpx;position: relative;"										v-for="(image,index) in  infantImg" :key="index">										<image :src="image" style="width: 100%;height: 100%;"></image>										<view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"											@click="infantImgremove(index)">											<u-icon name="close-circle-fill" color="#2979ff" size="50rpx"></u-icon>										</view>									</view>								</view>							</view>							<view class="margin-top" @click="addImages(3)" v-if="infantImg.length<6">								<view style="width: 200rpx;height: 200rpx;background: #f4f5f6;"									class="flex justify-center align-center">									<view>										<view class="text-center">											<image src="../../static/images/my/add.png"												style="width: 65rpx;height: 55rpx;"></image>										</view>										<view class="text-center">添加图片</view>									</view>								</view>							</view>						</view>					</view>					<view>						<view class="text-lg margin-top-sm">育婴师资格证书</view>						<view class="flex" style="overflow: hidden;flex-wrap: wrap;">							<view v-if="infantImgs.length">								<view class="margin-top flex margin-right-sm flex-wrap">									<view class="flex"										style="width: 200rpx;height: 200rpx;margin-right: 5rpx;position: relative;"										v-for="(image,index) in infantImgs" :key="index">										<image :src="image" style="width: 100%;height: 100%;"></image>										<view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"											@click="infantImgsremove(index)">											<u-icon name="close-circle-fill" color="#2979ff" size="50rpx"></u-icon>										</view>									</view>								</view>							</view>							<view class="margin-top" @click="addImages(4)" v-if="infantImgs.length<6">								<view style="width: 200rpx;height: 200rpx;background: #f4f5f6;"									class="flex justify-center align-center">									<view>										<view class="text-center">											<image src="../../static/images/my/add.png"												style="width: 65rpx;height: 55rpx;"></image>										</view>										<view class="text-center">添加图片</view>									</view>								</view>							</view>						</view>					</view>				</view>				<view class="tabbar">					<view>						支付:<text style="color: #F1413D;">¥200</text>					</view>					<view v-if="renzheng==0||renzheng==6||renzheng==3">						<u-button @click="submit" class="margin-top" :custom-style="customStyle" shape="circle"							:hair-line="false">提交并支付						</u-button>					</view>				</view>			</view>			<view class=" padding" v-if="title_color==2">				<view class=" padding bg radius">					<u-form :model="forms" ref="uForm" label-position="top" :label-style='lableStyle'>						<u-form-item label="企业姓名" :border-bottom='false'>							<u-input placeholder="请输入企业姓名" v-model="forms.name" />						</u-form-item>						<u-form-item label="企业地址" :border-bottom='false'>							<u-input placeholder="请输入企业地址" v-model="forms.address" />						</u-form-item>						<u-form-item label="联系方式" :border-bottom='false'>							<u-input placeholder="请输入电话号码" v-model="forms.phone" type="number" maxlength="11" />						</u-form-item>					</u-form>				</view>				<view class=" padding bg radius margin-top">					<view>						<view class="text-lg margin-top-sm">上传营业执照正面</view>						<view class="flex" style="overflow: hidden;flex-direction: initial;">							<view v-if="forms.front.length">								<view class="margin-top flex margin-right-sm">									<view class="flex"										style="width: 200rpx;height: 200rpx;margin-right: 10rpx;position: relative;">										<image :src="forms.front" style="width: 100%;height: 100%;"></image>										<view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"											@click="frontRemove(2)">											<u-icon name="close-circle-fill" color="#2979ff" size="50rpx"></u-icon>										</view>									</view>								</view>							</view>							<view class="margin-top" @click="addImage(0)" v-if="forms.front.length<=0">								<view style="width: 200rpx;height: 200rpx;background: #f4f5f6;"									class="flex justify-center align-center">									<view>										<view class="text-center">											<image src="../../static/images/my/add.png"												style="width: 65rpx;height: 55rpx;"></image>										</view>										<view class="text-center">添加图片</view>									</view>								</view>							</view>						</view>					</view>				</view>			</view>			<view class="margin-lr  bg radius " style="margin-bottom: 240rpx;">				<view class="padding">					<view style="color: #005DFF;">缴纳保证金</view>					<view class="flex justify-between align-center" style="line-height: 60rpx;">						<view style="color: #999999;" class="text-sm">满足一定条件即可申请返还保证金</view>						<view style="color: #F1413D;">¥{{money}}</view>					</view>				</view>			</view>			<view class="tabbar">				<view>					支付:<text style="color: #F1413D;">¥{{money}}</text>				</view>				<view v-if="renzheng==0||renzheng==6||renzheng==3">					<u-button @click="submit" class="margin-top" :custom-style="customStyle" shape="circle"						:hair-line="false">提交并支付					</u-button>				</view>			</view>		</view>		<!-- 性别选择 -->		<u-action-sheet :list="actionSheetList" v-model="show" @click="actionSheetCallback"></u-action-sheet>		<!-- 出生日期 -->		<u-picker v-model="showData" :params="params" @confirm="bindData"></u-picker>		<!-- 支付方式 -->		<u-popup v-model="showpay" mode="bottom" :closeable="closeable">			<view class="popup_pay">				<view style="background-color: #fff;">					<view style="padding: 0 20upx;margin-top: 60rpx;margin-bottom: 20rpx;">						<view							style="display: flex;height: 100upx;align-items: center;padding: 20upx 0;justify-content: center;"							v-for="(item,index) in openLists" :key='index'>							<image :src="item.image" style="width: 55upx;height: 55upx;border-radius: 50upx;">							</image>							<view style="font-size: 30upx;margin-left: 20upx;width: 70%;">								{{item.text}}							</view>							<radio-group name="openWay" style="margin-left: 45upx;" @tap='selectWay(item)'>								<label class="tui-radio">									<radio color="#2FB57A" :checked="openWay === item.id ? true : false" />								</label>							</radio-group>						</view>					</view>				</view>				<view class="pay_btn" @click="pay()">确认支付</view>			</view>		</u-popup>	</view></template><script>	import configdata from '../../common/config.js';	export default {		data() {			return {				title_color: 1,				classify: 1,				bgCol2: '#557EFD',				form: {					name: '',					idNumber: '',					front: '',					back: '',					remek: '',					sex: '',					sexs: 0,					birthdate: '',					birth: '',					phone: '',					//母婴护理师证					infant: [],					//育婴师资格证书					infantImgs: [],									},				forms: {					name: '',					address: '',					idNumber: '',					front: '',					back: ''				},				// disabled: false,				lableStyle: {					color: '#000000',					fontSize: '36upx'				},				customStyle: {					backgroundColor: '#005DFF',					color: '#ffffff',					border: 0				},				customStyle1: {					backgroundColor: '#ccc',					color: '#000000',					border: 0				},				renzheng: '',				show: false,				actionSheetList: [{					text: '男',				}, {					text: '女',				}],				showData: false,				params: {					year: true,					month: true,					day: true,					hour: false,					minute: false,					second: false				},				//母婴护理师证				infantImg: [],				//育婴师资格证书				infantImgs: [],				money: 0,				showpay: false,				openLists: [],				openWay: 1,				sex: 0,				closeable: true			}		},		onLoad(e) {			console.log(e)			this.classify = parseInt(e.classify)			// console.log(parseInt(e.classify))			this.title_color = this.classify			// console.log(this.title_color,this.classify)			this.getUserInfo()			this.renzheng = uni.getStorageSync("renzheng")			// #ifdef APP			this.openLists = [{					image: '../../static/images/icon_weixin.png',					text: '微信支付',					id: 1				}, {					image: '../../static/images/zhifubao.png',					text: '支付宝支付',					id: 2				}],				this.openWay = 1;			// #endif			// #ifdef MP-WEIXIN			this.openLists = [{					image: '../../static/images/icon_weixin.png',					text: '微信支付',					id: 1				}],				this.openWay = 1;			// #endif			// #ifdef H5			this.openLists = [{				image: '../../static/images/zhifubao.png',				text: '支付宝支付',				id: 2			}]			this.openWay = 2;			// #endif		},		onShow() {			this.Getmoney()		},		methods: {			//日期弹框			birthData() {				this.showData = true			},			//性别选择			bindSex() {				this.show = true			},			//支付方式			selectWay(item) {				this.openWay = item.id;			},			// 保证金			Getmoney() {				this.$Request.get("/app/common/type/239").then(res => {					console.log(res)					if (res.code == 0) {						this.money = res.data.value					}				});			},			// 点击actionSheet回调 性别			actionSheetCallback(index) {				console.log(index)				this.sex = index				this.form.sex = this.actionSheetList[index].text;				// this.from.sexs =  this.actionSheetList[index].label;				console.log(this.sex)			},			//出生日期			bindData(e) {				console.log(e)				this.form.birthdate = e.year + '年' + e.month + '月' + e.day + '日'				this.form.birth = e.year + '-' + e.month + '-' + e.day			},			cut(e) {				this.title_color = e				console.log(this.title_color)				if (this.title_color == 1) {					this.classify = this.title_color					console.log(this.title_color, this.classify)				} else if (this.title_color == 2) {					this.classify = this.title_color					console.log(this.title_color, this.classify)				}				this.getUserInfo()			},			//身份证删除			frontRemove(index) {				if (index == 1) {					this.form.front = ''				} else if (index == 2) {					this.forms.front = ''				}			},			backRemove() {				this.form.back = ''			},			infantImgremove(index) {				this.infantImg.splice(index, 1)			},			infantImgsremove(index) {				this.infantImgs.splice(index, 1)			},			submit() {				this.form.infantImg = this.infantImg				this.form.infantImg = this.form.infantImg.toString();				this.form.infantImgs = this.infantImgs				this.form.infantImgs = this.form.infantImgs.toString();				if (this.classify == 1) {					if (!this.form.name) {						uni.showToast({							title: '请输入真实姓名',							icon: 'none',							duration: 1000						})						return;					}					if (!this.form.idNumber) {						uni.showToast({							title: '请输入身份证号',							icon: 'none',							duration: 1000						})						return;					}					let regX =						/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;					if (!regX.test(this.form.idNumber)) {						uni.showToast({							title: '请输入正确的身份证号',							icon: 'none',							duration: 1000						})						return;					}					if (!this.form.birthdate) {						uni.showToast({							title: '请输入出生日期',							icon: 'none',							duration: 1000						})						return;					}					if (!this.form.sex) {						uni.showToast({							title: '请输入性别',							icon: 'none',							duration: 1000						})						return;					}					if (!this.form.phone) {						uni.showToast({							title: '请输入联系方式',							icon: 'none',							duration: 1000						})						return;					}					if (!this.form.front) {						uni.showToast({							title: '请上传身份证正面',							icon: 'none',							duration: 1000						})						return;					}					if (!this.form.back) {						uni.showToast({							title: '请上传身份证反面',							icon: 'none',							duration: 1000						})						return;					}					if (!this.form.infantImg) {						uni.showToast({							title: '请上传母婴护理师证',							icon: 'none',							duration: 1000						})						return;					}					if (!this.form.infantImgs) {						uni.showToast({							title: '请上传育婴师资格证书',							icon: 'none',							duration: 1000						})						return;					}				}				if (this.classify == 2) {					if (!this.forms.name) {						uni.showToast({							title: '请输入企业姓名',							icon: 'none',							duration: 1000						})						return;					}					if (!this.forms.address) {						uni.showToast({							title: '请输入企业地址',							icon: 'none',							duration: 1000						})						return;					}					if (!this.forms.phone) {						uni.showToast({							title: '请输入电话号码',							icon: 'none',							duration: 1000						})						return;					}					if (!this.forms.front) {						uni.showToast({							title: '请上传营业执照正面',							icon: 'none',							duration: 1000						})						return;					}				}				this.showpay = true			},			getUserInfo() {				console.log(this.classify, '222222222')				this.$Request.get("/app/userCertification/queryInsert?classify=" + this.classify).then(res => {					console.log(res)					if (res.code == 0) {						uni.setStorageSync('classify', res.data.classify)						// this.classify = res.data.classify						if (res.data.classify == 1) {							this.form.name = res.data.name ? res.data.name : ''							this.form.idNumber = res.data.idNumber ? res.data.idNumber : ''							this.form.front = res.data.front ? res.data.front : ''							this.form.back = res.data.back ? res.data.back : ''							this.classify = res.data.classify							this.form.birthdate = res.data.birthdate							this.sex = res.data.sex							if (res.data.sex == 0) {								this.form.sex = '男'							} else if (res.data.sex == 1) {								this.form.sex = '女'							}							this.form.phone = res.data.phone							this.infantImg = res.data.infantImg.split(',')							this.form.infantImg = res.data.infantImg							this.infantImgs = res.data.infantImgs.split(',')							this.form.infantImgs = res.data.infantImgs;						} else if (res.data.classify == 2) {							this.classify = res.data.classify							this.forms.name = res.data.name ? res.data.name : ''							this.forms.address = res.data.address ? res.data.address : ''							this.forms.phone = res.data.phone ? res.data.phone : ''							this.forms.front = res.data.front ? res.data.front : ''						}						if (res.data.status == 1) {							this.disabled = true						}						if (res.data.status == 2) {							this.form.remek = res.data.remek ? res.data.remek : ''						}					}				});			},			addImages(e) {				uni.chooseImage({					count: 6,					sourceType: ['album', 'camera'],					success: res => {						for (let i = 0; i < res.tempFilePaths.length; i++) {							this.$queue.showLoading("上传中...");							uni.uploadFile({ // 上传接口								url: this.config("APIHOST1") + '/alioss/upload', //真实的接口地址								filePath: res.tempFilePaths[i],								name: 'file',								success: (uploadFileRes) => {									if (e == 1) {										this.form.front = JSON.parse(uploadFileRes.data).data										// that.form.front.push(JSON.parse(uploadFileRes.data).data)									} else if (e == 2) {										this.form.back = JSON.parse(uploadFileRes.data).data									} else if (e == 3) {										if (this.infantImg.length <= 5) {											this.infantImg.push(JSON.parse(uploadFileRes.data)												.data)										}									} else if (e == 4) {										if (this.infantImgs.length <= 5) {											this.infantImgs.push(JSON.parse(uploadFileRes.data)												.data)										}									} else if (e == 0) {										this.forms.front = JSON.parse(uploadFileRes.data).data									}									uni.hideLoading();								}							});						}					}				})			},			addImage(e) {				uni.chooseImage({					count: 1,					sourceType: ['album', 'camera'],					success: res => {						for (let i = 0; i < res.tempFilePaths.length; i++) {							this.$queue.showLoading("上传中...");							uni.uploadFile({ // 上传接口								url: this.config("APIHOST1") + '/alioss/upload', //真实的接口地址								filePath: res.tempFilePaths[i],								name: 'file',								success: (uploadFileRes) => {									if (e == 1) {										this.form.front = JSON.parse(uploadFileRes.data).data										// that.form.front.push(JSON.parse(uploadFileRes.data).data)									} else if (e == 2) {										this.form.back = JSON.parse(uploadFileRes.data).data									} else if (e == 0) {										this.forms.front = JSON.parse(uploadFileRes.data).data									}									uni.hideLoading();								}							});						}					}				})			},			config: function(name) {				var info = null;				if (name) {					var name2 = name.split("."); //字符分割					if (name2.length > 1) {						info = configdata[name2[0]][name2[1]] || null;					} else {						info = configdata[name] || null;					}					if (info == null) {						let web_config = cache.get("web_config");						if (web_config) {							if (name2.length > 1) {								info = web_config[name2[0]][name2[1]] || null;							} else {								info = web_config[name] || null;							}						}					}				}				return info;			},			pay() {				let data				if (this.classify == 1) {					let userId = uni.getStorageSync('userId')					data = {						name: this.form.name,						idNumber: this.form.idNumber,						birthdate: this.form.birth,						sex: this.sex,						phone: this.form.phone,						front: this.form.front,						back: this.form.back,						remek: this.form.remek,						infantImg: this.form.infantImg,						infantImgs: this.form.infantImgs,						classify: this.classify,						userId: userId					}				}				if (this.classify == 2) {					let userId = uni.getStorageSync('userId')					data = {						name: this.forms.name,						address: this.forms.address,						phone: this.forms.phone,						classify: this.classify,						front: this.forms.front,						userId: userId,					}				}				console.log(data, 'pppp1')				this.showpay = false				if (this.openWay == 1) { //微信支付					// #ifdef MP-WEIXIN					this.$Request.postJson('/app/wxPay/wxPayJsApiUserCertification', data).then(res => {						console.log(res)						if (res.code == 0) {							// this.isCheckPay(res.code, 'wxpay', JSON.stringify(res.data));							uni.requestPayment({								provider: 'wxpay',								timeStamp: res.data.timestamp,								nonceStr: res.data.noncestr,								package: res.data.package,								signType: res.data.signType,								paySign: res.data.sign,								success: function(res) {									console.log(res)									// uni.showLoading({									// 	title: '支付成功',									// 	icon:'nones'									// });									// this.$queue.showToast('支付成功');									uni.switchTab({										url: '/pages/my/index'									})								},								fail: function(err) {									this.$queue.showToast('支付失败');								}							});						}					});					// #endif					// #ifdef H5					this.$Request.postJson('/app/wxPay/wxPayMpUserCertification', data).then(res => {						this.showpay = false						that.callPay(res);					});					// #endif					// #ifdef APP					this.$Request.postJson('/app/wxPay/payAppUserCertification', data).then(res => {						console.log(res)						this.showpay = false						if (res.code == 0) {							this.isCheckPay(res.code, 'wxpay', JSON.stringify(res.data));						}					});					// #endif				} else if (this.openWay == 2) { //支付宝支付					// #ifdef H5					this.$Request.postJson('/app/aliPay/payOrderUserCertification', data).then(						res => {							this.showpay = false							const div = document.createElement('div')							div.innerHTML = res.data //此处form就是后台返回接收到的数据							document.body.appendChild(div)							document.forms[0].submit()						});					// #endif					// #ifdef APP-PLUS					this.$Request.postJson('/app/aliPay/payAppUserCertification', data).then(						res => {							this.showpay = false							this.setPayment('alipay', res.data);						});					// #endif				}			},			callPay: function(response) {				if (typeof WeixinJSBridge === "undefined") {					if (document.addEventListener) {						document.addEventListener('WeixinJSBridgeReady', this.onBridgeReady(response), false);					} else if (document.attachEvent) {						document.attachEvent('WeixinJSBridgeReady', this.onBridgeReady(response));						document.attachEvent('onWeixinJSBridgeReady', this.onBridgeReady(response));					}				} else {					this.onBridgeReady(response);				}			},			onBridgeReady: function(response) {				let that = this;				if (!response.package) {					return;				}				WeixinJSBridge.invoke(					'getBrandWCPayRequest', {						"appId": response.appid, //公众号名称,由商户传入						"timeStamp": response.timestamp, //时间戳,自1970年以来的秒数						"nonceStr": response.noncestr, //随机串						"package": response.package,						"signType": response.signType, //微信签名方式:						"paySign": response.sign //微信签名					},					function(res) {						if (res.err_msg === "get_brand_wcpay_request:ok") {							// 使用以上方式判断前端返回,微信团队郑重提示:							//res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。							uni.showLoading({								title: '支付成功'							});							uni.hideLoading();							uni.navigateTo({								url: '/pages/my/index'							})						} else {							uni.hideLoading();						}						WeixinJSBridge.log(response.err_msg);					}				);			},			isCheckPay(code, name, order) {				if (code == 0) {					console.log('999999999999')					this.setPayment(name, order);				} else {					uni.hideLoading();					uni.showToast({						title: '支付信息有误'					});				}			},			setPayment(name, order) {				console.log(777777777, name, order)				uni.requestPayment({					provider: name,					orderInfo: order, //微信、支付宝订单数据					success: function(res) {						uni.hideLoading();						uni.showLoading({							title: '支付成功'						});						uni.switchTab({							url: '/pages/my/index'						})					},					fail: function(err) {						uni.hideLoading();					},					complete() {						uni.hideLoading();					}				});			}		}	}</script><style>	page {		background-color: #F7F7F7;	}	.bg {		background-color: #FFFFFF;	}	.u-input__input {		color: balck !important;	}	.title_btn {		height: 78upx;		line-height: 78upx;		/* background: #f7f7f7; */	}	.tabbar {		width: 100%;		height: 130rpx;		background-color: #FFFFFF;		padding: 20rpx 30rpx;		position: fixed;		bottom: 0rpx;		left: 0rpx;		right: 0rpx;		display: flex;		justify-content: space-between;		align-items: center;	}	.popup_pay {		width: 100%;		position: relative;		padding-bottom: 45rpx;		/* height: 160px; */		/* #ifndef MP-WEIXIN */		/* height: 130px; */		/* #endif */	}	.pay_btn {		width: 90%;		margin: 0 auto;		text-align: center;		background: #2FB57A;		height: 80rpx;		border-radius: 16rpx;		color: #ffffff;		line-height: 80rpx;	}	.hb {		/* #ifdef H5 */		padding-bottom: 180rpx;		/* #endif */	}	.bgCol2 {		color: #557EFD;	}</style>
 |