chenrui 4 anni fa
parent
commit
724d327c03

+ 25 - 1
pages.json

@@ -36,7 +36,31 @@
 				"navigationBarBackgroundColor": "#01c9b2",
 				"navigationBarTextStyle": "white"
 			}
-		}, 
+		},
+		{
+			"path": "pages/userCenter/userInfo/userInfo",
+			"style": {
+				"navigationBarTitleText": "个人信息"
+			}
+		},
+		{
+			"path": "pages/userCenter/userInfo/smsVerification",
+			"style": {
+				"navigationBarTitleText": "短信验证"
+			}
+		},
+		{
+			"path": "pages/userCenter/userInfo/paymentPwd",
+			"style": {
+				"navigationBarTitleText": "支付密码"
+			}
+		},
+		{
+			"path": "pages/userCenter/userInfo/changePayPwd",
+			"style": {
+				"navigationBarTitleText": "修改支付密码"
+			}
+		},
 		{
 			"path": "pages/userCenter/aboutUs",
 			"style": {

+ 8 - 1
pages/userCenter/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="user-content">
 		<!-- 头部 -->
-		<view class="user-head">
+		<view class="user-head" @click="toUserPage">
 			<view class="user-photo">
 				<open-data type="userAvatarUrl"></open-data>
 			</view>
@@ -58,6 +58,13 @@
 					url: pageUrl[index]
 				})
 			},
+			//  跳转
+			toUserPage(){
+				//  未登录跳转登录,已登录跳转用户信息页
+				uni.navigateTo({
+					url: '/pages/userCenter/userInfo/userInfo'
+				})
+			},
 			// 退出登录
 			quitSys(){
 				let _this = this

+ 89 - 0
pages/userCenter/userInfo/changePayPwd.vue

@@ -0,0 +1,89 @@
+<template>
+	<view class="changePayPwd-container">
+		<text class="pwd-describe">请输入当前支付密码</text>
+		<view class="pwd-item">
+			<u-input v-model="oldPwd" type="text" input-align="center" placeholder="请输入支付密码" maxlength="50" class="inp-pwd" />
+		</view>
+		<view class="btn-con">
+			<u-button class="handle-btn" type="info" size="medium" @click="cancel">取消</u-button>
+			<u-button class="handle-btn" type="primary" size="medium" @click="submit">确定</u-button>
+		</view>
+		<view class="linkbtn-con">
+			<text class="link-btn" @click="goPage">忘记支付密码</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				oldPwd: ''  //  旧密码
+			}
+		},
+		onShow() {
+		},
+		onLoad() {
+		},
+		methods:{
+			//  确定
+			submit(){
+				if(this.oldPwd){
+					
+				}else{
+					uni.showToast({ title: '请输入支付密码', icon: 'none' })
+				}
+			},
+			//  取消
+			cancel(){
+				uni.navigateBack({ delta: 1 })
+			},
+			//  忘记支付密码
+			goPage(){
+				// uni.redirectTo({
+				// 	url: '/pages/userCenter/userInfo/paymentPwd'
+				// })
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.changePayPwd-container{
+		width: 100%;
+		padding: 0 30rpx;
+		box-sizing: border-box;
+		background-color: #fff;
+		.pwd-describe{
+			display: block;
+			color: #606266;
+			padding: 80rpx 0 70rpx;
+			text-align: center;
+		}
+		.pwd-item{
+			.inp-pwd{
+			}
+		}
+		.btn-con{
+			display: flex;
+			justify-content: space-between;
+			padding-top: 130rpx;
+			.handle-btn{
+				display: inline-block;
+				width: 45%;
+				margin: 0 auto;
+				text-align: center;
+			}
+		}
+		.linkbtn-con{
+			text-align: center;
+			.link-btn{
+				display: inline-block;
+				font-size: 28rpx;
+				color: #298bf2;
+				margin-top: 200rpx;
+			}
+		}
+	}
+</style>
+

+ 220 - 0
pages/userCenter/userInfo/components/number-keyboard/number-keyboard.vue

@@ -0,0 +1,220 @@
+<template>
+  <view :class="['KeyboarBody','bottomMove', 'bodMove', bodMove]" v-if="KeyboarHid">
+    <view @tap="close" class="dowmImgBx">
+      <view class="dowmImg"></view>
+    </view>
+    <view class="KeyboarBx">
+      <view v-for="(num , index) in keyboardNum " :key='index' @tap="clickBoard(num)" hover-class="hover"
+        :hover-stay-time='20' class="keyboar">
+        {{num}}
+      </view>
+      <view @tap="clickBoard(otherNum)" :class="['keyboar',otherNum==''?'empty':'']" :hover-stay-time='20' hover-class="hover">{{otherNum}}</view>
+      <view @tap="clickBoard('0')" hover-class="hover" :hover-stay-time='20' class="keyboar">0</view>
+      <view @tap="deleteKeyboar()" class="keyboar keyboarflex" :hover-stay-time='20' hover-class="hover">
+        <view class="keyboarDel"></view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+  export default {
+    props: {
+      //限制输入框的长度 空值不限制
+      psdLength: {
+        type: [Number, String],
+        default: ''
+      },
+      //键盘码
+      keyboardNum: {
+        type: [Array, Object],
+        default: () => {
+          return [1, 2, 3, 4, 5, 6, 7, 8, 9]
+        }
+      },
+      //特殊键盘码 .或者X  默空
+      otherNum: {
+        type: String,
+        default: ''
+      },
+      //是否在需要打开键盘时隐藏底部tabBar关闭键盘展示tabBar功能
+      tabBar: {
+        type: Boolean,
+        default: false
+      },
+      value: {
+        type: String,
+        default: ''
+      }
+    },
+    data() {
+      return {
+        bodMove: '',
+        password: '', //要返回的结果
+        iptNum: [], //输入的内容
+        KeyboarHid: false, //键盘影藏和显示
+      }
+    },
+    watch: {
+      iptNum(newVal, oldVal) {
+        this.$emit('input', newVal.join(''))
+      },
+      value(newVal, oldVal) {
+        this.iptNum = newVal.split('')
+      }
+    },
+    created() {
+     
+    },
+    methods: {
+      open() {
+        this.KeyboarHid = true;
+        if (this.tabBar) {
+          uni.hideTabBar()
+        } 
+        this.$nextTick(() => {
+          setTimeout(() => {
+            this.bodMove = 'moveShow'
+          }, 30)
+        })
+      },
+      close() {
+        if (this.tabBar) {
+          uni.showTabBar()
+        }
+        this.bodMove = '';
+        this.$nextTick(() => {
+          setTimeout(() => {
+            this.KeyboarHid = false
+          }, 300)
+        })
+      },
+      // 密码框
+      clickBoard(num) {
+        if (num == '') return;
+        let iptNum = this.iptNum.filter(item => item != '');
+        //判断是否限制长度
+        if (this.psdLength != '') {
+          if (iptNum.length >= this.psdLength) {
+            return
+          };
+          this.iptNum.push(num);
+        } else {
+          this.iptNum.push(num);
+        }
+      },
+      //重置 清空
+      reset() {
+        this.iptNum = [];
+      },
+      //删除
+      deleteKeyboar() {
+        this.iptNum.pop();
+      }
+    }
+  }
+</script>
+
+<style scoped>
+  .bodMove {
+    transition: all .3s
+  }
+
+  .bottomMove {
+    bottom: 0;
+    left: 0;
+    width: 100%;
+    transform: translateY(100%)
+  }
+
+  .moveShow {
+    transform: translateY(0)
+  }
+
+  .KeyboarBody {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    z-index: 99;
+    background-color: #FFFFFF;
+  }
+
+  .KeyboarBx {
+    display: flex;
+    flex-wrap: wrap;
+    text-align: center;
+    background-color: rgba(3, 3, 3, 0.1);
+    padding: 10rpx 6rpx 0rpx 6rpx;
+    margin-left: -12rpx;
+  }
+
+
+  .keyboar {
+    width: 20%;
+    flex-grow: 1;
+    padding: 3%;
+    font-size: 40rpx;
+    background-color: #FFFFFF;
+    border-radius: 10rpx;
+    margin-left: 12rpx;
+    margin-bottom: 10rpx;
+	box-sizing: initial;
+  }
+
+  .dian {
+    margin-top: -10rpx;
+  }
+
+  .keyboarBtn {
+    background: linear-gradient(45deg, rgba(242, 131, 9, 1) 0%, rgba(230, 36, 15, 1) 100%);
+    color: #fff;
+  }
+
+  .hover {
+    background: #ebedf0;
+  }
+
+
+  .bot {
+    bottom: 0;
+  }
+
+  .empty {
+    background-color: #EEEEEE;
+  }
+
+  .dowmImgBx {
+    display: flex;
+    justify-content: center;
+    border-top: 1rpx solid A1A1A1;
+  }
+
+  .dowmImg {
+    width: 35rpx;
+    height: 35rpx;
+    margin-bottom: 10rpx;
+    background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAACT0lEQVRYR+2UPWgTYRjH/8/dpdZCpVhU/BoEB8FBEBFt7tJe7i5CbAXhrg6CQ8HBQXAQHBzq5CA4CA4OgoNgr0GQIhQTUkJqCPEDBEEQBAdBQSoVlIakXvLIofmopMnlizjkxuN9nt/v/b/v+xB6/FGP+egL9BPoJ/D/JLC8/Hp33sl9AXDOCMqRbsyH6NLzGwLR7BapuDMQCKy4jHICi5nMNinrpAk4DOC8EZQfdVKiBGemxyHNb5V6bziCaDRxSPT5bAaOCAJd0Cb8DzshUYIT4cnqit+anqZCTQH357NE+qDIhXmAjoJpxtD8D9qRqOwcT538DyscDuer+9W8hNFo8oDok2wGHxcIFzVVvt+KRAkOYDG3NmhNTR3L/ttn01eQTL7cv+6sz4NwkhmXQpp8rxmJ8s6B2NAATFmWf9aqr/sMY7HUHsEHmxkKGJcNTb7rRaKyc1rKZ4vW5KTyfbO6hnMgHo/vYmHQBjBBxFd0VblTT6IC56REjqmq6rd66xsKuMXx+ItRFn/ZYOhMfDWkKrdrNa068xQVJVPXT3xtlJgnAbdJIpEYcViyATpFoGt60H+runkVPCOwYGra2OdG8A2DyMvihYXU8NAwzQF8moDrelC+6daV4YRXcNg0DOWTl35NC7gF6XR661qu6N6JMwzMMrPgjlcw3hCzqevKR6/wlgTcokjk3cDI6KpNRGf/wt6yWDBD4+MfmoG3LPBHIiJu37F3jsH7JAgzqjr2vll4WwKtwJoeRJ2CtD0HuinieQ50S6Iv0E+g5wn8Bo+vyyFXaYw2AAAAAElFTkSuQmCC');
+    background-repeat: no-repeat;
+    background-position: center center;
+    background-size: 100%;
+  }
+
+  .keyboarDel {
+    width: 50rpx;
+    height: 36rpx;
+    margin-bottom: 10rpx;
+    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABqUlEQVRYR+2WPUvEQBCGZze1/8DKUnsrEcVaLhvwCgULCy1sLGzFE8RKC0EsBLGwEBRuhmChlTb+hCu0vU4Ff4H3SkKCOS4fezHnNUkXQuZ58s7sbhSN+VJj5lMtUCdglYDrurNKqSMiWqpoaD+IaI6Z3woFjDErRHRJRBMVweMyz8y8mCsQwW8rBtsJjBgeSGQn8A/wbAFbOIBHpdQnEa2ltKijlHoBsJnTvsEEbOFR0SYz37mu21JK7SdAnV6v1wzutdYda4Eh4XHdDWa+Skgk4cHwzlgJlISHtQHsiMhpIAEgXDFa6yL47wx4njcJoPuXpQZgT0QOG43GtCW8fwiNMYFxsOGUucLYAXz7vv+aMhNZNfuHsKRECHcc5wvAAxFdM/OxpUTqKhgmifjLu47j3BPRfDQTWyJyYSGRvhHZJgHgQERanuf5AJaTOQNYFZEbY8wTES1k9CB3JxwmiTJzk78VB09tkyhLzz0L4qIjlig+jkechJ1AJHFGRNt/iHvgVQC7InJS+EeUaMc6gKkqJLTW7+12+zyoZS1QBTitRi1QJzD2BH4AtrHfITKVMwgAAAAASUVORK5CYII=');
+    background-repeat: no-repeat;
+    background-position: center center;
+    background-size: 100%;
+    margin-top: 11rpx;
+
+  }
+
+  .keyboarflex {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+</style>

+ 84 - 0
pages/userCenter/userInfo/components/password-input/password-input.vue

@@ -0,0 +1,84 @@
+<template>
+  <view class="psdIptBx">
+    <block v-for="(item , index) in psdIptNum" :key='index'>
+      <view class="psdTtem">
+        <text v-if="numLng.length > index" class="psdTtemTxt">
+          <text v-if="plaintext">●</text>
+          <text v-else>{{numLng[index]}}</text>
+        </text>
+        <text v-if="numLng.length ==index" class="focus_move">|</text>
+      </view>
+    </block>
+  </view>
+</template>
+
+<script>
+  export default {
+    props: {
+      //是否明文 默认密文
+      plaintext: {
+        type: Boolean,
+        default: true
+      },
+      //键盘输入的val
+      numLng: {
+        type: [String, Number],
+        default: ''
+      },
+      //密码框的个数
+      psdIptNum: {
+        type: [String, Number],
+        default: 6
+      }
+    },
+    data() {
+      return {}
+    },
+    created() {},
+    methods: {
+    }
+  }
+</script>
+
+<style scoped>
+  .psdIptBx {
+    display: flex;
+    width: 100%;
+    text-align: center;
+    /* border-bottom: 1px solid #ccc; */
+    /* border-top: 1px solid #ccc; */
+    /* border-right: 1px solid #ccc; */
+  }
+
+  .psdTtem {
+    flex: 1;
+    height: 80rpx;
+	margin: 0 10rpx;
+    /* border-left: 1px solid #ccc; */
+	border-bottom: 1px solid #ccc;
+    line-height: 1;
+  }
+
+  .psdTtemTxt {
+    text-align: center;
+    line-height: 80rpx;
+    font-size: 30rpx;
+  }
+
+  .focus_move {
+    color: #E6240F;
+    font-size: 30rpx;
+    line-height: 80rpx;
+    animation: focus 0.8s infinite;
+  }
+
+  @keyframes focus {
+    from {
+      opacity: 1;
+    }
+
+    to {
+      opacity: 0;
+    }
+  }
+</style>

+ 116 - 0
pages/userCenter/userInfo/paymentPwd.vue

@@ -0,0 +1,116 @@
+<template>
+	<view class="paymentPwd-container">
+		<text class="pwd-describe">{{nowSetp == 1 ? '请设置6位数字支付密码' : nowSetp == 2 ? '请再次输入密码' : ''}}</text>
+		<view class="sms-item" @tap='KeyboarOpen'>
+			<password-input :numLng='password' :plaintext="true"></password-input>
+		</view>
+		<view class="btn-con">
+			<u-button class="handle-btn" type="info" size="medium" @click="cancel">取消</u-button>
+			<u-button class="handle-btn" type="primary" size="medium" @click="submit">确定</u-button>
+		</view>
+		<!-- 数字键盘 -->
+		<number-keyboard tabBar ref='KeyboarHid' @input='onInput' psdLength='6'></number-keyboard>
+	</view>
+</template>
+
+<script>
+	import numberKeyboard from '@/pages/userCenter/userInfo/components/number-keyboard/number-keyboard.vue'
+	import passwordInput from '@/pages/userCenter/userInfo/components/password-input/password-input.vue'
+	export default {
+		data() {
+			return {
+				nowSetp: 1,  //  当前第几次设置密码
+				password: '', //输入的内容
+				oPwd: '',  //  第一次密码
+				tPwd: '',  //  第二次密码
+			}
+		},
+		components: {
+		  numberKeyboard,
+		  passwordInput
+		},
+		onShow() {
+		},
+		onLoad() {
+			//因为此时实例没有挂载完成,需要延迟操作
+			setTimeout(() => {
+			  this.$refs.KeyboarHid.open()
+			}, 50)
+		},
+		methods:{
+			//打开键盘
+			KeyboarOpen(e) {
+			  this.$refs.KeyboarHid.open()
+			},
+			//输入的值
+			onInput(val) {
+			  this.password = val
+			},
+			//  确定
+			submit(){
+				if(!this.password || this.password.length < 6){
+					uni.showToast({ title: '请输入6位数字支付密码', icon: 'none' })
+				}else{
+					if(this.nowSetp == 1){
+						this.oPwd = this.password
+						this.$refs.KeyboarHid.reset()
+						this.nowSetp++
+						this.$refs.KeyboarHid.open()
+					}else if(this.nowSetp == 2){
+						this.tPwd = this.password
+						this.checkPwd()
+					}
+				}
+			},
+			//  密码校验
+			checkPwd(){
+				if(this.oPwd == this.tPwd){
+					//  请求接口
+					uni.showToast({ title: '支付密码设置成功', icon: 'none' })
+					setTimeout(()=>{
+						uni.navigateBack({
+						    delta: 1
+						})
+					}, 2000)
+				}else{
+					uni.showToast({ title: '两次密码不一致请重新输入', icon: 'none' })
+					this.$refs.KeyboarHid.reset()
+				}
+			},
+			//  取消
+			cancel(){
+				this.oPwd = ''
+				this.tPwd = ''
+				this.$refs.KeyboarHid.reset()
+				this.nowSetp = 1
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.paymentPwd-container{
+		width: 100%;
+		padding: 0 30rpx;
+		box-sizing: border-box;
+		background-color: #fff;
+		.pwd-describe{
+			display: block;
+			color: #606266;
+			padding: 80rpx 0 70rpx;
+			text-align: center;
+		}
+		.btn-con{
+			display: flex;
+			justify-content: space-between;
+			padding-top: 130rpx;
+			.handle-btn{
+				display: inline-block;
+				width: 45%;
+				margin: 0 auto;
+				text-align: center;
+			}
+		}
+	}
+</style>
+

+ 146 - 0
pages/userCenter/userInfo/smsVerification.vue

@@ -0,0 +1,146 @@
+<template>
+	<view class="smsVerification-container">
+		<view class="sms-title">输入短信验证码</view>
+		<text class="sms-describe">验证码已发送至157****7854,请在下方输入框内输入6位数字验证码</text>
+		<view class="sms-item" @tap='KeyboarOpen'>
+			<password-input :numLng='password' :plaintext="false"></password-input>
+		</view>
+		<view class="sendcode-con">
+			<text :class="['getcode-btn', isDisable ? 'grey-btn' : '']" @click="isDisable ? null : getCodeValidate()">{{nowVal}}</text>
+		</view>
+		<view class="btn-con">
+			<u-button class="handle-btn" type="info" size="medium" @click="cancel">取消</u-button>
+			<u-button class="handle-btn" type="primary" size="medium" @click="submit">确定</u-button>
+		</view>
+		<!-- 数字键盘 -->
+		<number-keyboard tabBar ref='KeyboarHid' @input='onInput' psdLength='6'></number-keyboard>
+	</view>
+</template>
+
+<script>
+	import numberKeyboard from '@/pages/userCenter/userInfo/components/number-keyboard/number-keyboard.vue'
+	import passwordInput from '@/pages/userCenter/userInfo/components/password-input/password-input.vue'
+	export default {
+		data() {
+			return {
+				nowVal: '获取验证码',  //  按钮显示内容
+				count: '',  //  当前秒数
+				timer: null,  //  倒计时
+				isDisable: false,  //  是否禁止获取验证码
+				password: "", //输入的内容
+			}
+		},
+		components: {
+		  numberKeyboard,
+		  passwordInput
+		},
+		onShow() {
+			this.getCodeValidate()
+		},
+		onLoad() {
+			//因为此时实例没有挂载完成,需要延迟操作
+			setTimeout(() => {
+			  this.$refs.KeyboarHid.open()
+			}, 50)
+		},
+		methods:{
+			//打开键盘
+			KeyboarOpen(e) {
+			  this.$refs.KeyboarHid.open()
+			},
+			//输入的值
+			onInput(val) {
+			  this.password = val
+			},
+			//  获取验证码
+			getCodeValidate(){
+				const _this = this
+				//  短信验证码
+				// memberVerifyCode({ phone: '15454787787' }).then(res => {
+				// 	console.log(JSON.stringify(res))
+				// 	if(res.status == 200){  //  验证码输入正确
+						//  开启倒计时
+						this.getCodeFun()
+						uni.showToast({icon: 'none',title: '验证码发送成功'})
+				// 	}else {  //  验证码输入错误
+				// 		uni.showToast({icon: 'none',title: res.message})
+				// 	}
+				// })
+			},
+			//  开始倒计时
+			getCodeFun(){
+				const TIME_COUNT = 60
+				if (!this.timer) {
+				  this.count = TIME_COUNT
+				  this.timer = setInterval(() => {
+				    if (this.count > 0 && this.count <= TIME_COUNT) {
+				      this.count--
+				      this.nowVal = this.count + '秒后重新发送'
+				      this.isDisable = true
+				    } else {
+				      this.nowVal = '重新获取验证码'
+				      clearInterval(this.timer)
+				      this.timer = null
+				      this.isDisable = false
+				    }
+				  }, 1000)
+				}
+			},
+			//  确定
+			submit(){
+				if(!this.password || this.password.length < 6){
+					uni.showToast({ title: '请输入6位数字验证码', icon: 'none' })
+				}else{
+					//  校验输入短信验证码是否正确
+					uni.redirectTo({
+						url: '/pages/userCenter/userInfo/paymentPwd'
+					})
+				}
+			},
+			//  取消
+			cancel(){}
+		}
+	}
+</script>
+
+<style lang="less">
+	.smsVerification-container{
+		width: 100%;
+		padding: 0 30rpx;
+		box-sizing: border-box;
+		background-color: #fff;
+		.sms-title {
+		  margin: 50rpx 0 30rpx;
+		  font-size: 36rpx;
+		  font-weight: bold;
+		}
+		.sms-describe{
+			display: block;
+			color: #606266;
+			margin: 20rpx 0 50rpx;
+		}
+		.sendcode-con{
+			text-align: center;
+			padding-top: 70rpx;
+			.getcode-btn {
+				display: block;
+				font-size: 28rpx;
+				color: #298bf2;
+			}
+			.grey-btn{
+				color: #999;
+			}
+		}
+		.btn-con{
+			display: flex;
+			justify-content: space-between;
+			padding-top: 130rpx;
+			.handle-btn{
+				display: inline-block;
+				width: 45%;
+				margin: 0 auto;
+				text-align: center;
+			}
+		}
+	}
+</style>

+ 80 - 0
pages/userCenter/userInfo/userInfo.vue

@@ -0,0 +1,80 @@
+<template>
+	<view class="userInfo-container">
+		<u-cell-group>
+			<u-cell-item title="头像" :arrow="false" center>
+				<u-avatar src="" :size="70" slot="right-icon"></u-avatar>
+			</u-cell-item>
+			<u-cell-item title="手机号码" value="15709284545" :arrow="false"></u-cell-item>
+			<u-cell-item title="收货地址" index="0" @click="toPage"></u-cell-item>
+			<u-cell-item title="支付密码" index="1" @click="toPage"></u-cell-item>
+		</u-cell-group>
+		<!-- 退出 -->
+		<view class="user-btn">
+			<u-button type="success" :custom-style="quitButton" @click="quitSys" shape="circle">退出登录</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {logout} from '@/api/login.js'
+	export default {
+		data() {
+			return {
+				quitButton: {
+					borderRadius:'100rpx',
+					fontSize:'30rpx',
+					background: '#01c9b2'
+				}
+			}
+		},
+		onShow() {
+		},
+		onLoad() {
+		},
+		methods:{
+			// 打开对应的页面
+			toPage(index){
+				let pageUrl=[
+					'/pages/toOrder/editAddress',
+					'/pages/userCenter/userInfo/changePayPwd'
+					// '/pages/userCenter/userInfo/smsVerification'
+					]
+				uni.navigateTo({ url: pageUrl[index] })
+			},
+			// 退出登录
+			quitSys(){
+				let _this = this
+				uni.showModal({
+				  title: '提示',
+				  content: '您确定要退出登录吗?',
+				  success(res) {
+				    if (res.confirm) {
+				      logout({}).then(res => {
+				       getApp().globalData.token = ''
+				       _this.$u.vuex('vuex_token','')
+					   // 关闭socket
+					   _this.$store.commit("$closeWebsocket")
+				        uni.reLaunch({
+				        	url: '/pages/index/index'
+				        })
+				      })
+				    }
+				  }
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.userInfo-container{
+		width: 100%;
+		.logout-btn{
+			width: 60%;
+			margin-top: 200rpx;
+		}
+		.user-btn{
+			padding: 85rpx 200rpx;
+		}
+	}
+</style>