|
@@ -1,178 +1,104 @@
|
|
|
<template>
|
|
|
- <scroll-view scroll-y class="content">
|
|
|
- <view class="top">
|
|
|
- <view class="avabox">
|
|
|
- <van-image round class="img" width="200rpx" height="200rpx" :src="userData.headImage" />
|
|
|
- <view class="avatitbox">
|
|
|
- <text>{{ userData.nickName }}</text>
|
|
|
- <text v-if="userData.gzptUserId">{{ studentInfo.logincode }}</text>
|
|
|
- <view class="sync-btn" @tap="getUserProfile">点击同步用户头像昵称</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="serviceBox">
|
|
|
- <view class="tit">
|
|
|
- <text>我的订单</text>
|
|
|
- </view>
|
|
|
- <view class="btnBox">
|
|
|
- <view class="item-box" :plain="true" @click="$utils.goPage('/pages/user/order?active=0')">
|
|
|
- <m-icon type="qbdd" font-size='22px' />
|
|
|
- <text class="text">全部订单</text>
|
|
|
- </view>
|
|
|
- <view class="item-box" :plain="true" @click="$utils.goPage('/pages/user/order?active=1')">
|
|
|
- <m-icon type="dfh" font-size='22px' />
|
|
|
- <text class="text">等待发货</text>
|
|
|
- </view>
|
|
|
- <view class="item-box" :plain="true" @click="$utils.goPage('/pages/user/order?active=2')">
|
|
|
- <m-icon type="jywc" font-size='22px' />
|
|
|
- <text class="text">交易完成</text>
|
|
|
- </view>
|
|
|
- <view class="item-box" :plain="true" @click="$utils.goPage('/pages/user/order?active=3')">
|
|
|
- <m-icon type="tksh" font-size='22px' />
|
|
|
- <text class="text">退款/售后</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="serviceBox">
|
|
|
- <view class="tit">
|
|
|
- <text>我的信息</text>
|
|
|
- </view>
|
|
|
- <van-cell title="我的设置" is-link @tap="$utils.goPage('/pages/user/set')">
|
|
|
- <m-icon slot="icon" type="shezhi" color="#d81e06"/>
|
|
|
- </van-cell>
|
|
|
- <button class="server" open-type="feedback" :plain="true">
|
|
|
- <van-cell title="意见反馈" is-link>
|
|
|
- <m-icon slot="icon" type="yjfk" color="#d81e06"/>
|
|
|
- </van-cell>
|
|
|
- </button>
|
|
|
- <button class="server" open-type="contact" :plain="true">
|
|
|
- <van-cell title="联系客服" is-link>
|
|
|
- <m-icon slot="icon" type="lxkf" color="#d81e06"/>
|
|
|
- </van-cell>
|
|
|
- </button>
|
|
|
- </view>
|
|
|
-
|
|
|
- <!-- <view class="ad-box serviceBox">
|
|
|
+ <scroll-view scroll-y class="content">
|
|
|
+ <div class="user">
|
|
|
+ <van-cell center :value="userInfo.nickName" @click="showVConsole">
|
|
|
+ <view slot="title">
|
|
|
+ <image class="user-headImg" :src="userInfo.headImage"></image>
|
|
|
+ </view>
|
|
|
+ </van-cell>
|
|
|
+ <van-cell-group class="group">
|
|
|
+ <van-cell title="我要提现" value="" is-link center @click="goCashOut">
|
|
|
+ </van-cell>
|
|
|
+ <!-- <van-cell title="我的下级" value="" is-link center @click="goMyBranch">
|
|
|
+ <template #icon>
|
|
|
+ <m-icon type="hyyxq" class="cell-icon" />
|
|
|
+ </template>
|
|
|
+ </van-cell> -->
|
|
|
+ <van-cell
|
|
|
+ title="我的推广积分"
|
|
|
+ value=""
|
|
|
+ is-link
|
|
|
+ center
|
|
|
+ @click="goMyIntegral"
|
|
|
+ >
|
|
|
+ </van-cell>
|
|
|
+ <van-cell
|
|
|
+ title="会员有效期"
|
|
|
+ :value="expireTime ? expireTime : '开通会员'"
|
|
|
+ is-link
|
|
|
+ center
|
|
|
+ url="/otherPages/buyVip/index"
|
|
|
+ >
|
|
|
+ </van-cell>
|
|
|
+ </van-cell-group>
|
|
|
+ <van-cell-group class="group">
|
|
|
+ <van-cell
|
|
|
+ title="反馈帮助"
|
|
|
+ is-link
|
|
|
+ center
|
|
|
+ url="/pages/webview/webview?src=https://support.qq.com/product/359609"
|
|
|
+ >
|
|
|
+ <template #icon>
|
|
|
+ <m-icon type="fkbz" class="cell-icon" />
|
|
|
+ </template>
|
|
|
+ </van-cell>
|
|
|
+ </van-cell-group>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- <view class="ad-box serviceBox">
|
|
|
<ad unit-id="adunit-d8c1548cc9663765"></ad>
|
|
|
</view> -->
|
|
|
-
|
|
|
- </scroll-view>
|
|
|
+ </scroll-view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- export default {
|
|
|
- computed: {
|
|
|
- userData() {
|
|
|
- return this.$store.state.user.userInfo;
|
|
|
- },
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- this.$store.dispatch("GetInfo");
|
|
|
- },
|
|
|
- methods: {
|
|
|
- async getUserProfile(e) {
|
|
|
- let userInfo = await wx.getUserProfile({
|
|
|
- desc: "业务需要",
|
|
|
- });
|
|
|
- let updateRes = await this.$api.user.updateUserInfo({
|
|
|
- headImage: userInfo.userInfo.avatarUrl,
|
|
|
- nickName: userInfo.userInfo.nickName,
|
|
|
- });
|
|
|
- if (updateRes.code == 200) {
|
|
|
- uni.setStorageSync("userInfo",userInfo.userInfo)
|
|
|
- this.$store.state.user.userInfo.headImage = userInfo.userInfo.avatarUrl;
|
|
|
- this.$store.state.user.userInfo.nickName = userInfo.userInfo.nickName;
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- };
|
|
|
+export default {
|
|
|
+ computed: {
|
|
|
+ userInfo() {
|
|
|
+ return this.$store.state.user.userInfo;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.$store.dispatch("GetInfo");
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async getUserProfile(e) {
|
|
|
+ let userInfo = await wx.getUserProfile({
|
|
|
+ desc: "业务需要",
|
|
|
+ });
|
|
|
+ let updateRes = await this.$api.user.updateUserInfo({
|
|
|
+ headImage: userInfo.userInfo.avatarUrl,
|
|
|
+ nickName: userInfo.userInfo.nickName,
|
|
|
+ });
|
|
|
+ if (updateRes.code == 200) {
|
|
|
+ uni.setStorageSync("userInfo", userInfo.userInfo);
|
|
|
+ this.$store.state.user.userInfo.headImage = userInfo.userInfo.avatarUrl;
|
|
|
+ this.$store.state.user.userInfo.nickName = userInfo.userInfo.nickName;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- .content {
|
|
|
- height: 100%;
|
|
|
- background-image: url("https://t1-1305573081.cos.ap-shanghai.myqcloud.com/wxapp/static/imgs/%E9%A1%B6%E9%83%A8%E8%83%8C%E6%99%AF3.png");
|
|
|
- background-repeat: no-repeat;
|
|
|
- background-size: 100% 90%;
|
|
|
- }
|
|
|
-
|
|
|
- .ad-box {
|
|
|
- margin: 40rpx;
|
|
|
- padding: 20rpx;
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- }
|
|
|
-
|
|
|
- .top {
|
|
|
- padding-top: 100rpx;
|
|
|
-
|
|
|
- .avabox {
|
|
|
- display: flex;
|
|
|
- padding: 10%;
|
|
|
-
|
|
|
- .img {
|
|
|
- border-radius: 50%;
|
|
|
- }
|
|
|
-
|
|
|
- .sync-btn {
|
|
|
- margin-top: 20rpx;
|
|
|
- height: 40rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .avatitbox {
|
|
|
- flex: 1;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- justify-content: space-between;
|
|
|
- padding: 30rpx;
|
|
|
- color: #ffffff;
|
|
|
- height: 100rpx;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .serviceBox {
|
|
|
- background-color: #fff;
|
|
|
- margin: 30rpx;
|
|
|
- border-radius: 10rpx;
|
|
|
-
|
|
|
- .tit {
|
|
|
- padding: 16rpx 26rpx;
|
|
|
- border-bottom: 1rpx solid #e8e8e8;
|
|
|
- }
|
|
|
-
|
|
|
- .btnBox {
|
|
|
- display: flex;
|
|
|
- justify-content: space-around;
|
|
|
- align-items: center;
|
|
|
-
|
|
|
- .item-box {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- justify-content: space-around;
|
|
|
- align-items: center;
|
|
|
- padding: 20rpx;
|
|
|
- border: none;
|
|
|
-
|
|
|
- .text {
|
|
|
- font-size: 26rpx;
|
|
|
- font-family: PingFang SC;
|
|
|
- font-weight: 400;
|
|
|
- color: #666666;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .server {
|
|
|
- border: none;
|
|
|
- background-color: none;
|
|
|
- margin: 0;
|
|
|
- padding: 0;
|
|
|
- text-align: left;
|
|
|
- display: flexbox;
|
|
|
- }
|
|
|
- }
|
|
|
+.user {
|
|
|
+ background-color: #f2f3f5;
|
|
|
+ /* height: 100vh; */
|
|
|
+ .group {
|
|
|
+ margin: 10px 0;
|
|
|
+ }
|
|
|
+ .user-avatar {
|
|
|
+ width: 46px;
|
|
|
+ height: 46px;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+}
|
|
|
+.user-headImg{
|
|
|
+ width: 90rpx;
|
|
|
+ height: 90rpx;
|
|
|
+ border-radius: 50%;
|
|
|
+}
|
|
|
+.cell-icon {
|
|
|
+ margin-right: 5px;
|
|
|
+}
|
|
|
</style>
|