Эх сурвалжийг харах

根据是否测试环境更换登录页图片

gcz 11 сар өмнө
parent
commit
a8e7109fcb
2 өөрчлөгдсөн 13 нэмэгдсэн , 4 устгасан
  1. 1 0
      main.js
  2. 12 4
      pages/login/login.vue

+ 1 - 0
main.js

@@ -44,6 +44,7 @@ Vue.use(uView)
 
 import { commonConfig } from './common/config';
 Vue.prototype.$commonConfig = commonConfig;
+Vue.prototype.$isDevelop = commonConfig.baseUrl.includes('gztjy');
 
 import './utils/filter' 
 

+ 12 - 4
pages/login/login.vue

@@ -1,8 +1,8 @@
 <template>
 	<view class="login-content">
 		<view class="login-content-info">
-			<view class="login-bgm":style="{backgroundImage:`url(${staticUrl}/img/tuan-index-bg.png)`}">
-				<image class="login-logo" :src="staticUrl+'/img/logo.png'" mode="scaleToFill"></image>
+			<view class="login-bgm":style="{backgroundImage:`url(${tuanIndexBg})`}">
+				<image class="login-logo" :src="logoSrc" mode="scaleToFill"></image>
 				<text>{{ title }}</text>
 			</view>
 			<view class="login-info">
@@ -59,8 +59,9 @@
 			return {
 				code:'',
 				staticUrl:this.$commonConfig.staticUrl,
-				title: '《伟大转折》剧目团购系统',
-				logoUrl: this.$commonConfig.staticUrl + "login/logo.png",
+				title: this.$isDevelop?'':'《伟大转折》剧目团购系统',
+				tuanIndexBg: this.$commonConfig.staticUrl + "/img/tuan-index-bg.png",
+				logoSrc: this.$commonConfig.staticUrl + "/img/logo.png",
 				loading: false,
 				backUrl:null,
 				form: {
@@ -88,6 +89,13 @@
 		    this.$refs.uForm.setRules(this.rules)
 		},
 		onLoad(e) {
+			if(this.$isDevelop){
+				// this.logoSrc = `${this.$commonConfig.staticUrl}/img/logo.png`;
+				this.logoSrc = 'none';
+				this.tuanIndexBg = `${this.$commonConfig.staticUrl}/img/tuan-index-bg-dev.png`;
+			}
+			
+			
 			let that = this;
 			uni.getStorage({
 				key: 'backUrl',