diff --git a/static/js/request.js b/static/js/request.js
index cfb2213..39bf379 100644
--- a/static/js/request.js
+++ b/static/js/request.js
@@ -3,10 +3,10 @@ import store from '@/store';
// 定义 API URL
// const DEV_API_URL = 'https://api.cloud.sz-trip.com';
-const DEV_API_URL = 'https://api.sutenong.com'
-const PROD_API_URL = 'https://api.sutenong.com';
-// const DEV_API_URL = 'https://swsz.api.js-dyyj.com';
-// const PROD_API_URL = 'https://swsz.api.js-dyyj.com';
+// const DEV_API_URL = 'https://api.sutenong.com'
+// const PROD_API_URL = 'https://api.sutenong.com';
+const DEV_API_URL = 'https://swsz.api.js-dyyj.com';
+const PROD_API_URL = 'https://swsz.api.js-dyyj.com';
const NEWAPIURL = process.env.NODE_ENV === 'development' ? DEV_API_URL : PROD_API_URL;
// 获取token
diff --git a/subPackages/order/cartOrder.vue b/subPackages/order/cartOrder.vue
index e310039..0f63543 100644
--- a/subPackages/order/cartOrder.vue
+++ b/subPackages/order/cartOrder.vue
@@ -86,7 +86,11 @@
运费:
- ¥{{item.post/100}}
+
+ {{item.postPrice/100}}
+ ¥{{item.post/100}}
+
收货人信息:
diff --git a/subPackages/techan/cartOrder.vue b/subPackages/techan/cartOrder.vue
index 7408480..7d2d1d0 100644
--- a/subPackages/techan/cartOrder.vue
+++ b/subPackages/techan/cartOrder.vue
@@ -117,7 +117,9 @@
运费
- {{!info.post?'免邮':info.post/100}}
+ {{info.postPrice/100}}
+ {{!info.post?'免邮':info.post/100}}
@@ -403,25 +405,56 @@ export default {
})
let param = []
+ let consignee_id = null
tempList.forEach(v=>{
- param.push({sku_id: v.sInfo.id, num: v.sInfo.buyNum, consignee_id:v.contacts.id})
+ // param.push({sku_id: v.sInfo.id, num: v.sInfo.buyNum, consignee_id:v.contacts.id})
+ param.push({
+ type: v.pInfo.type,
+ product_id: v.pInfo.id,
+ sku_id: v.sInfo.id,
+ product_num: v.sInfo.buyNum,
+ use_type: 1,
+ post: v.contacts.id,
+ consignee_id: v.contacts.id,
+ })
+ consignee_id = v.contacts.id
})
- let data = JSON.stringify(param);
+ // 店铺满减前
// console.log(data);
- this.flag = false;
+ // this.flag = false;
- Promise.all(param.map(v=>_this.Post({...v},"/api/order/get_post_price"))).then(res=>{
- if (res) {
- console.log("promise" ,res)
- for(let i=0;i_this.Post({...v},"/api/order/get_post_price"))).then(res=>{
+ // if (res) {
+ // console.log("promise" ,res)
+ // for(let i=0;i{this.flag = true;})
+ // }
+ // }).finally(()=>{this.flag = true;})
+
+ // 店铺满减后
+ if (consignee_id && param.length>0) {
+ let data = {
+ product_list: param,
+ consignee_id:consignee_id
+ };
+ this.Post({
+ method: 'POST',
+ data: JSON.stringify(data),
+ consignee_id:consignee_id
+ },"/api/order/get_post_price_new").then(res=>{
+ let resData = res.data || []
+ resData.forEach((x,i) => {
+ tempList[i].post = x.price - x.discount_price
+ tempList[i].postPrice = x.price
+ tempList[i].postDiscount = x.discount_price
+ })
+ this.$forceUpdate()
+ })
+ }
},
-
plus(sku) {
this.$nextTick(() => {
this.$store.commit("choseCoupon","");
@@ -585,6 +618,8 @@ export default {
} else {
param.use_type = 1
param.post = info.contacts.id
+ param.postPrice = param.postPrice
+ param.postDiscount = param.postDiscount
}
}
if (info.is_user_post == 2) {
diff --git a/subPackages/techan/cartOrder1.vue b/subPackages/techan/cartOrder1.vue
index 4b3a96c..7c838c5 100644
--- a/subPackages/techan/cartOrder1.vue
+++ b/subPackages/techan/cartOrder1.vue
@@ -117,7 +117,9 @@
运费
- {{!info.post?'免邮':info.post/100}}
+ {{info.postPrice/100}}
+ {{!info.post?'免邮':info.post/100}}
@@ -394,23 +396,55 @@ export default {
})
let param = []
+ let consignee_id = null
tempList.forEach(v=>{
- param.push({sku_id: v.sInfo.id, num: v.sInfo.buyNum, consignee_id:v.contacts.id})
+ // param.push({sku_id: v.sInfo.id, num: v.sInfo.buyNum, consignee_id:v.contacts.id})
+ param.push({
+ type: v.pInfo.type,
+ product_id: v.pInfo.id,
+ sku_id: v.sInfo.id,
+ product_num: v.sInfo.buyNum,
+ use_type: 1,
+ post: v.contacts.id,
+ consignee_id: v.contacts.id,
+ })
+ consignee_id = v.contacts.id
})
- let data = JSON.stringify(param);
+ // 店铺满减前
// console.log(data);
- this.flag = false;
+ // this.flag = false;
- Promise.all(param.map(v=>_this.Post({...v},"/api/order/get_post_price"))).then(res=>{
- if (res) {
- console.log("promise" ,res)
- for(let i=0;i_this.Post({...v},"/api/order/get_post_price"))).then(res=>{
+ // if (res) {
+ // console.log("promise" ,res)
+ // for(let i=0;i{this.flag = true;})
+ // }
+ // }).finally(()=>{this.flag = true;})
+
+ // 店铺满减后
+ if (consignee_id && param.length>0) {
+ let data = {
+ product_list: param,
+ consignee_id:consignee_id
+ };
+ this.Post({
+ method: 'POST',
+ data: JSON.stringify(data),
+ consignee_id:consignee_id
+ },"/api/order/get_post_price_new").then(res=>{
+ let resData = res.data || []
+ resData.forEach((x,i) => {
+ tempList[i].post = x.price - x.discount_price
+ tempList[i].postPrice = x.price
+ tempList[i].postDiscount = x.discount_price
+ })
+ this.$forceUpdate()
+ })
+ }
},
plus(sku) {
@@ -557,8 +591,6 @@ export default {
},
// 预定
order() {
-
-
let goods = [];
for(let info of this.orderList) {
let param = {
@@ -578,6 +610,8 @@ export default {
} else {
param.use_type = 1
param.post = info.contacts.id
+ param.postPrice = param.postPrice
+ param.postDiscount = param.postDiscount
}
}
if (info.is_user_post == 2) {
diff --git a/subPackages/techan/detail.vue b/subPackages/techan/detail.vue
index fdf1f9d..a94bff7 100644
--- a/subPackages/techan/detail.vue
+++ b/subPackages/techan/detail.vue
@@ -38,7 +38,10 @@
{{ info.price / 100 }}
/份
- 已售{{info.sales_number || 0}}份
+
+ 全店满{{supplierInfo.sill_money/100||0}}包邮 |
+ 已售{{info.sales_number || 0}}份
+
{{ info.title }}
diff --git a/subPackages/techan/order.vue b/subPackages/techan/order.vue
index 481bf79..62fdaf8 100644
--- a/subPackages/techan/order.vue
+++ b/subPackages/techan/order.vue
@@ -89,7 +89,9 @@
运费
- {{!info.post?'免邮':info.post/100}}
+ {{info.postPrice/100}}
+ {{!info.post?'免邮':info.post/100}}
@@ -365,23 +367,55 @@ export default {
})
let param = []
+ let consignee_id = null
tempList.forEach(v=>{
- param.push({sku_id: v.sInfo.id, num: v.sInfo.buyNum, consignee_id:v.contacts.id})
+ // param.push({sku_id: v.sInfo.id, num: v.sInfo.buyNum, consignee_id:v.contacts.id})
+ param.push({
+ type: v.pInfo.type,
+ product_id: v.pInfo.id,
+ sku_id: v.sInfo.id,
+ product_num: v.sInfo.buyNum,
+ use_type: 1,
+ post: v.contacts.id,
+ consignee_id: v.contacts.id,
+ })
+ consignee_id = v.contacts.id
})
- let data = JSON.stringify(param);
+ // 店铺满减前
// console.log(data);
- this.flag = false;
+ // this.flag = false;
- Promise.all(param.map(v=>_this.Post({...v},"/api/order/get_post_price"))).then(res=>{
- if (res) {
- console.log("promise" ,res)
- for(let i=0;i_this.Post({...v},"/api/order/get_post_price"))).then(res=>{
+ // if (res) {
+ // console.log("promise" ,res)
+ // for(let i=0;i{this.flag = true;})
+ // }
+ // }).finally(()=>{this.flag = true;})
+
+ // 店铺满减后
+ if (consignee_id && param.length>0) {
+ let data = {
+ product_list: param,
+ consignee_id:consignee_id
+ };
+ this.Post({
+ method: 'POST',
+ data: JSON.stringify(data),
+ consignee_id:consignee_id
+ },"/api/order/get_post_price_new").then(res=>{
+ let resData = res.data || []
+ resData.forEach((x,i) => {
+ tempList[i].post = x.price - x.discount_price
+ tempList[i].postPrice = x.price
+ tempList[i].postDiscount = x.discount_price
+ })
+ this.$forceUpdate()
+ })
+ }
},
plus(sku) {
diff --git a/subPackages/user/rewardsCenter.vue b/subPackages/user/rewardsCenter.vue
new file mode 100644
index 0000000..e17fde4
--- /dev/null
+++ b/subPackages/user/rewardsCenter.vue
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+