Commit 33ac9a73 authored by fwz's avatar fwz

bug修改

parent 001d30d0
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<div class="list__title"> <div class="list__title">
超低价养车好物 超低价养车好物
</div> </div>
<u-gap bgColor="transparent" height="20"></u-gap> <u-gap bgColor="transparent" height="40"></u-gap>
<div class="list"> <div class="list">
<div class="list__item" v-for="(vo,inx) in mallList" :key="inx"> <div class="list__item" v-for="(vo,inx) in mallList" :key="inx">
<image :src="vo.mainImgUrl" class="list__img"></image> <image :src="vo.mainImgUrl" class="list__img"></image>
...@@ -153,7 +153,7 @@ export default { ...@@ -153,7 +153,7 @@ export default {
// //
selectMallList: [], selectMallList: [],
//选择商品的数量 //选择商品的数量
countNum: 0, countNum: 1,
//商品变更为零或者1 //商品变更为零或者1
quantityChange: false, quantityChange: false,
countMoney: 0, countMoney: 0,
...@@ -304,21 +304,25 @@ export default { ...@@ -304,21 +304,25 @@ export default {
this.quantityChange = (num.value == 0 || num.value == 1) this.quantityChange = (num.value == 0 || num.value == 1)
}, },
plusMall(vo){ plusMall(vo){
if(!this.mallSelectMap[vo.id] || this.mallSelectMap[vo.id] == 0){ // if(!this.mallSelectMap[vo.id] || this.mallSelectMap[vo.id] == 0){
this.countNum = this.countNum + 1 // this.countNum = this.countNum + 1
this.mallSelectMap[vo.id] = 1 // this.mallSelectMap[vo.id] = 1
}else{ // }else{
this.mallSelectMap[vo.id] += 1 // this.mallSelectMap[vo.id] += 1
// }
if(!this.mallSelectMap[vo.id]){
this.mallSelectMap[vo.id] = 0
} }
this.mallSelectMap[vo.id] += 1
this.countNum = this.countNum + 1
this.countMoney += vo.currentPrice this.countMoney += vo.currentPrice
//console.log(this.mallSelectMap)
}, },
minusMall(vo){ minusMall(vo){
if(this.mallSelectMap[vo.id] && this.mallSelectMap[vo.id] > 0){ if(this.mallSelectMap[vo.id] && this.mallSelectMap[vo.id] > 0){
if(this.mallSelectMap[vo.id] == 1){ // if(this.mallSelectMap[vo.id] == 1){
this.countNum -= 1 // this.countNum -= 1
} // }
this.countNum -= 1
this.mallSelectMap[vo.id] -= 1 this.mallSelectMap[vo.id] -= 1
this.countMoney -= vo.currentPrice this.countMoney -= vo.currentPrice
} }
......
...@@ -62,7 +62,14 @@ export default { ...@@ -62,7 +62,14 @@ export default {
let opts = { url: '/app/moveCode/' + this.id, method: 'get' }; let opts = { url: '/app/moveCode/' + this.id, method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.items = res.data.rows let data = res.data.data
let list = []
list.push({title: "挪车码编号", value: data.moveCode})
list.push({title: "车牌号", value: data.carNo})
list.push({title: "品牌", value: data.brand})
list.push({title: "车型", value: data.carModel})
list.push({title: "绑定手机号", value: data.userMobile})
this.items = list
} }
}) })
} }
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</div> </div>
<div class="move-car__wx"> <div class="move-car__wx">
<u-checkbox-group placement="row"> <u-checkbox-group placement="row">
<u-checkbox v-model="checked"></u-checkbox> <u-checkbox v-model="checked" @change="changeWechat"></u-checkbox>
</u-checkbox-group> 微信通知(上限3次) </u-checkbox-group> 微信通知(上限3次)
</div> </div>
<div class="move-car__more"> <div class="move-car__more">
...@@ -97,6 +97,10 @@ export default { ...@@ -97,6 +97,10 @@ export default {
cityName: '', cityName: '',
//区 //区
countyName: '', countyName: '',
//街道
township: '',
//号数
number: '',
//详细地址 //详细地址
detailInfo: '', detailInfo: '',
//是否微信通知 //是否微信通知
...@@ -112,12 +116,18 @@ export default { ...@@ -112,12 +116,18 @@ export default {
} }
}, },
methods: { methods: {
changeWechat(){
this.appBo.wechat = !this.appBo.wechat
},
call() { call() {
if(this.checked){ // if(this.checked){
this.appBo.wechat = true // this.appBo.wechat = true
}else{ // }else{
this.appBo.wechat = false // this.appBo.wechat = false
} // }
// console.log(this.checked)
// this.appBo.wechat = true
this.appBo.moveCode = this.moveCode this.appBo.moveCode = this.moveCode
let opts = { url: '/app/contact/notice' , method: 'post' }; let opts = { url: '/app/contact/notice' , method: 'post' };
this.http.httpTokenRequest(opts, this.appBo).then(res => { this.http.httpTokenRequest(opts, this.appBo).then(res => {
...@@ -255,7 +265,7 @@ export default { ...@@ -255,7 +265,7 @@ export default {
latitude + latitude +
'&key=1bba2ab2de600f8b5fafe167e09cd2af&radius=1000&extensions=all', '&key=1bba2ab2de600f8b5fafe167e09cd2af&radius=1000&extensions=all',
success(res) { success(res) {
//console.log(res); console.log(res);
if (res.statusCode === 200) { if (res.statusCode === 200) {
if(res.data.status === '1') { if(res.data.status === '1') {
let addressInfo = res.data let addressInfo = res.data
...@@ -271,6 +281,10 @@ export default { ...@@ -271,6 +281,10 @@ export default {
} }
//区 //区
that.appBo.countyName = addressInfo.regeocode.addressComponent.district that.appBo.countyName = addressInfo.regeocode.addressComponent.district
//街道
that.appBo.township = addressInfo.regeocode.addressComponent.township
//号数
that.appBo.number = addressInfo.regeocode.addressComponent.streetNumber.number
//console.log("当前位置: " + that.appBo.detailInfo + " " + that.appBo.provinceName + " " + " " + that.appBo.cityName + " " + that.appBo.countyName) //console.log("当前位置: " + that.appBo.detailInfo + " " + that.appBo.provinceName + " " + " " + that.appBo.cityName + " " + that.appBo.countyName)
} }
......
...@@ -2,13 +2,10 @@ ...@@ -2,13 +2,10 @@
<view class="appCotent"> <view class="appCotent">
<div class="shop__detail"> <div class="shop__detail">
<div class="top__swiper"> <div class="top__swiper">
<u-swiper :list="list6" <u-swiper radius='0' :list="list6" @change="e => currentNum = e.current" :autoplay="false" height='358' indicatorStyle="right: 20px">
previousMargin="30" <view slot="indicator" class="indicator-num">
nextMargin="30" <text class="indicator-num__text">{{ currentNum + 1 }}/{{ list6.length }}</text>
circular </view>
:autoplay="false"
radius="5"
bgColor="#ffffff">
</u-swiper> </u-swiper>
<div class="shop__title"> <div class="shop__title">
<div>{{mallInfo.title}} {{mallInfo.description}}</div> <div>{{mallInfo.title}} {{mallInfo.description}}</div>
...@@ -22,7 +19,8 @@ ...@@ -22,7 +19,8 @@
<div class="content__title"> <div class="content__title">
商品详情 商品详情
</div> </div>
{{mallInfo.detailContent}} <u-parse :content="mallInfo.detailContent"></u-parse>
<!-- {{mallInfo.detailContent}} -->
</div> </div>
</div> </div>
<div class="shop__btn view__no__bind" @click="pay()">立即购买</div> <div class="shop__btn view__no__bind" @click="pay()">立即购买</div>
...@@ -54,8 +52,7 @@ export default { ...@@ -54,8 +52,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.mallInfo = res.data.data this.mallInfo = res.data.data
let imgUrlList = this.mallInfo.otherImgUrl.split(',') this.list6 = this.mallInfo.imageUrls
this.list6 = imgUrlList
} }
}) })
}, },
......
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