Sfoglia il codice sorgente

回复新增图片,登录流程优化,交作业资金数据判断

begmoon 2 anni fa
parent
commit
0e941dedae

BIN
images/add.png


+ 24 - 0
pages/change/change.js

@@ -98,6 +98,30 @@ Page({
           return
         }
 
+        if (data.today_fund >= 10000){
+          wx.showToast({
+            icon: 'none',
+            title: '今日净资产单位为万'
+          })
+          return
+        }
+
+        if (data.out_fund >= 2000){
+          wx.showToast({
+            icon: 'none',
+            title: '今日转出资金单位为万'
+          })
+          return
+        }
+
+        if (data.in_fund >= 2000){
+          wx.showToast({
+            icon: 'none',
+            title: '今日转入资金单位为万'
+          })
+          return
+        }
+
         if (!data.out_fund && !data.in_fund){
           wx.showToast({
             icon: 'none',

+ 93 - 70
pages/login/user.js

@@ -24,7 +24,10 @@ Page({
     player_type:0,
     signinfo:{},
     avatarUrl: defaultAvatarUrl,
-    userName:'',
+    nickName:'',
+    openid:'',
+    unionid:'',
+
   },
 
   /**
@@ -37,11 +40,11 @@ Page({
         player_type:options.player_type
       })
     }
-    $api.getsignup().then(res=>{
-      this.setData({
-        signinfo:res.data.data
-      })
-    })
+    // $api.getsignup().then(res=>{
+    //   this.setData({
+    //     signinfo:res.data.data
+    //   })
+    // })
   },
   onShow: function () {
     wx.hideHomeButton();
@@ -96,7 +99,7 @@ Page({
   
   nameChange(e){
     this.setData({
-      userName: e.detail.value
+      nickName: e.detail.value
     })
   },
 
@@ -124,39 +127,12 @@ Page({
   },
   /**登陆 */
   login: function () {
-    var _this=this;
-    wx.getUserProfile({
-      desc: '用于完善会员资料',
-      success: res=> {
-        //获取基本信息
-        console.log(res.userInfo)
-        
-        var data = {
-          nickName: res.userInfo.nickName,
-          avatarUrl: res.userInfo.avatarUrl,
-          usercode: this.data.usercode
-        }
-        
-        if(data.nickName == "微信用户" | data.nickName == ""){
-          _this.setData({
-            status:10,
-          })
-        } else{
-          _this.wxlogin(data)
-        } 
-      }
-    })
+    this.islogin();
 
   },
 
   register(e){
-    var data = {
-      nickName: this.data.userName,
-      avatarUrl: this.data.avatarUrl,
-      usercode: this.data.usercode
-    }
-
-    if(data.avatarUrl == defaultAvatarUrl){
+    if(this.data.avatarUrl == defaultAvatarUrl){
       wx.showToast({
         icon: 'none',
         title: '请选择头像',
@@ -164,7 +140,7 @@ Page({
       return
     }
 
-    if(data.nickName == ''){
+    if(this.data.nickName == ''){
       wx.showToast({
         icon: 'none',
         title: '请输入昵称',
@@ -172,16 +148,15 @@ Page({
       return
     }
 
-    
-
-    this.wxlogin(data)
+    this.wxlogin()
   },
-
-  wxlogin(data){
+  
+  islogin(){
     var _this=this;
     wx.showLoading({
       title: '正在登陆',
     })
+ 
     wx.login({
       success(res) {
         //获取code
@@ -196,35 +171,15 @@ Page({
             wx.hideLoading();
             return;
           }
-          data.openid = res.data.data.openid;
-          $api.login(data)
-          .then(res=>{
-            //登录成功
-            
-            wx.setStorage({
-              key: 'userInfo',
-              data: res.data.data,
-            })
-            
-            //老用户直接进入系统
-          
-            if(res.data.data.role != 0){
-              wx.switchTab({
-                url: '../index/index',
-              })
-              
-              return;
-            }
 
-            //新用户选择报名
-            _this.setData({
-              status:3,
-              player_type:0
-            })
+          _this.setData({
+            openid:res.data.data.openid,
+            unionid:res.data.data.unionid,
+          })
+          
+          $api.isUserLogin({openid:res.data.data.openid,unionid:res.data.data.unionid})
+          .then(res=>{
             wx.hideLoading();
-            wx.setNavigationBarTitle({
-              title: '',
-            })
             if (res.data.code != 0) {
               wx.showToast({
                 icon: 'none',
@@ -232,7 +187,21 @@ Page({
               })
               return;
             }
-          
+            
+            //有登录
+            if(res.data.data.id){
+              _this.setData({
+                nickName:res.data.data.username,
+                avatarUrl:res.data.data.avatar,
+              })
+              _this.wxlogin()
+              
+            } else{
+              _this.setData({
+                status:10,
+              })
+            }
+      
           })
           .catch(err=>{
             wx.hideLoading();
@@ -246,6 +215,60 @@ Page({
       }
     })
   },
+  wxlogin(){
+    var _this=this;
+    wx.showLoading({
+      title: '正在登陆',
+    })
+    var udata = {};
+    udata.openid    = this.data.openid;
+    udata.unionid   = this.data.unionid;
+    udata.nickName  = this.data.nickName;
+    udata.avatarUrl = this.data.avatarUrl;
+
+    $api.login(udata)
+    .then(res=>{
+      //登录成功
+      wx.hideLoading();
+      if (res.data.code != 0) {
+        wx.showToast({
+          icon: 'none',
+          title: res.data.message,
+        })
+        return;
+      }
+
+      wx.setStorage({
+        key: 'userInfo',
+        data: res.data.data,
+      })
+      
+      //老用户直接进入系统
+      if(res.data.data.role != 0){
+        app.globalData.follow = 1
+        wx.switchTab({
+          url: '../index/index',
+        })
+        
+        return;
+      }
+
+      //新用户选择报名
+      _this.setData({
+        status:3,
+        player_type:0
+      })
+      
+      wx.setNavigationBarTitle({
+        title: '',
+      })
+    
+    })
+    .catch(err=>{
+      wx.hideLoading();
+    })
+  },
+
   login1(){
     logindata.phone=this.data.phone
     logindata.phcode=this.data.phcode

+ 97 - 9
pages/message/message.js

@@ -13,7 +13,10 @@ Page({
         scrollTop:0,
         template_id:"S7423qLZ0QBhHAI6lfqYwc6CILw5EtADmN3m_5oMnts",
         subscribe:false,
-        disable:false
+        disable:false,
+        list:[],
+        width:0,
+        height:0,
     },
 
     /**
@@ -38,9 +41,16 @@ Page({
         timer=setInterval(f,10000)
         function f(){
           $api.getconsult().then(res=>{
+            var nlist = _this.data.list
+            
             _this.setData({
                 list:res.data.data.list
             })
+            
+            if(_this.data.list.length > nlist.length){
+              _this.scroll()
+            }
+            
         })
         }
     },
@@ -86,7 +96,84 @@ Page({
           })
         })
     },
+    sendImage(url,width,height){
+      var data={
+        cotent:url,
+        width:width,
+        height:height,
+      }
 
+      if(!data.cotent){
+          return
+      }
+      this.setData({
+        disable:true
+      })
+      $api.consult(data).then(res=>{
+        this.getData()
+        this.setData({
+          comment:'',
+          disable: false
+        })
+      })
+    },
+
+     //预览
+    preview(e){
+      console.log(e)
+      var images = []
+      images[0] = e.target.dataset.urls
+
+      wx.previewImage({
+        urls: images,
+        current: 0
+      })
+    },
+    scroll(){
+      let that = this;
+      wx.createSelectorQuery().select("#messageScroll").boundingClientRect(function(rect){
+        wx.pageScrollTo({
+          scrollTop:rect.height,
+          duration:100
+        })
+      }).exec()
+    },
+
+    uploadImg(){
+      let _this = this;
+
+      wx.chooseImage({
+        success: res => {
+          wx.showLoading({
+            title: '正在上传',
+          })
+          const tempFilePaths = res.tempFiles
+          for (let i = 0; i < tempFilePaths.length; i++) {
+            $api.uploadAvatar(tempFilePaths[i].path,'file').then(res=>{
+                wx.hideLoading()
+                if(res.code == 0){
+                  var url = res.data.url
+                  wx.getImageInfo({
+                    src: tempFilePaths[i].path,
+                    success:function(res){
+                      _this.sendImage(url,res.width,res.height)
+                    }
+                  })
+
+                }else{
+                  wx.showToast({
+                    title: '上传失败',
+                  })
+                }
+            })
+            .catch(err=>{
+              wx.hideLoading()
+            })
+          }
+  
+        }
+      })
+    },
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
@@ -98,16 +185,17 @@ Page({
      * 生命周期函数--监听页面显示
      */
     onShow: function () {
-      let that = this;
-      wx.createSelectorQuery().select("#messageScroll").boundingClientRect(function(rect){
-        console.log(rect)
-        wx.pageScrollTo({
-          scrollTop:rect.height,
-          duration:100
-        })
-      }).exec()
+      // let that = this;
+      // wx.createSelectorQuery().select("#messageScroll").boundingClientRect(function(rect){
+      //   wx.pageScrollTo({
+      //     scrollTop:rect.height,
+      //     duration:100
+      //   })
+      // }).exec()
     },
 
+
+
     /**
      * 生命周期函数--监听页面隐藏
      */

+ 13 - 5
pages/message/message.wxml

@@ -1,18 +1,26 @@
 <view id="messageScroll">
-    <view class="list" wx:for="{{list}}" >
+    <view class="list" wx:for="{{list}}">
         <view class="me" wx:if='{{item.user_id}}'>
-            <image src="{{item.user_avatar}}" ></image>
-            <view class="content">{{item.content}}</view>
+            <image class="mehead" src="{{item.user_avatar}}" ></image>
+            <view wx:if="{{item.width > 0}}">
+              <image mode="widthFix" class="contentimage" src="{{item.content}}" catchtap="preview" data-urls='{{item.content}}'></image>
+            </view>
+            <view wx:else class="content">{{item.content}}</view>
+
         </view>
         <view class="wz" wx:else>
-            <image src="../../images/wz.jpg" ></image>
+            <image class="wzhead" src="../../images/wz.jpg" ></image>
             <view>
                 <text class="name">顽主</text>
-                <view class="content">{{item.reply_content}}</view>
+                <view  wx:if="{{item.width > 0}}">
+                  <image mode="widthFix" class="huipic" src="{{item.reply_content}}" catchtap="preview" data-urls='{{item.reply_content}}'></image>
+                </view>
+                <view wx:else class="content">{{item.reply_content}}</view>
             </view>
         </view>
     </view>
     <view class="post">
+        <image class="add" catchtap="uploadImg" src="../../images/add.png"></image>
         <input confirm-type='send' bindconfirm='post' value="{{comment}}" placeholder-style="color:#999" maxlength="500" bindinput="inputchange" type="text" placeholder="我要咨询"/>
         <button wx:if="{{!subscribe}}" disabled="{{disable}}" bindtap="subscribe">提交</button>
         <button wx:else bindtap="post" disabled="{{disable}}">提交</button>

+ 28 - 7
pages/message/message.wxss

@@ -3,12 +3,17 @@ page{
     padding: 30rpx 30rpx 160rpx;
     background: #F7F7F7;
 }
+
 .list{
     position: relative;
     margin-bottom: 80rpx;
+    float: left;
+    width: 100%;
 }
+
 .list:last-child{
     padding-bottom: 160rpx;
+    width: 100%;
 }
 .post{
     position: fixed;
@@ -23,7 +28,7 @@ page{
     width: 100%;
 }
 .post input{
-    width: 75%;
+    width: 62%;
     height: 64rpx;
     border: 1px solid rgba(224, 224, 224, 1);
     border-radius: 9rpx;
@@ -44,11 +49,8 @@ page{
     font-weight: 400;
     margin: 0;
 }
-.list{
-    float: left;
-    width: 100%;
-}
-.wz image{
+
+.wzhead{
     width: 64rpx;
     height: 64rpx;
     border-radius: 100%;
@@ -64,11 +66,17 @@ page{
     border-radius: 8rpx;
     
 }
+.huipic{
+  max-width: 80%;
+  margin-left: 20rpx;
+  border-radius: 8rpx;
+}
+
 .wz>view{
     max-width: 80%;
     float: left;
 }
-.me image{
+.mehead{
     width: 64rpx;
     height: 64rpx;
     border-radius: 100%;
@@ -85,6 +93,14 @@ page{
     border-radius: 8rpx;
     max-width: 80%;
 }
+
+.me .contentimage{
+  float: right;
+  max-width: 80%;
+  margin-right: 20rpx;
+  border-radius: 8rpx;
+  
+}
 .name{
     display: block;
     font-size: 28rpx;
@@ -115,4 +131,9 @@ page{
 .subscribe .noticeMsg{
   padding-left:60rpx;
   color: red;
+}
+
+.add{
+  width: 64rpx;
+  height: 64rpx;
 }

+ 11 - 9
pages/signup/signup.js

@@ -136,12 +136,13 @@ Page({
       }
       $api.wxpay(data).then(res=>{
           if(res.data.data.free){
-              wx.showToast({
-                title: '报名成功',
-              })
-              wx.switchTab({
-                url: '../index/index'
-              });
+            app.globalData.follow = 1
+            wx.showToast({
+              title: '报名成功',
+            })
+            wx.switchTab({
+              url: '../index/index'
+            });
           }
           var timestamp = Math.round(new Date().getTime() / 1000).toString();
           var paySign = md5('appId=' + res.data.data.appid + '&nonceStr=' + res.data.data.nonce_str + '&package=prepay_id=' + res.data.data.prepay_id + '&signType=MD5&timeStamp=' + timestamp + '&key=' + res.data.data.key).toUpperCase();
@@ -153,9 +154,10 @@ Page({
               signType: 'MD5',
               paySign: paySign,
               success(res) { 
-                  wx.showToast({
-                    title: '报名成功',
-                  })
+                app.globalData.follow = 1
+                wx.showToast({
+                  title: '报名成功',
+                })
                 wx.switchTab({
                   url: '../index/index'
                 });

+ 1 - 1
pages/today/today.wxml

@@ -24,7 +24,7 @@
     <view class="data" style="padding-right:30rpx;border-right: 1px solid rgba(245, 245, 245, 1);">
       <text class="label">日期</text><text>{{datas.today_record.stock_date}}</text>
       <text class="label">今日资产</text><text>{{datas.today_record.today_fund}}W</text>
-      <view wx:if='{{datas.today_record.today_record.is_markt}}'>
+      <view  class = "label" wx:if='{{datas.today_record.is_markt}}'>
             开超市
       </view>
       <block wx:elif='{{datas.today_record.today_stock_total>0}}'>

+ 48 - 15
pages/upload/upload.js

@@ -92,6 +92,8 @@ Page({
     var v = e.target.dataset.name
     var stock=this.data.stock;
     stock[i].name = v
+    stock[i].code = e.target.dataset.id
+
     this.setData({
       stock: stock
     })
@@ -221,9 +223,29 @@ Page({
   },
   post(){
     if (!this.data.need_fill) {
+      var stocks = []
+      var slist = this.data.stock
+
+      for(let i=0;i<slist.length;i++){
+        if(slist[i].name.length <= 0){
+          continue;
+        }
+
+        if(slist[i].fund > 5000){
+          wx.showToast({
+            icon: 'none',
+            title: '持仓金额单位为万'
+          })
+          return;
+          break;
+        }
+
+        stocks.push(slist[i])
+      }
+
       var parm = {
         stock_date: this.data.stock_date,
-        today_stock: this.data.stock,
+        today_stock: stocks,
         is_markt: this.data.is_markt,
         today_stock_img: this.data.today_stock_img,
         today_fund: Number(this.data.today_fund),
@@ -237,21 +259,32 @@ Page({
         })
         return
       }
-      if (!parm.is_markt) {
-        // for (let i = 0; i < parm.today_stock.length;i++){
-        //   if (!parm.today_stock[i].name || !parm.today_stock[i].fund) {
-        //     wx.showToast({
-        //       icon: 'none',
-        //       title: '请选择股票并输入资金额'
-        //     })
-        //     return;
-        //     break;
-        //   }
-        // }
 
-      } else {
-        parm.today_stock = []
+      if (parm.today_fund >= 10000) {
+        wx.showToast({
+          icon: 'none',
+          title: '今日净资产单位为万'
+        })
+        return
       }
+
+      // if (!parm.is_markt) {
+      //   // for (let i = 0; i < parm.today_stock.length;i++){
+      //   //   if (!parm.today_stock[i].name || !parm.today_stock[i].fund) {
+      //   //     wx.showToast({
+      //   //       icon: 'none',
+      //   //       title: '请选择股票并输入资金额'
+      //   //     })
+      //   //     return;
+      //   //     break;
+      //   //   }
+      //   // }
+
+      // } else {
+      //   parm.today_stock = []
+      // }
+
+      console.log(parm)
       if (parm.today_stock_img.length <= 0) {
         wx.showToast({
           icon: 'none',
@@ -285,7 +318,7 @@ Page({
             
           })
           wx.switchTab({
-            url: '../index/index',
+            url: '../user/user',
           })
         }, 200)
       })

+ 3 - 3
pages/upload/upload.wxml

@@ -6,7 +6,7 @@
     <input type='digit' value="{{today_fund}}" bindinput="fundChange1" placeholder="请输入今日净资产"></input>
     <text style="color:red;font-weight:500">万</text>
     
-    <block wx:if='{{!is_markt}}'>
+    <!-- <block wx:if='{{!is_markt}}'> -->
     <view class="label">今日持股<text class="note">(空仓请留空不填)</text></view>
     <view class="info" wx:for='{{stock}}' >
       <input bindinput='stockSearch'   data-id='{{index}}'  value="{{item.name}}" placeholder="股票名称"></input>
@@ -17,11 +17,11 @@
       </view>
       
       <view class="stock_list" wx:if='{{stockList.length>0 && cur==index}}'>
-        <view wx:for='{{stockList}}' catchtap="bindPickerChange" wx:for-item='s' wx:for-index='i'  data-name='{{s.name}}' wx:key='{{index+""+i}}'>{{s.label}}</view>
+        <view wx:for='{{stockList}}' catchtap="bindPickerChange" wx:for-item='s' wx:for-index='i'  data-name='{{s.name}}' data-id="{{s.code}}" wx:key='{{index+""+i}}'>{{s.label}}</view>
       </view>
     </view>
     <view bindtap="add" class="add"> + 添加持股</view>
-    </block>
+    <!-- </block> -->
     <view class="openmarket">  
         开超市<text class="note">(持股超5支可选)</text>  
         <switch color='#D94B24' checked="{{is_markt}}" bindchange="switch1Change" />

+ 2 - 159
pages/user/user.js

@@ -2,23 +2,14 @@
 const app = getApp()
 var host = app.globalData.host;
 const $api = require('../../utils/api.js').API;
-var logindata={}
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
-    usercode: '',
-    phone:'',
-    phcode:'',
-    openid: '',
-    info: {},
     userinfo:{},
     todayinfo:{},
-    todayMoney:'',
-    status:0,
-    text:'获取验证码'
   },
 
   /**
@@ -26,52 +17,17 @@ Page({
    */
   onLoad: function (options) {
     this.getUserData()
-    
   },
   zx(){
     wx.navigateTo({
       url: '../message/message',
     })
   },
-  getcode(){
-    if(this.data.phone.length>=11){
-      $api.sendcode({phone:this.data.phone}).then(res=>{
-        this.countdown()
-      })
-    }else{
-      wx.showToast({
-        icon: 'none',
-        title: '请输入正确的手机号',
-      })
-    }
-    
-  },
-  countdown(){
-    var count=60,_this=this;
-    var timer=setInterval(c,1000)
-    function c(){
-      if(count>0){
-        count--;
-        _this.setData({
-          text:count+"s重新发送"
-        })
-      }else{
-        _this.setData({
-          text:'获取验证码'
-        })
-        clearInterval(timer)
-      }
-    }
-    
-    
-    
-  },
+
   getUserData() {
     $api.getAuthinfo().then(res=>{
       this.setData({
-        usercode: res.data.data.usercode,
         userinfo: res.data.data,
-        status:3
       })
     })
     .catch(err=>{
@@ -96,16 +52,7 @@ Page({
     })
   },
 
-  inputchange(e) {
-    this.setData({
-      phone: e.detail.value
-    })
-  },
-  codechange(e) {
-    this.setData({
-      phcode: e.detail.value
-    })
-  },
+
   logout() {
     wx.removeStorage({
       key: 'userInfo'
@@ -118,110 +65,7 @@ Page({
       url: '../login/user',
     })
   },
-  /**登陆 */
-  login: function () {
-    var _this=this;
-    // if (!this.data.usercode) {
-    //   wx.showToast({
-    //     icon: 'none',
-    //     title: '请输入用户代码',
-    //   })
-    //   return;
-    // }
-    wx.getUserProfile({
-      desc: '用于完善会员资料',
-      success: res=> {
-        //获取基本信息
-        var data = {
-          nickName: res.userInfo.nickName,
-          avatarUrl: res.userInfo.avatarUrl,
-          usercode: this.data.usercode
-        }
-        wx.showLoading({
-          title: '正在登陆',
-        })
-        wx.login({
-          success(res) {
-            //获取code
-            $api.getOpenid({ code: res.code})
-            .then(res => {
-              //获取openid
-              if (res.data.code != 0) {
-                wx.showToast({
-                  icon: 'none',
-                  title: res.data.message,
-                })
-                wx.hideLoading();
-                return;
-              }
-              data.openid = res.data.data.openid;
-              logindata=data
-              $api.login(data)
-              .then(res=>{
-                //登录成功
-                _this.setData({
-                  status:res.data.data.status
-                })
-                wx.hideLoading();
-                wx.setNavigationBarTitle({
-                  title: '',
-                })
-                if (res.data.code != 0) {
-                  wx.showToast({
-                    icon: 'none',
-                    title: res.data.message,
-                  })
-                  return;
-                }
-                wx.setStorage({
-                  key: 'userInfo',
-                  data: res.data.data,
-                })
-                if(res.data.data.status == 3){
-                  _this.getUserData()
-                  _this.getTodayData()
-                  
-                  // wx.switchTab({
-                  //   url: '../index/index',
-                  // })
-                }
-                
-              })
-              .catch(err=>{
-                wx.hideLoading();
-              })
-            })
-            .catch(err => {
-              //请求失败
-              wx.hideLoading();
-            })
-        
-          }
-        })
-      }
-    })
-
-  },
-  login1(){
-    logindata.phone=this.data.phone
-    logindata.phcode=this.data.phcode
-    $api.login(logindata).then(res=>{
-      if(res.data.code == 0){
   
-          this.getUserData()
-          this.getTodayData()
-      } 
-    })
-  },
-  login2(){
-    $api.bindphone({phone:this.data.phone,phcode:this.data.phcode}).then(res=>{
-      if(res.data.code == 0){
-      
-          this.getUserData()
-          this.getTodayData()
-      }
-    })
-  },
   onCustomerService(){
     wx.openCustomerServiceChat({
       extInfo: {url: 'https://work.weixin.qq.com/kfid/kfcc1bd2a8bddad1dfb'},
@@ -230,7 +74,6 @@ Page({
     })
   },
  
-
   /**
    * 生命周期函数--监听页面初次渲染完成
    */

+ 1 - 17
pages/user/user.wxml

@@ -5,7 +5,7 @@
         </view>
         <view class="name">
             <view>{{userinfo.username}}</view>
-            <text wx:if='{{userinfo.id}}'>代码:{{usercode}}</text>
+            <text wx:if='{{userinfo.id}}'>代码:{{userinfo.usercode}}</text>
         </view>
         <navigator  url="../homepage/homepage?user_id={{userinfo.id}}&type=1" class="mine">我的主页</navigator>
       </view>
@@ -34,25 +34,11 @@
 
 
       <view class="list" style="padding:0 30rpx;background:#fff;">
-        <!-- <navigator hover-class="none"  class="item" url="../choice/choice">
-            我的自选
-              <button class="contactus"></button>
-              <image mode="widthFix" src="../../images/right_icon.png"></image>
-        </navigator> -->
         <navigator hover-class="none"  class="item" url="../message/message">
             咨询顽主
               <button class="contactus"></button>
               <image mode="widthFix" src="../../images/right_icon.png"></image>
         </navigator>
-        <!-- <navigator hover-class="none"  class="item" url="../follow/follow">
-            我的关注  <image mode="widthFix" src="../../images/right_icon.png"></image>
-        </navigator>
-        <navigator hover-class="none"  class="item" url="../mymatch/mymatch">
-            我的比赛  <image mode="widthFix" src="../../images/right_icon.png"></image>
-        </navigator> -->
-        <!-- <navigator hover-class="none" class="item" url="../style/style">
-            我的风格  <image mode="widthFix" src="../../images/right_icon.png"></image>
-        </navigator> -->
         <navigator hover-class="none"  class="item" url="../aboutus/aboutus">
             关于我们  <image mode="widthFix" src="../../images/right_icon.png"></image>
         </navigator>
@@ -65,8 +51,6 @@
   
 </view>
 
-
-
 <view class="no_login" wx:if="{{!userinfo.id}}">
   <view class="title">欢迎来到湖南顽主杯实盘大赛</view>
     <view class='avatar'>

+ 1 - 0
utils/api.js

@@ -159,6 +159,7 @@ const API = {
   getExperience: (data) => request(GET, `/api/wx/v3/experience/list`, data),
   getUserMatch: (data) => request(GET, `/api/wx/v3/user/match/list`, data),
   getUserInfo: (data) => request(GET, `/api/wx/user/info`, data),
+  isUserLogin: (data) => request(GET, `/api/wx/v3/authinfo`, data),
 }; 
 module.exports = {
   API: API