Commit 14e1a5f4 by Lays-lzq

feat: csr改造

parent 4a5745d7
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
/* 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,9 +7,9 @@ ...@@ -7,9 +7,9 @@
"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 nuxt",
"serve:vvku": "cross-env mode=vvku nuxt", "serve:vvku": "cross-env mode=vvku nuxt",
"serve:cbn": "cross-env mode=cbn nuxt", "serve:cbn": "cross-env mode=cbn nuxt",
...@@ -53,8 +53,9 @@ ...@@ -53,8 +53,9 @@
"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.0.1",
"@gdyfe/gdy-component-lib": "^0.4.1", "@gdyfe/gdy-component-lib": "^0.4.1",
"@gdyfe/rop-client": "1.1.10", "@gdyfe/rop-client": "1.1.10",
"@nuxtjs/axios": "^5.13.6", "@nuxtjs/axios": "^5.13.6",
...@@ -73,7 +74,10 @@ ...@@ -73,7 +74,10 @@
"vconsole": "^3.9.1", "vconsole": "^3.9.1",
"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": {
...@@ -83,6 +87,11 @@ ...@@ -83,6 +87,11 @@
"@nuxtjs/eslint-module": "^3.0.2", "@nuxtjs/eslint-module": "^3.0.2",
"@nuxtjs/style-resources": "^1.2.0", "@nuxtjs/style-resources": "^1.2.0",
"@vant/touch-emulator": "^1.3.2", "@vant/touch-emulator": "^1.3.2",
"@vue/cli-plugin-babel": "^4.0.0",
"@vue/cli-plugin-eslint": "^4.0.0",
"@vue/cli-service": "^4.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",
......
/*!
* Global Config for Guangdianyun v1.5.0
* https://guangdianyun.tv/
*
* Copyright belongs to Guangdianyun Corporation and other contributors
* Released under the Proprietary License
*
* Date: 2023-10-10 11:45:24
*/
(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",
"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
});
})();
<!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 http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" /> -->
<link href="<%= BASE_URL %>config.js" rel="preload" as="script" />
<script src="<%= BASE_URL %>config.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__.OSS_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>
<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,14 @@ const axiosService = axios.create(); ...@@ -11,14 +12,14 @@ 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 = `https://${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;
// 请求拦截器 // 请求拦截器
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 +35,11 @@ axiosService.interceptors.request.use( ...@@ -34,11 +35,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
...@@ -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()
} }
}) })
......
...@@ -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>
......
...@@ -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',
......
...@@ -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%;
} }
} }
......
...@@ -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%;
} }
} }
......
...@@ -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%;
} }
} }
......
...@@ -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%;
} }
} }
......
...@@ -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%;
} }
} }
......
...@@ -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%;
} }
} }
......
...@@ -182,7 +182,7 @@ export default { ...@@ -182,7 +182,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)
......
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',
}
<template> <template>
<div class="container"> <div class="container">
<ConfigPopup v-model="isShowConfig"></ConfigPopup> <ConfigPopup v-model="isShowConfig"></ConfigPopup>
<Nuxt v-if="!$slots.default" /> <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'
export default { export default {
components: { components: {
...@@ -52,8 +54,8 @@ export default { ...@@ -52,8 +54,8 @@ 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`, serviceAgreement: `//${ENV_CONFIG.OSS_DOMAIN}/staticPages/agreement_user.html`,
privacyAgreement: `//${process.env.OSS_DOMAIN}/staticPages/agreement_privacy.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("密码修改成功!");
......
...@@ -31,15 +31,13 @@ export default { ...@@ -31,15 +31,13 @@ export default {
}, },
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 '@/plugins/routeHooks'
import '@/filters'
import '@/plugins/vueClipboard'
import '@/plugins/dmsService'
import '@/plugins/pvStatisticalService'
import '@/plugins/deviceId'
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
......
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
.then(() => { .then(() => {
this.isLoading = false this.isLoading = false
// 微信分享 // 微信分享
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(
......
...@@ -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(
......
...@@ -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 => {
...@@ -152,8 +150,8 @@ export default { ...@@ -152,8 +150,8 @@ export default {
contactPhone: addressInfo?.mobile || '', contactPhone: addressInfo?.mobile || '',
name: addressInfo?.name || '' name: addressInfo?.name || ''
} }
this.winInfo = { ...this.winInfo, this.winInfo = { ...this.winInfo,
address: `${addressInfo?.province || ''}-${addressInfo?.city || ''}-${addressInfo?.area || ''}-${addressInfo?.detail}`, address: `${addressInfo?.province || ''}-${addressInfo?.city || ''}-${addressInfo?.area || ''}-${addressInfo?.detail}`,
contactPhone: addressInfo?.mobile || '', contactPhone: addressInfo?.mobile || '',
name: addressInfo?.name || '' name: addressInfo?.name || ''
} }
......
...@@ -57,19 +57,17 @@ export default { ...@@ -57,19 +57,17 @@ export default {
postInfo: 'users/postInfo' postInfo: 'users/postInfo'
}), }),
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() { },
// 页面进入初始化 // 页面进入初始化
......
...@@ -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: {
......
...@@ -6,4 +6,4 @@ export default async function({token, onFinished} = {token: ''}) { ...@@ -6,4 +6,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 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: '/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, // 参与人数
...@@ -20,9 +20,9 @@ export const state = () => ({ ...@@ -20,9 +20,9 @@ export const state = () => ({
}, // 抽奖信息 }, // 抽奖信息
isShowBind: false, // 是否显示绑定手机 isShowBind: false, // 是否显示绑定手机
premise: 0 premise: 0
}) }
export const mutations = { const mutations = {
SET_SESSIONLIST: (state, list) => { SET_SESSIONLIST: (state, list) => {
state.sessionList = list state.sessionList = list
}, },
...@@ -37,7 +37,7 @@ export const mutations = { ...@@ -37,7 +37,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)
...@@ -92,9 +92,16 @@ export const actions = { ...@@ -92,9 +92,16 @@ export const actions = {
}) })
}, },
} }
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
...@@ -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),
......
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 () {},
} }
......
import Vue from 'vue'
export default new Vue()
const path = require('path')
/* config 配置下载 */
const { downloadConfigFile } = require('@gdyfe/config')
const { log } = require('console')
// 下载到指定目录
downloadConfigFile({
server: process.env.mode,
ic: 'ZmUtZ5WNp%XBzDw=',
path: path.resolve(__dirname, './public/config.js')
})
.then(() => {
console.log('$$ config file downloaded $$')
})
.catch(err => {
console.log('$$ config file download failed $$', err)
})
const BASE_URL = '/lottery/'
module.exports = {
publicPath: BASE_URL, // vue-cli3 从baseUrl更名为publicPath
productionSourceMap: false,
chainWebpack: config => {
// 别名
config.resolve.alias.set('assets', path.resolve('src/assets')).set('public', path.resolve(__dirname, 'public')).set('@', path.resolve(__dirname, 'src'))
// 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)
}
return args
})
// terser
if (process.env.NODE_ENV === 'production') {
config.optimization.minimizer('terser').tap(args => {
args[0].terserOptions.parallel = 4
args[0].terserOptions.cache = true
args[0].terserOptions.compress.drop_console = true
args[0].terserOptions.compress.drop_debugger = true
return args
})
}
},
configureWebpack: {
plugins: [],
// 警告 webpack 的性能提示
performance: {
hints: false
}
},
runtimeCompiler: true,
devServer: {
disableHostCheck: true
},
css: {
sourceMap: false,
loaderOptions: {
less: {
// 配置less(其他样式解析用法一致)
lessOptions:{
javascriptEnabled: true,
}
},
postcss: {
plugins: [
require('postcss-pxtorem')({
rootValue: 75,
selectorBlackList: [/^html$/, /^body$/], // 忽略转换正则匹配项
propList: ['*'],
})
]
},
}
},
lintOnSave: false
}
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