灏忕▼搴忕煭瑙嗛椤圭洰鈥斺€斺€斿紑鍙戠敤鎴蜂俊鎭箣鐢ㄦ埛閫€鍑烘敞閿€

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了灏忕▼搴忕煭瑙嗛椤圭洰鈥斺€斺€斿紑鍙戠敤鎴蜂俊鎭箣鐢ㄦ埛閫€鍑烘敞閿€相关的知识,希望对你有一定的参考价值。

鏍囩锛?a href='http://www.mamicode.com/so/1/play' title='play'>play   class   .com   wrap   width   user   page   lex   login   

鍦ㄧ敤鎴风櫥闄嗘垚鍔熸垨鑰呮敞鍐屾垚鍔熶箣鍚庯紝搴旇璁╃敤鎴疯烦杞埌涓汉淇℃伅椤甸潰銆傛墍浠ユ帴涓嬫潵杩涜涓汉淇℃伅鍔熻兘鐨勫紑鍙戣杞?/p>

涓€銆佺敤鎴蜂釜浜轰俊鎭晫闈㈢殑鍒濆鍖?/p>

mine.wxml

 鎶€鏈垎浜浘鐗? src=

 

<view>
  <view class=鈥榗ontainer鈥?/span>>

    <block wx:if="{{isMe}}">
      <image src="{{faceUrl}}" class="face" bindtap=鈥榗hangeFace鈥?/span>></image>
    </block>
    <block wx:if="{{!isMe}}">
      <image src="{{faceUrl}}" class="face"></image>
    </block>
    <label class=鈥榥ickname鈥?/span>>{{nickname}}</label>

  
      <button size=鈥榤ini鈥?class=鈥榩rimary鈥?bindtap=鈥榰ploadVideo鈥?/span>> 涓婁紶浣滃搧</button>
      <button size=鈥榤ini鈥?type=鈥樷€?class=鈥榣ogout鈥?bindtap=鈥榣ogout鈥?/span>>娉ㄩ攢</button>
  
   



    <view class=鈥榗ontainer-row鈥?/span>>
      <label class=鈥榠nfo-items鈥?/span>>{{fansCounts}} 绮変笣</label>
      <label class=鈥榠nfo-items鈥?/span>>{{followCounts}} 鍏虫敞</label>
      <label class=鈥榠nfo-items鈥?/span>>{{receiveLikeCounts}} 鑾疯禐</label>
    </view>
  </view>

</view>

<view class="line"></view>

 mine.wxss

page {
    font-size: 14px;
}

.container {
    background-color: whitesmoke;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container-row {
    display: flex;
    flex-direction: row;
    margin-bottom: 10px;
    margin-top: 10px;
}

.info-items {
    margin-left: 30px;
}

.face {
    width: 180rpx;
    height: 180rpx;
    border-radius: 50%;
    margin-top: 20px;
}

.nickname {
    margin-top: 5px;
    font-weight: bold;
    font-size: 18px;
}

.logout {
    margin-top: 3px;
    float: right;
}

.follow {
    margin-top: 3px;
}

.line {
    width: 100%;
    height: 1px;
    background-color: gainsboro;
    margin-top: 1px;
}

.container-video {
    display: flex;
    flex-direction: row;
    margin-top: 20px;
    text-align: center;
    border: solid 1px;
    line-height: 30px;
}

.video-info {
    width: 100%;
}

.video-info-selected {
    background-color: gainsboro;
}

.container-video-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.videoImage {
    width: 250rpx;
    height: 180px;
}

 

 

 

浜屻€佸紑鍙戞敞閿€鎺ュ彛

鍦≧egistLoginController绫讳腑鏂板缓娉ㄩ攢鏂规硶

鎶€鏈垎浜浘鐗? src=

 

 

涓夈€佸皬绋嬪簭娉ㄩ攢涓庡悗绔仈璋?/p>

鍦ㄥ皬绋嬪簭mine.js涓婃柊澧炴敞閿€鎸夐挳鐨勭粦瀹氫簨浠?/p>

const app = getApp()

Page({
  data: {
    faceUrl: "../resource/images/noneface.png",
    
  },

  onLoad: function(params){

  },

  logout: function(){
    var user = app.userInfo;

    var serverUrl = app.serverUrl;
    wx.showLoading({
      title: 鈥樿绛夊緟...鈥?span style="color: #000000">,
    });
    // 璋冪敤鍚庣
    wx.request({
      url: serverUrl + 鈥?logout?userId=鈥?+ user.id,
      method: "POST",
      header: {
        鈥榗ontent-type鈥? 鈥榓pplication/json鈥?// 榛樿鍊?/span>
      },
      success: function (res) {
        console.log(res.data);
        wx.hideLoading();
        if (res.data.status == 200) {
          //鐧诲綍鎴愬姛璺宠浆 
          wx.showToast({
            title: 鈥樻敞閿€鎴愬姛鈥?span style="color: #000000">,
            icon: 鈥榮uccess鈥?span style="color: #000000">,
            duration: 2000
          });
          app.userInfo = null;
          //椤甸潰璺宠浆
          wx.navigateTo({
            url: 鈥?./userLogin/login鈥?span style="color: #000000">,
          })
        } 
      }
    })
  }
  
})

 

以上是关于灏忕▼搴忕煭瑙嗛椤圭洰鈥斺€斺€斿紑鍙戠敤鎴蜂俊鎭箣鐢ㄦ埛閫€鍑烘敞閿€的主要内容,如果未能解决你的问题,请参考以下文章

TiKV 鎴愪负 CNCF 鎵樼椤圭洰鈥斺€旀灦鏋勫師鐞嗕簡瑙d竴涓嬶紵| Meetup 棰勫憡

鎶栭煶鐭棰戝唴瀹圭悊瑙e拰鎺ㄨ崘绠楁硶

Spring Boot 鍓嶅悗绔紑鍙戠郴缁?瑙嗛鏁欑▼

涓汉椤圭洰璇勬祴鈥斺€斾腑灏忓鏁板鍗峰瓙鐢熸垚

灏忕▼搴忔鏋禬ePY 浠庡叆闂ㄥ埌鏀惧純韪╁潙鍚堥泦