活动中奖商品读取remark显示
This commit is contained in:
parent
4f7a732b7f
commit
b28830a3b0
|
@ -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'],
|
||||
}
|
||||
|
|
|
@ -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'
|
||||
# 曾徐平
|
||||
|
|
38
index.html
38
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 // 重置点击计数
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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": "奖品兑换"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
<view v-if="info.product_form === 2" class="flex_items flex_center" style="width: 100%">
|
||||
<view
|
||||
class="bgwhite plr20 pt20 mt35 flex_column"
|
||||
style="width: calc(100% - 100rpx); padding-bottom: 130rpx; border-radius: 20rpx"
|
||||
style="width: calc(100% - 100rpx); padding-bottom: 100rpx; border-radius: 20rpx"
|
||||
>
|
||||
<text class="f30 mt30 bold" style="color: #333">待充值账号</text>
|
||||
<wd-input
|
||||
|
@ -95,8 +95,9 @@
|
|||
v-model="info.mobile"
|
||||
></wd-input>
|
||||
<text class="f26 mt40" style="color: #4d4d4d">温馨提示</text>
|
||||
<view class="mt20 f24" style="color: #4d4d4d">
|
||||
<view>1.此商品兑换后不支持七天无理由退换货,请谨慎兑换。</view>
|
||||
<view class="mt20 f24" style="max-height: 460rpx; overflow: auto; color: #4d4d4d">
|
||||
<rich-text v-if="!!remark" :nodes="remark"></rich-text>
|
||||
<view v-else>1.此商品兑换后不支持七天无理由退换货,请谨慎兑换。</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -112,12 +113,29 @@ import api from './api'
|
|||
const ismask = ref<boolean>(false)
|
||||
const info = reactive<any>({})
|
||||
const linkUrl = ref<string>('')
|
||||
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) {
|
||||
|
|
|
@ -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 {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue