国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

微信小程序--個人主頁的制作

這篇具有很好參考價值的文章主要介紹了微信小程序--個人主頁的制作。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點(diǎn)擊"舉報違法"按鈕提交疑問。

個人中心頁面-user

- 頁面效果

1. 效果圖:

微信小程序--個人主頁的制作

2.頁面wxml的布局邏輯

(1)代碼:

<!-- 獲取個人信息主頁 -->
<view class="user_info_wrap">
<view wx:if="{{userinfo.avatarUrl}}" class="user_img_wrap">
<image class="user_bg" src="{{userinfo.avatarUrl}}" ></image>
<view class="user_info">
    <image class="user_icon" src="{{userinfo.avatarUrl}}"></image>
    <view class="user_name">{{userinfo.nickName}}</view>
</view>
</view>
<view wx:else class="user_btn">
<navigator url="/pages/login/index" >登錄</navigator>
</view>
</view>
    <view class="user_content">
  
  <view class="user_main">
    <!-- 歷史足跡 -->
    <view class="history_wrap">
      <navigator>
        <view class="his_num">0</view>
        <view class="his_name">收藏的店鋪</view>
      </navigator>
      <navigator url="/pages/collect/index">
        <view class="his_num">{{collectNums}}</view>
        <view class="his_name">收藏的商品</view>
      </navigator>
      <navigator>
        <view class="his_num">0</view>
        <view class="his_name">關(guān)注的商品</view>
      </navigator>
      <navigator>
        <view class="his_num">0</view>
        <view class="his_name">我的足跡</view>
      </navigator>
    </view>
    <!-- 我的訂單 -->
    <view class="orders_wrap">
      <view class="orders_title">我的訂單</view>
      <view class="order_content">
        <navigator url="/pages/order/index?type=1">
          <view class="iconfont icon-ding_dan"></view>
          <view class="order_name">全部訂單</view>
        </navigator>
        <navigator url="/pages/order/index?type=2">
          <view class="iconfont icon-fukuantongzhi"></view>
          <view class="order_name">待付款</view>
        </navigator>
        <navigator url="/pages/order/index?type=3">
          <view class="iconfont icon-receipt-address"></view>
          <view class="order_name">待收貨</view>
        </navigator>
        <navigator>
          <view class="iconfont icon-tuihuotuikuan_dianpu"></view>
          <view class="order_name">退款/退貨</view>
        </navigator>
      </view>
    </view>
    <!-- 收貨地址管理 -->
    <view class="address_wrap">
      收貨地址管理
    </view>
    <!-- 應(yīng)用信息相關(guān) -->
    <view class="app_info_wrap">
      <view class="app_info_item app_info_contact">
        <text>聯(lián)系客服</text>
        <text>400-618-4000</text>
      </view>
      <navigator url="/pages/feedback/index" class="app_info_item">意見反饋</navigator>
      <view class="app_info_item">關(guān)于我們</view>
    </view>
    <!-- 推薦 -->
    <view class="recommend_wrap">
      把應(yīng)用推薦給其他人
    </view>
  </view>
</view>
3.頁面wxss的設(shè)置

(1)代碼:

page {
  background-color: #edece8;
}
.user_info_wrap {
  height: 45vh;
  overflow: hidden;
  background-color: var(--themeColor);
  position: relative;
}
.user_info_wrap .user_img_wrap {
  position: relative;
}
.user_info_wrap .user_img_wrap .user_bg {
  height: 50vh;
  filter: blur(10rpx);
}
.user_info_wrap .user_img_wrap .user_info {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 20%;
  text-align: center;
}
.user_info_wrap .user_img_wrap .user_info .user_icon {
  width: 150rpx;
  height: 150rpx;
  border-radius: 50%;
}
.user_info_wrap .user_img_wrap .user_info .user_name {
  color: #fff;
  margin-top: 40rpx;
}
.user_info_wrap .user_btn {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 40%;
  border: 1rpx solid greenyellow;
  color: greenyellow;
  font-size: 38rpx;
  padding: 30rpx;
  border-radius: 10rpx;
}
.user_content {
  position: relative;
}
.user_content .user_main {
  padding-bottom: 100rpx;
  color: #666;
  position: absolute;
  width: 90%;
  left: 50%;
  transform: translateX(-50%);
  top: -40rpx;
}
.user_content .user_main .history_wrap {
  background-color: #fff;
  display: flex;
}
.user_content .user_main .history_wrap navigator {
  flex: 1;
  text-align: center;
  padding: 10rpx 0;
}
.user_content .user_main .history_wrap navigator .his_num {
  color: var(--themeColor);
}
.user_content .user_main .orders_wrap {
  background-color: #fff;
  margin-top: 30rpx;
}
.user_content .user_main .orders_wrap .orders_title {
  padding: 20rpx;
  border-bottom: 1rpx solid #ccc;
}
.user_content .user_main .orders_wrap .order_content {
  display: flex;
}
.user_content .user_main .orders_wrap .order_content navigator {
  padding: 15rpx 0;
  flex: 1;
  text-align: center;
}
.user_content .user_main .orders_wrap .order_content navigator .iconfont {
  color: var(--themeColor);
  font-size: 40rpx;
}
.user_content .user_main .address_wrap {
  margin-top: 30rpx;
  background-color: #fff;
  padding: 20rpx ;
}
.user_content .user_main .app_info_wrap {
  margin-top: 30rpx;
  background-color: #fff;
}
.user_content .user_main .app_info_wrap .app_info_item {
  padding: 20rpx ;
  border-bottom: 1rpx solid #ccc;
}
.user_content .user_main .app_info_wrap .app_info_contact {
  display: flex;
  justify-content: space-between;
}
.user_content .user_main .recommend_wrap {
  margin-top: 30rpx;
  background-color: #fff;
  padding: 20rpx ;
}

* 業(yè)務(wù)邏輯

1. 獲取登錄信息

(1)Userinfo:獲取用戶信息
(2)avatarUrl:用戶頭像
(3)nickName:用戶昵稱
(4)zh_CN:簡體中文
(5)注意:這里是獲取兩次用戶頭像,因?yàn)楸尘耙灿玫牡筋^像

<view class="user_info_wrap">
<view wx:if="{{userinfo.avatarUrl}}" class="user_img_wrap">
<image class="user_bg" src="{{userinfo.avatarUrl}}" ></image>//背景
<view class="user_info">
    <image class="user_icon" src="{{userinfo.avatarUrl}}"></image>//頭像
    <view class="user_name">{{userinfo.nickName}}</view>
</view>
</view>

(6)樣式的設(shè)置:

.user_info_wrap {
  height: 45vh;
  overflow: hidden;
  background-color: var(--themeColor);
  position: relative;
  .user_img_wrap {
    position: relative;
    .user_bg {
      height: 50vh;
      // 高斯模糊
      filter: blur(10rpx);
    }
    .user_info {
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      top: 20%;
      text-align: center;
      .user_icon{
        width: 150rpx;
        height: 150rpx;
        border-radius: 50%;
      }
      .user_name{
        color: #fff;
        margin-top: 40rpx;
        // font-size: 40rpx;
      }
    }
  }
  .user_btn{
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 40%;
    border: 1rpx solid greenyellow;
    color: greenyellow;
    font-size: 38rpx;
    padding: 30rpx;
    border-radius: 10rpx;
  }
}
2. 加載收藏信息

(1)收藏的商品數(shù)量

      <navigator url="/pages/collect/index">
        <view class="his_num">{{collectNums}}</view>
        <view class="his_name">收藏的商品</view>
      </navigator>

js

Page({
data: {
userinfo:{},
// 被收藏的商品的數(shù)量
collectNums:0},
onShow(){
    const userinfo=wx.getStorageSync("userinfo");
    const collect=wx.getStorageSync("collect")||[];
    this.setData({userinfo,collectNums:collect.length});
}
})
3. 查詢訂單狀態(tài)

+ 關(guān)鍵技術(shù)

1.css屬性filter的使?

意思也就是:高斯模糊文章來源地址http://www.zghlxwxcb.cn/news/detail-494140.html

2.獲取用戶的信息
3.對頁面整體布局的掌握

到了這里,關(guān)于微信小程序--個人主頁的制作的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請點(diǎn)擊違法舉報進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 基于github制作個人學(xué)術(shù)網(wǎng)站(主頁)

    基于github制作個人學(xué)術(shù)網(wǎng)站(主頁)

    首先找到一個學(xué)術(shù)模板,fork到遠(yuǎn)程倉庫。academicpages,如果不是很清楚具體的步驟,可以參考保姆級教程。在github上對該網(wǎng)站代碼修改不是很方便,肯定是在本地進(jìn)行更新后push到遠(yuǎn)程倉庫。 學(xué)會下載和安裝就行,一路默認(rèn),可以先學(xué)習(xí)一下Git相關(guān)的原理及基礎(chǔ)操作,可以參考

    2024年02月15日
    瀏覽(68)
  • WEB網(wǎng)頁設(shè)計期末作業(yè)個人主頁——基于HTML+CSS制作個人簡介網(wǎng)站

    WEB網(wǎng)頁設(shè)計期末作業(yè)個人主頁——基于HTML+CSS制作個人簡介網(wǎng)站

    ??個人網(wǎng)頁設(shè)計、???♂?個人簡歷制作、?????簡單靜態(tài)HTML個人網(wǎng)頁作品、?????個人介紹網(wǎng)站模板 、等網(wǎng)站的設(shè)計與制作。 ?個人網(wǎng)頁設(shè)計網(wǎng)站模板采用DIV CSS布局制作,網(wǎng)頁作品有多個頁面,如 :個人介紹(文字頁面)、我的作品(圖片列表)、個人技能(圖文頁

    2024年02月05日
    瀏覽(25)
  • 個人Scratch HTML程序合集 主頁

    個人Scratch HTML程序合集 主頁 此程序是本人制作的Scratch HTML程序合集的主頁,使用HTML+CSS編寫,整合了本人近期發(fā)布的轉(zhuǎn)換為HTML的Scratch程序的內(nèi)容,可以通過主頁內(nèi)的鏈接打開相應(yīng)的程序和博客。主頁在本地運(yùn)行,大家可以在github.com下載主頁文件及相關(guān)資源。 代碼如下

    2024年02月16日
    瀏覽(25)
  • 23.實(shí)戰(zhàn)演練--個人主頁
  • html實(shí)現(xiàn)好看的個人介紹,個人主頁模板5(附源碼)

    html實(shí)現(xiàn)好看的個人介紹,個人主頁模板5(附源碼)

    作者:xcLeigh 文章地址:https://blog.csdn.net/weixin_43151418/article/details/131273315 html實(shí)現(xiàn)好看的個人介紹,個人主頁模板5(附源碼) ,第五種風(fēng)格,html源碼下載,響應(yīng)式布局,動態(tài)展示數(shù)據(jù)效果,界面整潔,布局清晰。 代碼備注詳細(xì),可在此基礎(chǔ)上更加完善功能,打造屬于自己的個人

    2024年02月09日
    瀏覽(33)
  • html實(shí)現(xiàn)好看的個人介紹,個人主頁模板3(附源碼)

    html實(shí)現(xiàn)好看的個人介紹,個人主頁模板3(附源碼)

    作者:xcLeigh 文章地址:https://blog.csdn.net/weixin_43151418/article/details/131263195 html實(shí)現(xiàn)好看的個人介紹,個人主頁模板3(附源碼) ,第三種風(fēng)格,html源碼下載,響應(yīng)式布局,動態(tài)展示數(shù)據(jù)效果,界面整潔,布局清晰。 代碼備注詳細(xì),可在此基礎(chǔ)上更加完善功能,打造屬于自己的個人

    2024年02月10日
    瀏覽(26)
  • html網(wǎng)頁設(shè)計小作業(yè)(個人主頁)

    html網(wǎng)頁設(shè)計小作業(yè)(個人主頁)

    目錄 作品介紹: 效果展示 代碼部分: 簡易的個人網(wǎng)頁小作業(yè),只用了html+css 布局制作,沒啥好說的,直接上圖?。?! Home 頁面: ?About頁面: ? ?Hobbies頁面: Home界面: About頁面: ?Hobbies頁面: oKK,就這么多啦。。

    2024年02月11日
    瀏覽(27)
  • [Android Studio] 個人主頁界面的實(shí)現(xiàn)

    [Android Studio] 個人主頁界面的實(shí)現(xiàn)

    目錄 接上篇:底部導(dǎo)航欄的實(shí)現(xiàn) 1.個人主頁界面的設(shè)計:fragment_blank.xml 2.個人主頁功能的實(shí)現(xiàn)類:BlankFragment.java 3.每日簽到功能的實(shí)現(xiàn) 4.實(shí)現(xiàn)效果 5.圖片素材 ?補(bǔ)充說明:注意配置AndroidManifest.xml文件 自定義彈窗布局文件:pop_up_signup.xml,用于顯示簽到成功 累計簽到的天數(shù),采

    2024年01月19日
    瀏覽(106)
  • 詳細(xì)講解如何在github上編輯個人主頁?

    詳細(xì)講解如何在github上編輯個人主頁?

    ?在 GitHub 上編輯個人主頁可以讓您展示您的項(xiàng)目、技能和個人信息,以及與其他開發(fā)者互動。以下是詳細(xì)的步驟來在 GitHub 上編輯個人主頁: 如果您還沒有 GitHub 賬戶,首先需要注冊一個。 使用您的用戶名和密碼登錄到 GitHub。 您需要創(chuàng)建一個特殊的倉庫,倉庫名必須是 用戶

    2024年02月13日
    瀏覽(27)
  • 抖音web版地址個人主頁和視頻地址

    https://www.douyin.com/user/MS4wLjABAAAAfLsItSD2WiJrsji1g_iZv-it6W2CcvBFkdUwMjTeSD4 MS4wLjABAAAAfLsItSD2WiJrsji1g_iZv-it6W2CcvBFkdUwMjTeSD4 是 sec_uid。 https://v.douyin.com/h17aA6H https://www.iesdouyin.com/share/user/MS4wLjABAAAAfLsItSD2WiJrsji1g_iZv-it6W2CcvBFkdUwMjTeSD4 MS4wLjABAAAAfLsItSD2WiJrsji1g_iZv-it6W2CcvBFkdUwMjTeSD4 是 sec_uid。 下面的寫法

    2024年04月27日
    瀏覽(27)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包