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

View File

@ -100,8 +100,9 @@
<div class="content">
<div class="title">{{lan.$t('guanyubeelink')}}</div>
<div class="rowline"></div>
<div class="texts">
{{lan.$t("guanyuneirong")}}
<!-- {{lan.$t("guanyuneirong")}} -->
<div class="texts" v-html="text[0].content">
</div>
<div class="relation">
<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"
}
}
const text = computed(()=> store.state.infotext)
return {
formLayout,
tabselected,
@ -317,7 +318,8 @@ export default defineComponent({
lan,
slogin,
mrqh,
hqqh
hqqh,
text
};
},
});
@ -502,7 +504,8 @@ export default defineComponent({
}
}
.bottom {
height: 317px;
// height: 317px;
padding-bottom: 30px;
margin-top: 44px;
background: #08ae98;
color: white;

View File

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