Browse Source

2023-12-5 实战营报名

zhiquz 1 year ago
parent
commit
c537ee2727

+ 1 - 6
apis/order.js

@@ -33,11 +33,6 @@ export const _API_GetExpressTrack = data => request.get('/order/get_express', da
 export const _API_mergeOrder = data => request.get('/order/search_order', data) // 合并订单
 export const _API_mergeOrder = data => request.get('/order/search_order', data) // 合并订单
 export const _API_destory = data => request.get('/order/destory', data) // 不需要审核的作废订单
 export const _API_destory = data => request.get('/order/destory', data) // 不需要审核的作废订单
 
 
-/*实战营报名*/
-export const _API_payment = data => request.post('/pays/pays ', data) // 报名支付
-export const _API_SearchStatus = data => request.post('/pays/GetStatus', data) // 查询支付状态
-export const GetEnrollUserAddress = data => request.post('/pays/GetAddress', data) // 报名前获取收货地址
-export const UpdateAddAddress = data => request.post('/pays/UpdateAddAddress', data) // 提交收货地址
-export const GetEnrollInfo = data => request.get('/pays/GetEnrollInfo', data) // 获取报名信息
+
 
 
 export const CheckGoodNum = data => request.post('/order/CheckGoodNum', data) // 下单前检查库存
 export const CheckGoodNum = data => request.post('/order/CheckGoodNum', data) // 下单前检查库存

+ 20 - 0
apis/szy.js

@@ -0,0 +1,20 @@
+import request from '@/common/util/request'
+
+/*实战营报名*/
+
+export const _API_payment = data => request.post('/pays/pays ', data) // 报名支付
+export const _API_SearchStatus = data => request.post('/pays/GetStatus', data) // 查询支付状态
+export const GetEnrollUserAddress = data => request.post('/pays/GetAddress', data) // 报名前获取收货地址
+export const UpdateAddAddress = data => request.post('/pays/UpdateAddAddress', data) // 提交收货地址
+export const GetEnrollInfo = data => request.get('/pays/GetEnrollInfo', data) // 获取报名信息
+
+
+
+
+export const _API_HuiFuCheck = data => request.get('/HuiFuSZ/check', data) // 获取绑卡情况
+
+export const _API_QuickBankPay = data => request.post('/HuiFuSZ/QuickBankPay', data) // 发起支付验证码
+
+export const _API_QuickBankSms = data => request.post('/HuiFuSZ/QuickBankSms', data) // 携带验证码支付
+
+export const _API_CheckStatus = data => request.post('/HuiFuSZ/CheckStatus', data) // 根据id查询支付状态

+ 16 - 48
pages.json

@@ -353,6 +353,22 @@
 		
 		
 		},
 		},
 		{
 		{
+			"path": "pages/payment/bankPay",
+			"style": {
+				"navigationBarTitleText": "报名支付",
+				"enablePullDownRefresh": false
+			}
+		
+		},
+		{
+			"path": "pages/payment/singup",
+			"style": {
+				"navigationBarTitleText": "抢占结果",
+				"enablePullDownRefresh": false
+			}
+		
+		},
+		{
 			"path": "pages/payment/information",
 			"path": "pages/payment/information",
 			"style": {
 			"style": {
 				"navigationBarTitleText": "信息填写",
 				"navigationBarTitleText": "信息填写",
@@ -407,54 +423,6 @@
 				"enablePullDownRefresh": false
 				"enablePullDownRefresh": false
 			}
 			}
 		
 		
-		},
-		{
-			"path": "pages/test/test",
-			"style": {
-				"navigationBarTitleText": "测试",
-				"enablePullDownRefresh": false
-			}
-		
-		},
-		{
-			"path": "pages/test/test1",
-			"style": {
-				"navigationBarTitleText": "测试1",
-				"enablePullDownRefresh": false
-			}
-		
-		},
-		{
-			"path": "pages/test/test2",
-			"style": {
-				"navigationBarTitleText": "测试2",
-				"enablePullDownRefresh": false
-			}
-		
-		},
-		{
-			"path": "pages/test/test3",
-			"style": {
-				"navigationBarTitleText": "测试3",
-				"enablePullDownRefresh": false
-			}
-		
-		},
-		{
-			"path": "pages/test/test4",
-			"style": {
-				"navigationBarTitleText": "测试4",
-				"enablePullDownRefresh": false
-			}
-		
-		},
-		{
-			"path": "pages/test/test5",
-			"style": {
-				"navigationBarTitleText": "测试5",
-				"enablePullDownRefresh": false
-			}
-		
 		}
 		}
 	],
 	],
 	"tabBar": {
 	"tabBar": {

+ 249 - 0
pages/payment/bankPay.vue

@@ -0,0 +1,249 @@
+<template>
+	<view>
+		<view style="padding-top: 50rpx;">
+			<view class="pay">
+				<image src="https://qnys.chuliu.cc/daweiboshi_szy/1_1615541900_nrG1vctYn8.jpg"
+					mode="widthFix" style="width: 750rpx;margin-bottom: 60rpx;"></image>
+				<view class="pay_title">
+					第{{ data.season }}届大卫博士创业实战营
+				</view>
+				<view class="item">
+					<input maxlength="6" type="number" v-model="sms_code" placeholder="请输入验证码" />
+					<view v-throttle="2000" class="countdown" @tap="getCode">
+						{{ countDown ? `重新获取(${countDown}s)` : '获取验证码' }}
+					</view>
+				</view>
+				<view v-throttle="2000" class="pay_btnSig" :class="status ? 'red' : 'gray'" @click="singup">支付{{ data.cost }}报名</view>
+			</view>
+			<view class="payB" @click="goUnbank">
+				支付不了,重新绑定?
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { getSignPackage } from '@/apis/app.js';
+	import { _API_HuiFuCheck, _API_QuickBankPay, _API_QuickBankSms, _API_CheckStatus } from '../../apis/szy.js';
+	const jweixin = require('jweixin-module');
+	export default {
+		data() {
+			return {
+				status: true,
+				countDown: 0, // 倒计时,
+				sms_code: '', // 验证码,
+				id: '',
+				payId: ''
+			}
+		},
+		computed: {
+			data() {
+				return this.$store.state.singup.szy_data
+			}
+		},
+		onLoad(option) {
+			this.id = option.id
+		},
+		methods: {
+			// 去重新绑定
+			goUnbank() {
+				uni.navigateTo({
+					url: '../zbs/unBank?type=2'
+				})
+			},
+			// 1.发送验证码
+			getCode() {
+				let that = this
+				_API_QuickBankPay({ id: this.id }).then(res => {
+					if (res.code == 200) {
+						uni.showModal({
+							content: '验证码发送成功',
+							showCancel: false,
+							success: (e) => {
+								if (e.confirm) {
+									that.payId = res.data.id
+									that.countDown = 180;
+									that.timer = setInterval(() => {
+										that.countDown--;
+										if (!that.countDown) {
+											that.countDown = 0;
+											clearInterval(that.timer);
+										}
+									}, 1000);
+								}
+							}
+						})
+					} else {
+						uni.showModal({
+							content: res.message || '获取验证码失败',
+							showCancel: false
+						});
+						return false;
+					}
+				})
+			},
+			// 2. 携带验证码支付
+			singup() {
+				let that = this
+				if (!this.sms_code) {
+					uni.showModal({
+						content: '请先输入验证码',
+						showCancel: false
+					})
+					return
+				}
+				uni.showModal({
+					title: '提示',
+					content: '确定要支付吗?',
+					success: (res) => {
+						if (res.confirm) {
+							_API_QuickBankSms({ id: that.payId, sms_code: that.sms_code }).then(res => {
+								if (res.code == 200) {
+									if (res.data.status == 0) {
+										that.SearchStatus()
+									} else if (res.data.status == 1) {
+										uni.navigateBack({
+										  delta: 2
+										})
+									}
+								} else {
+									uni.showModal({
+										title: '失败',
+										content: res.message || '获取失败',
+										showCancel: false
+									})
+									return false;
+								}
+							})
+								.catch(err => {})
+								.finally(() => {
+									setTimeout(() => {}, 3000)
+								})
+						}
+					}
+				})
+			},
+			// 3. 查询支付状态
+			SearchStatus() {
+				let that = this
+				uni.showLoading({
+				    title: '查询支付状态中...',
+				    mask: true
+				});
+				_API_CheckStatus({ id: this.payId }).then(res => {
+					if (res.code == 200) {
+						if (res.data.status == 1) {
+							uni.hideLoading()
+							uni.navigateBack({
+							  delta: 2
+							})
+						} else {
+							that.SearchStatus()
+						}
+					} else {
+						uni.hideLoading()
+						uni.showModal({
+							content: res.message || '查询失败',
+							showCancel: false
+						})
+					}
+				}).catch(err => {
+					uni.hideLoading()
+					uni.showModal({
+						content: err || '查询失败',
+						showCancel: false
+					})
+				})
+			}
+		}
+	}
+</script>
+<style>
+	page {
+		background-color: #F5F5F5;
+	}
+</style>
+<style lang="scss" scoped>
+	
+	.payB {
+		margin-top: 30rpx;
+		text-align: center;
+		color: #FF232C;
+		font-weight: bold;
+	}
+	.pay {
+		margin: 0 30rpx 0 30rpx;
+		border-radius: 16rpx;
+		background-color: #fff;
+		padding: 40rpx 20rpx 40rpx 20rpx;
+		&_title {
+			font-size: 34rpx;
+			font-weight: bold;
+		}
+		
+		&_time {
+			margin-top: 20rpx;
+			font-size: 32rpx;
+		}
+		
+		&_btnSig {
+			margin: 50rpx auto 0;
+			width: 600rpx;
+			line-height: 88rpx;
+			border-radius: 44rpx;
+			text-align: center;
+			color: #fff;
+			font-size: 32rpx;
+		}
+		.red {
+			background: linear-gradient(93deg, #FF232C 0%, #FF571B 100%);
+		}
+		.gray {
+			background-color: #E1E1E1;
+		}
+	}
+	.item {
+		@include flex();
+		height: 104rpx;
+		box-sizing: border-box;
+		color: $app-sec-text-color;
+		background: #F8F8F8;
+		margin: 50rpx 0 40rpx 0;
+		border-radius: 8rpx;
+		padding-left: 24rpx;
+	
+	
+	
+		.login_icon {
+			width: 36rpx;
+			height: 44rpx;
+		}
+	
+		.icon,
+		.cuIcon-roundclosefill {
+			margin: 0 20rpx;
+			font-size: 36rpx;
+		}
+	
+		input {
+			flex: 1;
+			height: 104rpx;
+			margin-left: 15rpx;
+		}
+	
+		.countdown {
+			@include flex();
+			height: 60rpx;
+			font-size: 24rpx;
+			padding: 0 20rpx;
+			border: 2rpx solid #FB231F;
+			margin-right: 20rpx;
+			border-radius: 33rpx;
+			color: $base-color;
+	
+			text {
+				margin-left: 8rpx;
+			}
+		}
+	}
+</style>

+ 1 - 1
pages/payment/information.vue

@@ -56,7 +56,7 @@
 	import{ 
 	import{ 
 		GetEnrollUserAddress,
 		GetEnrollUserAddress,
 		UpdateAddAddress
 		UpdateAddAddress
-	} from '@/apis/order.js';
+	} from '@/apis/szy.js';
 	export default {
 	export default {
 		components: { WPicker, cityPicker },
 		components: { WPicker, cityPicker },
 		data() {
 		data() {

+ 1 - 1
pages/payment/payment -_xx_pay.vue

@@ -43,7 +43,7 @@
 		GetEnrollInfo,
 		GetEnrollInfo,
 		GetEnrollUserAddress,
 		GetEnrollUserAddress,
 		GetSzyGiftInfo
 		GetSzyGiftInfo
-	} from '@/apis/order.js';
+	} from '@/apis/szy.js';
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {

+ 45 - 10
pages/payment/payment.vue

@@ -21,7 +21,7 @@
 				<view class="voucher_icon">
 				<view class="voucher_icon">
 					<image src="../../static/icon/success.png" mode="widthFix" style="width: 300rpx;margin-top: 78rpx;">
 					<image src="../../static/icon/success.png" mode="widthFix" style="width: 300rpx;margin-top: 78rpx;">
 					</image>
 					</image>
-					<view class="success">获取名额成功,请联系批发商</view>
+					<view class="success">报名成功</view>
 					<view class="timed">
 					<view class="timed">
 						举办时间:{{ data.start+ '-' +data.end }}
 						举办时间:{{ data.start+ '-' +data.end }}
 					</view>
 					</view>
@@ -35,8 +35,10 @@
 	import {
 	import {
 		_API_payment,
 		_API_payment,
 		_API_SearchStatus,
 		_API_SearchStatus,
-		GetEnrollInfo,
-	} from '@/apis/order.js';
+		GetEnrollInfo
+		
+	} from '@/apis/szy.js';
+	import { _API_HuiFuCheck } from '../../apis/szy.js';
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
@@ -56,6 +58,7 @@
 		},
 		},
 		onLoad() {
 		onLoad() {
 			this.getInfo()
 			this.getInfo()
+			// this.getData()
 		},
 		},
 		computed: {
 		computed: {
 			userinfo() {
 			userinfo() {
@@ -66,12 +69,6 @@
 			this.getInfo()
 			this.getInfo()
 		},
 		},
 		methods: {
 		methods: {
-			// 返回首页
-			goBack() {
-				uni.switchTab({
-					url: '/pages/index/index'
-				})
-			},
 			// 获取赛季信息
 			// 获取赛季信息
 			getInfo() {
 			getInfo() {
 				GetEnrollInfo().then(res => {
 				GetEnrollInfo().then(res => {
@@ -139,6 +136,41 @@
 					}
 					}
 				})
 				})
 			},
 			},
+			// 获取赛季信息
+			getInfo() {
+				GetEnrollInfo().then(res => {
+					if (res.code == 200) {
+						res.data.enroll_start_time = "2023-12-05 10:30:00" // 报名时间
+						
+						this.data = res.data
+						uni.setStorageSync("szy_data", res.data)
+						console.log(this.$store.state.singup.szy_data)
+						this.data.start = this.getTimes(res.data.start_time)
+						this.data.end = this.getTimes(res.data.end_time)
+						const a = new Date(res.data.enroll_start_time.replace(/-/g,'/')).getTime()
+						const b = new Date(res.data.enroll_end_time.replace(/-/g,'/')).getTime()
+						const now = Date.parse(new Date())
+						if (now > a && now < b &&  res.data.limit_num >  res.data.num) {
+							this.status = true
+						}
+						if (res.data.status == 1 && res.data.pay_status == 1) {
+							this.showSignup = true
+						} else if (res.data.status == 1 && res.data.pay_status == 0) {
+							this.showSignup = false
+							uni.navigateTo({
+								url: './singup'
+							})
+						} else {
+							this.showSignup = false
+						}
+					} else {
+						uni.showModal({
+							content: res.message || '获取失败',
+							showCancel: false
+						})
+					}
+				})
+			},
 			singup() {
 			singup() {
 				if (!this.status && !this.data.status) {
 				if (!this.status && !this.data.status) {
 					return
 					return
@@ -151,7 +183,10 @@
 						if (res.confirm) {
 						if (res.confirm) {
 							_API_payment().then(res => {
 							_API_payment().then(res => {
 								if (res.code == 200) {
 								if (res.code == 200) {
-										that.SearchStatus()
+										// that.SearchStatus()
+										uni.navigateTo({
+											url: './singup'
+										})
 									} else {
 									} else {
 										uni.showModal({
 										uni.showModal({
 											title: '失败',
 											title: '失败',

+ 1 - 1
pages/payment/payment_xs.vue

@@ -60,7 +60,7 @@
 		GetEnrollInfo,
 		GetEnrollInfo,
 		GetEnrollUserAddress,
 		GetEnrollUserAddress,
 		GetSzyGiftInfo
 		GetSzyGiftInfo
-	} from '@/apis/order.js';
+	} from '@/apis/szy.js';
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {

+ 1 - 1
pages/payment/payment_xx.vue

@@ -36,7 +36,7 @@
 		_API_payment,
 		_API_payment,
 		_API_SearchStatus,
 		_API_SearchStatus,
 		GetEnrollInfo,
 		GetEnrollInfo,
-	} from '@/apis/order.js';
+	} from '@/apis/szy.js';
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {

+ 110 - 0
pages/payment/singup.vue

@@ -0,0 +1,110 @@
+<template>
+	<view v-if="show">
+		<view class="top">
+			<image :src="limitState == 0? image[0] : image[1]" mode="widthFix" style="width: 450rpx;"></image>
+			<text class="text">{{ limitState == 1? '抱歉 报名失败' : '恭喜 获取报名资格' }}</text>
+		</view>
+		<view class="submit_container">
+			<view
+				@click="topayNext"
+				class="sign_up flexC"
+			>
+				下一步
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+	import { _API_HuiFuCheck } from '../../apis/szy.js';
+	export default {
+		data() {
+			return {
+				image: [
+					require('../../static/icon/szySuc.png'),
+					require('../../static/icon/szyErr.png')
+				],
+				show: true,
+				limitState: 0, //是否为不报名,0报名,1排队
+				season: '',
+				id: ''
+			}
+		},
+		methods: {
+			// 查询报名信息
+			topayNext() {
+				uni.showLoading()
+				_API_HuiFuCheck().then(res => {
+					uni.hideLoading()
+					if (res.code == 200) {
+						uni.navigateTo({
+							url: './bankPay?id=' + res.data.id
+						})
+					} else if (res.code == 50014) {
+						uni.showModal({
+							title: '提示',
+							content: '检测到您还未绑定银行卡,请前往绑定',
+							showCancel: false,
+							success: (res) => {
+								if (res.confirm) {
+									uni.navigateTo({
+										url: '../zbs/form?type=2'
+									})
+								}
+							}
+						})
+						return
+					} else {
+						uni.showModal({
+							content: res.message || '获取失败',
+							showCancel: false
+						});
+						return false;
+					}
+				})
+			},
+		}
+	}
+</script>
+<style>
+	page {
+		background-color: #fff !important;
+	}
+</style>
+<style lang="scss" scoped>
+	.top {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		background-color: #fff;
+		border-radius: 24rpx 24rpx 0px 0px;
+		margin-top: -54rpx;
+		padding-top: 30%;
+		.text {
+			font-size: 52rpx;
+			font-weight: bold;
+			color: #333;
+			margin: 20rpx 0 0 0;
+		}
+	}
+	.submit_container {
+		width: 100%;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 9999;
+		height: 118rpx;
+		display: flex;
+		align-items: center;
+		background-color: #fff;
+		border-top: 2rpx solid #EEEEEE;
+		.sign_up {
+			width: 690rpx;
+			height: 90rpx;
+			margin: 0 auto;
+			background: linear-gradient(93deg, #FF232C 0%, #FF571B 100%);
+			font-size: 36rpx;
+			border-radius: 45rpx;
+			color: #ffffff;
+		}
+	}
+</style>

+ 0 - 493
pages/test/test.vue

@@ -1,493 +0,0 @@
-<template>
-	<view>
-		<view v-if="showSignup" style="padding-top: 50rpx;">
-			<view class="pay">
-				<image src="https://qnys.chuliu.cc/daweiboshi_szy/1_1615541900_nrG1vctYn8.jpg"
-					mode="widthFix" style="width: 750rpx;margin-bottom: 60rpx;"></image>
-				<view class="pay_title">
-					大卫博士学位争霸赛第43季
-				</view>
-				<view class="item">
-					<input maxlength="6" type="number" v-model="sms_code" placeholder="请输入验证码" />
-					<view v-throttle="2000" class="countdown" @tap="getCode">
-						{{ countDown ? `重新获取(${countDown}s)` : '获取验证码' }}
-					</view>
-				</view>
-				<view v-throttle="2000" class="pay_btnSig" :class="status ? 'red' : 'gray'" @click="singup">支付9.9报名</view>
-			</view>
-		</view>
-		<view v-else class="top">
-			<view class="top_flex">
-				<image src="../../static/team/green.png" mode="widthFix" style="width: 150rpx;"></image>
-				<view class="topt">
-					<view class="title">
-						报名成功!
-					</view>
-					<view class="tip">
-						感谢您的支持
-					</view>
-				</view>
-			</view>
-<!-- 			<view class="bottom">
-				<view class="bottom_box">
-					<view class="show"></view>
-					<view class="bottom-money">
-						<text>¥</text>{{ data.money }}
-					</view>
-					<view class="line" />
-					<view class="bottom-p">
-						订单编号:{{ data.pay_number }}
-					</view>
-					<view class="bottom-p">
-						支付时间:{{ data.time }}
-					</view>
-					<view class="bottom-p">
-						支付方式:银行卡支付
-					</view>
-				</view>
-			</view> -->
-			<!-- 公众号跳转小程序 -->
-			<view class="ceshi" v-html="html"></view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import { getSignPackage } from '@/apis/app.js';
-	import { _API_HuiFuCheck, _API_QuickBankPay, _API_QuickBankSms, _API_CheckStatus } from '../../apis/zbs.js';
-	const jweixin = require('jweixin-module');
-	export default {
-		data() {
-			return {
-				status: true,
-				data: {},
-				showSignup: false,
-				countDown: 0, // 倒计时,
-				sms_code: '', // 验证码,
-				id: '',
-				payId: '',
-				html: ''
-			}
-		},
-		onShow() {
-			// this.getData()
-		},
-		computed: {
-			userinfo() {
-				return this.$store.state.userinfo
-			}
-		},
-		onReady() {
-			this.signInit();
-			// 微信 config 信息验证后,渲染开放标签
-			uni.$on('jweixinReady', () => {
-				console.log('完成')
-				this.init()
-			})
-		},
-		methods: {
-			//进入争霸赛按钮
-			init() {
-				this.html =
-				`<wx-open-launch-weapp
-				    id="launch-btn"
-				    username="gh_170e5722c167"
-				    path="pages/index/index"
-				>
-				    <template>
-				        <style>
-							.link_btn {
-								width: 400rpx;
-								margin: 600rpx auto 0;
-								height: 88rpx;
-								background: linear-gradient(88deg, #5FBC23 0%, #85CE52 100%);
-								opacity: 1;
-								border-radius: 44rpx;
-								color: #fff;
-								text-align: center;
-								line-height: 88rpx;
-								font-size: 32rpx;
-							}
-						</style>
-				        <div class="link_btn">前往争霸赛小程序下</div>
-				    </template>
-				</wx-open-launch-weapp>`
-					
-			},
-			//进入争霸赛小程序
-			signInit() {
-				const _this = this;
-				let link = window.location.href;
-				getSignPackage({
-					url: link
-				}).then(res => {
-					if (res.code == 200) {
-						let data = JSON.parse(res.data);
-						// 判断是否支持分享
-						jweixin.config({
-							debug: false, //开启debug模式.正式环境设置为false,测试环境设置为true
-							appId: data.appId,
-							timestamp: data.timestamp,
-							nonceStr: data.nonceStr,
-							signature: data.signature,
-							jsApiList: ['wx-open-launch-weapp'], //根据需要看需要哪些SDK的功能
-							openTagList: ['wx-open-launch-weapp'] // 跳转小程序时必填
-						});
-						jweixin.ready(res => {
-							uni.showToast({
-								title: '获取成功',
-							})
-							uni.$emit('jweixinReady', res)
-							this.$nextTick(() => {
-								let btn = document.getElementById('launch-btn');
-								btn.addEventListener('launch', e => {
-									console.log('success');
-								});
-								btn.addEventListener('error', e => {
-									alert('小程序打开失败');
-									console.log('fail', e.detail);
-								});
-							});
-						});
-			
-						jweixin.error(err => {
-							uni.showToast({
-								title: '获取失败',
-							})
-							console.log(err, 'err')
-							uni.showModal({
-								content: err || '失败',
-								showCancel: false
-							})
-						});
-					} else {
-						uni.showModal({
-							content: res.msg || '分享失败',
-							showCancel: false
-						})
-					}
-				});
-			},
-			// 查询报名信息
-			getData() {
-				_API_HuiFuCheck().then(res => {
-					if (res.code == 200) {
-						this.id = res.data.id
-						if (res.data.status) {
-							this.showSignup = false
-							this.data = res.data
-						}
-					} else if (res.code == 50014) {
-						uni.showModal({
-							title: '提示',
-							content: '检测到您还未绑定银行卡,请前往绑定',
-							showCancel: false,
-							success: (res) => {
-								if (res.confirm) {
-									uni.redirectTo({
-										url: './form'
-									})
-								}
-							}
-						})
-						return
-					} else {
-						uni.showModal({
-							content: res.message || '获取验证码失败',
-							showCancel: false
-						});
-						return false;
-					}
-				})
-			},
-			// 1.发送验证码
-			getCode() {
-				let that = this
-				_API_QuickBankPay({ id: this.id }).then(res => {
-					if (res.code == 200) {
-						uni.showModal({
-							content: '验证码发送成功',
-							showCancel: false,
-							success: (e) => {
-								if (e.confirm) {
-									that.payId = res.data.id
-									that.countDown = 180;
-									that.timer = setInterval(() => {
-										that.countDown--;
-										if (!that.countDown) {
-											that.countDown = 0;
-											clearInterval(that.timer);
-										}
-									}, 1000);
-								}
-							}
-						})
-					} else {
-						uni.showModal({
-							content: res.message || '获取验证码失败',
-							showCancel: false
-						});
-						return false;
-					}
-				})
-			},
-			// 2. 携带验证码支付
-			singup() {
-				let that = this
-				if (!this.sms_code) {
-					uni.showModal({
-						content: '请先输入验证码',
-						showCancel: false
-					})
-					return
-				}
-				uni.showModal({
-					title: '提示',
-					content: '确定要支付吗?',
-					success: (res) => {
-						if (res.confirm) {
-							_API_QuickBankSms({ id: that.payId, sms_code: that.sms_code }).then(res => {
-								if (res.code == 200) {
-									if (res.data.status == 0) {
-										that.SearchStatus()
-									} else if (res.data.status == 1) {
-										that.showSignup = false
-									}
-								} else {
-									uni.showModal({
-										title: '失败',
-										content: res.message || '获取失败',
-										showCancel: false
-									})
-									return false;
-								}
-							})
-								.catch(err => {})
-								.finally(() => {
-									setTimeout(() => {}, 3000)
-								})
-						}
-					}
-				})
-			},
-			// 3. 查询支付状态
-			SearchStatus() {
-				let that = this
-				uni.showLoading({
-				    title: '查询支付状态中...',
-				    mask: true
-				});
-				_API_CheckStatus({ id: this.payId }).then(res => {
-					if (res.code == 200) {
-						if (res.data.status == 1) {
-							uni.hideLoading()
-							that.getData()
-							that.showSignup = false
-						} else {
-							that.SearchStatus()
-						}
-					} else {
-						uni.hideLoading()
-						uni.showModal({
-							content: res.message || '查询失败',
-							showCancel: false
-						})
-					}
-				}).catch(err => {
-					uni.hideLoading()
-					uni.showModal({
-						content: err || '查询失败',
-						showCancel: false
-					})
-				})
-			}
-		}
-	}
-</script>
-<style>
-	page {
-		background-color: #F5F5F5;
-	}
-</style>
-<style lang="scss" scoped>
-	.link_btn {
-		width: 400rpx;
-		margin: 600rpx auto 0;
-		height: 88rpx;
-		background: linear-gradient(88deg, #5FBC23 0%, #85CE52 100%);
-		opacity: 1;
-		border-radius: 44rpx;
-		color: #fff;
-		text-align: center;
-		line-height: 88rpx;
-		font-size: 32rpx;
-	}
-	.pay {
-		margin: 0 30rpx 0 30rpx;
-		border-radius: 16rpx;
-		background-color: #fff;
-		padding: 40rpx 20rpx 40rpx 20rpx;
-		&_title {
-			font-size: 34rpx;
-			font-weight: bold;
-		}
-		
-		&_time {
-			margin-top: 20rpx;
-			font-size: 32rpx;
-		}
-		
-		&_btnSig {
-			margin: 50rpx auto 0;
-			width: 600rpx;
-			line-height: 88rpx;
-			border-radius: 44rpx;
-			text-align: center;
-			color: #fff;
-			font-size: 32rpx;
-		}
-		.red {
-			background: linear-gradient(93deg, #FF232C 0%, #FF571B 100%);
-		}
-		.gray {
-			background-color: #E1E1E1;
-		}
-	}
-	.item {
-		@include flex();
-		height: 104rpx;
-		box-sizing: border-box;
-		color: $app-sec-text-color;
-		background: #F8F8F8;
-		margin: 50rpx 0 40rpx 0;
-		border-radius: 8rpx;
-		padding-left: 24rpx;
-	
-	
-	
-		.login_icon {
-			width: 36rpx;
-			height: 44rpx;
-		}
-	
-		.icon,
-		.cuIcon-roundclosefill {
-			margin: 0 20rpx;
-			font-size: 36rpx;
-		}
-	
-		input {
-			flex: 1;
-			height: 104rpx;
-			margin-left: 15rpx;
-		}
-	
-		.countdown {
-			@include flex();
-			height: 60rpx;
-			font-size: 24rpx;
-			padding: 0 20rpx;
-			border: 2rpx solid #FB231F;
-			margin-right: 20rpx;
-			border-radius: 33rpx;
-			color: $base-color;
-	
-			text {
-				margin-left: 8rpx;
-			}
-		}
-	}
-	.top {
-		width: 100%;
-		height: 340rpx;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		background: linear-gradient(88deg, #72DB2E 0%, #92E25A 100%);
-		&_flex {
-			display: flex;
-			align-items: center;
-			margin-top: 40rpx;
-			.topt {
-				color: #fff;
-				margin-left: 24rpx;
-				.title {
-					font-size: 38rpx;
-					font-weight: bold;
-					color: #fff;
-				}
-				.tip {
-					font-size: 28rpx;
-					color: #fff;
-					margin-top: 10rpx;
-				}
-			}
-		}
-		.bottom {
-			width: 750rpx;
-			height: 28rpx;
-			border-radius: 490rpx;
-			margin-top: 42rpx;
-			position: relative;
-			background: #419F05;
-			&_box {
-				// width: 702rpx;
-				width: 94%;
-				// height: 300rpx;
-				background-color: #fff;
-				position: absolute;
-				left: 24rpx;
-				top: 14rpx;
-				padding-bottom: 16rpx;
-				.tip {
-					margin-top: 30rpx;
-					padding: 0 24rpx;
-					margin-bottom: 150rpx;
-					.tipTitle {
-						font-size: 36rpx;
-						font-weight: bold;
-						color: #333;
-						margin-bottom: 14rpx;
-					}
-				}
-				.show {
-					width: 100%;
-					height: 38rpx;
-					background: linear-gradient(180deg, #419F05 0%, rgba(65, 159, 5, 0) 100%);
-					opacity: 0.49;
-				}
-			}
-			&-money {
-				text-align: center;
-				font-size: 72rpx;
-				font-family: PingFang SC, PingFang SC;
-				font-weight: bold;
-				color: #77C740;
-				line-height: 100rpx;
-				padding: 10rpx 0 48rpx 0;
-				text {
-					font-size: 40rpx;
-					font-family: PingFang SC, PingFang SC;
-					font-weight: bold;
-					color: #77C740;
-				}
-			}
-			.line {
-				margin: 0 auto;
-				width: 654rpx;
-				height: 0px;
-				opacity: 1;
-				border: 2rpx dashed #EEEEEE;
-				margin-bottom: 40rpx;
-			}
-			&-p {
-				font-size: 32rpx;
-				font-family: PingFang SC, PingFang SC;
-				font-weight: 400;
-				color: #333333;
-				padding: 0 24rpx;
-				margin-bottom: 24rpx;
-			}
-		}
-	}
-</style>

+ 0 - 297
pages/test/test1.vue

@@ -1,297 +0,0 @@
-<template>
-	<view>
-			<!-- 公众号跳转小程序 -->
-			 <view style="padding: 100rpx">
-			    <wx-open-launch-weapp
-			        id="launch-btn"
-			        username="gh_170e5722c167"
-					appid="wxa9d1325fd98f5a7d"
-			        path="pages/index/index"
-			    >
-			        <script type="text/wxtag-template">
-			            <style>
-							.link_btn {
-								width: 400rpx;
-								/* margin: 600rpx auto 0; */
-								height: 88rpx;
-								background: linear-gradient(88deg, #5FBC23 0%, #85CE52 100%);
-								opacity: 1;
-								border-radius: 44rpx;
-								color: #fff;
-								text-align: center;
-								line-height: 88rpx;
-								font-size: 50rpx;
-							}
-						</style>
-			            <div class="link_btn">前往争霸赛小程序</div>
-			        </script>
-			    </wx-open-launch-weapp>
-			  </view>
-	</view>
-</template>
-
-<script>
-	import { getSignPackage } from '@/apis/app.js';
-	const jweixin = require('jweixin-module');
-	export default {
-		data() {
-			return {
-				html: ''
-			}
-		},
-		onReady() {
-			this.signInit();
-			// 微信 config 信息验证后,渲染开放标签
-			uni.$on('jweixinReady', () => {
-			})
-		},
-		methods: {
-			//进入争霸赛小程序
-			signInit() {
-				const _this = this;
-				let link = window.location.href;
-				getSignPackage({
-					url: link
-				}).then(res => {
-					if (res.code == 200) {
-						let data = JSON.parse(res.data);
-						// 判断是否支持分享
-						jweixin.config({
-							debug: false, //开启debug模式.正式环境设置为false,测试环境设置为true
-							appId: data.appId,
-							timestamp: data.timestamp,
-							nonceStr: data.nonceStr,
-							signature: data.signature,
-							jsApiList: ['wx-open-launch-weapp'], //根据需要看需要哪些SDK的功能
-							openTagList: ['wx-open-launch-weapp'] // 跳转小程序时必填
-						});
-						jweixin.ready(res => {
-							uni.showToast({
-								title: '获取成功',
-							})
-							uni.$emit('jweixinReady', res)
-							this.$nextTick(() => {
-								let btn = document.getElementById('launch-btn');
-								btn.addEventListener('launch', e => {
-									uni.showToast({
-										title: '小程序打开成功',
-									})
-									console.log('success');
-								});
-								btn.addEventListener('error', e => {
-									uni.showToast({
-										title: '小程序打开失败',
-									})
-									console.log('fail', e.detail);
-								});
-							});
-						});
-			
-						jweixin.error(err => {
-							uni.showToast({
-								title: '获取失败',
-							})
-							console.log(err, 'err')
-							uni.showModal({
-								content: err || '失败',
-								showCancel: false
-							})
-						});
-					} else {
-						uni.showModal({
-							content: res.msg || '分享失败',
-							showCancel: false
-						})
-					}
-				});
-			},
-		}
-	}
-</script>
-<style>
-	page {
-		background-color: #F5F5F5;
-	}
-</style>
-<style lang="scss" scoped>
-	.link_btn {
-		width: 400rpx;
-		margin: 600rpx auto 0;
-		height: 88rpx;
-		background: linear-gradient(88deg, #5FBC23 0%, #85CE52 100%);
-		opacity: 1;
-		border-radius: 44rpx;
-		color: #fff;
-		text-align: center;
-		line-height: 88rpx;
-		font-size: 32rpx;
-	}
-	.pay {
-		margin: 0 30rpx 0 30rpx;
-		border-radius: 16rpx;
-		background-color: #fff;
-		padding: 40rpx 20rpx 40rpx 20rpx;
-		&_title {
-			font-size: 34rpx;
-			font-weight: bold;
-		}
-		
-		&_time {
-			margin-top: 20rpx;
-			font-size: 32rpx;
-		}
-		
-		&_btnSig {
-			margin: 50rpx auto 0;
-			width: 600rpx;
-			line-height: 88rpx;
-			border-radius: 44rpx;
-			text-align: center;
-			color: #fff;
-			font-size: 32rpx;
-		}
-		.red {
-			background: linear-gradient(93deg, #FF232C 0%, #FF571B 100%);
-		}
-		.gray {
-			background-color: #E1E1E1;
-		}
-	}
-	.item {
-		@include flex();
-		height: 104rpx;
-		box-sizing: border-box;
-		color: $app-sec-text-color;
-		background: #F8F8F8;
-		margin: 50rpx 0 40rpx 0;
-		border-radius: 8rpx;
-		padding-left: 24rpx;
-	
-	
-	
-		.login_icon {
-			width: 36rpx;
-			height: 44rpx;
-		}
-	
-		.icon,
-		.cuIcon-roundclosefill {
-			margin: 0 20rpx;
-			font-size: 36rpx;
-		}
-	
-		input {
-			flex: 1;
-			height: 104rpx;
-			margin-left: 15rpx;
-		}
-	
-		.countdown {
-			@include flex();
-			height: 60rpx;
-			font-size: 24rpx;
-			padding: 0 20rpx;
-			border: 2rpx solid #FB231F;
-			margin-right: 20rpx;
-			border-radius: 33rpx;
-			color: $base-color;
-	
-			text {
-				margin-left: 8rpx;
-			}
-		}
-	}
-	.top {
-		width: 100%;
-		height: 340rpx;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		background: linear-gradient(88deg, #72DB2E 0%, #92E25A 100%);
-		&_flex {
-			display: flex;
-			align-items: center;
-			margin-top: 40rpx;
-			.topt {
-				color: #fff;
-				margin-left: 24rpx;
-				.title {
-					font-size: 38rpx;
-					font-weight: bold;
-					color: #fff;
-				}
-				.tip {
-					font-size: 28rpx;
-					color: #fff;
-					margin-top: 10rpx;
-				}
-			}
-		}
-		.bottom {
-			width: 750rpx;
-			height: 28rpx;
-			border-radius: 490rpx;
-			margin-top: 42rpx;
-			position: relative;
-			background: #419F05;
-			&_box {
-				// width: 702rpx;
-				width: 94%;
-				// height: 300rpx;
-				background-color: #fff;
-				position: absolute;
-				left: 24rpx;
-				top: 14rpx;
-				padding-bottom: 16rpx;
-				.tip {
-					margin-top: 30rpx;
-					padding: 0 24rpx;
-					margin-bottom: 150rpx;
-					.tipTitle {
-						font-size: 36rpx;
-						font-weight: bold;
-						color: #333;
-						margin-bottom: 14rpx;
-					}
-				}
-				.show {
-					width: 100%;
-					height: 38rpx;
-					background: linear-gradient(180deg, #419F05 0%, rgba(65, 159, 5, 0) 100%);
-					opacity: 0.49;
-				}
-			}
-			&-money {
-				text-align: center;
-				font-size: 72rpx;
-				font-family: PingFang SC, PingFang SC;
-				font-weight: bold;
-				color: #77C740;
-				line-height: 100rpx;
-				padding: 10rpx 0 48rpx 0;
-				text {
-					font-size: 40rpx;
-					font-family: PingFang SC, PingFang SC;
-					font-weight: bold;
-					color: #77C740;
-				}
-			}
-			.line {
-				margin: 0 auto;
-				width: 654rpx;
-				height: 0px;
-				opacity: 1;
-				border: 2rpx dashed #EEEEEE;
-				margin-bottom: 40rpx;
-			}
-			&-p {
-				font-size: 32rpx;
-				font-family: PingFang SC, PingFang SC;
-				font-weight: 400;
-				color: #333333;
-				padding: 0 24rpx;
-				margin-bottom: 24rpx;
-			}
-		}
-	}
-</style>

+ 0 - 116
pages/test/test2.vue

@@ -1,116 +0,0 @@
-<template>
-	<view>
-		<view  class="container" v-html="html"></view>
-	</view>
-</template>
-
-<script>
-	import { getSignPackage } from '@/apis/app.js';
-	const jweixin = require('jweixin-module');
-	export default {
-		data() {
-			return {
-				html: '',
-				username: 'gh_170e5722c167',
-				path: 'pages/index/index', //争霸赛小程序初始进入路径
-			}
-		},
-		onReady() {
-			this.signInit();
-			// 微信 config 信息验证后,渲染开放标签
-			uni.$on('jweixinReady', () => {
-				this.init()
-				console.log(111)
-			})
-		},
-		methods: {
-			//进入争霸赛按钮
-			init() {
-				this.html =
-					`<wx-open-launch-weapp id="launch-btn" username="${this.username}" path="${this.path}">  
-							        <template>  
-							            <style>  
-										   .open_img {
-												width:50px;
-												height:50px;
-												color: #f30;
-										   } 
-							            </style> 
-										<div class="open_img">测试</div>
-							        </template>  
-							    </wx-open-launch-weapp>`;
-					console.log('html', this.html)
-			},
-			//进入争霸赛小程序
-			signInit() {
-				const _this = this;
-				let link = window.location.href;
-				getSignPackage({
-					url: link
-				}).then(res => {
-					if (res.code == 200) {
-						let data = JSON.parse(res.data);
-						// 判断是否支持分享
-						jweixin.config({
-							debug: false, //开启debug模式.正式环境设置为false,测试环境设置为true
-							appId: data.appId,
-							timestamp: data.timestamp,
-							nonceStr: data.nonceStr,
-							signature: data.signature,
-							jsApiList: ['wx-open-launch-weapp'], //根据需要看需要哪些SDK的功能
-							openTagList: ['wx-open-launch-weapp'] // 跳转小程序时必填
-						});
-						jweixin.ready(res => {
-							uni.showToast({
-								title: '获取成功',
-							})
-							uni.$emit('jweixinReady', res)
-							this.$nextTick(() => {
-								uni.showToast({
-									title: '拿到了',
-								})
-								let btn = document.getElementById('launch-btn');
-								btn.addEventListener('launch', e => {
-									uni.showToast({
-										title: '小程序打开成功',
-									})
-									console.log('success');
-								});
-								btn.addEventListener('error', e => {
-									uni.showToast({
-										title: '小程序打开失败',
-									})
-									console.log('fail', e.detail);
-								});
-							});
-						});
-			
-						jweixin.error(err => {
-							uni.showToast({
-								title: '获取失败',
-							})
-							console.log(err, 'err')
-							uni.showModal({
-								content: err || '失败',
-								showCancel: false
-							})
-						});
-					} else {
-						uni.showModal({
-							content: res.msg || '分享失败',
-							showCancel: false
-						})
-					}
-				});
-			},
-		}
-	}
-</script>
-<style>
-	page {
-		background-color: #F5F5F5;
-	}
-</style>
-<style lang="scss" scoped>
-	
-</style>

+ 0 - 135
pages/test/test3.vue

@@ -1,135 +0,0 @@
-<template>
-	<view class="container" v-html="html"></view>
-</template>
-
-<script>
-	import { getSignPackage } from '@/apis/app.js';
-	export default {
-		name: 'ShareIndex',
-		data() {
-			return {
-				html: '',
-				username: 'gh_170e5722c167',
-				path: 'pages/index/index', //争霸赛小程序初始进入路径
-			}
-		},
-		onReady() {
-			this.signInit();
-			// 微信 config 信息验证后,渲染开放标签
-			uni.$on('jweixinReady', () => {
-				this.init()
-			})
-		},
-		methods: {
-			//进入争霸赛按钮
-			init() {
-				this.html =
-					`<wx-open-launch-weapp id="launch-btn" username="${this.username}" path="${this.path}">  
-							        <template>  
-							            <style>  
-										   .open_img {
-												width:50px;
-												height:50px;
-												color: #f30;
-										   } 
-							            </style> 
-										<div class="open_img">测试</div>
-							        </template>  
-							    </wx-open-launch-weapp>`;
-					console.log('html', this.html)
-			},
-			//进入争霸赛小程序
-			signInit() {
-				let script = document.createElement('script')
-				script.type = 'text/javascript'
-				script.src = 'https://res.wx.qq.com/open/js/jweixin-1.6.0.js'
-				document.getElementsByTagName('head')[0].appendChild(script)
-				let _this = this;
-				let link = window.location.href;
-				getSignPackage({
-					url: link
-				}).then(res => {
-					if (res.code == 200) {
-						let data = JSON.parse(res.data);
-						// 判断是否支持分享
-						wx.config({
-							debug: false, //开启debug模式.正式环境设置为false,测试环境设置为true
-							appId: data.appId,
-							timestamp: data.timestamp,
-							nonceStr: data.nonceStr,
-							signature: data.signature,
-							jsApiList: ['wx-open-launch-weapp'], //根据需要看需要哪些SDK的功能
-							openTagList: ['wx-open-launch-weapp'] // 跳转小程序时必填
-						});
-						wx.ready(() => {
-							uni.showToast({
-								title: '获取成功',
-							})
-							uni.$emit('jweixinReady', res)
-							this.$nextTick(() => {
-								uni.showToast({
-									title: '拿到了',
-								})
-								let btn = document.getElementById('launch-btn');
-								btn.addEventListener('launch', e => {
-									uni.showToast({
-										title: '小程序打开成功',
-									})
-									console.log('success');
-								});
-								btn.addEventListener('error', e => {
-									uni.showToast({
-										title: '小程序打开失败',
-									})
-									console.log('fail', e.detail);
-								});
-							});
-						})
-						wx.error(err => {
-							uni.showToast({
-								title: '获取失败',
-							})
-							console.log(err, 'err')
-							uni.showModal({
-								content: err || '失败',
-								showCancel: false
-							})
-						});
-					} else {
-						uni.showModal({
-							content: res.msg || '分享失败',
-							showCancel: false
-						})
-					}
-				});
-			},
-		}
-	}
-</script>
-
-<style scoped lang="scss">
-	#share_container {
-		width: 100%;
-		height: 100%;
-		display: flex;
-		justify-content: space-between;
-		flex-direction: column;
-	}
-	#imgWrapper {
-		flex: 1;
-		@include flex();
-		.showCan {
-			width: 680rpx;
-			height: 960rpx;
-			border-radius: 14rpx;
-			box-shadow:0px 0px 23px 2px rgba(194,133,58,0.5);
-		}
-	}
-	.sharetext {
-		font-size: 80rpx;
-		text-align: center;
-		margin: 8rpx 0;
-		box-sizing: border-box;
-		padding: 30rpx 24rpx;
-	}
-</style>

+ 0 - 143
pages/test/test4.vue

@@ -1,143 +0,0 @@
-<template>
-	<view style="padding: 100rpx">
-	   <wx-open-launch-weapp
-	       id="launch-btn"
-	       username="gh_170e5722c167"
-	       path="pages/index/index"
-	   >
-	       <script type="text/wxtag-template">
-	           <style>
-								.link_btn {
-									width: 400rpx;
-									/* margin: 600rpx auto 0; */
-									height: 88rpx;
-									background: linear-gradient(88deg, #5FBC23 0%, #85CE52 100%);
-									opacity: 1;
-									border-radius: 44rpx;
-									color: #fff;
-									text-align: center;
-									line-height: 88rpx;
-									font-size: 50rpx;
-								}
-							</style>
-	           <div class="link_btn">前往争霸赛小程序</div>
-	       </script>
-	   </wx-open-launch-weapp>
-	 </view>
-</template>
-
-<script>
-	import { getSignPackage } from '@/apis/app.js';
-
-	export default {
-		name: 'ShareIndex',
-		data() {
-			return {
-				html: '',
-				username: 'gh_170e5722c167',
-				path: 'pages/index/index', //争霸赛小程序初始进入路径
-			}
-		},
-		onReady() {
-			this.signInit();
-			// 微信 config 信息验证后,渲染开放标签
-			uni.$on('jweixinReady', () => {
-				// this.init()
-			})
-		},
-		methods: {
-			//进入争霸赛小程序
-			signInit() {
-				const script = document.createElement('script')
-				script.type = 'text/javascript'
-				script.src = 'https://res.wx.qq.com/open/js/jweixin-1.6.0.js'
-				document.getElementsByTagName('head')[0].appendChild(script)
-				const _this = this;
-				let link = window.location.href;
-				getSignPackage({
-					url: link
-				}).then(res => {
-					if (res.code == 200) {
-						let data = JSON.parse(res.data);
-						// 判断是否支持分享
-						wx.config({
-							debug: false, //开启debug模式.正式环境设置为false,测试环境设置为true
-							appId: data.appId,
-							timestamp: data.timestamp,
-							nonceStr: data.nonceStr,
-							signature: data.signature,
-							jsApiList: ['wx-open-launch-weapp'], //根据需要看需要哪些SDK的功能
-							openTagList: ['wx-open-launch-weapp'] // 跳转小程序时必填
-						});
-						wx.ready(() => {
-							uni.showToast({
-								title: '获取成功',
-							})
-							uni.$emit('jweixinReady', res)
-							this.$nextTick(() => {
-								uni.showToast({
-									title: '拿到了',
-								})
-								let btn = document.getElementById('launch-btn');
-								btn.addEventListener('launch', e => {
-									uni.showToast({
-										title: '小程序打开成功',
-									})
-									console.log('success');
-								});
-								btn.addEventListener('error', e => {
-									uni.showToast({
-										title: '小程序打开失败',
-									})
-									console.log('fail', e.detail);
-								});
-							});
-						})
-						wx.error(err => {
-							uni.showToast({
-								title: '获取失败',
-							})
-							console.log(err, 'err')
-							uni.showModal({
-								content: err || '失败',
-								showCancel: false
-							})
-						});
-					} else {
-						uni.showModal({
-							content: res.msg || '分享失败',
-							showCancel: false
-						})
-					}
-				});
-			},
-		}
-	}
-</script>
-
-<style scoped lang="scss">
-	#share_container {
-		width: 100%;
-		height: 100%;
-		display: flex;
-		justify-content: space-between;
-		flex-direction: column;
-	}
-	#imgWrapper {
-		flex: 1;
-		@include flex();
-		.showCan {
-			width: 680rpx;
-			height: 960rpx;
-			border-radius: 14rpx;
-			box-shadow:0px 0px 23px 2px rgba(194,133,58,0.5);
-		}
-	}
-	.sharetext {
-		font-size: 80rpx;
-		text-align: center;
-		margin: 8rpx 0;
-		box-sizing: border-box;
-		padding: 30rpx 24rpx;
-	}
-</style>

+ 0 - 116
pages/test/test5.vue

@@ -1,116 +0,0 @@
-<template>
-	<view class="link_btn">
-	   <wx-open-launch-weapp
-	       id="launch-btn"
-	       username="gh_170e5722c167"
-	       path="pages/index/index"
-	   >
-	       <script type="text/wxtag-template">
-	           <div style="width: 400rpx">前往争霸赛小程序</div>
-	       </script>
-	   </wx-open-launch-weapp>
-	 </view>
-</template>
-
-<script>
-	import { getSignPackage } from '@/apis/app.js';
-	export default {
-		name: 'ShareIndex',
-		data() {
-			return {
-				html: '',
-				username: 'gh_170e5722c167',
-				path: 'pages/index/index', //争霸赛小程序初始进入路径
-			}
-		},
-		onReady() {
-			this.signInit();
-			// 微信 config 信息验证后,渲染开放标签
-			uni.$on('jweixinReady', () => {
-				// this.init()
-			})
-		},
-		methods: {
-			//进入争霸赛小程序
-			signInit() {
-				const script = document.createElement('script')
-				script.type = 'text/javascript'
-				script.src = 'https://res.wx.qq.com/open/js/jweixin-1.6.0.js'
-				document.getElementsByTagName('head')[0].appendChild(script)
-				const _this = this;
-				let link = window.location.href;
-				getSignPackage({
-					url: link
-				}).then(res => {
-					if (res.code == 200) {
-						let data = JSON.parse(res.data);
-						// 判断是否支持分享
-						wx.config({
-							debug: false, //开启debug模式.正式环境设置为false,测试环境设置为true
-							appId: data.appId,
-							timestamp: data.timestamp,
-							nonceStr: data.nonceStr,
-							signature: data.signature,
-							jsApiList: ['wx-open-launch-weapp'], //根据需要看需要哪些SDK的功能
-							openTagList: ['wx-open-launch-weapp'] // 跳转小程序时必填
-						});
-						wx.ready(() => {
-							uni.showToast({
-								title: '获取成功',
-							})
-							uni.$emit('jweixinReady', res)
-							this.$nextTick(() => {
-								uni.showToast({
-									title: '拿到了',
-								})
-								let btn = document.getElementById('launch-btn');
-								btn.addEventListener('launch', e => {
-									uni.showToast({
-										title: '小程序打开成功',
-									})
-									console.log('success');
-								});
-								btn.addEventListener('error', e => {
-									uni.showToast({
-										title: '小程序打开失败',
-									})
-									console.log('fail', e.detail);
-								});
-							});
-						})
-						wx.error(err => {
-							uni.showToast({
-								title: '获取失败',
-							})
-							console.log(err, 'err')
-							uni.showModal({
-								content: err || '失败',
-								showCancel: false
-							})
-						});
-					} else {
-						uni.showModal({
-							content: res.msg || '分享失败',
-							showCancel: false
-						})
-					}
-				});
-			},
-		}
-	}
-</script>
-
-<style scoped lang="scss">
-	.link_btn {
-		width: 400rpx;
-		margin: 600rpx auto 0;
-		height: 88rpx;
-		background: linear-gradient(88deg, #5FBC23 0%, #85CE52 100%);
-		opacity: 1;
-		border-radius: 44rpx;
-		color: #fff;
-		text-align: center;
-		line-height: 88rpx;
-		font-size: 50rpx;
-	}
-</style>

+ 6 - 78
pages/zbs/detail.vue

@@ -49,32 +49,7 @@
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
-			<!-- 公众号跳转小程序 -->
-			<!-- <div class="wx-open-weapp">
-			    <wx-open-launch-weapp
-			        id="launch-btn"
-			        username="gh_xxxxxxxx"
-			        :path="`pages/home/index.html?user=123&action=abc`"
-			    >
-			        <script type="text/wxtag-template">
-			            <style>
-							.link_btn {
-								width: 400rpx;
-								margin: 600rpx auto 0;
-								height: 88rpx;
-								background: linear-gradient(88deg, #5FBC23 0%, #85CE52 100%);
-								opacity: 1;
-								border-radius: 44rpx;
-								color: #fff;
-								text-align: center;
-								line-height: 88rpx;
-								font-size: 32rpx;
-							}
-						</style>
-			            <div class="link_btn">前往争霸赛小程序</div>
-			        </script>
-			    </wx-open-launch-weapp>
-			  </div> -->
+			<view class="link_btn" @click="goApp">前往争霸赛小程序</view>
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>
@@ -104,63 +79,16 @@
 				return this.$store.state.userinfo
 				return this.$store.state.userinfo
 			}
 			}
 		},
 		},
-		// onReady() {
-		// 	this.signInit();
-		// 	// 微信 config 信息验证后,渲染开放标签
-		// 	uni.$on('jweixinReady', () => {
-		// 		console.log('完成')
-		// 	})
-		// },
 		methods: {
 		methods: {
 			// 去重新绑定
 			// 去重新绑定
 			goUnbank() {
 			goUnbank() {
 				uni.navigateTo({
 				uni.navigateTo({
-					url: './unBank'
+					url: './unBank?type=1'
 				})
 				})
 			},
 			},
-			//进入争霸赛小程序
-			signInit() {
-				const _this = this;
-				let link = window.location.href;
-				getSignPackage({
-					url: link
-				}).then(res => {
-					if (res.code == 200) {
-						let data = JSON.parse(res.data);
-						// 判断是否支持分享
-						jweixin.config({
-							debug: false, //开启debug模式.正式环境设置为false,测试环境设置为true
-							appId: data.appId,
-							timestamp: data.timestamp,
-							nonceStr: data.nonceStr,
-							signature: data.signature,
-							jsApiList: ['wx-open-launch-weapp'], //根据需要看需要哪些SDK的功能
-							openTagList: ['wx-open-launch-weapp'] // 跳转小程序时必填
-						});
-						jweixin.ready(res => {
-							uni.$emit('jweixinReady', res)
-							this.$nextTick(() => {
-								let btn = document.getElementById('launch-btn');
-								btn.addEventListener('launch', e => {
-									console.log('success');
-								});
-								btn.addEventListener('error', e => {
-									alert('小程序打开失败');
-									console.log('fail', e.detail);
-								});
-							});
-						});
-			
-						jweixin.error(err => {
-							console.log(err, 'err')
-						});
-					} else {
-						uni.showModal({
-							content: res.msg || '分享失败',
-							showCancel: false
-						})
-					}
-				});
+			// 去小程序
+			goApp() {
+				window.location.href ='https://wxaurl.cn/7ylHYm7Pkce'
 			},
 			},
 			// 查询报名信息
 			// 查询报名信息
 			getData() {
 			getData() {
@@ -182,7 +110,7 @@
 							success: (res) => {
 							success: (res) => {
 								if (res.confirm) {
 								if (res.confirm) {
 									uni.redirectTo({
 									uni.redirectTo({
-										url: './form'
+										url: './form?type=1'
 									})
 									})
 								}
 								}
 							}
 							}

+ 11 - 3
pages/zbs/form.vue

@@ -122,6 +122,7 @@
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
+				type: 1,
 				array: [
 				array: [
 					{
 					{
 						name: '非长期有效',
 						name: '非长期有效',
@@ -152,6 +153,9 @@
 				}
 				}
 			};
 			};
 		},
 		},
+		onLoad(option) {
+			this.type = option.type
+		},
 		onShow() {
 		onShow() {
 			
 			
 		},
 		},
@@ -286,9 +290,13 @@
 								showCancel: false,
 								showCancel: false,
 								success: (res) => {
 								success: (res) => {
 									if (res.confirm) {
 									if (res.confirm) {
-										uni.redirectTo({
-											url: './detail'
-										})
+										if (this.type == 1) {
+											uni.redirectTo({
+												url: './detail'
+											})
+										} else {
+											uni.navigateBack()
+										}
 									}
 									}
 								},
 								},
 							})
 							})

+ 14 - 4
pages/zbs/unBank.vue

@@ -19,9 +19,13 @@
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
-				bankInfo: {}
+				type: '',
+				bankInfo: {},
 			}
 			}
 		},
 		},
+		onLoad(e) {
+			this.type == e.type
+		},
 		onShow() {
 		onShow() {
 			this.getBankInfo()
 			this.getBankInfo()
 		},
 		},
@@ -51,9 +55,15 @@
 							_API_UnbindBank({ id: this.bankInfo.id }).then(res => {
 							_API_UnbindBank({ id: this.bankInfo.id }).then(res => {
 								uni.hideLoading()
 								uni.hideLoading()
 								if (res.code == 200) {
 								if (res.code == 200) {
-									uni.reLaunch({
-										url: './detail'
-									})
+									if (this.type == 1) {
+										uni.reLaunch({
+											url: './detail'
+										})
+									} else {
+										uni.navigateBack({
+										  delta: 2
+										})
+									}
 								} else {
 								} else {
 									uni.showModal({
 									uni.showModal({
 										title: '失败',
 										title: '失败',

BIN
static/icon/szyErr.png


BIN
static/icon/szySuc.png


+ 3 - 1
store/index.js

@@ -11,6 +11,7 @@ import shopcar from '@/store/modules/shopcar'
 import message from '@/store/modules/message'
 import message from '@/store/modules/message'
 import userinfo from '@/store/modules/userinfo'
 import userinfo from '@/store/modules/userinfo'
 import gift from "./modules/gift.js"
 import gift from "./modules/gift.js"
+import singup from "./modules/singup.js"
 
 
 Vue.use(Vuex)
 Vue.use(Vuex)
 
 
@@ -25,7 +26,8 @@ const $store = new Vuex.Store({
 		shopcar,
 		shopcar,
 		message,
 		message,
 		userinfo,
 		userinfo,
-		gift
+		gift,
+		singup
 	},
 	},
 })
 })
 
 

+ 11 - 0
store/modules/singup.js

@@ -0,0 +1,11 @@
+export default {
+	namespaced: true,
+	state: {
+		szy_data: uni.getStorageSync("szy_data")
+	},
+	mutations: {
+		GET_SZYDATA(state, data) { // 实战营报名信息
+			state.szy_data = data
+		}
+	}
+}