Sfoglia il codice sorgente

零售 468 1 这个采购页需要支持下拉刷新 2 这个采购页被分享出去之后,打开的标题要跟页面里圈起来名称一样,现在是另外名字花美玲

yangming 5 anni fa
parent
commit
6b2cc2e5c1
1 ha cambiato i file con 8 aggiunte e 3 eliminazioni
  1. 8 3
      hdApp/src/pagesPurchase/ghsProduct.vue

+ 8 - 3
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -168,6 +168,11 @@ export default {
 			shopId:0
 		};
 	},
+	onPullDownRefresh() {
+		this.init().then(res => {
+			uni.stopPullDownRefresh();
+		});
+	},
 	computed: {
 		confirmContent() {
 			let content = "确认下一步?";
@@ -200,7 +205,7 @@ export default {
 		console.log('share',`pagesPurchase/ghsProduct?hdShopAdminId=${this.loginInfo.shopAdminId}&ghsShopAdminId=${ghsShopAdminId}&shopId=${this.shopId}&id=0`)
 
 		return {
-			title: this.pageInfo.shopName,
+			title: this.pageInfo.name,
 			desc: "",
 			path: `pagesPurchase/ghsProduct?hdShopAdminId=${this.loginInfo.shopAdminId}&ghsShopAdminId=${ghsShopAdminId}&shopId=${this.shopId}&id=0`
 		}
@@ -212,13 +217,13 @@ export default {
 			//花材列表
 			this.initGhsData(id,shopId);
 			if(this.option.id == 0) {
-				ghsInfo({shopId: this.option.shopId}).then(res => {
+				return ghsInfo({shopId: this.option.shopId}).then(res => {
 					this.pageInfo = res.data
 					uni.setNavigationBarTitle({title: this.pageInfo.name})
 					this.option.id = res.data.id;
 				}).catch(err => {})
 			} else {
-				getGhsDataApi({id: this.option.id}).then(res => {
+				return getGhsDataApi({id: this.option.id}).then(res => {
 					this.pageInfo = res.data
 					this.shopId = res.data.shopId
 					uni.setNavigationBarTitle({