Commit 33ac9a73 authored by fwz's avatar fwz

bug修改

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