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