From 817ebd8af46cbb19be31103600ad009437e1f12f Mon Sep 17 00:00:00 2001
From: 石广澎 <shiguangpeng@163.com>
Date: 星期三, 10 七月 2024 09:41:00 +0800
Subject: [PATCH] feat(支付): 修改授权逻辑 进入页面判断本地是否有openid,没有的话跳转微信授权,有的话直接到支付页,使用

---
 /dev/null                  |  292 -----------------
 pay/discountpay.vue        |    8 
 pay/login.vue              |   10 
 common/http.interceptor.js |    4 
 pay/paySuccess.vue         |   16 
 manifest.json              |    4 
 pages.json                 |  103 -----
 common/config.js           |    8 
 pay/register.vue           |    2 
 pay/scanpay.vue            |  522 ++++++++++++++++++++++++++++++
 App.vue                    |   28 +
 common/api/index.js        |    7 
 12 files changed, 590 insertions(+), 414 deletions(-)

diff --git a/App.vue b/App.vue
index 6d4c20d..eee314a 100644
--- a/App.vue
+++ b/App.vue
@@ -1,7 +1,31 @@
 <script>
+import {
+  config,
+} from 'common/config.js';
+import {
+  getPlat
+} from 'common/util.js';
 	export default {
-		onLaunch: function() {
-			console.log('App Launch')
+		onLaunch: function(opt) {
+      /*console.log(opt)
+      let platform = 2
+      const redirect_uri = encodeURIComponent(`${config.webURL}/pay/scanpay?cid=${opt.query.cid}`)
+      console.log('OPENID'+platform,!!uni.getStorageSync('OPENID'+platform))
+      if(!!uni.getStorageSync('OPENID'+platform)){
+        window.location.href = redirect_uri
+        return
+      }
+      return
+      if(!opt.query.code && !opt.query.auth_code){
+        console.log('auth',platform, !opt.query.code && !opt.query.auth_code)
+        if (platform == 2) {
+          window.location.href =redirect_uri+'&code=sadfkhnadsmuk'
+              //`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${config.wx_appid}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`
+        } else if (platform == 5) {
+          window.location.href =redirect_uri
+              //`https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=${config.ali_appid}&scope=auth_base&redirect_uri=${redirect_uri}&state=STATE`
+        }
+      }*/
 		},
 		onShow: function() {
 			console.log('App Show')
diff --git a/common/api/index.js b/common/api/index.js
index 4776e01..53ac3a7 100644
--- a/common/api/index.js
+++ b/common/api/index.js
@@ -58,8 +58,13 @@
 /* 寰俊鏀粯 */
 export const saveWxOrder = (params, config = {}) => http.post(URL +
 	'/payfour-merchant/v1/web/aggregatePayAllin/saveWxOrder', params, config = {});
+/*缁熶竴鏀粯*/
 export const saveOrder = (params, config = {}) => http.post(URL +
 	'/payfour-merchant/v1/web/aggregatePayAllin/saveOrder', params, config = {});
+
+/*鍙栨秷璁㈠崟*/
+export const closeOrder = (params, config = {}) => http.get(URL +
+	'/payfour-merchant/v1/web/aggregatePayAllin/scanPayOrderClose', params, config = {});
 
 /* 鍥惧舰楠岃瘉鍚� */
 export const getVerify = (params, config = {}) => http.get(URL +
@@ -75,7 +80,7 @@
 
 /* 閫氳仈蹇嵎鏀粯 */
 export const tlPay = (params, config = {}) => http.post(URL +
-	'/payfour-merchant/v1/web/aggregatePayAllin/payagreeconfirm',
+	'/payfour-merchant/v1/web/aggregatePayAllin/pay/scanpayagreeconfirm',
 	params, config = {});
 
 /* 寰俊鏀粯缁撴灉 */
diff --git a/common/config.js b/common/config.js
index 5af3b3d..c66ce24 100644
--- a/common/config.js
+++ b/common/config.js
@@ -2,7 +2,7 @@
 
 // 寮�鍙�
 const dev = {
-	webURL: 'https://sfzf.cpbtsoft.cn/pay',
+	webURL: 'https://sfzf.cpbtsoft.cn',
 	baseURL: '/dev-api',
 	sftpURL: 'https://yqzx.jinmingyuan.com/file',
 	wx_appid: 'wx4c146dba764dcb05',
@@ -10,7 +10,7 @@
 }
 // 娴嬭瘯
 const test = {
-	webURL: 'https://sfzf.cpbtsoft.cn/pay',
+	webURL: 'https://sfzf.cpbtsoft.cn',
 	baseURL: 'https://sfzf.cpbtsoft.cn/prod-api',
 	sftpURL: 'https://sfzf.cpbtsoft.cn/file',
 	wx_appid: 'wx4c146dba764dcb05',
@@ -18,7 +18,7 @@
 }
 // 姝e紡
 const prod = {
-	webURL: 'https://jmy.jinmingyuan.com/pay',
+	webURL: 'https://jmy.jinmingyuan.com',
 	baseURL: 'https://yqzx.jinmingyuan.com',
 	sftpURL: 'https://yqzx.jinmingyuan.com/file',
 	wx_appid: 'wx4c146dba764dcb05',
@@ -30,7 +30,7 @@
 	'02': '淇$敤鍗�'
 }
 module.exports = {
-	config: dev,
+	config: test,
 	ACCESSTOKEN: "Authorization",
 	/* 鏄惁鎵撳嵃璇锋眰鏃ュ織 */
 	DEBUG: false,
diff --git a/common/http.interceptor.js b/common/http.interceptor.js
index 77fa8f2..6d8111b 100644
--- a/common/http.interceptor.js
+++ b/common/http.interceptor.js
@@ -62,7 +62,7 @@
 			vm.$u.toast("鎺堟潈杩囨湡,璇烽噸鏂扮櫥褰�");
 			setTimeout(() => {
 				uni.reLaunch({
-					url: "/pages/pay/scanpay?cid=" + cid
+					url: "/pay/login?cid=" + cid
 				})
 			}, 800);
 			return Promise.reject(res)
@@ -76,4 +76,4 @@
 		vm.$u.toast("璇锋眰寮傚父锛�"); //閿欒鎻愮ず淇℃伅
 		return Promise.reject(response)
 	})
-}
\ No newline at end of file
+}
diff --git a/manifest.json b/manifest.json
index 46d28f5..8151795 100644
--- a/manifest.json
+++ b/manifest.json
@@ -71,9 +71,9 @@
     },
     "vueVersion" : "2",
     "h5" : {
-        "title" : "鏀粯",
+        "title" : "閭桨鎯�",
         "router" : {
-            "base" : "/pay/",
+            "base" : "/",
             "mode" : "history"
         },
         "devServer" : {
diff --git a/pages.json b/pages.json
index 9c049f4..aa8ca3e 100644
--- a/pages.json
+++ b/pages.json
@@ -2,8 +2,9 @@
 	"easycom": {
 		"^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue"
 	},
-	"pages": [{
-			"path": "pages/pay/scanpay",
+	"pages": [
+		{
+			"path": "pay/scanpay",
 			"style": {
 				"navigationBarTitleText": "鏀粯",
 				"enablePullDownRefresh": false
@@ -12,8 +13,9 @@
 				"navigationStyle": "custom"
 				// #endif
 			}
-		}, {
-			"path": "pages/pay/discountpay",
+		},
+		{
+			"path": "pay/discountpay",
 			"style": {
 				"navigationBarTitleText": "浼樻儬",
 				"enablePullDownRefresh": false
@@ -23,15 +25,9 @@
 				// #endif
 			}
 
-		},{
-			"path": "pages/pay/wxpay",
-			"style": {
-				// #ifdef H5
-				"navigationStyle": "custom"
-				// #endif
-			}
-		}, {
-			"path": "pages/pay/register",
+		},
+		{
+			"path": "pay/register",
 			"style": {
 				"navigationBarTitleText": "娉ㄥ唽",
 				"enablePullDownRefresh": false
@@ -41,8 +37,9 @@
 				// #endif
 			}
 
-		}, {
-			"path": "pages/pay/paySuccess",
+		},
+		{
+			"path": "pay/paySuccess",
 			"style": {
 				"navigationBarTitleText": "鏀粯鎴愬姛",
 				"enablePullDownRefresh": false
@@ -52,81 +49,11 @@
 				// #endif
 			}
 
-		}, {
-			"path": "pages/pay/scanRes",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		}, {
-			"path": "pages/pay/login",
+		},
+		{
+			"path": "pay/login",
 			"style": {
 				"navigationBarTitleText": "鐧诲綍",
-				"enablePullDownRefresh": false
-				// #ifdef H5
-				,
-				"navigationStyle": "custom"
-				// #endif
-			}
-
-		}, {
-			"path": "pages/pay/addCardFirst",
-			"style": {
-				"navigationBarTitleText": "娣诲姞閾惰鍗�",
-				"enablePullDownRefresh": false
-				// #ifdef H5
-				,
-				"navigationStyle": "custom"
-				// #endif
-			}
-
-		}, {
-			"path": "pages/pay/addCardSecond",
-			"style": {
-				"navigationBarTitleText": "娣诲姞閾惰鍗�",
-				"enablePullDownRefresh": false
-				// #ifdef H5
-				,
-				"navigationStyle": "custom"
-				// #endif
-			}
-
-		}, {
-			"path": "pages/pay/addCardCode",
-			"style": {
-				"navigationBarTitleText": "閾惰鍗¢獙璇佺爜",
-				"enablePullDownRefresh": false
-				// #ifdef H5
-				,
-				"navigationStyle": "custom"
-				// #endif
-			}
-
-		}, {
-			"path": "pages/pay/bindCard/bindCard",
-			"style": {
-				"navigationBarTitleText": "缁戝畾閾惰鍗�",
-				"enablePullDownRefresh": false
-				// #ifdef H5
-				,
-				"navigationStyle": "custom"
-				// #endif
-			}
-
-		}, {
-			"path": "pages/pay/shuaKa/shuaKa",
-			"style": {
-				"navigationBarTitleText": "鍒峰崱娲诲姩",
-				"enablePullDownRefresh": false
-				// #ifdef H5
-				,
-				"navigationStyle": "custom"
-				// #endif
-			}
-
-		}, {
-			"path": "pages/pay/shuaKa/introduce",
-			"style": {
-				"navigationBarTitleText": "娲诲姩璇︽儏",
 				"enablePullDownRefresh": false
 				// #ifdef H5
 				,
diff --git a/pages/pay/addCardCode.vue b/pages/pay/addCardCode.vue
deleted file mode 100644
index 1d72a36..0000000
--- a/pages/pay/addCardCode.vue
+++ /dev/null
@@ -1,141 +0,0 @@
-<template>
-	<view>
-		<view class="u-p-30 color-666">宸插彂閫佽嚦鎵嬫満鍙穥{form.mobile|mobile_asterisk}}</view>
-		<u--form class="bg-fff u-p-h-30" labelWidth="80" :model="form" :rules="rules" ref="uForm">
-			<u-form-item label="楠岃瘉鐮�" prop="code">
-				<u--input v-model="form.code" border="none" placeholder="璇疯緭鍏ユ墜鏈洪獙璇佺爜"></u--input>
-				<u-button slot="right" @click="getCode" type="error" size="mini" plain :text="tips"></u-button>
-			</u-form-item>
-		</u--form>
-		<view class="u-p-40">
-			<u-button @click="doBind" :loading="loading" :disabled="loading" type="error" text="纭缁戝崱"></u-button>
-		</view>
-		<u-toast ref="uToast"></u-toast>
-		<u-code :seconds="seconds" ref="uCode" @change="codeChange"></u-code>
-	</view>
-</template>
-
-<script>
-	import {
-		signUpToApply,
-		bindCard
-	} from '@/common/api/index'
-	const bankName = require("@/common/bankName.js");
-	export default {
-		data() {
-			return {
-				tips: '',
-				seconds: 60,
-				loading: false,
-				form: {
-					acctName: '',
-					cardNo: '',
-					bankName: '',
-					cardType: 'DC',
-					validdate: '',
-					cvv2: '',
-					idNo: '',
-					mobile: '18737516907',
-					thpinfo: '',
-					code: ''
-				},
-				rules: {
-					code: [{
-						required: true,
-						message: '楠岃瘉鐮佷笉鑳戒负绌�',
-						trigger: 'blur'
-					}, {
-						// 鑷畾涔夐獙璇佸嚱鏁帮紝瑙佷笂璇存槑
-						validator: (rule, value, callback) => {
-							// 涓婇潰鏈夎锛岃繑鍥瀟rue琛ㄧず鏍¢獙閫氳繃锛岃繑鍥瀎alse琛ㄧず涓嶉�氳繃
-							// uni.$u.test.mobile()灏辨槸杩斿洖true鎴栬�協alse鐨�
-							return uni.$u.test.code(value, 6);
-						},
-						message: '楠岃瘉鐮佹牸寮忎笉姝g‘',
-						trigger: 'change'
-					}]
-				}
-			};
-		},
-		filters: {
-			mobile_asterisk(mobile) {
-				if (uni.$u.test.isEmpty(mobile)) {
-					return ''
-				}
-				return mobile.substr(0, 4) +
-					"****" + mobile.substr(8, 3);
-			}
-		},
-		onLoad(opt) {
-			opt.acctName = decodeURIComponent(opt.acctName || '')
-			opt.bankName = decodeURIComponent(opt.bankName || '')
-			this.form = opt
-		},
-		onReady() {
-			//濡傛灉闇�瑕佸吋瀹瑰井淇″皬绋嬪簭锛屽苟涓旀牎楠岃鍒欎腑鍚湁鏂规硶绛夛紝鍙兘閫氳繃setRules鏂规硶璁剧疆瑙勫垯銆�
-			this.$refs.uForm.setRules(this.rules)
-			this.$refs.uCode.start();
-		},
-		methods: {
-			codeChange(text) {
-				this.tips = text;
-			},
-			getCode() {
-				if (this.$refs.uCode.canGetCode) {
-					// 妯℃嫙鍚戝悗绔姹傞獙璇佺爜
-					uni.showLoading({
-						title: '姝e湪鑾峰彇楠岃瘉鐮�'
-					})
-					const params = uni.$u.deepClone(this.form);
-					delete params.thpinfo
-					delete params.code
-					delete params.bankName
-					delete params.cardType
-					signUpToApply(params).then(res => {
-						this.form.thpinfo = res
-						uni.hideLoading();
-						uni.$u.toast('楠岃瘉鐮佸凡鍙戦��');
-						// 閫氱煡楠岃瘉鐮佺粍浠跺唴閮ㄥ紑濮嬪�掕鏃�
-						this.$refs.uCode.start();
-					}).catch(() => {
-						uni.$u.toast('楠岃瘉鐮佸彂閫佸け璐�');
-						uni.hideLoading();
-					})
-				} else {
-					uni.$u.toast('鍊掕鏃剁粨鏉熷悗鍐嶅彂閫�');
-				}
-			},
-			doBind() {
-				this.$refs.uForm.validate().then(res => {
-					this.loading = true
-					const params = uni.$u.deepClone(this.form);
-					delete params.bankName
-					delete params.cardType
-					bindCard(params).then(res => {
-						this.loading = false
-						this.$refs.uToast.show({
-							type: 'success',
-							title: '鎴愬姛',
-							message: "缁戝崱鎴愬姛",
-							iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png',
-							complete: () => {
-								uni.navigateBack({
-									delta: 3
-								})
-							}
-						})
-
-					}).catch(() => {
-						this.loading = false
-					})
-				}).catch(errors => {
-
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-
-</style>
diff --git a/pages/pay/addCardFirst.vue b/pages/pay/addCardFirst.vue
deleted file mode 100644
index cbd756e..0000000
--- a/pages/pay/addCardFirst.vue
+++ /dev/null
@@ -1,113 +0,0 @@
-<template>
-	<view>
-		<view class="u-p-30 color-666">璇风粦瀹氭寔鍗′汉鏈汉鐨勯摱琛屽崱</view>
-		<u--form class="bg-fff u-p-h-30" labelWidth="80" :model="form" :rules="rules" ref="uForm">
-			<u-form-item label="鎸佸崱浜�" prop="acctName" borderBottom>
-				<u--input v-model="form.acctName" border="none" placeholder="璇疯緭鍏ユ寔鍗′汉濮撳悕"></u--input>
-			</u-form-item>
-			<u-form-item label="鍗″彿" prop="cardNo">
-				<u--input v-model="form.cardNo" border="none" placeholder="璇疯緭鍏ュ崱鍙�"></u--input>
-			</u-form-item>
-		</u--form>
-		<view class="u-p-40">
-			<u-button @click="doNext" :loading="loading" :disabled="loading" type="error" text="涓嬩竴姝�"></u-button>
-		</view>
-
-	</view>
-</template>
-
-<script>
-	import {
-		isContain,
-	} from '@/common/api/index'
-	const bankName = require("@/common/bankName.js");
-	export default {
-		data() {
-			return {
-				loading: false,
-				form: {
-					acctName: '',
-					cardNo: ''
-				},
-				rules: {
-					acctName: [{
-						required: true,
-						message: '鎸佸崱浜哄鍚嶄笉鑳戒负绌�',
-						trigger: 'blur'
-					}, {
-						// 鑷畾涔夐獙璇佸嚱鏁帮紝瑙佷笂璇存槑
-						validator: (rule, value, callback) => {
-							// 涓婇潰鏈夎锛岃繑鍥瀟rue琛ㄧず鏍¢獙閫氳繃锛岃繑鍥瀎alse琛ㄧず涓嶉�氳繃
-							// uni.$u.test.mobile()灏辨槸杩斿洖true鎴栬�協alse鐨�
-							return uni.$u.test.rangeLength(value, [2, 6]) && uni.$u.test.chinese(value);
-						},
-						message: '鎸佸崱浜哄鍚嶄笉姝g‘',
-						trigger: 'change'
-					}],
-					cardNo: [{
-						required: true,
-						message: '鍗″彿涓嶈兘涓虹┖',
-						trigger: 'blur'
-					}, {
-						// 鑷畾涔夐獙璇佸嚱鏁帮紝瑙佷笂璇存槑
-						validator: (rule, value, callback) => {
-							// 涓婇潰鏈夎锛岃繑鍥瀟rue琛ㄧず鏍¢獙閫氳繃锛岃繑鍥瀎alse琛ㄧず涓嶉�氳繃
-							// uni.$u.test.mobile()灏辨槸杩斿洖true鎴栬�協alse鐨�
-							return this.$utils.verifyBankCard(value);
-						},
-						message: '鍗″彿涓嶆纭�',
-						trigger: 'change'
-					}]
-				}
-			};
-		},
-		onReady() {
-			//濡傛灉闇�瑕佸吋瀹瑰井淇″皬绋嬪簭锛屽苟涓旀牎楠岃鍒欎腑鍚湁鏂规硶绛夛紝鍙兘閫氳繃setRules鏂规硶璁剧疆瑙勫垯銆�
-			this.$refs.uForm.setRules(this.rules)
-		},
-		methods: {
-			doNext() {
-				this.$refs.uForm.validate().then(res => {
-					this.loading = true
-					isContain({
-						cardNum: this.form.cardNo
-					}).then(res => {
-						uni.request({
-							url: 'https://ccdcapi.alipay.com/validateAndCacheCardInfo.json?_input_charset=utf-8&cardBinCheck=true&cardNo=' +
-								this.form.cardNo,
-							method: "GET",
-							complete: (res) => {
-								this.loading = false
-								if (res.statusCode == 200) {
-									if (res.data.validated) {
-										const bank = bankName.bankName[res.data.bank]
-										const params = uni.$u.deepClone(this.form);
-										params.cardType = res.data.cardType
-										params.bankName = bank
-										uni.$u.route({
-											url: '/pages/pay/addCardSecond',
-											params: params
-										})
-									} else {
-										uni.$u.toast("鍗″彿涓嶆纭紒");
-									}
-								} else {
-									uni.$u.toast("鍗$被鍨嬭幏鍙栧け璐ワ紒");
-								}
-							}
-						})
-					}).catch(() => {
-						this.loading = false
-					})
-
-				}).catch(errors => {
-
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-
-</style>
diff --git a/pages/pay/addCardSecond.vue b/pages/pay/addCardSecond.vue
deleted file mode 100644
index 257877d..0000000
--- a/pages/pay/addCardSecond.vue
+++ /dev/null
@@ -1,151 +0,0 @@
-<template>
-	<view>
-		<u--form class="" labelWidth="80" :model="form" :rules="rules" ref="uForm">
-			<view class="u-p-h-30">
-				<u-form-item label="鎸佸崱浜�">
-					<u--input v-model="form.acctName" readonly border="none"></u--input>
-				</u-form-item>
-				<u-form-item label="閾惰鍗″彿">
-					<u--input v-model="form.cardNo" readonly border="none"></u--input>
-				</u-form-item>
-				<u-form-item label="鎵�灞為摱琛�">
-					<u--input v-model="form.bankName" readonly border="none"></u--input>
-				</u-form-item>
-			</view>
-
-			<view class="bg-fff u-p-h-30 u-m-t-30">
-				<block v-if="form.cardType=='CC'">
-					<u-form-item label="鏈夋晥鏈�" borderBottom prop="validdate">
-						<u--input v-model="form.validdate" border="none" placeholder="璇疯緭鍏ヤ俊鐢ㄥ崱鏈夋晥鏈�">
-						</u--input>
-					</u-form-item>
-					<u-form-item label="瀹夊叏鐮�" borderBottom prop="cvv2">
-						<u--input v-model="form.cvv2" border="none" placeholder="璇疯緭鍏ヤ俊鐢ㄥ崱瀹夊叏鐮�"></u--input>
-					</u-form-item>
-				</block>
-				<u-form-item label="韬唤璇佸彿" borderBottom prop="idNo">
-					<u--input v-model="form.idNo" border="none" placeholder="璇疯緭鍏ユ寔鍗′汉韬唤璇佸彿"></u--input>
-				</u-form-item>
-				<u-form-item label="鎵嬫満鍙�" prop="mobile">
-					<u--input v-model="form.mobile" border="none" placeholder="璇疯緭鍏ユ寔鍗′汉鎵嬫満鍙�"></u--input>
-				</u-form-item>
-			</view>
-
-		</u--form>
-		<label @click="checked=!checked" class="u-flex u-font-24 color-999 u-m-h-30 u-m-t-30">
-			<radio style="transform: scale(0.7);" color="#e93b3d" @change="radioChange" :checked="checked" />鎴戝凡闃呰骞跺悓鎰�
-			<view @click.stop="showAgreement=true" class="" style="color: #e93b3d;">銆婄敤鎴峰崗璁��</view>
-		</label>
-		<view class="u-p-40">
-			<u-button @click="doNext" :loading="loading" :disabled="loading" type="error" text="涓嬩竴姝�"></u-button>
-		</view>
-		<u-popup :show="showAgreement" mode="center" :round="30">
-			<card-agreement @confirm="checked=true;showAgreement=false;doNext()"></card-agreement>
-		</u-popup>
-
-	</view>
-</template>
-
-<script>
-	import {
-		signUpToApply,
-	} from '@/common/api/index'
-	export default {
-		data() {
-			return {
-				showAgreement: false,
-				checked: true,
-				loading: false,
-				form: {
-					acctName: '',
-					cardNo: '',
-					bankName: '',
-					cardType: 'DC',
-					validdate: '',
-					cvv2: '',
-					idNo: '',
-					mobile: ''
-				},
-				rules: {
-					validdate: [{
-						required: true,
-						message: '鏈夋晥鏈熶笉鑳戒负绌�',
-						trigger: 'blur'
-					}],
-					cvv2: [{
-						required: true,
-						message: '瀹夊叏鐮佷笉鑳戒负绌�',
-						trigger: 'blur'
-					}],
-					idNo: [{
-						required: true,
-						message: '韬唤璇佸彿涓嶈兘涓虹┖',
-						trigger: 'blur'
-					}, {
-						// 鑷畾涔夐獙璇佸嚱鏁帮紝瑙佷笂璇存槑
-						validator: (rule, value, callback) => {
-							// 涓婇潰鏈夎锛岃繑鍥瀟rue琛ㄧず鏍¢獙閫氳繃锛岃繑鍥瀎alse琛ㄧず涓嶉�氳繃
-							// uni.$u.test.mobile()灏辨槸杩斿洖true鎴栬�協alse鐨�
-							return uni.$u.test.idCard(value);
-						},
-						message: '韬唤璇佸彿涓嶆纭�',
-						trigger: 'change'
-					}],
-					mobile: [{
-						required: true,
-						message: '鎵嬫満鍙蜂笉鑳戒负绌�',
-						trigger: 'blur'
-					}, {
-						// 鑷畾涔夐獙璇佸嚱鏁帮紝瑙佷笂璇存槑
-						validator: (rule, value, callback) => {
-							// 涓婇潰鏈夎锛岃繑鍥瀟rue琛ㄧず鏍¢獙閫氳繃锛岃繑鍥瀎alse琛ㄧず涓嶉�氳繃
-							// uni.$u.test.mobile()灏辨槸杩斿洖true鎴栬�協alse鐨�
-							return uni.$u.test.mobile(value);
-						},
-						message: '鎵嬫満鍙蜂笉姝g‘',
-						trigger: 'change'
-					}],
-				}
-			};
-		},
-		onLoad(opt) {
-			opt.acctName = decodeURIComponent(opt.acctName || '')
-			opt.bankName = decodeURIComponent(opt.bankName || '')
-			this.form = opt
-		},
-		onReady() {
-			//濡傛灉闇�瑕佸吋瀹瑰井淇″皬绋嬪簭锛屽苟涓旀牎楠岃鍒欎腑鍚湁鏂规硶绛夛紝鍙兘閫氳繃setRules鏂规硶璁剧疆瑙勫垯銆�
-			this.$refs.uForm.setRules(this.rules)
-		},
-		methods: {
-			doNext() {
-				this.$refs.uForm.validate().then(res => {
-					if (!this.checked) {
-						this.showAgreement = true
-						return
-					}
-					this.loading = true
-					const param = uni.$u.deepClone(this.form);
-					delete param.bankName
-					delete param.cardType
-					signUpToApply(param).then(res => {
-						const params = uni.$u.deepClone(this.form);
-						params.thpinfo = res
-						uni.$u.route({
-							url: '/pages/pay/addCardCode',
-							params: params
-						})
-					}).catch(() => {
-						this.loading = false
-					})
-				}).catch(errors => {
-
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-
-</style>
diff --git a/pages/pay/bindCard/bindCard.vue b/pages/pay/bindCard/bindCard.vue
deleted file mode 100644
index a0ac5c1..0000000
--- a/pages/pay/bindCard/bindCard.vue
+++ /dev/null
@@ -1,392 +0,0 @@
-<template>
-	<view>
-		<view class="u-font-42 font-bold u-text-center u-m-t-30">娣诲姞閾惰鍗�</view>
-		<view class="u-font-28 u-text-center u-m-t-10 u-m-b-60">濉啓浠ヤ笅淇℃伅杩涜缁戝崱</view>
-		<u--form class="" labelWidth="80" :model="form" :rules="rules" ref="uForm">
-			<u-form-item class="form-item u-m-b-24" label="鎸佸崱浜�" prop="acctName">
-				<u--input v-model="form.acctName" inputAlign="right" border="none" :readonly="userInfo.tlAuthName" placeholder="璇疯緭鍏ユ寔鍗′汉濮撳悕"></u--input>
-			</u-form-item>
-			<u-form-item class="form-item u-m-b-24" label="韬唤璇佸彿" prop="idNo">
-				<u--input v-model="form.idNo" inputAlign="right" border="none" :readonly="userInfo.tlAuthIdentityNo" placeholder="璇疯緭鍏ユ寔鍗′汉韬唤璇佸彿"></u--input>
-			</u-form-item>
-			<u-form-item class="form-item u-m-b-24" label="鎵嬫満鍙�" prop="mobile">
-				<u--input v-model="form.mobile" inputAlign="right" border="none" placeholder="璇疯緭鍏ユ墜鏈哄彿"></u--input>
-			</u-form-item>
-
-			<view class="u-font-30 color-333 u-m-t-60 u-m-b-24">閾惰鍗$被鍒�</view>
-			<view class="u-flex u-row-between u-m-b-24">
-				<view @click="chooseType('DC')" :class="['type-btn',{'type-act':cardType=='DC'}]">鍌ㄨ搫鍗�
-				</view>
-				<view @click="chooseType('CC')" :class="['type-btn',{'type-act':cardType=='CC'}]">淇$敤鍗�
-				</view>
-			</view>
-			<u-form-item class="form-item u-m-b-24" label="鍗″彿" prop="cardNo">
-				<u--input v-model="form.cardNo" inputAlign="right" border="none" placeholder="璇疯緭鍏ユ寔鍗′汉鏈汉閾惰鍗″彿"></u--input>
-			</u-form-item>
-			<block v-if="cardType=='CC'">
-				<u-form-item class="form-item u-m-b-24" label="鏈夋晥鏈�" prop="validdate">
-					<u--input v-model="form.validdate" inputAlign="right" border="none" placeholder="璇疯緭鍏ヤ俊鐢ㄥ崱鏈夋晥鏈�">
-					</u--input>
-				</u-form-item>
-				<u-form-item class="form-item u-m-b-24" label="瀹夊叏鐮�" prop="cvv2">
-					<u--input v-model="form.cvv2" inputAlign="right" border="none" placeholder="璇疯緭鍏ヤ俊鐢ㄥ崱瀹夊叏鐮�"></u--input>
-				</u-form-item>
-			</block>
-			<view class="u-flex u-m-b-24">
-				<u-form-item class="form-item" label="楠岃瘉鐮�" prop="code">
-					<u--input v-model="form.code" maxlength="6" inputAlign="right" border="none" placeholder="璇疯緭鍏ラ獙璇佺爜">
-					</u--input>
-				</u-form-item>
-				<view @click="getCode" class="code-btn" :class="codeAct?'code-act':''">{{tips}}</view>
-			</view>
-		</u--form>
-		<label @click="checked=!checked" class="u-flex u-font-24 color-999 u-m-t-30">
-			<radio style="transform: scale(0.7);" color="#e93b3d" @change="radioChange" :checked="checked" />鎴戝凡闃呰骞跺悓鎰�
-			<view @click.stop="showAgreement=true" class="" style="color: #e93b3d;">銆婄敤鎴峰崗璁��</view>
-		</label>
-		<view class="u-m-b-60" style="opacity: 0;">
-			<button class="bind-btn">绔嬪嵆缁戝崱</button>
-		</view>
-		<view class="btn-box">
-			<button @click="doBind" :loading="loading" :disabled="loading" class="bind-btn">绔嬪嵆缁戝崱</button>
-		</view>
-		<!-- 鐢ㄦ埛鍗忚 -->
-		<u-popup @close="showAgreement=false" :show="showAgreement" mode="center" :round="30" closeable
-			:safeAreaInsetBottom="false">
-			<card-agreement @confirm="checked=true;showAgreement=false;doBind()"></card-agreement>
-		</u-popup>
-		<!-- 棣栫粦鏈夌ぜ娲诲姩 -->
-		<u-popup bgColor="transparent" @close="showAct=false" :show="showAct" mode="center" :round="30"
-			:safeAreaInsetBottom="false">
-			<bind-card-activity :couponList="couponList" @close="showAct = false"></bind-card-activity>
-		</u-popup>
-
-		<u-toast ref="uToast"></u-toast>
-		<u-code :seconds="seconds" @end="end" @start="start" ref="uCode" keepRunning changeText="宸插彂閫�(x)"
-			@change="codeChange"></u-code>
-	</view>
-</template>
-
-<script>
-	import {
-		isContain,
-		signUpToApply,
-		bindCard,
-		getMyCoupUseDetail,
-		getUserInfo
-	} from '@/common/api/index'
-	export default {
-		data() {
-			return {
-				showAct: false,
-				couponList: [],
-				bankName: '',
-				cardType: 'DC',
-				tips: '',
-				seconds: 60,
-				codeAct: true,
-				showAgreement: false,
-				checked: true,
-				loading: false,
-				userInfo: {
-					tlAuthIdentityNo: '',
-					tlAuthName: ''
-				},
-				form: {
-					acctName: '',
-					idNo: '',
-					cardNo: '',
-					validdate: '',
-					cvv2: '',
-					mobile: '',
-					code: ''
-				},
-				rules: {
-					acctName: [{
-						required: true,
-						message: '鎸佸崱浜哄鍚嶄笉鑳戒负绌�',
-						trigger: 'blur'
-					}, {
-						// 鑷畾涔夐獙璇佸嚱鏁帮紝瑙佷笂璇存槑
-						validator: (rule, value, callback) => {
-							// 涓婇潰鏈夎锛岃繑鍥瀟rue琛ㄧず鏍¢獙閫氳繃锛岃繑鍥瀎alse琛ㄧず涓嶉�氳繃
-							// uni.$u.test.mobile()灏辨槸杩斿洖true鎴栬�協alse鐨�
-							return uni.$u.test.rangeLength(value, [2, 6]) && uni.$u.test.chinese(value);
-						},
-						message: '鎸佸崱浜哄鍚嶄笉姝g‘',
-						trigger: 'change'
-					}],
-					idNo: [{
-						required: true,
-						message: '韬唤璇佸彿涓嶈兘涓虹┖',
-						trigger: 'blur'
-					}, {
-						// 鑷畾涔夐獙璇佸嚱鏁帮紝瑙佷笂璇存槑
-						validator: (rule, value, callback) => {
-							// 涓婇潰鏈夎锛岃繑鍥瀟rue琛ㄧず鏍¢獙閫氳繃锛岃繑鍥瀎alse琛ㄧず涓嶉�氳繃
-							// uni.$u.test.mobile()灏辨槸杩斿洖true鎴栬�協alse鐨�
-							return uni.$u.test.idCard(value);
-						},
-						message: '韬唤璇佸彿涓嶆纭�',
-						trigger: 'blur'
-					}],
-					mobile: [{
-						required: true,
-						message: '鎵嬫満鍙蜂笉鑳戒负绌�',
-						trigger: 'blur'
-					}, {
-						// 鑷畾涔夐獙璇佸嚱鏁帮紝瑙佷笂璇存槑
-						validator: (rule, value, callback) => {
-							// 涓婇潰鏈夎锛岃繑鍥瀟rue琛ㄧず鏍¢獙閫氳繃锛岃繑鍥瀎alse琛ㄧず涓嶉�氳繃
-							// uni.$u.test.mobile()灏辨槸杩斿洖true鎴栬�協alse鐨�
-							return uni.$u.test.mobile(value);
-						},
-						message: '鎵嬫満鍙蜂笉姝g‘',
-						trigger: 'blur'
-					}],
-					cardNo: [{
-						required: true,
-						message: '鍗″彿涓嶈兘涓虹┖',
-						trigger: 'blur'
-					}, {
-						// 鑷畾涔夐獙璇佸嚱鏁帮紝瑙佷笂璇存槑
-						validator: (rule, value, callback) => {
-							// 涓婇潰鏈夎锛岃繑鍥瀟rue琛ㄧず鏍¢獙閫氳繃锛岃繑鍥瀎alse琛ㄧず涓嶉�氳繃
-							// uni.$u.test.mobile()灏辨槸杩斿洖true鎴栬�協alse鐨�
-							return this.$utils.verifyBankCard(value);
-						},
-						message: '鍗″彿涓嶆纭�',
-						trigger: 'blur'
-					}, {
-						// 鑷畾涔夐獙璇佸嚱鏁帮紝瑙佷笂璇存槑
-						asyncValidator: (rule, value, callback) => {
-							isContain({
-								params: {
-									cardNum: value
-								}
-							}).then(res => {
-								if (res) {
-									callback();
-								} else {
-									callback(new Error('鍗″彿涓嶅湪鍗℃鍐�'));
-								}
-							}).catch(() => {
-								callback(new Error('鍗″彿涓嶅湪鍗℃鍐�'));
-							})
-						},
-						trigger: 'blur'
-					}],
-					validdate: [{
-						required: true,
-						message: '鏈夋晥鏈熶笉鑳戒负绌�',
-						trigger: 'blur'
-					}, {
-						len: 4,
-						message: '鏈夋晥鏈熶笉姝g‘',
-						trigger: 'blur'
-					}],
-					cvv2: [{
-						required: true,
-						message: '瀹夊叏鐮佷笉鑳戒负绌�',
-						trigger: ['blur']
-					}, {
-						min: 3,
-						max: 4,
-						message: '瀹夊叏鐮侀暱搴︿负3-4',
-						trigger: 'blur'
-					}]
-				}
-			};
-		},
-		onLoad() {
-			const IS_NEW = uni.getStorageSync('IS_NEW')
-			if(!IS_NEW){
-				getUserInfo().then(res=>{
-					if(res){
-						this.userInfo = res
-						this.form.mobile = res.mobile
-						this.form.acctName = res.tlAuthName||res.memberName
-						this.form.idNo = res.tlAuthIdentityNo||res.idcard
-					}
-				})
-			}
-		},
-		onReady() {
-			//濡傛灉闇�瑕佸吋瀹瑰井淇″皬绋嬪簭锛屽苟涓旀牎楠岃鍒欎腑鍚湁鏂规硶绛夛紝鍙兘閫氳繃setRules鏂规硶璁剧疆瑙勫垯銆�
-			this.$refs.uForm.setRules(this.rules)
-		},
-		methods: {
-			codeChange(text) {
-				this.tips = text;
-			},
-			end() {
-				this.codeAct = true
-			},
-			start() {
-				this.codeAct = false
-			},
-			// 鍙戦�侀獙璇佺爜
-			getCode() {
-				if (this.$refs.uCode.canGetCode) {
-					delete this.rules.code
-					this.$refs.uForm.clearValidate();
-					this.$refs.uForm.setRules(this.rules);
-					this.$nextTick(() => {
-						this.$refs.uForm.validate().then(() => {
-							uni.showLoading({
-								title: '姝e湪鑾峰彇楠岃瘉鐮�'
-							})
-							const params = uni.$u.deepClone(this.form);
-							delete params.thpinfo
-							delete params.code
-							signUpToApply(params).then(res => {
-								this.form.thpinfo = JSON.stringify(res.thpinfo)
-								uni.hideLoading();
-								uni.$u.toast('楠岃瘉鐮佸凡鍙戦��');
-								// 閫氱煡楠岃瘉鐮佺粍浠跺唴閮ㄥ紑濮嬪�掕鏃�
-								this.$refs.uCode.start();
-							}).catch(() => {
-								uni.hideLoading();
-							})
-						})
-					})
-				} else {
-					uni.$u.toast('鍊掕鏃剁粨鏉熷悗鍐嶅彂閫�');
-				}
-			},
-			//閫夋嫨閾惰鍗$被鍨�
-			chooseType(type) {
-				this.cardType = type
-			},
-			//缁戝畾閾惰鍗�
-			doBind() {
-				if (!this.checked) {
-					this.showAgreement = true
-					return
-				}
-				this.rules.code = [{
-					required: true,
-					message: '楠岃瘉鐮佷笉鑳戒负绌�',
-					trigger: 'blur'
-				}, {
-					// 鑷畾涔夐獙璇佸嚱鏁帮紝瑙佷笂璇存槑
-					validator: (rule, value, callback) => {
-						// 涓婇潰鏈夎锛岃繑鍥瀟rue琛ㄧず鏍¢獙閫氳繃锛岃繑鍥瀎alse琛ㄧず涓嶉�氳繃
-						// uni.$u.test.mobile()灏辨槸杩斿洖true鎴栬�協alse鐨�
-						return uni.$u.test.code(value, 6);
-					},
-					message: '楠岃瘉鐮佹牸寮忎笉姝g‘',
-					trigger: 'blur'
-				}]
-				this.$refs.uForm.setRules(this.rules)
-				this.$nextTick(() => {
-					this.$refs.uForm.validate().then(() => {
-						this.loading = true
-						const params = uni.$u.deepClone(this.form);
-						if (this.cardType == 'DC') {
-							delete params.validdate
-							delete params.cvv2
-						}
-						bindCard(params).then(res => {
-							getMyCoupUseDetail().then(res => {
-								this.loading = false
-								if (res && res.length > 0) {
-									this.showAct = true
-									this.couponList = res
-								} else {
-									uni.showToast({
-										icon: 'success',
-										title: '缁戝崱鎴愬姛',
-										mask: true
-									})
-									setTimeout(() => {
-										uni.navigateBack()
-									}, 1000)
-								}
-							}).catch(() => {
-								this.loading = false
-							})
-						}).catch(() => {
-							this.loading = false
-						})
-					}).catch(errors => {
-
-					})
-				})
-			}
-		},
-
-	}
-</script>
-<style>
-	page {
-		background-color: #fff;
-		padding: 32rpx;
-		color: #333;
-	}
-</style>
-<style lang="scss" scoped>
-	.form-item {
-		border: 1px solid #D9D9D9;
-		border-radius: 10rpx;
-		padding: 4rpx 32rpx;
-	}
-
-	/deep/ .u-form-item__body__right__message {
-		text-align: right;
-	}
-
-	.btn-box {
-		width: 686rpx;
-		position: fixed;
-		bottom: 30rpx;
-	}
-
-	.bind-btn {
-		width: 686rpx;
-		height: 98rpx;
-		border-radius: 10rpx;
-		background: #d31f28;
-		color: #fff;
-		font-size: 34rpx;
-	}
-
-	.code-btn {
-		background-color: #F2F2F2;
-		border-radius: 10rpx;
-		color: #999;
-		width: 290rpx;
-		height: 88rpx;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		margin-left: 20rpx;
-	}
-
-	.code-act {
-		background-color: #D31F28;
-		color: #fff;
-	}
-
-	.type-btn {
-		width: 333rpx;
-		height: 88rpx;
-		border-radius: 10rpx;
-		border: 1px solid #d9d9d9;
-		background-color: #ffffff;
-		font-size: 30rpx;
-		color: #333;
-		text-align: center;
-		line-height: 88rpx;
-	}
-
-	.type-act {
-		font-weight: bold;
-		border-color: #D31F28;
-		color: #D31F28;
-		background-image: url('~@/static/check-type.png');
-		background-position: right bottom;
-		background-repeat: no-repeat;
-		background-size: 42rpx 38rpx;
-	}
-</style>
diff --git a/pages/pay/scanRes.vue b/pages/pay/scanRes.vue
deleted file mode 100644
index 3e71035..0000000
--- a/pages/pay/scanRes.vue
+++ /dev/null
@@ -1,116 +0,0 @@
-<template>
-	<view>
-		<movable-area :style="'width: ' + windowWidth + 'px;height:' + windowHeight + 'px'">
-			<web-view :src="url">
-			</web-view>
-			<movable-view direction="all" x="553rpx" :y="windowHeight/2-hf" v-if="cid" @click="openPay" class="pay-btn">
-				<image class="pay-img" src="/static/pay-btn.jpeg" mode=""></image>
-			</movable-view>
-		</movable-area>
-
-	</view>
-</template>
-
-<script>
-	import {
-		ACCESSTOKEN,
-		config
-	} from '@/common/config.js';
-	import {
-		getWechatInfo,
-		getOpenId,
-		getOpenIdBase
-	} from '@/common/api/index'
-	export default {
-		data() {
-			return {
-				hf: uni.upx2px(81),
-				cid: '',
-				windowHeight: 724,
-				windowWidth: 0,
-				url: ''
-			};
-		},
-		onLoad(opt) {
-			let sysInfo = uni.getSystemInfoSync();
-			this.windowHeight = sysInfo.windowHeight;
-			this.windowWidth = sysInfo.windowWidth;
-			if (opt.cid) {
-				uni.setStorageSync('CID', opt.cid)
-				if (opt.cid == '1285474127884455937') {
-					this.url =
-						"https://fxm.xintoucloud.com/scene-user-fillin?sceneCode=DE88783ECF1D4DC2BCBF25A1A683651AFA4A9523573FF4080F2086B00E00E78A1235219708A15E8B223AAC2D243884DE"
-				} else if (opt.cid == '1586530233928945664') {
-					this.url =
-						"https://fxm.xintoucloud.com/scene-user-fillin?sceneCode=622C5D9E30E54D07BCB3BF280DBEE266F4C88598A368881C81D0D8CECA02C3DB1235219708A15E8B223AAC2D243884DE"
-				}
-				this.cid = opt.cid
-			}
-			if (opt.code) {
-				uni.showLoading()
-				getOpenId({
-					params: {
-						code: opt.code
-					}
-				}).then(res => {
-					uni.setStorageSync(ACCESSTOKEN, res.token.accessToken)
-					uni.setStorageSync('IS_NEW', res.isNew)
-					let url = '/pages/pay/scanpay?cid=' + this.cid
-					if (res.isNew) {
-						url = '/pages/pay/wxpay?cid=' + this.cid
-					}
-					uni.hideLoading()
-					uni.redirectTo({
-						url: url
-					})
-				}).catch(() => {
-					uni.hideLoading()
-				})
-			}
-		},
-		methods: {
-			openPay() {
-				const TOKEN = uni.getStorageSync(ACCESSTOKEN) || null;
-				if (TOKEN) {
-					const IS_NEW = uni.getStorageSync('IS_NEW') || null;
-					let url = '/pages/pay/scanpay?cid=' + this.cid
-					if (IS_NEW) {
-						url = '/pages/pay/wxpay?cid=' + this.cid
-					}
-					uni.redirectTo({
-						url: url
-					})
-				} else {
-					uni.showLoading()
-					getWechatInfo().then(res => {
-						const redirect_uri = encodeURIComponent(
-							`${config.webURL}/pages/pay/scanRes?cid=${this.cid}`)
-						window.location.href =
-							`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${res}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
-					})
-				}
-			}
-
-		}
-	}
-</script>
-
-<style lang="scss">
-	.pay-btn {
-		position: fixed;
-		z-index: 99999;
-		width: 162rpx;
-		height: 162rpx;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		color: #fff;
-		border-radius: 15rpx;
-		overflow: hidden;
-	}
-
-	.pay-img {
-		width: 162rpx;
-		height: 162rpx;
-	}
-</style>
diff --git a/pages/pay/scanpay.vue b/pages/pay/scanpay.vue
deleted file mode 100644
index dd713a0..0000000
--- a/pages/pay/scanpay.vue
+++ /dev/null
@@ -1,846 +0,0 @@
-<!-- 鎵爜鏀粯 -->
-<template>
-	<view class="page">
-		<view class="shop u-flex u-row-between">
-			<view class="u-m-r-30">
-				<view class="u-font-28 color-666 u-m-b-10">浠樻缁�</view>
-				<view class="u-font-34 font-bold color-333">{{ shopInfo.shop_name }}</view>
-			</view>
-			<image :src="shopInfo.logo_image||'/static/imgs/store-logo.png'" class="avg-img"></image>
-		</view>
-		<view class="u-p-48 bg-fff u-flex-1 content">
-			<view class="u-font-28 color-666">閲戦</view>
-			<view class="u-p-v-20 u-flex u-border-bottom u-relative">
-				<view class="money-icon color-333">楼</view>
-				<view class="u-flex-1 u-flex u-m-l-10" style="height: 80rpx;">
-					<view v-if="money" class="money-num">{{ money }}</view>
-					<view :class="['cursor',{'cursor-act':!money&&bordShow}]"></view>
-					<view v-if="!money" class="u-font-50 color-999">璇疯緭鍏ラ噾棰�</view>
-					<view :class="['cursor',{'cursor-act':money&&bordShow}]"></view>
-				</view>
-				<view class="mask" @click="showBord"></view>
-			</view>
-			<view class="u-font-28 color-666 u-m-t-60">閫夋嫨鏀粯鏂瑰紡</view>
-			<u-radio-group v-model="payWay" placement="column">
-				<view v-if="platform == 5" class="u-border-bottom u-p-v-20 u-flex u-row-between">
-					<image src="@/static/imgs/pay-zfb.png" class="pay-icon"></image>
-					<view class="flex-1">
-						<view class="u-font-30 color-333">鏀粯瀹�</view>
-						<text v-if="isNew" class="tag u-m-t-10">浼氬憳浜紭鎯�</text>
-						<text v-if="!isNew&&token&&shopInfo.use_score_flag&&shopInfo.app_pay_use_score_flag" class="u-font-24 color-999 u-m-t-10">
-							鍙敤
-							<text class="color-red">{{ integral }}</text>
-							绉垎
-						</text>
-					</view>
-					<view v-if="token&&couponInfo&&shopInfo.user_coupon_flag&&shopInfo.app_pay_use_coupon_flag" class="tag-pain">
-						婊{
-              parseFloat((couponInfo.thresholdValue / 100).toFixed(2))
-            }}鍏冨噺{{ parseFloat((couponInfo.discount / 100).toFixed(2)) }}鍏�
-					</view>
-					<u-radio @change="radioChange($event,5)" :name="5" activeColor="#D41F28" :customStyle="{ marginLeft: '10rpx' }"></u-radio>
-				</view>
-				<view v-if="platform == 2" class="u-border-bottom u-p-v-20 u-flex u-row-between">
-					<image src="@/static/imgs/pay-wx.png" class="pay-icon"></image>
-					<view class="flex-1">
-						<view class="u-font-30 color-333">寰俊</view>
-						<text v-if="isNew" class="tag u-m-t-10">浼氬憳浜紭鎯�</text>
-						<text v-if="!isNew&&token&&shopInfo.use_score_flag&&shopInfo.app_pay_use_score_flag" class="u-font-24 color-999 u-m-t-10">
-							鍙敤
-							<text class="color-red">{{ integral }}</text>
-							绉垎
-						</text>
-					</view>
-					<view v-if="token&&couponInfo&&shopInfo.user_coupon_flag&&shopInfo.app_pay_use_coupon_flag" class="tag-pain">
-						婊{
-              parseFloat((couponInfo.thresholdValue / 100).toFixed(2))
-            }}鍏冨噺{{ parseFloat((couponInfo.discount / 100).toFixed(2)) }}鍏�
-					</view>
-					<u-radio @change="radioChange($event,2)" :name="2" activeColor="#D41F28" :customStyle="{ marginLeft: '10rpx' }">
-					</u-radio>
-				</view>
-				<!-- <navigator v-if="shuaka&&token&&bankCard!=-1" class="shuka" url="/pages/pay/shuaKa/shuaKa">
-					<image src="/static/shuaka/shuaka.png" mode=""></image>
-				</navigator> -->
-				<view v-if="bankCard.id" class="u-border-bottom u-p-v-20 u-flex">
-					<view @click="bordShow=false;bankCardOpen=true" class="flex-1 u-flex">
-						<image :src="bankCardStyle.logo" class="pay-icon"></image>
-						<view>
-							<view class="u-font-30 color-333 u-flex">
-								{{ bankCard.bankName }}({{ cardType[bankCard.cardType] }})({{ bankCard.cardNo }})
-								<u-icon name="arrow-right" color="#000">
-								</u-icon>
-							</view>
-							<!-- <text v-if="isNew" class="tag u-m-t-10">浼氬憳浜紭鎯�</text> -->
-							<text v-if="!isNew&&shopInfo.use_score_flag&&shopInfo.bank_pay_use_score_flag" class="u-font-24 color-999 u-m-t-10">
-								鍙敤
-								<text class="color-red">{{ integral }}</text>
-								绉垎
-							</text>
-						</view>
-					</view>
-					<view v-if="!isNew&&shopInfo.user_coupon_flag&&shopInfo.bank_pay_use_coupon_flag&&couponInfo" class="tag-pain">
-						婊{
-              parseFloat((couponInfo.thresholdValue / 100).toFixed(2))
-            }}鍏冨噺{{ parseFloat((couponInfo.discount / 100).toFixed(2)) }}鍏�
-					</view>
-					<u-radio @change="radioChange($event,3, bankCard.id)" :name="3" activeColor="#D41F28" :customStyle="{ marginLeft: '10rpx' }">
-					</u-radio>
-				</view>
-			</u-radio-group>
-			<!-- <navigator v-if="bankCard==-1&&bindCard&&token&&!isNew" class="shuka" url="/pages/pay/bindCard/bindCard">
-				<image src="/static/bangka.png" mode=""></image>
-			</navigator>
-			<navigator v-if="bankCard==-1&&!isNew" url="/pages/pay/bindCard/bindCard" class="u-border-bottom u-p-v-20 u-flex u-row-between">
-				<view class="u-flex-1 u-flex ">
-					<image class="pay-icon" :src="bankCardStyle.logo" mode=""></image>
-					<view class="flex-1 u-m-l-20">
-						<view class="u-font-30 color-333">閾惰鍗�</view>
-						<view class="u-font-24 color-red">缁戝崱鍙韩鏇村浼樻儬</view>
-					</view>
-				</view>
-				<u-radio disabled activeColor="#D41F28" :customStyle="{ marginLeft: '30rpx' }">
-				</u-radio>
-			</navigator> -->
-			<navigator v-if="isNew" class="reg-btn" :url="'/pages/pay/register?cid='+cid">
-				<image src="/static/register-btn.png" mode=""></image>
-			</navigator>
-		</view>
-
-
-		<button class="pay-it" @click="pay">浠樻</button>
-		<!-- 閫夋嫨閾惰鍗� -->
-		<u-popup mode="bottom" :closeable="true" :show="bankCardOpen" :round="10" @close="bankCardOpen = false">
-			<view class="u-font-32 color-333 u-text-center u-p-30 u-border-bottom">閫夋嫨閾惰鏀粯</view>
-			<scroll-view scroll-y class="u-p-h-30 bankCard-list">
-				<block v-for="(item,i) in bankCardList" :key="i">
-					<view @click="chooseBankCard(item)" class="u-border-bottom u-p-v-30 u-flex">
-						<view class="flex-1 u-flex">
-							<image :src="bankCardStyle.logo" class="pay-icon"></image>
-							<view>
-								<view class="u-font-26 color-333">{{ item.bankName }}</view>
-								<view class="u-m-t-10 u-font-28 color-333">{{ cardType[item.cardType] }}({{ item.cardNo }})
-								</view>
-							</view>
-						</view>
-						<u-icon name="checkbox-mark" :color="bankCardId==item.id?'#D31F28':'#fff'" size="22"></u-icon>
-					</view>
-				</block>
-				<navigator url="/pages/pay/bindCard/bindCard" class="u-border-bottom u-p-v-30 u-flex">
-					<view class="add-icon">
-						<u-icon name="plus" bold color="#D31F28"></u-icon>
-					</view>
-					<view class="u-font-28 color-333 u-m-l-20">浣跨敤鏂板崱鏀粯</view>
-				</navigator>
-			</scroll-view>
-		</u-popup>
-		<!-- 鏁板瓧閿洏 -->
-		<u-popup :show="bordShow" :overlay="false" @close="bordShow = false">
-			<key-bord @changeMoney="changeMoney" :num.sync="money" @close="bordShow = false" @pay="pay"></key-bord>
-		</u-popup>
-		<!-- 鏀粯楠岃瘉鐮� -->
-		<u-popup :show="codeShow" closeable mode="center" @close="codeShow = false">
-			<view class="u-p-h-40 u-p-b-40">
-				<view class="u-text-center u-p-t-20 u-m-b-30 u-font-34">璇疯緭鍏ユ墜鏈洪獙璇佺爜</view>
-				<view class="u-text-center u-m-b-20 color-666">{{ shopInfo.shop_name }}</view>
-				<view class="u-flex u-row-center font-bold u-m-b-40">
-					<text class="u-font-42">锟�</text>
-					<text class="u-font-money">{{ money }}
-					</text>
-				</view>
-				<u-code-input @finish="bankPay" v-model="smscode" mode="box" :focus="true"></u-code-input>
-			</view>
-
-		</u-popup>
-	</view>
-</template>
-
-<script>
-	import {
-		config,
-		cardType,
-		ACCESSTOKEN
-	} from '@/common/config.js';
-	import {
-		headBand,
-		bankCardStyle,
-		myBankCard,
-		queryShop,
-		queryMyDiscount,
-		getScoreWorth,
-		userLogin,
-		queryScore,
-		queryMyUseSweepPayMaxCoupon,
-		getWechatConfigInfo,
-		saveWxOrder,
-		saveOrder,
-		tlPay
-	} from '@/common/api/index'
-	import wx from 'weixin-js-sdk'; // 浣跨敤js-sdk
-	import {
-		activityInfo
-	} from '@/common/api/shuaka'
-
-	export default {
-		data() {
-			return {
-				platform: this.$utils.getPlat(),
-				cardType: cardType,
-				cid: '',
-				bordShow: false, // 鏄剧ず閿洏
-				scoreWorth: 0,
-				shopInfo: {
-					shop_name: '',
-					scan_flag: '',
-					use_score_flag: 0, //鍟嗛摵鏄惁鍙敤绉垎 0鍚� 1鏄�
-					user_coupon_flag: 0, //鍟嗛摵鏄惁鍙敤浼樻儬鍒� 0鍚� 1鏄�
-					app_pay_use_score_flag: 0, //寰俊/鏀粯瀹濇槸鍚﹀彲鐢ㄧН鍒� 0鍚� 1鏄�
-					app_pay_use_coupon_flag: 0, //寰俊/鏀粯瀹濇槸鍚﹀彲鐢ㄤ紭鎯犲埜 0鍚� 1鏄�
-					bank_pay_use_score_flag: 0, //閾惰鍗℃敮浠樻槸鍚﹀彲鐢ㄧН鍒� 0鍚� 1鏄�
-					bank_pay_use_coupon_flag: 0, //閾惰鍗℃敮浠樻槸鍚﹀彲鐢ㄤ紭鎯犲埜 0鍚� 1鏄�
-				},
-				money: '', // 閲戦
-				integral: 0, // 浣跨敤绉垎
-				couponInfo: null, // 浼樻儬鍒稿唴瀹�
-				payWay: 3, //鏀粯鏂瑰紡 5 鏀粯瀹� 2 寰俊 3閾惰鍗�
-				token: null,
-				isNew: false, // 鏄惁鏂扮敤鎴凤紝鏂扮敤鎴锋煡璇笉鍒扮Н鍒嗗拰閾惰鍗�
-				codeShow: false, // 閾惰鍗℃敮浠橀獙璇佺爜杈撳叆寮圭獥
-				smscode: '', // 閾惰鍗℃敮浠橀獙璇佺爜
-				thpinfo: null,
-				bankCardStyle: {
-					color: '',
-					logo: ''
-				},
-				bankCardList: [], //閾惰鍗″垪琛�
-				bankCard: -1, // 閫変腑閾惰鍗�
-				bankCardId: null, // 閫変腑閾惰鍗�
-				bankCardOpen: false,
-				canReset: false,
-				end: 0,
-				count: 0,
-				shuaka: null, //鍒峰崱娲诲姩
-				bindCard: false, // 缁戝崱鏈夌ぜ
-				discount: {
-					memberGradeName: '',
-					shopDiscount: 10
-				},
-				aLiUserId: ''
-			};
-		},
-		onLoad(opt) {
-			this.isNew = uni.getStorageSync('IS_NEW')
-			uni.showLoading()
-			this.payWay = this.platform
-			if (opt.cid) {
-				this.cid = opt.cid
-				uni.setStorageSync('CID', opt.cid)
-				this.init()
-			}
-			if (opt.code || opt.auth_code) {
-				let code = opt.code
-				if (this.platform == 5) {
-					code = opt.auth_code
-				}
-				this.end++
-				userLogin({
-					platform: this.platform,
-					params: {
-						code
-					}
-				}).then(res => {
-					this.getToken(res)
-				}).catch(() => {
-					uni.hideLoading()
-				})
-			} else {
-				if (process.env.NODE_ENV === 'development') {
-					console.log('寮�鍙戠幆澧�');
-				} else {
-					console.log('鐢熶骇鐜');
-					const redirect_uri = encodeURIComponent(window.location.href.split('?')[0] + '?cid=' + this.cid)
-					if (this.platform == 2) {
-						window.location.href =
-							`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${config.wx_appid}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
-					} else if (this.platform == 5) {
-						window.location.href =
-							`https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=${config.ali_appid}&scope=auth_base&redirect_uri=${redirect_uri}&state=STATE`
-					}
-				}
-			}
-
-		},
-		onShow() {
-			this.token = uni.getStorageSync(ACCESSTOKEN) || null
-			this.bordShow = false
-			this.bankCardOpen = false
-			this.codeShow = false
-			this.smscode = ''
-			if (this.canReset && this.token && !this.isNew) {
-				this.end = 0
-				this.count = 0
-				uni.showLoading()
-				this.getUserInfo()
-			}
-			this.canReset = true
-		},
-		methods: {
-			getToken(res) {
-				this.count++
-				if (this.count >= this.end) {
-					uni.hideLoading()
-				}
-				this.token = res.token
-				uni.setStorageSync(ACCESSTOKEN, res.token)
-				uni.setStorageSync('IS_NEW', res.isNew)
-				this.isNew = res.isNew
-				if (!res.isNew) {
-					this.getUserInfo()
-				}
-			},
-			radioChange(e, item, bankCardId) {
-				this.bordShow = false
-				this.payWay = item
-				if (bankCardId) {
-					this.bankCardId = bankCardId
-				}
-			},
-			// 鏇存柊閲戦
-			changeMoney(str) {
-				this.money = str;
-			},
-			// 灞曠ず閿洏
-			showBord() {
-				this.bordShow = true;
-			},
-			init() {
-				this.end += 1
-				//鑾峰彇鍟嗛摵淇℃伅
-				queryShop({
-					params: {
-						cid: this.cid
-					}
-				}).then(res => {
-					this.count++
-					if (this.count >= this.end) {
-						uni.hideLoading()
-					}
-					if (res.logo_image) {
-						try {
-							let arr = JSON.parse(res.logo_image)
-							res.logo_image = config.sftpURL + arr[0].path
-						} catch (e) {
-							//TODO handle the exception
-							res.logo_image = ''
-						}
-					}
-					this.shopInfo = res
-				}).catch(() => {
-					uni.hideLoading()
-				})
-			},
-			//鏌ヨ钀ラ攢淇℃伅
-			getMarketing(){
-				this.end += 4
-				// 鍒峰崱鏈夌ぜ
-				activityInfo().then(res => {
-					this.count++
-					if (this.count >= this.end) {
-						uni.hideLoading()
-					}
-					this.shuaka = res
-				}).catch(() => {
-					uni.hideLoading()
-				})
-				// 棣栫粦鏈夌ぜ
-				headBand().then(res => {
-					this.count++
-					if (this.count >= this.end) {
-						uni.hideLoading()
-					}
-					this.bindCard = res
-				}).catch(() => {
-					uni.hideLoading()
-				})
-				// 绉垎浠峰��
-				getScoreWorth().then(res => {
-					this.count++
-					if (this.count >= this.end) {
-						uni.hideLoading()
-					}
-					this.scoreWorth = res.settingVal
-				}).catch(() => {
-					uni.hideLoading()
-				})
-				//鑾峰彇閾惰鍗¢鏍奸厤缃�
-				bankCardStyle().then(res => {
-					this.count++
-					if (this.count >= this.end) {
-						uni.hideLoading()
-					}
-					try {
-						let arr = JSON.parse(res.logo)
-						res.logo = config.sftpURL + arr[0].path
-					} catch (e) {
-						//TODO handle the exception
-						res.logo = ''
-					}
-					this.bankCardStyle = res
-					uni.setStorageSync('bankCardStyle', res)
-				}).catch(() => {
-					uni.hideLoading()
-				})
-				if (this.platform == 2) {
-					this.end += 1
-					//鑾峰彇寰俊jsSdk閰嶇疆
-					const uri = encodeURIComponent(window.location)
-					getWechatConfigInfo({
-						url: uri
-					}).then(res => {
-						this.count++
-						if (this.count >= this.end) {
-							uni.hideLoading()
-						}
-						wx.config({
-							debug: false, // 寮�鍚皟璇曟ā寮�
-							appId: res.appId, // 蹇呭~锛屽叕浼楀彿鐨勫敮涓�鏍囪瘑
-							timestamp: res.timestamp, // 蹇呭~锛岀敓鎴愮鍚嶇殑鏃堕棿鎴�
-							nonceStr: res.noncestr, // 蹇呭~锛岀敓鎴愮鍚嶇殑闅忔満涓�
-							signature: res.signature, // 蹇呭~锛岀鍚�
-							jsApiList: ['chooseWXPay'], // 蹇呭~锛岄渶瑕佷娇鐢ㄧ殑 JS 鎺ュ彛鍒楄〃
-							openTagList: [
-								'wx-open-launch-weapp'
-							] // 鍙�夛紝闇�瑕佷娇鐢ㄧ殑寮�鏀炬爣绛惧垪琛紝渚嬪['wx-open-launch-app']
-						});
-					}).catch(() => {
-						uni.hideLoading()
-					})
-				}
-			},
-			// 鑾峰彇浼氬憳鐩稿叧淇℃伅
-			getUserInfo() {
-				this.end += 1
-
-				/*queryMyDiscount({
-					shopId: this.shopInfo.id
-				}).then(res => {
-					this.count++
-					if (this.count >= this.end) {
-						uni.hideLoading()
-					}
-					res.shopDiscount = parseFloat(res.shopDiscount / 10)
-					this.discount = res
-					uni.setStorageSync('DISCOUNT_INFO', res)
-				}).catch(() => {
-					this.count++
-					if (this.count >= this.end) {
-						uni.hideLoading()
-					}
-				})*/
-				/* //鑾峰彇鐢ㄦ埛閾惰鍗�
-				myBankCard().then(res => {
-					this.count++
-					if (this.count >= this.end) {
-						uni.hideLoading()
-					}
-					this.bankCardList = res.rows
-					if (res.rows[0]) {
-						this.bankCard = res.rows[0]
-						if (this.platform == 3) {
-							this.bankCardId = res.rows[0].id
-						}
-					} else {
-						this.bankCard = -1
-					}
-				}).catch(() => {
-					this.count++
-					if (this.count >= this.end) {
-						uni.hideLoading()
-					}
-				})
-				//鑾峰彇鐢ㄦ埛绉垎
-				queryScore().then(res => {
-					this.count++
-					if (this.count >= this.end) {
-						uni.hideLoading()
-					}
-					this.integral = res.totalScore
-				}).catch(() => {
-					this.count++
-					if (this.count >= this.end) {
-						uni.hideLoading()
-					}
-				}) */
-				//鑾峰彇鐢ㄦ埛浼樻儬鍒�
-				queryMyUseSweepPayMaxCoupon({
-					params: {
-						shopId: this.shopInfo.id
-					}
-				}).then(res => {
-
-					this.count++
-					if (this.count >= this.end) {
-						uni.hideLoading()
-					}
-					this.couponInfo = res
-				}).catch(() => {
-					this.count++
-					if (this.count >= this.end) {
-						uni.hideLoading()
-					}
-				})
-			},
-			// 閫夋嫨閾惰鍗�
-			chooseBankCard(item) {
-				this.payWay = 3
-				this.bankCard = item;
-				this.$nextTick(() => {
-					this.bankCardId = item.id
-					this.bankCardOpen = false
-				})
-			},
-			//璺宠浆钀ラ攢椤甸潰
-			toDiscount() {
-				const shopInfo = encodeURIComponent(JSON.stringify(this.shopInfo))
-				if (!this.isNew) { //鏄細鍛�
-					if (this.integral > 0 || this.couponInfo) { //鏈変紭鎯犲埜鎴栫Н鍒�
-						if (this.payWay == 3 && (this.shopInfo.bank_pay_use_score_flag || this.shopInfo
-								.bank_pay_use_coupon_flag)) { //閾惰鍗℃敮浠�
-
-							uni.navigateTo({
-								url: `/pages/pay/discountpay?shopInfo=${shopInfo}&integral=${this.integral}&scoreWorth=${this.scoreWorth}&money=${this.money}&payWay=${this.payWay}&bankCardId=${this.bankCardId}`
-							})
-							return false
-						} else if ((this.shopInfo.use_score_flag && this.shopInfo.app_pay_use_score_flag) || (this
-								.shopInfo
-								.user_coupon_flag && this.shopInfo.app_pay_use_coupon_flag)) {
-							uni.navigateTo({
-								url: `/pages/pay/discountpay?shopInfo=${shopInfo}&integral=${this.integral}&scoreWorth=${this.scoreWorth}&money=${this.money}&payWay=${this.payWay}&bankCardId=${this.bankCardId}`
-							})
-							return false
-						} else if (this.discount.shopDiscount != 1) {
-							uni.navigateTo({
-								url: `/pages/pay/discountpay?shopInfo=${shopInfo}&integral=${this.integral}&scoreWorth=${this.scoreWorth}&money=${this.money}&payWay=${this.payWay}&bankCardId=${this.bankCardId}`
-							})
-							return false
-						} else {
-							return true
-						}
-					} else if (this.discount.shopDiscount != 1) {
-						uni.navigateTo({
-							url: `/pages/pay/discountpay?shopInfo=${shopInfo}&integral=${this.integral}&scoreWorth=${this.scoreWorth}&money=${this.money}&payWay=${this.payWay}&bankCardId=${this.bankCardId}`
-						})
-						return false
-					} else {
-						return true
-					}
-				} else {
-					return true
-				}
-			},
-			//纭鏀粯
-			pay() {
-				if (uni.$u.test.isEmpty(this.money)) {
-					uni.$u.toast('璇疯緭鍏ラ噾棰濓紒')
-					return
-				}
-				this.bordShow = false
-				// return this.toDiscount() //鍒ゆ柇鏄惁闇�瑕佽烦杞惀閿�椤甸潰
-				if (this.toDiscount()) {
-					// 閲戦 this.money
-					uni.showLoading()
-					const params = {
-						money: parseFloat((this.money * 100).toPrecision(12)),
-						shopId: this.shopInfo.id,
-						cid: this.cid,
-						payWay: this.payWay,
-						score: 0,
-						couponDetailId: ''
-					}
-					if (this.payWay == 3) {
-						params.bankCardId = this.bankCardId
-					}
-					//鐢熸垚璁㈠崟
-          saveOrder(params).then(res => {
-						uni.hideLoading()
-						try {
-							this.orderId = res.orderId
-							res.youHuiInfo.shopName = this.shopInfo.shop_name
-							this.youHuiInfo = res.youHuiInfo
-							if (res.toPayMethod == 1) {
-								if (this.payWay == 3) {
-									this.smscode = ''
-									this.codeShow = true
-								}
-							} else if (res.toPayMethod == 2) {
-								if (this.payWay == 2) {
-									this.wxPay(res.paymentData)
-								}
-								if (this.payWay == 5) {
-									this.aliPay(res.paymentData)
-								}
-							} else if (res.toPayMethod == 3) {
-								// window.location.href = res.paymentUrl
-								this.smscode = ''
-								this.codeShow = true
-							}
-						} catch (e) {
-							//TODO handle the exception
-							console.error(e);
-						}
-					}).catch(() => {
-						uni.hideLoading()
-					})
-				}
-
-			},
-			// 寰俊鏀粯
-			wxPay(res) {
-				setTimeout(() => {
-					WeixinJSBridge.invoke(
-						'getBrandWCPayRequest', {
-							"appId": res.appId, //鍏紬鍙稩D锛岀敱鍟嗘埛浼犲叆
-							"timeStamp": res.timeStamp, //鏃堕棿鎴筹紝鑷�1970骞翠互鏉ョ殑绉掓暟
-							"nonceStr": res.nonceStr, //闅忔満涓�
-							"package": res.package,
-							"signType": res.signType, //寰俊绛惧悕鏂瑰紡锛�
-							"paySign": res.paySign //寰俊绛惧悕
-						},
-						(res) => {
-							if (res.err_msg == "get_brand_wcpay_request:ok") {
-								// 浣跨敤浠ヤ笂鏂瑰紡鍒ゆ柇鍓嶇杩斿洖,寰俊鍥㈤槦閮戦噸鎻愮ず锛�
-								//res.err_msg灏嗗湪鐢ㄦ埛鏀粯鎴愬姛鍚庤繑鍥瀘k锛屼絾骞朵笉淇濊瘉瀹冪粷瀵瑰彲闈犮��
-								uni.navigateTo({
-									url: `/pages/pay/paySuccess?orderId=${this.orderId}&youHuiInfo=${JSON
-                      .stringify(this.youHuiInfo)}`
-								})
-							}
-						});
-				}, 200)
-			},
-			//鏀粯瀹濇敮浠�
-			aliPay(res) {
-				ap.tradePay({
-					tradeNO: res.tradeNO
-				}, (res) => {
-					if (res.resultCode == 9000) {
-						uni.navigateTo({
-							url: `/pages/pay/paySuccess?orderId=${this.orderId}&youHuiInfo=${JSON
-                .stringify(this.youHuiInfo)}`
-						})
-						// 鏀粯鎴愬姛
-					} else if (res.resultCode == 8000 || res.resultCode == 6001) {
-						// 姝e湪澶勭悊涓� || 鍙栨秷
-					} else {
-						// 鏀粯澶辫触
-					}
-				});
-			},
-			//閾惰鍗℃敮浠�
-			bankPay(e) {
-				uni.showLoading()
-				tlPay({
-					orderId: this.orderId,
-					payWay: 3,
-					bankCardId: this.bankCardId,
-					smscode: e,
-				}).then(res => {
-					uni.hideLoading()
-					uni.hideKeyboard()
-					this.codeShow = false
-					uni.navigateTo({
-						url: `/pages/pay/paySuccess?orderId=${this.orderId}&youHuiInfo=${JSON
-              .stringify(this.youHuiInfo)}`
-					})
-				}).catch(() => {
-					uni.hideLoading()
-				})
-			}
-		}
-	};
-</script>
-
-<style scoped lang="scss">
-	.page {
-		height: calc(100vh - 0px);
-		display: flex;
-		flex-direction: column;
-	}
-
-	.shop {
-		padding: 50rpx 64rpx;
-	}
-
-	.avg-img {
-		width: 94rpx;
-		height: 94rpx;
-		border-radius: 10rpx;
-		background-color: #ffffff;
-	}
-
-	.content {
-		border-radius: 40rpx 40rpx 0 0;
-	}
-
-	.money {
-		font-size: 40rpx;
-		color: #333;
-	}
-
-	.money-icon {
-		font-size: 70rpx;
-		// font-weight: bold;
-		margin-right: 20rpx;
-	}
-
-	.money-num {
-		font-size: 96rpx;
-		// font-weight: bold;
-	}
-
-	.pay-it {
-		position: absolute;
-		width: 686rpx;
-		height: 98rpx;
-		bottom: 0;
-		border-radius: 10rpx;
-		font-size: 34rpx;
-		color: #ffffff;
-		background-color: #de2d35;
-		margin: 32rpx;
-	}
-
-	.bank-card-ad {
-		padding-top: 50rpx;
-		background-image: url(~@/static/bank-card-ad1.png);
-		background-size: 100% auto;
-		background-position: top center;
-		background-repeat: no-repeat;
-	}
-
-	.pay-icon {
-		align-self: flex-start;
-		width: 48rpx;
-		height: 48rpx;
-		margin-right: 20rpx;
-	}
-
-	.tag {
-		background-color: #F35656;
-		font-size: 20rpx;
-		color: #fff;
-		border-radius: 4rpx;
-		line-height: 1;
-		padding: 4rpx;
-	}
-
-	.tag-pain {
-		border: 1px solid #D31F28;
-		font-size: 22rpx;
-		color: #D31F28;
-		border-radius: 4rpx;
-		line-height: 1;
-		padding: 8rpx 4rpx;
-	}
-
-	.mask {
-		position: absolute;
-		width: 100%;
-		height: 100%;
-		left: 0;
-		bottom: 0;
-		z-index: 101;
-		background-color: rgba(0, 0, 0, 0);
-	}
-
-	@keyframes cursor-blinks {
-		0% {
-			opacity: 1;
-			display: block;
-		}
-
-		50% {
-			opacity: 0;
-			display: none;
-		}
-
-		100% {
-			opacity: 1;
-			display: block;
-		}
-	}
-
-	.cursor {
-		border-left: 1px solid transparent;
-		height: 80rpx;
-	}
-
-	.cursor-act {
-		border-left: 1px solid #333;
-		animation: cursor-blinks 1s infinite steps(1, start);
-	}
-
-	.reg-btn {
-		display: block;
-		margin-top: 30rpx;
-		width: 654rpx;
-		height: 198rpx;
-
-		image {
-			width: 100%;
-			height: 100%;
-		}
-	}
-
-	.u-font-money {
-		font-size: 60rpx;
-	}
-
-	.bankCard-list {
-		height: 50vh;
-		width: 750rpx;
-		box-sizing: border-box;
-
-		.pay-icon {
-			align-self: center;
-		}
-	}
-
-	.add-icon {
-		width: 50rpx;
-		height: 50rpx;
-		border-radius: 25rpx;
-		background: #ffc0c38f;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.shuka {
-		width: 678rpx;
-		height: 45rpx;
-		position: relative;
-		left: -10rpx;
-
-		image {
-			width: 100%;
-			height: 100%;
-		}
-	}
-
-	.btn {
-		/* position: fixed;
-  bottom: 100rpx; */
-		margin: 0 auto;
-		margin-top: 120rpx;
-		position: relative;
-		width: 680rpx;
-		height: 100rpx;
-	}
-
-	.wx-app {
-		position: absolute;
-		width: 680rpx;
-		height: 100rpx;
-	}
-</style>
\ No newline at end of file
diff --git a/pages/pay/shuaKa/introduce.vue b/pages/pay/shuaKa/introduce.vue
deleted file mode 100644
index 4d87bcf..0000000
--- a/pages/pay/shuaKa/introduce.vue
+++ /dev/null
@@ -1,92 +0,0 @@
-<template>
-	<view>
-		<view class="title">
-			<image class="title-icon" src="/static/shuaka/title-icon1.png"></image>
-			<view class="title-text">娲诲姩绱Н瑙勫垯</view>
-		</view>
-		<view class="content">
-			<view class="u-m-t-20">
-				1銆佸弬涓庢椂闂达細{{$u.timeFormat(info.actStartTime, 'yyyy骞磎m鏈坉d鏃�')}}鍒皗{$u.timeFormat(info.actEndTime, 'yyyy骞磎m鏈坉d鏃�')}}锛屽悕棰漿{info.numOfUser}}浜恒��
-			</view>
-			<view>2銆佺疮绉埛鍗$瑪鏁版湁鏁堟椂闂达細鐢ㄦ埛鎴愬姛鍙備笌娲诲姩鍚巤{info.dayMax}}澶╁唴銆�</view>
-			<view class="u-m-t-20">3銆佺疮绉鍒欙細鐢ㄦ埛浣跨敤娲诲姩鎸囧畾閾惰鍗¤繘琛屾敮浠橈紝鍗曠瑪鏀粯瀹為檯鏀粯閲戦澶т簬绛変簬{{info.numOfMin/100}}鍏冪殑浜ゆ槗锛屾柟鍙疮绉椿鍔ㄥ埛鍗$瑪鏁般��</view>
-			<view class="u-m-t-20">
-				4銆佺疮绉笂闄愶細鐢ㄦ埛鍙備笌娲诲姩鍚庯紝姣忎釜鑷劧鏃ユ渶澶氱疮绉瘂{info.numOfDay}}绗旀椿鍔ㄥ埛鍗$瑪鏁帮紝瓒呰繃{{info.numOfDay}}绗斿悗锛屽綋澶╃户缁氦鏄撳皢涓嶄細璁″叆娲诲姩鍒峰崱绗旀暟銆�</view>
-		</view>
-		<view class="title">
-			<image class="title-icon" src="/static/shuaka/title-icon2.png"></image>
-			<view class="title-text">娲诲姩瑙勫垯</view>
-		</view>
-		<view class="content">{{info.actRules}}</view>
-
-	</view>
-</template>
-
-<script>
-	import {
-		activityInfo
-	} from '@/common/api/shuaka'
-	export default {
-		data() {
-			return {
-				info: {
-					bankCardName: '',
-					totalDiscount: 0,
-					dayMax: 0,
-					numOfMin: 0,
-					numOfDay: 0,
-					numOfUser: 0,
-					actRules: ''
-				},
-			};
-		},
-		onLoad() {
-			activityInfo().then(res => {
-				if (res) {
-					res.actRules = decodeURIComponent(res.actRules || '')
-					this.info = res
-				}
-			})
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	page {
-		box-sizing: border-box;
-		background-color: #ffffff;
-		padding: 0 32rpx 32rpx;
-	}
-
-	.title {
-		display: flex;
-		justify-content: center;
-		margin: 60rpx 0;
-	}
-
-	.title-icon {
-		width: 42rpx;
-		height: 42rpx;
-		margin-top: 10rpx;
-		margin-right: 10rpx;
-	}
-
-	.title-text {
-		font-size: 36rpx;
-		font-weight: 500;
-		padding-bottom: 20rpx;
-		color: #333333;
-		background-image: url('~@/static/shuaka/title-bg.png');
-		background-position: left bottom;
-		background-size: 170rpx 14rpx;
-		background-repeat: no-repeat;
-	}
-
-	.content {
-		line-height: 1.5;
-		font-size: 30rpx;
-		font-weight: 400;
-		counter-reset: #333333;
-		white-space: pre-wrap;
-	}
-</style>
diff --git a/pages/pay/shuaKa/shuaKa.vue b/pages/pay/shuaKa/shuaKa.vue
deleted file mode 100644
index a73d3aa..0000000
--- a/pages/pay/shuaKa/shuaKa.vue
+++ /dev/null
@@ -1,673 +0,0 @@
-<template>
-	<view>
-		<view :class="join?'page1':'page'">
-			<image class="logo1" :src="bankCardStyle.logo"></image>
-			<view class="douyu-txt page-title">鍒�<text>{{info.bankCardName}}</text></view>
-			<view class="douyu-txt page-title">鏈�楂樺彲寰梴{info.totalDiscount/100}}鍏冪ぜ鍖�</view>
-			<view class="detils-title">鍒穥{info.bankCardName}}锛岀疮绉瑪鏁拌幏绀煎寘 <navigator class="detail"
-					url="/pages/pay/shuaKa/introduce">璇︽儏
-				</navigator>
-			</view>
-			<view v-if="join" class="step-box">
-				<view class="step">
-					<view class="step-title">鏈椿鍔ㄥ墿浣�<text>{{diffDay}}</text>澶�</view>
-					<scroll-view :scroll-into-view="`step-item-${current-1}`" class="step-item-box"
-						scroll-with-animation scroll-x>
-						<view :id="`step-item-${i}`" class="jmy-flex step-item" v-for="(item,i) in milepost" :key="i">
-							<view @click="stepClick(i)" class="jmy-text-center">
-								<image class="step-icon"
-									:src="item.lackBrushCount>0?'/static/shuaka/pay-by-card-step.png':'/static/shuaka/pay-by-card-step-act.png'">
-								</image>
-								<view :class="['step-item-title',{'step-item-title-act':current==i}]">
-									{{item.nodeName}}
-								</view>
-							</view>
-							<view v-if="item.lackBrushCount==0&&item.curt&&i<milepost.length-1"
-								class="step-line step-line-cur"></view>
-							<view v-else-if="item.lackBrushCount>0&&i<milepost.length-1"
-								class="step-line step-line-next">
-							</view>
-							<view v-else-if="item.lackBrushCount==0&&i<milepost.length-1" class="step-line"></view>
-						</view>
-					</scroll-view>
-				</view>
-				<swiper @change="bindchange" next-margin="62rpx" style="height: calc(100vh - 600rpx);" :current="current">
-					<swiper-item v-for="(post,i) in milepost" :key="i">
-						<scroll-view scroll-y="true" style="height: calc(100% - 40rpx);">
-							<view class="coupon-box">
-								<view class="jmy-flex coupon-box-title">
-									<image src="/static/shuaka/coupon-title-left.png"></image>
-									<view v-if="post.lackBrushCount==0">浣犲凡鑾峰緱浠ヤ笅浼樻儬鍒�</view>
-									<view v-else>
-										<view v-if="post.nodeNumOfMin-post.lackBrushCount">
-											宸插埛{{post.nodeNumOfMin-post.lackBrushCount}}绗�</view>
-										<view>鍐嶅埛<text style="color: #D31F28;">{{post.lackBrushCount}}</text>绗斿彲瑙i攣浠ヤ笅浼樻儬鍒�
-										</view>
-									</view>
-
-									<image src="/static/shuaka/coupon-title-right.png"></image>
-								</view>
-								<view v-for="(item,i) in post.lackBrushCount==0?post.coupIdsMap:post.coupIds" :key="i"
-									:class="['coupon',post.lackBrushCount==0?'coupon-get':'coupon-lock' ]">
-									<view class="num">
-										<view>
-											<text class="unit">锟�</text>
-											<text class="money">{{parseFloat(item.discount/100)}}</text>
-										</view>
-										<view class="condition">
-											婊{parseFloat((item.threshold_value||item.thresholdValue)/100)}}鍏冧娇鐢�
-										</view>
-									</view>
-									<view class="info">
-										<view class="title">{{item.name}}</view>
-										<view v-if="item.validityDay" class="validity">
-											鏈夋晥鏈燂細棰嗗彇鍚巤{item.validityDay}}澶�</view>
-										<view v-else class="validity">
-											鏈夋晥鏈熻嚦锛歿{$u.timeFormat(item.out_time||item.validityEndTime, 'yyyy-mm-dd hh:MM')}}
-										</view>
-									</view>
-									<image v-if="post.lackBrushCount!=0" class="lock-icon"
-										src="/static/shuaka/pay-by-card-lock.png" mode=""></image>
-								</view>
-							</view>
-						</scroll-view>
-					</swiper-item>
-				</swiper>
-
-				<!-- <view @click="checkNotice" :class="['notice',{'check':notice}]">閫氱煡鎴戝弬涓庢椿鍔ㄨ繘灞�</view> -->
-			</view>
-			<image v-else @click="joinActivity" class="btn" src="/static/shuaka/pay-by-card-btn.png"></image>
-		</view>
-		<u-popup :show="popup" @close="popup=false;getDto()" mode="center" bgColor="transparent">
-			<view class="popup">
-				<view class="popup-title">鎭枩鑾峰緱</view>
-				<view class="jmy-flex popup-sub-title">
-					<image src="/static/shuaka/coupon-title-left.png"></image>
-					<view>宸茶幏<text>{{couponIds.length}}</text>寮犱紭鎯犲埜</view>
-					<image src="/static/shuaka/coupon-title-right.png"></image>
-				</view>
-				<scroll-view class="scroll-view" scroll-y>
-					<view v-for="(item,i) in couponIds" :key="i" class="coupon1">
-						<view class="num">
-							<view>
-								<text class="unit">锟�</text>
-								<text class="money">{{parseFloat(item.discount/100)}}</text>
-							</view>
-							<view class="condition">婊{parseFloat(item.threshold_value/100)}}鍏冧娇鐢�</view>
-						</view>
-						<view class="info">
-							<view class="title">{{item.name}}</view>
-							<view v-if="item.validityDay" class="validity">
-								鏈夋晥鏈燂細棰嗗彇鍚巤{item.validityDay}}澶�</view>
-							<view v-else class="validity">
-								鏈夋晥鏈熻嚦锛歿{$u.timeFormat(item.out_time||item.validityEndTime, 'yyyy-mm-dd hh:MM')}}</view>
-						</view>
-					</view>
-				</scroll-view>
-				<navigator class="popup-btn jmy-flex" url="/pages/myCard/myCard">鏌ョ湅鍗″寘</navigator>
-			</view>
-			<image @click="popup=false;getDto()" class="popup-close" src="/static/shuaka/popup-close.png"></image>
-		</u-popup>
-	</view>
-</template>
-
-<script>
-	import {
-		bankCardStyle,
-	} from '@/common/api/index'
-	import {
-		activityInfo,
-		signActivity,
-		myBrushDetail
-	} from '@/common/api/shuaka'
-	export default {
-		data() {
-			return {
-				brushCount: 0,
-				bankCardStyle: {
-					color: '',
-					logo: ''
-				}, //閾惰鍗¢鏍�
-				current: 0,
-				join: false,
-				notice: true,
-				popup: false,
-				couponList: [],
-				couponIds: [],
-				info: {
-					bankCardName: '',
-					totalDiscount: 0,
-					milepost: []
-				},
-				milepost: [],
-				diffDay: 0,
-			};
-		},
-		onLoad() {
-			//鑾峰彇閾惰鍗¢鏍奸厤缃�
-			bankCardStyle().then(res => {
-				try {
-					res.logo = this.$utils.getGoodsImg(res.logo, '2')
-				} catch (e) {
-					//TODO handle the exception
-					res.logo = ''
-				}
-				this.bankCardStyle = res
-				// console.log(this.bankCardStyle);
-			}).catch(() => {
-				uni.hideLoading()
-			})
-			/* 娲诲姩璇︽儏 */
-			activityInfo().then(res => {
-				this.info = res
-			})
-			this.getDto()
-		},
-		methods: {
-			getDto() {
-				uni.showLoading()
-				/* 鍙備笌淇℃伅 */
-				myBrushDetail().then(res => {
-					uni.hideLoading()
-					if (res) {
-						this.diffDay = this.$utils.getDiffDay(res.taskStartTime, res.taskEndTime)
-						this.join = true
-						this.brushCount = Number(res.brushCount)
-						res.milePost.map((item, i) => {
-							if (item.lackBrushCount == 0) {
-								this.current = i
-							}
-						})
-						res.milePost[this.current].curt = true
-						if (res.milePost[this.current].lackBrushCount == 0) {
-							this.couponList = res.milePost[this.current].coupIdsMap
-						} else {
-							this.couponList = res.milePost[this.current].coupIds
-						}
-
-						this.milepost = res.milePost
-					}
-				}).catch(() => {
-					uni.hideLoading()
-				})
-			},
-			stepClick(i) {
-				const cur = this.milepost[i]
-				if (cur.lackBrushCount == 0) {
-					this.couponList = cur.coupIdsMap
-				} else {
-					this.couponList = cur.coupIds
-				}
-				this.current = i
-			},
-			bindchange({
-				detail: {
-					current
-				}
-			}) {
-				this.current = current
-			},
-			joinActivity() {
-				signActivity().then(res => {
-					if (res.isOk) {
-						if (this.couponIds) {
-							this.couponIds = res.couponIds
-							this.popup = true
-						} else {
-							this.join = true
-							uni.showToast({
-								icon: 'success',
-								title: '鍙備笌鎴愬姛'
-							})
-						}
-					} else {
-						uni.showToast({
-							icon: 'none',
-							title: res.reason
-						})
-					}
-				})
-			},
-			checkNotice() {
-				this.notice = !this.notice
-			},
-			closePopup() {
-				this.popup = !this.popup
-			},
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	@font-face {
-		font-family: "DOUYU";
-		src: url("https://echftp.jinmingyuan.com/xcx/jrstq/font/DOUYU.ttf");
-	}
-
-	.jmy-flex {
-		display: flex;
-		align-items: center;
-	}
-
-	.jmy-flex-nowrap {
-		flex-wrap: nowrap;
-	}
-
-	.jmy-text-center {
-		text-align: center;
-	}
-
-
-	.douyu-txt {
-		font-family: "DOUYU";
-	}
-
-	.page {
-		min-height: 100vh;
-		background-image: url('~@/static/shuaka/pay-by-card-bg.png');
-		background-position: center top;
-		background-color: #FDEDDE;
-		background-size: 100% auto;
-		background-repeat: no-repeat;
-	}
-
-	.page1 {
-		min-height: 100vh;
-		background-image: url('~@/static/shuaka/pay-by-card-bg-top.png');
-		background-position: center top;
-		background-color: #F8F9F9;
-		background-size: 100% auto;
-		background-repeat: no-repeat;
-	}
-
-	.logo1 {
-		box-sizing: border-box;
-		padding: 10rpx;
-		width: 90rpx;
-		height: 90rpx;
-		background-color: #ffffff;
-		border-radius: 45rpx;
-		margin: 30rpx 30rpx 0;
-	}
-
-	.page-title {
-		font-size: 60rpx;
-		font-weight: 400;
-		color: #6670E7;
-		text-align: center;
-		line-height: 1.3;
-	}
-
-	.page-title text {
-		color: #FB5B4A;
-	}
-
-	.detils-title {
-		width: 590rpx;
-		height: 65rpx;
-		line-height: 65rpx;
-		margin: 20rpx auto;
-		background-image: url('~@/static/shuaka/pay-by-card-dto-ttitle-bg.png');
-		background-size: cover;
-		color: #6670E7;
-		font-size: 25rpx;
-		font-weight: 400;
-		text-align: center;
-	}
-
-	.detail {
-		display: inline-block;
-		font-size: 28rpx;
-		color: #FB5B4A;
-		margin-left: 30rpx;
-	}
-
-	.detail::after {
-		content: '';
-		display: inline-block;
-		width: 10rpx;
-		height: 10rpx;
-		border-top: 1rpx solid #FB5B4A;
-		border-right: 1rpx solid #FB5B4A;
-		transform: rotate(45deg);
-		position: relative;
-		bottom: 4rpx;
-	}
-
-	.demo {
-		display: block;
-		width: 683rpx;
-		height: 708rpx;
-		margin: auto;
-	}
-
-	.btn {
-		position: fixed;
-		bottom: 30rpx;
-		bottom: calc(24rpx + constant(safe-area-inset-bottom));
-		/* 鍏煎 iOS < 11.2 */
-		bottom: calc(24rpx + env(safe-area-inset-bottom));
-		/* 鍏煎 iOS >= 11.2 */
-		left: 0;
-		width: 703rpx;
-		height: 137rpx;
-	}
-
-	.step-box {
-		flex: 1;
-		background-color: #F8F9F9;
-		display: flex;
-		flex-direction: column;
-	}
-
-	.step {
-		background-color: #ffffff;
-	}
-
-	.step-title {
-		font-size: 28rpx;
-		color: #7B4324;
-		font-weight: 500;
-		text-align: center;
-		padding: 20rpx;
-	}
-
-	.step-title text {
-		color: #D31F28;
-		font-weight: 700;
-	}
-
-	.step-icon {
-		width: 70rpx;
-		height: 70rpx;
-	}
-
-	.step-item-title {
-		font-size: 22rpx;
-		font-weight: 400;
-		color: #7B4324;
-	}
-
-	.step-item-title-act {
-		color: #FB5B4A;
-	}
-
-	.step-line {
-		background-image: linear-gradient(to right, #FFA91E 0, #FFA91E 100%);
-		width: 117rpx;
-		height: 4rpx;
-		border-radius: 2rpx;
-		position: relative;
-		top: -20rpx;
-	}
-
-	.step-line-cur {
-		background-image: linear-gradient(to right, #FFA91E 0, #FFA91E 50%, #EFEFEF 51%, #EFEFEF 100%);
-	}
-
-	.step-line-next {
-		background-image: linear-gradient(to right, #EFEFEF 0, #EFEFEF 100%);
-	}
-
-	.step-item-box {
-		background-color: #ffffff;
-		white-space: nowrap;
-	}
-
-	.step-item {
-		display: inline-flex;
-		padding-bottom: 20rpx;
-	}
-
-	.step-item-box .step-item:first-child {
-		padding-left: 40rpx;
-	}
-
-	.step-item-box .step-item:last-child {
-		padding-right: 40rpx;
-	}
-
-	.coupon-box {
-		width: 652rpx;
-		margin: 32rpx;
-		border-radius: 10rpx;
-		border: 1rpx solid rgba(255, 177, 166, 1);
-		background: linear-gradient(180.4deg, rgba(255, 255, 255, 1) 0%, rgba(255, 253, 249, 1) 100%);
-	}
-
-	.coupon-box-title {
-		justify-content: center;
-		text-align: center;
-		margin: 20rpx;
-		font-size: 28rpx;
-		font-weight: 400;
-		color: #333;
-	}
-
-	.coupon-box-title image {
-		width: 132rpx;
-		height: 21rpx;
-	}
-
-	.coupon-box-title text {
-		font-size: 28rpx;
-		font-weight: 400;
-		color: #333;
-		margin: 0 10rpx;
-	}
-
-	.coupon {
-		width: 598rpx;
-		height: 180rpx;
-		background-size: cover;
-		margin: 20rpx auto;
-		display: flex;
-		align-items: center;
-	}
-
-	.lock-icon {
-		width: 58rpx;
-		height: 58rpx;
-		margin-left: 15rpx;
-	}
-
-	.coupon-get {
-		background-image: url('~@/static/shuaka/pay-by-card-coupon-get.png');
-	}
-
-	.coupon-lock {
-		background-image: url('~@/static/shuaka/pay-by-card-coupon-lock.png');
-	}
-
-	.num {
-		color: #D31F28;
-		width: 150rpx;
-		text-align: center;
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-	}
-
-	.coupon-lock .num {
-		color: #CBCBCB;
-	}
-
-	.unit {
-		font-size: 36rpx;
-		font-weight: 900;
-	}
-
-	.money {
-		line-height: 1;
-		font-size: 64rpx;
-		font-weight: 900;
-	}
-
-	.condition {
-		font-size: 20rpx;
-		font-weight: 400;
-	}
-
-	.info {
-		width: 360rpx;
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		padding: 0 10rpx;
-	}
-
-	.title {
-		font-size: 26rpx;
-		font-weight: 400;
-		color: #333;
-		overflow: hidden;
-		text-overflow: ellipsis;
-		/* white-space:nowrap; */
-		display: -webkit-box;
-		-webkit-line-clamp: 2;
-		-webkit-box-orient: vertical;
-	}
-
-	.coupon-lock .title {
-		opacity: 0.33;
-	}
-
-	.validity {
-		margin-top: 15rpx;
-		font-size: 20rpx;
-		font-weight: 400;
-		color: #999;
-	}
-
-	.coupon-lock .validity {
-		opacity: 0.33;
-	}
-
-	.notice {
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		font-size: 24rpx;
-		line-height: 1;
-		font-weight: 400;
-		color: #333;
-		margin-bottom: 40rpx;
-	}
-
-	.notice::before {
-		box-sizing: border-box;
-		display: inline-block;
-		content: '';
-		margin-right: 10rpx;
-		width: 28rpx;
-		height: 28rpx;
-		border: 1px solid #999;
-		border-radius: 4rpx;
-		transition: all 0.3s;
-	}
-
-	.notice.check::before {
-		border: none;
-		background-image: url('~@/static/shuaka/notice-check.png');
-		background-size: cover;
-		transition: all 0.3s;
-	}
-
-
-	.popup {
-		box-sizing: border-box;
-		width: 632rpx;
-		height: 935rpx;
-		background-image: url('~@/static/shuaka/pay-by-card-modal-bg.png');
-		background-size: cover;
-		padding: 210rpx 40rpx 20rpx;
-	}
-
-	.popup-close {
-		display: block;
-		margin: 40rpx auto 0;
-		width: 64rpx;
-		height: 64rpx;
-	}
-
-	.popup-title {
-		font-size: 42rpx;
-		font-weight: 700;
-		color: #F2281F;
-		text-align: center;
-		line-height: 1;
-		margin-top: 20rpx;
-	}
-
-	.popup-sub-title {
-		justify-content: center;
-		margin: 20rpx 0 10rpx;
-		color: #B36C44;
-		font-size: 28rpx;
-	}
-
-	.popup-sub-title view {
-		margin: 0 10rpx;
-	}
-
-	.popup-sub-title text {
-		color: #D31F28;
-	}
-
-	.popup-sub-title image {
-		width: 132rpx;
-		height: 21rpx;
-	}
-
-	.popup-btn {
-		margin: 20rpx auto 0;
-		width: 478rpx;
-		height: 88rpx;
-		border-radius: 44rpx;
-		background-color: rgba(238, 68, 82, 1);
-		font-size: 36rpx;
-		font-weight: 500;
-		color: #fff;
-		justify-content: center;
-	}
-
-	.scroll-view {
-		height: 435rpx;
-	}
-
-	.coupon1 {
-		width: 508rpx;
-		height: 145rpx;
-		background-image: url('~@/static/shuaka/pay-by-card-coupon.png');
-		background-size: cover;
-		margin: 20rpx auto;
-		display: flex;
-		align-items: center;
-	}
-
-	.coupon1 .num {
-		height: 110rpx;
-		border-right: 1rpx dashed #FA969A;
-	}
-
-	.coupon1 .unit {
-		font-size: 24rpx;
-	}
-
-	.coupon1 .money {
-		font-size: 50rpx;
-	}
-
-	.coupon1 .condition {
-		font-size: 20rpx;
-	}
-
-	.coupon1 .title {
-		text-align: left;
-		font-size: 24rpx;
-	}
-
-	.coupon1 .validity {
-		font-size: 20rpx;
-	}
-</style>
diff --git a/pages/pay/wxpay.vue b/pages/pay/wxpay.vue
deleted file mode 100644
index 62095c4..0000000
--- a/pages/pay/wxpay.vue
+++ /dev/null
@@ -1,292 +0,0 @@
-<template>
-	<view>
-		<view class="u-relative">
-			<view class="u-p-30 u-flex">
-				<image :src="info.logo_image||'/static/imgs/store-logo.png'" class="avg-img"></image>
-				<view class="u-font-32 font-bold color-333 u-m-l-20">{{ info.shop_name }}</view>
-			</view>
-			<view class="pay-box bg-fff">
-				<view class="u-font-24 color-666">閲戦</view>
-				<view class="u-p-v-20 u-flex u-border-bottom-f5 u-relative">
-					<view class="money-icon color-333">楼</view>
-					<view class="u-flex-1 u-flex u-m-l-10" style="height: 80rpx;">
-						<view v-if="money" class="u-font-40">{{money}}</view>
-						<view v-if="!money&&bordShow" class="cursor"></view>
-						<view v-if="!money" class="u-font-32 color-999">璇疯緭鍏ラ噾棰�</view>
-						<view v-if="money&&bordShow" class="cursor"></view>
-					</view>
-					<!-- <u-input placeholder="璇疯緭鍏ラ噾棰�" v-model="money" border="none" disabled disabledColor="#FFFFFF"
-						placeholderStyle="color: #c0c4cc" fontSize="40rpx" color="#333"></u-input> -->
-					<view class="mask" @click="showBord"></view>
-				</view>
-				<view class="u-font-24 color-666 u-p-v-20">閫夋嫨鏀粯鏂瑰紡</view>
-				<view>
-					<u-radio-group v-model="payType" placement="column">
-
-						<view v-if="platform == 0 || platform == 2"
-							class="u-border-bottom-f5 u-p-v-20 u-flex u-row-between">
-							<view class="flex-1 u-flex">
-								<image src="@/static/imgs/pay-wx.png" class="pay-icon"></image>
-								<view class="u-font-30 color-333 u-m-l-10">寰俊</view>
-							</view>
-							<u-radio :name="0" activeColor="#D41F28" :customStyle="{ marginLeft: '30rpx' }"></u-radio>
-						</view>
-						<view v-if="platform == 1 || platform == 2"
-							class="u-border-bottom-f5 u-p-v-20 u-flex u-row-between">
-							<view class="flex-1 u-flex">
-								<image src="@/static/imgs/pay-zfb.png" class="pay-icon"></image>
-								<view class="u-font-30 color-333 u-m-l-10">鏀粯瀹�</view>
-							</view>
-							<u-radio :name="1" activeColor="#D41F28" :customStyle="{ marginLeft: '30rpx' }"></u-radio>
-						</view>
-						<view class="u-border-bottom-f5 u-p-v-20 u-flex u-row-between">
-							<view class="flex-1 u-flex">
-								<image src="@/static/imgs/pay-jyk.png" class="pay-icon"></image>
-								<view class="u-m-l-10 flex-1 u-flex u-row-between">
-									<view>
-										<view class="u-font-30 color-333">閲戠嚂鍗�(8646)</view>
-										<view class="u-font-24 color-999">
-											鍙敤
-											<text class="color-red">15</text>
-											绉垎
-											<text class="color-red">婊�40-20</text>
-											浼樻儬鍒�
-										</view>
-									</view>
-									<u-tag text="浜�8鎶樹紭鎯�" type="error" plain size="mini"></u-tag>
-								</view>
-							</view>
-							<u-radio :name="2" activeColor="#D41F28" :customStyle="{ marginLeft: '30rpx' }"></u-radio>
-						</view>
-					</u-radio-group>
-				</view>
-				<button class="pay-it" @click="pay">纭畾鏀粯</button>
-			</view>
-
-		</view>
-
-		<navigator class="reg-btn" :url="'/pages/pay/register?cid='+cid">
-			<image src="/static/register-btn.png" mode=""></image>
-		</navigator>
-		<u-popup :show="bordShow" :overlay="false" @close="close" @open="open">
-			<key-bord @changeMoney="changeMoney" :num.sync="money" @close="close" @pay="pay"></key-bord>
-		</u-popup>
-	</view>
-</template>
-
-<script>
-	import {
-		config
-	} from '@/common/config.js';
-	import {
-		queryShop,
-		getWechatInfo,
-		getWechatConfigInfo,
-		saveWxOrder
-	} from '@/common/api/index'
-	import wx from 'weixin-js-sdk'; // 浣跨敤js-sdk
-	export default {
-		data() {
-			return {
-        platform: this.$utils.getPlat(),
-				cid: '',
-				info: {
-					shop_name: '',
-					scan_flag: '',
-					use_score_flag: '',
-					user_coupon_flag: ''
-				},
-				hasNum: false, // 鏄惁杈撳叆閲戦
-				money: '', // 閲戦
-				transStyles: {
-					position: 'fixed',
-					bottom: 0,
-					left: 0,
-					width: '100%',
-					backgroundColor: '#FFFFFF',
-					zIndex: 1001
-				},
-				payType: this.$utils.getPlat(), // 鏀粯鏂瑰紡
-				bordShow: false // 鏄剧ず閿洏
-			};
-		},
-		onLoad(opt) {
-			this.cid = opt.cid
-			uni.showLoading()
-			queryShop({
-				params: opt
-			}).then(res => {
-				if (res.logo_image) {
-					try {
-						let arr = JSON.parse(res.logo_image)
-						res.logo_image = config.sftpURL + arr[0].path
-					} catch (e) {
-						//TODO handle the exception
-						res.logo_image = ''
-					}
-				}
-				this.info = res
-				this.registerSDK()
-			}).catch(() => {
-				uni.hideLoading()
-			})
-		},
-		methods: {
-			registerSDK() {
-				const uri = encodeURIComponent(window.location)
-				getWechatConfigInfo({
-					url: uri
-				}).then(res => {
-					uni.hideLoading()
-					wx.config({
-						debug: false, // 寮�鍚皟璇曟ā寮�,璋冪敤鐨勬墍鏈� api 鐨勮繑鍥炲�间細鍦ㄥ鎴风 alert 鍑烘潵锛岃嫢瑕佹煡鐪嬩紶鍏ョ殑鍙傛暟锛屽彲浠ュ湪 pc 绔墦寮�锛屽弬鏁颁俊鎭細閫氳繃 log 鎵撳嚭锛屼粎鍦� pc 绔椂鎵嶄細鎵撳嵃銆�
-						appId: res.appId, // 蹇呭~锛屽叕浼楀彿鐨勫敮涓�鏍囪瘑
-						timestamp: res.timestamp, // 蹇呭~锛岀敓鎴愮鍚嶇殑鏃堕棿鎴�
-						nonceStr: res.nonceStr, // 蹇呭~锛岀敓鎴愮鍚嶇殑闅忔満涓�
-						signature: res.signature, // 蹇呭~锛岀鍚�
-						jsApiList: ['chooseWXPay'] // 蹇呭~锛岄渶瑕佷娇鐢ㄧ殑 JS 鎺ュ彛鍒楄〃
-					});
-				}).catch(() => {
-					uni.hideLoading()
-				})
-			},
-			// 鏇存柊閲戦
-			changeMoney(str) {
-				this.money = str;
-			},
-			// 灞曠ず閿洏
-			showBord() {
-				this.bordShow = true;
-			},
-			// 鍏抽棴閿洏
-			close() {
-				this.bordShow = false;
-			},
-			pay() {
-				if (!this.money) {
-					uni.showToast({
-						icon: 'none',
-						title: '璇疯緭鍏ラ噾棰�'
-					});
-					return;
-				}
-				uni.showLoading()
-				saveWxOrder({
-					cusid: this.info.cusid,
-					c: this.info.c,
-					money: parseInt(this.money * 100)
-				}).then(res => {
-					uni.hideLoading()
-					setTimeout(() => {
-						wx.chooseWXPay({
-							timestamp: res.timeStamp, // 鏀粯绛惧悕鏃堕棿鎴�
-							nonceStr: res.nonceStr, // 鏀粯绛惧悕闅忔満涓诧紝涓嶉暱浜� 32 浣�
-							package: res.package, // 缁熶竴鏀粯鎺ュ彛杩斿洖鐨刾repay_id鍙傛暟鍊硷紝鎻愪氦鏍煎紡濡傦細prepay_id=\*\*\*锛�
-							signType: res.signType, // 寰俊鏀粯V3鐨勪紶鍏� RSA ,寰俊鏀粯V2鐨勪紶鍏ユ牸寮忎笌V2缁熶竴涓嬪崟鐨勭鍚嶆牸寮忎繚鎸佷竴鑷�
-							paySign: res.paySign, // 鏀粯绛惧悕
-							success: function(ret) {
-								// 鏀粯鎴愬姛鍚庣殑鍥炶皟鍑芥暟
-								uni.navigateTo({
-									url: '/pages/pay/paySuccess?youHuiInfo=' + JSON
-										.stringify(res.youHuiInfo)
-								})
-							}
-						});
-					}, 200)
-
-				}).catch(() => {
-					uni.hideLoading()
-				})
-			}
-		}
-	};
-</script>
-
-<style scoped lang="scss">
-	.avg-img {
-		width: 80rpx;
-		height: 80rpx;
-	}
-
-	.reg-btn {
-		display: block;
-		margin: 80rpx auto 0;
-		width: 686rpx;
-		height: 198rpx;
-
-		image {
-			width: 100%;
-			height: 100%;
-		}
-	}
-
-	.pay-box {
-		padding: 40rpx 20rpx;
-		border-radius: 10rpx;
-		margin: 0 30rpx;
-	}
-
-	.money-icon {
-		font-size: 50rpx;
-		font-weight: bold;
-		margin-right: 20rpx;
-	}
-
-	.money-num {
-		font-size: 50rpx;
-		font-weight: bold;
-	}
-
-	.pay-icon {
-		width: 48rpx;
-		height: 48rpx;
-	}
-
-	.mask {
-		position: absolute;
-		width: 100%;
-		height: 100%;
-		left: 0;
-		bottom: 0;
-		z-index: 101;
-		background-color: rgba(0, 0, 0, 0);
-	}
-
-	.pay-it {
-		border-radius: 50rpx;
-		font-size: 34rpx;
-		color: #ffffff;
-		background-color: #de2d35;
-		width: 90%;
-		margin-top: 20rpx;
-	}
-
-	@keyframes cursor-blinks {
-		0% {
-			opacity: 1;
-			display: block;
-		}
-
-		50% {
-			opacity: 0;
-			display: none;
-		}
-
-		100% {
-			opacity: 1;
-			display: block;
-		}
-	}
-
-	.cursor {
-		border-left: 1px solid #333;
-		margin-left: 2px;
-		height: 40rpx;
-		animation: cursor-blinks 1s infinite steps(1, start)
-	}
-
-	.cursor-act {
-		border-left-color: transparent;
-		animation: cursor-blinks 1s infinite steps(1, start);
-	}
-</style>
diff --git a/pages/pay/discountpay.vue b/pay/discountpay.vue
similarity index 97%
rename from pages/pay/discountpay.vue
rename to pay/discountpay.vue
index 59773f7..413e85b 100644
--- a/pages/pay/discountpay.vue
+++ b/pay/discountpay.vue
@@ -345,7 +345,7 @@
 						this.youHuiInfo = res.youHuiInfo
 						if (res.isOk == 1) {
 							uni.navigateTo({
-								url: `/pages/pay/paySuccess?orderId=${this.orderId}&youHuiInfo=${JSON
+								url: `/pay/paySuccess?orderId=${this.orderId}&youHuiInfo=${JSON
 									.stringify(this.youHuiInfo)}`
 							})
 						} else {
@@ -394,7 +394,7 @@
                   // 浣跨敤浠ヤ笂鏂瑰紡鍒ゆ柇鍓嶇杩斿洖,寰俊鍥㈤槦閮戦噸鎻愮ず锛�
                   //res.err_msg灏嗗湪鐢ㄦ埛鏀粯鎴愬姛鍚庤繑鍥瀘k锛屼絾骞朵笉淇濊瘉瀹冪粷瀵瑰彲闈犮��
                   uni.navigateTo({
-                    url: `/pages/pay/paySuccess?orderId=${this.orderId}&youHuiInfo=${JSON
+                    url: `/pay/paySuccess?orderId=${this.orderId}&youHuiInfo=${JSON
                         .stringify(this.youHuiInfo)}`
                   })
                 }
@@ -408,7 +408,7 @@
 				}, (res) => {
 					if (res.resultCode == 9000) {
 						uni.navigateTo({
-							url: `/pages/pay/paySuccess?orderId=${this.orderId}&youHuiInfo=${JSON
+							url: `/pay/paySuccess?orderId=${this.orderId}&youHuiInfo=${JSON
 								.stringify(this.youHuiInfo)}`
 						})
 						// 鏀粯鎴愬姛
@@ -432,7 +432,7 @@
 					uni.hideKeyboard()
 					this.codeShow = false
 					uni.navigateTo({
-						url: `/pages/pay/paySuccess?orderId=${this.orderId}&youHuiInfo=${JSON
+						url: `/pay/paySuccess?orderId=${this.orderId}&youHuiInfo=${JSON
 							.stringify(this.youHuiInfo)}`
 					})
 				}).catch(() => {
diff --git a/pages/pay/login.vue b/pay/login.vue
similarity index 70%
rename from pages/pay/login.vue
rename to pay/login.vue
index d5fc092..286edea 100644
--- a/pages/pay/login.vue
+++ b/pay/login.vue
@@ -16,17 +16,21 @@
 			};
 		},
 		onLoad(opt) {
+      const redirect_uri = encodeURIComponent(`${config.webURL}/pay/scanpay?cid=${opt.cid}`)
+      /*if(uni.getStorageSync('UNIONID'+this.platform)){
+        window.location.href = redirect_uri
+        return
+      }*/
 			uni.clearStorage()
-			const redirect_uri = encodeURIComponent(`${config.webURL}/pages/pay/scanpay?cid=${opt.cid}`)
 			if (this.platform == 2) {
 				window.location.href =
-					`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${config.wx_appid}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
+					`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${config.wx_appid}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`
 			} else if (this.platform == 5) {
 				window.location.href =
 					`https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=${config.ali_appid}&scope=auth_base&redirect_uri=${redirect_uri}&state=STATE`
 			} else {
 				uni.reLaunch({
-					url: `/pages/pay/scanpay?cid=${opt.cid}`
+					url: `/pay/scanpay?cid=${opt.cid}`
 				})
 			}
 
diff --git a/pages/pay/paySuccess.vue b/pay/paySuccess.vue
similarity index 94%
rename from pages/pay/paySuccess.vue
rename to pay/paySuccess.vue
index 51aa576..ec3d7e6 100644
--- a/pages/pay/paySuccess.vue
+++ b/pay/paySuccess.vue
@@ -62,20 +62,6 @@
 				</view>
 			</view>
 
-			<view v-else-if="!join" class="box bg-fff u-m-t-20">
-				<navigator class="u-flex" url="/pages/pay/shuaKa/shuaKa">
-					<image class="card-logo" :src="bankCardStyle.logo"></image>
-					<view class="u-flex-1">
-						<view class="u-font-30">棰嗗埛{{info.bankCardName}}{{info.totalDiscount/100}}鍏冪珛鍑忛噾</view>
-						<view class="u-font-24 color-999">鍙備笌鍒峰崱鏈夌ぜ锛岄鏇村浼樻儬</view>
-					</view>
-					<view>
-						<u-button type="success" size="mini" text="棰嗗彇"></u-button>
-					</view>
-
-				</navigator>
-			</view>
-
 			<view :url="jumpUrl" class="btn-box">
 				<u-button @click="clickDone" text="瀹屾垚" type="success" plain shape="circle"></u-button>
 			</view>
@@ -375,4 +361,4 @@
 	.lh-1 {
 		line-height: 1;
 	}
-</style>
\ No newline at end of file
+</style>
diff --git a/pages/pay/register.vue b/pay/register.vue
similarity index 98%
rename from pages/pay/register.vue
rename to pay/register.vue
index c44068a..f4065e1 100644
--- a/pages/pay/register.vue
+++ b/pay/register.vue
@@ -183,7 +183,7 @@
 						uni.hideLoading();
 						uni.setStorageSync('IS_NEW', false)
 						uni.redirectTo({
-							url: '/pages/pay/scanpay?cid=' + this.cid
+							url: '/pay/scanpay?cid=' + this.cid
 						})
 					}).catch(() => {
 						uni.hideLoading();
diff --git a/pay/scanpay.vue b/pay/scanpay.vue
new file mode 100644
index 0000000..07ad5f1
--- /dev/null
+++ b/pay/scanpay.vue
@@ -0,0 +1,522 @@
+<!-- 鎵爜鏀粯 -->
+<template>
+  <view class="page">
+    <view class="shop u-flex u-row-between">
+      <view class="u-m-r-30">
+        <view class="u-font-28 color-666 u-m-b-10">浠樻缁�</view>
+        <view class="u-font-34 font-bold color-333">{{ shopInfo.shop_name }}</view>
+      </view>
+      <image :src="shopInfo.logo_image||'/static/imgs/store-logo.png'" class="avg-img"></image>
+    </view>
+    <view class="u-p-48 bg-fff u-flex-1 content">
+      <view class="u-font-28 color-666">閲戦</view>
+      <view class="u-p-v-20 u-flex u-border-bottom u-relative">
+        <view class="money-icon color-333">楼</view>
+        <view class="u-flex-1 u-flex u-m-l-10" style="height: 80rpx;">
+          <view v-if="money" class="money-num">{{ money }}</view>
+          <view :class="['cursor',{'cursor-act':!money&&bordShow}]"></view>
+          <view v-if="!money" class="u-font-50 color-999">璇疯緭鍏ラ噾棰�</view>
+          <view :class="['cursor',{'cursor-act':money&&bordShow}]"></view>
+        </view>
+        <view class="mask" @click="showBord"></view>
+      </view>
+      <image v-if="isNew&&(this.payWay == 2&&!UNIONID)" @click="toRegister" class="reg-btn" src="/static/register-btn.png" mode=""></image>
+    </view>
+    <button class="pay-it" @click="pay">浠樻</button>
+    <!-- 鏁板瓧閿洏 -->
+    <u-popup :show="bordShow" :overlay="false" @close="bordShow = false">
+      <key-bord @changeMoney="changeMoney" :num.sync="money" @close="bordShow = false" @pay="pay"></key-bord>
+    </u-popup>
+  </view>
+</template>
+
+<script>
+import {
+  config,
+  ACCESSTOKEN
+} from 'common/config.js';
+import {
+  queryShop,
+  userLogin,
+  queryMyUseSweepPayMaxCoupon,
+  closeOrder,
+  saveOrder,
+} from 'common/api/index'
+
+export default {
+  data() {
+    return {
+      UNIONID: null,
+      payWay: this.$utils.getPlat(),
+      cid: '',
+      bordShow: true, // 鏄剧ず閿洏
+      shopInfo: {
+        shop_name: '',
+        scan_flag: '',
+        use_score_flag: 0, //鍟嗛摵鏄惁鍙敤绉垎 0鍚� 1鏄�
+        user_coupon_flag: 0, //鍟嗛摵鏄惁鍙敤浼樻儬鍒� 0鍚� 1鏄�
+        app_pay_use_score_flag: 0, //寰俊/鏀粯瀹濇槸鍚﹀彲鐢ㄧН鍒� 0鍚� 1鏄�
+        app_pay_use_coupon_flag: 0, //寰俊/鏀粯瀹濇槸鍚﹀彲鐢ㄤ紭鎯犲埜 0鍚� 1鏄�
+        bank_pay_use_score_flag: 0, //閾惰鍗℃敮浠樻槸鍚﹀彲鐢ㄧН鍒� 0鍚� 1鏄�
+        bank_pay_use_coupon_flag: 0, //閾惰鍗℃敮浠樻槸鍚﹀彲鐢ㄤ紭鎯犲埜 0鍚� 1鏄�
+      },
+      money: '', // 閲戦
+      couponInfo: null, // 浼樻儬鍒稿唴瀹�
+      token: null,
+      isNew: false, // 鏄惁鏂扮敤鎴凤紝鏂扮敤鎴锋煡璇笉鍒扮Н鍒嗗拰閾惰鍗�
+      canReset: false,
+      end: 0,
+      count: 0,
+    };
+  },
+  onLoad(opt) {
+    this.isNew = uni.getStorageSync('IS_NEW')
+    // uni.setStorageSync('OPENID' + this.payWay, opt.code)
+    uni.showLoading()
+    if (opt.cid) {
+      this.cid = opt.cid
+      uni.setStorageSync('CID', opt.cid)
+      this.init()
+    }
+    if (opt.code || opt.auth_code) {
+      let code = opt.code
+      if (this.payWay == 5) {
+        code = opt.auth_code
+      }
+      this.end++
+      userLogin({
+        platform: this.payWay,
+        params: {
+          code
+        }
+      }).then(res => {
+        this.getToken(res)
+      }).catch(() => {
+        uni.hideLoading()
+      })
+    }
+
+  },
+  onShow() {
+    this.UNIONID = uni.getStorageSync('UNIONID' + this.payWay) || null
+    this.token = uni.getStorageSync(ACCESSTOKEN) || null
+    if (this.canReset && this.token && !this.isNew) {
+      this.end = 0
+      this.count = 0
+      uni.showLoading()
+      this.getUserInfo()
+    }
+    this.canReset = true
+  },
+  methods: {
+    getToken(res) {
+      this.count++
+      if (this.count >= this.end) {
+        uni.hideLoading()
+      }
+      this.token = res.token
+      if (res.openid) {
+        uni.setStorageSync('OPENID' + this.payWay, res.token)
+      }
+      if (res.unionid) {
+        uni.setStorageSync('UNIONID' + this.payWay, res.token)
+      }
+      uni.setStorageSync(ACCESSTOKEN, res.token)
+      uni.setStorageSync('IS_NEW', res.isNew)
+      this.isNew = res.isNew
+      if (!res.isNew) {
+        this.getUserInfo()
+      }
+    },
+    toRegister() {
+      if (this.UNIONID) {
+        uni.navigateTo({
+          url: '/pay/register?cid=' + this.cid
+        })
+      }
+      if (this.payWay == 2) {
+        const redirect_uri = encodeURIComponent(`${config.webURL}/pay/scanpay?cid=${opt.query.cid}`)
+        window.location.href =
+            `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${config.wx_appid}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
+      }
+
+    },
+    // 鏇存柊閲戦
+    changeMoney(str) {
+      this.money = str;
+    },
+    // 灞曠ず閿洏
+    showBord() {
+      this.bordShow = true;
+    },
+    init() {
+      this.end += 1
+      //鑾峰彇鍟嗛摵淇℃伅
+      queryShop({
+        params: {
+          cid: this.cid
+        }
+      }).then(res => {
+        this.count++
+        if (this.count >= this.end) {
+          uni.hideLoading()
+        }
+        if (res.logo_image) {
+          try {
+            let arr = JSON.parse(res.logo_image)
+            res.logo_image = config.sftpURL + arr[0].path
+          } catch (e) {
+            //TODO handle the exception
+            res.logo_image = ''
+          }
+        }
+        this.shopInfo = res
+      }).catch(() => {
+        uni.hideLoading()
+      })
+    },
+    // 鑾峰彇浼氬憳鐩稿叧淇℃伅
+    getUserInfo() {
+      this.end += 1
+      //鑾峰彇鐢ㄦ埛浼樻儬鍒�
+      queryMyUseSweepPayMaxCoupon({
+        params: {
+          shopId: this.shopInfo.id
+        }
+      }).then(res => {
+
+        this.count++
+        if (this.count >= this.end) {
+          uni.hideLoading()
+        }
+        this.couponInfo = res
+      }).catch(() => {
+        this.count++
+        if (this.count >= this.end) {
+          uni.hideLoading()
+        }
+      })
+    },
+    //璺宠浆钀ラ攢椤甸潰
+    toDiscount() {
+      const shopInfo = encodeURIComponent(JSON.stringify(this.shopInfo))
+      if (!this.isNew) { //鏄細鍛�
+        if (this.integral > 0 || this.couponInfo) { //鏈変紭鎯犲埜鎴栫Н鍒�
+          if (this.payWay == 3 && (this.shopInfo.bank_pay_use_score_flag || this.shopInfo
+              .bank_pay_use_coupon_flag)) { //閾惰鍗℃敮浠�
+
+            uni.navigateTo({
+              url: `/pay/discountpay?shopInfo=${shopInfo}&integral=${this.integral}&scoreWorth=${this.scoreWorth}&money=${this.money}&payWay=${this.payWay}&bankCardId=${this.bankCardId}`
+            })
+            return false
+          } else if ((this.shopInfo.use_score_flag && this.shopInfo.app_pay_use_score_flag) || (this
+              .shopInfo
+              .user_coupon_flag && this.shopInfo.app_pay_use_coupon_flag)) {
+            uni.navigateTo({
+              url: `/pay/discountpay?shopInfo=${shopInfo}&integral=${this.integral}&scoreWorth=${this.scoreWorth}&money=${this.money}&payWay=${this.payWay}&bankCardId=${this.bankCardId}`
+            })
+            return false
+          } else if (this.discount.shopDiscount != 1) {
+            uni.navigateTo({
+              url: `/pay/discountpay?shopInfo=${shopInfo}&integral=${this.integral}&scoreWorth=${this.scoreWorth}&money=${this.money}&payWay=${this.payWay}&bankCardId=${this.bankCardId}`
+            })
+            return false
+          } else {
+            return true
+          }
+        } else if (this.discount.shopDiscount != 1) {
+          uni.navigateTo({
+            url: `/pay/discountpay?shopInfo=${shopInfo}&integral=${this.integral}&scoreWorth=${this.scoreWorth}&money=${this.money}&payWay=${this.payWay}&bankCardId=${this.bankCardId}`
+          })
+          return false
+        } else {
+          return true
+        }
+      } else {
+        return true
+      }
+    },
+    //纭鏀粯
+    pay() {
+      if (uni.$u.test.isEmpty(this.money)) {
+        uni.$u.toast('璇疯緭鍏ラ噾棰濓紒')
+        return
+      }
+      this.bordShow = true
+      // return this.toDiscount() //鍒ゆ柇鏄惁闇�瑕佽烦杞惀閿�椤甸潰
+      if (this.toDiscount()) {
+        // 閲戦 this.money
+        uni.showLoading()
+        const params = {
+          money: parseFloat((this.money * 100).toPrecision(12)),
+          shopId: this.shopInfo.id,
+          cid: this.cid,
+          payWay: this.payWay,
+          score: 0,
+          couponDetailId: ''
+        }
+        if (this.payWay == 3) {
+          params.bankCardId = this.bankCardId
+        }
+        //鐢熸垚璁㈠崟
+        saveOrder(params).then(res => {
+          uni.hideLoading()
+          try {
+            this.orderId = res.orderId
+            res.youHuiInfo.shopName = this.shopInfo.shop_name
+            this.youHuiInfo = res.youHuiInfo
+            if (this.payWay == 2) {
+              this.wxPay(res.paymentData)
+            }
+            if (this.payWay == 5) {
+              this.aliPay(res.paymentData)
+            }
+          } catch (e) {
+            //TODO handle the exception
+            console.error(e);
+          }
+        }).catch(() => {
+          uni.hideLoading()
+        })
+      }
+
+    },
+    // 寰俊鏀粯
+    wxPay(res) {
+      setTimeout(() => {
+        WeixinJSBridge.invoke(
+            'getBrandWCPayRequest', {
+              "appId": res.appId, //鍏紬鍙稩D锛岀敱鍟嗘埛浼犲叆
+              "timeStamp": res.timeStamp, //鏃堕棿鎴筹紝鑷�1970骞翠互鏉ョ殑绉掓暟
+              "nonceStr": res.nonceStr, //闅忔満涓�
+              "package": res.package,
+              "signType": res.signType, //寰俊绛惧悕鏂瑰紡锛�
+              "paySign": res.paySign //寰俊绛惧悕
+            },
+            (res) => {
+              if (res.err_msg == "get_brand_wcpay_request:ok") {
+                // 浣跨敤浠ヤ笂鏂瑰紡鍒ゆ柇鍓嶇杩斿洖,寰俊鍥㈤槦閮戦噸鎻愮ず锛�
+                //res.err_msg灏嗗湪鐢ㄦ埛鏀粯鎴愬姛鍚庤繑鍥瀘k锛屼絾骞朵笉淇濊瘉瀹冪粷瀵瑰彲闈犮��
+                uni.navigateTo({
+                  url: `/pay/paySuccess?orderId=${this.orderId}&youHuiInfo=${JSON
+                      .stringify(this.youHuiInfo)}`
+                })
+              } else {
+                this.closeOrder()
+              }
+            });
+      }, 200)
+    },
+    //鏀粯瀹濇敮浠�
+    aliPay(res) {
+      ap.tradePay({
+        tradeNO: res.tradeNO
+      }, (res) => {
+        if (res.resultCode == 9000) {
+          uni.navigateTo({
+            url: `/pay/paySuccess?orderId=${this.orderId}&youHuiInfo=${JSON
+                .stringify(this.youHuiInfo)}`
+          })
+          // 鏀粯鎴愬姛
+        } else if (res.resultCode == 8000 || res.resultCode == 6001) {
+          // 姝e湪澶勭悊涓� || 鍙栨秷
+        } else {
+          this.closeOrder()
+          // 鏀粯澶辫触
+        }
+      });
+    },
+    closeOrder() {
+      closeOrder({
+        id: this.orderId,
+      }).then(res => {
+      })
+    }
+  }
+};
+</script>
+
+<style scoped lang="scss">
+.page {
+  height: calc(100vh - 0px);
+  display: flex;
+  flex-direction: column;
+}
+
+.shop {
+  padding: 50rpx 64rpx;
+}
+
+.avg-img {
+  width: 94rpx;
+  height: 94rpx;
+  border-radius: 10rpx;
+  background-color: #ffffff;
+}
+
+.content {
+  border-radius: 40rpx 40rpx 0 0;
+}
+
+.money {
+  font-size: 40rpx;
+  color: #333;
+}
+
+.money-icon {
+  font-size: 70rpx;
+  // font-weight: bold;
+  margin-right: 20rpx;
+}
+
+.money-num {
+  font-size: 96rpx;
+  // font-weight: bold;
+}
+
+.pay-it {
+  position: absolute;
+  width: 686rpx;
+  height: 98rpx;
+  bottom: 0;
+  border-radius: 10rpx;
+  font-size: 34rpx;
+  color: #ffffff;
+  background-color: #de2d35;
+  margin: 32rpx;
+}
+
+.bank-card-ad {
+  padding-top: 50rpx;
+  background-image: url(~@/static/bank-card-ad1.png);
+  background-size: 100% auto;
+  background-position: top center;
+  background-repeat: no-repeat;
+}
+
+.pay-icon {
+  align-self: flex-start;
+  width: 48rpx;
+  height: 48rpx;
+  margin-right: 20rpx;
+}
+
+.tag {
+  background-color: #F35656;
+  font-size: 20rpx;
+  color: #fff;
+  border-radius: 4rpx;
+  line-height: 1;
+  padding: 4rpx;
+}
+
+.tag-pain {
+  border: 1px solid #D31F28;
+  font-size: 22rpx;
+  color: #D31F28;
+  border-radius: 4rpx;
+  line-height: 1;
+  padding: 8rpx 4rpx;
+}
+
+.mask {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  left: 0;
+  bottom: 0;
+  z-index: 101;
+  background-color: rgba(0, 0, 0, 0);
+}
+
+@keyframes cursor-blinks {
+  0% {
+    opacity: 1;
+    display: block;
+  }
+
+  50% {
+    opacity: 0;
+    display: none;
+  }
+
+  100% {
+    opacity: 1;
+    display: block;
+  }
+}
+
+.cursor {
+  border-left: 1px solid transparent;
+  height: 80rpx;
+}
+
+.cursor-act {
+  border-left: 1px solid #333;
+  animation: cursor-blinks 1s infinite steps(1, start);
+}
+
+.reg-btn {
+  display: block;
+  margin-top: 30rpx;
+  width: 654rpx;
+  height: 198rpx;
+
+  image {
+    width: 100%;
+    height: 100%;
+  }
+}
+
+.u-font-money {
+  font-size: 60rpx;
+}
+
+.bankCard-list {
+  height: 50vh;
+  width: 750rpx;
+  box-sizing: border-box;
+
+  .pay-icon {
+    align-self: center;
+  }
+}
+
+.add-icon {
+  width: 50rpx;
+  height: 50rpx;
+  border-radius: 25rpx;
+  background: #ffc0c38f;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.shuka {
+  width: 678rpx;
+  height: 45rpx;
+  position: relative;
+  left: -10rpx;
+
+  image {
+    width: 100%;
+    height: 100%;
+  }
+}
+
+.btn {
+  /* position: fixed;
+bottom: 100rpx; */
+  margin: 0 auto;
+  margin-top: 120rpx;
+  position: relative;
+  width: 680rpx;
+  height: 100rpx;
+}
+
+.wx-app {
+  position: absolute;
+  width: 680rpx;
+  height: 100rpx;
+}
+</style>

--
Gitblit v1.9.1