Selaa lähdekoodia

二维码调试

Limengbo 6 vuotta sitten
vanhempi
commit
957cb2794d
3 muutettua tiedostoa jossa 24 lisäystä ja 7 poistoa
  1. 16 6
      pages/transmit/transmit.js
  2. 1 1
      pages/transmit/transmit.wxml
  3. 7 0
      project.config.json

+ 16 - 6
pages/transmit/transmit.js

@@ -73,17 +73,27 @@ Page({
       });      
     };
   },
-
-
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    // wx.showModal({
+    //   title: '提示',
+    //   content: 'aaa' + JSON.stringify(options),
+    //   showCancel: false,
+    //   success: function (res) {
+    //     if (res.confirm) {
+    //       console.log('用户点击确定')
+    //     } else if (res.cancel) {
+    //       console.log('用户点击取消')
+    //     }
+    //   }
+    // })
     const postsId = options.postId || '';
     const shareKey = options.shareKey || '';
-    //判断分享过来的参数是否有postId查询单挑显示
-    
-    if(postsId) {
+    console.log('shareKey' + options.shareKey)
+    //判断分享过来的参数是否有postId查询单挑显示 
+    if(postsId || shareKey) {
       login.getOpenidSessionKey(res => {
         APIClient.getOneSchedule({
           uid: res.data.data.uid
@@ -114,12 +124,12 @@ Page({
         })
       });      
     };
+    
   },
 
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
   onReady: function () {
-      
   },
 })

+ 1 - 1
pages/transmit/transmit.wxml

@@ -10,7 +10,7 @@
             <view class="works">
                 <view class="title">
                     <image src="../../pages/image/xing.png" class="xing"></image>
-                    <text class="">上传作品</text>
+                    <text class="">分享作品</text>
                     <image src="../../pages/image/xing.png" class="xing"></image>
                 </view>
                 <view class="share-con" bindtap="particulars" data-postsId="{{productionData.id}}">

+ 7 - 0
project.config.json

@@ -78,6 +78,13 @@
 					"name": "义方快乐学堂",
 					"pathName": "pages/index/index",
 					"query": "grade=2"
+				},
+				{
+					"id": 7,
+					"name": "分享",
+					"pathName": "pages/transmit/transmit",
+					"query": "shareKey=1527586079692937&ind=7",
+					"scene": "1011"
 				}
 			]
 		}