Compare commits
15 Commits
0619bbd901
...
539309b370
Author | SHA1 | Date | |
---|---|---|---|
539309b370 | |||
|
0824d97080 | ||
b98baa39aa | |||
60cb9294fc | |||
c4114bcfc5 | |||
|
f2e3427260 | ||
dbf18d4091 | |||
|
7d066ca67d | ||
22901579b9 | |||
|
3ecaac3190 | ||
|
c5b3505dcd | ||
b9eceb6ecf | |||
5017534a24 | |||
2f103eafbe | |||
721087e372 |
@ -77,7 +77,6 @@ const install = (Vue, vm) => {
|
||||
return vm.$u.post("/Takeawayer/tryOrderSnList")
|
||||
},
|
||||
// 投诉骑手
|
||||
|
||||
reportorder({order_id,takeawayer_id,order_list,content}){
|
||||
return vm.$u.post("/takeawayer/complaintTakeawayer",{order_id,takeawayer_id,order_list,content})
|
||||
},
|
||||
@ -121,6 +120,10 @@ const install = (Vue, vm) => {
|
||||
bindcarer({order_id,takeawayer_id}){
|
||||
return vm.$u.post("/order/orderRider",{order_id,takeawayer_id})
|
||||
},
|
||||
// 自提
|
||||
bindmention({shipping_express_id,deliver_explain,order_id,sendimg}) {
|
||||
return vm.$u.post("/order/send",{shipping_express_id,deliver_explain,order_id,sendimg})
|
||||
},
|
||||
// 发货物流公司
|
||||
pushcompany(){
|
||||
return vm.$u.post("/order/getExpress")
|
||||
@ -133,6 +136,10 @@ const install = (Vue, vm) => {
|
||||
agreetest({goods_try_id,type,takeawayer_id}){
|
||||
return vm.$u.post("/order/goodsTryAgree",{goods_try_id,type,takeawayer_id})
|
||||
},
|
||||
// 物流
|
||||
getcarinfo({order_id}) {
|
||||
return vm.$u.post("/Order/orderLogistics",{order_id})
|
||||
},
|
||||
|
||||
messageList({page = 1}){
|
||||
return vm.$u.post("/message/messageList",{page})
|
||||
@ -142,7 +149,15 @@ const install = (Vue, vm) => {
|
||||
},
|
||||
messageInfo({id}){
|
||||
return vm.$u.post("/message/messageInfo",{id})
|
||||
}
|
||||
},
|
||||
// 达人验证码
|
||||
getCode({member_mobile,smslog_type=2}) {
|
||||
return vm.$u.post("/Sms/sendSmsCode",{member_mobile,smslog_type})
|
||||
},
|
||||
// 达人登录
|
||||
starLogin({member_mobile,sms_code}) {
|
||||
return vm.$u.post("/Login/platformExpertPhoneLogin",{member_mobile,sms_code})
|
||||
}
|
||||
|
||||
}
|
||||
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
|
||||
|
@ -273,7 +273,13 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
,{
|
||||
"path" : "pages/index/mention",
|
||||
"style" : {
|
||||
"navigationBarTitleText": "上传凭证"
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "uni-app",
|
||||
|
@ -49,6 +49,17 @@
|
||||
<view class="title">收货地址</view>
|
||||
<view class="value u-line-1">{{ info.extend_order_common.reciver_info.address }}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="title">派送方式</view>
|
||||
<view class="value u-line-1">{{ cur == 0 ? "快递" : cur == 1 ? "骑手" : "自提" }}</view>
|
||||
</view>
|
||||
<view @click="showInvoice">
|
||||
<view class="title">开具发票</view>
|
||||
<view class="invoice">
|
||||
<text>{{ is_invoice ? "是" : "否" }}</text>
|
||||
<u-icon name="arrow-right" color="#999" size="20" style="margin-left: 10rpx;"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 待处理之后的 -->
|
||||
@ -74,6 +85,7 @@
|
||||
<view class="methods">
|
||||
<view :class="{ active: cur == 0 }" @click="pushstyleA">快递</view>
|
||||
<view :class="{ active: cur == 1 }" @click="pushstyleB">骑手</view>
|
||||
<view :class="{ active: cur == 2 }" @click="pushstyleC">自提</view>
|
||||
</view>
|
||||
<view v-if="cur != 2 && (pushid || selctcar)">
|
||||
<view class="title">{{cur == 0 ? '快递单号':'骑手信息'}}</view>
|
||||
@ -122,10 +134,10 @@
|
||||
title="请选择公司"
|
||||
confirm-text="下一步"
|
||||
></u-picker>
|
||||
<u-popup v-model="showExpress" mode="center" border-radius="10" class="delivery-popup">
|
||||
<u-popup v-model="showExpress" :mask-close-able="false" 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">
|
||||
@ -143,6 +155,42 @@
|
||||
<view class="determine" @click="confirm">确定</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-popup class="invoice-box" v-model="show_invoice" :mask-close-able="false" mode="center" length="540rpx" border-radius="10">
|
||||
<view class="title">
|
||||
<text>发票信息</text>
|
||||
<u-icon class="close" name="close" @click="show_invoice=false"></u-icon>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view>
|
||||
<text>发票抬头:</text>
|
||||
<text>{{ invoiceList.invoice_title }}</text>
|
||||
</view>
|
||||
<view v-if="invoice_type!=2">
|
||||
<text>税号:</text>
|
||||
<text>{{ invoiceList.invoice_code }}</text>
|
||||
</view>
|
||||
<view v-if="invoice_type!=2">
|
||||
<text>单位地址:</text>
|
||||
<view class="u-line-2">{{ invoiceList.invoice_goto_addr }}</view>
|
||||
</view>
|
||||
<view>
|
||||
<text>电话号码:</text>
|
||||
<text>{{ invoiceList.invoice_reg_mobphone }}</text>
|
||||
</view>
|
||||
<view v-if="invoice_type!=2">
|
||||
<text>开户银行:</text>
|
||||
<text>{{ invoiceList.invoice_reg_bname }}</text>
|
||||
</view>
|
||||
<view v-if="invoice_type!=2">
|
||||
<text>银行账户:</text>
|
||||
<text>{{ invoiceList.invoice_reg_baccount }}</text>
|
||||
</view>
|
||||
<view v-if="invoice_type==2">
|
||||
<text>省份证号:</text>
|
||||
<text>111</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
@ -151,7 +199,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
status: 1, // 订单状态
|
||||
cur: 2,
|
||||
cur: null,
|
||||
show_invoice: false, // 发票
|
||||
showDelivery: false, // 填写骑手信息
|
||||
showExpress: false, // 填写快递单号
|
||||
showRefunds: false, // 平台退货处理
|
||||
@ -181,7 +230,10 @@ export default {
|
||||
companyidA: null, //物流派送公司id
|
||||
companyidB: null, //骑手派送公司id
|
||||
value:"",
|
||||
refundid:null
|
||||
refundid:null,
|
||||
is_invoice: 0, // 判断发票
|
||||
invoice_type: null,
|
||||
invoiceList: {}, // 发票数据
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
@ -252,6 +304,10 @@ export default {
|
||||
this.cur = 1;
|
||||
this.show = true;
|
||||
},
|
||||
// 选择骑手
|
||||
pushstyleC() {
|
||||
this.cur = 2;
|
||||
},
|
||||
// 获取物流公司列表
|
||||
getcompanyinfo() {
|
||||
let that = this;
|
||||
@ -262,6 +318,25 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查询物流
|
||||
getcarinfo() {
|
||||
this.$u.api.getcarinfo({
|
||||
order_id: this.orderid
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
})
|
||||
},
|
||||
// 保存订单号
|
||||
saveDelivery() {
|
||||
if (!this.pushid) {
|
||||
uni.showToast({
|
||||
title: "请填写快递单号!",
|
||||
icon: "none"
|
||||
})
|
||||
return
|
||||
}
|
||||
this.showExpress = false;
|
||||
},
|
||||
// 取消退款
|
||||
cancel() {
|
||||
this.showRefunds = false;
|
||||
@ -346,8 +421,8 @@ export default {
|
||||
},
|
||||
// 绑定配送方式
|
||||
confirmpushstyle() {
|
||||
console.log(this.cur);
|
||||
if (this.cur != 0 && this.cur != 1) {
|
||||
// console.log(this.cur);
|
||||
if (this.cur < 0) {
|
||||
this.$refs.uToast.show({
|
||||
title: '请选择派送方式!',
|
||||
type: 'warning ',
|
||||
@ -362,7 +437,7 @@ export default {
|
||||
})
|
||||
return;
|
||||
}
|
||||
console.log(this.pushid);
|
||||
// console.log(this.pushid);
|
||||
this.$u.api.bindpushid({
|
||||
order_id: this.orderid,
|
||||
shipping_code: this.pushid,
|
||||
@ -383,7 +458,7 @@ export default {
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
} else if (this.cur == 1) {
|
||||
if (!this.selctcar) {
|
||||
this.$refs.uToast.show({
|
||||
title: '请选择派送方式!',
|
||||
@ -411,8 +486,18 @@ export default {
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "mention?id=" + this.orderid
|
||||
})
|
||||
}
|
||||
},
|
||||
// 显示发票
|
||||
showInvoice() {
|
||||
if (this.is_invoice) {
|
||||
this.show_invoice = true;
|
||||
}
|
||||
},
|
||||
// 选择骑手
|
||||
getselect(e) {
|
||||
this.selctcar = this.list[e[0].value];
|
||||
@ -430,6 +515,11 @@ export default {
|
||||
});
|
||||
} else {
|
||||
this.info = res.data;
|
||||
this.cur = res.data.is_selfraising;
|
||||
this.invoiceList = res.data.extend_order_common.invoice_info;
|
||||
this.is_invoice = this.invoiceList.invoice_id || false;
|
||||
this.invoice_type = this.invoiceList.invoice_type;
|
||||
// console.log(this.invoiceList,this.is_invoice,this.invoice_type);
|
||||
}
|
||||
});
|
||||
this.$u.api.takeawayerlist({}).then(res => {
|
||||
@ -566,6 +656,11 @@ export default {
|
||||
font-size: 26rpx;
|
||||
flex: 1;
|
||||
}
|
||||
.invoice {
|
||||
margin-left: auto;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
}
|
||||
image{
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
@ -587,10 +682,11 @@ export default {
|
||||
.methods {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
> view {
|
||||
font-size: 30rpx;
|
||||
color: rgba(0, 0, 51, 1);
|
||||
width: 335rpx;
|
||||
width: 30%;
|
||||
height: 80rpx;
|
||||
border: 1rpx solid rgba(236, 236, 236, 1);
|
||||
background: rgba(236, 236, 236, 1);
|
||||
@ -598,9 +694,6 @@ export default {
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
margin-bottom: 20rpx;
|
||||
&:nth-child(2n-1) {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
.active {
|
||||
border: 1rpx solid #ff780f;
|
||||
@ -636,6 +729,7 @@ export default {
|
||||
color: rgba(51, 51, 51, 1);
|
||||
}
|
||||
.timelineid {
|
||||
margin: 18rpx 0;
|
||||
min-height: 40rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
@ -742,5 +836,35 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.invoice-box {
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
padding: 20rpx 20rpx 0 20rpx;
|
||||
text-align: center;
|
||||
.close {
|
||||
margin-left: 180rpx;
|
||||
}
|
||||
}
|
||||
.info {
|
||||
padding: 30rpx;
|
||||
& > view {
|
||||
display: flex;
|
||||
margin: 10rpx 0;
|
||||
& > text:first-child {
|
||||
flex-shrink: 0;
|
||||
width: 140rpx !important;
|
||||
text-align: right;
|
||||
}
|
||||
& > text:last-child {
|
||||
width: 320rpx !important;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -294,7 +294,7 @@ export default {
|
||||
getshiftlist() {
|
||||
let that = this;
|
||||
this.$u.api.getshiftlist({}).then(res => {
|
||||
console.log(JSON.stringify(res));
|
||||
// console.log(JSON.stringify(res));
|
||||
if (res.errCode != 0) {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
|
146
pages/index/mention.vue
Normal file
146
pages/index/mention.vue
Normal file
@ -0,0 +1,146 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="upload">
|
||||
<view class="title">
|
||||
<text>上传凭证</text>
|
||||
<text class="tips">(仅可上传1张凭证)</text>
|
||||
</view>
|
||||
<u-upload class="upload-box" :form-data="coverformdata" upload-text="" :action="action" :header="header" name="common" :max-count="1" @on-success="uploadSuc"></u-upload>
|
||||
</view>
|
||||
<view class="remarks">
|
||||
<view>备注:</view>
|
||||
<textarea class="textarea-box" v-model="textareaVal" placeholder="请输入内容..." placeholder-class="placeholder-style" />
|
||||
</view>
|
||||
<u-button class="btn-submit" @click="submitInfo">提交</u-button>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
action: "https://mall.dmygkeji.com/api/Upload/uploadfile",
|
||||
coverformdata: {
|
||||
name: 'common'
|
||||
},
|
||||
img_url: "", // 图片路径
|
||||
textareaVal: "", // 备注
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
// console.log(option);
|
||||
this.order_id = option.id;
|
||||
},
|
||||
methods: {
|
||||
// 上传成功
|
||||
uploadSuc(e) {
|
||||
if (e.errCode == 0) {
|
||||
this.$refs.uToast.show({
|
||||
title: e.message,
|
||||
type: "success"
|
||||
})
|
||||
// console.log(e.data);
|
||||
this.img_url = e.data.file_path;
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: e.message,
|
||||
})
|
||||
}
|
||||
},
|
||||
// 自提提交
|
||||
submitInfo() {
|
||||
if (!this.img_url) {
|
||||
this.$refs.uToast.show({
|
||||
title: "请上传凭证!",
|
||||
type: "warning"
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (!this.$u.trim(this.textareaVal)) {
|
||||
this.$refs.uToast.show({
|
||||
title: "请填写备注!",
|
||||
type: "warning"
|
||||
})
|
||||
return;
|
||||
}
|
||||
// 提交
|
||||
this.$u.api.bindmention({
|
||||
shipping_express_id: "e1000",
|
||||
deliver_explain: this.textareaVal,
|
||||
order_id: this.order_id,
|
||||
sendimg: this.img_url,
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if (res.errCode == 0) {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: "success",
|
||||
isTab: "true",
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: "warning"
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.container {
|
||||
padding: 30rpx;
|
||||
}
|
||||
::v-deep.uicon-plus {
|
||||
font-size: 50rpx !important;
|
||||
}
|
||||
.upload {
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
.tips {
|
||||
font-size: 20rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
.upload-box {
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
}
|
||||
.remarks {
|
||||
.textarea-box {
|
||||
width: calc(100% - 42rpx);
|
||||
padding: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
border-radius: 10rpx;
|
||||
border: 1px solid #BABABA;
|
||||
}
|
||||
.placeholder-style {
|
||||
color: #999;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
.btn-submit {
|
||||
width: 690rpx;
|
||||
height: 98rpx !important;
|
||||
margin-top: 70rpx;
|
||||
font-size: 36rpx !important;
|
||||
text-align: center;
|
||||
line-height: 98rpx !important;
|
||||
color: #fff !important;
|
||||
border-radius: 50rpx;
|
||||
background-color: #FF780F !important;
|
||||
}
|
||||
</style>
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<!-- login页面 -->
|
||||
<view>
|
||||
<view class="login">
|
||||
<view class="login" @touchmove.stop.prevent="moveHandle">
|
||||
<!-- <image class="images" :src="url"></image> -->
|
||||
<view class="backes"></view>
|
||||
<view class="title_top">德铭阳光在线-商家端</view>
|
||||
@ -11,8 +11,11 @@
|
||||
商家登录
|
||||
</view>
|
||||
<view v-bind:class="[state==1 ? 'show' : '']" @click="changetab(1)">
|
||||
达人登录
|
||||
商家达人
|
||||
</view>
|
||||
<view v-bind:class="[state==2 ? 'show' : '']" @click="changetab(2)">
|
||||
平台达人
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-if="state==0">
|
||||
<view class="labales">
|
||||
@ -24,7 +27,7 @@
|
||||
<input v-model="mima" type="password" placeholder="请输入密码" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
<view class="" v-else-if="state==1">
|
||||
<view class="labales">
|
||||
<image src="../../static/image/login/login(3).png"></image>
|
||||
<input v-model="zhanghaoA" type="text" placeholder="请输入账号" />
|
||||
@ -34,10 +37,22 @@
|
||||
<input v-model="mimaA" type="password" placeholder="请输入密码" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-else>
|
||||
<view class="labales">
|
||||
<image src="../../static/image/login/login(3).png"></image>
|
||||
<input v-model="phone" type="number" maxlength="11" placeholder="请输入手机号" />
|
||||
</view>
|
||||
<view class="labales">
|
||||
<image src="../../static/image/login/safe.png"></image>
|
||||
<input v-model="code" type="number" placeholder="请输入验证码" />
|
||||
<u-button class="get-code" :class=" is_sendcode ? 'stopClick' : '' " :disabled="is_sendcode" @click="getCode">
|
||||
{{ is_sendcode ? time_count + "后可以重新发送" : "发送验证码" }}
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- denglu QQ weixin -->
|
||||
<button @click="logins">{{ login }}</button>
|
||||
<button @click="logins">{{ login }}</button>
|
||||
<!-- <u-button :custom-style="customStyle" ></u-button> -->
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
@ -61,8 +76,14 @@ export default {
|
||||
zhanghaoA: '',
|
||||
mimaA: '',
|
||||
url: '',
|
||||
phone: "",
|
||||
code: "",
|
||||
state:0,
|
||||
clickstate:false
|
||||
clickstate:false,
|
||||
// 时间
|
||||
timer: null,
|
||||
is_sendcode: false, // 60s
|
||||
time_count: 60,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@ -83,12 +104,33 @@ export default {
|
||||
},
|
||||
// 获取验证码倒计时
|
||||
getCode() {
|
||||
console.log('11');
|
||||
this.loading();
|
||||
if (!this.$u.test.mobile(this.phone)) {
|
||||
this.$refs.uToast.show({
|
||||
title: '手机号码有误!',
|
||||
})
|
||||
return;
|
||||
}
|
||||
this.$u.api.getCode({
|
||||
member_mobile: this.phone,
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if (res.errCode == 0) {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: 'success',
|
||||
})
|
||||
this.getSendCode();
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: "warning"
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
loading() {},
|
||||
logins() {
|
||||
// 判断是否可以点击
|
||||
// console.log(this.zhanghao);
|
||||
if(this.clickstate==false){
|
||||
this.clickstate=true
|
||||
}else{
|
||||
@ -121,7 +163,38 @@ export default {
|
||||
});
|
||||
}
|
||||
});
|
||||
}else{
|
||||
} if (this.state == 2) {
|
||||
if (!this.$u.test.mobile(this.phone)) {
|
||||
this.$refs.uToast.show({
|
||||
title: '手机号码有误!',
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (this.code.length < 4) {}
|
||||
this.$u.api.starLogin({
|
||||
member_mobile: this.phone,
|
||||
sms_code: this.code,
|
||||
}).then(res => {
|
||||
if (res.errCode == 0) {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: 'success',
|
||||
})
|
||||
uni.setStorageSync('token', res.data.token);
|
||||
uni.setStorageSync('userinfo', res.data);
|
||||
uni.setStorageSync('rongyun', res.data.rongcloud_token);
|
||||
this.$u.route({
|
||||
url: '/pages/user/myinfo',
|
||||
type:"redirect"
|
||||
});
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: "warning"
|
||||
})
|
||||
}
|
||||
})
|
||||
} else{
|
||||
this.$u.api.shoplogin({ member_name: this.zhanghao, member_password: this.mima }).then(res => {
|
||||
console.log(JSON.stringify(res))
|
||||
if (res.errCode != 0) {
|
||||
@ -142,8 +215,27 @@ export default {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
// 60s
|
||||
getSendCode() {
|
||||
const TIME_COUNT = 60;
|
||||
if (!this.timer) {
|
||||
this.time_count = TIME_COUNT;
|
||||
this.is_sendcode = true;
|
||||
this.timer = setInterval(() => {
|
||||
if (this.time_count > 0 && this.time_count <= TIME_COUNT) {
|
||||
this.time_count--;
|
||||
} else {
|
||||
this.is_sendcode = false;
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
moveHandle(){
|
||||
return;
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
let token = uni.getStorageSync('token');
|
||||
@ -170,6 +262,7 @@ export default {
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: -1;/*-1 可以当背景*/
|
||||
transform: scale(1.1);
|
||||
-webkit-filter: blur(3px);
|
||||
filter: blur(3px);
|
||||
}
|
||||
@ -246,27 +339,39 @@ export default {
|
||||
.labales text {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.get-code {
|
||||
width: auto !important;
|
||||
height: 60rpx !important;
|
||||
padding: 0 30rpx !important;
|
||||
font-size: 24rpx !important;
|
||||
line-height: 60rpx !important;
|
||||
color: #fff !important;
|
||||
border: none !important;
|
||||
border-radius: 10rpx !important;
|
||||
&::after {
|
||||
border: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.labales {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 90rpx;
|
||||
margin-bottom: 160rpx;
|
||||
line-height: 90rpx;
|
||||
border-bottom: 1px #fff solid;
|
||||
margin-bottom: 180rpx;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
position: relative;
|
||||
input {
|
||||
width: 80%;
|
||||
margin-left: 60rpx;
|
||||
margin-left: 30rpx;
|
||||
color: #fff;
|
||||
letter-spacing: 2rpx;
|
||||
background-color: none;
|
||||
}
|
||||
}
|
||||
.labales image {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 39rpx;
|
||||
flex-shrink: 0;
|
||||
width: 38rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
.labales:nth-child(3) {
|
||||
|
@ -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();
|
||||
|
@ -23,6 +23,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>
|
||||
@ -59,28 +63,70 @@ 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
|
||||
},
|
||||
navtos(){
|
||||
console.log(1212)
|
||||
this.$u.route({
|
||||
url:"/pages/messages/list"
|
||||
})
|
||||
},
|
||||
// 退出登录
|
||||
loginOut(){
|
||||
this.imService.disconnect()
|
||||
uni.clearStorage();
|
||||
|
BIN
static/bg.png
BIN
static/bg.png
Binary file not shown.
Before Width: | Height: | Size: 908 KiB After Width: | Height: | Size: 341 KiB |
BIN
static/image/login/safe.png
Normal file
BIN
static/image/login/safe.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
Loading…
x
Reference in New Issue
Block a user