1:首先声明:对于小白可能还是有点用 我也是入门不久,欢迎指出问题。
2:先上效果图:
3:index(我的)页面wxml:
<!-- 用户信息:头像,呢称 /登录 -->
<view class="xx">
<view><image src="{
{avatarUrl}}" class="tx"></image></view>
<view class="mz" >{
{name}}</view>
<view bindtap="getUserProfile" class="underline">登录</view>
</view>
<!-- 分割线 -->
<view class="hr"></view>
<!-- 循环数组 mySet -->
<view wx:for="{
{mySet}}" bindtap="onMySet" data-type="{
{item.name}}">
<!-- 图标和循环myset中的文字 -->
<view class="vv_1">
<image class="image1" src="{
{item.img}}"/>
{
{item.name}}
<view class="icon">></view>
</view>
</view>
<!-- 分割线 -->
<view class="hr2"></view>
4:index(我的)页面js:
Page({
/**
* 页面的初始数据
*/
data: {
avatarUrl:"",
name: "",
m:"0",
mySet:[
{
'name':"我的预约",
'img':"../images/预约.png"
},
{
'name':"我的收藏",
'