潘超林 2 settimane fa
parent
commit
9404988128
6 ha cambiato i file con 1160 aggiunte e 21 eliminazioni
  1. 6 6
      app.config.js
  2. 12 0
      pages.json
  3. 267 0
      pages/index/agreement.vue
  4. 13 2
      pages/index/index.vue
  5. 84 13
      pages/index/pay.vue
  6. 778 0
      pages/index/policy.vue

+ 6 - 6
app.config.js

@@ -8,15 +8,15 @@ export const requestConfig = {
 	/**微信信息*/
 	/**授权回调地址 */
 	// 授权后重定向的回调链接地址, 请使用 urlEncode 对链接进行处理
-	wx_redirect_uri: "https://ne.sxdirectpurchase.com/#/pages/index/pay",
-	// wx_redirect_uri: "http://192.168.3.183:80/#/pages/index/pay",
+	// wx_redirect_uri: "https://ne.sxdirectpurchase.com/#/pages/index/pay",
+	wx_redirect_uri: "http://192.168.124.7:80/#/pages/index/pay",
 	// wx_redirectOpen: "https://ne.sxdirectpurchase.com/#/pages/index/paySuccess",
 	/**公众号信息 */
-	wx_appid: "wxad190b75af42ac7e",
-	wx_appsecret: "934a264458f4de42c5ccbe611d212587",
+	// wx_appid: "wx1ce30480f3faf5e8",
+	// wx_appsecret: "23d3a0c870cd46f08e8cdf6bd2dd1b02",
 	/**测试公众号*/
-	// wx_appid: "wx0fbc26e298b0d9b9",
-	// wx_appsecret: "b24e3b109d6de1f019c4141d34a56781",
+	wx_appid: "wx0fbc26e298b0d9b9",
+	wx_appsecret: "b24e3b109d6de1f019c4141d34a56781",
 
 	//正式
 	zfb_appid: "2021005135650380",

+ 12 - 0
pages.json

@@ -32,6 +32,18 @@
 			"style": {
 				"navigationStyle": "custom"
 			}
+		},
+		{
+			"path": "pages/index/agreement",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/index/policy",
+			"style": {
+				"navigationStyle": "custom"
+			}
 		}
 	],
 	"globalStyle": {},

File diff suppressed because it is too large
+ 267 - 0
pages/index/agreement.vue


+ 13 - 2
pages/index/index.vue

@@ -21,7 +21,8 @@
 			<view class="agreement-wrap">
 				<u-radio-group v-model="radiovalue">
 					<u-radio value="1" size="30" name="1" iconSize="25" activeColor="#409EFF">
-						<text class="agreement-text">授权同意《用户服务协议》和《隐私协议》</text>
+						<text class="agreement-text">授权同意 <text @click="toAgreement" style="color: #1677FF;">《用户服务协议》</text> 和 <text
+								@click="toPolicy" style="color: #1677FF;">《隐私协议》</text></text>
 					</u-radio>
 				</u-radio-group>
 			</view>
@@ -58,6 +59,16 @@ export default {
 		}
 	},
 	methods: {
+		toAgreement() {
+			uni.navigateTo({
+				url: '/pages/index/agreement'
+			})
+		},
+		toPolicy() {
+			uni.navigateTo({
+				url: '/pages/index/policy'
+			})
+		},
 		login() {
 			console.log(this.radiovalue);
 			var userAgent = window.navigator.userAgent.toUpperCase();
@@ -75,7 +86,7 @@ export default {
 		zfbLink() {
 			let url =
 				`${requestConfig.zfb_request_url}?app_id=${requestConfig.zfb_appid}
-					&scope=${requestConfig.zfb_scope}
+					&scope=${requestConfig.zfb_scope} 
 					&redirect_uri=${encodeURIComponent(requestConfig.zfb_redirect_uri)}
 					&state=STATE
 					&shopId=${this.shopId}

+ 84 - 13
pages/index/pay.vue

@@ -1,4 +1,77 @@
- 
+<template>
+	<view class="login-main">
+		<view style="width: 100%">
+			<view style="width: 100%;height: 270rpx;">
+				<image class="img" src="../../static/images/payBack.png" style="width: 100%;height: 100%;"></image>
+			</view>
+		</view>
+		<view class="main">
+			<view class="login-main-content">
+				<image class="img" :src="shopInfo.store_logo_url
+					? shopInfo.store_logo_url
+					: '/static/images/error.jpeg'
+					" mode=""></image>
+				<h4 class="shopName">
+					陕西天枢云 {{ shopInfo ? shopInfo.store_name : "" }}
+				</h4>
+			</view>
+
+			<view class="login-contont">
+				<view class="uInput">
+					<u-input placeholder="请输入金额" border="bottom" :fontSize="40" type="digit"
+						@change="validateInput($event, 1)" v-model="price" :customStyle="inpustyle">
+						<span slot="prefix" style="font-size: 30px">¥</span>
+					</u-input>
+				</view>
+				<view class="login-contont-button">
+					<button class="btn" @click="Pay">立即支付</button>
+					<view style="padding: 0px 30rpx;">
+						<view style="margin-top: 66rpx;background: #FFF7F6;">
+							<u-cell-group :border="false">
+								<u-cell title="代金券折扣" value="可使用4个" :border="false"></u-cell>
+							</u-cell-group>
+						</view>
+
+						<view style="margin-top: 20rpx; font-size: 26rpx">
+							支付成功后,次日将有随机奖励红包以及店铺代金券,可抵现金花,AI天枢云小程序领取
+						</view>
+					</view>
+
+				</view>
+			</view>
+		</view>
+		<u-popup :zIndex="200" :overlayStyle="{ zIndex: 200 }" :show="showPhone" @close="close" @open="open"
+			:safeAreaInsetTop="true" round="20">
+			<view class="popup">
+				<view class="header">
+					<h4>绑定手机号</h4>
+					<p class="tip">注意:首次登录,需绑定手机号才可成功领取农商网红包</p>
+				</view>
+				<view class="main">
+					<view style="height: 70rpx">
+						<u--input placeholder="请输入手机号" type="number" border="surround" v-model="phone"
+							style="background: #f4f4f4; height: 100%" />
+					</view>
+					<view style="margin-top: 20px; height: 70rpx">
+						<u--input placeholder="验证码" border="surround" v-model="yzm"
+							style="background: #f4f4f4; height: 100%">
+							<template slot="suffix">
+								<u-code ref="uCode" @change="codeChange" seconds="60" changeText="X秒重新获取"></u-code>
+								<!-- <u-button @tap="getCode" :text="tips" type="success" size="mini"></u-button> -->
+								<text class="yzm" @tap="getCode">{{
+									tips ? tips : "发送验证码"
+								}}</text>
+							</template>
+						</u--input>
+					</view>
+				</view>
+				<view class="footer">
+					<u-button type="primary" class="btn" text="确定" @click="submitOk"></u-button>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
 
 <script>
 import { requestConfig } from "@/app.config.js";
@@ -27,18 +100,16 @@ export default {
 		};
 	},
 	onLoad(options) {
-		// this.shopId = options.shopId
-		// this.uid = options.uid || ''
-		// console.log(this.uid);
-		// let info = localStorage.getItem('weChatUserInfo');
-		// console.log(info);
-		// this.localUserInfo = JSON.parse(info)
-		// if (this.localUserInfo) {
-		// 	this.vidTokenExist()
-		// } else {
-		// 	this.getShopInfo();
-		// 	this.getInfo();
-		// }
+		this.shopId = options.shopId
+		this.uid = options.uid || ''
+		let info = localStorage.getItem('weChatUserInfo');
+		this.localUserInfo = JSON.parse(info)
+		if (this.localUserInfo) {
+			this.vidTokenExist()
+		} else {
+			this.getShopInfo();
+			this.getInfo();
+		}
 	},
 	methods: {
 		async vidTokenExist() {

File diff suppressed because it is too large
+ 778 - 0
pages/index/policy.vue