twt 2 years ago
parent
commit
99f6547af7
3 changed files with 32 additions and 5 deletions
  1. 2 1
      pages.json
  2. 24 1
      pages/index/index.vue
  3. 6 3
      pages/index/personalCard.vue

+ 2 - 1
pages.json

@@ -4,7 +4,8 @@
 		{
 			"path": "pages/index/index",
 			"style": {
-				"navigationStyle": "custom"
+				"navigationStyle": "custom",
+				 "enablePullDownRefresh": true
 			}
 		},
 		{

+ 24 - 1
pages/index/index.vue

@@ -304,6 +304,14 @@
 			}
 			
 			
+		},
+		onPullDownRefresh(){
+			this.getCarList();
+			this.queryHomeCardList()
+			this.queryManagerInfo()
+			setTimeout(() => {
+					uni.stopPullDownRefresh(); // 关闭下拉刷新 
+			}, 1000);
 		},
 		methods: {
 			addCar(){
@@ -341,8 +349,20 @@
 					this.authorizShow=true;
 	
 				}else{
+					var managerInfo={
+						name:this.managerInfo.name,
+						shopInfo:{
+							shopName:this.managerInfo.shopInfo.shopName,
+							provinceName:this.managerInfo.shopInfo.provinceName,
+							cityName:this.managerInfo.shopInfo.cityName,
+							areaName:this.managerInfo.shopInfo.areaName,
+							Address:this.managerInfo.shopInfo.Address,
+						},
+						avatar:this.managerInfo.avatar
+						
+					}
 					uni.navigateTo({
-						url:'../index/personalCard?adInfo='+JSON.stringify(this.managerInfo)
+						url:'../index/personalCard?adInfo='+JSON.stringify(managerInfo)
 					})
 				}
 			},
@@ -715,6 +735,9 @@
 			 },
 			 queryHomeCardList(){
 				 //console.log(this.wxOpenData)
+				 uni.showLoading({
+				 	title: '加载中'
+				 })
 				 this.$http('openHome/queryHomeCardList', {
 				   unionId:this.unionId
 				  },'GET').then(res => {

+ 6 - 3
pages/index/personalCard.vue

@@ -13,7 +13,7 @@
 			<view class="address-info">
 				<text class="store-name">{{shopNameStr}}</text>
 				<text
-					class="store-address">{{addressStr}}</text>
+					class="store-address">{{addressStr?addressStr:''}}</text>
 			</view>
 			<view class="address-arrow">
 				<image src="../../static/img/little_rightArrow.png" mode="aspectFit"></image>
@@ -44,7 +44,7 @@
 			}
 		},
 		onLoad(e) {
-			// console.log('个人名片传递的参数', e);
+			// console.log('个人名片传递的参数', e.adInfo);
 			this.adInfo = JSON.parse(e.adInfo)
 			 console.log('个人名片传递的参数', this.adInfo);
 			 this.themeColor = uni.getStorageSync("themeColor");
@@ -60,9 +60,12 @@
 					// console.log('this.adInfo.shopName = ',this.adInfo.shopName)
 					return this.adInfo.shopName
 				}
-				else{
+				else if(this.adInfo.shopInfo.shopName){
 					// console.log('this.adInfo.shopInfo.shopName = ',this.adInfo.shopInfo.shopName)
 					return this.adInfo.shopInfo.shopName
+				}else{
+					var k=''
+					return k
 				}
 			},
 			addressStr() {