flat: 添加定位

This commit is contained in:
Apcallover
2024-06-05 14:30:33 +08:00
parent f3eef9f396
commit 21835e52c1
7 changed files with 867 additions and 773 deletions

View File

@@ -64,8 +64,36 @@ const user = {
seeEnterprise: getStore({ //用户发送短信次数
name: 'enterprise'
}) || 0, // 0 个体招工 企业招工
userLocation: null
},
actions: {
getUserLocation({
commit,
dispatch
}) {
console.log('getUserLocation null1')
commit('setLocation', {
latitude: 31.133980,
longitude: 104.404419,
})
// uni.getLocation({
// type: 'gcj02',
// success: function(res) {
// const {
// longitude,
// latitude
// } = res
// commit('setLocation', {
// longitude,
// latitude
// })
// },
// fail: function(err) {
// commit('setLocation', null)
// },
// complete: function(e) {}
// })
},
//用户点击radio按钮
UserCheckedBtn({
commit
@@ -186,6 +214,9 @@ const user = {
},
},
mutations: {
setLocation(state, val) {
state.userLocation = val
},
setEnterprise(state, val) { // 0 个体招工 企业招工
state.seeEnterprise = val;
setStore({