index.vue 5.94 KB
<!--
 * @Date: 2022-09-29 16:32:03
 * @LastEditors: hookehuyr hookehuyr@gmail.com
 * @LastEditTime: 2022-09-30 14:14:44
 * @FilePath: /swx/src/pages/userInfo/index.vue
 * @Description: 文件描述
-->
<template>
  <view class="user-info-page">
    <view class="bg-header">
      <view style="height: 4rem; padding: 1rem;">
        <van-row>
          <van-col span="17">
            <view style="position: relative;">
              <AtAvatar circle size="large" image='https://jdc.jd.com/img/200' style="display: inline-block;"></AtAvatar>
              <view style="display: inline-block; position: absolute; top: 30%; left: 30%;">
                <text style="font-size: 1.15rem;">净妙</text>
                <van-icon :name="icon_vip" size="1rem" color="" class="vip-icon" />
              </view>
            </view>
          </van-col>
          <van-col span="7">
            <view @tap="editInfo()" style="background-color: #DABE73; color: white; padding: 0.5rem 0; border-radius: 1rem; text-align: center; font-size: 0.9rem;margin-top: 1rem;">修改资料</view>
          </van-col>
        </van-row>
      </view>
      <view style="background-color: white; margin: 1rem; padding: 1rem; border-radius: 1rem;">
        <view class="header-info">
          <view class="activity">
            <view><text style="font-size: 1.25rem;">20</text>次</view>
            <view>
              <van-icon :name="icon_join" size="1.5rem" color="" style="vertical-align: sub;" />
              <text style="font-size: 0.9rem; color: #999999;">参加活动</text>
            </view>
          </view>
          <view class="job">
            <text style="font-size: 1.25rem;">30-40</text>岁
            <view>
              <text style="font-size: 0.9rem; color: #999999;">年龄</text>
            </view>
          </view>
          <view class="sign">
            <view><text style="font-size: 1.25rem;">男士</text></view>
            <view>
              <text style="font-size: 0.9rem; color: #999999;">性别</text>
            </view>
          </view>
        </view>
      </view>
    </view>
    <view class="list-wrapper" style="margin: 1rem;">
      <view style="background-color: white; border-radius: 0.65rem; padding: 1rem;overflow: auto; margin-bottom: 1px;">
        <view style="display: inline-block; margin-right: 1rem; line-height: 60rpx;">
          <view class="bg-gradient" style="font-size: 1.15rem;">陪伴记录</view>
        </view>
        <view @tap="show_status_popup=true" style="float: right; color: #FFFFFF; font-size: 0.9rem; border-radius: 1rem; padding: 0.3rem 1rem 0.3rem 1rem; background-color: #199A74;">
          &nbsp;{{ status_type === '' ? '全部' : status_type }}&nbsp;&nbsp;
          <van-icon :name="icon_sel3" size="0.8rem" color="" style="vertical-align: middle;" />
        </view>
        <view style="float: right; margin-top: 0.25rem;">
          陪伴者:
        </view>
      </view>
      <view>
        <view style="background-color: white; padding: 1rem; border-radius: 1rem; margin-bottom: 1rem;">
          <view style="overflow: auto;">
            <view style="float: left; font-size: 1.15rem;">
              <text style="color: #999999;">状态:</text><text style="color: #199A74;">跟进</text>
            </view>
            <view style="float: right; margin-top: 0.2rem; font-size: 0.9rem; color: #222222;">
              净弘 2022-08-11 14:22
            </view>
          </view>
          <view style="margin-top: 1rem;">
            对比上次净妙这次参与活动明显的能够融入进去了,与其他学员间的交流也比较多了,期待越来越好!
          </view>
        </view>
        <view style="background-color: white; padding: 1rem; border-radius: 1rem; margin-bottom: 1rem;">
          <view style="overflow: auto;">
            <view style="float: left; font-size: 1.15rem;">
              <text style="color: #999999;">状态:</text><text style="color: #199A74;">跟进</text>
            </view>
            <view style="float: right; margin-top: 0.2rem; font-size: 0.9rem; color: #222222;">
              净弘 2022-08-11 14:22
            </view>
          </view>
          <view style="margin-top: 1rem;">
            对比上次净妙这次参与活动明显的能够融入进去了,与其他学员间的交流也比较多了,期待越来越好!
          </view>
        </view>
      </view>
    </view>
    <view style="height: 2rem;"></view>
    <bottom-button @on-submit="onSubmit">添加记录</bottom-button>

  </view>

  <!-- 切换状态弹出框 -->
  <van-popup :show="show_status_popup" position="bottom" custom-style="height: 40%;" :lock-scroll="true">
    <van-picker :show-toolbar="true" title="" confirm-button-text="确定" :columns="status_type_columns"
      toolbar-class="picker-toolbar" @confirm="onStatusTypeConfirm" @cancel="onStatusTypeCancel" @change="onStatusTypeChange" />
  </van-popup>
</template>

<script setup>
import { ref } from "vue";
import icon_vip from '@/images/icon/vip@2x.png'
import Taro from '@tarojs/taro'
import { AtAvatar } from 'taro-ui-vue3'
import "taro-ui-vue3/dist/style/components/avatar.scss"
import icon_join from '@/images/icon/baoming@2x.png'
import icon_sel3 from '@/images/icon/sel03@2x.png'
import bottomButton from "@/components/bottom-button";

const show_status_popup = ref(false);
const status_type = ref('');
const status_type_columns = ref(['净弘']);
const onStatusTypeChange = (event) => {
  const { picker, value, index } = event.detail;
}
const onStatusTypeConfirm = (event) => {
  const { picker, value, index } = event.detail;
  show_status_popup.value = false;
  status_type.value = value;
  console.warn('查询新数据');
}
const onStatusTypeCancel = (event) => {
  show_status_popup.value = false;
}

const editInfo = (val) => {
  Taro.navigateTo({
    url: '../editInfo/index'
  })
}

const onSubmit = (val) => {
  Taro.navigateTo({
    url: '../addRecord/index'
  })
}
</script>

<script>
import "./index.less";

export default {
  name: "userInfoPage",
};
</script>