Browse Source

修改理财页面、理财新增VIP功能

master
liaoxinyu 1 month ago
parent
commit
629e66d660
  1. 6
      api/wallet.js
  2. BIN
      assets/img/vipIco.png
  3. 4
      element/index.js
  4. 4
      i18n/lang/en.json
  5. 4
      i18n/lang/zh-TW.json
  6. 11
      pages/assets/userfeedback.vue
  7. 22
      pages/base/home.vue
  8. 103
      pages/financialManagement/finances-history.vue
  9. 7
      pages/financialManagement/finances-product.vue
  10. 61
      pages/financialManagement/index.vue
  11. 14
      pages/invite/index.vue
  12. 7
      pages/invite/web-view.vue
  13. 8
      store/index.js

6
api/wallet.js

@ -191,6 +191,12 @@ class Wallet {
static financial_redemption(data){
return Serve.get('/financial/financial_redemption',data)
}
static financial_wlog(data){
return Serve.post('/financial/financial_wlog',data,{loading:true})
}
static financial_vip(data){
return Serve.get('/financial/financial_vip ',data)
}
}
export default Wallet;

BIN
assets/img/vipIco.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

4
element/index.js

@ -1,6 +1,6 @@
// 导入自己需要的组件
import { Slider,Collapse,CollapseItem } from 'element-ui'
const components = [Slider,Collapse,CollapseItem]
import { Slider,Collapse,CollapseItem,Progress } from 'element-ui'
const components = [Slider,Collapse,CollapseItem,Progress]
const element = {
install: function (Vue) {
// Vue.use(Slider)

4
i18n/lang/en.json

@ -3,6 +3,10 @@
"D": "Day",
"M": "Month",
"Y": "Year",
"grade": "It is already the highest level",
"distance": "You are far",
"week": "week",
"today": "today",
"add": "Add",
"address": "Address",
"all": "All",

4
i18n/lang/zh-TW.json

@ -3,6 +3,10 @@
"D": "日",
"M": "月",
"Y": "年",
"grade": "已是最高等級",
"distance": "你距離",
"week": "周",
"today": "今天",
"add": "添加",
"address": "地址",
"all": "所有",

11
pages/assets/userfeedback.vue

@ -1,9 +1,9 @@
<template>
<v-page>
<v-header :title="$t('common.c35')"></v-header>
<view style="background-color: #121212;height: 100%;">
<view style="background-color: #ffffff;height: 100%;">
<view class="scrollview">
<scroll-view scroll-y="true" style="height: 71vh;">
<scroll-view scroll-y="true" style="height: 65vh;">
<view class="userfeedbox_flex">
<view v-for="(item,index) in list" :key="index" class="userfeedbox_list">
<view style="margin-bottom: 40rpx;" v-if="item.contents">
@ -20,7 +20,7 @@
</scroll-view>
</view>
<view style="margin: 0px 10px;">
<v-input v-model="text">
<v-input class="p-sm m-t-sm" style="border: 1px solid #d6d6d6;border-radius: 20rpx;" v-model="text">
<template #right>
<view @click="onsend" class="sendview">{{$t('common.c36')}}</view>
</template>
@ -45,13 +45,14 @@
methods: {
advices(){
Wallet.advices({}).then(res => {
this.list = res.data;
this.list = res.data.data;
});
},
onsend(){
Wallet.addAdvice({contents:this.text}).then(data => {
this.text = "";
this.advices();
this.$toast(this.$t('common.sendSuccess'))
})
}
}
@ -75,7 +76,7 @@
margin: 20px 10px;
padding: 20px 20px;
border-radius: 10px;
border: 1px solid #eee;
border: 1px solid #d6d6d6;
}
.viewtext{
max-width: 100%;

22
pages/base/home.vue

@ -1083,13 +1083,13 @@
},
watch: {
isShow(n) {
if(n&&this.isLogin){
this.chatcount = setInterval(()=>{
this.chat()
},2000)
} else if(!n){
clearInterval(this.chatcount);
}
// if(n&&this.isLogin){
// this.chatcount = setInterval(()=>{
// this.chat()
// },2000)
// } else if(!n){
// clearInterval(this.chatcount);
// }
if (n) {
this.indexData()
this.ws.send({
@ -1352,7 +1352,7 @@
})
.then(() => {
this.outLogin();
clearInterval(this.chatcount);
// clearInterval(this.chatcount);
})
.catch(() => {});
})
@ -1469,9 +1469,9 @@
this.getCollegeLinks();
if (this.isLogin) {
this.chatcount = setInterval(()=>{
this.chat()
},5000)
// this.chatcount = setInterval(()=>{
// this.chat()
// },5000)
this.createWalletAddress();
this.getAuthInfo()
}

103
pages/financialManagement/finances-history.vue

@ -28,37 +28,28 @@
</view>
</scroll-view>
</view> -->
<view style="background-color: #f9f9f9;height: 100%;color: #666;">
<view style="background-color: #fff;height: 100%;color: #666;">
<v-header class="nav-head" :title="$t('common.d7')"></v-header>
<scroll-view scroll-y="true" style="height: 90vh;">
<view style="padding: 0rpx 40rpx;">
<view v-for="(item,index) in recordsList" :key="index" class="recordsList_box">
<view style="width: 160rpx;">
<view>{{ $t("common.d8") }}</view>
<view>{{item.currency}}</view>
</view>
<view style="width: 200rpx;text-align: center;">
<view>{{ $t("common.amout") }}</view>
<view>{{item.amount}}</view>
</view>
<view style="width: 200rpx;text-align: right;">
<view>{{ $t("common.d9") }}</view>
<view>{{item.rate}}%</view>
<view class="d-flex justify-between align-center" style="padding: 0rpx 40rpx;margin: 40rpx 0rpx;">
<view class="d-flex">
<view @click="onskytype(1)">{{$t('common.today')}}</view>
<view @click="onskytype(2)" style="margin-left: 30rpx;">1{{$t('common.week')}}</view>
<view @click="onskytype(3)" style="margin-left: 30rpx;">1{{$t('common.M')}}</view>
</view>
<view style="width: 160rpx;margin-top: 30rpx;">
<view>{{ $t("common.d10") }}</view>
<view v-if="item.type==1">{{$t('common.d17')}}</view>
<view v-if="item.type==2">{{item.day}}{{$t('exchange.f0')}}</view>
<view><uni-datetime-picker style="width: 300rpx;" v-model="range" type="daterange" @change="pickerChange" /></view>
</view>
<view style="width: 200rpx;text-align: center;margin-top: 30rpx;">
<view>{{ $t("common.d13") }}</view>
<view>{{item.financial_time}}</view>
<scroll-view scroll-y="true" style="height: 80vh;" @scrolltolower="scrollpage">
<view style="padding: 0rpx 40rpx;">
<view v-for="(item,index) in recordsList" :key="index" class="recordsList_box">
<view style="width: 60%;">
<view>{{item.log_type_text}}</view>
<view style="margin-top: 20rpx;font-size: 28rpx;color: #aeaeae;">{{item.created_at}}</view>
</view>
<view style="width: 200rpx;text-align: right;margin-top: 30rpx;">
<view>{{ $t("common.d15") }}</view>
<view>{{item.redemption_time}}</view>
<view style="width: 40%;text-align: right;font-weight: bold;">
<view>{{item.amount}}{{item.coin_name}}</view>
</view>
</view>
<van-empty v-if="!recordsList.length" description="" />
</view>
</scroll-view>
</view>
@ -77,21 +68,68 @@ export default {
watch: {
},
created() {
mounted() {
this.init()
},
data() {
return {
recordsList:[]
recordsList:[],
Numbertype:2,
page:1,
start_time:'',
end_time:'',
range:[],
last_page:1
};
},
methods: {
init(){
Wallet.financial_records({status:1}).then(res => {
let data = {
page:this.page,
type:this.start_time?'':this.Numbertype,
start_time:this.start_time,
end_time:this.end_time,
}
Wallet.financial_wlog(data).then(res => {
if(res.code==200){
if(this.page==1){
this.last_page = res.data.last_page
this.recordsList = res.data.data;
console.log(this.recordsList);
}else{
this.last_page = res.data.last_page
this.recordsList = [...this.recordsList, ...res.data.data];
}
}
// console.log(this.recordsList);
}).catch(error => {
console.error('Promise:', error);
})
},
onskytype(type){
this.Numbertype = type;
this.page = 1;
this.recordsList = [];
this.init();
},
scrollpage(e){
if(this.page>this.last_page) return
this.page++
this.init();
},
pickerChange(e){
if(e.length!==0){
this.start_time = e[0]
this.end_time = e[1]
this.page = 1;
this.init();
}else{
this.start_time = ''
this.end_time = ''
this.page = 1;
this.init();
}
// console.log(e);
}
}
};
</script>
@ -185,10 +223,9 @@ export default {
.recordsList_box{
display: flex;
flex-wrap: wrap;
margin:40rpx 0px;
padding: 30rpx;
border-radius: 20rpx;
background-color: #fff;
// margin:40rpx 0px;
padding: 40rpx 30rpx;
border-bottom: 1px solid #ccc;
justify-content: space-between;
}
</style>

7
pages/financialManagement/finances-product.vue

@ -101,7 +101,7 @@
<v-header class="nav-head" :title="$t('common.d12')"></v-header>
<view style="padding: 40rpx 40rpx;">
<view class="d-flex" style="flex-wrap: wrap;" v-for="(item,index) in userAdressList" :key="index">
<view class="ratebox" :class="Subscriptionindex==null?'Subscriptionbox':''" @click="Subscriptiontab({index:1,coin_id:item.coin_id})">
<view class="ratebox" :class="Subscriptionindex==null?'Subscriptionbox':''" @click="Subscriptiontab({index:1,coin_id:item.coin_id,fixed_rate:item.rate})">
<view>{{$t('common.d17')}}</view>
<view>{{item.rate}}%{{$t('exchange.e3')}}</view>
</view>
@ -139,7 +139,7 @@
<view v-if="bool1==1">
<view class="d-flex justify-between m-b-lg">
<view>{{$t('common.d39')}}</view>
<view style="color: ##60c08c;">100.00USDT</view>
<view style="color: ##60c08c;">{{amount*(subscriptionobj.fixed_rate/100)}}USDT</view>
</view>
<view>{{$t('common.d40')}}</view>
</view>
@ -187,7 +187,8 @@ export default {
userAdressList:[],
subscriptionobj:{
coin_id:1,
index:1
index:1,
fixed_rate:0.50
},
coin_name:"USDT",
activeCoin:{},

61
pages/financialManagement/index.vue

@ -10,10 +10,16 @@
<main class="" style="padding: 40rpx;">
<view class="d-flex">
<view>{{$t('common.d23')}}</view>
<view style="margin-left: 10rpx;"><img src="@/assets/img/home/user.png" width="20" /></view>
<view style="margin-left: 10rpx;">
<!-- <img src="@/assets/img/home/user.png" width="20" /> -->
<view class="fn-18 m-l-md d-flex" @click="setHide(!hideMoney1)">
<van-icon v-if="!hideMoney1" name="eye-o" />
<van-icon v-else name="closed-eye" />
</view>
</view>
</view>
<view class="d-block color-light" style="margin-top: 5px;">
<span class="fn-20 m-r-xs">{{ activeCoin.usable_balance }}</span>
<span class="fn-20 m-r-xs">{{ filterMoney(activeCoin.usable_balance) }}</span>
<span> USDT</span>
</view>
<view class="bg-form-panel-3 activeCoinAmount">
@ -30,6 +36,20 @@
<view style="width: 130rpx;word-break: break-word;text-align: center;">$ {{activeCoin.totalAmount}}</view>
</view>
</view>
<view style="margin: 40rpx 0px;" class="d-flex">
<view class="d-flex" style="width: 180rpx;padding-top: 38rpx;margin-right: 20rpx;">
<view><image src="@/assets/img/vipIco.png" mode="widthFix" style="width: 50rpx;"></image></view>
<view style="margin-top: 5rpx;font-weight: bold;color: #fbd96f;margin-left: 10rpx;">VIP {{financial.vip.level}}</view>
</view>
<view style="width: 100%;">
<view class="m-b-ms">{{financial.vip.level==5?$t('common.grade'):$t('common.distance')}} VIP{{financial.nextVip.level}}</view>
<el-progress :show-text="false" :percentage="financial.schedule"></el-progress>
<view class="d-flex justify-between m-t-ms">
<view>{{financial.performance}}</view>
<view>{{financial.nextVip.performance}}</view>
</view>
</view>
</view>
<view class="d-flex justify-around" style="margin: 60rpx 0px;">
<view style="color: #4097f4;border-bottom: 2px solid #4097f4;padding-bottom: 10rpx;">{{$t('common.d12')}}</view>
<view @click="onredemption">{{$t('common.d14')}}</view>
@ -57,31 +77,58 @@
</template>
<script>
import {mapState,mapActions} from "vuex";
import Wallet from "@/api/wallet";
export default {
name: "index",
components: {
},
props: {
isShow: {
default: true,
type: Boolean,
required: false,
}
},
created() {
this.getBalance()
this.init()
},
computed: {
...mapState({
hideMoney1: "hideMoney1",
theme: "theme",
}),
},
data() {
return {
activeCoin:{},
userAdressList:[],
coin_name1:"USDT",
financial:{}
};
},
watch:{
'$route' (to, from){
// '$route' (to, from){
// this.getBalance()
// // console.log(to.fullPath);
// // console.log(from);
// },
isShow(n, o) {
if (n) {
this.getBalance()
// console.log(to.fullPath);
// console.log(from);
}
},
},
methods: {
...mapActions({
setHide: "hideMoney1",
}),
filterMoney(val, type) {
if (this.hideMoney1) return "******";
return val;
},
getBalance(){
let data = {
account: 4,
@ -91,6 +138,10 @@
this.activeCoin = res.data;
// console.log(res);
});
Wallet.financial_vip({}).then(res => {
console.log(res);
this.financial = res.data
});
},
init(){
Wallet.activity().then(res => {

14
pages/invite/index.vue

@ -45,7 +45,8 @@
</view>
<view class="group d-flex m-t-xs">
<button type="blue" class="btn flex-fill color-plain rounded-sm h-34 btn-1 m-r-md fn-md bg-buy"
@click="popshow=true;">{{$t('common.b5')}}</button>
@click="imgurl">{{$t('common.b5')}}</button>
<!-- @click="popshow=true;">{{$t('common.b5')}}</button> -->
<!-- #ifndef H5 -->
<button type="green" class="btn flex-fill rounded-sm color-plain h-34 btn-2 fn-md bg-buy"
@click="$copy(detail.invite_url)">{{$t('invite.a8')}}</button>
@ -237,7 +238,16 @@ export default {
Profile.poster(data).then((res) => {
this.imgs=res.data
uni.showLoading()
this.saves()
// this.saves()
this.imgurl()
});
},
imgurl(){
let data={bg_id:this.bg_id}
Profile.poster(data).then((res) => {
uni.navigateTo({
url:`/pages/invite/web-view?url=${res.data}`
})
});
},
saves(){

7
pages/invite/web-view.vue

@ -1,6 +1,6 @@
<template>
<view>
<web-view src="https://bbxr.bxrcos.com/storage/poster/user-1-1.jpg"></web-view>
<img :src="img" style="width: 750rpx;height: 1330rpx;" alt="" />
</view>
</template>
@ -8,9 +8,12 @@
export default {
data() {
return {
img:'https://bbxr.bxrcos.com/storage/poster/user-1-1.jpg'
}
},
onLoad(val) {
this.img = val.url
},
methods: {
}

8
store/index.js

@ -63,6 +63,7 @@ let store = new Vuex.Store({
ws1:socket1,
wsState: false,
hideMoney: uni.getStorageSync('hideMoney') == 'true',
hideMoney1: uni.getStorageSync('hideMoney1') == 'true',
// logo
logoMap: (() => {
if (!uni.getStorageSync('logoMap')) return {};
@ -180,6 +181,10 @@ let store = new Vuex.Store({
uni.setStorageSync('hideMoney', data)
state.hideMoney = data
},
HIDEMONEY1(state, data) {
uni.setStorageSync('hideMoney1', data)
state.hideMoney1 = data
},
LOGOMAP(state, data) {
uni.setStorageSync('logoMap', JSON.stringify(data))
state.logoMap = data
@ -224,6 +229,9 @@ let store = new Vuex.Store({
hideMoney({ commit }, data) {
commit('HIDEMONEY', data)
},
hideMoney1({ commit }, data) {
commit('HIDEMONEY1', data)
},
// 设置用户信息
setUserInfo({ commit }) {
Setting.getUserInfo().then(res => {

Loading…
Cancel
Save