Commit 47473efe authored by tanjuanjuan's avatar tanjuanjuan

修改

parent 95e77e4a
...@@ -77,8 +77,8 @@ ...@@ -77,8 +77,8 @@
import { import {
computed computed
} from 'vue' } from 'vue'
import {personPinia} from '@/store' import {infoPinia} from '@/store'
const personStore=personPinia() const infoStore=infoPinia()
const goToIndex = () => { const goToIndex = () => {
xma.navigateTo({ xma.navigateTo({
url: "/pages/index/index", url: "/pages/index/index",
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
} }
const pInfo = computed(()=>{ const pInfo = computed(()=>{
return personStore.person||null return infoStore.person||null
}) })
</script> </script>
......
...@@ -131,16 +131,11 @@ ...@@ -131,16 +131,11 @@
} from 'vue' } from 'vue'
import { import {
mapPinia, infoPinia
personPinia,
loanPinia,
listPinia
} from '@/store'; } from '@/store';
const personStore = personPinia() const infoStore = infoPinia()
const mapStore = mapPinia()
const loanStore = loanPinia()
const listStore=listPinia()
const getCurrentTimestamp = () => { const getCurrentTimestamp = () => {
return Date.now(); return Date.now();
} }
...@@ -164,19 +159,19 @@ ...@@ -164,19 +159,19 @@
const pInfo = computed(() => { const pInfo = computed(() => {
return personStore.person || null return infoStore.person || null
}) })
const spidno = computed(() => { const spidno = computed(() => {
return personStore.spidno || "" return infoStore.spidno || ""
}) })
//职工代码 //职工代码
const spcode = computed(() => { const spcode = computed(() => {
return personStore.person.spcode || "" return infoStore.person.spcode || ""
}) })
const loadData = computed(() => { const loadData = computed(() => {
return loanStore.loanInfo || "" return infoStore.loanInfo || ""
}) })
const goToDetail=()=>{ const goToDetail=()=>{
xma.navigateTo({ xma.navigateTo({
...@@ -215,11 +210,11 @@ ...@@ -215,11 +210,11 @@
range: ['ACCOUNT', 'MOBILE', 'CITIZEN'], range: ['ACCOUNT', 'MOBILE', 'CITIZEN'],
success(info) { success(info) {
//公积金个人信息 //公积金个人信息
personStore.spidno = info.data.uIdCardNo; infoStore.spidno = info.data.uIdCardNo;
xma.request({ xma.request({
url: 'https://onemoment.gywb.cn/back/sgy-gjj/gjj/gjjgrxx', url: 'https://onemoment.gywb.cn/back/sgy-gjj/gjj/gjjgrxx',
data: { data: {
spidno: personStore.spidno, spidno: infoStore.spidno,
trantime: getCurrentTimestamp() trantime: getCurrentTimestamp()
}, },
header: { header: {
...@@ -228,7 +223,7 @@ ...@@ -228,7 +223,7 @@
method: "GET", method: "GET",
success: function(res) { success: function(res) {
const info = JSON.parse(res.data.data) const info = JSON.parse(res.data.data)
personStore.person = info.body.detail; infoStore.person = info.body.detail;
//公积金缴费明细 //公积金缴费明细
xma.request({ xma.request({
...@@ -247,7 +242,7 @@ ...@@ -247,7 +242,7 @@
method: "POST", method: "POST",
success: function(res) { success: function(res) {
const data = JSON.parse(res.data.data) const data = JSON.parse(res.data.data)
listStore.listInfo = data.data.records[0].list.acc_info infoStore.listInfo = data.data.records[0].list.acc_info
}}) }})
//公积金贷款信息 //公积金贷款信息
xma.request({ xma.request({
...@@ -263,7 +258,7 @@ ...@@ -263,7 +258,7 @@
method: "GET", method: "GET",
success: function(res) { success: function(res) {
const data = JSON.parse(res.data.data) const data = JSON.parse(res.data.data)
loanStore.loanInfo = data.data.records[0].list.acc_info infoStore.loanInfo = data.data.records[0].list.acc_info
}, },
}); });
//公积金地图 //公积金地图
...@@ -279,7 +274,7 @@ ...@@ -279,7 +274,7 @@
method: "GET", method: "GET",
success: function(res) { success: function(res) {
let data = JSON.parse(res.data.data) let data = JSON.parse(res.data.data)
mapStore.mapList = data.data; infoStore.mapList = data.data;
}, },
}); });
......
...@@ -85,10 +85,11 @@ ...@@ -85,10 +85,11 @@
useRoute useRoute
} from 'vue-router' } from 'vue-router'
import { listPinia } from '@/store'; import {infoPinia} from '@/store'
const listStore=listPinia() const infoStore=infoPinia()
const dataSets = computed(() => { const dataSets = computed(() => {
return listStore.listInfo || [] return infoStore.listInfo || []
}) })
const tempDataSets = ref([]) const tempDataSets = ref([])
const route = useRoute() const route = useRoute()
......
...@@ -68,8 +68,9 @@ ...@@ -68,8 +68,9 @@
import { import {
computed computed
} from 'vue' } from 'vue'
import {loanPinia} from '@/store' import {infoPinia} from '@/store'
const loanStore=loanPinia() const infoStore=infoPinia()
const goToIndex = () => { const goToIndex = () => {
xma.navigateTo({ xma.navigateTo({
url: "/pages/index/index", url: "/pages/index/index",
...@@ -78,7 +79,7 @@ ...@@ -78,7 +79,7 @@
}) })
} }
const loadData = computed(() => { const loadData = computed(() => {
return loanStore.loanInfo || "" return infoStore.loanInfo || ""
}) })
</script> </script>
......
...@@ -24,10 +24,8 @@ ...@@ -24,10 +24,8 @@
</template> </template>
<script setup> <script setup>
import { import {infoPinia} from '@/store'
mapPinia const infoStore=infoPinia()
} from '@/store';
const mapStore=mapPinia()
import { import {
ref, ref,
computed computed
...@@ -47,7 +45,7 @@ ...@@ -47,7 +45,7 @@
window.location.href = "tel:" + number window.location.href = "tel:" + number
} }
const apartments = computed(() => { const apartments = computed(() => {
return mapStore.mapList || [] return infoStore.mapList || []
}) })
const goToIndex = () => { const goToIndex = () => {
xma.navigateTo({ xma.navigateTo({
......
...@@ -5,10 +5,5 @@ const store = createPinia(); ...@@ -5,10 +5,5 @@ const store = createPinia();
export default store; export default store;
// 模块统一导出 // 模块统一导出
export * from './person'; export * from './info';
// 模块统一导出
export * from './map';
// 模块统一导出
export * from './loan';
// 模块统一导出
export * from './list';
...@@ -2,8 +2,11 @@ import { defineStore } from 'pinia'; ...@@ -2,8 +2,11 @@ import { defineStore } from 'pinia';
import { ref } from 'vue'; import { ref } from 'vue';
export const personPinia = defineStore('person', () => { export const infoPinia = defineStore('info', () => {
const person = ref(null) const person = ref(null)
const spidno=ref(0) const spidno=ref(0)
return { person,spidno } const mapList = ref([])
const loanInfo = ref(null)
const listInfo = ref(null)
return { person,spidno,mapList,loanInfo,listInfo }
}) })
\ No newline at end of file
import { defineStore } from 'pinia';
import { ref } from 'vue';
export const listPinia = defineStore('list', () => {
const listInfo = ref(null)
return { listInfo }
})
\ No newline at end of file
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
import { defineStore } from 'pinia';
import { ref } from 'vue';
export const mapPinia = defineStore('map', () => {
const mapList = ref([])
return { mapList }
})
\ 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