This commit is contained in:
Gdpao 2020-09-04 19:52:43 +08:00
parent c4114bcfc5
commit 0824d97080
4 changed files with 200 additions and 14 deletions

View File

@ -77,7 +77,6 @@ const install = (Vue, vm) => {
return vm.$u.post("/Takeawayer/tryOrderSnList") return vm.$u.post("/Takeawayer/tryOrderSnList")
}, },
// 投诉骑手 // 投诉骑手
reportorder({order_id,takeawayer_id,order_list,content}){ reportorder({order_id,takeawayer_id,order_list,content}){
return vm.$u.post("/takeawayer/complaintTakeawayer",{order_id,takeawayer_id,order_list,content}) return vm.$u.post("/takeawayer/complaintTakeawayer",{order_id,takeawayer_id,order_list,content})
}, },
@ -137,6 +136,10 @@ const install = (Vue, vm) => {
agreetest({goods_try_id,type,takeawayer_id}){ agreetest({goods_try_id,type,takeawayer_id}){
return vm.$u.post("/order/goodsTryAgree",{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}){ messageList({page = 1}){
return vm.$u.post("/message/messageList",{page}) return vm.$u.post("/message/messageList",{page})
@ -146,7 +149,15 @@ const install = (Vue, vm) => {
}, },
messageInfo({id}){ messageInfo({id}){
return vm.$u.post("/message/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)下 // 将各个定义的接口名称统一放进对象挂载到vm.$u.api(因为vm就是this也即this.$u.api)下

View File

@ -52,6 +52,13 @@
<view> <view>
<view class="title">派送方式</view> <view class="title">派送方式</view>
<view class="value u-line-1">{{ cur == 0 ? "快递" : cur == 1 ? "骑手" : "自提" }}</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> </view>
</view> </view>
@ -148,6 +155,42 @@
<view class="determine" @click="confirm">确定</view> <view class="determine" @click="confirm">确定</view>
</view> </view>
</u-popup> </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" /> <u-toast ref="uToast" />
</view> </view>
</template> </template>
@ -157,6 +200,7 @@ export default {
return { return {
status: 1, // status: 1, //
cur: null, cur: null,
show_invoice: false, //
showDelivery: false, // showDelivery: false, //
showExpress: false, // showExpress: false, //
showRefunds: false, // 退 showRefunds: false, // 退
@ -186,7 +230,10 @@ export default {
companyidA: null, //id companyidA: null, //id
companyidB: null, //id companyidB: null, //id
value:"", value:"",
refundid:null refundid:null,
is_invoice: 0, //
invoice_type: null,
invoiceList: {}, //
}; };
}, },
onLoad(option) { onLoad(option) {
@ -271,6 +318,14 @@ export default {
} }
}); });
}, },
//
getcarinfo() {
this.$u.api.getcarinfo({
order_id: this.orderid
}).then(res => {
console.log(res);
})
},
// //
saveDelivery() { saveDelivery() {
if (!this.pushid) { if (!this.pushid) {
@ -437,6 +492,12 @@ export default {
}) })
} }
}, },
//
showInvoice() {
if (this.is_invoice) {
this.show_invoice = true;
}
},
// //
getselect(e) { getselect(e) {
this.selctcar = this.list[e[0].value]; this.selctcar = this.list[e[0].value];
@ -455,6 +516,10 @@ export default {
} else { } else {
this.info = res.data; this.info = res.data;
this.cur = res.data.is_selfraising; 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 => { this.$u.api.takeawayerlist({}).then(res => {
@ -591,6 +656,11 @@ export default {
font-size: 26rpx; font-size: 26rpx;
flex: 1; flex: 1;
} }
.invoice {
margin-left: auto;
font-size: 26rpx;
color: #333;
}
image{ image{
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
@ -766,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> </style>

View File

@ -294,7 +294,7 @@ export default {
getshiftlist() { getshiftlist() {
let that = this; let that = this;
this.$u.api.getshiftlist({}).then(res => { this.$u.api.getshiftlist({}).then(res => {
console.log(JSON.stringify(res)); // console.log(JSON.stringify(res));
if (res.errCode != 0) { if (res.errCode != 0) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: res.message, title: res.message,

View File

@ -11,10 +11,10 @@
商家登录 商家登录
</view> </view>
<view v-bind:class="[state==1 ? 'show' : '']" @click="changetab(1)"> <view v-bind:class="[state==1 ? 'show' : '']" @click="changetab(1)">
达人登录 商家达人
</view> </view>
<view v-bind:class="[state==2 ? 'show' : '']" @click="changetab(2)"> <view v-bind:class="[state==2 ? 'show' : '']" @click="changetab(2)">
平台达人登录 平台达人
</view> </view>
</view> </view>
<view class="" v-if="state==0"> <view class="" v-if="state==0">
@ -45,7 +45,9 @@
<view class="labales"> <view class="labales">
<image src="../../static/image/login/safe.png"></image> <image src="../../static/image/login/safe.png"></image>
<input v-model="code" type="number" placeholder="请输入验证码" /> <input v-model="code" type="number" placeholder="请输入验证码" />
<u-button class="get-code">获取验证码</u-button> <u-button class="get-code" :class=" is_sendcode ? 'stopClick' : '' " :disabled="is_sendcode" @click="getCode">
{{ is_sendcode ? time_count + "后可以重新发送" : "发送验证码" }}
</u-button>
</view> </view>
</view> </view>
</view> </view>
@ -77,7 +79,11 @@ export default {
phone: "", phone: "",
code: "", code: "",
state:0, state:0,
clickstate:false clickstate:false,
//
timer: null,
is_sendcode: false, // 60s
time_count: 60,
}; };
}, },
methods: { methods: {
@ -98,10 +104,30 @@ export default {
}, },
// //
getCode() { getCode() {
console.log('11'); if (!this.$u.test.mobile(this.phone)) {
this.loading(); 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() { logins() {
// //
// console.log(this.zhanghao); // console.log(this.zhanghao);
@ -137,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 => { this.$u.api.shoplogin({ member_name: this.zhanghao, member_password: this.mima }).then(res => {
console.log(JSON.stringify(res)) console.log(JSON.stringify(res))
if (res.errCode != 0) { if (res.errCode != 0) {
@ -159,6 +216,23 @@ 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(){ moveHandle(){
return; return;
} }
@ -267,9 +341,10 @@ export default {
} }
.get-code { .get-code {
width: 250rpx !important; width: auto !important;
height: 60rpx !important; height: 60rpx !important;
font-size: 30rpx !important; padding: 0 30rpx !important;
font-size: 24rpx !important;
line-height: 60rpx !important; line-height: 60rpx !important;
color: #fff !important; color: #fff !important;
border: none !important; border: none !important;