fix
This commit is contained in:
@@ -20,7 +20,6 @@ import { Https } from "@/tool/https";
|
||||
import { useRouter,useRoute } from 'vue-router'
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import { useStore } from "vuex";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import myInformation from '@/component/Account/frontPage/mylnformation.vue';
|
||||
import bind from '@/component/Account/frontPage/bindPage.vue';
|
||||
import cancelRenewal from '@/component/Account/frontPage/cancelRenewal.vue';
|
||||
@@ -33,7 +32,8 @@ export default defineComponent({
|
||||
},
|
||||
setup() {
|
||||
const {t} = useI18n()
|
||||
const router = useRouter()
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const store = useStore();
|
||||
let accountfrontPage = reactive({
|
||||
frontPageList:[
|
||||
@@ -47,8 +47,8 @@ export default defineComponent({
|
||||
title:t('account.cancel'),
|
||||
key:'cancelRenewal',
|
||||
}
|
||||
|
||||
],
|
||||
loadingShow:false,
|
||||
activeKey: '',
|
||||
})
|
||||
let domRefs:any = reactive({
|
||||
@@ -77,49 +77,35 @@ export default defineComponent({
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
let setAllfrontPage = ()=>{
|
||||
return new Promise((resolve,reject)=>{
|
||||
let data = {
|
||||
type:accountfrontPage.activeKey
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.oneClickRead,'',{params:data}).then((rv)=>{
|
||||
resolve(rv)
|
||||
}).catch((err)=>{
|
||||
reject(err
|
||||
)
|
||||
})
|
||||
})
|
||||
}
|
||||
let getHistory = (data:any)=>{
|
||||
return new Promise((resolve,reject)=>{
|
||||
data.type = accountfrontPage.activeKey
|
||||
let url = Https.httpUrls.getHistoryNotification
|
||||
// if(data.type == 'follow'){
|
||||
// url = Https.httpUrls.porfolioGetFollowerList
|
||||
// }
|
||||
Https.axiosPost(url,data).then((rv)=>{
|
||||
if(rv){
|
||||
// domRefs[data.type][0].setfrontPageList(rv,data)
|
||||
resolve(rv)
|
||||
}
|
||||
}).catch((err)=>{
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
const wechatLogin = (value:any)=> {
|
||||
let data = {
|
||||
code : value.code
|
||||
}
|
||||
accountfrontPage.loadingShow = true
|
||||
Https.axiosGet(Https.httpUrls.bindWeChat, {params:data})
|
||||
.then((rv) => {
|
||||
accountfrontPage.loadingShow = false
|
||||
console.log(rv);
|
||||
|
||||
router.push({ query: {} });
|
||||
})
|
||||
.catch((res) => {accountfrontPage.loadingShow = false});
|
||||
}
|
||||
onMounted(()=>{
|
||||
let key = accountfrontPage.frontPageList[0].key
|
||||
accountfrontPage.activeKey = key
|
||||
const data = route.query
|
||||
if(data?.state == 'weiXin'){
|
||||
accountfrontPage.activeKey = 'bind'
|
||||
wechatLogin(data)
|
||||
}
|
||||
})
|
||||
return{
|
||||
...toRefs(accountfrontPage),
|
||||
...toRefs(domRefs),
|
||||
setReadStatus,
|
||||
changeTabs,
|
||||
setAllfrontPage,
|
||||
getHistory,
|
||||
}
|
||||
},
|
||||
data(){
|
||||
|
||||
Reference in New Issue
Block a user