Эх сурвалжийг харах

修改商城一些分享的设置

wangning 5 жил өмнө
parent
commit
9838c3cde4

+ 2 - 1
mallApp/dist/build/mp-weixin/app.json

@@ -117,5 +117,6 @@
   },
   "usingComponents": {
     "tab-bar": "/components/app-tabbar"
-  }
+  },
+  "sitemapLocation": "sitemap.json"
 }

+ 33 - 6
mallApp/dist/build/mp-weixin/project.config.json

@@ -5,27 +5,54 @@
   },
   "setting": {
     "urlCheck": false,
-    "es6": true
+    "es6": true,
+    "enhance": false,
+    "postcss": true,
+    "preloadBackgroundData": false,
+    "minified": true,
+    "newFeature": false,
+    "coverView": true,
+    "nodeModules": false,
+    "autoAudits": false,
+    "showShadowRootInWxmlPanel": true,
+    "scopeDataCheck": false,
+    "uglifyFileName": false,
+    "checkInvalidKey": true,
+    "checkSiteMap": true,
+    "uploadWithSourceMap": true,
+    "compileHotReLoad": false,
+    "useMultiFrameRuntime": true,
+    "useApiHook": true,
+    "useApiHostProcess": false,
+    "babelSetting": {
+      "ignore": [],
+      "disablePlugins": [],
+      "outputPath": ""
+    },
+    "enableEngineNative": false,
+    "useIsolateContext": true,
+    "useCompilerModule": true,
+    "userConfirmedUseCompilerModuleSwitch": false,
+    "userConfirmedBundleSwitch": false,
+    "packNpmManually": false,
+    "packNpmRelationList": [],
+    "minifyWXSS": true
   },
   "compileType": "miniprogram",
   "libVersion": "",
   "appid": "wxe41bd5816affd0ba",
-  "projectname": "商城",
+  "projectname": "%E5%95%86%E5%9F%8E",
   "condition": {
     "search": {
-      "current": -1,
       "list": []
     },
     "conversation": {
-      "current": -1,
       "list": []
     },
     "game": {
-      "current": -1,
       "list": []
     },
     "miniprogram": {
-      "current": -1,
       "list": []
     }
   }

+ 17 - 1
mallApp/src/pages/home/category.vue

@@ -75,13 +75,15 @@ import AppImg from '@/components/app-img'
 import AppWrapperEmpty from '@/components/app-wrapper-empty'
 import { getClass, getList } from '@/api/category'
 import { list } from '@/mixins'
+import { share } from "@/mixins";
+import { getShopUser } from "@/utils/auth";
 export default {
   name: 'category',
   components: {
     AppWrapperEmpty,
     AppImg
   },
-  mixins: [list],
+  mixins: [list, share],
   data () {
     return {
       tabbar: [],
@@ -128,6 +130,20 @@ export default {
         })
       }, 50)
     }
+    let account = uni.getStorageSync('account')
+    getShopUser().then(res => {
+      // 设置分享
+      let shareParams = {
+        title: '分类', // 分享标题
+        desc: "", // 分享内容
+        imgUrl: '',
+        // #ifndef H5
+        pagePath: `/pages/home/course?fromUserId=${res.id}&account=${account}`
+        // #endif
+      }
+      this.jweixinFn(shareParams)
+      console.log('分享地址',`/pages/home/course?fromUserId=${res.id}&account=${account}`)
+    })
   },
 
   methods: {

+ 6 - 1
mallApp/src/pages/home/course.vue

@@ -48,6 +48,11 @@ export default {
   onShow () {
     uni.hideTabBar();
   },
+  onPullDownRefresh() {
+      this.pxClassList().then(res => {
+        uni.stopPullDownRefresh();
+      });
+  },
   methods: {
     tabClick (index) {
       this.currentTabIndex = index
@@ -59,7 +64,7 @@ export default {
       getShopUser().then(res => {
         // 设置分享
         let shareParams = {
-          title: `${res.name}`, // 分享标题
+          title: '课程', // 分享标题
           desc: "", // 分享内容
           imgUrl: '',
           // #ifndef H5

+ 21 - 18
mallApp/src/pages/home/index.vue

@@ -54,7 +54,8 @@ export default {
       category: [],
       columnStyle: null,
       currentTabIndex: 0,
-      account: ''
+      account: '',
+      pageTitle: ''
     };
   },
   computed: {
@@ -70,33 +71,35 @@ export default {
     init () {
       getOrderShop().then(res => {
       })
-      this._detail()
-      let account = uni.getStorageSync('account')
-      
-      getShopUser().then(res => {
-        // 设置分享
-        let shareParams = {
-          title: `${res.name}`, // 分享标题
-          desc: "", // 分享内容
-          imgUrl: '',
-          // #ifndef H5
-          pagePath: `/pages/home/index?fromUserId=${res.id}&account=${account}`
-          // #endif
-        }
-        this.jweixinFn(shareParams)
-        console.log('分享地址',`/pages/home/index?fromUserId=${res.id}&account=${account}`)
+      this._detail().then(res => {
+        let account = uni.getStorageSync('account')
+        console.log(this.pageTitle)
+        getShopUser().then(res => {
+          // 设置分享
+          let shareParams = {
+            title: this.pageTitle, // 分享标题
+            desc: "", // 分享内容
+            imgUrl: '',
+            // #ifndef H5
+            pagePath: `/pages/home/index?fromUserId=${res.id}&account=${account}`
+            // #endif
+          }
+          this.jweixinFn(shareParams)
+          console.log('分享地址',`/pages/home/index?fromUserId=${res.id}&account=${account}`)
+        })
       })
     },
     _detail () {
-      getMainIndex().then(res => {
+      return getMainIndex().then(res => {
         this.data = res.data;
         if (this.$util.isEmpty(res.data)) return false;
         this.ad = res.data.ad.map(e => {
           e.img = e.adImg;
           return e;
         });
+        this.pageTitle = res.data.sj.name
         uni.setNavigationBarTitle({
-          title:res.data.sj.name
+          title: this.pageTitle
         })
         this.category = res.data.category;
         this.columnStyle = res.data.columnStyle;