Compare commits

..

10 Commits

Author SHA1 Message Date
5c0036acfd fix(other): bug修复
Some checks failed
CI Build & Upload (WeApp) / build-upload-dev (push) Failing after 2m31s
CI Build & Upload (WeApp) / build-upload-prod (push) Has been skipped
CI Build & Upload (WeApp) / build-upload-reserve (push) Has been skipped
2026-01-10 21:30:50 +08:00
2c38893c43 fix(components): 修复搜索页样式错乱
Some checks failed
CI Build & Upload (WeApp) / build-upload-dev (push) Failing after 3m58s
CI Build & Upload (WeApp) / build-upload-prod (push) Has been skipped
CI Build & Upload (WeApp) / build-upload-reserve (push) Has been skipped
2025-12-03 01:17:06 +08:00
a30d3572a5 feat(projects): 首页主备优化
All checks were successful
CI Build & Upload (WeApp) / build-upload-dev (push) Has been skipped
CI Build & Upload (WeApp) / build-upload-prod (push) Successful in 6m43s
CI Build & Upload (WeApp) / build-upload-reserve (push) Successful in 2m25s
2025-12-02 23:57:04 +08:00
b6b6649a9b ci(other): ci脚本换源
All checks were successful
CI Build & Upload (WeApp) / build-upload-dev (push) Has been skipped
CI Build & Upload (WeApp) / build-upload-prod (push) Successful in 4m55s
CI Build & Upload (WeApp) / build-upload-reserve (push) Successful in 2m34s
2025-11-05 11:56:16 +08:00
985c8fa766 release(other): 4.0.15
Some checks failed
CI Build & Upload (WeApp) / build-upload-prod (push) Has been cancelled
CI Build & Upload (WeApp) / build-upload-reserve (push) Has been cancelled
CI Build & Upload (WeApp) / build-upload-dev (push) Has been cancelled
2025-11-05 11:32:38 +08:00
ef380ff569 release(other): 4.0.14
Some checks failed
CI Build & Upload (WeApp) / build-upload-dev (push) Has been skipped
CI Build & Upload (WeApp) / build-upload-prod (push) Failing after 4m44s
CI Build & Upload (WeApp) / build-upload-reserve (push) Successful in 19m24s
2025-10-31 19:15:29 +08:00
63b61bbc98 ci(other): ci update 2025-10-31 19:13:49 +08:00
d831ee932b release: 临时紧急版本
All checks were successful
continuous-integration/drone/push Build is passing
2025-10-29 12:39:01 +08:00
8b55419643 fix(依赖升级,bug 修复):
All checks were successful
continuous-integration/drone/push Build is passing
2025-09-13 16:26:39 +08:00
f567cf7c94 build(deps): 依赖升级 2025-09-13 03:26:33 +08:00
38 changed files with 1606 additions and 622 deletions

View File

@@ -1,62 +0,0 @@
kind: pipeline
type: docker
name: default
platform:
os: linux
arch: amd64
steps:
- name: 测试服-构建部署
pull: if-not-exists
image: node:22-alpine
when:
branch:
- test
commands:
- npm install -g pnpm
- pnpm config set registry https://registry.npmmirror.com/
- pnpm install
- pnpm build:weapp:test:upload
- rm -rf dist.tar
- name: 正式服-构建部署
pull: if-not-exists
image: node:22-alpine
when:
branch:
- master
commands:
- npm install -g pnpm
- pnpm config set registry https://registry.npmmirror.com/
- pnpm install
- pnpm build:weapp:prod:upload
- rm -rf dist.tar
- name: 企业微信通知
pull: if-not-exists
image: plugins/webhook
when:
branch:
- test
- master
status:
- success
- failure
settings:
urls: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=a2065e21-4f92-4f5b-a432-2c0cd1d965b5
content_type: application/json
template: |
{
"msgtype": "markdown",
"markdown": {
"content": "{{#success build.status}}✅ 构建成功{{else}}❌ 构建失败{{/success}}\n
**项目**: {{ repo.owner }}/{{ repo.name }} (构建 #{{build.number}})\n
**分支**: {{ build.branch }}\n
**提交**: {{ build.commit }}\n
**作者**: {{ build.author }}\n
**信息**: {{ build.message }}\n
**耗时**: {{ since build.started }} 分钟\n
**详情**: [查看构建详情]({{ build.link }})"
}
}

View File

@@ -2,32 +2,17 @@
TARO_APP_ID='wx7b3322daa2cf9c88'
# 开发版appkey
TARO_APP_KEY='1234567890'
TARO_APP_KEY=''
# 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='http://192.168.31.225:10086?uid='
# 捕鱼游戏链接
TARO_APP_FISH_GAME='https://jdt-test-fish.wanzhuanyongcheng.cn/?uid='
# 版权文字
TARO_APP_NAME='捷兑通'
TARO_APP_COP='玩赚商城版权所有'
# 游戏API
TARO_APP_HALL_API='https://game.wanzhuanyongcheng.cn'
TARO_APP_TITLE_IMG='../../../static/index/1.png'
TARO_APP_LOGO_IMG='../../../static/logo.jpg'
# 游戏大厅
TARO_APP_HOME= 'https://test.wanzhuanyongcheng.cn/app/game'
# 游戏ws链接
TARO_APP_WS='wss://game.wanzhuanyongcheng.cn/dice/home'
# 大转盘ws
TARO_APP_TURNTABLE_WS='wss://game2.wanzhuanyongcheng.cn/turntable/home'
# 大转盘api
TARO_APP_TURNTABLE_API='https://game2.wanzhuanyongcheng.cn/turntable'
# 澳拾
TARO_APP_AOSHI_API='https://game3.wanzhuanyongcheng.cn'
TARO_APP_SHOW_NEW_HOME='no'

View File

@@ -1,16 +1,19 @@
# 正式版appid
# 正式版appid
TARO_APP_ID='wxdd00d46fa6f07974'
# 开发版appkey
# 正式版appkey
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_FISH_GAME='https://jdt-prod-fish.wanzhuanyongcheng.cn/?uid='
# 版权文字
TARO_APP_NAME='捷兑通'
TARO_APP_COP='鑫瓴科技版权所有'
# 游戏大厅
TARO_APP_HOME= 'https://www.wanzhuanyongcheng.cn/app/game'
TARO_APP_TITLE_IMG='../../../static/index/1.png'
TARO_APP_LOGO_IMG='../../../static/logo.jpg'
TARO_APP_SHOW_NEW_HOME='no'

18
.env.reserve Normal file
View File

@@ -0,0 +1,18 @@
# 备用版appid
TARO_APP_ID='wx4a9380d8bb16d9de'
# 备用版appkey
TARO_APP_KEY='private.wx4a9380d8bb16d9de.key'
# API接口
TARO_APP_API='https://api.gxwzwh.com/app'
# 版权文字
TARO_APP_NAME='玩赚商城'
TARO_APP_COP='玩赚商城版权所有'
TARO_APP_TITLE_IMG='../../../static/index/title.png'
TARO_APP_LOGO_IMG='../../../static/logo-1.jpg'
TARO_APP_SHOW_NEW_HOME='yes'

View File

@@ -7,26 +7,12 @@ TARO_APP_KEY='private.wx7b3322daa2cf9c88.key'
# API接口
TARO_APP_API='https://test.wanzhuanyongcheng.cn/app'
# 游戏链接
TARO_APP_GAME='https://jdt-test-tz.wanzhuanyongcheng.cn/pages/index/index?uid='
# 捕鱼游戏链接
TARO_APP_FISH_GAME='https://jdt-test-fish.wanzhuanyongcheng.cn/?uid='
# 版权文字
TARO_APP_NAME='捷兑通'
TARO_APP_COP='鑫瓴科技版权所有'
# 游戏API
TARO_APP_HALL_API='https://game.wanzhuanyongcheng.cn'
TARO_APP_TITLE_IMG='../../static/index/1.png'
TARO_APP_LOGO_IMG='../../../static/logo.jpg'
# 游戏大厅
TARO_APP_HOME= 'https://test.wanzhuanyongcheng.cn/app/game'
# 游戏ws链接
TARO_APP_WS='wss://game.wanzhuanyongcheng.cn/dice/home'
# 大转盘ws
TARO_APP_TURNTABLE_WS='wss://game2.wanzhuanyongcheng.cn/turntable/home'
# 大转盘api
TARO_APP_TURNTABLE_API='https://game2.wanzhuanyongcheng.cn/turntable'
# 澳拾
TARO_APP_AOSHI_API='https://game3.wanzhuanyongcheng.cn'
TARO_APP_SHOW_NEW_HOME='no'

126
.gitea/workflows/ci.yaml Normal file
View File

@@ -0,0 +1,126 @@
name: CI Build & Upload (WeApp)
on:
push:
branches:
- test
- master
jobs:
build-upload-dev:
if: ${{ gitea.ref == 'refs/heads/test' }}
runs-on: gitea_act_runner
container:
image: node:24-alpine
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install deps
run: |
npm install -g pnpm
pnpm config set registry https://registry.npmmirror.com/
pnpm install
- name: Build & Upload (test)
run: |
pnpm build:weapp:test:upload
rm -rf dist.tar || true
- name: Notify WeCom (Dev)
if: always()
env:
WEBHOOK_KEY: ${{ secrets.QYWX_WEBHOOK_KEY }}
STATUS: ${{ job.status }}
REPO: ${{ gitea.repository }}
RUN_URL: ${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}
BRANCH: ${{ gitea.ref_name }}
COMMIT: ${{ gitea.sha }}
ACTOR: ${{ gitea.actor }}
COMMIT_MSG: ${{ gitea.event.head_commit.message }}
run: |
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && apk add --no-cache curl jq
EMOJI=$( [ "$STATUS" = "success" ] && echo "✅ 构建成功" || echo "❌ 构建失败" )
MSG="$(printf "%s\n**项目**: %s (构建 #%s)\n**分支**: %s\n**提交**: %s\n**作者**: %s\n**信息**: %s\n**详情**: [查看构建详情](%s)" \
"$EMOJI" "$REPO" "${{ gitea.run_number }}" "$BRANCH" "$COMMIT" "$ACTOR" "$(echo "$COMMIT_MSG" | tr '\n' ' ' | tr -s ' ')" "$RUN_URL")"
JSON=$(jq -n --arg content "$MSG" '{msgtype:"markdown", markdown:{content:$content}}')
curl -sS -H 'Content-Type: application/json' -d "$JSON" "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=${WEBHOOK_KEY}"
build-upload-prod:
if: ${{ gitea.ref == 'refs/heads/master' }}
runs-on: gitea_act_runner
container:
image: node:24-alpine
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install deps
run: |
npm install -g pnpm
pnpm config set registry https://registry.npmmirror.com/
pnpm install
- name: Build & Upload (prod)
run: |
pnpm build:weapp:prod:upload
rm -rf dist.tar || true
- name: Notify WeCom (Prod)
if: always()
env:
WEBHOOK_KEY: ${{ secrets.QYWX_WEBHOOK_KEY }}
STATUS: ${{ job.status }}
REPO: ${{ gitea.repository }}
RUN_URL: ${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}
BRANCH: ${{ gitea.ref_name }}
COMMIT: ${{ gitea.sha }}
ACTOR: ${{ gitea.actor }}
COMMIT_MSG: ${{ gitea.event.head_commit.message }}
run: |
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && apk add --no-cache curl jq
EMOJI=$( [ "$STATUS" = "success" ] && echo "✅ 构建成功" || echo "❌ 构建失败" )
MSG="$(printf "%s\n**项目**: %s (构建 #%s)\n**分支**: %s\n**提交**: %s\n**作者**: %s\n**信息**: %s\n**详情**: [查看构建详情](%s)" \
"$EMOJI" "$REPO" "${{ gitea.run_number }}" "$BRANCH" "$COMMIT" "$ACTOR" "$(echo "$COMMIT_MSG" | tr '\n' ' ' | tr -s ' ')" "$RUN_URL")"
JSON=$(jq -n --arg content "$MSG" '{msgtype:"markdown", markdown:{content:$content}}')
curl -sS -H 'Content-Type: application/json' -d "$JSON" "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=${WEBHOOK_KEY}"
build-upload-reserve:
if: ${{ gitea.ref == 'refs/heads/master' }}
runs-on: gitea_act_runner
container:
image: node:24-alpine
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install deps
run: |
npm install -g pnpm
pnpm config set registry https://registry.npmmirror.com/
pnpm install
- name: Build & Upload (reserve)
run: |
pnpm build:weapp:reserve:upload
rm -rf dist.tar || true
- name: Notify WeCom (Reserve)
if: always()
env:
WEBHOOK_KEY: ${{ secrets.QYWX_WEBHOOK_KEY }}
STATUS: ${{ job.status }}
REPO: ${{ gitea.repository }}
RUN_URL: ${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}
BRANCH: ${{ gitea.ref_name }}
COMMIT: ${{ gitea.sha }}
ACTOR: ${{ gitea.actor }}
COMMIT_MSG: ${{ gitea.event.head_commit.message }}
run: |
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories || true
apk add --no-cache curl jq
EMOJI=$( [ "$STATUS" = "success" ] && echo "✅ 构建成功" || echo "❌ 构建失败" )
MSG="$(printf "%s\n**项目**: %s (构建 #%s)\n**分支**: %s\n**提交**: %s\n**作者**: %s\n**信息**: %s\n**详情**: [查看构建详情](%s)" \
"$EMOJI" "$REPO" "${{ gitea.run_number }}" "$BRANCH" "$COMMIT" "$ACTOR" "$(echo "$COMMIT_MSG" | tr '\n' ' ' | tr -s ' ')" "$RUN_URL")"
JSON=$(jq -n --arg content "$MSG" '{msgtype:"markdown", markdown:{content:$content}}')
curl -sS -H 'Content-Type: application/json' -d "$JSON" "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=${WEBHOOK_KEY}"

View File

@@ -1,5 +1,3 @@
// babel-preset-taro 更多选项和默认值:
// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md
module.exports = {
presets: [
[

2
components.d.ts vendored
View File

@@ -3,7 +3,7 @@
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
// biome-ignore lint: disable
export {};
export {}
/* prettier-ignore */
declare module 'vue' {

View File

@@ -4,7 +4,6 @@ module.exports = {
env: {
NODE_ENV: '"development"',
},
defineConstants: {},
mini: {},
h5: {},
};

View File

@@ -4,21 +4,21 @@ import { UnifiedWebpackPluginV5 } from 'weapp-tailwindcss/webpack';
import { join } from 'node:path';
import { argv } from 'yargs';
const { robot = 1, desc } = argv;
const CIPluginOptFn = async () => {
/**
* @typedef { import('@tarojs/plugin-mini-ci').CIOptions } CIOptions
* @type {CIOptions}
*/
const parsedArgs = await argv;
return {
weapp: {
appid: process.env.TARO_APP_ID,
privateKeyPath: process.env.TARO_APP_KEY,
robot,
robot: parsedArgs.robot || 1,
},
desc,
desc: parsedArgs.desc,
};
};
@@ -48,13 +48,14 @@ const config = {
framework: 'vue3',
compiler: {
type: 'webpack5',
prebundle: { enable: false },
prebundle: { enable: process.env.TARO_ENV === 'h5' },
},
cache: {
enable: false, // Webpack 持久化缓存配置建议开启。默认配置请参考https://docs.taro.zone/docs/config-detail#cache
},
sass: {
data: `@import "@nutui/nutui-taro/dist/styles/variables.scss";`,
silenceDeprecations: ['import'],
},
alias: {
'@': join(__dirname, '..', 'src'),

View File

@@ -4,7 +4,6 @@ module.exports = {
env: {
NODE_ENV: '"production"',
},
defineConstants: {},
mini: {},
h5: {
/**

View File

@@ -1,19 +1,12 @@
{
"name": "jdt-user",
"version": "4.0.11",
"private": true,
"description": "",
"templateInfo": {
"name": "jdt-user",
"typescript": true,
"css": "sass"
},
"version": "4.0.18",
"taroConfig": {
"version": "4.0.11"
"version": "4.0.18"
},
"scripts": {
"build:weapp": "taro build --type weapp",
"build:test": "taro build --type weapp --mode test",
"build:test": "taro build --type weapp --mode reserve",
"build:swan": "taro build --type swan",
"build:alipay": "taro build --type alipay",
"build:tt": "taro build --type tt",
@@ -23,7 +16,7 @@
"build:jd": "taro build --type jd",
"build:quickapp": "taro build --type quickapp",
"dev:weapp": "taro build --type weapp --watch",
"dev:weapp:prview": "taro build --type weapp --watch --mode production",
"dev:weapp:prview": "taro build --type weapp --watch --mode reserve",
"dev:swan": "npm run build:swan -- --watch",
"dev:alipay": "npm run build:alipay -- --watch",
"dev:tt": "npm run build:tt -- --watch",
@@ -37,9 +30,9 @@
"lint:staged": "lint-staged",
"prepare": "husky install",
"cz": "cz",
"lf": "npx prettier --write",
"postinstall": "weapp-tw patch",
"build:weapp:prod:upload": "taro build --type weapp --upload --robot=1 --desc='正式环境'",
"build:weapp:reserve:upload": "taro build --type weapp --upload --robot=3 --desc='备用环境' --mode reserve",
"build:weapp:test:upload": "taro build --type weapp --upload --robot=2 --desc='测试环境' --mode test"
},
"browserslist": [
@@ -47,11 +40,10 @@
"Android >= 4.1",
"ios >= 8"
],
"author": "",
"author": "JDT",
"lint-staged": {
"*.{ts,vue}": [
"eslint --ext .ts,.vue .",
"npx prettier --write --end-of-line lf ."
"eslint --ext .ts,.vue ."
]
},
"config": {
@@ -60,67 +52,68 @@
}
},
"dependencies": {
"@babel/runtime": "^7.26.7",
"@babel/runtime": "^7.28.4",
"@nutui/icons-vue-taro": "^0.0.9",
"@nutui/nutui-taro": "^4.3.13",
"@nutui/nutui-taro": "^4.3.14",
"@qiun/vue-ucharts": "2.5.0-20230101",
"@tarojs/components": "3.6.35",
"@tarojs/helper": "3.6.35",
"@tarojs/plugin-framework-vue3": "3.6.35",
"@tarojs/plugin-html": "3.6.35",
"@tarojs/plugin-platform-alipay": "3.6.35",
"@tarojs/plugin-platform-h5": "3.6.35",
"@tarojs/plugin-platform-jd": "3.6.35",
"@tarojs/plugin-platform-qq": "3.6.35",
"@tarojs/plugin-platform-swan": "3.6.35",
"@tarojs/plugin-platform-tt": "3.6.35",
"@tarojs/plugin-platform-weapp": "3.6.35",
"@tarojs/runtime": "3.6.35",
"@tarojs/shared": "3.6.35",
"@tarojs/taro": "3.6.35",
"dayjs": "^1.11.13",
"@tarojs/components": "4.1.6",
"@tarojs/helper": "4.1.6",
"@tarojs/plugin-framework-vue3": "4.1.6",
"@tarojs/plugin-html": "4.1.6",
"@tarojs/plugin-platform-alipay": "4.1.6",
"@tarojs/plugin-platform-h5": "4.1.6",
"@tarojs/plugin-platform-jd": "4.1.6",
"@tarojs/plugin-platform-qq": "4.1.6",
"@tarojs/plugin-platform-swan": "4.1.6",
"@tarojs/plugin-platform-tt": "4.1.6",
"@tarojs/plugin-platform-weapp": "4.1.6",
"@tarojs/runtime": "4.1.6",
"@tarojs/shared": "4.1.6",
"@tarojs/taro": "4.1.6",
"dayjs": "^1.11.18",
"pinia": "^2.3.1",
"uqrcodejs": "^4.0.7",
"vue": "^3.5.13"
"vue": "^3.5.21"
},
"devDependencies": {
"@babel/core": "^7.26.8",
"@babel/core": "^7.28.4",
"@commitlint/cli": "^18.6.1",
"@commitlint/config-conventional": "^18.6.3",
"@tarojs/cli": "3.6.35",
"@tarojs/plugin-mini-ci": "3.6.35",
"@tarojs/taro-loader": "3.6.35",
"@tarojs/webpack5-runner": "3.6.35",
"@types/node": "^18.19.75",
"@tarojs/cli": "4.1.6",
"@tarojs/plugin-mini-ci": "4.1.6",
"@tarojs/taro-loader": "4.1.6",
"@tarojs/webpack5-runner": "4.1.6",
"@types/node": "^18.19.124",
"@types/webpack-env": "^1.18.8",
"@types/yargs": "^17.0.33",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@unocss/webpack": "^0.60.4",
"@vue/babel-plugin-jsx": "^1.2.5",
"@vue/compiler-sfc": "^3.5.13",
"autoprefixer": "^10.4.20",
"babel-preset-taro": "3.6.35",
"@vue/babel-plugin-jsx": "^1.5.0",
"@vue/compiler-sfc": "^3.5.21",
"autoprefixer": "^10.4.21",
"babel-preset-taro": "4.1.6",
"commitizen": "^4.3.1",
"css-loader": "3.4.2",
"cz-customizable": "^7.4.0",
"cz-customizable": "^7.5.1",
"eslint": "^8.57.1",
"eslint-config-taro": "3.6.35",
"eslint-plugin-vue": "^9.32.0",
"eslint-config-taro": "4.1.6",
"eslint-plugin-vue": "^9.33.0",
"husky": "^8.0.3",
"lint-staged": "^15.4.3",
"miniprogram-ci": "^2.0.10",
"lint-staged": "^15.5.2",
"miniprogram-ci": "^2.1.26",
"postcss": "8.4.29",
"postcss-rem-to-responsive-pixel": "^6.0.2",
"prettier": "^3.5.3",
"postcss-rem-to-responsive-pixel": "^6.1.0",
"prettier": "^3.6.2",
"style-loader": "1.3.0",
"stylelint": "9.3.0",
"tailwindcss": "^3.4.17",
"ts-node": "^10.9.2",
"typescript": "^5.8.2",
"unplugin-vue-components": "^28.4.1",
"typescript": "^5.9.2",
"unplugin-vue-components": "^28.8.0",
"vue-loader": "^17.4.2",
"weapp-tailwindcss": "^3.7.0",
"webpack": "^5.97.1",
"webpack": "^5.101.3",
"yargs": "^17.7.2"
}
}

View File

@@ -2,9 +2,11 @@ onlyBuiltDependencies:
- '@parcel/watcher'
- '@swc/core'
- '@tarojs/binding'
- '@tarojs/cli'
- core-js
- core-js-pure
- esbuild
- less
- protobufjs
- swiper
- vue-demi

View File

@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAmHk5BywZ6y2rji/dL2HooKGiTuHrcSeGFODvDK6PPUjnieWB
ev7C6N9kBWNbtYiwyLVpW5iKCxCb/GaBa5EIE0nXnKiOhThP3a8OYDW0oA9Xyp03
1W56U3tnHA/GziyABIIMxqA45WYh3e9ar/sdhDvDyre0yl+8cWcPdNOVOW7as88W
yXDsCQbQedPIAy3sRANZ6K2QTNe5Aht3Y7F1uMKRlJwLodutUopPd32rxJz7WNhB
j9CrjzgnfLJa7siURM2r6om2osNFqHP4bmy5yO68TPI8JQgJTUqoNswgFDa2ng9Y
lOhks6kMR8ldL89+fYqILGDVG7124LKIo1awTQIDAQABAoIBACS+Kaj5zrEmy02z
aRjO/lEfQk7CEIuvG5eScOjcc/YvyGQpo18xX2Tg2GiX/fSsIPXtCZuiEboC4aQc
S5nRVGHZjJTa5aVi4ZQpaEx1BLcBm4VfB6JuQho2Ba30e1MZ1CvB7zQ6Thux1f12
faMk34MLJ+6FAJM4KOAnFslvZ2l0VxIlBq5pbF71dO/MsIrpBWVFNGqu6jtXRUJw
J92PbaFMi/smsgdXixsokzPmE5em3zLdp5cfHQCRBjNBclMjlnHhwQVK8wU7D609
CPcvPS8J3PMceMeGXC1QXFANllVecmn7jECVBU5H4Ed0pb89T9Q7yWVnVBo31ZB7
r4GuL+ECgYEAyLcE4cuPsp31oaKATSZrBmypQuGFsarddyereN8ATZ9DjbFL9Y2/
NazLmG1KjeD1yN1q9/ek+nctKTNzuY14cVeahDoiv0ALNUOuS7IFzoHWf5SnNKEx
oEgGJV9D6olk9YnPF5iwn/lRL84af3dxSnKr75hh8Yv5hWrPnJ95xJkCgYEAwniQ
z6yFg2SmnzwwYV72/aoukmsI3KKBHMEDkAFOummy7iv8eT+9DLumQ9BC+mT3eFmq
GVNVM+199NTQ5b5CzXYalSsw93rewhRkk0RVV31AJUwaRbYy6F6O502SpFYb4n8f
S7KfDv70utGOnycMBNjeaFGWxAZbUCLjfUv8JdUCgYBb1fGz5lHPZhrXY+TUZ/mc
LOedJFbpncZLGKmKWm5nFbHxCOg6aCrOwks9aPQtynpq93RUFMk1mIXfTh1rDuHG
6lBWo8r2OrVmH5uGIuQpQpsEMN34ZLCyJ4I4Y0hN7aN1/SH2J/TYnViaSPEy1VHO
wH0O2Wgm/uaiNubbQNSUMQKBgCXT5fc/i8j/LxoSTybhnhHBpMV+ZH7mbU72jIba
ekHwhYmmrLm5GED9z12piR3Dvg9/AYNjnlM3gyS4sNm/pKbqrkkN2byJ/gKqjNXI
mQEnr+6RWxrsUgK5QfrkL/4fcdUg/SlwWVhFZ71fPerfYYsf1ENee4Et610vLCkX
OrjxAoGATIlZgaPuDA/Sh/YTxxSEjNZGCWx4YvWZfL+PW2ItuadMeD2lLai6lOOi
9ew2xXZkvaeA9PGOA5YK2121M5brwkB0Kc3zNvEmrkpQDJYqeoRvLEuFGDmZ/MX1
p0bzKs1vvh5dyFjWQ5IN9FckZ3Fpk6A1zMEuyQdk35TwX+w5EdE=
-----END RSA PRIVATE KEY-----

4
src/api/game.ts Normal file
View File

@@ -0,0 +1,4 @@
import request from '../utils/request';
// 获取游戏列表
export const getGameList = () => request('/game', {}, 'POST');

View File

@@ -97,12 +97,12 @@ export default defineAppConfig({
selectedIconPath: 'static/tabbar/1-1.png',
text: '首页',
},
{
pagePath: 'pages/game/gamehome/index',
iconPath: 'static/tabbar/2-0.png',
selectedIconPath: 'static/tabbar/2-1.png',
text: '游戏',
},
// {
// pagePath: 'pages/game/gamehome/index',
// iconPath: 'static/tabbar/2-0.png',
// selectedIconPath: 'static/tabbar/2-1.png',
// text: '游戏',
// },
{
pagePath: 'pages/cart/index',
iconPath: 'static/tabbar/3-0.png',

View File

@@ -5,8 +5,6 @@
page {
background-color: #f5f5f5;
// font-size: 30rpx;
// IOS安全区域
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}

View File

@@ -2,6 +2,7 @@
<view class="list-box">
<view class="list">
<swiper
v-if="bannerList.length !== 0"
class="item"
:style="{
height: '250px',
@@ -167,7 +168,7 @@ const bannerList = ref<any[]>([]);
const get_banner_list = async () => {
const { data }: any = await getBanner();
bannerList.value = data.data;
bannerList.value = data.data || [];
};
const toPage = async (url: string) => {

View File

@@ -1,6 +1,6 @@
<template>
<view>
<view class="flex justify-center" v-if="storeList.length > 0">
<view v-if="storeList.length > 0">
<view
class="bg-white rounded-[15px] mt-3 p-2 w-[95%] flex items-center"
v-for="(item, index) in storeList"
@@ -15,6 +15,7 @@
}}</view>
<nut-rate
spacing="1"
disabled
active-color="rgba(252, 207, 10, 1)"
v-model="item.rate" />
<view class="text-[#9E9E9E] text-[25px]">销量10000</view>
@@ -51,9 +52,10 @@ const getList = async () => {
};
const goDetail = item => {
console.log(item);
Taro.setStorageSync('mer_info', item);
Taro.navigateTo({
url: `/pages/mer/mer_detail/index`,
url: `/pages/mer/mer_detail/index?bid=${item.bid}`,
});
};
</script>

View File

@@ -1,10 +0,0 @@
// 用于配置项目的一些常量如接口地址、websocket地址等
import Taro from '@tarojs/taro';
export const app = {
API_URL: () => `${process.env.TARO_APP_HALL_API}`,
API_WS: () =>
`${process.env.TARO_APP_WS}?uid=${Taro.getStorageSync('uid')}&game_id=${
Taro.getStorageSync('gameItem').ID
}`,
};

View File

@@ -16,6 +16,7 @@
import { ref } from 'vue';
import Taro from '@tarojs/taro';
import { getPersonalInfo } from '@/api/user';
import { getGameList } from '@/api/game';
const list = ref<any[]>([]);
@@ -55,14 +56,8 @@ const getUserInfo = async () => {
const getList = async () => {
// console.log(process.env.TARO_APP_HALL_API)
Taro.request({
url: `${process.env.TARO_APP_HOME}`,
method: 'POST',
success: ({ data: res }) => {
list.value =
res.data.data.sort((a: any, b: any) => b.sort - a.sort) || [];
},
});
const res = await getGameList();
list.value = res.data.data.sort((a: any, b: any) => b.sort - a.sort) || [];
};
const toPage = item => {

View File

@@ -188,23 +188,22 @@ const pay = async () => {
const confirmPay = async () => {
try {
const res = await payOrder({
const { data: res } = await payOrder({
oid: opt.value.oid,
OrderType: payVal.value,
PayType: payVal.value,
});
Taro.requestPayment({
timeStamp: res.data.data.timeStamp,
nonceStr: res.data.data.nonceStr,
package: res.data.data.package,
signType: res.data.data.signType,
paySign: res.data.data.paySign,
timeStamp: res.data.timeStamp,
nonceStr: res.data.nonceStr,
package: res.data.package,
signType: res.data.signType,
paySign: res.data.paySign,
success: function () {
Taro.showToast({
title: '支付成功',
icon: 'success',
});
isLoading.value = false;
},
fail: function () {
Taro.showToast({
@@ -214,11 +213,10 @@ const confirmPay = async () => {
},
complete: function () {
setTimeout(() => {
Taro.redirectTo({
Taro.reLaunch({
url: `/pages/users/order_list/index?type=0`,
});
}, 2000);
// isLoading.value = false;
},
});
} catch (err) {
@@ -227,7 +225,7 @@ const confirmPay = async () => {
icon: 'none',
});
} finally {
// isLoading.value = false;
isLoading.value = false;
}
};

View File

@@ -129,7 +129,7 @@ const get_mer_list = async () => {
const toMerDetails = (item: any) => {
Taro.setStorageSync('mer_info', item);
Taro.navigateTo({
url: `/pages/mer/mer_detail/index`,
url: `/pages/mer/mer_detail/index?bid=${item.bid}`,
});
};
</script>

View File

@@ -0,0 +1,877 @@
<template>
<view class="home-new">
<!-- Header & Search -->
<view class="header-fixed">
<view :style="{ paddingTop: statusBarHeight + 'px' }"></view>
<view class="header-content">
<!-- Location -->
<view class="location-bar">
<view class="location-inner" @click="getUserLocal">
<view class="iconfont icon-dizhi location-icon"></view>
<text class="location-text">{{ address }}</text>
<view class="iconfont icon-xiangxia location-arrow"></view>
</view>
</view>
<!-- Search Bar -->
<view class="search-container">
<input
type="text"
placeholder="请输入商家名称搜索"
class="search-input"
v-model="searchVal" />
<view class="search-icon-left">
<view class="iconfont icon-sousuo"></view>
</view>
<view class="search-btn" @click.stop="clickSearch">搜索</view>
</view>
</view>
</view>
<!-- Main Content -->
<view class="main-content">
<!-- Banner / Hero -->
<view class="banner-hero">
<!-- Background Pattern Decoration -->
<view class="banner-decoration banner-decoration-top"></view>
<view class="banner-decoration banner-decoration-bottom"></view>
<view class="banner-inner">
<view class="banner-title">
玩赚积分<text class="banner-title-yellow">商城</text>
</view>
<view class="banner-subtitle-wrapper">
<view class="banner-divider"></view>
<text class="banner-subtitle">积分当钱花 · 兑换无上限</text>
<view class="banner-divider"></view>
</view>
<view class="banner-buttons">
<view class="banner-btn banner-btn-primary">
<text class="banner-btn-icon">💎</text> 积分兑换
</view>
<view class="banner-btn banner-btn-secondary">同城兑换</view>
</view>
</view>
</view>
<!-- Quick Actions Grid -->
<view class="nav-grid-wrapper">
<view class="nav-grid">
<view
class="nav-item"
v-for="(item, index) in navigationList"
:key="index"
@click="toPage(item)">
<view class="nav-icon-wrapper">
<image :src="item.icon" class="nav-icon" mode="aspectFit" />
</view>
<text class="nav-label">{{ item.name }}</text>
</view>
</view>
</view>
<!-- Store List -->
<view class="store-section">
<view class="store-header">
<view class="store-header-line"></view>
附近商家
</view>
<view class="store-list">
<view
class="store-item"
v-for="(item, index) in merList"
:key="index"
@click="toMerDetails(item)">
<view class="store-image-wrapper">
<image
:src="item.head_photo"
class="store-image"
mode="aspectFill" />
<!-- <view class="store-badge" v-if="index < 3">严选</view> -->
</view>
<view class="store-info">
<view class="store-name">{{ item.name }}</view>
<view class="store-rating">
<view class="rating-stars">
<text class="stars-text"></text>
<text class="rating-score">5.0</text>
</view>
<text class="rating-divider">|</text>
<text class="rating-sales">月售 1000+</text>
</view>
<view class="store-distance">
<text class="distance-placeholder">.</text>
<text class="distance-text">
距离我{{
calculateDistance(
userLocalNum.t,
userLocalNum.l,
Number(item.lat),
Number(item.lon),
)
}}
</text>
</view>
</view>
</view>
<!-- Empty State -->
<view v-if="merList.length === 0" class="store-empty">
暂无附近商家
</view>
</view>
</view>
</view>
<Popup :imgArr="imgList" />
</view>
</template>
<script setup lang="ts">
import Taro from '@tarojs/taro';
import { ref } from 'vue';
import { getHomeList } from '@/api/home';
import { getMerList } from '@/api/goods';
import { bindParent } from '@/api/user';
import { calculateDistance } from '@/utils';
import Popup from '@/components/Popup.vue';
const statusBarHeight = Taro.getSystemInfoSync().statusBarHeight || 20;
const address = ref('获取位置中...');
const searchVal = ref('');
const navigationList = ref<any[]>([]);
const merList = ref<any[]>([]);
const pageVal = ref({
page: 1,
total: 0,
});
const userLocalNum = ref({
l: 0,
t: 0,
});
const imgList = ref([require('../../../static/zhenggai.png')]);
// Lifecycle
Taro.useLoad(() => {
getPrivacy();
getUserLocal();
getNavLists();
checkBindParent();
});
Taro.useShareAppMessage(() => ({
title: '捷兑通',
path: `/pages/index/index?scene=${Taro.getStorageSync('token')}`,
imageUrl: 'https://upload.jdt168.com/1714375021923881119_Share.jpg',
}));
Taro.useReachBottom(() => {
if (merList.value.length >= pageVal.value.total) {
if (pageVal.value.total > 0) {
Taro.showToast({ title: '没有更多了', icon: 'none' });
}
return;
}
pageVal.value.page += 1;
fetchMerList();
});
// Methods
const checkBindParent = async () => {
if (Taro.getStorageSync('token') && Taro.getStorageSync('bind_id')) {
try {
const res: any = await bindParent({
uid: Taro.getStorageSync('bind_id'),
});
Taro.showToast({
title: res.msg,
});
Taro.removeStorageSync('bind_id');
} catch (error) {
Taro.removeStorageSync('bind_id');
}
}
};
const getPrivacy = () => {
Taro.getPrivacySetting({
success: res => {
if (res.needAuthorization) {
Taro.requirePrivacyAuthorize({
success: () => console.log('用户同意授权'),
fail: () => {
console.log('用户拒绝授权');
// Taro.exitMiniProgram();
},
});
}
},
});
};
const getUserLocal = () => {
Taro.getLocation({
type: 'wgs84',
success: res => {
userLocalNum.value.l = res.longitude;
userLocalNum.value.t = res.latitude;
fetchAddress(res.latitude, res.longitude);
// Refresh list with location
pageVal.value.page = 1;
merList.value = [];
fetchMerList();
},
fail: () => {
address.value = '未能获取定位';
// Load list anyway
fetchMerList();
},
});
};
const fetchAddress = (lat, lon) => {
Taro.request({
url: `https://api.tianditu.gov.cn/geocoder?postStr={'lon':${lon},'lat':${lat},'ver':1}&type=geocode&tk=42db4f3dfd1a18d31e73ee90aa2ce054`,
method: 'GET',
success: res => {
const { msg, result } = res.data;
if (msg === 'ok') {
address.value = `${result.addressComponent.county}${result.addressComponent.town}${result.addressComponent.address}`;
}
},
});
};
const getNavLists = async () => {
const defaults = [
{
type: 1,
icon: '//p0.meituan.net/csc/f33ad2443a67e9f3474a1d5fd9d529db7504.png',
url: '/pages/users/settled_mer/index',
name: '商户入驻',
},
{
type: 1,
icon: '//p0.meituan.net/csc/0403cf37dd14a6b44b22ffccaa2878f95703.png',
url: '/pages/allClassList/index',
name: '全部服务',
},
];
try {
const res = await getHomeList();
const apiList = res.data.data.map(item => ({
ID: item.ID,
type: 2,
icon: item.icon,
url: item.url,
name: item.name,
}));
navigationList.value = [...apiList, ...defaults];
} catch (e) {
console.error(e);
navigationList.value = defaults;
}
};
const fetchMerList = async () => {
try {
const res = await getMerList({
PageNum: pageVal.value.page,
PageSize: 10,
// class_id: 0
});
pageVal.value.total = res.data.total;
if (res.data.data) {
merList.value.push(...res.data.data);
}
} catch (e) {
console.error(e);
}
};
const clickSearch = () => {
if (!searchVal.value)
return Taro.showToast({ title: '请输入商家名称', icon: 'none' });
Taro.navigateTo({ url: `/pages/search/index?name=${searchVal.value}` });
searchVal.value = '';
};
const toPage = item => {
item.type !== 1
? Taro.navigateTo({
url: `/pages/search/index?id=${item.ID}&name=${item.name}`,
})
: Taro.navigateTo({ url: item.url });
};
const toMerDetails = item => {
Taro.navigateTo({ url: `/pages/mer/mer_detail/index?bid=${item.bid}` });
};
</script>
<style lang="scss">
/* 所有新版样式包裹在 .home-new 作用域下 */
.home-new {
background-color: #f5f6f7;
min-height: 100vh;
/* Header Styles */
.header-fixed {
position: sticky;
top: 0;
z-index: 50;
background: linear-gradient(180deg, #eff6ff 0%, #f5f6f7 100%);
}
.header-content {
padding: 10px 20px 10px;
}
.location-bar {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
font-size: 22px;
color: #6b7280;
}
.location-inner {
display: flex;
align-items: center;
max-width: 90%;
background-color: rgba(255, 255, 255, 0.6);
padding: 8px 16px;
border-radius: 50px;
backdrop-filter: blur(10px);
}
.location-icon {
width: 26px;
height: 26px;
margin-right: 8px;
color: #374151;
}
.location-text {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 500;
}
.location-arrow {
width: 20px;
height: 20px;
margin-left: 8px;
color: #9ca3af;
}
.search-container {
position: relative;
// margin: 10px auto;
margin-top: 20px;
}
.search-input {
height: 70px;
background-color: #ffffff;
border: none;
border-radius: 20px;
padding: 10px 20px 10px 70px;
font-size: 28px;
}
.search-icon-left {
position: absolute;
left: 20px;
top: 50%;
transform: translateY(-50%);
color: #9ca3af;
font-size: 30px;
}
.search-btn {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
background: linear-gradient(90deg, #fa2c19 0%, #ff5d45 100%);
color: #ffffff;
font-size: 24px;
font-weight: bold;
padding: 12px 30px;
border-radius: 16px;
box-shadow: 0 4px 6px rgba(250, 44, 25, 0.2);
display: flex;
align-items: center;
justify-content: center;
z-index: 10;
}
/* Main Content */
.main-content {
padding: 0 20px 180px;
}
/* Banner Hero */
.banner-hero {
position: relative;
border-radius: 20px;
overflow: hidden;
background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
height: 280px;
margin-top: 20px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.banner-decoration {
position: absolute;
border-radius: 50%;
opacity: 0.1;
}
.banner-decoration-top {
top: -80px;
right: -80px;
width: 240px;
height: 240px;
background-color: rgba(255, 255, 255, 0.3);
}
.banner-decoration-bottom {
bottom: -60px;
left: -60px;
width: 180px;
height: 180px;
background-color: rgba(147, 197, 253, 0.3);
}
.banner-inner {
position: relative;
// height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: 30px;
}
.banner-title {
font-size: 60px;
font-weight: 900;
color: #ffffff;
letter-spacing: 4px;
font-style: italic;
margin-bottom: 8px;
}
.banner-title-yellow {
color: #fde047;
}
.banner-subtitle-wrapper {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 30px;
opacity: 0.95;
}
.banner-divider {
width: 60px;
height: 1px;
background-color: rgba(255, 255, 255, 0.5);
}
.banner-subtitle {
color: #ffffff;
font-size: 22px;
font-weight: 500;
letter-spacing: 2px;
}
.banner-buttons {
display: flex;
width: 100%;
max-width: 600px;
gap: 20px;
}
.banner-btn {
flex: 1;
border-radius: 50px;
padding: 15px 0;
font-size: 26px;
font-weight: bold;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
pointer-events: none;
transform: scale(0.9);
}
.banner-btn-primary {
background-color: rgba(255, 255, 255, 0.1);
color: #ffffff;
border: 1px solid rgba(255, 255, 255, 0.2);
backdrop-filter: blur(10px);
}
.banner-btn-secondary {
background-color: rgba(255, 255, 255, 0.1);
color: rgba(255, 255, 255, 0.8);
border: 1px solid rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
}
.banner-btn-icon {
font-size: 36px;
opacity: 0.8;
}
/* Navigation Grid */
.nav-grid-wrapper {
background-color: #ffffff;
border-radius: 20px;
padding: 30px;
margin-top: 20px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.nav-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
}
.nav-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
.nav-icon-wrapper {
width: 88px;
height: 88px;
border-radius: 50%;
background-color: #f9fafb;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.nav-icon {
width: 60px;
height: 60px;
}
.nav-label {
font-size: 22px;
font-weight: 500;
color: #374151;
text-align: center;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Featured Section */
.featured-section {
display: flex;
gap: 20px;
height: 280px;
margin-top: 20px;
}
.featured-card {
background-color: #ffffff;
border-radius: 20px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
position: relative;
}
.featured-card-left {
flex: 1.2;
background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
border: 1px solid #fed7aa;
padding: 20px;
display: flex;
flex-direction: column;
}
.featured-content {
position: relative;
z-index: 10;
}
.featured-title {
font-size: 30px;
font-weight: bold;
color: #1f2937;
}
.featured-desc {
font-size: 20px;
color: #f97316;
margin-top: 4px;
}
.featured-btn {
margin-top: 20px;
background: linear-gradient(90deg, #f97316 0%, #ef4444 100%);
color: #ffffff;
font-size: 22px;
font-weight: bold;
padding: 10px 20px;
border-radius: 50px;
border: none;
display: inline-block;
line-height: 1.5;
box-shadow: 0 2px 4px rgba(249, 115, 22, 0.3);
}
.featured-bg {
position: absolute;
bottom: 0;
right: 0;
opacity: 0.1;
pointer-events: none;
}
.featured-svg {
width: 180px;
height: 180px;
color: #ea580c;
transform: rotate(-12deg) translate(30px, 30px);
}
.featured-card-right {
flex: 1;
border: 1px solid #e5e7eb;
display: flex;
flex-direction: column;
}
.featured-image {
height: 67%;
position: relative;
}
.featured-img {
width: 100%;
height: 100%;
}
.featured-overlay {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: linear-gradient(
180deg,
transparent 0%,
rgba(0, 0, 0, 0.6) 100%
);
padding: 10px 15px;
display: flex;
flex-direction: column;
justify-content: flex-end;
}
.featured-overlay-title {
color: #ffffff;
font-weight: bold;
font-size: 26px;
}
.featured-footer {
height: 33%;
padding: 0 15px;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #ffffff;
}
.featured-footer-left {
display: flex;
flex-direction: column;
}
.featured-footer-title {
font-size: 22px;
font-weight: bold;
color: #1f2937;
}
.featured-footer-arrow {
width: 44px;
height: 44px;
border-radius: 50%;
background-color: #eff6ff;
color: #3b82f6;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
}
/* Store Section */
.store-section {
padding-bottom: 20px;
margin-top: 20px;
}
.store-header {
font-size: 30px;
font-weight: bold;
color: #1f2937;
padding: 0 8px 15px;
display: flex;
align-items: center;
}
.store-header-line {
width: 6px;
height: 30px;
background-color: #fa2c19;
border-radius: 50px;
margin-right: 15px;
}
.store-list {
display: flex;
flex-direction: column;
gap: 20px;
}
.store-item {
background-color: #ffffff;
border-radius: 20px;
padding: 15px;
display: flex;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
border: 1px solid #f9fafb;
}
.store-image-wrapper {
width: 180px;
height: 180px;
flex-shrink: 0;
background-color: #f3f4f6;
border-radius: 16px;
overflow: hidden;
position: relative;
}
.store-image {
width: 100%;
height: 100%;
}
.store-badge {
position: absolute;
top: 0;
left: 0;
background-color: #eab308;
color: #ffffff;
font-size: 20px;
padding: 4px 12px;
border-bottom-right-radius: 16px;
font-weight: bold;
}
.store-info {
margin-left: 20px;
flex: 1;
display: flex;
flex-direction: column;
height: 180px;
justify-content: space-between;
padding: 8px 0;
}
.store-name {
font-weight: bold;
color: #1f2937;
font-size: 30px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 1.2;
}
.store-rating {
display: flex;
align-items: center;
font-size: 22px;
margin-top: 4px;
}
.rating-stars {
display: flex;
align-items: center;
margin-right: 15px;
}
.stars-text {
color: #fbbf24;
font-size: 20px;
margin-right: 8px;
}
.rating-score {
color: #fa2c19;
font-weight: bold;
}
.rating-divider {
color: #d1d5db;
margin: 0 10px;
}
.rating-sales {
color: #6b7280;
}
.store-distance {
display: flex;
align-items: center;
justify-content: space-between;
}
.distance-placeholder {
font-size: 22px;
color: transparent;
user-select: none;
}
.distance-text {
font-size: 22px;
color: #9ca3af;
}
.store-empty {
text-align: center;
padding: 80px 0;
color: #9ca3af;
font-size: 26px;
}
.iconfont {
font-size: inherit;
}
} /* .home-new 作用域结束 */
</style>

View File

@@ -0,0 +1,366 @@
<template>
<view class="home-old">
<view :style="{ marginTop: BarHeight + 'px' }"></view>
<view class="local">
<view class="iconfont icon-dizhi" style="font-size: 20px"></view>
<text class="text-[28px]">{{ address }}</text>
</view>
<view class="search">
<view
class="iconfont icon-sousuo"
style="color: #8f8f8f; margin-right: 8px"></view>
<input placeholder="请输入商家名称搜索" v-model="searchVal" />
<view class="search-btn" @click="clickSearch">搜索</view>
</view>
<view class="banner">
<!-- <view
class="title"
:style="{
backgroundImage: `url('${titleImgPath}')`,
}"></view> -->
<image class="title" :src="titleImgPath"></image>
<view class="jf-btn" hover-class="none"></view>
<!-- <view class="footer">
<navigator
hover-class="none"
class="btn-1"
url="/pages/fastBuy/index?type=1"></navigator>
<navigator
hover-class="none"
openType="switchTab"
url="/pages/game/gamehome/index"
class="btn-2"></navigator>
<navigator
hover-class="none"
class="btn-3"
url="/pages/fastBuy/index?type=2"></navigator>
</view> -->
</view>
<view class="navigation">
<view
class="item"
v-for="(item, index) in navigationList"
:key="index"
@click="toPage(item)">
<image class="icon" :src="item.icon" />
<view class="text">{{ item.name }}</view>
</view>
</view>
<!-- <navigator
class="ad"
url="/pages/marketing/yq/index"
open-type="navigate"
hover-class="none">
</navigator> -->
<MerList :get-user-location="getUserLocal" />
<Popup :imgArr="imgList" />
</view>
</template>
<script setup lang="ts">
import Taro from '@tarojs/taro';
import { ref } from 'vue';
import { getHomeList } from '@/api/home';
import { bindParent } from '@/api/user';
import MerList from '@/components/MerList.vue';
import Popup from '@/components/Popup.vue';
const statusBarHeight = Taro.getSystemInfoSync().statusBarHeight;
const BarHeight = ref((statusBarHeight as number) + 7);
const titleImgPath = require(process.env.TARO_APP_TITLE_IMG as string);
interface navigationType {
ID?: number;
type: number;
icon: string;
name: string;
url: string;
}
const navigationList = ref<Array<navigationType>>([]);
const imgList = ref([
// require('../../static/popTip-1.png'),
// require('../../static/popTip.png'),
require('../../../static/zhenggai.png'),
]);
Taro.useShareAppMessage(() => ({
title: '捷兑通',
path: `/pages/index/index?scene=${Taro.getStorageSync('token')}`,
imageUrl: 'https://upload.jdt168.com/1714375021923881119_Share.jpg',
}));
const searchVal = ref('');
const clickSearch = () => {
if (!searchVal.value)
return Taro.showToast({
title: '请输入商家名称再搜索',
icon: 'none',
});
Taro.navigateTo({
url: `/pages/search/index?name=${searchVal.value}`,
});
searchVal.value = '';
};
Taro.useLoad(() => {
Taro.getPrivacySetting({
success: res => {
if (res.needAuthorization) {
Taro.requirePrivacyAuthorize({
success: () => {
console.log('用户同意授权');
},
fail: () => {
console.log('用户拒绝授权');
Taro.exitMiniProgram();
},
});
}
},
});
getNavLists();
getUserLocal();
checkBindParent();
});
const checkBindParent = async () => {
if (Taro.getStorageSync('token') && Taro.getStorageSync('bind_id')) {
try {
const res: any = await bindParent({
uid: Taro.getStorageSync('bind_id'),
});
Taro.showToast({
title: res.msg,
});
Taro.removeStorageSync('bind_id');
} catch (error) {
Taro.removeStorageSync('bind_id');
}
}
};
const address = ref('获取位置中......');
const getUserLocal = async () => {
Taro.getLocation({
type: 'wgs84',
success: res => {
// Taro.request({
// url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${res.latitude},${res.longitude}&key=4EJBZ-TZXCV-IHUPX-UMI2L-MK3N3-37FSQ&get_poi=1`,
// method: 'GET',
// success: res => {
// switch (res.data.status) {
// case 121:
// Taro.showToast({
// title: res.data.message,
// icon: 'none',
// });
// break;
// default:
// const data = res.data.result.address_component;
// address.value = `${data.district}${data.street_number}`;
// break;
// }
// },
// });
Taro.request({
url: `https://api.tianditu.gov.cn/geocoder?postStr={'lon':${res.longitude},'lat':${res.latitude},'ver':1}&type=geocode&tk=42db4f3dfd1a18d31e73ee90aa2ce054`,
method: 'GET',
success: res => {
const { msg, result } = res.data;
if (msg === 'ok') {
address.value = `${result.addressComponent.county}${result.addressComponent.town}${result.addressComponent.address}`;
} else {
Taro.showToast({
title: msg,
icon: 'none',
});
}
},
});
},
});
};
const getNavLists = async () => {
navigationList.value = [
// {
// type: 1,
// icon: '//p0.meituan.net/csc/5c770748f0028c63741c5ec14df3cc386715.png',
// url: '',
// name: '活动商家',
// },
// {
// type: 1,
// icon: '//p0.meituan.net/csc/4868c06b99008ff7d5f81e6514858c8a7950.png',
// url: '',
// name: '兑换商家',
// },
{
type: 1,
icon: '//p0.meituan.net/csc/f33ad2443a67e9f3474a1d5fd9d529db7504.png',
url: '/pages/users/settled_mer/index',
name: '商户入驻',
},
{
type: 1,
icon: '//p0.meituan.net/csc/0403cf37dd14a6b44b22ffccaa2878f95703.png',
url: '/pages/allClassList/index',
name: '全部服务',
},
];
const res = await getHomeList();
res.data.data.forEach(item => {
navigationList.value.unshift({
ID: item.ID,
type: 2,
icon: item.icon,
url: item.url,
name: item.name,
});
});
};
const toPage = item => {
item.type !== 1
? Taro.navigateTo({
url: `/pages/search/index?id=${item.ID}&name=${item.name}`,
})
: Taro.navigateTo({
url: item.url as string,
});
};
</script>
<style lang="scss">
/* 旧版样式 - 所有样式包裹在 .home-old 作用域下 */
page {
background-image: url('//p0.meituan.net/csc/aaaccd28594119e4b838d07d30739471440261.png');
background-size: 100% 57%;
background-repeat: no-repeat;
box-sizing: border-box;
min-height: 100vh;
}
.home-old {
.local {
margin-left: 15px;
display: flex;
align-items: flex-end;
color: #fff;
}
.search {
margin: 30px auto;
display: flex;
border-radius: 18px;
justify-content: space-between;
align-items: center;
padding: 10px 15px;
background: rgba(255, 255, 255, 0.8);
width: 730px;
input {
flex: 1;
}
.search-btn {
background-color: #f83d3d;
color: #fff;
border-radius: 10px;
width: 100px;
height: 60px;
text-align: center;
line-height: 60px;
}
}
.banner {
position: relative;
text-align: center;
.title {
width: 600px;
height: 90px;
left: 50%;
}
.jf-btn {
margin: 15px auto;
background-image: url('//p1.meituan.net/csc/e125184432dc591137c24a26abe5796a25262.png');
background-size: 100% 100%;
width: 350px;
height: 70px;
}
.footer {
display: flex;
align-items: flex-end;
justify-content: space-between;
margin: 0 auto;
padding: 0 15px;
.btn-1 {
background-image: url('//p0.meituan.net/csc/7708348ee250eae910328bb7c12197f029562.png');
background-size: 100% 100%;
width: 200px;
height: 220px;
}
.btn-2 {
// background-image: url('//p1.meituan.net/csc/8cc2b518031eb7424b184d90a583d805146287.png');
background-image: url('../../../static/game_banner.png');
background-size: 100% 100%;
width: 300px;
height: 220px;
}
.btn-3 {
background-image: url('//p0.meituan.net/csc/31bd1f5c791c95557758dfa5c96e001529545.png');
background-size: 100% 100%;
width: 200px;
height: 220px;
}
}
}
.navigation {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-gap: 40px;
margin: 20px;
height: auto;
background-color: #fff;
border-radius: 20px;
padding: 32px 0;
.item {
display: flex;
flex-direction: column;
align-items: center;
.icon {
background-size: 100% 100%;
width: 90px;
height: 90px;
}
.text {
color: #333333;
font-size: 26px;
margin-top: 6px;
}
}
}
.ad {
// background-image: url('https://jdt168.oss-cn-guangzhou.aliyuncs.com/ad.png');
background-image: url('https://pic.imgdb.cn/item/6697aa0dd9c307b7e95c94d9.png');
background-size: 100% 100%;
height: 180px;
margin: 20px;
}
}
</style>

View File

@@ -1,123 +0,0 @@
page {
background-image: url('//p0.meituan.net/csc/aaaccd28594119e4b838d07d30739471440261.png');
background-size: 100% 57%;
background-repeat: no-repeat;
box-sizing: border-box;
}
.local {
margin-left: 15px;
display: flex;
align-items: flex-end;
color: #fff;
}
.search {
margin: 30px auto;
display: flex;
border-radius: 18px;
justify-content: space-between;
align-items: center;
padding: 10px 15px;
background: rgba(255, 255, 255, 0.8);
width: 730px;
input {
flex: 1;
}
.search-btn {
background-color: #f83d3d;
color: #fff;
border-radius: 10px;
width: 100px;
height: 60px;
text-align: center;
line-height: 60px;
}
}
.banner {
.title {
background-image: url('//p0.meituan.net/csc/542112fc072d4687b437848bc29b0a1730495.png');
background-size: 100% 100%;
width: 600px;
height: 90px;
margin: auto;
}
.jf-btn {
margin: 15px auto;
background-image: url('//p1.meituan.net/csc/e125184432dc591137c24a26abe5796a25262.png');
background-size: 100% 100%;
width: 350px;
height: 70px;
}
.footer {
display: flex;
align-items: flex-end;
justify-content: space-between;
margin: 0 auto;
padding: 0 15px;
.btn-1 {
background-image: url('//p0.meituan.net/csc/7708348ee250eae910328bb7c12197f029562.png');
background-size: 100% 100%;
width: 200px;
height: 220px;
}
.btn-2 {
// background-image: url('//p1.meituan.net/csc/8cc2b518031eb7424b184d90a583d805146287.png');
background-image: url('../../static/game_banner.png');
background-size: 100% 100%;
width: 300px;
height: 220px;
}
.btn-3 {
background-image: url('//p0.meituan.net/csc/31bd1f5c791c95557758dfa5c96e001529545.png');
background-size: 100% 100%;
width: 200px;
height: 220px;
}
}
}
.navigation {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-gap: 40px;
margin: 20px;
height: auto;
background-color: #fff;
border-radius: 20px;
padding: 32px 0;
.item {
display: flex;
flex-direction: column;
align-items: center;
.icon {
background-size: 100% 100%;
width: 90px;
height: 90px;
}
.text {
color: #333333;
font-size: 26px;
margin-top: 6px;
}
}
}
.ad {
// background-image: url('https://jdt168.oss-cn-guangzhou.aliyuncs.com/ad.png');
background-image: url('https://pic.imgdb.cn/item/6697aa0dd9c307b7e95c94d9.png');
background-size: 100% 100%;
height: 180px;
margin: 20px;
}

View File

@@ -1,215 +1,14 @@
<template>
<view>
<view :style="{ marginTop: BarHeight + 'px' }"></view>
<view class="local">
<view class="iconfont icon-dizhi" style="font-size: 20px"></view>
<text class="text-[28px]">{{ address }}</text>
</view>
<view class="search">
<view
class="iconfont icon-sousuo"
style="color: #8f8f8f; margin-right: 8px"></view>
<input placeholder="请输入商家名称搜索" v-model="searchVal" />
<view class="search-btn" @click="clickSearch">搜索</view>
</view>
<view class="banner">
<view class="title"></view>
<navigator class="jf-btn" hover-class="none"></navigator>
<view class="footer">
<navigator
hover-class="none"
class="btn-1"
url="/pages/fastBuy/index?type=1"></navigator>
<navigator
hover-class="none"
openType="switchTab"
url="/pages/game/gamehome/index"
class="btn-2"></navigator>
<navigator
hover-class="none"
class="btn-3"
url="/pages/fastBuy/index?type=2"></navigator>
</view>
</view>
<view class="navigation">
<view
class="item"
v-for="(item, index) in navigationList"
:key="index"
@click="toPage(item)">
<image class="icon" :src="item.icon" />
<view class="text">{{ item.name }}</view>
</view>
</view>
<navigator
class="ad"
url="/pages/marketing/yq/index"
open-type="navigate"
hover-class="none">
</navigator>
<MerList :get-user-location="getUserLocal" />
<Popup :imgArr="imgList" />
</view>
<HomeNew v-if="isNewHome" />
<HomeOld v-else />
</template>
<script setup lang="ts">
import Taro from '@tarojs/taro';
import { ref } from 'vue';
import { getHomeList } from '@/api/home';
import MerList from '@/components/MerList.vue';
import Popup from '@/components/Popup.vue';
import HomeOld from './components/HomeOld.vue';
import HomeNew from './components/HomeNew.vue';
const statusBarHeight = Taro.getSystemInfoSync().statusBarHeight;
const BarHeight = ref((statusBarHeight as number) + 7);
interface navigationType {
ID?: number;
type: number;
icon: string;
name: string;
url: string;
}
const navigationList = ref<Array<navigationType>>([]);
const imgList = ref([
// require('../../static/popTip-1.png'),
require('../../static/popTip.png'),
]);
Taro.useShareAppMessage(() => ({
title: '捷兑通',
path: `/pages/index/index?scene=${Taro.getStorageSync('token')}`,
imageUrl: 'https://upload.jdt168.com/1714375021923881119_Share.jpg',
}));
const searchVal = ref('');
const clickSearch = () => {
if (!searchVal.value)
return Taro.showToast({
title: '请输入商家名称再搜索',
icon: 'none',
});
Taro.navigateTo({
url: `/pages/search/index?name=${searchVal.value}`,
});
searchVal.value = '';
};
Taro.useLoad(() => {
Taro.getPrivacySetting({
success: res => {
if (res.needAuthorization) {
Taro.requirePrivacyAuthorize({
success: () => {
console.log('用户同意授权');
},
fail: () => {
console.log('用户拒绝授权');
Taro.exitMiniProgram();
},
});
}
},
});
getNavLists();
getUserLocal();
});
const address = ref('获取位置中......');
const getUserLocal = async () => {
Taro.getLocation({
type: 'wgs84',
success: res => {
// Taro.request({
// url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${res.latitude},${res.longitude}&key=4EJBZ-TZXCV-IHUPX-UMI2L-MK3N3-37FSQ&get_poi=1`,
// method: 'GET',
// success: res => {
// switch (res.data.status) {
// case 121:
// Taro.showToast({
// title: res.data.message,
// icon: 'none',
// });
// break;
// default:
// const data = res.data.result.address_component;
// address.value = `${data.district}${data.street_number}`;
// break;
// }
// },
// });
Taro.request({
url: `https://api.tianditu.gov.cn/geocoder?postStr={'lon':${res.longitude},'lat':${res.latitude},'ver':1}&type=geocode&tk=42db4f3dfd1a18d31e73ee90aa2ce054`,
method: 'GET',
success: res => {
const { msg, result } = res.data;
if (msg === 'ok') {
address.value = `${result.addressComponent.county}${result.addressComponent.town}${result.addressComponent.address}`;
} else {
Taro.showToast({
title: msg,
icon: 'none',
});
}
},
});
},
});
};
const getNavLists = async () => {
navigationList.value = [
// {
// type: 1,
// icon: '//p0.meituan.net/csc/5c770748f0028c63741c5ec14df3cc386715.png',
// url: '',
// name: '活动商家',
// },
// {
// type: 1,
// icon: '//p0.meituan.net/csc/4868c06b99008ff7d5f81e6514858c8a7950.png',
// url: '',
// name: '兑换商家',
// },
{
type: 1,
icon: '//p0.meituan.net/csc/f33ad2443a67e9f3474a1d5fd9d529db7504.png',
url: '/pages/users/settled_mer/index',
name: '商户入驻',
},
{
type: 1,
icon: '//p0.meituan.net/csc/0403cf37dd14a6b44b22ffccaa2878f95703.png',
url: '/pages/allClassList/index',
name: '全部服务',
},
];
const res = await getHomeList();
res.data.data.forEach(item => {
navigationList.value.unshift({
ID: item.ID,
type: 2,
icon: item.icon,
url: item.url,
name: item.name,
});
});
};
const toPage = item => {
item.type !== 1
? Taro.navigateTo({
url: `/pages/search/index?id=${item.ID}&name=${item.name}`,
})
: Taro.navigateTo({
url: item.url as string,
});
};
const isNewHome = process.env.TARO_APP_SHOW_NEW_HOME === 'yes';
</script>
<style lang="scss">
@import './index.scss';
</style>
<style lang="scss" scoped></style>

View File

@@ -25,10 +25,16 @@ onMounted(() => {
</script>
<template>
<view>
<view class="search-page">
<MerList v-if="classId" v-model="classId" />
<Storelist v-else v-model="name" />
</view>
</template>
<style lang="scss"></style>
<style lang="scss">
.search-page {
min-height: 100vh;
background-color: #f5f6f7;
background-image: none;
}
</style>

View File

@@ -1,14 +1,14 @@
<template>
<view class="appUser">
<view
:style="{ width: isLogin ? '100%' : '70%' }"
class="user-center-card__header__transparent"
v-if="isLogin"
:style="{ width: isLogin ? '100%' : '70%' }">
v-if="isLogin">
<view
class="user-center-card__header__avatar"
@click="toPage('/pages/users/user_setting/index')">
<nut-avatar size="large">
<img :src="userInfo.data?.avatarUrl" />
<img :src="userInfo.data?.avatarUrl" alt="" />
</nut-avatar>
</view>
<view
@@ -34,7 +34,8 @@
<view class="user-center-card__header__avatar">
<nut-avatar size="large">
<img
src="https://img12.360buyimg.com/imagetools/jfs/t1/196430/38/8105/14329/60c806a4Ed506298a/e6de9fb7b8490f38.png" />
src="https://img12.360buyimg.com/imagetools/jfs/t1/196430/38/8105/14329/60c806a4Ed506298a/e6de9fb7b8490f38.png"
alt="" />
</nut-avatar>
</view>
<view class="user-center-card__header__info">
@@ -170,7 +171,7 @@
<!-- 版权 -->
<view class="mt-5 text-[20px] text-center">
<view class="text-[#999999]">鑫瓴科技版权所有</view>
<view class="text-[#999999]">{{ copText }}</view>
<!-- <view>v4.0.0</view> -->
</view>
<!-- 登录 -->
@@ -186,13 +187,19 @@ import { ref } from 'vue';
import { ArrowRight, IconFont } from '@nutui/icons-vue-taro';
import Taro from '@tarojs/taro';
import Auth from '@/components/Auth.vue';
import { getPersonalInfo, getPhone, bindParent } from '@/api/user';
import {
getPersonalInfo,
getPhone,
// bindParent
} from '@/api/user';
import { maskString } from '@/utils';
const isShowLogin = ref(false);
const isLogin = ref(false);
const copText = process.env.TARO_APP_COP;
interface UserInfo {
data?: {
nickName?: string;
@@ -231,15 +238,15 @@ const init_data = () => {
}
};
const test = () => {
console.log(process.env.TARO_APP_ID);
Taro.openCustomerServiceChat({
corpId: 'wwb5dd953ca36043ef',
extInfo: {
url: 'https://work.weixin.qq.com/kfid/kfcb2b0420e94102346',
},
});
};
// const test = () => {
// console.log(process.env.TARO_APP_ID);
// Taro.openCustomerServiceChat({
// corpId: 'wwb5dd953ca36043ef',
// extInfo: {
// url: 'https://work.weixin.qq.com/kfid/kfcb2b0420e94102346',
// },
// });
// };
const cancelLogin = () => {
isShowLogin.value = false;
@@ -327,28 +334,28 @@ const toPage = (url: string) => {
});
};
const scanCode = () => {
Taro.scanCode({
onlyFromCamera: true,
scanType: ['qrCode'],
success: async data => {
try {
await bindParent({
uid: data.result,
});
Taro.showToast({
title: '绑定成功',
icon: 'none',
});
} catch (error) {
Taro.showToast({
title: error.msg,
icon: 'none',
});
}
},
});
};
// const scanCode = () => {
// Taro.scanCode({
// onlyFromCamera: true,
// scanType: ['qrCode'],
// success: async data => {
// try {
// await bindParent({
// uid: data.result,
// });
// Taro.showToast({
// title: '绑定成功',
// icon: 'none',
// });
// } catch (error) {
// Taro.showToast({
// title: error.msg,
// icon: 'none',
// });
// }
// },
// });
// };
</script>
<style lang="scss">

View File

@@ -3,12 +3,17 @@ import Taro from '@tarojs/taro';
import UserModal from '@/components/UserModal.vue';
import { ref } from 'vue';
import { getPhone, login, getPersonalInfo } from '@/api/user';
import logoImg from '../../../static/logo.jpg';
// import logoImg from '../../../static/logo.jpg';
import { Left, Home } from '@nutui/icons-vue-taro';
const statusBarHeight = Taro.getSystemInfoSync().statusBarHeight;
const BarHeight = ref((statusBarHeight as number) - 7);
const appName = process.env.TARO_APP_NAME;
const logoImg = require(process.env.TARO_APP_LOGO_IMG as string);
// const logoImg = process.env.TARO_APP_LOGO_IMG;
const isShow = ref(false);
const val = ref(false);
@@ -157,8 +162,8 @@ const clickText = (type: number, text: string) => {
</view>
<image src="../../../static/wechat_login.jpg" />
<view class="logo">
<image :src="logoImg" />
<view>捷兑通</view>
<image :src="logoImg"></image>
<view>{{ appName }}</view>
</view>
<view class="center">
<nut-button

View File

@@ -97,7 +97,11 @@ const getList = async () => {
const res = await getActiveOrderList({
status: tabValue.value,
});
orderList.value = res.data.data;
if (res.data.data.length >= 2) {
orderList.value = res.data.data.slice(0, 2);
} else {
orderList.value = res.data.data;
}
} catch (error) {
Taro.showToast({
title: error.msg,

View File

@@ -268,6 +268,9 @@ Taro.useLoad(options => {
type.value = options.type;
oid.value = options.orderId;
tId.value = Number(options.OrderType);
});
Taro.useDidShow(() => {
Taro.getLocation({
type: 'wgs84',
success: res => {
@@ -277,7 +280,7 @@ Taro.useLoad(options => {
});
// goodInfo.value = Taro.getStorageSync('item');
getOrderDetail();
});
})
const getOrderDetail = async () => {
const res = await getActiveOrderDetail({

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
src/static/logo-1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
src/static/zhenggai.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 KiB

View File

@@ -1,32 +0,0 @@
import { app } from '@/config';
import Taro from '@tarojs/taro';
export interface RequestParams {
url: string;
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
header?: object;
data?: string | object;
}
const request = (request: RequestParams): Promise<any> => {
return new Promise((resolve, reject) => {
Taro.request({
url: `${app.API_URL()}${request.url}`,
method: request.method,
timeout: 5000,
dataType: 'json',
header: request.header || {},
data: request.data || {},
success: res => {
resolve(res.data);
// Taro.hideLoading()
},
fail: err => {
reject(err);
Taro.hideLoading();
},
});
});
};
export default request;

View File

@@ -43,7 +43,7 @@ const request = (
title: '提示',
content: '你当前未登录,是否前往登录?',
confirmText: '去登录',
cancelText: '先逛逛',
cancelText: '暂不登录',
success: ({ confirm }) => {
if (confirm) {
Taro.reLaunch({

View File

@@ -2,7 +2,16 @@
module.exports = {
content: ['./src/pages/index.html', './src/**/*.{html,js,ts,jsx,tsx,vue}'],
theme: {
extend: {},
extend: {
colors: {
primary: '#fa2c19', // Theme Red
secondary: '#ff5d45', // Lighter Red
surface: '#ffffff',
},
boxShadow: {
'card': '0 2px 8px rgba(0, 0, 0, 0.04)',
},
},
},
plugins: [],
corePlugins: {