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"
zIndex: scrollTop < 10 ? 'unset' : 2, style="height: 100vh"
opacity: scrollTop < 10 ? '100' : scrollTop, >
}, <view
]"> class="userStyle"
<view class="title" v-if="scrollTop > 50">{{pageTitle}}</view> v-if="meueData.user_center && meueData.user_center.is_ppenmiai == 0"
</view> :class="{ dark: isCompany }"
<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}"> class="headStatus"
<view class="titlenav" :style="{paddingTop:nav}">{{pageTitle}}</view> v-if="scrollTop > 50"
<view class='topheard' :style="{'margin-top':modelstype==0?'52px':(modelstype==1?'37px':(modelstype==2)?'33px':0) }" :style="[
v-if="meueData.user_center.top_style == 1"> headStyle,
<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"> zIndex: scrollTop < 10 ? 'unset' : 2,
<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;" opacity: scrollTop < 10 ? '100' : scrollTop,
@click="login(user_info)">{{ user_info.nickname ? user_info.nickname : '立即登录' }}</Text> },
<!-- 判断是甲鹤小程序 --> ]"
<view v-if="AppletID == 5 && isAttestationEdu==1"> >
<u-tag text="甲鹤学员" bg-color='#40766E' color='#FFF' size='mini' border-color='#40766E'/> <view class="title" v-if="scrollTop > 50">{{ pageTitle }}</view>
</view> </view>
<view style="display: flex; align-items: center;"> <view class="userBox" :style="{ 'padding-bottom': bottommargin }">
<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> :style="{
<Text style="margin-right: 10px;">{{ user_info.identity.level_name != null ? user_info.identity.level_name : '普通用户' }}</Text> 'background-image':
<!-- 公司认证状态 --> 'url(' +
(meueData.user_center.top_pic_url
</view> ? meueData.user_center.top_pic_url
<view class="componyStatusBox" @click="goIdentification" v-if="is_show_korea==1 && user_info.nickname"> : '') +
<view class="renzhen" v-if="companyStatus==2 " > ')',
未认证 backgroundSize: '100% 310px',
</view> }"
<view class="renzhen" v-if="companyStatus==0" :style="{'border':'1px solid '+mainColor,'color':mainColor}"> class="imgbg"
认证审核中 :class="{
</view> miniHeadTop:
<view class="companyName" v-if="companyStatus==1"> meueData.user_center.is_foot_bar_status != 1 &&
{{companyName}} meueData.user_center.is_account_status != 1,
</view> }"
</view> >
</view> <view class="titlenav" :style="{ paddingTop: nav }">{{
pageTitle
</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"> class="topheard"
<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> 'margin-top':
<view class="member" v-if="is_icon_members_grade == 1&&user_info.nickname"> modelstype == 0
<image :src="user_info.identity.level_icon" mode="aspectFill" style="width: 22px;height: 22px;border-radius: 11px;"></image> ? '52px'
<Text style="margin-right: 10px;">{{ user_info.identity.level_name != null ? user_info.identity.level_name : '普通用户' }}</Text> : modelstype == 1
</view> ? '37px'
<view v-if="AppletID == 5 && isAttestationEdu == 1"> : modelstype == 2
<u-tag text="甲鹤学员" bg-color='#40766E' color='#FFF' size='mini' border-color='#40766E'/> ? '33px'
</view> : 0,
</view> }"
<view class="top_b"> v-if="meueData.user_center.top_style == 1"
<view class="top_b_item" 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> <u-avatar
<text>{{meueData.user_center.foot_bar[0].name}}</text> :src="user_info.avatar"
</view> size="140"
<view class="top_b_item" v-if="meueData.user_center.is_foot_bar_status == 1" @click="goUrl('/pages/foot/index/index')"> shape="circle"
<text style="font-size: 21px;">{{user_info.footprint?user_info.footprint:0}}</text> style="margin-left: 50rpx"
<text>{{meueData.user_center.foot_bar[1].name}}</text> ></u-avatar>
</view> <view
<view class="top_b_item" v-if="meueData.user_center&&meueData.user_center.is_account_status == 1" @click="goUrl(couponsObj.link_url)"> style="
<text style="font-size: 21px;">{{user_info.coupon?user_info.coupon:0}}</text> display: flex;
<text>{{couponsObj.name}}</text> flex-direction: column;
</view> justify-content: center;
</view> height: 50px;
<!-- <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')}"> 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">
<u-tag
text="甲鹤学员"
bg-color="#40766E"
color="#FFF"
size="mini"
border-color="#40766E"
/>
</view>
<view style="display: flex; align-items: center">
<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
class="componyStatusBox"
@click="goIdentification"
v-if="is_show_korea == 1 && user_info.nickname"
>
<view class="renzhen" v-if="companyStatus == 2">
未认证
</view>
<view
class="renzhen"
v-if="companyStatus == 0"
:style="{
border: '1px solid ' + mainColor,
color: mainColor,
}"
>
认证审核中
</view>
<view class="companyName" v-if="companyStatus == 1">
{{ companyName }}
</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"
>
<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 v-if="AppletID == 5 && isAttestationEdu == 1">
<u-tag
text="甲鹤学员"
bg-color="#40766E"
color="#FFF"
size="mini"
border-color="#40766E"
/>
</view>
</view>
<view class="top_b">
<view
class="top_b_item"
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
class="top_b_item"
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
class="top_b_item"
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 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> <view
</view> class="Receiptbalance_item"
<view style="width: 1px;height: 34px;background: #E8E8E8;"></view> v-for="(item, index) in meueData.user_center.account"
<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'" :key="index"
@click="goUrl(item.link_url)"> v-if="item.link_url == '/pages/balance/balance'"
<image :src="item.icon_url" style="width: 17px;;height: auto" mode='widthFix'></image> @click="goUrl(item.link_url)"
<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> <image
<span>{{item.name}}</span> :src="item.icon_url"
</view> style="width: 22px; height: auto"
</view> mode="widthFix"
</view> ></image>
</view> <view
<!-- 排课点数 --> style="
<view class="order_bar paike" style="" @click="gopointBalance" v-if="meueData.user_center.is_point_status==1"> margin-left: 15px;
<span style='font-size: 14px;color: #111111;'>可用余额(点数):</span> display: flex;
<span style='font-size: 22px;color: #111111;font-family: aa;'>{{PointNum}}</span> flex-direction: column;
</view> justify-content: space-between;
<view 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"> <span
<view class="order_bar_item" v-for="(item, index) in meueData.user_center.order_bar" :key="index" :name="item.name" style="font-size: 21px; color: #0d0d0d; font-weight: 200"
@click="goUrl(item.link_url)"> >{{
<image :src="item.icon_url" style="width: 60rpx;height: auto" mode='widthFix'></image> user_info.balance
<Text style="margin-top: 10rpx;">{{ item.name }}</Text> ? user_info.balance > 10000
<!-- 待付款 --> ? (user_info.balance / 10000).toFixed(1) + "w"
<view v-if="item.link_url == '/pages/order/index/index?status=1' && user_info.MyOrder.NonPayment > 0" class="badge" : user_info.balance
:style="{ background: mainColor }"> : 0
{{ user_info.MyOrder.NonPayment }} }}</span
</view> >
<!-- 待发货 --> <span style="">{{ item.name }}</span>
<view v-if="item.link_url == '/pages/order/index/index?status=2' && user_info.MyOrder.WaitSendGoods > 0" class="badge" </view>
:style="{ background: mainColor }"> </view>
{{ user_info.MyOrder.WaitSendGoods }} <view style="width: 1px; height: 34px; background: #e8e8e8"></view>
</view> <view
<!-- 待收货 --> class="Receiptbalance_item"
<view v-if="item.link_url == '/pages/order/index/index?status=3' && user_info.MyOrder.WaitReceiving > 0" class="badge" v-for="(item, index) in meueData.user_center.account"
:style="{ background: mainColor }"> :key="index"
{{ user_info.MyOrder.WaitReceiving }} v-if="
</view> item.link_url ==
<!-- 待评价 --> '/pages/user-center/integral-detail/integral-detail'
<view v-if="item.link_url == '/pages/order/order-commit' && user_info.MyOrder.WaitCommentNum > 0" class="badge" "
:style="{ background: mainColor }"> @click="goUrl(item.link_url)"
{{ user_info.MyOrder.WaitCommentNum }} >
</view> <image
<!-- 售后 --> :src="item.icon_url"
<view v-if="item.link_url == '/pages/order/after-sale/refunds-list' && user_info.MyOrder.AfterSaleNum > 0" class="badge" style="width: 17px; height: auto"
:style="{ background: mainColor }"> mode="widthFix"
{{ user_info.MyOrder.AfterSaleNum }} ></image>
</view> <view
</view> style="
</view> margin-left: 15px;
</view> display: flex;
<view class="order_bar" style="margin-top:20rpx;" v-if="meueData.user_center.is_sdorder_bar_status == 1"> flex-direction: column;
<u-section title="司导订单" sub-title="查看更多" style="width: 100%;padding:0px 0 10px ;" @click="goUrl('/pages/guidecar/orderList?status=0')"></u-section> justify-content: space-between;
<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" >
@click="goUrl(item.link_url)"> <span
<image :src="item.icon_url" style="width: 60rpx;height: auto" mode='widthFix'></image> style="font-size: 21px; color: #0d0d0d; font-weight: 200"
<Text style="margin-top: 10rpx;">{{ item.name }}</Text> >{{
<!-- 待付款 --> user_info.integral
<view v-if="item.link_url == '/pages/guidecar/orderList?status=1' && user_info.MyGuideCarOrder.NonPayment > 0" ? user_info.integral > 10000
class="badge" :style="{ background: mainColor }"> ? (user_info.integral / 10000).toFixed(1) + "w"
{{ user_info.MyGuideCarOrder.NonPayment }} : user_info.integral
</view> : 0
<!-- 待确认 --> }}</span
<view v-if="item.link_url == '/pages/guidecar/orderList?status=2' && user_info.MyGuideCarOrder.WaitSendGoods > 0" >
class="badge" :style="{ background: mainColor }"> <span>{{ item.name }}</span>
{{ user_info.MyGuideCarOrder.WaitSendGoods }} </view>
</view> </view>
<!-- 待出行 --> </view>
<view v-if="item.link_url == '/pages/guidecar/orderList?status=3' && user_info.MyGuideCarOrder.WaitReceiving > 0" </view>
class="badge" :style="{ background: mainColor }"> <!-- 排课点数 -->
{{ user_info.MyGuideCarOrder.WaitReceiving }} <view
</view> class="order_bar paike"
<!-- 出行中 --> style=""
<view v-if="item.link_url == '/pages/guidecar/orderList?status=4' && user_info.MyGuideCarOrder.Completed > 0" @click="gopointBalance"
class="badge" :style="{ background: mainColor }"> v-if="meueData.user_center.is_point_status == 1"
{{ user_info.MyGuideCarOrder.Completed }} >
</view> <span style="font-size: 14px; color: #111111">可用余额(点数):</span>
<!-- 待评价 --> <span style="font-size: 22px; color: #111111; font-family: aa">{{
<view v-if="item.link_url == '/pages/guidecar/order-commit' && user_info.MyGuideCarOrder.GuideCarWaitCommentNum > 0" PointNum
class="badge" :style="{ background: mainColor }"> }}</span>
{{ user_info.MyGuideCarOrder.GuideCarWaitCommentNum }} </view>
</view> <view
</view> class="order_bar"
</view> v-if="meueData.user_center.is_order_bar_status == 1"
</view> >
<template v-if="meueData.user_center&&meueData.user_center.nar_menus.length>0"> <u-section
<view v-if="meueData.user_center && meueData.user_center.is_menu_status == 1" v-for="(mItem,mIndex) in meueData.user_center.nar_menus" title="我的订单"
:key="mIndex" :style="{'marginTop':mIndex==0&&(meueData.user_center.is_foot_bar_status==1||meueData.user_center.is_account_status==1)?'25px':''}" sub-title="查看更多"
class="headCommon"> style="width: 100%; padding: 0px 0 10px"
<view style="margin:10px;">{{mItem.MenuNavTitle}}</view> @click="goUrl('/pages/order/index/index?status=0')"
<view :class="mItem.MenuNavStyle == 1 ? 'menus' : 'menus2'" style="width:100%;"> ></u-section>
<view :class="mItem.MenuNavStyle == 1 ? 'menus_item' : 'menus_item2'" v-for="(item, index) in mItem.MeunList" <view class="order_bar_list">
:key="index" :name="item.name" @click="goUrl(item.link_url)" v-if="pandu(item)"> <view
<image :src="item.icon_url" :style="{width:mItem.MenuNavStyle == 1 ?'20px':'16px',height: 'auto'}" mode="widthFix"></image> class="order_bar_item"
<Text style="font-size: 26rpx;" :style="{ 'margin-top': mItem.MenuNavStyle == 1 ? '10rpx' : '0rpx', 'margin-left': mItem.MenuNavStyle == 1 ? '0rpx' : '24rpx' }"> v-for="(item, index) in meueData.user_center.order_bar"
{{ item.name }} :key="index"
</Text> :name="item.name"
<button open-type="contact" class="contButton" v-if="item.link_url == 'contact' && item.name == '客服'"></button> @click="goUrl(item.link_url)"
</view> >
</view> <image
</view> :src="item.icon_url"
</template> style="width: 60rpx; height: auto"
</view> mode="widthFix"
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth> ></image>
<tabbars></tabbars> <Text style="margin-top: 10rpx">{{ item.name }}</Text>
</view> <!-- 待付款 -->
<view v-if="meueData.user_center && meueData.user_center.is_ppenmiai==1 && isloading== true"><!-- 修改 --> <view
<blinddate v-if="
:meueData='meueData' item.link_url == '/pages/order/index/index?status=1' &&
:user_info ='user_info' user_info.MyOrder.NonPayment > 0
:scrollTop='scrollTop' "
:modelstype='modelstype' class="badge"
:bottommargin='bottommargin' :style="{ background: mainColor }"
:PointNum='PointNum' >
@fatherMethod="login" {{ user_info.MyOrder.NonPayment }}
> </view>
<!-- 待发货 -->
</blinddate> <view
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth> v-if="
<tabbars></tabbars> item.link_url == '/pages/order/index/index?status=2' &&
</view> user_info.MyOrder.WaitSendGoods > 0
</scroll-view> "
class="badge"
:style="{ background: mainColor }"
>
{{ user_info.MyOrder.WaitSendGoods }}
</view>
<!-- 待收货 -->
<view
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 }}
</view>
<!-- 待评价 -->
<view
v-if="
item.link_url == '/pages/order/order-commit' &&
user_info.MyOrder.WaitCommentNum > 0
"
class="badge"
:style="{ background: mainColor }"
>
{{ user_info.MyOrder.WaitCommentNum }}
</view>
<!-- 售后 -->
<view
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 }}
</view>
</view>
</view>
</view>
<view
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_item"
v-for="(item, index) in meueData.user_center.sdorder_bar"
: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
"
class="badge"
:style="{ background: mainColor }"
>
{{ user_info.MyGuideCarOrder.NonPayment }}
</view>
<!-- 待确认 -->
<view
v-if="
item.link_url == '/pages/guidecar/orderList?status=2' &&
user_info.MyGuideCarOrder.WaitSendGoods > 0
"
class="badge"
:style="{ background: mainColor }"
>
{{ user_info.MyGuideCarOrder.WaitSendGoods }}
</view>
<!-- 待出行 -->
<view
v-if="
item.link_url == '/pages/guidecar/orderList?status=3' &&
user_info.MyGuideCarOrder.WaitReceiving > 0
"
class="badge"
:style="{ background: mainColor }"
>
{{ user_info.MyGuideCarOrder.WaitReceiving }}
</view>
<!-- 出行中 -->
<view
v-if="
item.link_url == '/pages/guidecar/orderList?status=4' &&
user_info.MyGuideCarOrder.Completed > 0
"
class="badge"
:style="{ background: mainColor }"
>
{{ user_info.MyGuideCarOrder.Completed }}
</view>
<!-- 待评价 -->
<view
v-if="
item.link_url == '/pages/guidecar/order-commit' &&
user_info.MyGuideCarOrder.GuideCarWaitCommentNum > 0
"
class="badge"
:style="{ background: mainColor }"
>
{{ user_info.MyGuideCarOrder.GuideCarWaitCommentNum }}
</view>
</view>
</view>
</view>
<template
v-if="
meueData.user_center && meueData.user_center.nar_menus.length > 0
"
>
<view
v-if="
meueData.user_center && meueData.user_center.is_menu_status == 1
"
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 }}
</Text>
<button
open-type="contact"
class="contButton"
v-if="item.link_url == 'contact' && item.name == '客服'"
></button>
</view>
</view>
</view>
</template>
</view>
<auth
v-if="showAuth"
@changeuserinfo="reloadUserinfo"
@gbAuth="gbAuth"
></auth>
<tabbars></tabbars>
</view>
<view
v-if="
meueData.user_center &&
meueData.user_center.is_ppenmiai == 1 &&
isloading == true
"
><!-- 修改 -->
<blinddate
:meueData="meueData"
:user_info="user_info"
:scrollTop="scrollTop"
:modelstype="modelstype"
:bottommargin="bottommargin"
:PointNum="PointNum"
@fatherMethod="login"
>
</blinddate>
<auth
v-if="showAuth"
@changeuserinfo="reloadUserinfo"
@gbAuth="gbAuth"
></auth>
<tabbars></tabbars>
</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: {},
meueData: {}, //菜单 meueData: {}, //菜单
user_info: {}, //个人信息 user_info: {}, //个人信息
headStyle: {}, headStyle: {},
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,
scrollTop: 0, scrollTop: 0,
couponsObj: {}, couponsObj: {},
modelstype: 0, //机型类型 modelstype: 0, //机型类型
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
this.userinfo(); : 0;
this.setting = uni.getStorageSync("basedata").mall.setting; this.userinfo();
this.isCompany=uni.getStorageSync("user_type")?uni.getStorageSync("user_type")=="company":true; //完成动态加载系统所属类型 this.setting = uni.getStorageSync("basedata").mall.setting;
let basedata =uni.getStorageSync("basedata")?uni.getStorageSync("basedata"):''; this.isCompany = uni.getStorageSync("user_type")
this.AppletID = basedata.home_pages.id?basedata.home_pages.id:0; ? uni.getStorageSync("user_type") == "company"
this.isAttestationEdu = basedata.user_info.isAttestationEdu ? basedata.user_info.isAttestationEdu:0 : true; //完成动态加载系统所属类型
let basedata = uni.getStorageSync("basedata")
}, ? uni.getStorageSync("basedata")
onLoad() { : "";
this.navHeight = this.$navHeight - 2; this.AppletID = basedata.home_pages.id ? basedata.home_pages.id : 0;
this.u = wx.getStorageSync('basedata').user_info; this.isAttestationEdu = basedata.user_info.isAttestationEdu
this.mall_UserInfo = uni.getStorageSync("mall_UserInfo"); ? basedata.user_info.isAttestationEdu
this.nav = uni.getMenuButtonBoundingClientRect().top + 'px'; : 0;
this.headStyle.background = `linear-gradient(to right, '#e6b865',80%, '#ebb45e')`; },
this.headStyle.paddingTop = this.nav; onLoad() {
if (!this.mall_UserInfo) { this.navHeight = this.$navHeight - 2;
this.showAuth = true; this.u = wx.getStorageSync("basedata").user_info;
} this.mall_UserInfo = uni.getStorageSync("mall_UserInfo");
}, this.nav = uni.getMenuButtonBoundingClientRect().top + "px";
mounted() { this.headStyle.background = `linear-gradient(to right, '#e6b865',80%, '#ebb45e')`;
this.getComponyStatus() this.headStyle.paddingTop = this.nav;
let currentPages = getCurrentPages(); if (!this.mall_UserInfo) {
let c = this.$uiConfig.is_bang ? 80 : 52; this.showAuth = true;
this.bottommargin = c + 10 + 'px'; }
this.listbottom = c - 2 + 50 + 'px'; },
this.contentHeight = this.$utils.calcContentHeight(c); mounted() {
if (this.contentHeight > 690 && this.contentHeight < 776) { this.getComponyStatus();
this.modelstype = 1 let currentPages = getCurrentPages();
} else if (this.contentHeight >= 776) { let c = this.$uiConfig.is_bang ? 80 : 52;
this.modelstype = 2 this.bottommargin = c + 10 + "px";
} this.listbottom = c - 2 + 50 + "px";
this.contentHeight = this.$utils.calcContentHeight(c);
this.is_icon_members_grade = uni.getStorageSync('basedata') ? uni.getStorageSync('basedata').mall.setting.is_icon_members_grade :0; if (this.contentHeight > 690 && this.contentHeight < 776) {
this.is_show_korea= uni.getStorageSync('basedata') ? uni.getStorageSync('basedata').mall.setting.is_show_korea :0; this.modelstype = 1;
this.IsDeposit = uni.getStorageSync('basedata')?uni.getStorageSync('basedata').mall.setting.IsDeposit:0 } else if (this.contentHeight >= 776) {
let u = '/' + currentPages[currentPages.length - 1].route; this.modelstype = 2;
let pages = wx.getStorageSync('basedata') ? wx.getStorageSync('basedata').bar_title : []; }
uni.setNavigationBarTitle({
title: '用户中心' this.is_icon_members_grade = uni.getStorageSync("basedata")
}); ? uni.getStorageSync("basedata").mall.setting.is_icon_members_grade
: 0;
}, this.is_show_korea = uni.getStorageSync("basedata")
onShow() { ? uni.getStorageSync("basedata").mall.setting.is_show_korea
: 0;
this.userinfo(2); this.IsDeposit = uni.getStorageSync("basedata")
if (this.mall_UserInfo) { ? uni.getStorageSync("basedata").mall.setting.IsDeposit
this.getUserPoint() : 0;
} let u = "/" + currentPages[currentPages.length - 1].route;
let basedata =uni.getStorageSync("basedata")?uni.getStorageSync("basedata"):''; let pages = wx.getStorageSync("basedata")
this.isAttestationEdu = basedata.user_info.isAttestationEdu ? basedata.user_info.isAttestationEdu:0 ? wx.getStorageSync("basedata").bar_title
}, : [];
methods: { uni.setNavigationBarTitle({
goHome() { title: "用户中心",
uni.redirectTo({ });
url: '/pages/index/main' },
}); onShow() {
}, this.userinfo(2);
pandu(item) { if (this.mall_UserInfo) {
let flag = true; this.getUserPoint();
let IsOpen = this.shopBasics.model && this.shopBasics.model.IsOpen ? this.shopBasics.model.IsOpen : 1; }
let SmallShopId = this.mall_UserInfo.SmallShopId ? this.mall_UserInfo.SmallShopId : 0; let basedata = uni.getStorageSync("basedata")
let UserSmallShopId = this.mall_UserInfo.UserSmallShopId ? this.mall_UserInfo.UserSmallShopId : 0; ? uni.getStorageSync("basedata")
switch (item.link_url) { : "";
case "/pages/share/index/index": this.isAttestationEdu = basedata.user_info.isAttestationEdu
if (this.user_info.isShowDistributionCenter == 1) { ? basedata.user_info.isAttestationEdu
flag = true; : 0;
} else { },
flag = false; methods: {
} goHome() {
break; uni.redirectTo({
case "/pages/friendcircle/my-news": url: "/pages/index/main",
if (this.mall_UserInfo.UserTeacher > 0) { });
flag = true; },
} else { pandu(item) {
flag = false; let flag = true;
} let IsOpen =
break; this.shopBasics.model && this.shopBasics.model.IsOpen
case "/pages/microShop/index/index": ? this.shopBasics.model.IsOpen
//开启 : 1;
if (IsOpen == 2) { let SmallShopId = this.mall_UserInfo.SmallShopId
flag = true; ? this.mall_UserInfo.SmallShopId
} : 0;
//关闭 let UserSmallShopId = this.mall_UserInfo.UserSmallShopId
else { ? this.mall_UserInfo.UserSmallShopId
if (SmallShopId != 0 || UserSmallShopId != 0) { : 0;
flag = true; switch (item.link_url) {
} else { case "/pages/share/index/index":
flag = false; if (this.user_info.isShowDistributionCenter == 1) {
} flag = true;
} } else {
break; flag = false;
case "/pages/appointment/personal/studentAppointmentList": }
if(this.meueData.user_center.is_point_status==1){ break;
flag = true; case "/pages/friendcircle/my-news":
}else{ if (this.mall_UserInfo.UserTeacher > 0) {
flag = false; flag = true;
} } else {
break; flag = false;
case "/pages/appointment/personal/teacherOrderList": }
if(this.meueData.user_center.is_point_status==1 && this.mall_UserInfo.UserTeacher>0){ break;
flag = true; case "/pages/microShop/index/index":
}else{ //开启
flag = false; if (IsOpen == 2) {
} flag = true;
break; }
case "/pages/appointment/appointment?teacher=1": //关闭
if(this.meueData.user_center.is_point_status==1 && this.mall_UserInfo.UserTeacher>0){ else {
flag = true; if (SmallShopId != 0 || UserSmallShopId != 0) {
}else{ flag = true;
flag = false; } else {
} flag = false;
break; }
case "/pages/coupon/cards/purchase": }
if(this.IsDeposit == 1){ break;
flag = true; case "/pages/appointment/personal/studentAppointmentList":
}else{ if (this.meueData.user_center.is_point_status == 1) {
flag = false; flag = true;
} } else {
break; flag = false;
} }
return flag; break;
}, case "/pages/appointment/personal/teacherOrderList":
//获取菜单配置 if (
userinfo(type = 1) { this.meueData.user_center.is_point_status == 1 &&
uni.showNavigationBarLoading(); this.mall_UserInfo.UserTeacher > 0
this.request2({ ) {
url: '/api/Mall/GetUserCenter', flag = true;
data: {} } else {
}, flag = false;
res => { }
uni.hideNavigationBarLoading(); break;
this.meueData = res.data.config; case "/pages/appointment/appointment?teacher=1":
this.user_info = res.data.user_info; if (
this.meueData.user_center.account.forEach(x => { this.meueData.user_center.is_point_status == 1 &&
if (x.link_url == "/pages/coupon/index/index") { this.mall_UserInfo.UserTeacher > 0
this.couponsObj = x ) {
} flag = true;
}) } else {
if (this.mall_UserInfo && type == 1) { flag = false;
this.getLogin() }
} break;
this.isloading= true case "/pages/coupon/cards/purchase":
if (this.IsDeposit == 1) {
} flag = true;
); } else {
let u = uni.getStorageSync("mall_UserInfo"); flag = false;
if (u && type == 1) { }
this.getMicroShopBasics() break;
} }
}, return flag;
getLogin() { },
var that = this; //获取菜单配置
let pid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0; userinfo(type = 1) {
let Up = uni.getStorageSync("Up") ? uni.getStorageSync("Up").Up : 0; uni.showNavigationBarLoading();
let SmallShopId = uni.getStorageSync("SmallShopId") ? uni.getStorageSync("SmallShopId").SmallShopId : 0; this.request2(
let CounponPassword = uni.getStorageSync("CounponPassword") ? uni.getStorageSync("CounponPassword").CounponPassword : 0; {
let KeyWord = uni.getStorageSync("KeyWord") ? uni.getStorageSync("KeyWord").KeyWord : ''; url: "/api/Mall/GetUserCenter",
that.request2({ data: {},
url: '/api/AppletLogin/Login', },
data: { (res) => {
Source: 1, uni.hideNavigationBarLoading();
OpenId: this.mall_UserInfo.OpenId, this.meueData = res.data.config;
Name: this.mall_UserInfo.Name, this.user_info = res.data.user_info;
Photo: this.mall_UserInfo.Photo, this.meueData.user_center.account.forEach((x) => {
Moblie: '', if (x.link_url == "/pages/coupon/index/index") {
SuperiorId: pid, this.couponsObj = x;
SmallShopId: SmallShopId, }
UserPageType: Up, });
CounponPassword:CounponPassword, if (this.mall_UserInfo && type == 1) {
KeyWord:KeyWord, // this.getLogin()
} }
}, this.isloading = true;
res => { }
if (res.resultCode == 1) { );
uni.setStorageSync('mall_UserInfo', res.data); let u = uni.getStorageSync("mall_UserInfo");
uni.removeStorageSync('pid'); if (u && type == 1) {
uni.removeStorageSync('SmallShopId'); this.getMicroShopBasics();
uni.removeStorageSync("Up"); }
uni.removeStorageSync("CounponPassword"); },
uni.removeStorageSync("KeyWord"); getLogin() {
} var that = this;
} let pid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
); let Up = uni.getStorageSync("Up") ? uni.getStorageSync("Up").Up : 0;
}, let SmallShopId = uni.getStorageSync("SmallShopId")
getMicroShopBasics() { ? uni.getStorageSync("SmallShopId").SmallShopId
this.request2({ : 0;
url: '/api/AppletUser/GetMicroShopBasics', let CounponPassword = uni.getStorageSync("CounponPassword")
data: {} ? uni.getStorageSync("CounponPassword").CounponPassword
}, : 0;
(res) => { let KeyWord = uni.getStorageSync("KeyWord")
this.shopBasics = res.data; ? uni.getStorageSync("KeyWord").KeyWord
} : "";
); that.request2(
}, {
getUserPoint(){ url: "/api/AppletLogin/Login",
this.request2({ data: {
url: '/api/AppletPoint/GetAppletUserPointDetailPageList', Source: this.mall_UserInfo.Source,
data: {pageIndex:1,pageSize:10,Type:0} OpenId: this.mall_UserInfo.OpenId,
}, Name: this.mall_UserInfo.Name,
(res) => { Photo: this.mall_UserInfo.Photo,
this.PointNum = res.data.pageData.PointNum; Moblie: "",
} SuperiorId: pid,
); SmallShopId: SmallShopId,
}, UserPageType: Up,
goUrl(url) { CounponPassword: CounponPassword,
if (url == '/pages/balance/balance') { KeyWord: KeyWord,
uni.navigateTo({ },
url: '/pages/balance/balance?balance=' + this.user_info.balance },
}); (res) => {
} else { if (res.resultCode == 1) {
uni.navigateTo({ uni.setStorageSync("mall_UserInfo", res.data);
url: url uni.removeStorageSync("pid");
}); uni.removeStorageSync("SmallShopId");
} uni.removeStorageSync("Up");
}, uni.removeStorageSync("CounponPassword");
reloadUserinfo() { uni.removeStorageSync("KeyWord");
this.userinfo(); }
this.u = this.user_info; }
this.mall_UserInfo = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo") : {}; );
this.getUserPoint() },
}, getMicroShopBasics() {
login(name) { this.request2(
if ((name && name.nickname == '') || !name || !name.nickname) { {
this.showAuth = true; url: "/api/AppletUser/GetMicroShopBasics",
} data: {},
}, },
//关闭登录窗口 (res) => {
gbAuth() { this.shopBasics = res.data;
this.showAuth = false; }
}, );
scrollHandler(e) { },
this.scrollTop = e.detail.scrollTop; getUserPoint() {
}, this.request2(
scrollTopHandler() { {
this.scrollTop = 0; url: "/api/AppletPoint/GetAppletUserPointDetailPageList",
}, data: { pageIndex: 1, pageSize: 10, Type: 0 },
gopointBalance(){//跳转点数余额 },
uni.navigateTo({ (res) => {
url: '/pages/appointment/personal/pointBalance' this.PointNum = res.data.pageData.PointNum;
}); }
}, );
// 获取公司认证信息 },
getComponyStatus(){ goUrl(url) {
let that = this if (url == "/pages/balance/balance") {
let parms = { uni.navigateTo({
url: "/api/AppletTrade/GetUserCompany", url: "/pages/balance/balance?balance=" + this.user_info.balance,
} });
this.request2(parms, (res) => { } else {
if (res.resultCode == 1&&res.data!=null) { uni.navigateTo({
// 获取公司名字和认证状态 url: url,
that.companyStatus=res.data.CompanyStatus });
that.companyName=res.data.CompanyName }
} },
}) reloadUserinfo() {
}, this.userinfo();
//去认证页 this.u = this.user_info;
goIdentification(){ this.mall_UserInfo = uni.getStorageSync("mall_UserInfo")
uni.navigateTo({ ? uni.getStorageSync("mall_UserInfo")
url: '/pages/kotra/identification' : {};
}) this.getUserPoint();
} },
} login(name) {
}; if ((name && name.nickname == "") || !name || !name.nickname) {
this.showAuth = true;
}
},
//关闭登录窗口
gbAuth() {
this.showAuth = false;
},
scrollHandler(e) {
this.scrollTop = e.detail.scrollTop;
},
scrollTopHandler() {
this.scrollTop = 0;
},
gopointBalance() {
//跳转点数余额
uni.navigateTo({
url: "/pages/appointment/personal/pointBalance",
});
},
// 获取公司认证信息
getComponyStatus() {
let that = this;
let parms = {
url: "/api/AppletTrade/GetUserCompany",
};
this.request2(parms, (res) => {
if (res.resultCode == 1 && res.data != null) {
// 获取公司名字和认证状态
that.companyStatus = res.data.CompanyStatus;
that.companyName = res.data.CompanyName;
}
});
},
//去认证页
goIdentification() {
uni.navigateTo({
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 {
width: 140rpx;
.userStyle .headimg { height: 140rpx;
width: 140rpx; border-radius: 50%;
height: 140rpx; margin-left: 60rpx;
border-radius: 50%; }
margin-left: 60rpx;
} .userStyle .footprint {
width: 80%;
.userStyle .footprint { height: 140rpx;
width: 80%; display: flex;
height: 140rpx; flex-direction: row;
display: flex; align-items: center;
flex-direction: row; justify-content: space-around;
align-items: center; }
justify-content: space-around;
} .userStyle .footprint_item {
width: 200rpx;
.userStyle .footprint_item { height: 90rpx;
width: 200rpx; display: flex;
height: 90rpx; flex-direction: column;
display: flex; align-items: center;
flex-direction: column; justify-content: space-between;
align-items: center; }
justify-content: space-between;
} .userStyle .footprint_item_bottom {
display: flex;
.userStyle .footprint_item_bottom { flex-direction: row;
display: flex; align-items: center;
flex-direction: row; justify-content: center;
align-items: center; }
justify-content: center;
} .userStyle .account_bar {
width: 94%;
.userStyle .account_bar { height: 110rpx;
width: 94%; border-radius: 10rpx;
height: 110rpx; background: #fff;
border-radius: 10rpx; display: flex;
background: #fff; flex-direction: row;
display: flex; align-items: center;
flex-direction: row; justify-content: space-around;
align-items: center; padding: 0 20rpx;
justify-content: space-around; }
padding: 0 20rpx;
} .userStyle .account_bar_item {
display: flex;
.userStyle .account_bar_item { flex-direction: column;
display: flex; align-items: center;
flex-direction: column; justify-content: space-between;
align-items: center; border-right: 1px solid #d1d1d1;
justify-content: space-between; width: 25%;
border-right: 1px solid #d1d1d1; }
width: 25%;
} .userStyle .account_bar_item:last-child {
border-right: 0;
.userStyle .account_bar_item:last-child { }
border-right: 0;
} .userStyle .order_bar {
width: 94%;
.userStyle .order_bar { border-radius: 10rpx;
width: 94%; background: #fff;
border-radius: 10rpx; display: flex;
background: #fff; flex-direction: column;
display: flex; align-items: center;
flex-direction: column; padding: 30rpx;
align-items: center; margin-top: 80rpx;
padding: 30rpx; }
margin-top: 80rpx;
} .userStyle .order_bar .order_bar_list {
width: 100%;
.userStyle .order_bar .order_bar_list { display: flex;
width: 100%; flex-direction: row;
display: flex; align-items: center;
flex-direction: row; justify-content: space-between;
align-items: center; }
justify-content: space-between;
} .userStyle .order_bar_item {
display: flex;
.userStyle .order_bar_item { flex-direction: column;
display: flex; align-items: center;
flex-direction: column; margin-top: 20rpx;
align-items: center; position: relative;
margin-top: 20rpx; }
position: relative;
} .userStyle .badge {
position: absolute;
.userStyle .badge { right: -10rpx;
position: absolute; top: -10rpx;
right: -10rpx; padding: 0 12rpx;
top: -10rpx; display: flex;
padding: 0 12rpx; align-items: center;
display: flex; justify-content: center;
align-items: center; font-size: 20rpx;
justify-content: center; color: #fff;
font-size: 20rpx; height: 30rpx;
color: #fff; border-radius: 15rpx;
height: 30rpx; }
border-radius: 15rpx;
} .userStyle .menus {
width: 94%;
.userStyle .menus { border-radius: 10rpx;
width: 94%; background: #fff;
border-radius: 10rpx; display: flex;
background: #fff; flex-direction: row;
display: flex; flex-wrap: wrap;
flex-direction: row; align-items: center;
flex-wrap: wrap; margin-top: 30rpx;
align-items: center; }
margin-top: 30rpx;
} .userStyle .menus2 {
width: 94%;
.userStyle .menus2 { border-radius: 10rpx;
width: 94%; background: #fff;
border-radius: 10rpx; display: flex;
background: #fff; flex-direction: column;
display: flex; margin-top: 20rpx;
flex-direction: column; }
margin-top: 20rpx;
} .userStyle .menus .menus_item {
width: 25%;
.userStyle .menus .menus_item { height: 110rpx;
width: 25%; margin: 20rpx 0 10rpx;
height: 110rpx; display: flex;
margin: 20rpx 0 10rpx; flex-direction: column;
display: flex; align-items: center;
flex-direction: column; justify-content: space-around;
align-items: center; position: relative;
justify-content: space-around; }
position: relative;
} .menus_item2 .contButton,
.menus_item .contButton {
.menus_item2 .contButton, width: 100%;
.menus_item .contButton { height: 100%;
width: 100%; position: absolute;
height: 100%; left: 0;
position: absolute; top: 0;
left: 0; opacity: 0;
top: 0; }
opacity: 0;
} .userStyle .menus2 .menus_item2 {
width: 100%;
.userStyle .menus2 .menus_item2 { height: 90rpx;
width: 100%; display: flex;
height: 90rpx; flex-direction: row;
display: flex; align-items: center;
flex-direction: row; margin-left: 30rpx;
align-items: center; position: relative;
margin-left: 30rpx; }
position: relative;
} .userStyle .copyright {
padding: 70rpx 0;
.userStyle .copyright { display: flex;
padding: 70rpx 0; flex-direction: column;
display: flex; align-items: center;
flex-direction: column; }
align-items: center;
} .userStyle .ReceiptAdder {
position: absolute;
.userStyle .ReceiptAdder { right: 0;
position: absolute; top: 160rpx;
right: 0; width: 100px;
top: 160rpx; height: 24px;
width: 100px; border-top-left-radius: 12px;
height: 24px; border-bottom-left-radius: 12px;
border-top-left-radius: 12px; display: flex;
border-bottom-left-radius: 12px; flex-direction: row;
display: flex; align-items: center;
flex-direction: row; padding: 0 20rpx;
align-items: center; background: rgba(55, 55, 55, 0.15);
padding: 0 20rpx; }
background: rgba(55, 55, 55, 0.15)
} .userStyle .member {
background: #3b3641;
.userStyle .member { /* width: 80px; */
background: #3b3641; font-size: 10px;
/* width: 80px; */ color: #fff;
font-size: 10px; height: 18px;
color: #fff; border-radius: 9px;
height: 18px; display: flex;
border-radius: 9px; flex-direction: row;
display: flex; align-items: center;
flex-direction: row; justify-content: space-between;
align-items: center; margin-top: 10px;
justify-content: space-between; }
margin-top: 10px;
} .userStyle .titlenav {
width: 100%;
.userStyle .titlenav { text-align: center;
width: 100%; font-size: 16px;
text-align: center; color: #ffffff;
font-size: 16px; }
color: #FFFFFF;
} .userStyle .top_b {
width: 86%;
.userStyle .top_b { height: 65px;
width: 86%; display: flex;
height: 65px; flex-direction: row;
display: flex; align-items: center;
flex-direction: row; justify-content: space-between;
align-items: center; }
justify-content: space-between;
} .userStyle .top_b_item {
width: 26%;
.userStyle .top_b_item { height: 50px;
width: 26%; display: flex;
height: 50px; flex-direction: column;
display: flex; align-items: center;
flex-direction: column; justify-content: space-between;
align-items: center; color: #ffffff;
justify-content: space-between; font-size: 12px;
color: #FFFFFF; }
font-size: 12px;
} .userStyle .Receiptbalance {
width: 94%;
.userStyle .Receiptbalance { height: 62px;
width: 94%; position: absolute;
height: 62px; left: 3%;
position: absolute; bottom: -20px;
left: 3%; background: #ffffff;
bottom: -20px; border-radius: 6px;
background: #FFFFFF; display: flex;
border-radius: 6px; flex-direction: row;
display: flex; align-items: center;
flex-direction: row; justify-content: space-around;
align-items: center; padding: 0 10px;
justify-content: space-around; }
padding: 0 10px;
} .userStyle .Receiptbalance_item {
width: 40%;
.userStyle .Receiptbalance_item { height: 50px;
width: 40%; display: flex;
height: 50px; flex-direction: row;
display: flex; align-items: center;
flex-direction: row; font-size: 12px;
align-items: center; color: #534d62;
font-size: 12px; }
color: #534D62;
.userStyle .headStatus {
} overflow: hidden;
position: relative;
.userStyle .headStatus { width: 140vw;
overflow: hidden; padding-right: 40vw;
position: relative; padding-bottom: 10px;
width: 140vw; position: fixed;
padding-right: 40vw; left: 0;
padding-bottom: 10px; right: 0;
position: fixed; top: 0;
left: 0; display: flex;
right: 0; background-image: linear-gradient(to right, #e6b865, #ebb45e);
top: 0; }
display: flex;
background-image: linear-gradient(to right, .userStyle .headStatus .arrow {
#e6b865, height: 24px;
#ebb45e); margin: 5px 10px;
width: 24px;
} }
.userStyle .headStatus .arrow { .userStyle .headStatus .title {
height: 24px; font-size: 18px;
margin: 5px 10px; color: #fff;
width: 24px; flex: 1;
} width: 1px;
line-height: 34px;
.userStyle .headStatus .title { text-align: center;
font-size: 18px; }
color: #fff;
flex: 1; .dark .userStyle .headStatus .title {
width: 1px; color: #111 !important;
line-height: 34px; }
text-align: center; .dark .nickname {
} color: #111 !important;
}
.dark .userStyle .headStatus .title{ .userStyle .topheard {
color:#111 !important; display: flex;
} flex-direction: row;
.dark .nickname{ align-items: center;
color:#111 !important; width: 100%;
} margin-bottom: 20px;
.userStyle .topheard { }
display: flex;
flex-direction: row; .userStyle .miniHeadTop {
align-items: center; height: 200px;
width: 100%; }
margin-bottom: 20px;
} .userBox .headCommon {
width: 94%;
.userStyle .miniHeadTop { margin-top: 25px;
height: 200px; border-radius: 10px;
} background-color: #fff;
}
.userBox .headCommon {
width: 94%; .userBox .headHasTOP {
margin-top: 25px; margin-top: 25px;
border-radius: 10px; }
background-color: #fff; .userBox .paike {
} margin-top: 15px;
display: flex;
.userBox .headHasTOP { flex-direction: row;
margin-top: 25px; align-items: center;
} justify-content: space-between;
.userBox .paike{ }
margin-top: 15px;display: flex;flex-direction: row;align-items: center;justify-content: space-between; .componyStatusBox .renzhen {
} height: 15px;
.componyStatusBox .renzhen{ font-size: 10px;
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; margin-top: 10px;
} color: #555555;
.componyStatusBox .companyName{ border-radius: 7px;
font-size: 26rpx; border: 1px solid #999999;
font-weight: 500; display: flex;
color: #888888; align-items: center;
/* background-color: #F6F6F6FF */ justify-content: center;
} padding: 0 10rpx;
margin-left: 10rpx;
}
.componyStatusBox .companyName {
font-size: 26rpx;
font-weight: 500;
color: #888888;
/* 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