商品兑换券更新
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
</view>
|
||||
<view class="bildRight">
|
||||
<text>我的积分</text>
|
||||
<view>{{info.levelConsume}}</view>
|
||||
<view>{{info.accountPoints}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="navTop">
|
||||
@@ -26,14 +26,16 @@
|
||||
<view class="flex-start">
|
||||
<view class="listStyle_left">
|
||||
<view class="listrigth">
|
||||
<view>{{item.biz_name}}</view>
|
||||
<view :class="[item.type == '+'?'colorStyle':'']">{{item.type}}{{item.amount}}
|
||||
<view>{{active == 1 ? item.biz_name : item.memberName}}</view>
|
||||
<view :class="[item.type == '+'?'colorStyle':'']">
|
||||
{{ active == 1 ? item.type : (item.floatType == 'add'?'+':'')}}
|
||||
{{active == 1 ? item.amount : item.floatPoints}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="listrigth2">
|
||||
<view>{{$u.timeFormat(item.create_time, 'yyyy-mm-dd hh:MM:ss')}}</view>
|
||||
<view>余额:{{item.balance}}</view>
|
||||
<view v-if="active == 1">余额:{{item.balance}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -53,13 +55,15 @@
|
||||
pageSize: 10,
|
||||
memberId: null
|
||||
},
|
||||
info: null
|
||||
info: null,
|
||||
shopId: null
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log(JSON.parse(e.shopUserInfo))
|
||||
this.info = JSON.parse(e.shopUserInfo)
|
||||
this.form.memberId = this.info.id;
|
||||
this.shopId = this.info.shopId;
|
||||
this.getlist()
|
||||
},
|
||||
onReachBottom() {
|
||||
@@ -73,20 +77,29 @@
|
||||
},
|
||||
async getlist() {
|
||||
if (this.active == 1) {
|
||||
let res = await this.api.queryMemberAccount(this.form)
|
||||
let res = await this.api.queryMemberAccount({
|
||||
...this.form
|
||||
})
|
||||
if (res.code == 0 && res.data.list.length > 0) {
|
||||
console.log(this.list.length)
|
||||
this.list = this.list.concat(res.data.list)
|
||||
this.form.page++
|
||||
console.log(this.list)
|
||||
}
|
||||
} else {
|
||||
this.list = []
|
||||
|
||||
let res = await this.api.queryMemberPointsLog({
|
||||
shopId: this.shopId,
|
||||
...this.form
|
||||
})
|
||||
if (res.code == 0 && res.data.list.length > 0) {
|
||||
this.list = this.list.concat(res.data.list)
|
||||
this.form.page++
|
||||
}
|
||||
}
|
||||
},
|
||||
clickEvent(i) {
|
||||
this.active = i;
|
||||
this.form.page = 1;
|
||||
this.list = []
|
||||
this.getlist()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,9 @@
|
||||
type: 'index',
|
||||
})
|
||||
} else if ( type == 3 ) {
|
||||
uni.pro.navigateTo('user/coupon')
|
||||
uni.pro.navigateTo('user/coupon', {
|
||||
shopId: this.shopId,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -715,6 +715,7 @@
|
||||
"skuId": this.skuId,
|
||||
"num": num, //数量
|
||||
"type": a == '+' ? 1 : 0,
|
||||
"isVip": item.isVip,
|
||||
"productId": item.id, //商品id
|
||||
"shopId": this.shopId,
|
||||
"note": item.note,
|
||||
@@ -966,11 +967,12 @@
|
||||
let res = await this.api.productqueryProductSku({
|
||||
code: this.tableCode,
|
||||
shopId: this.shopId,
|
||||
"isVip": 0,
|
||||
isVip: item.isVip, //商品id
|
||||
productId: item.id, //商品id
|
||||
spec_tag: this.skuidname.join(","),
|
||||
})
|
||||
this.salePrice = res.data.salePrice // 价格
|
||||
|
||||
this.salePrice = this.isVip == 1 && res.data.memberPrice > 0 ? res.data.memberPrice : res.data.salePrice // 价格
|
||||
let data = null;
|
||||
if (a == 1) { //1添加购物车 2是websocket返回这个商品的价格(应为不同的多规格商品返回不同的价格)
|
||||
let params = {
|
||||
@@ -979,7 +981,7 @@
|
||||
"type": c == '+' ? 1 : 0,
|
||||
"productId": item.id, //商品id
|
||||
"note": item.note,
|
||||
"isVip": 0,
|
||||
"isVip": item.isVip,
|
||||
"shopId": this.shopId,
|
||||
"userId": uni.cache.get('userInfo').id,
|
||||
}
|
||||
|
||||
@@ -95,14 +95,17 @@
|
||||
status: 1,
|
||||
type: "",
|
||||
payAmount: 0,
|
||||
shopId: null,
|
||||
shoppingCart: [],
|
||||
productList: [],
|
||||
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options)
|
||||
if (options.type) { this.type = options.type }
|
||||
if (options.payAmount) { this.payAmount = options.payAmount }
|
||||
if (options.shopId) { this.shopId = options.shopId }
|
||||
if (options.shoppingCart) { this.shoppingCart = JSON.parse(decodeURIComponent(options.shoppingCart)) }
|
||||
if (options.productList) { this.productList = JSON.parse(decodeURIComponent(options.productList)) }
|
||||
},
|
||||
@@ -128,12 +131,14 @@
|
||||
try {
|
||||
let params = {
|
||||
userId: uni.cache.get('userInfo').id,
|
||||
shopId: uni.cache.get('shopId'),
|
||||
status: this.status
|
||||
}
|
||||
if ( this.type == 'confirm_order_coupon' || this.type == 'confirm_order_product' ) {
|
||||
params.orderId = -1;
|
||||
}
|
||||
if ( this.shopId ) {
|
||||
params.shopId = this.shopId;
|
||||
}
|
||||
console.log("params",params)
|
||||
let res = await this.api.conponList(params)
|
||||
if (res.code == 0) {
|
||||
|
||||
Reference in New Issue
Block a user