第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定

【金秋打卡】第6天 全新升級,基于Vue3新標(biāo)準(zhǔn),打造后臺綜合解決方案 第六講

標(biāo)簽:
Vue.js

课程章节: vue3 + element plus 综合实现解决方案与个人中心页面实现

主讲老师: Sunday

课程内容:

今天学习的内容包括:

开发个人中心页面

课程收获:

6.1 心得:

// pages/userHome/userHome.js

var config = require("../../utils/config.js");
var app = getApp();
Page({

	/**
	 * 页面的初始数据
	 */
	data: {
    userInfo: {},
		isLogin: false
	},

	/**
	 * 生命周期函数--监听页面加载
	 */
	onLoad: function (options) {

	},

	/**
	 * 生命周期函数--监听页面初次渲染完成
	 */
	onReady: function () {

	},

	/**
	 * 生命周期函数--监听页面显示
	 */
	onShow: function () {
    this.loadData();
	},
  loadData: function () {
    var that = this;
    app.getOpenId(function (openid) {
      if (openid) {
        config.httpGet(app.getUrl('api/BiddMemberCenter/GetUser'), {
          openId: openid,
          userkey: ""
        }, function (res) {
          if (res.result) {
            res.data.Photo = app.globalData.wxUserInfo.headImage ? app.globalData.wxUserInfo.headImage : res.data.Photo;
            that.setData({
              isLogin: true,
              userInfo: res.data
            });
            wx.setStorageSync('userInfo', res.data);
          }
        });


      } else {
        that.setData({
          isLogin: false
        });
      }
    }, "userhome");

  },
	bindUserTap: function (e) {
		var url = e.currentTarget.dataset.url;
		if (!this.data.isLogin) {
		  url = '../login/login';
		}
		wx.navigateTo({
		  url: url
		})
	},

	  goLogin: function () {
		wx.navigateTo({
		  url: '../login/login'
		})
	  },

	  exitLoginout: function () {
		var that = this;
		wx.showModal({
		  title: '提示',
		  content: '确定退出登录吗?',
		  success: function (res) {
			if (res.confirm) {
			  wx.removeStorageSync('wxOpenId');
			  wx.removeStorageSync("userInfo");
			  app.globalData.wxUserInfo = null;
			  app.globalData.openId = "";
			  that.setData({
				isLogin: false
			  });
			}
		  }
		})
	  },
	/**
	 * 生命周期函数--监听页面隐藏
	 */
	onHide: function () {

	},

	/**
	 * 生命周期函数--监听页面卸载
	 */
	onUnload: function () {

	},

	/**
	 * 页面相关事件处理函数--监听用户下拉动作
	 */
	onPullDownRefresh: function () {

	},

	/**
	 * 页面上拉触底事件的处理函数
	 */
	onReachBottom: function () {

	},

	/**
	 * 用户点击右上角分享
	 */
	onShareAppMessage: function () {

	}
})
/* pages/userHome/userHome.wxss */

.user_info {
	display: flex;
	align-items: center;
	width: 686rpx;
	margin: 0 auto 47rpx auto;
	line-height: 1;
}

.user_info image {
	width: 120rpx;
	height: 120rpx;
	border-radius: 50%;
	margin-right: 26rpx;
}

.login,
.user_name {
	color: #2E2E2E;
	font-size: 44rpx;
	margin-bottom: 21rpx;
}

.welcome {
	font-size: 24rpx;
	color: #C4C4C4;
}

.coupon {
	width: 686rpx;
	height: 240rpx;
	background: #FFFFFF;
	border: 2rpx solid #C8C8C8;
	border-radius: 12rpx;
	margin: 0 auto;
}

.coupon_title {
	display: flex;
	justify-content: space-between;
	margin: 30rpx 52rpx 16rpx 30rpx;
}

.coupon_package {
	font-size: 30rpx;
	color: #2E2E2E;
}

.view_all {
	font-size: 26rpx;
	color: #C4C4C4;
}

.coupon_list {
	display: flex;
	justify-content: space-around;
}

.coupon_detail {
	text-align: center;
	font-size: 26rpx;
	color: #C4C4C4;
	line-height: 1;
}

.coupon_detail image {
	width: 88rpx;
	height: 88rpx;
	margin-bottom: 12rpx;
}

.list{
	width: 686rpx;
	height: 88rpx;
	background: #FFFFFF;
	border: 2rpx solid #C8C8C8;
	border-radius: 12rpx;
	margin: 16rpx auto 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.contact {
	width: 686rpx;
	padding: 0;
	height: 88rpx;
	background: #FFFFFF;
	border: 2rpx solid #C8C8C8;
	border-radius: 12rpx;
	margin: 16rpx auto 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.list {
	width: 686rpx;
	height: 88rpx;
	background: #FFFFFF;
	border: 2rpx solid #C8C8C8;
	border-radius: 12rpx;
	margin: 16rpx auto 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
}


.list_left {
	display: flex;
	align-items: center;
	margin-left: 30rpx;
	font-size: 30rpx;
	color: #2E2E2E;
	line-height: 1;
}

.list_icon {
	width: 30rpx;
	height: 30rpx;
	margin-right: 18rpx;
}

.jump {
	width: 14rpx;
	height: 26rpx;
	margin-right: 30rpx;
}

图片描述

點(diǎn)擊查看更多內(nèi)容
TA 點(diǎn)贊

若覺得本文不錯,就分享一下吧!

評論

作者其他優(yōu)質(zhì)文章

正在加載中
  • 推薦
  • 評論
  • 收藏
  • 共同學(xué)習(xí),寫下你的評論
感謝您的支持,我會繼續(xù)努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進(jìn)行掃碼打賞哦
今天注冊有機(jī)會得

100積分直接送

付費(fèi)專欄免費(fèi)學(xué)

大額優(yōu)惠券免費(fèi)領(lǐng)

立即參與 放棄機(jī)會
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號

舉報(bào)

0/150
提交
取消