Commit 29cbfbdd authored by fwz's avatar fwz

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

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