diff --git a/.env.development b/.env.development index 56652f4..a6582d4 100644 --- a/.env.development +++ b/.env.development @@ -7,5 +7,8 @@ TARO_APP_KEY='1234567890' # API接口 TARO_APP_API='https://test.wanzhuanyongcheng.cn/app' -# 游戏链接 -TARO_APP_GAME='https://jdt-test-tz.wanzhuanyongcheng.cn/pages/index/index?uid=' \ No newline at end of file +# 骰子游戏链接 +TARO_APP_GAME='https://jdt-test-tz.wanzhuanyongcheng.cn/pages/index/index?uid=' + +# 捕鱼游戏链接 +TARO_APP_FISH_GAME='https://jdt-test-fish.wanzhuanyongcheng.cn/?uid=' \ No newline at end of file diff --git a/.env.production b/.env.production index 8b155f2..585c344 100644 --- a/.env.production +++ b/.env.production @@ -7,4 +7,7 @@ TARO_APP_KEY='private.wxdd00d46fa6f07974.key' # API接口 TARO_APP_API='https://www.wanzhuanyongcheng.cn/app' -TARO_APP_GAME='https://jdt-prod-tz.wanzhuanyongcheng.cn/pages/index/index?uid=' \ No newline at end of file +TARO_APP_GAME='https://jdt-prod-tz.wanzhuanyongcheng.cn/pages/index/index?uid=' + +# 捕鱼游戏链接 +TARO_APP_FISH_GAME='https://jdt-prod-fish.wanzhuanyongcheng.cn/?uid=' \ No newline at end of file diff --git a/.env.test b/.env.test index 7afd82a..25f3860 100644 --- a/.env.test +++ b/.env.test @@ -8,4 +8,7 @@ TARO_APP_KEY='private.wx7b3322daa2cf9c88.key' TARO_APP_API='https://test.wanzhuanyongcheng.cn/app' # 游戏链接 -TARO_APP_GAME='https://jdt-test-tz.wanzhuanyongcheng.cn/pages/index/index?uid=' \ No newline at end of file +TARO_APP_GAME='https://jdt-test-tz.wanzhuanyongcheng.cn/pages/index/index?uid=' + +# 捕鱼游戏链接 +TARO_APP_FISH_GAME='https://jdt-test-fish.wanzhuanyongcheng.cn/?uid=' \ No newline at end of file diff --git a/config/index.ts b/config/index.ts index d4c4e16..bc28a33 100644 --- a/config/index.ts +++ b/config/index.ts @@ -50,7 +50,7 @@ const config = { prebundle: { enable: false }, }, cache: { - enable: true, // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache + enable: false, // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache }, sass: { data: `@import "@nutui/nutui-taro/dist/styles/variables.scss";`, diff --git a/src/app.config.ts b/src/app.config.ts index 2e2d248..81a2e49 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -23,7 +23,7 @@ export default defineAppConfig({ "login/index", "bindPhone/index", "pending_order/index", - "pending_order/pending_order_detail/index" + "pending_order/pending_order_detail/index", ], }, { @@ -55,7 +55,12 @@ export default defineAppConfig({ }, { root: "pages/game", - pages: ["gamehome/index", "gamedetail/index", "gameview/index"], + pages: [ + "gamehome/index", + "gamedetail/index", + "gameview/index", + "view/index", + ], }, { root: "pages/hotGoods", diff --git a/src/components/Popup.vue b/src/components/Popup.vue index fbc8241..b1b8d1f 100644 --- a/src/components/Popup.vue +++ b/src/components/Popup.vue @@ -1,28 +1,34 @@ @@ -47,7 +54,7 @@ import Taro from "@tarojs/taro"; import Popup from "@/components/Popup.vue"; import MerList from "@/components/MerList.vue"; import { getHomeList } from "@/api/home"; -import { getBanner } from "@/api/user"; +import { getBanner, userSign } from "@/api/user"; import { parseQueryString } from "@/utils"; import { getMerList } from "@/api/goods"; @@ -65,6 +72,41 @@ const swiperList = ref>([]); const bannerList = ref([]); +const popupRefs = ref>(new Map()); + +const getRef = (el, type) => { + popupRefs.value.set(type, el); +}; + +const popupList = ref([ + { + type: 1, + src: require("../../static/index/poppBg.png"), + cb: async (type) => { + await userSign(); + Taro.showToast({ + title: "签到成功", + icon: "none", + }); + popupRefs.value.get(type).show = false; + }, + }, + { + type: 2, + src: require("../../static/index/game_1.png"), + cb: (type) => { + Taro.setStorageSync( + "game_url", + `${process.env.TARO_APP_FISH_GAME}${Taro.getStorageSync("token")}` + ); + Taro.navigateTo({ + url: `/pages/game/view/index`, + }); + popupRefs.value.get(type).show = false; + }, + }, +]); + Taro.useDidShow(async () => { await getBannerList(); await get_banner_list(); @@ -73,8 +115,7 @@ Taro.useDidShow(async () => { Taro.useShareAppMessage(() => ({ title: "捷兑通", path: `/pages/index/index?scene=${Taro.getStorageSync("token")}`, - imageUrl: - "https://upload.jdt168.com/1694242954957988438_微信图片_20230909150016.jpg", + imageUrl: "https://upload.jdt168.com/1714375021923881119_Share.jpg", })); const getBannerList = async () => { diff --git a/src/pages/users/account/index.vue b/src/pages/users/account/index.vue index 07478b9..b4f69a6 100644 --- a/src/pages/users/account/index.vue +++ b/src/pages/users/account/index.vue @@ -240,7 +240,6 @@ const getList = async () => { justify-content: center; .num { - font-size: 40px; font-weight: bold; margin-top: 10px; } diff --git a/src/static/index/game_1.png b/src/static/index/game_1.png new file mode 100644 index 0000000..92c18ab Binary files /dev/null and b/src/static/index/game_1.png differ