xtz преди 4 години
родител
ревизия
e5187604bc

+ 5 - 1
pages/community/articleDetails/articleDetails.js

@@ -10,6 +10,8 @@ Page({
       page: 1,
       page: 1,
       pagesize: 100
       pagesize: 100
     },
     },
+    imgList: [],
+    imgUrl: app.globalData.imgUrl,
     allowComments: false,
     allowComments: false,
     swiperHeight: 0
     swiperHeight: 0
   },
   },
@@ -103,8 +105,10 @@ Page({
         id: this.data.article.id
         id: this.data.article.id
       }
       }
     }, r => {
     }, r => {
+      console.log(r)
       this.setData({
       this.setData({
-        article: r.info
+        imgList:r.object.filePath.split(','),
+        article: r.object
       })
       })
     })
     })
   },
   },

+ 3 - 3
pages/community/articleDetails/articleDetails.wxml

@@ -7,8 +7,8 @@
 
 
 <view bindtap="hideComments" class="gaptop">
 <view bindtap="hideComments" class="gaptop">
   <swiper indicator-dots autoplay circular style="height:240px; background: #000">
   <swiper indicator-dots autoplay circular style="height:240px; background: #000">
-    <swiper-item item-id="{{index}}" wx:for="{{article.upload_url_list}}" wx:key bindtap="clickPic" data-i="{{index}}">
-      <image class="fullx" src="{{item}}" mode="aspectFit" id="img{{index}}"></image>
+    <swiper-item item-id="{{index}}" wx:for="{{imgList}}" wx:key bindtap="clickPic" data-i="{{index}}">
+      <image class="fullx" src="{{imgUrl + item}}" mode="aspectFit" id="img{{index}}"></image>
       <view id="fake{{index}}"></view>
       <view id="fake{{index}}"></view>
     </swiper-item>
     </swiper-item>
   </swiper>
   </swiper>
@@ -16,7 +16,7 @@
 
 
 
 
 <view class="wrp" style="min-height: 6em" bindtap="hideComments">
 <view class="wrp" style="min-height: 6em" bindtap="hideComments">
-  <text>{{article.content}}</text>
+  <text>{{article.articleContent}}</text>
 </view>
 </view>
 
 
 <view class="bortop commentsContatiner {{allowComments?'':'hide'}} fg shadow">
 <view class="bortop commentsContatiner {{allowComments?'':'hide'}} fg shadow">

+ 1 - 0
pages/community/videoDetails/videoDetails.js

@@ -11,6 +11,7 @@ Page({
       page: 1,
       page: 1,
       pagesize: 100
       pagesize: 100
     },
     },
+    imgUrl: app.globalData.imgUrl,
     allowComments: false
     allowComments: false
   },
   },
   clickFavor() {
   clickFavor() {

+ 20 - 20
pages/home/home.js

@@ -261,11 +261,11 @@ Page({
     })
     })
   },
   },
   clickAddtidings() {
   clickAddtidings() {
-    // if (!this.data.user) {
-    //   return this.setData({
-    //     showAuthPanel: true
-    //   })
-    // }
+    if (!this.data.user) {
+      return this.setData({
+        showAuthPanel: true
+      })
+    }
     this.setData({
     this.setData({
       ['community.showAddtidings']: true
       ['community.showAddtidings']: true
     })
     })
@@ -337,11 +337,11 @@ Page({
         this.loadArticles()
         this.loadArticles()
         break;
         break;
       case '3':
       case '3':
-        // if (!this.data.user || this.data.user.is_finish_reg == 0) {
-        //   return this.setData({
-        //     showAuthPanel: true
-        //   })
-        // }
+        if (!this.data.user || this.data.user.is_finish_reg == 0) {
+          return this.setData({
+            showAuthPanel: true
+          })
+        }
         this.data.mine.pagination.page = 1
         this.data.mine.pagination.page = 1
         this.data.mine.list = []
         this.data.mine.list = []
         this.loadMyinformation()
         this.loadMyinformation()
@@ -392,18 +392,18 @@ Page({
       success: r => {
       success: r => {
         wx.getUserInfo({
         wx.getUserInfo({
           success: e => {
           success: e => {
-            // let {encryptedData,iv} = e
-            // ilogin.loadAT({
-            //   reqdata: {
-            //     code: r.code,
-            //     encryptedData,
-            //     iv
-            //   }
-            // }, r => {
+            let {encryptedData,iv} = e
+            ilogin.loadAT({
+              reqdata: {
+                code: r.code,
+                encryptedData,
+                iv
+              }
+            }, r => {
               console.log(r)
               console.log(r)
-              console.log(e);
+              // console.log(e);
               
               
-            // })
+            })
           },
           },
         })
         })
         // ilogin.loadAT({
         // ilogin.loadAT({