diff --git a/common/api/market/exchange.js b/common/api/market/exchange.js
new file mode 100644
index 0000000..5ec7b26
--- /dev/null
+++ b/common/api/market/exchange.js
@@ -0,0 +1,18 @@
+// 引入 request 文件
+import request from '@/common/api/request.js'
+import {prveUrl} from './config.js'
+
+export const exchange = (data) => {
+ return request({
+ url: prveUrl + '/user/redemption/exchange',
+ method: 'post',
+ data: data
+ })
+}
+export const redemption = (data) => {
+ return request({
+ url: prveUrl + '/user/redemption',
+ method: 'get',
+ data: data
+ })
+}
diff --git a/common/api/market/limitTimeDiscount.js b/common/api/market/limitTimeDiscount.js
new file mode 100644
index 0000000..9d861d0
--- /dev/null
+++ b/common/api/market/limitTimeDiscount.js
@@ -0,0 +1,11 @@
+// 引入 request 文件
+import request from '@/common/api/request.js'
+import {prveUrl} from './config.js'
+
+export const getConfig = (data) => {
+ return request({
+ url: prveUrl + '/user/limitTimeDiscount',
+ method: 'get',
+ data: data
+ })
+}
diff --git a/common/api/market/suggest.js b/common/api/market/suggest.js
new file mode 100644
index 0000000..a478c40
--- /dev/null
+++ b/common/api/market/suggest.js
@@ -0,0 +1,11 @@
+// 引入 request 文件
+import request from '@/common/api/request.js'
+import {prveUrl} from './config.js'
+
+export const getGoods = (data) => {
+ return request({
+ url: prveUrl + '/user/suggest',
+ method: 'get',
+ data: data
+ })
+}
diff --git a/components/birthday-modal.vue b/components/birthday-modal.vue
index bd0ff83..0d8d86b 100644
--- a/components/birthday-modal.vue
+++ b/components/birthday-modal.vue
@@ -260,7 +260,7 @@ const getCouponPopupAjax = async () => {
try {
const shopId = uni.cache.get("shopId");
const res = await birthdayGiftApi.config({ shopId });
- if (res.length) {
+ if (res&&res.length) {
// 处理有效期格式(固定有效期规则)
allCoupons.value = res.map((item) => {
if (item.validType === "fixed") {
diff --git a/components/goods-price.vue b/components/goods-price.vue
new file mode 100644
index 0000000..407c91f
--- /dev/null
+++ b/components/goods-price.vue
@@ -0,0 +1,56 @@
+
+
+ {{ returnPrice() }}
+
+
+
+ {{ cart.memberPrice || cart.salePrice }}
+
+ {{ cart.salePrice }}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/modal-list.vue b/components/modal-list.vue
index c3e637e..49d1714 100644
--- a/components/modal-list.vue
+++ b/components/modal-list.vue
@@ -51,7 +51,6 @@ const wechatAcQrcode = ref("");
const userinfo = uni.cache.get("userInfo") || {};
const codeVal = ref(userinfo.wechatAcQrcode || "");
function qrcodeResult(e) {
- console.log("qrcodeResult", e);
wechatAcQrcode.value = e;
}
diff --git a/components/official-account.vue b/components/official-account.vue
index d757766..7ac27ba 100644
--- a/components/official-account.vue
+++ b/components/official-account.vue
@@ -1,6 +1,5 @@
-
@@ -32,7 +31,7 @@
-
\ No newline at end of file
diff --git a/components/paymentMethod.vue b/components/paymentMethod.vue
index e9ea361..3a9d438 100644
--- a/components/paymentMethod.vue
+++ b/components/paymentMethod.vue
@@ -162,12 +162,10 @@ const radiovalue = defineModel({
watch(
() => props.disablePayType,
(newval) => {
- console.log('禁止支付方式', newval);
const canUsePayType = paymentMethodList.value.filter((item) => {
return !newval.includes(item.name);
});
- console.log('可用支付方式', canUsePayType);
if (canUsePayType.find((v) => v.type == radiovalue.value.type)) {
return;
}
diff --git a/components/wechat-ac-qrcode.vue b/components/wechat-ac-qrcode.vue
index 9db8e26..3de074f 100644
--- a/components/wechat-ac-qrcode.vue
+++ b/components/wechat-ac-qrcode.vue
@@ -28,7 +28,6 @@ onMounted(() => {
});
const emit = defineEmits(["generate"]);
function qrcodeResult(e) {
- console.log(e);
emit("generate", e.img.tempFilePath);
}
@@ -37,8 +36,10 @@ function qrcodeResult(e) {
.qrcode-box {
position: relative;
overflow: hidden;
+ left: -400px;
width: 1px;
height: 1px;
opacity: 0;
+ z-index: -1;
}
\ No newline at end of file
diff --git a/distribution/index.vue b/distribution/index.vue
new file mode 100644
index 0000000..abbe98b
--- /dev/null
+++ b/distribution/index.vue
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/distribution/static/top_bg.png b/distribution/static/top_bg.png
new file mode 100644
index 0000000..bbccede
Binary files /dev/null and b/distribution/static/top_bg.png differ
diff --git a/pages.json b/pages.json
index e1661c8..a1eb4d4 100644
--- a/pages.json
+++ b/pages.json
@@ -203,45 +203,55 @@
}
},
{
- "path" : "pages/user/member/czzx-shop-list",
- "style" :
- {
- "navigationBarTitleText" : "适用门店"
+ "path": "pages/user/member/czzx-shop-list",
+ "style": {
+ "navigationBarTitleText": "适用门店"
}
}
],
"subPackages": [{
- "root": "user",
- "pages": [{
- "path": "vip/vip",
- "style": {
- "navigationBarTitleText": "",
- "navigationStyle": "custom"
+ "root": "user",
+ "pages": [{
+ "path": "vip/vip",
+ "style": {
+ "navigationBarTitleText": "",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "vip/buy-vip",
+ "style": {
+ "navigationBarTitleText": "",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "score/list",
+ "style": {
+ "navigationBarTitleText": "积分门店"
+ }
+ },
+ {
+ "path": "exchange/index",
+ "style": {
+ "navigationBarTitleText": "",
+ "navigationStyle": "custom"
+ }
}
- },
- {
- "path": "vip/buy-vip",
- "style": {
- "navigationBarTitleText": "",
- "navigationStyle": "custom"
- }
- },
- {
- "path": "score/list",
- "style": {
- "navigationBarTitleText": "积分门店"
- }
- },
- {
- "path": "exchange/index",
- "style": {
- "navigationBarTitleText": "",
- "navigationStyle": "custom"
- }
- }
- ]
- }],
+ ]
+ },
+ {
+ "root": "distribution",
+ "pages": [{
+ "path": "index",
+ "style": {
+ "navigationBarTitleText": "分销中心",
+ "navigationStyle": "custom"
+ }
+ }, ]
+ }
+ ],
"uniIdRouter": {},
"globalStyle": {
"navigationBarTextStyle": "black",
diff --git a/pages/order/components/order-item.vue b/pages/order/components/order-item.vue
index 7537e83..0c4d823 100644
--- a/pages/order/components/order-item.vue
+++ b/pages/order/components/order-item.vue
@@ -1,474 +1,545 @@
-
-
-
-
-
-
-
-
-
-
- {{item.productName}}
- {{item.skuName}}
-
+
+
+
+
+
+ 限时折扣
-
-
- {{item.price}}
-
- ¥{{useVipPrice?(item.memberPrice|| item.price):item.price}}
-
-
- x{{item.num}}
-
-
-
+
+
+
+
+ {{ item.productName }}
+ {{
+ item.skuName
+ }}
+
+
+ 限时折扣:00:00-24:00
+
+
+ 限时折扣:{{ limitDiscount.useStartTime }}-{{
+ limitDiscount.useEndTime
+ }}
+
+
+
-
-
-
-
+
+
+ ¥
+
+ ¥{{ item.salePrice }}
+
+ x{{ item.num }}
+
+
+
+
\ No newline at end of file
diff --git a/pages/order/components/orderInfo.vue b/pages/order/components/orderInfo.vue
index 37ad662..893eddd 100644
--- a/pages/order/components/orderInfo.vue
+++ b/pages/order/components/orderInfo.vue
@@ -45,62 +45,66 @@
- -->
+
-
-
-
-
-
-
-
-
-
-
-
- {{ item.productName }}
- {{
- item.skuName
- }}
-
-
-
- {{ item.price }}
-
- ¥{{
- useVipPrice ? item.memberPrice || item.price : item.price
- }}
-
+
+
+
+
+
+
+
+
+
+ {{ item.productName }}
+ {{
+ item.skuName
+ }}
+
+
+
+ {{ item.price }}
+
+ ¥{{
+ useVipPrice
+ ? item.memberPrice || item.price
+ : item.price
+ }}
+
+
+ x{{ item.num }}
- x{{ item.num }}
-
+
-
+
-¥{{ discountActivity.discountAmount }}-¥{{ cartStore.orderCostSummary.fullReduction.actualAmount }}
@@ -304,7 +308,10 @@
-
+
优惠折扣
{
};
cartStore.setDinnerType(tebtypeList[is_type.value].val);
-
-
// 清空
const bwcclear = () => {
IntegralInputclose();
@@ -833,16 +839,13 @@ function calcDiscountActivity() {
const res = discountActivityRes.value;
const user = uni.cache.get("shopUserInfo");
- //不与会员同享
- if (!res.vipPriceShare && user.isVip) {
- return;
- }
- console.log("calcDiscountActivity:originalPrice", originalPrice.value);
+ const usedFullReductionActivityFullAmount=cartStore.orderCostSummary.fullReduction.usedFullReductionActivityFullAmount;
+ console.log("usedFullReductionActivityFullAmount", usedFullReductionActivityFullAmount);
if (res && res.thresholds && res.thresholds.length > 0) {
const canUseThresholds = res.thresholds
.filter((v) => {
- return originalPrice.value >= v.fullAmount;
+ return usedFullReductionActivityFullAmount >= v.fullAmount;
})
.sort((a, b) => {
return b.discountAmount - a.discountAmount;
@@ -859,9 +862,7 @@ function calcDiscountActivity() {
}
console.log("当前满减门槛", discountActivity.value);
- if (discountActivity.value) {
- cartStore.fullReductionActivities = [discountActivityRes.value];
- }
+
}
async function getDiscountActivity() {
const res = await discountActivityApi.config({
@@ -871,6 +872,8 @@ async function getDiscountActivity() {
return;
}
discountActivityRes.value = res;
+ cartStore.fullReductionActivities = [res];
+
calcDiscountActivity();
}
onMounted(async () => {
@@ -1174,6 +1177,7 @@ onMounted(async () => {
display: flex;
.cover {
+ position: relative;
}
.info {
@@ -1561,4 +1565,19 @@ onMounted(async () => {
.align-center {
align-items: center;
}
+.limitDiscount {
+ background-color: #cc5617;
+ padding: 2rpx 10rpx;
+ white-space: nowrap;
+ text-align: center;
+ position: absolute;
+ top: 0;
+ left: 0;
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #ffffff;
+ border-radius: 20rpx 0rpx 20rpx 0rpx;
+ z-index: 9;
+ color: #fff;
+}
\ No newline at end of file
diff --git a/pages/order/confirm-order.vue b/pages/order/confirm-order.vue
index 3cfe696..7d6cf3b 100644
--- a/pages/order/confirm-order.vue
+++ b/pages/order/confirm-order.vue
@@ -223,7 +223,7 @@
@close="ispws = false"
/>
-
+
+
\ No newline at end of file
diff --git a/pages/product/components/shoppingCartes.vue b/pages/product/components/shoppingCartes.vue
index 04c9986..912e7ea 100644
--- a/pages/product/components/shoppingCartes.vue
+++ b/pages/product/components/shoppingCartes.vue
@@ -1,836 +1,917 @@
-
-
-
-
-
-
-
-
-
- 购物车
-
-
-
- 清空购物车
-
+
+
+
+
+ 购物车
+
+
+ 清空购物车
+
+
+
+
+
+
+ 限时折扣
+
+
+
+
+
+ {{
+ item.cartListinfo.is_temporary == 1
+ ? "临时菜"
+ : item.name
+ }}
+
+
+
+ {{ item.cartListinfo.sku_id == i.id ? i.name : "" }}
+
+
+
+
+
+
+ {{ i.proName }}
+
+
+
+
+
+ ¥
+
-
-
-
-
-
-
-
- {{item.cartListinfo.is_temporary == 1?'临时菜' :item.name }}
-
-
-
- {{item.cartListinfo.sku_id == i.id? i.name:"" }}
-
-
-
-
-
-
- {{i.proName }}
-
-
-
-
-
- ¥
-
-
-
-
- {{item.cartListinfo.sku_id == i.id?(shopInfo.isVip ==1 && shopInfo.isMemberPrice==1?(i.memberPrice || i.salePrice):i.salePrice):''}}
-
-
-
- {{shopInfo.isVip ==1 && shopInfo.isMemberPrice==1?(item.memberPrice || item.salePrice):item.salePrice}}
-
-
-
+
-
-
-
-
-
-
- {{ ifcartNumber(item) }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/product/index.vue b/pages/product/index.vue
index 412b7c2..99011b6 100644
--- a/pages/product/index.vue
+++ b/pages/product/index.vue
@@ -58,6 +58,9 @@
v-for="(item, index) in shopProductList.hots"
:key="index"
>
+ 限时折扣
/{{ item.unitName }}
+
+ ¥{{ item.salePrice }}
@@ -189,16 +196,21 @@
>¥
-
- {{
- shopInfo.isVip == 1 && shopInfo.isMemberPrice == 1
- ? item.memberPrice || item.salePrice
- : item.salePrice
- }}
-
+
+
+
+
/{{ item.unitName }}
+ ¥{{ item.salePrice }}
@@ -357,12 +369,16 @@
mode=""
>
+
TOP{{ index1 + 1 }}
+ 限时折扣
{{ item1.name }}
@@ -417,16 +433,21 @@
¥
-
- {{
- shopInfo.isVip == 1 && shopInfo.isMemberPrice == 1
- ? item1.memberPrice || item1.salePrice
- : item1.salePrice
- }}
-
+
+
+
/{{ item1.unitName }}
+ ¥{{ item1.salePrice }}
+
扫码关注公众号
@@ -259,10 +259,8 @@ import * as rechargeApi from "@/common/api/market/recharge.js";
import { pointsShopList } from "@/common/api/account/points.js";
-const qrcode = ref("");
function qrcodeResult(res) {
- console.log("qrcodeResult", res);
qrcode.value = res
}
@@ -470,7 +468,14 @@ onShow(() => {
getData();
});
+const qrcode = ref("");
+const showQrcode = computed(() => {
+ const followIndex = uni.cache.get("followIndex");
+ if ( followIndex == "mine" && qrcode.value) {
+ return true;
+ }
+});
\ No newline at end of file
diff --git a/user/exchange/components/confirm.vue b/user/exchange/components/confirm.vue
index 04d9acd..374c414 100644
--- a/user/exchange/components/confirm.vue
+++ b/user/exchange/components/confirm.vue
@@ -11,21 +11,21 @@
确认信息
-
+
兑换码包含内容如下:
店铺
- 店铺名称
+ {{data.shopName}}
名称
- 10张券兑换码
+ {{data.name}}
-
+
优惠券
- 优惠券名称*2、优惠券名称*1
+ {{data.couponInfoList.map(item=>item.title+'*'+item.num).join('、')}}
取消
@@ -39,6 +39,13 @@