设置密码 会员
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
</view>
|
||||
<image style="margin:32rpx auto;" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png"
|
||||
v-if="is_end" mode="aspectFill"></image>
|
||||
<u-loadmore height='40' :status="form.status" iconSize='24' fontSize='24' />
|
||||
<u-loadmore :status="form.status" iconSize='24' fontSize='24' height='40' />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<view class="Box">
|
||||
<view class="box_one">安全密码用于商户推广提现/订单退款,确保资金安全</view>
|
||||
<view class="box_one" v-if="isPwd == 0">安全密码用于商户推广提现/订单退款,确保资金安全</view>
|
||||
<view class="box_box">
|
||||
<view class="box_item flex-between">
|
||||
<view class="box_item flex-between" v-if="isPwd == 0">
|
||||
<text class="top_box_one_text">手机号码</text>
|
||||
<input type="number" v-model="form.mobile" placeholder="请输入手机号" maxlength="11" disabled="disabled" />
|
||||
</view>
|
||||
@@ -36,6 +36,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isPwd: uni.cache.get('userInfo').isPwd,
|
||||
form: {
|
||||
mobile: uni.cache.get('userInfo').telephone,
|
||||
password: '',
|
||||
@@ -50,8 +51,14 @@
|
||||
Recapture: '发送验证码'
|
||||
};
|
||||
},
|
||||
onLoad() {},
|
||||
onLoad() {
|
||||
if (uni.cache.get('userInfo').isPwd != 0) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '忘记支付密码', // 标题文本,必须是字符串
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
async CodeRegister() {
|
||||
const res = await this.api.phoneValidateCode({
|
||||
@@ -78,8 +85,8 @@
|
||||
}
|
||||
},
|
||||
async userInfosavePayPassword() {
|
||||
console.log(this.form.payPassword, this.form.password)
|
||||
if (this.form.mobile.length != 11) {
|
||||
|
||||
if (this.form.mobile.length != 11 && this.isPwd == 0) {
|
||||
uni.showToast({
|
||||
title: '手机号必须是11位',
|
||||
icon: 'none'
|
||||
@@ -123,14 +130,21 @@
|
||||
}
|
||||
let res = await this.api.loginresetPwd({
|
||||
pwd: this.form.password,
|
||||
shopId: uni.cache.get('shopUser'),
|
||||
code: this.form.checkCode
|
||||
})
|
||||
if (res == 1) {
|
||||
uni.showToast({
|
||||
title: '修改成功',
|
||||
icon: 'none'
|
||||
});
|
||||
|
||||
if (res.code == 0) {
|
||||
if (uni.cache.get('userInfo').isPwd != 0) {
|
||||
uni.showToast({
|
||||
title: '修改成功',
|
||||
icon: 'none'
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '设置成功',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 1000);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="user-info-wrap" @click="clickinformation">
|
||||
<!-- <view class="user-info-wrap" @click="clickinformation">
|
||||
<view style="width: 108rpx; height: 108rpx;border-radius: 50%;">
|
||||
<image style="width: 108rpx; height: 108rpx; border-radius: 50%;" v-if="userInfo.headImg"
|
||||
:src="userInfo.headImg" mode="aspectFill">
|
||||
@@ -12,8 +12,35 @@
|
||||
<view class="info flex-colum-start">
|
||||
<text class="phone">{{userInfo.nickName || '无'}}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<navseat :opacity='opacity' class="navseat" title='个人中心' :iconshow="false" :titleshow='true'></navseat>
|
||||
<view class="boxtop">
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<view :style="{'height':Topdistance+'px'}"></view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view :style="{'height':HeighT.customBar+HeighT.heightBar+'px'}"></view>
|
||||
<!-- #endif -->
|
||||
<view class="boxtop_top flex-between">
|
||||
<view class="boxtop_topleft">
|
||||
<view class="flex-start" v-if="userInfo.nickName">
|
||||
<image style="width: 108rpx; height: 108rpx; border-radius: 50%;" v-if="userInfo.headImg"
|
||||
:src="userInfo.headImg" mode="aspectFill">
|
||||
</image>
|
||||
<text>{{userInfo.nickName || '无'}}</text>
|
||||
</view>
|
||||
<view class="flex-start" v-else @click="loginClick">
|
||||
<text>去登录</text>
|
||||
</view>
|
||||
</view>
|
||||
<image style="width: 44rpx; height: 42.26rpx;"
|
||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/user/kf.png" mode="aspectFill">
|
||||
</view>
|
||||
|
||||
<image @click="memberlist" class="boxtop_botton" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/user/member.png"
|
||||
mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="userinfoone">
|
||||
<view class="userinfoone" v-if="teblist.length!=0">
|
||||
<view class="userinfoonebox">
|
||||
<view class="userinfooneboxitem flex-between" @click="clickinfo(item,index)"
|
||||
v-for="(item,index) in teblist" :key="index">
|
||||
@@ -25,31 +52,48 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<listitem :list='list'></listitem>
|
||||
<listitem :list='list' v-if="list.length!=0"></listitem>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uploadImage from "@/js_sdk/yushijie-ossutil/ossutil/uploadFile.js";
|
||||
import listitem from "@/components/listitem.vue";
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
listitem
|
||||
listitem,
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
shopUser: {},
|
||||
titlename: '个人中心',
|
||||
opacity: false,
|
||||
userInfo: {},
|
||||
shopInfo: {},
|
||||
teblist: [],
|
||||
list: []
|
||||
list: [],
|
||||
Topdistance: ''
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.init_fn()
|
||||
},
|
||||
computed: {
|
||||
HeighT() { //手机类型的尺寸
|
||||
return this.$store.getters.is_BarHeight
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
setTimeout(() => {
|
||||
this.$nextTick(() => {
|
||||
this.GetTop()
|
||||
});
|
||||
}, 1000)
|
||||
// 当组件挂载完成后获取距离
|
||||
|
||||
},
|
||||
onShow() {
|
||||
if (uni.cache.get('token')) {
|
||||
this.init_fn()
|
||||
this.loginwxuserInfo()
|
||||
this.tbPlatformDict()
|
||||
}
|
||||
@@ -58,6 +102,20 @@
|
||||
clickinformation() {
|
||||
uni.pro.navigateTo('user/information')
|
||||
},
|
||||
//获取元素距离顶部的距离
|
||||
GetTop() {
|
||||
this.$u.getRect('.content').then(res => {
|
||||
console.log(1111, res)
|
||||
this.Topdistance = res.height //滚动距离
|
||||
})
|
||||
},
|
||||
memberlist(){
|
||||
if (uni.cache.get('token')) {
|
||||
uni.pro.navigateTo('member/list')
|
||||
}else{
|
||||
this.loginClick()
|
||||
}
|
||||
},
|
||||
//退出登录
|
||||
boxClick() {
|
||||
uni.showModal({
|
||||
@@ -78,6 +136,12 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
loginClick() {
|
||||
uni.cache.clear();
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
});
|
||||
},
|
||||
// 精选推荐
|
||||
// 下面初始数据
|
||||
init_fn() {
|
||||
@@ -128,7 +192,7 @@
|
||||
}
|
||||
break;
|
||||
case 'scan_applet':
|
||||
uni.navigateToMiniProgram(JSON.parse(item.value))
|
||||
uni.navigateToMiniProgram(JSON.parse(item.value))
|
||||
break
|
||||
case 'relative': //内部页面
|
||||
uni.pro.navigateTo(item.absUrl)
|
||||
@@ -153,7 +217,7 @@
|
||||
let res = await this.api.tbPlatformDict({
|
||||
type: 'ownMenu'
|
||||
})
|
||||
console.log(res)
|
||||
// console.log(res)
|
||||
if (res.code == 0) {
|
||||
this.teblist = res.data
|
||||
}
|
||||
@@ -233,13 +297,46 @@
|
||||
background-image: radial-gradient(40rpx at 0px 0px, rgba(0, 0, 0, 0) 40rpx, #fff 40rpx);
|
||||
}
|
||||
|
||||
.boxtop {
|
||||
width: 100%;
|
||||
height: 542rpx;
|
||||
background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/user/user.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
position: relative;
|
||||
|
||||
.boxtop_top {
|
||||
padding: 0 32rpx;
|
||||
margin-top: 52rpx;
|
||||
.boxtop_topleft {
|
||||
.flex-start {
|
||||
text {
|
||||
margin-left: 18rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.boxtop_botton {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 0;
|
||||
transform: translatex(-50%);
|
||||
width: 654rpx;
|
||||
height: 160rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.userinfoone {
|
||||
position: relative;
|
||||
padding: 48rpx 28rpx;
|
||||
width: 100%;
|
||||
top: -40rpx;
|
||||
// top: -40rpx;
|
||||
background: #F6F6F6;
|
||||
border-radius: 40rpx 0 0rpx 0rpx;
|
||||
// border-radius: 40rpx 0 0rpx 0rpx;
|
||||
|
||||
.userinfoonebox {
|
||||
padding: 32rpx 20rpx 32rpx 52rpx;
|
||||
|
||||
Reference in New Issue
Block a user