diff --git a/package/pages/zysc/index/commoditydetail.vue b/package/pages/zysc/index/commoditydetail.vue
index fcecfd7..6c3f931 100644
--- a/package/pages/zysc/index/commoditydetail.vue
+++ b/package/pages/zysc/index/commoditydetail.vue
@@ -18,8 +18,9 @@
特惠价
¥
{{ ordersMoney }}
- ¥{{ ordersList.originalPrice }}
+ ¥{{ ordersList.originalPrice }}
+ {{sadNum}}
+
@@ -140,7 +141,7 @@
宝贝详情
-
+
@@ -182,7 +183,7 @@
-
+
返回首页
@@ -337,6 +338,7 @@
number: 0,
Maxnumber: -1,
numberMoney: 0,
+ sadNum:0,
shengji: '',
pinglunList: [],
getQun: '立即领券',
@@ -647,6 +649,7 @@
this.ordersList = {};
this.ordersMoney = res.data.memberPrice;
this.numberMoney = res.data.memberPrice;
+ this.sadNum = res.data.sad;
this.ordersList = res.data;
if (res.data.attr.length > 0) {
this.attrValue = [];
@@ -989,21 +992,8 @@
\ No newline at end of file
diff --git a/package/pages/zysc/index/index.vue b/package/pages/zysc/index/index.vue
index 45c1dde..a37f730 100644
--- a/package/pages/zysc/index/index.vue
+++ b/package/pages/zysc/index/index.vue
@@ -509,7 +509,7 @@
1) {
console.log(url);
uni.navigateTo({
- url:url
+ url
});
} else {
//#ifndef H5
diff --git a/package/pages/zysc/member/order.vue b/package/pages/zysc/member/order.vue
index d76e9d6..13cc188 100644
--- a/package/pages/zysc/member/order.vue
+++ b/package/pages/zysc/member/order.vue
@@ -84,6 +84,15 @@
+
+
+ 盛安豆兑换
+
+
+
+ 您拥有盛安豆:{{mysad}}
+
@@ -133,11 +142,15 @@
groupPinkId: '',
mobile: '',
jianMoney: 0,
+ mysad:0,
+ sad:null,
list: {},
addressId: '',
className: '',
userByinvitationId: '',
- checkAddress: false
+ checkAddress: false,
+ oldPrice:0,
+ dhbl:100,
}
},
onShow() {
@@ -181,10 +194,8 @@
},
methods: {
WaySel(e) {
- console.log(e);
// this.sendId = this.WayListTwo[e.detail.value].id;
this.sendName = this.WayList[e.detail.value];
- console.log('this.sendName---->',this.sendName);
if (this.sendName === '快递') {
this.sendWay = 1;
@@ -201,7 +212,6 @@
getAddressList(addressId) {
if (addressId) {
this.$Request.getT('/app/address/selectAddressByAddressId?addressId=' + this.addressId).then(res => {
- console.log(res)
if (res.code == 0 && res.data) {
this.checkAddress = true;
this.detail = res.data.city + '' + res.data.district + '' + res.data.detailsAddress;
@@ -233,7 +243,6 @@
// 获取默认地址
addressMy() {
this.$Request.getT('/app/address/selectAddressById').then(res => {
- console.log(res)
if (res.code == 0 && res.data) {
this.checkAddress = true;
@@ -269,6 +278,13 @@
uni.showLoading({
title: '加载中...'
});
+
+ this.$Request.get("/app/artificer/selectArtificerMoney").then(res => {
+ if (res.code == 0) {
+ this.mysad = res.data.mysad ? res.data.mysad : 0; //盛安豆总数
+ }
+ });
+
this.$Request.getT('/goods/find?id=' + id).then(res => {
if (res.status === 0) {
this.list = res.data;
@@ -276,6 +292,7 @@
this.attrValuecoverImg = res.data.coverImg;
if (this.checkString == '') {
this.price = parseFloat(this.list.sku[0].skuPrice);
+ this.oldPrice = parseFloat(this.list.sku[0].skuPrice);
this.money = parseFloat(this.list.sku[0].skuPrice);
this.maxNumber = this.list.sku[0].stock ? this.list.sku[0].stock : 1;
}
@@ -292,6 +309,8 @@
}
uni.hideLoading();
});
+
+
},
// getAddressList() {
// let userId = this.$queue.getData('userId');
@@ -364,8 +383,10 @@
payMoney: this.price + this.postagePrice,
relationId: this.userByinvitationId,
detailJson: this.checkString,
- commissionPrice: commissionPrice
+ commissionPrice: commissionPrice,
+ sfrxdh:this.sad
}
+ console.log('data--->',data);
this.$Request.postJson('/app/orders/save', data).then(res => {
if (res.status === 0) {
uni.redirectTo({
@@ -388,6 +409,7 @@
// this.price = parseFloat(this.price - this.money).toFixed(1);
this.price = parseFloat(this.numFilter(parseFloat(this.price) - parseFloat(this.money)));
}
+ this.changeSadPrice();
},
jia() {
let number = this.number + 1
@@ -398,6 +420,23 @@
} else {
this.$queue.showToast('没库存啦,只能买这么多了!');
}
+ this.changeSadPrice();
+ },
+ changeSadPrice(){
+ if(this.sad>this.mysad){
+ this.sad = this.mysad
+ this.price = parseFloat(this.oldPrice * this.number - this.sad / this.dhbl);
+ if(this.price<0){
+ this.price = 0;
+ }
+ this.$queue.showToast('最大只可以输入【'+this.mysad+'】盛安豆');
+ }else{
+ this.price = parseFloat(this.oldPrice * this.number - this.sad / this.dhbl);
+ if(this.price<0){
+ this.price = 0;
+ this.sad = this.oldPrice * this.number * this.dhbl
+ }
+ }
}
}
}
diff --git a/package/pages/zysc/member/orderdetail.vue b/package/pages/zysc/member/orderdetail.vue
index c398724..8f92428 100644
--- a/package/pages/zysc/member/orderdetail.vue
+++ b/package/pages/zysc/member/orderdetail.vue
@@ -35,14 +35,19 @@
style="font-size: 30upx;color: #333333;width: 90%;height: 80upx;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;">
{{list.title}}
-
+
¥ {{list.price}}
×{{list.number}}
+
+ 优惠: ¥{{(list.price*list.number-list.payMoney).toFixed(2)}}
+
+
+ style="font-size: 26upx;color: #333333;padding: 0 0 10upx 20upx;width: 100%;text-align: right;">
总金额: ¥{{list.payMoney}}
@@ -139,7 +144,7 @@
-
+
-
+
@@ -409,7 +409,7 @@
/* #endif */
/* #ifdef H5 */
position: fixed;
- top: 0;
+ top: 44px;
left: 0;
z-index: 999;
/* #endif */