shish 1 년 전
부모
커밋
4a6ec4add5

+ 3 - 0
mallApp/src/mixins/globalMixins.js

@@ -48,6 +48,9 @@ export default {
 		if (option.account) {
 			uni.setStorageSync('account', option.account)
 		}
+		if (option.hdId) {
+			uni.setStorageSync('hdId', option.hdId)
+		}
 
 		uni.setStorageSync('currentQuery', JSON.stringify(option))
 

+ 7 - 0
mallApp/src/pages/home/recent.vue

@@ -109,6 +109,7 @@ export default {
       //0没有登录 1有登录
       loginStyle :0,
       activePopupIndex: -1, // 控制弹出菜单的显示
+      pageAction:{refresh:0}
     };
   },
   computed: {
@@ -129,6 +130,12 @@ export default {
       }else{
         this.loginStyle = 0
       }
+
+      if(this.pageAction.refresh == 1){
+        this.getMyHdList()
+        this.pageAction.refresh == 0
+      }
+
   },
   methods: {
     recharge (item) {

+ 8 - 0
mallApp/src/pages/login/result.vue

@@ -38,6 +38,14 @@ export default {
       superWx:'',
       account:0
     }
+  },
+	onLoad(){
+
+		//返回上一页时刷新
+		let pages = getCurrentPages();
+		let prevPage = pages[ pages.length - 2 ];
+		prevPage.$vm.pageAction = {refresh:1}
+
   },
   methods: {
     openSuperWx(){

+ 6 - 3
mallApp/src/plugins/luch-request_0.0.7/request.js

@@ -250,15 +250,18 @@ class Request {
 	}
 
 	get(url, data = {}, options = {}, config = {}) {
-		// options.url = url + common.queryData(data, true)
-		options.url = url + parse({...data,'account':uni.getStorageSync('account')})
+		let account = uni.getStorageSync('account') || 0;
+		let hdId = uni.getStorageSync('hdId') || 0;
+		options.url = url + parse({...data,'account':account,'hdId':hdId})
 		options.data = {}
 		options.method = 'GET'
 		return this.request(options, config)
 	}
 
 	post(url, data = {}, options = {}, config = {}) {
-		options.url = url+'?account='+uni.getStorageSync('account')
+		let account = uni.getStorageSync('account') || 0;
+		let hdId = uni.getStorageSync('hdId') || 0;
+		options.url = url+'?account='+account+'&hdId='+hdId
 		options.data = data
 		options.method = 'POST'
 		return this.request(options, config)