活动中奖商品读取remark显示
This commit is contained in:
parent
4f7a732b7f
commit
b28830a3b0
|
@ -5,8 +5,8 @@ import path from 'path'
|
||||||
*/
|
*/
|
||||||
const config = {
|
const config = {
|
||||||
pages: './src/pages',
|
pages: './src/pages',
|
||||||
// pagesInclude: ['jlgh/coupon.vue', 'jlgh/redeem.vue'],
|
pagesInclude: ['jlgh/coupon.vue', 'jlgh/redeem.vue'],
|
||||||
pagesInclude: ['jlgh/index.vue'],
|
// pagesInclude: ['jlgh/index.vue'],
|
||||||
// pagesInclude: ['jlgh/login.vue'],
|
// pagesInclude: ['jlgh/login.vue'],
|
||||||
// pagesInclude: ['jlgh'],
|
// pagesInclude: ['jlgh'],
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ VITE_UNI_APPID = 'H57F2ACE4'
|
||||||
VITE_WX_APPID = 'wxa2abb91f64032a2b'
|
VITE_WX_APPID = 'wxa2abb91f64032a2b'
|
||||||
|
|
||||||
# h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base
|
# h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base
|
||||||
VITE_APP_PUBLIC_BASE = ./
|
VITE_APP_PUBLIC_BASE = './'
|
||||||
# 测试线上
|
# 测试线上
|
||||||
VITE_SERVER_BASEURL = 'https://gateway.dev.cdlsxd.cn'
|
VITE_SERVER_BASEURL = 'https://gateway.dev.cdlsxd.cn'
|
||||||
# 曾徐平
|
# 曾徐平
|
||||||
|
|
38
index.html
38
index.html
|
@ -40,27 +40,27 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('click', function () {
|
// document.addEventListener('click', function () {
|
||||||
if (isShow) return false
|
// if (isShow) return false
|
||||||
if (clickCount < 6) {
|
// if (clickCount < 6) {
|
||||||
clickCount++
|
// clickCount++
|
||||||
console.log(`Clicked ${clickCount} times`)
|
// console.log(`Clicked ${clickCount} times`)
|
||||||
|
|
||||||
// 如果是第一次点击,则开始计时
|
// // 如果是第一次点击,则开始计时
|
||||||
if (clickCount === 1) {
|
// if (clickCount === 1) {
|
||||||
timer = setTimeout(() => {
|
// timer = setTimeout(() => {
|
||||||
clickCount = 0 // 重置点击计数
|
// clickCount = 0 // 重置点击计数
|
||||||
}, 2000)
|
// }, 2000)
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 如果点击次数达到6次,则清除计时器并重置状态
|
// // 如果点击次数达到6次,则清除计时器并重置状态
|
||||||
if (clickCount >= 6) {
|
// if (clickCount >= 6) {
|
||||||
clearTimeout(timer)
|
// clearTimeout(timer)
|
||||||
insertScript()
|
// insertScript()
|
||||||
clickCount = 0 // 重置点击计数
|
// clickCount = 0 // 重置点击计数
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -24,7 +24,7 @@ export default defineManifestConfig({
|
||||||
locale: VITE_FALLBACK_LOCALE, // 'zh-Hans'
|
locale: VITE_FALLBACK_LOCALE, // 'zh-Hans'
|
||||||
h5: {
|
h5: {
|
||||||
router: {
|
router: {
|
||||||
mode: 'history',
|
// mode: 'history',
|
||||||
base: VITE_APP_PUBLIC_BASE,
|
base: VITE_APP_PUBLIC_BASE,
|
||||||
},
|
},
|
||||||
optimization: {
|
optimization: {
|
||||||
|
|
|
@ -15,12 +15,19 @@
|
||||||
},
|
},
|
||||||
"pages": [
|
"pages": [
|
||||||
{
|
{
|
||||||
"path": "pages/jlgh/index",
|
"path": "pages/jlgh/coupon",
|
||||||
"type": "page",
|
"type": "page",
|
||||||
"layout": "default",
|
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom",
|
"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 v-if="info.product_form === 2" class="flex_items flex_center" style="width: 100%">
|
||||||
<view
|
<view
|
||||||
class="bgwhite plr20 pt20 mt35 flex_column"
|
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>
|
<text class="f30 mt30 bold" style="color: #333">待充值账号</text>
|
||||||
<wd-input
|
<wd-input
|
||||||
|
@ -95,8 +95,9 @@
|
||||||
v-model="info.mobile"
|
v-model="info.mobile"
|
||||||
></wd-input>
|
></wd-input>
|
||||||
<text class="f26 mt40" style="color: #4d4d4d">温馨提示</text>
|
<text class="f26 mt40" style="color: #4d4d4d">温馨提示</text>
|
||||||
<view class="mt20 f24" style="color: #4d4d4d">
|
<view class="mt20 f24" style="max-height: 460rpx; overflow: auto; color: #4d4d4d">
|
||||||
<view>1.此商品兑换后不支持七天无理由退换货,请谨慎兑换。</view>
|
<rich-text v-if="!!remark" :nodes="remark"></rich-text>
|
||||||
|
<view v-else>1.此商品兑换后不支持七天无理由退换货,请谨慎兑换。</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -112,12 +113,29 @@ import api from './api'
|
||||||
const ismask = ref<boolean>(false)
|
const ismask = ref<boolean>(false)
|
||||||
const info = reactive<any>({})
|
const info = reactive<any>({})
|
||||||
const linkUrl = ref<string>('')
|
const linkUrl = ref<string>('')
|
||||||
|
const remark = ref('')
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
const item = decodeURIComponent(options.item)
|
const item = decodeURIComponent(options.item)
|
||||||
Object.assign(info, JSON.parse(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() {
|
function gomy() {
|
||||||
ismask.value = false
|
ismask.value = false
|
||||||
if (linkUrl.value) {
|
if (linkUrl.value) {
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
// Generated by vite-plugin-uni-pages
|
// Generated by vite-plugin-uni-pages
|
||||||
|
|
||||||
interface NavigateToOptions {
|
interface NavigateToOptions {
|
||||||
url: "/pages/jlgh/index";
|
url: "/pages/jlgh/coupon" |
|
||||||
|
"/pages/jlgh/redeem";
|
||||||
}
|
}
|
||||||
interface RedirectToOptions extends NavigateToOptions {}
|
interface RedirectToOptions extends NavigateToOptions {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue