Przeglądaj źródła

我的商城进入零售小程序 获取商家信息

wangn 5 lat temu
rodzic
commit
66583b74e6
1 zmienionych plików z 14 dodań i 2 usunięć
  1. 14 2
      hdApp/src/pagesPurchase/ghsProduct.vue

+ 14 - 2
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -114,6 +114,7 @@ import allMoreSelectInputMins from "@/mixins/allMoreSelectInput";
 import {mapActions, mapGetters} from "vuex";
 import { COMMODITY_TYPE } from "@/utils/declare";
 import productMins from "@/mixins/product";
+import { getShop } from '@/api/common/index'
 // import suitProductMins from "@/mixins/ghsProduct";
 export default {
 	name: "Billing", // 开单
@@ -143,7 +144,8 @@ export default {
 			},
 			showSubmitModel: false,
 			notOpenShop:false,
-			hdShopAdminId:0
+			hdShopAdminId:0,
+      pageInfo: {}
 		};
 	},
 	computed: {
@@ -168,11 +170,21 @@ export default {
 	},
 	onShareAppMessage(res) {
 		return {
-			title: "xxxxx",
+			title: this.pageInfo.shopName,
 			desc: "",
 			path: `pagesPurchase/gshProudct?hdShopAdminId=${this.loginInfo.shopAdminId}&ghsShopAdminId=${this.options.ghsShopAdminId}&shopId=${this.options.shopId}`
 		}
 	},
+  onShow() {
+    getShop({shopId: this.options.shopId}).then(res => {
+      console.log('179 res ===>', res)
+      this.pageInfo = res.data.info
+      uni.setNavigationBarTitle({
+        title: this.pageInfo.shopName
+      })
+    }).catch(err => {})
+  },
+
 	methods: {
 		//自定义数量
 		customNum(info) {