Commit 36dfff04 by 陆志强

Merge branch 'feature/neotype' into test

parents 79381c82 e01945f7
module.exports = { module.exports = {
root: true, root: true,
env: { env: {},
browser: true, extends: [
node: true 'alloy',
}, 'alloy/vue',
],
parserOptions: { parserOptions: {
parser: '@babel/eslint-parser', parser: '@babel/eslint-parser',
requireConfigFile: false
}, },
extends: [ ignorePatterns: ["**/WSTimer/timer.js", "public/**"],
'@nuxtjs', rules: {
'plugin:nuxt/recommended', 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'prettier' 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
], "vue/component-tags-order": ["error", {
plugins: [ "order": ["template", "script", "style"]
], }],
// add your custom rules here "vue/multi-word-component-names":"off",
rules: {} 'vue/no-reserved-component-names': 'off',
} 'new-cap': 'off',
'vue/no-duplicate-attributes': 'off',
"max-lines-per-function": 'off',
"complexity": 'off',
"max-params": 'off',
"max-depth": ["error", 6],
"no-param-reassign": [
"error",
{
"props": true,
"ignorePropertyModificationsFor": [
"e", // for e.returnvalue
"ctx", // for Koa routing
"req", // for Express requests
"request", // for Express requests
"res", // for Express responses
"response", // for Express responses
"state", // for vuex state
"item",
"files"
]
}
]
},
};
...@@ -2,71 +2,69 @@ ...@@ -2,71 +2,69 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [1.3.21](https://gitlab.aodianyun.com/activities/web-lottery/compare/v1.3.12...v1.3.21) (2024-08-13) ### [1.3.16](https://gitlab.aodianyun.com/activities/web-lottery/compare/v1.3.14...v1.3.16) (2024-12-23)
### Features ### Features
* 尝试修复问题 ([e2b544f](https://gitlab.aodianyun.com/activities/web-lottery/commit/e2b544fb28487da1694cd4c770f8426dfabdefce)) * 地址接口开启信息填写时才请求 ([dd8ebfa](https://gitlab.aodianyun.com/activities/web-lottery/commit/dd8ebfa6c1a22fa3ef0b0b177db6797a742cc9d3))
* 定时抽奖倒计时新增天 ([4a31414](https://gitlab.aodianyun.com/activities/web-lottery/commit/4a3141454f38c42327b29c0895f53769f8a67bb5)) * 更改命令 ([fb65c3b](https://gitlab.aodianyun.com/activities/web-lottery/commit/fb65c3bd7e361a9a46550bf42b4653a6611b2198))
* 恢复dockerfile ([7881c28](https://gitlab.aodianyun.com/activities/web-lottery/commit/7881c28995539d4a7cf709531c049a854b11ba6b))
* 未登录不请求地址接口 ([11520dd](https://gitlab.aodianyun.com/activities/web-lottery/commit/11520dd72fd08bd0d32eff320cfebf5a410374be))
* 文案修改 ([6f85e56](https://gitlab.aodianyun.com/activities/web-lottery/commit/6f85e56539fcf1447b188ea3ff5158155ff5ae8d))
* 细节优化 ([2ec98a1](https://gitlab.aodianyun.com/activities/web-lottery/commit/2ec98a1d8dee6169c1558cd1786ee545ea67abe7))
* 新增强制填写逻辑 ([5b25a21](https://gitlab.aodianyun.com/activities/web-lottery/commit/5b25a21bbfa74b8e9ee297ba7245ee0955801113))
* 新增config单独页 ([3143d44](https://gitlab.aodianyun.com/activities/web-lottery/commit/3143d441f6ee433522da5d0dfb45de1b5e9083aa))
* 修复抽奖删除情况 ([9fdb691](https://gitlab.aodianyun.com/activities/web-lottery/commit/9fdb6913e72531450c360ad104e85b6eba7bf242))
* 修复错误 ([0c63703](https://gitlab.aodianyun.com/activities/web-lottery/commit/0c63703065aa9149755add146659c1178a39a803))
* 修复接口加速顺序不同导致地址接口不请求的错误 ([8dfebbc](https://gitlab.aodianyun.com/activities/web-lottery/commit/8dfebbcd71676cc843248985dfe673b96ca1c933))
* 修复命令 ([1445be5](https://gitlab.aodianyun.com/activities/web-lottery/commit/1445be5e052579af880c701174cbebdd3a125d3f))
* 修复问题 ([7ed5f64](https://gitlab.aodianyun.com/activities/web-lottery/commit/7ed5f64ad87c33beda94bff691ed3ad5d9bfcc21))
* 修复问题 ([c4cf3ac](https://gitlab.aodianyun.com/activities/web-lottery/commit/c4cf3acfd8452d2bfdc76c068bd1ee214c31312a))
* 修复cname登录问题 ([e227a59](https://gitlab.aodianyun.com/activities/web-lottery/commit/e227a59b345f6ac00cf09508dcce519d47c0ffb2))
* 验证码发送提示修改 ([d5cb747](https://gitlab.aodianyun.com/activities/web-lottery/commit/d5cb747341375a2b75111e640ecb36b29e66ddbf))
* 样式调整 ([ef76fec](https://gitlab.aodianyun.com/activities/web-lottery/commit/ef76fecced58489c7d1be23edc97f82e938d2897))
* 样式优化 ([439eac0](https://gitlab.aodianyun.com/activities/web-lottery/commit/439eac042f4a507f40e7fb26c2391cfc27d3a9b4))
* 样式优化 ([fc71ae5](https://gitlab.aodianyun.com/activities/web-lottery/commit/fc71ae59b4266d7578bf02518376866631512e5e))
* 样式优化 ([dcc5495](https://gitlab.aodianyun.com/activities/web-lottery/commit/dcc549567555033faaad5695447bf2b5383186d4))
* csr改造 ([60a922d](https://gitlab.aodianyun.com/activities/web-lottery/commit/60a922d7918313f59fd6fc51b603b25d6fd2cbdd))
* csr改造 ([14e1a5f](https://gitlab.aodianyun.com/activities/web-lottery/commit/14e1a5f457f2ad9bac229aa0f8f75bca6873c08a))
### [1.3.15](https://gitlab.aodianyun.com/activities/web-lottery/compare/v1.3.12...v1.3.15) (2024-10-17)
### Features
* 地址接口开启信息填写时才请求 ([dd8ebfa](https://gitlab.aodianyun.com/activities/web-lottery/commit/dd8ebfa6c1a22fa3ef0b0b177db6797a742cc9d3))
* 更改命令 ([fb65c3b](https://gitlab.aodianyun.com/activities/web-lottery/commit/fb65c3bd7e361a9a46550bf42b4653a6611b2198))
* 更新九宫格版本 ([9c37af9](https://gitlab.aodianyun.com/activities/web-lottery/commit/9c37af926f3693a057487289e3134a78346f1ae1)) * 更新九宫格版本 ([9c37af9](https://gitlab.aodianyun.com/activities/web-lottery/commit/9c37af926f3693a057487289e3134a78346f1ae1))
* 更新npm包版本 ([a2c814a](https://gitlab.aodianyun.com/activities/web-lottery/commit/a2c814ad5b006a2b256ab5ac7ca94e442f89f7f4)) * 恢复dockerfile ([7881c28](https://gitlab.aodianyun.com/activities/web-lottery/commit/7881c28995539d4a7cf709531c049a854b11ba6b))
* 九宫格奖品名称居中 ([f2e3798](https://gitlab.aodianyun.com/activities/web-lottery/commit/f2e37984b7b384c1333bd12a41da2f1add3c1870))
* 内嵌抽奖也增加信息限制判断 ([86d8fbd](https://gitlab.aodianyun.com/activities/web-lottery/commit/86d8fbd291c52e104a7a529029097835b57276e9)) * 内嵌抽奖也增加信息限制判断 ([86d8fbd](https://gitlab.aodianyun.com/activities/web-lottery/commit/86d8fbd291c52e104a7a529029097835b57276e9))
* 内嵌信息检测问题 ([87246a4](https://gitlab.aodianyun.com/activities/web-lottery/commit/87246a412889c53b9a255c052cef0fc23d5d0d12)) * 未登录不请求地址接口 ([11520dd](https://gitlab.aodianyun.com/activities/web-lottery/commit/11520dd72fd08bd0d32eff320cfebf5a410374be))
* 文案修改 ([6f85e56](https://gitlab.aodianyun.com/activities/web-lottery/commit/6f85e56539fcf1447b188ea3ff5158155ff5ae8d))
* 细节优化 ([2ec98a1](https://gitlab.aodianyun.com/activities/web-lottery/commit/2ec98a1d8dee6169c1558cd1786ee545ea67abe7))
* 新增抽奖信息限制 ([0bec2a7](https://gitlab.aodianyun.com/activities/web-lottery/commit/0bec2a755dfe5a1c2ee7edd7d407439954e75533)) * 新增抽奖信息限制 ([0bec2a7](https://gitlab.aodianyun.com/activities/web-lottery/commit/0bec2a755dfe5a1c2ee7edd7d407439954e75533))
* 新增强制填写逻辑 ([5b25a21](https://gitlab.aodianyun.com/activities/web-lottery/commit/5b25a21bbfa74b8e9ee297ba7245ee0955801113))
* 新增config单独页 ([3143d44](https://gitlab.aodianyun.com/activities/web-lottery/commit/3143d441f6ee433522da5d0dfb45de1b5e9083aa))
* 信息限制样式优化 ([9d36925](https://gitlab.aodianyun.com/activities/web-lottery/commit/9d3692541b82416d5d1969cb200319b30adbc746)) * 信息限制样式优化 ([9d36925](https://gitlab.aodianyun.com/activities/web-lottery/commit/9d3692541b82416d5d1969cb200319b30adbc746))
* 修复地址相反的问题 ([a023ae9](https://gitlab.aodianyun.com/activities/web-lottery/commit/a023ae9bb2cc6f96f18a386055d36165c44d5dcb)) * 修复抽奖删除情况 ([9fdb691](https://gitlab.aodianyun.com/activities/web-lottery/commit/9fdb6913e72531450c360ad104e85b6eba7bf242))
* 修复地址组件问题 ([2f22c62](https://gitlab.aodianyun.com/activities/web-lottery/commit/2f22c62b6849472944cc4458b3993e45edbd12be)) * 修复错误 ([0c63703](https://gitlab.aodianyun.com/activities/web-lottery/commit/0c63703065aa9149755add146659c1178a39a803))
* 修复问题 ([47c3abd](https://gitlab.aodianyun.com/activities/web-lottery/commit/47c3abda86b9ef10886de2cc9196555896f18f1b)) * 修复接口加速顺序不同导致地址接口不请求的错误 ([8dfebbc](https://gitlab.aodianyun.com/activities/web-lottery/commit/8dfebbcd71676cc843248985dfe673b96ca1c933))
* 修复显示 ([dd606ae](https://gitlab.aodianyun.com/activities/web-lottery/commit/dd606aed55a79c6ded36011fc6fe6e07f9e95a7d)) * 修复命令 ([1445be5](https://gitlab.aodianyun.com/activities/web-lottery/commit/1445be5e052579af880c701174cbebdd3a125d3f))
* 修复问题 ([7ed5f64](https://gitlab.aodianyun.com/activities/web-lottery/commit/7ed5f64ad87c33beda94bff691ed3ad5d9bfcc21))
* 修复问题 ([c4cf3ac](https://gitlab.aodianyun.com/activities/web-lottery/commit/c4cf3acfd8452d2bfdc76c068bd1ee214c31312a))
* 修复样式问题 ([105f958](https://gitlab.aodianyun.com/activities/web-lottery/commit/105f958a6f5ae4579c56467d836386edc8fa5dfe)) * 修复样式问题 ([105f958](https://gitlab.aodianyun.com/activities/web-lottery/commit/105f958a6f5ae4579c56467d836386edc8fa5dfe))
* 修复已知问题 ([8474e4e](https://gitlab.aodianyun.com/activities/web-lottery/commit/8474e4ebfb820f1b3cbe74ccd73919006d1c12c9)) * 修复已知问题 ([8474e4e](https://gitlab.aodianyun.com/activities/web-lottery/commit/8474e4ebfb820f1b3cbe74ccd73919006d1c12c9))
* 修复label换行问题 ([8b13585](https://gitlab.aodianyun.com/activities/web-lottery/commit/8b1358534a53b151d9c29023e679117d9e02a4fe)) * 修复label换行问题 ([8b13585](https://gitlab.aodianyun.com/activities/web-lottery/commit/8b1358534a53b151d9c29023e679117d9e02a4fe))
* 样式优化 ([1f6aa85](https://gitlab.aodianyun.com/activities/web-lottery/commit/1f6aa85985b0ccdbfbc6f8e649b149aa39eb6aee)) * 验证码发送提示修改 ([d5cb747](https://gitlab.aodianyun.com/activities/web-lottery/commit/d5cb747341375a2b75111e640ecb36b29e66ddbf))
* 样式调整 ([ef76fec](https://gitlab.aodianyun.com/activities/web-lottery/commit/ef76fecced58489c7d1be23edc97f82e938d2897))
* 样式优化 ([439eac0](https://gitlab.aodianyun.com/activities/web-lottery/commit/439eac042f4a507f40e7fb26c2391cfc27d3a9b4))
* 样式优化 ([fc71ae5](https://gitlab.aodianyun.com/activities/web-lottery/commit/fc71ae59b4266d7578bf02518376866631512e5e))
* 样式优化 ([dcc5495](https://gitlab.aodianyun.com/activities/web-lottery/commit/dcc549567555033faaad5695447bf2b5383186d4))
* 样式优化 ([f1badd5](https://gitlab.aodianyun.com/activities/web-lottery/commit/f1badd5e005b1f8263141fd94c86e41f6c6afff8)) * 样式优化 ([f1badd5](https://gitlab.aodianyun.com/activities/web-lottery/commit/f1badd5e005b1f8263141fd94c86e41f6c6afff8))
* 样式优化 ([7056dc1](https://gitlab.aodianyun.com/activities/web-lottery/commit/7056dc15b57c8ca06fff6d14be42f1e8b0589966)) * 样式优化 ([7056dc1](https://gitlab.aodianyun.com/activities/web-lottery/commit/7056dc15b57c8ca06fff6d14be42f1e8b0589966))
* csr改造 ([60a922d](https://gitlab.aodianyun.com/activities/web-lottery/commit/60a922d7918313f59fd6fc51b603b25d6fd2cbdd))
### [1.3.20](https://gitlab.aodianyun.com/activities/web-lottery/compare/v1.3.19...v1.3.20) (2024-03-15) * csr改造 ([14e1a5f](https://gitlab.aodianyun.com/activities/web-lottery/commit/14e1a5f457f2ad9bac229aa0f8f75bca6873c08a))
### [1.3.19](https://gitlab.aodianyun.com/activities/web-lottery/compare/v1.3.18...v1.3.19) (2024-03-15)
### Features
* 内嵌信息检测问题 ([87246a4](https://gitlab.aodianyun.com/activities/web-lottery/commit/87246a412889c53b9a255c052cef0fc23d5d0d12))
* 修复显示 ([dd606ae](https://gitlab.aodianyun.com/activities/web-lottery/commit/dd606aed55a79c6ded36011fc6fe6e07f9e95a7d))
* 样式优化 ([1f6aa85](https://gitlab.aodianyun.com/activities/web-lottery/commit/1f6aa85985b0ccdbfbc6f8e649b149aa39eb6aee))
### [1.3.18](https://gitlab.aodianyun.com/activities/web-lottery/compare/v1.3.17...v1.3.18) (2024-03-12)
### Features
* 定时抽奖倒计时新增天 ([4a31414](https://gitlab.aodianyun.com/activities/web-lottery/commit/4a3141454f38c42327b29c0895f53769f8a67bb5))
### [1.3.17](https://gitlab.aodianyun.com/activities/web-lottery/compare/v1.3.16...v1.3.17) (2024-03-12)
### Features
* 尝试修复问题 ([e2b544f](https://gitlab.aodianyun.com/activities/web-lottery/commit/e2b544fb28487da1694cd4c770f8426dfabdefce))
* 更新npm包版本 ([a2c814a](https://gitlab.aodianyun.com/activities/web-lottery/commit/a2c814ad5b006a2b256ab5ac7ca94e442f89f7f4))
* 修复问题 ([47c3abd](https://gitlab.aodianyun.com/activities/web-lottery/commit/47c3abda86b9ef10886de2cc9196555896f18f1b))
### [1.3.16](https://gitlab.aodianyun.com/activities/web-lottery/compare/v1.3.15...v1.3.16) (2024-03-11)
### Features
* 修复地址组件问题 ([2f22c62](https://gitlab.aodianyun.com/activities/web-lottery/commit/2f22c62b6849472944cc4458b3993e45edbd12be))
### [1.3.15](https://gitlab.aodianyun.com/activities/web-lottery/compare/v1.3.14...v1.3.15) (2024-03-08)
### Features
* 修复地址相反的问题 ([a023ae9](https://gitlab.aodianyun.com/activities/web-lottery/commit/a023ae9bb2cc6f96f18a386055d36165c44d5dcb))
### [1.3.14](https://gitlab.aodianyun.com/activities/web-lottery/compare/v1.3.13...v1.3.14) (2024-03-05) ### [1.3.14](https://gitlab.aodianyun.com/activities/web-lottery/compare/v1.3.13...v1.3.14) (2024-03-05)
......
FROM registry.cn-hangzhou.aliyuncs.com/cduan/customer-resource-base:zabbix FROM registry.cn-hangzhou.aliyuncs.com/cduan/customer-resource-base:nginx
ADD ./ /var/www/web_lottery RUN mkdir -p /usr/share/nginx/www/lottery
ENV HOST 0.0.0.0 COPY ./dist /usr/share/nginx/www/lottery
ENV TZ Asia/Shanghai
WORKDIR /var/www/web_lottery
RUN yarn install
RUN yarn build:prod
RUN rm -rf assets components layouts middleware pages plugins store .eslintrc.js .gitignore build.yml pDockerfile README.md pStart.sh
EXPOSE 4002
RUN chmod +x start.sh
ENTRYPOINT ["./start.sh"]
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
FROM alpine AS builder
WORKDIR /home/app
RUN apk add --no-cache --update nodejs yarn
COPY package.json yarn.lock ./
RUN yarn install --registry=https://registry.yarnpkg.com
FROM registry.cn-hangzhou.aliyuncs.com/open_images/node12.13.1-pm2
ADD ./ /var/www/web_lottery
ENV HOST 0.0.0.0
ENV TZ Asia/Shanghai
WORKDIR /var/www/web_lottery
COPY --from=builder /home/app/package.json ./package.json
COPY --from=builder /home/app/node_modules ./node_modules
RUN yarn build:cbn
RUN rm -rf assets components layouts middleware pages plugins store .eslintrc.js .gitignore build.yml Dockerfile README.md start.sh
EXPOSE 4002
RUN chmod +x cbnStart.sh
ENTRYPOINT ["./cbnStart.sh"]
#!/bin/sh
yarn run pm2:cbn
while true
do
sleep 5;
done
FROM alpine AS builder
WORKDIR /home/app
RUN apk add --no-cache --update nodejs yarn
COPY package.json yarn.lock ./
RUN yarn install --registry=https://registry.yarnpkg.com
FROM registry.cn-hangzhou.aliyuncs.com/cduan/customer-resource-base:zabbix
ADD ./ /var/www/web_lottery
ENV HOST 0.0.0.0
ENV TZ Asia/Shanghai
WORKDIR /var/www/web_lottery
COPY --from=builder /home/app/package.json ./package.json
COPY --from=builder /home/app/node_modules ./node_modules
RUN yarn build:cbnclouds
RUN rm -rf assets components layouts middleware pages plugins store .eslintrc.js .gitignore build.yml Dockerfile README.md start.sh
EXPOSE 4002
RUN chmod +x cbncloudsStart.sh
ENTRYPOINT ["./cbncloudsStart.sh"]
#!/bin/sh
yarn run pm2:cbnclouds
while true
do
sleep 5;
done
FROM alpine AS builder
WORKDIR /home/app
RUN apk add --no-cache --update nodejs yarn
COPY package.json yarn.lock ./
RUN yarn install --registry=https://registry.yarnpkg.com
FROM registry.cn-hangzhou.aliyuncs.com/open_images/node12.13.1-pm2
ADD ./ /var/www/web_lottery
ENV HOST 0.0.0.0
ENV TZ Asia/Shanghai
WORKDIR /var/www/web_lottery
COPY --from=builder /home/app/package.json ./package.json
COPY --from=builder /home/app/node_modules ./node_modules
RUN yarn build:cdzhcm
RUN rm -rf assets components layouts middleware pages plugins store .eslintrc.js .gitignore build.yml Dockerfile README.md start.sh
EXPOSE 4002
RUN chmod +x cdzhcmStart.sh
ENTRYPOINT ["./cdzhcmStart.sh"]
#!/bin/sh
yarn run pm2:cdzhcm
while true
do
sleep 5;
done
FROM registry.cn-hangzhou.aliyuncs.com/cduan/customer-resource-base:zabbix
ADD ./ /var/www/web_lottery
ENV HOST 0.0.0.0
ENV TZ Asia/Shanghai
WORKDIR /var/www/web_lottery
RUN yarn install
RUN yarn build:cm
RUN rm -rf assets components layouts middleware pages plugins store .eslintrc.js .gitignore build.yml Dockerfile README.md start.sh
EXPOSE 4002
RUN chmod +x cmStart.sh
ENTRYPOINT ["./cmStart.sh"]
\ No newline at end of file
#!/bin/sh
yarn run pm2:cm
while true
do
sleep 5;
done
const protocol = process.client && window.location.protocol
export default {
goDomain: `//${process.env.GO_API_DOMAIN}/v1`,
privateDomain: `//${process.env.PRIVATE_API_DOMAIN}/v1`,
activityDomain: `//${process.env.ACTIVITY_API_DOMAIN}/v1`,
defBanner: `//${process.env.OSS_DOMAIN}/common/img/lottery_banner_default_v2.png`,
defShareImg: `${protocol || 'https:'}//${process.env.OSS_DOMAIN}/common/img/lottery.png`, // 必须带协议头,否则微信分享配置时无法生效
ossImageServe: process.env.IS_PRIVATE ? '' : '?x-oss-process=style/mobilebackground',
}
FROM alpine AS builder
WORKDIR /home/app
RUN apk add --no-cache --update nodejs yarn
COPY package.json yarn.lock ./
RUN yarn install --registry=https://registry.yarnpkg.com
FROM registry.cn-hangzhou.aliyuncs.com/cduan/customer-resource-base:zabbix
ADD ./ /var/www/web_lottery
ENV HOST 0.0.0.0
ENV TZ Asia/Shanghai
WORKDIR /var/www/web_lottery
COPY --from=builder /home/app/package.json ./package.json
COPY --from=builder /home/app/node_modules ./node_modules
RUN yarn build:cuc
RUN rm -rf assets components layouts middleware pages plugins store .eslintrc.js .gitignore build.yml Dockerfile README.md start.sh
EXPOSE 4002
RUN chmod +x cucStart.sh
ENTRYPOINT ["./cucStart.sh"]
\ No newline at end of file
#!/bin/sh
yarn run pm2:cuc
while true
do
sleep 5;
done
FROM alpine AS builder
WORKDIR /home/app
RUN apk add --no-cache --update nodejs yarn
COPY package.json yarn.lock ./
RUN yarn install --registry=https://registry.yarnpkg.com
FROM registry.cn-hangzhou.aliyuncs.com/open_images/node12.13.1-pm2
ADD ./ /var/www/web_lottery
ENV HOST 0.0.0.0
ENV TZ Asia/Shanghai
WORKDIR /var/www/web_lottery
COPY --from=builder /home/app/package.json ./package.json
COPY --from=builder /home/app/node_modules ./node_modules
RUN yarn build:huawei
RUN rm -rf assets components layouts middleware pages plugins store .eslintrc.js .gitignore build.yml Dockerfile README.md start.sh
EXPOSE 34002
RUN chmod +x huaweiStart.sh
ENTRYPOINT ["./huaweiStart.sh"]
#!/bin/sh
yarn run pm2:huawei
while true
do
sleep 5;
done
/* eslint-disable nuxt/no-cjs-in-config */
const path = require('path')
const WebpackAliOSSPlugin = require('@gdyfe/webpack-alioss-plugin')
const { getEnvConfig } = require('@gdyfe/config')
const { version, name } = require('./package.json')
const env = getEnvConfig({
server: process.env.mode,
ic: 'ZmUtZ5WNp%XBzDw='
})
const { X_CA_STAGE, RUN_SERVER, STATIC_SOURCE_DOMAIN, STATIC_OSS_ACCESS, OSS_DOMAIN } = env
const { SERVE_PORT, BASE_URL, PROJECT_NAME, SENTRY_DSN, GTAG_ID } = env.lottery
const IS_USE_OSS = process.env.NODE_ENV === 'production' && !!STATIC_OSS_ACCESS.accessKeyId
const plugins = IS_USE_OSS
? [
// 优化打包速度
new WebpackAliOSSPlugin({
accessKeyId: STATIC_OSS_ACCESS.accessKeyId,
accessKeySecret: STATIC_OSS_ACCESS.accessKeySecret,
region: STATIC_OSS_ACCESS.region,
bucket: STATIC_OSS_ACCESS.bucket,
prefix: PROJECT_NAME,
limit: 10, // 备份最近 10 个版本的 oss 文件
format: version,
exclude: [/.*\.html$/], // 或者 /.*\.html$/,排除.html文件的上传
deleteAll: false, // 优先匹配 format 配置项
output: path.resolve(__dirname, './nuxt-dist/dist/client'),
local: true // 上传打包输出目录里的文件
})
]
: []
const sentryConfig = IS_USE_OSS
? {
sentry: {
dsn: SENTRY_DSN,
config: {
name,
environment: RUN_SERVER,
release: version,
autoSessionTracking: false
},
lazy: true
}
}
: {}
const gtagConfig = IS_USE_OSS
? {
'google-gtag': {
id: GTAG_ID, // required
config: {
anonymize_ip: true,
send_page_view: false
}
}
}
: {}
export default {
buildDir: 'nuxt-dist',
env: {
...env,
UPLOADER_ACCESS: '',
STATIC_OSS_ACCESS: ''
},
router: {
base: BASE_URL,
middleware: ['device'],
extendRoutes(routes, resolve) {
routes.push({
path: '/',
redirect: '/list',
components: null
})
routes.push({
path: '/index/:id',
components: {
default: resolve(__dirname, 'pages/index') // or routes[index].component
}
})
}
},
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: '',
meta: [
{ charset: 'utf-8' },
{
name: 'viewport',
content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover'
},
{ hid: 'description', name: 'description', content: '' },
{ name: 'format-detection', content: 'telephone=no' },
{
hid: 'description',
name: 'description',
content: '问卷报表'
}
],
link: [
{
rel: 'stylesheet',
href: `//${OSS_DOMAIN}/common/icon/iconfont.css`,
ssr: false
},
{ rel: 'icon', href: `//${OSS_DOMAIN}/common/img/gdy_favicon.png` },
{ rel: 'stylesheet', href: `//${STATIC_SOURCE_DOMAIN}/web-component/complaintsDeal/complaintsDeal.min.css` },
{
href: '//apiliveroom.dev.guangdianyun.tv/v1',
rel: 'dns-prefetch'
},
{
href: '//activity.guangdianyun.tv',
rel: 'dns-prefetch'
},
{
href: '//static-pro.guangdianyun.tv',
rel: 'dns-prefetch'
},
{
href: '//res.wx.qq.com',
rel: 'dns-prefetch'
},
{
href: '//www.googletagmanager.com',
rel: 'dns-prefetch'
},
{
rel: 'stylesheet',
href: `//${STATIC_SOURCE_DOMAIN}/custom-plugins-library/login-center/style.css`,
},
],
script: [
{ src: `//${STATIC_SOURCE_DOMAIN}/web-component/complaintsDeal/complaintsDeal.min.js`, defer: true },
{
src: `//${STATIC_SOURCE_DOMAIN}/custom-plugins-library/login-center/login-center.min.js`
},
]
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: ['@/assets/styles/main.less'],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [
{ src: '@/plugins/routeHooks' },
{ src: '@/plugins/vant' },
{ src: '@/filters' },
{ src: '@/plugins/vueClipboard' },
{ src: '@/plugins/dmsService', ssr: false },
{ src: '@/plugins/pvStatisticalService', ssr: false },
{ src: '@/plugins/deviceId', ssr: false }
],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
// https://go.nuxtjs.dev/eslint
'@nuxtjs/eslint-module',
'@nuxtjs/style-resources'
],
/* less全局变量 */
styleResources: {
less: './assets/styles/variable.less'
},
// Modules: https://go.nuxtjs.dev/config-modules
modules: ['@nuxtjs/axios', '@nuxtjs/sentry', '@nuxtjs/google-gtag'],
/*
** Axios module configuration
** See https://axios.nuxtjs.org/options
*/
...sentryConfig,
...gtagConfig,
axios: {},
server: {
https: !process.env.NODE_ENV === 'production',
port: SERVE_PORT, // default: 3000
host: '0.0.0.0' // default: localhost
},
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
publicPath: IS_USE_OSS
? `//${STATIC_SOURCE_DOMAIN}/${PROJECT_NAME}/${version}`
: `/${X_CA_STAGE.toLowerCase() || 'prod'}/`,
transpile: [/vant.*?less/],
babel: {
plugins: [
[
'import',
{
libraryName: 'vant',
style: name => {
return `${name}/style/less.js`
}
},
'vant'
]
]
},
postcss: {
plugins: {
'postcss-pxtorem': {
rootValue: 75,
selectorBlackList: [/^html$/, /^body$/, '.lottery-entry', 'tippy'], // 忽略转换正则匹配项
propList: ['*']
}
}
},
plugins
}
}
...@@ -7,85 +7,72 @@ ...@@ -7,85 +7,72 @@
"release": "standard-version", "release": "standard-version",
"release:minor": "standard-version -r minor", "release:minor": "standard-version -r minor",
"release:patch": "standard-version -r patch", "release:patch": "standard-version -r patch",
"serve:dev": "cross-env mode=test nuxt", "serve:dev": "cross-env mode=test vue-cli-service serve",
"serve:pre": "cross-env mode=preview nuxt", "serve:pre": "cross-env mode=preview vue-cli-service serve",
"serve:prod": "cross-env mode=production nuxt", "serve:prod": "cross-env mode=production vue-cli-service serve",
"serve:cm": "cross-env mode=cm nuxt", "serve:cm": "cross-env mode=cm vue-cli-service serve",
"serve:vvku": "cross-env mode=vvku nuxt", "serve:vvku": "cross-env mode=vvku vue-cli-service serve",
"serve:cbn": "cross-env mode=cbn nuxt", "serve:cbn": "cross-env mode=cbn vue-cli-service serve",
"serve:huawei": "cross-env mode=huawei nuxt", "serve:huawei": "cross-env mode=huawei vue-cli-service serve",
"serve:cbnclouds": "cross-env mode=cbnclouds nuxt", "serve:cbnclouds": "cross-env mode=cbnclouds vue-cli-service serve",
"serve:cuc": "cross-env mode=cuc nuxt", "serve:cuc": "cross-env mode=cuc vue-cli-service serve",
"serve:cdzhcm": "cross-env mode=cdzhcm nuxt", "serve:cdzhcm": "cross-env mode=cdzhcm vue-cli-service serve",
"build:dev": "cross-env mode=test nuxt build", "build:dev": "cross-env mode=test vue-cli-service build",
"build:pre": "cross-env mode=preview nuxt build", "build:pre": "cross-env mode=preview vue-cli-service build",
"build:prod": "cross-env mode=production nuxt build", "build:prod": "cross-env mode=production vue-cli-service build",
"build:cm": "cross-env mode=cm nuxt build", "build:cm": "cross-env mode=cm vue-cli-service build",
"build:vvku": "cross-env mode=vvku nuxt build", "build:vvku": "cross-env mode=vvku vue-cli-service build",
"build:cbn": "cross-env mode=cbn nuxt build", "build:cbn": "cross-env mode=cbn vue-cli-service build",
"build:huawei": "cross-env mode=huawei nuxt build", "build:huawei": "cross-env mode=huawei vue-cli-service build",
"build:cbnclouds": "cross-env mode=cbnclouds nuxt build", "build:cbnclouds": "cross-env mode=cbnclouds vue-cli-service build",
"build:cuc": "cross-env mode=cuc nuxt build", "build:cuc": "cross-env mode=cuc vue-cli-service build",
"build:cdzhcm": "cross-env mode=cdzhcm nuxt build", "build:cdzhcm": "cross-env mode=cdzhcm vue-cli-service build",
"start:dev": "cross-env mode=test nuxt start",
"start:pre": "cross-env mode=preview nuxt start",
"start:prod": "cross-env mode=production nuxt start",
"start:cm": "cross-env mode=cm nuxt start",
"start:vvku": "cross-env mode=vvku nuxt start",
"start:cbn": "cross-env mode=cbn nuxt start",
"start:huawei": "cross-env mode=huawei nuxt start",
"start:cbnclouds": "cross-env mode=cbnclouds nuxt start",
"start:cuc": "cross-env mode=cuc nuxt start",
"start:cdzhcm": "cross-env mode=cdzhcm nuxt start",
"pm2:dev": "pm2 start pm2.json --only lottery-test",
"pm2:pre": "pm2 start pm2.json --only lottery-pre",
"pm2:prod": "pm2 start pm2.json --only lottery-prod",
"pm2:cm": "pm2 start pm2.json --only lottery-cm",
"pm2:vvku": "pm2 start pm2.json --only lottery-vvku",
"pm2:cbn": "pm2 start pm2.json --only lottery-cbn",
"pm2:huawei": "pm2 start pm2.json --only lottery-huawei",
"pm2:cbnclouds": "pm2 start pm2.json --only lottery-cbnclouds",
"pm2:cuc": "pm2 start pm2.json --only lottery-cuc",
"pm2:cdzhcm": "pm2 start pm2.json --only lottery-cdzhcm",
"generate": "nuxt generate", "generate": "nuxt generate",
"lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .", "lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .",
"lint:style": "stylelint \"**/*.{vue,css}\" --ignore-path .gitignore", "lint:style": "stylelint \"**/*.{vue,css}\" --ignore-path .gitignore",
"lint": "yarn lint:js && yarn lint:style" "lint": "yarn lint:js && yarn lint:style"
}, },
"dependencies": { "dependencies": {
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
"@easy-messenger/client-connection": "^1.0.3", "@easy-messenger/client-connection": "^1.0.3",
"@gdyfe/config": "^1.3.2", "@gdyfe/config": "^2.1.5",
"@gdyfe/gdy-component-lib": "^1.0.3", "@gdyfe/gdy-component-lib": "^1.0.4",
"@gdyfe/rop-client": "1.1.10", "@gdyfe/rop-client": "1.1.10",
"@nuxtjs/axios": "^5.13.6", "axios": "^0.18.0",
"@nuxtjs/google-gtag": "^1.0.4",
"@nuxtjs/sentry": "^5.1.7",
"@vant/area-data": "^1.5.1", "@vant/area-data": "^1.5.1",
"core-js": "^3.15.1", "core-js": "^3.37.1",
"dayjs": "^1.10.6", "dayjs": "^1.10.6",
"js-cookie": "2.2.0", "js-cookie": "2.2.0",
"lotteries": "^1.2.2", "lotteries": "^1.2.2",
"normalize.css": "^8.0.1", "normalize.css": "^8.0.1",
"nuxt": "^2.15.8",
"qrcode": "^1.4.4", "qrcode": "^1.4.4",
"uuid": "^8.3.2", "uuid": "^8.3.2",
"vant": "^2.12.22", "vant": "^2.12.22",
"vconsole": "^3.9.1", "vconsole": "^3.9.1",
"vue": "^2.6.14",
"vue-clipboard2": "^0.3.1", "vue-clipboard2": "^0.3.1",
"vue-cookie": "^1.1.4", "vue-cookie": "^1.1.4",
"vue-router": "^3.1.3",
"vuescroll": "^4.17.3", "vuescroll": "^4.17.3",
"vuex": "^3.0.1",
"webpack": "^4.46.0",
"weixin-js-sdk": "^1.6.0" "weixin-js-sdk": "^1.6.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/eslint-parser": "^7.14.7", "@babel/eslint-parser": "^7.14.7",
"@gdyfe/webpack-alioss-plugin": "^0.1.6", "@gdyfe/webpack-alioss-plugin": "^0.1.6",
"@nuxtjs/eslint-config": "^6.0.1",
"@nuxtjs/eslint-module": "^3.0.2",
"@nuxtjs/style-resources": "^1.2.0",
"@vant/touch-emulator": "^1.3.2", "@vant/touch-emulator": "^1.3.2",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-plugin-vuex": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"@vue/eslint-config-airbnb": "^4.0.0",
"@vue/eslint-config-prettier": "^6.0.0",
"babel-plugin-import": "^1.13.3", "babel-plugin-import": "^1.13.3",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint": "^7.29.0", "eslint": "^7.29.0",
"eslint-config-alloy": "^3.0.0",
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.3.0",
"eslint-plugin-nuxt": "^2.0.0", "eslint-plugin-nuxt": "^2.0.0",
"eslint-plugin-vue": "^7.12.1", "eslint-plugin-vue": "^7.12.1",
......
export default function ({ store, app, redirect }) {
app.router.beforeEach((to, from, next) => {
// if (to.path === '/') {
// redirect({ path: '/list', query: to.query })
// return
// }
const { uin = 0, id = 0, sessionId = 0 } = to.query
if (!uin) {
app.context.error({ statusCode: 404, message: 'This page could not be found' })
}
store.commit('users/SET_UIN', uin)
if (['/list', '/index', '/message', '/winners'].includes(to.path) && !id) {
app.context.error({ statusCode: 450, message: 'Incomplete route, parameter: ID not found' })
}
if (['/index', '/message'].includes(to.path) && !sessionId) {
app.context.error({ statusCode: 450, message: 'Incomplete route, parameter: found:sessionId not found' })
}
next()
})
}
import Vue from 'vue'
import VueClipboard from 'vue-clipboard2'
Vue.use(VueClipboard)
import Vue from 'vue'
import vueScroll from 'vuescroll'
Vue.use(vueScroll)
{
"apps": [
{
"name": "lottery-test",
"script": "npm",
"args": "run start:dev",
"instances": "max",
"exec_mode": "cluster",
"autorestart": true,
"max_memory_restart": "4G",
"env": {
"mode": "test",
"NODE_ENV": "production"
},
"error_file": "./logs/app-err.log",
"out_file": "./logs/app-out.log"
},
{
"name": "lottery-pre",
"script": "npm",
"args": "run start:pre",
"instances": "max",
"exec_mode": "cluster",
"autorestart": true,
"max_memory_restart": "4G",
"env": {
"mode": "preview",
"NODE_ENV": "production"
},
"error_file": "./logs/app-err.log",
"out_file": "./logs/app-out.log"
},
{
"name": "lottery-prod",
"script": "npm",
"args": "run start:prod",
"instances": "max",
"exec_mode": "cluster",
"autorestart": true,
"max_memory_restart": "8G",
"env": {
"mode": "production",
"NODE_ENV": "production"
},
"error_file": "./logs/app-err.log",
"out_file": "./logs/app-out.log"
},
{
"name": "lottery-cm",
"script": "npm",
"args": "run start:cm",
"instances": "max",
"exec_mode": "cluster",
"autorestart": true,
"max_memory_restart": "8G",
"env": {
"mode": "cm",
"NODE_ENV": "production"
},
"error_file": "./logs/app-err.log",
"out_file": "./logs/app-out.log"
},
{
"name": "lottery-vvku",
"script": "npm",
"args": "run start:vvku",
"instances": "max",
"exec_mode": "cluster",
"autorestart": true,
"max_memory_restart": "8G",
"env": {
"mode": "vvku",
"NODE_ENV": "production"
},
"error_file": "./logs/app-err.log",
"out_file": "./logs/app-out.log"
},
{
"name": "lottery-cbn",
"script": "npm",
"args": "run start:cbn",
"instances": "max",
"exec_mode": "cluster",
"autorestart": true,
"max_memory_restart": "8G",
"env": {
"mode": "cbn",
"NODE_ENV": "production"
},
"error_file": "./logs/app-err.log",
"out_file": "./logs/app-out.log"
},
{
"name": "lottery-huawei",
"script": "npm",
"args": "run start:huawei",
"instances": "max",
"exec_mode": "cluster",
"autorestart": true,
"max_memory_restart": "8G",
"env": {
"mode": "huawei",
"NODE_ENV": "production"
},
"error_file": "./logs/app-err.log",
"out_file": "./logs/app-out.log"
},
{
"name": "lottery-cbnclouds",
"script": "npm",
"args": "run start:cbnclouds",
"instances": "max",
"exec_mode": "cluster",
"autorestart": true,
"max_memory_restart": "32G",
"env": {
"mode": "cbnclouds",
"NODE_ENV": "production"
},
"error_file": "./logs/app-err.log",
"out_file": "./logs/app-out.log"
},
{
"name": "lottery-cuc",
"script": "npm",
"args": "run start:cuc",
"instances": "max",
"exec_mode": "cluster",
"autorestart": true,
"max_memory_restart": "32G",
"env": {
"mode": "cuc",
"NODE_ENV": "production"
},
"error_file": "./logs/app-err.log",
"out_file": "./logs/app-out.log"
}
]
}
\ No newline at end of file
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<meta http-equiv="Cache-Control" content="no-store no-cache" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!-- <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" /> -->
<link href="<%= BASE_URL %><%= process.env.VUE_APP_ASSETS_DIR %>/config.js" rel="preload" as="script" />
<!-- <link href="<%= BASE_URL %><%= process.env.VUE_APP_ASSETS_DIR %>/moduleLoader.js" rel="preload" as="script" /> -->
<script src="<%= BASE_URL %><%= process.env.VUE_APP_ASSETS_DIR %>/config.js"></script>
<!-- <script src="<%= BASE_URL %><%= process.env.VUE_APP_ASSETS_DIR %>/moduleLoader.js"></script> -->
<title></title>
<script>
;(function() {
// Function to create and add a link element
function _addLink(href, rel) {
var linkTag = document.createElement('link')
linkTag.rel = rel
linkTag.href = href
document.head.appendChild(linkTag)
}
// Function to create and add a script element
function _addScript(src) {
var scriptTag = document.createElement('script')
scriptTag.src = src
document.head.appendChild(scriptTag)
}
// Add favicon and iconfont stylesheets
_addLink('//' + window.__GDY_ENV_CONFIG__.OSS_DOMAIN + '/common/img/gdy_favicon.png', 'icon')
_addLink('//' + window.__GDY_ENV_CONFIG__.OSS_DOMAIN + '/common/icon/iconfont.css', 'stylesheet')
_addLink('//' + window.__GDY_ENV_CONFIG__.STATIC_SOURCE_DOMAIN + '/web-component/complaintsDeal/complaintsDeal.min.css', 'stylesheet')
_addLink('//apiliveroom.dev.guangdianyun.tv/v1', 'dns-prefetch')
_addLink('//activity.guangdianyun.tv', 'dns-prefetch')
_addLink('//static-pro.guangdianyun.tv', 'dns-prefetch')
_addLink('//res.wx.qq.com', 'dns-prefetch')
_addLink('//www.googletagmanager.com', 'dns-prefetch')
_addLink('//' + window.__GDY_ENV_CONFIG__.STATIC_SOURCE_DOMAIN + '/custom-plugins-library/login-center/style.css', 'stylesheet')
_addScript('//' + window.__GDY_ENV_CONFIG__.STATIC_SOURCE_DOMAIN + '/web-component/complaintsDeal/complaintsDeal.min.js')
_addScript('//' + window.__GDY_ENV_CONFIG__.STATIC_SOURCE_DOMAIN + '/custom-plugins-library/login-center/login-center.min.js')
})()
</script>
<style>
</style>
</head>
<body>
<noscript>
<strong
>We're sorry but web_lottery doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong
>
</noscript>
<div id="app">
</div>
<!-- built files will be auto injected -->
</body>
</html>
/*!
* Global Config for Guangdianyun v1.6.4
* https://guangdianyun.tv/
*
* Copyright belongs to Guangdianyun Corporation and other contributors
* Released under the Proprietary License
*
* Date: 2024-07-26 15:51:44
*/
(function () {
if (!!window.__GDY_ENV_CONFIG__) return;
Object.defineProperty(window, "__GDY_ENV_CONFIG__", {
value: Object.freeze({
"PLATFORM_NAME": "广电云",
"WEB_TITLE": "广电云",
"HOME_PAGE": "https://www.guangdianyun.tv",
"LOGIN_TITLE": "欢迎使用广电云平台",
"CHANNEL_LOGIN_TITLE": "欢迎登录频道",
"FOOTER_INFO": [
"Copyright © 2023 杭州广电云网络科技有限公司",
"浙ICP备07500424号 | 浙公网安备 33010602007591号"
],
"CHANNEL_FOOTER_INFO": ["Powered by 杭州广电云网络科技有限公司"],
"APP_NAME": "融媒体单兵APP",
"APP_ABBREVIATION": "单兵",
"X_CA_STAGE": "PRE",
"RUN_SERVER": "preview",
"IS_PRIVATE": false,
"OSS_DOMAIN": "static-pro.guangdianyun.tv",
"ROP_DOMAIN": "aodianyun.com",
"CNAME_DOMAIN": "guangdianyun.tv",
"HELPER_DOMAIN": "help-pre.guangdianyun.tv",
"BACKUP_DOMAIN": "consoles.gyuncloud.com",
"AODIAN_OSS_DOMAIN": "cdn.aodianyun.com",
"CONSOLES_DOMAIN": "consoles-pre.guangdianyun.tv",
"CHANNEL_DOMAIN": "pindao-pre.guangdianyun.tv",
"CUSTOMER_DOMAIN": "web.guangdianyun.tv",
"TEACHER_DOMAIN": "teacher-pre.guangdianyun.tv",
"STATIC_SOURCE_DOMAIN": "static-preview.guangdianyun.tv",
"CONSOLES_API_DOMAIN": "consoleapi.guangdianyun.tv",
"CUSTOMER_API_DOMAIN": "apiliveroom.dev.guangdianyun.tv",
"CUSTOMER_TOKEN_KEY": "token",
"GO_API_DOMAIN": "golivec-pre.guangdianyun.tv",
"PRIVATE_API_DOMAIN": "privateapi-pre.guangdianyun.tv",
"ACTIVITY_API_DOMAIN": "activity.guangdianyun.tv",
"VOTE_API_DOMAIN": "vote.guangdianyun.tv",
"AGGREGATE_API_DOMAIN": "aggregate.guangdianyun.tv",
"ADY_API_DOMAIN": "apiliveroom.dev.guangdianyun.tv",
"COUPON_API_DOMAIN": "apiliveroom.dev.guangdianyun.tv",
"WELCOME_API_DOMAIN": "apiliveroom.dev.guangdianyun.tv",
"PROGRAMME_API_DOMAIN": "apiliveroom.dev.guangdianyun.tv",
"PIXTEXT_API_DOMAIN": "apiliveroom.dev.guangdianyun.tv",
"BAPI_API_DOMAIN": "bapipre.guangdianyun.tv",
"CMS_API_DOMAIN": "apiliveroom.dev.guangdianyun.tv",
"APP_API_DOMAIN": "apiliveroom.dev.guangdianyun.tv",
"PUB_API_DOMAIN": "pub.guangdianyun.tv",
"API_API_DOMAIN": "api.guangdianyun.tv",
"PRE7_API_DOMAIN": "pre7.guangdianyun.tv",
"GATHER_API_DOMAIN": "apiliveroom.dev.guangdianyun.tv",
"LCPS_API_DOMAIN": "lcps.guangdianyun.tv",
"PERSONAL_API_DOMAIN": "apiliveroom.dev.guangdianyun.tv",
"FUNCTION_API_DOMAIN": "1812501212048408.cn-hangzhou.fc.aliyuncs.com",
"HTTP_PORT": "",
"HTTPS_PORT": "",
"WX_LOGIN_APPID": "wxf7396938c269bf9f",
"ALI_LOGIN_MOBILE_APPID": "20000067",
"ALI_LOGIN_PC_APPID": "2021001159681017",
"UPLOADER_ACCESS": {
"SERVICE_PROVIDER": "aliyun",
"CONFIGURATION": { "accessKeyId": "", "accessKeySecret": "", "endpoint": "", "cname": "" }
},
"STATIC_OSS_ACCESS": { "accessKeyId": "", "accessKeySecret": "", "region": "", "bucket": "", "multiFiles": true },
"live": {
"PROJECT_NAME": "live",
"PROJECT_NAME_ZH": "现场直播",
"BASE_URL": "/live/",
"SERVE_PORT": 4000,
"POST_INFO_TYPE": 0,
"SENTRY_DSN": "",
"GTAG_ID": "G-H08BKPKZPJ"
},
"cms": {
"PROJECT_NAME": "cms",
"PROJECT_NAME_ZH": "新闻中心",
"BASE_URL": "/cms/",
"SERVE_PORT": 3399,
"GTAG_ID": "",
"SENTRY_DSN": "",
"POST_INFO_TYPE": 5
},
"my": {
"PROJECT_NAME": "my",
"PROJECT_NAME_ZH": "个人中心",
"BASE_URL": "/my/",
"SERVE_PORT": 3004,
"GTAG_ID": "",
"SENTRY_DSN": "",
"POST_INFO_TYPE": 9
},
"vote": {
"PROJECT_NAME": "vote",
"PROJECT_NAME_ZH": "投票",
"BASE_URL": "/vote/",
"SERVE_PORT": 4003,
"GTAG_ID": "",
"SENTRY_DSN": "",
"POST_INFO_TYPE": 7
},
"tv": {
"PROJECT_NAME": "tv",
"PROJECT_NAME_ZH": "电视直播",
"BASE_URL": "/tv/",
"SERVE_PORT": 3002,
"GTAG_ID": "G-4S4FTBHC92",
"SENTRY_DSN": "",
"POST_INFO_TYPE": 1
},
"radio": {
"PROJECT_NAME": "radio",
"PROJECT_NAME_ZH": "电台直播",
"BASE_URL": "/radio/",
"SERVE_PORT": 3001,
"GTAG_ID": "G-K9CB9KG9FM",
"SENTRY_DSN": "https://4c27bca014c54f27b3deeb8420407a29@sentry.guangdianyun.tv/26",
"POST_INFO_TYPE": 2
},
"piclive": {
"PROJECT_NAME": "piclive",
"PROJECT_NAME_ZH": "图文直播",
"BASE_URL": "/piclive/",
"SERVE_PORT": 3003,
"GTAG_ID": "G-W3QSNR34FN",
"SENTRY_DSN": "https://1c483c44ca994de79712539b40585566@sentry.guangdianyun.tv/34",
"POST_INFO_TYPE": 3
},
"gather": {
"PROJECT_NAME": "gather",
"PROJECT_NAME_ZH": "聚合页",
"BASE_URL": "/gather/",
"SERVE_PORT": 3010,
"GTAG_ID": "UA-162031360-2",
"SENTRY_DSN": "https://172966a20ae444f39fcbd1b6b382de4f@sentry.guangdianyun.tv/21",
"POST_INFO_TYPE": 4
},
"questionnaire": {
"PROJECT_NAME": "questionnaire",
"PROJECT_NAME_ZH": "问卷",
"BASE_URL": "/questionnaire/",
"SERVE_PORT": 4001,
"GTAG_ID": "G-9LKWZ4ZFJ7",
"SENTRY_DSN": "https://da0df316aab442148b3f7a848662ddd2@sentry.guangdianyun.tv/23",
"POST_INFO_TYPE": 10
},
"lottery": {
"PROJECT_NAME": "lottery",
"PROJECT_NAME_ZH": "抽奖",
"BASE_URL": "/lottery/",
"SERVE_PORT": 4002,
"GTAG_ID": "G-HZHJLDPT80",
"SENTRY_DSN": "https://610a9f4b831d4d10b228658886eaa18d@sentry.guangdianyun.tv/14",
"POST_INFO_TYPE": 8
},
"job": {
"PROJECT_NAME": "job",
"PROJECT_NAME_ZH": "招聘",
"BASE_URL": "/job/",
"SERVE_PORT": 4011,
"GTAG_ID": "",
"SENTRY_DSN": "",
"POST_INFO_TYPE": 16
},
"auth": {
"PROJECT_NAME": "auth",
"PROJECT_NAME_ZH": "AUTH",
"BASE_URL": "/auth/",
"SERVE_PORT": 3100,
"GTAG_ID": "",
"SENTRY_DSN": "https://426117e52e14434f949757b78baa19af@sentry.guangdianyun.tv/4",
"POST_INFO_TYPE": ""
},
"coupon": {
"PROJECT_NAME": "coupon",
"PROJECT_NAME_ZH": "优惠券",
"BASE_URL": "/coupon/",
"SERVE_PORT": "",
"GTAG_ID": "",
"SENTRY_DSN": "https://f28c699ad832413c8b529520ea4b6df0@sentry.guangdianyun.tv/22",
"POST_INFO_TYPE": ""
},
"pay": {
"PROJECT_NAME": "pay",
"PROJECT_NAME_ZH": "支付",
"BASE_URL": "/pay/",
"SERVE_PORT": "",
"GTAG_ID": "",
"SENTRY_DSN": "",
"POST_INFO_TYPE": ""
},
"shop": {
"PROJECT_NAME": "shop",
"PROJECT_NAME_ZH": "商城",
"BASE_URL": "/shop",
"SERVE_PORT": 10086,
"GTAG_ID": "",
"SENTRY_DSN": "",
"POST_INFO_TYPE": ""
},
"invite": {
"PROJECT_NAME": "newInvite",
"PROJECT_NAME_ZH": "邀请卡",
"BASE_URL": "/newInvite/",
"SERVE_PORT": 9999,
"GTAG_ID": "",
"SENTRY_DSN": "",
"POST_INFO_TYPE": ""
},
"webComponent": {
"PROJECT_NAME": "web-component",
"PROJECT_NAME_ZH": "远程组件",
"BASE_URL": "/component/",
"SERVE_PORT": 9997,
"GTAG_ID": "",
"SENTRY_DSN": "",
"POST_INFO_TYPE": ""
},
"cloud": {
"PROJECT_NAME": "cloud",
"PROJECT_NAME_ZH": "云制作中心",
"BASE_URL": "/cloud/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"rcs_app": {
"PROJECT_NAME": "rcs_app",
"PROJECT_NAME_ZH": "云拆条",
"BASE_URL": "/rcs_app/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"res_app": {
"PROJECT_NAME": "res_app",
"PROJECT_NAME_ZH": "云实编",
"BASE_URL": "/res_app/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"necs_app": {
"PROJECT_NAME": "necs_app",
"PROJECT_NAME_ZH": "云非编",
"BASE_URL": "/necs_app/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"tte_app": {
"PROJECT_NAME": "tte_app",
"PROJECT_NAME_ZH": "图文制作",
"BASE_URL": "/tte_app/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"aqes_app": {
"PROJECT_NAME": "aqes_app",
"PROJECT_NAME_ZH": "云精剪",
"BASE_URL": "/aqes_app/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"mqes_app": {
"PROJECT_NAME": "mqes_app",
"PROJECT_NAME_ZH": "媒资快剪",
"BASE_URL": "/mqes_app/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"lcps": {
"PROJECT_NAME": "lcps",
"PROJECT_NAME_ZH": "导播中心",
"BASE_URL": "/lcps/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"lcpchart": {
"PROJECT_NAME": "lcpchart",
"PROJECT_NAME_ZH": "信源监看",
"BASE_URL": "/lcpchart/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"make": {
"PROJECT_NAME": "make",
"PROJECT_NAME_ZH": "制作导播台",
"BASE_URL": "/make/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"scene": {
"PROJECT_NAME": "scene",
"PROJECT_NAME_ZH": "导播台场景页",
"BASE_URL": "/scene/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"schedule": {
"PROJECT_NAME": "schedule",
"PROJECT_NAME_ZH": "智能编播",
"BASE_URL": "/schedule/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"contLcps": {
"PROJECT_NAME": "cont-lcps",
"PROJECT_NAME_ZH": "导播连麦",
"BASE_URL": "/cont-lcps/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"contClient": {
"PROJECT_NAME": "cont-client",
"PROJECT_NAME_ZH": "导播连麦客户端",
"BASE_URL": "/cont-client/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"consoleFrame": {
"PROJECT_NAME": "console",
"PROJECT_NAME_ZH": "父框架",
"SENTRY_DSN": "https://88b3f0691a59431384432ea50840bdbc@sentry.guangdianyun.tv/13",
"BASE_URL": "/console/",
"GTAG_ID": ""
},
"consoleGather": {
"PROJECT_NAME": "gather",
"PROJECT_NAME_ZH": "聚合管理",
"SENTRY_DSN": "",
"BASE_URL": "/gather/",
"GTAG_ID": ""
},
"active": {
"PROJECT_NAME": "active",
"PROJECT_NAME_ZH": "活动管理",
"SENTRY_DSN": "",
"BASE_URL": "/active/",
"GTAG_ID": ""
},
"program": {
"PROJECT_NAME": "program",
"PROJECT_NAME_ZH": "直播服务",
"SENTRY_DSN": "",
"BASE_URL": "/program/",
"GTAG_ID": ""
},
"control_live": {
"PROJECT_NAME": "control_live",
"PROJECT_NAME_ZH": "现场直播总控面板",
"SENTRY_DSN": "https://2cd60dbfe72d45ac9e0f0f0b988160c1@sentry.guangdianyun.tv/12",
"BASE_URL": "/control_live/",
"GTAG_ID": ""
},
"control_tv": {
"PROJECT_NAME": "control_tv",
"PROJECT_NAME_ZH": "电视直播总控面板",
"SENTRY_DSN": "",
"BASE_URL": "/control_tv/",
"GTAG_ID": ""
},
"control_radio": {
"PROJECT_NAME": "control_radio",
"PROJECT_NAME_ZH": "电台直播总控面板",
"SENTRY_DSN": "",
"BASE_URL": "/control_radio/",
"GTAG_ID": ""
},
"control_piclive": {
"PROJECT_NAME": "control_piclive",
"PROJECT_NAME_ZH": "图文直播总控面板",
"SENTRY_DSN": "",
"BASE_URL": "/control_piclive/",
"GTAG_ID": ""
},
"user": {
"PROJECT_NAME": "user",
"PROJECT_NAME_ZH": "用户管理",
"SENTRY_DSN": "",
"BASE_URL": "/user/",
"GTAG_ID": ""
},
"fuse": {
"PROJECT_NAME": "fuse",
"PROJECT_NAME_ZH": "融合频道",
"SENTRY_DSN": "",
"BASE_URL": "/fuse/",
"GTAG_ID": ""
},
"money": {
"PROJECT_NAME": "money",
"PROJECT_NAME_ZH": "资金管理",
"SENTRY_DSN": "",
"BASE_URL": "/money/",
"GTAG_ID": ""
},
"data": {
"PROJECT_NAME": "data",
"PROJECT_NAME_ZH": "数据中心",
"SENTRY_DSN": "https://074a66d8f173438bb60de7b43b7ebf3a@sentry.guangdianyun.tv/29",
"BASE_URL": "/data/",
"GTAG_ID": ""
},
"account": {
"PROJECT_NAME": "account",
"PROJECT_NAME_ZH": "账户中心",
"SENTRY_DSN": "",
"BASE_URL": "/account/",
"GTAG_ID": ""
},
"system": {
"PROJECT_NAME": "system",
"PROJECT_NAME_ZH": "系统管理",
"SENTRY_DSN": "https://15fae9bdc7854f128ad01c43bbceb752@sentry.guangdianyun.tv/6",
"BASE_URL": "/system/",
"GTAG_ID": ""
},
"monitor": {
"PROJECT_NAME": "monitor",
"PROJECT_NAME_ZH": "导播监看",
"BASE_URL": "/monitor/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"media": {
"PROJECT_NAME": "media",
"PROJECT_NAME_ZH": "素材库",
"BASE_URL": "/media/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"thirdparty": {
"PROJECT_NAME": "thirdparty",
"PROJECT_NAME_ZH": "第三方发布",
"BASE_URL": "/thirdparty/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"task": {
"PROJECT_NAME": "task",
"PROJECT_NAME_ZH": "任务系统",
"SENTRY_DSN": "",
"BASE_URL": "/task/",
"GTAG_ID": ""
},
"task_panel": {
"PROJECT_NAME": "task_panel",
"PROJECT_NAME_ZH": "任务系统管理面板",
"BASE_URL": "/task_panel/",
"SENTRY_DSN": "",
"GTAG_ID": ""
}
}),
writable: false
});
})();
/*!
* Global Config for Guangdianyun v1.6.0
* https://guangdianyun.tv/
*
* Copyright belongs to Guangdianyun Corporation and other contributors
* Released under the Proprietary License
*
* Date: 2024-05-16 15:01:07
*/
(function () {
if (!!window.__GDY_ENV_CONFIG__) return;
Object.defineProperty(window, "__GDY_ENV_CONFIG__", {
value: Object.freeze({
"PLATFORM_NAME": "广电云",
"WEB_TITLE": "广电云",
"HOME_PAGE": "https://www.guangdianyun.tv",
"LOGIN_TITLE": "欢迎使用广电云平台",
"CHANNEL_LOGIN_TITLE": "欢迎登录频道",
"FOOTER_INFO": [
"Copyright © 2023 杭州广电云网络科技有限公司",
"浙ICP备07500424号 | 浙公网安备 33010602007591号"
],
"CHANNEL_FOOTER_INFO": ["Powered by 杭州广电云网络科技有限公司"],
"APP_NAME": "融媒体单兵APP",
"APP_ABBREVIATION": "单兵",
"X_CA_STAGE": "",
"RUN_SERVER": "production",
"IS_PRIVATE": false,
"OSS_DOMAIN": "static-pro.guangdianyun.tv",
"ROP_DOMAIN": "aodianyun.com",
"CNAME_DOMAIN": "guangdianyun.tv",
"HELPER_DOMAIN": "help.guangdianyun.tv",
"AODIAN_OSS_DOMAIN": "cdn.aodianyun.com",
"CONSOLES_DOMAIN": "consoles.guangdianyun.tv",
"CHANNEL_DOMAIN": "pindao.guangdianyun.tv",
"CUSTOMER_DOMAIN": "web.guangdianyun.tv",
"TEACHER_DOMAIN": "teacher.guangdianyun.tv",
"STATIC_SOURCE_DOMAIN": "static-production.guangdianyun.tv",
"CONSOLES_API_DOMAIN": "consoleapi.guangdianyun.tv",
"CUSTOMER_API_DOMAIN": "apiliveroom.dev.guangdianyun.tv",
"CUSTOMER_TOKEN_KEY": "token",
"GO_API_DOMAIN": "golivec.guangdianyun.tv",
"PRIVATE_API_DOMAIN": "privateapi.guangdianyun.tv",
"ACTIVITY_API_DOMAIN": "activity.guangdianyun.tv",
"VOTE_API_DOMAIN": "vote.guangdianyun.tv",
"AGGREGATE_API_DOMAIN": "aggregate.guangdianyun.tv",
"ADY_API_DOMAIN": "apiliveroom.dev.guangdianyun.tv",
"COUPON_API_DOMAIN": "coupon.guangdianyun.tv",
"WELCOME_API_DOMAIN": "welcome.guangdianyun.tv",
"PROGRAMME_API_DOMAIN": "programme.guangdianyun.tv",
"PIXTEXT_API_DOMAIN": "pixtext.guangdianyun.tv",
"BAPI_API_DOMAIN": "bapi.guangdianyun.tv",
"CMS_API_DOMAIN": "cms.guangdianyun.tv",
"APP_API_DOMAIN": "app.guangdianyun.tv",
"PUB_API_DOMAIN": "pub.guangdianyun.tv",
"API_API_DOMAIN": "api.guangdianyun.tv",
"PRE7_API_DOMAIN": "pre7.guangdianyun.tv",
"GATHER_API_DOMAIN": "gather.guangdianyun.tv",
"LCPS_API_DOMAIN": "lcps.guangdianyun.tv",
"PERSONAL_API_DOMAIN": "personal.guangdianyun.tv",
"FUNCTION_API_DOMAIN": "1812501212048408.cn-hangzhou.fc.aliyuncs.com",
"HTTP_PORT": "",
"HTTPS_PORT": "",
"WX_LOGIN_APPID": "wxf7396938c269bf9f",
"ALI_LOGIN_MOBILE_APPID": "20000067",
"ALI_LOGIN_PC_APPID": "2021001159681017",
"UPLOADER_ACCESS": {
"SERVICE_PROVIDER": "aliyun",
"CONFIGURATION": { "accessKeyId": "", "accessKeySecret": "", "endpoint": "", "cname": "", "multiFiles": true }
},
"STATIC_OSS_ACCESS": { "accessKeyId": "", "accessKeySecret": "", "region": "", "bucket": "" },
"live": {
"PROJECT_NAME": "live",
"PROJECT_NAME_ZH": "现场直播",
"BASE_URL": "/live/",
"SERVE_PORT": 4000,
"GTAG_ID": "G-H08BKPKZPJ",
"SENTRY_DSN": "",
"POST_INFO_TYPE": 0
},
"cms": {
"PROJECT_NAME": "cms",
"PROJECT_NAME_ZH": "新闻中心",
"BASE_URL": "/cms/",
"SERVE_PORT": 3399,
"GTAG_ID": "",
"SENTRY_DSN": "",
"POST_INFO_TYPE": 5
},
"my": {
"PROJECT_NAME": "my",
"PROJECT_NAME_ZH": "个人中心",
"BASE_URL": "/my/",
"SERVE_PORT": 3004,
"GTAG_ID": "",
"SENTRY_DSN": "",
"POST_INFO_TYPE": ""
},
"vote": {
"PROJECT_NAME": "vote",
"PROJECT_NAME_ZH": "投票",
"BASE_URL": "/vote/",
"SERVE_PORT": 4003,
"GTAG_ID": "G-S4B1DBD2V4",
"SENTRY_DSN": "",
"POST_INFO_TYPE": 7
},
"tv": {
"PROJECT_NAME": "tv",
"PROJECT_NAME_ZH": "电视直播",
"BASE_URL": "/tv/",
"SERVE_PORT": 3002,
"GTAG_ID": "G-4S4FTBHC92",
"SENTRY_DSN": "",
"POST_INFO_TYPE": 1
},
"radio": {
"PROJECT_NAME": "radio",
"PROJECT_NAME_ZH": "电台直播",
"BASE_URL": "/radio/",
"SERVE_PORT": 3001,
"GTAG_ID": "G-K9CB9KG9FM",
"SENTRY_DSN": "https://4c27bca014c54f27b3deeb8420407a29@sentry.guangdianyun.tv/26",
"POST_INFO_TYPE": 2
},
"piclive": {
"PROJECT_NAME": "piclive",
"PROJECT_NAME_ZH": "图文直播",
"BASE_URL": "/piclive/",
"SERVE_PORT": 3003,
"GTAG_ID": "G-W3QSNR34FN",
"SENTRY_DSN": "https://1c483c44ca994de79712539b40585566@sentry.guangdianyun.tv/34",
"POST_INFO_TYPE": 3
},
"gather": {
"PROJECT_NAME": "gather",
"PROJECT_NAME_ZH": "聚合页",
"BASE_URL": "/gather/",
"SERVE_PORT": 3010,
"GTAG_ID": "UA-162031360-2",
"SENTRY_DSN": "https://172966a20ae444f39fcbd1b6b382de4f@sentry.guangdianyun.tv/21",
"POST_INFO_TYPE": 4
},
"questionnaire": {
"PROJECT_NAME": "questionnaire",
"PROJECT_NAME_ZH": "问卷",
"BASE_URL": "/questionnaire/",
"SERVE_PORT": 4001,
"GTAG_ID": "G-9LKWZ4ZFJ7",
"SENTRY_DSN": "https://da0df316aab442148b3f7a848662ddd2@sentry.guangdianyun.tv/23",
"POST_INFO_TYPE": 10
},
"lottery": {
"PROJECT_NAME": "lottery",
"PROJECT_NAME_ZH": "抽奖",
"BASE_URL": "/lottery/",
"SERVE_PORT": 4002,
"GTAG_ID": "G-HZHJLDPT80",
"SENTRY_DSN": "https://610a9f4b831d4d10b228658886eaa18d@sentry.guangdianyun.tv/14",
"POST_INFO_TYPE": 8
},
"job": {
"PROJECT_NAME": "job",
"PROJECT_NAME_ZH": "招聘",
"BASE_URL": "/job/",
"SERVE_PORT": 4011,
"GTAG_ID": "",
"SENTRY_DSN": "",
"POST_INFO_TYPE": 16
},
"auth": {
"PROJECT_NAME": "auth",
"PROJECT_NAME_ZH": "AUTH",
"BASE_URL": "/auth/",
"SERVE_PORT": 3100,
"GTAG_ID": "",
"SENTRY_DSN": "https://426117e52e14434f949757b78baa19af@sentry.guangdianyun.tv/4",
"POST_INFO_TYPE": ""
},
"coupon": {
"PROJECT_NAME": "coupon",
"PROJECT_NAME_ZH": "优惠券",
"BASE_URL": "/coupon/",
"SERVE_PORT": "",
"GTAG_ID": "",
"SENTRY_DSN": "https://f28c699ad832413c8b529520ea4b6df0@sentry.guangdianyun.tv/22",
"POST_INFO_TYPE": ""
},
"pay": {
"PROJECT_NAME": "pay",
"PROJECT_NAME_ZH": "支付",
"BASE_URL": "/pay/",
"SERVE_PORT": "",
"GTAG_ID": "",
"SENTRY_DSN": "",
"POST_INFO_TYPE": ""
},
"shop": {
"PROJECT_NAME": "shop",
"PROJECT_NAME_ZH": "商城",
"BASE_URL": "/shop",
"SERVE_PORT": 10086,
"GTAG_ID": "",
"SENTRY_DSN": "",
"POST_INFO_TYPE": ""
},
"invite": {
"PROJECT_NAME": "newInvite",
"PROJECT_NAME_ZH": "邀请卡",
"BASE_URL": "/newInvite/",
"SERVE_PORT": 9999,
"GTAG_ID": "",
"SENTRY_DSN": "",
"POST_INFO_TYPE": ""
},
"webComponent": {
"PROJECT_NAME": "web-component",
"PROJECT_NAME_ZH": "远程组件",
"BASE_URL": "/component/",
"SERVE_PORT": 9997,
"GTAG_ID": "",
"SENTRY_DSN": "",
"POST_INFO_TYPE": ""
},
"cloud": {
"PROJECT_NAME": "cloud",
"PROJECT_NAME_ZH": "云制作中心",
"BASE_URL": "/cloud/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"rcs_app": {
"PROJECT_NAME": "rcs_app",
"PROJECT_NAME_ZH": "云拆条",
"BASE_URL": "/rcs_app/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"res_app": {
"PROJECT_NAME": "res_app",
"PROJECT_NAME_ZH": "云实编",
"BASE_URL": "/res_app/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"necs_app": {
"PROJECT_NAME": "necs_app",
"PROJECT_NAME_ZH": "云非编",
"BASE_URL": "/necs_app/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"tte_app": {
"PROJECT_NAME": "tte_app",
"PROJECT_NAME_ZH": "图文制作",
"BASE_URL": "/tte_app/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"aqes_app": {
"PROJECT_NAME": "aqes_app",
"PROJECT_NAME_ZH": "云精剪",
"BASE_URL": "/aqes_app/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"mqes_app": {
"PROJECT_NAME": "mqes_app",
"PROJECT_NAME_ZH": "媒资快剪",
"BASE_URL": "/mqes_app/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"lcps": {
"PROJECT_NAME": "lcps",
"PROJECT_NAME_ZH": "导播中心",
"BASE_URL": "/lcps/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"lcpchart": {
"PROJECT_NAME": "lcpchart",
"PROJECT_NAME_ZH": "信源监看",
"BASE_URL": "/lcpchart/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"make": {
"PROJECT_NAME": "make",
"PROJECT_NAME_ZH": "制作导播台",
"BASE_URL": "/make/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"scene": {
"PROJECT_NAME": "scene",
"PROJECT_NAME_ZH": "导播台场景页",
"BASE_URL": "/scene/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"schedule": {
"PROJECT_NAME": "schedule",
"PROJECT_NAME_ZH": "智能编播",
"BASE_URL": "/schedule/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"contLcps": {
"PROJECT_NAME": "cont-lcps",
"PROJECT_NAME_ZH": "导播连麦",
"BASE_URL": "/cont-lcps/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"contClient": {
"PROJECT_NAME": "cont-client",
"PROJECT_NAME_ZH": "导播连麦客户端",
"BASE_URL": "/cont-client/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"consoleFrame": {
"PROJECT_NAME": "console",
"PROJECT_NAME_ZH": "父框架",
"SENTRY_DSN": "https://88b3f0691a59431384432ea50840bdbc@sentry.guangdianyun.tv/13",
"BASE_URL": "/console/",
"GTAG_ID": ""
},
"consoleGather": {
"PROJECT_NAME": "gather",
"PROJECT_NAME_ZH": "聚合管理",
"SENTRY_DSN": "",
"BASE_URL": "/gather/",
"GTAG_ID": ""
},
"active": {
"PROJECT_NAME": "active",
"PROJECT_NAME_ZH": "活动管理",
"SENTRY_DSN": "",
"BASE_URL": "/active/",
"GTAG_ID": "UA-162031360-5"
},
"program": {
"PROJECT_NAME": "program",
"PROJECT_NAME_ZH": "直播服务",
"SENTRY_DSN": "",
"BASE_URL": "/program/",
"GTAG_ID": ""
},
"control_live": {
"PROJECT_NAME": "control_live",
"PROJECT_NAME_ZH": "现场直播总控面板",
"SENTRY_DSN": "https://2cd60dbfe72d45ac9e0f0f0b988160c1@sentry.guangdianyun.tv/12",
"BASE_URL": "/control_live/",
"GTAG_ID": ""
},
"control_tv": {
"PROJECT_NAME": "control_tv",
"PROJECT_NAME_ZH": "电视直播总控面板",
"SENTRY_DSN": "",
"BASE_URL": "/control_tv/",
"GTAG_ID": ""
},
"control_radio": {
"PROJECT_NAME": "control_radio",
"PROJECT_NAME_ZH": "电台直播总控面板",
"SENTRY_DSN": "",
"BASE_URL": "/control_radio/",
"GTAG_ID": ""
},
"control_piclive": {
"PROJECT_NAME": "control_piclive",
"PROJECT_NAME_ZH": "图文直播总控面板",
"SENTRY_DSN": "",
"BASE_URL": "/control_piclive/",
"GTAG_ID": ""
},
"user": {
"PROJECT_NAME": "user",
"PROJECT_NAME_ZH": "用户管理",
"SENTRY_DSN": "",
"BASE_URL": "/user/",
"GTAG_ID": ""
},
"fuse": {
"PROJECT_NAME": "fuse",
"PROJECT_NAME_ZH": "融合频道",
"SENTRY_DSN": "",
"BASE_URL": "/fuse/",
"GTAG_ID": ""
},
"money": {
"PROJECT_NAME": "money",
"PROJECT_NAME_ZH": "资金管理",
"SENTRY_DSN": "",
"BASE_URL": "/money/",
"GTAG_ID": ""
},
"data": {
"PROJECT_NAME": "data",
"PROJECT_NAME_ZH": "数据中心",
"SENTRY_DSN": "https://074a66d8f173438bb60de7b43b7ebf3a@sentry.guangdianyun.tv/29",
"BASE_URL": "/data/",
"GTAG_ID": ""
},
"account": {
"PROJECT_NAME": "account",
"PROJECT_NAME_ZH": "账户中心",
"SENTRY_DSN": "",
"BASE_URL": "/account/",
"GTAG_ID": ""
},
"system": {
"PROJECT_NAME": "system",
"PROJECT_NAME_ZH": "系统管理",
"SENTRY_DSN": "https://15fae9bdc7854f128ad01c43bbceb752@sentry.guangdianyun.tv/6",
"BASE_URL": "/system/",
"GTAG_ID": ""
},
"monitor": {
"PROJECT_NAME": "monitor",
"PROJECT_NAME_ZH": "导播监看",
"BASE_URL": "/monitor/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"media": {
"PROJECT_NAME": "media",
"PROJECT_NAME_ZH": "素材库",
"BASE_URL": "/media/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"thirdparty": {
"PROJECT_NAME": "thirdparty",
"PROJECT_NAME_ZH": "第三方发布",
"BASE_URL": "/thirdparty/",
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"task": {
"PROJECT_NAME": "task",
"PROJECT_NAME_ZH": "任务系统",
"SENTRY_DSN": "",
"BASE_URL": "/task/",
"GTAG_ID": ""
},
"task_panel": {
"PROJECT_NAME": "task_panel",
"PROJECT_NAME_ZH": "任务系统管理面板",
"SENTRY_DSN": "",
"BASE_URL": "/task_panel/",
"GTAG_ID": ""
}
}),
writable: false
});
})();
/*!
* Global Config for Guangdianyun v1.6.4
* https://guangdianyun.tv/
*
* Copyright belongs to Guangdianyun Corporation and other contributors
* Released under the Proprietary License
*
* Date: 2024-07-26 15:51:44
*/
(function () {
if (!!window.__GDY_ENV_CONFIG__) return;
Object.defineProperty(window, "__GDY_ENV_CONFIG__", {
value: Object.freeze({
"PLATFORM_NAME": "广电云",
"WEB_TITLE": "广电云",
"HOME_PAGE": "https://www.guangdianyun.tv",
"LOGIN_TITLE": "欢迎使用广电云平台",
"CHANNEL_LOGIN_TITLE": "欢迎登录频道",
"FOOTER_INFO": [
"Copyright © 2023 杭州广电云网络科技有限公司",
"浙ICP备07500424号 | 浙公网安备 33010602007591号"
],
"CHANNEL_FOOTER_INFO": ["Powered by 杭州广电云网络科技有限公司"],
"APP_NAME": "融媒体单兵APP",
"APP_ABBREVIATION": "单兵",
"X_CA_STAGE": "TEST",
"RUN_SERVER": "development",
"IS_PRIVATE": false,
"OSS_DOMAIN": "static-pro.guangdianyun.tv",
"ROP_DOMAIN": "aodianyun.com",
"CNAME_DOMAIN": "guangdianyun.tv",
"HELPER_DOMAIN": "help-dev.guangdianyun.tv",
"BACKUP_DOMAIN": "",
"AODIAN_OSS_DOMAIN": "cdn.aodianyun.com",
"CONSOLES_DOMAIN": "consoles.dev.guangdianyun.tv",
"CHANNEL_DOMAIN": "pindao.dev.guangdianyun.tv",
"CUSTOMER_DOMAIN": "web.guangdianyun.tv",
"TEACHER_DOMAIN": "teacher.dev.guangdianyun.tv",
"STATIC_SOURCE_DOMAIN": "static-development.guangdianyun.tv",
"CONSOLES_API_DOMAIN": "consoleapi.guangdianyun.tv",
"CUSTOMER_API_DOMAIN": "apiliveroom.dev.guangdianyun.tv",
"CUSTOMER_TOKEN_KEY": "token",
"GO_API_DOMAIN": "golivec-dev.guangdianyun.tv",
"PRIVATE_API_DOMAIN": "privateapi.dev.guangdianyun.tv",
"ACTIVITY_API_DOMAIN": "activity.guangdianyun.tv",
"VOTE_API_DOMAIN": "votedev.guangdianyun.tv",
"AGGREGATE_API_DOMAIN": "aggregatedev.guangdianyun.tv",
"ADY_API_DOMAIN": "ady.dev.guangdianyun.tv",
"COUPON_API_DOMAIN": "apiliveroom.dev.guangdianyun.tv",
"WELCOME_API_DOMAIN": "welcomedev.guangdianyun.tv",
"PROGRAMME_API_DOMAIN": "apiliveroom.dev.guangdianyun.tv",
"PIXTEXT_API_DOMAIN": "apiliveroom.dev.guangdianyun.tv",
"BAPI_API_DOMAIN": "bapidev.guangdianyun.tv",
"CMS_API_DOMAIN": "apiliveroom.dev.guangdianyun.tv",
"APP_API_DOMAIN": "appdev.guangdianyun.tv",
"PUB_API_DOMAIN": "pubdev.guangdianyun.tv",
"API_API_DOMAIN": "apidev.guangdianyun.tv",
"PRE7_API_DOMAIN": "pre7.guangdianyun.tv",
"GATHER_API_DOMAIN": "apiliveroom.dev.guangdianyun.tv",
"LCPS_API_DOMAIN": "lcpsdev.guangdianyun.tv",
"PERSONAL_API_DOMAIN": "apiliveroom.dev.guangdianyun.tv",
"FUNCTION_API_DOMAIN": "1812501212048408.cn-hangzhou.fc.aliyuncs.com",
"HTTP_PORT": "",
"HTTPS_PORT": "",
"WX_LOGIN_APPID": "wxf7396938c269bf9f",
"ALI_LOGIN_MOBILE_APPID": "20000067",
"ALI_LOGIN_PC_APPID": "2021001159681017",
"UPLOADER_ACCESS": {
"SERVICE_PROVIDER": "aliyun",
"CONFIGURATION": { "accessKeyId": "", "accessKeySecret": "", "endpoint": "", "cname": "", "multiFiles": true }
},
"STATIC_OSS_ACCESS": { "accessKeyId": "", "accessKeySecret": "", "region": "", "bucket": "" },
"live": {
"PROJECT_NAME": "live",
"PROJECT_NAME_ZH": "现场直播",
"BASE_URL": "/live/",
"SERVE_PORT": 4000,
"POST_INFO_TYPE": 0,
"SENTRY_DSN": "",
"GTAG_ID": "G-H08BKPKZPJ"
},
"cms": {
"PROJECT_NAME": "cms",
"PROJECT_NAME_ZH": "新闻中心",
"BASE_URL": "/cms/",
"SERVE_PORT": 3399,
"POST_INFO_TYPE": 5,
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"my": {
"PROJECT_NAME": "my",
"PROJECT_NAME_ZH": "个人中心",
"BASE_URL": "/my/",
"SERVE_PORT": 3004,
"POST_INFO_TYPE": 9,
"GTAG_ID": "",
"SENTRY_DSN": ""
},
"vote": {
"PROJECT_NAME": "vote",
"PROJECT_NAME_ZH": "投票",
"BASE_URL": "/vote/",
"SERVE_PORT": 4003,
"POST_INFO_TYPE": 7,
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"tv": {
"PROJECT_NAME": "tv",
"PROJECT_NAME_ZH": "电视直播",
"BASE_URL": "/tv/",
"SERVE_PORT": 3002,
"POST_INFO_TYPE": 1,
"SENTRY_DSN": "",
"GTAG_ID": "G-4S4FTBHC92"
},
"radio": {
"PROJECT_NAME": "radio",
"PROJECT_NAME_ZH": "电台直播",
"BASE_URL": "/radio/",
"SERVE_PORT": 3001,
"POST_INFO_TYPE": 2,
"SENTRY_DSN": "https://4c27bca014c54f27b3deeb8420407a29@sentry.guangdianyun.tv/26",
"GTAG_ID": "G-K9CB9KG9FM"
},
"piclive": {
"PROJECT_NAME": "piclive",
"PROJECT_NAME_ZH": "图文直播",
"BASE_URL": "/piclive/",
"SERVE_PORT": 3003,
"POST_INFO_TYPE": 3,
"SENTRY_DSN": "https://1c483c44ca994de79712539b40585566@sentry.guangdianyun.tv/34",
"GTAG_ID": "G-W3QSNR34FN"
},
"gather": {
"PROJECT_NAME": "gather",
"PROJECT_NAME_ZH": "聚合页",
"BASE_URL": "/gather/",
"SERVE_PORT": 3010,
"POST_INFO_TYPE": 4,
"SENTRY_DSN": "https://172966a20ae444f39fcbd1b6b382de4f@sentry.guangdianyun.tv/21",
"GTAG_ID": "UA-162031360-2"
},
"questionnaire": {
"PROJECT_NAME": "questionnaire",
"PROJECT_NAME_ZH": "问卷",
"BASE_URL": "/questionnaire/",
"SERVE_PORT": 4001,
"POST_INFO_TYPE": 10,
"SENTRY_DSN": "https://da0df316aab442148b3f7a848662ddd2@sentry.guangdianyun.tv/23",
"GTAG_ID": "G-9LKWZ4ZFJ7"
},
"lottery": {
"PROJECT_NAME": "lottery",
"PROJECT_NAME_ZH": "抽奖",
"BASE_URL": "/lottery/",
"SERVE_PORT": 4002,
"POST_INFO_TYPE": 8,
"SENTRY_DSN": "https://610a9f4b831d4d10b228658886eaa18d@sentry.guangdianyun.tv/14",
"GTAG_ID": "G-HZHJLDPT80"
},
"job": {
"PROJECT_NAME": "job",
"PROJECT_NAME_ZH": "招聘",
"BASE_URL": "/job/",
"SERVE_PORT": 4011,
"POST_INFO_TYPE": 16,
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"auth": {
"PROJECT_NAME": "auth",
"PROJECT_NAME_ZH": "AUTH",
"BASE_URL": "/auth/",
"SERVE_PORT": 3100,
"POST_INFO_TYPE": "",
"SENTRY_DSN": "https://426117e52e14434f949757b78baa19af@sentry.guangdianyun.tv/4",
"GTAG_ID": ""
},
"coupon": {
"PROJECT_NAME": "coupon",
"PROJECT_NAME_ZH": "优惠券",
"BASE_URL": "/coupon/",
"SERVE_PORT": "",
"POST_INFO_TYPE": "",
"SENTRY_DSN": "https://f28c699ad832413c8b529520ea4b6df0@sentry.guangdianyun.tv/22",
"GTAG_ID": ""
},
"pay": {
"PROJECT_NAME": "pay",
"PROJECT_NAME_ZH": "支付",
"BASE_URL": "/pay/",
"SERVE_PORT": "",
"POST_INFO_TYPE": "",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"shop": {
"PROJECT_NAME": "shop",
"PROJECT_NAME_ZH": "商城",
"BASE_URL": "/shop",
"SERVE_PORT": 10086,
"POST_INFO_TYPE": "",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"invite": {
"PROJECT_NAME": "newInvite",
"PROJECT_NAME_ZH": "邀请卡",
"BASE_URL": "/newInvite/",
"SERVE_PORT": 9999,
"POST_INFO_TYPE": "",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"webComponent": {
"PROJECT_NAME": "web-component",
"PROJECT_NAME_ZH": "远程组件",
"BASE_URL": "/component/",
"SERVE_PORT": 9997,
"POST_INFO_TYPE": "",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"cloud": {
"PROJECT_NAME": "cloud",
"PROJECT_NAME_ZH": "云制作中心",
"BASE_URL": "/cloud/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"rcs_app": {
"PROJECT_NAME": "rcs_app",
"PROJECT_NAME_ZH": "云拆条",
"BASE_URL": "/rcs_app/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"res_app": {
"PROJECT_NAME": "res_app",
"PROJECT_NAME_ZH": "云实编",
"BASE_URL": "/res_app/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"necs_app": {
"PROJECT_NAME": "necs_app",
"PROJECT_NAME_ZH": "云非编",
"BASE_URL": "/necs_app/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"tte_app": {
"PROJECT_NAME": "tte_app",
"PROJECT_NAME_ZH": "图文制作",
"BASE_URL": "/tte_app/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"aqes_app": {
"PROJECT_NAME": "aqes_app",
"PROJECT_NAME_ZH": "云精剪",
"BASE_URL": "/aqes_app/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"mqes_app": {
"PROJECT_NAME": "mqes_app",
"PROJECT_NAME_ZH": "媒资快剪",
"BASE_URL": "/mqes_app/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"lcps": {
"PROJECT_NAME": "lcps",
"PROJECT_NAME_ZH": "导播中心",
"BASE_URL": "/lcps/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"lcpchart": {
"PROJECT_NAME": "lcpchart",
"PROJECT_NAME_ZH": "信源监看",
"BASE_URL": "/lcpchart/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"make": {
"PROJECT_NAME": "make",
"PROJECT_NAME_ZH": "制作导播台",
"BASE_URL": "/make/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"scene": {
"PROJECT_NAME": "scene",
"PROJECT_NAME_ZH": "导播台场景页",
"BASE_URL": "/scene/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"schedule": {
"PROJECT_NAME": "schedule",
"PROJECT_NAME_ZH": "智能编播",
"BASE_URL": "/schedule/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"contLcps": {
"PROJECT_NAME": "cont-lcps",
"PROJECT_NAME_ZH": "导播连麦",
"BASE_URL": "/cont-lcps/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"contClient": {
"PROJECT_NAME": "cont-client",
"PROJECT_NAME_ZH": "导播连麦客户端",
"BASE_URL": "/cont-client/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"consoleFrame": {
"PROJECT_NAME": "console",
"PROJECT_NAME_ZH": "父框架",
"BASE_URL": "/console/",
"SENTRY_DSN": "https://88b3f0691a59431384432ea50840bdbc@sentry.guangdianyun.tv/13",
"GTAG_ID": ""
},
"consoleGather": {
"PROJECT_NAME": "gather",
"PROJECT_NAME_ZH": "聚合管理",
"BASE_URL": "/gather/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"active": {
"PROJECT_NAME": "active",
"PROJECT_NAME_ZH": "活动管理",
"BASE_URL": "/active/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"program": {
"PROJECT_NAME": "program",
"PROJECT_NAME_ZH": "直播服务",
"BASE_URL": "/program/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"control_live": {
"PROJECT_NAME": "control_live",
"PROJECT_NAME_ZH": "现场直播总控面板",
"BASE_URL": "/control_live/",
"SENTRY_DSN": "https://2cd60dbfe72d45ac9e0f0f0b988160c1@sentry.guangdianyun.tv/12",
"GTAG_ID": ""
},
"control_tv": {
"PROJECT_NAME": "control_tv",
"PROJECT_NAME_ZH": "电视直播总控面板",
"BASE_URL": "/control_tv/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"control_radio": {
"PROJECT_NAME": "control_radio",
"PROJECT_NAME_ZH": "电台直播总控面板",
"BASE_URL": "/control_radio/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"control_piclive": {
"PROJECT_NAME": "control_piclive",
"PROJECT_NAME_ZH": "图文直播总控面板",
"BASE_URL": "/control_piclive/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"user": {
"PROJECT_NAME": "user",
"PROJECT_NAME_ZH": "用户管理",
"BASE_URL": "/user/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"fuse": {
"PROJECT_NAME": "fuse",
"PROJECT_NAME_ZH": "融合频道",
"BASE_URL": "/fuse/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"money": {
"PROJECT_NAME": "money",
"PROJECT_NAME_ZH": "资金管理",
"BASE_URL": "/money/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"data": {
"PROJECT_NAME": "data",
"PROJECT_NAME_ZH": "数据中心",
"BASE_URL": "/data/",
"SENTRY_DSN": "https://074a66d8f173438bb60de7b43b7ebf3a@sentry.guangdianyun.tv/29",
"GTAG_ID": ""
},
"account": {
"PROJECT_NAME": "account",
"PROJECT_NAME_ZH": "账户中心",
"BASE_URL": "/account/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"system": {
"PROJECT_NAME": "system",
"PROJECT_NAME_ZH": "系统管理",
"BASE_URL": "/system/",
"SENTRY_DSN": "https://15fae9bdc7854f128ad01c43bbceb752@sentry.guangdianyun.tv/6",
"GTAG_ID": ""
},
"monitor": {
"PROJECT_NAME": "monitor",
"PROJECT_NAME_ZH": "导播监看",
"BASE_URL": "/monitor/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"media": {
"PROJECT_NAME": "media",
"PROJECT_NAME_ZH": "素材库",
"BASE_URL": "/media/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"thirdparty": {
"PROJECT_NAME": "thirdparty",
"PROJECT_NAME_ZH": "第三方发布",
"BASE_URL": "/thirdparty/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"task": {
"PROJECT_NAME": "task",
"PROJECT_NAME_ZH": "任务系统",
"BASE_URL": "/task/",
"SENTRY_DSN": "",
"GTAG_ID": ""
},
"task_panel": {
"PROJECT_NAME": "task_panel",
"PROJECT_NAME_ZH": "任务系统管理面板",
"BASE_URL": "/task_panel/",
"SENTRY_DSN": "",
"GTAG_ID": ""
}
}),
writable: false
});
})();
<template>
<div id="app">
<router-view />
</div>
</template>
<script>
export default {
name: 'App'
}
</script>
<style lang="less">
// html {
// // width: 100%;
// // height: 100%;
// // margin: 0;
// // padding: 0;
// // font-family: 'Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, 微软雅黑, Arial, sans-serif';
// body {
// width: 100%;
// height: 100%;
// margin: 0;
// padding: 0;
// #app {
// width: 100%;
// height: 100%;
// // background: #f7f7f7;
// }
// }
// }
</style>
/* eslint-disable no-confusing-arrow */ /* eslint-disable no-confusing-arrow */
import { get, post } from '@/api/request' import { get, post } from '@/api/request'
import CONFIG from '@/config' import CONFIG,{ ENV_CONFIG } from '@/config'
const { privateDomain } = CONFIG const { privateDomain } = CONFIG
const flag = process.env.X_CA_STAGE const flag = ENV_CONFIG.X_CA_STAGE
// 获取地址列表 // 获取地址列表
export const getAddressList = data => export const getAddressList = data =>
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
4# 业务模块需要哪个接口则引入哪个 4# 业务模块需要哪个接口则引入哪个
*/ */
import { get, post } from '@/api/request' import { get, post } from '@/api/request'
import CONFIG from '@/config' import CONFIG, { ENV_CONFIG } from '@/config'
const { privateDomain, goDomain } = CONFIG const { privateDomain, goDomain } = CONFIG
const flag = process.env.X_CA_STAGE const flag = ENV_CONFIG.X_CA_STAGE
// 获取dms sub_key // 获取dms sub_key
export const getDmsInfo = data => export const getDmsInfo = data =>
......
/* eslint-disable no-confusing-arrow */ /* eslint-disable no-confusing-arrow */
import { post, get } from '@/api/request' import { post, get } from '@/api/request'
import CONFIG from '@/config' import CONFIG, { ENV_CONFIG } from '@/config'
const { activityDomain, privateDomain } = CONFIG const { activityDomain, privateDomain } = CONFIG
const flag = process.env.X_CA_STAGE const flag = ENV_CONFIG.X_CA_STAGE
// 获取抽奖(场次)列表 // 获取抽奖(场次)列表
export const getLotterySessionList = data => export const getLotterySessionList = data =>
......
/* eslint-disable no-confusing-arrow */ /* eslint-disable no-confusing-arrow */
import { post, get } from '@/api/request' import { post, get } from '@/api/request'
import CONFIG from '@/config' import CONFIG, { ENV_CONFIG } from '@/config'
const { activityDomain } = CONFIG const { activityDomain } = CONFIG
const flag = process.env.X_CA_STAGE const flag = ENV_CONFIG.X_CA_STAGE
// 获取个人抽奖记录 // 获取个人抽奖记录
export const getRecordList = data => export const getRecordList = data =>
......
/* eslint-disable no-confusing-arrow */ /* eslint-disable no-confusing-arrow */
import { get } from '@/api/request' import { get } from '@/api/request'
import CONFIG from '@/config' import CONFIG, { ENV_CONFIG } from '@/config'
const { activityDomain } = CONFIG const { activityDomain } = CONFIG
const flag = process.env.X_CA_STAGE const flag = ENV_CONFIG.X_CA_STAGE
// 获取留言抽奖中奖名单 // 获取留言抽奖中奖名单
export const getWinnersList = data => export const getWinnersList = data =>
......
...@@ -4,6 +4,7 @@ import qs from "qs"; ...@@ -4,6 +4,7 @@ import qs from "qs";
import VueCookie from "vue-cookie"; import VueCookie from "vue-cookie";
// message消息弹窗,可自行引入其他插件 // message消息弹窗,可自行引入其他插件
import { Toast } from "vant"; import { Toast } from "vant";
import { ENV_CONFIG } from "@/config";
// 创建axios实例,不污染axios全局 // 创建axios实例,不污染axios全局
const axiosService = axios.create(); const axiosService = axios.create();
...@@ -11,14 +12,15 @@ const axiosService = axios.create(); ...@@ -11,14 +12,15 @@ const axiosService = axios.create();
// 默认content-type // 默认content-type
axiosService.defaults.headers["Content-Type"] = "application/x-www-form-urlencoded"; axiosService.defaults.headers["Content-Type"] = "application/x-www-form-urlencoded";
// 默认baseURL // 默认baseURL
axiosService.defaults.baseURL = `//${process.env.CUSTOMER_API_DOMAIN}/v1`; axiosService.defaults.baseURL = `https://${ENV_CONFIG.CUSTOMER_API_DOMAIN}/v1`;
// 默认请求超时时间 // 默认请求超时时间
axiosService.defaults.timeout = 3 * 1000; axiosService.defaults.timeout = 3 * 1000;
// 请求拦截器 // 请求拦截器
/* eslint-disable no-param-reassign */
axiosService.interceptors.request.use( axiosService.interceptors.request.use(
config => { config => {
const token = VueCookie.get(process.env.CUSTOMER_TOKEN_KEY); const token = VueCookie.get(ENV_CONFIG.CUSTOMER_TOKEN_KEY);
const { method, headers } = config; const { method, headers } = config;
const data = filterNull(config.data); const data = filterNull(config.data);
// 格式化序列,目前只对post进行处理,可新增其他请求逻辑 // 格式化序列,目前只对post进行处理,可新增其他请求逻辑
...@@ -34,11 +36,11 @@ axiosService.interceptors.request.use( ...@@ -34,11 +36,11 @@ axiosService.interceptors.request.use(
// config.data = { unused: 0 } // axios内部处理了get方法,使data无效 // config.data = { unused: 0 } // axios内部处理了get方法,使data无效
} }
// 自定义header键:token // 自定义header键:token
if (token && process.client) { if (token) {
config.headers.token = token; config.headers.token = token;
} }
// 自定义header键:X-Ca-Stage(环境变量) // 自定义header键:X-Ca-Stage(环境变量)
config.headers["X-Ca-Stage"] = process.env.X_CA_STAGE; config.headers["X-Ca-Stage"] = ENV_CONFIG.X_CA_STAGE;
config.metadata = { startTime: new Date() }; config.metadata = { startTime: new Date() };
return config; return config;
......
...@@ -4,7 +4,12 @@ ...@@ -4,7 +4,12 @@
// @function rem($px) { // @function rem($px) {
// @return ($px / $vw_fontsize) * 1rem; // @return ($px / $vw_fontsize) * 1rem;
// } // }
// 页面最大宽度限制
@--body-max-width: 540PX;
// 页面最小宽度限制
@--body-min-width: 320PX;
// 主题色
@--main-color: #3F7DF7;
// 根元素大小使用 vw 单位 // 根元素大小使用 vw 单位
@vw_design: 750; @vw_design: 750;
......
@import './reset.less'; // 去除默认样式 @import './reset.less'; // 去除默认样式
@import 'normalize.css/normalize.css'; // 统一各个浏览器样式的插件 @import '~normalize.css/normalize.css'; // 统一各个浏览器样式的插件
@import './adapt.less'; // 适配 @import './adapt.less'; // 适配
@import '~vant/lib/index.less';
html, html,
body { body {
...@@ -23,4 +24,4 @@ body { ...@@ -23,4 +24,4 @@ body {
.sidebar-hidden-scroll { .sidebar-hidden-scroll {
right: -0.2rem !important; right: -0.2rem !important;
opacity: 0.7; opacity: 0.7;
} }
\ No newline at end of file
...@@ -166,3 +166,7 @@ body { ...@@ -166,3 +166,7 @@ body {
-webkit-text-size-adjust: none; -webkit-text-size-adjust: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
} }
.van-dialog__message {
font-size: 16px !important;
}
...@@ -8,37 +8,26 @@ ...@@ -8,37 +8,26 @@
<div class="main"> <div class="main">
<div class="top"> <div class="top">
<div style="width: 28px;height: 14px;"></div> <div style="width: 28px;height: 14px;"></div>
<div class="top-title">请先填写信息</div> <div class="top-title">{{ editItem.id ? '编辑地址' : '新增地址' }}</div>
<div class="top-btn" @click="submit">提交</div> <div class="top-btn" @click="confirm">确定</div>
</div> </div>
<div class="form" :class="{error: isError}"> <div class="form" :class="{error: isError}">
<van-field v-if="lotteryInfo.premise && lotteryInfo.premise.includes('name')" v-model="form.name" label-width="60" label="联系人" placeholder="请输入联系人" @focus="isError = false"/> <van-field v-model="form.name" label-width="60" label="姓名" placeholder="请输入姓名" @focus="isError = false"/>
<template v-if="lotteryInfo.premise && lotteryInfo.premise.includes('phone')"> <van-field v-model="form.mobile" label-width="60" label="手机号" placeholder="请输入联系电话" @focus="isError = false"/>
<van-field v-model="form.phone" label-width="60" label="手机号" placeholder="请输入联系电话" @focus="isError = false"/> <van-field :value="address" label-width="60" label="收货地址" readonly placeholder="请选择省市区" @focus="isError = false" @click="select" >
<van-field v-model="form.code" label-width="60" label="验证码" placeholder="请输入验证码" @focus="isError = false"> <template #button>
<span slot="button" class="code" @click="sendCode"> <van-icon name="location" />
<span v-if="!isSend">获取验证码</span> </template>
<span v-else>{{ time }}s后重发</span> </van-field>
</span> <van-field
</van-field> v-model="form.detail"
</template> label="门牌号"
<template v-if="lotteryInfo.premise && lotteryInfo.premise.includes('address')"> label-width="60"
<van-field v-model="form.address" label-width="60" label="收货地址" readonly placeholder="请选择省市区" @focus="isError = false" @click="select" > placeholder="详细地址(精确到门牌号)"
<van-icon slot="button" name="location" /> maxlength="50"
</van-field> show-word-limit
<van-field @focus="isError = false"
v-model="form.detail" />
type="textarea"
label="门牌号"
label-width="60"
placeholder="详细地址(精确到门牌号)"
rows="2"
autosize
maxlength="50"
show-word-limit
@focus="isError = false"
/>
</template>
</div> </div>
<van-popup <van-popup
v-model="isShowAdd" v-model="isShowAdd"
...@@ -52,36 +41,48 @@ ...@@ -52,36 +41,48 @@
</template> </template>
<script> <script>
import {
savePremise,
setSendSmsCode,
setValidSmsCode
} from '@/api/modules/lottery'
import { areaList } from '@vant/area-data'; import { areaList } from '@vant/area-data';
import { mapGetters, mapActions } from 'vuex' import { mapGetters, mapActions } from 'vuex'
export default { export default {
name: 'ConfigPopup', name: 'AddAddressPopup',
props: { props: {
value: { value: {
type: Boolean, type: Boolean,
default: true, default: true,
}, },
editItem: {
type: Object,
default: () => {
return { id: '' }
},
},
createApi: {
type: Function,
default: null
},
updateApi: {
type: Function,
default: null
},
}, },
data() { data() {
return { return {
form: { form: {
id: '',
name: '', name: '',
phone: '', mobile: '',
code: '', detail: '',
address: '', province: '',
detail: '' city: '',
area: '',
isDefault: 0,
provinceCode: 0,
cityCode: 0,
}, },
areaList, areaList,
isShowAdd: false, isShowAdd: false,
isError: false, isError: false,
isSend: false,
time: 60,
} }
}, },
computed: { computed: {
...@@ -97,6 +98,20 @@ export default { ...@@ -97,6 +98,20 @@ export default {
this.$emit('input', val) this.$emit('input', val)
}, },
}, },
address() {
if (this.form.province && this.form.city && this.form.area) {
return `${this.form.province} ${this.form.city} ${this.form.area}`
} else {
return ''
}
},
},
watch: {
visible(val) {
if (val) {
this.resetForm()
}
}
}, },
methods: { methods: {
...mapActions({ ...mapActions({
...@@ -105,121 +120,46 @@ export default { ...@@ -105,121 +120,46 @@ export default {
postInfo: 'users/postInfo', postInfo: 'users/postInfo',
checkPremise: 'lottery/check_premise' checkPremise: 'lottery/check_premise'
}), }),
resetForm() {
this.form = {...this.form, ...this.editItem}
},
select() { select() {
this.isShowAdd = true this.isShowAdd = true
}, },
chooseAdd(val) { chooseAdd(val) {
const str = val[0].name + '-' + val[1].name + '-' + val[2].name this.form.province = val[0].name
this.form.address = str this.form.city = val[1].name
this.form.area = val[2].name
this.form.provinceCode = val[0].code
this.form.cityCode = val[1].code
this.isShowAdd = false this.isShowAdd = false
}, },
sendCode() { confirm() {
if (this.isSent) return const { name, mobile, province, detail } = this.form
if (!this.form.phone) { if (!name || !mobile || !province || !detail) {
this.$toast('请先填写手机号') this.isError = true
return return 0
} }
if (!this.form.phone.match(/^s*$|(?:(?:\+|00)86)?1\d{10}$/)) { if (!this.form.mobile.match(/^s*$|(?:(?:\+|00)86)?1\d{10}$/)) {
this.$toast('手机号格式不正确') this.$toast('手机号格式不正确')
return return 0
}
const { uin } = this.$route.query
const phone = this.form.phone
setSendSmsCode({ uin, phone, module: 'draw' }).then((res) => {
const { code, errorCode, errorMessage, data } = res
if (code === 200 && errorCode === 0) {
if (data) {
this.$toast(data)
}
let time = 60
this.isSend = true
const timer = setInterval(() => {
time--
this.time = time
if (time <= 0) {
clearInterval(timer)
this.isSent = false
}
}, 1000)
} else {
this.$toast(errorMessage)
}
})
},
submit() {
const { uin } = this.$route.query
const { name, phone, code, address, detail } = this.form
if (this.lotteryInfo.premise.includes('name')) {
if (!name) {
this.isError = true
return 0
}
}
if (this.lotteryInfo.premise.includes('address')) {
if (!address || !detail) {
this.isError = true
return 0
}
}
if (this.lotteryInfo.premise.includes('phone')) {
if (!phone || !code) {
this.isError = true
return 0
}
setValidSmsCode({ uin, phone, code }).then((res) => {
const { code, errorCode, errorMessage } = res
if (code === 200 && errorCode === 0) {
this.$toast('验证成功')
this.save()
} else {
this.$toast(errorMessage)
}
})
}else {
this.save()
}
},
save() {
const { id, uin } = this.$route.query
const params = {
id,
uin,
} }
if (this.lotteryInfo.premise.includes('name')) { this.$emit('onConfirm', this.form)
params.name = this.form.name this.visible = false
} }
if (this.lotteryInfo.premise.includes('phone')) {
params.phone = this.form.phone
}
if (this.lotteryInfo.premise.includes('address')) {
params.address = this.form.address + this.form.detail
}
savePremise(params).then(res => {
const { code, errorCode, errorMessage } = res
if (code === 200 && errorCode === 0) {
this.$toast('信息保存成功')
this.visible = false
this.checkPremise({ id, uin })
} else {
this.$toast(errorMessage)
}
})
},
} }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.main { .main {
// height: 52vh; min-height: 42vh;
padding-bottom: 30px;
} }
.top { .top {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 12px; padding: 16px 12px 12px;
font-size: 14px; font-size: 14px;
&-title { &-title {
font-size: 16px; font-size: 16px;
...@@ -228,25 +168,63 @@ export default { ...@@ -228,25 +168,63 @@ export default {
color: #333333; color: #333333;
} }
&-btn { &-btn {
font-size: 14px; font-size: 15px;
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;
color: #357BF0; color: #357BF0;
} }
} }
.form { .form {
.address {
display: flex;
align-items: center;
// justify-content: space-between;
padding: 9.5px 13px;
&-icon {
width: 24px;
height: 24px;
margin-right: 48px;
}
&-text {
flex: 1;
// width: 225px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 14px;
color: #333333;
line-height: 24px;
text-align: left;
padding-right: 35px;
}
&-right {
width: 5px;
height: 9px;
}
}
.code { .code {
font-size: 13px; font-size: 13px;
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;
color: #357BF0; color: #357BF0;
} }
/deep/ .van-field__control {
padding-right: 40px;
}
/deep/ .van-field__word-limit {
position: absolute;
top: 0;
right: 0;
}
/deep/ .van-cell { /deep/ .van-cell {
padding: 9.5px 13px; padding: 18px 13px;
font-size: 15px;
}
/deep/ .van-icon:before {
font-size: 16px;
} }
/deep/ .van-field__label{ /deep/ .van-field__label{
height: 20px; height: 20px;
font-size: 14px; font-size: 15px;
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
...@@ -266,4 +244,11 @@ export default { ...@@ -266,4 +244,11 @@ export default {
color: red; color: red;
} }
} }
/deep/ .van-picker__cancel {
font-size: 15px;
}
/deep/ .van-picker__confirm {
font-size: 15px;
color: #357BF0;
}
</style> </style>
<template>
<van-popup
v-model="visible"
position="bottom"
round
transfer
>
<div class="main">
<div class="top">
<div class="top-title">地址选择</div>
</div>
<div class="operate">
<div class="operate-left">常用地址</div>
<div class="operate-right">
<div v-if="mode === 'normal'" class="item" @click.stop="mode = 'edit'">
<img src="./img/edit.png" alt="">
<div class="name">管理</div>
</div>
<div v-if="mode === 'edit'" class="item" @click.stop="mode = 'normal'">
<img src="./img/edit.png" alt="">
<div class="name">完成</div>
</div>
<div class="item">
<img src="./img/add.png" alt="" @click.stop="editItem = {id: ''}; isShowAddPopup = true">
<div class="name">新增</div>
</div>
</div>
</div>
<div class="content">
<div class="list">
<div v-for="item in addressList" :key="item.id" class="item" @click="chooseItem = item">
<div class="item-status">
<img v-if="item.id !== chooseItem.id" src="./img/unchoose.png" alt="">
<img v-else src="./img/choosed.png" alt="">
</div>
<div class="item-content">
<div class="item-content__info">
<span class="item-content__info-name">{{ item.name }}</span>
<span class="item-content__info-mobile">{{ item.mobile }}</span>
</div>
<div class="item-content__address">
{{ item.province }} {{ item.city }} {{ item.area }} {{ item.detail }}
</div>
</div>
<div v-if="mode === 'edit'" class="item-operate">
<img src="./img/edit-gray.png" alt="" @click.stop="editItem = item; isShowAddPopup = true">
<img src="./img/delete.png" alt="" @click.stop="delAddress(item)">
</div>
</div>
</div>
</div>
<div class="btn" @click="confirmAddress">
确认地址
</div>
</div>
<AddAddressPopup
v-model="isShowAddPopup"
:edit-item="editItem"
:create-api="createApi"
:update-api="updateApi"
@onConfirm="updtaAddress"
></AddAddressPopup>
</van-popup>
</template>
<script>
import { mapGetters, mapActions } from 'vuex'
import AddAddressPopup from './AddAddressPopup.vue'
export default {
name: 'AddressPopup',
components: {
AddAddressPopup
},
props: {
value: {
type: Boolean,
default: true,
},
addressList: {
type: Array,
default: () => []
},
addressItem: {
type: Object,
default: () => {}
},
createApi: {
type: Function,
default: null
},
updateApi: {
type: Function,
default: null
},
deleteApi: {
type: Function,
default: null
}
},
data() {
return {
chooseItem: {id: ''},
mode: 'normal',
isShowAddPopup: false,
editItem: {id: ''}
}
},
computed: {
...mapGetters({
uin: 'users/uin',
lotteryInfo: 'lottery/lotteryInfo'
}),
visible: {
get() {
return this.value
},
set(val) {
this.$emit('input', val)
},
},
},
watch: {
visible(val) {
if (val) {
this.chooseItem = this.addressItem
}
}
},
methods: {
...mapActions({
getLotteryDetail: 'lottery/getLotteryDetail',
updateInfo: 'lottery/updateInfo',
postInfo: 'users/postInfo',
checkPremise: 'lottery/check_premise'
}),
confirmAddress() {
this.$emit('confirm', this.addressList.find(item => item.id === this.chooseItem.id))
this.visible = false
},
delAddress(item) {
const { uin, deleteApi } = this
this.$dialog.confirm({
message: '确定删除吗?'
}).then(() => {
deleteApi({ uin, id: item.id }).then(res => {
const { code, errorCode, errorMessage } = res
if (code === 200 && errorCode === 0) {
this.$toast('地址删除成功!')
this.$emit('reload')
} else {
this.$toast(errorMessage)
}
})
})
},
updtaAddress(value) {
const { uin, createApi, updateApi } = this
if (value?.id) {
updateApi({ uin, ...value }).then(res => {
const { code, errorCode, errorMessage } = res
if (code === 200 && errorCode === 0) {
this.$toast('修改成功')
this.$emit('reload')
this.isShowAddressEdit = false
} else {
this.$toast(errorMessage)
}
})
return
}
createApi({ uin, ...value }).then(res => {
const { code, errorCode, errorMessage } = res
if (code === 200 && errorCode === 0) {
this.$toast('添加成功')
this.$emit('reload')
this.isShowAddressEdit = false
} else {
this.$toast(errorMessage)
}
})
}
}
}
</script>
<style lang="less" scoped>
.main {
min-height: 42vh;
max-height: 60vh;
padding-left: 12px;
display: flex;
flex-direction: column;
}
.top {
display: flex;
align-items: center;
justify-content: center;
padding: 16px 12px 12px;
font-size: 14px;
&-title {
font-size: 16px;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
color: #333333;
}
&-btn {
font-size: 15px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
color: #357BF0;
}
}
.operate {
display: flex;
align-items: center;
justify-content: space-between;
padding-right: 12px;
&-left {
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 14px;
color: #333333;
line-height: 18.5px;
}
&-right {
display: flex;
align-items: center;
justify-content: center;
.item {
display: flex;
align-items: center;
margin-left: 15px;
img {
width: 20px;
height: 20px;
margin-right: 4px;
}
.name {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 14px;
color: #FF5000;
line-height: 18px;
text-align: left;
}
}
}
}
.content {
flex: 1;
overflow-y: auto;
padding-right: 12px;
.list {
height: 100%;
.item {
display: flex;
align-items: center;
justify-content: space-between;
margin: 16px 0;
&-status {
display: flex;
align-items: center;
img {
width: 16px;
height: 16px;
}
}
&-content {
flex: 1;
display: flex;
// align-items: center;
flex-direction: column;
padding: 0 6px 0 12px;
text-align: left;
.item-content__info {
display: flex;
align-items: center;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 15px;
color: #333333;
line-height: 24px;
text-align: justify;
&-name {
color: #333333;
font-weight: 600;
font-size: 15px;
}
&-mobile {
color: #666666;
margin-left: 5px;
font-size: 14px;
}
}
.item-content__address {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 15px;
color: #333333;
line-height: 24px;
text-align: justify;
}
}
&-operate {
display: flex;
align-items: center;
img {
width: 20px;
height: 20px;
margin-left: 10px;
}
}
}
}
}
.btn {
width: 330px;
height: 36px;
background: linear-gradient( 270deg, #FF5000 0%, #FF9000 100%);
border-radius: 22px;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 14px;
color: #FFFFFF;
line-height: 36px;
cursor: pointer;
text-align: center;
margin: 15px auto 28px;
padding-right: 12px;
}
</style>
<template> <template>
<van-dialog v-model="visible" class="bind-phone-dialog" confirm-button-text="前往绑定" @confirm="bindMobile"> <van-dialog v-model="visible" class="bind-phone-dialog" confirm-button-text="前往绑定" @confirm="bindMobile">
<div slot="title" class="bind-phone-dialog__title"> <template slot:title>
<span>提示</span> <div class="bind-phone-dialog__title">
<i class="bind-phone-dialog__close van-icon van-icon-cross" @click="onClose"></i> <span>提示</span>
</div> <i class="bind-phone-dialog__close van-icon van-icon-cross" @click="onClose"></i>
</div>
</template>
<div class="bind-phone-dialog__content">您当前未绑定手机号,为确保联系到您,请绑定手机号</div> <div class="bind-phone-dialog__content">您当前未绑定手机号,为确保联系到您,请绑定手机号</div>
</van-dialog> </van-dialog>
</template> </template>
...@@ -55,14 +57,15 @@ export default { ...@@ -55,14 +57,15 @@ export default {
.bind-phone-dialog { .bind-phone-dialog {
&__title { &__title {
position: relative; position: relative;
padding: 10px;
} }
&__close { &__close {
position: absolute; position: absolute;
right: 14px; right: 14px;
top: -12px; top: 10px;
color: #646566; color: #646566;
cursor: pointer; cursor: pointer;
font-size: 12px; font-size: 16px;
} }
&__content { &__content {
padding: 24px; padding: 24px;
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { CUSTOM_SOURCE_TYPE } from '@/utils/constant' import { CUSTOM_SOURCE_TYPE } from '@/utils/constant'
import { ENV_CONFIG } from "@/config";
import Bus from '@/utils/Bus' import Bus from '@/utils/Bus'
...@@ -69,7 +70,7 @@ export default { ...@@ -69,7 +70,7 @@ export default {
company: '管理员', company: '管理员',
pageId: id, pageId: id,
pageType: CUSTOM_SOURCE_TYPE.vote, pageType: CUSTOM_SOURCE_TYPE.vote,
env: process.env.X_CA_STAGE, env: ENV_CONFIG.X_CA_STAGE,
beforeShow: next => { beforeShow: next => {
if (this.isLogin) { if (this.isLogin) {
next() next()
...@@ -79,7 +80,7 @@ export default { ...@@ -79,7 +80,7 @@ export default {
message: '请先登录', message: '请先登录',
duration: 1500, duration: 1500,
onClose() { onClose() {
if (process.client && window.self !== window.top) return if (window.self !== window.top) return
self.showLogin() self.showLogin()
} }
}) })
......
<template>
<van-popup
v-model="visible"
position="bottom"
round
transfer
>
<div class="main" :style="{height: lotteryInfo.type === 3 ? '100vh' : ''}">
<div class="top">
<div style="width: 28px;height: 14px;"></div>
<div class="top-title">请先填写信息</div>
<div class="top-btn" @click="submit">提交</div>
</div>
<div v-if="lotteryInfo.newPremise.length" class="form" :class="{error: isError}">
<div v-for="item in lotteryInfo.newPremise" :key="item.type">
<template v-if="item.type === 'name' && item.isChecked">
<van-field v-model="form.name" label-width="60" label="姓名" placeholder="请输入姓名" @focus="isError = false"/>
</template>
<template v-if="item.type === 'phone' && item.isChecked">
<van-field v-model="form.phone" label-width="60" label="手机号" placeholder="请输入联系电话" @focus="isError = false"/>
<van-field v-model="form.code" label-width="60" label="验证码" placeholder="请输入验证码" @focus="isError = false">
<template #button>
<span class="code" @click="sendCode">
<span v-if="!isSend">获取验证码</span>
<span v-else>{{ time }}s后重发</span>
</span>
</template>
</van-field>
</template>
<template v-if="item.type === 'address' && item.isChecked">
<template v-if="!addressList.length">
<van-field v-model="form.address" label-width="60" label="收件地址" readonly placeholder="请选择省市区" @focus="isError = false" @click="select" >
<template #button>
<van-icon name="location" />
</template>
</van-field>
<van-field
v-model="form.detail"
label="门牌号"
label-width="60"
placeholder="详细地址(精确到门牌号)"
maxlength="50"
show-word-limit
@focus="isError = false"
/>
</template>
<template v-else>
<div v-if="lotteryInfo.newPremise[0].isChecked + lotteryInfo.newPremise[1].isChecked === 0" class="address" @click="isShowAddressPopup = true">
<img class="address-icon" src="@/assets/images/lottery/address.png" alt="">
<div class="address-text">{{ form.address + form.detail }}</div>
<img class="address-right" src="@/assets/images/lottery/address-right.png" alt="">
</div>
<div v-else class="address" @click="isShowAddressPopup = true">
<div class="address-title">收件地址</div>
<img class="address-icon__alter" src="@/assets/images/lottery/address.png" alt="">
<div class="address-text">{{ form.address + form.detail }}</div>
<img class="address-right" src="@/assets/images/lottery/address-right.png" alt="">
</div>
</template>
</template>
<template v-if="item.type.includes('custom') && item.isChecked">
<van-field v-model="form[item.type]" :class="item.title.length > 4 ? 'long-title' : ''" label-width="60" :label="item.title" maxlength="50" show-word-limit :placeholder="`请输入${item.title}`" @focus="isError = false"/>
</template>
</div>
</div>
<div v-else class="form" :class="{error: isError}">
<van-field v-if="lotteryInfo.premise && lotteryInfo.premise.includes('name')" v-model="form.name" label-width="60" label="联系人" placeholder="请输入联系人" @focus="isError = false"/>
<template v-if="lotteryInfo.premise && lotteryInfo.premise.includes('phone')">
<van-field v-model="form.phone" label-width="60" label="手机号" placeholder="请输入联系电话" @focus="isError = false"/>
<van-field v-model="form.code" label-width="60" label="验证码" placeholder="请输入验证码" @focus="isError = false">
<template #button>
<span class="code" @click="sendCode">
<span v-if="!isSend">获取验证码</span>
<span v-else>{{ time }}s后重发</span>
</span>
</template>
</van-field>
</template>
<template v-if="lotteryInfo.premise && lotteryInfo.premise.includes('address')">
<van-field v-model="form.address" label-width="60" label="收货地址" readonly placeholder="请选择省市区" @focus="isError = false" @click="select" >
<template #button>
<van-icon name="location" />
</template>
</van-field>
<van-field
v-model="form.detail"
type="textarea"
label="门牌号"
label-width="60"
placeholder="详细地址(精确到门牌号)"
rows="2"
autosize
maxlength="50"
show-word-limit
@focus="isError = false"
/>
</template>
</div>
<van-popup
v-model="isShowAdd"
position="bottom"
round
>
<van-area title="区域选择" :area-list="areaList" @confirm="chooseAdd" @cancel="isShowAdd = false"/>
</van-popup>
<address-popup
v-model="isShowAddressPopup"
:addressList="addressList"
:addressItem="addressItem"
:create-api="addAddress"
:update-api="setAddress"
:delete-api="removeAddress"
@confirm="resetAddress"
@reload="_getAddressList"
></address-popup>
</div>
</van-popup>
</template>
<script>
import {
savePremise,
setSendSmsCode,
setValidSmsCode
} from '@/api/modules/lottery'
import { areaList } from '@vant/area-data';
import { mapGetters, mapActions } from 'vuex'
import postMessage from '@/utils/postMessage'
import { getAddressList, removeAddress, setAddress, addAddress } from '@/api/modules/address'
import AddressPopup from '@/components/Common/AddressPopup/AddressPopup.vue'
import Bus from '@/utils/Bus'
export default {
name: 'ConfigPopup',
components: {
AddressPopup,
},
props: {
value: {
type: Boolean,
default: true,
},
},
data() {
return {
form: {
name: '',
phone: '',
code: '',
address: '',
detail: '',
custom1: '',
custom2: '',
custom3: '',
},
removeAddress,
setAddress,
addAddress,
areaList,
isShowAdd: false,
isError: false,
isSend: false,
addressList: [],
time: 60,
isShowAddressPopup: false,
addressItem: null,
}
},
computed: {
...mapGetters({
uin: 'users/uin',
lotteryInfo: 'lottery/lotteryInfo',
isLogin: 'users/isLogin',
}),
visible: {
get() {
return this.value
},
set(val) {
this.$emit('input', val)
},
},
},
watch: {
'lotteryInfo.newPremise': {
handler(val) {
const isOpen = val && val.some(item => item.isChecked && item.type === 'address')
if (isOpen && this.isLogin) {
this._getAddressList(this.resetAddress)
}
}
},
isLogin(val) {
const premise = this.lotteryInfo.newPremise || []
const isOpen = premise && premise.some(item => item.isChecked && item.type === 'address')
if (isOpen && val) {
this._getAddressList(this.resetAddress)
}
}
},
methods: {
...mapActions({
getLotteryDetail: 'lottery/getLotteryDetail',
updateInfo: 'lottery/updateInfo',
postInfo: 'users/postInfo',
checkPremise: 'lottery/check_premise'
}),
_getAddressList(cb) {
getAddressList({ uin: this.uin }).then(res => {
const { code, data, errorMessage, errorCode } = res
if (code === 200 && errorCode === 0) {
this.addressList = data
Bus.$emit('addressList', data)
if (cb) {
cb()
}
}else {
this.$toast(errorMessage)
}
})
},
resetAddress(item) {
this.addressItem = item || this.addressList.find(item => item.isDefault === 1) || this.addressList[0]
if (this.addressItem?.province) {
this.form.address = `${this.addressItem.province} ${this.addressItem.city} ${this.addressItem.area} `
this.form.detail = this.addressItem.detail
} else {
this.form.address = ''
this.form.detail = ''
}
},
select() {
this.isShowAdd = true
},
chooseAdd(val) {
const str = val[0].name + ' ' + val[1].name + ' ' + val[2].name
this.form.address = str
this.isShowAdd = false
},
sendCode() {
if (this.isSend) return
if (!this.form.phone) {
this.$toast('请先填写手机号')
return
}
if (!this.form.phone.match(/^s*$|(?:(?:\+|00)86)?1\d{10}$/)) {
this.$toast('手机号格式不正确')
return
}
const { uin } = this.$route.query
const phone = this.form.phone
setSendSmsCode({ uin, phone, module: 'draw' }).then((res) => {
const { code, errorCode, errorMessage } = res
if (code === 200 && errorCode === 0) {
// if (data) {
// this.$toast(data)
// }
this.$toast('成功')
let time = 60
this.isSend = true
const timer = setInterval(() => {
time--
this.time = time
if (time <= 0) {
clearInterval(timer)
this.isSend = false
}
}, 1000)
} else {
this.$toast(errorMessage)
}
})
},
submit() {
if (this.lotteryInfo.newPremise.length) {
this.submitNewPremise()
} else {
this.submitOldPremise()
}
},
submitOldPremise() {
const { uin } = this.$route.query
const { name, phone, code, address, detail } = this.form
if (this.lotteryInfo.premise.includes('name')) {
if (!name) {
this.isError = true
return 0
}
}
if (this.lotteryInfo.premise.includes('address')) {
if (!address || !detail) {
this.isError = true
return 0
}
}
if (this.lotteryInfo.premise.includes('phone')) {
if (!phone || !code) {
this.isError = true
return 0
}
setValidSmsCode({ uin, phone, code }).then((res) => {
const { code, errorCode, errorMessage } = res
if (code === 200 && errorCode === 0) {
this.$toast('验证成功')
this.saveOldPremise()
} else {
this.$toast(errorMessage)
}
})
}else {
this.saveOldPremise()
}
},
saveOldPremise() {
const { id, uin } = this.$route.query
const params = {
id,
uin,
}
if (this.lotteryInfo.premise.includes('name')) {
params.name = this.form.name
}
if (this.lotteryInfo.premise.includes('phone')) {
params.phone = this.form.phone
}
if (this.lotteryInfo.premise.includes('address')) {
params.address = this.form.address + this.form.detail
}
savePremise(params).then(res => {
const { code, errorCode, errorMessage } = res
if (code === 200 && errorCode === 0) {
this.$toast('信息保存成功')
postMessage.premiseFilled()
this.visible = false
this.checkPremise({ id, uin })
} else {
this.$toast(errorMessage)
}
})
},
submitNewPremise() {
const { uin } = this.$route.query
const { phone, code, address, detail } = this.form
// 校验表单
for (let i = 0; i < this.lotteryInfo.newPremise.length; i++) {
const item = this.lotteryInfo.newPremise[i]
if (item.isChecked) {
if (!this.form[item.type]) {
this.isError = true
return 0
}
if (item.type === 'address') {
if (!address || !detail) {
this.isError = true
return 0
}
}
if (item.type === 'phone') {
if (!phone || !code) {
this.isError = true
return 0
}
}
}
}
// 有手机跟验证码数据时,验证手机验证码
if (phone && code) {
setValidSmsCode({ uin, phone, code }).then((res) => {
const { code, errorCode, errorMessage } = res
if (code === 200 && errorCode === 0) {
this.$toast('验证成功')
this.saveNewPremise()
} else {
this.$toast(errorMessage)
}
})
} else {
this.saveNewPremise()
}
},
saveNewPremise() {
const { id, uin } = this.$route.query
const params = {
id,
uin,
}
this.lotteryInfo.newPremise.forEach(item => {
params[item.type] = this.form[item.type]
if (item.type === 'address') {
params.address = this.form.address + this.form.detail
}
})
savePremise(params).then(res => {
const { code, errorCode, errorMessage } = res
if (code === 200 && errorCode === 0) {
this.$toast('信息保存成功')
postMessage.premiseFilled()
this.visible = false
this.checkPremise({ id, uin })
} else {
this.$toast(errorMessage)
}
})
}
}
}
</script>
<style lang="less" scoped>
.main {
min-height: 42vh;
padding-bottom: 30px;
}
.top {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 12px 12px;
font-size: 14px;
&-title {
font-size: 16px;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
color: #333333;
}
&-btn {
font-size: 15px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
color: #357BF0;
}
}
.form {
/deep/ .van-icon {
font-size: 20px;
}
.long-title {
// width: 100px;
/deep/ .van-field__label{
height: 24px;
font-size: 15px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
color: #666666;
width: auto !important;
}
}
.address {
display: flex;
align-items: center;
// justify-content: space-between;
padding: 9.5px 13px;
&-icon {
width: 24px;
height: 24px;
margin-right: 12px;
&__alter {
width: 20px;
height: 20px;
margin-right: 5px;
}
}
&-text {
flex: 1;
// width: 225px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 15px;
color: #333333;
line-height: 24px;
text-align: justify;
padding-right: 20px;
}
&-right {
width: 5px;
height: 9px;
}
&-title {
height: 24px;
line-height: 24px;
font-size: 15px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
color: #666666;
margin-right: 8px;
}
}
.code {
font-size: 15px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
color: #357BF0;
}
/deep/ .van-field__control {
padding-right: 40px;
}
/deep/ .van-field__word-limit {
position: absolute;
top: 0;
right: 0;
}
/deep/ .van-cell {
padding: 9.5px 13px;
font-size: 15px;
}
/deep/ .van-field__label{
height: 24px;
line-height: 24px;
font-size: 15px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
color: #666666;
margin-right: 8px;
span {
white-space: nowrap;
}
}
/deep/ .van-field__word-limit{
color: #999;
}
/deep/ .van-cell::after {
border-bottom: none;
}
}
.error {
/deep/ .van-field__control::placeholder {
color: red;
}
}
/deep/ .van-picker__cancel {
font-size: 15px;
}
/deep/ .van-picker__confirm {
font-size: 15px;
color: #357BF0;
}
</style>
<template>
<van-popup
v-model="visible"
position="bottom"
round
transfer
class="force-popup"
>
<div class="main">
<div class="box">
<img class="box-img" src="~@/assets/images/lottery/force.png" alt="">
<img class="box-close" src="~@/assets/images/lottery/force-close.png" alt="" @click="visible = false">
<div class="box-warp">
<div class="box-warp__title">抽奖信息填写,快人一步!</div>
<div class="box-warp__content">该直播间有抽奖活动现在填写信息,参与抽奖更快哦!</div>
<div class="box-warp__btn" @click="goConfig">立即填写</div>
</div>
</div>
</div>
</van-popup>
</template>
<script>
import Bus from '@/utils/Bus'
import { mapGetters, mapActions } from 'vuex'
export default {
name: 'ForcePopup',
props: {
value: {
type: Boolean,
default: true,
},
},
data() {
return {
}
},
computed: {
...mapGetters({
uin: 'users/uin',
lotteryInfo: 'lottery/lotteryInfo'
}),
visible: {
get() {
return this.value
},
set(val) {
this.$emit('input', val)
},
},
},
methods: {
...mapActions({
getLotteryDetail: 'lottery/getLotteryDetail',
updateInfo: 'lottery/updateInfo',
postInfo: 'users/postInfo',
checkPremise: 'lottery/check_premise'
}),
goConfig() {
Bus.$emit('showConfig')
this.visible = false
}
}
}
</script>
<style lang="less" scoped>
.force-popup {
background-color: transparent;
.main {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
.box {
width: 70%;
position: relative;
margin-bottom: 10%;
&-img {
width: 100%;
position: relative;
}
&-close {
width: 20px;
height: 20px;
position: absolute;
top: 10%;
right: -20px;
}
&-warp {
position: absolute;
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: center;
padding-bottom: 13%;
top: 0;
left: 0;
right: 0;
bottom: 0;
&__title {
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 18px;
color: #333333;
text-align: center;
}
&__content {
max-width: 80%;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 14px;
color: #666666;
text-align: center;
line-height: 19px;
margin: 14px 0 37px;
}
&__btn {
width: 120px;
height: 36px;
background: linear-gradient( 201deg, #FD8192 0%, #FF4F31 100%);
border-radius: 37px;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 14px;
color: #FFFFFF;
line-height: 36px;
text-align: center;
}
}
}
}
}
</style>
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
} }
}, },
mounted() { mounted() {
console.log(this.lotteryInfo, this.lotteryInfo.startModel) // console.log(this.lotteryInfo, this.lotteryInfo.startModel)
} }
} }
</script> </script>
......
<template> <template>
<div class="lottery-type"> <div class="lottery-type">
<div v-if="+lotteryInfo.showType === LOTTERY_STYLE.scratch" class="lottery-type-scratch"> <div v-if="Number(lotteryInfo.showType) === LOTTERY_STYLE.scratch" class="lottery-type-scratch">
<TypeScratch <TypeScratch
ref="typeScratchRef" ref="typeScratchRef"
:win-info="winInfo" :win-info="winInfo"
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
:is-lottering="isLottering" :is-lottering="isLottering"
/> />
</div> </div>
<div v-if="+lotteryInfo.showType === LOTTERY_STYLE.gashapon" class="lottery-type-gashapon"> <div v-if="Number(lotteryInfo.showType) === LOTTERY_STYLE.gashapon" class="lottery-type-gashapon">
<TypeGashapon <TypeGashapon
v-if="randomType === 1" v-if="randomType === 1"
ref="typeGashaponRef" ref="typeGashaponRef"
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
:is-lottering="isLottering" :is-lottering="isLottering"
/> />
</div> </div>
<div v-if="+lotteryInfo.showType === LOTTERY_STYLE.guess" class="lottery-type-gashapon"> <div v-if="Number(lotteryInfo.showType) === LOTTERY_STYLE.guess" class="lottery-type-gashapon">
<TypeGuess <TypeGuess
v-if="randomType === 1" v-if="randomType === 1"
ref="typeGuessRef" ref="typeGuessRef"
...@@ -51,11 +51,11 @@ ...@@ -51,11 +51,11 @@
/> />
</div> </div>
<section <section
v-if="+lotteryInfo.showType === LOTTERY_STYLE.grid || +lotteryInfo.showType === LOTTERY_STYLE.wheel" v-if="Number(lotteryInfo.showType) === LOTTERY_STYLE.grid || Number(lotteryInfo.showType) === LOTTERY_STYLE.wheel"
class="lottery-instant" class="lottery-instant"
> >
<Banner class="lottery-instant__banner"></Banner> <Banner class="lottery-instant__banner"></Banner>
<div v-if="+lotteryInfo.showType === LOTTERY_STYLE.grid" class="lottery-instant__layout-grid"> <div v-if="Number(lotteryInfo.showType) === LOTTERY_STYLE.grid" class="lottery-instant__layout-grid">
<div class="lottery-instant__content-grid"> <div class="lottery-instant__content-grid">
<CountdownBar class="lottery-instant__countdown"></CountdownBar> <CountdownBar class="lottery-instant__countdown"></CountdownBar>
<div class="lottery-instant__times"> <div class="lottery-instant__times">
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="+lotteryInfo.showType === LOTTERY_STYLE.wheel" class="lottery-instant__layout-wheel"> <div v-if="Number(lotteryInfo.showType) === LOTTERY_STYLE.wheel" class="lottery-instant__layout-wheel">
<div class="lottery-instant__content-wheel"> <div class="lottery-instant__content-wheel">
<CountdownBar class="lottery-instant__countdown"></CountdownBar> <CountdownBar class="lottery-instant__countdown"></CountdownBar>
<div class="lottery-instant__wheel" :class="{ 'lottery-instant__wheel--no-lightning': !isLottering }"> <div class="lottery-instant__wheel" :class="{ 'lottery-instant__wheel--no-lightning': !isLottering }">
...@@ -163,6 +163,8 @@ import { LOTTERY_STATUS, LOTTERY_STATUS_TXT, LOTTERY_STYLE } from '@/utils/const ...@@ -163,6 +163,8 @@ import { LOTTERY_STATUS, LOTTERY_STATUS_TXT, LOTTERY_STYLE } from '@/utils/const
import { PrizeGrid, PrizeWheel } from 'lotteries' import { PrizeGrid, PrizeWheel } from 'lotteries'
import 'lotteries/lib/index.css' import 'lotteries/lib/index.css'
import Bus from '@/utils/Bus' import Bus from '@/utils/Bus'
// import VueCookie from "vue-cookie";
// import { ENV_CONFIG } from "@/config";
export default { export default {
name: 'Main', name: 'Main',
...@@ -236,7 +238,7 @@ export default { ...@@ -236,7 +238,7 @@ export default {
isNotStart() { isNotStart() {
// 抽奖不在活动日期内 // 抽奖不在活动日期内
const { status } = this.lotteryInfo const { status } = this.lotteryInfo
return +status !== LOTTERY_STATUS.start return Number(status) !== LOTTERY_STATUS.start
}, },
buttonClass() { buttonClass() {
if (!this.lotteryInfo.userTimes || this.isNotStart) { if (!this.lotteryInfo.userTimes || this.isNotStart) {
...@@ -307,7 +309,7 @@ export default { ...@@ -307,7 +309,7 @@ export default {
startLottery() { startLottery() {
// 抽奖不在活动日期内 // 抽奖不在活动日期内
if (this.isNotStart) { if (this.isNotStart) {
this.$toast(`抽奖活动${LOTTERY_STATUS_TXT[+this.lotteryInfo.status].label}`) this.$toast(`抽奖活动${LOTTERY_STATUS_TXT[Number(this.lotteryInfo.status)].label}`)
return return
} }
// 正在抽奖动画过程中或正在加载数据 // 正在抽奖动画过程中或正在加载数据
...@@ -364,19 +366,19 @@ export default { ...@@ -364,19 +366,19 @@ export default {
times-- times--
this.updateInfo({ userTimes: times }) this.updateInfo({ userTimes: times })
/* 执行动画 */ /* 执行动画 */
if (+this.lotteryInfo.showType === LOTTERY_STYLE.grid) { if (Number(this.lotteryInfo.showType) === LOTTERY_STYLE.grid) {
this.$refs.prizeGrid.start(+data?.id || 0) this.$refs.prizeGrid.start(Number(data?.id) || 0)
} }
if (+this.lotteryInfo.showType === LOTTERY_STYLE.wheel) { if (Number(this.lotteryInfo.showType) === LOTTERY_STYLE.wheel) {
this.$refs.prizeWheel.start(+data?.id || 0) this.$refs.prizeWheel.start(Number(data?.id) || 0)
} }
if (+this.lotteryInfo.showType === LOTTERY_STYLE.scratch) { if (Number(this.lotteryInfo.showType) === LOTTERY_STYLE.scratch) {
this.$refs.typeScratchRef.drawAnimation() this.$refs.typeScratchRef.drawAnimation()
} }
if (+this.lotteryInfo.showType === LOTTERY_STYLE.gashapon) { if (Number(this.lotteryInfo.showType) === LOTTERY_STYLE.gashapon) {
this.$refs.typeGashaponRef.drawAnimation() this.$refs.typeGashaponRef.drawAnimation()
} }
if (+this.lotteryInfo.showType === LOTTERY_STYLE.guess) { if (Number(this.lotteryInfo.showType) === LOTTERY_STYLE.guess) {
this.$refs.typeGuessRef.drawAnimation() this.$refs.typeGuessRef.drawAnimation()
} }
this.isLottering = true this.isLottering = true
......
<template> <template>
<div class="lottery-type"> <div class="lottery-type">
<div v-if="+lotteryInfo.showType === LOTTERY_STYLE.scratch" class="lottery-type-scratch"> <div v-if="Number(lotteryInfo.showType) === LOTTERY_STYLE.scratch" class="lottery-type-scratch">
<TypeScratch <TypeScratch
ref="typeScratchRef" ref="typeScratchRef"
:win-info="winInfo" :win-info="winInfo"
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
:is-show-intro="isShowIntro" :is-show-intro="isShowIntro"
/> />
</div> </div>
<div v-if="+lotteryInfo.showType === LOTTERY_STYLE.gashapon" class="lottery-type-gashapon"> <div v-if="Number(lotteryInfo.showType) === LOTTERY_STYLE.gashapon" class="lottery-type-gashapon">
<TypeGashapon <TypeGashapon
v-if="randomType === 1" v-if="randomType === 1"
ref="typeGashaponRef" ref="typeGashaponRef"
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
:is-show-intro="isShowIntro" :is-show-intro="isShowIntro"
/> />
</div> </div>
<div v-if="+lotteryInfo.showType === LOTTERY_STYLE.guess" class="lottery-type-guess"> <div v-if="Number(lotteryInfo.showType) === LOTTERY_STYLE.guess" class="lottery-type-guess">
<TypeGuess <TypeGuess
v-if="randomType === 1" v-if="randomType === 1"
ref="typeGuessRef" ref="typeGuessRef"
...@@ -56,11 +56,11 @@ ...@@ -56,11 +56,11 @@
/> />
</div> </div>
<section <section
v-if="+lotteryInfo.showType === LOTTERY_STYLE.grid || +lotteryInfo.showType === LOTTERY_STYLE.wheel" v-if="Number(lotteryInfo.showType) === LOTTERY_STYLE.grid || Number(lotteryInfo.showType) === LOTTERY_STYLE.wheel"
class="lottery-instant" class="lottery-instant"
> >
<Banner v-if="isShowBanner" class="lottery-instant__banner"></Banner> <Banner v-if="isShowBanner" class="lottery-instant__banner"></Banner>
<div v-if="+lotteryInfo.showType === LOTTERY_STYLE.grid" class="lottery-instant__layout-grid"> <div v-if="Number(lotteryInfo.showType) === LOTTERY_STYLE.grid" class="lottery-instant__layout-grid">
<div class="lottery-instant__content-grid"> <div class="lottery-instant__content-grid">
<CountdownBar class="lottery-instant__countdown"></CountdownBar> <CountdownBar class="lottery-instant__countdown"></CountdownBar>
<div class="lottery-instant__times"> <div class="lottery-instant__times">
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="+lotteryInfo.showType === LOTTERY_STYLE.wheel" class="lottery-instant__layout-wheel"> <div v-if="Number(lotteryInfo.showType) === LOTTERY_STYLE.wheel" class="lottery-instant__layout-wheel">
<div class="lottery-instant__content-wheel"> <div class="lottery-instant__content-wheel">
<CountdownBar class="lottery-instant__countdown"></CountdownBar> <CountdownBar class="lottery-instant__countdown"></CountdownBar>
<div class="lottery-instant__wheel" :class="{ 'lottery-instant__wheel--no-lightning': !isLottering }"> <div class="lottery-instant__wheel" :class="{ 'lottery-instant__wheel--no-lightning': !isLottering }">
...@@ -243,7 +243,7 @@ export default { ...@@ -243,7 +243,7 @@ export default {
isNotStart() { isNotStart() {
// 抽奖不在活动日期内 // 抽奖不在活动日期内
const { status } = this.lotteryInfo const { status } = this.lotteryInfo
return +status !== LOTTERY_STATUS.start return Number(status) !== LOTTERY_STATUS.start
}, },
buttonClass() { buttonClass() {
if (!this.lotteryInfo.userTimes || this.isNotStart) { if (!this.lotteryInfo.userTimes || this.isNotStart) {
...@@ -313,7 +313,7 @@ export default { ...@@ -313,7 +313,7 @@ export default {
startLottery() { startLottery() {
// 抽奖不在活动日期内 // 抽奖不在活动日期内
if (this.isNotStart) { if (this.isNotStart) {
this.$toast(`抽奖活动${LOTTERY_STATUS_TXT[+this.lotteryInfo.status].label}`) this.$toast(`抽奖活动${LOTTERY_STATUS_TXT[Number(this.lotteryInfo.status)].label}`)
return return
} }
// 正在抽奖动画过程中或正在加载数据 // 正在抽奖动画过程中或正在加载数据
...@@ -370,19 +370,19 @@ export default { ...@@ -370,19 +370,19 @@ export default {
times-- times--
this.updateInfo({ userTimes: times }) this.updateInfo({ userTimes: times })
/* 执行动画 */ /* 执行动画 */
if (+this.lotteryInfo.showType === LOTTERY_STYLE.grid) { if (Number(this.lotteryInfo.showType) === LOTTERY_STYLE.grid) {
this.$refs.prizeGrid.start(+data?.id || 0) this.$refs.prizeGrid.start(Number(data?.id) || 0)
} }
if (+this.lotteryInfo.showType === LOTTERY_STYLE.wheel) { if (Number(this.lotteryInfo.showType) === LOTTERY_STYLE.wheel) {
this.$refs.prizeWheel.start(+data?.id || 0) this.$refs.prizeWheel.start(Number(data?.id) || 0)
} }
if (+this.lotteryInfo.showType === LOTTERY_STYLE.scratch) { if (Number(this.lotteryInfo.showType) === LOTTERY_STYLE.scratch) {
this.$refs.typeScratchRef.drawAnimation() this.$refs.typeScratchRef.drawAnimation()
} }
if (+this.lotteryInfo.showType === LOTTERY_STYLE.gashapon) { if (Number(this.lotteryInfo.showType) === LOTTERY_STYLE.gashapon) {
this.$refs.typeGashaponRef.drawAnimation() this.$refs.typeGashaponRef.drawAnimation()
} }
if (+this.lotteryInfo.showType === LOTTERY_STYLE.guess) { if (Number(this.lotteryInfo.showType) === LOTTERY_STYLE.guess) {
this.$refs.typeGuessRef.drawAnimation() this.$refs.typeGuessRef.drawAnimation()
} }
this.isLottering = true this.isLottering = true
...@@ -466,7 +466,7 @@ export default { ...@@ -466,7 +466,7 @@ export default {
padding-top: 8px; padding-top: 8px;
} }
&__times { &__times {
margin: 65px 0 5px; margin: 22% 0 5px;
height: 18px; height: 18px;
line-height: 18px; line-height: 18px;
font-size: 14px; font-size: 14px;
......
...@@ -320,7 +320,7 @@ export default { ...@@ -320,7 +320,7 @@ export default {
} }
&__info-wrap { &__info-wrap {
display: flex; display: flex;
align-items: center; align-items: flex-start;
font-size: 13px; font-size: 13px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
...@@ -329,17 +329,21 @@ export default { ...@@ -329,17 +329,21 @@ export default {
justify-content: space-between; justify-content: space-between;
} }
&__session { &__session {
margin-left: 20px; margin-left: 10px;
font-size: 13px; font-size: 13px;
color: #333; color: #333;
margin-right: 10px;
white-space: nowrap;
} }
&__time { &__time {
// min-width: 38px;
font-size: 13px; font-size: 13px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
line-height: 18.5px; line-height: 18.5px;
margin-bottom: 13px; margin-bottom: 13px;
white-space: nowrap;
} }
&__prize-name { &__prize-name {
margin: 0 0 15px; margin: 0 0 15px;
...@@ -348,6 +352,7 @@ export default { ...@@ -348,6 +352,7 @@ export default {
font-weight: 500; font-weight: 500;
color: #fe3924; color: #fe3924;
line-height: 18.5px; line-height: 18.5px;
flex: 1;
} }
&__item { &__item {
margin-bottom: 8px; margin-bottom: 8px;
......
...@@ -71,7 +71,7 @@ export default { ...@@ -71,7 +71,7 @@ export default {
} }
}, },
isWin() { isWin() {
return !!+this.info.id return !!Number(this.info.id)
} }
}, },
methods: { methods: {
......
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
isNotStart() { isNotStart() {
// 抽奖不在活动日期内 // 抽奖不在活动日期内
const { status } = this.lotteryInfo const { status } = this.lotteryInfo
return +status !== LOTTERY_STATUS.start return Number(status) !== LOTTERY_STATUS.start
}, },
// 按钮图片样式 // 按钮图片样式
btnImg() { btnImg() {
...@@ -132,7 +132,7 @@ export default { ...@@ -132,7 +132,7 @@ export default {
Bus.$emit('updateMain', { func: 'runEnd' }) Bus.$emit('updateMain', { func: 'runEnd' })
} }
}, },
} }
</script> </script>
...@@ -141,7 +141,7 @@ export default { ...@@ -141,7 +141,7 @@ export default {
position: relative; position: relative;
height: 100%; height: 100%;
background-color: #631e88 !important; background-color: #631e88 !important;
background-image: url('@/assets/images/lottery/gashapon/page-bg.png') !important; background-image: url('~@/assets/images/lottery/gashapon/page-bg.png') !important;
background-size: cover; background-size: cover;
background-position: top center; background-position: top center;
background-repeat: no-repeat; background-repeat: no-repeat;
...@@ -153,7 +153,7 @@ export default { ...@@ -153,7 +153,7 @@ export default {
} }
&__layout-gashapon { &__layout-gashapon {
position: relative; position: relative;
// background-image: url('@/assets/images/lottery/gashapon/game-bg.png'); // background-image: url('~@/assets/images/lottery/gashapon/game-bg.png');
background-size: cover; background-size: cover;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
...@@ -257,7 +257,7 @@ export default { ...@@ -257,7 +257,7 @@ export default {
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-image: url('@/assets/images/lottery/records-new/bg-purple.png'); background-image: url('~@/assets/images/lottery/records-new/bg-purple.png');
} }
&__sure { &__sure {
width: 157px; width: 157px;
...@@ -290,7 +290,7 @@ export default { ...@@ -290,7 +290,7 @@ export default {
&__prize-img { &__prize-img {
width: 65px; width: 65px;
height: 65px; height: 65px;
background-image: url('@/assets/images/lottery/win-new/prize-bg-purple.png'); background-image: url('~@/assets/images/lottery/win-new/prize-bg-purple.png');
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
...@@ -325,7 +325,7 @@ export default { ...@@ -325,7 +325,7 @@ export default {
width: 25px; width: 25px;
height: 25px; height: 25px;
font-size: 0; font-size: 0;
background-image: url('@/assets/images/lottery/win-new/close-purple.png'); background-image: url('~@/assets/images/lottery/win-new/close-purple.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
...@@ -375,7 +375,7 @@ export default { ...@@ -375,7 +375,7 @@ export default {
padding-bottom: 0; padding-bottom: 0;
} }
&__content { &__content {
background-image: url('@/assets/images/lottery/records-new/bg-purple.png'); background-image: url('~@/assets/images/lottery/records-new/bg-purple.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
......
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
isNotStart() { isNotStart() {
// 抽奖不在活动日期内 // 抽奖不在活动日期内
const { status } = this.lotteryInfo const { status } = this.lotteryInfo
return +status !== LOTTERY_STATUS.start return Number(status) !== LOTTERY_STATUS.start
}, },
// 按钮图片样式 // 按钮图片样式
buttonImg() { buttonImg() {
...@@ -132,7 +132,7 @@ export default { ...@@ -132,7 +132,7 @@ export default {
position: relative; position: relative;
height: 100%; height: 100%;
background-color: #631e88 !important; background-color: #631e88 !important;
background-image: url('@/assets/images/lottery/gashapon2/page-bg.png') !important; background-image: url('~@/assets/images/lottery/gashapon2/page-bg.png') !important;
background-size: cover; background-size: cover;
background-position: top center; background-position: top center;
background-repeat: no-repeat; background-repeat: no-repeat;
...@@ -156,7 +156,7 @@ export default { ...@@ -156,7 +156,7 @@ export default {
} }
&__layout-gashapon { &__layout-gashapon {
position: relative; position: relative;
background-image: url('@/assets/images/lottery/gashapon2/game-bg.png'); background-image: url('~@/assets/images/lottery/gashapon2/game-bg.png');
background-size: cover; background-size: cover;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
...@@ -220,7 +220,7 @@ export default { ...@@ -220,7 +220,7 @@ export default {
padding: 75px 11px 8px 11px; padding: 75px 11px 8px 11px;
border-radius: 0; border-radius: 0;
&__sec-title { &__sec-title {
background-image: url('@/assets/images/lottery/gashapon2/intro-wrap-title.png'); background-image: url('~@/assets/images/lottery/gashapon2/intro-wrap-title.png');
width: 95%; width: 95%;
padding: 4px 0; padding: 4px 0;
color: #fff; color: #fff;
...@@ -232,7 +232,7 @@ export default { ...@@ -232,7 +232,7 @@ export default {
transform: translate(-50%, 50%); transform: translate(-50%, 50%);
} }
&__wrap { &__wrap {
background-image: url('@/assets/images/lottery/gashapon2/intro-wrap-bg.png'); background-image: url('~@/assets/images/lottery/gashapon2/intro-wrap-bg.png');
background-size: 100% 100%; background-size: 100% 100%;
padding: 15px 18px 25px 18px; padding: 15px 18px 25px 18px;
background-color: transparent; background-color: transparent;
...@@ -255,7 +255,7 @@ export default { ...@@ -255,7 +255,7 @@ export default {
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-image: url('@/assets/images/lottery/records-new/bg-blue.png'); background-image: url('~@/assets/images/lottery/records-new/bg-blue.png');
} }
&__sure { &__sure {
width: 157px; width: 157px;
...@@ -288,7 +288,7 @@ export default { ...@@ -288,7 +288,7 @@ export default {
&__prize-img { &__prize-img {
width: 65px; width: 65px;
height: 65px; height: 65px;
background-image: url('@/assets/images/lottery/win-new/prize-bg-blue.png'); background-image: url('~@/assets/images/lottery/win-new/prize-bg-blue.png');
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
...@@ -323,7 +323,7 @@ export default { ...@@ -323,7 +323,7 @@ export default {
width: 25px; width: 25px;
height: 25px; height: 25px;
font-size: 0; font-size: 0;
background-image: url('@/assets/images/lottery/win-new/close-blue.png'); background-image: url('~@/assets/images/lottery/win-new/close-blue.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
...@@ -369,7 +369,7 @@ export default { ...@@ -369,7 +369,7 @@ export default {
padding-bottom: 0; padding-bottom: 0;
} }
&__content { &__content {
background-image: url('@/assets/images/lottery/records-new/bg-blue.png'); background-image: url('~@/assets/images/lottery/records-new/bg-blue.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
......
...@@ -105,7 +105,7 @@ export default { ...@@ -105,7 +105,7 @@ export default {
isNotStart() { isNotStart() {
// 抽奖不在活动日期内 // 抽奖不在活动日期内
const { status } = this.lotteryInfo const { status } = this.lotteryInfo
return +status !== LOTTERY_STATUS.start return Number(status) !== LOTTERY_STATUS.start
}, },
// 按钮图片样式 // 按钮图片样式
btnImg() { btnImg() {
...@@ -150,7 +150,7 @@ export default { ...@@ -150,7 +150,7 @@ export default {
position: relative; position: relative;
height: 100%; height: 100%;
background-color: #631e88 !important; background-color: #631e88 !important;
background-image: url('@/assets/images/lottery/gashapon/page-bg.png') !important; background-image: url('~@/assets/images/lottery/gashapon/page-bg.png') !important;
background-size: cover; background-size: cover;
background-position: top center; background-position: top center;
background-repeat: no-repeat; background-repeat: no-repeat;
...@@ -166,7 +166,7 @@ export default { ...@@ -166,7 +166,7 @@ export default {
} }
&__layout-gashapon { &__layout-gashapon {
position: relative; position: relative;
// background-image: url('@/assets/images/lottery/gashapon/game-bg.png'); // background-image: url('~@/assets/images/lottery/gashapon/game-bg.png');
background-size: cover; background-size: cover;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
...@@ -243,7 +243,7 @@ export default { ...@@ -243,7 +243,7 @@ export default {
.lottery-instant { .lottery-instant {
// 介绍 // 介绍
/deep/ .introduction-popup { /deep/ .introduction-popup {
background: url('@/assets/images/lottery/guess/intro-bg-mini.png'); background: url('~@/assets/images/lottery/guess/intro-bg-mini.png');
&__wrap { &__wrap {
background-color: transparent; background-color: transparent;
padding: 2px; padding: 2px;
...@@ -283,7 +283,7 @@ export default { ...@@ -283,7 +283,7 @@ export default {
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-image: url('@/assets/images/lottery/records-new/bg-purple.png'); background-image: url('~@/assets/images/lottery/records-new/bg-purple.png');
} }
&__sure { &__sure {
width: 157px; width: 157px;
...@@ -316,7 +316,7 @@ export default { ...@@ -316,7 +316,7 @@ export default {
&__prize-img { &__prize-img {
width: 65px; width: 65px;
height: 65px; height: 65px;
background-image: url('@/assets/images/lottery/win-new/prize-bg-purple.png'); background-image: url('~@/assets/images/lottery/win-new/prize-bg-purple.png');
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
...@@ -351,7 +351,7 @@ export default { ...@@ -351,7 +351,7 @@ export default {
width: 25px; width: 25px;
height: 25px; height: 25px;
font-size: 0; font-size: 0;
background-image: url('@/assets/images/lottery/win-new/close-purple.png'); background-image: url('~@/assets/images/lottery/win-new/close-purple.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
...@@ -401,7 +401,7 @@ export default { ...@@ -401,7 +401,7 @@ export default {
padding-bottom: 0; padding-bottom: 0;
} }
&__content { &__content {
background-image: url('@/assets/images/lottery/records-new/bg-purple.png'); background-image: url('~@/assets/images/lottery/records-new/bg-purple.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
......
...@@ -102,7 +102,7 @@ export default { ...@@ -102,7 +102,7 @@ export default {
isNotStart() { isNotStart() {
// 抽奖不在活动日期内 // 抽奖不在活动日期内
const { status } = this.lotteryInfo const { status } = this.lotteryInfo
return +status !== LOTTERY_STATUS.start return Number(status) !== LOTTERY_STATUS.start
}, },
// 按钮图片样式 // 按钮图片样式
buttonImg() { buttonImg() {
...@@ -137,7 +137,7 @@ export default { ...@@ -137,7 +137,7 @@ export default {
position: relative; position: relative;
height: 100%; height: 100%;
background-color: #631e88 !important; background-color: #631e88 !important;
background-image: url('@/assets/images/lottery/gashapon2/page-bg.png') !important; background-image: url('~@/assets/images/lottery/gashapon2/page-bg.png') !important;
background-size: cover; background-size: cover;
background-position: top center; background-position: top center;
background-repeat: no-repeat; background-repeat: no-repeat;
...@@ -157,7 +157,7 @@ export default { ...@@ -157,7 +157,7 @@ export default {
} }
&__layout-gashapon { &__layout-gashapon {
position: relative; position: relative;
background-image: url('@/assets/images/lottery/gashapon2/game-bg.png'); background-image: url('~@/assets/images/lottery/gashapon2/game-bg.png');
background-size: cover; background-size: cover;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
...@@ -219,7 +219,7 @@ export default { ...@@ -219,7 +219,7 @@ export default {
.lottery-instant { .lottery-instant {
// 介绍 // 介绍
/deep/ .introduction-popup { /deep/ .introduction-popup {
background: url('@/assets/images/lottery/gashapon2/intro-bg-mini.png'); background: url('~@/assets/images/lottery/gashapon2/intro-bg-mini.png');
&__wrap { &__wrap {
background-color: transparent; background-color: transparent;
padding: 2px; padding: 2px;
...@@ -259,7 +259,7 @@ export default { ...@@ -259,7 +259,7 @@ export default {
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-image: url('@/assets/images/lottery/records-new/bg-blue.png'); background-image: url('~@/assets/images/lottery/records-new/bg-blue.png');
} }
&__sure { &__sure {
width: 157px; width: 157px;
...@@ -292,7 +292,7 @@ export default { ...@@ -292,7 +292,7 @@ export default {
&__prize-img { &__prize-img {
width: 65px; width: 65px;
height: 65px; height: 65px;
background-image: url('@/assets/images/lottery/win-new/prize-bg-blue.png'); background-image: url('~@/assets/images/lottery/win-new/prize-bg-blue.png');
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
...@@ -327,7 +327,7 @@ export default { ...@@ -327,7 +327,7 @@ export default {
width: 25px; width: 25px;
height: 25px; height: 25px;
font-size: 0; font-size: 0;
background-image: url('@/assets/images/lottery/win-new/close-blue.png'); background-image: url('~@/assets/images/lottery/win-new/close-blue.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
...@@ -378,7 +378,7 @@ export default { ...@@ -378,7 +378,7 @@ export default {
padding-bottom: 0; padding-bottom: 0;
} }
&__content { &__content {
background-image: url('@/assets/images/lottery/records-new/bg-blue.png'); background-image: url('~@/assets/images/lottery/records-new/bg-blue.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
......
...@@ -144,7 +144,7 @@ export default { ...@@ -144,7 +144,7 @@ export default {
position: relative; position: relative;
height: 100%; height: 100%;
background-color: #631e88 !important; background-color: #631e88 !important;
background-image: url('@/assets/images/lottery/guess/page-bg.png') !important; background-image: url('~@/assets/images/lottery/guess/page-bg.png') !important;
background-size: cover; background-size: cover;
background-position: top center; background-position: top center;
background-repeat: no-repeat; background-repeat: no-repeat;
...@@ -178,7 +178,7 @@ export default { ...@@ -178,7 +178,7 @@ export default {
} }
.content-main { .content-main {
position: relative; position: relative;
background-image: url('@/assets/images/lottery/guess/game-bg.png'); background-image: url('~@/assets/images/lottery/guess/game-bg.png');
background-size: 100% 100%; background-size: 100% 100%;
background-position: center; background-position: center;
width: 100%; width: 100%;
...@@ -280,7 +280,7 @@ export default { ...@@ -280,7 +280,7 @@ export default {
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-image: url('@/assets/images/lottery/records-new/bg-purple.png'); background-image: url('~@/assets/images/lottery/records-new/bg-purple.png');
} }
&__sure { &__sure {
width: 157px; width: 157px;
...@@ -313,7 +313,7 @@ export default { ...@@ -313,7 +313,7 @@ export default {
&__prize-img { &__prize-img {
width: 65px; width: 65px;
height: 65px; height: 65px;
background-image: url('@/assets/images/lottery/win-new/prize-bg-purple.png'); background-image: url('~@/assets/images/lottery/win-new/prize-bg-purple.png');
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
...@@ -348,7 +348,7 @@ export default { ...@@ -348,7 +348,7 @@ export default {
width: 25px; width: 25px;
height: 25px; height: 25px;
font-size: 0; font-size: 0;
background-image: url('@/assets/images/lottery/win-new/close-purple.png'); background-image: url('~@/assets/images/lottery/win-new/close-purple.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
...@@ -398,7 +398,7 @@ export default { ...@@ -398,7 +398,7 @@ export default {
padding-bottom: 0; padding-bottom: 0;
} }
&__content { &__content {
background-image: url('@/assets/images/lottery/records-new/bg-purple.png'); background-image: url('~@/assets/images/lottery/records-new/bg-purple.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
......
...@@ -146,7 +146,7 @@ export default { ...@@ -146,7 +146,7 @@ export default {
position: relative; position: relative;
height: 100%; height: 100%;
background-color: #631e88 !important; background-color: #631e88 !important;
background-image: url('@/assets/images/lottery/guess/page-bg.png') !important; background-image: url('~@/assets/images/lottery/guess/page-bg.png') !important;
background-size: cover; background-size: cover;
background-position: top center; background-position: top center;
background-repeat: no-repeat; background-repeat: no-repeat;
...@@ -180,7 +180,7 @@ export default { ...@@ -180,7 +180,7 @@ export default {
} }
.content-main { .content-main {
position: relative; position: relative;
background-image: url('@/assets/images/lottery/guess/game-bg.png'); background-image: url('~@/assets/images/lottery/guess/game-bg.png');
background-size: 100% 100%; background-size: 100% 100%;
background-position: center; background-position: center;
width: 100%; width: 100%;
...@@ -260,7 +260,7 @@ export default { ...@@ -260,7 +260,7 @@ export default {
font-weight: 700; font-weight: 700;
text-align: center; text-align: center;
color: #fff; color: #fff;
background-image: url('@/assets/images/lottery/guess2/intro-title.png'); background-image: url('~@/assets/images/lottery/guess2/intro-title.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
&__wrap { &__wrap {
...@@ -282,7 +282,7 @@ export default { ...@@ -282,7 +282,7 @@ export default {
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-image: url('@/assets/images/lottery/records-new/bg-purple.png'); background-image: url('~@/assets/images/lottery/records-new/bg-purple.png');
} }
&__sure { &__sure {
width: 157px; width: 157px;
...@@ -315,7 +315,7 @@ export default { ...@@ -315,7 +315,7 @@ export default {
&__prize-img { &__prize-img {
width: 65px; width: 65px;
height: 65px; height: 65px;
background-image: url('@/assets/images/lottery/win-new/prize-bg-purple.png'); background-image: url('~@/assets/images/lottery/win-new/prize-bg-purple.png');
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
...@@ -350,7 +350,7 @@ export default { ...@@ -350,7 +350,7 @@ export default {
width: 25px; width: 25px;
height: 25px; height: 25px;
font-size: 0; font-size: 0;
background-image: url('@/assets/images/lottery/win-new/close-purple.png'); background-image: url('~@/assets/images/lottery/win-new/close-purple.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
...@@ -400,7 +400,7 @@ export default { ...@@ -400,7 +400,7 @@ export default {
padding-bottom: 0; padding-bottom: 0;
} }
&__content { &__content {
background-image: url('@/assets/images/lottery/records-new/bg-purple.png'); background-image: url('~@/assets/images/lottery/records-new/bg-purple.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
......
...@@ -154,7 +154,7 @@ export default { ...@@ -154,7 +154,7 @@ export default {
position: relative; position: relative;
height: 100%; height: 100%;
background-color: #631e88 !important; background-color: #631e88 !important;
background-image: url('@/assets/images/lottery/guess/page-bg-mini.png') !important; background-image: url('~@/assets/images/lottery/guess/page-bg-mini.png') !important;
background-size: cover; background-size: cover;
background-position: top center; background-position: top center;
background-repeat: no-repeat; background-repeat: no-repeat;
...@@ -191,7 +191,7 @@ export default { ...@@ -191,7 +191,7 @@ export default {
} }
.content-main { .content-main {
position: relative; position: relative;
background-image: url('@/assets/images/lottery/guess/game-bg.png'); background-image: url('~@/assets/images/lottery/guess/game-bg.png');
background-size: 100% 100%; background-size: 100% 100%;
background-position: center; background-position: center;
width: 100%; width: 100%;
...@@ -277,7 +277,7 @@ export default { ...@@ -277,7 +277,7 @@ export default {
.lottery-instant { .lottery-instant {
// 介绍 // 介绍
/deep/ .introduction-popup { /deep/ .introduction-popup {
background: url('@/assets/images/lottery/guess/intro-bg-mini.png'); background: url('~@/assets/images/lottery/guess/intro-bg-mini.png');
&__wrap { &__wrap {
background-color: transparent; background-color: transparent;
padding: 2px; padding: 2px;
...@@ -316,7 +316,7 @@ export default { ...@@ -316,7 +316,7 @@ export default {
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-image: url('@/assets/images/lottery/records-new/bg-purple.png'); background-image: url('~@/assets/images/lottery/records-new/bg-purple.png');
} }
&__sure { &__sure {
width: 157px; width: 157px;
...@@ -349,7 +349,7 @@ export default { ...@@ -349,7 +349,7 @@ export default {
&__prize-img { &__prize-img {
width: 65px; width: 65px;
height: 65px; height: 65px;
background-image: url('@/assets/images/lottery/win-new/prize-bg-purple.png'); background-image: url('~@/assets/images/lottery/win-new/prize-bg-purple.png');
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
...@@ -384,7 +384,7 @@ export default { ...@@ -384,7 +384,7 @@ export default {
width: 25px; width: 25px;
height: 25px; height: 25px;
font-size: 0; font-size: 0;
background-image: url('@/assets/images/lottery/win-new/close-purple.png'); background-image: url('~@/assets/images/lottery/win-new/close-purple.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
...@@ -434,7 +434,7 @@ export default { ...@@ -434,7 +434,7 @@ export default {
padding-bottom: 0; padding-bottom: 0;
} }
&__content { &__content {
background-image: url('@/assets/images/lottery/records-new/bg-purple.png'); background-image: url('~@/assets/images/lottery/records-new/bg-purple.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
......
...@@ -156,7 +156,7 @@ export default { ...@@ -156,7 +156,7 @@ export default {
position: relative; position: relative;
height: 100%; height: 100%;
background-color: #631e88 !important; background-color: #631e88 !important;
background-image: url('@/assets/images/lottery/guess/page-bg-mini.png') !important; background-image: url('~@/assets/images/lottery/guess/page-bg-mini.png') !important;
background-size: cover; background-size: cover;
background-position: top center; background-position: top center;
background-repeat: no-repeat; background-repeat: no-repeat;
...@@ -193,7 +193,7 @@ export default { ...@@ -193,7 +193,7 @@ export default {
} }
.content-main { .content-main {
position: relative; position: relative;
background-image: url('@/assets/images/lottery/guess/game-bg.png'); background-image: url('~@/assets/images/lottery/guess/game-bg.png');
background-size: 100% 100%; background-size: 100% 100%;
background-position: center; background-position: center;
width: 100%; width: 100%;
...@@ -277,7 +277,7 @@ export default { ...@@ -277,7 +277,7 @@ export default {
.lottery-instant { .lottery-instant {
// 介绍 // 介绍
/deep/ .introduction-popup { /deep/ .introduction-popup {
background: url('@/assets/images/lottery/guess/intro-bg-mini.png'); background: url('~@/assets/images/lottery/guess/intro-bg-mini.png');
&__wrap { &__wrap {
background-color: transparent; background-color: transparent;
padding: 2px; padding: 2px;
...@@ -317,7 +317,7 @@ export default { ...@@ -317,7 +317,7 @@ export default {
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-image: url('@/assets/images/lottery/records-new/bg-purple.png'); background-image: url('~@/assets/images/lottery/records-new/bg-purple.png');
} }
&__sure { &__sure {
width: 157px; width: 157px;
...@@ -350,7 +350,7 @@ export default { ...@@ -350,7 +350,7 @@ export default {
&__prize-img { &__prize-img {
width: 65px; width: 65px;
height: 65px; height: 65px;
background-image: url('@/assets/images/lottery/win-new/prize-bg-purple.png'); background-image: url('~@/assets/images/lottery/win-new/prize-bg-purple.png');
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
...@@ -385,7 +385,7 @@ export default { ...@@ -385,7 +385,7 @@ export default {
width: 25px; width: 25px;
height: 25px; height: 25px;
font-size: 0; font-size: 0;
background-image: url('@/assets/images/lottery/win-new/close-purple.png'); background-image: url('~@/assets/images/lottery/win-new/close-purple.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
...@@ -435,7 +435,7 @@ export default { ...@@ -435,7 +435,7 @@ export default {
padding-bottom: 0; padding-bottom: 0;
} }
&__content { &__content {
background-image: url('@/assets/images/lottery/records-new/bg-purple.png'); background-image: url('~@/assets/images/lottery/records-new/bg-purple.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
......
...@@ -124,7 +124,7 @@ export default { ...@@ -124,7 +124,7 @@ export default {
isNotStart() { isNotStart() {
// 抽奖不在活动日期内 // 抽奖不在活动日期内
const { status } = this.lotteryInfo const { status } = this.lotteryInfo
return +status !== LOTTERY_STATUS.start return Number(status) !== LOTTERY_STATUS.start
}, },
// 按钮图片样式 // 按钮图片样式
buttonImg() { buttonImg() {
...@@ -134,7 +134,7 @@ export default { ...@@ -134,7 +134,7 @@ export default {
return onStartImg return onStartImg
}, },
isWin() { isWin() {
return !!+this.winInfo.id return !!Number(this.winInfo.id)
} }
}, },
mounted() { mounted() {
...@@ -180,7 +180,7 @@ export default { ...@@ -180,7 +180,7 @@ export default {
position: relative; position: relative;
height: 100%; height: 100%;
background-color: #83d4fd !important; background-color: #83d4fd !important;
background-image: url('@/assets/images/lottery/scratch/page-bg.png') !important; background-image: url('~@/assets/images/lottery/scratch/page-bg.png') !important;
background-size: cover; background-size: cover;
background-position: top center; background-position: top center;
background-repeat: no-repeat; background-repeat: no-repeat;
...@@ -195,7 +195,7 @@ export default { ...@@ -195,7 +195,7 @@ export default {
} }
&__layout-scratch { &__layout-scratch {
position: relative; position: relative;
background-image: url('@/assets/images/lottery/scratch/game-bg.png'); background-image: url('~@/assets/images/lottery/scratch/game-bg.png');
background-size: 100% 100%; background-size: 100% 100%;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
...@@ -313,7 +313,7 @@ export default { ...@@ -313,7 +313,7 @@ export default {
/deep/ .introduction { /deep/ .introduction {
padding: 38px 15px; padding: 38px 15px;
&__sec-title { &__sec-title {
background-image: url('@/assets/images/lottery/scratch/introduction.png'); background-image: url('~@/assets/images/lottery/scratch/introduction.png');
width: 38%; width: 38%;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
...@@ -339,7 +339,7 @@ export default { ...@@ -339,7 +339,7 @@ export default {
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-image: url('@/assets/images/lottery/records-new/bg-blue.png'); background-image: url('~@/assets/images/lottery/records-new/bg-blue.png');
} }
&__sure { &__sure {
width: 157px; width: 157px;
...@@ -372,7 +372,7 @@ export default { ...@@ -372,7 +372,7 @@ export default {
&__prize-img { &__prize-img {
width: 65px; width: 65px;
height: 65px; height: 65px;
background-image: url('@/assets/images/lottery/win-new/prize-bg-blue.png'); background-image: url('~@/assets/images/lottery/win-new/prize-bg-blue.png');
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
...@@ -407,7 +407,7 @@ export default { ...@@ -407,7 +407,7 @@ export default {
width: 25px; width: 25px;
height: 25px; height: 25px;
font-size: 0; font-size: 0;
background-image: url('@/assets/images/lottery/win-new/close-blue.png'); background-image: url('~@/assets/images/lottery/win-new/close-blue.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
...@@ -455,7 +455,7 @@ export default { ...@@ -455,7 +455,7 @@ export default {
padding-bottom: 0; padding-bottom: 0;
} }
&__content { &__content {
background-image: url('@/assets/images/lottery/records-new/bg-blue.png'); background-image: url('~@/assets/images/lottery/records-new/bg-blue.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
......
...@@ -131,7 +131,7 @@ export default { ...@@ -131,7 +131,7 @@ export default {
isNotStart() { isNotStart() {
// 抽奖不在活动日期内 // 抽奖不在活动日期内
const { status } = this.lotteryInfo const { status } = this.lotteryInfo
return +status !== LOTTERY_STATUS.start return Number(status) !== LOTTERY_STATUS.start
}, },
// 按钮图片样式 // 按钮图片样式
buttonImg() { buttonImg() {
...@@ -141,7 +141,7 @@ export default { ...@@ -141,7 +141,7 @@ export default {
return onStartImg return onStartImg
}, },
isWin() { isWin() {
return !!+this.winInfo.id return !!Number(this.winInfo.id)
} }
}, },
mounted() { mounted() {
...@@ -383,7 +383,7 @@ export default { ...@@ -383,7 +383,7 @@ export default {
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-image: url('@/assets/images/lottery/records-new/bg-blue.png'); background-image: url('~@/assets/images/lottery/records-new/bg-blue.png');
} }
&__sure { &__sure {
width: 157px; width: 157px;
...@@ -416,7 +416,7 @@ export default { ...@@ -416,7 +416,7 @@ export default {
&__prize-img { &__prize-img {
width: 65px; width: 65px;
height: 65px; height: 65px;
background-image: url('@/assets/images/lottery/win-new/prize-bg-blue.png'); background-image: url('~@/assets/images/lottery/win-new/prize-bg-blue.png');
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
...@@ -451,7 +451,7 @@ export default { ...@@ -451,7 +451,7 @@ export default {
width: 25px; width: 25px;
height: 25px; height: 25px;
font-size: 0; font-size: 0;
background-image: url('@/assets/images/lottery/win-new/close-blue.png'); background-image: url('~@/assets/images/lottery/win-new/close-blue.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
...@@ -498,7 +498,7 @@ export default { ...@@ -498,7 +498,7 @@ export default {
padding-bottom: 0; padding-bottom: 0;
} }
&__content { &__content {
background-image: url('@/assets/images/lottery/records-new/bg-blue.png'); background-image: url('~@/assets/images/lottery/records-new/bg-blue.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
......
...@@ -54,6 +54,7 @@ export default { ...@@ -54,6 +54,7 @@ export default {
background-size: cover; background-size: cover;
background-position: center; background-position: center;
font-size: 0; font-size: 0;
z-index: 3;
} }
} }
</style> </style>
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
v-if="lotteryInfo.showType === 6 || lotteryInfo.showType === 1" v-if="lotteryInfo.showType === 6 || lotteryInfo.showType === 1"
:is-btn-loading="isBtnLoading" :is-btn-loading="isBtnLoading"
:is-show-win="isShowWin" :is-show-win="isShowWin"
:is-show-online-tip="isShowOnlineTip"
:is-show-bind-phone="isShowBindPhone" :is-show-bind-phone="isShowBindPhone"
:win-info="winInfo" :win-info="winInfo"
@lotteryCallback="lotteryCallback" @lotteryCallback="lotteryCallback"
...@@ -12,6 +13,7 @@ ...@@ -12,6 +13,7 @@
v-if="lotteryInfo.showType === 7" v-if="lotteryInfo.showType === 7"
:is-btn-loading="isBtnLoading" :is-btn-loading="isBtnLoading"
:is-show-win="isShowWin" :is-show-win="isShowWin"
:is-show-online-tip="isShowOnlineTip"
:is-show-bind-phone="isShowBindPhone" :is-show-bind-phone="isShowBindPhone"
:win-info="winInfo" :win-info="winInfo"
@lotteryCallback="lotteryCallback" @lotteryCallback="lotteryCallback"
...@@ -36,6 +38,7 @@ export default { ...@@ -36,6 +38,7 @@ export default {
stype: this.$route.query.stype || null, // 引用类型 stype: this.$route.query.stype || null, // 引用类型
playId: this.$route.query.sessionId, playId: this.$route.query.sessionId,
isShowWin: false, isShowWin: false,
isShowOnlineTip: false,
isShowBindPhone: false, // 是否显示绑定手机号提示 isShowBindPhone: false, // 是否显示绑定手机号提示
winInfo: this.winInfoTranslator(), winInfo: this.winInfoTranslator(),
isShowIntro: false isShowIntro: false
...@@ -48,6 +51,7 @@ export default { ...@@ -48,6 +51,7 @@ export default {
lotteryInfo: 'lottery/lotteryInfo', lotteryInfo: 'lottery/lotteryInfo',
isBindPhone: 'users/isBindPhone', isBindPhone: 'users/isBindPhone',
userInfo: 'users/userInfo', userInfo: 'users/userInfo',
premise: 'lottery/premise'
}), }),
backUrl() { backUrl() {
return this.$route.query.backUrl || '' return this.$route.query.backUrl || ''
...@@ -73,13 +77,14 @@ export default { ...@@ -73,13 +77,14 @@ export default {
mounted() { mounted() {
this.eventHubInit() this.eventHubInit()
Bus.$on('LotteryResult', data => { Bus.$on('LotteryResult', data => {
if (data.userId === this.userInfo.id && data.isPrize === 1) { if (data.winUserIdArr.includes(this.userInfo.id)) {
this.updateInfo({ this.updateInfo({
isWin: 1 isWin: 1
}) })
} }else {
if (this.lotteryInfo.isDraw === 1) { if (this.lotteryInfo.isDraw === 1) {
this.loadWinInfo() this.isShowWin = true
}
} }
}) })
}, },
...@@ -127,6 +132,15 @@ export default { ...@@ -127,6 +132,15 @@ export default {
Bus.$emit('showLogin') Bus.$emit('showLogin')
} }
}) })
} else if(!this.premise) {
this.$toast({
message: '请先填写信息',
duration: 1500,
onClose: () => {
Bus.$emit('showConfig')
}
})
return
} else if (this.lotteryInfo.status !== 1) { } else if (this.lotteryInfo.status !== 1) {
// 抽奖不在活动日期内 // 抽奖不在活动日期内
} else if (this.isBtnLoading) { } else if (this.isBtnLoading) {
...@@ -156,6 +170,9 @@ export default { ...@@ -156,6 +170,9 @@ export default {
}) })
this.$toast.success('参与成功') this.$toast.success('参与成功')
this.isBtnLoading = false this.isBtnLoading = false
if (this.lotteryInfo.needOnline === 1) {
this.isShowOnlineTip = true
}
} else { } else {
this.$toast.fail(errorMessage) this.$toast.fail(errorMessage)
this.isBtnLoading = false this.isBtnLoading = false
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
:is-mini="true" :is-mini="true"
:is-btn-loading="isBtnLoading" :is-btn-loading="isBtnLoading"
:is-show-win="isShowWin" :is-show-win="isShowWin"
:is-show-online-tip="isShowOnlineTip"
:is-show-bind-phone="isShowBindPhone" :is-show-bind-phone="isShowBindPhone"
:win-info="winInfo" :win-info="winInfo"
:is-show-intro="isShowIntro" :is-show-intro="isShowIntro"
...@@ -17,6 +18,7 @@ ...@@ -17,6 +18,7 @@
:is-mini="true" :is-mini="true"
:is-btn-loading="isBtnLoading" :is-btn-loading="isBtnLoading"
:is-show-win="isShowWin" :is-show-win="isShowWin"
:is-show-online-tip="isShowOnlineTip"
:is-show-bind-phone="isShowBindPhone" :is-show-bind-phone="isShowBindPhone"
:win-info="winInfo" :win-info="winInfo"
:is-show-intro="isShowIntro" :is-show-intro="isShowIntro"
...@@ -43,6 +45,7 @@ export default { ...@@ -43,6 +45,7 @@ export default {
stype: this.$route.query.stype || null, // 引用类型 stype: this.$route.query.stype || null, // 引用类型
playId: this.$route.query.sessionId, playId: this.$route.query.sessionId,
isShowWin: false, isShowWin: false,
isShowOnlineTip: false,
isShowBindPhone: false, // 是否显示绑定手机号提示 isShowBindPhone: false, // 是否显示绑定手机号提示
winInfo: this.winInfoTranslator(), winInfo: this.winInfoTranslator(),
isShowIntro: false isShowIntro: false
...@@ -55,6 +58,7 @@ export default { ...@@ -55,6 +58,7 @@ export default {
lotteryInfo: 'lottery/lotteryInfo', lotteryInfo: 'lottery/lotteryInfo',
isBindPhone: 'users/isBindPhone', isBindPhone: 'users/isBindPhone',
userInfo: 'users/userInfo', userInfo: 'users/userInfo',
premise: 'lottery/premise'
}), }),
backUrl() { backUrl() {
return this.$route.query.backUrl || '' return this.$route.query.backUrl || ''
...@@ -137,6 +141,15 @@ export default { ...@@ -137,6 +141,15 @@ export default {
Bus.$emit('showLogin') Bus.$emit('showLogin')
} }
}) })
} else if(!this.premise) {
this.$toast({
message: '请先填写信息',
duration: 1500,
onClose: () => {
Bus.$emit('showConfig')
}
})
return
} else if (this.lotteryInfo.status !== 1) { } else if (this.lotteryInfo.status !== 1) {
// 抽奖不在活动日期内 // 抽奖不在活动日期内
} else if (this.isBtnLoading) { } else if (this.isBtnLoading) {
...@@ -165,6 +178,9 @@ export default { ...@@ -165,6 +178,9 @@ export default {
activeNum: num activeNum: num
}) })
this.$toast.success('参与成功') this.$toast.success('参与成功')
if (this.lotteryInfo.needOnline === 1) {
this.isShowOnlineTip = true
}
this.isBtnLoading = false this.isBtnLoading = false
} else { } else {
this.$toast.fail(errorMessage) this.$toast.fail(errorMessage)
...@@ -182,7 +198,7 @@ export default { ...@@ -182,7 +198,7 @@ export default {
const { code, errorCode, errorMessage, data } = res const { code, errorCode, errorMessage, data } = res
if (code === 200 && errorCode === 0) { if (code === 200 && errorCode === 0) {
this.winInfo = this.winInfoTranslator(data) this.winInfo = this.winInfoTranslator(data)
console.log(this.winInfo); // console.log(this.winInfo);
this.isShowWin = true this.isShowWin = true
} else { } else {
this.$toast(errorMessage) this.$toast(errorMessage)
......
<template>
<van-popup
v-model="visible"
class="online-tip-popup"
:style="{ background: 'transparent' }"
@click-close-icon="onClose"
>
<div class="main">
<div class="box">
<img class="box-img" src="~@/assets/images/lottery/needOnline.png" alt="">
<img class="box-close" src="~@/assets/images/lottery/force-close.png" alt="" @click="visible = false">
<div class="box-warp">
<div class="box-warp__title">成功参与抽奖!</div>
<div class="box-warp__content">注:开奖前请不要离开页面,只在在线的用户中进行抽奖!</div>
</div>
</div>
</div>
</van-popup>
</template>
<script>
import Bus from '@/utils/Bus'
export default {
name: 'OnlineTipPopup',
components: {},
props: {
value: {
type: Boolean,
default: false
},
info: {
type: Object,
default: () => ({})
},
type: {
type: String,
default: ''
}
},
computed: {
visible: {
get() {
return this.value
},
set(val) {
Bus.$emit('updateMain', { isShowOnlineTip: val })
}
},
isWin() {
return !!Number(this.info.id)
}
},
methods: {
know() {
Bus.$emit('updateMain', { func: 'winCallback' })
},
onClose() {
Bus.$emit('updateMain', { func: 'winCloseCallback' })
}
}
}
</script>
<style lang="less" scoped>
.online-tip-popup {
// overflow: visible;
width: 100%;
/deep/ .van-popup__close-icon {
right: 10px;
top: -16px;
font-size: 22px;
color: #fff;
}
background-color: transparent;
.main {
// width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
.box {
width: 70%;
position: relative;
&-img {
width: 100%;
position: relative;
}
&-close {
width: 20px;
height: 20px;
position: absolute;
top: 10%;
right: -20px;
}
&-warp {
position: absolute;
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: center;
padding-bottom: 8%;
top: 0;
left: 0;
right: 0;
bottom: 0;
&__title {
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 18px;
color: #333333;
text-align: center;
}
&__content {
max-width: 80%;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 14px;
color: #666666;
text-align: center;
line-height: 19px;
margin: 14px 0 37px;
}
&__btn {
width: 120px;
height: 33px;
background: linear-gradient( 201deg, #FD8192 0%, #FF4F31 100%);
border-radius: 37px;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 13px;
color: #FFFFFF;
line-height: 33px;
text-align: center;
}
}
}
}
}
</style>
<template> <template>
<div class="main"> <div class="main">
<div <div
:style="{ :style="{styleObj}"
height: this.$route.path === '/mini/index' ? '65.5vh' : lotteryInfo.showType === 7 ? '46.5vh' : '37.5vh'
}"
> >
<div class="intro"> <div class="intro">
<div class="intro__title">活动介绍</div> <div class="intro__title">活动介绍</div>
...@@ -40,7 +38,10 @@ export default { ...@@ -40,7 +38,10 @@ export default {
...mapGetters({ ...mapGetters({
isLogin: 'users/isLogin', isLogin: 'users/isLogin',
lotteryInfo: 'lottery/lotteryInfo' lotteryInfo: 'lottery/lotteryInfo'
}) }),
styleObj() {
return `height: ${this.$route.path === '/mini/index' ? '65.5vh' : this.lotteryInfo.showType === 7 ? '46.5vh' : '37.5vh'}`
}
}, },
} }
</script> </script>
...@@ -49,7 +50,7 @@ export default { ...@@ -49,7 +50,7 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 0 13px; padding: 0 13px;
overflow-x: scroll; // overflow-x: auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.intro { .intro {
......
...@@ -146,7 +146,7 @@ export default { ...@@ -146,7 +146,7 @@ export default {
} }
}, },
isWin() { isWin() {
return !!+this.info.id return !!Number(this.info.id)
} }
}, },
methods: { methods: {
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<Records v-if="isMini"></Records> <Records v-if="isMini"></Records>
<RulePopup :value="isShowIntro"></RulePopup> <RulePopup :value="isShowIntro"></RulePopup>
<WinPopup :value="isShowWin" :info="winInfo" type="luckybag"></WinPopup> <WinPopup :value="isShowWin" :info="winInfo" type="luckybag"></WinPopup>
<OnlineTipPopup :value="isShowOnlineTip"></OnlineTipPopup>
<BindPhoneDialog :value="isShowBindPhone"></BindPhoneDialog> <BindPhoneDialog :value="isShowBindPhone"></BindPhoneDialog>
</section> </section>
</template> </template>
...@@ -33,6 +34,8 @@ import BackButton from '@/components/Lottery/Timing/BackButton' ...@@ -33,6 +34,8 @@ import BackButton from '@/components/Lottery/Timing/BackButton'
import WinPopup from '@/components/Lottery/Timing/WinPopup' import WinPopup from '@/components/Lottery/Timing/WinPopup'
// banner // banner
import Banner from '../Banner.vue' import Banner from '../Banner.vue'
// 在线提示弹窗
import OnlineTipPopup from '@/components/Lottery/Timing/OnlineTipPopup'
export default { export default {
...@@ -43,6 +46,7 @@ export default { ...@@ -43,6 +46,7 @@ export default {
Rewards, Rewards,
BackButton, BackButton,
WinPopup, WinPopup,
OnlineTipPopup,
Banner, Banner,
BindPhoneDialog: () => import('@/components/Common/BindPhoneDialog'), BindPhoneDialog: () => import('@/components/Common/BindPhoneDialog'),
RulePopup: () => import('@/components/Lottery/Timing/RulePopup'), RulePopup: () => import('@/components/Lottery/Timing/RulePopup'),
...@@ -61,6 +65,10 @@ export default { ...@@ -61,6 +65,10 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
isShowOnlineTip: {
type: Boolean,
default: false
},
isShowBindPhone: { isShowBindPhone: {
type: Boolean, type: Boolean,
default: false default: false
...@@ -163,7 +171,7 @@ export default { ...@@ -163,7 +171,7 @@ export default {
border-radius: 22px; border-radius: 22px;
} }
.reward-box { .reward-box {
width: 100%; width: calc(100% - 48px);
position: absolute; position: absolute;
bottom: 3%; bottom: 3%;
} }
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<Records v-if="isMini"></Records> <Records v-if="isMini"></Records>
<RulePopup :value="isShowIntro"></RulePopup> <RulePopup :value="isShowIntro"></RulePopup>
<WinPopup :value="isShowWin" :info="winInfo" type="treasure"></WinPopup> <WinPopup :value="isShowWin" :info="winInfo" type="treasure"></WinPopup>
<OnlineTipPopup :value="isShowOnlineTip"></OnlineTipPopup>
<BindPhoneDialog :value="isShowBindPhone"></BindPhoneDialog> <BindPhoneDialog :value="isShowBindPhone"></BindPhoneDialog>
</section> </section>
</template> </template>
...@@ -33,6 +34,8 @@ import BackButton from '@/components/Lottery/Timing/BackButton' ...@@ -33,6 +34,8 @@ import BackButton from '@/components/Lottery/Timing/BackButton'
import WinPopup from '@/components/Lottery/Timing/WinPopup' import WinPopup from '@/components/Lottery/Timing/WinPopup'
// banner // banner
import Banner from '../Banner.vue' import Banner from '../Banner.vue'
// 在线提示弹窗
import OnlineTipPopup from '@/components/Lottery/Timing/OnlineTipPopup'
export default { export default {
components: { components: {
...@@ -42,6 +45,7 @@ export default { ...@@ -42,6 +45,7 @@ export default {
Rewards, Rewards,
BackButton, BackButton,
WinPopup, WinPopup,
OnlineTipPopup,
Banner, Banner,
BindPhoneDialog: () => import('@/components/Common/BindPhoneDialog'), BindPhoneDialog: () => import('@/components/Common/BindPhoneDialog'),
RulePopup: () => import('@/components/Lottery/Timing/RulePopup'), RulePopup: () => import('@/components/Lottery/Timing/RulePopup'),
...@@ -60,6 +64,10 @@ export default { ...@@ -60,6 +64,10 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
isShowOnlineTip: {
type: Boolean,
default: false
},
isShowBindPhone: { isShowBindPhone: {
type: Boolean, type: Boolean,
default: false default: false
......
export const ENV_CONFIG = window.__GDY_ENV_CONFIG__
const protocol = window.location.protocol
export default {
goDomain: `//${ENV_CONFIG.GO_API_DOMAIN}/v1`,
privateDomain: `//${ENV_CONFIG.PRIVATE_API_DOMAIN}/v1`,
activityDomain: `//${ENV_CONFIG.ACTIVITY_API_DOMAIN}/v1`,
defBanner: `//${ENV_CONFIG.OSS_DOMAIN}/common/img/lottery_banner_default_v2.png`,
defShareImg: `${protocol || 'https:'}//${ENV_CONFIG.OSS_DOMAIN}/common/img/lottery.png`, // 必须带协议头,否则微信分享配置时无法生效
ossImageServe: ENV_CONFIG.IS_PRIVATE ? '' : '?x-oss-process=style/mobilebackground',
}
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
* 传入数字字符串则没有限制 * 传入数字字符串则没有限制
* @param {number|string} digit * @param {number|string} digit
*/ */
/* eslint-disable no-param-reassign */
/* eslint-disable no-unreachable-loop */
export default (digit) => { export default (digit) => {
digit = typeof digit === 'number' ? String(digit) : digit; digit = typeof digit === 'number' ? String(digit) : digit;
const zh = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九']; const zh = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
...@@ -13,7 +15,8 @@ export default (digit) => { ...@@ -13,7 +15,8 @@ export default (digit) => {
let breakLen = Math.ceil(digit.length / 4); let breakLen = Math.ceil(digit.length / 4);
let notBreakSegment = digit.length % 4 || 4; let notBreakSegment = digit.length % 4 || 4;
let segment; let segment;
let zeroFlag = [], allZeroFlag = []; let zeroFlag = []
let allZeroFlag = [];
let result = ''; let result = '';
while (breakLen > 0) { while (breakLen > 0) {
...@@ -21,7 +24,7 @@ export default (digit) => { ...@@ -21,7 +24,7 @@ export default (digit) => {
segment = digit.slice(0, notBreakSegment); segment = digit.slice(0, notBreakSegment);
let segmentLen = segment.length; let segmentLen = segment.length;
for (let i = 0; i < segmentLen; i++) { for (let i = 0; i < segmentLen; i++) {
if (segment[i] != 0) { if (segment[i] !== 0) {
if (zeroFlag.length > 0) { if (zeroFlag.length > 0) {
result += '零' + zh[segment[i]] + unit[4 - segmentLen + i]; result += '零' + zh[segment[i]] + unit[4 - segmentLen + i];
// 判断是否需要加上 quot 单位 // 判断是否需要加上 quot 单位
...@@ -40,7 +43,7 @@ export default (digit) => { ...@@ -40,7 +43,7 @@ export default (digit) => {
} }
} else { } else {
// 处理为 0 的情形 // 处理为 0 的情形
if (segmentLen == 1) { if (segmentLen === 1) {
result += zh[segment[i]]; result += zh[segment[i]];
break; break;
} }
...@@ -53,7 +56,7 @@ export default (digit) => { ...@@ -53,7 +56,7 @@ export default (digit) => {
notBreakSegment += 4; notBreakSegment += 4;
for (let j = 0; j < segment.length; j++) { for (let j = 0; j < segment.length; j++) {
if (segment[j] != 0) { if (segment[j] !== 0) {
if (zeroFlag.length > 0) { if (zeroFlag.length > 0) {
// 第一次执行zeroFlag长度不为0,说明上一个分区最后有0待处理 // 第一次执行zeroFlag长度不为0,说明上一个分区最后有0待处理
if (j === 0) { if (j === 0) {
...@@ -77,8 +80,8 @@ export default (digit) => { ...@@ -77,8 +80,8 @@ export default (digit) => {
zeroFlag.push(segment[j]); zeroFlag.push(segment[j]);
} else if (allZeroFlag.length > 0) { } else if (allZeroFlag.length > 0) {
// 执行到最后 // 执行到最后
if (breakLen == 1) { if (breakLen === 1) {
result += ''; result = String(result);
} else { } else {
zeroFlag.length = 0; zeroFlag.length = 0;
} }
......
<template> <template>
<div class="container"> <div class="container">
<ConfigPopup v-model="isShowConfig"></ConfigPopup> <ConfigPopup v-model="isShowConfig"></ConfigPopup>
<Nuxt v-if="!$slots.default" /> <ForcePopup v-model="isShowForce"></ForcePopup>
<slot /> <slot>
<router-view></router-view>
</slot>
</div> </div>
</template> </template>
<script> <script>
import Bus from '@/utils/Bus' import Bus from '@/utils/Bus'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import loginAction from '@/plugins/UserAction/login' import loginAction from '@/plugins/UserAction/login'
import { ENV_CONFIG } from "@/config";
import ConfigPopup from '../components/Common/ConfigPopup' import ConfigPopup from '../components/Common/ConfigPopup'
import ForcePopup from '../components/Common/ForcePopup'
import action from '@/plugins/pvStatisticalService'
import dmsService from '@/plugins/dmsService'
export default { export default {
components: { components: {
ConfigPopup, ConfigPopup,
ForcePopup
}, },
data() { data() {
return { return {
loginInstance: null, loginInstance: null,
isShowConfig: false isShowConfig: false,
isShowForce: false
} }
}, },
mounted() { mounted() {
...@@ -27,12 +35,27 @@ export default { ...@@ -27,12 +35,27 @@ export default {
Bus.$on('showConfig', () => { Bus.$on('showConfig', () => {
this.isShowConfig = true this.isShowConfig = true
}) })
Bus.$on('showForce', () => {
this.isShowForce = true
})
const route = this.$route
const store = this.$store
action({ route, store })
dmsService({ route })
const { id, uin } = this.$route.query
// 抽奖前置条件
if (id && uin) {
this.checkPremise({ id, uin })
}
}, },
destroyed() { destroyed() {
Bus.$off('showLogin') Bus.$off('showLogin')
}, },
methods: { methods: {
...mapActions({ jumpToLogin: 'users/jumpToLogin' }), ...mapActions({
jumpToLogin: 'users/jumpToLogin',
checkPremise: 'lottery/check_premise'
}),
handleVisibilityChange() { handleVisibilityChange() {
const { uin = 0 } = this.$route.query const { uin = 0 } = this.$route.query
if (document.hidden) { if (document.hidden) {
...@@ -45,6 +68,17 @@ export default { ...@@ -45,6 +68,17 @@ export default {
// 云平台登录模块初始化 // 云平台登录模块初始化
initLoginCenter() { initLoginCenter() {
if (!window.LoginCenter) return if (!window.LoginCenter) return
const isCname = !window.location.href.includes(
`//${ENV_CONFIG.CUSTOMER_DOMAIN}`
)
const state = isCname ? document.domain : ''
const wxPcRedirect = isCname
? window.location.href.replace(
/[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62}|(:[0-9]{1,4}))+\.?/,
`${ENV_CONFIG.CUSTOMER_DOMAIN}`
)
: window.location.href
const that = this
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
this.loginInstance = LoginCenter({ this.loginInstance = LoginCenter({
target: document.body, target: document.body,
...@@ -52,8 +86,10 @@ export default { ...@@ -52,8 +86,10 @@ export default {
uin: this.$route.query.uin, uin: this.$route.query.uin,
zIndex: 100000, zIndex: 100000,
backUrl: encodeURIComponent(window.location.href), backUrl: encodeURIComponent(window.location.href),
serviceAgreement: `//${process.env.OSS_DOMAIN}/staticPages/agreement_user.html`, wxPcRedirect,
privacyAgreement: `//${process.env.OSS_DOMAIN}/staticPages/agreement_privacy.html`, state,
serviceAgreement: `//${ENV_CONFIG.OSS_DOMAIN}/staticPages/agreement_user.html`,
privacyAgreement: `//${ENV_CONFIG.OSS_DOMAIN}/staticPages/agreement_privacy.html`,
successCallback: ({ type, response }) => { successCallback: ({ type, response }) => {
if (type === 'recover'){ if (type === 'recover'){
this.$toast("密码修改成功!"); this.$toast("密码修改成功!");
...@@ -88,7 +124,7 @@ export default { ...@@ -88,7 +124,7 @@ export default {
} }
} }
// const loginAction = require("@/plugins/UserAction/login").default; // const loginAction = require("@/plugins/UserAction/login").default;
loginAction.call(this, { token: response.data, onFinished }) loginAction.call(that, { token: response.data, onFinished })
}, },
failCallback: ({ response }) => { failCallback: ({ response }) => {
this.$toast(response.errorMessage) this.$toast(response.errorMessage)
......
<template> <template>
<div class="error"> <div class="error">
<div v-if="statusCode === 404" class="error__lost"></div> <div class="error__lost"></div>
<div v-else class="error__other">
<span>{{ errorMessage }}</span>
</div>
</div> </div>
</template> </template>
...@@ -19,7 +16,7 @@ export default { ...@@ -19,7 +16,7 @@ export default {
}, },
computed: { computed: {
statusCode() { statusCode() {
return +this.error?.statusCode || 0 return Number(this.error?.statusCode) || 0
}, },
errorMessage() { errorMessage() {
return this.error?.message || '发生了一些不可预知的错误' return this.error?.message || '发生了一些不可预知的错误'
...@@ -27,19 +24,17 @@ export default { ...@@ -27,19 +24,17 @@ export default {
}, },
mounted() { mounted() {
// console.log(this.error) // console.log(this.error)
this.setTitle(this.statusCode) this.setTitle(404)
}, },
methods: { methods: {
setTitle(type) { setTitle(type) {
if (process.client) { switch (type) {
switch (type) { case 404:
case 404: document.title = '抱歉,您的页面迷路了!'
document.title = '抱歉,您的页面迷路了!' break
break default:
default: document.title = this.errorMessage
document.title = this.errorMessage break
break
}
} }
} }
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
@click-left="onClickLeft" @click-left="onClickLeft"
/> />
<div class="mini-nav-bar-layout__container"> <div class="mini-nav-bar-layout__container">
<Nuxt /> <router-view></router-view>
</div> </div>
</div> </div>
</DefaultLayout> </DefaultLayout>
......
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import '@/assets/styles/main.less' // global css
import '@/plugins/vant'
import '@/filters'
import '@/plugins/vueClipboard'
import '@/plugins/deviceId'
router.beforeEach((to, from, next) => {
const { uin = 0, id = 0, sessionId = 0 } = to.query
if (!uin && !['/error'].includes(to.path)) {
// 处理缺失 uin 的情况
next('/error')
return
}
store.commit('users/SET_UIN', uin)
if (['/list', '/index', '/message', '/winners'].includes(to.path) && !id) {
// 处理缺失 id 的情况
next('/error')
return
}
if (['/index', '/message'].includes(to.path) && !sessionId) {
// 处理缺失 sessionId 的情况
next('/error')
return
}
// 如果一切正常,继续导航
next()
})
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
...@@ -9,7 +9,7 @@ export default { ...@@ -9,7 +9,7 @@ export default {
}, },
computed: { computed: {
isInIframe() { isInIframe() {
return process.client ? window.self !== window.top : false return window.self !== window.top
} }
}, },
mounted() { mounted() {
...@@ -17,7 +17,7 @@ export default { ...@@ -17,7 +17,7 @@ export default {
}, },
methods: { methods: {
connectionInit() { connectionInit() {
if (process.client && this.isInIframe && !this.connection) { if (this.isInIframe && !this.connection) {
const { ClientConnection } = require('@easy-messenger/client-connection/dist/clientConnection.cjs.js') const { ClientConnection } = require('@easy-messenger/client-connection/dist/clientConnection.cjs.js')
this.connection = new ClientConnection() this.connection = new ClientConnection()
let counter = 0 let counter = 0
......
<template>
<div class="main" :style="{height: lotteryInfo.type === 3 ? '100vh' : ''}">
<div class="top">
<div style="width: 28px;height: 14px;"></div>
<div class="top-title">请先填写信息</div>
<div class="top-btn" @click="submit">提交</div>
</div>
<div v-if="lotteryInfo.newPremise.length" class="form" :class="{error: isError}">
<div v-for="item in lotteryInfo.newPremise" :key="item.type">
<template v-if="item.type === 'name' && item.isChecked">
<van-field v-model="form.name" label-width="60" label="姓名" placeholder="请输入姓名" @focus="isError = false"/>
</template>
<template v-if="item.type === 'phone' && item.isChecked">
<van-field v-model="form.phone" label-width="60" label="手机号" placeholder="请输入联系电话" @focus="isError = false"/>
<van-field v-model="form.code" label-width="60" label="验证码" placeholder="请输入验证码" @focus="isError = false">
<template #button>
<span class="code" @click="sendCode">
<span v-if="!isSend">获取验证码</span>
<span v-else>{{ time }}s后重发</span>
</span>
</template>
</van-field>
</template>
<template v-if="item.type === 'address' && item.isChecked">
<template v-if="!addressList.length">
<van-field v-model="form.address" label-width="60" label="收件地址" readonly placeholder="请选择省市区" @focus="isError = false" @click="select" >
<template #button>
<van-icon name="location" />
</template>
</van-field>
<van-field
v-model="form.detail"
label="门牌号"
label-width="60"
placeholder="详细地址(精确到门牌号)"
maxlength="50"
show-word-limit
@focus="isError = false"
/>
</template>
<template v-else>
<div v-if="lotteryInfo.newPremise[0].isChecked + lotteryInfo.newPremise[1].isChecked === 0" class="address" @click="isShowAddressPopup = true">
<img class="address-icon" src="@/assets/images/lottery/address.png" alt="">
<div class="address-text">{{ form.address + form.detail }}</div>
<img class="address-right" src="@/assets/images/lottery/address-right.png" alt="">
</div>
<div v-else class="address" @click="isShowAddressPopup = true">
<div class="address-title">收件地址</div>
<img class="address-icon__alter" src="@/assets/images/lottery/address.png" alt="">
<div class="address-text">{{ form.address + form.detail }}</div>
<img class="address-right" src="@/assets/images/lottery/address-right.png" alt="">
</div>
</template>
</template>
<template v-if="item.type.includes('custom') && item.isChecked">
<van-field v-model="form[item.type]" :class="item.title.length > 4 ? 'long-title' : ''" label-width="60" :label="item.title" maxlength="50" show-word-limit :placeholder="`请输入${item.title}`" @focus="isError = false"/>
</template>
</div>
</div>
<div v-else class="form" :class="{error: isError}">
<van-field v-if="lotteryInfo.premise && lotteryInfo.premise.includes('name')" v-model="form.name" label-width="60" label="联系人" placeholder="请输入联系人" @focus="isError = false"/>
<template v-if="lotteryInfo.premise && lotteryInfo.premise.includes('phone')">
<van-field v-model="form.phone" label-width="60" label="手机号" placeholder="请输入联系电话" @focus="isError = false"/>
<van-field v-model="form.code" label-width="60" label="验证码" placeholder="请输入验证码" @focus="isError = false">
<template #button>
<span class="code" @click="sendCode">
<span v-if="!isSend">获取验证码</span>
<span v-else>{{ time }}s后重发</span>
</span>
</template>
</van-field>
</template>
<template v-if="lotteryInfo.premise && lotteryInfo.premise.includes('address')">
<van-field v-model="form.address" label-width="60" label="收货地址" readonly placeholder="请选择省市区" @focus="isError = false" @click="select" >
<template #button>
<van-icon name="location" />
</template>
</van-field>
<van-field
v-model="form.detail"
type="textarea"
label="门牌号"
label-width="60"
placeholder="详细地址(精确到门牌号)"
rows="2"
autosize
maxlength="50"
show-word-limit
@focus="isError = false"
/>
</template>
</div>
<van-popup
v-model="isShowAdd"
position="bottom"
round
>
<van-area title="区域选择" :area-list="areaList" @confirm="chooseAdd" @cancel="isShowAdd = false"/>
</van-popup>
<address-popup
v-model="isShowAddressPopup"
:addressList="addressList"
:addressItem="addressItem"
:create-api="addAddress"
:update-api="setAddress"
:delete-api="removeAddress"
@confirm="resetAddress"
@reload="_getAddressList"
></address-popup>
</div>
</template>
<script>
import {
savePremise,
setSendSmsCode,
setValidSmsCode
} from '@/api/modules/lottery'
import { areaList } from '@vant/area-data';
import { mapGetters, mapActions } from 'vuex'
import postMessage from '@/utils/postMessage'
import { getAddressList, removeAddress, setAddress, addAddress } from '@/api/modules/address'
import AddressPopup from '@/components/Common/AddressPopup/AddressPopup.vue'
import UserAgents from '@/utils/UserAgents'
import CONFIG from '@/config'
import Bus from '@/utils/Bus'
export default {
name: 'ConfigPopup',
components: {
AddressPopup,
},
data() {
return {
form: {
name: '',
phone: '',
code: '',
address: '',
detail: '',
custom1: '',
custom2: '',
custom3: '',
},
removeAddress,
setAddress,
addAddress,
areaList,
isShowAdd: false,
isError: false,
isSend: false,
addressList: [1],
time: 60,
isShowAddressPopup: false,
addressItem: null,
}
},
computed: {
...mapGetters({
uin: 'users/uin',
lotteryInfo: 'lottery/lotteryInfo',
isLogin: 'users/isLogin',
}),
},
// watch: {
// 'lotteryInfo.newPremise': {
// handler(val) {
// const isOpen = val && val.some(item => item.isChecked && item.type === 'address')
// if (isOpen && this.isLogin && this.addressList.length === 0) {
// this._getAddressList(this.resetAddress)
// }
// }
// },
// isLogin(val) {
// const premise = this.lotteryInfo.newPremise || []
// const isOpen = premise && premise.some(item => item.isChecked && item.type === 'address')
// if (isOpen && val && this.addressList.length === 0) {
// this._getAddressList(this.resetAddress)
// }
// }
// },
mounted() {
this.dataInit()
Bus.$on('addressList', (data) => {
this.addressList = data
this.resetAddress()
})
},
methods: {
...mapActions({
getLotteryDetail: 'lottery/getLotteryDetail',
updateInfo: 'lottery/updateInfo',
postInfo: 'users/postInfo',
checkPremise: 'lottery/check_premise'
}),
dataInit() {
const { id, sessionId: playId, uin } = this.$route.query
// 拉取场次内基础信息
this.getLotteryDetail({ id, playId, uin })
.then(() => {
this.isLoading = false
// 微信分享
if (UserAgents.isWx) {
const { lotteryInfo } = this
const wxShare = require('@/utils/wxShare').default
wxShare.init(
{
link: window.location.href,
title: lotteryInfo?.shareTitle || lotteryInfo?.title || '抽奖',
desc: lotteryInfo?.intro || window.location.href,
imgUrl: CONFIG.defShareImg
},
{ uin }
)
}
})
.catch(() => {
this.isLoading = false
})
},
_getAddressList(cb) {
getAddressList({ uin: this.uin }).then(res => {
const { code, data, errorMessage, errorCode } = res
if (code === 200 && errorCode === 0) {
this.addressList = data
if (cb) {
cb()
}
}else {
this.$toast(errorMessage)
}
})
},
resetAddress(item) {
this.addressItem = item || this.addressList.find(item => item.isDefault === 1) || this.addressList[0]
if (this.addressItem?.province) {
this.form.address = `${this.addressItem.province} ${this.addressItem.city} ${this.addressItem.area} `
this.form.detail = this.addressItem.detail
} else {
this.form.address = ''
this.form.detail = ''
}
},
select() {
this.isShowAdd = true
},
chooseAdd(val) {
const str = val[0].name + ' ' + val[1].name + ' ' + val[2].name
this.form.address = str
this.isShowAdd = false
},
sendCode() {
if (this.isSend) return
if (!this.form.phone) {
this.$toast('请先填写手机号')
return
}
if (!this.form.phone.match(/^s*$|(?:(?:\+|00)86)?1\d{10}$/)) {
this.$toast('手机号格式不正确')
return
}
const { uin } = this.$route.query
const phone = this.form.phone
setSendSmsCode({ uin, phone, module: 'draw' }).then((res) => {
const { code, errorCode, errorMessage } = res
if (code === 200 && errorCode === 0) {
// if (data) {
// this.$toast(data)
// }
this.$toast('成功')
let time = 60
this.isSend = true
const timer = setInterval(() => {
time--
this.time = time
if (time <= 0) {
clearInterval(timer)
this.isSend = false
}
}, 1000)
} else {
this.$toast(errorMessage)
}
})
},
submit() {
if (this.lotteryInfo.newPremise.length) {
this.submitNewPremise()
} else {
this.submitOldPremise()
}
},
submitOldPremise() {
const { uin } = this.$route.query
const { name, phone, code, address, detail } = this.form
if (this.lotteryInfo.premise.includes('name')) {
if (!name) {
this.isError = true
return 0
}
}
if (this.lotteryInfo.premise.includes('address')) {
if (!address || !detail) {
this.isError = true
return 0
}
}
if (this.lotteryInfo.premise.includes('phone')) {
if (!phone || !code) {
this.isError = true
return 0
}
setValidSmsCode({ uin, phone, code }).then((res) => {
const { code, errorCode, errorMessage } = res
if (code === 200 && errorCode === 0) {
this.$toast('验证成功')
this.saveOldPremise()
} else {
this.$toast(errorMessage)
}
})
}else {
this.saveOldPremise()
}
},
saveOldPremise() {
const { id, uin } = this.$route.query
const params = {
id,
uin,
}
if (this.lotteryInfo.premise.includes('name')) {
params.name = this.form.name
}
if (this.lotteryInfo.premise.includes('phone')) {
params.phone = this.form.phone
}
if (this.lotteryInfo.premise.includes('address')) {
params.address = this.form.address + this.form.detail
}
savePremise(params).then(res => {
const { code, errorCode, errorMessage } = res
if (code === 200 && errorCode === 0) {
this.$toast('信息保存成功')
postMessage.premiseFilled()
this.visible = false
this.checkPremise({ id, uin })
} else {
this.$toast(errorMessage)
}
})
},
submitNewPremise() {
const { uin } = this.$route.query
const { phone, code, address, detail } = this.form
// 校验表单
for (let i = 0; i < this.lotteryInfo.newPremise.length; i++) {
const item = this.lotteryInfo.newPremise[i]
if (item.isChecked) {
if (!this.form[item.type]) {
this.isError = true
return 0
}
if (item.type === 'address') {
if (!address || !detail) {
this.isError = true
return 0
}
}
if (item.type === 'phone') {
if (!phone || !code) {
this.isError = true
return 0
}
}
}
}
// 有手机跟验证码数据时,验证手机验证码
if (phone && code) {
setValidSmsCode({ uin, phone, code }).then((res) => {
const { code, errorCode, errorMessage } = res
if (code === 200 && errorCode === 0) {
this.$toast('验证成功')
this.saveNewPremise()
} else {
this.$toast(errorMessage)
}
})
} else {
this.saveNewPremise()
}
},
saveNewPremise() {
const { id, uin } = this.$route.query
const params = {
id,
uin,
}
this.lotteryInfo.newPremise.forEach(item => {
params[item.type] = this.form[item.type]
if (item.type === 'address') {
params.address = this.form.address + this.form.detail
}
})
savePremise(params).then(res => {
const { code, errorCode, errorMessage } = res
if (code === 200 && errorCode === 0) {
this.$toast('信息保存成功')
postMessage.premiseFilled()
this.visible = false
this.checkPremise({ id, uin })
} else {
this.$toast(errorMessage)
}
})
}
}
}
</script>
<style lang="less" scoped>
.main {
min-height: 42vh;
padding-bottom: 30px;
background-color: #FFFFFF;
}
.top {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 12px 12px;
font-size: 14px;
&-title {
font-size: 16px;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
color: #333333;
}
&-btn {
font-size: 15px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
color: #357BF0;
}
}
.form {
/deep/ .van-icon {
font-size: 20px;
}
.long-title {
// width: 100px;
/deep/ .van-field__label{
height: 24px;
font-size: 15px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
color: #666666;
width: auto !important;
}
}
.address {
display: flex;
align-items: center;
// justify-content: space-between;
padding: 9.5px 13px;
&-icon {
width: 24px;
height: 24px;
margin-right: 12px;
&__alter {
width: 20px;
height: 20px;
margin-right: 5px;
}
}
&-text {
flex: 1;
// width: 225px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 15px;
color: #333333;
line-height: 24px;
text-align: justify;
padding-right: 20px;
}
&-right {
width: 5px;
height: 9px;
}
&-title {
height: 24px;
line-height: 24px;
font-size: 15px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
color: #666666;
margin-right: 8px;
}
}
.code {
font-size: 15px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
color: #357BF0;
}
/deep/ .van-field__control {
padding-right: 40px;
}
/deep/ .van-field__word-limit {
position: absolute;
top: 0;
right: 0;
}
/deep/ .van-cell {
padding: 9.5px 13px;
font-size: 15px;
}
/deep/ .van-field__label{
height: 24px;
line-height: 24px;
font-size: 15px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
color: #666666;
margin-right: 8px;
span {
white-space: nowrap;
}
}
/deep/ .van-field__word-limit{
color: #999;
}
/deep/ .van-cell::after {
border-bottom: none;
}
}
.error {
/deep/ .van-field__control::placeholder {
color: red;
}
}
/deep/ .van-picker__cancel {
font-size: 15px;
}
/deep/ .van-picker__confirm {
font-size: 15px;
color: #357BF0;
}
</style>
<template> <template>
<section class="lottery-box"> <section class="lottery-box">
<component :is="lotteryComponents[+lotteryInfo.type]" v-if="'type' in lotteryInfo && lotteryInfo.type"></component> <component :is="lotteryComponents[Number(lotteryInfo.type)]" v-if="'type' in lotteryInfo && lotteryInfo.type"></component>
<ComplaintsDeal></ComplaintsDeal> <ComplaintsDeal></ComplaintsDeal>
<Loading v-model="isLoading" class="lottery-box__loading"></Loading> <Loading v-model="isLoading" class="lottery-box__loading"></Loading>
</section> </section>
...@@ -35,14 +35,31 @@ export default { ...@@ -35,14 +35,31 @@ export default {
...mapGetters({ ...mapGetters({
isLogin: 'users/isLogin', isLogin: 'users/isLogin',
uin: 'users/uin', uin: 'users/uin',
lotteryInfo: 'lottery/lotteryInfo' lotteryInfo: 'lottery/lotteryInfo',
premise: 'lottery/premise'
}) })
}, },
watch: { watch: {
trueId(nVal, oVal) { premise(nVal, oVal) {
if (nVal) { if (this.lotteryInfo.forceWrite && nVal === 0) {
this.postInfo(nVal) if (window.self === window.top) {
Bus.$emit('showForce')
} else {
Bus.$emit('showConfig')
}
} }
},
'lotteryInfo.forceWrite': {
handler(val) {
if (val && this.premise === 0) {
if (window.self === window.top) {
Bus.$emit('showForce')
} else {
Bus.$emit('showConfig')
}
}
},
deep: true
} }
}, },
created() { created() {
...@@ -69,7 +86,7 @@ export default { ...@@ -69,7 +86,7 @@ export default {
this.trueId = this.lotteryInfo.id this.trueId = this.lotteryInfo.id
console.log(this.lotteryInfo, 888888); console.log(this.lotteryInfo, 888888);
// 微信分享 // 微信分享
if (UserAgents.isWx && process.client) { if (UserAgents.isWx) {
const { lotteryInfo } = this const { lotteryInfo } = this
const wxShare = require('@/utils/wxShare').default const wxShare = require('@/utils/wxShare').default
wxShare.init( wxShare.init(
...@@ -88,8 +105,6 @@ export default { ...@@ -88,8 +105,6 @@ export default {
}) })
// 初始化事件中心 // 初始化事件中心
this.eventHubInit() this.eventHubInit()
// 抽奖前置条件
this.checkPremise({ id, uin })
}, },
// 事件中心 // 事件中心
eventHubInit() { eventHubInit() {
...@@ -97,7 +112,7 @@ export default { ...@@ -97,7 +112,7 @@ export default {
Bus.$on('LotteryInfoUpdate', data => { Bus.$on('LotteryInfoUpdate', data => {
const { id } = data const { id } = data
const { uin, id: currentId, sessionId: currentPlayId } = this const { uin, id: currentId, sessionId: currentPlayId } = this
if (id === currentId) { if (Number(id) === Number(currentId)) {
this.getLotteryDetail({ id, playId: currentPlayId, uin }) this.getLotteryDetail({ id, playId: currentPlayId, uin })
} }
}) })
...@@ -105,7 +120,7 @@ export default { ...@@ -105,7 +120,7 @@ export default {
Bus.$on('LotteryStateUpdate', data => { Bus.$on('LotteryStateUpdate', data => {
const { id, playId } = data const { id, playId } = data
const { sessionId: currentPlayId, id: currentId } = this const { sessionId: currentPlayId, id: currentId } = this
if (id === currentId && playId === currentPlayId) { if (Number(id) === Number(currentId) && Number(playId) === Number(currentPlayId)) {
const { status, startTime, endTime } = data const { status, startTime, endTime } = data
// 状态 // 状态
this.updateInfo({ this.updateInfo({
......
...@@ -61,7 +61,7 @@ export default { ...@@ -61,7 +61,7 @@ export default {
}) })
} }
// 微信分享 // 微信分享
if (UserAgents.isWx && process.client) { if (UserAgents.isWx) {
const { data = {} } = res const { data = {} } = res
const wxShare = require('@/utils/wxShare').default const wxShare = require('@/utils/wxShare').default
wxShare.init( wxShare.init(
...@@ -76,7 +76,7 @@ export default { ...@@ -76,7 +76,7 @@ export default {
} }
}) })
.catch(() => { .catch(() => {
this.$root.context.error({ statusCode: 504, message: '网络请求超时,请刷新重试' }) this.$router.replace({path: '/error'})
}) })
}, },
getStatus(item) { getStatus(item) {
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
Bus.$on('LotteryInfoUpdate', data => { Bus.$on('LotteryInfoUpdate', data => {
const { id } = data const { id } = data
const { uin, id: currentId } = this.$route.query const { uin, id: currentId } = this.$route.query
if (id === currentId) { if (Number(id) === Number(currentId)) {
this.getSessionList({ id, uin }) this.getSessionList({ id, uin })
} }
}) })
......
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
}, },
computed: { computed: {
isInIframe() { isInIframe() {
return process.client ? window.self !== window.top : false return window.self !== window.top
} }
}, },
mounted() { mounted() {
...@@ -127,19 +127,17 @@ export default { ...@@ -127,19 +127,17 @@ export default {
}, },
methods: { methods: {
connectionInit() { connectionInit() {
if (process.client) { const { ClientConnection } = require('@easy-messenger/client-connection/dist/clientConnection.cjs.js')
const { ClientConnection } = require('@easy-messenger/client-connection/dist/clientConnection.cjs.js') this.connection = new ClientConnection()
this.connection = new ClientConnection() let counter = 0
let counter = 0 this.timer = setInterval(() => {
this.timer = setInterval(() => { this.connection.init()
this.connection.init() counter++
counter++ if (this.connection.connected || counter > 60) {
if (this.connection.connected || counter > 60) { clearInterval(this.timer)
clearInterval(this.timer) this.connectionListener()
this.connectionListener() }
} }, 1000)
}, 1000)
}
}, },
connectionListener() { connectionListener() {
this.connection.on('onSaveLotteryAddress', addressInfo => { this.connection.on('onSaveLotteryAddress', addressInfo => {
...@@ -188,6 +186,7 @@ export default { ...@@ -188,6 +186,7 @@ export default {
if (this.lotteryInfo.status === SESSION_STATUS.end) { if (this.lotteryInfo.status === SESSION_STATUS.end) {
this.loadWinInfo() this.loadWinInfo()
} }
document.title = data.title
} else { } else {
this.$toast(errorMessage) this.$toast(errorMessage)
} }
...@@ -257,14 +256,14 @@ export default { ...@@ -257,14 +256,14 @@ export default {
Bus.$on('LotteryInfoUpdate', data => { Bus.$on('LotteryInfoUpdate', data => {
const { id } = data const { id } = data
const { id: currentId } = this.$route.query const { id: currentId } = this.$route.query
if (id === currentId) { if (Number(id) === Number(currentId)) {
this.loadData() this.loadData()
} }
}) })
Bus.$on('LotteryStateUpdate', data => { Bus.$on('LotteryStateUpdate', data => {
const { id } = data const { id } = data
const { id: currentId } = this.$route.query const { id: currentId } = this.$route.query
if (id === currentId) { if (Number(id) === Number(currentId)) {
this.loadData() this.loadData()
} }
}) })
...@@ -273,7 +272,7 @@ export default { ...@@ -273,7 +272,7 @@ export default {
const prizeItem = data?.prizeConfigs?.[0] const prizeItem = data?.prizeConfigs?.[0]
return { return {
...data, ...data,
status: +data?.status || '', status: Number(data?.status) || '',
showResult: !!data?.showResult || false, showResult: !!data?.showResult || false,
prizeName: prizeItem?.name || '', prizeName: prizeItem?.name || '',
prizeIcon: prizeItem?.icon || '', prizeIcon: prizeItem?.icon || '',
...@@ -286,7 +285,7 @@ export default { ...@@ -286,7 +285,7 @@ export default {
...data, ...data,
isWin: !!data?.prizeId, isWin: !!data?.prizeId,
address: data?.address || '', address: data?.address || '',
exchangeType: +data?.exchangeType || LOTTERY_EXCHANGE_TYPE.offline exchangeType: Number(data?.exchangeType) || LOTTERY_EXCHANGE_TYPE.offline
} }
} }
} }
......
<template> <template>
<section class="lottery-box"> <section class="lottery-box">
<component :is="lotteryComponents[+lotteryInfo.type]" v-if="'type' in lotteryInfo && lotteryInfo.type"></component> <component :is="lotteryComponents[Number(lotteryInfo.type)]" v-if="'type' in lotteryInfo && lotteryInfo.type"></component>
<ComplaintsDeal></ComplaintsDeal> <ComplaintsDeal></ComplaintsDeal>
<Loading v-model="isLoading" class="lottery-box__loading"></Loading> <Loading v-model="isLoading" class="lottery-box__loading"></Loading>
</section> </section>
...@@ -38,14 +38,31 @@ export default { ...@@ -38,14 +38,31 @@ export default {
...mapGetters({ ...mapGetters({
isLogin: 'users/isLogin', isLogin: 'users/isLogin',
uin: 'users/uin', uin: 'users/uin',
lotteryInfo: 'lottery/lotteryInfo' lotteryInfo: 'lottery/lotteryInfo',
premise: 'lottery/premise'
}) })
}, },
watch: { watch: {
trueId(nVal, oVal) { premise(nVal, oVal) {
if (nVal) { if (this.lotteryInfo.forceWrite && nVal === 0 && this.lotteryInfo.newPremise.length) {
this.postInfo(nVal) if (window.self === window.top) {
Bus.$emit('showForce')
} else {
Bus.$emit('showConfig')
}
} }
},
'lotteryInfo.forceWrite': {
handler(val) {
if (val && this.premise === 0) {
if (window.self === window.top) {
Bus.$emit('showForce')
} else {
Bus.$emit('showConfig')
}
}
},
deep: true
} }
}, },
created() { created() {
...@@ -66,19 +83,17 @@ export default { ...@@ -66,19 +83,17 @@ export default {
checkPremise: 'lottery/check_premise' checkPremise: 'lottery/check_premise'
}), }),
connectionInit() { connectionInit() {
if (process.client) { const { ClientConnection } = require('@easy-messenger/client-connection/dist/clientConnection.cjs.js')
const { ClientConnection } = require('@easy-messenger/client-connection/dist/clientConnection.cjs.js') this.connection = new ClientConnection()
this.connection = new ClientConnection() let counter = 0
let counter = 0 this.timer = setInterval(() => {
this.timer = setInterval(() => { this.connection.init()
this.connection.init() counter++
counter++ if (this.connection.connected || counter > 60) {
if (this.connection.connected || counter > 60) { clearInterval(this.timer)
clearInterval(this.timer) this.connectionListener()
this.connectionListener() }
} }, 1000)
}, 1000)
}
}, },
connectionListener() { }, connectionListener() { },
// 页面进入初始化 // 页面进入初始化
...@@ -109,6 +124,7 @@ export default { ...@@ -109,6 +124,7 @@ export default {
}) })
// 初始化事件中心 // 初始化事件中心
this.eventHubInit() this.eventHubInit()
// 抽奖前置条件
this.checkPremise({ id, uin }) this.checkPremise({ id, uin })
}, },
// 事件中心 // 事件中心
...@@ -117,7 +133,7 @@ export default { ...@@ -117,7 +133,7 @@ export default {
Bus.$on('LotteryInfoUpdate', data => { Bus.$on('LotteryInfoUpdate', data => {
const { id } = data const { id } = data
const { uin, id: currentId, sessionId: currentPlayId } = this const { uin, id: currentId, sessionId: currentPlayId } = this
if (id === currentId) { if (Number(id) === Number(currentId)) {
this.getLotteryDetail({ id, playId: currentPlayId, uin }) this.getLotteryDetail({ id, playId: currentPlayId, uin })
} }
}) })
...@@ -125,7 +141,7 @@ export default { ...@@ -125,7 +141,7 @@ export default {
Bus.$on('LotteryStateUpdate', data => { Bus.$on('LotteryStateUpdate', data => {
const { id, playId } = data const { id, playId } = data
const { sessionId: currentPlayId, id: currentId } = this const { sessionId: currentPlayId, id: currentId } = this
if (id === currentId && playId === currentPlayId) { if (Number(id) === Number(currentId) && Number(playId) === Number(currentPlayId)) {
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
const { status, startTime, endTime, userTimes } = data const { status, startTime, endTime, userTimes } = data
// 状态 // 状态
......
...@@ -35,7 +35,34 @@ export default { ...@@ -35,7 +35,34 @@ export default {
} }
}, },
computed: { computed: {
...mapGetters({ sessionList: 'lottery/sessionList' }) ...mapGetters({
sessionList: 'lottery/sessionList',
lotteryInfo: 'lottery/lotteryInfo',
premise: 'lottery/premise'
})
},
watch: {
premise(nVal, oVal) {
if (this.lotteryInfo.forceWrite && nVal === 0 && this.lotteryInfo.newPremise.length) {
if (window.self === window.top) {
Bus.$emit('showForce')
} else {
Bus.$emit('showConfig')
}
}
},
'lotteryInfo.forceWrite': {
handler(val) {
if (val && this.premise === 0) {
if (window.self === window.top) {
Bus.$emit('showForce')
} else {
Bus.$emit('showConfig')
}
}
},
deep: true
}
}, },
mounted() { mounted() {
// 初始化事件中心 // 初始化事件中心
...@@ -62,7 +89,7 @@ export default { ...@@ -62,7 +89,7 @@ export default {
} }
}) })
.catch(() => { .catch(() => {
this.$root.context.error({ statusCode: 504, message: '网络请求超时,请刷新重试' }) this.$router.replace({path: '/error'})
}) })
}, },
getStatus(item) { getStatus(item) {
...@@ -92,7 +119,7 @@ export default { ...@@ -92,7 +119,7 @@ export default {
Bus.$on('LotteryInfoUpdate', data => { Bus.$on('LotteryInfoUpdate', data => {
const { id } = data const { id } = data
const { uin, id: currentId } = this.$route.query const { uin, id: currentId } = this.$route.query
if (id === currentId) { if (Number(id) === Number(currentId)) {
this.getSessionList({ id, uin }) this.getSessionList({ id, uin })
} }
}) })
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</li> </li>
</ul> </ul>
</div> </div>
<div v-if="+detailInfo.exchangeType === +LOTTERY_EXCHANGE_TYPE.offline && detailInfo.prizeId !== 0" class="record-detail__code-info"> <div v-if="Number(detailInfo.exchangeType) === Number(LOTTERY_EXCHANGE_TYPE.offline) && detailInfo.prizeId !== 0" class="record-detail__code-info">
<QRCode :url="detailInfo.code" :width="70" :height="70"></QRCode> <QRCode :url="detailInfo.code" :width="70" :height="70"></QRCode>
<p class="record-detail__code-text"> <p class="record-detail__code-text">
<label>兑换码:</label> <label>兑换码:</label>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</p> </p>
<p class="record-detail__notice">*兑换信息请勿泄露给他人,以防冒充代领</p> <p class="record-detail__notice">*兑换信息请勿泄露给他人,以防冒充代领</p>
</div> </div>
<div v-if="+detailInfo.exchangeType === +LOTTERY_EXCHANGE_TYPE.mailing && detailInfo.prizeId !== 0" class="record-detail__addressee-info"> <div v-if="Number(detailInfo.exchangeType) === Number(LOTTERY_EXCHANGE_TYPE.mailing) && detailInfo.prizeId !== 0" class="record-detail__addressee-info">
<span v-if="!detailInfo.name" class="record-detail__edit-btn" @click="isShowAddressPopup = true" <span v-if="!detailInfo.name" class="record-detail__edit-btn" @click="isShowAddressPopup = true"
>填写收货地址</span >填写收货地址</span
> >
...@@ -114,7 +114,7 @@ export default { ...@@ -114,7 +114,7 @@ export default {
}, },
data() { data() {
return { return {
uin: +this.$route?.query?.uin || '', uin: Number(this.$route?.query?.uin) || '',
id: this.$route?.query?.detailId || '', id: this.$route?.query?.detailId || '',
tempId: this.$route?.query?.tempId || '', tempId: this.$route?.query?.tempId || '',
getAddressList, getAddressList,
...@@ -129,7 +129,7 @@ export default { ...@@ -129,7 +129,7 @@ export default {
}, },
computed: { computed: {
isInIframe() { isInIframe() {
return process.client ? window.self !== window.top : false return window.self !== window.top
} }
}, },
watch: { watch: {
...@@ -198,7 +198,7 @@ export default { ...@@ -198,7 +198,7 @@ export default {
drawTime: data?.drawTime || '', drawTime: data?.drawTime || '',
prizeName: data?.prizeName || '', prizeName: data?.prizeName || '',
prizeIcon: data?.prizeIcon || '', prizeIcon: data?.prizeIcon || '',
exchangeType: +data?.exchangeType || 1, exchangeType: Number(data?.exchangeType) || 1,
address: data?.address || '', address: data?.address || '',
contactPhone: data?.contactPhone || '', contactPhone: data?.contactPhone || '',
code: data?.code || '' code: data?.code || ''
......
/* eslint-disable no-invalid-this */
import Cookie from 'js-cookie' import Cookie from 'js-cookie'
import action from '../pvStatisticalService' import action from '../pvStatisticalService'
...@@ -6,4 +7,4 @@ export default async function({token, onFinished} = {token: ''}) { ...@@ -6,4 +7,4 @@ export default async function({token, onFinished} = {token: ''}) {
await action() await action()
onFinished && onFinished() onFinished && onFinished()
return this return this
} }
\ No newline at end of file
import Vue from 'vue'
import VueClipboard from 'vue-clipboard2'
Vue.use(VueClipboard)
import Vue from 'vue'
import vueScroll from 'vuescroll'
Vue.use(vueScroll)
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const routes = [
{
path: '/',
name: '',
component: () => import('@/layouts/default'),
children: [
{
path: '/index',
name: 'index',
component: () => import('../pages/index/index'),
},
{
path: '/list',
name: 'list',
component: () => import('../pages/list/index'),
},
{
path: '/message',
name: 'message',
component: () => import('../pages/message/index'),
},
{
path: '/recordDetail',
name: 'recordDetai/',
component: () => import('../pages/recordDetail/index'),
},
{
path: '/records',
name: 'records',
component: () => import('../pages/records/index'),
},
{
path: '/winners',
name: 'winners',
component: () => import('../pages/winners/index'),
},
{
path: '/config',
name: 'config',
component: () => import('../pages/config/index'),
},
]
},
{
path: '/mini',
name: 'mini',
component: () => import('@/layouts/miniNavBar'),
children: [
{
path: '/mini/index',
name: 'mini-index',
component: () => import('../pages/mini/index/index'),
},
{
path: '/mini/list',
name: 'mini-list',
component: () => import('../pages/mini/list/index'),
},
]
},
{
path: '/error',
name: '404',
component: () => import('@/layouts/error'),
}
]
const router = new VueRouter({
mode: 'history',
base: process.env.BASE_URL,
routes
})
export default router
import vue from 'vue'
import vuex from 'vuex'
import createLogger from 'vuex/dist/logger' // 修改日志
vue.use(vuex)
// https://webpack.js.org/guides/dependency-management/#requirecontext
const modulesFiles = require.context('./modules', true, /\.js$/)
// you do not need `import app from './modules/app'`
// it will auto require all vuex module from modules file
const modules = modulesFiles.keys().reduce((files, modulePath) => {
// set './app.js' => 'app'
const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
const value = modulesFiles(modulePath)
files[moduleName] = value.default
return files
}, {})
export default new vuex.Store({
modules,
plugins: process.env.NODE_ENV !== 'production' ? [createLogger()] : [] // 开发环境下显示vuex的状态修改
})
export const state = () => ({ export const state = {
isPageLoading: true // 加载动画 isPageLoading: true // 加载动画
}) }
export const mutations = { export const mutations = {
SET_ISPAGELOADING: (state, isLoading) => { SET_ISPAGELOADING: (state, isLoading) => {
state.isPageLoading = isLoading state.isPageLoading = isLoading
...@@ -14,3 +14,10 @@ export const actions = { ...@@ -14,3 +14,10 @@ export const actions = {
export const getters = { export const getters = {
isPageLoading: state => state.isPageLoading // 是否加载 isPageLoading: state => state.isPageLoading // 是否加载
} }
export default {
namespaced: true,
state,
mutations,
actions,
getters
}
...@@ -3,7 +3,7 @@ import { getLotteryInfos, getLotterySessionList, checkPremise } from '@/api/modu ...@@ -3,7 +3,7 @@ import { getLotteryInfos, getLotterySessionList, checkPremise } from '@/api/modu
import { Toast } from 'vant' import { Toast } from 'vant'
// import { cloneDeep } from 'lodash' // import { cloneDeep } from 'lodash'
export const state = () => ({ const state = {
sessionList: [], // 抽奖场次列表 sessionList: [], // 抽奖场次列表
lotteryInfo: { lotteryInfo: {
activeNum: 0, // 参与人数 activeNum: 0, // 参与人数
...@@ -16,13 +16,15 @@ export const state = () => ({ ...@@ -16,13 +16,15 @@ export const state = () => ({
type: null, // 抽奖类型 1 即时抽奖 2 定时抽奖 type: null, // 抽奖类型 1 即时抽奖 2 定时抽奖
record: [], // 抽奖记录列表 record: [], // 抽奖记录列表
prizeConfigs: [], // 奖品 prizeConfigs: [], // 奖品
showType: null // 定时抽奖条件 1 倒计时 2 参与人数 showType: null, // 定时抽奖条件 1 倒计时 2 参与人数
newPremise: [], // 新的抽奖前置条件
premise: [] // 旧的抽奖前置条件
}, // 抽奖信息 }, // 抽奖信息
isShowBind: false, // 是否显示绑定手机 isShowBind: false, // 是否显示绑定手机
premise: 0 premise: null // 抽奖前置条件检测
}) }
export const mutations = { const mutations = {
SET_SESSIONLIST: (state, list) => { SET_SESSIONLIST: (state, list) => {
state.sessionList = list state.sessionList = list
}, },
...@@ -37,7 +39,7 @@ export const mutations = { ...@@ -37,7 +39,7 @@ export const mutations = {
} }
} }
export const actions = { const actions = {
// 获取抽奖场次信息 // 获取抽奖场次信息
async getSessionList({ commit, rootState }, params = {}) { async getSessionList({ commit, rootState }, params = {}) {
const res = await getLotterySessionList(params) const res = await getLotterySessionList(params)
...@@ -50,10 +52,13 @@ export const actions = { ...@@ -50,10 +52,13 @@ export const actions = {
document.title = title || '抽奖' document.title = title || '抽奖'
// 停止加载效果 // 停止加载效果
commit('common/SET_ISPAGELOADING', false, { root: true }) commit('common/SET_ISPAGELOADING', false, { root: true })
// 主要是为了设置premise信息
commit('SET_LOTTERYINFO', {...state.lotteryInfo, newPremise: data.premise, forceWrite: data.forceWrite })
console.log(state.lotteryInfo, data.premise);
} else { } else {
Toast.fail(errorMessage) Toast.fail(errorMessage)
if (errorCode === 9) { if (errorCode === 9) {
this.app.context.error({ statusCode: 404, message: 'This page could not be found' }) this.$router.push('/error')
} }
} }
return Promise.resolve(res) return Promise.resolve(res)
...@@ -64,12 +69,13 @@ export const actions = { ...@@ -64,12 +69,13 @@ export const actions = {
const { code, errorCode, data, errorMessage } = res const { code, errorCode, data, errorMessage } = res
if (code === 200 && errorCode === 0) { if (code === 200 && errorCode === 0) {
commit('SET_LOTTERYINFO', data) commit('SET_LOTTERYINFO', data)
document.title = data.title
// 停止加载效果 // 停止加载效果
commit('common/SET_ISPAGELOADING', false, { root: true }) commit('common/SET_ISPAGELOADING', false, { root: true })
} else { } else {
Toast.fail(errorMessage) Toast.fail(errorMessage)
if (errorCode === 9) { if (errorCode === 9) {
this.app.context.error({ statusCode: 404, message: 'This page could not be found' }) this.$router.push('/error')
} }
} }
}) })
...@@ -86,15 +92,22 @@ export const actions = { ...@@ -86,15 +92,22 @@ export const actions = {
} else { } else {
Toast.fail(errorMessage) Toast.fail(errorMessage)
if (errorCode === 9) { if (errorCode === 9) {
this.app.context.error({ statusCode: 404, message: 'This page could not be found' }) this.$router.push('/error')
} }
} }
}) })
}, },
} }
export const getters = { const getters = {
sessionList: state => state.sessionList, // 场次列表 sessionList: state => state.sessionList, // 场次列表
lotteryInfo: state => state.lotteryInfo, // lotteryInfo lotteryInfo: state => state.lotteryInfo, // lotteryInfo
isShowBind: state => state.isShowBind, // 是否显示绑定手机 isShowBind: state => state.isShowBind, // 是否显示绑定手机
premise: state => state.premise // 抽奖前置条件检测 premise: state => state.premise // 抽奖前置条件检测
} }
export default {
namespaced: true,
state,
mutations,
actions,
getters
}
...@@ -4,13 +4,13 @@ import QuickStorage from '@/utils/QuickStorage' ...@@ -4,13 +4,13 @@ import QuickStorage from '@/utils/QuickStorage'
import { CUSTOM_SOURCE_TYPE } from '@/utils/constant' import { CUSTOM_SOURCE_TYPE } from '@/utils/constant'
import Bus from '@/utils/Bus' import Bus from '@/utils/Bus'
export const state = () => ({ const state = {
uin: 0, uin: 0,
isLogin: false, isLogin: false,
isBindPhone: null, isBindPhone: null,
userInfo: {} userInfo: {}
}) }
export const mutations = { const mutations = {
SET_USERINFO: (state, info) => { SET_USERINFO: (state, info) => {
state.userInfo = info state.userInfo = info
}, },
...@@ -24,7 +24,7 @@ export const mutations = { ...@@ -24,7 +24,7 @@ export const mutations = {
state.isBindPhone = isBind state.isBindPhone = isBind
} }
} }
export const actions = { const actions = {
async getUerInfo({ commit }, params = {}) { async getUerInfo({ commit }, params = {}) {
const res = await getUserInfo(params) const res = await getUserInfo(params)
const { code, errorCode, errorMessage, data } = res const { code, errorCode, errorMessage, data } = res
...@@ -44,7 +44,7 @@ export const actions = { ...@@ -44,7 +44,7 @@ export const actions = {
} }
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (isReqSuccess) { if (isReqSuccess) {
return resolve(data) resolve(data)
} }
reject(new Error(JSON.stringify({ errorCode, errorMessage }))) reject(new Error(JSON.stringify({ errorCode, errorMessage })))
}) })
...@@ -87,9 +87,16 @@ export const actions = { ...@@ -87,9 +87,16 @@ export const actions = {
window.location.href = `${origin}/my/login/binding?uin=${state.uin}&backUrl=${backUrl}` window.location.href = `${origin}/my/login/binding?uin=${state.uin}&backUrl=${backUrl}`
} }
} }
export const getters = { const getters = {
isLogin: state => state.isLogin, // 是否登录 isLogin: state => state.isLogin, // 是否登录
isBindPhone: state => state.isBindPhone, // 是否绑定手机 isBindPhone: state => state.isBindPhone, // 是否绑定手机
userInfo: state => state.userInfo, // 用户信息 userInfo: state => state.userInfo, // 用户信息
uin: state => state.uin uin: state => state.uin
} }
export default {
namespaced: true,
state,
mutations,
actions,
getters
}
import Vue from 'vue'
export default new Vue()
import ROP from '@gdyfe/rop-client' import ROP from '@gdyfe/rop-client'
import { ENV_CONFIG } from "@/config"
const rp = new ROP({ const rp = new ROP({
ICS_ADDR: `mqttdms.${process.env.ROP_DOMAIN}`, ICS_ADDR: `mqttdms.${ENV_CONFIG.ROP_DOMAIN}`,
ROP_FLASH_SITE: `https://cdn.${process.env.ROP_DOMAIN}/dms/` ROP_FLASH_SITE: `https://cdn.${ENV_CONFIG.ROP_DOMAIN}/dms/`
}) })
export default rp export default rp
const userAgent = () => { const userAgent = () => {
if (!process.client) return {}
const u = navigator.userAgent.toLowerCase() const u = navigator.userAgent.toLowerCase()
const json = { const json = {
isAndroid: /Android|Linux|Adr/i.test(u), isAndroid: /Android|Linux|Adr/i.test(u),
......
class PostMessage {
sendMsg(data) {
window.parent.postMessage(data, "*");
}
// 直播间显示登录弹窗
showLogin() {
const data = {
cmd: 'showLogin'
}
this.sendMsg(data)
}
// 通知直播间信息填写完毕
premiseFilled() {
const data = {
cmd: 'premiseFilled'
}
this.sendMsg(data)
}
}
export default new PostMessage()
import wx from 'weixin-js-sdk' import wx from 'weixin-js-sdk'
import { getWxShareSecret } from '@/api/modules/common' import { getWxShareSecret } from '@/api/modules/common'
import { ENV_CONFIG } from '@/config'
class WxShare { class WxShare {
constructor() { constructor() {
...@@ -58,7 +59,7 @@ class WxShare { ...@@ -58,7 +59,7 @@ class WxShare {
link: info?.link || window.location.href, link: info?.link || window.location.href,
title: info?.title || '分享', title: info?.title || '分享',
desc: info?.desc || window.location.href, // 副标题 desc: info?.desc || window.location.href, // 副标题
imgUrl: info?.imgUrl || `${window.location.protocol}//${process.env.OSS_DOMAIN}/common/img/shop_share.png`, imgUrl: info?.imgUrl || `${window.location.protocol}//${ENV_CONFIG.OSS_DOMAIN}/common/img/shop_share.png`,
success: info?.success || function () {}, success: info?.success || function () {},
fail: info?.fail || function () {}, fail: info?.fail || function () {},
} }
......
#!/bin/sh
/etc/init.d/zabbix_agentd start
yarn run pm2:prod
while true
do
sleep 5;
done
import Vue from 'vue'
export default new Vue()
const { defineConfig } = require('@vue/cli-service');
const path = require('path');
const fs = require('fs');
/* config 配置读取 */
const { downloadConfigFile } = require('@gdyfe/config');
const assetsDirMap = {
test: 'test',
preview: 'pre',
production: 'prod',
};
const assetsDir = assetsDirMap[process.env.mode] || 'prod';
const BASE_URL = '/lottery/';
const assetsDirPath = path.join(__dirname, './public', assetsDir);
if (!fs.existsSync(assetsDirPath)) {
fs.mkdirSync(assetsDirPath);
}
// 下载配置文件到指定目录
downloadConfigFile({
server: process.env.mode,
ic: 'ZmUtZ5WNp%XBzDw=',
path: path.resolve(__dirname, `${assetsDirPath}/config.js`),
})
.then(() => {
console.log('$$ config file downloaded $$');
})
.catch((err) => {
console.log('$$ config file download failed $$', err);
});
module.exports = defineConfig({
publicPath: BASE_URL,
assetsDir,
transpileDependencies: true,
chainWebpack: (config) => {
// 别名
config.resolve.alias
.set('@', path.join(__dirname, 'src'))
.set('assets', path.resolve('src/assets'))
.set('public', path.resolve(__dirname, 'public'));
// DefinePlugin
config.plugin('define').tap((args) => {
args[0]['process.env'] = {
...args[0]['process.env'],
mode: JSON.stringify(process.env.mode),
BASE_URL: JSON.stringify(BASE_URL),
VUE_APP_ASSETS_DIR: JSON.stringify(assetsDir),
};
return args;
});
// terser
if (process.env.NODE_ENV === 'production') {
config.optimization.minimizer('terser').tap((args) => {
args[0].terserOptions.compress.drop_console = true;
args[0].terserOptions.compress.drop_debugger = true;
return args;
});
}
},
});
FROM alpine AS builder
WORKDIR /home/app
RUN apk add --no-cache --update nodejs yarn
COPY package.json yarn.lock ./
RUN yarn install --registry=https://registry.yarnpkg.com
FROM registry.cn-hangzhou.aliyuncs.com/open_images/node12.13.1-pm2
ADD ./ /var/www/web_lottery
ENV HOST 0.0.0.0
ENV TZ Asia/Shanghai
WORKDIR /var/www/web_lottery
COPY --from=builder /home/app/package.json ./package.json
COPY --from=builder /home/app/node_modules ./node_modules
RUN yarn build:vvku
RUN rm -rf assets components layouts middleware pages plugins store .eslintrc.js .gitignore build.yml Dockerfile README.md start.sh
EXPOSE 4002
RUN chmod +x vvkuStart.sh
ENTRYPOINT ["./vvkuStart.sh"]
#!/bin/sh
yarn run pm2:vvku
while true
do
sleep 5;
done
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment