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. 105
      pages/financialManagement/finances-history.vue
  9. 7
      pages/financialManagement/finances-product.vue
  10. 65
      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){ static financial_redemption(data){
return Serve.get('/financial/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; 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' import { Slider,Collapse,CollapseItem,Progress } from 'element-ui'
const components = [Slider,Collapse,CollapseItem] const components = [Slider,Collapse,CollapseItem,Progress]
const element = { const element = {
install: function (Vue) { install: function (Vue) {
// Vue.use(Slider) // Vue.use(Slider)

4
i18n/lang/en.json

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

4
i18n/lang/zh-TW.json

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

11
pages/assets/userfeedback.vue

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

22
pages/base/home.vue

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

105
pages/financialManagement/finances-history.vue

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

7
pages/financialManagement/finances-product.vue

@ -101,7 +101,7 @@
<v-header class="nav-head" :title="$t('common.d12')"></v-header> <v-header class="nav-head" :title="$t('common.d12')"></v-header>
<view style="padding: 40rpx 40rpx;"> <view style="padding: 40rpx 40rpx;">
<view class="d-flex" style="flex-wrap: wrap;" v-for="(item,index) in userAdressList" :key="index"> <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>{{$t('common.d17')}}</view>
<view>{{item.rate}}%{{$t('exchange.e3')}}</view> <view>{{item.rate}}%{{$t('exchange.e3')}}</view>
</view> </view>
@ -139,7 +139,7 @@
<view v-if="bool1==1"> <view v-if="bool1==1">
<view class="d-flex justify-between m-b-lg"> <view class="d-flex justify-between m-b-lg">
<view>{{$t('common.d39')}}</view> <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>
<view>{{$t('common.d40')}}</view> <view>{{$t('common.d40')}}</view>
</view> </view>
@ -187,7 +187,8 @@ export default {
userAdressList:[], userAdressList:[],
subscriptionobj:{ subscriptionobj:{
coin_id:1, coin_id:1,
index:1 index:1,
fixed_rate:0.50
}, },
coin_name:"USDT", coin_name:"USDT",
activeCoin:{}, activeCoin:{},

65
pages/financialManagement/index.vue

@ -10,10 +10,16 @@
<main class="" style="padding: 40rpx;"> <main class="" style="padding: 40rpx;">
<view class="d-flex"> <view class="d-flex">
<view>{{$t('common.d23')}}</view> <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>
<view class="d-block color-light" style="margin-top: 5px;"> <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> <span> USDT</span>
</view> </view>
<view class="bg-form-panel-3 activeCoinAmount"> <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 style="width: 130rpx;word-break: break-word;text-align: center;">$ {{activeCoin.totalAmount}}</view>
</view> </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 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 style="color: #4097f4;border-bottom: 2px solid #4097f4;padding-bottom: 10rpx;">{{$t('common.d12')}}</view>
<view @click="onredemption">{{$t('common.d14')}}</view> <view @click="onredemption">{{$t('common.d14')}}</view>
@ -57,31 +77,58 @@
</template> </template>
<script> <script>
import {mapState,mapActions} from "vuex";
import Wallet from "@/api/wallet"; import Wallet from "@/api/wallet";
export default { export default {
name: "index", name: "index",
components: { components: {
},
props: {
isShow: {
default: true,
type: Boolean,
required: false,
}
}, },
created() { created() {
this.getBalance() this.getBalance()
this.init() this.init()
}, },
computed: {
...mapState({
hideMoney1: "hideMoney1",
theme: "theme",
}),
},
data() { data() {
return { return {
activeCoin:{}, activeCoin:{},
userAdressList:[], userAdressList:[],
coin_name1:"USDT", coin_name1:"USDT",
financial:{}
}; };
}, },
watch:{ watch:{
'$route' (to, from){ // '$route' (to, from){
this.getBalance() // this.getBalance()
// console.log(to.fullPath); // // console.log(to.fullPath);
// console.log(from); // // console.log(from);
} // },
isShow(n, o) {
if (n) {
this.getBalance()
}
},
}, },
methods: { methods: {
...mapActions({
setHide: "hideMoney1",
}),
filterMoney(val, type) {
if (this.hideMoney1) return "******";
return val;
},
getBalance(){ getBalance(){
let data = { let data = {
account: 4, account: 4,
@ -91,6 +138,10 @@
this.activeCoin = res.data; this.activeCoin = res.data;
// console.log(res); // console.log(res);
}); });
Wallet.financial_vip({}).then(res => {
console.log(res);
this.financial = res.data
});
}, },
init(){ init(){
Wallet.activity().then(res => { Wallet.activity().then(res => {

14
pages/invite/index.vue

@ -45,7 +45,8 @@
</view> </view>
<view class="group d-flex m-t-xs"> <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" <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 --> <!-- #ifndef H5 -->
<button type="green" class="btn flex-fill rounded-sm color-plain h-34 btn-2 fn-md bg-buy" <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> @click="$copy(detail.invite_url)">{{$t('invite.a8')}}</button>
@ -237,9 +238,18 @@ export default {
Profile.poster(data).then((res) => { Profile.poster(data).then((res) => {
this.imgs=res.data this.imgs=res.data
uni.showLoading() 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(){ saves(){
var that=this var that=this
const link = document.createElement('a'); const link = document.createElement('a');

7
pages/invite/web-view.vue

@ -1,6 +1,6 @@
<template> <template>
<view> <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> </view>
</template> </template>
@ -8,9 +8,12 @@
export default { export default {
data() { data() {
return { return {
img:'https://bbxr.bxrcos.com/storage/poster/user-1-1.jpg'
} }
}, },
onLoad(val) {
this.img = val.url
},
methods: { methods: {
} }

8
store/index.js

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

Loading…
Cancel
Save