分析题
代码如下:
.github-info{
padding: 10px 5px;
font-size: 16px;
font-family: "Microsoft YaHei";
line-height: 20px;
margin-bottom: 10px;
}
.url{
color: blue;
}
<view class="github-info">
<view>微信小程序不支持跳转第三方网页</view>
<view>手动复制GitHub地址吧:</view>
<view class="url">https://github.com/dunizb/wxapp-sCalc</view>
</view>
<view class="github-info">
<view>另外,如果你不喜欢计算器,我还做了一个豆瓣电影的微信小程序</view>
<view>GitHub地址:</view>
<view class="url">https://github.com/dunizb/wxapp-movie</view>
</view>
操作题
.buju1{
justify-content: space-around;
display: flex;
border-bottom: 1.5px solid #d1c8c8;
}
.to{
text-align: center;
height: 40px;
line-height: 40px;
}
.buju2{
display: flex;
justify-content: space-around;
height: 40px;
line-height: 40px;
box-shadow: 0 5px 10px rgba(0, 0, 0, .4);
}
.one{
border-bottom:2px solid rgb(230, 90, 90) ;
}
.ynag{
text-align: center;
}
.buju3{
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.tu{
margin-top: 10px ;
width: 200px;
border: 2px solid black;
text-align: center;
height: 200px;
line-height: 200px;
}
<view class="buju1">
<view class="to">行业趋势指南</view>
<view class="to">年度趋势指南</view>
</view>
<view class="buju2">
<view class="one ynag">最新发布</view>
<view class="ynag">单品</view>
<view class="ynag">色彩</view>
<view class="ynag">风格</view>
<view class="ynag">细节</view>
<view class="ynag">面料</view>
</view>
<view class="buju3">
<view class="tu"></view>
<view class="tu"></view>
<view class="tu"></view>
<view class="tu"></view>
<view class="tu"></view>
<view class="tu"></view>
</view>
const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'
Page({
data:{
motto: 'Hello World',
userInfo:{
avatarUrl: defaultAvatarUrl,
nickName: '',
},
hasUserInfo: false,
canIUseGetUserProfile: wx.canIUse('getUserProfile'),
canIUseNicknameComp: wx.canIUse('input.type.nickname'),
},
bindViewTap(){
wx.navigateTo({
url: './logs/logs'
})
},
onChooseAvatar(e) {
const {avatarUrl} = e.detail
const {nickName} = this.data.userInfo
this.setData({
"userInfo.avatarUrl": avatarUrl,
hasUserInfo: nickName && avatarUrl && avatarUrl!== defaultAvatarUrl,
})
},
onInputChange(e) {
const nickName = e.detail.value
const {avatarUrl } = this.data.userInfo
this.setData({
"userInfo.nickName": nickName,
hasUserInfo: nickName && avatarUrl && avatarUrl!== defaultAvatarUrl,
})
},
getUserProfile(e) {
success: (res) => {
console.log(res)
this.setData({
userInfo: res.userInfo,
hasUserInfo: true
})
}
})
},
})
{
"usingComponents": {
}
}