bayi пре 2 година
родитељ
комит
7a502d760d

+ 0 - 2
app.js

@@ -44,8 +44,6 @@ App({
             shareUid
           }
           let userRes = await userLogin(data)
-          console.log(userRes.data.grade);
-
           this.setUser(userRes.data)
           wx.setStorageSync('uid', userRes.data.uid)
           wx.setStorageSync('user', userRes.data)

+ 0 - 1
components/activityList/index.js

@@ -86,7 +86,6 @@ Component({
     activityEvent({
       currentTarget
     }) {
-      console.log(currentTarget.dataset.info);
       //1:图片,2:邀新榜,3:热播榜,4:挑战pk榜,5,朗读赛,6,领取勋章
       let {
         type,

+ 0 - 1
components/banner/index.js

@@ -27,7 +27,6 @@ Component({
     bannelEvent({
       currentTarget
     }) {
-      console.log(currentTarget);
       //1:图片,2:邀新榜,3:热播榜,4:挑战pk榜,5,朗读赛,6,领取勋章
       let {
         type,

+ 0 - 1
pages/editUser/index.js

@@ -101,7 +101,6 @@ Page({
     wx.showActionSheet({
       itemList: ['学生', '家长', '老师'],
       success: (res) => {
-        console.log(res);
         if (['学生', '家长', '老师'][res.tapIndex] == this.data.userInfo.profession) {
           return
         }

+ 24 - 5
pages/match/index.js

@@ -31,7 +31,17 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
-    // 手工绑定 
+    this.getLocUserInfo()
+    if (Object.keys(this.data.userInfo).length > 0) {
+      this.reload()
+    } else {
+      getApp().callBack = (res) => {
+        this.getLocUserInfo()
+        this.reload()
+      }
+    }
+  },
+  getLocUserInfo() {
     this.storeBindings = createStoreBindings(this, {
       store,
       fields: {
@@ -41,17 +51,14 @@ Page({
         setUser: 'setUser'
       }
     })
-    // 立刻更新
     this.storeBindings.updateStoreBindings()
-    this.reload()
   },
-  reload(){
+  reload() {
     this.getModelTexts()
     this.getReadRanking()
   },
   // 获取范文
   async getModelTexts() {
-    console.log(this.data.userInfo.grade);
     let bannerList = await getModelTexts({
       grade: this.data.userInfo.grade
     })
@@ -109,4 +116,16 @@ Page({
       })
     }
   },
+  onShareAppMessage({
+    from,
+    target
+  }) {
+    if (from == 'menu') {
+      return {
+        title: '这个小程序太赞了!孩子朗读能力蹭蹭上涨,推荐你试试!',
+        path: `/pages/match/index?uid=${wx.getStorageSync('uid')}`,
+        imageUrl: 'http://reader-wx.ai160.com/images/reader/v3/375-300-1.jpg'
+      }
+    }
+  },
 })

+ 0 - 5
pages/reading/index.js

@@ -229,7 +229,6 @@ Page({
   },
   // 录音
   soundRecording() {
-    console.log('zzz');
     /*调用微信开始录音接口,并启动语音评测*/
     let timeStamp = new Date().getTime()
     let sig = sha1(`16075689600000da${timeStamp}caa8e60da6042731c230fe431ac9c7fd`)
@@ -362,13 +361,11 @@ Page({
         events: {
           // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
           goback: (data) => {
-            console.log(data)
             this.setData({
               readingReset: data.reset || false,
               readingType: data.readingType || 'public',
               uploadHide: data.uploadHide
             })
-            console.log(this.data);
           }
         },
       })
@@ -417,7 +414,6 @@ Page({
           userReadId: this.data.pkData.id,
           winnerUId: this.data.pkData.score > _data.myOverall ? this.data.pkData.uid : this.data.pkData.score == _data.myOverall ? '' : wx.getStorageSync('uid')
         }
-        console.log('uploadPk-----', data);
         let result = await uploadPk(data)
         wx.redirectTo({
           url: `/pages/pkResult/index?id=${result.id}`
@@ -573,7 +569,6 @@ Page({
     detail
   }) {
     this.resultAudioContext.pause();
-    console.log(detail.value / 100 * this.data.videoInfo.userRead.duration)
     this.resultAudioContext.seek(detail.value / 100 * this.data.videoInfo.userRead.duration)
     setTimeout(() => {
       this.resultAudioContext.play()

+ 0 - 1
pages/score/index.js

@@ -63,7 +63,6 @@ Page({
   },
   creatShare() {
     let video = this.data.readDetail
-    console.log(video);
     return new Promise((resolve, reject) => {
       let context = wx.createSelectorQuery();
       context