反馈修改完成

static-project
chen 2022-06-10 15:16:56 +08:00
parent f4d80df8ca
commit 3f920deb8b
6 changed files with 29 additions and 5 deletions

View File

@ -41,7 +41,7 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 底部导航 --> <!-- 全选 -->
<view class="disjbac cart-foot-box fon24" :style="{bottom: footHeight+'px'}"> <view class="disjbac cart-foot-box fon24" :style="{bottom: footHeight+'px'}">
<label class="disac" @tap="chooseAll"><radio :checked="allChoose" color="#ff3673" style="transform: scale(.8);"/><text>全选</text></label> <label class="disac" @tap="chooseAll"><radio :checked="allChoose" color="#ff3673" style="transform: scale(.8);"/><text>全选</text></label>
<view class="disac"> <view class="disac">

View File

@ -13,7 +13,7 @@
</view> </view>
<!-- 下划线 --> <!-- 下划线 -->
<view class="tab__line" <view class="tab__line"
:style="{background: lineColor, width: lineStyle.width, transform: lineStyle.transform,transitionDuration: lineStyle.transitionDuration}"> :style="{background: lineColor, width: lineStyle.width, transform: lineStyle.transform}">
</view> </view>
</scroll-view> </scroll-view>
</view> </view>

View File

@ -7,8 +7,18 @@ const goLogin = () => {
} }
let flag = true; let flag = true;
// 刷新token并跳转到当前页面 // 刷新token并跳转到当前页面
var authTimer = null;
const refreshTokenPage = () => { const refreshTokenPage = () => {
clearTimeout(authTimer);
uni.showToast({
title: `请授权登录`,
icon:'none',
duration: 1000
});
authTimer = setTimeout(()=>{
uni.reLaunch({url:'/pagesB/login/login'});
},1000)
flag = true;
} }
// 请求错误处理 // 请求错误处理
const checkError = (e) => { const checkError = (e) => {

View File

@ -106,13 +106,13 @@
methods: { methods: {
getUserInfo(){ getUserInfo(){
this.$requst.get('/api/user/info').then(res=>{ this.$requst.get('/api/user/info').then(res=>{
console.log(res,'用户信息')
if(res.code==0) { if(res.code==0) {
this.userImg = res.data.headimgurl; this.userImg = res.data.headimgurl;
this.userName = res.data.nickname; this.userName = res.data.nickname;
this.list[0].num = res.data.order_count.order_placed; this.list[0].num = res.data.order_count.order_placed;
this.list[1].num = res.data.order_count.makeing; this.list[1].num = res.data.order_count.makeing;
this.list[2].num = res.data.order_count.shipped; this.list[2].num = res.data.order_count.shipped;
} }
}) })
}, },

View File

@ -149,7 +149,7 @@
is_active:1 is_active:1
} }
this.$requst.post('/api/user/login',params).then(res => { this.$requst.post('/api/user/login',params).then(res => {
if(res.data.token!=''){ if(res.code == 0){
uni.setStorageSync('userId',res.data.account_id) uni.setStorageSync('userId',res.data.account_id)
uni.setStorageSync('token',res.data.token)//token uni.setStorageSync('token',res.data.token)//token
uni.setStorageSync('openid',res.data.openid)//openid uni.setStorageSync('openid',res.data.openid)//openid

View File

@ -51,7 +51,21 @@
onLoad() { onLoad() {
console.log(uni.getStorageSync('buyList'),'缓存数组') console.log(uni.getStorageSync('buyList'),'缓存数组')
}, },
onShow() {
this.getUserInfo()
},
methods: { methods: {
//
getUserInfo(){
this.$requst.get('/api/user/info').then(res=>{
console.log(res,'用户信息')
if(res.code==0) {
this.address = res.data.address; //
this.name = res.data.contacts; //
this.phone = res.data.mobile; //
}
})
},
// //
submit(){ submit(){
if(this.checkEmpty() && this.flag){ if(this.checkEmpty() && this.flag){