ccjgmwz 4 rokov pred
rodič
commit
50672e8fe0

+ 2 - 2
unimall-app/App.vue

@@ -23,9 +23,9 @@
 				});
 				});
 			}
 			}
 			// #ifdef APP-PLUS
 			// #ifdef APP-PLUS
+			var that = this
 			plus.push.getClientInfoAsync((info) => {
 			plus.push.getClientInfoAsync((info) => {
-				uni.setStorageSync('clientId', info.clientid)
-				console.log("info.clientid",info.clientid)
+				that.$store.commit('clientId', info.clientid)
 			   }, err => {
 			   }, err => {
 			});
 			});
 			// #endif
 			// #endif

+ 2 - 3
unimall-app/pages/public/login.vue

@@ -172,12 +172,11 @@
 				uni.showLoading({
 				uni.showLoading({
 					title: '登录中'
 					title: '登录中'
 				})
 				})
-				var clientid = uni.getStorage("clientId")
-				console.log("clientid",clientid)
+				console.log("clientid",clientId)
 				this.$api.request('user', 'login',{
 				this.$api.request('user', 'login',{
 					password:that.password,
 					password:that.password,
 					phone:that.phone,
 					phone:that.phone,
-					cid:clientid
+					cid:clientId
 				}, failres => {
 				}, failres => {
 			           that.$api.msg(failres.errmsg)
 			           that.$api.msg(failres.errmsg)
 			           uni.hideLoading()
 			           uni.hideLoading()

+ 3 - 6
unimall-app/store/index.js

@@ -11,7 +11,7 @@ try {
 }
 }
 
 
 // 需要永久存储,且下次APP启动需要取出的,在state中的变量名
 // 需要永久存储,且下次APP启动需要取出的,在state中的变量名
-let saveStateKeys = ['firendItem','userData','pushRes','myTip','taskTip','contractTip','liangxinTip','packet','linkItem','memberItem','memberItemIndex','chatItem'];
+let saveStateKeys = ['firendItem','userData','pushRes','myTip','taskTip','contractTip','liangxinTip','packet','linkItem','memberItem','memberItemIndex','chatItem','clientId'];
 
 
 // 保存变量到本地存储中
 // 保存变量到本地存储中
 const saveLifeData = function(key, value) {
 const saveLifeData = function(key, value) {
@@ -86,11 +86,8 @@ const store = new Vuex.Store({
 		circleData: [],
 		circleData: [],
 		//内置朋友圈相册banner图
 		//内置朋友圈相册banner图
 		circleBgList:[
 		circleBgList:[
-			// { src:require('@/static/image/circleBanner/1.jpg'), isCheck:false },
-			// { src:require('@/static/image/circleBanner/2.jpg'), isCheck:false },
-			// { src:require('@/static/image/circleBanner/3.jpg'), isCheck:false },
-			// { src:require('@/static/image/circleBanner/4.jpg'), isCheck:false },
-		]
+		],
+		clientId:""
 	},
 	},
 	mutations: {
 	mutations: {
 		$uStore(state, payload) {
 		$uStore(state, payload) {