Ver código fonte

更新

tag增加,图片修改
RegMs If 4 anos atrás
pai
commit
4acc3758b2

+ 1 - 0
miniprogram/app.js

@@ -21,6 +21,7 @@ App({
             success: res => {
               // 可以将 res 发送给后台解码出 unionId
               this.globalData.userInfo = res.userInfo
+              console.log(this.globalData.userInfo)
               const db = wx.cloud.database()
               db.collection("userInfoData").get({
                 success: function (user) {

+ 2 - 2
miniprogram/components/imagePicker/imagePicker.wxss

@@ -1,7 +1,7 @@
 /* components/imagePicker/imagePicker.wxss */
-.image {
+/* .image {
   margin: 5rpx;
   border-style: solid;
   border-width: 1rpx;
   border-color: #D0D0D0;
-}
+} */

+ 5 - 4
miniprogram/components/itemCard/itemCard.wxml

@@ -5,7 +5,8 @@
       <image class="publisher-avatar" src="{{item.publisherAvatar}}" mode="aspectFill"></image>
       <view class="publisher-name">{{item.publisherName}}</view>
     </view>
-    <view class="activity-attribute primary-background-color white-text-color" catchtap="filterMsgType">{{item.attribute[0]}}
+    <view class="activity-attribute primary-background-color white-text-color" catchtap="filterMsgType">
+      {{item.attribute[0]}}
     </view>
   </view>
   <view class="title-time">
@@ -13,11 +14,11 @@
     <view class="time primary-text-color">{{item.time}}</view>
   </view>
   <view class="sub-title">{{item.subTitle}}</view>
-  <imagePicker wx:if="{{item.poster != ''}}" images="{{[item.poster]}}" max="1" image-width="690" image-height="365"
+  <imagePicker wx:if="{{item.poster != ''}}" images="{{[item.poster]}}" max="1" image-width="700" image-height="350"
     readonly />
   <imagePicker wx:if="{{item.poster == '' && item.photo.length != 0}}" images="{{item.photo}}" max="1"
-    image-width="{{item.photo.length == 1 ? 690 : item.photo.length <= 4 ? 330 : 220}}"
-    image-height="{{item.photo.length == 1 ? 690 : item.photo.length <= 4 ? 330 : 220}}" readonly />
+    image-width="{{item.photo.length == 1 ? 700 : item.photo.length <= 4 ? 330 : 220}}"
+    image-height="{{item.photo.length == 1 ? 700 : item.photo.length <= 4 ? 330 : 220}}" readonly />
   <view class="bottom-line">
     <view class="tags primary-text-color">
       <text style="font-size: 25rpx; margin: 0rpx 30rpx;" wx:for="{{item.tag}}" wx:for-item="tag"

+ 7 - 1
miniprogram/pages/main/main.js

@@ -153,7 +153,13 @@ Page({
       }).get({
         success: function (res) {
           arr[i].publisherAttribute = res.data[0].publisherAttribute
-          arr[i].tag = ['紫金港', '管控', '保卫处']
+          if (i == 0) {
+            arr[i].tag = ['紫金港', '管控', '保卫处']
+          } else if (i == 1) {
+            arr[i].tag = ['公益', '丹青']
+          } else if (i == 2) {
+            arr[i].tag = ['玉泉', '停电']
+          }
           this.setData({
             mainDatas: arr
           })

+ 6 - 13
miniprogram/pages/user/user.wxml

@@ -14,20 +14,16 @@
     <view class="btn-text primary-text">我的收藏</view>
   </view>
 
-
   <view class="btn block-background-color" hover-class="btn-hover" bindtap="myFollow">
     <image class="btn-icon" mode="aspectFit" src="/images/user/follow.png"></image>
     <view class="btn-text primary-text">我的关注</view>
   </view>
 
-
   <view class="btn block-background-color" hover-class="btn-hover" bindtap="myQuestion">
     <image class="btn-icon" mode="aspectFit" src="/images/user/question.png"></image>
     <view class="btn-text primary-text">我的提问</view>
   </view>
 
-
-
   <view class="bottom">
     <view class="btn" bindtap="setting">
       <image class="btn-icon" mode="aspectFit" src="/images/user/setting.png"></image>
@@ -36,7 +32,7 @@
 
     <view class="btn" bindtap="aboutUs">
       <image class="btn-icon" mode="aspectFit" src="/images/user/about.png"></image>
-     <view>关于我们</view>
+      <view>关于我们</view>
     </view>
 
     <view class="btn" bindtap="opinion">
@@ -46,13 +42,10 @@
   </view>
 </view>
 
-
-
 <view wx:if="{{publisherId.length == 0}}" class="publisher primary-background-color" hover-class="btn-hover"
-    bindtap="publisherLogin">
-    <text class="white-text-color">社团\n组织\n入驻</text>
-  </view>
-  <view wx:else class="publisher primary-background-color" hover-class="btn-hover" bindtap="publisherPage">
-    <text class="white-text-color">社团\n组织\n管理</text>
+  bindtap="publisherLogin">
+  <text class="white-text-color">社团\n组织\n入驻</text>
 </view>
-
+<view wx:else class="publisher primary-background-color" hover-class="btn-hover" bindtap="publisherPage">
+  <text class="white-text-color">社团\n组织\n管理</text>
+</view>

+ 2 - 5
miniprogram/pages/user/user.wxss

@@ -22,7 +22,7 @@
   font-size: 30rpx;
 }
 
-.mid{
+.mid {
   margin-top: 40rpx;
   display: flex;
   flex-direction: column;
@@ -50,8 +50,7 @@
   font-size: 35rpx;
 }
 
-
-.publisher{
+.publisher {
   position: absolute;
   top: 730rpx;
   height: 180rpx;
@@ -64,8 +63,6 @@
   font-size: 35rpx;
 }
 
-
-
 .bottom {
   bottom: 0rpx;
   position: absolute;