Commit cb33fc1e authored by 罗超's avatar 罗超

1

parent 3feb2fbf
...@@ -23,18 +23,12 @@ ...@@ -23,18 +23,12 @@
></button> ></button>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP-ALIPAY --> <!-- #ifdef MP-ALIPAY -->
<!-- <button
:style="sureStyle"
class="hotsopt"
open-type="getAuthorize"
v-if="!canIUseGetUserProfile"
@getuserinfo="showLogin ? getoldUser() : ''"
></button> -->
<button <button
:style="sureStyle" :style="sureStyle"
class="hotsopt" class="hotsopt"
v-if="canIUseGetUserProfile" open-type="getAuthorize"
@tap="showLogin ? getUserInfoAli() : ''" @getAuthorize="onGetAuthorize"
scope="userInfo"
></button> ></button>
<!-- #endif --> <!-- #endif -->
<button :style="cancelStyle" class="hotsopt" @click="close"></button> <button :style="cancelStyle" class="hotsopt" @click="close"></button>
...@@ -284,73 +278,30 @@ export default { ...@@ -284,73 +278,30 @@ export default {
}, },
// -------------------------------支付宝登录--------------------------------- // -------------------------------支付宝登录---------------------------------
getUserProfileAli() { onGetAuthorize(res) {
//新的获取用户资料 let that = this;
var that = this; my.getOpenUserInfo({
wx.getUserProfile({ success: (_res) => {
desc: "用于完善资料", // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 let userInfo = JSON.parse(_res.response).response; // 以下方的报文格式解析两层 response
success: (info) => { that.getUserInfoAli(userInfo);
console.log(info);
this.msg = {
Id: 0,
AliasName: info.userInfo.nickName,
Photo: info.userInfo.avatarUrl,
};
that.getUserInfo(info);
},
fail: () => {
uni.showToast({
title: "微信登录授权失败",
icon: "none",
});
}, },
}); });
}, },
getUserInfoAli(info) { getUserInfoAli(info) {
var that = this; var that = this;
that.showDialog = true; that.showDialog = true;
// uni.login({
// scopes: "auth_user",
// success: (res) => {
// //这里请求接口
// let obj = {
// Source: 1,
// OpenId: "",
// Name: info.userInfo.nickName,
// Photo: info.userInfo.avatarUrl,
// Gender: info.userInfo.gender,
// Moblie: "",
// SuperiorId: 0,
// code: res.code,
// };
// // that.getCode(obj);
//
// },
// fail: () => {
// uni.showToast({
// title: "授权失败",
// icon: "none",
// });
// },
// });
my.getAuthCode({ my.getAuthCode({
scopes: "auth_user", // 主动授权(弹框):auth_user,静默授权(不弹框):auth_base scopes: "auth_base", // 主动授权(弹框):auth_user,静默授权(不弹框):auth_base
success: (res) => { success: (res) => {
console.log(296, res);
if (res.authCode) { if (res.authCode) {
let obj = { let obj = {
// Source: 1, Name: info.nickName,
// OpenId: "", Photo: info.avatar ? info.avatar : "123",
// Name: info.userInfo.nickName, Gender: info.gender === "m" ? 1 : info.gender === "f" ? 2 : 0,
// Photo: info.userInfo.avatarUrl, Moblie: "",
// Gender: info.userInfo.gender,
// Moblie: "",
// SuperiorId: 0,
code: res.authCode, code: res.authCode,
}; };
// console.log(app.serverUrl + '/login/' + res.authCode);
// 调用自己的服务端接口,让服务端进行后端的授权认证
that.getBaseInfoAli();
console.log(327, res);
that.getCodeAli(obj); that.getCodeAli(obj);
} }
}, },
...@@ -362,22 +313,13 @@ export default { ...@@ -362,22 +313,13 @@ export default {
}, },
}); });
}, },
getBaseInfoAli() {
my.getOpenUserInfo({
success: (res) => {
let userInfo = JSON.parse(res.response).response; // 以下方的报文格式解析两层 response
console.log(369, res, userInfo);
},
});
},
//调用获取code //调用获取code
getCodeAli(obj) { getCodeAli(obj) {
var that = this; var that = this;
// uni.showLoading({ uni.showLoading({
// title: "登录中", title: "登录中",
// }); });
//这里请求接口 //这里请求接口
var OpenId = "";
that.request2( that.request2(
{ {
url: "/api/mall/GetAliCode", url: "/api/mall/GetAliCode",
...@@ -388,7 +330,7 @@ export default { ...@@ -388,7 +330,7 @@ export default {
(res) => { (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
obj.OpenId = res.data; obj.OpenId = res.data;
// that.getLoginAli(obj); that.getLoginAli(obj);
} }
} }
); );
...@@ -413,7 +355,7 @@ export default { ...@@ -413,7 +355,7 @@ export default {
{ {
url: "/api/AppletLogin/Login", url: "/api/AppletLogin/Login",
data: { data: {
Source: 1, Source: 2,
OpenId: obj.OpenId, OpenId: obj.OpenId,
Name: obj.Name, Name: obj.Name,
Photo: obj.Photo, Photo: obj.Photo,
......
<template> <template>
<scroll-view :scroll-y="true" @scroll="scrollHandler" @scrolltoupper="scrollTopHandler" style="height: 100vh;"> <scroll-view
<view class="userStyle" v-if="meueData.user_center && meueData.user_center.is_ppenmiai==0" :class="{'dark':isCompany}"><!-- 修改 --> :scroll-y="true"
<view class="headStatus" v-if="scrollTop > 50" :style="[headStyle, @scroll="scrollHandler"
@scrolltoupper="scrollTopHandler"
style="height: 100vh"
>
<view
class="userStyle"
v-if="meueData.user_center && meueData.user_center.is_ppenmiai == 0"
:class="{ dark: isCompany }"
><!-- 修改 -->
<view
class="headStatus"
v-if="scrollTop > 50"
:style="[
headStyle,
{ {
zIndex: scrollTop < 10 ? 'unset' : 2, zIndex: scrollTop < 10 ? 'unset' : 2,
opacity: scrollTop < 10 ? '100' : scrollTop, opacity: scrollTop < 10 ? '100' : scrollTop,
}, },
]"> ]"
<view class="title" v-if="scrollTop > 50">{{pageTitle}}</view> >
<view class="title" v-if="scrollTop > 50">{{ pageTitle }}</view>
</view> </view>
<view class="userBox" :style="{ 'padding-bottom': bottommargin }"> <view class="userBox" :style="{ 'padding-bottom': bottommargin }">
<view :style="{ 'background-image': 'url(' + (meueData.user_center.top_pic_url ? meueData.user_center.top_pic_url : '') + ')', backgroundSize: '100% 310px' }" <view
class="imgbg" :class="{'miniHeadTop':meueData.user_center.is_foot_bar_status!=1&&meueData.user_center.is_account_status!=1}"> :style="{
<view class="titlenav" :style="{paddingTop:nav}">{{pageTitle}}</view> 'background-image':
<view class='topheard' :style="{'margin-top':modelstype==0?'52px':(modelstype==1?'37px':(modelstype==2)?'33px':0) }" 'url(' +
v-if="meueData.user_center.top_style == 1"> (meueData.user_center.top_pic_url
<u-avatar :src="user_info.avatar" size="140" shape="circle" style="margin-left: 50rpx;"></u-avatar> ? meueData.user_center.top_pic_url
<view style="display: flex;flex-direction: column;justify-content: center;height: 50px;margin-left: 20rpx"> : '') +
<Text class="nickname" style="color: #FFF;font-size: 40rpx;font-weight:800;max-width: 200px;overflow: hidden;display: inline-block;white-space: nowrap; text-overflow:ellipsis;" ')',
@click="login(user_info)">{{ user_info.nickname ? user_info.nickname : '立即登录' }}</Text> backgroundSize: '100% 310px',
}"
class="imgbg"
:class="{
miniHeadTop:
meueData.user_center.is_foot_bar_status != 1 &&
meueData.user_center.is_account_status != 1,
}"
>
<view class="titlenav" :style="{ paddingTop: nav }">{{
pageTitle
}}</view>
<view
class="topheard"
:style="{
'margin-top':
modelstype == 0
? '52px'
: modelstype == 1
? '37px'
: modelstype == 2
? '33px'
: 0,
}"
v-if="meueData.user_center.top_style == 1"
>
<u-avatar
:src="user_info.avatar"
size="140"
shape="circle"
style="margin-left: 50rpx"
></u-avatar>
<view
style="
display: flex;
flex-direction: column;
justify-content: center;
height: 50px;
margin-left: 20rpx;
"
>
<Text
class="nickname"
style="
color: #fff;
font-size: 40rpx;
font-weight: 800;
max-width: 200px;
overflow: hidden;
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
"
@click="login(user_info)"
>{{
user_info.nickname ? user_info.nickname : "立即登录"
}}</Text
>
<!-- 判断是甲鹤小程序 --> <!-- 判断是甲鹤小程序 -->
<view v-if="AppletID == 5 && isAttestationEdu==1"> <view v-if="AppletID == 5 && isAttestationEdu == 1">
<u-tag text="甲鹤学员" bg-color='#40766E' color='#FFF' size='mini' border-color='#40766E'/> <u-tag
text="甲鹤学员"
bg-color="#40766E"
color="#FFF"
size="mini"
border-color="#40766E"
/>
</view> </view>
<view style="display: flex; align-items: center;"> <view style="display: flex; align-items: center">
<view class="member" v-if="is_icon_members_grade == 1&& user_info.nickname"> <view
<image :src="user_info.identity.level_icon" mode="aspectFill" style="width: 22px;height: 22px;border-radius: 11px;"></image> class="member"
<Text style="margin-right: 10px;">{{ user_info.identity.level_name != null ? user_info.identity.level_name : '普通用户' }}</Text> v-if="is_icon_members_grade == 1 && user_info.nickname"
>
<image
:src="user_info.identity.level_icon"
mode="aspectFill"
style="width: 22px; height: 22px; border-radius: 11px"
></image>
<Text style="margin-right: 10px">{{
user_info.identity.level_name != null
? user_info.identity.level_name
: "普通用户"
}}</Text>
<!-- 公司认证状态 --> <!-- 公司认证状态 -->
</view> </view>
<view class="componyStatusBox" @click="goIdentification" v-if="is_show_korea==1 && user_info.nickname"> <view
<view class="renzhen" v-if="companyStatus==2 " > class="componyStatusBox"
@click="goIdentification"
v-if="is_show_korea == 1 && user_info.nickname"
>
<view class="renzhen" v-if="companyStatus == 2">
未认证 未认证
</view> </view>
<view class="renzhen" v-if="companyStatus==0" :style="{'border':'1px solid '+mainColor,'color':mainColor}"> <view
class="renzhen"
v-if="companyStatus == 0"
:style="{
border: '1px solid ' + mainColor,
color: mainColor,
}"
>
认证审核中 认证审核中
</view> </view>
<view class="companyName" v-if="companyStatus==1"> <view class="companyName" v-if="companyStatus == 1">
{{companyName}} {{ companyName }}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view style="display: flex;flex-direction: column;align-items: center;margin-top: 23px;margin-bottom: 5px;" v-if="meueData.user_center.top_style == 2"> <view
<u-avatar :src="user_info.avatar" shape="circle" size="120"></u-avatar> style="
<Text style="color: #FFF;font-size: 40rpx;font-weight:800;" class="nickname" @click="login(user_info)">{{ user_info.nickname ? user_info.nickname : '立即登录' }}</Text> display: flex;
<view class="member" v-if="is_icon_members_grade == 1&&user_info.nickname"> flex-direction: column;
<image :src="user_info.identity.level_icon" mode="aspectFill" style="width: 22px;height: 22px;border-radius: 11px;"></image> align-items: center;
<Text style="margin-right: 10px;">{{ user_info.identity.level_name != null ? user_info.identity.level_name : '普通用户' }}</Text> margin-top: 23px;
margin-bottom: 5px;
"
v-if="meueData.user_center.top_style == 2"
>
<u-avatar
:src="user_info.avatar"
shape="circle"
size="120"
></u-avatar>
<Text
style="color: #fff; font-size: 40rpx; font-weight: 800"
class="nickname"
@click="login(user_info)"
>{{ user_info.nickname ? user_info.nickname : "立即登录" }}</Text
>
<view
class="member"
v-if="is_icon_members_grade == 1 && user_info.nickname"
>
<image
:src="user_info.identity.level_icon"
mode="aspectFill"
style="width: 22px; height: 22px; border-radius: 11px"
></image>
<Text style="margin-right: 10px">{{
user_info.identity.level_name != null
? user_info.identity.level_name
: "普通用户"
}}</Text>
</view> </view>
<view v-if="AppletID == 5 && isAttestationEdu == 1"> <view v-if="AppletID == 5 && isAttestationEdu == 1">
<u-tag text="甲鹤学员" bg-color='#40766E' color='#FFF' size='mini' border-color='#40766E'/> <u-tag
text="甲鹤学员"
bg-color="#40766E"
color="#FFF"
size="mini"
border-color="#40766E"
/>
</view> </view>
</view> </view>
<view class="top_b"> <view class="top_b">
<view class="top_b_item" v-if="meueData.user_center.is_foot_bar_status == 1" @click="goUrl('/pages/favorite/favorite')"> <view
<text style="font-size: 21px;">{{user_info.favorite?user_info.favorite:0}}</text> class="top_b_item"
<text>{{meueData.user_center.foot_bar[0].name}}</text> v-if="meueData.user_center.is_foot_bar_status == 1"
@click="goUrl('/pages/favorite/favorite')"
>
<text style="font-size: 21px">{{
user_info.favorite ? user_info.favorite : 0
}}</text>
<text>{{ meueData.user_center.foot_bar[0].name }}</text>
</view> </view>
<view class="top_b_item" v-if="meueData.user_center.is_foot_bar_status == 1" @click="goUrl('/pages/foot/index/index')"> <view
<text style="font-size: 21px;">{{user_info.footprint?user_info.footprint:0}}</text> class="top_b_item"
<text>{{meueData.user_center.foot_bar[1].name}}</text> v-if="meueData.user_center.is_foot_bar_status == 1"
@click="goUrl('/pages/foot/index/index')"
>
<text style="font-size: 21px">{{
user_info.footprint ? user_info.footprint : 0
}}</text>
<text>{{ meueData.user_center.foot_bar[1].name }}</text>
</view> </view>
<view class="top_b_item" v-if="meueData.user_center&&meueData.user_center.is_account_status == 1" @click="goUrl(couponsObj.link_url)"> <view
<text style="font-size: 21px;">{{user_info.coupon?user_info.coupon:0}}</text> class="top_b_item"
<text>{{couponsObj.name}}</text> v-if="
meueData.user_center &&
meueData.user_center.is_account_status == 1
"
@click="goUrl(couponsObj.link_url)"
>
<text style="font-size: 21px">{{
user_info.coupon ? user_info.coupon : 0
}}</text>
<text>{{ couponsObj.name }}</text>
</view> </view>
</view> </view>
<!-- <view class="ReceiptAdder" v-if="IsEducation!=1&&setting.is_show_korea!=undefined&&setting.is_show_korea==0" @click="goUrl('/pages/address/address')" :style="{top:modelstype==0?'160rpx':(modelstype==1?'180rpx':'160rpx')}"> <!-- <view class="ReceiptAdder" v-if="IsEducation!=1&&setting.is_show_korea!=undefined&&setting.is_show_korea==0" @click="goUrl('/pages/address/address')" :style="{top:modelstype==0?'160rpx':(modelstype==1?'180rpx':'160rpx')}">
<u-icon name="location" color="#fff" size="23"></u-icon> <u-icon name="location" color="#fff" size="23"></u-icon>
<Text style="color: #fff;font-size: 12px;margin-left: 20rpx;">收货地址</Text> <Text style="color: #fff;font-size: 12px;margin-left: 20rpx;">收货地址</Text>
</view> --> </view> -->
<view class="Receiptbalance" v-if="meueData.user_center&&meueData.user_center.is_account_status == 1"> <view
<view class="Receiptbalance_item" v-for="(item, index) in meueData.user_center.account" :key="index" v-if="item.link_url == '/pages/balance/balance'" class="Receiptbalance"
@click="goUrl(item.link_url)"> v-if="
<image :src="item.icon_url" style="width: 22px;height: auto" mode='widthFix'></image> meueData.user_center &&
<view style="margin-left: 15px;display: flex;flex-direction: column;justify-content: space-between;"> meueData.user_center.is_account_status == 1
<span style='font-size: 21px;color: #0D0D0D;font-weight: 200;'>{{user_info.balance?(user_info.balance>10000?(user_info.balance/10000).toFixed(1)+'w':user_info.balance):0}}</span> "
<span style=''>{{item.name}}</span> >
<view
class="Receiptbalance_item"
v-for="(item, index) in meueData.user_center.account"
:key="index"
v-if="item.link_url == '/pages/balance/balance'"
@click="goUrl(item.link_url)"
>
<image
:src="item.icon_url"
style="width: 22px; height: auto"
mode="widthFix"
></image>
<view
style="
margin-left: 15px;
display: flex;
flex-direction: column;
justify-content: space-between;
"
>
<span
style="font-size: 21px; color: #0d0d0d; font-weight: 200"
>{{
user_info.balance
? user_info.balance > 10000
? (user_info.balance / 10000).toFixed(1) + "w"
: user_info.balance
: 0
}}</span
>
<span style="">{{ item.name }}</span>
</view> </view>
</view> </view>
<view style="width: 1px;height: 34px;background: #E8E8E8;"></view> <view style="width: 1px; height: 34px; background: #e8e8e8"></view>
<view class="Receiptbalance_item" v-for="(item, index) in meueData.user_center.account" :key="index" v-if="item.link_url == '/pages/user-center/integral-detail/integral-detail'" <view
@click="goUrl(item.link_url)"> class="Receiptbalance_item"
<image :src="item.icon_url" style="width: 17px;;height: auto" mode='widthFix'></image> v-for="(item, index) in meueData.user_center.account"
<view style="margin-left: 15px;display: flex;flex-direction: column;justify-content: space-between;"> :key="index"
<span style='font-size: 21px;color: #0D0D0D;font-weight: 200;'>{{user_info.integral?(user_info.integral>10000?(user_info.integral/10000).toFixed(1)+'w':user_info.integral):0}}</span> v-if="
<span>{{item.name}}</span> item.link_url ==
'/pages/user-center/integral-detail/integral-detail'
"
@click="goUrl(item.link_url)"
>
<image
:src="item.icon_url"
style="width: 17px; height: auto"
mode="widthFix"
></image>
<view
style="
margin-left: 15px;
display: flex;
flex-direction: column;
justify-content: space-between;
"
>
<span
style="font-size: 21px; color: #0d0d0d; font-weight: 200"
>{{
user_info.integral
? user_info.integral > 10000
? (user_info.integral / 10000).toFixed(1) + "w"
: user_info.integral
: 0
}}</span
>
<span>{{ item.name }}</span>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- 排课点数 --> <!-- 排课点数 -->
<view class="order_bar paike" style="" @click="gopointBalance" v-if="meueData.user_center.is_point_status==1"> <view
<span style='font-size: 14px;color: #111111;'>可用余额(点数):</span> class="order_bar paike"
<span style='font-size: 22px;color: #111111;font-family: aa;'>{{PointNum}}</span> style=""
@click="gopointBalance"
v-if="meueData.user_center.is_point_status == 1"
>
<span style="font-size: 14px; color: #111111">可用余额(点数):</span>
<span style="font-size: 22px; color: #111111; font-family: aa">{{
PointNum
}}</span>
</view> </view>
<view class="order_bar" v-if="meueData.user_center.is_order_bar_status == 1"> <view
<u-section title="我的订单" sub-title="查看更多" style="width: 100%;padding:0px 0 10px ;" @click="goUrl('/pages/order/index/index?status=0')"></u-section> class="order_bar"
v-if="meueData.user_center.is_order_bar_status == 1"
>
<u-section
title="我的订单"
sub-title="查看更多"
style="width: 100%; padding: 0px 0 10px"
@click="goUrl('/pages/order/index/index?status=0')"
></u-section>
<view class="order_bar_list"> <view class="order_bar_list">
<view class="order_bar_item" v-for="(item, index) in meueData.user_center.order_bar" :key="index" :name="item.name" <view
@click="goUrl(item.link_url)"> class="order_bar_item"
<image :src="item.icon_url" style="width: 60rpx;height: auto" mode='widthFix'></image> v-for="(item, index) in meueData.user_center.order_bar"
<Text style="margin-top: 10rpx;">{{ item.name }}</Text> :key="index"
:name="item.name"
@click="goUrl(item.link_url)"
>
<image
:src="item.icon_url"
style="width: 60rpx; height: auto"
mode="widthFix"
></image>
<Text style="margin-top: 10rpx">{{ item.name }}</Text>
<!-- 待付款 --> <!-- 待付款 -->
<view v-if="item.link_url == '/pages/order/index/index?status=1' && user_info.MyOrder.NonPayment > 0" class="badge" <view
:style="{ background: mainColor }"> v-if="
item.link_url == '/pages/order/index/index?status=1' &&
user_info.MyOrder.NonPayment > 0
"
class="badge"
:style="{ background: mainColor }"
>
{{ user_info.MyOrder.NonPayment }} {{ user_info.MyOrder.NonPayment }}
</view> </view>
<!-- 待发货 --> <!-- 待发货 -->
<view v-if="item.link_url == '/pages/order/index/index?status=2' && user_info.MyOrder.WaitSendGoods > 0" class="badge" <view
:style="{ background: mainColor }"> v-if="
item.link_url == '/pages/order/index/index?status=2' &&
user_info.MyOrder.WaitSendGoods > 0
"
class="badge"
:style="{ background: mainColor }"
>
{{ user_info.MyOrder.WaitSendGoods }} {{ user_info.MyOrder.WaitSendGoods }}
</view> </view>
<!-- 待收货 --> <!-- 待收货 -->
<view v-if="item.link_url == '/pages/order/index/index?status=3' && user_info.MyOrder.WaitReceiving > 0" class="badge" <view
:style="{ background: mainColor }"> v-if="
item.link_url == '/pages/order/index/index?status=3' &&
user_info.MyOrder.WaitReceiving > 0
"
class="badge"
:style="{ background: mainColor }"
>
{{ user_info.MyOrder.WaitReceiving }} {{ user_info.MyOrder.WaitReceiving }}
</view> </view>
<!-- 待评价 --> <!-- 待评价 -->
<view v-if="item.link_url == '/pages/order/order-commit' && user_info.MyOrder.WaitCommentNum > 0" class="badge" <view
:style="{ background: mainColor }"> v-if="
item.link_url == '/pages/order/order-commit' &&
user_info.MyOrder.WaitCommentNum > 0
"
class="badge"
:style="{ background: mainColor }"
>
{{ user_info.MyOrder.WaitCommentNum }} {{ user_info.MyOrder.WaitCommentNum }}
</view> </view>
<!-- 售后 --> <!-- 售后 -->
<view v-if="item.link_url == '/pages/order/after-sale/refunds-list' && user_info.MyOrder.AfterSaleNum > 0" class="badge" <view
:style="{ background: mainColor }"> v-if="
item.link_url == '/pages/order/after-sale/refunds-list' &&
user_info.MyOrder.AfterSaleNum > 0
"
class="badge"
:style="{ background: mainColor }"
>
{{ user_info.MyOrder.AfterSaleNum }} {{ user_info.MyOrder.AfterSaleNum }}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="order_bar" style="margin-top:20rpx;" v-if="meueData.user_center.is_sdorder_bar_status == 1"> <view
<u-section title="司导订单" sub-title="查看更多" style="width: 100%;padding:0px 0 10px ;" @click="goUrl('/pages/guidecar/orderList?status=0')"></u-section> class="order_bar"
style="margin-top: 20rpx"
v-if="meueData.user_center.is_sdorder_bar_status == 1"
>
<u-section
title="司导订单"
sub-title="查看更多"
style="width: 100%; padding: 0px 0 10px"
@click="goUrl('/pages/guidecar/orderList?status=0')"
></u-section>
<view class="order_bar_list"> <view class="order_bar_list">
<view class="order_bar_item" v-for="(item, index) in meueData.user_center.sdorder_bar" :key="index" :name="item.name" <view
@click="goUrl(item.link_url)"> class="order_bar_item"
<image :src="item.icon_url" style="width: 60rpx;height: auto" mode='widthFix'></image> v-for="(item, index) in meueData.user_center.sdorder_bar"
<Text style="margin-top: 10rpx;">{{ item.name }}</Text> :key="index"
:name="item.name"
@click="goUrl(item.link_url)"
>
<image
:src="item.icon_url"
style="width: 60rpx; height: auto"
mode="widthFix"
></image>
<Text style="margin-top: 10rpx">{{ item.name }}</Text>
<!-- 待付款 --> <!-- 待付款 -->
<view v-if="item.link_url == '/pages/guidecar/orderList?status=1' && user_info.MyGuideCarOrder.NonPayment > 0" <view
class="badge" :style="{ background: mainColor }"> v-if="
item.link_url == '/pages/guidecar/orderList?status=1' &&
user_info.MyGuideCarOrder.NonPayment > 0
"
class="badge"
:style="{ background: mainColor }"
>
{{ user_info.MyGuideCarOrder.NonPayment }} {{ user_info.MyGuideCarOrder.NonPayment }}
</view> </view>
<!-- 待确认 --> <!-- 待确认 -->
<view v-if="item.link_url == '/pages/guidecar/orderList?status=2' && user_info.MyGuideCarOrder.WaitSendGoods > 0" <view
class="badge" :style="{ background: mainColor }"> v-if="
item.link_url == '/pages/guidecar/orderList?status=2' &&
user_info.MyGuideCarOrder.WaitSendGoods > 0
"
class="badge"
:style="{ background: mainColor }"
>
{{ user_info.MyGuideCarOrder.WaitSendGoods }} {{ user_info.MyGuideCarOrder.WaitSendGoods }}
</view> </view>
<!-- 待出行 --> <!-- 待出行 -->
<view v-if="item.link_url == '/pages/guidecar/orderList?status=3' && user_info.MyGuideCarOrder.WaitReceiving > 0" <view
class="badge" :style="{ background: mainColor }"> v-if="
item.link_url == '/pages/guidecar/orderList?status=3' &&
user_info.MyGuideCarOrder.WaitReceiving > 0
"
class="badge"
:style="{ background: mainColor }"
>
{{ user_info.MyGuideCarOrder.WaitReceiving }} {{ user_info.MyGuideCarOrder.WaitReceiving }}
</view> </view>
<!-- 出行中 --> <!-- 出行中 -->
<view v-if="item.link_url == '/pages/guidecar/orderList?status=4' && user_info.MyGuideCarOrder.Completed > 0" <view
class="badge" :style="{ background: mainColor }"> v-if="
item.link_url == '/pages/guidecar/orderList?status=4' &&
user_info.MyGuideCarOrder.Completed > 0
"
class="badge"
:style="{ background: mainColor }"
>
{{ user_info.MyGuideCarOrder.Completed }} {{ user_info.MyGuideCarOrder.Completed }}
</view> </view>
<!-- 待评价 --> <!-- 待评价 -->
<view v-if="item.link_url == '/pages/guidecar/order-commit' && user_info.MyGuideCarOrder.GuideCarWaitCommentNum > 0" <view
class="badge" :style="{ background: mainColor }"> v-if="
item.link_url == '/pages/guidecar/order-commit' &&
user_info.MyGuideCarOrder.GuideCarWaitCommentNum > 0
"
class="badge"
:style="{ background: mainColor }"
>
{{ user_info.MyGuideCarOrder.GuideCarWaitCommentNum }} {{ user_info.MyGuideCarOrder.GuideCarWaitCommentNum }}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<template v-if="meueData.user_center&&meueData.user_center.nar_menus.length>0"> <template
<view v-if="meueData.user_center && meueData.user_center.is_menu_status == 1" v-for="(mItem,mIndex) in meueData.user_center.nar_menus" v-if="
:key="mIndex" :style="{'marginTop':mIndex==0&&(meueData.user_center.is_foot_bar_status==1||meueData.user_center.is_account_status==1)?'25px':''}" meueData.user_center && meueData.user_center.nar_menus.length > 0
class="headCommon"> "
<view style="margin:10px;">{{mItem.MenuNavTitle}}</view> >
<view :class="mItem.MenuNavStyle == 1 ? 'menus' : 'menus2'" style="width:100%;"> <view
<view :class="mItem.MenuNavStyle == 1 ? 'menus_item' : 'menus_item2'" v-for="(item, index) in mItem.MeunList" v-if="
:key="index" :name="item.name" @click="goUrl(item.link_url)" v-if="pandu(item)"> meueData.user_center && meueData.user_center.is_menu_status == 1
<image :src="item.icon_url" :style="{width:mItem.MenuNavStyle == 1 ?'20px':'16px',height: 'auto'}" mode="widthFix"></image> "
<Text style="font-size: 26rpx;" :style="{ 'margin-top': mItem.MenuNavStyle == 1 ? '10rpx' : '0rpx', 'margin-left': mItem.MenuNavStyle == 1 ? '0rpx' : '24rpx' }"> v-for="(mItem, mIndex) in meueData.user_center.nar_menus"
:key="mIndex"
:style="{
marginTop:
mIndex == 0 &&
(meueData.user_center.is_foot_bar_status == 1 ||
meueData.user_center.is_account_status == 1)
? '25px'
: '',
}"
class="headCommon"
>
<view style="margin: 10px">{{ mItem.MenuNavTitle }}</view>
<view
:class="mItem.MenuNavStyle == 1 ? 'menus' : 'menus2'"
style="width: 100%"
>
<view
:class="mItem.MenuNavStyle == 1 ? 'menus_item' : 'menus_item2'"
v-for="(item, index) in mItem.MeunList"
:key="index"
:name="item.name"
@click="goUrl(item.link_url)"
v-if="pandu(item)"
>
<image
:src="item.icon_url"
:style="{
width: mItem.MenuNavStyle == 1 ? '20px' : '16px',
height: 'auto',
}"
mode="widthFix"
></image>
<Text
style="font-size: 26rpx"
:style="{
'margin-top': mItem.MenuNavStyle == 1 ? '10rpx' : '0rpx',
'margin-left': mItem.MenuNavStyle == 1 ? '0rpx' : '24rpx',
}"
>
{{ item.name }} {{ item.name }}
</Text> </Text>
<button open-type="contact" class="contButton" v-if="item.link_url == 'contact' && item.name == '客服'"></button> <button
open-type="contact"
class="contButton"
v-if="item.link_url == 'contact' && item.name == '客服'"
></button>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
</view> </view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth> <auth
v-if="showAuth"
@changeuserinfo="reloadUserinfo"
@gbAuth="gbAuth"
></auth>
<tabbars></tabbars> <tabbars></tabbars>
</view> </view>
<view v-if="meueData.user_center && meueData.user_center.is_ppenmiai==1 && isloading== true"><!-- 修改 --> <view
v-if="
meueData.user_center &&
meueData.user_center.is_ppenmiai == 1 &&
isloading == true
"
><!-- 修改 -->
<blinddate <blinddate
:meueData='meueData' :meueData="meueData"
:user_info ='user_info' :user_info="user_info"
:scrollTop='scrollTop' :scrollTop="scrollTop"
:modelstype='modelstype' :modelstype="modelstype"
:bottommargin='bottommargin' :bottommargin="bottommargin"
:PointNum='PointNum' :PointNum="PointNum"
@fatherMethod="login" @fatherMethod="login"
> >
</blinddate> </blinddate>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth> <auth
v-if="showAuth"
@changeuserinfo="reloadUserinfo"
@gbAuth="gbAuth"
></auth>
<tabbars></tabbars> <tabbars></tabbars>
</view> </view>
</scroll-view> </scroll-view>
</template> </template>
<script> <script>
import tabbars from '@/components/tabbar/index'; import tabbars from "@/components/tabbar/index";
import auth from '../../components/auth/index.vue'; import auth from "../../components/auth/index.vue";
import blinddate from './components/blinddate-user.vue' import blinddate from "./components/blinddate-user.vue";
export default { export default {
data() { data() {
return { return {
isloading: true, isloading: true,
pageTitle: '用户中心', pageTitle: "用户中心",
navHeight: 0, navHeight: 0,
contentHeight: 0, contentHeight: 0,
cstyle: {}, cstyle: {},
...@@ -226,8 +596,8 @@ ...@@ -226,8 +596,8 @@
bottommargin: 0, bottommargin: 0,
listbottom: 0, listbottom: 0,
showAuth: false, showAuth: false,
mainColor: '', mainColor: "",
secondary: '', secondary: "",
u: {}, u: {},
is_icon_members_grade: 0, is_icon_members_grade: 0,
nav: 0, nav: 0,
...@@ -237,42 +607,48 @@ ...@@ -237,42 +607,48 @@
shopBasics: {}, shopBasics: {},
mall_UserInfo: {}, mall_UserInfo: {},
IsEducation: 0, //1是0否是网课模式 IsEducation: 0, //1是0否是网课模式
PointNum:0, PointNum: 0,
setting: {}, setting: {},
isCompany:true, //TODO 完成动态加载系统所属类型 isCompany: true, //TODO 完成动态加载系统所属类型
companyStatus:2, companyStatus: 2,
companyName:"", companyName: "",
is_show_korea:0,//是否显示认证标识 is_show_korea: 0, //是否显示认证标识
IsDeposit:0,//是否开启储蓄卡功能 IsDeposit: 0, //是否开启储蓄卡功能
AppletID:0,//小程序id 5-8日 判断是否是甲鹤 AppletID: 0, //小程序id 5-8日 判断是否是甲鹤
isAttestationEdu:0,//学员是否认证了 0否1是 isAttestationEdu: 0, //学员是否认证了 0否1是
}; };
}, },
components: { components: {
tabbars, tabbars,
auth, auth,
blinddate blinddate,
}, },
created() { created() {
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary; this.secondary = this.$uiConfig.secondary;
this.IsEducation = uni.getStorageSync('basedata') ? this.IsEducation = uni.getStorageSync("basedata")
(uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation ? uni.getStorageSync('basedata').mall.setting.mallStyle ? uni.getStorageSync("basedata").mall.setting.mallStyle.IsEducation
.IsEducation : 0) : ? uni.getStorageSync("basedata").mall.setting.mallStyle.IsEducation
0; : 0
: 0;
this.userinfo(); this.userinfo();
this.setting = uni.getStorageSync("basedata").mall.setting; this.setting = uni.getStorageSync("basedata").mall.setting;
this.isCompany=uni.getStorageSync("user_type")?uni.getStorageSync("user_type")=="company":true; //完成动态加载系统所属类型 this.isCompany = uni.getStorageSync("user_type")
let basedata =uni.getStorageSync("basedata")?uni.getStorageSync("basedata"):''; ? uni.getStorageSync("user_type") == "company"
this.AppletID = basedata.home_pages.id?basedata.home_pages.id:0; : true; //完成动态加载系统所属类型
this.isAttestationEdu = basedata.user_info.isAttestationEdu ? basedata.user_info.isAttestationEdu:0 let basedata = uni.getStorageSync("basedata")
? uni.getStorageSync("basedata")
: "";
this.AppletID = basedata.home_pages.id ? basedata.home_pages.id : 0;
this.isAttestationEdu = basedata.user_info.isAttestationEdu
? basedata.user_info.isAttestationEdu
: 0;
}, },
onLoad() { onLoad() {
this.navHeight = this.$navHeight - 2; this.navHeight = this.$navHeight - 2;
this.u = wx.getStorageSync('basedata').user_info; this.u = wx.getStorageSync("basedata").user_info;
this.mall_UserInfo = uni.getStorageSync("mall_UserInfo"); this.mall_UserInfo = uni.getStorageSync("mall_UserInfo");
this.nav = uni.getMenuButtonBoundingClientRect().top + 'px'; this.nav = uni.getMenuButtonBoundingClientRect().top + "px";
this.headStyle.background = `linear-gradient(to right, '#e6b865',80%, '#ebb45e')`; this.headStyle.background = `linear-gradient(to right, '#e6b865',80%, '#ebb45e')`;
this.headStyle.paddingTop = this.nav; this.headStyle.paddingTop = this.nav;
if (!this.mall_UserInfo) { if (!this.mall_UserInfo) {
...@@ -280,48 +656,65 @@ ...@@ -280,48 +656,65 @@
} }
}, },
mounted() { mounted() {
this.getComponyStatus() this.getComponyStatus();
let currentPages = getCurrentPages(); let currentPages = getCurrentPages();
let c = this.$uiConfig.is_bang ? 80 : 52; let c = this.$uiConfig.is_bang ? 80 : 52;
this.bottommargin = c + 10 + 'px'; this.bottommargin = c + 10 + "px";
this.listbottom = c - 2 + 50 + 'px'; this.listbottom = c - 2 + 50 + "px";
this.contentHeight = this.$utils.calcContentHeight(c); this.contentHeight = this.$utils.calcContentHeight(c);
if (this.contentHeight > 690 && this.contentHeight < 776) { if (this.contentHeight > 690 && this.contentHeight < 776) {
this.modelstype = 1 this.modelstype = 1;
} else if (this.contentHeight >= 776) { } else if (this.contentHeight >= 776) {
this.modelstype = 2 this.modelstype = 2;
} }
this.is_icon_members_grade = uni.getStorageSync('basedata') ? uni.getStorageSync('basedata').mall.setting.is_icon_members_grade :0; this.is_icon_members_grade = uni.getStorageSync("basedata")
this.is_show_korea= uni.getStorageSync('basedata') ? uni.getStorageSync('basedata').mall.setting.is_show_korea :0; ? uni.getStorageSync("basedata").mall.setting.is_icon_members_grade
this.IsDeposit = uni.getStorageSync('basedata')?uni.getStorageSync('basedata').mall.setting.IsDeposit:0 : 0;
let u = '/' + currentPages[currentPages.length - 1].route; this.is_show_korea = uni.getStorageSync("basedata")
let pages = wx.getStorageSync('basedata') ? wx.getStorageSync('basedata').bar_title : []; ? uni.getStorageSync("basedata").mall.setting.is_show_korea
: 0;
this.IsDeposit = uni.getStorageSync("basedata")
? uni.getStorageSync("basedata").mall.setting.IsDeposit
: 0;
let u = "/" + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync("basedata")
? wx.getStorageSync("basedata").bar_title
: [];
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '用户中心' title: "用户中心",
}); });
}, },
onShow() { onShow() {
this.userinfo(2); this.userinfo(2);
if (this.mall_UserInfo) { if (this.mall_UserInfo) {
this.getUserPoint() this.getUserPoint();
} }
let basedata =uni.getStorageSync("basedata")?uni.getStorageSync("basedata"):''; let basedata = uni.getStorageSync("basedata")
this.isAttestationEdu = basedata.user_info.isAttestationEdu ? basedata.user_info.isAttestationEdu:0 ? uni.getStorageSync("basedata")
: "";
this.isAttestationEdu = basedata.user_info.isAttestationEdu
? basedata.user_info.isAttestationEdu
: 0;
}, },
methods: { methods: {
goHome() { goHome() {
uni.redirectTo({ uni.redirectTo({
url: '/pages/index/main' url: "/pages/index/main",
}); });
}, },
pandu(item) { pandu(item) {
let flag = true; let flag = true;
let IsOpen = this.shopBasics.model && this.shopBasics.model.IsOpen ? this.shopBasics.model.IsOpen : 1; let IsOpen =
let SmallShopId = this.mall_UserInfo.SmallShopId ? this.mall_UserInfo.SmallShopId : 0; this.shopBasics.model && this.shopBasics.model.IsOpen
let UserSmallShopId = this.mall_UserInfo.UserSmallShopId ? this.mall_UserInfo.UserSmallShopId : 0; ? this.shopBasics.model.IsOpen
: 1;
let SmallShopId = this.mall_UserInfo.SmallShopId
? this.mall_UserInfo.SmallShopId
: 0;
let UserSmallShopId = this.mall_UserInfo.UserSmallShopId
? this.mall_UserInfo.UserSmallShopId
: 0;
switch (item.link_url) { switch (item.link_url) {
case "/pages/share/index/index": case "/pages/share/index/index":
if (this.user_info.isShowDistributionCenter == 1) { if (this.user_info.isShowDistributionCenter == 1) {
...@@ -352,30 +745,36 @@ ...@@ -352,30 +745,36 @@
} }
break; break;
case "/pages/appointment/personal/studentAppointmentList": case "/pages/appointment/personal/studentAppointmentList":
if(this.meueData.user_center.is_point_status==1){ if (this.meueData.user_center.is_point_status == 1) {
flag = true; flag = true;
}else{ } else {
flag = false; flag = false;
} }
break; break;
case "/pages/appointment/personal/teacherOrderList": case "/pages/appointment/personal/teacherOrderList":
if(this.meueData.user_center.is_point_status==1 && this.mall_UserInfo.UserTeacher>0){ if (
this.meueData.user_center.is_point_status == 1 &&
this.mall_UserInfo.UserTeacher > 0
) {
flag = true; flag = true;
}else{ } else {
flag = false; flag = false;
} }
break; break;
case "/pages/appointment/appointment?teacher=1": case "/pages/appointment/appointment?teacher=1":
if(this.meueData.user_center.is_point_status==1 && this.mall_UserInfo.UserTeacher>0){ if (
this.meueData.user_center.is_point_status == 1 &&
this.mall_UserInfo.UserTeacher > 0
) {
flag = true; flag = true;
}else{ } else {
flag = false; flag = false;
} }
break; break;
case "/pages/coupon/cards/purchase": case "/pages/coupon/cards/purchase":
if(this.IsDeposit == 1){ if (this.IsDeposit == 1) {
flag = true; flag = true;
}else{ } else {
flag = false; flag = false;
} }
break; break;
...@@ -385,58 +784,65 @@ ...@@ -385,58 +784,65 @@
//获取菜单配置 //获取菜单配置
userinfo(type = 1) { userinfo(type = 1) {
uni.showNavigationBarLoading(); uni.showNavigationBarLoading();
this.request2({ this.request2(
url: '/api/Mall/GetUserCenter', {
data: {} url: "/api/Mall/GetUserCenter",
data: {},
}, },
res => { (res) => {
uni.hideNavigationBarLoading(); uni.hideNavigationBarLoading();
this.meueData = res.data.config; this.meueData = res.data.config;
this.user_info = res.data.user_info; this.user_info = res.data.user_info;
this.meueData.user_center.account.forEach(x => { this.meueData.user_center.account.forEach((x) => {
if (x.link_url == "/pages/coupon/index/index") { if (x.link_url == "/pages/coupon/index/index") {
this.couponsObj = x this.couponsObj = x;
} }
}) });
if (this.mall_UserInfo && type == 1) { if (this.mall_UserInfo && type == 1) {
this.getLogin() // this.getLogin()
} }
this.isloading= true this.isloading = true;
} }
); );
let u = uni.getStorageSync("mall_UserInfo"); let u = uni.getStorageSync("mall_UserInfo");
if (u && type == 1) { if (u && type == 1) {
this.getMicroShopBasics() this.getMicroShopBasics();
} }
}, },
getLogin() { getLogin() {
var that = this; var that = this;
let pid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0; let pid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
let Up = uni.getStorageSync("Up") ? uni.getStorageSync("Up").Up : 0; let Up = uni.getStorageSync("Up") ? uni.getStorageSync("Up").Up : 0;
let SmallShopId = uni.getStorageSync("SmallShopId") ? uni.getStorageSync("SmallShopId").SmallShopId : 0; let SmallShopId = uni.getStorageSync("SmallShopId")
let CounponPassword = uni.getStorageSync("CounponPassword") ? uni.getStorageSync("CounponPassword").CounponPassword : 0; ? uni.getStorageSync("SmallShopId").SmallShopId
let KeyWord = uni.getStorageSync("KeyWord") ? uni.getStorageSync("KeyWord").KeyWord : ''; : 0;
that.request2({ let CounponPassword = uni.getStorageSync("CounponPassword")
url: '/api/AppletLogin/Login', ? uni.getStorageSync("CounponPassword").CounponPassword
: 0;
let KeyWord = uni.getStorageSync("KeyWord")
? uni.getStorageSync("KeyWord").KeyWord
: "";
that.request2(
{
url: "/api/AppletLogin/Login",
data: { data: {
Source: 1, Source: this.mall_UserInfo.Source,
OpenId: this.mall_UserInfo.OpenId, OpenId: this.mall_UserInfo.OpenId,
Name: this.mall_UserInfo.Name, Name: this.mall_UserInfo.Name,
Photo: this.mall_UserInfo.Photo, Photo: this.mall_UserInfo.Photo,
Moblie: '', Moblie: "",
SuperiorId: pid, SuperiorId: pid,
SmallShopId: SmallShopId, SmallShopId: SmallShopId,
UserPageType: Up, UserPageType: Up,
CounponPassword:CounponPassword, CounponPassword: CounponPassword,
KeyWord:KeyWord, KeyWord: KeyWord,
}
}, },
res => { },
(res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
uni.setStorageSync('mall_UserInfo', res.data); uni.setStorageSync("mall_UserInfo", res.data);
uni.removeStorageSync('pid'); uni.removeStorageSync("pid");
uni.removeStorageSync('SmallShopId'); uni.removeStorageSync("SmallShopId");
uni.removeStorageSync("Up"); uni.removeStorageSync("Up");
uni.removeStorageSync("CounponPassword"); uni.removeStorageSync("CounponPassword");
uni.removeStorageSync("KeyWord"); uni.removeStorageSync("KeyWord");
...@@ -445,19 +851,21 @@ ...@@ -445,19 +851,21 @@
); );
}, },
getMicroShopBasics() { getMicroShopBasics() {
this.request2({ this.request2(
url: '/api/AppletUser/GetMicroShopBasics', {
data: {} url: "/api/AppletUser/GetMicroShopBasics",
data: {},
}, },
(res) => { (res) => {
this.shopBasics = res.data; this.shopBasics = res.data;
} }
); );
}, },
getUserPoint(){ getUserPoint() {
this.request2({ this.request2(
url: '/api/AppletPoint/GetAppletUserPointDetailPageList', {
data: {pageIndex:1,pageSize:10,Type:0} url: "/api/AppletPoint/GetAppletUserPointDetailPageList",
data: { pageIndex: 1, pageSize: 10, Type: 0 },
}, },
(res) => { (res) => {
this.PointNum = res.data.pageData.PointNum; this.PointNum = res.data.pageData.PointNum;
...@@ -465,24 +873,26 @@ ...@@ -465,24 +873,26 @@
); );
}, },
goUrl(url) { goUrl(url) {
if (url == '/pages/balance/balance') { if (url == "/pages/balance/balance") {
uni.navigateTo({ uni.navigateTo({
url: '/pages/balance/balance?balance=' + this.user_info.balance url: "/pages/balance/balance?balance=" + this.user_info.balance,
}); });
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: url url: url,
}); });
} }
}, },
reloadUserinfo() { reloadUserinfo() {
this.userinfo(); this.userinfo();
this.u = this.user_info; this.u = this.user_info;
this.mall_UserInfo = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo") : {}; this.mall_UserInfo = uni.getStorageSync("mall_UserInfo")
this.getUserPoint() ? uni.getStorageSync("mall_UserInfo")
: {};
this.getUserPoint();
}, },
login(name) { login(name) {
if ((name && name.nickname == '') || !name || !name.nickname) { if ((name && name.nickname == "") || !name || !name.nickname) {
this.showAuth = true; this.showAuth = true;
} }
}, },
...@@ -496,93 +906,92 @@ ...@@ -496,93 +906,92 @@
scrollTopHandler() { scrollTopHandler() {
this.scrollTop = 0; this.scrollTop = 0;
}, },
gopointBalance(){//跳转点数余额 gopointBalance() {
//跳转点数余额
uni.navigateTo({ uni.navigateTo({
url: '/pages/appointment/personal/pointBalance' url: "/pages/appointment/personal/pointBalance",
}); });
}, },
// 获取公司认证信息 // 获取公司认证信息
getComponyStatus(){ getComponyStatus() {
let that = this let that = this;
let parms = { let parms = {
url: "/api/AppletTrade/GetUserCompany", url: "/api/AppletTrade/GetUserCompany",
} };
this.request2(parms, (res) => { this.request2(parms, (res) => {
if (res.resultCode == 1&&res.data!=null) { if (res.resultCode == 1 && res.data != null) {
// 获取公司名字和认证状态 // 获取公司名字和认证状态
that.companyStatus=res.data.CompanyStatus that.companyStatus = res.data.CompanyStatus;
that.companyName=res.data.CompanyName that.companyName = res.data.CompanyName;
} }
}) });
}, },
//去认证页 //去认证页
goIdentification(){ goIdentification() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/kotra/identification' url: "/pages/kotra/identification",
}) });
} },
} },
}; };
</script> </script>
<style> <style>
.body { .body {
background: #f3f4f6; background: #f3f4f6;
height: 100vh; height: 100vh;
} }
.userStyle .userBox {
.userStyle .userBox {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
background: #f3f4f6; background: #f3f4f6;
height: 100%; height: 100%;
} }
.userStyle .imgbg { .userStyle .imgbg {
width: 100%; width: 100%;
height: 310px; height: 310px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
position: relative; position: relative;
}
} .userStyle .headimg {
.userStyle .headimg {
width: 140rpx; width: 140rpx;
height: 140rpx; height: 140rpx;
border-radius: 50%; border-radius: 50%;
margin-left: 60rpx; margin-left: 60rpx;
} }
.userStyle .footprint { .userStyle .footprint {
width: 80%; width: 80%;
height: 140rpx; height: 140rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
} }
.userStyle .footprint_item { .userStyle .footprint_item {
width: 200rpx; width: 200rpx;
height: 90rpx; height: 90rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.userStyle .footprint_item_bottom { .userStyle .footprint_item_bottom {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.userStyle .account_bar { .userStyle .account_bar {
width: 94%; width: 94%;
height: 110rpx; height: 110rpx;
border-radius: 10rpx; border-radius: 10rpx;
...@@ -592,22 +1001,22 @@ ...@@ -592,22 +1001,22 @@
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
padding: 0 20rpx; padding: 0 20rpx;
} }
.userStyle .account_bar_item { .userStyle .account_bar_item {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
border-right: 1px solid #d1d1d1; border-right: 1px solid #d1d1d1;
width: 25%; width: 25%;
} }
.userStyle .account_bar_item:last-child { .userStyle .account_bar_item:last-child {
border-right: 0; border-right: 0;
} }
.userStyle .order_bar { .userStyle .order_bar {
width: 94%; width: 94%;
border-radius: 10rpx; border-radius: 10rpx;
background: #fff; background: #fff;
...@@ -616,25 +1025,25 @@ ...@@ -616,25 +1025,25 @@
align-items: center; align-items: center;
padding: 30rpx; padding: 30rpx;
margin-top: 80rpx; margin-top: 80rpx;
} }
.userStyle .order_bar .order_bar_list { .userStyle .order_bar .order_bar_list {
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.userStyle .order_bar_item { .userStyle .order_bar_item {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
margin-top: 20rpx; margin-top: 20rpx;
position: relative; position: relative;
} }
.userStyle .badge { .userStyle .badge {
position: absolute; position: absolute;
right: -10rpx; right: -10rpx;
top: -10rpx; top: -10rpx;
...@@ -646,9 +1055,9 @@ ...@@ -646,9 +1055,9 @@
color: #fff; color: #fff;
height: 30rpx; height: 30rpx;
border-radius: 15rpx; border-radius: 15rpx;
} }
.userStyle .menus { .userStyle .menus {
width: 94%; width: 94%;
border-radius: 10rpx; border-radius: 10rpx;
background: #fff; background: #fff;
...@@ -657,18 +1066,18 @@ ...@@ -657,18 +1066,18 @@
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
margin-top: 30rpx; margin-top: 30rpx;
} }
.userStyle .menus2 { .userStyle .menus2 {
width: 94%; width: 94%;
border-radius: 10rpx; border-radius: 10rpx;
background: #fff; background: #fff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-top: 20rpx; margin-top: 20rpx;
} }
.userStyle .menus .menus_item { .userStyle .menus .menus_item {
width: 25%; width: 25%;
height: 110rpx; height: 110rpx;
margin: 20rpx 0 10rpx; margin: 20rpx 0 10rpx;
...@@ -677,19 +1086,19 @@ ...@@ -677,19 +1086,19 @@
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
position: relative; position: relative;
} }
.menus_item2 .contButton, .menus_item2 .contButton,
.menus_item .contButton { .menus_item .contButton {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
opacity: 0; opacity: 0;
} }
.userStyle .menus2 .menus_item2 { .userStyle .menus2 .menus_item2 {
width: 100%; width: 100%;
height: 90rpx; height: 90rpx;
display: flex; display: flex;
...@@ -697,16 +1106,16 @@ ...@@ -697,16 +1106,16 @@
align-items: center; align-items: center;
margin-left: 30rpx; margin-left: 30rpx;
position: relative; position: relative;
} }
.userStyle .copyright { .userStyle .copyright {
padding: 70rpx 0; padding: 70rpx 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
.userStyle .ReceiptAdder { .userStyle .ReceiptAdder {
position: absolute; position: absolute;
right: 0; right: 0;
top: 160rpx; top: 160rpx;
...@@ -718,10 +1127,10 @@ ...@@ -718,10 +1127,10 @@
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
padding: 0 20rpx; padding: 0 20rpx;
background: rgba(55, 55, 55, 0.15) background: rgba(55, 55, 55, 0.15);
} }
.userStyle .member { .userStyle .member {
background: #3b3641; background: #3b3641;
/* width: 80px; */ /* width: 80px; */
font-size: 10px; font-size: 10px;
...@@ -733,62 +1142,61 @@ ...@@ -733,62 +1142,61 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-top: 10px; margin-top: 10px;
} }
.userStyle .titlenav { .userStyle .titlenav {
width: 100%; width: 100%;
text-align: center; text-align: center;
font-size: 16px; font-size: 16px;
color: #FFFFFF; color: #ffffff;
} }
.userStyle .top_b { .userStyle .top_b {
width: 86%; width: 86%;
height: 65px; height: 65px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.userStyle .top_b_item { .userStyle .top_b_item {
width: 26%; width: 26%;
height: 50px; height: 50px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
color: #FFFFFF; color: #ffffff;
font-size: 12px; font-size: 12px;
} }
.userStyle .Receiptbalance { .userStyle .Receiptbalance {
width: 94%; width: 94%;
height: 62px; height: 62px;
position: absolute; position: absolute;
left: 3%; left: 3%;
bottom: -20px; bottom: -20px;
background: #FFFFFF; background: #ffffff;
border-radius: 6px; border-radius: 6px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
padding: 0 10px; padding: 0 10px;
} }
.userStyle .Receiptbalance_item { .userStyle .Receiptbalance_item {
width: 40%; width: 40%;
height: 50px; height: 50px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
font-size: 12px; font-size: 12px;
color: #534D62; color: #534d62;
}
} .userStyle .headStatus {
.userStyle .headStatus {
overflow: hidden; overflow: hidden;
position: relative; position: relative;
width: 140vw; width: 140vw;
...@@ -799,65 +1207,76 @@ ...@@ -799,65 +1207,76 @@
right: 0; right: 0;
top: 0; top: 0;
display: flex; display: flex;
background-image: linear-gradient(to right, background-image: linear-gradient(to right, #e6b865, #ebb45e);
#e6b865, }
#ebb45e);
} .userStyle .headStatus .arrow {
.userStyle .headStatus .arrow {
height: 24px; height: 24px;
margin: 5px 10px; margin: 5px 10px;
width: 24px; width: 24px;
} }
.userStyle .headStatus .title { .userStyle .headStatus .title {
font-size: 18px; font-size: 18px;
color: #fff; color: #fff;
flex: 1; flex: 1;
width: 1px; width: 1px;
line-height: 34px; line-height: 34px;
text-align: center; text-align: center;
} }
.dark .userStyle .headStatus .title{ .dark .userStyle .headStatus .title {
color:#111 !important; color: #111 !important;
} }
.dark .nickname{ .dark .nickname {
color:#111 !important; color: #111 !important;
} }
.userStyle .topheard { .userStyle .topheard {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
width: 100%; width: 100%;
margin-bottom: 20px; margin-bottom: 20px;
} }
.userStyle .miniHeadTop { .userStyle .miniHeadTop {
height: 200px; height: 200px;
} }
.userBox .headCommon { .userBox .headCommon {
width: 94%; width: 94%;
margin-top: 25px; margin-top: 25px;
border-radius: 10px; border-radius: 10px;
background-color: #fff; background-color: #fff;
} }
.userBox .headHasTOP { .userBox .headHasTOP {
margin-top: 25px; margin-top: 25px;
} }
.userBox .paike{ .userBox .paike {
margin-top: 15px;display: flex;flex-direction: row;align-items: center;justify-content: space-between; margin-top: 15px;
} display: flex;
.componyStatusBox .renzhen{ flex-direction: row;
height: 15px;font-size: 10px;margin-top: 10px;color: #555555;border-radius: 7px;border: 1px solid #999999;display: flex;align-items: center;justify-content: center; padding: 0 10rpx; margin-left: 10rpx; align-items: center;
} justify-content: space-between;
.componyStatusBox .companyName{ }
.componyStatusBox .renzhen {
height: 15px;
font-size: 10px;
margin-top: 10px;
color: #555555;
border-radius: 7px;
border: 1px solid #999999;
display: flex;
align-items: center;
justify-content: center;
padding: 0 10rpx;
margin-left: 10rpx;
}
.componyStatusBox .companyName {
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 500;
color: #888888; color: #888888;
/* background-color: #F6F6F6FF */ /* background-color: #F6F6F6FF */
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment