This commit is contained in:
Gdpao 2020-09-01 20:32:15 +08:00
parent 115400353f
commit c5b3505dcd
4 changed files with 124 additions and 6 deletions

View File

@ -125,7 +125,7 @@
<u-popup v-model="showExpress" mode="center" border-radius="10" class="delivery-popup">
<view class="title">填写快递单号</view>
<view class="input-info"><input type="text" style="color: #333; line-height: 1;" placeholder="请输入快递单号" v-model="pushid" /></view>
<view class="btn" @click="showExpress = false">确认</view>
<view class="btn" @click="saveDelivery">确认</view>
</u-popup>
<u-popup v-model="showRefunds" mode="center" border-radius="10" class="refunds-popup">
<view v-if="cur == 1" class="popup-tips">
@ -262,6 +262,17 @@ export default {
}
});
},
//
saveDelivery() {
if (!this.pushid) {
uni.showToast({
title: "请填写快递单号!",
icon: "none"
})
return
}
this.showExpress = false;
},
// 退
cancel() {
this.showRefunds = false;

View File

@ -89,6 +89,7 @@ export default {
loading() {},
logins() {
//
console.log(this.zhanghao);
if(this.clickstate==false){
this.clickstate=true
}else{

View File

@ -23,11 +23,15 @@
<text>骑手投诉</text>
<image src="/static/image/user/1.png"></image>
</view>
<view class="nav" @click="is_loginout = true">
<view class="nav" @click="clearCache">
<text>清除缓存</text>
<text>{{ fileSizeString }}</text>
</view>
<view class="nav" @click="isLoginOut = true">
<text>退出登录</text>
<image src="/static/image/user/1.png"></image>
</view>
<u-modal v-model="is_loginout" show-confirm-button show-cancel-button :content="content" @confirm="loginOut"></u-modal>
<u-modal v-model="isLoginOut" show-confirm-button show-cancel-button :content="content" @confirm="loginOut"></u-modal>
<u-toast ref="uToast" />
</view>
</template>
@ -37,17 +41,72 @@ export default {
data() {
return {
info:{},
is_loginout: false,
isLoginOut: false,
content: "是否退出登录?",
num:0
num:0,
fileSizeString: "", //
}
},
watch: {
isLoginOut() {
// console.log(this.isLoginOut);
if (this.isLoginOut) {
uni.hideTabBar();
} else {
setTimeout(function() {
uni.showTabBar();
},200)
}
}
},
onLoad() {
this.getCache();
console.log(222);
},
onShow() {
this.getmyinfo()
},
methods: {
//
getCache() {
let _this = this;
// #ifdef APP-PLUS
plus.cache.calculate(function(size) {
console.log(size);
let sizeCache = size;
if (sizeCache == 0) {
_this.fileSizeString = "0B";
} else if (sizeCache < 1024) {
_this.fileSizeString = sizeCache + "B";
} else if (sizeCache < 1048576) {
_this.fileSizeString = (sizeCache / 1024).toFixed(2) + "KB";
} else if (sizeCache < 1073741824) {
_this.fileSizeString = (sizeCache / 1048576).toFixed(2) + "MB";
} else {
_this.fileSizeString = (sizeCache / 1073741824).toFixed(2) + "GB";
}
});
// #endif
},
//
clearCache() {
// #ifdef APP-PLUS
uni.showModal({
title: "确定要清理缓存吗?",
cancelColor: "#999",
confirmColor: "#f00",
success: (res) => {
// console.log(res);
if (res.confirm) {
plus.cache.clear(function(e) {
console.log(e);
})
}
this.getCache();
}
})
// #endif
},
// 退
loginOut(){
uni.clearStorage();

View File

@ -19,6 +19,10 @@
<text>内容管理</text>
<image src="/static/image/user/1.png"></image>
</view>
<view class="nav" @click="clearCache">
<text>清除缓存</text>
<text>{{ fileSizeString }}</text>
</view>
<view class="nav" @click="is_loginout = true">
<text>退出登录</text>
<image src="/static/image/user/1.png"></image>
@ -55,22 +59,65 @@ export default {
name:"user",
data() {
return {
publishstate:false,
publishstate: false,
is_loginout: false,
content: "是否退出登录?",
info:{},
fileSizeString: "", //
}
},
onShow(){
this.getmyinfo()
},
onLoad() {
this.getCache();
const user = uni.getStorageSync('userinfo');
console.log(user)
this.imService.login(user.userId,user.member_nickname,user.member_avatar)
this.imService.connectIM()
},
methods: {
//
getCache() {
let _this = this;
// #ifdef APP-PLUS
plus.cache.calculate(function(size) {
console.log(size);
let sizeCache = size;
if (sizeCache == 0) {
_this.fileSizeString = "0B";
} else if (sizeCache < 1024) {
_this.fileSizeString = sizeCache + "B";
} else if (sizeCache < 1048576) {
_this.fileSizeString = (sizeCache / 1024).toFixed(2) + "KB";
} else if (sizeCache < 1073741824) {
_this.fileSizeString = (sizeCache / 1048576).toFixed(2) + "MB";
} else {
_this.fileSizeString = (sizeCache / 1073741824).toFixed(2) + "GB";
}
});
// #endif
},
//
clearCache() {
// #ifdef APP-PLUS
uni.showModal({
title: "确定要清理缓存吗?",
cancelColor: "#999",
confirmColor: "#f00",
success: (res) => {
// console.log(res);
if (res.confirm) {
plus.cache.clear(function(e) {
console.log(e);
})
}
this.getCache();
}
})
// #endif
},
// 退
loginOut(){
this.imService.disconnect();
uni.clearStorage();