Commit 2229b7b7 authored by tanjuanjuan's avatar tanjuanjuan

修改

parent f4ebbeda
......@@ -92,7 +92,7 @@
</view>
</view>
</view> -->
<!-- <view class="item">
<view class="item">
<view class="item_title">贷款</view>
<view class="item_box">
<view class="ibox">
......@@ -111,7 +111,7 @@
</router-link>
</view>
</view>
</view> -->
</view>
<view class="item">
<view class="item_title">更多服务{{personStore.teststr}}</view>
<view class="item_box" @click="goToMap">公积金地图</view>
......@@ -132,12 +132,13 @@
import {
mapPinia,
personPinia
personPinia,
loanPinia
} from '@/store';
const personStore = personPinia()
const mapStore = mapPinia()
const loanStore = loanPinia()
const getCurrentTimestamp = () => {
return Date.now();
}
......@@ -145,10 +146,7 @@
const flag2 = ref(true)
const flag3 = ref(true)
const flag4 = ref(true)
//const pInfo = ref(store.state.pInfo||null)
// const xing = ref(null)
// const ch = ref(null)
//const YandM = ref(null)
const toggleFlag1 = () => {
flag1.value = !flag1.value
}
......@@ -161,14 +159,14 @@
const toggleFlag4 = () => {
flag4.value = !flag4.value
}
const pInfo = computed(() => {
return personStore.person || null
})
// const loadData = computed(() => {
// return store.state.loadData || ""
// })
const loadData = computed(() => {
return loanStore.loanInfo || ""
})
const goToMap = () => {
xma.navigateTo({
url: "/pages/map/map",
......@@ -184,7 +182,6 @@
goLogin: true,
range: ['ACCOUNT', 'MOBILE', 'CITIZEN'],
success(info) {
//store.commit('setCardNumber', info.data.uIdCardNo);
//公积金个人信息
xma.request({
url: 'https://onemoment.gywb.cn/back/sgy-gjj/gjj/gjjgrxx',
......@@ -197,17 +194,10 @@
},
method: "GET",
success: function(res) {
console.log("调查类型")
console.log(typeof res.data.data)
console.log(res.data.data)
const info = JSON.parse(res.data.data)
//const info = JSON.parse(res.data.data)
//store.commit('setPersonInfo', info.body.detail);
personStore.person = info.body.detail;
console.log("pinia person")
console.log(personStore.person)
//公积金地图
//公积金地图
xma.request({
url: 'https://onemoment.gywb.cn/back/sgy-gjj/gjj/gjjzx',
data: {
......@@ -220,10 +210,26 @@
method: "GET",
success: function(res) {
let data = JSON.parse(res.data.data)
//store.commit('setApartments', data.data);
mapStore.mapList = data.data;
console.log("pinia map")
console.log(typeof mapStore.mapList)
},
});
//公积金贷款信息
xma.request({
url: 'https://onemoment.gywb.cn/back/sgy-gjj/gjj/gjjdkxx',
data: {
"spidno": spidno.value,
"spcode": spcode.value,
"iseqno": "string"
},
header: {
'content-type': 'application/json'
},
method: "GET",
success: function(res) {
const data = JSON.parse(res.data.data)
loanStore.loanInfo=data.data.records[0].list.acc_info
},
});
},
......@@ -231,25 +237,25 @@
},
});
const xing = computed(() => {
if (pInfo.value) {
return pInfo.value.spname.slice(0, 1)
}
})
if (pInfo.value) {
return pInfo.value.spname.slice(0, 1)
}
})
const ch = computed(() => {
if (pInfo.value) {
return pInfo.value.sex == '女' ? '女士' : '先生';
}
})
const YandM= computed(() => {
if (pInfo.value) {
let year = pInfo.value.zghjny.slice(0, 4)
let month = pInfo.value.zghjny.slice(4, 6)
return year + '年' + month + '月'
}
})
const ch = computed(() => {
if (pInfo.value) {
return pInfo.value.sex == '女' ? '女士' : '先生';
}
})
const YandM = computed(() => {
if (pInfo.value) {
let year = pInfo.value.zghjny.slice(0, 4)
let month = pInfo.value.zghjny.slice(4, 6)
return year + '年' + month + '月'
}
})
// onMounted(() => {})
</script>
<style scoped>
......
import { defineStore } from 'pinia';
import { ref } from 'vue';
export const loanPinia = defineStore('loan', () => {
const loanInfo = ref(null)
return { loanInfo }
})
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment