Jelajahi Sumber

refactor:二维码

zhanghui 2 tahun lalu
induk
melakukan
732eb3e752

+ 25 - 25
App.vue

@@ -5,31 +5,31 @@
 <script>
 	export default {
 		onLaunch: function() {
-            let that = this;
-            wx.login({
-                success(re) {
-                    that.$api.wxAuthLogin({code:re.code}).then(res=>{
-                        uni.setStorageSync('userInfo',res.data.data.userInfo)
-                        uni.setStorageSync('accessToken',res.data.data.access_token)
-                        uni.setStorageSync('phoneIsBind',res.data.data.phoneIsBind)
-
-                        if (res.data.data.phoneIsBind){
-                            // uni.switchTab({
-                            //     url: '/pages/index/index',
-                            // })
-                            uni.navigateTo({
-                                url: '/loginPages/bindAccount/index',
-                            })
-                        }else {
-                            uni.navigateTo({
-                                url: '/loginPages/bindAccount/index',
-                            })
-                        }
-
-                    })
-
-                },
-            })
+            // let that = this;
+            // wx.login({
+            //     success(re) {
+            //         that.$api.wxAuthLogin({code:re.code}).then(res=>{
+            //             uni.setStorageSync('userInfo',res.data.data.userInfo)
+            //             uni.setStorageSync('accessToken',res.data.data.access_token)
+            //             uni.setStorageSync('phoneIsBind',res.data.data.phoneIsBind)
+            //
+            //             if (res.data.data.phoneIsBind){
+            //                 // uni.switchTab({
+            //                 //     url: '/pages/index/index',
+            //                 // })
+            //                 uni.navigateTo({
+            //                     url: '/loginPages/bindAccount/index',
+            //                 })
+            //             }else {
+            //                 uni.navigateTo({
+            //                     url: '/loginPages/bindAccount/index',
+            //                 })
+            //             }
+            //
+            //         })
+            //
+            //     },
+            // })
 			console.log('App Launch')
 		},
 		onShow: function() {

+ 25 - 5
common/js/api.js

@@ -6,6 +6,15 @@ import request from '../js/request.js';
 
 export default {
 
+    getImgUrlByOssId(data){
+        return request({
+            url: '/resource/oss/listByIds/'+data.ossId,
+            method: 'GET'
+
+        })
+
+    },
+
     /**
      * 微信静默登录
      */
@@ -27,20 +36,31 @@ export default {
         })
     },
 
-     payTheBill(data) {
+    getSmsCode(data){
         return request({
-            url: '/recruit/recruitmsg/payTheBill',
+            url: '/resource/sms/code?phonenumber='+data.phonenumber+'&auth='+data.auth,
+            method: 'GET',
+            data: data
+        })
+    },
+
+    wechatRetrieveAccountPwdLogin(data){
+        return request({
+            url: '/auth/xcxRetrieveMemberByPwd',
             method: 'POST',
             data: data
         })
     },
 
+
     /**
-     *    福利补贴
+     * post请求,验证身份证是滞存在
+     * @param data
+     * @returns {Promise | Promise<unknown>}
      */
-    welfareMoney(data) {
+    idCardIsExist(data){
         return request({
-            url: '/recruit/recruitmsg/welfareMoney',
+            url: '/member/wechat/idCardIsExist',
             method: 'POST',
             data: data
         })

+ 0 - 311
loginPages/bindAccount/index.vue

@@ -1,311 +0,0 @@
-<template>
-	<view class="container">
-		<view class="login-wrap">
-			<view class="login-form">
-				<u--form labelPosition="left" :model="userInfo" :rules="rules" ref="form1">
-					<u-form-item label="手机号" prop="phonenumber" labelWidth="auto" labelAlign="right">
-						<u--input v-model="userInfo.phonenumber" placeholder="请输入手机号" border="bottom" type="number"
-							maxlength="11"></u--input>
-					</u-form-item>
-					<u-form-item labelWidth="auto" labelAlign="right" label="验证码" prop="smsCode" width="120">
-						<u--input v-model="userInfo.smsCode" disabledColor="#ffffff" placeholder="请输入验证码"
-							border="bottom" maxlength="6"></u--input>
-						<template #right>
-							<view class="identifying-code">
-								<u-code ref="uCode2" @change="codeChange2" keep-running start-text="获取验证码"></u-code>
-								<text @tap="getCode2" :text="tips2" class="u-page__code-text">{{tips2}}</text>
-							</view>
-						</template>
-
-					</u-form-item>
-				</u--form>
-			</view>
-		</view>
-		<view @click="gotoBindAccountPassword()" class="op-btn-wrap">
-			<view class="h-btn">
-				<text>下一步</text>
-			</view>
-		</view>
-
-		<!-- 密码正确 -->
-		<u-popup :show="errShow" :round="10" mode="center">
-			<view class="h-popo-content">
-				<view class="h-img">
-					<!-- <u-icon name="close" color="red" size="40"></u-icon> -->
-					<u-icon name="/static/login/u01.png" color="red" size="50"></u-icon>
-				</view>
-				<view class="h-text">
-					<text>系统已检测到该手机号已绑定过账号</text>
-				</view>
-				<view class="h-text">
-					<text>请选择</text>
-				</view>
-				<view class="h-btn-wrap">
-					<view @click="createNewAccount()" class="h-left-btn">
-						<text>创建新账号</text>
-					</view>
-					<view @click="loginOldAccount()" class="h-right-btn">
-						<text>登录老账号</text>
-					</view>
-				</view>
-			</view>
-		</u-popup>
-
-	</view>
-</template>
-<script>
-
-
-	export default {
-		data() {
-			return {
-				errShow: false,
-				userInfo: {
-					phonenumber: '',
-					phone: '',
-					smsCode: '',
-					openId: '',
-					password: "",
-					transactionPassword: "",
-					reference: "",
-					type: '' // 实名认证创建新账号
-				},
-				tips2: '',
-				rules: {
-					phonenumber: [{
-							required: true,
-							min: 10,
-							max: 12,
-							message: '请输入11位电话号码',
-							trigger: ['blur', 'change'],
-						},
-						{
-							// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
-							validator: (rule, value, callback) => {
-								// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
-								return !this.$isDataEmpty(value);
-							},
-							message: "请认真填写电话号码",
-							trigger: ['blur', 'change'],
-						}
-					],
-					smsCode: {
-						required: true,
-						min: 4,
-						max: 6,
-						message: '请输入4位验证码',
-						trigger: ['blur', 'change'],
-					},
-				},
-			}
-		},
-		onLoad(option) {
-			// 判断Openid是否为空
-			if (!this.$isDataEmpty(option.openId)) {
-				this.userInfo.openId = option.openId;
-				console.log(option)
-			}
-		},
-		onReady() {
-			this.$refs.form1.setRules(this.rules)
-		},
-		methods: {
-			// 创建新账号
-			createNewAccount() {
-				this.errShow = false;
-				this.userInfo.type = "2";
-				uni.$u.route({
-					url: '/pages/login/login-real-name-auth',
-					params: {
-						data: JSON.stringify(this.userInfo)
-					}
-				})
-			},
-			// 登录老账号
-			loginOldAccount() {
-				this.errShow = false;
-				uni.$u.route({
-					url: '/pages/login/login-old-account',
-					params: {
-						phone: this.userInfo.phonenumber
-					}
-				})
-			},
-			// 验证电话号码是否存在
-			phoneIsExist() {
-				let that = this;
-				// 验证电话号码是否存在
-				this.$api.phoneIsExist({
-					data: this.userInfo
-				}).then((res) => {
-					console.log(res)
-					if (res.phoneIsExist) { // 存在
-						that.errShow = true;
-					} else {
-						that.userInfo.phone = that.userInfo.phonenumber;
-						that.userInfo.type = "1";
-
-
-						uni.$u.route({
-							url: '/pages/login/bind-transaction-password',
-							params: {
-								data: JSON.stringify(that.userInfo)
-							}
-						})
-
-						/* uni.$u.route({
-							url: '/pages/login/bind-account-password',
-							params: {
-								data: JSON.stringify(that.userInfo)
-							}
-						}) */
-
-					}
-				}).catch(() => {
-					uni.showToast({
-						title: "操作失败"
-					})
-				});
-			},
-			// 去绑定账号密码页面
-			gotoBindAccountPassword() {
-				this.$refs.form1.validate().then(res => {
-					this.phoneIsExist();
-				}).catch(errors => {
-					uni.$u.toast('校验失败,请认真填写')
-				})
-			},
-			codeChange2(text) {
-				this.tips2 = text;
-			},
-			getCode2() {
-				let that = this;
-				if (this.$refs.uCode2.canGetCode) {
-					that.getSmsCode();
-				} else {
-					uni.$u.toast('倒计时结束后再发送');
-				}
-			},
-			// 获取手机验证码
-			getSmsCode() {
-				let that = this;
-				// 模拟向后端请求验证码
-				uni.showLoading({
-					title: '正在获取验证码'
-				})
-				getSmsCode({
-					data: {
-						phonenumber: this.userInfo.phonenumber,
-						auth: true
-					}
-				}).then((res) => {
-					uni.hideLoading();
-					// 这里此提示会被this.start()方法中的提示覆盖
-					uni.$u.toast('验证码已发送');
-					// 通知验证码组件内部开始倒计时
-					that.$refs.uCode2.start();
-				}).catch(() => {
-					uni.showToast({
-						title: "操作失败"
-					})
-				});
-			},
-		}
-	}
-</script>
-<style lang="scss">
-	page,
-	body {
-		background: #fff;
-	}
-
-	.h-popo-content {
-		height: 380rpx;
-		padding: 24rpx;
-		width: 600rpx;
-		text-align: center;
-		font-size: 28rpx;
-		font-family: PingFangSC-Semibold, PingFang SC;
-
-		.h-img {
-			display: flex;
-			justify-content: center;
-		}
-
-		.h-text {
-			margin-top: 24rpx;
-			font-weight: 400;
-			color: #666666;
-		}
-
-		.text {
-			margin-top: 12rpx;
-			font-weight: 400;
-			color: #666666;
-		}
-
-		.h-btn-wrap {
-			display: flex;
-			justify-content: space-between;
-			color: #333333;
-			text-align: center;
-			margin-top: 28rpx;
-
-			.h-left-btn {
-				height: 64rpx;
-				line-height: 60rpx;
-				background: #EEEEEE;
-				width: 200rpx;
-				text-align: center;
-				border-radius: 32rpx;
-				margin: 0 auto;
-			}
-
-			.h-right-btn {
-				height: 64rpx;
-				line-height: 60rpx;
-				background: #FFE05C;
-				width: 200rpx;
-				border-radius: 32rpx;
-				margin: 0 auto;
-
-			}
-		}
-	}
-
-	.container {
-		background: #fff;
-		height: 600rpx;
-
-		.login-wrap {
-			display: flex;
-			justify-content: center;
-
-			.login-form {
-				width: 90%;
-			}
-
-			.account {
-				display: flex;
-			}
-
-			.identifying-code {}
-		}
-
-		.op-btn-wrap {
-			margin-top: 60rpx;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-
-			.h-btn {
-				text-align: center;
-				width: 686rpx;
-				height: 84rpx;
-				background: #FFE05C;
-				border-radius: 54rpx;
-				line-height: 84rpx;
-			}
-		}
-	}
-</style>

+ 164 - 0
loginPages/login/bind-account-password.vue

@@ -0,0 +1,164 @@
+<template>
+  <view class="container">
+    <view class="login-wrap">
+		<view class="login-form">
+			<u--form
+				labelPosition="left"
+				:model="userInfo"
+				:rules="rules"
+				ref="form1"
+			>
+				<u-form-item
+					label="密码"
+					prop="password"
+					labelWidth="auto"
+					labelAlign="right"
+				  >
+				<u--input
+					v-model="userInfo.password"
+					placeholder="请输入6到18位的密码"
+					border="bottom"
+					maxlength="18"
+					minlength="6"
+					type="password"
+				></u--input>
+				</u-form-item>
+			  <u-form-item
+					labelWidth="auto"
+					labelAlign="right"
+					label="确认密码"
+					prop="password1"
+					width="120"
+				>
+				<u--input
+					maxlength="20"
+					v-model="userInfo.password1"
+					placeholder="请再次输入密码"
+					border="bottom"
+					type="password"
+				></u--input>
+			  </u-form-item>
+			</u--form>
+		</view>
+	</view>
+	<view @click="gotoSettingTransactionPassword()" class="op-btn-wrap">
+		<view class="h-btn">
+			<text>下一步</text>
+		</view>
+	</view>
+	
+	<view class="h-mark-desc">
+		<view class="h-text">
+			<text>*账号密码建议输入6到18位的数字、字母和特殊符号组成</text>
+		</view>
+	</view>
+	
+  </view>
+</template>
+<script>
+export default {
+	data() {
+		return {
+			userInfo: {
+				phone: '',
+				smsCode: '',
+				openId: '',
+				password: '',
+				password1: '',
+				transactionPassword: '',
+				reference: '',
+			},
+			tips2: '',
+			rules: {
+				password: {
+					required: true,
+					min: 6,
+					max: 18,
+					message: '请输入6到18位密码',
+					trigger: ['blur', 'change'],
+				},
+				password1:  [
+					{
+						required: true,
+						min: 6,
+						max: 18,
+						message: '请输入6到18位密码',
+						trigger: ['blur', 'change'],
+					},
+					{
+						validator: (rule, value, callback) => {
+							if(this.userInfo.password === value){
+								return true;
+							}
+							return false;
+						},
+						message: "两次输入密码不一致",
+						trigger: ['blur', 'change'],
+					}
+				],
+			},
+		}
+	},
+	onLoad(option) {
+		// 判断Openid是否为空
+		if(!this.$isDataEmpty(option)){
+			this.userInfo = JSON.parse(option.data);
+		}
+	},
+	onReady() {
+		this.$refs.form1.setRules(this.rules)
+	},
+	methods: {
+		// 去设置交易密码
+		gotoSettingTransactionPassword(){
+			let that = this;
+			this.$refs.form1.validate().then(res => {
+				uni.$u.route({
+					url: '/pages/login/bind-transaction-password',
+					params: {
+						data: JSON.stringify(that.userInfo)
+					}
+				})
+			}).catch(errors => {
+				uni.$u.toast('校验失败,请认真填写')
+			})
+		},
+	}
+}
+</script>
+<style lang="scss">
+page,body{
+	background: #fff;
+}
+.container{
+	background: #fff;
+	height: 500px;
+	.login-wrap {
+		display: flex;
+		justify-content: center;
+		.login-form{
+			width: 90%;
+		}
+		.account{
+			display: flex;
+		}
+		.identifying-code{
+		}
+	}
+	.op-btn-wrap{
+		margin-top: 30px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.h-btn{
+			text-align: center;
+			width: 343px;
+			height: 42px;
+			background: #FFE05C;
+			border-radius: 27px;
+			line-height: 42px;
+		}
+	}
+}
+
+</style>

+ 293 - 0
loginPages/login/bind-account.vue

@@ -0,0 +1,293 @@
+<template>
+  <view class="container">
+    <view class="login-wrap">
+		<view class="login-form">
+			<u--form
+				labelPosition="left"
+				:model="userInfo"
+				:rules="rules"
+				ref="form1"
+			>
+				<u-form-item
+					label="手机号"
+					prop="phonenumber"
+					labelWidth="auto"
+					labelAlign="right"
+				  >
+				<u--input
+					v-model="userInfo.phonenumber"
+					placeholder="请输入手机号"
+					border="bottom"
+					type="number"
+					maxlength="11"
+				></u--input>
+			  </u-form-item>
+			  <u-form-item
+					labelWidth="auto"
+					labelAlign="right"
+					label="验证码"
+					prop="smsCode"
+					width="120"
+				>
+				<u--input
+					v-model="userInfo.smsCode"
+					disabledColor="#ffffff"
+					placeholder="请输入验证码"
+					border="bottom"
+					maxlength="6"
+				></u--input>
+				<template #right>
+					<view class="identifying-code">
+						<u-code
+							ref="uCode2"
+							@change="codeChange2"
+							keep-running
+							start-text="获取验证码"
+						></u-code>
+						<text
+							@tap="getCode2"
+							:text="tips2"
+							class="u-page__code-text"
+						>{{tips2}}</text>
+					</view>
+				</template>
+
+			  </u-form-item>
+			</u--form>
+		</view>
+	</view>
+	<view @click="gotoBindAccountPassword()" class="op-btn-wrap">
+		<view class="h-btn">
+			<text>下一步</text>
+		</view>
+	</view>
+
+	<!-- 密码正确 -->
+	<u-popup :show="errShow" :round="10"  mode="center"  >
+	  <view class="h-popo-content">
+		   <view class="h-img">
+			   <!-- <u-icon name="close" color="red" size="40"></u-icon> -->
+			   <u-icon name="/static/login/u01.png" color="red" size="50"></u-icon>
+		   </view>
+		   <view class="h-text">
+			   <text>系统已检测到该手机号已绑定过账号</text>
+		   </view>
+		   <view class="h-text">
+		   		<text>请选择</text>
+		   </view>
+		   <view class="h-btn-wrap">
+			   <view @click="createNewAccount()" class="h-left-btn">
+			   	    <text>创建新账号</text>
+			   </view>
+			   <view @click="loginOldAccount()" class="h-right-btn">
+				   <text>登录老账号</text>
+			   </view>
+		   </view>
+	  </view>
+	</u-popup>
+
+  </view>
+</template>
+ <script>
+
+export default {
+	data() {
+		return {
+			errShow: false,
+			userInfo: {},
+			tips2: '',
+			rules: {
+				phonenumber:  [
+					{
+						required: true,
+						min: 10,
+						max: 12,
+						message: '请输入11位电话号码',
+						trigger: ['blur', 'change'],
+					},
+					{
+						// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
+						validator: (rule, value, callback) => {
+							// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
+							return !this.$isDataEmpty(value);
+						},
+						message: "请认真填写电话号码",
+						trigger: ['blur', 'change'],
+					}
+				],
+				smsCode: {
+					required: true,
+					min: 4,
+					max: 6,
+					message: '请输入4位验证码',
+					trigger: ['blur', 'change'],
+				},
+			},
+		}
+	},
+	onLoad(option) {
+		// 判断Openid是否为空
+		this.userInfo =	uni.getStorageSync('userInfo');
+	},
+	onReady() {
+		this.$refs.form1.setRules(this.rules)
+	},
+	methods: {
+		// 创建新账号
+		createNewAccount(){
+			this.errShow = false;
+			this.userInfo.type = "2";
+			uni.navigateTo({
+				url: '/loginPages/login/login-real-name-auth?data='+JSON.stringify(this.userInfo),
+			})
+		},
+		// 登录老账号
+		loginOldAccount(){
+			this.errShow = false;
+			uni.navigateTo({
+				url: '/loginPages/login/login-old-account?phone='+this.userInfo.phonenumber,
+			})
+		},
+		// 验证电话号码是否存在
+		phoneIsExist(){
+			let that = this;
+			// 验证电话号码是否存在
+			this.$api.phoneIsExist({data:this.userInfo}).then((res)=>{
+				console.log(res)
+				if(!res.phoneIsExist){ // 存在
+					that.errShow = true;
+				} else {
+					that.userInfo.phone = that.userInfo.phonenumber;
+					that.userInfo.type = "1";
+					console.log("++++++++++++++++++++++")
+					uni.navigateTo({
+						url: '/loginPages/login/bind-transaction-password?data='+JSON.stringify(that.userInfo),
+					})
+				}
+			}).catch(() =>{
+				uni.showToast({
+					title: "操作失败"
+				})
+			});
+		},
+		// 去绑定账号密码页面
+		gotoBindAccountPassword(){
+			this.$refs.form1.validate().then(res => {
+				this.phoneIsExist();
+			}).catch(errors => {
+				uni.$u.toast('校验失败,请认真填写')
+			})
+		},
+		codeChange2(text) {
+			this.tips2 = text;
+		},
+		getCode2() {
+			let that = this;
+			if (this.$refs.uCode2.canGetCode) {
+				that.getSmsCode();
+			} else {
+				uni.$u.toast('倒计时结束后再发送');
+			}
+		},
+		// 获取手机验证码
+		getSmsCode(){
+			let that = this;
+			this.$api.getSmsCode({phonenumber:this.userInfo.phonenumber,auth: true}).then((res)=>{
+				uni.hideLoading();
+				// 这里此提示会被this.start()方法中的提示覆盖
+				uni.$u.toast('验证码已发送');
+				// 通知验证码组件内部开始倒计时
+				that.$refs.uCode2.start();
+			}).catch(() =>{
+				uni.showToast({
+					title: "操作失败"
+				})
+			});
+		},
+	}
+}
+</script>
+<style lang="scss">
+page,body{
+	background: #fff;
+}
+
+.h-popo-content{
+	height: 190px;
+	padding: 12px;
+	width: 300px;
+	text-align: center;
+	font-size: 14px;
+	font-family: PingFangSC-Semibold, PingFang SC;
+	.h-img{
+		display: flex;
+		justify-content: center;
+	}
+	.h-text{
+		margin-top: 12px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.text{
+		margin-top: 6px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.h-btn-wrap{
+		display: flex;
+		justify-content: space-between;
+		color: #333333;
+		text-align: center;
+		margin-top: 14px;
+		.h-left-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #EEEEEE;
+			width: 100px;
+			text-align: center;
+			border-radius: 16px;
+			margin: 0 auto;
+		}
+		.h-right-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #FFE05C;
+			width: 100px;
+			border-radius: 16px;
+			margin: 0 auto;
+
+		}
+	}
+}
+
+.container{
+	background: #fff;
+	height: 300px;
+	.login-wrap {
+		display: flex;
+		justify-content: center;
+		.login-form{
+			width: 90%;
+		}
+		.account{
+			display: flex;
+		}
+		.identifying-code{
+		}
+	}
+	.op-btn-wrap{
+		margin-top: 30px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.h-btn{
+			text-align: center;
+			width: 343px;
+			height: 42px;
+			background: #FFE05C;
+			border-radius: 27px;
+			line-height: 42px;
+		}
+	}
+}
+</style>

+ 227 - 0
loginPages/login/bind-transaction-password.vue

@@ -0,0 +1,227 @@
+<template>
+  <view class="container">
+    <view class="login-wrap">
+		<view class="login-form">
+			<u--form
+				labelPosition="left"
+				:model="userInfo"
+				:rules="rules"
+				ref="form1"
+			>
+				<u-form-item
+					label="账号支付密码"
+					prop="transactionPassword"
+					labelWidth="auto"
+					labelAlign="right"
+				  >
+				<u--input
+					v-model="userInfo.transactionPassword"
+					placeholder="请输入账号支付密码"
+					border="bottom"
+					maxlength="6"
+					type="password"
+				></u--input>
+				</u-form-item>
+			  <u-form-item
+					labelWidth="auto"
+					labelAlign="right"
+					label="确认密码"
+					prop="transactionPassword1"
+					width="120"
+				>
+				<u--input
+					maxlength="6"
+					v-model="userInfo.transactionPassword1"
+					placeholder="请再次输入账号支付密码"
+					border="bottom"
+					type="password"
+				></u--input>
+			  </u-form-item>
+			</u--form>
+		</view>
+	</view>
+	<view @click="submitData" class="op-btn-wrap">
+		<view class="h-btn">
+			<text>确定</text>
+		</view>
+	</view>
+
+	<view class="h-mark-desc">
+		<view class="h-text">
+			<text>*账户支付密码建议输入不连续6位数密码</text>
+		</view>
+	</view>
+
+  </view>
+</template>
+<script>
+import {wechatRegister,realNameAuthLogin} from '/src/api/login/login.js';
+export default {
+	data() {
+		return {
+			userInfo: {
+				phone: '',
+				smsCode: '',
+				openId: '',
+				password: "",
+				password1: '',
+				transactionPassword: "",
+				transactionPassword1: "",
+				reference: ""
+			},
+			tips2: '',
+			rules: {
+				transactionPassword: {
+					required: true,
+					min: 6,
+					max: 6,
+					message: '请输入6位密码',
+					trigger: ['blur', 'change'],
+				},
+				transactionPassword1:  [
+					{
+						required: true,
+						min: 6,
+						max: 6,
+						message: '请输入6位密码',
+						trigger: ['blur', 'change'],
+					},
+					{
+						validator: (rule, value, callback) => {
+							if(this.userInfo.transactionPassword === value){
+								return true;
+							}
+							return false;
+						},
+						message: "两次输入密码不一致",
+						trigger: ['blur', 'change'],
+					}
+				],
+			},
+		}
+	},
+	onLoad(option) {
+		// 判断Openid是否为空
+		if(!this.$isDataEmpty(option)){
+			this.userInfo = JSON.parse(option.data);
+		}
+	},
+	onReady() {
+		this.$refs.form1.setRules(this.rules)
+	},
+	methods: {
+		// 提交交易密码
+		submitData(){
+			let that = this;
+
+			// 如果有错误,会在catch中返回报错信息数组,校验通过则在then中返回true
+			this.$refs.form1.validate().then(res => {
+				console.log(that.userInfo)
+				that.userInfo.password = that.userInfo.transactionPassword;
+				if(that.userInfo.type == '1'){ // 新微信新手机注册
+					// 调用注册
+					that.wechatRegister();
+				}
+				if(that.userInfo.type == '2'){ // 新微信新手机注册
+					// 调用注册
+					that.realNameAuthLogin();
+				}
+			}).catch(errors => {
+				uni.$u.toast('校验失败,请认真填写')
+			})
+		},
+		// 新微信新手机注册
+		wechatRegister(){
+			const that = this;
+			// 新微信新手机注册账号
+			wechatRegister(null,{data:this.userInfo}).then((res)=>{
+				console.log(res)
+				console.log(res.access_token)
+				if(!this.$isDataEmpty(res.access_token)){
+					that.setUserData(res);
+				} else {
+					uni.showToast({
+						title: "用户注册失败"
+					})
+				}
+			}).catch(() =>{
+				uni.showToast({
+					title: "操作失败"
+				})
+			});
+		},
+		realNameAuthLogin(){
+			// 新微信老手机注册账号
+			realNameAuthLogin(null,{data:this.userInfo}).then((res)=>{
+				console.log(res)
+				console.log(res.access_token)
+				if(!this.$isDataEmpty(res.access_token)){
+					that.setUserData(res);
+				} else {
+					uni.showToast({
+						title: "用户注册失败"
+					})
+				}
+			}).catch(() =>{
+				uni.showToast({
+					title: "操作失败"
+				})
+			});
+		},
+		// 设置登录后的用户数据
+		setUserData(res){
+			let loginState = {
+				status: 1,
+				accessToken: ""
+			}
+			// 数据获取token
+			loginState.accessToken = res.access_token;
+			this.$store.commit('updateLoginState', loginState);
+			this.$store.commit('updateLoginUserInfo', res.userInfo)
+			uni.$u.route({
+				url: '/pages/index/tabbar',
+				params: {
+					PageCur: 'index'
+				}
+			})
+		},
+
+	}
+}
+</script>
+<style lang="scss">
+page,body{
+	background: #fff;
+}
+.container{
+	background: #fff;
+	height: 300px;
+	.login-wrap {
+		display: flex;
+		justify-content: center;
+		.login-form{
+			width: 90%;
+		}
+		.account{
+			display: flex;
+		}
+		.identifying-code{
+		}
+	}
+	.op-btn-wrap{
+		margin-top: 30px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.h-btn{
+			text-align: center;
+			width: 343px;
+			height: 42px;
+			background: #FFE05C;
+			border-radius: 27px;
+			line-height: 42px;
+		}
+	}
+}
+
+</style>

+ 226 - 0
loginPages/login/login-old-account.vue

@@ -0,0 +1,226 @@
+<template>
+  <view class="container">
+    <view class="login-wrap">
+		<view class="login-form">
+			<u--form
+				labelPosition="left"
+				:model="reqParm"
+				:rules="rules"
+				ref="form1"
+			>
+				<u-form-item
+					label="账号密码"
+					prop="password"
+					borderBottom
+					labelWidth="auto"
+					labelAlign="right"
+				  >
+				<u--input
+					v-model="reqParm.password"
+					placeholder="请输入账号密码"
+					border="bottom"
+					type="password"
+				></u--input>
+			  </u-form-item>
+			</u--form>
+		</view>
+	</view>
+	<view @click="submitAccountPasswordVerify()" class="op-btn-wrap">
+		<view class="h-btn">
+			<text>确定</text>
+		</view>
+	</view>
+
+	<!-- 密码正确 -->
+	<u-popup :show="show" :round="10"  mode="center"  @close="close" @open="open">
+	  <view class="h-popo-content">
+		   <view class="h-img">
+			   <u-icon name="checkbox-mark" color="green" size="40"></u-icon>
+		   </view>
+		   <view class="text">
+			   <text>账号找回成功</text>
+		   </view>
+		   <view class="text">
+			   <text> 是否立即绑定新的微信号</text>
+		   </view>
+		   <view class="h-btn-wrap">
+			   <view @click="show = false" class="h-left-btn">
+				   <text>取消</text>
+			   </view>
+			   <view @click="gotoBindWechat()" class="h-right-btn">
+			   		<text>立即绑定</text>
+			   </view>
+		   </view>
+	  </view>
+	</u-popup>
+
+	<!-- 密码正确 -->
+	<u-popup :show="passwordErrShow" :round="10"  mode="center"  @close="close" @open="open">
+	  <view class="h-popo-content">
+		   <view class="h-img">
+			   <u-icon name="close" color="red" size="40"></u-icon>
+		   </view>
+		   <view class="h-text">
+			   <text>密码错误</text>
+		   </view>
+		   <view class="h-btn-wrap">
+			   <view @click="passwordErrShow = false" class="h-right-btn">
+				   <text>确定</text>
+			   </view>
+		   </view>
+	  </view>
+	</u-popup>
+
+  </view>
+</template>
+ <script>
+export default {
+	data() {
+		return {
+			passwordErrShow: false,
+			show: false,
+			reqParm: {
+				phone: '',
+				password: '',
+			},
+			rules: {
+				password:{
+					required: true,
+					message: '请输入账号密码',
+					trigger: ['blur', 'change'],
+				},
+			},
+		}
+	},
+	onLoad(option) {
+		// 判断Openid是否为空
+		this.reqParm.phone =  option.phone;
+	},
+	onReady() {
+
+	},
+	methods: {
+		// 提交账号密码验证
+		submitAccountPasswordVerify(){
+			this.$refs.form1.validate().then(res => {
+				// 验证找回
+				this.wechatRetrieveAccountPwdLogin();
+			}).catch(errors => {
+				uni.$u.toast('校验失败,请认真填写')
+			})
+		},
+
+		// 账号密码找回登录
+		wechatRetrieveAccountPwdLogin(){
+			let that = this;
+			// 根据手机和密码找回账号,成功自动登录
+			this.$api.wechatRetrieveAccountPwdLogin(this.reqParm).then((res)=>{
+
+				uni.setStorageSync('userInfo',res.userInfo)
+				uni.setStorageSync('accessToken',res.access_token)
+				uni.switchTab({
+					url: '/pages/index/index',
+				})
+
+			}).catch(() =>{
+				uni.showToast({
+					title: "操作失败"
+				})
+			});
+		},
+		// 去绑定微信
+		gotoBindWechat(){
+			this.show = false;
+			uni.$u.route({
+				url: '/pages/setting/setting-wechat',
+				params: {
+					name: 'lisa'
+				}
+			})
+		},
+	}
+}
+</script>
+<style lang="scss">
+page,body{
+	background: #fff;
+}
+.container{
+	background: #fff;
+	height: 300px;
+	.login-wrap {
+		display: flex;
+		justify-content: center;
+		.login-form{
+			width: 90%;
+		}
+		.account{
+			display: flex;
+		}
+		.identifying-code{
+		}
+	}
+	.op-btn-wrap{
+		margin-top: 30px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.h-btn{
+			text-align: center;
+			width: 343px;
+			height: 42px;
+			background: #FFE05C;
+			border-radius: 27px;
+			line-height: 42px;
+		}
+	}
+}
+
+.h-popo-content{
+	height: 170px;
+	padding: 12px;
+	width: 300px;
+	text-align: center;
+	font-size: 14px;
+	font-family: PingFangSC-Semibold, PingFang SC;
+	.h-img{
+		display: flex;
+		justify-content: center;
+	}
+	.h-text{
+		margin-top: 12px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.text{
+		margin-top: 6px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.h-btn-wrap{
+		display: flex;
+		justify-content: space-between;
+		color: #333333;
+		text-align: center;
+		margin-top: 14px;
+		.h-left-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #EEEEEE;
+			width: 100px;
+			text-align: center;
+			border-radius: 16px;
+			margin: 0 auto;
+		}
+		.h-right-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #FFE05C;
+			width: 100px;
+			border-radius: 16px;
+			margin: 0 auto;
+
+		}
+	}
+}
+</style>

+ 432 - 0
loginPages/login/login-real-name-auth.vue

@@ -0,0 +1,432 @@
+<template>
+	<view class="keep-on-record-wrap">
+		<!-- 提示内容 -->
+		<u-toast ref="uToast" />
+
+		<view class="keep-on-record-content">
+			<view class="container">
+				<view class="login-wrap">
+					<view class="login-form">
+						<u--form
+							labelPosition="left"
+							:model="userRealNameAuth"
+							:rules="rules"
+							ref="form1"
+						>
+							<u-form-item
+								label="真实姓名"
+								prop="name"
+								labelWidth="auto"
+								labelAlign="right"
+							  >
+							<u--input
+								v-model="userRealNameAuth.name"
+								placeholder="请输入真实姓名"
+								border="bottom"
+								type="text"
+								maxlength="11"
+							></u--input>
+						  </u-form-item>
+						  <u-form-item
+								labelWidth="auto"
+								labelAlign="right"
+								label="身份证号"
+								prop="idCard"
+								width="120"
+							>
+							<u--input
+								v-model="userRealNameAuth.idCard"
+								disabledColor="#ffffff"
+								placeholder="请输入身份证号"
+								border="bottom"
+								maxlength="20"
+							></u--input>
+						  </u-form-item>
+						</u--form>
+					</view>
+				</view>
+
+
+				<view class="">
+					<view class="uploadBox">
+						<view @click="uploadImg1(1)">
+							<view class="uploadItem bg-img1">
+								<image class="imgUrl" :src="imgUrl1"></image>
+							</view>
+							<view class="h-desc">
+								<text>点击上传身份证人像面图片</text>
+							</view>
+						</view>
+						<view @click="uploadImg1(2)">
+							<view class="uploadItem bg-img2">
+								<image class="imgUrl" :src="imgUrl2"></image>
+							</view>
+							<view class="h-desc">
+								<text>点击上传身份证国徽面图片</text>
+							</view>
+						</view>
+					</view>
+				</view>
+
+				<!-- 保存备案信息 -->
+				<view class="uploadBox">
+					<view  v-if="userRealNameAuth.isAudit != 1" @click="saveUserRealNameAuth" class="leftBtn text-white text-lg text-center">下一步</view>
+					<view  v-else  class="leftBtn text-white text-lg text-center">审核中不允许修改</view>
+				</view>
+
+			</view>
+		</view>
+
+		<view class="footer"></view>
+
+		<u-popup :show="errShow" :round="10"  mode="center" >
+		  <view class="h-popo-content">
+			   <view class="h-img">
+				   <!-- <u-icon name="close" color="red" size="40"></u-icon> -->
+				   <u-icon name="/static/login/u01.png" color="red" size="50"></u-icon>
+			   </view>
+			   <view class="h-text">
+				   <text>该身份证号已开通实名认证</text>
+			   </view>
+			   <view class="h-text">
+			   		<text>无法继续操作</text>
+			   </view>
+			   <view class="h-btn-wrap">
+				   <view @click="surebtn()" class="h-right-btn">
+					   <text>确定</text>
+				   </view>
+			   </view>
+		  </view>
+		</u-popup>
+
+	</view>
+</template>
+
+<script>
+export default {
+	components: {
+	},
+	data() {
+		return {
+			errShow:  false,
+			userRealNameAuth: {
+				auth: true,
+				idCard: '',
+				idCardBack: '',
+				idCardFront: '',
+				name: '',
+				phone: '',
+				openId: '',
+				type: ''
+			},
+			userInfo: {
+
+			},
+			list1: [
+				'隐私说明:请按要求上传真实的证件照片,您所上传的行驶证仅用于平台账户绑定,请放心上传'
+			],
+			imgUrl1: '',
+			imgUrl2: '',
+			show: false,
+			list: [
+			],
+			queryParms: {
+				userId:'',
+				extId: 1
+			},
+			rules: {
+				name:  [
+					{
+						required: true,
+						min: 1,
+						max: 12,
+						message: '请输入姓名',
+						trigger: ['blur', 'change'],
+					},
+					{
+						// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
+						validator: (rule, value, callback) => {
+							// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
+							return !this.$isDataEmpty(value);
+						},
+						message: "请认真填写姓名",
+						trigger: ['blur', 'change'],
+					}
+				],
+				idCard: {
+					required: true,
+					min: 16,
+					max: 20,
+					message: '请输入身份证号',
+					trigger: ['blur', 'change'],
+				},
+			},
+		}
+	},
+	onReady() {
+		// 初始化静音验证
+		this.$refs.form1.setRules(this.rules)
+	},
+	onLoad(option) {
+		console.log("999999999999999999")
+		console.log(option)
+		// 判断Openid是否为空
+		if(!this.$isDataEmpty(option.data)){
+			let udata = JSON.parse(option.data);
+			this.userRealNameAuth.openId = udata.openId;
+			this.userRealNameAuth.phone = udata.phonenumber;
+			// 判断Openid是否为空
+			this.userRealNameAuth.type = udata.type;
+		}
+	},
+	methods: {
+		// 确定
+		surebtn(){
+			this.errShow = false,
+			uni.$u.route({
+				url: '/pages/login/login',
+				params: {
+				}
+			})
+		},
+		// 保存实名信息
+		saveUserRealNameAuth(){
+			let that = this;
+			console.log(this.userRealNameAuth)
+			if(!this.userRealNameAuth.idCardFront){
+				uni.showToast({
+					title: '请上传身份证正面',
+				})
+				return;
+			}
+			if(!this.userRealNameAuth.idCardBack){
+				uni.showToast({
+					title: '请上传身份证背面'
+				})
+				return;
+			}
+
+			that.$refs.form1.validate().then(res => {
+				// 验证数据
+				this.$api.idCardIsExist({data:this.userRealNameAuth}).then((res)=>{
+					console.log(res)
+					if(res.idCardIsExist){
+						this.errShow = true;
+					} else {
+						uni.navigateTo({
+							url: '/loginPages/login/bind-account-password?data='+JSON.stringify(that.userRealNameAuth)
+						})
+					}
+				}).catch(() =>{
+					uni.showToast({
+						title: "操作失败"
+					})
+				});
+			}).catch(errors => {
+				uni.$u.toast('校验失败,请认真填写')
+			})
+		},
+		//头像上传
+		uploadImg1(imgIndex) {
+			let that = this;
+
+			uni.chooseImage({
+				count: 1,
+				success: (chooseImageRes) => {
+					const tempFilePaths = chooseImageRes.tempFilePaths;
+
+					uni.uploadFile({
+						url: that.$host + '/resource/oss/upload', //仅为示例,非真实的接口地址
+						filePath: tempFilePaths[0],
+						name: 'file',
+						header: {
+							// "Content-Type": "multipart/form-data",
+							// 'X-Access-Token': uni.getStorageSync('token'),
+							'Authorization': 'Bearer ' + that.$store.state.loginState.accessToken,
+						},
+						success: (uploadFileRes) => {
+
+							let res = JSON.parse(uploadFileRes.data)
+							console.log(res.data)
+							if(imgIndex == 1){ // 身份证正面
+								that.imgUrl1 = tempFilePaths[0];
+								that.userRealNameAuth.idCardFront = res.data.ossId
+								that.reqParm.ossId = res.data.ossId
+							}
+
+							if(imgIndex == 2){ // 微信证背面
+								that.imgUrl2 = tempFilePaths[0];;
+								that.userRealNameAuth.idCardBack = res.data.ossId
+							}
+
+						}
+					});
+				}
+			});
+		}
+	}
+}
+</script>
+<style scoped lang="scss">
+page,body{
+	background: #fff;
+}
+// 弹出框
+.h-popo-content{
+	height: 190px;
+	padding: 12px;
+	width: 300px;
+	text-align: center;
+	font-size: 14px;
+	font-family: PingFangSC-Semibold, PingFang SC;
+	.h-img{
+		display: flex;
+		justify-content: center;
+	}
+	.h-text{
+		margin-top: 12px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.text{
+		margin-top: 6px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.h-btn-wrap{
+		display: flex;
+		justify-content: space-between;
+		color: #333333;
+		text-align: center;
+		margin-top: 14px;
+		.h-left-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #EEEEEE;
+			width: 100px;
+			text-align: center;
+			border-radius: 16px;
+			margin: 0 auto;
+		}
+		.h-right-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #FFE05C;
+			width: 100px;
+			border-radius: 16px;
+			margin: 0 auto;
+
+		}
+	}
+}
+.login-wrap {
+	display: flex;
+	justify-content: center;
+	.login-form{
+		width: 90%;
+	}
+	.account{
+		display: flex;
+	}
+	.identifying-code{
+	}
+}
+
+.h-input-wrap{
+	padding-left: 12px;
+	padding-right: 12px;
+	display: flex;
+	align-items: center;
+	height: 40px;
+	font-family: PingFangSC-Regular, PingFang SC;
+	font-size: 14px;
+	.h-name{
+		font-weight: 400;
+		color: #333333;
+		line-height: 22px;
+		margin-right: 6px;
+	}
+	.input-style{
+		border-radius: 4px;
+		font-weight: 400;
+		color: #999999;
+		line-height: 22px;
+		font-size: 14px;
+	}
+}
+
+
+
+
+
+.keep-on-record-wrap{
+	width: 96%;
+	margin: 0 auto;
+	color: #676767;
+}
+.keep-on-record-content{
+	margin-top: 12px;
+}
+
+.container {
+	height: 100%;
+}
+
+// 图片上传
+.uploadBox {
+	margin: 0 auto;
+	width: 100%;
+	padding-left: 12px;
+	padding-right: 12px;
+	margin-top: 12px;
+	.leftBtn {
+		height: 42px;
+		background: #FFE05C;
+		border-radius: 27px;
+		color: #333333;
+		line-height: 42px;
+		margin-top: 12px;
+	}
+
+	.uploadItem {
+		width: 100%;
+		height: 198px;
+		border-width: 1px;
+		border-style: dashed;
+		border-color: #999;
+		.imgUrl {
+			width: 100%;
+			height: 100%;
+		}
+	}
+	.h-desc{
+		font-size: 12px;
+		font-family: PingFangSC-Regular, PingFang SC;
+		font-weight: 400;
+		color: #666666;
+		line-height: 50px;
+		text-align: center;
+	}
+
+	.bg-img1{
+		background-image: url('http://222.85.201.140:10000/static/me/u11.png');
+		background-size: cover;
+		background-repeat: repeat;
+	}
+	.bg-img2{
+		background-image: url("http://222.85.201.140:10000/static/me/u12.png");
+		background-size: cover;
+		background-repeat: repeat;
+	}
+}
+
+
+/* 底部 */
+.footer{
+	margin-top: 30px;
+	height: 160px;
+	font-size: 12px;
+	text-align: center;
+	color: #666;
+}
+</style>

+ 245 - 0
loginPages/login/retrieve-account-password.vue

@@ -0,0 +1,245 @@
+<template>
+  <view class="container">
+    <view class="login-wrap">
+		<view class="login-form">
+			<u--form
+				labelPosition="left"
+				:model="userInfo"
+				:rules="rules"
+				ref="form1"
+			>
+				<u-form-item
+					label="账号密码"
+					prop="password"
+					borderBottom
+					labelWidth="auto"
+					labelAlign="right"
+				  >
+				<u--input
+					v-model="userInfo.password"
+					placeholder="请输入账号密码"
+					border="bottom"
+					type="password"
+				></u--input>
+			  </u-form-item>
+			</u--form>
+		</view>
+	</view>
+	<view @click="submitAccountPasswordVerify()" class="op-btn-wrap">
+		<view class="h-btn">
+			<text>确定</text>
+		</view>
+	</view>
+	
+	<!-- 密码正确 -->
+	<u-popup :show="show" :round="10"  mode="center"  @close="close" @open="open">
+	  <view class="h-popo-content">
+		   <view class="h-img">
+			   <u-icon name="checkbox-mark" color="green" size="40"></u-icon>
+		   </view>
+		   <view class="text">
+			   <text>账号找回成功</text>
+		   </view>
+		   <view class="text">
+			   <text> 是否立即绑定新的微信号</text>
+		   </view>
+		   <view class="h-btn-wrap">
+			   <view @click="show = false" class="h-left-btn">
+				   <text>取消</text>
+			   </view>
+			   <view @click="gotoBindWechat()" class="h-right-btn">
+			   		<text>立即绑定</text>
+			   </view>
+		   </view>
+	  </view>
+	</u-popup>
+	
+	<!-- 密码正确 -->
+	<u-popup :show="passwordErrShow" :round="10"  mode="center"  @close="close" @open="open">
+	  <view class="h-popo-content">
+		   <view class="h-img">
+			   <!-- <u-icon name="close" color="red" size="40"></u-icon> -->
+			   <u-icon name="/static/login/u01.png" color="red" size="50"></u-icon>
+		   </view>
+		   <view class="h-text">
+			   <text>密码错误</text>
+		   </view>
+		   <view class="h-btn-wrap">
+			   <view @click="passwordErrShow = false" class="h-right-btn">
+				   <text>确定</text>
+			   </view>
+		   </view>
+	  </view>
+	</u-popup>
+	
+  </view>
+</template>
+ <script>
+import {wechatRetrieveAccountPwdLogin} from '/src/api/login/login.js';
+export default {
+	data() {
+		return {
+			passwordErrShow: false,
+			show: false,
+			userInfo: {
+				phone: '',
+				password: '',
+			},
+			rules: {
+				password:{
+					required: true,
+					message: '请输入账号密码',
+					trigger: ['blur', 'change'],
+				},
+			},
+		}
+	},
+	onLoad(option) {
+		// 判断Openid是否为空
+		if(!this.$isDataEmpty(option)){
+			this.userInfo.phone = option.data;
+		}
+	},
+	onReady() {
+		this.$refs.form1.setRules(this.rules)
+	},
+	methods: {
+		// 提交账号密码验证
+		submitAccountPasswordVerify(){
+			this.$refs.form1.validate().then(res => {
+				// 验证找回
+				this.wechatRetrieveAccountPwdLogin();
+			}).catch(errors => {
+				uni.$u.toast('校验失败,请认真填写')
+			})
+		},
+		// 去绑定微信
+		gotoBindWechat(){
+			this.show = false;
+			uni.$u.route({
+				url: '/pages/setting/setting-wechat',
+				params: {
+					name: 'lisa'
+				}
+			})
+		},
+		// 账号密码找回登录
+		wechatRetrieveAccountPwdLogin(){
+			let that = this;
+			// 根据手机和密码找回账号,成功自动登录
+			wechatRetrieveAccountPwdLogin(null,{data:this.userInfo}).then((res)=>{
+				if(!this.$isDataEmpty(res.access_token)){
+					let loginState = {
+						status: 1,
+						accessToken: ""
+					}
+					// 数据获取token
+					loginState.accessToken = res.access_token;
+					that.$store.commit('updateLoginState', loginState);
+					that.$store.commit('updateLoginUserInfo', res.userInfo)
+					
+					that.show = true;
+					
+				} else {
+					uni.showToast({
+						title: "操作失败"
+					})
+				}
+			}).catch(() =>{
+				uni.showToast({
+					title: "操作失败"
+				})
+			});
+		},
+		open() {
+			
+		},
+		close() {
+			
+		}
+	}
+}
+</script>
+<style lang="scss">
+page,body{
+	background: #fff;
+}
+.container{
+	background: #fff;
+	height: 300px;
+	.login-wrap {
+		display: flex;
+		justify-content: center;
+		.login-form{
+			width: 90%;
+		}
+		.account{
+			display: flex;
+		}
+		.identifying-code{
+		}
+	}
+	.op-btn-wrap{
+		margin-top: 30px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.h-btn{
+			text-align: center;
+			width: 343px;
+			height: 42px;
+			background: #FFE05C;
+			border-radius: 27px;
+			line-height: 42px;
+		}
+	}
+}
+
+.h-popo-content{
+	height: 160px;
+	padding: 12px;
+	width: 300px;
+	text-align: center;
+	font-size: 14px;
+	font-family: PingFangSC-Semibold, PingFang SC;
+	.h-img{
+		display: flex;
+		justify-content: center;
+	}
+	.h-text{
+		margin-top: 12px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.text{
+		margin-top: 6px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.h-btn-wrap{
+		display: flex;
+		justify-content: space-between;
+		color: #333333;
+		text-align: center;
+		margin-top: 14px;
+		.h-left-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #EEEEEE;
+			width: 100px;
+			text-align: center;
+			border-radius: 16px;
+			margin: 0 auto;
+		}
+		.h-right-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #FFE05C;
+			width: 100px;
+			border-radius: 16px;
+			margin: 0 auto;
+			
+		}
+	}
+}
+</style>

+ 210 - 0
loginPages/login/retrieve-account-phone.vue

@@ -0,0 +1,210 @@
+<template>
+  <view class="container">
+    <view class="login-wrap">
+		<view class="login-form">
+			<u--form
+				labelPosition="left"
+				:model="userInfo"
+				:rules="rules"
+				ref="form1"
+			>
+				<u-form-item
+					label="手机号"
+					prop="phonenumber"
+					borderBottom
+					labelWidth="auto"
+					labelAlign="right"
+				  >
+				<u--input
+					v-model="userInfo.phonenumber"
+					placeholder="请输入账号绑定的手机号"
+					border="bottom"
+					type="number"
+					maxlength="11"
+				></u--input>
+			  </u-form-item>
+		  </u--form>
+		</view>
+	</view>
+	<view @click="gotoRetrieveMethod()" class="op-btn-wrap">
+		<view class="h-btn">
+			<text>下一步</text>
+		</view>
+	</view>
+	
+	<!-- 密码正确 -->
+	<u-popup :show="show" :round="10"  mode="center" >
+	  <view class="h-popo-content">
+		   <view class="h-img">
+			   <u-icon name="/static/login/u01.png" color="red" size="50"></u-icon>
+		   </view>
+		   <view class="text">
+			   <text>找回失败</text>
+		   </view>
+		   <view class="text">
+			   <text>未查询到该手机号绑定的账号</text>
+		   </view>
+		   <view class="h-btn-wrap">
+			   <view @click="sureClose" class="h-right-btn">
+			   		<text>确定</text>
+			   </view>
+		   </view>
+	  </view>
+	</u-popup>
+	
+  </view>
+</template>
+ <script>
+import {phoneIsExist} from '/src/api/login/login.js';
+export default {
+	data() {
+		return {
+			show: false,
+			userInfo: {
+				phonenumber: ''
+			},
+			rules: {
+				phonenumber:{
+					required: true,
+					min: 10,
+					max: 12,
+					message: '请输入11位电话号码',
+					trigger: ['blur', 'change'],
+				},
+			},
+		}
+	},
+	onLoad() {
+		
+	},
+	onReady() {
+		this.$refs.form1.setRules(this.rules)
+	},
+	methods: {
+		
+		// 去选择找回方式
+		gotoRetrieveMethod(){
+			let that = this;
+			this.$refs.form1.validate().then(res => {
+				that.phoneIsExist();
+			}).catch(errors => {
+				uni.$u.toast('校验失败,请认真填写')
+			})
+		},
+		sureClose(){
+			this.show = false;
+			uni.$u.route({
+				url: '/pages/login/login',
+				params: {
+					name: 'lisa'
+				}
+			})
+		},
+		// 验证电话号码是否存在
+		phoneIsExist(){
+			let that = this;
+			// 验证电话号码是否存在
+			phoneIsExist(null,{data:this.userInfo}).then((res)=>{
+				console.log(res)
+				if(res.phoneIsExist){ // 存在
+					uni.$u.route({
+						url: '/pages/login/retrieve-method',
+						params: {
+							data: that.userInfo.phonenumber
+						}
+					})
+				} else {
+					that.show = true;
+				}
+			}).catch(() =>{
+				uni.showToast({
+					title: "操作失败"
+				})
+			});
+		},
+	}
+}
+</script>
+<style lang="scss">
+page,body{
+	background: #fff;
+}
+.container{
+	background: #fff;
+	height: 300px;
+	.login-wrap {
+		display: flex;
+		justify-content: center;
+		.login-form{
+			width: 90%;
+		}
+		.account{
+			display: flex;
+		}
+		.identifying-code{
+		}
+	}
+	.op-btn-wrap{
+		margin-top: 30px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.h-btn{
+			text-align: center;
+			width: 343px;
+			height: 42px;
+			background: #FFE05C;
+			border-radius: 27px;
+			line-height: 42px;
+		}
+	}
+}
+
+.h-popo-content{
+	height: 170px;
+	padding: 12px;
+	width: 300px;
+	text-align: center;
+	font-size: 14px;
+	font-family: PingFangSC-Semibold, PingFang SC;
+	.h-img{
+		display: flex;
+		justify-content: center;
+	}
+	.h-text{
+		margin-top: 12px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.text{
+		margin-top: 6px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.h-btn-wrap{
+		display: flex;
+		justify-content: space-between;
+		color: #333333;
+		text-align: center;
+		margin-top: 14px;
+		.h-left-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #EEEEEE;
+			width: 100px;
+			text-align: center;
+			border-radius: 16px;
+			margin: 0 auto;
+		}
+		.h-right-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #FFE05C;
+			width: 100px;
+			border-radius: 16px;
+			margin: 0 auto;
+			
+		}
+	}
+}
+</style>

+ 319 - 0
loginPages/login/retrieve-account.vue

@@ -0,0 +1,319 @@
+<template>
+  <view class="container">
+    <view class="login-wrap">
+		<view class="login-form">
+			<u--form
+				labelPosition="left"
+				:model="userInfo"
+				:rules="rules"
+				ref="form1"
+			>
+				<u-form-item
+					label="手机号"
+					prop="phonenumber"
+					labelWidth="auto"
+					labelAlign="right"
+				  >
+				<u--input
+					v-model="userInfo.phonenumber"
+					placeholder="请输入手机号"
+					border="bottom"
+					type="number"
+					maxlength="11"
+				></u--input>
+			  </u-form-item>
+			  <u-form-item
+					labelWidth="auto"
+					labelAlign="right"
+					label="验证码"
+					prop="smsCode"
+					width="120"
+					
+				>
+				<u--input
+					v-model="userInfo.smsCode"
+					disabledColor="#ffffff"
+					placeholder="请输入验证码"
+					border="bottom"
+					maxlength="6"
+				></u--input>
+				<template #right>
+					<view class="identifying-code">
+						<u-code
+							ref="uCode2"
+							@change="codeChange2"
+							keep-running
+							start-text="获取验证码"
+						></u-code>
+						<text
+							@tap="getCode2"
+							:text="tips2"
+							class="u-page__code-text"
+						>{{tips2}}</text>
+					</view>
+				</template>
+				
+			  </u-form-item>
+			</u--form>
+		</view>
+	</view>
+	<view @click="gotoBindAccountPassword()" class="op-btn-wrap">
+		<view class="h-btn">
+			<text>下一步</text>
+		</view>
+	</view>
+	
+	<!-- 密码正确 -->
+	<u-popup :show="errShow" :round="10"  mode="center"  @close="close" @open="open">
+	  <view class="h-popo-content">
+		   <view class="h-img">
+			   <u-icon name="/static/login/u01.png" color="red" size="50"></u-icon>
+		   </view>
+		   <view class="h-text">
+			   <text>系统已检测到该手机号已绑定过账号</text>
+		   </view>
+		   <view class="h-text">
+		   		<text>请选择</text>
+		   </view>
+		   <view class="h-btn-wrap">
+			   <view @click="createNewAccount()" class="h-left-btn">
+			   	    <text>创建新账号</text>
+			   </view>
+			   <view @click="loginOldAccount()" class="h-right-btn">
+				   <text>登录老账号</text>
+			   </view>
+		   </view>
+	  </view>
+	</u-popup>
+	
+  </view>
+</template>
+ <script>
+import color from 'uview-plus/libs/config/color';
+import {validateSmsCode,wechatRegister,getSmsCode} from '/src/api/login/login.js';
+
+export default {
+	data() {
+		return {
+			errShow: false,
+			userInfo: {
+				phonenumber: '',
+				smsCode: '',
+				openId: '',
+				password: "",
+				transactionPassword: "",
+				reference: ""
+			},
+			tips2: '',
+			rules: {
+				phonenumber:  [
+					{
+						required: true,
+						min: 10,
+						max: 12,
+						message: '请输入11位电话号码',
+						trigger: ['blur', 'change'],
+					},
+					{
+						// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
+						validator: (rule, value, callback) => {
+							// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
+							return !this.$isDataEmpty(value);
+						},
+						message: "请认真填写电话号码",
+						trigger: ['blur', 'change'],
+					}
+				],
+				smsCode: {
+					required: true,
+					min: 4,
+					max: 6,
+					message: '请输入6位验证码',
+					trigger: ['blur', 'change'],
+				},
+			},
+		}
+	},
+	onLoad(option) {
+		// 判断Openid是否为空
+		if(!this.$isDataEmpty(option.openId)){
+			this.userInfo.openId = option.openId;
+			console.log(option)
+		}
+	},
+	onReady() {
+		this.$refs.form1.setRules(this.rules)
+	},
+	methods: {
+		// 创建新账号
+		createNewAccount(){
+			this.errShow = false;
+			uni.$u.route({
+				url: '/pages/login/login-real-name-auth',
+				params: {
+					data: JSON.stringify(this.userInfo)
+				}
+			})
+		},
+		// 登录老账号
+		loginOldAccount(){
+			this.errShow = false;
+			uni.$u.route({
+				url: '/pages/login/account-password',
+				params: {
+					data: JSON.stringify(this.userInfo)
+				}
+			})
+		},
+		// 验证电话号码是否存在
+		validateSmsCode(){
+			let that = this;
+			// 验证电话号码是否存在
+			validateSmsCode(null,{data:this.userInfo}).then((res)=>{
+				console.log(res)
+				if(res.phoneIsExist){ // 正确
+					that.errShow = true;
+				} else {
+					uni.$u.route({
+						url: '/pages/login/retrieve-account-phone',
+						params: {
+							data: JSON.stringify(that.userInfo)
+						}
+					})
+				}
+			}).catch(() =>{
+				uni.showToast({
+					title: "操作失败"
+				})
+			});
+			
+			
+		},
+		// 去绑定账号密码页面
+		gotoBindAccountPassword(){
+			let that = this;
+			this.$refs.form1.validate().then(res => {
+				that.validateSmsCode();
+			}).catch(errors => {
+				uni.$u.toast('校验失败,请认真填写')
+			})
+		},
+		codeChange2(text) {
+			this.tips2 = text;
+		},
+		getCode2() {
+			let that = this;
+			if (this.$refs.uCode2.canGetCode) {
+				that.getSmsCode();
+			} else {
+				uni.$u.toast('倒计时结束后再发送');
+			}
+		},
+		// 获取手机验证码
+		getSmsCode(){
+			let that = this;
+			// 模拟向后端请求验证码
+			uni.showLoading({
+				title: '正在获取验证码'
+			})
+			getSmsCode({data:{phonenumber:this.userInfo.phonenumber,auth: true}}).then((res)=>{
+				uni.hideLoading();
+				// 这里此提示会被this.start()方法中的提示覆盖
+				uni.$u.toast('验证码已发送');
+				// 通知验证码组件内部开始倒计时
+				that.$refs.uCode2.start();
+			}).catch(() =>{
+				uni.showToast({
+					title: "操作失败"
+				})
+			});
+		},
+		open(){},
+		close() {}
+	}
+}
+</script>
+<style lang="scss">
+page,body{
+	background: #fff;
+}
+
+.h-popo-content{
+	height: 190px;
+	padding: 12px;
+	width: 300px;
+	text-align: center;
+	font-size: 14px;
+	font-family: PingFangSC-Semibold, PingFang SC;
+	.h-img{
+		display: flex;
+		justify-content: center;
+	}
+	.h-text{
+		margin-top: 12px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.text{
+		margin-top: 6px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.h-btn-wrap{
+		display: flex;
+		justify-content: space-between;
+		color: #333333;
+		text-align: center;
+		margin-top: 14px;
+		.h-left-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #EEEEEE;
+			width: 100px;
+			text-align: center;
+			border-radius: 16px;
+			margin: 0 auto;
+		}
+		.h-right-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #FFE05C;
+			width: 100px;
+			border-radius: 16px;
+			margin: 0 auto;
+			
+		}
+	}
+}
+
+.container{
+	background: #fff;
+	height: 300px;
+	.login-wrap {
+		display: flex;
+		justify-content: center;
+		.login-form{
+			width: 90%;
+		}
+		.account{
+			display: flex;
+		}
+		.identifying-code{
+		}
+	}
+	.op-btn-wrap{
+		margin-top: 30px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.h-btn{
+			text-align: center;
+			width: 343px;
+			height: 42px;
+			background: #FFE05C;
+			border-radius: 27px;
+			line-height: 42px;
+		}
+	}
+}
+</style>

+ 60 - 0
loginPages/login/retrieve-method.vue

@@ -0,0 +1,60 @@
+<template>
+<view class="container">
+	<view @click="gotoAccountPassword()" class="h-method">
+		<view class="h-img">
+			<u-icon name="lock-fill" color="#333" size="30"></u-icon>
+		</view>
+		<view class="h-name">
+			<text>通过账号密码找回</text>
+		</view>
+	</view>
+</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			userInfo: {
+				telphone: '',
+				code: '',
+			},
+			tips2: '',
+		}
+	},
+	onLoad(option) {
+		// 判断Openid是否为空
+		if(!this.$isDataEmpty(option)){
+			this.userInfo.telphone = option.data;
+		}
+	},
+	onReady() {
+	},
+	methods: {
+		// 去找回账号页面
+		gotoAccountPassword(){
+			let that = this;
+			uni.$u.route({
+				url: '/pages/login/retrieve-account-password',
+				params: {
+					data: that.userInfo.telphone
+				}
+			})
+		},
+	}
+}
+</script>
+
+<style lang="scss" scoped>
+page,body{
+	background: #fff;
+}
+.container{
+}
+.h-method{
+	height: 70vh;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+}
+</style>

+ 1 - 1
myPages/recharge/index.vue

@@ -94,7 +94,7 @@
 						<text>使用说明</text>
 					</view>
 					<view class="h-content">
-						
+
 					</view>
 				</view>
 			</view>

+ 0 - 0
orderDetail/index.rpx.css


+ 0 - 26
orderDetail/index.vue

@@ -1,26 +0,0 @@
-<template>
-	<view class="content">
-		订单详情
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				title: 'Hello'
-			}
-		},
-		onLoad() {
-
-		},
-		methods: {
-
-		}
-	}
-</script>
-
-<style>
-	@import '/common/css/common.css';
-	@import './index.rpx.css';
-</style>

+ 2 - 20
pages.json

@@ -42,25 +42,7 @@
 		}
 	],
 	"subPackages": [
-		{
-			"root": "orderPages",
-			"pages": [
-				{
-					"path": "orderDetail/index",
-					"style": {
-						"navigationBarTitleText": "订单详情",
-						"enablePullDownRefresh": false
-					}
-				},
-				{
-					"path": "goodsDetail/index",
-					"style": {
-						"navigationBarTitleText": "商品详情",
-						"enablePullDownRefresh": false
-					}
-				}
-			]
-		},
+
 		{
 			"root": "myPages",
 			"pages": [
@@ -124,4 +106,4 @@
 		"titleNView": false
 	},
 	"uniIdRouter": {}
-}
+}

+ 219 - 1
pages/index/index.vue

@@ -1,6 +1,224 @@
 <template>
 	<view class="content">
-		首页
+		<view class="head-wrap ">
+			<view class="content-info ">
+
+				<view class="h-bg">
+					<!-- 轮播图 -->
+					<u-swiper
+							:list="bannerList"
+							:height="340"
+					></u-swiper>
+				</view>
+				<view class="content">
+
+					<!--  通知栏 -->
+					<view v-if="noticeList.length > 0" class="h-notice-bar">
+						<scroll-notice  :dataList="noticeList" :type="2" :interval="3000" :height="46" :fontSize="12" color="#666666" @click="handleNoticeClick"></scroll-notice>
+					</view>
+
+					<!-- 个人信息、钱包、商店 -->
+					<view class="h-content-wrap">
+						<!-- 欢迎语 -->
+						<view class="welcome-wrap">
+							<view class="logo">
+								<image v-if="userInfo.selfPhotoUrl" :src="userInfo.selfPhotoUrl" mode=""></image>
+								<image v-else src="../../static/logo.png" mode=""></image>
+							</view>
+							<view class="text">
+								<view class="phone">{{userInfo.cellPhone}}</view>
+								<view class="welcome">尊敬的用户,下午好~</view>
+							</view>
+							<view @click="gotoReceiveCoupons()" class="arrow-right">
+								<!-- <image v-if="userInfo.wxQrCode" class="qrcode" :src="userInfo.qrcode" mode=""></image> -->
+								<!-- <image class="qrcode" src="../../static/index/qrcode.png" mode=""></image>
+								<view class="h-text">会员码</view> -->
+								<view class="coupon-wrap">
+									<u-icon name="coupon-fill" color="#ffb83d" size="22"></u-icon>
+									<text>领券中心</text>
+								</view>
+							</view>
+						</view>
+
+						<!-- 余额信息 -->
+						<view class="balance-info">
+							<view @click="gotoRechargeService()" class="balance-amount">
+								<text class="number" v-if="userInfo.balance" >¥{{userInfo.balance}}</text>
+								<text class="number" v-else>¥0.00</text>
+								<view class="">余额 </view>
+							</view>
+							<view @click="gotoIntgral()" class="score-info">
+								<text class="number"  v-if="userInfo.integral" >{{userInfo.integral}}</text>
+								<text class="number"  v-else>0</text>
+								<view class="">积分 </view>
+							</view>
+							<view @click="gotoCoupon()" class="coupon-info">
+								<text class="number" v-if="userInfo.coupon">{{userInfo.coupon}}</text>
+								<text class="number" v-else>0</text>
+								<view class="">优惠券 </view>
+
+							</view>
+							<view class="e-currency-info">
+								<text class="number" v-if="userInfo.electronicCurrency">{{userInfo.electronicCurrency}}</text>
+								<text class="number" v-else>0</text>
+								<view class="">电子币</view>
+							</view>
+						</view>
+
+						<view class="custom-line"></view>
+
+						<view class="store-wrap">
+							<view class="store-info">
+								<view class="logo">
+									<image src="../../static/index/u55.png" mode=""></image>
+								</view>
+								<view @click="gotoStoreChoose()" class="store-content">
+									<view class="h-row">
+										<view class="store-desc">
+											<view class="store-name">
+												<view class="">{{storeInfo.storeName}}</view>
+											</view>
+										</view>
+										<view class="arrow-right">
+											<view  class="change-store">更换门店</view>
+											<u-icon name="arrow-right" color="#333" size="16"></u-icon>
+										</view>
+									</view>
+									<view class="h-row">
+										<text class="address">地址:{{storeInfo.address}}</text>
+										<!-- <text class="address">距你1.8km</text> -->
+									</view>
+								</view>
+							</view>
+
+						</view>
+					</view>
+
+					<!-- 上次订单 -->
+					<view class="nav-wrap ">
+
+						<view class="upper-order-wrap">
+							<!-- 左边内容 -->
+							<view @click="gotoServiceOrder()" class="left-content">
+								<view class="title">
+									服务点单
+								</view>
+								<view class="desc">
+									多种服务模式任您选择
+								</view>
+								<view class="bg-img">
+									<image src="../../static/index/u65.png" mode=""></image>
+								</view>
+							</view>
+							<view class="dashed-line"></view>
+							<!-- 右边内容 -->
+							<view class="right-content">
+								<view class="title">
+									产品点单
+								</view>
+								<view class="desc">
+									拼命研发中敬请期待...
+								</view>
+								<view class="bg-img">
+									<image src="../../static/index/u67.png" mode=""></image>
+								</view>
+							</view>
+						</view>
+
+						<!-- 导航菜单 -->
+						<view class="horizontal-dashed-line"></view>
+						<view class="menu-tab">
+							<view class="button-wrap">
+								<view @click="gotoComeOrder()" class="btn">
+									<view class="icon">
+										<u-icon name="/static/index/u213.png" color="red" size="30"></u-icon>
+									</view>
+									<view class="name">
+										再来一单
+									</view>
+								</view>
+							</view>
+							<view class="button-wrap">
+								<view @click="gotoRechargeService()" class="btn">
+									<view class="icon">
+										<u-icon name="/static/index/u215.png" color="red" size="30"></u-icon>
+									</view>
+									<view class="name">
+										储值服务
+									</view>
+								</view>
+							</view>
+							<view class="button-wrap">
+								<view @click="gotoOrder()" class="btn">
+									<view class="icon">
+										<u-icon name="/static/index/u217.png" color="red" size="30"></u-icon>
+									</view>
+									<view class="name">
+										当前订单
+									</view>
+								</view>
+							</view>
+							<view class="button-wrap">
+								<view @click="gotoReceiveCoupons()" class="btn">
+									<view class="icon">
+										<u-icon name="/static/index/u247.png" color="red" size="30"></u-icon>
+									</view>
+									<view class="name">
+										领优惠券
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+
+					<!-- 为你推荐 -->
+					<view class="recommend-wrap">
+						<view class="recommend-nav">
+							<view class="icon">
+								<image src="/static/index/u87.png" mode=""></image>
+							</view>
+							<view class="title">
+								为你推荐
+							</view>
+						</view>
+						<!-- 分割线 -->
+						<view class="custom-line"></view>
+						<!-- 门店列表 -->
+						<view class="store-wrap ">
+							<view class="store-list" v-for="item in 1">
+								<view class="store-content">
+									<view class="store-img">
+										<image src="../../static/logo.png" mode=""></image>
+									</view>
+									<view class="h-store-content">
+										<view class="title">
+											<text>{{storeInfo.storeName}}</text>
+										</view>
+										<view class="adress">
+											地址:{{storeInfo.address}}
+										</view>
+										<!-- <view class="price">
+											标准价格:<span class="red">¥200</span>
+										</view> -->
+										<view class="desc">
+											<view class="price">
+												<!-- 人均消费¥35起 -->
+											</view>
+											<view @click="gotoGoods()" class="order-btn">
+												<view class="btn">去下单</view>
+											</view>
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="footer ">
+						<view class="">---到底了---</view>
+					</view>
+				</view>
+			</view>
+		</view>
 
 		<view class="tabBarLineHeight"></view>
 		<view class="tabBarView">

+ 2 - 5
pages/login/login.vue

@@ -62,11 +62,8 @@
 							uni.setStorageSync('phoneIsBind',res.data.data.phoneIsBind)
 
 							if (res.data.data.phoneIsBind){
-								// uni.switchTab({
-								// 	url: '/pages/index/index',
-								// })
-								uni.navigateTo({
-									url: '/loginPages/bindAccount/index',
+								uni.switchTab({
+									url: '/pages/index/index',
 								})
 							}else {
 								uni.navigateTo({

+ 4 - 0
pages/qrCode/index.rpx.css

@@ -35,6 +35,9 @@
     font-size: 40rpx;
     font-weight: 600;
 }
+.qrcode{
+    margin-top: 20rpx;
+}
 .qrcodeImage{
     width: 480rpx;
     height: 480rpx;
@@ -42,4 +45,5 @@
 .qrcode-desc{
     font-size: 28rpx;
     padding-bottom: 25rpx;
+    margin-top: 20rpx;
 }

+ 27 - 21
pages/qrCode/index.vue

@@ -4,20 +4,20 @@
 		<view class="content" :style="{'height':height}">
 			<view class="outView flex-col">
 				<view class="member-head-img flex-row justify-center">
-					<image class="imageLogo" v-if="userInfo.selfPhotoUrl" :src="userInfo.selfPhotoUrl" mode=""></image> <!-- 用户头像 -->
+					<image class="imageLogo" v-if="selfPhotoUrl" :src="selfPhotoUrl" mode=""></image> <!-- 用户头像 -->
 					<image class="imageLogo" v-else src="../../static/logo.png" mode=""></image> <!-- 用户头像 -->
 				</view>
 				<view class="member-content flex-col">
 					<view class="user-name flex-row justify-center">
 						<text>hi.亲爱的{{userInfo.ncikName}}</text>
 					</view> <!-- 用户名 -->
-					<view @click="perfectUserInfo()"  class="flex-row justify-center">
-						<text>你前资料尚不完善,</text>
-						<text>立即完善</text>
-					</view>
+<!--					<view @click="perfectUserInfo()"  class="flex-row justify-center">-->
+<!--						<text>你前资料尚不完善,</text>-->
+<!--						<text>立即完善</text>-->
+<!--					</view>-->
 					<view class="qrcode flex-row justify-center">
-						<image class="qrcodeImage bord" v-if="userInfo.qrCodeImg" :src="userInfo.qrCodeImg" mode=""></image> <!-- 二维码图片 -->
-						<image class="qrcodeImage bord" v-else src="../../static/index/u41.png" mode=""></image> <!-- 二维码图片 -->
+						<image class="qrcodeImage" v-if="qrCodeImg" :src="qrCodeImg" mode=""></image> <!-- 二维码图片 -->
+						<image class="qrcodeImage" v-else src="../../static/index/u41.png" mode=""></image> <!-- 二维码图片 -->
 					</view>
 					<view class="qrcode-desc flex-row justify-center">
 						<text>会员码,分享邀请好友加入</text>
@@ -45,33 +45,39 @@
 			return {
 				height: '',
 				tabIndex:2,
-				userInfo:''
+				userInfo:{},
+				qrCodeImg:'',
+				selfPhotoUrl:'',
+
 			}
 		},
 		onLoad() {
+			// 用户信息
+			this.userInfo = uni.getStorageSync('userInfo');
 			let sysInfo = uni.getSystemInfoSync()
 			this.height = sysInfo.screenHeight - (sysInfo.screenWidth/750)*138 + 'px'
-		},
-
-		mounted() {
-
-			// 用户信息
-			this.userInfo = this.$store.state.loginUserInfo;
 			this.getImgUrlByOssId(this.userInfo.selfPhoto, 1)
 			this.getImgUrlByOssId(this.userInfo.wxQrCode, 2)
-
 		},
 
 		methods: {
 
 			getImgUrlByOssId(ossId, type) {
-				let url =  this.$getImgUrlByOssId(ossId);
-				if (type == 1) {
-					this.userInfo.selfPhotoUrl = url;
-				} else if (type == 2) {
-					this.userInfo.qrCodeImg = url;
+				if (ossId===null){
+					return
 				}
-				return url;
+				this.$api.getImgUrlByOssId({
+					ossId:ossId,
+					auth:true
+				}).then(res=>{
+					console.log(res)
+					if (type === 1) {
+						this.selfPhotoUrl = res.data.data[0].url.replace(/^http:/, "https:");
+					} else if (type === 2) {
+						this.qrCodeImg = res.data.data[0].url.replace(/^http:/, "https:");
+					}
+				})
+
 			},
 
 			/* 用户信息 */