diff --git a/src/App.vue b/src/App.vue
index ab297ac..dcc7a76 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -21,8 +21,8 @@ export default {
},
onHide() {
console.log("App Hide");
- const _this = this;
- wx.offAppRoute(_this.watchRouter)
+ // const _this = this;
+ // wx.offAppRoute(_this.watchRouter)
},
methods: {
async watchRouter(route) {
diff --git a/src/pages.json b/src/pages.json
index 39cbc7e..5a69bb8 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -92,6 +92,13 @@
"navigationBarTitleText": "账号密码登录",
"disableScroll": true
}
+ },
+ {
+ "path": "pages/root/web-view",
+ "style": {
+ "navigationBarTitleText": "webview页面",
+ "disableScroll": true
+ }
}
],
"subPackages": [
@@ -440,6 +447,17 @@
}
}
]
+ },
+ {
+ "root": "pages/third-app",
+ "pages": [
+ {
+ "path": "happyMall",
+ "style": {
+ "navigationBarTitleText": "美好商城"
+ }
+ }
+ ]
}
],
"globalStyle": {
diff --git a/src/pages/pay/payComplete.vue b/src/pages/pay/payComplete.vue
index 8ada9c2..06a7d6c 100644
--- a/src/pages/pay/payComplete.vue
+++ b/src/pages/pay/payComplete.vue
@@ -9,11 +9,11 @@
fill="#2BCDA3" p-id="1709" data-spm-anchor-id="a313x.search_index.0.i2.beb13a81SVstw0"
class="selected">
- 支付成功
+ 支付成功
- ¥{{ scanPayData.payPrice }}
+ ¥{{ scanPayData.payPrice }}
diff --git a/src/pages/pay/scanPay.vue b/src/pages/pay/scanPay.vue
index 05bd5b7..f2edf39 100644
--- a/src/pages/pay/scanPay.vue
+++ b/src/pages/pay/scanPay.vue
@@ -1,31 +1,29 @@
-
+
- {{ scanPayState.mchName }}
-
¥
{{ displayAmount }}
- 选择支付钱包:
+ 选择支付钱包:
-
- {{ v.walletTypeName }}
+
+ {{ v.walletTypeName }}
-
+
余额:
{{ hooks.useMoney(v.balance) }} 元
- 支 付
+ 支 付
diff --git a/src/pages/prosperity-shop/goods-detail.vue b/src/pages/prosperity-shop/goods-detail.vue
index 296314e..5bcf761 100644
--- a/src/pages/prosperity-shop/goods-detail.vue
+++ b/src/pages/prosperity-shop/goods-detail.vue
@@ -1,5 +1,5 @@
-
+
@@ -21,8 +21,9 @@
约省
- {{ displayPrice(Number(goodsDetail.originalPrice) -
- Number(goodsDetail.spuPrice), "") }}
+
+ {{ displayPrice(Number(goodsDetail.originalPrice) - Number(goodsDetail.spuPrice), "") }}
+
元
diff --git a/src/pages/prosperity-shop/goods-search.vue b/src/pages/prosperity-shop/goods-search.vue
index 5c6aa9c..6e605ed 100644
--- a/src/pages/prosperity-shop/goods-search.vue
+++ b/src/pages/prosperity-shop/goods-search.vue
@@ -1,30 +1,32 @@
-
+
-
+
+ fontSize="28" :showClear="true" :focus="false" placeholder="请输入商品名称" :focus-highlight="false"
+ color="#ECF4F9" width="100%">
- 搜
- 索
+
+ 搜索
+
-
{{ v.title }}
- {{ v.status == "0" ? "在售" :
- "未售" }}
+
+ {{ v.status == "0" ? "在售" : "未售" }}
+
单位 {{ v.unit }}
@@ -38,10 +40,12 @@
¥
- {{ displayPrice(v.spuPrice, "").split(".")[0]
- }}.
- {{ displayPrice(v.spuPrice, "").split(".")[1]
- }}
+
+ {{ displayPrice(v.spuPrice, "").split(".")[0] }}.
+
+
+ {{ displayPrice(v.spuPrice, "").split(".")[1] }}
+
diff --git a/src/pages/prosperity-shop/shop-detail.vue b/src/pages/prosperity-shop/shop-detail.vue
index 77917ec..634fac4 100644
--- a/src/pages/prosperity-shop/shop-detail.vue
+++ b/src/pages/prosperity-shop/shop-detail.vue
@@ -1,11 +1,11 @@
-
+
-
({
})
const mchDetail = computed(() => state.mchDetail)
-const { scrollDetail, onScroll, filterStyle, searchStyle } = useShopDetailScroll()
+const { scrollDetail, onScroll, visible, filterStyle, searchStyle } = useShopDetailScroll()
const { totPrice, totalCount, skuAddToCart, getShopCart, goSettlement } = useCartBuy()
onLoad(async (option: any) => {
diff --git a/src/pages/prosperity-shop/use-shop-detail-scroll.ts b/src/pages/prosperity-shop/use-shop-detail-scroll.ts
index da4a1aa..b556567 100644
--- a/src/pages/prosperity-shop/use-shop-detail-scroll.ts
+++ b/src/pages/prosperity-shop/use-shop-detail-scroll.ts
@@ -11,8 +11,14 @@ interface scrollDetail {
export default function useShopDetailScroll() {
const scrollDetail = ref({} as scrollDetail)
+ const visible = ref(true)
const onScroll = (e: any) => {
+ if (e.detail.scrollTop > 250) {
+ visible.value = false
+ } else {
+ visible.value = true
+ }
scrollDetail.value = e.detail
}
@@ -41,5 +47,5 @@ export default function useShopDetailScroll() {
}
})
- return { scrollDetail, onScroll, filterStyle, searchStyle }
+ return { scrollDetail, visible, onScroll, filterStyle, searchStyle }
}
diff --git a/src/pages/root/dashboard.vue b/src/pages/root/dashboard.vue
index 439ad53..478aa45 100644
--- a/src/pages/root/dashboard.vue
+++ b/src/pages/root/dashboard.vue
@@ -48,7 +48,10 @@ onHide(() => {
})
const doMenu = async (v: any) => {
- console.log("tabbarStore:", tabbarStore);
+ if (v.page.includes("thirdApp")) {
+ router.jump("/pages/third-app/happyMall")
+ return
+ }
await tabbarStore.componetTabbarList(v.page)
tabbarStore.jumpFirstTabbar()
}
diff --git a/src/pages/root/web-view.vue b/src/pages/root/web-view.vue
new file mode 100644
index 0000000..c2704a7
--- /dev/null
+++ b/src/pages/root/web-view.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/tabbar/coopMerchant.vue b/src/pages/tabbar/coopMerchant.vue
index 206a91e..2e361b6 100644
--- a/src/pages/tabbar/coopMerchant.vue
+++ b/src/pages/tabbar/coopMerchant.vue
@@ -61,7 +61,7 @@ const toDetail = async (v: any) => {
-
+
@@ -72,8 +72,9 @@ const toDetail = async (v: any) => {
fontSize="28" :showClear="true" :focus="false" placeholder="请输入商家名称" width="100%"
:focus-highlight="false" color="#ECF4F9">
- 搜
- 索
+
+ 搜索
+
diff --git a/src/pages/tabbar/my.vue b/src/pages/tabbar/my.vue
index 44a5e04..1c628e9 100644
--- a/src/pages/tabbar/my.vue
+++ b/src/pages/tabbar/my.vue
@@ -1,14 +1,25 @@
-
-
-
-
- {{ state.userInfo?.sysUser?.name }}
- ID {{ state.userInfo?.sysUser?.userId }}
+
+
+
+
+
+
+ {{ state.userInfo?.sysUser?.name }}
+
+
+
+ {{ dayjs(state.userInfo.sysUser.birthday).format("MM-DD") }}
+
+
+
+ ID {{ state.userInfo?.sysUser?.userId }}
+
请先登录
@@ -42,6 +53,8 @@
+
+
是否核销该活动兑换券?
@@ -56,7 +69,7 @@
-
+
-
+
+ fontSize="28" :showClear="true" :focus="false" placeholder="请输入商家名称" :focus-highlight="false"
+ color="#ECF4F9" width="100%">
- 搜
- 索
+
+ 搜索
+
diff --git a/src/pages/tabbar/selfMerchant.vue b/src/pages/tabbar/selfMerchant.vue
index 111795a..3dd0dc2 100644
--- a/src/pages/tabbar/selfMerchant.vue
+++ b/src/pages/tabbar/selfMerchant.vue
@@ -34,7 +34,7 @@ const toDetail = async (v: any) => {
-
+
diff --git a/src/sheep/components/number-keyboard.vue b/src/sheep/components/number-keyboard.vue
index 5f8eb62..d811045 100644
--- a/src/sheep/components/number-keyboard.vue
+++ b/src/sheep/components/number-keyboard.vue
@@ -1,19 +1,19 @@
-
-
-
+
{{ key }}
-
+
diff --git a/src/sheep/hooks/use-scan-code.ts b/src/sheep/hooks/use-scan-code.ts
index 86fe779..0ec1260 100644
--- a/src/sheep/hooks/use-scan-code.ts
+++ b/src/sheep/hooks/use-scan-code.ts
@@ -1,59 +1,28 @@
import { router } from ".."
-import { APPENV } from "../constant"
-import { getAppInfo, isDevEnv } from "../utils/app"
+import { getUrlParamsObj } from "../utils/app"
export function useScanCode(actModalShow) {
async function scanCodeAction(): Promise {
- const appInfo = await getAppInfo()
- if (isDevEnv() && appInfo != APPENV.APP) {
- // 开发环境模拟扫码
- // const testQrCode = "eyJpZCI6IjE5MDU4ODg4NjQ0NTQ1MzMxMjEiLCJuYW1lIjoi6ICB5Y6/5bqc6aOf5aCCIn0=" // 测试线上-老县府食堂-收款二维码
- // const testQrCode = "eyJoYXJkRG9vcklkIjoiMTkxNDIxNTYwODQzNzQxMTg0MSIsImNhYmluZXRObyI6IjEifQ==" // 测试线上-智能柜-收款二维码
- // const testQrCode = "eyJpZCI6IjE5MDU4MTY3NTEwNDM0NTI5MzAiLCJuYW1lIjoi5paw5Y6/5bqc6LaF5biCIn0=" // 邓本地-测试环境-新县府超市收款二维码
- // const testQrCode = "eyJoYXJkRG9vcklkIjoiMTkxMzE1NzA4MDQxODI5NTgwOSIsImNhYmluZXRObyI6IjEifQ==" // 邓本地-测试单门智能柜柜门二维码
- // const testQrCode = "http://192.168.101.45:8889/h5/#/pages/pay/scanPay?id=1905816751043452930&name=测试新县府超市" // 邓本地-测试环境-新县府超市收款二维码
- // const testQrCode = "http://192.168.101.45:8889/h5/#/pages/pay/scanPay?hardDoorId=1913157080418295809&cabinetNo=1" // 测试智能柜柜门二维码
- const testQrCode = "eyJjYW5jZWxJZCI6IjE5ODQyNDA4MzM5NDMyMDc5MzcifQ==" // 测试商户活动核销
- uni.showModal({ content: "开发环境不是浙政钉和诗画环境,扫码仅供测试" })
- return Promise.resolve(testQrCode)
- }
- if (appInfo == APPENV.APP) {
- const scanResult = await new Promise((resolve, reject) => {
- uni.scanCode({
- success: (res) => {
- console.log("APP扫码成功:", JSON.stringify(res))
- resolve(res.result || "")
- },
- fail: (err) => {
- console.error("APP扫码失败", JSON.stringify(err))
- resolve("")
- },
- })
+ const scanResult = await new Promise((resolve, reject) => {
+ uni.scanCode({
+ success: (res) => {
+ console.log("uniapp扫码成功:", JSON.stringify(res))
+ resolve(res.result || "")
+ },
+ fail: (err) => {
+ console.error("uniapp扫码失败", JSON.stringify(err))
+ resolve("")
+ },
})
- return scanResult
- }
- if (appInfo == APPENV.ZZD) {
- // 浙政钉扫码
- const res: any = await (window as any).dd.scan({ type: "all" })
- return res.text || ""
- }
- if (appInfo == APPENV.SH) {
- // 诗画扫码
- const res = await (window as any).CP2.showScanQr({ needResult: 1 })
- if (res.code == 1) return res.data.qrCode || ""
- return ""
- }
- uni.showToast({ title: "当前环境未知", icon: "none" })
+ })
+ return scanResult
}
// 处理url扫码结果
function processUrlScanResult(url: string) {
if (!url) return
- const searchParams = new URL(url).searchParams
- const paramsObj: Record = {}
- searchParams.forEach((value, key) => (paramsObj[key] = value))
- const { hardDoorId, cabinetNo, action, id, name } = paramsObj
-
+ const searchParams = getUrlParamsObj(url)
+ const { hardDoorId, cabinetNo, action, id, name } = searchParams
// 智能柜扫码
if (hardDoorId && cabinetNo) {
router.jump("/pages/cabinet/buy", { hardDoorId, cabinetNo })
@@ -61,7 +30,7 @@ export function useScanCode(actModalShow) {
}
// 扫收款机上生成的码支付
if (action === "harQrCodeScanPay") {
- const { mchId, orderId } = paramsObj
+ const { mchId, orderId } = searchParams
router.jump("/pages/pay/scanPay", { action, mchId, orderId })
return
}
diff --git a/src/sheep/stores/tabbar.ts b/src/sheep/stores/tabbar.ts
index e176edb..b13d905 100644
--- a/src/sheep/stores/tabbar.ts
+++ b/src/sheep/stores/tabbar.ts
@@ -70,7 +70,7 @@ const TABBAR_CONSTANT: Array = [
},
{
pagePath: "/pages/tabbar/prosperityShopMchList",
- text: "共富商城",
+ text: "共富商家",
iconPath: "/static/tabbar/prosperity-shop.png",
selectedIconPath: "/static/tabbar/prosperity-shop-select.png",
launchParam: ["prosperityShopMchList"],
diff --git a/src/sheep/utils/app.ts b/src/sheep/utils/app.ts
index 268e679..2f0ad55 100644
--- a/src/sheep/utils/app.ts
+++ b/src/sheep/utils/app.ts
@@ -38,3 +38,13 @@ export const getLaunchParam = (url?: string) => {
const params = getUrlParams(url)
return params?.launchParam
}
+
+export const getUrlParamsObj = (url?: string): Record => {
+ if (!url) {
+ const pages = getCurrentPages()
+ const currentPage = pages[pages.length - 1]
+ url = currentPage?.route ?? ""
+ }
+ const params = getUrlParams(url)
+ return params
+}
diff --git a/src/static/icon/birthday.png b/src/static/icon/birthday.png
new file mode 100644
index 0000000..c383e4e
Binary files /dev/null and b/src/static/icon/birthday.png differ
diff --git a/src/static/icon/birthday_coupon.jpg b/src/static/icon/birthday_coupon.jpg
new file mode 100644
index 0000000..16d674c
Binary files /dev/null and b/src/static/icon/birthday_coupon.jpg differ
diff --git a/src/static/page/happy-mall.png b/src/static/page/happy-mall.png
new file mode 100644
index 0000000..16751c6
Binary files /dev/null and b/src/static/page/happy-mall.png differ