diff --git a/common/http.api.js b/common/http.api.js
index c6963bd..07fc4a2 100644
--- a/common/http.api.js
+++ b/common/http.api.js
@@ -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})
},
@@ -137,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})
@@ -146,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)下
diff --git a/pages/index/details.vue b/pages/index/details.vue
index 73d8b2f..9f1dc4a 100644
--- a/pages/index/details.vue
+++ b/pages/index/details.vue
@@ -52,6 +52,13 @@
派送方式
{{ cur == 0 ? "快递" : cur == 1 ? "骑手" : "自提" }}
+
+
+ 开具发票
+
+ {{ is_invoice ? "是" : "否" }}
+
+
@@ -148,6 +155,42 @@
确定
+
+
+ 发票信息
+
+
+
+
+ 发票抬头:
+ {{ invoiceList.invoice_title }}
+
+
+ 税号:
+ {{ invoiceList.invoice_code }}
+
+
+ 单位地址:
+ {{ invoiceList.invoice_goto_addr }}
+
+
+ 电话号码:
+ {{ invoiceList.invoice_reg_mobphone }}
+
+
+ 开户银行:
+ {{ invoiceList.invoice_reg_bname }}
+
+
+ 银行账户:
+ {{ invoiceList.invoice_reg_baccount }}
+
+
+ 省份证号:
+ 111
+
+
+
@@ -157,6 +200,7 @@ export default {
return {
status: 1, // 订单状态
cur: null,
+ show_invoice: false, // 发票
showDelivery: false, // 填写骑手信息
showExpress: false, // 填写快递单号
showRefunds: false, // 平台退货处理
@@ -186,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) {
@@ -271,6 +318,14 @@ export default {
}
});
},
+ // 查询物流
+ getcarinfo() {
+ this.$u.api.getcarinfo({
+ order_id: this.orderid
+ }).then(res => {
+ console.log(res);
+ })
+ },
// 保存订单号
saveDelivery() {
if (!this.pushid) {
@@ -437,6 +492,12 @@ export default {
})
}
},
+ // 显示发票
+ showInvoice() {
+ if (this.is_invoice) {
+ this.show_invoice = true;
+ }
+ },
// 选择骑手
getselect(e) {
this.selctcar = this.list[e[0].value];
@@ -455,6 +516,10 @@ 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 => {
@@ -591,6 +656,11 @@ export default {
font-size: 26rpx;
flex: 1;
}
+ .invoice {
+ margin-left: auto;
+ font-size: 26rpx;
+ color: #333;
+ }
image{
width: 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;
+ }
+ }
+ }
+ }
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index b2c0850..135bb5a 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -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,
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 0634d29..124f1c4 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -11,10 +11,10 @@
商家登录
- 达人登录
+ 商家达人
- 平台达人登录
+ 平台达人
@@ -45,7 +45,9 @@
- 获取验证码
+
+ {{ is_sendcode ? time_count + "后可以重新发送" : "发送验证码" }}
+
@@ -77,7 +79,11 @@ export default {
phone: "",
code: "",
state:0,
- clickstate:false
+ clickstate:false,
+ // 时间
+ timer: null,
+ is_sendcode: false, // 60s
+ time_count: 60,
};
},
methods: {
@@ -98,10 +104,30 @@ 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);
@@ -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 => {
console.log(JSON.stringify(res))
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(){
return;
}
@@ -267,9 +341,10 @@ export default {
}
.get-code {
- width: 250rpx !important;
+ width: auto !important;
height: 60rpx !important;
- font-size: 30rpx !important;
+ padding: 0 30rpx !important;
+ font-size: 24rpx !important;
line-height: 60rpx !important;
color: #fff !important;
border: none !important;