【金秋打卡】第19天 破解JavaScript高级玩法 第五讲
标签:
JavaScript
课程名称: 破解JavaScript高级玩法
课程章节: 玩转数组高级技法
主讲老师: Cloud
课程内容:
今天学习的内容包括:
数组高级技法的运用
课程收获:
5.1 心得:
var vm = new Vue({
el: "#wrap",
data: {
city: "长沙市",
islogin: false,
nike: '',
key: "497019908a1741a199f861f40ea4b7d4",//32位
iv: "b9a8a2eb9bb02b30",//16位
},
created() {
var params = getUrlParam();
// 是否存在参数
if (JSON.stringify(params) != "{}") {
var umi = Decrypt(params.umi, this.key, this.iv);
var els = Decrypt(params.els, this.key, this.iv);
var pl = Decrypt(params.pl, this.key, this.iv);
var userInfo = {
id: umi,
nike: els,
photo: pl
};
account.setUserInfo(JSON.stringify(userInfo));
}
//判断是否登录
var islogined = account.islogin();
if (islogined) {
var userinfo = JSON.parse(account.getUserInfo());
this.nike = userinfo.nike;
}
this.islogin = islogined;
//console.log(this.islogin)
// console.log(umi)
// console.log(els)
// console.log(pl)
GetLocation();
GetHomeData();
},
mounted() {
},
methods: {
Logout: function () {
account.logout();
location.href = "index.html";
},
}
});
$(function(){
var islogin=false;
var nike="";
//判断是否登录
var islogined= account.islogin();
if(islogined)
{
var userinfo=JSON.parse(account.getUserInfo());
nike=userinfo.nike;
$("#nike").html(nike)
$("#Nologin").hide();
$("#Islogin").show();
}
else
{
$("#Nologin").show();
$("#Islogin").hide();
}
})
function Logout(){
account.logout();
location.href = "../index.html";
}
/* pages/dateSelect/dateSelect.wxss */
.compicker{
width: 427px;
height: 395px;
background-color: #fff;
border: 1px solid #ccc;
}
.date-day {
display: flex;
/* padding: 5px; */
text-align: center;
justify-content: center;
align-items: center;
flex-direction: column;
width: 61px !important;
height: 50px !important;
}
.date-day.bgitem {
background-color: #d8ecf9;
}
.date-day.active {
background: #099fde;
color: #fff;
}
.date-day.unavailable {
color: #aaa;
pointer-events: none;
}
.date-week {
display: flex;
justify-content: center;
align-content: center;
margin: 5px;
}
.week {
color: #099fde;
}
.row {
display: flex;
flex-direction: row;
}
.item-days {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-size: 17.5px;
}
.amount{
font-size: 15px;
}
.bgwhite {
background-color: #fff;
}
.date-year-month {
text-align: center;
font-size: 17.5px;
height: 50px;
line-height: 50px;
display: flex;
justify-content: center;
align-items: center;
}
.date-year-month image{
height: 17.5px;
width: 17.5px;
margin: 0 15px;
}
点击查看更多内容
为 TA 点赞
评论
共同学习,写下你的评论
评论加载中...
作者其他优质文章
正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦