liyongli 1 an în urmă
părinte
comite
b568e11f51
5 a modificat fișierele cu 16 adăugiri și 7 ștergeri
  1. 7 3
      pages/index/index.js
  2. 4 1
      pages/sph/index.js
  3. 1 1
      pages/us/index.js
  4. 0 1
      pages/us/index.wxml
  5. 4 1
      pages/webview/index.js

+ 7 - 3
pages/index/index.js

@@ -16,14 +16,18 @@ Page({
       return
     }
     if (item.type === 'sph') {
-      wx.openChannelsActivity({
-        finderUserName: item.sph_id,
-        feedId: item.sp_id,
+      wx.navigateTo({
+        url: "/pages/sph/index?sph_id=" + item.sph_id + "&sp_id=" + item.sp_id
       })
+      // wx.openChannelsActivity({
+      //   finderUserName: item.sph_id,
+      //   feedId: item.sp_id,
+      // })
       return
     }
   },
   onLoad(options) {
+    // console.log(__wxConfig.accountInfo.icon) // 小程序icon
     ajax({
       urlType: "fileurl",
       api: "/topic/tool/img/%E5%B0%91%E5%84%BF%E4%B9%A6%E7%94%BB%E5%A4%A7%E8%B5%9B/home.json?data=" +

+ 4 - 1
pages/sph/index.js

@@ -67,6 +67,9 @@ Page({
    * 用户点击右上角分享
    */
   onShareAppMessage() {
-
+    return {
+      title: __wxConfig.accountInfo.nickname,
+      path: "/pages/sph/index?sph_id=" + this.data.sph_id + "&sp_id=" + this.data.sp_id
+    }
   }
 })

+ 1 - 1
pages/us/index.js

@@ -9,8 +9,8 @@ Page({
   data: {
     userUrl: wx.getStorageSync('userUrl') || '',
     phone: wx.getStorageSync('phone') || '',
+    baseUrl: __wxConfig.accountInfo.icon || ""
   },
-
   getphone(e) {
     ajax({
       urlType: "apiurl",

+ 0 - 1
pages/us/index.wxml

@@ -5,7 +5,6 @@
       <image style="width: 202rpx;height:202rpx;" src="../../images/user.png" />
     </button>
     <image class="user" wx:else src="{{ userUrl }}" />
-
     <Container wx:if="{{phone}}">
       <van-cell is-link url="/pages/userData/index">
         <view slot="title" class="title">

+ 4 - 1
pages/webview/index.js

@@ -63,6 +63,9 @@ Page({
    * 用户点击右上角分享
    */
   onShareAppMessage() {
-
+    return {
+      title: __wxConfig.accountInfo.nickname,
+      path: "/pages/webview/index?url=" + this.data.url
+    }
   }
 })