diff --git a/src/pages.json b/src/pages.json index 9023092..c8eef2b 100644 --- a/src/pages.json +++ b/src/pages.json @@ -118,6 +118,20 @@ "navigationBarTitleText": "商户品牌详情", "disableScroll": true } + }, + { + "path": "merchant-activity", + "style": { + "navigationBarTitleText": "商户活动", + "disableScroll": true + } + }, + { + "path": "coupon-list", + "style": { + "navigationBarTitleText": "优惠券列表", + "disableScroll": true + } } ] }, diff --git a/src/pages/merchant/coupon-list.vue b/src/pages/merchant/coupon-list.vue new file mode 100644 index 0000000..75bbeeb --- /dev/null +++ b/src/pages/merchant/coupon-list.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/src/pages/merchant/merchant-activity.vue b/src/pages/merchant/merchant-activity.vue new file mode 100644 index 0000000..9241872 --- /dev/null +++ b/src/pages/merchant/merchant-activity.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/src/pages/pay/scanPay.vue b/src/pages/pay/scanPay.vue index 227ad61..82f2292 100644 --- a/src/pages/pay/scanPay.vue +++ b/src/pages/pay/scanPay.vue @@ -30,7 +30,7 @@ 支 付 - + @@ -59,6 +59,7 @@ const walletList = ref([]) // 钱包列表 const selectWallet = ref({}) // 当前选中的钱包 const orderInfo = ref({}) // 订单信息 const amount = ref("") // 键盘输入的金额 +const numberKeyboardShow = ref(true) onLoad(async (options: any) => { uni.showLoading({ title: "加载中..." }) @@ -68,6 +69,7 @@ onLoad(async (options: any) => { scanPayState.mchId = mchId scanPayState.orderId = orderId scanPayState.action = action + numberKeyboardShow.value = false await getMchDetail(mchId) await getOrderInfo() const order = orderInfo.value @@ -75,6 +77,14 @@ onLoad(async (options: any) => { return } + const { actId } = options + if (!isEmpty(actId)) { + amount.value = "1.00" + scanPayState.mchName = "活动支付" + numberKeyboardShow.value = false + return + } + const { id } = options if (!isEmpty(id)) { scanPayState.mchId = id diff --git a/src/pages/tabbar/my.vue b/src/pages/tabbar/my.vue index a0d848e..8e82ed3 100644 --- a/src/pages/tabbar/my.vue +++ b/src/pages/tabbar/my.vue @@ -326,6 +326,7 @@ onLoad(async () => { await userApi.userRole() await isMallMchUser() + await isMchUser() // 获取存储中的用户信息 storage.getUserInfo() @@ -336,6 +337,11 @@ const isMallMchUser = async () => { if (data) state.menuList.unshift({ text: "共富商城商品管理", icon: "/static/icon/service_4.png", path: "/pages/prosperity-shop/goods-manage" }) } +const isMchUser = async () => { + const { data } = await userApi.isMerchant() + // 商家查看优惠券列表 + if (data) state.menuList.unshift({ text: "优惠券列表", icon: "/static/icon/service_1.png", path: "/pages/merchant/coupon-list" }) +} onShow(() => { // 获取存储中的用户信息 diff --git a/src/sheep/api/act-cancel.ts b/src/sheep/api/act-cancel.ts index 799925b..684f855 100644 --- a/src/sheep/api/act-cancel.ts +++ b/src/sheep/api/act-cancel.ts @@ -1,34 +1,33 @@ import request from "@/sheep/utils/request" export default { - /** - * app领取优惠券 - * 不用穿参数 - */ - appGet: (data: any) => - request({ - url: "/act/cancel-item/app/get", - method: "POST", - data, - }), - /** - * app查询用户的唯一优惠券 - * 不用穿参数 - */ - appFindUnique: (params: any) => - request({ - url: "/act/cancel-item/app/find-unique", - method: "GET", - params, - }), - /** - * app查询本店优惠券列表 - * @param params.actStatus 核销类型 - */ - appMchPage: (params: any) => - request({ - url: "/act/cancel-item/app/mch/page", - method: "GET", - params, - }), -} \ No newline at end of file + /** + * app领取优惠券 + * 不用传参数 + */ + appGet: (data: any) => + request({ + url: "/wallet/act/cancel-item/app/get", + method: "POST", + data, + }), + /** + * app查询用户的唯一优惠券 + * 不用传参数 + */ + appFindUnique: () => + request({ + url: "/wallet/act/cancel-item/app/find-unique", + method: "GET", + }), + /** + * app查询本店优惠券列表 + * @param params.actStatus 核销类型 + */ + appMchPage: (params: any) => + request({ + url: "/wallet/act/cancel-item/app/mch/page", + method: "GET", + params, + }), +} diff --git a/src/static/page/activity-card-bg.png b/src/static/page/activity-card-bg.png new file mode 100644 index 0000000..5f9212b Binary files /dev/null and b/src/static/page/activity-card-bg.png differ