gdpao #82
@ -125,7 +125,7 @@
|
|||||||
<u-popup v-model="showExpress" mode="center" border-radius="10" class="delivery-popup">
|
<u-popup v-model="showExpress" mode="center" border-radius="10" class="delivery-popup">
|
||||||
<view class="title">填写快递单号</view>
|
<view class="title">填写快递单号</view>
|
||||||
<view class="input-info"><input type="text" style="color: #333; line-height: 1;" placeholder="请输入快递单号" v-model="pushid" /></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>
|
||||||
<u-popup v-model="showRefunds" mode="center" border-radius="10" class="refunds-popup">
|
<u-popup v-model="showRefunds" mode="center" border-radius="10" class="refunds-popup">
|
||||||
<view v-if="cur == 1" class="popup-tips">
|
<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() {
|
cancel() {
|
||||||
this.showRefunds = false;
|
this.showRefunds = false;
|
||||||
|
@ -89,6 +89,7 @@ export default {
|
|||||||
loading() {},
|
loading() {},
|
||||||
logins() {
|
logins() {
|
||||||
// 判断是否可以点击
|
// 判断是否可以点击
|
||||||
|
console.log(this.zhanghao);
|
||||||
if(this.clickstate==false){
|
if(this.clickstate==false){
|
||||||
this.clickstate=true
|
this.clickstate=true
|
||||||
}else{
|
}else{
|
||||||
|
@ -23,11 +23,15 @@
|
|||||||
<text>骑手投诉</text>
|
<text>骑手投诉</text>
|
||||||
<image src="/static/image/user/1.png"></image>
|
<image src="/static/image/user/1.png"></image>
|
||||||
</view>
|
</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>
|
<text>退出登录</text>
|
||||||
<image src="/static/image/user/1.png"></image>
|
<image src="/static/image/user/1.png"></image>
|
||||||
</view>
|
</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" />
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -37,17 +41,72 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
info:{},
|
info:{},
|
||||||
is_loginout: false,
|
isLoginOut: false,
|
||||||
content: "是否退出登录?",
|
content: "是否退出登录?",
|
||||||
num:0
|
num:0,
|
||||||
|
fileSizeString: "", // 缓存大小
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
isLoginOut() {
|
||||||
|
// console.log(this.isLoginOut);
|
||||||
|
if (this.isLoginOut) {
|
||||||
|
uni.hideTabBar();
|
||||||
|
} else {
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.showTabBar();
|
||||||
|
},200)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
this.getCache();
|
||||||
|
console.log(222);
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getmyinfo()
|
this.getmyinfo()
|
||||||
},
|
},
|
||||||
methods: {
|
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(){
|
loginOut(){
|
||||||
uni.clearStorage();
|
uni.clearStorage();
|
||||||
|
@ -19,6 +19,10 @@
|
|||||||
<text>内容管理</text>
|
<text>内容管理</text>
|
||||||
<image src="/static/image/user/1.png"></image>
|
<image src="/static/image/user/1.png"></image>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="nav" @click="clearCache">
|
||||||
|
<text>清除缓存</text>
|
||||||
|
<text>{{ fileSizeString }}</text>
|
||||||
|
</view>
|
||||||
<view class="nav" @click="is_loginout = true">
|
<view class="nav" @click="is_loginout = true">
|
||||||
<text>退出登录</text>
|
<text>退出登录</text>
|
||||||
<image src="/static/image/user/1.png"></image>
|
<image src="/static/image/user/1.png"></image>
|
||||||
@ -55,22 +59,65 @@ export default {
|
|||||||
name:"user",
|
name:"user",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
publishstate:false,
|
publishstate: false,
|
||||||
is_loginout: false,
|
is_loginout: false,
|
||||||
content: "是否退出登录?",
|
content: "是否退出登录?",
|
||||||
info:{},
|
info:{},
|
||||||
|
fileSizeString: "", // 缓存大小
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow(){
|
onShow(){
|
||||||
this.getmyinfo()
|
this.getmyinfo()
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
this.getCache();
|
||||||
const user = uni.getStorageSync('userinfo');
|
const user = uni.getStorageSync('userinfo');
|
||||||
console.log(user)
|
console.log(user)
|
||||||
this.imService.login(user.userId,user.member_nickname,user.member_avatar)
|
this.imService.login(user.userId,user.member_nickname,user.member_avatar)
|
||||||
this.imService.connectIM()
|
this.imService.connectIM()
|
||||||
},
|
},
|
||||||
methods: {
|
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(){
|
loginOut(){
|
||||||
this.imService.disconnect();
|
this.imService.disconnect();
|
||||||
uni.clearStorage();
|
uni.clearStorage();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user