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 @@ + + + + + \ 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 @@ + \ 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 @@ \ 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 @@