This commit is contained in:
theluyuan 2020-12-11 10:12:31 +08:00
parent bf97b34a01
commit 864caf9a54
4 changed files with 26 additions and 12 deletions

View File

@ -56,6 +56,7 @@ export default defineComponent({
store.commit("setWlan"); store.commit("setWlan");
toindex() toindex()
} }
store.dispatch("getinfotext");
const zh = zhCN; const zh = zhCN;
const en = enUS; const en = enUS;

View File

@ -1,4 +1,4 @@
import { getaddr, userinfo } from '@/api'; import { getaddr, getarticle, userinfo } from '@/api';
import { setLanvuage } from '@/api/base'; import { setLanvuage } from '@/api/base';
import { getValue, saveValue } from '@/utils/common'; import { getValue, saveValue } from '@/utils/common';
import { geti18n } from '@/utils/i18n'; import { geti18n } from '@/utils/i18n';
@ -72,7 +72,8 @@ export default createStore({
code: "", code: "",
ename: "", ename: "",
name: "", name: "",
} },
infotext:[{title:"",content:""},{title:"",content:""}]
}, },
mutations: { mutations: {
setseting(state, info){ setseting(state, info){
@ -120,6 +121,9 @@ export default createStore({
state.userinfo.languageValue = !getValue("Lanvuage") ? 'zh' : getValue("Lanvuage"); state.userinfo.languageValue = !getValue("Lanvuage") ? 'zh' : getValue("Lanvuage");
state.userinfo.language = (!getValue("Lanvuage") ? 'zh' : getValue("Lanvuage")) == 'zh' ? '中文' : 'English'; state.userinfo.language = (!getValue("Lanvuage") ? 'zh' : getValue("Lanvuage")) == 'zh' ? '中文' : 'English';
} }
},
setinfotext(state, data){
state.infotext = data;
} }
}, },
actions: { actions: {
@ -143,6 +147,11 @@ export default createStore({
const info = await getaddr(); const info = await getaddr();
console.log(info,11256445); console.log(info,11256445);
commit("setquhao", info) commit("setquhao", info)
},
async getinfotext({ commit }){
const info = await getarticle();
commit("setinfotext", info)
} }
}, },
modules: { modules: {

View File

@ -100,8 +100,9 @@
<div class="content"> <div class="content">
<div class="title">{{lan.$t('guanyubeelink')}}</div> <div class="title">{{lan.$t('guanyubeelink')}}</div>
<div class="rowline"></div> <div class="rowline"></div>
<div class="texts"> <!-- {{lan.$t("guanyuneirong")}} -->
{{lan.$t("guanyuneirong")}}
<div class="texts" v-html="text[0].content">
</div> </div>
<div class="relation"> <div class="relation">
<div class="more" @click="navto()">{{lan.$t('liaojiegengduo')}}</div> <div class="more" @click="navto()">{{lan.$t('liaojiegengduo')}}</div>
@ -296,7 +297,7 @@ export default defineComponent({
window.location.href="https://api.weibo.com/oauth2/authorize?client_id=2754574056&response_type=code&redirect_uri=https://beelink.theluyuan.com/wblogin" window.location.href="https://api.weibo.com/oauth2/authorize?client_id=2754574056&response_type=code&redirect_uri=https://beelink.theluyuan.com/wblogin"
} }
} }
const text = computed(()=> store.state.infotext)
return { return {
formLayout, formLayout,
tabselected, tabselected,
@ -317,7 +318,8 @@ export default defineComponent({
lan, lan,
slogin, slogin,
mrqh, mrqh,
hqqh hqqh,
text
}; };
}, },
}); });
@ -502,7 +504,8 @@ export default defineComponent({
} }
} }
.bottom { .bottom {
height: 317px; // height: 317px;
padding-bottom: 30px;
margin-top: 44px; margin-top: 44px;
background: #08ae98; background: #08ae98;
color: white; color: white;

View File

@ -65,11 +65,12 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, ref } from "vue"; import { computed, defineComponent, ref } from "vue";
import NavBottom from "@/components/NavBottom.vue"; import NavBottom from "@/components/NavBottom.vue";
import { feedback, getarticle } from '@/api'; import { feedback, getarticle } from '@/api';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { useI18n } from '@/utils/i18n'; import { useI18n } from '@/utils/i18n';
import store from "@/store";
export default defineComponent({ export default defineComponent({
name: "Aboutus", name: "Aboutus",
components: { components: {
@ -81,10 +82,10 @@ export default defineComponent({
const value = ref("") const value = ref("")
console.log(useRoute().query) console.log(useRoute().query)
const selected=useRoute().query.selected const selected=useRoute().query.selected
const text = ref<any>([{title:"",content:""},{title:"",content:""}]) const text = computed(()=> store.state.infotext)
getarticle().then((res)=>{ // getarticle().then((res)=>{
text.value = res // text.value = res
}) // })
if(useRoute().query.selected){ if(useRoute().query.selected){
tabindex.value=Number(selected) tabindex.value=Number(selected)
} }