Commit c90ef415 authored by sixiaofeng's avatar sixiaofeng

添加资产云环境变量

parent 3388bd18
NODE_ENV=production
VUE_APP_QRCODE_URL=http://81.68.145.183:8887
VUE_APP_ENV=orginone
VUE_APP_SHOWCONSOLE=hide
VUE_APP_DOWNLOADPAGE=https://3syxin.com/
\ No newline at end of file
NODE_ENV=production
VUE_APP_ENV=orginone
VUE_APP_QRCODE_URL=http://121.40.18.70:7788/oa
\ No newline at end of file
...@@ -6,6 +6,7 @@ node_modules ...@@ -6,6 +6,7 @@ node_modules
/oa /oa
/oa.zip /oa.zip
/zip /zip
/orginone
# local env files # local env files
.env.local .env.local
......
...@@ -6,9 +6,12 @@ ...@@ -6,9 +6,12 @@
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"serve:people": "vue-cli-service serve --mode testpeople", "serve:people": "vue-cli-service serve --mode testpeople",
"serve:police": "vue-cli-service serve --mode testpolice", "serve:police": "vue-cli-service serve --mode testpolice",
"serve:orginone": "vue-cli-service serve --mode testorginone",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"build:police": "vue-cli-service build --mode police", "build:police": "vue-cli-service build --mode police",
"build:people": "vue-cli-service build --mode people", "build:people": "vue-cli-service build --mode people",
"build:orginone": "vue-cli-service build --mode orginone",
"build:testorginone": "vue-cli-service build --mode testorginone",
"deploy": "npm run build && bash deploy.sh", "deploy": "npm run build && bash deploy.sh",
"deploy:people": "vue-cli-service build --mode testpeople && bash deploy.sh", "deploy:people": "vue-cli-service build --mode testpeople && bash deploy.sh",
"lint": "vue-cli-service lint --fix" "lint": "vue-cli-service lint --fix"
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<script src="//at.alicdn.com/t/font_2807159_s39q40uhhls.js"></script>
<title><%= htmlWebpackPlugin.options.title %></title> <title><%= htmlWebpackPlugin.options.title %></title>
</head> </head>
<body> <body>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<div class="title flex-shrink-0 mr-4">{{ title }}</div> <div class="title flex-shrink-0 mr-4">{{ title }}</div>
</div> </div>
<van-switch <van-switch
:active-color="primaryColor" :active-color="primaryInfo.color"
:value="checked" :value="checked"
size="20px" size="20px"
@change="change" @change="change"
......
This diff is collapsed.
...@@ -12,6 +12,7 @@ import dsbridge from 'dsbridge' ...@@ -12,6 +12,7 @@ import dsbridge from 'dsbridge'
import { Dialog, Toast, Notify } from 'vant' import { Dialog, Toast, Notify } from 'vant'
import VConsole from 'vconsole' import VConsole from 'vconsole'
import mixins from './mixins'; import mixins from './mixins';
import './iconfont.js';
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.use(Dialog).use(Toast).use(Notify) Vue.use(Dialog).use(Toast).use(Notify)
......
...@@ -3,14 +3,58 @@ const mixins = { ...@@ -3,14 +3,58 @@ const mixins = {
return{}; return{};
}, },
computed:{ computed:{
primaryColor() { primaryInfo() {
const appEnv = process.env.VUE_APP_ENV const appEnv = process.env.VUE_APP_ENV
if (appEnv === 'people') { if (appEnv === 'people') {
return '#32b2f7' return {
color: '#32b2f7',
qrCodeBg: require('@/assets/qrbackground-people.png'),
logoSrc: require('@/assets/icons/txmz.png'),
avator: require('@/assets/icons/avator.png'),
teamAvator: require('@/assets/icons/team-icon.png')
}
} else if (appEnv === 'police') {
return {
color: '#4f62c1',
qrCodeBg: require('@/assets/qrbackground.png'),
logoSrc: require('@/assets/icons/txga.png'),
avator: require('@/assets/icons/avator.png'),
teamAvator: require('@/assets/icons/team-icon.png')
}
} else if (appEnv === 'orginone') {
return {
color: '#0131E5',
qrCodeBg: require('@/assets/qrbackground-orginone.png'),
logoSrc: require('@/assets/icons/orginone.png'),
avator: require('@/assets/icons/avator-orginone.png'),
teamAvator: require('@/assets/icons/team-icon-orginone.png')
}
} else { } else {
return '#4f62c1' return {
color: '#32b2f7',
qrCodeBg: require('@/assets/qrbackground-people.png'),
logoSrc: require('@/assets/icons/txmz.png'),
avator: require('@/assets/icons/avator.png'),
teamAvator: require('@/assets/icons/team-icon.png')
} }
} }
},
// qrCodeBg() {
// const env = process.env.VUE_APP_ENV
// if (env === 'people') {
// return require('@/assets/qrbackground-people.png')
// } else {
// return require('@/assets/qrbackground.png')
// }
// },
// logoSrc() {
// const env = process.env.VUE_APP_ENV
// if (env === 'people') {
// return require('@/assets/icons/txmz.png')
// } else {
// return require('@/assets/icons/txga.png')
// }
// }
} }
} }
......
...@@ -38,14 +38,14 @@ body { ...@@ -38,14 +38,14 @@ body {
&__header { &__header {
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
color: #8A97A5; // color: #8A97A5;
height: 60px; height: 60px;
padding: 0; padding: 0;
line-height: 60px; line-height: 60px;
} }
&__content, &__content,
&__message { &__message {
color: #24374E; // color: #24374E;
font-size: 16px; font-size: 16px;
text-align: center; text-align: center;
} }
...@@ -56,7 +56,7 @@ body { ...@@ -56,7 +56,7 @@ body {
padding: 0; padding: 0;
} }
.van-button { .van-button {
color: #32B2F7; // color: #32B2F7;
height: 48px; height: 48px;
} }
} }
\ No newline at end of file
...@@ -125,7 +125,7 @@ export default Vue.extend({ ...@@ -125,7 +125,7 @@ export default Vue.extend({
} }
this.$dialog.confirm({ this.$dialog.confirm({
title: '提示', title: '提示',
message: '确定要删除选中的成员吗?' message: '确定要删除选中的成员吗?',
// confirmButtonText: '解散' // confirmButtonText: '解散'
}).then(() => { }).then(() => {
this.selected.forEach(id => { this.selected.forEach(id => {
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<van-calendar <van-calendar
v-model="show" v-model="show"
:round="false" :round="false"
:color="primaryColor" :color="primaryInfo.color"
:show-confirm="true" :show-confirm="true"
:style="{ height: '100%' }" :style="{ height: '100%' }"
:min-date="new Date(1981,1,1)" :min-date="new Date(1981,1,1)"
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<van-calendar <van-calendar
v-model="showCalendar" v-model="showCalendar"
:round="false" :round="false"
:color="primaryColor" :color="primaryInfo.color"
:show-confirm="true" :show-confirm="true"
:style="{ height: '100%' }" :style="{ height: '100%' }"
:min-date="new Date(1971,1,1)" :min-date="new Date(1971,1,1)"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="flex items-center py-2 border border-transparent w-full" @click="handleClick(member)"> <div class="flex items-center py-2 border border-transparent w-full" @click="handleClick(member)">
<app-icon <app-icon
type="png" type="png"
:path="require('@/assets/icons/avator.png')" :path="primaryInfo.avator"
class-name="w-9 h-9" class-name="w-9 h-9"
/> />
<div class="ml-3">{{ member.name }}</div> <div class="ml-3">{{ member.name }}</div>
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
type="svg" type="svg"
name="icon-radio-checked" name="icon-radio-checked"
size="16px" size="16px"
:color="primaryColor" :color="primaryInfo.color"
/> />
</div> </div>
<div v-show="!showChecked(t)" class="h-4 w-4 border border-color-primary rounded-full"></div> <div v-show="!showChecked(t)" class="h-4 w-4 border border-color-primary rounded-full"></div>
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
type="svg" type="svg"
name="icon-tree" name="icon-tree"
size="20px" size="20px"
:color="primaryColor" :color="primaryInfo.color"
/> />
<span class="ml-2.5">下一级</span> <span class="ml-2.5">下一级</span>
</div> </div>
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
<div v-show="!dataUrl" id="qrCodeWrapper" class="qrcode mt-2 relative w-72 h-113.5 mx-auto"> <div v-show="!dataUrl" id="qrCodeWrapper" class="qrcode mt-2 relative w-72 h-113.5 mx-auto">
<p class=" text-white absolute top-24 text-base left-0 right-0 mx-auto text-center">{{ entInfo.name }}</p> <p class=" text-white absolute top-24 text-base left-0 right-0 mx-auto text-center">{{ entInfo.name }}</p>
<p class=" text-white absolute top-32 text-sm left-0 right-0 mx-auto text-center">团队号:{{ entInfo.id }}</p> <p class=" text-white absolute top-32 text-sm left-0 right-0 mx-auto text-center">团队号:{{ entInfo.id }}</p>
<img ref="wrapper" :src="qrCodeBg" alt="" class=""> <img ref="wrapper" :src="primaryInfo.qrCodeBg" alt="" class="">
<div class="absolute w-36 mt-2 top-40 left-0 right-0 mx-auto "> <div class="absolute w-36 mt-2 top-40 left-0 right-0 mx-auto ">
<vue-qr <vue-qr
:logo-src="logoSrc" :logo-src="primaryInfo.logoSrc"
:logo-margin="4" :logo-margin="4"
:logo-scale="0.15" :logo-scale="0.15"
:text="text" :text="text"
...@@ -57,24 +57,24 @@ export default Vue.extend({ ...@@ -57,24 +57,24 @@ export default Vue.extend({
dataUrl: '' dataUrl: ''
} }
}, },
computed: { // computed: {
qrCodeBg() { // qrCodeBg() {
const env = process.env.VUE_APP_ENV // const env = process.env.VUE_APP_ENV
if (env === 'people') { // if (env === 'people') {
return require('@/assets/qrbackground-people.png') // return require('@/assets/qrbackground-people.png')
} else { // } else {
return require('@/assets/qrbackground.png') // return require('@/assets/qrbackground.png')
} // }
}, // },
logoSrc() { // logoSrc() {
const env = process.env.VUE_APP_ENV // const env = process.env.VUE_APP_ENV
if (env === 'people') { // if (env === 'people') {
return require('@/assets/icons/txmz.png') // return require('@/assets/icons/txmz.png')
} else { // } else {
return require('@/assets/icons/txga.png') // return require('@/assets/icons/txga.png')
} // }
} // }
}, // },
methods: { methods: {
isIOSMobile, isIOSMobile,
async saveQrCode() { async saveQrCode() {
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
type="svg" type="svg"
name="icon-radio-checked" name="icon-radio-checked"
size="16px" size="16px"
:color="primaryColor" :color="primaryInfo.color"
/> />
</div> </div>
<div v-else class="h-4 w-4 rounded-full border border-primary"></div> <div v-else class="h-4 w-4 rounded-full border border-primary"></div>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
type="svg" type="svg"
name="icon-radio-checked" name="icon-radio-checked"
size="16px" size="16px"
:color="primaryColor" :color="primaryInfo.color"
/> />
</div> </div>
<div v-else class="h-4 w-4 rounded-full border border-primary"></div> <div v-else class="h-4 w-4 rounded-full border border-primary"></div>
......
...@@ -72,8 +72,13 @@ export default Vue.extend({ ...@@ -72,8 +72,13 @@ export default Vue.extend({
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
url = window.location.origin + '/team/join-team' url = window.location.origin + '/team/join-team'
} else { } else {
if (process.env.VUE_APP_ENV === 'orginone') {
url = window.location.origin + '/oa/team/join-team'
} else {
url = process.env.VUE_APP_QRCODE_URL + '/team/join-team' url = process.env.VUE_APP_QRCODE_URL + '/team/join-team'
} }
}
console.log(process.env.VUE_APP_QRCODE_URL, url, 'url') console.log(process.env.VUE_APP_QRCODE_URL, url, 'url')
this.qrCodeText = `${url}?entId=${encodeURIComponent(this.entId)}` this.qrCodeText = `${url}?entId=${encodeURIComponent(this.entId)}`
console.log(this.qrCodeText, 'qrCode team') console.log(this.qrCodeText, 'qrCode team')
......
...@@ -250,7 +250,7 @@ export default Vue.extend({ ...@@ -250,7 +250,7 @@ export default Vue.extend({
deleteDep() { deleteDep() {
this.$dialog.confirm({ this.$dialog.confirm({
title: '提示', title: '提示',
message: '确定删除该部门吗?若该部门有子部门、部门群,则子部门和对应群消息、群文件都会删除!' message: '确定删除该部门吗?若该部门有子部门、部门群,则子部门和对应群消息、群文件都会删除!',
// confirmButtonText: '解散' // confirmButtonText: '解散'
}).then(() => { }).then(() => {
const data = { const data = {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<!-- logo --> <!-- logo -->
<div class="absolute top-20 left-1/2 border transform -translate-x-1/2 z-10 w-15 h-15 bg-white rounded-full overflow-hidden flex items-center justify-center"> <div class="absolute top-20 left-1/2 border transform -translate-x-1/2 z-10 w-15 h-15 bg-white rounded-full overflow-hidden flex items-center justify-center">
<img v-if="entInfo.avatar" :src="entInfo.avatar" alt=""> <img v-if="entInfo.avatar" :src="entInfo.avatar" alt="">
<img v-else src="@/assets/icons/team-icon.png" alt="" class="max-w-full"> <img v-else :src="primaryInfo.teamAvator" alt="" class="max-w-full">
</div> </div>
<div class="top-28 px-4 w-full absolute top-10"> <div class="top-28 px-4 w-full absolute top-10">
<div class="bg-white w-full rounded pt-8 pb-4 flex flex-col items-center shadow-bg"> <div class="bg-white w-full rounded pt-8 pb-4 flex flex-col items-center shadow-bg">
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
type="svg" type="svg"
name="icon-tree" name="icon-tree"
size="20px" size="20px"
:color="primaryColor" :color="primaryInfo.color"
class-name="mr-2.5" class-name="mr-2.5"
/> />
下一级 下一级
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<div v-else class=""> <div v-else class="">
<app-icon <app-icon
type="png" type="png"
:path="require('@/assets/icons/team-icon.png')" :path="primaryInfo.teamAvator"
class-name="h-13 w-13" class-name="h-13 w-13"
/> />
</div> </div>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
/> --> /> -->
<div class="w-32 h-32"> <div class="w-32 h-32">
<vue-qr <vue-qr
:logoSrc="require('@/assets/icons/js.png')" :logoSrc="primayInfo.logoSrc"
:text="qrCodeText" :text="qrCodeText"
:margin="2" :margin="2"
:size="400" :size="400"
......
...@@ -6,11 +6,17 @@ const env = process.env.VUE_APP_ENV ...@@ -6,11 +6,17 @@ const env = process.env.VUE_APP_ENV
if (env === 'police') { if (env === 'police') {
primaryColor = '#4F62C1' primaryColor = '#4F62C1'
primaryColorLight = '#CFE1FB'
primaryColorLighter = '#EFF5FE'
} else if (env === 'people') { } else if (env === 'people') {
primaryColor = '#32b2f7' primaryColor = '#32b2f7'
primaryColorLight = '#D5DCFF'
primaryColorLighter = '#61C7FF'
// primaryColor = '#4F62C1' // primaryColor = '#4F62C1'
} else { } else {
primaryColor = '#4F62C1' primaryColor = '#0131E5'
primaryColorLight = '#D6DFFF'
primaryColorLighter = '#F0F3FF'
} }
module.exports = { module.exports = {
...@@ -22,8 +28,8 @@ module.exports = { ...@@ -22,8 +28,8 @@ module.exports = {
colors: { colors: {
'common-bg': '#F6F7F8', 'common-bg': '#F6F7F8',
'color-primary': primaryColor, 'color-primary': primaryColor,
'color-primary-light': '#D5DCFF', 'color-primary-light': primaryColorLight,
'color-primary-lighter': '#61C7FF', 'color-primary-lighter': primaryColorLighter,
'text-primary': '#24374E', 'text-primary': '#24374E',
'text-primary-dark': '#0D73AD', 'text-primary-dark': '#0D73AD',
'text-secondary': '#8A97A5', 'text-secondary': '#8A97A5',
......
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 to comment