Commit 7d20cf58 authored by fwz's avatar fwz

订单

parent f11d622a
...@@ -425,26 +425,34 @@ export default { ...@@ -425,26 +425,34 @@ export default {
this.selectBox[index].flag = true; this.selectBox[index].flag = true;
}, },
// 发送验证码 // 发送验证码
sendCode() { sendCode() {
var that = this; var that = this;
var setTime = 0; var setTime = 0;
if (!that.isSend) { if (!that.isSend) {
that.isSend = true; that.isSend = true;
setTime = setInterval(function () { setTime = setInterval(function () {
that.wait--; that.wait--;
that.sendColor = "color:#999"; that.sendColor = "color:#999";
that.codeFont = "已发送(" +that.wait +'s)' that.codeFont = "已发送(" +that.wait +'s)'
if (that.wait == 0) { if (that.wait == 0) {
clearInterval(setTime); clearInterval(setTime);
that.codeFont = "发送验证码"; that.codeFont = "发送验证码";
that.isSend = false; that.isSend = false;
that.wait = 60; that.wait = 60;
that.sendColor = "color:#ff5b01"; that.sendColor = "color:#ff5b01";
} }
}, 1000); }, 1000);
} }else{
}, ///app/smsCode/binding/{{phone}}
}, let opts = { url: '/app/smsCode/binding/' + this.phone, method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
this.model1.carInfo = res.data.data
}
})
}
},
},
}; };
</script> </script>
......
...@@ -48,7 +48,10 @@ export default { ...@@ -48,7 +48,10 @@ export default {
isCanUse2: false, //默认为true isCanUse2: false, //默认为true
openid: '', openid: '',
nc_protocol : false, nc_protocol : false,
//扫描二维码参数
scene : "", scene : "",
//检查绑定挪车码
checkCode: {},
}; };
}, },
methods: { methods: {
...@@ -59,6 +62,25 @@ export default { ...@@ -59,6 +62,25 @@ export default {
title: '登录中...' title: '登录中...'
}) })
}, },
//检查挪车码存在、是否绑定
getCheckMoveCode(){
let opts = { url: '/app/index/check/move/code', method: 'post' };
this.http.httpTokenRequest(opts, {code:this.scene}).then(res => {
if (res.data.code == 200) {
this.checkCode = res.data.data
//未绑定了的情况
if(!this.checkCode.bindFlag){
uni.navigateTo({
url: '/pagesB/pages/move-car/scan?moveCode=' + this.checkCode.code
})
}else if(this.checkCode.selfFlag){
}else{
}
}
})
},
async wechatLogin() { async wechatLogin() {
wx.login({ wx.login({
success: (res) => { success: (res) => {
......
...@@ -140,7 +140,7 @@ export default { ...@@ -140,7 +140,7 @@ export default {
this.createOrder = { this.createOrder = {
addressId: this.addressId, addressId: this.addressId,
commodityList: [{ commodityList: [{
id: this.id, id: '2022042214065100000000',
nums: 1, nums: 1,
}], }],
} }
......
...@@ -138,8 +138,6 @@ export default { ...@@ -138,8 +138,6 @@ export default {
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.model1.carInfo = res.data.data this.model1.carInfo = res.data.data
}else{
//展示删除失败
} }
}) })
} }
......
...@@ -120,11 +120,11 @@ export default { ...@@ -120,11 +120,11 @@ export default {
}else if(index.name == "呼叫"){ }else if(index.name == "呼叫"){
//请求拨打电话路径 //请求拨打电话路径
let opts = { url: '/app/contact/' , method: 'get' }; let opts = { url: '/app/contact/dialPhone' , method: 'post' };
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
//请求成功逻辑,修改 //请求成功逻辑,修改
} }
}) })
//记录修改 //记录修改
...@@ -162,8 +162,17 @@ export default { ...@@ -162,8 +162,17 @@ export default {
icon: "error", icon: "error",
}); });
} }
}) })
}, },
getMoveLogInit(){
let opts = { url: '/app/moveLog/init', method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
//添加逻辑判断
this.appBo.logCode = res.data.data
}
})
},
// 用户授权 // 用户授权
getAuthorize() { getAuthorize() {
...@@ -270,7 +279,10 @@ export default { ...@@ -270,7 +279,10 @@ export default {
this.moveCode = scene this.moveCode = scene
console.log('scene: ' + scene); console.log('scene: ' + scene);
} }
} },
created() {
},
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div class="contentMoveCar"> <div class="contentMoveCar">
<div class="car_item__one"> <div class="car_item__one">
<div class="item__content"> <div class="item__content">
京A123G63 {{moveCode}}
</div> </div>
</div> </div>
<div class="car_item__three"> <div class="car_item__three">
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<div class="scan__tips"> <div class="scan__tips">
<div>请填写以下信息</div> <div>请填写以下信息</div>
<div @click="goLoveCar">从爱车选择<span> <div @click="goLoveCar">从爱车选择<span>
<image src="@/static/move-car/scan_right.png" /></span></div> <image src="@/static/move-car/scan_right.png" /></span></div>
</div> </div>
<active-form :formDate.sync="formData"></active-form> <active-form :formDate.sync="formData"></active-form>
</div> </div>
...@@ -83,7 +83,7 @@ export default { ...@@ -83,7 +83,7 @@ export default {
label: "手机号", // 提示输入名 label: "手机号", // 提示输入名
type: "text", //类型 type: "text", //类型
rules: { rules: {
name: "userMobile", //字段名 即提交给后端的字段 name: "phone", //字段名 即提交给后端的字段userMobile
value: "", value: "",
verify: false, //是否开启校验 verify: false, //是否开启校验
errMess: "手机号未填写", //校验不通过的错误提示 errMess: "手机号未填写", //校验不通过的错误提示
...@@ -96,50 +96,71 @@ export default { ...@@ -96,50 +96,71 @@ export default {
type: "text", type: "text",
// oneKeyPhone:true, // oneKeyPhone:true,
rules: { rules: {
name: "verificationCode", name: "yzm",
value: "", //字段值 value: "", //字段值
verify: false, verify: false,
errMess: "验证码未填写", errMess: "验证码未填写",
}, },
}, },
], ],
moveCode: '', //挪车码
moveCodeInfo: {}, moveCode: '',
//绑定挪车码信息
moveCodeInfo: {},
//选择车辆id
carId: '',
} }
}, },
methods: { methods: {
goLoveCar() { goLoveCar() {
uni.navigateTo({ uni.navigateTo({
url: '/pagesB/pages/move-car/loveCar' url: '/pagesB/pages/move-car/loveCar?price=1'
}); });
}, },
confirmBinding(){ confirmBinding(){
for(let i in this.formData){ for(let i in this.formData){
let name = this.formData[i].rules.name let name = this.formData[i].rules.name
this.moveCodeInfo[name] = this.formData[i].rules.value if(name == 'yzm'){
} this.moveCodeInfo.verificationCode = this.formData[i].rules.value
console.log(this.moveCodeInfo) }else if(name == 'phone'){
let opts = { url: '/app/moveCode/binding/', method: 'put' }; this.moveCodeInfo.userMobile = this.formData[i].rules.value
this.http.httpTokenRequest(opts, this.moveCodeInfo).then(res => { }else{
if (res.data.code == 200) { this.moveCodeInfo[name] = this.formData[i].rules.value
//展示绑定成功 }
uni.showToast({
title: "绑定成功", }
icon: "success", console.log(this.moveCodeInfo)
}); let opts = { url: '/app/moveCode/binding/', method: 'put' };
this.goBack() this.http.httpTokenRequest(opts, this.moveCodeInfo).then(res => {
}else{ if (res.data.code == 200) {
//绑定失败,展示失败信息 //展示绑定成功
uni.showToast({ uni.showToast({
title: res.data.msg, title: "绑定成功",
icon: "error", icon: "success",
}); });
} this.goBack()
}) }else{
}, //绑定失败,展示失败信息
uni.showToast({
title: res.data.msg,
icon: "error",
});
}
})
},
getCarInfo(){
if(this.carId){
let opts = { url: '/app/vehicleAdmin/' + this.carId, method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
this.model1.carInfo = res.data.data
}
})
}
},
}, },
onLoad(option) { onLoad(option) {
this.moveCode = option.moveCode this.moveCode = option.moveCode
}, },
} }
</script> </script>
......
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
</div> </div>
<div> <div>
<div> <div>
运输中 运输中{{waybillInfo.waybillStatus}}物流最新状态{{waybillInfo.waybillNewDetail}}
</div> </div>
<div> <div>
物流单号:3543859111977240 物流单号:{{waybillInfo.waybillNo}}
</div> </div>
<div class="time__btn btn__one"> <div class="time__btn btn__one">
<span>复制</span> <span>复制</span>
...@@ -25,24 +25,25 @@ ...@@ -25,24 +25,25 @@
<div class="get__car"> <div class="get__car">
<div class="car__img"> <div class="car__img">
<image src="@/static/my/git.png" alt="" /> <image src="@/static/my/git.png" alt="" />
</div> </div>
<div class="one__text"> <div class="one__text">
【收货地址】北京市朝阳区梨园小区2收货地址北京市朝阳区梨园小区2 【收货地址】北京市朝阳区梨园小区2收货地址北京市朝阳区梨园小区2
</div> </div>
</div> </div>
<div class="time__list"> <div v-for="(item,index) in waybillInfo.details">
<div class="item"> <div class="time__list">
<div class="item__img"> <div class="item">
<image src="@/static/my/car-time1.png" alt="" /> <div class="item__img">
<image src="@/static/my/car-time1.png" alt="" />
</div> </div>
<div class="one__text item__title"> <div class="one__text item__title">
到达广东深圳公司,快件将很快进行派送 {{item.remark}}
<div class="time">2020-06-01 12:00:00 </div> <div class="time">2020-06-01 12:00:00</div>
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="time__list"> <div class="time__list">
<div class="item"> <div class="item">
<div class="item__img"> <div class="item__img">
...@@ -88,9 +89,29 @@ ...@@ -88,9 +89,29 @@
export default { export default {
data() { data() {
return { return {
//订单id
orderId: '',
//运单详细信息
waybillInfo: {},
} }
}, },
methods: {
//获得订单详情
getWaybillInfo(){
let opts = { url: '/app/user/order/waybill/' + this.orderId, method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
this.waybillInfo = res.data.data
}
})
},
},
onLoad(e) {
this.orderId = e.orderId
},
onShow() {
this.getWaybillInfo()
},
} }
</script> </script>
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
<template> <template>
<view class="appCotent"> <view class="appCotent">
<div class="hlep"> <div class="hlep">
<u-cell-group>
<u-cell title="设置消息订阅" :isLink="true" @click="changeMessages()"></u-cell>
</u-cell-group>
<image v-if="image" :src="image" /> <image v-if="image" :src="image" />
<image v-else src="@/static/my/help.png" /> <image v-else src="@/static/my/help.png" />
</div> </div>
...@@ -16,6 +19,8 @@ ...@@ -16,6 +19,8 @@
data() { data() {
return { return {
image: '', image: '',
//是否订阅消息
is_authorization: uni.getStorageSync('is_authorization'),
} }
}, },
methods: { methods: {
...@@ -29,9 +34,113 @@ ...@@ -29,9 +34,113 @@
} }
}) })
}, },
//获取消息订阅
openMsg() {
var that = this;
let nc_templateid = that.nc_templateid;
// 获取用户的当前设置,判断是否点击了“总是保持以上,不在询问”
wx.getSetting({
withSubscriptions: true, //是否获取用户订阅消息的订阅状态,默认false不返回
success(res) {
if (that.is_authorization) {
} else {
if (res.subscriptionsSetting[nc_templateid] == "reject") {
//用户点击了“总是保持以上,不再询问”
wx.showModal({
title: "温馨提示",
content: "检测到您没有开启订阅消息的权限,是否去设置?",
success: function (modal) {
if (modal.confirm) {
// 点击肯定
wx.openSetting({
withSubscriptions: true,
});
that.is_authorization = true;
uni.setStorageSync("is_authorization", true);
} else {
uni.showToast({
title: "您已拒绝订阅消息授权,无法预约领取",
icon: "error",
});
that.is_authorization = false;
}
},
});
} else {
// 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
// var templateid = that.setting.templateid.map(item => item.tempid);
let tmpid = [nc_templateid];
uni.requestSubscribeMessage({
tmplIds: tmpid,
success(res) {
if (res[tmpid[0]] == "accept") {
uni.showToast({
title: "订阅成功",
icon: "none",
});
that.is_authorization = true;
uni.setStorageSync("is_authorization", true);
} else {
uni.showToast({
title: "您拒绝订阅消息授权,无法预约领取",
icon: "none",
});
that.is_authorization = false;
}
},
fail: (res) => {
wx.showModal({
title: "温馨提示",
content: "检测到您没有开启订阅消息的权限,是否去设置?",
success: function (modal) {
if (modal.confirm) {
// 点击肯定
wx.openSetting({
withSubscriptions: true,
});
that.is_authorization = true;
uni.setStorageSync("is_authorization", true);
} else {
uni.showToast({
title: "您已拒绝订阅消息授权,无法预约领取",
icon: "error",
});
that.is_authorization = false;
}
},
});
},
});
}
}
},
});
},
//改变消息订阅
changeMessages(){
wx.openSetting({
withSubscriptions: true,
});
// if(!this.is_authorization){
// wx.openSetting({
// withSubscriptions: true,
// });
// this.is_authorization = false;
// uni.setStorageSync("is_authorization", false);
// }else{
// wx.openSetting({
// withSubscriptions: true,
// });
// this.is_authorization = false;
// uni.setStorageSync("is_authorization", false);
// }
},
}, },
onShow() { onShow() {
this.getHelpInfo() this.getHelpInfo()
//this.openMsg()
}, },
} }
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</div> </div>
</div> </div>
<div class="tab__bottom"> <div class="tab__bottom">
<div class="tab__item" v-for="(vo,inx) in items" :key="inx" @click="goOrder(vo.page)"> <div class="tab__item" v-for="(vo,inx) in items" :key="inx" @click="goOrder(inx+1)">
<image :src="vo.icon" /> <image :src="vo.icon" />
<div>{{vo.title}}</div> <div>{{vo.title}}</div>
</div> </div>
...@@ -91,7 +91,7 @@ export default { ...@@ -91,7 +91,7 @@ export default {
} }
], ],
items: [{ items: [{
title: '待付款', title: '待发货',
icon: require('@/static/my/my2.png'), icon: require('@/static/my/my2.png'),
page:0 page:0
}, },
...@@ -121,9 +121,9 @@ export default { ...@@ -121,9 +121,9 @@ export default {
url: '/pages/binding/index' url: '/pages/binding/index'
}); });
}, },
goOrder(page=0) { goOrder(current) {
uni.navigateTo({ uni.navigateTo({
url: '/pagesD/pages/personal/myOrder?page=' + page url: '/pagesD/pages/personal/myOrder?current=' + current
}); });
}, },
goUrl(vo) { goUrl(vo) {
......
This diff is collapsed.
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<div> <div>
到达【北京邮区邮件处理中心】 到达【北京邮区邮件处理中心】
</div> </div>
<div class="order__btn btn__one" @click="viewCar"> <div class="order__btn btn__one" @click="viewCar">
<span>查看物流</span> <span>查看物流</span>
</div> </div>
</div> </div>
...@@ -24,10 +24,12 @@ ...@@ -24,10 +24,12 @@
<div class="address"> <div class="address">
<div class="address__left"> <div class="address__left">
<div class="right__title"> <div class="right__title">
北京市朝阳区李家董镇太阳宫社区大唐公寓 2号楼3单元303 {{orderInfo.address}}&emsp;{{orderInfo.detailInfo}}
</div> </div>
<div class="right__phone"> <div class="right__phone">
<span>默认</span> <span>我是收货人</span><span>19963353323</span> <!-- <span>默认</span> -->
<span>{{orderInfo.userName}}</span>
<span>{{orderInfo.telNumber}}</span>
</div> </div>
</div> </div>
...@@ -40,31 +42,31 @@ ...@@ -40,31 +42,31 @@
</div> </div>
<div class="top__right"> <div class="top__right">
<div class="right__one one__text"> <div class="right__one one__text">
<span>强力清洗剂 大容量 标</span> <span>{{orderInfo.title}}</span>
<span>25.5</span> <span>{{orderInfo.amount/100}}</span>
</div> </div>
<div class="right__two"> <div class="right__two">
<span>强力清洗剂 大容量 标120 ml*3瓶装</span> <span>{{orderInfo.spec}}</span>
<span>×4</span> <span>×{{orderInfo.nums}}</span>
</div> </div>
</div> </div>
</div> </div>
<div class="item__bottom"> <div class="item__bottom">
<div class="bottom__item"> <div class="bottom__item">
<div>订单编号::</div> <div>订单编号::</div>
<div>3543859111977240</div> <div>{{orderInfo.orderNo}}</div>
</div> </div>
<div class="bottom__item"> <div class="bottom__item">
<div>付款时间:</div> <div>付款时间:</div>
<div>2022-01-20 12:12:03</div> <div>{{orderInfo.successTime}}</div>
</div> </div>
<div class="bottom__item"> <div class="bottom__item">
<div>商品总价:</div> <div>商品总价:</div>
<div>48.00</div> <div>{{orderInfo.amount/100}}</div>
</div> </div>
<div class="bottom__item"> <div class="bottom__item">
<div>实付款:</div> <div>实付款:</div>
<div class="bottom__price">48.00</div> <div class="bottom__price">{{orderInfo.amount/100}}</div>
</div> </div>
</div> </div>
<div class="order__btn" @click="pull"> <div class="order__btn" @click="pull">
...@@ -78,18 +80,40 @@ ...@@ -78,18 +80,40 @@
<script> <script>
export default { export default {
data(){
return {
//订单id
orderId: '',
//订单详情
orderInfo: {},
}
},
methods: { methods: {
viewCar() { viewCar() {
uni.navigateTo({ uni.navigateTo({
url: '/pagesD/pages/personal/carTime' url: '/pagesD/pages/personal/carTime?orderId=' + this.orderId
}) })
} },
,pull() { pull() {
uni.navigateTo({ uni.navigateTo({
url: '/pagesD/pages/personal/pull' url: '/pagesD/pages/personal/pull'
}) })
} },//获得订单详情
getOrderInfo(){
let opts = { url: '/app/user/order/info/' + this.orderId, method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
this.orderInfo = res.data.data
}
})
},
}, },
onLoad(e) {
this.orderId = e.orderId
},
onShow() {
this.getOrderInfo()
},
} }
</script> </script>
...@@ -160,16 +184,16 @@ export default { ...@@ -160,16 +184,16 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
span:nth-of-type(1) { // span:nth-of-type(1) {
font-size: 24rpx; // font-size: 24rpx;
font-family: PingFang SC; // font-family: PingFang SC;
font-weight: bold; // font-weight: bold;
color: #F88D28; // color: #F88D28;
padding: 2rpx 4rpx; // padding: 2rpx 4rpx;
border: 1rpx solid #F88D28; // border: 1rpx solid #F88D28;
} // }
span:nth-of-type(2) { span:nth-of-type(1) {
font-size: 28rpx; font-size: 28rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
...@@ -177,7 +201,7 @@ export default { ...@@ -177,7 +201,7 @@ export default {
padding: 0 14rpx; padding: 0 14rpx;
} }
span:nth-of-type(3) { span:nth-of-type(2) {
font-size: 28rpx; font-size: 28rpx;
font-family: DIN; font-family: DIN;
font-weight: 500; font-weight: 500;
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<div class="why"> <div class="why">
<u--textarea v-model="value1" placeholder="地址输入错误,需重新拍下。地址输入错误,需重新拍下。地址输入错误,需重新拍下。" ></u--textarea> <u--textarea v-model="value1" placeholder="地址输入错误,需重新拍下。地址输入错误,需重新拍下。地址输入错误,需重新拍下。" ></u--textarea>
</div> </div>
<div class="view__btn view__no__bind"> <div class="view__btn view__no__bind" @click="orderRefund">
提交申请 提交申请
</div> </div>
</div> </div>
...@@ -33,19 +33,48 @@ export default { ...@@ -33,19 +33,48 @@ export default {
value1:'', value1:'',
items: [{ items: [{
title: "退款金额:", title: "退款金额:",
value: "¥48.00" value: "¥0.00"
}, },
{ {
title: "退款原因:", title: "退款原因:",
value: "" value: ""
}, },
],
] //订单id
orderId: '',
//订单详情
orderInfo: {},
}; };
}, },
methods: { methods: {
getOrderInfo(){
let opts = { url: '/app/user/order/info/' + this.orderId, method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
this.orderInfo = res.data.data
this.items[0].value = "¥" + (res.data.data.amount/100)
}
})
},
orderRefund(){
let opts = { url: '/app/user/order/refund', method: 'post' };
let orderRefund = {
orderId: this.orderInfo.id,
reason: this.items[1].value
}
this.http.httpTokenRequest(opts, orderRefund).then(res => {
if (res.data.code == 200) {
}
})
}
}, },
onLoad(e) {
this.orderId = e.orderId
},
onShow() {
this.getOrderInfo()
}
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment