This commit is contained in:
唐明明
2021-10-15 09:42:37 +08:00
318 changed files with 11805 additions and 8972 deletions

View File

@@ -9,7 +9,8 @@ import store from '@/store'
// 基础配置 // 基础配置
const config = { const config = {
apiUrl : 'https://oapi.lianshang.vip/api/', // 正式环境 // apiUrl : 'https://oapi.lianshang.vip/api/', // 正式环境
apiUrl : 'http://api.ahxh.shangkelian.cn/api/', // 测试环境
apiUrls : 'https://storage.lianshang.vip/', // 图片路径(测试/正式) apiUrls : 'https://storage.lianshang.vip/', // 图片路径(测试/正式)
timeout : 60000 timeout : 60000
} }

View File

@@ -49,6 +49,15 @@ const vipVoucher = (data) =>{
}) })
} }
// 编辑凭证
const vipVoucherUpdate = (id,data) =>{
return request({
url : 'user/voucher/'+id+'/update',
method : 'POST',
data : data
})
}
// 用户协议 // 用户协议
const userAgree = (apiUrl) => { const userAgree = (apiUrl) => {
return request({ return request({
@@ -62,5 +71,6 @@ export {
vipWechatPay, vipWechatPay,
vipCont, vipCont,
vipVoucher, vipVoucher,
userAgree userAgree,
vipVoucherUpdate
} }

View File

@@ -3,10 +3,10 @@
"path": "pages/index/index", "path": "pages/index/index",
"name": "Index", "name": "Index",
"style": { "style": {
"navigationBarBackgroundColor":"#1f1922", "navigationBarBackgroundColor": "#1f1922",
"backgroundColor":"#1f1922", "backgroundColor": "#1f1922",
"navigationStyle":"custom", "navigationStyle": "custom",
"navigationBarTextStyle":"white" "navigationBarTextStyle": "white"
} }
}, { }, {
"path": "pages/found/index", "path": "pages/found/index",
@@ -14,7 +14,7 @@
"auth": true, "auth": true,
"style": { "style": {
"navigationBarTitleText": "发现更多", "navigationBarTitleText": "发现更多",
"navigationStyle":"custom" "navigationStyle": "custom"
} }
}, { }, {
"path": "pages/user/index", "path": "pages/user/index",
@@ -63,13 +63,16 @@
"path": "pages/vip/vip", "path": "pages/vip/vip",
"name": "vipIndex", "name": "vipIndex",
"style": { "style": {
"navigationBarTitleText": "开通节点" "navigationBarTitleText": "开通节点",
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle":"white"
} }
}, { }, {
"path": "pages/vip/agree", "path": "pages/vip/agree",
"name": "vipAgree", "name": "vipAgree",
"style": { "style": {
"navigationBarTitleText": "用户协议" "navigationBarTitleText": "用户协议",
"navigationBarBackgroundColor": "#774ffd"
} }
}, { }, {
"path": "pages/vip/examine", "path": "pages/vip/examine",
@@ -137,8 +140,8 @@
"name": "Login", "name": "Login",
"style": { "style": {
"navigationBarTitleText": "登录", "navigationBarTitleText": "登录",
"navigationBarBackgroundColor":"#FFFFFF", "navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle":"black" "navigationBarTextStyle": "black"
} }
}, { }, {
"path": "pages/login/guide", "path": "pages/login/guide",
@@ -197,6 +200,16 @@
"navigationBarBackgroundColor":"#976dff" "navigationBarBackgroundColor":"#976dff"
} }
}, { }, {
"path": "pages/wallet/redProperty",
"name": "walletRedProperty",
"style": {
"navigationBarTitleText": "现金红包",
"enablePullDownRefresh": false,
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor":"#976dff"
}
},
{
"path": "pages/wallet/extract", "path": "pages/wallet/extract",
"name": "Extract", "name": "Extract",
"style": { "style": {
@@ -205,6 +218,16 @@
"navigationBarBackgroundColor": "#976dff", "navigationBarBackgroundColor": "#976dff",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
},
{
"path": "pages/wallet/extractRed",
"name": "ExtractRed",
"style": {
"navigationBarTitleText": "提现红包",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#976dff",
"navigationBarTextStyle": "white"
}
}, { }, {
"path": "pages/verification/index", "path": "pages/verification/index",
"name": "verificationIndex", "name": "verificationIndex",
@@ -299,11 +322,11 @@
}, },
"name": "withdrawList" "name": "withdrawList"
}, { }, {
"path" : "pages/wxAuth/wxAuth", "path": "pages/wxAuth/wxAuth",
"name" : "wxAuth" "name": "wxAuth"
},{ }, {
"path" : "pages/clearOpen/clearOpen", "path": "pages/clearOpen/clearOpen",
"style" : { "style": {
"navigationBarTitleText": "提现记录", "navigationBarTitleText": "提现记录",
"enablePullDownRefresh": false "enablePullDownRefresh": false
}, },

View File

@@ -19,15 +19,20 @@
<view class="content-title">发现更多</view> <view class="content-title">发现更多</view>
<view class="content-sumite">海量能量碎片等你解锁</view> <view class="content-sumite">海量能量碎片等你解锁</view>
<view class="sign"> <view class="sign">
<view class="sign-list" :class="{ active: item.sign }" v-for="(item, index) in sign.signArr" :key="index"> <view class="sign-list" :class="{ active: item.sign }" v-for="(item, index) in sign.signArr"
:key="index">
<view class="sign-tips" v-if="item.sign"> <view class="sign-tips" v-if="item.sign">
<view class="sign-tips-text">已签</view> <view class="sign-tips-text">已签</view>
</view> </view>
<block v-if="index == 7"> <block v-if="index == 7">
<image class="sign-list-img" :src="item.sign ? '../../static/user/sign_icon_last_active.png' : '../../static/user/sign_icon_last.png'" mode="aspectFill"></image> <image class="sign-list-img"
:src="item.sign ? '../../static/user/sign_icon_last_active.png' : '../../static/user/sign_icon_last.png'"
mode="aspectFill"></image>
</block> </block>
<block v-else> <block v-else>
<image class="sign-list-img" :src="item.sign ? '../../static/user/sign_icon_active.png' : '../../static/user/sign_icon.png'" mode="aspectFill"></image> <image class="sign-list-img"
:src="item.sign ? '../../static/user/sign_icon_active.png' : '../../static/user/sign_icon.png'"
mode="aspectFill"></image>
</block> </block>
<view class="sign-list-day"> <view class="sign-list-day">
{{ item.text }} {{ item.text }}
@@ -38,7 +43,8 @@
</view> </view>
<view class="signBtn"> <view class="signBtn">
<block v-if="sign.signCan"> <block v-if="sign.signCan">
<view class="signBtn-go" @click="signClick" style="cursor:pointer" > <view class="signBtn-go" @click="signClick" style="cursor:pointer">
<u-icon name="calendar-fill" color="#333" size="40" />
签到领取能量碎片 签到领取能量碎片
</view> </view>
</block> </block>
@@ -54,36 +60,46 @@
能量碎片任务 能量碎片任务
</view> </view>
<block v-for="(item, index) in task" :key="index"> <block v-for="(item, index) in task" :key="index">
<view class="task-item" v-if="item.rule.name != 'sign_crystal'" @click="JumpUrl(item.url, item.title, item.is_finish)"> <view class="task-item" v-if="item.rule.name != 'sign_crystal'"
@click="JumpUrl(item.url, item.title, item.is_finish)">
<image class="task-icon" :src="item.ico" mode="aspectFill"></image> <image class="task-icon" :src="item.ico" mode="aspectFill"></image>
<view class="task-title">{{item.title}}</view> <view class="task-title">{{item.title}}</view>
<view class="task-subtitle">{{item.remark}}</view> <view class="task-subtitle">{{item.remark}}</view>
<view class="task-label" :class="{'active' : item.is_finish}">{{item.is_finish ? '已完成' : item.tips}}<image @click.stop="showHelp" class="task-label-icon" src="@/static/imgs/user-crystalMark-grey.png"></image></view> <view class="task-label" :class="{'active' : item.is_finish}">{{item.is_finish ? '已完成' : item.tips}}
<image @click.stop="showHelp" class="task-label-icon"
src="@/static/imgs/user-crystalMark-grey.png"></image>
</view>
</view> </view>
</block> </block>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { task, sign, operateSign } from '@/apis/interfaces/crystal' import {
import { userIndex } from '@/apis/interfaces/user' task,
sign,
operateSign
} from '@/apis/interfaces/crystal'
import {
userIndex
} from '@/apis/interfaces/user'
export default { export default {
data() { data() {
return { return {
task: [], task: [],
sign: { sign: {
signArr : [], signArr: [],
nextTask: '', nextTask: '',
signCan : false, signCan: false,
signShow: false, signShow: false,
signSuccess: '' signSuccess: ''
}, },
tips : { tips: {
tipsTitle : '', // 弹出的动态名称 tipsTitle: '', // 弹出的动态名称
tipsContent : '', // 弹出的动态内容 tipsContent: '', // 弹出的动态内容
tipsState : false // 弹出的动态状态 tipsState: false // 弹出的动态状态
}, },
energyShard : '' // 碎片说明 energyShard: '' // 碎片说明
} }
}, },
onShow() { onShow() {
@@ -100,12 +116,12 @@
}) })
// 读取配置信息 // 读取配置信息
userIndex().then(res=>{ userIndex().then(res => {
this.energyShard = res.help_doc.energy_shard this.energyShard = res.help_doc.energy_shard
}).catch(err =>{ }).catch(err => {
uni.showToast({ uni.showToast({
title: err.message, title: err.message,
icon : 'none' icon: 'none'
}) })
}) })
@@ -155,23 +171,27 @@
// 能量跳转 // 能量跳转
JumpUrl(open, title, finish) { JumpUrl(open, title, finish) {
if(finish) { if (finish) {
uni.showToast({ uni.showToast({
title: '您已完成此任务', title: '您已完成此任务',
icon : 'none' icon: 'none'
}) })
return return
} }
var type = open.openType; var type = open.openType;
switch(type){ switch (type) {
case 'switchTab': case 'switchTab':
this.$Router.pushTab({name: open.path}) this.$Router.pushTab({
name: open.path
})
break; break;
case 'web': case 'web':
window.location.href = open.path window.location.href = open.path
break; break;
case 'navigateTo': case 'navigateTo':
this.$Router.push({name: open.path}) this.$Router.push({
name: open.path
})
break; break;
} }
} }
@@ -190,12 +210,13 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
position: fixed; position: fixed;
background-color: rgba(0,0,0,.7); background-color: rgba(0, 0, 0, .7);
z-index: 98; z-index: 98;
left: 0; left: 0;
top: 0; top: 0;
animation: cssAnimation 0s ease-in 4s forwards; animation: cssAnimation 0s ease-in 4s forwards;
} }
.signPop { .signPop {
width: 60%; width: 60%;
position: fixed; position: fixed;
@@ -204,23 +225,28 @@
top: 30%; top: 30%;
height: 160px; height: 160px;
animation: cssAnimation 0s ease-in 4s forwards; animation: cssAnimation 0s ease-in 4s forwards;
.signPop-tips, .signPop-tips,
.signPop-cont{ .signPop-cont {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
width: 100%; width: 100%;
} }
.signPop-cont { .signPop-cont {
color: #FFFFFF; color: #FFFFFF;
text-align: center; text-align: center;
padding-top: 90px; padding-top: 90px;
.signPop-cont-name { .signPop-cont-name {
font-size: 34rpx; font-size: 34rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.signPop-cont-text { .signPop-cont-text {
text-align: center; text-align: center;
.signPop-cont-number { .signPop-cont-number {
display: inline-block; display: inline-block;
color: #ffee4d; color: #ffee4d;
@@ -247,37 +273,44 @@
background: #7c52fc; background: #7c52fc;
color: #FFFFFF; color: #FFFFFF;
padding-bottom: 80rpx; padding-bottom: 80rpx;
.content-title { .content-title {
margin-top: 30rpx;
font-size: 40rpx; font-size: 40rpx;
padding: ($padding/2) 45rpx 0; padding: ($padding/2) 45rpx 0;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
font-weight: bold; font-weight: bold;
.content-title-img { .content-title-img {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
margin: 12rpx 20rpx; margin: 12rpx 20rpx;
} }
} }
.content-sumite{
.content-sumite {
padding: 0 45rpx 50rpx 45rpx; padding: 0 45rpx 50rpx 45rpx;
font-size: $title-size-sm; font-size: $title-size-sm;
color: rgba($color: white, $alpha: .6); color: rgba($color: white, $alpha: .6);
} }
.sign { .sign {
margin: 0 0 30rpx; margin: 0 0 30rpx;
padding: 0 30rpx; padding: 0 30rpx;
box-sizing: border-box; box-sizing: border-box;
.sign-list { .sign-list {
width: calc(14.28% - 20rpx); width: calc(14.28% - 20rpx);
position: relative; position: relative;
margin: 0 10rpx; margin: 0 10rpx;
display: inline-block; display: inline-block;
text-align: center; text-align: center;
background-color: rgba(0,0,0,.3); background-color: rgba(0, 0, 0, .3);
border-radius: 10rpx; border-radius: 10rpx;
padding: 20rpx 0; padding: 20rpx 0;
box-sizing: border-box; box-sizing: border-box;
.sign-tips { .sign-tips {
position: absolute; position: absolute;
top: -20rpx; top: -20rpx;
@@ -290,9 +323,11 @@
width: 60rpx; width: 60rpx;
text-align: center; text-align: center;
border-radius: 6rpx; border-radius: 6rpx;
.sign-tips-text { .sign-tips-text {
transform: scale(0.85); transform: scale(0.85);
} }
&::after { &::after {
position: absolute; position: absolute;
content: ''; content: '';
@@ -305,21 +340,26 @@
border-top: 8rpx solid #ef4034; border-top: 8rpx solid #ef4034;
} }
} }
.sign-list-img { .sign-list-img {
width: 38rpx; width: 38rpx;
height: 38rpx; height: 38rpx;
margin-bottom: 5rpx; margin-bottom: 5rpx;
} }
.sign-list-day { .sign-list-day {
font-size: 24rpx; font-size: 24rpx;
} }
&.active { &.active {
background-color: #ffdb00; // background-color: #ffdb00;
background-image: linear-gradient(to right, #ffff7f, #ffdb00, #ffff7f);
color: #413e30; color: #413e30;
box-shadow: 0 0 20rpx rgba(76,43,177,.3); box-shadow: 0 0 20rpx 10rpx rgba(0, 0, 0, .2);
} }
} }
} }
.sign-record { .sign-record {
opacity: .8; opacity: .8;
padding: 0 40rpx; padding: 0 40rpx;
@@ -337,15 +377,21 @@
width: 100%; width: 100%;
text-align: center; text-align: center;
margin-top: -50rpx; margin-top: -50rpx;
.signBtn-go { .signBtn-go {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
line-height: 100rpx; line-height: 100rpx;
border-radius: 80rpx; border-radius: 80rpx;
background-color: #f9dc4a; // background-color: #f9dc4a;
background-image: linear-gradient(to right, #ffff7f, #f9dc4a, #ffff7f);
box-shadow: 0 0 20rpx 10rpx rgba(0, 0, 0, .2);
color: #333333; color: #333333;
font-size: 32rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
.u-icon{
margin-right: 20rpx;
}
.signBtn-go-icon { .signBtn-go-icon {
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
@@ -355,11 +401,12 @@
} }
// 水晶任务 // 水晶任务
.task{ .task {
margin-top: -50rpx; margin-top: -50rpx;
padding: 110rpx 30rpx 0; padding: 110rpx 30rpx 0;
box-sizing: border-box; box-sizing: border-box;
background: white; background: white;
.task-liest { .task-liest {
font-weight: bold; font-weight: bold;
font-size: 34rpx; font-size: 34rpx;
@@ -370,9 +417,11 @@
position: relative; position: relative;
border-bottom: solid 2rpx #F5F5F5; border-bottom: solid 2rpx #F5F5F5;
padding: 30rpx 200rpx 40rpx 90rpx; padding: 30rpx 200rpx 40rpx 90rpx;
&:last-child { &:last-child {
border: none; border: none;
} }
.task-icon { .task-icon {
position: absolute; position: absolute;
top: 50rpx; top: 50rpx;
@@ -380,21 +429,25 @@
width: 58rpx; width: 58rpx;
height: 58rpx height: 58rpx
} }
.task-title { .task-title {
font-size: 32rpx; font-size: 32rpx;
color: #333; color: #333;
line-height: 50rpx; line-height: 50rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.task-subtitle { .task-subtitle {
color: #999; color: #999;
font-size: 26rpx; font-size: 26rpx;
line-height: 30rpx; line-height: 30rpx;
text{
text {
font-size: $title-size-sm - 6; font-size: $title-size-sm - 6;
margin-left: $margin/2; margin-left: $margin/2;
} }
} }
.task-label { .task-label {
position: absolute; position: absolute;
right: 0; right: 0;
@@ -405,9 +458,11 @@
display: -webkit-box; display: -webkit-box;
display: -webkit-flex; display: -webkit-flex;
display: flex; display: flex;
&.active { &.active {
color: $text-gray-m; color: $text-gray-m;
} }
.task-label-icon { .task-label-icon {
width: 34rpx; width: 34rpx;
height: 34rpx; height: 34rpx;

View File

@@ -57,7 +57,7 @@
</view> </view>
</view> </view>
<!-- 关于我们 --> <!-- 关于我们 -->
<view @click="$router.push({name:'aboutUs'})" class="list-item"> <view @click="$Router.push({name:'aboutUs'})" class="list-item">
<view class="list-item-left"> <view class="list-item-left">
<image src="/static/imgs/mine-about.png" mode="widthFix" /> <image src="/static/imgs/mine-about.png" mode="widthFix" />
<span>关于链商星球</span> <span>关于链商星球</span>

View File

@@ -7,7 +7,8 @@
<view class="customerCont-text"> <view class="customerCont-text">
扫描上方微信二维码添加您的专属VIP客服 扫描上方微信二维码添加您的专属VIP客服
</view> </view>
<image class="customerClose" src="/static/user/user-customer-close.png" mode="aspectFill" @click="custEject"></image> <image class="customerClose" src="/static/user/user-customer-close.png" mode="aspectFill"
@click="custEject"></image>
</view> </view>
<!-- 专属客服弹出 end --> <!-- 专属客服弹出 end -->
<!-- 消息列表弹出 start --> <!-- 消息列表弹出 start -->
@@ -22,7 +23,8 @@
<view class="newCont-btn" v-if="!newnextShow" @click="newNext()"> <view class="newCont-btn" v-if="!newnextShow" @click="newNext()">
下一条 下一条
</view> </view>
<image class="newCont-close" src="/static/user/order-cancelPay.png" mode="aspectFill" @click="newEject()"></image> <image class="newCont-close" src="/static/user/order-cancelPay.png" mode="aspectFill" @click="newEject()">
</image>
</view> </view>
<!-- 消息列表弹出 end --> <!-- 消息列表弹出 end -->
<!-- ios安全区 --> <!-- ios安全区 -->
@@ -31,18 +33,23 @@
<view class="header"> <view class="header">
<!-- 工具 --> <!-- 工具 -->
<view class="user-tool"> <view class="user-tool">
<image class="user-tool-icon" src="/static/user/user-top-00.png" mode="aspectFill" @click="$Router.push({name: 'setting'})"></image> <image class="user-tool-icon" src="/static/user/user-top-00.png" mode="aspectFill"
<image class="user-tool-icon" src="/static/user/user-top-01.png" mode="aspectFill" @click="$Router.push({name: 'news'})"></image> @click="$Router.push({name: 'setting'})"></image>
<image class="user-tool-icon" src="/static/user/user-top-01.png" mode="aspectFill"
@click="$Router.push({name: 'news'})"></image>
</view> </view>
<!-- 用户信息 --> <!-- 用户信息 -->
<view class="user-info"> <view class="user-info">
<view class="user-portrait"> <view class="user-portrait">
<image class="user-portrait-head" :src="userData.avatar ? userData.avatar : '/static/user/user-portrait.png'" mode="aspectFill"></image> <image class="user-portrait-head"
:src="userData.avatar ? userData.avatar : '/static/user/user-portrait.png'" mode="aspectFill">
</image>
</view> </view>
<view class="user-head"> <view class="user-head">
<view class="user-name"> <view class="user-name">
{{userData.nickname}} {{userData.nickname}}
<image v-if="userData.identity" class="user-name-identity" :src="userData.identity.cover"></image> <image v-if="userData.identity" class="user-name-identity" :src="userData.identity.cover">
</image>
</view> </view>
<view class="user-status"> <view class="user-status">
邀请码{{userData.invite}} 邀请码{{userData.invite}}
@@ -58,8 +65,10 @@
<view class="userVip-top-name" v-if="userIdentity.right"> <view class="userVip-top-name" v-if="userIdentity.right">
{{ userData.identity.id == 1 ? '开通' + userIdentity.right.name : '到期时间' + userIdentity.times.ended_at}} {{ userData.identity.id == 1 ? '开通' + userIdentity.right.name : '到期时间' + userIdentity.times.ended_at}}
</view> </view>
<view class="userVip-top-btn" v-if="userData.identity.id != 5" @click="openVip(userIdentity.right.identity_id)"> <view class="userVip-top-btn" v-if="userData.identity.id != 5"
{{ userData.identity.id == 1 ? '去开通' : '去升级'}}<image class="userVip-top-arrow" src="/static/user/userVip_arrow.png"></image> @click="openVip(userIdentity.right.identity_id)">
{{ userData.identity.id == 1 ? '去开通' : '去升级'}}
<image class="userVip-top-arrow" src="/static/user/userVip_arrow.png"></image>
</view> </view>
<view class="userVip-top-btn" v-else> <view class="userVip-top-btn" v-else>
已达成满级 已达成满级
@@ -69,10 +78,15 @@
<view class="userVip-rights"> <view class="userVip-rights">
<view class="userVip-rightst-title"> <view class="userVip-rightst-title">
<view class="userVip-rightst-title-name">查看会员专属权益</view> <view class="userVip-rightst-title-name">查看会员专属权益</view>
<view class="userVip-rightst-more" @click="$Router.push({name: 'vipIndex', params:{identity_id: userIdentity.right.identity_id}})">全部更多 <image class="userVip-rightst-more-img" src="/static/user/userVip_more_arrow.png"></image></view> <view class="userVip-rightst-more"
@click="$Router.push({name: 'vipIndex', params:{identity_id: userIdentity.right.identity_id}})">
全部更多 <image class="userVip-rightst-more-img" src="/static/user/userVip_more_arrow.png">
</image>
</view>
</view> </view>
<view class="userVip-rightst-list" v-if="userIdentity.right"> <view class="userVip-rightst-list" v-if="userIdentity.right">
<view v-for="(item, index) in userIdentity.right.rights" :key="index" class="userVip-rightst-label"> <view v-for="(item, index) in userIdentity.right.rights" :key="index"
class="userVip-rightst-label">
<block v-if="index <= 3"> <block v-if="index <= 3">
<image class="userVip-rightst-img" :src="item.cover"></image> <image class="userVip-rightst-img" :src="item.cover"></image>
<view class="nowrap userVip-rightst-name">{{item.name}}</view> <view class="nowrap userVip-rightst-name">{{item.name}}</view>
@@ -92,7 +106,8 @@
<view class="userNew"> <view class="userNew">
<image class="userNew-icon" src="/static/user/userNew_icon.png"></image> <image class="userNew-icon" src="/static/user/userNew_icon.png"></image>
<swiper class="userNew-banner" disable-touch circular autoplay interval="3000" vertical> <swiper class="userNew-banner" disable-touch circular autoplay interval="3000" vertical>
<swiper-item class="ellipsis" v-for="(item, index) in newList" :key="index" @click="newEject(index)"> <swiper-item class="ellipsis" v-for="(item, index) in newList" :key="index"
@click="newEject(index)">
{{item.title}} {{item.title}}
</swiper-item> </swiper-item>
</swiper> </swiper>
@@ -113,11 +128,24 @@
</view> </view>
<view class="assets-list" v-if="userData.account"> <view class="assets-list" v-if="userData.account">
<view class="assets-label" @click="$Router.push({name:'walletProperty'})"> <view class="assets-label" @click="$Router.push({name:'walletProperty'})">
<view class="assets-label-name">能量球钱包<image @click.stop="showHelp('wallet')" class="assets-label-icon" src="/static/user/userAssets_tips.png"></image></view> <view class="assets-label-name">能量球钱包
<image @click.stop="showHelp('wallet')" class="assets-label-icon"
src="/static/user/userAssets_tips.png" />
</view>
<view class="assets-label-number">{{userData.account.stone || 0}}</view>
</view>
<view class="assets-label" @click="$Router.push({name:'walletRedProperty'})">
<view class="assets-label-name">现金红包
<image @click.stop="showHelp('wallet')" class="assets-label-icon"
src="/static/user/userAssets_tips.png" />
</view>
<view class="assets-label-number">{{userData.account.stone || 0}}</view> <view class="assets-label-number">{{userData.account.stone || 0}}</view>
</view> </view>
<view class="assets-label" @click="$Router.push({name:'Fragment'})"> <view class="assets-label" @click="$Router.push({name:'Fragment'})">
<view class="assets-label-name">能量碎片<image @click.stop="showHelp('chip')" class="assets-label-icon" src="/static/user/userAssets_tips.png"></image></view> <view class="assets-label-name">能量碎片
<image @click.stop="showHelp('chip')" class="assets-label-icon"
src="/static/user/userAssets_tips.png" />
</view>
<view class="assets-label-number">{{userData.account.score || 0}}</view> <view class="assets-label-number">{{userData.account.score || 0}}</view>
</view> </view>
</view> </view>
@@ -208,29 +236,33 @@
</template> </template>
<script> <script>
import { userIndex, userNotice, userCustomer } from '@/apis/interfaces/user' import {
import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy' userIndex,
export default { userNotice,
userCustomer
} from '@/apis/interfaces/user'
import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy'
export default {
data() { data() {
return { return {
loding : true, // 加载 loding: true, // 加载
userData : '', // 用户信息 userData: '', // 用户信息
userIdentity : '', // 用户身份 userIdentity: '', // 用户身份
helpDoc : '', // 资产说明 helpDoc: '', // 资产说明
classStyle : false, // 下拉vip时改变样式 classStyle: false, // 下拉vip时改变样式
animatedShow : false, // vip上下跳动效果 animatedShow: false, // vip上下跳动效果
newList : [], newList: [],
newState : false, // 消息 显示状态 newState: false, // 消息 显示状态
newnextShow : false, // 消息 下一条按钮状态 newnextShow: false, // 消息 下一条按钮状态
newPopIndex : '', // 消息列表选择index newPopIndex: '', // 消息列表选择index
customer : { customer: {
customerShow: false, // 专属客服弹出 customerShow: false, // 专属客服弹出
customerCode: '', // 专属客服二维码 customerCode: '', // 专属客服二维码
}, },
shoeCardType : false shoeCardType: false
} }
}, },
onShow(){ onShow() {
// 添加vip模块跳动样式 // 添加vip模块跳动样式
this.animatedShow = true this.animatedShow = true
@@ -247,19 +279,19 @@ export default {
// 移除vip模块跳动样式 // 移除vip模块跳动样式
this.animatedShow = false this.animatedShow = false
}, },
onPageScroll(e){ onPageScroll(e) {
if(e.scrollTop <= 0 && !this.shoeCardType){ if (e.scrollTop <= 0 && !this.shoeCardType) {
this.shoeCardType = true this.shoeCardType = true
return return
} }
if(e.scrollTop >= 1 && this.shoeCardType){ if (e.scrollTop >= 1 && this.shoeCardType) {
this.shoeCardType = false this.shoeCardType = false
} }
}, },
methods: { methods: {
// 开通VIP // 开通VIP
openVip(identityId){ openVip(identityId) {
if(!this.userData.certification){ if (!this.userData.certification) {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '为了保障您的用户权益,未个人认证无法开通节点', content: '为了保障您的用户权益,未个人认证无法开通节点',
@@ -268,19 +300,26 @@ export default {
confirmColor: '#8b64fd', confirmColor: '#8b64fd',
confirmText: '去认证', confirmText: '去认证',
success: res => { success: res => {
if(res.confirm){ if (res.confirm) {
this.$Router.push({name: 'Personal'}) this.$Router.push({
name: 'Personal'
})
} }
} }
}) })
return return
} }
this.$Router.push({name: 'vipIndex', params:{identity_id: identityId}}) this.$Router.push({
name: 'vipIndex',
params: {
identity_id: identityId
}
})
}, },
// 用户信息 // 用户信息
userInfo() { userInfo() {
// 读取配置信息 // 读取配置信息
userIndex().then(res=>{ userIndex().then(res => {
res.account = { res.account = {
stone: res.stone, stone: res.stone,
stone_value: res.stone_value, stone_value: res.stone_value,
@@ -290,32 +329,32 @@ export default {
this.helpDoc = res.help_doc this.helpDoc = res.help_doc
this.userIdentity = res.identityShow this.userIdentity = res.identityShow
this.loding = false this.loding = false
}).catch(err =>{ }).catch(err => {
uni.showToast({ uni.showToast({
title: err.message, title: err.message,
icon : 'none' icon: 'none'
}) })
}) })
}, },
// 公告列表 // 公告列表
newInfo() { newInfo() {
userNotice().then(res=>{ userNotice().then(res => {
this.newList = res this.newList = res
}).catch(err =>{ }).catch(err => {
uni.showToast({ uni.showToast({
title: err.message, title: err.message,
icon : 'none' icon: 'none'
}) })
}) })
}, },
// 专属客服二维码 // 专属客服二维码
customerInfo() { customerInfo() {
userCustomer().then(res=>{ userCustomer().then(res => {
this.customer.customerCode = res.code this.customer.customerCode = res.code
}).catch(err =>{ }).catch(err => {
uni.showToast({ uni.showToast({
title: err.message, title: err.message,
icon : 'none' icon: 'none'
}) })
}) })
}, },
@@ -331,7 +370,7 @@ export default {
success() { success() {
uni.showToast({ uni.showToast({
title: '邀请码已复制', title: '邀请码已复制',
icon : 'none' icon: 'none'
}) })
} }
}) })
@@ -352,8 +391,8 @@ export default {
showHelp(type) { showHelp(type) {
let title = '能量球', let title = '能量球',
content = this.helpDoc.energy_ball.description content = this.helpDoc.energy_ball.description
if(type == 'chip') title = '能量碎片' if (type == 'chip') title = '能量碎片'
if(type == 'chip') content = this.helpDoc.energy_shard.description if (type == 'chip') content = this.helpDoc.energy_shard.description
uni.showModal({ uni.showModal({
title: title, title: title,
confirmColor: '#8b64fd', confirmColor: '#8b64fd',
@@ -365,7 +404,7 @@ export default {
newEject(index) { newEject(index) {
this.newPopIndex = index this.newPopIndex = index
this.newState = !this.newState this.newState = !this.newState
if(index === this.newList.length - 1) { if (index === this.newList.length - 1) {
this.newnextShow = true this.newnextShow = true
} else { } else {
this.newnextShow = false this.newnextShow = false
@@ -375,20 +414,21 @@ export default {
// 消息列表 -下一条 // 消息列表 -下一条
newNext() { newNext() {
this.newPopIndex = this.newPopIndex + 1 this.newPopIndex = this.newPopIndex + 1
if(this.newPopIndex === this.newList.length - 1) { if (this.newPopIndex === this.newList.length - 1) {
this.newnextShow = true this.newnextShow = true
} else { } else {
this.newnextShow = false this.newnextShow = false
} }
} }
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.content-scroll{ .content-scroll {
height: calc(100vh - 60px); height: calc(100vh - 60px);
} }
// 专属客服 // 专属客服
.customerBack { .customerBack {
position: fixed; position: fixed;
@@ -399,6 +439,7 @@ export default {
z-index: 1001; z-index: 1001;
background: rgba($color: #000000, $alpha: .5); background: rgba($color: #000000, $alpha: .5);
} }
.customerCont { .customerCont {
position: fixed; position: fixed;
padding: $padding 0; padding: $padding 0;
@@ -412,18 +453,22 @@ export default {
font-size: $uni-font-size-sm; font-size: $uni-font-size-sm;
text-align: center; text-align: center;
color: $text-gray; color: $text-gray;
&.active { &.active {
opacity: 0; opacity: 0;
} }
.customerCont-code { .customerCont-code {
margin: $margin 0 $margin; margin: $margin 0 $margin;
width: 300rpx; width: 300rpx;
height: 300rpx; height: 300rpx;
} }
.customerCont-text { .customerCont-text {
width: 80%; width: 80%;
margin: 0 auto; margin: 0 auto;
} }
.customerClose { .customerClose {
width: $uni-img-size-base; width: $uni-img-size-base;
height: $uni-img-size-base; height: $uni-img-size-base;
@@ -434,9 +479,10 @@ export default {
} }
} }
.btns{ .btns {
padding: 30rpx 0; padding: 30rpx 0;
.item{
.item {
background: white; background: white;
margin: $margin; margin: $margin;
border-radius: $radius/2; border-radius: $radius/2;
@@ -468,6 +514,7 @@ export default {
font-size: $uni-font-size-sm; font-size: $uni-font-size-sm;
text-align: center; text-align: center;
color: $text-gray; color: $text-gray;
.newCont-title { .newCont-title {
padding: 25rpx 40rpx; padding: 25rpx 40rpx;
border-bottom: 1rpx solid #eaeaea; border-bottom: 1rpx solid #eaeaea;
@@ -475,11 +522,13 @@ export default {
font-size: 30rpx; font-size: 30rpx;
font-weight: 600; font-weight: 600;
text-align: center; text-align: center;
.newCont-title-text { .newCont-title-text {
padding: 0 50rpx; padding: 0 50rpx;
box-sizing: border-box; box-sizing: border-box;
} }
} }
.newCont-text { .newCont-text {
padding: 20rpx 40rpx 40rpx; padding: 20rpx 40rpx 40rpx;
box-sizing: border-box; box-sizing: border-box;
@@ -489,12 +538,14 @@ export default {
overflow: hidden; overflow: hidden;
overflow-y: scroll; overflow-y: scroll;
} }
.newCont-btn { .newCont-btn {
color: #7e54fe; color: #7e54fe;
font-size: 30rpx; font-size: 30rpx;
line-height: 90rpx; line-height: 90rpx;
border-top: 2rpx solid #eaeaea; border-top: 2rpx solid #eaeaea;
} }
.newCont-close { .newCont-close {
position: absolute; position: absolute;
top: 28rpx; top: 28rpx;
@@ -503,23 +554,27 @@ export default {
height: 32rpx; height: 32rpx;
} }
} }
// 会员卡 // 会员卡
.userVip { .userVip {
background-image:linear-gradient(to right, #4721bd, #885efe, #5d39b9); background-image: linear-gradient(to right, #4721bd, #885efe, #5d39b9);
margin: 20px 40rpx 0; margin: 20px 40rpx 0;
border-radius: 30rpx 30rpx 0 0; border-radius: 30rpx 30rpx 0 0;
border: 3rpx solid #b197ff; border: 3rpx solid #b197ff;
color: #f6e9fa; color: #f6e9fa;
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 40rpx; padding-bottom: 40rpx;
.userVip-top { .userVip-top {
display: flex; display: flex;
padding: 15px 30rpx; padding: 15px 30rpx;
.userVip-top-name { .userVip-top-name {
font-size: 30rpx; font-size: 30rpx;
flex: 1; flex: 1;
line-height: 24px; line-height: 24px;
} }
.userVip-top-btn { .userVip-top-btn {
font-size: 26rpx; font-size: 26rpx;
background-color: #977ae8; background-color: #977ae8;
@@ -528,6 +583,7 @@ export default {
height: 24px; height: 24px;
line-height: 24px; line-height: 24px;
display: flex; display: flex;
.userVip-top-arrow { .userVip-top-arrow {
width: 20rpx; width: 20rpx;
height: 20rpx; height: 20rpx;
@@ -535,52 +591,63 @@ export default {
} }
} }
} }
.userVip-tips { .userVip-tips {
margin-top: 40rpx; margin-top: 40rpx;
font-size: 28rpx; font-size: 28rpx;
.userVip-tips-title { .userVip-tips-title {
margin-bottom: 20rpx; margin-bottom: 20rpx;
font-weight: 600; font-weight: 600;
} }
.userVip-tips-text { .userVip-tips-text {
line-height: 48rpx; line-height: 48rpx;
} }
} }
.userVip-rights { .userVip-rights {
border-radius: 10rpx; border-radius: 10rpx;
margin: 0 30rpx; margin: 0 30rpx;
padding: 20rpx; padding: 20rpx;
box-sizing: border-box; box-sizing: border-box;
background-image:linear-gradient(to bottom, #dbceff, #bb9fff); background-image: linear-gradient(to bottom, #dbceff, #bb9fff);
color: #5723af; color: #5723af;
.userVip-rightst-title { .userVip-rightst-title {
padding: 0 20rpx; padding: 0 20rpx;
box-sizing: border-box; box-sizing: border-box;
font-size: 30rpx; font-size: 30rpx;
display: flex; display: flex;
line-height: 40rpx; line-height: 40rpx;
.userVip-rightst-title-name { .userVip-rightst-title-name {
font-weight: 600; font-weight: 600;
flex: 1; flex: 1;
} }
.userVip-rightst-more { .userVip-rightst-more {
font-size: 28rpx; font-size: 28rpx;
display: flex; display: flex;
.userVip-rightst-more-img { .userVip-rightst-more-img {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
} }
} }
} }
.userVip-rightst-list { .userVip-rightst-list {
margin-top: 30rpx; margin-top: 30rpx;
display: flex; display: flex;
.userVip-rightst-label { .userVip-rightst-label {
display: inline-block; display: inline-block;
width: 25%; width: 25%;
text-align: center; text-align: center;
font-size: 26rpx; font-size: 26rpx;
line-height: 40rpx; line-height: 40rpx;
.userVip-rightst-img { .userVip-rightst-img {
width: 90rpx; width: 90rpx;
height: 90rpx; height: 90rpx;
@@ -591,6 +658,7 @@ export default {
} }
} }
} }
// 会员信息 // 会员信息
.header { .header {
position: fixed; position: fixed;
@@ -598,11 +666,13 @@ export default {
left: 0; left: 0;
width: 100%; width: 100%;
background-image: linear-gradient(to right, #7c52fc, #976dff); background-image: linear-gradient(to right, #7c52fc, #976dff);
// user工具 // user工具
.user-tool { .user-tool {
text-align: right; text-align: right;
line-height: 40px; line-height: 40px;
@extend .ios-top; @extend .ios-top;
.user-tool-name { .user-tool-name {
flex: 1; flex: 1;
line-height: 40px; line-height: 40px;
@@ -610,6 +680,7 @@ export default {
color: #fff; color: #fff;
font-size: 28rpx; font-size: 28rpx;
} }
.user-tool-icon { .user-tool-icon {
padding-right: $padding; padding-right: $padding;
margin-top: 10px; margin-top: 10px;
@@ -618,6 +689,7 @@ export default {
vertical-align: top; vertical-align: top;
} }
} }
// 用户信息 // 用户信息
.user-info { .user-info {
position: relative; position: relative;
@@ -627,11 +699,13 @@ export default {
padding-left: $padding; padding-left: $padding;
padding-right: $padding; padding-right: $padding;
color: $uni-text-color-inverse; color: $uni-text-color-inverse;
.user-portrait { .user-portrait {
width: 70px; width: 70px;
height: 70px; height: 70px;
border-radius: $uni-border-radius-circle; border-radius: $uni-border-radius-circle;
position: relative; position: relative;
.user-portrait-head { .user-portrait-head {
border-radius: $uni-border-radius-circle; border-radius: $uni-border-radius-circle;
border: 4rpx solid #bfaaff; border: 4rpx solid #bfaaff;
@@ -641,12 +715,14 @@ export default {
width: calc(100% - 12px); width: calc(100% - 12px);
height: calc(100% - 12px); height: calc(100% - 12px);
} }
.user-portrait-tips { .user-portrait-tips {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 1; z-index: 1;
} }
.user-portrait-name { .user-portrait-name {
position: absolute; position: absolute;
z-index: 2; z-index: 2;
@@ -654,7 +730,7 @@ export default {
left: 50%; left: 50%;
bottom: -10px; bottom: -10px;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
background:linear-gradient(to right, #211d1e,#4b403c); background: linear-gradient(to right, #211d1e, #4b403c);
color: $uni-text-color-inverse; color: $uni-text-color-inverse;
font-size: $uni-font-size-sm; font-size: $uni-font-size-sm;
border-radius: $radius; border-radius: $radius;
@@ -662,16 +738,18 @@ export default {
line-height: 15px; line-height: 15px;
width: 64rpx; width: 64rpx;
text-align: center; text-align: center;
text { text {
display: block; display: block;
transform:scale(.8); transform: scale(.8);
font-weight: 700; font-weight: 700;
background-image:linear-gradient(to bottom,#dfd6cf,#f7ceba); background-image: linear-gradient(to bottom, #dfd6cf, #f7ceba);
-webkit-background-clip:text; -webkit-background-clip: text;
-webkit-text-fill-color:transparent; -webkit-text-fill-color: transparent;
} }
} }
} }
.user-head { .user-head {
position: absolute; position: absolute;
left: 0; left: 0;
@@ -680,10 +758,12 @@ export default {
height: 100%; height: 100%;
padding: 0 0 0 calc(#{$uni-img-size-lg + 20} + 35px); padding: 0 0 0 calc(#{$uni-img-size-lg + 20} + 35px);
box-sizing: border-box; box-sizing: border-box;
.user-name { .user-name {
display: flex; display: flex;
margin: 15px 0 2.5px; margin: 15px 0 2.5px;
font-size: 36rpx; font-size: 36rpx;
.user-name-identity { .user-name-identity {
vertical-align: top; vertical-align: top;
width: 90rpx; width: 90rpx;
@@ -691,23 +771,26 @@ export default {
margin: 5px 0 0 5px; margin: 5px 0 0 5px;
} }
} }
.user-status { .user-status {
opacity: .7; opacity: .7;
font-size: $title-size-sm; font-size: $title-size-sm;
display: flex; display: flex;
line-height: 23px; line-height: 23px;
.user-status-copy { .user-status-copy {
font-size: $title-size !important; font-size: $title-size !important;
border: 1rpx solid #FFFFFF; border: 1rpx solid #FFFFFF;
border-radius: $radius * 3; border-radius: $radius * 3;
line-height: 22px; line-height: 22px;
height: 23px; height: 23px;
transform:scale(.6); transform: scale(.6);
padding: 0 $padding + 5; padding: 0 $padding + 5;
} }
} }
} }
} }
// 会员卡 // 会员卡
.card { .card {
height: 100px; height: 100px;
@@ -715,6 +798,7 @@ export default {
background: #555555; background: #555555;
} }
} }
// 按钮内容 // 按钮内容
.mian { .mian {
position: relative; position: relative;
@@ -723,15 +807,18 @@ export default {
padding: 15px 30rpx 5px; padding: 15px 30rpx 5px;
background: #F5F5F5; background: #F5F5F5;
transition: margin .6s; transition: margin .6s;
&.shoeCard{
&.shoeCard {
margin-top: 320px; margin-top: 320px;
} }
// 我的资产模块 // 我的资产模块
.userAssets { .userAssets {
margin-bottom: 15px; margin-bottom: 15px;
background-color: #FFFFFF; background-color: #FFFFFF;
overflow: hidden; overflow: hidden;
border-radius: 15rpx; border-radius: 15rpx;
.userAssets-top { .userAssets-top {
background-color: #fff3dc; background-color: #fff3dc;
color: #654c2d; color: #654c2d;
@@ -740,21 +827,24 @@ export default {
box-sizing: border-box; box-sizing: border-box;
height: 94rpx; height: 94rpx;
position: relative; position: relative;
.withdraw-name { .withdraw-name {
display: flex; display: flex;
width: calc(100% - 160rpx); width: calc(100% - 160rpx);
line-height: 54rpx; line-height: 54rpx;
.withdraw-number { .withdraw-number {
font-size: 32rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
padding-left: 10rpx; padding-left: 10rpx;
} }
} }
.withdraw-btn { .withdraw-btn {
position: absolute; position: absolute;
right: 10px; right: 10px;
top: 10px; top: 10px;
background-image:linear-gradient(to right, #f9c869, #eca824); background-image: linear-gradient(to right, #f9c869, #eca824);
color: #f7eedc; color: #f7eedc;
width: 140rpx; width: 140rpx;
text-align: center; text-align: center;
@@ -763,15 +853,18 @@ export default {
font-size: 26rpx; font-size: 26rpx;
} }
} }
.userAssets-show { .userAssets-show {
padding: 30rpx; padding: 30rpx;
box-sizing: border-box; box-sizing: border-box;
.assets-title { .assets-title {
position: relative; position: relative;
padding-bottom: 30rpx; padding-bottom: 30rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
font-weight: 600; font-weight: 600;
font-size: 32rpx; font-size: 32rpx;
&::after { &::after {
position: absolute; position: absolute;
content: ''; content: '';
@@ -782,15 +875,19 @@ export default {
background-color: #f2f2f2; background-color: #f2f2f2;
} }
} }
.assets-list { .assets-list {
display: flex; display: flex;
.assets-label { .assets-label {
flex: 2; flex: 2;
text-align: center; text-align: center;
.assets-label-name { .assets-label-name {
color: #9c9c9c; color: #9c9c9c;
font-size: 28rpx; font-size: 28rpx;
position: relative; position: relative;
.assets-label-icon { .assets-label-icon {
position: absolute; position: absolute;
width: 26rpx; width: 26rpx;
@@ -798,6 +895,7 @@ export default {
margin-left: 6rpx; margin-left: 6rpx;
} }
} }
.assets-label-number { .assets-label-number {
font-size: 32rpx; font-size: 32rpx;
color: #ee4c47; color: #ee4c47;
@@ -808,6 +906,7 @@ export default {
} }
} }
} }
// 我的伙伴 // 我的伙伴
.userPartner { .userPartner {
margin-bottom: 30rpx; margin-bottom: 30rpx;
@@ -816,12 +915,14 @@ export default {
padding: 30rpx 0; padding: 30rpx 0;
box-sizing: border-box; box-sizing: border-box;
border-radius: 15rpx; border-radius: 15rpx;
.partner-title { .partner-title {
font-size: 32rpx; font-size: 32rpx;
position: relative; position: relative;
padding: 0 30rpx 30rpx; padding: 0 30rpx 30rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
font-weight: 600; font-weight: 600;
&::after { &::after {
position: absolute; position: absolute;
content: ''; content: '';
@@ -836,13 +937,16 @@ export default {
.partner-list { .partner-list {
display: flex; display: flex;
margin-top: 40rpx; margin-top: 40rpx;
.partner-label { .partner-label {
flex: 2; flex: 2;
text-align: center; text-align: center;
.partner-label-name { .partner-label-name {
color: #9c9c9c; color: #9c9c9c;
font-size: 28rpx; font-size: 28rpx;
} }
.partner-label-number { .partner-label-number {
font-size: 32rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
@@ -857,6 +961,7 @@ export default {
.partner-title { .partner-title {
margin-bottom: 0; margin-bottom: 0;
} }
.tool-list { .tool-list {
.tool-label { .tool-label {
display: inline-block; display: inline-block;
@@ -864,17 +969,20 @@ export default {
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
margin: 40rpx 0 20rpx; margin: 40rpx 0 20rpx;
.tool-label-img { .tool-label-img {
width: 44rpx; width: 44rpx;
height: 44rpx; height: 44rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.tool-label-name { .tool-label-name {
color: #5e5e5e; color: #5e5e5e;
} }
} }
} }
} }
// 消息模块 // 消息模块
.userNew { .userNew {
background-color: #FFFFFF; background-color: #FFFFFF;
@@ -885,6 +993,7 @@ export default {
padding: 0 30rpx; padding: 0 30rpx;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
.userNew-banner { .userNew-banner {
width: calc(100% - 70rpx); width: calc(100% - 70rpx);
height: 90rpx; height: 90rpx;
@@ -892,6 +1001,7 @@ export default {
font-size: 28rpx; font-size: 28rpx;
color: #5e5e5e; color: #5e5e5e;
} }
.userNew-icon { .userNew-icon {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
@@ -902,31 +1012,40 @@ export default {
} }
.animated { .animated {
animation-duration: 1s; /*动画时间*/ animation-duration: 1s;
animation-fill-mode: both; /*播放后的状态*/ /*动画时间*/
animation-name:container; /*动画的名称*/ animation-fill-mode: both;
/*播放后的状态*/
animation-name: container;
/*动画的名称*/
} }
@keyframes container{ @keyframes container {
0%, 0%,
100%, 100%,
20%, 20%,
50%, 50%,
80% { 80% {
transition-timing-function: cubic-bezier(0.215,.61,.355,1); /*贝塞尔曲线 X1 Y1 X2 Y2*/ transition-timing-function: cubic-bezier(0.215, .61, .355, 1);
transform: translate3d(0,0,0); /*设置只在Z轴上移动*/ /*贝塞尔曲线 X1 Y1 X2 Y2*/
transform: translate3d(0, 0, 0);
/*设置只在Z轴上移动*/
} }
40%, 40%,
43%{ 43% {
transition-timing-function: cubic-bezier(0.755,0.50,0.855,0.060); transition-timing-function: cubic-bezier(0.755, 0.50, 0.855, 0.060);
transform: translate3d(0,-30rpx,0); transform: translate3d(0, -30rpx, 0);
} }
70%{
transition-timing-function: cubic-bezier(0.755,0.050,0.855,0.060); 70% {
transform: translate3d(0,-15rpx,0); transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
transform: translate3d(0, -15rpx, 0);
} }
90%{
transform: translate3d(0,-4rpx,0); 90% {
transform: translate3d(0, -4rpx, 0);
} }
} }
</style> </style>

View File

@@ -5,7 +5,7 @@
<view class="examine-name"> <view class="examine-name">
提交成功,请耐心等待~ 提交成功,请耐心等待~
</view> </view>
<view class="examine-cont" @click="$Router.push({name: 'User'})"> <view class="examine-cont" @click="toUser">
我知道了 我知道了
</view> </view>
</view> </view>
@@ -13,6 +13,16 @@
</template> </template>
<script> <script>
export default {
methods:{
toUser(){
console.log('trule')
uni.switchTab({
url:'/pages/user/index'
})
}
}
}
</script> </script>
<style> <style>

View File

@@ -3,34 +3,55 @@
<!-- 上传凭证弹出 --> <!-- 上传凭证弹出 -->
<view class="canBack" v-if="canForm"></view> <view class="canBack" v-if="canForm"></view>
<view class="canPop" v-if="canForm"> <view class="canPop" v-if="canForm">
<block v-if="voucher">
<image class="canPop-tips" @click="canClick" src="/static/user/order-cancelPay.png" mode="widthFix"></image>
<view class="canPop-cont">打款凭证</view>
<image class="canPop-cover" v-if="voucher.status.value === 3" :src="canFromImg.showpath || require('@/static/icons/add-icon.png')" @click="updImg()" mode="aspectFill" />
<image class="canPop-cover" v-else :src="canFromImg.showpath || require('@/static/icons/add-icon.png')" @click="preImg()" mode="aspectFill" />
<view class="canPop-status">状态{{voucher.status.text}}</view>
<view class="canPop-remark" v-if="voucher.remark && voucher.status.value === 3">驳回原因{{voucher.remark}}</view>
<view class="canPop-btn" v-if="voucher.status.value === 3" @click="canSubmitEdit(voucher.voucher_id)">重新提交</view>
</block>
<block v-else>
<image class="canPop-tips" @click="canClick" src="/static/user/order-cancelPay.png" mode="widthFix"></image> <image class="canPop-tips" @click="canClick" src="/static/user/order-cancelPay.png" mode="widthFix"></image>
<view class="canPop-cont">上传打款凭证</view> <view class="canPop-cont">上传打款凭证</view>
<image class="canPop-cover" :src="canFromImg.showpath || require('@/static/icons/add-icon.png')" @click="updImg()" mode="aspectFill"></image> <image class="canPop-cover" :src="canFromImg.showpath || require('@/static/icons/add-icon.png')"
@click="updImg()" mode="aspectFill"></image>
<view class="canPop-btn" @click="canSubmit">提交</view> <view class="canPop-btn" @click="canSubmit">提交</view>
</block>
</view> </view>
<swiper class="vip-container" previous-margin="55rpx" next-margin="55rpx" :current="tabsIndex" circular @change="swiperChange"> <swiper class="vip-container" previous-margin="55rpx" next-margin="55rpx" :current="tabsIndex" circular
@change="swiperChange">
<swiper-item class="swiper-item" v-for="(item, index) in identitie" :key="index"> <swiper-item class="swiper-item" v-for="(item, index) in identitie" :key="index">
<view class="vip-item" :class="tabsIndex == index ? 'color-item-img' : ''"> <view class="vip-item" :class="tabsIndex == index ? 'color-item-img' : ''">
<image class="vip-back" :src="item.card_cover" mode="scaleToFill"></image> <image class="vip-back" :src="item.card_cover" mode="scaleToFill"></image>
<view class="vip-cont"> <view class="vip-cont">
<view class="vip-name"> <view class="vip-name">
{{ item.name }} {{ item.name }}
<image class="vip-name-img" @click="showRemark(item.name, item.node_definition)" src="../../static/user/vip_privilege_03.png" mode="widthFix"></image> <image class="vip-name-img" @click="showRemark(item.name, item.node_definition)"
src="../../static/user/vip_privilege_03.png" mode="widthFix"></image>
</view> </view>
<view class="vip-number" v-if="item.count">{{ item.count.stock > 0 ? '剩余名额:' + item.count.residue : '不限名数' }}</view> <view class="vip-number" v-if="item.count">
{{ item.count.stock > 0 ? '剩余名额:' + item.count.residue : '不限名数' }}</view>
<view class="currentInfo" v-if="currentInfo.identity.identity_id === item.identity_id">当前身份</view>
<view class="vip-tips"> <view class="vip-tips">
<!-- 会员 --> <!-- 会员 -->
<view v-if="item.identity_id == 2" class="vip-tips-text vip-tips-color-01">{{ item.title }}</view> <view v-if="item.identity_id == 2" class="vip-tips-text vip-tips-color-01">{{ item.title }}
</view>
<!-- VIP节点 --> <!-- VIP节点 -->
<view v-else-if="item.identity_id == 3" class="vip-tips-text vip-tips-color-02">{{ item.title }}</view> <view v-else-if="item.identity_id == 3" class="vip-tips-text vip-tips-color-02">
{{ item.title }}</view>
<!-- 主节点 --> <!-- 主节点 -->
<view v-else-if="item.identity_id == 4" class="vip-tips-text vip-tips-color-03">{{ item.title }}</view> <view v-else-if="item.identity_id == 4" class="vip-tips-text vip-tips-color-03">
{{ item.title }}</view>
<!-- 超级节点 --> <!-- 超级节点 -->
<view v-else-if="item.identity_id == 5" class="vip-tips-text vip-tips-color-04">{{ item.title }}</view> <view v-else-if="item.identity_id == 5" class="vip-tips-text vip-tips-color-04">
{{ item.title }}</view>
</view> </view>
</view> </view>
</view> </view>
@@ -61,7 +82,8 @@
<view class="privilege-label" v-else>{{ openCondition.service_charge.message }}</view> <view class="privilege-label" v-else>{{ openCondition.service_charge.message }}</view>
</block> </block>
<block v-else> <block v-else>
<view class="privilege-label" :class="{ active: openCondition.price.finish }">{{ openCondition.price.message }}</view> <view class="privilege-label" v-if="openCondition.certification"
:class="{ active: openCondition.certification.finish }">{{ openCondition.certification.message }}</view>
</block> </block>
</view> </view>
</view> </view>
@@ -69,21 +91,29 @@
<image class="privilege-img" src="/static/user/vip_privilege_02.png" mode=""></image> <image class="privilege-img" src="/static/user/vip_privilege_02.png" mode=""></image>
<view class="privilege-text"> <view class="privilege-text">
<view class="privilege-name">节点权益</view> <view class="privilege-name">节点权益</view>
<view class="privilege-label privilege-right" v-for="(item, index) in identitie[tabsIndex].rights" :key="index">&{{ item.remark }}</view> <view class="privilege-label privilege-right" v-for="(item, index) in identitie[tabsIndex].rights"
:key="index">&{{ item.remark }}</view>
</view> </view>
</view> </view>
</view> </view>
<!-- 用户协议 --> <!-- 用户协议 -->
<view class="agree"><view class="agree-tips" @click="$Router.push({ name: 'vipAgree', params: { type: 'vipAgree' } })">请仔细阅读并确认服务协议</view></view> <view class="agree" v-if="identitie[tabsIndex].can.show_button">
<view class="agree-btn" @click="agreeChange"> <view class="agree-tips" @click="$Router.push({ name: 'vipAgree', params: { type: 'vipAgree' } })">
请仔细阅读并确认服务协议</view>
</view>
<view class="agree-btn" @click="agreeChange" v-if="identitie[tabsIndex].can.show_button">
<radio :checked="selected" style="transform: scale(.7);" color="#7c52fc"></radio> <radio :checked="selected" style="transform: scale(.7);" color="#7c52fc"></radio>
会员服务协议 会员服务协议
</view> </view>
<!-- 开通按钮 --> <!-- 开通按钮 -->
<view class="footer"> <view class="footer" >
<image class="footer-btn" :src="identitie[tabsIndex].button_cover" mode="widthFix" @click="openOrder"></image> <image class="footer-btn" v-if="identitie[tabsIndex].can.show_button && voucher === ''"
:src="identitie[tabsIndex].button_cover" mode="widthFix" @click="openOrder" />
<view class="current-btn-sh" v-if="identitie[tabsIndex].can.show_button && voucher !== ''" @click="openOrder" >{{voucher.status.value === 1?'申请审核中':''}}{{voucher.status.value === 3?'申请被驳回查看原因':''}}</view>
<view class="current-btn-sh" v-if="!identitie[tabsIndex].can.show_button && voucher === ''"> 当前不可开通</view>
<view class="current-btn" v-if="currentInfo.identity.identity_id === identitie[tabsIndex].identity_id">当前身份</view>
<!-- <button class="footer-btn" type="default" > <!-- <button class="footer-btn" type="default" >
<view class="footer-btn-num"> <view class="footer-btn-num">
合计{{total}} 合计{{total}}
@@ -97,10 +127,21 @@
</template> </template>
<script> <script>
import { identities, vipOrder, vipWechatPay, vipCont, vipVoucher } from '@/apis/interfaces/vip'; import {
import { wxConfig } from '@/apis/interfaces/wx'; identities,
import { uploads } from '@/apis/interfaces/uploading'; vipOrder,
export default { vipWechatPay,
vipCont,
vipVoucherUpdate,
vipVoucher
} from '@/apis/interfaces/vip';
import {
wxConfig
} from '@/apis/interfaces/wx';
import {
uploads
} from '@/apis/interfaces/uploading';
export default {
data() { data() {
return { return {
loding: true, loding: true,
@@ -119,20 +160,22 @@ export default {
showpath: '', showpath: '',
path: '' path: ''
}, },
openCondition: {} openCondition: {},
}; voucher:'', //弹窗展示得内容
}
}, },
created() { created() {
// 获取当前用户信息 // 获取当前用户信息
this.idenInfo('cre'); this.idenInfo('cre')
}, },
methods: { methods: {
// 当前用户信息 // 当前用户信息
idenInfo(type) { idenInfo(type) {
identities().then(res => { identities().then(res => {
console.log(res, 'res。。。获取身份详情')
res.identities.map(item => { res.identities.map(item => {
item.obj_condition = new Object(); item.obj_condition = new Object()
for (let val of item.get_condition) { for (let val of item.get_condition) {
item.obj_condition[val.name] = { item.obj_condition[val.name] = {
message: val.message, message: val.message,
@@ -140,29 +183,42 @@ export default {
}; };
} }
return item; return item;
}); });
this.identitie = res.identities; this.identitie = res.identities
if(type === 'cre'){ if (type === 'cre') {
this.tabsIndex = res.identities.findIndex(val => val.identity_id == this.$Route.query.identity_id) this.tabsIndex = res.identities.findIndex(val => val.identity_id == this.$Route.query.identity_id)
} }
this.openCondition = res.identities[this.tabsIndex].obj_condition; this.openCondition = res.identities[this.tabsIndex].obj_condition
this.rights = res.identities[this.tabsIndex].rights; this.rights = res.identities[this.tabsIndex].rights
this.total = res.identities[this.tabsIndex].price; this.total = res.identities[this.tabsIndex].price
this.canBtn = res.identities[this.tabsIndex].can; this.canBtn = res.identities[this.tabsIndex].can
this.loding = false; this.currentInfo = res.user
this.loding = false
this.voucher = this.identitie[this.tabsIndex].voucher || ''
if(this.voucher){
this.canFromImg = this.identitie[this.tabsIndex].voucher.cover
}else{
this.canFromImg = {
path:'',
showpath:''
}
}
console.log(this.voucher,'voucher...')
console.log(this.canFromImg,'canFromImg...')
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err.message, title: err.message,
icon: 'none' icon: 'none'
}); })
}); })
}, },
// 切换开通身份 // 切换开通身份
swiperChange(e) { swiperChange(e) {
this.tabsIndex = e.detail.current; this.tabsIndex = e.detail.current
// 获取当前用户信息 // 获取当前用户信息
this.idenInfo(); this.idenInfo()
}, },
// 开通会员 // 开通会员
@@ -177,96 +233,119 @@ export default {
return; return;
} }
if (can.on_line) { if (can.on_line) {
if (can.buy) { // #ifdef H5
this.wxPayConfig(); this.wxPayH5Config()
// #endif
//#ifdef APP-PLUS
this.wxPayAppConfig()
//#endif
} else { } else {
uni.showToast({ this.canClick()
title: can.message,
icon: 'none'
});
}
} else {
if (can.buy) {
// 上传凭证
this.canClick();
} else {
uni.showToast({
title: can.message,
icon: 'none'
});
}
} }
return; return;
}, },
// 微信支付鉴权 // 微信支付鉴权H5
wxPayConfig() { wxPayH5Config() {
console.log('微信支付') wxConfig({
// wxConfig({ url: window.location.href,
// url: window.location.href, jsApiList: ['chooseWXPay']
// jsApiList: ['chooseWXPay'] }).then(res => {
// }).then(res => { let payConfig = JSON.parse(res)
// let payConfig = JSON.parse(res); let jweixin = require('jweixin-module')
// let jweixin = require('jweixin-module'); jweixin.ready(() => {
// jweixin.ready(() => { // res
// // res })
// }); jweixin.error(err => {
// jweixin.error(err => { uni.showToast({
// uni.showToast({ title: err,
// title: err, icon: 'none'
// icon: 'none' })
// }); })
// }); jweixin.config({
// jweixin.config({ ...payConfig }); ...payConfig
// vipOrder(this.identitie[this.tabsIndex].identity_id, { })
// year: this.sumNumber vipOrder(this.identitie[this.tabsIndex].identity_id, {
// }).then(payId => { year: this.sumNumber
// this.wechatPay(payId.id, jweixin); }).then(payId => {
// }).catch(err => { this.wechatH5Pay(payId.id, jweixin);
// uni.showToast({ }).catch(err => {
// title: err.message, uni.showToast({
// icon: 'none' title: err.message,
// }); icon: 'none'
// }); })
// }).catch(err => { })
// uni.showToast({ }).catch(err => {
// title: err.message, uni.showToast({
// icon: 'none' title: err.message,
// }); icon: 'none'
// }); })
})
}, },
// 微信支付 // 微信支付 H5
wechatPay(id, wx) { wechatH5Pay(id, wx) {
// vipWechatPay(id, { vipWechatPay(id, {
// openid: this.$store.getters.getCode type:'mp',
// }).then(payConfig => { openid: this.$store.getters.getCode
// wx.chooseWXPay({...payConfig, }).then(payConfig => {
// success() { wx.chooseWXPay({
// uni.showModal({ ...payConfig,
// title : '提示', success() {
// content : '支付成功,恭喜您成功开通', uni.showModal({
// showCancel:false, title: '提示',
// confirmColor: '#8b64fd', content: '支付成功,恭喜您成功开通',
// success : ()=> { showCancel: false,
// this.$Router.back() confirmColor: '#8b64fd',
// } success: () => {
// }) this.$Router.back()
// }, }
// fail(err) { })
// uni.showToast({ },
// title: '支付被取消', fail(err) {
// icon : 'none' uni.showToast({
// }) title: '支付被取消',
// } icon: 'none'
// }); })
// }).catch(err => { }
// uni.showToast({ });
// title: err.message, }).catch(err => {
// icon : 'none' uni.showToast({
// }) title: err.message,
// }) icon: 'none'
})
})
}, },
// 支付创建订单APP
wxPayAppConfig(){
let data = {year:1}
let identity = this.identitie[this.tabsIndex].identity_id
vipOrder(identity,data).then(res=>{
console.log(res)
this.wechatAppPay(res.id)
}).catch(err=>{
uni.showToast({
title:err.message,
icon:"none"
})
})
},
// 微信支付 APP
wechatAppPay(orderid){
let data = {
type:'app'
}
let orderId = orderid
vipWechatPay(orderId,data).then(res=>{
console.log('-----------------')
console.log(res)
}).catch(err=>{
uni.showToast({
title:err.message,
icon:"none"
})
})
},
// 勾选协议 // 勾选协议
agreeChange() { agreeChange() {
this.selected = !this.selected; this.selected = !this.selected;
@@ -278,7 +357,7 @@ export default {
title: title, title: title,
content: val, content: val,
showCancel: false showCancel: false
}); })
}, },
// 上传打款凭证图片 // 上传打款凭证图片
@@ -286,7 +365,9 @@ export default {
uni.chooseImage({ uni.chooseImage({
count: 1, count: 1,
success: path => { success: path => {
uploads([{uri: path.tempFilePaths[0]}]).then(res => { uploads([{
uri: path.tempFilePaths[0]
}]).then(res => {
this.canFromImg = { this.canFromImg = {
showpath: res.url[0], showpath: res.url[0],
path: res.path[0] path: res.path[0]
@@ -295,10 +376,18 @@ export default {
uni.showToast({ uni.showToast({
title: err.message, title: err.message,
icon: 'none' icon: 'none'
}); })
}); })
} }
}); })
},
// 预览图片
preImg(){
console.log('袁兰图片')
uni.previewImage({
current:this.voucher.cover.showpath,
urls:[this.voucher.cover.showpath]
})
}, },
// 打款凭证弹出状态 // 打款凭证弹出状态
@@ -314,25 +403,45 @@ export default {
cover: newCover, cover: newCover,
identity_id: newId identity_id: newId
}).then(res => { }).then(res => {
this.$Router.push({ name: 'Examine' }); this.$Router.push({
name: 'Examine'
})
this.canForm = !this.canForm
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err.message, title: err.message,
icon: 'none' icon: 'none'
}); })
}); })
},
// 编辑凭证
canSubmitEdit(id){
let newCover = this.canFromImg.path
vipVoucherUpdate(id,{
cover: newCover
}).then(res => {
this.$Router.push({
name: 'Examine'
})
this.canForm = !this.canForm
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
}
} }
} }
};
</script> </script>
<style> <style>
page { page {
background-color: #ffffff; background-color: #ffffff;
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.canBack { .canBack {
position: fixed; position: fixed;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
@@ -340,8 +449,9 @@ page {
left: 0; left: 0;
top: 0; top: 0;
z-index: 99; z-index: 99;
} }
.canPop {
.canPop {
position: absolute; position: absolute;
background-color: #ffffff; background-color: #ffffff;
left: 100rpx; left: 100rpx;
@@ -352,6 +462,7 @@ page {
box-sizing: border-box; box-sizing: border-box;
border-radius: 10rpx; border-radius: 10rpx;
text-align: center; text-align: center;
.canPop-tips { .canPop-tips {
position: absolute; position: absolute;
right: 20rpx; right: 20rpx;
@@ -360,16 +471,26 @@ page {
height: 32rpx; height: 32rpx;
z-index: 1002; z-index: 1002;
} }
.canPop-cont { .canPop-cont {
font-size: 32rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
} }
.canPop-cover { .canPop-cover {
margin: 60rpx auto 40rpx; margin: 40rpx auto 20rpx auto;
width: 240rpx; width: 240rpx;
height: 240rpx; height: 240rpx;
border: 2rpx solid #f3f3f3; border: 2rpx solid #f3f3f3;
} }
.canPop-remark{
margin-bottom: 20rpx;
}
.canPop-status{
margin-bottom: 10rpx;
}
.canPop-btn { .canPop-btn {
text-align: center; text-align: center;
background: $mian-color; background: $mian-color;
@@ -378,29 +499,31 @@ page {
line-height: 90rpx; line-height: 90rpx;
font-size: $title-size; font-size: $title-size;
color: white; color: white;
&::after { &::after {
border: none; border: none;
} }
} }
} }
.vip-container { .vip-container {
width: 750rpx; width: 750rpx;
height: 340rpx; height: 340rpx;
margin-top: $margin; margin-top: $margin * 1.5;
} }
.swiper-item { .swiper-item {
width: 640rpx; width: 640rpx;
height: 340rpx; height: 340rpx;
display: flex; display: flex;
} }
.vip-item { .vip-item {
width: 640rpx; width: 640rpx;
height: 340rpx; height: 340rpx;
border-radius: 20rpx; border-radius: 20rpx;
position: relative; position: relative;
.vip-back { .vip-back {
position: absolute; position: absolute;
left: 0; left: 0;
@@ -408,6 +531,7 @@ page {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.vip-cont { .vip-cont {
position: absolute; position: absolute;
left: 0; left: 0;
@@ -417,23 +541,35 @@ page {
z-index: 9; z-index: 9;
padding: 45rpx 70rpx; padding: 45rpx 70rpx;
box-sizing: border-box; box-sizing: border-box;
.vip-name { .vip-name {
display: flex; display: flex;
font-size: 46rpx; font-size: 46rpx;
color: #ffffff; color: #ffffff;
font-weight: 600; font-weight: 600;
.vip-name-img { .vip-name-img {
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
margin: 12rpx 20rpx; margin: 12rpx 20rpx;
} }
} }
.vip-number { .vip-number {
margin: 10rpx 0 40rpx; margin: 10rpx 0 40rpx;
color: #ffffff; color: #ffffff;
font-size: 32rpx; font-size: 32rpx;
opacity: 0.8; opacity: 0.8;
} }
.currentInfo {
position: absolute;
right: 82rpx;
top: 20rpx;
color: #fff;
font-size: 24rpx;
}
.vip-tips { .vip-tips {
font-size: 30rpx; font-size: 30rpx;
background-color: #e8ebf6; background-color: #e8ebf6;
@@ -442,112 +578,154 @@ page {
height: 60rpx; height: 60rpx;
line-height: 60rpx; line-height: 60rpx;
padding: 0 30rpx; padding: 0 30rpx;
.vip-tips-text { .vip-tips-text {
font-weight: 700; font-weight: 700;
background-clip: text; background-clip: text;
color: transparent; color: transparent;
} }
.vip-tips-color-00 { .vip-tips-color-00 {
background-image: linear-gradient(to bottom, #6189f0, #b6b9c1); background-image: linear-gradient(to bottom, #6189f0, #b6b9c1);
} }
.vip-tips-color-01 { .vip-tips-color-01 {
background-image: linear-gradient(to top, #ffd459, #ff6c52); background-image: linear-gradient(to top, #ffd459, #ff6c52);
} }
.vip-tips-color-02 { .vip-tips-color-02 {
background-image: linear-gradient(to top, #e0c9fe, #892edb); background-image: linear-gradient(to top, #e0c9fe, #892edb);
} }
.vip-tips-color-03 { .vip-tips-color-03 {
background-image: linear-gradient(to top, #f6b237, #f035e3); background-image: linear-gradient(to top, #f6b237, #f035e3);
} }
.vip-tips-color-04 { .vip-tips-color-04 {
background-image: linear-gradient(to top, #c455ec, #5f76e9); background-image: linear-gradient(to top, #c455ec, #5f76e9);
} }
} }
} }
} }
// 会员特权
.privilege { // 会员特权
.privilege {
padding: 20rpx 30rpx 80rpx; padding: 20rpx 30rpx 80rpx;
box-sizing: border-box; box-sizing: border-box;
.privilege-list { .privilege-list {
margin-bottom: 50rpx; margin-bottom: 30rpx;
display: flex; display: flex;
.privilege-img { .privilege-img {
width: 74rpx; width: 50rpx;
height: 74rpx; height: 50rpx;
} }
.privilege-text { .privilege-text {
width: calc(100% - 74rpx); width: calc(100% - 60rpx);
padding-left: 40rpx; padding-left: 30rpx;
font-size: 32rpx; font-size: 30rpx;
color: #999999; color: #999999;
line-height: 52rpx; line-height: 48rpx;
.privilege-name { .privilege-name {
font-size: 40rpx; font-size: 34rpx;
color: #000000; color: #000000;
margin: 10rpx 0 20rpx; margin: 10rpx 0 20rpx;
} }
.privilege-label.active { .privilege-label.active {
color: #f6b338; color: #f6b338;
} }
.privilege-right { .privilege-right {
color: #7877eb; color: #7877eb;
} }
} }
} }
} }
// 用户协议 // 用户协议
.agree { .agree {
margin: $margin 0; margin: 0 0 10rpx 0;
text-align: center; text-align: center;
.agree-tips { .agree-tips {
background-color: #999999; background-color: #cacaca;
display: inline-block; display: inline-block;
padding: 14rpx $padding; padding: 14rpx $padding;
color: #ffffff; color: #ffffff;
border-radius: 60rpx; border-radius: 60rpx;
} }
} }
.agree-btn {
.agree-btn {
display: flex; display: flex;
font-size: $title-size-lg; font-size: $title-size-lg;
text-align: left; text-align: left;
color: #999999; color: #999999;
padding: $padding; padding: $padding;
} }
// .content{ // .content{
// min-height: 100vh; // min-height: 100vh;
// background: #fefaef; // background: #fefaef;
// } // }
// 开通须知 // 开通须知
.notice { .notice {
font-size: $title-size-m; font-size: $title-size-m;
color: $text-gray; color: $text-gray;
padding: $padding $padding * 2 $padding * 2; padding: $padding $padding * 2 $padding * 2;
.title { .title {
padding-bottom: $padding/2; padding-bottom: $padding/2;
font-weight: bold; font-weight: bold;
} }
.item { .item {
padding-bottom: $padding/2; padding-bottom: $padding/2;
line-height: 40rpx; line-height: 40rpx;
text-align: justify; text-align: justify;
} }
} }
// footer
.footer { // footer
.footer {
padding: 0 $padding; padding: 0 $padding;
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
margin-bottom: 30rpx;
.footer-btn { .footer-btn {
width: 74%; width: 74%;
} }
} .current-btn{
// 会员权限 width: 74%;
.privilege { height: 80rpx;
background-image: linear-gradient(to right, #7c52fc, #976dff);
color: #fff;
margin-left: 13%;
border-radius: 80rpx;
line-height: 80rpx;
font-size: 36rpx;
}
.current-btn-sh{
background-color: #cacaca;
width: 74%;
height: 80rpx;
color: #fff;
margin-left: 13%;
border-radius: 80rpx;
line-height: 80rpx;
font-size: 36rpx;
}
}
// 会员权限
.privilege {
padding: $padding; padding: $padding;
.title { .title {
font-weight: bold; font-weight: bold;
color: #322711; color: #322711;
@@ -555,15 +733,18 @@ page {
text-align: center; text-align: center;
line-height: 90rpx; line-height: 90rpx;
} }
.privilege-box { .privilege-box {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding: $padding 0; padding: $padding 0;
.item { .item {
width: 25%; width: 25%;
padding: $padding/2; padding: $padding/2;
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
.icon { .icon {
width: 78rpx; width: 78rpx;
height: 78rpx; height: 78rpx;
@@ -571,6 +752,7 @@ page {
border-radius: 50%; border-radius: 50%;
vertical-align: top; vertical-align: top;
} }
.text { .text {
font-size: $title-size-sm; font-size: $title-size-sm;
color: #201212; color: #201212;
@@ -578,11 +760,13 @@ page {
} }
} }
} }
} }
// 会员卡
.cards { // 会员卡
.cards {
position: relative; position: relative;
background: #1f1b1c; background: #1f1b1c;
.card { .card {
position: relative; position: relative;
margin: 0 $margin; margin: 0 $margin;
@@ -590,12 +774,14 @@ page {
padding: 15rpx; padding: 15rpx;
border-radius: $radius/2; border-radius: $radius/2;
z-index: 2; z-index: 2;
.card-content { .card-content {
position: relative; position: relative;
border: solid 1rpx rgba($color: white, $alpha: 0.4); border: solid 1rpx rgba($color: white, $alpha: 0.4);
border-radius: $radius/2; border-radius: $radius/2;
padding: 30rpx 180rpx 60rpx 148rpx; padding: 30rpx 180rpx 60rpx 148rpx;
min-height: 98rpx; min-height: 98rpx;
.cover { .cover {
position: absolute; position: absolute;
left: 30rpx; left: 30rpx;
@@ -604,16 +790,19 @@ page {
height: 98rpx; height: 98rpx;
border-radius: 50%; border-radius: 50%;
} }
.user { .user {
color: rgba($color: white, $alpha: 0.7); color: rgba($color: white, $alpha: 0.7);
line-height: 58rpx; line-height: 58rpx;
font-size: $title-size-lg; font-size: $title-size-lg;
} }
.sub-time { .sub-time {
line-height: 40rpx; line-height: 40rpx;
color: #e6ce9e; color: #e6ce9e;
font-size: $title-size-sm; font-size: $title-size-sm;
} }
.btn { .btn {
position: absolute; position: absolute;
color: #261f0f; color: #261f0f;
@@ -628,6 +817,7 @@ page {
} }
} }
} }
.cards-angle { .cards-angle {
position: absolute; position: absolute;
left: 0; left: 0;
@@ -635,6 +825,7 @@ page {
width: 100%; width: 100%;
z-index: 3; z-index: 3;
} }
&::after { &::after {
content: ' '; content: ' ';
height: 70rpx; height: 70rpx;
@@ -645,25 +836,29 @@ page {
border-radius: $radius/2; border-radius: $radius/2;
z-index: 0; z-index: 0;
} }
} }
// tabs
.tabs { // tabs
.tabs {
background: #1f1b1c; background: #1f1b1c;
color: white; color: white;
padding: 0 0 $padding 0; padding: 0 0 $padding 0;
display: flex; display: flex;
justify-content: center; justify-content: center;
font-size: $title-size-lg; font-size: $title-size-lg;
.item { .item {
margin: 0 $margin; margin: 0 $margin;
line-height: 70rpx; line-height: 70rpx;
height: 70rpx; height: 70rpx;
color: rgba($color: white, $alpha: 0.6); color: rgba($color: white, $alpha: 0.6);
&.show { &.show {
position: relative; position: relative;
font-weight: bold; font-weight: bold;
font-size: $title-size; font-size: $title-size;
color: white; color: white;
&::after { &::after {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
@@ -676,5 +871,5 @@ page {
} }
} }
} }
} }
</style> </style>

View File

@@ -11,16 +11,6 @@
</view> </view>
</view> </view>
<view class="item-name">
提现至银行卡
<view class="right">
<view class="cardName" v-if="bank_accounts === 0" @click="addBanks">添加银行卡</view>
<view class="cardName" v-if='bank_accounts>0' @click="bankLists">{{bankInfo.name?bankInfo.name:'选择银行卡'}}
</view>
<uni-icons type="arrowright" size="12" color="#fff" />
</view>
</view>
<view class="withdrawing-content"> <view class="withdrawing-content">
<view class="item"> <view class="item">
<view style="flex: 1;"> <view style="flex: 1;">
@@ -33,8 +23,8 @@
</view> </view>
</view> </view>
<view class="total" v-if="total"> {{total.toFixed(2)}} </view> <view class="total" v-if="total"> {{total.toFixed(2)}} </view>
<view class="btn" @click="actions">提现至银行卡</view> <view class="btn" @click="actions">提现至红包</view>
<view class="des">预计5- 10个工作日到账 手续费: {{tax === '0'?'免手续费':tax+'%'}}</view> <view class="des">提现到红包可在红包中提现到银行卡 手续费: </view>
</view> </view>
</template> </template>
@@ -133,13 +123,13 @@
bank_account_id: this.bankInfo.bank_account_id, bank_account_id: this.bankInfo.bank_account_id,
amount: Number(this.withdraw_input) amount: Number(this.withdraw_input)
} }
if (data.bank_account_id === undefined || data.bank_account_id === null || data.bank_account_id === '') { // if (data.bank_account_id === undefined || data.bank_account_id === null || data.bank_account_id === '') {
uni.showToast({ // uni.showToast({
title: this.bank_accounts > 0 ? '请选择银行卡' : '请添加银行卡', // title: this.bank_accounts > 0 ? '请选择银行卡' : '请添加银行卡',
icon: 'none' // icon: 'none'
}) // })
return; // return;
} // }
if (data.amount === 0) { if (data.amount === 0) {
uni.showToast({ uni.showToast({
title: '请输入能量球数量', title: '请输入能量球数量',
@@ -149,7 +139,7 @@
} }
uni.showModal({ uni.showModal({
title: '温馨提示', title: '温馨提示',
content:this.tax === '0'?'您是否确认提现交易将免手续费':'您是否确认提现将会扣除' + this.tax + '%手续费', content:'您是否确认提现到红包,交易将免手续费',
confirmColor: '#7c52fc', confirmColor: '#7c52fc',
cancelColor: '#cacaca', cancelColor: '#cacaca',
cancelText: '我再想想', cancelText: '我再想想',
@@ -182,18 +172,6 @@
}) })
}, },
// 添加银行卡
addBanks() {
this.$Router.push({
name: 'addBank'
})
},
// 选择银行卡
bankLists() {
this.$Router.push({
name: 'bankList'
})
},
// 提现记录 // 提现记录
withdrawDetail() { withdrawDetail() {
this.$Router.push({ this.$Router.push({

403
pages/wallet/extractRed.vue Normal file
View File

@@ -0,0 +1,403 @@
<template>
<view class="WithdrawingCoin ">
<view class="propery">
<image src="/static/imgs/account-bg.png" mode="aspectFill" class="record-bg" />
<view class="propery-content">
<view class="currency">可提现额度</view>
<view class="balance">{{ balance || '0.00' }}</view>
<view class="frozen" @click="withdrawDetail">提现记录</view>
</view>
</view>
<view class="item-name">
提现至银行卡
<view class="right">
<view class="cardName" v-if="bank_accounts === 0" @click="addBanks">添加银行卡</view>
<view class="cardName" v-if='bank_accounts>0' @click="bankLists">{{bankInfo.name?bankInfo.name:'选择银行卡'}}
</view>
<uni-icons type="arrowright" size="12" color="#fff" />
</view>
</view>
<view class="withdrawing-content">
<view class="item">
<view style="flex: 1;">
<view class="inputTxt">提现金额</view>
<input class="input_num" v-model="withdraw_input" @input='inputNum' type="number"
placeholder-style="color:#999;font-weight:normal; font-size:34rpx;"
placeholder="请输入提现金额" :disabled="balance===0" />
</view>
<view class="all" @click="all">全部提现</view>
</view>
</view>
<view class="total" v-if="total">≈ ¥{{total.toFixed(2)}} </view>
<view class="btn" @click="actions">提现至银行卡</view>
<view class="des">预计5- 10个工作日到账 手续费: {{tax === '0'?'免手续费':tax+'%'}}</view>
</view>
</template>
<script>
import {
withdrawsIndexCreate,
withdrawsIndex
} from '@/apis/interfaces/withdraws';
export default {
data() {
return {
balance: 0, // 钱包能量球金额
tax: 0, // 当前手续费
cost: 1, // 每个能量球的价格
total: 0, // 约合人民币
card: '', // 银行卡号
withdraw_input: '', // 提现能量球金额
bank_accounts: 0,
bankInfo: {}
};
},
onLoad() {
this.getInfo()
},
onShow() {
if (uni.getStorageSync('refresh')) {
this.bankInfo = {}
this.getInfo()
}
},
methods: {
// 提现基本信息
getInfo() {
withdrawsIndexCreate().then(res => {
this.balance = res.balance
this.tax = res.tax
this.cost = res.cost
this.bank_accounts = res.bank_accounts.length
this.withdraw_input = Number(res.balance)
this.total = Number(res.balance) * Number(res.cost)
uni.setStorageSync('refresh', false)
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
},
// 输入提现能量球金额
inputNum(e) {
let number = Number(e.detail.value)
console.log(number, this.balance)
if (number <= Number(this.balance)) {
this.total = Number(e.detail.value) * this.cost
} else {
this.total = 0
if (Number(this.balance) === 0) {
uni.showToast({
title: '当前不能提现',
icon: 'none',
duration: 2000
});
this.withdraw_input = 0
this.total = 0
} else {
uni.showToast({
title: '最大值能超过' + this.balance + '',
icon: 'none',
duration: 2000
});
this.withdraw_input = this.balance
this.total = this.balance * this.cost
}
}
},
// 点击全部
all() {
if (this.balance > 0) {
this.withdraw_input = this.balance
this.total = this.balance * this.cost
} else {
uni.showToast({
title: '啥也没有我也做不到~',
icon: 'none',
duration: 2000
})
this.withdraw_input = 0
}
},
// 提现
actions() {
let data = {
bank_account_id: this.bankInfo.bank_account_id,
amount: Number(this.withdraw_input)
}
if (data.bank_account_id === undefined || data.bank_account_id === null || data.bank_account_id === '') {
uni.showToast({
title: this.bank_accounts > 0 ? '请选择银行卡' : '请添加银行卡',
icon: 'none'
})
return;
}
if (data.amount === 0) {
uni.showToast({
title: '请输入能量球金额',
icon: 'none'
})
return;
}
uni.showModal({
title: '温馨提示',
content:this.tax === '0'?'您是否确认提现交易将免手续费':'您是否确认提现将会扣除' + this.tax + '%手续费',
confirmColor: '#7c52fc',
cancelColor: '#cacaca',
cancelText: '我再想想',
confirmText: '确认提现',
success: (res) => {
if (res.confirm) {
uni.showLoading({
title: '提交中'
})
withdrawsIndex(data).then(res => {
uni.showToast({
title: res,
icon: 'none',
duration: 3000
})
this.withdraw_input = ''
this.total = ''
setTimeout(res => {
this.getInfo()
uni.hideLoading()
}, 3000)
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
}
}
})
},
// 添加银行卡
addBanks() {
this.$Router.push({
name: 'addBank'
})
},
// 选择银行卡
bankLists() {
this.$Router.push({
name: 'bankList'
})
},
// 提现记录
withdrawDetail() {
this.$Router.push({
name: 'withdrawList'
})
}
}
}
</script>
<style lang="scss">
page {
width: 100%;
min-height: 100vh;
background-color: #f7f7f7;
}
.receiptCode {
color: #808080;
text-align: left;
// margin: $margin 0;
font-size: $title-size-m;
}
.WithdrawingCoin {
background-color: #f7f7f7;
width: 100%;
min-height: 100vh;
padding-bottom: 100rpx;
// 账户
.propery {
position: relative;
padding-top: var(--status-bar-height);
background-image: linear-gradient(to top, #7c52fc, #976dff);
position: relative;
overflow: hidden;
.record-bg {
position: absolute;
width: 120%;
height: 300rpx;
bottom: -50rpx;
right: -20rpx;
z-index: 1;
opacity: .5;
transform: rotate(-7deg);
}
.propery-content {
position: relative;
z-index: 1;
padding: $padding/2 $padding $padding*3;
text-align: center;
.currency {
font-size: $title-size-m;
color: rgba($color: white, $alpha: .8);
}
.balance {
font-size: $title-size * 2.5;
padding: $padding 0;
color: white;
}
.frozen {
background: rgba($color: #000000, $alpha: .1);
color: rgba($color: white, $alpha: .7);
display: inline-block;
font-size: 24rpx;
padding: 6rpx $padding;
border-radius: $radius-m;
border: solid 1rpx rgba($color: white, $alpha: .4)
}
}
}
}
.all {
color: $text-price;
width: 160rpx;
text-align: center;
}
.item-name {
text-align: center;
color: #303030;
font-weight: bold;
margin-bottom: $margin;
font-size: 30rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
background-image: linear-gradient(to right, #aaaaff, #aaaaff);
color: #fff;
margin: 30rpx;
padding: 30rpx;
.right {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
font-size: 34rpx;
.cardName {
flex: 1;
}
}
}
.withdrawing-content {
background-color: #fff;
padding: $padding $padding $padding $padding * 2;
font-size: $title-size-m;
/* 绑定银行卡 */
.bank-card {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 45rpx 0 35rpx;
}
.item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
padding: 20rpx 0;
span:nth-child(1) {
color: #666;
margin-right: 20rpx;
}
.inputTxt {
color: #999;
padding-bottom: 20rpx;
}
.input_num {
font-size: 60rpx;
color: #3a3a3a;
font-weight: bolder;
flex: 1;
}
}
.item-total {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: $padding*1 0 0 0;
color: #3a3a3a;
.total {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
box-sizing: border-box;
.money {
padding-top: $padding *0.5;
}
}
.lists {
color: $text-price;
}
}
}
.btn {
background-image: linear-gradient(to right, #7c52fc, #976dff);
color: #fff;
border-radius: 10rpx;
text-align: center;
padding: $padding * .9;
margin: $margin * 3 $margin *2 $margin $margin*2;
font-size: $title-size;
font-weight: bold;
}
.des {
text-align: center;
color: #cacaca;
font-size: 26rpx;
}
.total {
color: $mian-color;
margin-top: 20rpx;
margin-left: 50rpx;
font-size: 36rpx;
}
</style>

View File

@@ -0,0 +1,396 @@
<template>
<view class="propertyIndex">
<view class="propery">
<image src="/static/imgs/account-bg.png" mode="aspectFill" class="record-bg" />
<view class="propery-content">
<view class="currency">能量球钱包
<span>( {{ price || '0.00' }} CNY)</span>
</view>
<view class="balance">{{ balance.balance || '0.00' }}</view>
<!-- <view class="frozen">{{ balance.frozen || '0.00' }} 冻结中</view> -->
<view class="balance-flex">
<view class="balance-flex-item" @click="showAddress">区块链地址</view>
<!-- <view class="balance-flex-item" @click="showPrivatekey('privatekey')">我的私钥</view> -->
<view class="balance-flex-item" @click="$Router.push({name: 'Extract'})">能量球提现</view>
</view>
</view>
</view>
<!-- 账户记录 -->
<view class="record">
<view class="record-tabs">
<view class="tabs-item" :class="logsType === 0 ? 'show': ''" @click="onLogsType(0)">全部</view>
<view class="tabs-item" :class="logsType === 2 ? 'show': ''" @click="onLogsType(2)">收入</view>
<view class="tabs-item" :class="logsType === 1 ? 'show': ''" @click="onLogsType(1)">支出</view>
</view>
<record :list="logs" :logsType="logsType" />
<!-- ios安全距离 -->
<view class="ios-bottom"></view>
</view>
<!-- 支付密码 -->
<uni-popup ref="showPassword">
<view class="validationPassword">
<view class="from">
<view class="title">验证密码</view>
<input class="input" v-model="password" password placeholder="请验证安全密码" />
</view>
<view class="buttons">
<view class="button cancel" @click="payPassword('cancel', passwordPages)">取消</view>
<view class="button confirm" @click="payPassword('confirm', passwordPages)">验证</view>
</view>
</view>
</uni-popup>
<!-- 原密码弹窗 -->
<!-- <number-jpan :length="6" @closeChange="closeChange($event)" ref="numberPad"></number-jpan> -->
</view>
</template>
<script>
import record from '@/components/property/record'
import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy'
import {
sum,
price,
logs,
code,
securityCheck // 输入旧密码是否正确
} from '@/apis/interfaces/wallet'
import numberJpan from "@/components/numberJpan/numberJpan.vue";
export default {
components: {
record
},
data() {
return {
balance: {},
price: '0.00',
logs: [],
logsType: 0,
password: '',
passwordPages: ''
};
},
onShow() {
this.getsum()
this.getlog()
},
methods: {
getsum() {
sum().then(res => {
this.balance = res
this.price = res.price
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
getlog() {
logs().then(res => {
this.logs = res
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
// 弹出私钥
showPrivatekey(pages) {
this.passwordPages = pages
this.$refs.showPassword.open('center')
},
// 验证私钥
payPassword(type) {
if (type === 'confirm') {
if (this.password === '') {
uni.showToast({
title: '请输入安全密码',
icon: 'none'
})
return
}
securityCheck(this.password).then(res => {
this.$refs.showPassword.close()
switch (this.passwordPages) {
case 'privatekey':
this.$Router.push({
name: 'Privatekey',
params: {
password: this.password
}
})
break;
case 'resetPassword':
this.$Router.push({
name: 'ResetPassword',
params: {
password: this.password
}
})
break;
}
this.password = ''
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none',
})
})
return
}
this.$refs.showPassword.close()
},
// 交易记录
onLogsType(index) {
if (this.logsType === index) return
this.logsType = index
this.logs = []
logs({
flag: this.logsType
}).then(res => {
this.logs = res
})
},
// 区块地址
showAddress() {
uni.showModal({
title: '我的区块链地址',
content: '\n地址可以理解为银行卡卡号与他人转账时是区块链上的两个地址间的交易行为\n\n' + this.balance.address,
confirmText: '复制',
confirmColor: '#b11eff',
showCancel:false,
success: (res) => {
if (res.confirm) {
uni.setClipboardData({
data: this.balance.address,
success() {
uni.showToast({
title: '区块链地址已复制',
icon : 'none'
})
}
})
}
}
})
}
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
uni.showActionSheet({
// itemList: ['转账', '收款', '提币', '修改密码'],
itemList: ['提现', '修改密码'],
success: (res) => {
switch (res.tapIndex) {
case 0:
console.log('提现了,')
this.$Router.push({
name: 'Extract'
})
break;
case 1:
this.showPrivatekey('resetPassword')
break;
}
uni.hideLoading()
}
})
}
}
}
</script>
<style lang="scss" scoped>
.propertyIndex {
width: 100%;
min-height: 100vh;
background-color: #FFFFFF;
}
// 验证密码弹出层
.validationPassword {
background-color: white;
border-radius: $radius-m;
width: 70vw;
.from {
padding: $padding*2;
.title {
text-align: center;
font-size: $title-size;
padding-bottom: $padding*2;
font-weight: bold;
color: $text-price;
}
.input {
text-align: center;
height: 90rpx;
font-size: $title-size;
border-radius: $radius-m;
background: $border-color-lg;
padding: 0 ($padding*2);
}
}
.buttons {
display: flex;
border-top: solid 1rpx $border-color;
.button {
width: 50%;
font-size: $title-size;
line-height: 90rpx;
height: 90rpx;
text-align: center;
box-sizing: border-box;
&.cancel {
border-right: solid 1rpx $border-color;
color: $text-gray;
}
&.confirm {
color: $text-price;
}
}
}
// .button{
// background-color: $text-price;
// color: white;
// border-radius: $radius-m;
// border: none;
// margin-top: $margin*2;
// font-size: $title-size;
// height: 90rpx;
// line-height: 90rpx;
// }
// .close{
// @extend .button;
// text-align: center;
// color: $text-gray;
// margin-top: $margin;
// background-color: transparent;
// }
}
// 账户
.propery {
position: relative;
padding-top: var(--status-bar-height);
background-image: linear-gradient(to top, #7c52fc, #976dff);
position: relative;
overflow: hidden;
.record-bg {
position: absolute;
width: 100%;
height: 300rpx;
bottom: 0;
right: 0;
z-index: 1;
opacity: .5;
transform: rotate(0);
}
// &::before {
// position: absolute;
// left: 0;
// top: 0;
// width: 100%;
// height: 100%;
// content: " ";
// background-image: url(@/static/imgs/account-bg.png);
// background-size: 100%;
// background-repeat: no-repeat;
// opacity: .5;
// transform:rotate(0deg);
// }
.propery-content {
position: relative;
z-index: 1;
padding: $padding/2 $padding $padding*3;
text-align: center;
.currency {
font-size: $title-size-m;
color: rgba($color: white, $alpha: .8);
}
.balance {
font-size: $title-size * 2.5;
padding: $padding 0;
color: white;
}
.frozen {
background: rgba($color: #000000, $alpha: .1);
color: rgba($color: white, $alpha: .7);
display: inline-block;
font-size: 24rpx;
padding: 6rpx $padding;
border-radius: $radius-m;
border: solid 1rpx rgba($color: white, $alpha: .4)
}
.balance-flex {
display: flex;
justify-content: center;
margin-top: $margin * 2;
.balance-flex-item {
background-color: white;
width: 200rpx;
height: 75rpx;
line-height: 75rpx;
color: $text-price;
margin: 0 $margin;
border-radius: $radius-m;
font-size: 28rpx;
}
}
}
}
// 记录
.record {
background-color: white;
border-radius: $radius $radius 0 0;
padding: $padding ($padding * 2);
margin-top: -$margin;
position: relative;
z-index: 2;
.record-tabs {
display: flex;
justify-content: space-around;
font-weight: bold;
font-size: $title-size;
color: $text-gray;
line-height: 70rpx;
margin-bottom: $margin;
.tabs-item {
position: relative;
padding: 0 $padding;
&.show {
color: $text-price;
&::before {
position: absolute;
bottom: 0;
left: $padding;
right: $padding;
height: 4rpx;
content: " ";
background-color: $text-price;
}
}
}
}
}
</style>

View File

@@ -9,7 +9,7 @@
<view class="balance">{{ balance.balance || '0.00' }}</view> <view class="balance">{{ balance.balance || '0.00' }}</view>
<!-- <view class="frozen">{{ balance.frozen || '0.00' }} 冻结中</view> --> <!-- <view class="frozen">{{ balance.frozen || '0.00' }} 冻结中</view> -->
<view class="balance-flex"> <view class="balance-flex">
<view class="balance-flex-item" @click="showAddress">区块链地址</view> <!-- <view class="balance-flex-item" @click="showAddress">区块链地址</view> -->
<!-- <view class="balance-flex-item" @click="showPrivatekey('privatekey')">我的私钥</view> --> <!-- <view class="balance-flex-item" @click="showPrivatekey('privatekey')">我的私钥</view> -->
<view class="balance-flex-item" @click="$Router.push({name: 'Extract'})">能量球提现</view> <view class="balance-flex-item" @click="$Router.push({name: 'Extract'})">能量球提现</view>
</view> </view>
@@ -17,30 +17,16 @@
</view> </view>
<!-- 账户记录 --> <!-- 账户记录 -->
<view class="record"> <view class="record">
<view class="record-tabs"> <!-- <view class="record-tabs">
<view class="tabs-item" :class="logsType === 0 ? 'show': ''" @click="onLogsType(0)">全部</view> <view class="tabs-item" :class="logsType === 0 ? 'show': ''" @click="onLogsType(0)">全部</view>
<view class="tabs-item" :class="logsType === 2 ? 'show': ''" @click="onLogsType(2)">收入</view> <view class="tabs-item" :class="logsType === 2 ? 'show': ''" @click="onLogsType(2)">收入</view>
<view class="tabs-item" :class="logsType === 1 ? 'show': ''" @click="onLogsType(1)">支出</view> <view class="tabs-item" :class="logsType === 1 ? 'show': ''" @click="onLogsType(1)">支出</view>
</view> </view> -->
<record :list="logs" :logsType="logsType" /> <record :list="logs" :logsType="0" />
<!-- ios安全距离 --> <!-- ios安全距离 -->
<view class="ios-bottom"></view> <view class="ios-bottom"></view>
</view> </view>
<!-- 支付密码 -->
<uni-popup ref="showPassword">
<view class="validationPassword">
<view class="from">
<view class="title">验证密码</view>
<input class="input" v-model="password" password placeholder="请验证安全密码" />
</view>
<view class="buttons">
<view class="button cancel" @click="payPassword('cancel', passwordPages)">取消</view>
<view class="button confirm" @click="payPassword('confirm', passwordPages)">验证</view>
</view>
</view>
</uni-popup>
<!-- 原密码弹窗 -->
<!-- <number-jpan :length="6" @closeChange="closeChange($event)" ref="numberPad"></number-jpan> -->
</view> </view>
</template> </template>

View File

@@ -0,0 +1,396 @@
<template>
<view class="propertyIndex">
<view class="propery">
<image src="/static/imgs/account-bg.png" mode="aspectFill" class="record-bg" />
<view class="propery-content">
<view class="currency">可提现额度
<!-- <span>( {{ price || '0.00' }} CNY)</span> -->
</view>
<view class="balance">{{ balance.balance || '0.00' }}</view>
<!-- <view class="frozen">{{ balance.frozen || '0.00' }} 冻结中</view> -->
<view class="balance-flex">
<view class="balance-flex-item" @click="showAddress">区块链地址</view>
<!-- <view class="balance-flex-item" @click="showPrivatekey('privatekey')">我的私钥</view> -->
<view class="balance-flex-item" @click="$Router.push({name: 'ExtractRed'})">红包提现</view>
</view>
</view>
</view>
<!-- 账户记录 -->
<view class="record">
<view class="record-tabs">
<view class="tabs-item" :class="logsType === 0 ? 'show': ''" @click="onLogsType(0)">全部</view>
<view class="tabs-item" :class="logsType === 2 ? 'show': ''" @click="onLogsType(2)">收入</view>
<view class="tabs-item" :class="logsType === 1 ? 'show': ''" @click="onLogsType(1)">支出</view>
</view>
<record :list="logs" :logsType="logsType" />
<!-- ios安全距离 -->
<view class="ios-bottom"></view>
</view>
<!-- 支付密码 -->
<uni-popup ref="showPassword">
<view class="validationPassword">
<view class="from">
<view class="title">验证密码</view>
<input class="input" v-model="password" password placeholder="请验证安全密码" />
</view>
<view class="buttons">
<view class="button cancel" @click="payPassword('cancel', passwordPages)">取消</view>
<view class="button confirm" @click="payPassword('confirm', passwordPages)">验证</view>
</view>
</view>
</uni-popup>
<!-- 原密码弹窗 -->
<!-- <number-jpan :length="6" @closeChange="closeChange($event)" ref="numberPad"></number-jpan> -->
</view>
</template>
<script>
import record from '@/components/property/record'
import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy'
import {
sum,
price,
logs,
code,
securityCheck // 输入旧密码是否正确
} from '@/apis/interfaces/wallet'
import numberJpan from "@/components/numberJpan/numberJpan.vue";
export default {
components: {
record
},
data() {
return {
balance: {},
price: '0.00',
logs: [],
logsType: 0,
password: '',
passwordPages: ''
};
},
onShow() {
this.getsum()
this.getlog()
},
methods: {
getsum() {
sum().then(res => {
this.balance = res
this.price = res.price
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
getlog() {
logs().then(res => {
this.logs = res
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
// 弹出私钥
showPrivatekey(pages) {
this.passwordPages = pages
this.$refs.showPassword.open('center')
},
// 验证私钥
payPassword(type) {
if (type === 'confirm') {
if (this.password === '') {
uni.showToast({
title: '请输入安全密码',
icon: 'none'
})
return
}
securityCheck(this.password).then(res => {
this.$refs.showPassword.close()
switch (this.passwordPages) {
case 'privatekey':
this.$Router.push({
name: 'Privatekey',
params: {
password: this.password
}
})
break;
case 'resetPassword':
this.$Router.push({
name: 'ResetPassword',
params: {
password: this.password
}
})
break;
}
this.password = ''
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none',
})
})
return
}
this.$refs.showPassword.close()
},
// 交易记录
onLogsType(index) {
if (this.logsType === index) return
this.logsType = index
this.logs = []
logs({
flag: this.logsType
}).then(res => {
this.logs = res
})
},
// 区块地址
showAddress() {
uni.showModal({
title: '我的区块链地址',
content: '\n地址可以理解为银行卡卡号与他人转账时是区块链上的两个地址间的交易行为\n\n' + this.balance.address,
confirmText: '复制',
confirmColor: '#b11eff',
showCancel:false,
success: (res) => {
if (res.confirm) {
uni.setClipboardData({
data: this.balance.address,
success() {
uni.showToast({
title: '区块链地址已复制',
icon : 'none'
})
}
})
}
}
})
}
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
uni.showActionSheet({
// itemList: ['转账', '收款', '提币', '修改密码'],
itemList: ['提现', '修改密码'],
success: (res) => {
switch (res.tapIndex) {
case 0:
console.log('提现了,')
this.$Router.push({
name: 'Extract'
})
break;
case 1:
this.showPrivatekey('resetPassword')
break;
}
uni.hideLoading()
}
})
}
}
}
</script>
<style lang="scss" scoped>
.propertyIndex {
width: 100%;
min-height: 100vh;
background-color: #FFFFFF;
}
// 验证密码弹出层
.validationPassword {
background-color: white;
border-radius: $radius-m;
width: 70vw;
.from {
padding: $padding*2;
.title {
text-align: center;
font-size: $title-size;
padding-bottom: $padding*2;
font-weight: bold;
color: $text-price;
}
.input {
text-align: center;
height: 90rpx;
font-size: $title-size;
border-radius: $radius-m;
background: $border-color-lg;
padding: 0 ($padding*2);
}
}
.buttons {
display: flex;
border-top: solid 1rpx $border-color;
.button {
width: 50%;
font-size: $title-size;
line-height: 90rpx;
height: 90rpx;
text-align: center;
box-sizing: border-box;
&.cancel {
border-right: solid 1rpx $border-color;
color: $text-gray;
}
&.confirm {
color: $text-price;
}
}
}
// .button{
// background-color: $text-price;
// color: white;
// border-radius: $radius-m;
// border: none;
// margin-top: $margin*2;
// font-size: $title-size;
// height: 90rpx;
// line-height: 90rpx;
// }
// .close{
// @extend .button;
// text-align: center;
// color: $text-gray;
// margin-top: $margin;
// background-color: transparent;
// }
}
// 账户
.propery {
position: relative;
padding-top: var(--status-bar-height);
background-image: linear-gradient(to top, #7c52fc, #976dff);
position: relative;
overflow: hidden;
.record-bg {
position: absolute;
width: 100%;
height: 300rpx;
bottom: 0;
right: 0;
z-index: 1;
opacity: .5;
transform: rotate(0);
}
// &::before {
// position: absolute;
// left: 0;
// top: 0;
// width: 100%;
// height: 100%;
// content: " ";
// background-image: url(@/static/imgs/account-bg.png);
// background-size: 100%;
// background-repeat: no-repeat;
// opacity: .5;
// transform:rotate(0deg);
// }
.propery-content {
position: relative;
z-index: 1;
padding: $padding/2 $padding $padding*3;
text-align: center;
.currency {
font-size: $title-size-m;
color: rgba($color: white, $alpha: .8);
}
.balance {
font-size: $title-size * 2.5;
padding: $padding 0;
color: white;
}
.frozen {
background: rgba($color: #000000, $alpha: .1);
color: rgba($color: white, $alpha: .7);
display: inline-block;
font-size: 24rpx;
padding: 6rpx $padding;
border-radius: $radius-m;
border: solid 1rpx rgba($color: white, $alpha: .4)
}
.balance-flex {
display: flex;
justify-content: center;
margin-top: $margin * 2;
.balance-flex-item {
background-color: white;
width: 200rpx;
height: 75rpx;
line-height: 75rpx;
color: $text-price;
margin: 0 $margin;
border-radius: $radius-m;
font-size: 28rpx;
}
}
}
}
// 记录
.record {
background-color: white;
border-radius: $radius $radius 0 0;
padding: $padding ($padding * 2);
margin-top: -$margin;
position: relative;
z-index: 2;
.record-tabs {
display: flex;
justify-content: space-around;
font-weight: bold;
font-size: $title-size;
color: $text-gray;
line-height: 70rpx;
margin-bottom: $margin;
.tabs-item {
position: relative;
padding: 0 $padding;
&.show {
color: $text-price;
&::before {
position: absolute;
bottom: 0;
left: $padding;
right: $padding;
height: 4rpx;
content: " ";
background-color: $text-price;
}
}
}
}
}
</style>

View File

@@ -23,7 +23,6 @@ const router = createRouter({
// 全局路由前置守卫 // 全局路由前置守卫
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
const token = store.getters.getToken || uni.getStorageSync('token') const token = store.getters.getToken || uni.getStorageSync('token')
// 检查是否需要登录 // 检查是否需要登录
if(to.auth && token === ''){ if(to.auth && token === ''){
next({ next({

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -1,25 +0,0 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<script>
var __UniViewStartTime__ = Date.now();
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title>View</title>
<link rel="stylesheet" href="view.css" />
</head>
<body>
<div id="app"></div>
<script src="__uniappes6.js"></script>
<script src="view.umd.min.js"></script>
<script src="app-view.js"></script>
</body>
</html>

View File

@@ -1 +0,0 @@
(function(e){function r(r){for(var n,l,i=r[0],p=r[1],a=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in p)Object.prototype.hasOwnProperty.call(p,n)&&(e[n]=p[n]);f&&f(r);while(s.length)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var p=t[i];0!==o[p]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={"app-config":0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var i=this["webpackJsonp"]=this["webpackJsonp"]||[],p=i.push.bind(i);i.push=r,i=i.slice();for(var a=0;a<i.length;a++)r(i[a]);var f=p;t()})([]);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 937 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1015 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 682 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 904 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 643 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 929 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 857 B

Some files were not shown because too many files have changed in this diff Show More