接口对接
This commit is contained in:
parent
634e27bb3b
commit
357996f87e
|
|
@ -2,5 +2,5 @@ export default {
|
|||
deptId: 101,
|
||||
from: 'customer',
|
||||
initPageNum: 1,
|
||||
initPageSize: 5
|
||||
initPageSize: 50
|
||||
}
|
||||
|
|
@ -6,8 +6,8 @@ export default {
|
|||
uni.addInterceptor('request', {
|
||||
invoke(args) {
|
||||
// request 触发前拼接 url
|
||||
args.url = 'https://www.opsoul.com' + args.url;
|
||||
// args.url = 'http://10.45.111.215:80' + args.url;
|
||||
// args.url = 'https://www.opsoul.com' + args.url;
|
||||
args.url = 'http://10.45.137.214:80' + args.url;
|
||||
// args.url = 'http://127.0.0.1:80' + args.url;
|
||||
if (args.data) {
|
||||
args.data.deptId = globalData.deptId;
|
||||
|
|
|
|||
|
|
@ -8,10 +8,13 @@
|
|||
<view class="text-sm" v-if="ifShowComments">{{product.comments}}</view>
|
||||
</view>
|
||||
<view class="flex justify-between align-center">
|
||||
<view class="flex justify-start align-center">
|
||||
<view v-if="product.discountPrice" class="flex justify-start align-center">
|
||||
<text class="text-price text-red text-bold text-xl">{{product.discountPrice}}</text>
|
||||
<text class="text-del" v-if="product.goodsPrice">¥{{product.goodsPrice}}</text>
|
||||
</view>
|
||||
<view v-else class="flex justify-start align-center">
|
||||
<text class="text-price text-red text-bold text-xl">{{product.goodsPrice}}</text>
|
||||
</view>
|
||||
<view class="padding-xs">
|
||||
<view class='cu-tag light bg-blue'>{{product.type}}</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
<view class="cu-avatar xl" :style="'background-image:url(' + productInfo.goodsImgUrl + ');'">
|
||||
</view>
|
||||
<view class="content margin-left">
|
||||
<text class="text-price text-red text-xxl">{{curSpec.discountPrice}}</text>
|
||||
<text class="text-price text-red text-xxl">{{curSpec.goodsPrice}}</text>
|
||||
<text class="text-gray text-sm flex justify-between">
|
||||
{{curSpec.remark}}
|
||||
{{productInfo.remark}}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
<view class='cu-tag padding'
|
||||
:class="curSpec.goodsStandardId === item.goodsStandardId ? 'line-main-color' : 'line-default'"
|
||||
@click="chooseSpecs(item)">{{item.goodsStandardName}}</view>
|
||||
<uni-number-box :min="0" :max="item.goodsNum" :value="0" @change="changePiecesNum($event, index)">
|
||||
<uni-number-box :min="0" :max="item.goodsNum ? item.goodsNum : 999" :value="0" @change="changePiecesNum($event, index)">
|
||||
</uni-number-box>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
|
@ -81,7 +81,8 @@
|
|||
},
|
||||
methods: {
|
||||
loadData() {
|
||||
this.curSpec = this.specsList[0];
|
||||
this.curSpec = this.specsList[0];
|
||||
console.log(this.curSpec)
|
||||
this.specsList.forEach(function(item) {
|
||||
this.pickList.push({
|
||||
price: item.goodsPrice,
|
||||
|
|
@ -91,8 +92,9 @@
|
|||
}.bind(this));
|
||||
},
|
||||
changePiecesNum(piecesNum, index) {
|
||||
let spec = this.pickList[index];
|
||||
this.totalPrice -= spec.salePrice * (spec.pickCount - piecesNum);
|
||||
let spec = this.pickList[index];
|
||||
let price = spec.salePrice ? spec.salePrice : spec.price;
|
||||
this.totalPrice -= price * (spec.pickCount - piecesNum);
|
||||
this.totalPickCount -= spec.pickCount - piecesNum
|
||||
this.pickList[index].pickCount = piecesNum;
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue