|
|
|
@ -102,29 +102,17 @@ |
|
|
|
|
<image src="../../static/test/address.png" |
|
|
|
|
style="width: 46rpx;height: 46rpx;margin-right: 7rpx;"> |
|
|
|
|
</image> |
|
|
|
|
<text style="margin-right: 10rpx;">南京:有货</text> |
|
|
|
|
<text style="margin-right: 10rpx;">{{addressResult.city}}:{{stockValue}}</text> |
|
|
|
|
<u-icon name="arrow-right" color="#B7B7B7" size="22"></u-icon> |
|
|
|
|
</picker> |
|
|
|
|
</view> |
|
|
|
|
<view v-if="goods.goods_no" class="operaImg" @click="copyNum(goods.unicode)"> |
|
|
|
|
<view class="left_1" v-if="goods.goods_source==0"> |
|
|
|
|
JD |
|
|
|
|
</view> |
|
|
|
|
<view class="left_1" v-if="goods.goods_source==1"> |
|
|
|
|
SN |
|
|
|
|
</view> |
|
|
|
|
<view class="left_1" v-if="goods.goods_source==2"> |
|
|
|
|
GC |
|
|
|
|
</view> |
|
|
|
|
<view class="left_1" v-if="goods.goods_source==3"> |
|
|
|
|
CC |
|
|
|
|
</view> |
|
|
|
|
<view class="left_1" v-if="goods.goods_source==4"> |
|
|
|
|
ZC |
|
|
|
|
<view v-if="goods.unicode" class="operaImg" @click="copyNum(goods.unicode)"> |
|
|
|
|
<view class="left_1"> |
|
|
|
|
{{goods.goods_source}} |
|
|
|
|
</view> |
|
|
|
|
<text>{{goods.unicode}}</text> |
|
|
|
|
<image :src="$picUrl+'/static/detail/copy.png'" |
|
|
|
|
style="width: 27rpx;height: 27rpx;margin-left: 5rpx;"></image> |
|
|
|
|
style="width: 27rpx;height: 27rpx;margin-left: 8rpx;"></image> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -158,7 +146,7 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="chosed"> |
|
|
|
|
<!-- <view class="chosed"> |
|
|
|
|
<view class="serve"> |
|
|
|
|
<view class="serveInfo"> |
|
|
|
|
商家 |
|
|
|
@ -175,7 +163,7 @@ |
|
|
|
|
</view> |
|
|
|
|
<u-icon name="arrow-right" style="float: right;" color="#B7B7B7"></u-icon> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
<view class="chosed"> |
|
|
|
|
<view class="title">发货</view> |
|
|
|
|
<view class="info">预计 |
|
|
|
@ -516,13 +504,21 @@ |
|
|
|
|
}], |
|
|
|
|
selectSku: '', |
|
|
|
|
selectShop: 1, |
|
|
|
|
multiIndex: [0, 0], |
|
|
|
|
multiIndex: [0, 0, 0], |
|
|
|
|
multiArray: [], |
|
|
|
|
multiData: [] |
|
|
|
|
multiData: [], |
|
|
|
|
stockValue: '南京市', |
|
|
|
|
addressResult: { |
|
|
|
|
province: '江苏省', |
|
|
|
|
city: '南京市', |
|
|
|
|
district: '玄武区' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onLoad(options) { |
|
|
|
|
const that = this; |
|
|
|
|
let result = uni.getStorageSync("addressResult") |
|
|
|
|
this.addressResult = result.address_component || '' |
|
|
|
|
this.isPre = options.isPre ? options.isPre : null |
|
|
|
|
// 记录query参数 |
|
|
|
|
// this.onRecordQuery(options) |
|
|
|
@ -537,9 +533,9 @@ |
|
|
|
|
this.getServeList() |
|
|
|
|
this.getGoodsDetail() |
|
|
|
|
this.cityInfo = uni.getStorageSync("cityInfo"); |
|
|
|
|
this.getGoodsStockInfor() |
|
|
|
|
this.getCartTotal() |
|
|
|
|
this.getProvinceAll() |
|
|
|
|
this.getAdressLocation() |
|
|
|
|
uni.$on("onenPrice", function(selectShop) { |
|
|
|
|
that.openPirce(); |
|
|
|
|
that.isTodo = false; |
|
|
|
@ -573,19 +569,21 @@ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getAdressLocation() { |
|
|
|
|
const that = this |
|
|
|
|
uni.getLocation({ //只能获取到经纬度 |
|
|
|
|
type: 'gcj02', |
|
|
|
|
success(res) { |
|
|
|
|
let longitude = res.longitude |
|
|
|
|
let latitude = res.latitude |
|
|
|
|
console.log(res, 'AAAAAAAAAAAAAA') |
|
|
|
|
}, |
|
|
|
|
fail(err) { |
|
|
|
|
console.log(err, '获取经纬度失败') |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
async getGoodsStockInfor() { |
|
|
|
|
let params = { |
|
|
|
|
goods_id: this.goodsId, |
|
|
|
|
province: this.addressResult ? this.addressResult.province : '江苏省', |
|
|
|
|
city: this.addressResult ? this.addressResult.city : '南京市', |
|
|
|
|
district: this.addressResult ? this.addressResult.district : '玄武区' |
|
|
|
|
} |
|
|
|
|
let { |
|
|
|
|
status, |
|
|
|
|
message, |
|
|
|
|
data |
|
|
|
|
} = await GoodsApi.getGoodsStock(params); |
|
|
|
|
if (status == 200) { |
|
|
|
|
this.stockValue = data.stock |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
async getProvinceAll() { |
|
|
|
|
let { |
|
|
|
@ -599,26 +597,20 @@ |
|
|
|
|
this.multiArray = [ |
|
|
|
|
this.multiData, |
|
|
|
|
this.multiData[0].children, |
|
|
|
|
this.multiData[0].children[0].children |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 获取多列的索引 |
|
|
|
|
multiChange: function(e) { |
|
|
|
|
this.multiIndex = e.detail.value; |
|
|
|
|
let a_name = this.multiArray[0][e.detail.value[0]].name; |
|
|
|
|
let a_id = this.multiArray[0][e.detail.value[0]].id; |
|
|
|
|
let b_name = this.multiArray[1][e.detail.value[1]].name; |
|
|
|
|
let b_id = this.multiArray[1][e.detail.value[1]].id; |
|
|
|
|
// this.cityInfo.province = a_name; |
|
|
|
|
// this.cityInfo.city = b_name; |
|
|
|
|
let region = [{ |
|
|
|
|
value: a_id, |
|
|
|
|
label: a_name |
|
|
|
|
}, { |
|
|
|
|
value: b_id, |
|
|
|
|
label: b_name |
|
|
|
|
}]; |
|
|
|
|
console.log(region) |
|
|
|
|
let province = this.multiArray[0][e.detail.value[0]].name; |
|
|
|
|
let city = this.multiArray[1][e.detail.value[1]].name; |
|
|
|
|
let district = this.multiArray[2][e.detail.value[2]].name; |
|
|
|
|
this.addressResult.province = province; |
|
|
|
|
this.addressResult.city = city |
|
|
|
|
this.addressResult.district = district |
|
|
|
|
this.getGoodsStockInfor() |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 选择列 |
|
|
|
@ -630,6 +622,7 @@ |
|
|
|
|
this.multiArray = [ |
|
|
|
|
_this.multiData, |
|
|
|
|
_this.multiData[_this.multiIndex[0]].children, |
|
|
|
|
_this.multiData[_this.multiIndex[0]].children[_this.multiIndex[1]].children |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
// 记录query参数 |
|
|
|
@ -2211,13 +2204,13 @@ |
|
|
|
|
|
|
|
|
|
.left_1 { |
|
|
|
|
height: 100%; |
|
|
|
|
width: 50rpx; |
|
|
|
|
margin-right: 8rpx; |
|
|
|
|
line-height: 36.5rpx; |
|
|
|
|
font-family: PingFang SC, PingFang SC; |
|
|
|
|
font-weight: bold; |
|
|
|
|
font-size: 30rpx; |
|
|
|
|
color: #F21A1C; |
|
|
|
|
text-align: center; |
|
|
|
|
margin-right: 5rpx; |
|
|
|
|
margin-right: 10rpx; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|