Commit 29cbfbdd authored by fwz's avatar fwz

获得免费挪车码图片、车辆编辑里删除加对话框,确认才删除

parent 7d20cf58
......@@ -26,13 +26,15 @@
</div>
<u-gap bgColor="transparent" height="15"></u-gap>
<div class="content__code">
<div class="code__img"></div>
<div class="code__img">
<image :src="freeCode.mainImgUrl" class="code__img"></image>
</div>
<div class="code__money">
<div class="money__title">
<text>二维码挪车贴-经典样式</text>
<text>{{freeCode.title}}</text>
</div>
<div class="code__tips">
<text>静电贴材质 7.1cm*8.9cm</text>
<text>{{freeCode.spec}}</text>
</div>
<div class="money__num">
<text class="num__one">¥0.00</text>
......@@ -124,6 +126,8 @@ export default {
addressId: '',
//选择的收货地址
addressInfo: {},
//免费挪车码
freeCode: {},
}
},
methods: {
......@@ -223,9 +227,18 @@ export default {
url: '/pagesD/pages/personal/myAddress?pay=1'
})
},
getMoveCode(){
let opts = { url: '/app/mall/free/code', method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
this.freeCode = res.data.data
}
})
},
},
onShow() {
this.getAddressList()
this.getMoveCode()
},
};
</script>
......
......@@ -7,13 +7,15 @@
<div class="getPrice">
<u-gap bgColor="transparent" height="30"></u-gap>
<div class="content__code">
<div class="code__img"></div>
<div class="code__img">
<image :src="freeCode.mainImgUrl" class="code__img"></image>
</div>
<div class="code__money">
<div class="money__title">
<text>二维码挪车贴-经典样式</text>
<text>{{freeCode.title}}</text>
</div>
<div class="code__tips">
<text>静电贴材质 7.1cm*8.9cm</text>
<text>{{freeCode.spec}}</text>
</div>
<div class="money__num">
<text class="num__one">¥0.00</text>
......@@ -100,6 +102,8 @@ export default {
},
},
carId: '',
//免费挪车码
freeCode: {},
};
},
watch: {
......@@ -143,6 +147,14 @@ export default {
}
},
getMoveCode(){
let opts = { url: '/app/mall/free/code', method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
this.freeCode = res.data.data
}
})
},
},
onReady() {
// 如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则
......@@ -150,7 +162,11 @@ export default {
},
onShow() {
this.getCarInfo()
}
this.getMoveCode()
},
onLoad(e) {
this.orderId = e.orderId
},
};
</script>
......
......@@ -10,17 +10,19 @@
</u-swiper>
<u-gap bgColor="transparent" height="15"></u-gap>
<div class="content__code">
<div class="code__img"></div>
<div class="code__img">
<image :src="freeCode.mainImgUrl" class="code__img"></image>
</div>
<div class="code__money">
<div class="money__title">
<text>二维码挪车贴</text>
<text>{{freeCode.title}}</text>
</div>
<div class="code__tips">
<text>绑定京东账号,仅需支付邮费</text>
</div>
<div class="money__num">
<text class="num__one">¥0.00</text>
<text class="num__two">19.99</text>
<text class="num__two">{{freeCode.originalPrice/100}}</text>
</div>
</div>
<div class="code__get" @click="getPrice">
......@@ -68,6 +70,8 @@ export default {
"https://cdn.uviewui.com/uview/swiper/swiper2.png",
"https://cdn.uviewui.com/uview/swiper/swiper1.png",
],
//免费挪车码
freeCode: {},
};
},
methods: {
......@@ -79,10 +83,21 @@ export default {
});
//跳转到领取优惠卷页面
uni.navigateTo({
url: '/pagesA/pages/index/getPrice'
url: '/pagesA/pages/index/getPrice?orderId=' + this.freeCode.id
});
},
getMoveCode(){
let opts = { url: '/app/mall/free/code', method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
this.freeCode = res.data.data
}
})
},
},
created() {
this.getMoveCode()
},
};
</script>
......
......@@ -34,6 +34,8 @@
<div class="add__btn add__back" @click="goBack">
删除
</div>
<u-modal :show="deleteShow" :title="deleteTitle" :content='deleteContent'
@confirm="confirmModal" @cancel="cancelModal" showCancelButton="true"></u-modal>
</div>
</view>
</template>
......@@ -51,6 +53,9 @@ export default {
model1: {
carInfo: {},
},
deleteShow: false,
deleteTitle: '删除车辆',
deleteContent: '确定删除车辆?',
rules: {
"carInfo.brand": {
type: "string",
......@@ -104,9 +109,7 @@ export default {
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
this.model1.carInfo = res.data.data
console.log(this.model1.carInfo)
}else{
//展示删除失败
}
})
},
......
......@@ -7,7 +7,7 @@
车牌号:
</div>
<div class="item__content">
京A123G63
{{appBusCar.carNo}}
</div>
</div>
<div class="car_item__two">
......@@ -146,6 +146,7 @@ export default {
},
getCarNumber(){
let opts = { url: '/app/moveCode/owner/' + this.moveCode, method: 'get' };
//let opts = { url: '/app/moveCode/owner/MV123', method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
if(JSON.stringify(res.data.data) != "{}"){
......@@ -158,8 +159,8 @@ export default {
}else{
//查询挪车码失败
uni.showToast({
title: res.data.msg,
icon: "error",
title: res.data.msg,
icon: "error",
});
}
})
......@@ -280,6 +281,9 @@ export default {
console.log('scene: ' + scene);
}
},
onShow() {
this.getCarNumber()
},
created() {
},
......
......@@ -94,7 +94,7 @@ export default {
})
},
getImage(imageUrl){
return this.http.baseUrl + imageUrl;
return imageUrl;
},
},
onShow() {
......
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