This commit is contained in:
@@ -7,5 +7,8 @@ TARO_APP_KEY='1234567890'
|
|||||||
# API接口
|
# API接口
|
||||||
TARO_APP_API='https://test.wanzhuanyongcheng.cn/app'
|
TARO_APP_API='https://test.wanzhuanyongcheng.cn/app'
|
||||||
|
|
||||||
# 游戏链接
|
# 骰子游戏链接
|
||||||
TARO_APP_GAME='https://jdt-test-tz.wanzhuanyongcheng.cn/pages/index/index?uid='
|
TARO_APP_GAME='https://jdt-test-tz.wanzhuanyongcheng.cn/pages/index/index?uid='
|
||||||
|
|
||||||
|
# 捕鱼游戏链接
|
||||||
|
TARO_APP_FISH_GAME='https://jdt-test-fish.wanzhuanyongcheng.cn/?uid='
|
||||||
@@ -8,3 +8,6 @@ TARO_APP_KEY='private.wxdd00d46fa6f07974.key'
|
|||||||
TARO_APP_API='https://www.wanzhuanyongcheng.cn/app'
|
TARO_APP_API='https://www.wanzhuanyongcheng.cn/app'
|
||||||
|
|
||||||
TARO_APP_GAME='https://jdt-prod-tz.wanzhuanyongcheng.cn/pages/index/index?uid='
|
TARO_APP_GAME='https://jdt-prod-tz.wanzhuanyongcheng.cn/pages/index/index?uid='
|
||||||
|
|
||||||
|
# 捕鱼游戏链接
|
||||||
|
TARO_APP_FISH_GAME='https://jdt-prod-fish.wanzhuanyongcheng.cn/?uid='
|
||||||
@@ -9,3 +9,6 @@ TARO_APP_API='https://test.wanzhuanyongcheng.cn/app'
|
|||||||
|
|
||||||
# 游戏链接
|
# 游戏链接
|
||||||
TARO_APP_GAME='https://jdt-test-tz.wanzhuanyongcheng.cn/pages/index/index?uid='
|
TARO_APP_GAME='https://jdt-test-tz.wanzhuanyongcheng.cn/pages/index/index?uid='
|
||||||
|
|
||||||
|
# 捕鱼游戏链接
|
||||||
|
TARO_APP_FISH_GAME='https://jdt-test-fish.wanzhuanyongcheng.cn/?uid='
|
||||||
@@ -50,7 +50,7 @@ const config = {
|
|||||||
prebundle: { enable: false },
|
prebundle: { enable: false },
|
||||||
},
|
},
|
||||||
cache: {
|
cache: {
|
||||||
enable: true, // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache
|
enable: false, // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache
|
||||||
},
|
},
|
||||||
sass: {
|
sass: {
|
||||||
data: `@import "@nutui/nutui-taro/dist/styles/variables.scss";`,
|
data: `@import "@nutui/nutui-taro/dist/styles/variables.scss";`,
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export default defineAppConfig({
|
|||||||
"login/index",
|
"login/index",
|
||||||
"bindPhone/index",
|
"bindPhone/index",
|
||||||
"pending_order/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",
|
root: "pages/game",
|
||||||
pages: ["gamehome/index", "gamedetail/index", "gameview/index"],
|
pages: [
|
||||||
|
"gamehome/index",
|
||||||
|
"gamedetail/index",
|
||||||
|
"gameview/index",
|
||||||
|
"view/index",
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
root: "pages/hotGoods",
|
root: "pages/hotGoods",
|
||||||
|
|||||||
@@ -1,28 +1,34 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import Taro from "@tarojs/taro";
|
import Taro from "@tarojs/taro";
|
||||||
import { userSign } from "@/api/user";
|
|
||||||
|
|
||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
|
|
||||||
|
const overlay = ref();
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
show,
|
||||||
|
});
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
src: {
|
||||||
|
required: true,
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
type: Number,
|
||||||
|
cb: {
|
||||||
|
required: true,
|
||||||
|
type: Function,
|
||||||
|
default: () => {},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
Taro.useLoad(async () => {
|
Taro.useLoad(async () => {
|
||||||
if (Taro.getStorageSync("token")) show.value = true;
|
if (Taro.getStorageSync("token")) show.value = true;
|
||||||
// const res = await getSignRecord()
|
// const res = await getSignRecord()
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
});
|
});
|
||||||
|
|
||||||
const toSign = async () => {
|
|
||||||
try {
|
|
||||||
await userSign();
|
|
||||||
Taro.showToast({
|
|
||||||
title: "签到成功",
|
|
||||||
icon: "none",
|
|
||||||
});
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
}
|
|
||||||
show.value = false;
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -32,8 +38,8 @@ const toSign = async () => {
|
|||||||
:close-on-click-overlay="false"
|
:close-on-click-overlay="false"
|
||||||
>
|
>
|
||||||
<view class="wrapper">
|
<view class="wrapper">
|
||||||
<view @click.stop="toSign">
|
<view @click.stop="cb(type)">
|
||||||
<image class="image" src="../static/index/poppBg.png" />
|
<image class="image" :src="src" />
|
||||||
</view>
|
</view>
|
||||||
<view @click.stop="show = false">
|
<view @click.stop="show = false">
|
||||||
<image class="icon" src="../static/index/close.png" />
|
<image class="icon" src="../static/index/close.png" />
|
||||||
|
|||||||
@@ -10,9 +10,7 @@ import { ref } from "vue";
|
|||||||
import { getStorageSync, useLoad } from "@tarojs/taro";
|
import { getStorageSync, useLoad } from "@tarojs/taro";
|
||||||
import { WebView } from "@tarojs/components";
|
import { WebView } from "@tarojs/components";
|
||||||
|
|
||||||
const gameUrl = ref("");
|
const user = ref<any>({});
|
||||||
|
|
||||||
const user = ref({});
|
|
||||||
|
|
||||||
useLoad(() => {
|
useLoad(() => {
|
||||||
user.value = getStorageSync("userInfo");
|
user.value = getStorageSync("userInfo");
|
||||||
|
|||||||
3
src/pages/game/view/index.config.ts
Normal file
3
src/pages/game/view/index.config.ts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
export default definePageConfig({
|
||||||
|
navigationBarTitleText: "",
|
||||||
|
});
|
||||||
17
src/pages/game/view/index.vue
Normal file
17
src/pages/game/view/index.vue
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<template>
|
||||||
|
<web-view style="height: 100vh; width: 100vw" :src="url"></web-view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { getStorageSync, useLoad } from "@tarojs/taro";
|
||||||
|
import { WebView } from "@tarojs/components";
|
||||||
|
|
||||||
|
const url = ref("");
|
||||||
|
|
||||||
|
useLoad(() => {
|
||||||
|
url.value = getStorageSync("game_url");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss"></style>
|
||||||
@@ -37,7 +37,14 @@
|
|||||||
</view>
|
</view>
|
||||||
<MerList />
|
<MerList />
|
||||||
<!-- 签到弹窗 -->
|
<!-- 签到弹窗 -->
|
||||||
<Popup />
|
<Popup
|
||||||
|
v-for="(item, index) in popupList"
|
||||||
|
:ref="(el) => getRef(el, item.type)"
|
||||||
|
:type="item.type"
|
||||||
|
:src="item.src"
|
||||||
|
:cb="item.cb"
|
||||||
|
:key="index"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -47,7 +54,7 @@ import Taro from "@tarojs/taro";
|
|||||||
import Popup from "@/components/Popup.vue";
|
import Popup from "@/components/Popup.vue";
|
||||||
import MerList from "@/components/MerList.vue";
|
import MerList from "@/components/MerList.vue";
|
||||||
import { getHomeList } from "@/api/home";
|
import { getHomeList } from "@/api/home";
|
||||||
import { getBanner } from "@/api/user";
|
import { getBanner, userSign } from "@/api/user";
|
||||||
import { parseQueryString } from "@/utils";
|
import { parseQueryString } from "@/utils";
|
||||||
import { getMerList } from "@/api/goods";
|
import { getMerList } from "@/api/goods";
|
||||||
|
|
||||||
@@ -65,6 +72,41 @@ const swiperList = ref<Array<SwiperList>>([]);
|
|||||||
|
|
||||||
const bannerList = ref<any[]>([]);
|
const bannerList = ref<any[]>([]);
|
||||||
|
|
||||||
|
const popupRefs = ref<Map<number, any>>(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 () => {
|
Taro.useDidShow(async () => {
|
||||||
await getBannerList();
|
await getBannerList();
|
||||||
await get_banner_list();
|
await get_banner_list();
|
||||||
@@ -73,8 +115,7 @@ Taro.useDidShow(async () => {
|
|||||||
Taro.useShareAppMessage(() => ({
|
Taro.useShareAppMessage(() => ({
|
||||||
title: "捷兑通",
|
title: "捷兑通",
|
||||||
path: `/pages/index/index?scene=${Taro.getStorageSync("token")}`,
|
path: `/pages/index/index?scene=${Taro.getStorageSync("token")}`,
|
||||||
imageUrl:
|
imageUrl: "https://upload.jdt168.com/1714375021923881119_Share.jpg",
|
||||||
"https://upload.jdt168.com/1694242954957988438_微信图片_20230909150016.jpg",
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const getBannerList = async () => {
|
const getBannerList = async () => {
|
||||||
|
|||||||
@@ -240,7 +240,6 @@ const getList = async () => {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
.num {
|
.num {
|
||||||
font-size: 40px;
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
src/static/index/game_1.png
Normal file
BIN
src/static/index/game_1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 657 KiB |
Reference in New Issue
Block a user