luyisha 3 years ago
parent
commit
f9eea84db1
  1. 1
      api/serve/index.js
  2. 61
      pages/base/home.vue
  3. 4
      pages/exchange/open-position.vue

1
api/serve/index.js

@ -85,6 +85,7 @@ x.fn = x.prototype = {
console.info(newMsg) console.info(newMsg)
if(Cache.get(newMsg).data){ if(Cache.get(newMsg).data){
if(newMsg!='_user_walletImage'&& newMsg!='_user_getAuthInfo' && newMsg!='_user_withdrawalBalance' if(newMsg!='_user_walletImage'&& newMsg!='_user_getAuthInfo' && newMsg!='_user_withdrawalBalance'
&& newMsg!='_article_detail'
&& newMsg!='_wallet_getBalance' && newMsg!='_contract_getMarketInfo'&& newMsg!='_contract_openNum'){ && newMsg!='_wallet_getBalance' && newMsg!='_contract_getMarketInfo'&& newMsg!='_contract_openNum'){
resolve(Cache.get(newMsg).data); resolve(Cache.get(newMsg).data);
} }

61
pages/base/home.vue

@ -8,10 +8,10 @@
:left-click="personalCenter" :left-click="personalCenter"
> >
<template #left> <template #left>
<van-icon name="user-circle-o" class="fn-25 color-theme-1" /> <van-icon name="user-circle-o" class="fn-25 color-theme-1" style="color: #326AEB;" />
<view class="d-flex align-center justify-center"> <view class="d-flex align-center justify-center">
<text class="p-l-md fn-18 color-light">{{ app.appName }} <!-- <text class="p-l-md fn-18 color-light">{{ app.appName }} -->
<span class="fn-16 m-l-xs">{{$t('first.a2')}}</span> <!-- <span class="fn-16 m-l-xs">{{$t('first.a2')}}</span> -->
</text> </text>
</view> </view>
</template> </template>
@ -412,7 +412,12 @@
<view class="title1">{{ $t("cxiNewText.a71") }}</view> <view class="title1">{{ $t("cxiNewText.a71") }}</view>
<view class="title2">{{ $t("cxiNewText.a72") }}</view> <view class="title2">{{ $t("cxiNewText.a72") }}</view>
<view class=""> <view class="">
<view class=""> <v-link class="" v-for="(articleItem, articleIndex) in articleList" :key="articleIndex" :to="'/pages/help/detail?id='+articleItem.id">
<view class="list-box m-b-md m-t-lg" :style="{backgroundImage: bgUrl(articleItem.full_cover)}"></view>
<!-- <view class="list-box m-b-md m-t-lg" :style="{backgroundImage: `url('${articleItem.full_cover} ');`}"></view> -->
<view class="">{{ articleItem.title }}</view>
</v-link>
<!-- <view class="">
<view class="list-box m-b-md m-t-lg" style="background-image: url('../../static/img/trusted-section_2.png');"></view> <view class="list-box m-b-md m-t-lg" style="background-image: url('../../static/img/trusted-section_2.png');"></view>
<view class="">{{ $t("cxiNewText.a77") }}</view> <view class="">{{ $t("cxiNewText.a77") }}</view>
</view> </view>
@ -423,7 +428,7 @@
<view class=""> <view class="">
<view class="list-box m-b-md m-t-lg" style="background-image: url('../../static/img/trusted-section_4.png');"></view> <view class="list-box m-b-md m-t-lg" style="background-image: url('../../static/img/trusted-section_4.png');"></view>
<view class="">{{ $t("cxiNewText.a78") }}</view> <view class="">{{ $t("cxiNewText.a78") }}</view>
</view> </view> -->
</view> </view>
</view> </view>
<!-- 随时随地开启交易 --> <!-- 随时随地开启交易 -->
@ -670,6 +675,7 @@ import math from "@/utils/class/math.js";
import Member from "@/api/member"; import Member from "@/api/member";
import app from "@/app"; import app from "@/app";
import Profile from "@/api/profile"; import Profile from "@/api/profile";
import College from "@/api/college";
import { mapState, mapActions } from "vuex"; import { mapState, mapActions } from "vuex";
import {handleClipboard} from '../../utils/class/copy.js' import {handleClipboard} from '../../utils/class/copy.js'
import qs from "qs"; import qs from "qs";
@ -728,7 +734,10 @@ export default {
detail:{}, detail:{},
num:0, num:0,
scrollTop:0, scrollTop:0,
refreshing:false refreshing:false,
guideList: [],//
guideId: '',// ID
articleList: []
}; };
}, },
computed: { computed: {
@ -1019,11 +1028,49 @@ export default {
this.detail = res.data this.detail = res.data
}) })
}, },
/**
* 获取课程分类和列表
*/
getCollegeLinks() {
College.getCategoryList().then(res => {
console.log(res, 11111);
let list = res.data;
list.forEach(item => {
if (this.guideId === '') {
this.guideId = item.id;
this.getArticleList();
}
this.guideList.push({
url : `/college/list/${item.id}`,
label : item.name,
value : item.name,
id : item.id
})
})
})
},
getArticleList() {
College.getArticleList({
id:this.guideId
}).then(res => {
let data = res.data;
this.articleList = data.splice(0,3);
console.log(this.articleList, 222222);
setTimeout(() => {
this.skroll();
}, 100);
})
},
bgUrl(url){
return "url('"+url+"')";
}
}, },
mounted() { mounted() {
this.indexData(); this.indexData();
this.indexMarketList(); this.indexMarketList();
this.getCurrencyExCny() this.getCurrencyExCny();
this.getCollegeLinks();
if (this.isLogin) { if (this.isLogin) {
this.createWalletAddress(); this.createWalletAddress();
this.getAuthInfo() this.getAuthInfo()

4
pages/exchange/open-position.vue

@ -204,7 +204,7 @@
class="w-max rounded" class="w-max rounded"
> >
<span class="but_text">{{ $t("contract.c0") }}</span> <span class="but_text">{{ $t("contract.c0") }}</span>
<span class="fn-10 but_right">{{ $t("contract.e0") }}</span> <!-- <span class="fn-10 but_right">{{ $t("contract.e0") }}</span> -->
</v-button> </v-button>
</template> </template>
<template v-else> <template v-else>
@ -237,7 +237,7 @@
class="w-max rounded" class="w-max rounded"
> >
<span class="but_text">{{ $t("contract.c2") }}</span> <span class="but_text">{{ $t("contract.c2") }}</span>
<span class="fn-10 but_right">{{ $t("contract.e2") }}</span> <!-- <span class="fn-10 but_right">{{ $t("contract.e2") }}</span> -->
</v-button> </v-button>
</template> </template>
<template v-else> <template v-else>

Loading…
Cancel
Save