yuwenjun 4 tahun lalu
induk
melakukan
c3f7af052f
2 mengubah file dengan 16 tambahan dan 12 penghapusan
  1. 4 1
      h5/pages/activity/activity-detail.vue
  2. 12 11
      main.js

+ 4 - 1
h5/pages/activity/activity-detail.vue

@@ -15,7 +15,10 @@
 		onLoad(option) {
 			this.adsImage = option.adsImage
 			this.title= option.title
-			uni.setNavigationBarTitle({title:this.title});
+			console.log(this.title);
+			if(this.title && this.title!==null && this.title !== 'null'){
+				uni.setNavigationBarTitle({title:this.title});
+			}
 		}
 	}
 </script>

+ 12 - 11
main.js

@@ -7,7 +7,7 @@ import * as Regs from '@/common/config/common.js'
 import { umtrackWxKey } from '@/utils/config.js'
 
 // 友盟依赖包
-import uma from 'umtrack-wx';
+import uma from 'umtrack-wx'
 
 // 公共组件
 import { msg, modal,prePage } from'./utils/util'
@@ -24,17 +24,18 @@ Vue.component('scroll-top',scrollTop)
 Vue.component('city-Picker',CityPicker)
 
 Vue.prototype.$getStorage = function(key){
-	var userParam = uni.getStorageSync(key);
-	if (userParam != null && userParam != "" && userParam!= undefined) {
-		return userParam;
+	var userParam = uni.getStorageSync(key)
+	if (userParam != null && userParam != '' && userParam!= undefined) {
+		return userParam
 	}else{
-		return null;
+		return null
 	} 
 }
 
 /**
  * 友盟+小程序统计
  */
+/*
 if(process.env.NODE_ENV != 'development'){
 	// #ifdef MP-WEIXIN
 	uma.init({
@@ -53,15 +54,15 @@ if(process.env.NODE_ENV != 'development'){
 	}
 	Vue.use(uma);
 	// #endif
-}
+}*/
 
 // Vue实例化
 Vue.config.productionTip = false
-Vue.prototype.$fire = new Vue();
-Vue.prototype.$store = store;
-Vue.prototype.$util = {msg,prePage,modal};
-Vue.prototype.$api = Api;
-Vue.prototype.$reg = Regs;
+Vue.prototype.$fire = new Vue()
+Vue.prototype.$store = store
+Vue.prototype.$util = {msg,prePage,modal}
+Vue.prototype.$api = Api
+Vue.prototype.$reg = Regs
 
 App.mpType = 'app'