fix(mine/bonus): 我的页面奖衔相关展示逻辑变更,奖金隐藏查看详情
This commit is contained in:
parent
1174d23ab1
commit
030f0e0771
|
@ -69,11 +69,11 @@
|
||||||
{{ item.makerRealSubtotal | toThousandthAndKeepDecimal }}
|
{{ item.makerRealSubtotal | toThousandthAndKeepDecimal }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="border_s">
|
<!-- <view class="border_s">
|
||||||
<view class="button" v-if="checkRule == true" @click="urlTap">
|
<view class="button" v-if="checkRule == true" @click="urlTap">
|
||||||
{{ '查看详情' }}
|
{{ '查看详情' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view style="clear: both"></view>
|
<view style="clear: both"></view>
|
||||||
<view style="height: 20rpx; background-color: #fff"></view>
|
<view style="height: 20rpx; background-color: #fff"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -71,11 +71,11 @@
|
||||||
{{item.repurCouponSubtotal | numberToCurrency}}
|
{{item.repurCouponSubtotal | numberToCurrency}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="border_s">
|
<!-- <view class="border_s">
|
||||||
<view class="button" v-if="checkRule==true" @click="urlTap">
|
<view class="button" v-if="checkRule==true" @click="urlTap">
|
||||||
{{'查看详情'}}
|
{{'查看详情'}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view style="clear: both;"></view>
|
<view style="clear: both;"></view>
|
||||||
<view style="height: 20rpx;background-color: #fff;"></view>
|
<view style="height: 20rpx;background-color: #fff;"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -87,11 +87,11 @@
|
||||||
{{item.repurRealSubtotal | toThousandthAndKeepDecimal}}
|
{{item.repurRealSubtotal | toThousandthAndKeepDecimal}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="border_s">
|
<!-- <view class="border_s">
|
||||||
<view class="button" v-if="checkRule==true" @click="urlTap">
|
<view class="button" v-if="checkRule==true" @click="urlTap">
|
||||||
{{'查看详情'}}
|
{{'查看详情'}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view style="clear: both;"></view>
|
<view style="clear: both;"></view>
|
||||||
<view style="height: 20rpx;background-color: #fff;"></view>
|
<view style="height: 20rpx;background-color: #fff;"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -63,11 +63,11 @@
|
||||||
{{item.realIncomeTotal| numberToCurrency}}
|
{{item.realIncomeTotal| numberToCurrency}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="border_s">
|
<!-- <view class="border_s">
|
||||||
<view class="button" v-if="checkRule==true" @click="urlTap">
|
<view class="button" v-if="checkRule==true" @click="urlTap">
|
||||||
{{'查看详情'}}
|
{{'查看详情'}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view style="clear: both;"></view>
|
<view style="clear: both;"></view>
|
||||||
<view style="height: 20rpx;background-color: #fff;"></view>
|
<view style="height: 20rpx;background-color: #fff;"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -63,11 +63,11 @@
|
||||||
{{item.hiFunRealSubtotal | numberToCurrency}}
|
{{item.hiFunRealSubtotal | numberToCurrency}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="border_s">
|
<!-- <view class="border_s">
|
||||||
<view class="button" v-if="checkRule==true" @click="urlTap">
|
<view class="button" v-if="checkRule==true" @click="urlTap">
|
||||||
{{'查看详情'}}
|
{{'查看详情'}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view style="clear: both;"></view>
|
<view style="clear: both;"></view>
|
||||||
<view style="height: 20rpx;background-color: #fff;"></view>
|
<view style="height: 20rpx;background-color: #fff;"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -120,11 +120,11 @@
|
||||||
{{item.purRealSubtotal| toThousandthAndKeepDecimal}}
|
{{item.purRealSubtotal| toThousandthAndKeepDecimal}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="border_s">
|
<!-- <view class="border_s">
|
||||||
<view class="button" v-if="checkRule==true" @click="urlTap">
|
<view class="button" v-if="checkRule==true" @click="urlTap">
|
||||||
{{'查看详情'}}
|
{{'查看详情'}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view style="clear: both;"></view>
|
<view style="clear: both;"></view>
|
||||||
<view style="height: 20rpx;background-color: #fff;"></view>
|
<view style="height: 20rpx;background-color: #fff;"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<view class='line2'>{{item.gradeName}}</view>
|
<view class='line2'>{{item.gradeName}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="line_box">
|
<view class="line_box">
|
||||||
<view class='line1'>{{'真实奖衔'}}</view>
|
<view class='line1'>{{'荣誉奖衔'}}</view>
|
||||||
<view class='line2'>{{item.awardsName}}</view>
|
<view class='line2'>{{item.awardsName}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="line_box">
|
<view class="line_box">
|
||||||
|
|
|
@ -43,8 +43,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cmem">
|
<view class="cmem">
|
||||||
<view style="margin-right: 10rpx;">{{ '真实奖衔' }}:</view>
|
<view style="margin-right: 10rpx;">{{ '荣誉奖衔' }}:</view>
|
||||||
<view class="jxTit1">{{ awards.awardsName }}</view>
|
<view class="jxTit1">{{ awardsList.awardsName }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -64,73 +64,6 @@
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="jugrade_flex">
|
<view class="jugrade_flex">
|
||||||
<view class="ju_left">
|
<view class="ju_left">
|
||||||
<view v-if="userInfo.pkCountry == 1">
|
|
||||||
<view
|
|
||||||
class="ju_left_top"
|
|
||||||
v-if="awards.targetPv != '-6.40'"
|
|
||||||
:spv="awards.sumRealPv"
|
|
||||||
:tpv="awards.targetPv"
|
|
||||||
>
|
|
||||||
<span class="ju_text1">恭喜您!已达成 </span>
|
|
||||||
<span class="ju_text2">{{ awards.awardsName }}</span>
|
|
||||||
<span> 奖衔,冲刺 </span>
|
|
||||||
<span class="ju_text2">{{ awards.pkTransactionVal }}</span>
|
|
||||||
<span>奖衔,小区仅需</span>
|
|
||||||
<span class="ju_text2">
|
|
||||||
{{
|
|
||||||
(awards.targetPv - awards.sumRealPv > 0
|
|
||||||
? awards.targetPv - awards.sumRealPv
|
|
||||||
: "0.00") | toThousandthAndKeepDecimal
|
|
||||||
}}{{ '万' }}</span
|
|
||||||
>
|
|
||||||
</view>
|
|
||||||
<view class="ju_left_top" v-else>
|
|
||||||
<span class="ju_text1">恭喜您!已达标当月最高奖衔</span>
|
|
||||||
<span class="ju_text2">{{ awards.awardsName }}</span>
|
|
||||||
<span class="ju_text1">!记得保持哦!</span>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view v-else>
|
|
||||||
<view
|
|
||||||
class="ju_left_top"
|
|
||||||
v-if="awards.targetPv != '-1.00'"
|
|
||||||
:spv="awards.sumRealPv"
|
|
||||||
:tpv="awards.targetPv"
|
|
||||||
>
|
|
||||||
<span class="ju_text1">恭喜您!已达成 </span>
|
|
||||||
<span class="ju_text2">{{ awards.awardsName }}</span>
|
|
||||||
<span> 奖衔,冲刺 </span>
|
|
||||||
<span class="ju_text2">{{ awards.pkTransactionVal }}</span>
|
|
||||||
<span>奖衔,小区仅需</span>
|
|
||||||
<span class="ju_text2">
|
|
||||||
{{
|
|
||||||
(awards.targetPv - awards.sumRealPv > 0
|
|
||||||
? awards.targetPv - awards.sumRealPv
|
|
||||||
: "0.00") | toThousandthAndKeepDecimal
|
|
||||||
}}{{ '万' }}</span
|
|
||||||
>
|
|
||||||
</view>
|
|
||||||
<view class="ju_left_top" v-else>
|
|
||||||
<span class="ju_text1">恭喜您!已达标当月最高奖衔</span>
|
|
||||||
<span class="ju_text2">{{ awards.awardsName }}</span>
|
|
||||||
<span class="ju_text1">!记得保持哦!</span>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="yestDay">
|
|
||||||
<view class="yes_t">{{ '当月奖衔' }}</view>
|
|
||||||
<view class="ju_left_bottom">
|
|
||||||
<view
|
|
||||||
class="current-schedule1"
|
|
||||||
:style="{
|
|
||||||
width: GetPercent(awards.sumRealPv, awards.targetPv),
|
|
||||||
}"
|
|
||||||
></view>
|
|
||||||
<view class="cha" v-if="awards.targetPv > 0">
|
|
||||||
{{ awards.sumRealPv }}万/{{ awards.targetPv }}万</view
|
|
||||||
>
|
|
||||||
<view class="cha" v-else> {{ awards.sumRealPv }}万</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="yestDay">
|
<view class="yestDay">
|
||||||
<view class="yes_t">{{ '昨日业绩' }}</view>
|
<view class="yes_t">{{ '昨日业绩' }}</view>
|
||||||
<view :class="awards.aNewPv!=0&&awards.bNewPv!=0?'ju_left_bottom1':'ju_left_bottom'">
|
<view :class="awards.aNewPv!=0&&awards.bNewPv!=0?'ju_left_bottom1':'ju_left_bottom'">
|
||||||
|
|
|
@ -6,61 +6,60 @@
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="index-view tops" @click="updateImg">
|
<view class="index-view tops" @click="updateImg">
|
||||||
<view class="user-name">{{'头像'}}</view>
|
<view class="user-name">{{ '头像' }}</view>
|
||||||
<view class="user-right rights">
|
<view class="user-right rights">
|
||||||
<view class="avatar">
|
<view class="avatar">
|
||||||
<image :src="userInfo.headPath"/>
|
<image :src="userInfo.headPath" />
|
||||||
</view>
|
</view>
|
||||||
<view class="right-icon">
|
<view class="right-icon">
|
||||||
<image src="../../static/images/right.png"/>
|
<image src="../../static/images/right.png" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="index-view">
|
<view class="index-view">
|
||||||
<view class="user-name">{{'昵称'}}</view>
|
<view class="user-name">{{ '昵称' }}</view>
|
||||||
<view class="user-right rights" @click="downShow=true">
|
<view class="user-right rights" @click="downShow = true">
|
||||||
<!-- {{ userInfo.nickName1 }} -->
|
<!-- {{ userInfo.nickName1 }} -->
|
||||||
<!-- <view >
|
<!-- <view >
|
||||||
<u-input class="border-s" :maxlength="40" v-model="userInfo.nickName" />
|
<u-input class="border-s" :maxlength="40" v-model="userInfo.nickName" />
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="nana">{{ userInfo.nickName }}</view>
|
<view class="nana">{{ userInfo.nickName }}</view>
|
||||||
<view class="right-icon">
|
<view class="right-icon">
|
||||||
<image src="../../static/images/right.png"/>
|
<image src="../../static/images/right.png" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="index-view tops">
|
<view class="index-view tops">
|
||||||
<view class="user-name">{{'真实姓名'}}</view>
|
<view class="user-name">{{ '真实姓名' }}</view>
|
||||||
<view class="user-right">
|
<view class="user-right">
|
||||||
{{userInfo.memberName}}
|
{{ userInfo.memberName }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="index-view">
|
<view class="index-view">
|
||||||
<view class="user-name">{{'会员编号'}}</view>
|
<view class="user-name">{{ '会员编号' }}</view>
|
||||||
<view class="user-right">
|
<view class="user-right">
|
||||||
{{userInfo.memberCode}}
|
{{ userInfo.memberCode }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="index-view">
|
<view class="index-view">
|
||||||
<view class="user-name">
|
<view class="user-name"> {{ '联系方式' }}</view>
|
||||||
{{'联系方式'}}</view>
|
<view class="user-right">
|
||||||
<view class="user-right">
|
{{ userInfo.phone }}
|
||||||
{{userInfo.phone}}
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="index-view">
|
||||||
<view class="index-view">
|
<view class="user-name">{{ '证件号码' }}</view>
|
||||||
<view class="user-name">{{'证件号码'}}</view>
|
<view class="user-right">
|
||||||
<view class="user-right">
|
{{ userInfo.idCardAuth }}
|
||||||
{{userInfo.idCardAuth}}
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="content" style="border-bottom: none">
|
||||||
<view class="content" style="border-bottom: none;">
|
<!-- <view class="index-view tops">
|
||||||
<!-- <view class="index-view tops">
|
|
||||||
<view class="user-name">{{'自然国家'}}</view>
|
<view class="user-name">{{'自然国家'}}</view>
|
||||||
<view class="user-right">
|
<view class="user-right">
|
||||||
{{userInfo.countryName}}
|
{{userInfo.countryName}}
|
||||||
|
@ -72,97 +71,106 @@
|
||||||
{{userInfo.settleCountryName}}
|
{{userInfo.settleCountryName}}
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="index-view">
|
<view class="index-view">
|
||||||
<view class="user-name">{{'注册等级'}}</view>
|
<view class="user-name">{{ '注册等级' }}</view>
|
||||||
<view class="user-right">
|
<view class="user-right">
|
||||||
{{userInfo.registerGradeVal}}
|
{{ userInfo.registerGradeVal }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="index-view">
|
<view class="index-view">
|
||||||
<view class="user-name">{{'结算等级'}}</view>
|
<view class="user-name">{{ '结算等级' }}</view>
|
||||||
<view class="user-right">
|
<view class="user-right">
|
||||||
{{userInfo.settleGradeVal}}
|
{{ userInfo.settleGradeVal }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="index-view">
|
<!-- <view class="index-view">
|
||||||
<view class="user-name">{{'代理等级'}}</view>
|
<view class="user-name">{{'代理等级'}}</view>
|
||||||
<view class="user-right">
|
<view class="user-right">
|
||||||
{{userInfo.agentGrade}}
|
{{userInfo.agentGrade}}
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="index-view">
|
<!-- <view class="index-view">
|
||||||
<view class="user-name">{{'真实奖衔'}}</view>
|
<view class="user-name">{{ '真实奖衔' }}</view>
|
||||||
<view class="user-right">
|
<view class="user-right">
|
||||||
{{userInfo.awardsVal}}
|
{{ userInfo.awardsVal }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="index-view">
|
<view class="index-view">
|
||||||
<view class="user-name">荣誉奖衔</view>
|
<view class="user-name">荣誉奖衔</view>
|
||||||
<view class="user-right">
|
<view class="user-right">
|
||||||
{{userInfo.maxAwardsVal}}
|
{{ userInfo.awardsVal }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="index-view none">
|
<view class="index-view none">
|
||||||
<view class="user-name">{{'创建日期'}}</view>
|
<view class="user-name">{{ '创建日期' }}</view>
|
||||||
<view class="user-right">
|
<view class="user-right">
|
||||||
{{userInfo.payTime}}
|
{{ userInfo.payTime }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="index-view none">
|
<view class="index-view none">
|
||||||
<view class="user-name">{{'注册业绩'}}</view>
|
<view class="user-name">{{ '注册业绩' }}</view>
|
||||||
<view class="user-right">
|
<view class="user-right">
|
||||||
{{userInfo.consumeAchieve|toThousandthAndKeepDecimal}}
|
{{ userInfo.consumeAchieve | toThousandthAndKeepDecimal }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="index-view none">
|
<view class="index-view none">
|
||||||
<view class="user-name">{{'会员权益'}}</view>
|
<view class="user-name">{{ '会员权益' }}</view>
|
||||||
<view class="user-right">
|
<view class="user-right">
|
||||||
{{userInfo.registerAuthorityVal}}
|
{{ userInfo.registerAuthorityVal }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="index-view none">
|
<view class="index-view none">
|
||||||
<view class="user-name">{{'支付时间'}}</view>
|
<view class="user-name">{{ '支付时间' }}</view>
|
||||||
<view class="user-right">
|
<view class="user-right">
|
||||||
{{userInfo.payTime}}
|
{{ userInfo.payTime }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="index-view none" v-if="userInfo.pkCountry == 1&&userData.expireDate">
|
<view
|
||||||
<view class="user-name">有效期</view>
|
class="index-view none"
|
||||||
<view class="user-right">
|
v-if="userInfo.pkCountry == 1 && userData.expireDate"
|
||||||
{{userData.expireDate}}
|
>
|
||||||
</view>
|
<view class="user-name">有效期</view>
|
||||||
</view>
|
<view class="user-right">
|
||||||
<view class="index-view none" v-if="userInfo.serviceCode">
|
{{ userData.expireDate }}
|
||||||
<view class="user-name">{{'服务编号'}}</view>
|
</view>
|
||||||
<view class="user-right">
|
</view>
|
||||||
{{userData.serviceCode}}
|
<view class="index-view none" v-if="userInfo.serviceCode">
|
||||||
</view>
|
<view class="user-name">{{ '服务编号' }}</view>
|
||||||
</view>
|
<view class="user-right">
|
||||||
</view>
|
{{ userData.serviceCode }}
|
||||||
<!-- <u-button type="success"
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <u-button type="success"
|
||||||
shape="circle"
|
shape="circle"
|
||||||
class="btn"
|
class="btn"
|
||||||
@click="submit"
|
@click="submit"
|
||||||
>{{'保存'}}</u-button>
|
>{{'保存'}}</u-button>
|
||||||
<view style="height: 20rpx;"></view> -->
|
<view style="height: 20rpx;"></view> -->
|
||||||
<u-popup
|
<u-popup
|
||||||
:show="downShow"
|
:show="downShow"
|
||||||
mode="bottom"
|
mode="bottom"
|
||||||
closeOnClickOverlay
|
closeOnClickOverlay
|
||||||
closeable
|
closeable
|
||||||
round="10"
|
round="10"
|
||||||
@close="close"
|
@close="close"
|
||||||
>
|
>
|
||||||
<view class="title">修改昵称</view>
|
<view class="title">修改昵称</view>
|
||||||
<view class="kung">
|
<view class="kung">
|
||||||
<u--input
|
<u--input
|
||||||
:maxlength="40"
|
:maxlength="40"
|
||||||
placeholder="请输入昵称"
|
placeholder="请输入昵称"
|
||||||
v-model="userInfo.nickName"
|
v-model="userInfo.nickName"
|
||||||
>
|
>
|
||||||
</u--input>
|
</u--input>
|
||||||
</view>
|
</view>
|
||||||
<u-button :disabled="!userInfo.nickName" class="btn" @click="submit" type="error" text="确 定"></u-button>
|
<u-button
|
||||||
|
:disabled="!userInfo.nickName"
|
||||||
|
class="btn"
|
||||||
|
@click="submit"
|
||||||
|
type="error"
|
||||||
|
text="确 定"
|
||||||
|
></u-button>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -175,105 +183,111 @@ import store from '@/store'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
downShow:false,
|
downShow: false,
|
||||||
userInfo:{},
|
userInfo: {},
|
||||||
userData:'',
|
userData: '',
|
||||||
urls:'/member/api/maker-space/update-file',
|
urls: '/member/api/maker-space/update-file',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
this.userData = uni.getStorageSync('User')
|
this.userData = uni.getStorageSync('User')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
close() {
|
close() {
|
||||||
this.downShow = false
|
this.downShow = false
|
||||||
},
|
},
|
||||||
updateImg() {
|
updateImg() {
|
||||||
const http = uni.$u.http.config.baseURL
|
const http = uni.$u.http.config.baseURL
|
||||||
let token = getToken();
|
let token = getToken()
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
sourceType: ['album'], //从相册选择
|
sourceType: ['album'], //从相册选择
|
||||||
success: chooseImageRes => {
|
success: chooseImageRes => {
|
||||||
const tempFilePaths = chooseImageRes.tempFilePaths;
|
const tempFilePaths = chooseImageRes.tempFilePaths
|
||||||
uni.uploadFile({
|
uni.uploadFile({
|
||||||
url: http+'/member/api/member/update-head', //仅为示例,非真实的接口地址
|
url: http + '/member/api/member/update-head', //仅为示例,非真实的接口地址
|
||||||
filePath: tempFilePaths[0],
|
filePath: tempFilePaths[0],
|
||||||
name: 'file',
|
name: 'file',
|
||||||
header: {
|
header: {
|
||||||
Authorization:token
|
Authorization: token,
|
||||||
},
|
},
|
||||||
success: res => {
|
success: res => {
|
||||||
console.error(res)
|
console.error(res)
|
||||||
// 成功:获取到头像
|
// 成功:获取到头像
|
||||||
if (res.statusCode == 200) {
|
if (res.statusCode == 200) {
|
||||||
let data = JSON.parse(res.data)
|
let data = JSON.parse(res.data)
|
||||||
this.userInfo.headPath = data.data.url
|
this.userInfo.headPath = data.data.url
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
fail: err => {
|
fail: err => {
|
||||||
uni.$u.toast('上传失败', 'none');
|
uni.$u.toast('上传失败', 'none')
|
||||||
}
|
},
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
api.updateData({
|
api
|
||||||
nickName: this.userInfo.nickName,
|
.updateData({
|
||||||
}).then((res)=>{
|
nickName: this.userInfo.nickName,
|
||||||
uni.showToast({
|
})
|
||||||
title: res.msg,
|
.then(res => {
|
||||||
icon: 'none',
|
uni.showToast({
|
||||||
duration: 1500,
|
title: res.msg,
|
||||||
})
|
icon: 'none',
|
||||||
this.getInfo()
|
duration: 1500,
|
||||||
this.close()
|
})
|
||||||
})
|
this.getInfo()
|
||||||
},
|
this.close()
|
||||||
// upload() {
|
})
|
||||||
// let that = this
|
},
|
||||||
// uni.chooseImage({
|
// upload() {
|
||||||
// count: 1, //默认9
|
// let that = this
|
||||||
// sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
// uni.chooseImage({
|
||||||
// sourceType: ['album'], //从相册选择
|
// count: 1, //默认9
|
||||||
// success: function (res) {
|
// sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||||
// let FormDatas = new FormData();
|
// sourceType: ['album'], //从相册选择
|
||||||
|
// success: function (res) {
|
||||||
// FormDatas.append("file", res.tempFilePaths[0]);
|
// let FormDatas = new FormData();
|
||||||
// api.updateFile(FormDatas).then((res)=>{
|
|
||||||
// console.error(res)
|
// FormDatas.append("file", res.tempFilePaths[0]);
|
||||||
// })
|
// api.updateFile(FormDatas).then((res)=>{
|
||||||
// }
|
// console.error(res)
|
||||||
// });
|
// })
|
||||||
// },
|
// }
|
||||||
getInfo(){
|
// });
|
||||||
api.getData().then(res => {
|
// },
|
||||||
if (res) {
|
getInfo() {
|
||||||
this.userInfo = res.data
|
api
|
||||||
if(this.userInfo.nickName.length > 20){
|
.getData()
|
||||||
this.userInfo.nickName1 = this.userInfo.nickName.substring(0,20)+'...'
|
.then(res => {
|
||||||
|
if (res) {
|
||||||
|
this.userInfo = res.data
|
||||||
|
if (this.userInfo.nickName.length > 20) {
|
||||||
|
this.userInfo.nickName1 =
|
||||||
|
this.userInfo.nickName.substring(0, 20) + '...'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
})
|
||||||
reject(error)
|
.catch(error => {
|
||||||
})
|
reject(error)
|
||||||
// api.getInfo().then(res => {
|
})
|
||||||
// if (res) {
|
// api.getInfo().then(res => {
|
||||||
// this.userInfo = res.data
|
// if (res) {
|
||||||
// }
|
// this.userInfo = res.data
|
||||||
// }).catch(error => {
|
// }
|
||||||
// reject(error)
|
// }).catch(error => {
|
||||||
// })
|
// reject(error)
|
||||||
// console.error(this.userInfo)
|
// })
|
||||||
},
|
// console.error(this.userInfo)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.kung{
|
.kung {
|
||||||
padding: 20rpx 20rpx
|
padding: 20rpx 20rpx;
|
||||||
}
|
}
|
||||||
.title {
|
.title {
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
|
@ -282,75 +296,74 @@ export default {
|
||||||
color: #333;
|
color: #333;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.border-s{
|
.border-s {
|
||||||
border: none;
|
border: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
width: 120rpx;
|
width: 120rpx;
|
||||||
height: 85rpx;
|
height: 85rpx;
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
page{
|
page {
|
||||||
background-color: #F2F2F2;
|
background-color: #f2f2f2;
|
||||||
}
|
}
|
||||||
.none{
|
.none {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
.tops{
|
.tops {
|
||||||
border-top: 1rpx solid #eee;
|
border-top: 1rpx solid #eee;
|
||||||
}
|
}
|
||||||
.content{
|
.content {
|
||||||
border-bottom: 20rpx solid #F2F2F2;
|
border-bottom: 20rpx solid #f2f2f2;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
}
|
||||||
}
|
.index-view {
|
||||||
.index-view{
|
height: 110rpx;
|
||||||
height: 110rpx;
|
margin: 0 30rpx 0 30rpx;
|
||||||
margin: 0 30rpx 0 30rpx;
|
padding: 0 10rpx;
|
||||||
padding: 0 10rpx;
|
line-height: 110rpx;
|
||||||
line-height: 110rpx;
|
border-bottom: 1rpx solid #eeeeee;
|
||||||
border-bottom: 1rpx solid #EEEEEE;
|
display: flex;
|
||||||
display: flex;
|
justify-content: space-between;
|
||||||
justify-content: space-between;
|
position: relative;
|
||||||
position: relative;
|
color: #333;
|
||||||
color: #333;
|
}
|
||||||
}
|
.user-right {
|
||||||
.user-right{
|
color: #999;
|
||||||
color: #999;
|
font-size: 28rpx;
|
||||||
font-size: 28rpx;
|
display: flex;
|
||||||
display: flex;
|
align-items: center;
|
||||||
align-items: center;
|
}
|
||||||
}
|
.rights {
|
||||||
.rights{
|
margin-right: 45rpx;
|
||||||
margin-right: 45rpx;
|
}
|
||||||
}
|
.nana {
|
||||||
.nana{
|
flex: 1;
|
||||||
flex: 1;
|
}
|
||||||
|
.right-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 12rpx;
|
||||||
|
right: 0;
|
||||||
|
image {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
}
|
}
|
||||||
.right-icon{
|
}
|
||||||
position: absolute;
|
.avatar {
|
||||||
top:12rpx;
|
margin-top: 10rpx;
|
||||||
right: 0;
|
image {
|
||||||
image{
|
width: 89rpx;
|
||||||
width: 40rpx;
|
height: 89rpx;
|
||||||
height:40rpx;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.avatar{
|
.btn {
|
||||||
margin-top: 10rpx;
|
background-color: #fb3024;
|
||||||
image{
|
border: none;
|
||||||
width: 89rpx;
|
height: 92rpx;
|
||||||
height: 89rpx;
|
line-height: 92rpx;
|
||||||
border-radius: 50%;
|
font-size: 30rpx;
|
||||||
}
|
margin: 40rpx auto;
|
||||||
}
|
width: 690rpx;
|
||||||
.btn{
|
}
|
||||||
background-color: #FB3024;
|
</style>
|
||||||
border: none;
|
|
||||||
height: 92rpx;
|
|
||||||
line-height: 92rpx;
|
|
||||||
font-size:30rpx;
|
|
||||||
margin: 40rpx auto;
|
|
||||||
width: 690rpx;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
Loading…
Reference in New Issue