Commit c35e0ddc authored by tanjuanjuan's avatar tanjuanjuan

修改

parent 56bace18
<template> <template>
<view class="main"> <view class="main">
<view class="box1"> <view class="box1">
<view class="box1_house"></view> <view class="box1_house"></view>
<view class="inner"> <view class="inner">
<view class="name"><span id="userName">{{xing}}{{ch}}</span><span>,您好!</span> <view class="name"><span id="userName">{{xing}}{{ch}}</span><span>,您好!</span>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="box2 inner"> <view class="box2 inner">
<view class="item"> <view class="item">
<view class="item_title">公积金余额</view> <view class="item_title">公积金余额</view>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<span class="iconfont icon-jiantou2"></span> <span class="iconfont icon-jiantou2"></span>
</router-link> </router-link>
</view> </view>
<!-- <view class="iboxcommon"> <!-- <view class="iboxcommon">
<view class="thin-line-scaled"></view> <view class="thin-line-scaled"></view>
<router-link to="/list/1" class="iboxc"> <router-link to="/list/1" class="iboxc">
<span>个人缴存证明</span> <span>个人缴存证明</span>
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
</view> --> </view> -->
</view> </view>
</view> </view>
<!-- <view class="item"> <!-- <view class="item">
<view class="item_title">提取</view> <view class="item_title">提取</view>
<view class="item_box"> <view class="item_box">
<view class="iboxcommon"> <view class="iboxcommon">
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
</view> </view>
</view> </view>
</view> --> </view> -->
<!-- <view class="item"> <!-- <view class="item">
<view class="item_title">贷款</view> <view class="item_title">贷款</view>
<view class="item_box"> <view class="item_box">
<view class="ibox"> <view class="ibox">
...@@ -113,11 +113,11 @@ ...@@ -113,11 +113,11 @@
</view> </view>
</view> --> </view> -->
<view class="item"> <view class="item">
<view class="item_title">更多服务{{personPinia.teststr}}</view> <view class="item_title">更多服务{{personStore.teststr}}</view>
<view class="item_box" @click="goToMap">公积金地图</view> <view class="item_box" @click="goToMap">公积金地图</view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
...@@ -130,9 +130,10 @@ ...@@ -130,9 +130,10 @@
} from 'vue' } from 'vue'
import { import {
mapPinia, personPinia mapPinia,
personPinia
} from '@/store'; } from '@/store';
const personStore = personPinia() const personStore = personPinia()
const mapStore = mapPinia() const mapStore = mapPinia()
...@@ -160,12 +161,12 @@ ...@@ -160,12 +161,12 @@
flag4.value = !flag4.value flag4.value = !flag4.value
} }
const pInfo = computed(() => { const pInfo = computed(() => {
return personStore.person||null return personStore.person || null
}) })
// const loadData = computed(() => { // const loadData = computed(() => {
// return store.state.loadData || "" // return store.state.loadData || ""
// }) // })
const goToMap=()=>{ const goToMap = () => {
xma.navigateTo({ xma.navigateTo({
url: "/pages/map/map", url: "/pages/map/map",
animationType: 'pop-in', animationType: 'pop-in',
...@@ -188,35 +189,39 @@ ...@@ -188,35 +189,39 @@
spidno: info.data.uIdCardNo, spidno: info.data.uIdCardNo,
trantime: getCurrentTimestamp() trantime: getCurrentTimestamp()
}, },
header:{ header: {
'content-type': 'application/json' 'content-type': 'application/json'
}, },
method: "GET", method: "GET",
success: function(res) { success: function(res) {
const info = JSON.parse(res.data.data) const info = JSON.parse(res.data.data)
//store.commit('setPersonInfo', info.body.detail); //store.commit('setPersonInfo', info.body.detail);
personStore.person=info.body.detail; personStore.person = info.body.detail;
console.log("pinia person") console.log("pinia person")
console.log(personStore.person.snname) console.log(personStore.person.snname)
//公积金地图 //公积金地图
axios.get('https://onemoment.gywb.cn/back/sgy-gjj/gjj/gjjzx', {
params: { xma.request({
url: 'https://onemoment.gywb.cn/back/sgy-gjj/gjj/gjjzx',
data: {
pageSize: 50, pageSize: 50,
pageIndex: 1 pageIndex: 1
} },
}).then(response => { header: {
let data = JSON.parse(response.data.data) 'content-type': 'application/json'
//store.commit('setApartments', data.data); },
mapStore.mapList=data.data; method: "GET",
console.log("pinia map") success: function(res) {
console.log(typeof mapStore.mapList) let data = JSON.parse(res.data.data)
}).catch(error => { //store.commit('setApartments', data.data);
// 处理错误 mapStore.mapList = data.data;
console.error('Error fetching data:', error); console.log("pinia map")
console.log(typeof mapStore.mapList)
},
}); });
}, },
}); });
}, },
}); });
...@@ -242,7 +247,7 @@ ...@@ -242,7 +247,7 @@
if (pInfo.value) { if (pInfo.value) {
let year = String(pInfo.value.zghjny).slice(0, 4) let year = String(pInfo.value.zghjny).slice(0, 4)
let month = String(pInfo.value.zghjny).slice(4, 6) let month = String(pInfo.value.zghjny).slice(4, 6)
return year + '年'+ month + '月' return year + '年' + month + '月'
} else { } else {
return "" return ""
} }
......
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