优化 代码

This commit is contained in:
java110 2022-08-17 19:01:08 +08:00
parent eeac6fcc12
commit 21f99ea601
5 changed files with 43 additions and 20 deletions

11
App.vue
View File

@ -38,9 +38,16 @@
requestNoAuth({ requestNoAuth({
url: url.listSystemInfo, url: url.listSystemInfo,
method: "GET", method: "GET",
data: _data, data: {
page:1,
row:1
},
success: function(res) { success: function(res) {
reslove(res); console.log(res.data);
if(res.data.data && res.data.data.length >0){
uni.setStorageSync('java110SystemConfig',res.data.data[0])
}
//reslove(res);
}, },
fail: function(e) {} fail: function(e) {}

View File

@ -8,30 +8,40 @@
* @QQ 928255095 * @QQ 928255095
*/ */
let _systemConfig = uni.getStorageSync('java110SystemConfig');
// #ifdef H5 // #ifdef H5
// 服务器域名 公众号时,配置为 / 就可以 // 服务器域名 公众号时,配置为 / 就可以
const baseUrl = '/'; let baseUrl = '/';
// #endif // #endif
// 腾讯地图Key, h5使用 // 腾讯地图Key, h5使用
const QQMapKey = ''; let QQMapKey = '';
const commonBaseUrl= 'http://wy.yxkj.ltd/'; let commonBaseUrl= 'http://wy.yxkj.ltd/';
// #ifndef H5 // #ifndef H5
//服务器域名 小程序 或者 app 时 后端地址 //服务器域名 小程序 或者 app 时 后端地址
const baseUrl = 'http://wy.yxkj.ltd/'; let baseUrl = 'http://wy.yxkj.ltd/';
// #endif // #endif
//app支付时这里需要填写支付秘钥 //app支付时这里需要填写支付秘钥
const appPayKey=""; let appPayKey="";
const logLevel="DEBUG"; // 日志级别 let logLevel="DEBUG"; // 日志级别
let systemName="物业版";
if(_systemConfig){
QQMapKey = _systemConfig.qqMapKey;
commonBaseUrl = _systemConfig.imgUrl;
systemName = _systemConfig.propertyTitle;
}
export default{ export default{
baseUrl:baseUrl, baseUrl:baseUrl,
logLevel:logLevel, logLevel:logLevel,
appPayKey:appPayKey, appPayKey:appPayKey,
commonBaseUrl: commonBaseUrl, commonBaseUrl: commonBaseUrl,
QQMapKey: QQMapKey QQMapKey: QQMapKey,
systemName:systemName
} }

View File

@ -1,5 +1,5 @@
{ {
"name" : "HC掌上物业", "name" : "物业",
"appid" : "__UNI__29E0560", "appid" : "__UNI__29E0560",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
@ -81,18 +81,18 @@
"disableHostCheck" : true, "disableHostCheck" : true,
"proxy" : { "proxy" : {
"/app" : { "/app" : {
"target" : "http://property.homecommunity.cn", //http://192.168.1.16:8012 "target" : "http://192.168.100.108:8088", //http://192.168.1.16:8012
"changeOrigin" : true, // "changeOrigin" : true, //
"secure" : true // https "secure" : true // https
}, },
"/callComponent" : { "/callComponent" : {
"target" : "http://property.homecommunity.cn", //http://192.168.1.16:8012 "target" : "http://192.168.100.108:8088", //http://192.168.1.16:8012
"changeOrigin" : true, // "changeOrigin" : true, //
"secure" : true // https "secure" : true // https
} }
} }
}, },
"domain" : "http://property.homecommunity.cn", "domain" : "http://property.homecommunity.cn",
"title" : "HC掌上物业" "title" : "物业"
} }
} }

View File

@ -3,7 +3,7 @@
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "HC掌上物业" "navigationBarTitleText": ""
} }
} }
,{ ,{
@ -549,7 +549,7 @@
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarTitleText": "HC掌上物业", "navigationBarTitleText": "物业",
"navigationBarBackgroundColor": "#00AA00", "navigationBarBackgroundColor": "#00AA00",
"backgroundColor": "#00AA00", "backgroundColor": "#00AA00",
"onReachBottonDistance":50 "onReachBottonDistance":50

View File

@ -2,7 +2,7 @@
<view class="content"> <view class="content">
<view class="margin-bottom-xs"> <view class="margin-bottom-xs">
<uni-notice-bar :showIcon="true" :scrollable="true" :single="true" :speed="30" <uni-notice-bar :showIcon="true" :scrollable="true" :single="true" :speed="30"
text="HC掌上物业欢迎您"></uni-notice-bar> :text="welcomeTitle"></uni-notice-bar>
</view> </view>
<scroll-view class="scroll-restaurants-list" scroll-y="true" style="height:100%"> <scroll-view class="scroll-restaurants-list" scroll-y="true" style="height:100%">
<swiper class="categoryList padding-top-xs bg-white" indicator-dots="true" <swiper class="categoryList padding-top-xs bg-white" indicator-dots="true"
@ -86,7 +86,8 @@
import {isNull} from '../../lib/java110/utils/StringUtil.js' import {isNull} from '../../lib/java110/utils/StringUtil.js'
import {getUserInfo} from '../../lib/java110/api/Java110SessionApi.js' import {getUserInfo} from '../../lib/java110/api/Java110SessionApi.js'
import url from '../../constant/url.js' import url from '../../constant/url.js';
import conf from '@/conf/config.js'
export default { export default {
data() { data() {
return { return {
@ -95,13 +96,18 @@
currentCommunityName: '', currentCommunityName: '',
categoryList: [], categoryList: [],
swiperList: [], swiperList: [],
activitys: [] activitys: [],
welcomeTitle:''
} }
}, },
components: { components: {
uniNoticeBar uniNoticeBar
}, },
onLoad() { onLoad() {
this.welcomeTitle = conf.systemName + '欢迎您'
uni.setNavigationBarTitle({
title:conf.systemName
})
this.java110Context.onLoad(); this.java110Context.onLoad();
}, },
onShow() { onShow() {