mall_client/zyhs3_uniapp/pages/user/index.vue

2431 lines
59 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<style lang="scss">
@import "@/font.css";
.flex-1 {
flex: 1
}
.user_info_box {
.my-name {
display: flex;
align-items: center;
margin: 12rpx 0;
.img {
margin-left: 10rpx;
display: flex;
align-items: center;
}
}
}
.header {
height: 342rpx;
background-color: red;
// background: url('../../static/images/user/nav_bg.png') center center no-repeat;
.history {
margin-top: 50rpx;
}
.setting {
position: relative;
z-index: 22;
}
.share_wrapper {
padding: 20rpx;
margin-top: 10rpx;
border-radius: 20rpx 20rpx 0 0;
background: linear-gradient(90deg, rgb(54, 55, 57), rgb(22, 22, 22));
.left {
.text {
color: gold;
padding-bottom: 20rpx;
}
}
.btn_share {
padding: 10rpx 14rpx;
border-radius: 10rpx;
background: linear-gradient(90deg, #FF5050 0%, #FF9F80 100%);
.text {
margin-right: 4rpx;
font-weight: 300;
}
}
}
}
.user_id {
text-align: left;
}
.grade {
color: gold;
background-color: rgb(79, 55, 36);
// width: 140rpx;
border-radius: 30rpx;
padding: 4rpx 16rpx;
margin: 4rpx 0;
margin-right: 10rpx;
.zyhs {
margin-right: 6rpx;
}
}
.con {
.zyhs {
color: rgb(110, 108, 126);
}
.grod-item {
// width: auto !important;
// flex: 1 !important;
.zyhs {
padding-bottom: 40rpx;
}
}
.tabs_item {
margin-bottom: 20rpx;
padding-right: 20rpx;
.left {
margin-right: 20rpx;
}
border-right: 1rpx solid #e6e6e6;
}
}
.btn_logout {
color: #ffffff;
background-color: #22bd5e;
padding: 18rpx;
border-radius: 40rpx;
text-align: center;
width: 60%;
margin: 40rpx auto 0 auto;
}
.scroll_view {
position: fixed;
left: 0;
right: 0;
bottom: 100rpx;
}
.btn_copy {
padding: 4rpx 26rpx;
font-size: 24rpx;
border-radius: 8rpx;
margin-left: 10rpx;
border: 1rpx solid rgb(75, 136, 254);
}
.header_wrapper_size {
min-height: 342rpx;
}
.top-setting {
position: absolute;
top: calc(var(--status-bar-height) + 45rpx);
left: 80%;
display: flex;
justify-content: right;
span {
font-weight: 500;
margin-left: 10rpx;
color: #484848;
font-size: 28rpx;
line-height: 40rpx;
}
}
.header_wrapper {
// min-height: 342rpx;
padding: 0 24rpx;
padding-top: calc(var(--status-bar-height) + 40rpx);
left: 0;
right: 0;
top: 0;
/* 头部容器不再使用背景图,避免影响整体页面背景 */
background: none;
background-size: 100% 100%;
position: relative;
z-index: 2000;
.header_right {
image {
width: 40rpx;
height: 40rpx;
}
.ic_setting {
margin-left: 24rpx;
}
}
.header_user_info {
.user_avatar {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
background: linear-gradient(90deg, #E2B83C, #FFECB5);
.avatar {
width: 117rpx;
height: 117rpx;
border-radius: 50%;
}
}
.user_info {
margin-left: 30rpx;
.grade {
color: gold;
background-color: rgb(79, 55, 36);
border-radius: 30rpx;
padding: 2rpx 16rpx;
margin: 4rpx 0;
margin-right: 10rpx;
.zyhs {
margin-right: 6rpx;
}
}
.user_id {
// width: 128rpx;
height: 28rpx;
background: linear-gradient(90deg, #FFB8B8 0%, rgba(255, 184, 184, 0) 100%);
border-radius: 30rpx;
opacity: 1;
}
.btn_copy {
padding: 2rpx 16rpx;
font-size: 20rpx;
border-radius: 8rpx;
margin-left: 10rpx;
border: 1rpx solid #FFB8B8;
}
.identity_vip {
margin-right: 10rpx;
padding: 0 16rpx;
height: 32rpx;
background: linear-gradient(360deg, #FBE098 0%, #FFFFFF 100%);
box-shadow: inset 0px 3rpx 6rpx 1rpx rgba(251, 221, 147, 0.41);
border-radius: 30rpx;
opacity: 1;
border: 1rpx solid #E2B83C;
color: #7D4C09;
font-size: 20rpx;
image {
width: 22rpx;
height: 20rpx;
margin-right: 6rpx;
}
}
.identity_partner {
color: #E24A3A;
border: 1rpx solid #FFA298;
background: linear-gradient(360deg, #FFCBCB 0%, #FFFFFF 100%);
}
}
}
.my_asset {
margin-top: -30upx;
height: 160rpx;
width: 100%;
padding: 2rpx 0 0 2rpx;
border-radius: 20rpx;
// background: linear-gradient(90deg, #F6BE5E 0%, #FFE7A5 100%);
border-radius: 16px 16px 16px 16px;
opacity: 1;
z-index: 100;
.my_asset_bg {
height: 192upx;
border-radius: 20rpx;
// background: rgba(255, 208, 90, 0.7);
background-image: url('../../static/images/user/nat_bg_block.png');
background-size: contain;
background-position: center center;
background-repeat: no-repeat;
.my_asset_item {
flex: 1;
padding-left: 30rpx;
display: flex;
justify-content: center;
font-weight: 500;
font-size: 36upx;
font-family: 'Product-Sans-Bold';
image {
width: 60rpx;
height: 60rpx;
margin-right: 18rpx;
}
view {
color: rgba(125, 86, 19, 1);
text-align: center;
margin-top: 10upx;
}
text {
font-size: 22rpx;
color: rgba(190, 135, 53, 1);
text-align: center;
margin-top: 10upx;
}
}
}
}
}
.scroll_wrapper {
width: auto;
padding: 30rpx 24rpx 0 24rpx;
display: block;
.box_bg {
background: #FFFFFF;
box-shadow: 0px 2rpx 10rpx 1rpx rgba(201, 208, 220, 0.2);
border-radius: 20rpx;
padding: 6rpx;
opacity: 1;
margin-bottom: 16rpx;
}
.global-title {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12rpx;
margin-bottom: 10rpx;
.title-left {
display: flex;
align-items: flex-end;
font-weight: bold;
font-size: 33rpx;
font-style: italic;
color: #808080;
.black-line {
color: #000000;
}
.green-line {
color: #22bd5e;
}
.grey-line {
font-size: 22rpx;
color: #808080;
padding-left: 8rpx;
}
}
.title-right {
font-weight: bold;
font-size: 28rpx;
color: #808080;
}
}
.share_box {
background: #fff;
// background: linear-gradient(312deg, #FFFFFF 0%, #FEE9BD 100%);
border-radius: 14rpx;
opacity: 1;
padding: 18rpx 14rpx;
.text1 {
font-weight: bold;
color: #7D4C09;
margin-right: 20rpx;
}
.text2 {
font-weight: 500;
color: #BE8735;
font-size: 22rpx;
}
.btn_share {
width: 128rpx;
height: 48rpx;
float: right;
background: linear-gradient(90deg, #FF5050 0%, #FF9F80 100%);
border-radius: 28rpx;
opacity: 1;
font-weight: 300;
color: #fff;
font-size: 22rpx;
}
}
.tabs_box {
padding: 0 10rpx;
&:nth-child(2) {
margin-left: 20upx;
margin-right: 20upx;
}
.tabs_item {
height: 120upx;
margin-left: 5upx;
margin-right: 5upx;
border-radius: 10upx;
text {
color: #fff;
font-weight: 400;
}
view {
color: #fff
}
image {
width: 95rpx;
height: 95rpx;
}
}
.border_right {
border-right: 1rpx solid rgba(229, 229, 229, 1);
}
}
.order_box {
padding: 40rpx 18rpx 40rpx 18rpx;
}
.manage_box {
padding: 24rpx 0;
}
.binguo_box {
padding: 6rpx 0;
border-radius: 20rpx;
.convButton {
// background: url('../../static/home/shandui.png') no-repeat;
// background-size: 100% 100%;
display: flex;
align-items: center;
height: 60rpx;
font-size: 28rpx;
}
}
// .title {
// margin-bottom: 24rpx;
// padding: 0 20rpx;
// }
.order_item {
image {
width: 60rpx;
height: 60rpx;
margin-bottom: 10rpx;
}
view {
font-size: 24upx
}
text {
font-size: 24upx;
color: #444444
}
}
}
.icon-putong {
background: linear-gradient(270deg, #ADADAD 0%, #D0D0D0 100%);
padding: 3upx 20upx;
color: #000000;
font-weight: 500;
font-size: 26upx;
border-radius: 40upx;
margin-left: 5upx;
margin-right: 5upx;
}
.icon-box-rate {
position: relative;
display: flex;
align-items: center;
margin: 5upx;
&_left {
background: linear-gradient(132deg, #FFDB67 0%, #FFA915 100%);
;
padding: 5upx 10upx;
border-radius: 30upx;
color: #fff;
font-size: 22upx;
position: relative;
z-index: 9999;
}
&_right {
position: relative;
z-index: 10;
border: 2rpx solid #FFAC1C;
background: linear-gradient(132deg, #FFF7EF 0%, #FFF2C9 15%, #FFE097 99%);
padding: 4upx 10upx 4upx 30upx;
margin-left: -30upx;
font-size: 25upx;
font-weight: 600;
border-radius: 30upx;
display: flex;
justify-content: end;
align-content: center;
image {
width: 28upx;
height: 28upx;
margin: 0upx 2upx;
}
}
}
.icon-box {
position: relative;
display: flex;
align-items: center;
margin: 5upx;
image {
width: 45upx;
height: 45upx;
}
> view {
background: linear-gradient(270deg, #FFE48E 5%, #FFD164 100%);
padding: 4upx 30upx 4upx 40upx;
margin-left: -30upx;
font-size: 25upx;
font-weight: 600;
border-radius: 30upx;
}
}
</style>
<template>
<z-paging ref="paging" v-model="queryList" @query="pageInit" :auto="false">
<view class="main">
<!-- 页面顶部整幅背景图,占位显示整图 -->
<block v-if="userDetailInfo.nickname">
<image class="page-top-bg-img" src="@/static/my-page/topp.png" mode="widthFix"></image>
</block>
<block v-else>
</block>
<!-- <view class="header_wrapper_size" :style="{ height: sizeHeight + 'px' }">
</view> -->
<view class="header_wrapper" id="headerBox" style="position: relative; z-index: 1;">
<!-- 设置 -->
<view class="top-setting" @click="toNav('/pages/setting/index')">
<image style="width:36rpx;height:36rpx" class="ic_setting"
src="../../static/images/user/shezhi@3x.png" mode=""></image>
<span>设置</span>
</view>
<block v-if="userDetailInfo.nickname">
<view class="header_user_info flex">
<view class="user_avatar flex flex-center">
<image :src="filterImg(avatar)" mode="aspectFill" class="avatar"></image>
</view>
<view class="user_info">
<view class="user_info_box">
<view class="my-name">
<view class="font32 line f-b color-b3">
{{ userDetailInfo.nickname }}
</view>
<!-- <block v-for="(item, index) in identity" :key="index">
<view class="img" v-if="item.identityNameCode == 1 && item.identityStatus == 1">
<image style="width:40px;height:20px"
src="../../static/images/user/VIPbiaoqian@3x.png"></image>
</view>
</block> -->
<!-- <view class="flex flex-align-center flex-wrap"> -->
<!-- <view class="icon-box">
<image src="../../static/images/user/lianchuang.png"></image>
<view
style="background: linear-gradient(117deg, #95B1FF 0%, #5078FA 100%);color: #fff;">
联创</view>
</view> -->
<!-- </view> -->
</view>
<view class="flex items-center">
<view class=" flex items-center">
<text class="font24">ID: {{ userDetailInfo.username }}</text>
<view style="font-weight: 600;margin-left: 20rpx;" @click.stop="handlerCopy(userDetailInfo.username)" class=" ">
<image src="../../static/my-page/copy.png" style="width: 24rpx; height: 24rpx; padding-top: 9rpx;"></image>
</view>
</view>
</view>
</view>
<view class="flex flex-align-center flex-wrap" style="height: 19rpx; padding-top: 6rpx;">
<!-- <view v-if="consumer != null">
<view class="icon-box-rate">
<view class="icon-box-rate_left">消费商</view>
<view class="icon-box-rate_right">
<image src="../../static/images/user/star.png"
v-for="i in consumer.identityStatus"></image>
</view>
</view>
</view> -->
<!-- <view v-if="identityLoaded && !isVip"> -->
<!-- <block v-if="vipInfo && vipInfo.lockStatus == 0"> -->
<!-- <view class="icon-box">
<image src="../../static/images/user/suodingVIP.png"></image>
<view>VIP</view>
</view> -->
<!-- </block> -->
<!-- <block v-else>
<view class="icon-putong">
普通用户
</view>
</block> -->
<!-- </view> -->
<!-- {{ identity }} -->
<!-- <block v-for="(item, index) in identity" :key="index">
<view v-if="item.identityNameCode == 2 && item.identityStatus == 1">
<view class="icon-box">
<image src="../../static/images/user/lianchuang.png"></image>
<view
style="background: linear-gradient(117deg, #95B1FF 0%, #5078FA 100%);color: #fff;">
联创</view>
</view>
</view>
<view v-if="item.identityNameCode == 3 && item.identityStatus == 1">
<view class="icon-box">
<image src="../../static/images/user/hehuoren.png"></image>
<view
style="background: linear-gradient(270deg, #C7D8FF 0%, #ACC7FF 100%);color: #0030CE;">
合伙人
</view>
</view>
</view>
<view v-if="item.identityNameCode == 4 && item.identityStatus == 1">
<view class="icon-box">
<image src="../../static/images/user/fenxiaoshang.png"></image>
<view
style="background:linear-gradient(117deg, #B67DFF 0%, #A260F7 100%);color: #fff;">
分销商</view>
</view>
</view>
<view v-if="item.identityNameCode == 6 && item.identityStatus != 0">
<view class="icon-box">
<image src="../../static/images/tuiguangshang.png"></image>
<view
style="background:linear-gradient(117deg, #0F721C 0%, #B2FFD5 100%);color: #fff;">
推广商 V{{
item.identityStatus }}
</view>
</view>
</view>
<view v-if="item.identityNameCode == 7 && item.identityStatus != 0">
<view class="icon-box">
<image src="../../static/images/shengdaili.png"
v-if="item.identityStatus === 1"></image>
<image src="../../static/images/qudaili.png"
v-if="item.identityStatus === 3"></image>
<image src="../../static/images/shidaili.png"
v-if="item.identityStatus === 2"></image>
<view v-if="item.identityStatus === 3"
style="background: linear-gradient(132deg, #BCD6BF 0%, #ABC1AD 100%);color: #235223;">
区代理
</view>
<view v-if="item.identityStatus === 2"
style="background: linear-gradient(132deg, #E8E7CF 0%, #E4D3BB 100%);color: #41382A;">
市代理
</view>
<view v-if="item.identityStatus === 1"
style="background:linear-gradient(132deg, #E8D4CF 2%, #E4C1BB 100%);color: #681501;">
省代理
</view>
</view>
</view>
</block> -->
<!-- <block v-if="userDetailInfo.storeIsOpen === 1">
<view class="icon-box">
<image src="../../static/images/user/shangjia.png"></image>
<view
style="background: linear-gradient(132deg, #F6CD6D 0%, #FFE48E 41%, #FFD164 100%); color: #333;">
商家
</view>
</view>
</block>
<block v-if="userDetailInfo.systemInfo === 1">
<view class="flex flex-align-center grade font24">
<text style="font-size: 24rpx;" class="zyhs zyhs-id"></text> 系统账户
</view>
</block> -->
</view>
</view>
</view>
<u-gap height="36rpx"></u-gap>
<!-- 余额等资产显示 -->
<view class="new_asset wallet-fans">
<view class="asset-item"
@click="goPage('/pages/home/zhongYiWanShangMy')">
<view class="title-box">
<view class="title">
我的资产
</view>
<view class="detail">
<view class="sub-title">
余额等
</view>
<view class="enter">
查看详情
</view>
</view>
</view>
<image src="../../static/my-page/wallet.png" class="wallet-img"></image>
</view>
<view style="width:30rpx;">
<!-- 中间的间隔 -->
</view>
<view class="wodefensi asset-item" @click="goPage('/pages/user/team')">
<view class="title-box">
<view class="title">
我的粉丝
</view>
<view class="detail">
<!-- <view class="sub-title">
点我
</view> -->
<text class="sub-value">
点击进入>
</text >
</view>
</view>
<image src="../../static/my-page/fans.png" class="fans-img"></image>
</view>
</view>
</block>
<block v-else>
<view class="flex flex-grow padding-30" style="justify-content: space-between;">
<view class="flex flex-align-center" @click="toNav('/pages/login/login')">
<view>
<image style="width: 95rpx; height: 95rpx; margin-right: 40rpx;"
:src="filterImg(avatar)" mode="aspectFill" class="avatar"></image>
</view>
<view>
<view class="flex flex-align-center">
<text class="font38 line">登录/注册</text>
</view>
</view>
</view>
</view>
</block>
</view>
<view class="scroll_wrapper" style="position: relative; z-index: 1;">
<view class="global-title">
<view class="title-left">
<view class="black-line">
我的
</view>
<view class="green-line">
订单
</view>
<view class="grey-line">
/ MY ORDER
</view>
</view>
<view class="title-right" @click="goOrder(1)">
全部
<uni-text class="iconfont color-9" style="font-size: 30rpx;"><span></span></uni-text>
</view>
</view>
<view class="box_bg order_box">
<view class="flex flex-between">
<view @click="goOrder(item.status)" class="order_item flex flex-column flex-1 flex-center"
v-for="(item, index) in cuList" :key="index" style="position: relative;">
<image :src="item.icon" mode="" width="40"></image>
<text class="font24 color-b3">{{ item.name }}</text>
<u-badge :offset="[-5, 10]" style="color: #fff;" :absolute="true" type="error" max="99"
:value="item.tip"></u-badge>
</view>
</view>
</view>
<!-- 分享好友 -->
<view class="share-box">
<image class="new-banner-img" @click="goPage('/pages/user/invite')"
src="../../static/my-page/share.png" mode="scaleToFill"></image>
</view>
<!-- 槟果、闪兑 -->
<!-- <view class="binguo_box" style="background: url('../../static/home/beijing@2x.png') no-repeat; background-size: 100% 100%;">
<view style="display:flex; justify-content: space-between; align-items: center;">
<view style="padding-left: 15rpx;">
<span class="title color-b3 font28 f-b">
我的槟果
</span>
<span style="color:red; font-size: 30rpx;">{{dataInfo.myInteger}}</span>
<span class="color-b3 font28 f-b" style="margin-left: 6rpx;">个</span>
</view>
<view style="padding: 5rpx 15rpx 5rpx 0;">
<button class="convButton" @click="inputDialogToggle">
闪兑
</button>
</view>
</view>
</view> -->
<view class="global-title">
<view class="title-left">
<view class="black-line">
我的
</view>
<view class="green-line">
功能
</view>
<view class="grey-line">
/ MY FUNCTION
</view>
</view>
</view>
<view class="box_bg manage_box">
<view class="flex">
<view @click="goPage(item.path)" style="width: 25%;"
class="order_item flex flex-column flex-center" v-for="(item, index) in educationList"
:key="index">
<image :src="item.icon" mode=""></image>
<text class="font24 color-b3">{{ item.name }}</text>
</view>
</view>
</view>
<view class="global-title">
<view class="title-left">
<view class="black-line">
实用
</view>
<view class="green-line">
工具
</view>
<view class="grey-line">
/ PRATICAL TOOLS
</view>
</view>
</view>
<view class="box_bg" @click="goPage('/pages/user/authentication/authentication')">
<view class="real-name">
<view class="title-box">
<view class="title">
实名认证
</view>
<view class="detail">
<view class="sub-title">
验证身份 确认信息
</view>
<text class="enter">
前往认证
</text >
</view>
</view>
<image src="../../static/my-page/realName.png" mode="scaleToFill" class="real-name-img"></image>
</view>
</view>
<!-- 槟榔辣椒相关信息 -->
<block v-if="userDetailInfo.nickname">
<view class="new_asset asset">
<view class="asset-item binglang-lajiao binglang" @click="callbackMethod('goLicai')">
<!-- <view class="asset-item binglang-lajiao"> -->
<view class="title-box">
<view class="title">
南药基地
</view>
<view class="detail">
<view class="assets-box">
<view>槟榔:</view>
<view class="assetsNum">{{ statistics["blNum"] }}</view>
<view></view>
</view>
<!-- <view class="enter">
>
</view> -->
</view>
</view>
</view>
<view class="asset-item binglang-lajiao lajiao" @click="callbackMethod('goChili')">
<!-- <view class="asset-item binglang-lajiao"> -->
<view class="title-box">
<view class="title">
林下经济
</view>
<view class="detail">
<view class="assets-box">
<view>辣椒:</view>
<view class="assetsNum">{{ statistics["ljNum"] }}</view>
<view></view>
</view>
<!-- <view class="enter">
>
</view> -->
</view>
</view>
</view>
</view>
</block>
<block v-else></block>
<view v-if="userDetailInfo.nickname" class="btn_logout flex flex-center" @click="toLogout()">退出登录</view>
<!-- <view class="btn_logout flex flex-center" @click="launchMiniProgram()">打开小程序</view> -->
<!-- 备案信息 -->
<view class="ba-msg">
<view class="msg-item">主办单位:中亿华商(海南)跨境电子商务有限公司</view>
<view class="msg-item">版权所有:中亿华商(海南)跨境电子商务有限公司</view>
<view class="msg-item">
<image class="ba-icon" src="../../static/icon_ba.png" /><text>琼ICP备2022020857号-1</text>
</view>
<view class="msg-item">联系电话089868715191</view>
</view>
<u-gap height="150rpx"></u-gap>
</view>
<!-- 弹框 -->
<modal v-if="showModal">
<image :src="advertData.ossUrl" mode="widthFix" @click="imgJump"></image>
<text class="iconfont color-w font60" style="margin-top: 20rpx;"
@click="showModal = false">&#xe64a;</text>
</modal>
<!-- 闪兑输入框 -->
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog mode="input" :title="dialogTitle" placeholder="请输入兑换资产数量" @confirm="dialogInputConfirm">
</uni-popup-dialog>
</uni-popup>
<!-- 福利红包 -->
<!-- <red-envelopes v-for="(item, i) in redList" :key="i" :data="item" :type="3" :bottom="i === 0 ? 100 : i*80+100"></red-envelopes> -->
<!-- <tabbar></tabbar> -->
</view>
</z-paging>
</template>
<script>
import iconUser from "@/components/icon-user.vue"
var sweixin = null;
import {
mapMutations,
mapActions,
mapState
} from "vuex"
import {
getMyRecordsStatistics,
} from "@/api/system/user.js";
import modal from "@/components/modal.vue"
import redEnvelopes from "@/components/red-envelopes.vue"
import uniPopup from "@/components/uni-popup/uni-popup.vue"
import tabbar from "@/components/tabbar.vue"
import url from "@/common/http/url.js"
import publics from "@/common/utils/public.js"
import {
integerInfo,
authenticationApi
} from "@/api/system/api.js"
export default {
components: {
modal,
redEnvelopes,
uniPopup,
tabbar,
iconUser
},
data() {
return {
integerData: {
integerWorth: 0,
poolBalance: 0
},
dataInfo:{
integerWorth:0,
poolBalance:0,
poolInteger:0,
myInteger:0,
},
fruitInfo: null,
dailiInfo: null,
queryList: [],
userDetailInfo: {},
contentHeight: 0,
staticUrl: this.$staticUrl,
avatar: this.$staticUrl + "user/avatar.png",
assetList: [
// {
// name: '贡献值',
// icon: require('../../static/images/user/ic_xfz.png'),
// path: '/pages/user/record/list?title=贡献值&type=getConsumeRecord'
// },
// {
// name: '绿色积分',
// icon: require('../../static/images/user/ic_green.png'),
// path: '/pages/user/record/list?title=绿色积分&type=getGreenRecord&transferType=2'
// },
{
name: '积分价值',
icon: require('../../static/images/user/ic_xfz.png'),
// path: '/pages/user/record/list?title=贡献值&type=getConsumeRecord'
},
{
name: '分红池总金额',
icon: require('../../static/images/user/ic_green.png'),
// path: '/pages/user/record/list?title=绿色积分&type=getGreenRecord&transferType=2'
},
{
name: '余额',
icon: require('../../static/images/user/ic_balance.png'),
path: '/pages/user/balance/list?title=我的余额&type=getBalanceRecord&transferType=1'
}
],
tabsList: [
//UPDATE: 以下画红线的部分在APP端先隐藏
// {
// name: "管理钱包",
// text: '天天领钱',
// icon: require('../../static/images/user/ic_gold.png'),
// color: 'rgb(75, 136, 254)',
// size: '34',
// path: '/pages/user/record/list?title=管理钱包&type=getWalletRecord&transferType=3'
// },
// {
// name: "积分统计",
// text: '今日释放',
// icon: require('../../static/images/user/ic_score.png'),
// color: 'rgb(236, 72, 69)',
// size: '40',
// path: '/pages/user/myScore'
// },
{
//UPDATE: 我的团队改名我的粉丝
name: "我的粉丝",
text: '粉丝分红',
icon: require('../../static/images/user/ic_team.png'),
color: 'rgb(253, 178, 114)',
size: '40',
path: "/pages/user/team"
}
],
toolList: [{
name: "我的资产",
tip: 0,
icon: "zyhs-zichan",
status: 0,
size: '46',
path: '/pages/user/wallet/index'
},
{
name: "地址管理",
tip: 0,
icon: "zyhs-dizhi",
status: 2,
size: '44',
path: '/pages/user/address/index?type=1'
},
// {name: "其他资产", tip: 0, icon: "zyhs-dashanghongbao", status: 3, size: '40'},
{
name: "线下订单",
tip: 0,
icon: "zyhs-xianxiadingdan",
status: 3,
size: '42'
}
],
cuList: [{
name: "待付款",
tip: 0,
icon: require('../../static/images/user/daifukuan@2x.png'),
status: 2,
size: '40'
},
{
name: "待发货",
tip: 0,
icon: require('../../static/images/user/daifahuo@2x.png'),
status: 3,
size: '40'
},
{
name: "待收货",
tip: 0,
icon: require('../../static/images/user/daishouhuo@2x.png'),
status: 4,
size: '42'
},
{
name: "待评价",
tip: 0,
icon: require('../../static/images/user/daipingjia@2x.png'),
status: 5,
size: '42'
},
// {
// name: "线下订单",
// tip: 0,
// icon: require('../../static/images/user/xianxiadingdan@2x.png'),
// status: 6,
// size: '42'
// }
],
shopManageList: [
// {
// name: "商家打赏",
// tip: 0,
// icon: require('../../static/images/user/shangjiadashang@3x.png'),
// status: 3,
// size: '40',
// type: 3,
// path: "reward"
// },
// {
// name: "商家提现",
// tip: 0,
// icon: require('../../static/images/user/shangjiatixian@3x.png'),
// status: 3,
// size: '44',
// type: 4,
// path: '/pages/user/wallet/index?type=3&assetAccount=0'
// }
],
educationList: [
{
name: "公司介绍",
tip: 0,
icon: require('../../static/my-page/func-yzyh.png'),
status: 0,
size: '46',
path: '/pages/user/education/index?title=应知应会'
},
// {
// name: "精彩课程",
// tip: 0,
// icon: require('../../static/my-page/func-jckc.png'),
// status: 2,
// size: '44',
// path: '/pages/user/education/index?title=精彩课程'
// },
{
name: "发展历程",
tip: 0,
icon: require('../../static/my-page/func-fgs.png'),
status: 3,
size: '40',
path: '/pages/user/education/index?title=分公司'
}
],
practicalList: [
{
name: "水果卡",
tip: 0,
icon: require('../../static/images/user/shuiguoka@3x.png'),
status: 2,
size: '38',
path: '/pages/user/Fruit/index'
},
{
name: "我的收藏",
tip: 0,
icon: require('../../static/images/user/wodeshoucang@3x.png'),
status: 0,
size: '46',
path: '/pages/user/collect'
},
// {
// name: "系统设置",
// tip: 0,
// icon: require('../../static/images/user/ic_syssetting.png'),
// status: 2,
// size: '38',
// path: '/pages/setting/index'
// },
// {
// name: "银行卡管理",
// tip: 0,
// icon: require('../../static/images/user/ic_card_manage.png'),
// status: 2,
// size: '38',
// path: '/pages/user/payment/list?type=3&coupon=true'
// },
{
name: "水果券",
tip: 0,
icon: require('../../static/images/user/shuiguoquan@3x.png'),
status: 2,
size: '38',
path: '/pages/user/balance/list?title=水果券&type=getFruitRecord&transferType=5'
// path: '/pages/user/Fruit/index?type=3&coupon=true'
},
{
name: "实名认证",
tip: 0,
icon: require('../../static/images/user/shimingrenzheng@3x.png'),
status: 2,
size: '38',
path: '/pages/user/authentication/authentication'
// path: '/pages/user/Fruit/index?type=3&coupon=true'
},
// {
// name: "充值",
// tip: 0,
// icon: require('../../static/ic_recharge.png'),
// status: 2,
// size: '38',
// path: '/pages/user/balance/recharge'
// }
],
servicePhone: "",
cbfcAcountData: {},
teamTotal: 0,
balance: 0,
cardsTotal: 0,
showModal: false,
advertData: false,
redList: [],
mobileList: [],
threeData: [],
platform: uni.getSystemInfoSync().platform,
uniPlatform: uni.getSystemInfoSync().uniPlatform,
configAppstoreHidePage: false,
wxBtnHeight: 20,
scrollTop: 516 / uni.getStorageSync('dpi') + 44 + uni.getStorageSync('system').statusBarHeight,
loading: true,
identity: [],
isVip: false,
vipInfo: {},
consumer: null,
identityLoaded: false,
sizeHeight: 342 / uni.getStorageSync('dpi'),
sweixin: '',
dialogTitle:"",
// 槟榔、辣椒资产
statistics: {
blNum: 0,
ljNum: 0
},
authInfo: {}
}
},
onPullDownRefresh() {
console.log('666666')
this.init();
this.$store.dispatch('getMyAsset');
},
computed: {
...mapState(["userInfo", "myAsset", "sysTem", "isLogin"])
},
onLoad() {
// #ifdef MP-WEIXIN
this.wxBtnHeight = wx.getMenuButtonBoundingClientRect().height
// #endif
// #ifdef APP-PLUS
this.wxBtnHeight = uni.getStorageSync('system').statusBarHeight + 10
// this.scrollTop = 516/uni.getStorageSync('dpi') + 44;
// #endif
// 广告弹框
this.$http("GET", url.cms.advertisingMap, {
position: 8
}).then(res => {
if (res.data && res.data.length > 0) {
this.advertData = res.data[0]
if (this.advertData.popupMode === 2) {
if (!publics.advertShowToStorage(this.advertData.id)) {
this.showModal = true
}
} else {
this.showModal = true
}
}
});
},
mounted() {
console.log('**********************', this.userDetailInfo);
console.log('***********************', uni.getStorageSync("userInfo"));
this.userDetailInfo = uni.getStorageSync("userInfo") || {};
if (this.userDetailInfo.username) this.loading = false
console.log('this.wxBtnHeight', this.userDetailInfo)
this.getHeaderHeight();
// if (!this.userDetailInfo.username) {
// this.getHeaderHeight(); this.loading = false;
// }
this.init()
this.getRedBagList()
this.getUserIdentity()
// this.getMyAsset();
this.$store.dispatch('getMyAsset');
// 获取 苹果应用商店需要隐藏的页面和功能模块 配置
if (this.platform === "ios" && this.uniPlatform === 'app') {
this.$http("GET", url.common.appstoreHidePage).then(res => {
console.log(this.platform)
if (res.data) {
this.configAppstoreHidePage = res.data.keyValue === "1" ? false : true
}
})
} else { //其它设备则显示
this.configAppstoreHidePage = true
}
this.checkToken();
this.getMyTotalRecord();
},
async onShow() {
console.log('**********************')
this.userDetailInfo = this.userInfo;
if (this.userDetailInfo.username) this.loading = false
console.log('this.wxBtnHeight', this.userDetailInfo)
this.init()
this.getRedBagList()
this.getUserIdentity()
this.getDataInfo()
// this.getMyAsset();
this.$store.dispatch('getMyAsset');
// 获取 苹果应用商店需要隐藏的页面和功能模块 配置
if (this.platform === "ios" && this.uniPlatform === 'app') {
this.$http("GET", url.common.appstoreHidePage).then(res => {
console.log(this.platform)
if (res.data) {
this.configAppstoreHidePage = res.data.keyValue === "1" ? false : true
}
})
} else { //其它设备则显示
this.configAppstoreHidePage = true
}
await this.checkToken();
await this.getMyTotalRecord();
},
onBackPress() {
//隐藏到后台不退出app
let main = plus.android.runtimeMainActivity();
main.moveTaskToBack(false);
return true;
},
methods: {
...mapMutations(["setUserInfo", "logout"]),
checkToken() {
this.$http("GET", "/user/userCache").then((res) => {
if (!res.data) {
this.logout();
}
});
},
async authentication() {
let res = await authenticationApi();
this.authInfo = res
},
// #ifdef APP-PLUS
launchMiniProgram() {
//需调用plus.share.getServices获取微信分享服务对象
plus.share.getServices((s) => {
let sweixin = {};
for (let i = 0; i < s.length; i++) {
let share = s[i];
if (share.id === 'weixin') {
sweixin = share
}
}
//小程序参数,必填
let WeixinMiniProgramOptions = {
id: 'gh_eada252706e7',
path: '/pages/me/index' //可指定打开的页面
}
sweixin ? sweixin.launchMiniProgram(WeixinMiniProgramOptions) : plus.nativeUI.alert(
'当前环境不支持微信操作!');
}, function(e) {
console.log("获取分享服务列表失败:" + e.message);
});
},
// #endif
getDataInfo() {
integerInfo().then((res)=>{
this.dataInfo = res
})
},
async getMyTotalRecord() {
let ljRes = await getMyRecordsStatistics({
type:1
});
let blRes = await getMyRecordsStatistics({
type:2
});
if (ljRes.code == 200) {
for (let key in ljRes.data) {
if (key == "辣椒") this.statistics.ljNum = ljRes.data[key];
}
console.log("res", this.statistics);
}
if (blRes.code == 200) {
for (let key in blRes.data) {
if (key == "槟榔") this.statistics.blNum = blRes.data[key];
}
console.log("res", this.statistics);
}
},
callbackMethod(val) {
if (val == 'goLicai') {
this.goLicai()
} else if (val == 'goChili') {
this.goChili()
}
},
goLicai() {
try {
this.$http('GET', '/user/userCache').then(res => {
if (res.data) {
this.$http('GET', url.user.getUserIdentity)
.then(({ code, data }) => {
if (code == 200) {
uni.hideLoading()
const _ = data.find(item => item.identityNameCode == 1)
this.goPage('/pages/licai/mine/index')
}
})
.catch(() => uni.hideLoading())
} else {
uni.hideLoading()
this.logout()
}
})
} catch (e) {
//TODO handle the exception
uni.hideLoading()
}
},
goChili () {
try {
this.$http('GET', '/user/userCache').then(res => {
if (res.data) {
this.$http('GET', url.user.getUserIdentity)
.then(({ code, data }) => {
if (code == 200) {
uni.hideLoading()
const _ = data.find(item => item.identityNameCode == 1)
if (!!_ && _.identityStatus == 1) {
//是会员
this.goPage('/pages/chili/mine/index')
} else {
uni.showToast({
title: 'VIP身份才可入驻',
icon: 'none'
})
}
}
})
.catch(() => uni.hideLoading())
} else {
uni.hideLoading()
this.logout()
}
})
} catch (e) {
//TODO handle the exception
uni.hideLoading()
}
},
handlerRight() {
console.log('222')
},
getGrade() {
const index = 1;
return {
// this.consumer.identityStatus
icon: require(`../../static/images/user/my/xiaofei${index}.png`)
}
},
reset() {
console.log('**********************', this.userDetailInfo);
console.log('***********************', uni.getStorageSync("userInfo"));
this.userDetailInfo = uni.getStorageSync("userInfo") || {};
if (this.userDetailInfo.username) this.loading = false
console.log('this.wxBtnHeight', this.userDetailInfo)
this.getHeaderHeight();
// if (!this.userDetailInfo.username) {
// this.getHeaderHeight(); this.loading = false;
// }
this.init()
this.getRedBagList()
// this.getUserIdentity()
this.getMyAsset();
this.$store.dispatch('getMyAsset');
// 获取 苹果应用商店需要隐藏的页面和功能模块 配置
if (this.platform === "ios" && this.uniPlatform === 'app') {
this.$http("GET", url.common.appstoreHidePage).then(res => {
console.log(this.platform)
if (res.data) {
this.configAppstoreHidePage = res.data.keyValue === "1" ? false : true
}
})
} else { //其它设备则显示
this.configAppstoreHidePage = true
}
},
getUserIdentity() {
this.$http("GET", url.user.getUserIdentity).then(({
code,
data
}) => {
if (code == 200) {
this.identity = []
data.map((item) => {
if (item.identityStatus >= 1) this.identity.push(item);
this.isVip = data.some((item) => {
return item.identityNameCode == 1 && item.identityStatus == 1
});
this.vipInfo = data.find((item) => {
return item.identityNameCode == 1 && item.identityStatus == 0
})
this.consumer = data.find((item) => {
return item.identityNameCode == 5 && item.identityStatus > 0
})
//水果卡
this.fruitInfo = data.find((item) => {
return item.identityNameCode == 7 && item.identityStatus > 0
})
// 代理商
this.dailiInfo = data.find((item) => {
return item.identityNameCode == 6 && item.identityStatus > 0
})
})
}
console.log('this.identity', this.identity)
this.getDataInfo()
this.identityLoaded = true
})
},
handlerCopy(str) {
uni.setClipboardData({
data: str,
success: () => {
this.$msg('复制成功')
}
});
},
async getMyAsset() {
this.$http("GET", url.user.getMyAsset).then(async (res) => {
let {
code,
data
} = res;
console.log('res', res)
if (code == 200) {
data.forEach((item) => {
if (item.assetAccount == null) item.assetAccount = 0;
})
this.myAsset = data;
}
})
},
getHeaderHeight() {
let query = uni.createSelectorQuery().in(this);
setTimeout(() => {
console.log('this.sysTem', this.sysTem)
console.log('this.sysTem.statusBarHeight', this.sysTem.statusBarHeight)
query.select('#headerBox').boundingClientRect(data => {
console.log('=============', data);
this.scrollTop = data.height + 44 + uni.getStorageSync('system').statusBarHeight;
this.contentHeight = this.sysTem.screenHeight - (this.sysTem.statusBarHeight + data
.height)
console.log('this.contentHeight', this.contentHeight)
this.sizeHeight = data.height;
}).exec();
}, 100)
},
async goPage(path) {
console.log(this.isLogin)
if (!this.isLogin) return this.$msg("请先登录", 2000);
if (path.indexOf('getWalletRecord') >= 0) {
this.$http("GET", url.asset.checkManageIdentity).then(({
code,
data
}) => {
if (code == 200) {
if (data) this.toNav(path);
else this.$msg("您不是商家", 2000)
}
})
return;
}
if (path.indexOf('authentication') >= 0) {
try {
const res = await authenticationApi();
this.authInfo = res
if (res.status == 3) {
this.$navigateTo('/pages/user/authentication/authentication')
} else {
this.$navigateTo('/pages/user/authentication/result')
}
} catch (e) {
this.$msg('获取认证信息失败,请稍后重试')
}
return
}
if (path == 'service') this.onContact();
else if (path == 'merchants') this.toMerchants();
else this.toNav(path)
},
//退出登录
toLogout() {
let that = this;
uni.showModal({
title: "提示",
content: '确定要退出登陆么',
success: e => {
if (e.confirm) {
// this.$store.dispatch('logout')
that.logout();
}
}
});
},
// 红包福利
getRedBagList() {
this.$http("GET", url.cms.redEnvelopesList).then(res => {
this.redList = res.data
if (res.data.length > 0) {
this.redList.map(v => {
v.show = true
})
}
})
},
async pageInit(pageNo, pageSize) {
console.log('**********************')
this.userDetailInfo = this.userInfo;
if (this.userDetailInfo.username) this.loading = false
console.log('this.wxBtnHeight', this.userDetailInfo)
try {
await this.init()
await this.getRedBagList()
await this.getUserIdentity()
// this.getMyAsset();
this.$store.dispatch('getMyAsset');
// 获取 苹果应用商店需要隐藏的页面和功能模块 配置
if (this.platform === "ios" && this.uniPlatform === 'app') {
await this.$http("GET", url.common.appstoreHidePage).then(res => {
console.log(this.platform)
if (res.data) {
this.configAppstoreHidePage = res.data.keyValue === "1" ? false : true
}
})
} else { //其它设备则显示
this.configAppstoreHidePage = true
}
// 由于这是用户页面,不需要分页数据,所以传入空数组表示没有更多数据
this.$refs.paging.complete([]);
} catch (error) {
console.error('pageInit error:', error);
// 如果出错传入false表示加载失败
this.$refs.paging.complete(false);
}
},
async init() {
// 获取收藏、足迹、关注、优惠券数量
await this.$http("GET", url.user.cbfcAcount).then(res => {
this.cbfcAcountData = res.data
})
// 获取订单状态数量
await this.$http("GET", url.order.getOrderAmount).then(res => {
this.cuList[0].tip = res.data.unpaid
this.cuList[1].tip = res.data.ongoing
this.cuList[2].tip = res.data.waitReceived
this.cuList[3].tip = res.data.evaluated
this.cuList[4].tip = res.data.used + res.data.notUsed
})
// // 获取团队总数
// await this.$http("GET", url.user.getTeamList, {
// pageSize: 1
// }).then(res => {
// this.teamTotal = res.data.total
// })
// 获取卡包总数
await this.$http("GET", url.user.getUserCards, {
pageSize: 1
}).then(res => {
this.cardsTotal = res.data.total
})
// 获取用户信息
await this.getUserInfo()
// 获取钱包余额
await this.$http('GET', url.user.getWalletInfo).then(res => {
// this.balance = res.data.balance
})
// 获取客服信息
await this.$http("GET", url.common.customerService).then(res => {
let mobileList = res.data.mobile
mobileList.map(v => {
v.type = "电话"
})
let qqList = res.data.qq
qqList.map(v => {
v.type = "QQ"
})
let wechatList = res.data.wechat
wechatList.map(v => {
v.type = "微信"
})
this.mobileList = wechatList.concat(qqList).concat(mobileList)
})
// 获取第三方服务比例
await this.$http("GET", url.common.threeProportion).then(res => {
this.threeData = res.data
})
},
getUserInfo() {
this.$http("GET", url.user.getUserInfoBasic).then(res => {
this.setUserInfo(res.data)
this.userDetailInfo = res.data
this.avatar = res.data.headPortrait
this.loading = false
this.getHeaderHeight();
if (!this.avatar && res.data.userResources) {
let userResources = res.data.userResources
userResources.forEach(v => {
if (v.type === 0) {
this.avatar = v.ossUrl
return
}
})
this.setIMInfo(res.data)
}
uni.stopPullDownRefresh()
})
},
// 同步聊天头像及昵称
setIMInfo(res) {
if (res) {
uni.$TUIKit.updateMyProfile({
nick: res.nickname,
avatar: this.avatar,
})
}
},
getScale(code) {
if (!code || this.threeData.length === 0) return
let scale = null
this.threeData.forEach(v => {
if (v.keyCode === code) {
scale = v.remarks
return
}
})
return scale
},
showThreeItem(code) {
if (!code || this.threeData.length === 0) return
let show = false
this.threeData.forEach(v => {
if (v.keyCode === code) {
show = v.keyValue === "1" ? true : false
return
}
})
return show
},
filterImg(img) {
return publics.filterImgUrl(img, 1)
},
callPhoto(phone) {
uni.makePhoneCall({
phoneNumber: phone
})
},
goUser(imAccount) {
this.$navigateTo("/pages/interaction/user?userId=" + imAccount)
this.closePopup()
},
toAgent() {
if (this.userDetailInfo.distributorIsOpen === 1) {
this.toNav("/pages/agent/index")
} else {
this.$http("GET", url.distributor.getApplyInfo).then(res => {
// status: 1=审核中2=审核通过3=审核失败
if (!res.data) {
this.toNav("/pages/agent/apply")
} else if (res.data.status === 2) {
this.toNav("/pages/agent/index")
} else {
uni.setStorageSync("examineData", res.data)
this.toNav("/pages/merchants/settleIn/result")
}
})
}
},
/**
* item.type === 1 商家入住
* item.type === 2 商家管理
* item.type === 3 商家打赏
* item.type === 4 商家提现
*
*
*/
merchantMenuClick(item) {
if (!this.isLogin) return this.$msg("请先登录", 2000);
const {
storeIsOpen
} = this.userDetailInfo || {};
switch (item.type) {
case 1:
if (!this.isVip) return this.$msg("您不是会员")
if (storeIsOpen) {
this.toMerchants('edit')
// this.$msg("商家已入驻,请进入商家管理", 2000)
} else {
this.toMerchants()
}
break;
case 2:
if (!this.isVip) return this.$msg("您不是会员")
if (!storeIsOpen) {
this.$msg("请先商家入驻", 2000)
} else {
this.toMerchants()
}
break;
case 3:
if (!storeIsOpen) return this.$msg("您不是商家")
this.toNav("/pages/merchants/reward/reward")
break;
case 4:
if (!storeIsOpen) return this.$msg("您不是商家")
this.toNav(item.path)
break;
default:
this.$msg("暂未开放", 2000)
break;
}
},
toMerchants(type) {
this.$http("GET", url.store.getApplyInfo).then(res => {
// status: 1=审核中2=审核通过3=审核失败
if (!res.data) {
this.toNav("/pages/merchants/settleIn/step")
} else if (res.data.status === 2) { // 审核通过
if (type == 'edit') this.toNav("/pages/merchants/settleIn/indexCopy?type=edit");
else this.toNav("/pages/merchants/home");
} else if (res.data.status === 1) { // 审核中
uni.setStorageSync("examineData", res.data)
this.toNav("/pages/merchants/settleIn/result")
} else { //审核失败
uni.setStorageSync("examineData", res.data)
this.toNav("/pages/merchants/settleIn/result")
}
})
},
// 客服电话
onContact() {
if (this.mobileList.length === 0) return
let _this = this
let itemList = []
let phoneList = []
this.mobileList.map(v => {
itemList.push(`[${v.type}]${v.name}(${v.keyValue})`)
phoneList.push(v.keyValue)
})
uni.showActionSheet({
itemList: itemList,
success(res) {
if (itemList[res.tapIndex].indexOf("QQ") > -1) {
_this.$onCopy(phoneList[res.tapIndex])
_this.$msg("QQ号已复制, 请打开QQ添加客服联系", 2000)
} else if (itemList[res.tapIndex].indexOf("微信") > -1) {
_this.$onCopy(phoneList[res.tapIndex])
_this.$msg("微信号已复制, 请打开微信添加客服联系", 2000)
} else {
uni.makePhoneCall({
phoneNumber: phoneList[res.tapIndex]
});
}
}
})
},
// 扫一扫
scanCode() {
let _this = this
uni.scanCode({
scanType: ["qrCode"],
success: function(res) {
console.log('条码内容:' + res.result);
let result = res.result
// 判断内容是url,并且存在data
if ((result.indexOf("https") > -1 || result.indexOf("http") > -1) && result.indexOf(
"data") > -1) {
let reg = new RegExp("(^|&)data=([^&]*)(&|$)");
let json = result.substr(1).match(reg)
try {
let r = JSON.parse(json[2])
if (r && r.type && r.data) {
if (r.type === 99) {
_this.$navigateTo("/pages/interaction/user?userId=" + r.data)
} else {
uni.setStorageSync("codeResultData", r)
_this.$navigateTo("scan/index")
}
} else {
_this.$msg("暂不支持扫码该类型二维码,目前只支持扫商户收款码付款", 5000)
}
} catch (err) {
_this.$msg("暂不支持扫码该类型二维码,目前只支持扫商户收款码付款", 5000)
}
} else {
_this.$msg("暂不支持扫码该类型二维码,目前只支持扫商户收款码付款", 5000)
}
}
});
},
goOrder(status) {
if (!this.isLogin) return this.$msg("请先登录", 2000);
let url = "/pages/order/index"
if (status) {
url = url + "?status=" + status
}
this.toNav(url)
},
toNav(path) {
console.log('path', path)
if (!this.isLogin && path.indexOf('login') < 0) return this.$msg("请先登录", 2000);
if (!path) return this.$msg('暂未开放')
this.$navigateTo(path)
},
imgJump() {
this.showModal = false
this.$http("POST", url.cms.clickAdvertisingMap, {
id: this.advertData.id
})
publics.advertOption(this.advertData.operationCode, this.advertData.operationValue)
}
}
}
</script>
<style lang="scss" scoped>
.main {
background-color: #f5f6fa;
}
/* 顶部整幅背景图,使用图片元素按宽度自适应,完整展示弧形 */
.page-top-bg-img {
display: block;
width: 100%;
height: auto;
position: absolute;
top: 0;
left: 0;
right: 0;
z-index: 0;
pointer-events: none;
}
/* #ifdef H5 */
.page-top-bg-img {
margin-top: -70rpx; /* 只在H5端生效往上移动 */
}
/* #endif */
/* #ifdef APP-PLUS */
.page-top-bg-img {
/* 在 APP 端,按状态栏高度向上偏移,抵消系统状态栏造成的位移 */
margin-top: 0rpx;
}
/* #endif */
.header {
// height: 300rpx;
padding: 0 20rpx 20rpx 20rpx;
background: linear-gradient(180deg, #F6D5D2, #FFFFFF);
background-size: 100% 100%;
.avatar {
width: 100rpx;
height: 100rpx;
background-color: white;
border-radius: 50%;
margin-right: 30rpx;
}
.six {
margin-top: 10rpx;
margin-right: 10rpx;
border-radius: 10rpx;
padding: 0 10rpx 10rpx;
line-height: 28rpx;
border: 2rpx solid white;
}
.yellow {
background: linear-gradient(to bottom, #b69700 0%, #c66d00 100%);
}
.green {
background: linear-gradient(to bottom, #38b948 0%, #238300 100%);
}
.orange {
background: linear-gradient(to bottom, #be5b00 0%, #ff9400 100%);
}
.redd {
background: linear-gradient(to bottom, #dc4839 0%, #e20b3b 100%);
}
}
.con {
padding: 0 20rpx;
padding-top: 30rpx;
background-color: rgb(242, 242, 242);
border-radius: 40rpx 40rpx 0 0;
.culist {
background-color: white;
border-radius: 16rpx;
margin-bottom: 20rpx;
padding: 0 30rpx;
padding-top: 20rpx;
.title {
border-bottom: 2rpx solid #eee;
padding-bottom: 20rpx;
}
.pad {
padding: 30rpx 0;
}
.grod {
border-radius: 14rpx;
display: flex;
flex-wrap: wrap;
padding-bottom: 30rpx;
&-item {
width: 20%;
margin-top: 30rpx;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
position: relative;
.img {
width: 60rpx;
height: 60rpx;
margin-bottom: 10rpx;
}
.icon {
font-size: 50rpx;
margin-bottom: 10rpx;
}
.tips {
position: absolute;
left: 80rpx;
top: -20rpx;
color: white;
font-size: 24rpx;
padding: 0 14rpx;
border-radius: 50rpx;
z-index: 9;
background-color: #CA0400;
}
}
}
.flex-start {
padding: 30rpx 0 0;
.grod-item {
justify-content: flex-start !important;
margin-bottom: 30rpx;
}
}
}
.history {
padding-top: 0;
background-color: rgba($color: #fff, $alpha: 0) !important;
margin: 0;
margin-top: 50rpx;
// margin-bottom: 50rpx;
}
.list {
margin-bottom: 20rpx;
&-item {
height: 110rpx;
padding: 0 30rpx;
border-radius: 14rpx;
margin-bottom: 10rpx;
.icon {
width: 40rpx;
height: 40rpx;
margin-right: 10rpx;
}
}
}
.carousel-section {
margin-bottom: 20rpx;
padding: 0;
display: flex;
align-items: center;
justify-content: space-between;
.carousel {
width: 48%;
height: 220upx;
.img {
width: 100%;
height: 100%;
border-radius: 16rpx;
}
}
.swiper-dots {
left: 45upx;
bottom: 40upx;
}
}
.third {
padding-bottom: 100rpx;
.title {
margin-bottom: 20rpx;
.xian {
margin: 0 40rpx;
color: #C0C0C0;
font-size: 30rpx;
}
}
.grid {
flex-flow: wrap;
display: flex;
background-color: white;
border-radius: 14rpx;
&-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 226rpx;
padding: 30rpx 0;
border-right: 2rpx solid #f5f5f5;
border-bottom: 2rpx solid #f5f5f5;
.icon {
font-size: 50rpx;
}
.name {
margin-top: 10rpx;
font-size: 28rpx;
color: #666666;
}
}
}
}
}
.popup {
width: 600rpx;
background-color: white;
padding: 30rpx;
border-radius: 16rpx;
.img {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.btn {
font-size: 24rpx;
color: #F8D247;
border: 2rpx solid #F8D247;
border-radius: 6rpx;
padding: 4rpx 20rpx;
}
}
.fixed {
// position: fixed;
// bottom: 30rpx;
// left: 0;
// right: 0;
margin-top: 80rpx;
margin-bottom: 50rpx;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.p1 {
font-size: 30rpx;
color: #666;
}
.p2 {
font-size: 24rpx;
color: #999999;
}
}
.ba-msg {
font-size: 12rpx;
transform: scale(.8);
line-height: 60rpx;
text-align: center;
color: rgba(0, 0, 0, .6);
.msg-item {
display: flex;
justify-content: center;
align-items: center;
}
.ba-icon {
width: 26rpx;
height: 26rpx;
margin-right: 10rpx;
}
}
.share-box {
padding: 24rpx 0 36rpx 0;
height: 160rpx;
position: relative;
margin-top: 20rpx;
.new-banner-img {
position: absolute; top: 0; right: 0; bottom: 0; left: 0;
width: 100%; height: 100%;
object-fit: cover;
object-position: center;
}
}
.new_asset {
display: flex;
justify-content: space-between;
height: 214rpx;
// padding: 24rpx 24rpx;
.asset-item {
display: flex;
justify-content: space-between;
width: 320rpx;
background-color: hsla(0, 0%, 100%, 0.973);
border-radius: 24rpx;
position: relative;
background-repeat: no-repeat;
background-position: right bottom;
&.binglang {
background-image: url('../../static/my-page/binglang.png');
background-size: 43% auto;
}
&.lajiao {
background-image: url('../../static/my-page/lajiao.png');
background-size: 40% 80%;
}
.fans-img {
padding-right: 6rpx;
flex: 1;
align-self: flex-end;
width: 100%;
height: 70%;
}
.wallet-img {
padding: 0 10rpx 10rpx 10rpx;
flex: 1;
align-self: flex-end;
width: 90%;
height: 75%;
}
}
.binglang-lajiao {
width: 342rpx;
box-shadow: 0px 2rpx 10rpx 1rpx rgba(90, 123, 180, 0.2);
.title-box {
.detail {
display: flex;
align-items: center;
.enter {
border-radius: 20rpx;
padding: 0 12rpx 3rpx 12rpx;
margin-top: 6rpx;
}
}
}
.assets-box {
display: flex;
align-items: baseline;
flex-wrap: nowrap;
font-size: 24rpx;
flex: 1 1 auto;
min-width: 0;
> view:first-child,
> view:last-child {
flex: 0 0 auto;
white-space: nowrap;
}
color: #808080;
.assetsNum {
flex: 1 1 auto;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-weight: 500;
font-size: 33rpx;
color: red;
padding: 0 6rpx 0 6rpx;
text-align: center;
}
}
}
}
.wallet-fans {
padding: 24rpx 24rpx;
}
.asset {
height: 165rpx;
padding-top: 6rpx;
}
.title-box {
padding: 30rpx 0 30rpx 30rpx;
.title {
font-size: 32rpx;
font-weight: 600;
}
.detail {
padding-top: 12rpx;
.sub-title {
font-weight: 400;
font-size: 24rpx;
color: #808080;
}
.sub-value {
font-weight: 500;
font-size: 30rpx;
color: #999999;
margin-top: 27rpx;
display: block;
}
.enter {
display: inline-block;
font-weight: 500;
font-size: 24rpx;
color: #ffffff;
margin-top: 10rpx;
padding: 0 18rpx 3rpx 18rpx;
background-color: #22bd5e;
border-radius: 20rpx;
margin-top: 24rpx;
}
}
}
.real-name {
display: flex;
justify-content: space-between;
align-items: center;
.real-name-img {
flex: 1;
width: 100rpx;
height: 180rpx;
object-fit: cover;
object-position: center;
}
.title-box {
flex: 1;
padding: 20rpx 0 20rpx 30rpx;
}
}
.wodefensi .title-box .title {
padding-top: 15rpx;
}
</style>