节点中心

This commit is contained in:
zhangmanman
2021-09-25 09:51:37 +08:00
parent 8ab145ea73
commit 1d22ce7d13
30 changed files with 1571 additions and 5 deletions

46
pages/user/clause.vue Normal file
View File

@@ -0,0 +1,46 @@
<template>
<view>
<view class="clauseCont">
<rich-text :nodes="clauseData"></rich-text>
</view>
</view>
</template>
<script>
import { userClause } from '@/apis/interfaces/user'
export default {
data() {
return {
clauseData: [] //服务条款
};
},
onLoad() {
// 获取服务条款
this.clauseInfo()
},
methods: {
// 服务条款
clauseInfo(){
userClause().then(res => {
this.clauseData = res.content.replace(/\<img/gi, '<img style="max-width:100%; height:auto; vertical-align: top;"')
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
}
}
</script>
<style lang="scss">
page {
background-color: $uni-bg-color;
}
.clauseCont {
padding: $padding + 10 $padding * 2;
width: 100%;
box-sizing: border-box;
}
</style>

281
pages/user/code.vue Normal file
View File

@@ -0,0 +1,281 @@
<template>
<view>
<view class="codeContent">
<!-- 邀请码图 -->
<view class="codeBack">
<image class="codeBack-img" src="/static/user/user-codeIcon.png" mode="widthFix"></image>
<view class="codeBack-avatar">
<image src="/static/user/call.png" mode="aspectFill"></image>
<view class="">
张慢慢
</view>
</view>
<view class="codeBack-top">
<view class="codeBack-title">
您的邀请码
</view>
<view class="codeBack-number">
8012568
</view>
<view class="codeBack-copy" @click="copyCenter(inviteData.invite)">
复制
</view>
</view>
<view class="codeBack-yard">
<image class="codeBack-yard-img" src="/static/user/wallet-code.png" mode="widthFix"></image>
<view class="codeBack-yard-name">
扫码识别链商星球
</view>
<view class="codeBack-yard-tips">
加入链商星球享受能量球权益
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { userInvite } from '@/apis/interfaces/user'
export default {
data() {
return {
inviteData: {} //二维码信息
};
},
onLoad() {
// 获取二维码
this.inviteInfo()
},
methods:{
// 二维码
inviteInfo(){
userInvite().then(res => {
this.inviteData = res
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
// 复制邀请码
copyCenter(e) {
console.log('ddd')
let copyNo = e
uni.vibrateShort({
success: () => {
uni.setClipboardData({
data : copyNo,
success : res=> {
uni.showToast({
title : '复制成功',
icon :'none',
duration: 3000
});
}
})
}
})
},
// 分享微信好友
friend(scene) {
uni.share({
provider: 'weixin',
title: '我正在使用ocChain',
scene: scene,
href: 'https://live.funnyzhibo.com/blockdownload',
imageUrl: 'https://live.funnyzhibo.com/oc-chain.png',
summary: '邀请您一起加入,邀请码' + this.inviteData.invite,
complete: res=> {
console.log(res)
}
})
}
}
}
</script>
<style>
page {
background-image: linear-gradient(to top, #7c52fc, #976dff);
}
</style>
<style lang="scss">
// 背景
.codeImg {
width: 100%;
height: 100%;
}
// 内容
.codeContent {
position: absolute;
left: 0;
top: 0;
width: 100%;
padding: 120rpx 80rpx 40rpx;
box-sizing: border-box;
text-align: center;
.titleImg {
max-width: 100%;
}
.codeBack {
background-color: $uni-bg-color;
border-radius: $uni-border-radius-lg;
position: relative;
margin: $margin * 2 0 $margin * 2.5;
overflow: hidden;
&::after, &::before {
position: absolute;
background-color: #8c62fe;
content: '';
top: 266px;
width: 40rpx;
height: 40rpx;
border-radius: $uni-border-radius-circle;
}
&::after {
left: -20rpx;
}
&::before {
right: -20rpx;
}
.codeBack-img {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
.codeBack-top {
width: 100%;
padding: $padding;
height: 150px;
box-sizing: border-box;
position: relative;
.codeBack-title {
color: #7c52fc
}
.codeBack-number {
font-size: 60rpx;
color: #7c52fc;
text-transform:uppercase;
font-weight: 700;
margin: $margin - 10 0 $margin;
}
.codeBack-copy {
font-size: $title-size-lg;
display: inline-block;
background: linear-gradient(to right, #f9c869, #eca824);
color: #fff;
padding: 15rpx $padding * 2;
border-radius: $uni-border-radius-lg;
margin-bottom: $margin * 2;
}
.codeBack-tips {
.codeBack-tips-text {
color: #7c52fc;
font-weight: 700;
}
.codeBack-tips-label {
margin-top: $margin;
border-radius: $uni-border-radius-lg;
display: inline-block;
background-color: #fbeec9;
font-size: $title-size-sm;
padding: 0 $padding + 12;
height: 56rpx;
line-height: 56rpx;
color: #9f7d42;
}
}
}
.codeBack-avatar {
margin-top: $margin * 2;
image {
width: 140rpx;
height: 140rpx;
border-radius: 50%;
margin-bottom: $margin;
}
}
.codeBack-yard {
padding: $padding $padding * 4 $padding * 2;
text-align: center;
position: relative;
font-size: $title-size-lg;
&::after {
position: absolute;
content: '';
left: 50rpx;
top: 0;
width: calc(100% - 100rpx);
border-top: #cccbd0 2rpx dashed;
}
.codeBack-yard-img {
max-width: 80%;
}
.codeBack-yard-name {
color: #a0a1a3;
margin-bottom: $margin - 10;
}
.codeBack-yard-tips {
color: #7c52fc
}
}
}
.codeRule {
background-color: $uni-bg-color;
border-radius: $radius;
padding: $padding + 10;
.codeRule-title {
font-size: $uni-font-size-lg + 4;
color: #7c52fc;
font-weight: 700;
margin-bottom: $margin + 10;
}
.codeRule-list {
text-align: left;
font-size: $title-size-m;
line-height: 38rpx;
text {
display: block;
margin-bottom: $margin - 5;
color: #7c52fc;
}
}
}
}
// 分享途径
.codeShare {
position: fixed;
left: 0;
bottom: 0;
z-index: 9;
background-color: $uni-bg-color;
box-sizing: border-box;
height: 200rpx;
width: 100%;
display: flex;
justify-items: center;
align-items:center;
.codeShare-label {
width: 50%;
text-align: center;
font-size: $uni-font-size-sm;
color: $text-gray;
image {
width: $uni-img-size-lg - 10;
height: $uni-img-size-lg - 10;
display: flex;
margin: 0 auto $margin - 10;
}
}
}
</style>

118
pages/user/help.vue Normal file
View File

@@ -0,0 +1,118 @@
<template>
<view>
<view class="helpCont">
<view class="helpCont-list" :class="{active : item.spread}" v-for="(item, index) in helpList" :key="index" @click="showClick(item, index)">
<view class="helpCont-name">
<view class="helpCont-tips">{{ index + 1 }}</view>
{{ item.title }}
<image class="helpCont-img" src="/static/user/user-more.png" :class="{active : item.spread}" mode="aspectFill"></image>
</view>
<view class="helpCont-text">
{{ item.description }}
</view>
</view>
</view>
</view>
</template>
<script>
import { userHelp } from '@/apis/interfaces/user'
export default {
data() {
return {
helpList: [], //帮助中心列表
showList: false // 显示子内容
};
},
onLoad() {
// 获取帮助中心
this.helpInfo()
},
methods: {
// 帮助中心
helpInfo(){
userHelp().then(res => {
console.log(res)
res.forEach((value, index) => {
res[index].spread = false
res[0].spread = true
});
this.helpList = res
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
// 展开帮助中心-内容
showClick(item, index) {
this.helpList.forEach(i => {
if (i.spread !== this.helpList[index].spread) {
i.spread = false;
}
})
item.spread = !item.spread
}
}
}
</script>
<style lang="scss">
.helpCont {
margin: $margin;
background-color: $uni-bg-color;
padding: $padding + 10 $padding + 10 5rpx $padding + 10;
box-sizing: border-box;
border-radius: $radius;
.helpCont-list {
margin-bottom: $margin;
border-bottom: 1rpx solid #f3f3f3;
font-size: $uni-font-size-base;
height: 60rpx;
overflow: hidden;
&.active {
height: auto;
}
&:last-child {
border-bottom: none;
margin-bottom: 0;
}
.helpCont-name {
font-weight: 700;
display: flex;
line-height: 40rpx;
margin-bottom: $margin;
position: relative;
.helpCont-tips {
width: 40rpx;
height: 40rpx;
line-height: 40rpx;
margin-right: 10rpx;
text-align: center;
background-image: linear-gradient(to left, #7c52fc, #976dff);
color: $uni-text-color-inverse;
transform: scale(0.83);
border-radius: $uni-border-radius-base;
}
.helpCont-img {
position: absolute;
right: 0;
top: 8rpx;
width: 26rpx;
height: 26rpx;
&.active {
transform:rotate(90deg);
}
}
}
.helpCont-text {
font-size: $title-size-sm;
line-height: 40rpx;
color: $text-gray;
padding-bottom: $padding;
}
}
}
</style>

File diff suppressed because it is too large Load Diff