From 3523cc3a21e6bf22eca83f5127787ff1b315c95e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A7=A6=E6=98=9F=E6=98=9F?= <605893810@qq.com>
Date: Sun, 14 Jun 2026 22:23:14 +0800
Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E4=BC=98=E6=83=A0=E5=88=B8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/address.vue | 2 +
components/shop/ping-item.vue | 66 ++-
components/winning_record.vue | 4 +-
pages/mine_package/mine_order/mine_order.vue | 5 +-
.../mine_order_info/mine_order_info.vue | 227 +++-----
.../order_submit/order_submit.vue | 513 ++++++++----------
pages/other_package/get_prize/get_prize.vue | 6 +
.../other_package/productInfo/productInfo.vue | 412 ++++++--------
pages/rwa_package/shop copy/sort-shop.vue | 116 ----
pages/rwa_package/shop copy/you-shop.vue | 173 ------
.../fen-shop.vue => shop/fen-shop copy.vue} | 0
pages/rwa_package/shop/fen-shop.vue | 279 ++++++----
pages/supply_chain/supply_chain.vue | 13 +-
utils/config.js | 9 +-
14 files changed, 688 insertions(+), 1137 deletions(-)
delete mode 100644 pages/rwa_package/shop copy/sort-shop.vue
delete mode 100644 pages/rwa_package/shop copy/you-shop.vue
rename pages/rwa_package/{shop copy/fen-shop.vue => shop/fen-shop copy.vue} (100%)
diff --git a/components/address.vue b/components/address.vue
index 04de092..e944095 100644
--- a/components/address.vue
+++ b/components/address.vue
@@ -50,9 +50,11 @@ export default {
const res = await getAddress();
if (res && res.bizcode === 100) {
this.addressList = res.data;
+ console.log("我是秦星星addressList", this.addressList);
}
},
checkAddress(item) {
+ console.log("我是秦星星", item);
this.selectAddress = item;
this.$emit("valueFunc", item);
},
diff --git a/components/shop/ping-item.vue b/components/shop/ping-item.vue
index 9ed9c05..f8d89a8 100644
--- a/components/shop/ping-item.vue
+++ b/components/shop/ping-item.vue
@@ -1,16 +1,20 @@
-
+
{{ obj.title }}
-
+
+
+
+ {{ obj.buyDeductionValue }}抵扣券
+ +{{ obj.price }}元
+
+ 兑换
+
+
+
¥{{ obj.price }}
已售{{ obj.sales }}件
@@ -41,7 +45,8 @@ export default {
background: #fff;
border-radius: 12rpx;
overflow: hidden;
- margin-bottom: 0; /* 瀑布流父层控制间距,这里清零 */
+ margin-bottom: 0;
+ /* 瀑布流父层控制间距,这里清零 */
}
.top-img {
@@ -75,15 +80,48 @@ export default {
text-overflow: ellipsis;
white-space: nowrap;
}
-.text-30 { font-size: 30rpx; }
-.text-28 { font-size: 28rpx; }
-.text-24 { font-size: 24rpx; }
-.text-zu { color: #333; }
-.text-zi { color: #7A35F6; }
-.text-bold { font-weight: bold; }
+
+.text-30 {
+ font-size: 30rpx;
+}
+
+.text-28 {
+ font-size: 28rpx;
+}
+
+.text-24 {
+ font-size: 24rpx;
+}
+
+.text-zu {
+ color: #333;
+}
+
+.text-zi {
+ color: #7A35F6;
+}
+
+.text-bold {
+ font-weight: bold;
+}
+
.flex-r-lr {
display: flex;
justify-content: space-between;
align-items: center;
}
+
+.coupon-line {
+ .sold {
+ width: 98rpx;
+ height: 64rpx;
+ background: linear-gradient(270deg, #B164FB 0%, #7934F6 100%);
+ border-radius: 8rpx;
+ font-size: 30rpx;
+ color: #FFFFFF;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+}
\ No newline at end of file
diff --git a/components/winning_record.vue b/components/winning_record.vue
index 88cbf81..dfb96e5 100644
--- a/components/winning_record.vue
+++ b/components/winning_record.vue
@@ -21,9 +21,9 @@
-
+
去领取
- 已领取
+ 已领取
(快递动态跟进请复制单号至[快递100官网] 查询)
共{{ item.buyNum }}件,合计¥{{ item.sumAmount }}
-->
- 运费:¥{{ item.postage }},商品总价:¥{{item.sumAmount}}
- 共{{ item.buyNum }}件,合计¥{{ item.sumAmount + item.postage }}
+ 共{{ item.buyNum }}件,合计抵扣券{{item.buyDeductionValue}} +¥{{item.sumAmount}}
+ 运费:¥{{ item.postage }},商品总价:¥{{item.sumAmount}}
+ 共{{ item.buyNum }}件,合计¥{{ item.sumAmount + item.postage }}
+
- 取消原因:超时未支付
+ 取消原因:超时未支付
-
+
订单编号:
{{
orderInfo.orderNum
}}
-
+
@@ -81,12 +47,7 @@
-
+
{{ orderInfo.name }}
{{ orderInfo.phone }}
@@ -102,42 +63,25 @@
-
+
{{ pItem.title }}
{{ pItem.goodsSpece }}
-
+
{{ dItem }}
- ¥{{ pItem.goodsAmount }}
+ ¥{{ pItem.goodsAmount }}
x{{ pItem.buyNum }}
@@ -147,13 +91,8 @@
{{ pItem.expressNo }}
-
+
@@ -166,25 +105,27 @@
商品总价
- ¥{{ orderInfo.sumAmount }}
+ ¥{{ orderInfo.sumAmount }}
+ 抵扣券{{ orderInfo.buyDeductionValue }} +¥{{ orderInfo.sumAmount }}
快递运费
¥{{ orderInfo.postage }}
+
+
+ 抵扣券
+ {{ orderInfo.buyDeductionValue }}抵扣券
+
+
- 平台优惠优惠券
+ 平台优惠优惠券
-¥0.00
+
应付款
- ¥{{ orderInfo.sumAmount + orderInfo.postage }}
+ ¥{{ orderInfo.sumAmount + orderInfo.postage }}
@@ -208,77 +149,45 @@
- 您的订单已接入蚂蚁链溯源
- 扫描二维码或复制下方链接查看溯源信息
-
+ 您的订单已接入蚂蚁链溯源
+ 扫描二维码或复制下方链接查看溯源信息
+
+
{{
`https://chaininsight.antdigital.com/search?unionId=2647&projectName=VBGAKNJB&content=${orderInfo.antChainHash}`
}}
-
+
+
+ @click.stop="previewQrcode(`https://chaininsight.antdigital.com/search?unionId=2647&projectName=VBGAKNJB&content=${orderInfo.antChainHash}`)">
-
+
支付方式
{{ getValue(wayOption, wayForm.payway) }}
-
+
-
+
- 去付款
+ 去付款
- 确认收货
+ 确认收货
@@ -287,38 +196,22 @@
-
+
-
+
-
+
- ¥{{ orderInfo.amount }}
+ ¥{{ orderInfo.amount }}
-
+
- 请输入支付密码
+ 请输入支付密码
@@ -465,7 +325,9 @@ export default {
}
return num;
},
+
},
+
components: {
Address,
Header,
@@ -493,7 +355,7 @@ export default {
selectAddress: {}, // 收件地址选择
wayOption: [],
isShowBalance: false,
- ji: 0,
+ isPoints: 0, // 是否积分积分支付
sed: null,
curPay: null,
user: null,
@@ -501,32 +363,40 @@ export default {
content: "您未设置支付密码,请先去设置支付密码",
type: "1",
defaultAddress: "",
+ isCoupon: false, // 是否优惠卷
+ couponData: {}, // 优惠卷数据
+ allOrderInfo: {}, // 所有订单信息
+ buyCouponvalue: 0, // 实付抵扣券积分
+ buyCouponAmount: 0, // 实付抵扣券对应的钱
};
},
async onLoad(option) {
// const ids = option.ids;
- await this.addressList();
- if (option.address) {
- this.defaultAddress = option.address;
- }
+ await this.addressList();
+ if (option.address) {
+ this.defaultAddress = option.address;
+ }
+ console.log('-------', option.isCoupon)
+ if (option.isCoupon) {
+ this.isCoupon = option.isCoupon;
+ }
if (option.sed) {
- this.ji = 1;
+ this.isPoints = 1;
this.sed = JSON.parse(option.sed);
- await this.addressList();
- // console.log('addressListOne',this.addressListOne)
- // if(this.addressListOne && this.addressListOne.length){
- // this.addressShow = true;
- // }
+ await this.addressList();
+ // console.log('addressListOne',this.addressListOne)
+ // if(this.addressListOne && this.addressListOne.length){
+ // this.addressShow = true;
+ // }
this.getOrderTwo();
}
-
-
+
if (option.ids) {
this.ids = option.ids;
this.getOrder();
}
-
- console.log("参数---", option,this.defaultAddress);
+
+ console.log("参数---", option, this.defaultAddress);
const addressShowPop = option.addressShow;
if (addressShowPop && addressShowPop !== "null") {
@@ -541,10 +411,19 @@ export default {
this.getWayOption();
this.getUserInfo();
},
- mounted() {},
+ mounted() { },
methods: {
getValue,
assembleAddress,
+ // 实付抵扣券
+ onBuyCouponvalue(currentQuantity) {
+ this.buyCouponvalue = Number((this.allOrderInfo.buyDeductionValue * (currentQuantity || 1)).toFixed(2)) || 0;
+
+ },
+ // 实付抵扣券对应的钱
+ onBuyCouponAmount() {
+ this.buyCouponAmount = Number((this.sed.goodsNum * this.allOrderInfo.buyDeduction).toFixed(2)) || 0;
+ },
async addressList() {
const res = await getAddress();
if (res && res.bizcode === 100) {
@@ -618,18 +497,24 @@ export default {
},
async getWayOption() {
let parmas = {};
- if (this.ji) {
+ if (this.isPoints) {
parmas["types"] = "4";
} else {
parmas["types"] = "1,2,3";
}
+ console.log('parmas-----', this.isCoupon)
+
+ if (this.isCoupon) {
+ parmas["types"] = "1,2,3";
+ parmas.isDeduction = true;
+ }
const result = await getSupportPay(parmas);
if (result && result.bizcode === 100) {
const data = result.data || [];
- const amount = this.orderInfo.amount;
- let flag = data.some((item) =>
- ["wechat", "alipay"].includes(item.type)
- );
+ // const amount = this.orderInfo.amount;
+ // let flag = data.some((item) =>
+ // ["wechat", "alipay"].includes(item.type)
+ // );
// 没有支付宝和微信支付
// if (flag) {
// this.isShowBalance = false;
@@ -637,8 +522,9 @@ export default {
// const balanceFlag = data.some(item => item.type === "balance" && item.balance < amount);
// this.isShowBalance = balanceFlag;
// }
- this.wayOption = data;
- console.log("getWayOption", this.wayOption);
+ this.wayOption = data.filter(item => item.type !== "vcoin");
+ this.couponData = data.filter(item => item.type === "vcoin")[0] || {};
+ console.log("getWayOption", this.wayOption, this.couponData);
}
},
async getOrder() {
@@ -697,14 +583,17 @@ export default {
const params = {
id: this.sed.id,
};
+ if(this.isCoupon){
+ params.type = -1;
+ }
const resp = await getGoodsDetail(params);
if (resp && resp.bizcode === 100) {
const data = resp.data;
- this.ji = data.type == 3 ? 1 : 0;
+ this.isPoints = data.type == 3 ? 1 : 0;
this.orderInfo = {
address: null,
- amount: this.sed.goodsNum * this.sed.specsId.price,
- postage:0,
+ amount: this.sed.goodsNum * this.sed.specsId.price,
+ postage: 0,
shops: [
{
addrTimes: [
@@ -742,20 +631,23 @@ export default {
},
],
};
- console.log('this.defaultAddress',this.defaultAddress,this.addressListOne)
- if(this.defaultAddress && this.addressListOne && this.addressListOne.length){
- let arr = this.addressListOne.filter(i=>i.id == this.defaultAddress);
- if(arr.length){
- this.orderInfo.address = arr[0];
- }
- }
- if(!this.orderInfo.address && this.addressListOne && this.addressListOne.length){
- this.orderInfo.address = this.addressListOne[0];
- }
+ console.log('this.defaultAddress', this.defaultAddress, this.addressListOne)
+ if (this.defaultAddress && this.addressListOne && this.addressListOne.length) {
+ let arr = this.addressListOne.filter(i => i.id == this.defaultAddress);
+ if (arr.length) {
+ this.orderInfo.address = arr[0];
+ }
+ }
+ if (!this.orderInfo.address && this.addressListOne && this.addressListOne.length) {
+ this.orderInfo.address = this.addressListOne[0];
+ }
+ this.allOrderInfo = data;
this.orderInfo.paymentMethod = null;
- // if(this.addressListOne && this.addressListOne.length){
- // this.orderInfo.address = this.addressListOne[0];
- // }
+ this.onBuyCouponvalue(this.sed.goodsNum || 1);
+ this.onBuyCouponAmount();
+ // if(this.addressListOne && this.addressListOne.length){
+ // this.orderInfo.address = this.addressListOne[0];
+ // }
}
// const params = {
// cartIds: ids,
@@ -827,24 +719,29 @@ export default {
pIndex
].totalPrice = currentTotalPrice.toFixed(2);
this.orderInfo.amount = currentAmount.toFixed(2);
-
- const resp = await getSettleList({cartIds: this.ids});
- if (resp && resp.bizcode === 100) {
- const data = resp.data;
- const shops = data.shops;
- if (shops && shops.length !== 0) {
- shops.map((item) => {
- item.addrTimes.map((addItem) => {
- addItem.remark = null;
+ if (this.isCoupon || this.sed) {
+ this.onBuyCouponvalue(currentQuantity);
+ this.onBuyCouponAmount();
+ return;
+ }
+
+ const resp = await getSettleList({ cartIds: this.ids });
+ if (resp && resp.bizcode === 100) {
+ const data = resp.data;
+ const shops = data.shops;
+ if (shops && shops.length !== 0) {
+ shops.map((item) => {
+ item.addrTimes.map((addItem) => {
+ addItem.remark = null;
+ });
});
- });
+ }
+ data.shops = shops;
+ data.paymentMethod = null; // 支付方式
+ this.orderInfo = data;
}
- data.shops = shops;
- data.paymentMethod = null; // 支付方式
- this.orderInfo = data;
}
- }
},
// 获取备注
@@ -915,8 +812,18 @@ export default {
return (this.tipsShow = true);
}
+ console.log("orderInfo----", arr);
if (arr.length) {
- if (arr[0].type == "balance" || arr[0].type == "redpacket") {
+ if (this.isCoupon) {
+ if (this.buyCouponvalue > this.couponData.balance) {
+ this.$refs.uToastRef.show({
+ type: "error",
+ message: "您当前优惠券金额不足",
+ });
+ return;
+ }
+ this.show = true;
+ } else if (arr[0].type == "balance" || arr[0].type == "redpacket") {
this.show = true;
} else {
this.passPay();
@@ -933,16 +840,20 @@ export default {
remark: JSON.stringify(this.getRemark()), //备注信息'[{"sid":"店铺ID","rmk":"备注内容"},{"sid":"店铺ID","rmk":"备注内容"}]'
};
let resp = null;
+ console.log("orderInfo----", this.sed);
if (this.sed) {
if (
this.orderInfo.paymentMethod == "balance" ||
- this.orderInfo.paymentMethod == "redpacket"
+ this.orderInfo.paymentMethod == "redpacket" ||
+ this.isCoupon
) {
params["password"] = CryptoJS.MD5(this.payPwd).toString();
}
params["goodsId"] = this.sed.id;
params["specsId"] = this.sed.specsId.id;
params["goodsNum"] = this.orderInfo.shops[0].addrTimes[0].goods[0].num;
+ if (this.isCoupon) params.payway2 = 'vcoin';
+
resp = await settlementOrder(params);
} else {
params["cartIds"] = this.ids;
@@ -1086,6 +997,7 @@ export default {
background-color: #fff;
border-radius: 16rpx;
margin-top: 24rpx;
+
.price-view-two {
width: 100%;
height: 108rpx;
@@ -1094,11 +1006,13 @@ export default {
justify-content: flex-end;
align-items: center;
}
+
.price-line {
width: 100%;
min-height: 1rpx;
background-color: #ececec;
}
+
.price-view {
width: 100%;
height: 72rpx;
@@ -1106,6 +1020,7 @@ export default {
flex-direction: row;
justify-content: space-between;
}
+
.way-option {
height: 112rpx;
width: 100%;
@@ -1114,11 +1029,13 @@ export default {
align-items: center;
border-bottom: 1rpx solid #ececec;
justify-content: space-between;
+
.way-option-item {
height: 112rpx;
display: flex;
flex-direction: row;
align-items: center;
+
image {
width: 48rpx;
height: 48rpx;
@@ -1126,6 +1043,7 @@ export default {
}
}
}
+
.money {
text-align: center;
font-size: 68rpx;
@@ -1133,6 +1051,7 @@ export default {
position: relative;
background-color: #fff;
height: 180rpx;
+
.close {
position: absolute;
top: 20rpx;
@@ -1141,12 +1060,14 @@ export default {
font-size: 28rpx;
}
}
+
.mid-tips {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
+
.tips {
color: $u-tips-color;
margin: 20rpx 0;
@@ -1154,6 +1075,7 @@ export default {
background-color: #fff;
width: 100%;
}
+
.order_submit_warp {
background-color: $app-bj;
height: calc(100vh - 200rpx);
@@ -1276,8 +1198,7 @@ export default {
width: calc(100% - 160rpx);
}
- .content_info_left_total {
- }
+ .content_info_left_total {}
.content_info_title {
width: 460rpx;
diff --git a/pages/other_package/get_prize/get_prize.vue b/pages/other_package/get_prize/get_prize.vue
index f1798d7..7d06347 100644
--- a/pages/other_package/get_prize/get_prize.vue
+++ b/pages/other_package/get_prize/get_prize.vue
@@ -114,6 +114,7 @@ export default {
const city = province && province.length !== 0 ? await this.getRegion(province[0].id) : [];
const area = city && city.length !== 0 ? await this.getRegion(city[0].id) : [];
this.regionColumns = [nation, province, city, area];
+ console.log("我是秦星星regionColumns", this.regionColumns);
} else {
this.regionColumns = [[], [], [], []];
}
@@ -150,6 +151,7 @@ export default {
picker
} = e;
const selectData = this.regionColumns[columnIndex][index];
+ if (!selectData) return;
const resultData = await this.getRegion(selectData.id);
if (resultData && resultData.length !== 0) {
const index = columnIndex + 1;
@@ -174,6 +176,7 @@ export default {
}
})
this.form.regionStr = regionStr;
+ console.log("我是秦星星regionStr", regionStr,regionId);
if (regionId && regionId.length !== 0) {
this.form.countryId = regionId[0] ? regionId[0] : null;
this.form.provinceId = regionId[1] ? regionId[1] : null;
@@ -225,7 +228,9 @@ export default {
if (!params.areaId || params.areaId === 0) {
delete params.areaId;
}
+ console.log("params", params,selectAddress);
delete params.regionStr;
+ delete params.id;
const res = await editAddress(params);
if (res && res.bizcode === 100) {
const goodsParams = {
@@ -254,6 +259,7 @@ export default {
// 地址选中
getAddressValueFunc(item) {
this.selectAddress = item;
+ console.log("地址选中item", item);
},
// 地址选中OK
addressOk() {
diff --git a/pages/other_package/productInfo/productInfo.vue b/pages/other_package/productInfo/productInfo.vue
index afea4b7..32e0b71 100644
--- a/pages/other_package/productInfo/productInfo.vue
+++ b/pages/other_package/productInfo/productInfo.vue
@@ -3,73 +3,52 @@
-
-
+ ">
+
+
+ {{ orderInfo.buyDeductionValue }}抵扣券
+ +{{ orderInfo.minPrice }}元
+
+
+ 兑后抵扣券不退
+
+
+
¥
- {{ orderInfo.minPrice }} - {{ orderInfo.maxPrice }}
+ {{ orderInfo.minPrice }} - {{
+ orderInfo.maxPrice }}
{{
orderInfo.minPrice
}}
¥{{ orderInfo.adPrice }}
-
-
+
+
@@ -85,34 +64,21 @@
-
+
规格
{{ selectSpecificationTempl.combTypes || "暂未选择规格" }}
-
+
收货地址
-
+
请填写地址
{{ adressInfo }}
@@ -138,21 +104,11 @@
购物保障
-
+
品质严保
-
+
极速退款
@@ -163,9 +119,7 @@
退货提示
- 拆封后影响品质”或“影响二次销售的”不予退货。
+ 拆封后影响品质”或“影响二次销售的”不予退货。
@@ -186,67 +140,35 @@
-
+
首页
-
+
咨询
-
-
+
+
购物车
- 加入购物车
- 立即购买
+
+ 加入购物车
+
+
+ 立即购买
+
-
+
-
+
@@ -263,43 +185,36 @@
-
+
-
+
+
+ {{ orderInfo.buyDeductionValue }}抵扣券
+ +{{ selectSpecificationTempl.price }}元
+ +{{ orderInfo.minPrice }}元
+
+
¥
-
+
{{ selectSpecificationTempl.price }}
{{ orderInfo.minPrice }}
- - {{ orderInfo.maxPrice }}
+ - {{ orderInfo.maxPrice }}
- 优惠卷{{ orderInfo.couponPrice }}
+
+ 优惠券{{
+ orderInfo.couponPrice }}
- ¥{{ orderInfo.adPrice }}
- 优惠卷已优惠¥{{ orderInfo.couponPrice }}
+ ¥{{ orderInfo.adPrice }}
+ 优惠卷已优惠¥{{
+ orderInfo.couponPrice }}
库存
@@ -310,25 +225,16 @@
-
+
{{ item.type }}
-
+
{{ oItem.n }}
@@ -344,26 +250,14 @@
+
- 去支付
- 加入购物车
+ 去支付
+
+ 加入购物车
+
@@ -372,12 +266,7 @@
-
+
{{
@@ -390,17 +279,13 @@
}}
- 复制号码
+ 复制号码
取消
@@ -411,61 +296,36 @@
温馨提示
- 该商家暂未开通供应链权限,请联系供应链客服开通授权。
+ 该商家暂未开通供应链权限,请联系供应链客服开通授权。
{{ CLOUD_SERVICE_PHONE_NUMBER }}
- 立即联系
+ 立即联系
-
+
-
+
-
+
@@ -526,7 +386,7 @@ export default {
serviceShow: false, // 联系客服弹框
openShow: false,
source: null, // 来源:供应链,自营
- ji: 0,
+ isShowCart: 0,
selectAddress: {}, // 选择的地址
postage: null, // 邮费
adressInfo: "",
@@ -542,10 +402,12 @@ export default {
tmpImg: "",
isShareUrl: false,
isSplash: false,
+ isCoupon: false, // 是否是优惠券商品
+ curAmount: 0, // 当前人剩余优惠券金额
};
},
onBackPress(options) {
- console.log("我是侧滑",options)
+ console.log("我是侧滑", options)
// #ifdef APP-PLUS
if (options.from === 'backbutton' && this.isSplash) {
// 1. 阻止默认 pop
@@ -557,6 +419,10 @@ export default {
},
onLoad(options) {
const id = options.id;
+ this.isCoupon = options.isPar;
+ if (this.isCoupon && options.curAmount) {
+ this.curAmount = options.curAmount;
+ }
const source = options.source;
this.isSplash = options.isSplash;
console.log("isSplash", this.isSplash == "true");
@@ -588,7 +454,7 @@ export default {
this
);
},
-
+
onHide() {
timer && clearTimeout(timer);
timer = null;
@@ -599,9 +465,9 @@ export default {
},
methods: {
assembleAddress,
- limit999(n) {
- return n > 999 ? '999+' : String(n);
-},
+ limit999(n) {
+ return n > 999 ? '999+' : String(n);
+ },
onOpenApp() {
//https://download.tbmall.xin/1002/apppacket/20251113/20251113183449483.apk
@@ -965,10 +831,13 @@ export default {
const params = {
id: this.id,
};
+ if(this.isCoupon){
+ params.type = -1;
+ }
const resp = await getGoodsDetail(params);
if (resp && resp.bizcode === 100) {
const data = resp.data;
- this.ji = data.type == 3 ? 1 : 0;
+ this.isShowCart = data.type == 3 ? 1 : 0;
// 商品图
if (data.goodsGraph) {
this.swiperList = data.goodsGraph.split(",");
@@ -1034,7 +903,7 @@ export default {
return;
}
const source = this.source;
- if (type == "n" && this.ji == 1) {
+ if (type == "n" && (this.isShowCart == 1 || this.isCoupon)) {
type = "buy";
}
console.log("afsdfsd", source, type);
@@ -1075,6 +944,9 @@ export default {
const params = {
id: this.id,
};
+ if(this.isCoupon){
+ params.type = -1;
+ }
const resp = await getGoodsSpecs(params);
if (resp && resp.bizcode === 100) {
const data = resp.data;
@@ -1189,12 +1061,24 @@ export default {
goodsNum: this.orderInfo.quantity, // 商品数量
};
console.log("selectTempl", selectTempl);
- if (this.ji == 1) {
+ if (this.isShowCart == 1 || this.isCoupon) {
params["specsId"] = selectTempl;
+ console.log("----------", params, this.isCoupon, this.orderInfo.buyDeductionValue, this.orderInfo.quantity, this.curAmount);
+
+ const buyCouponvalue = Number((this.orderInfo.buyDeduction * (this.orderInfo.quantity || 1)).toFixed(2)) || 0;
+
+ if (this.isCoupon && buyCouponvalue > this.curAmount) {
+ uni.showToast({
+ title: `您当前优惠券金额不足`,
+ icon: "none", // 可选 success/loading/none
+ duration: 2000, // 持续时长,单位ms
+ });
+ return;
+ }
uni.navigateTo({
url: `/pages/order_package/order_submit/order_submit?sed=${JSON.stringify(
params
- )}&address=${this.selectAddress?.id}`,
+ )}&address=${this.selectAddress?.id}&isCoupon=${this.isCoupon}`,
});
return;
}
@@ -1308,6 +1192,24 @@ export default {
text-decoration-line: line-through;
margin-left: 10rpx;
}
+
+ &.buy_deduction {
+ width: 100%;
+ display: flex;
+ justify-content: space-between;
+
+ .buy_deduction_value {
+ font-weight: 500;
+ font-size: 26rpx;
+ color: #7A35F6;
+ margin-left: 10rpx;
+ }
+
+ .buy_deduction_label {
+ font-size: 24rpx;
+ color: #E88900;
+ }
+ }
}
.content_data_title {
@@ -1338,6 +1240,7 @@ export default {
padding: 32rpx;
box-sizing: border-box;
margin-top: 24rpx;
+
.tui-list {
width: 100%;
height: 104rpx;
@@ -1347,6 +1250,7 @@ export default {
justify-content: space-between;
align-items: center;
margin-top: 24rpx;
+
.tui-box {
width: 64rpx;
min-height: 100%;
@@ -1354,6 +1258,7 @@ export default {
flex-direction: column;
align-items: center;
justify-content: space-between;
+
image {
width: 64rpx;
height: 64rpx;
@@ -1536,7 +1441,7 @@ export default {
.product_content {
margin-left: 10rpx;
- display: grid;
+ // display: grid;
}
.price_content_warp {
@@ -1578,6 +1483,7 @@ export default {
font-weight: 500;
font-size: 24rpx;
color: #808080;
+ margin-top: 16rpx;
}
}
@@ -1668,6 +1574,7 @@ export default {
}
.open_Show {
+
/* 弹出层形式的广告 */
.uni-banner {
display: flex;
@@ -1731,6 +1638,7 @@ export default {
}
}
}
+
.hideCanvasView {
width: 100%;
height: 100%;
diff --git a/pages/rwa_package/shop copy/sort-shop.vue b/pages/rwa_package/shop copy/sort-shop.vue
deleted file mode 100644
index c4c8dfb..0000000
--- a/pages/rwa_package/shop copy/sort-shop.vue
+++ /dev/null
@@ -1,116 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/rwa_package/shop copy/you-shop.vue b/pages/rwa_package/shop copy/you-shop.vue
deleted file mode 100644
index 01f0a97..0000000
--- a/pages/rwa_package/shop copy/you-shop.vue
+++ /dev/null
@@ -1,173 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- 信任桥优选
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/rwa_package/shop copy/fen-shop.vue b/pages/rwa_package/shop/fen-shop copy.vue
similarity index 100%
rename from pages/rwa_package/shop copy/fen-shop.vue
rename to pages/rwa_package/shop/fen-shop copy.vue
diff --git a/pages/rwa_package/shop/fen-shop.vue b/pages/rwa_package/shop/fen-shop.vue
index 9e7cdbe..c6dc89a 100644
--- a/pages/rwa_package/shop/fen-shop.vue
+++ b/pages/rwa_package/shop/fen-shop.vue
@@ -1,29 +1,39 @@
-
+
-
-
-
+
+
+ 抵扣券专区: {{ balanceData.curAmount || 0 }}
+
-
+
+ {{ item.label }}
+
-
-
- 信任桥兑换
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -32,139 +42,206 @@
import Header from '@/components/common/header.vue';
import TopSafe from '@/components/common/top-safe.nvue'
import MyBtn from '@/components/common/my-btn.vue'
-import FenItem from '@/components/shop/fen-item.vue'
import { searchList } from '@/api/product.js';
-import { getCarouselImage } from '@/api/common.js';
+import { getAcctBalance } from "@/api/finance.js";
+
+import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
+import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue";
+import PingItem from "@/components/shop/ping-item.vue";
export default {
- components: { Header, TopSafe,MyBtn,FenItem },
+ mixins: [MescrollMixin],
+ components: { Header, TopSafe, MyBtn, PingItem, MescrollUni, },
data() {
return {
- dataList:[],
- swiperList: ['https://cdn.uviewui.com/uview/swiper/swiper1.png'],
+ dataList: [],
+ swiperList: [
+ { key: 0, label: '全部', minDeduction: 0, maxDeduction: 999999 },
+ { key: 1, label: '<300积分', minDeduction: 0, maxDeduction: 299.99 },
+ { key: 2, label: '300-500积分', minDeduction: 300, maxDeduction: 499.99 },
+ { key: 3, label: '500-1000积分', minDeduction: 500, maxDeduction: 999.99 },
+ { key: 4, label: '>1000积分', minDeduction: 1000, maxDeduction: 999999 },
+ ],
+ currentItem: 0,
+ downOption: {
+ auto: false,
+ textColor: "#333",
+ bgColor: "rgba(0,0,0,0)",
+ },
+ upOption: {
+ auto: false,
+ page: {
+ size: 10,
+ },
+ noMoreSize: 10,
+ empty: {
+ tip: `空空如也`,
+ },
+ textColor: "#333",
+ bgColor: "rgba(0,0,0,0)",
+ },
+ leftList: [],
+ rightList: [],
+ mescroll: null,
+ balanceData: {},
};
},
- onShow() {
- },
onLoad() {
this.init();
},
methods: {
init() {
this.getSearchList();
- this.getCarouselImage();
+ this.getAcctBalance();
},
- async getCarouselImage(){
- const params={
- pageUi:6,
- }
- const resp = await getCarouselImage(params);
- if(resp && resp.bizcode === 100){
- const data = resp.data || [];
- this.swiperList = data.length !== 0 ? data.map(obj=>obj.carouselImage) : [];
+ async getAcctBalance() {
+ const resp = await getAcctBalance();
+ let data = [];
+ if (resp && resp.bizcode === 100) {
+ data = resp.data || [];
}
+ this.balanceData = data.filter(item => item.categoty === 'vcoin')[0] || {};
},
- async getSearchList(){
+
+ onClickItem(item) {
+ this.currentItem = item.key;
+ this.getSearchList(item);
+ },
+
+ mescrollInit(mescroll) {
+ this.mescroll = mescroll;
+ },
+ upCallback(page) {
+ let currentSwiperItem = this.swiperList.find(item => item.key === this.currentItem) || {};
+
+ let params = {
+ type: -1,
+ page: page.num,
+ pageSize: page.size,
+ minDeduction: currentSwiperItem.minDeduction || 0,
+ maxDeduction: currentSwiperItem.maxDeduction || 999999,
+ };
+ searchList(params).then((res) => {
+ let curPageLen = res.data.length;
+ if (page.num === 1) this.dataList = [];
+ this.dataList = this.dataList.concat(res.data);
+
+ this.waterfall();
+ this.mescroll.endBySize(curPageLen, res.total);
+ });
+ },
+ downCallback() {
+ this.$nextTick(() => {
+ this.mescroll && this.mescroll.resetUpScroll();
+ });
+ },
+
+ async getSearchList(item = {}) {
const params = {
- type:3,
- page:1,
- pageSize:99,
+ type: -1,
+ page: 1,
+ pageSize: 99,
+ minDeduction: item.minDeduction || 0,
+ maxDeduction: item.maxDeduction || 999999,
}
const resp = await searchList(params);
- if(resp && resp.bizcode === 100){
+ if (resp && resp.bizcode === 100) {
this.dataList = resp.data || [];
+ this.waterfall();
}
},
- onJumpShop(id){
+
+ waterfall() {
+ this.leftList = this.dataList
+ .map((item, index) => {
+ if (index % 2 == 0) return item;
+ return null;
+ })
+ .filter(Boolean);
+ this.rightList = this.dataList
+ .map((item, index) => {
+ if (index % 2 != 0) return item;
+ return null;
+ })
+ .filter(Boolean);
+ console.log(this.leftList, this.rightList);
+ },
+ onJumpShop(id) {
uni.navigateTo({
- url: '/pages/other_package/productInfo/productInfo?id='+id,
+ url: '/pages/other_package/productInfo/productInfo?id=' + id + '&isPar=true&curAmount=' + this.balanceData.curAmount || 0,
})
},
- onShare(){
+ onShare() {
uni.navigateTo({
- url: '/pages/other_package/invite_friends/invite_friends',
+ url: '/pages/other_package/invite_friends/invite_friends',
})
+ },
+ goback() {
+ uni.navigateBack()
}
}
}
diff --git a/pages/supply_chain/supply_chain.vue b/pages/supply_chain/supply_chain.vue
index e369f1f..c9405c9 100644
--- a/pages/supply_chain/supply_chain.vue
+++ b/pages/supply_chain/supply_chain.vue
@@ -35,16 +35,7 @@
@init="mescrollInit"
:fixed="false"
>
-
+
@@ -115,6 +106,7 @@ export default {
},
leftList: [],
rightList: [],
+ mescroll: null,
};
},
onLoad() {
@@ -226,7 +218,6 @@ export default {