diff --git a/custom.page.js b/custom.page.js index 6c7b14a..ad179ad 100644 --- a/custom.page.js +++ b/custom.page.js @@ -5,8 +5,8 @@ import path from 'path' */ const config = { pages: './src/pages', - // pagesInclude: ['jlgh/coupon.vue', 'jlgh/redeem.vue'], - pagesInclude: ['jlgh/index.vue'], + pagesInclude: ['jlgh/coupon.vue', 'jlgh/redeem.vue'], + // pagesInclude: ['jlgh/index.vue'], // pagesInclude: ['jlgh/login.vue'], // pagesInclude: ['jlgh'], } diff --git a/env/.env b/env/.env index a0e6761..03af758 100644 --- a/env/.env +++ b/env/.env @@ -5,7 +5,7 @@ VITE_UNI_APPID = 'H57F2ACE4' VITE_WX_APPID = 'wxa2abb91f64032a2b' # h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base -VITE_APP_PUBLIC_BASE = ./ +VITE_APP_PUBLIC_BASE = './' # 测试线上 VITE_SERVER_BASEURL = 'https://gateway.dev.cdlsxd.cn' # 曾徐平 diff --git a/index.html b/index.html index 87ef4bf..78f000e 100644 --- a/index.html +++ b/index.html @@ -40,27 +40,27 @@ } } - document.addEventListener('click', function () { - if (isShow) return false - if (clickCount < 6) { - clickCount++ - console.log(`Clicked ${clickCount} times`) + // document.addEventListener('click', function () { + // if (isShow) return false + // if (clickCount < 6) { + // clickCount++ + // console.log(`Clicked ${clickCount} times`) - // 如果是第一次点击,则开始计时 - if (clickCount === 1) { - timer = setTimeout(() => { - clickCount = 0 // 重置点击计数 - }, 2000) - } + // // 如果是第一次点击,则开始计时 + // if (clickCount === 1) { + // timer = setTimeout(() => { + // clickCount = 0 // 重置点击计数 + // }, 2000) + // } - // 如果点击次数达到6次,则清除计时器并重置状态 - if (clickCount >= 6) { - clearTimeout(timer) - insertScript() - clickCount = 0 // 重置点击计数 - } - } - }) + // // 如果点击次数达到6次,则清除计时器并重置状态 + // if (clickCount >= 6) { + // clearTimeout(timer) + // insertScript() + // clickCount = 0 // 重置点击计数 + // } + // } + // }) diff --git a/manifest.config.ts b/manifest.config.ts index 97a0c69..e1a7c53 100644 --- a/manifest.config.ts +++ b/manifest.config.ts @@ -24,7 +24,7 @@ export default defineManifestConfig({ locale: VITE_FALLBACK_LOCALE, // 'zh-Hans' h5: { router: { - mode: 'history', + // mode: 'history', base: VITE_APP_PUBLIC_BASE, }, optimization: { diff --git a/src/pages.json b/src/pages.json index 29209eb..c94603a 100644 --- a/src/pages.json +++ b/src/pages.json @@ -15,12 +15,19 @@ }, "pages": [ { - "path": "pages/jlgh/index", + "path": "pages/jlgh/coupon", "type": "page", - "layout": "default", "style": { "navigationStyle": "custom", - "navigationBarTitleText": "工行长春消费季" + "navigationBarTitleText": "我的奖品" + } + }, + { + "path": "pages/jlgh/redeem", + "type": "page", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "奖品兑换" } } ], diff --git a/src/pages/jlgh/redeem.vue b/src/pages/jlgh/redeem.vue index 46efdd7..d0118eb 100644 --- a/src/pages/jlgh/redeem.vue +++ b/src/pages/jlgh/redeem.vue @@ -80,7 +80,7 @@ 待充值账号 温馨提示 - - 1.此商品兑换后不支持七天无理由退换货,请谨慎兑换。 + + + 1.此商品兑换后不支持七天无理由退换货,请谨慎兑换。 @@ -112,12 +113,29 @@ import api from './api' const ismask = ref(false) const info = reactive({}) const linkUrl = ref('') +const remark = ref('') onLoad((options) => { const item = decodeURIComponent(options.item) Object.assign(info, JSON.parse(item)) }) +onMounted(() => { + // eslint-disable-next-line camelcase + const { goods_id, activity_code } = info + // eslint-disable-next-line camelcase + api.getProductDetail({ goods_id, activity_code }).then((res: any) => { + if (res.code === 200) { + remark.value = res.data.remark + } else { + uni.showToast({ + icon: 'none', + title: res.message, + }) + } + }) +}) + function gomy() { ismask.value = false if (linkUrl.value) { diff --git a/src/types/uni-pages.d.ts b/src/types/uni-pages.d.ts index f5dd4dd..c625dfb 100644 --- a/src/types/uni-pages.d.ts +++ b/src/types/uni-pages.d.ts @@ -4,7 +4,8 @@ // Generated by vite-plugin-uni-pages interface NavigateToOptions { - url: "/pages/jlgh/index"; + url: "/pages/jlgh/coupon" | + "/pages/jlgh/redeem"; } interface RedirectToOptions extends NavigateToOptions {}