<template>
  <view class="container">
    <!-- 头部信息 -->
    <view class="header">
      <image class="avatar" :src="avatarUrl" mode="aspectFill"></image>
      <view class="user-info">
        <text class="phone">{{ phone }}</text>
        <navigator class="personal-info" href="/pages/personalInfo">个人信息 ></navigator>
      </view>
    </view>
    <!-- 我的学习模块 -->
    <view class="my-study">
      <view class="section-title">我的学习</view>
      <view class="function-icons">
        <view class="icon-item" @click="goToCalendar">
          <image class="icon" :src="calendarIcon" mode="aspectFill"></image>
          <text class="icon-text">日历</text>
        </view>
        <view class="icon-item" @click="goToDownload">
          <image class="icon" :src="downloadIcon" mode="aspectFill"></image>
          <text class="icon-text">我的下载</text>
        </view>
        <view class="icon-item" @click="goToWrongBook">
          <image class="icon" :src="wrongBookIcon" mode="aspectFill"></image>
          <text class="icon-text">错题本</text>
        </view>
        <view class="icon-item" @click="goToSuperMember">
          <image class="icon" :src="superMemberIcon" mode="aspectFill"></image>
          <text class="icon-text">超级会员</text>
        </view>
        <view class="icon-item" @click="goToSubscribeStore">
          <image class="icon" :src="subscribeStoreIcon" mode="aspectFill"></image>
          <text class="icon-text">订阅店铺</text>
        </view>
      </view>
    </view>
    <!-- 其他功能列表 -->
    <view class="function-list">
      <navigator class="function-item" href="/pages/storeBackend">
        <image class="function-icon" :src="storeBackendIcon" mode="aspectFill"></image>
        <text class="function-text">商家店铺后台</text>
       
      </navigator>
      <navigator class="function-item" href="/pages/recycleBin">
        <image class="function-icon" :src="recycleBinIcon" mode="aspectFill"></image>
        <text class="function-text">回收站</text>
       
      </navigator>
      <navigator class="function-item" href="/pages/notificationSettings">
        <image class="function-icon" :src="notificationIcon" mode="aspectFill"></image>
        <text class="function-text">通知设置</text>
      
      </navigator>
      <navigator class="function-item" href="/pages/feedback">
        <image class="function-icon" :src="feedbackIcon" mode="aspectFill"></image>
        <text class="function-text">意见反馈</text>
     
      </navigator>
      <navigator class="function-item" href="/pages/onlineCustomerService">
        <image class="function-icon" :src="customerServiceIcon" mode="aspectFill"></image>
        <text class="function-text">在线客服</text>
      
      </navigator>
      <navigator class="function-item" href="/pages/knowXetong" @click="goToKnowXetong">
        <image class="function-icon" :src="knowXetongIcon" mode="aspectFill"></image>
        <text class="function-text" >了解小鹅通</text>
     
      </navigator>
      <navigator class="function-item" href="/pages/settings">
        <image class="function-icon" :src="settingsIcon" mode="aspectFill"></image>
        <text class="function-text">设置</text>
       
      </navigator>
    </view>
  </view>
</template>

<script>
	export default {
	  data() {
	    return {
	      // 头像地址，需替换为真实路径
	      avatarUrl: '/static/my/photo.png',
	      phone: '19931034261',
	      // 各图标地址，需替换为真实路径
	      calendarIcon: '/static/my/rili.png',
	      downloadIcon: '/static/my/wdxz.png',
	      wrongBookIcon: '/static/my/ctb.png',
	      superMemberIcon: '/static/my/svip.png',
	      subscribeStoreIcon: '/static/my/shop.png',
	      storeBackendIcon: '/static/my/gys.png',
	      recycleBinIcon: '/static/my/hsz.png',
	      notificationIcon: '/static/my/tz.png',
	      feedbackIcon: '/static/my/yj.png',
	      customerServiceIcon: '/static/my/kf.png',
	      knowXetongIcon: '/static/logo.png',
	      settingsIcon: '/static/my/sz.png',
	      arrowIcon: '/static/my/o.png'
	    };
	  },
	  methods: {
	    goToCalendar() {
	      uni.navigateTo({ url: '/pages/calendar' });
	    },
	    goToDownload() {
	      uni.navigateTo({ url: '/pages/download' });
	    },
	    goToWrongBook() {
	      uni.navigateTo({ url: '/pages/wrongBook' });
	    },
	    goToSuperMember() {
	      uni.navigateTo({ url: '/pages/superMember' });
	    },
	    goToSubscribeStore() {
	      uni.navigateTo({ url: '/pages/subscribeStore' });
	    },
		goToKnowXetong() {
          uni.navigateTo({ url: '/pages/knowXetong/knowXetong' });
	    }
	  }
	};
</script>

<style>
.container {
  background-color: #f5f7fa;
  padding: 20rpx;
}
.header {
  display: flex;
  align-items: center;
  margin-bottom: 20rpx;
}
.avatar {
  width: 80rpx;
  height: 80rpx;
  border-radius: 50%;
  margin-right: 20rpx;
}
.user-info {
  display: flex;
  flex-direction: column;
}
.phone {
  font-size: 32rpx;
  font-weight: bold;
}
.personal-info {
  font-size: 28rpx;
  color: #999;
}
.my-study {
  background-color: #fff;
  border-radius: 20rpx;
  padding: 30rpx;
  margin-bottom: 25rpx;
}
.section-title {
  font-size: 32rpx;
  font-weight: bold;
  margin-bottom: 10rpx;
}
.function-icons {
  display: flex;
  justify-content: space-between;
}
.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.icon {
  width: 60rpx;
  height: 60rpx;
  margin-bottom: 10rpx;
}
.icon-text {
  font-size: 28rpx;
}
.function-list {
  background-color: #fff;
  border-radius: 10rpx;
  padding: 30rpx;
}
.function-item {
  display: flex;
  align-items: left;
/*  justify-content: space-between; */
  padding: 25rpx 0;
  border-bottom: 1rpx solid #eee;
  text-align: left; /* 让子元素内文本靠左对齐 */
}

.function-icon {
  width: 40rpx;
  height: 40rpx;
  margin-right: 20rpx;
}
.function-text {
  text-align: left;
  font-size: 32rpx;
}

</style>
