Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-04-29 16:34:00 +08:00
17 changed files with 14111 additions and 11601 deletions

View File

@@ -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='
# 骰子游戏链接
TARO_APP_GAME='https://jdt-test-tz.wanzhuanyongcheng.cn/pages/index/index?uid='
# 捕鱼游戏链接
TARO_APP_FISH_GAME='https://jdt-test-fish.wanzhuanyongcheng.cn/?uid='

View File

@@ -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='
TARO_APP_GAME='https://jdt-prod-tz.wanzhuanyongcheng.cn/pages/index/index?uid='
# 捕鱼游戏链接
TARO_APP_FISH_GAME='https://jdt-prod-fish.wanzhuanyongcheng.cn/?uid='

View File

@@ -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='
TARO_APP_GAME='https://jdt-test-tz.wanzhuanyongcheng.cn/pages/index/index?uid='
# 捕鱼游戏链接
TARO_APP_FISH_GAME='https://jdt-test-fish.wanzhuanyongcheng.cn/?uid='

View File

@@ -1,6 +1,6 @@
{
"name": "jdt-user",
"version": "3.0.15",
"version": "3.0.17",
"private": true,
"description": "",
"templateInfo": {
@@ -9,7 +9,7 @@
"css": "sass"
},
"taroConfig": {
"version": "3.0.15"
"version": "3.0.17"
},
"scripts": {
"build:weapp": "taro build --type weapp",
@@ -61,49 +61,51 @@
"dependencies": {
"@babel/runtime": "^7.23.5",
"@nutui/icons-vue-taro": "^0.0.9",
"@nutui/nutui-taro": "^4.3.3",
"@nutui/nutui-taro": "^4.3.6",
"@qiun/vue-ucharts": "2.5.0-20230101",
"@tarojs/components": "3.6.25",
"@tarojs/helper": "3.6.25",
"@tarojs/plugin-framework-vue3": "3.6.25",
"@tarojs/plugin-html": "3.6.25",
"@tarojs/plugin-platform-alipay": "3.6.25",
"@tarojs/plugin-platform-h5": "3.6.25",
"@tarojs/plugin-platform-jd": "3.6.25",
"@tarojs/plugin-platform-qq": "3.6.25",
"@tarojs/plugin-platform-swan": "3.6.25",
"@tarojs/plugin-platform-tt": "3.6.25",
"@tarojs/plugin-platform-weapp": "3.6.25",
"@tarojs/runtime": "3.6.25",
"@tarojs/shared": "3.6.25",
"@tarojs/taro": "3.6.25",
"@tarojs/components": "3.6.27",
"@tarojs/helper": "3.6.27",
"@tarojs/plugin-framework-vue3": "3.6.27",
"@tarojs/plugin-html": "3.6.27",
"@tarojs/plugin-platform-alipay": "3.6.27",
"@tarojs/plugin-platform-h5": "3.6.27",
"@tarojs/plugin-platform-jd": "3.6.27",
"@tarojs/plugin-platform-qq": "3.6.27",
"@tarojs/plugin-platform-swan": "3.6.27",
"@tarojs/plugin-platform-tt": "3.6.27",
"@tarojs/plugin-platform-weapp": "3.6.27",
"@tarojs/runtime": "3.6.27",
"@tarojs/shared": "3.6.27",
"@tarojs/taro": "3.6.27",
"dayjs": "^1.11.10",
"pinia": "^2.1.7",
"uqrcodejs": "^4.0.7",
"vue": "^3.3.9"
},
"devDependencies": {
"@babel/core": "^7.23.5",
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
"@tarojs/cli": "3.6.25",
"@tarojs/plugin-mini-ci": "3.6.25",
"@tarojs/taro-loader": "3.6.25",
"@tarojs/webpack5-runner": "3.6.25",
"@tarojs/cli": "3.6.27",
"@tarojs/plugin-mini-ci": "3.6.27",
"@tarojs/taro-loader": "3.6.27",
"@tarojs/webpack5-runner": "3.6.27",
"@types/node": "^18.19.1",
"@types/webpack-env": "^1.18.4",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"@vue/babel-plugin-jsx": "^1.1.5",
"@vue/compiler-sfc": "^3.3.9",
"babel-preset-taro": "3.6.25",
"babel-preset-taro": "3.6.27",
"commitizen": "^4.3.0",
"css-loader": "3.4.2",
"cz-customizable": "^7.0.0",
"eslint": "^8.55.0",
"eslint-config-taro": "3.6.25",
"eslint-config-taro": "3.6.27",
"eslint-plugin-vue": "^9.19.2",
"husky": "^8.0.3",
"lint-staged": "^15.1.0",
"postcss": "8.4.29",
"style-loader": "1.3.0",
"stylelint": "9.3.0",
"ts-node": "^10.9.1",

25491
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -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",

View File

@@ -1,28 +1,34 @@
<script setup lang="ts">
import { ref } from "vue";
import Taro from "@tarojs/taro";
import { userSign } from "@/api/user";
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 () => {
if (Taro.getStorageSync("token")) show.value = true;
// const res = await getSignRecord()
// console.log(res)
});
const toSign = async () => {
try {
await userSign();
Taro.showToast({
title: "签到成功",
icon: "none",
});
} catch (e) {
console.log(e);
}
show.value = false;
};
</script>
<template>
@@ -32,8 +38,8 @@ const toSign = async () => {
:close-on-click-overlay="false"
>
<view class="wrapper">
<view @click.stop="toSign">
<image class="image" src="../static/index/poppBg.png" />
<view @click.stop="cb(type)">
<image class="image" :src="src" />
</view>
<view @click.stop="show = false">
<image class="icon" src="../static/index/close.png" />

View File

@@ -57,8 +57,8 @@
</template>
<script setup lang="ts">
import { ref } from "vue";
import { confirmAfterOrder, editAfterOrder } from "../../../../../api/admin";
import { onMounted, ref } from "vue";
import { confirmAfterOrder, editAfterOrder } from "@/api/admin";
import Taro from "@tarojs/taro";
const props = defineProps({
@@ -68,6 +68,10 @@ const props = defineProps({
},
});
onMounted(() => {
console.log(props.info);
})
const emits = defineEmits(["ok"]);
const visible = ref(false);

View File

@@ -73,8 +73,8 @@
<script setup lang="ts">
import { ref } from "vue";
import Taro from "@tarojs/taro";
import { getAfterOrderList } from "../../../../api/admin";
import Footer from "./components/Footer.vue";
import { getAfterOrderList } from "@/api/admin";
const tabsIndex = ref(1);

View File

@@ -26,12 +26,12 @@ page {
width: 608px;
height: 457px;
position: relative;
image {
canvas {
position: absolute;
width: 280px;
height: 280px;
top: 45%;
left: 68%;
top: 47%;
left: 69%;
transform: translate(-50%, -50%);
}
}

View File

@@ -5,7 +5,9 @@
<view class="desc">请在这里扫码</view>
</view>
<view class="box">
<image :src="`https://api.pwmqr.com/qrcode/create?url=${code}`"></image>
<!-- <image :src="`https://api.pwmqr.com/qrcode/create?url=${code}`"></image> -->
<!-- <view ref="qrcode" id="qrcode"></view> -->
<canvas canvas-id="qrcode" id="qrcode"></canvas>
</view>
</view>
</template>
@@ -14,8 +16,7 @@
import { onUnmounted, ref } from "vue";
import Taro from "@tarojs/taro";
import { getAfterOrder } from "@/api/admin";
const code = ref("");
import UQRCode from "uqrcodejs";
const time_id = ref();
@@ -23,7 +24,7 @@ const info = ref<any>({});
Taro.useLoad((e) => {
info.value = e;
code.value = Taro.getStorageSync("pay_code");
getCode();
time_id.value = setInterval(async () => {
const { data } = await getAfterOrder({
bid: info.value.bid,
@@ -45,6 +46,16 @@ Taro.useLoad((e) => {
}, 1000);
});
const getCode = () => {
var qr = new UQRCode();
qr.data = Taro.getStorageSync("pay_code");
qr.size = 150;
qr.make();
var canvasContext = Taro.createCanvasContext("qrcode");
qr.canvasContext = canvasContext;
qr.drawCanvas();
};
Taro.useDidHide(() => {
clearInterval(time_id.value);
});

View File

@@ -10,9 +10,7 @@ import { ref } from "vue";
import { getStorageSync, useLoad } from "@tarojs/taro";
import { WebView } from "@tarojs/components";
const gameUrl = ref("");
const user = ref({});
const user = ref<any>({});
useLoad(() => {
user.value = getStorageSync("userInfo");

View File

@@ -0,0 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "",
});

View 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>

View File

@@ -37,7 +37,14 @@
</view>
<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>
</template>
@@ -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<Array<SwiperList>>([]);
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 () => {
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 () => {

View File

@@ -240,7 +240,6 @@ const getList = async () => {
justify-content: center;
.num {
font-size: 40px;
font-weight: bold;
margin-top: 10px;
}

BIN
src/static/index/game_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 KiB