Browse Source

定位问题

master
unknown 1 year ago
parent
commit
e8ca545457
  1. 2
      components/searchRow/searchRow.vue
  2. 2
      config/site.config.js
  3. 11
      manifest.json
  4. 6
      pages/indexEntry/enroll/registInfo/comp/searchSchool.vue
  5. 12
      pages/indexEntry/enroll/registInfo/registInfo.vue
  6. 42
      pages/tabbar/index/index.vue
  7. 12
      pages/tabbar/mine/index.vue
  8. 30
      store/modules/user.js
  9. 4
      uni_modules/uview-ui/components/u-search/u-search.vue

2
components/searchRow/searchRow.vue

@ -5,7 +5,7 @@
<image src="@/static/images/index/searchIcon.png" mode=""></image>
</view>
<view class="inputBox">
<u-search :placeholder="placeholder" v-model="keyword" :color="'#fff'" placeholderColor="#fff" searchIcon="" :bgColor="'transparent'" :showAction="false" @search="searchFn" @clear="searchFn"></u-search>
<u-search :placeholder="placeholder" v-model="keyword" :color="'#fff'" placeholderColor="#fff" :bgColor="'transparent'" :showAction="false" @search="searchFn" @clear="searchFn"></u-search>
</view>
</view>
</view>

2
config/site.config.js

@ -4,6 +4,6 @@ module.exports = {
H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理
WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.26:48080/',//非代理地址
TEMP_HOST: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.26:48080/',
httpPrefix: '/app-api/',
httpPrefix: 'app-api/',
imgUrl: 'http://jxtemp.oss-cn-hangzhou.aliyuncs.com/defaultImages/app/bigImg/'
};

11
manifest.json

@ -59,7 +59,7 @@
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wxae509f512c11c039",
"appid" : "wx2d71605af3b620e6",
"setting" : {
"urlCheck" : true,
"es6" : true,
@ -108,6 +108,15 @@
"router" : {
"mode" : "hash",
"base" : "/h5"
},
"sdkConfigs" : {
"maps" : {
"amap" : {
"key" : "2BTBZ-6BQRB-ZG4UG-NOYYG-KZMH7-B4BYN",
"securityJsCode" : "",
"serviceHost" : ""
}
}
}
}
}

6
pages/indexEntry/enroll/registInfo/comp/searchSchool.vue

@ -42,11 +42,17 @@
pageSize: 20,
lat: 30.27419537786047,
lng: 120.20633397715788,
sercheType: '1'
}
}
},
created() {
if(this.vuex_cityInfo.lat) {
this.params.lat = this.vuex_cityInfo.lat
this.params.lng = this.vuex_cityInfo.lng
}
this.schoolPageFn()
},
methods: {
//

12
pages/indexEntry/enroll/registInfo/registInfo.vue

@ -30,7 +30,7 @@
<view class="row">
<view class="lab">选择车型</view>
<view class="rightCon">
<view class="row" @click="showCar=true">
<view class="row" @click="showCarClick">
<view class="val">
<mySelect :value="form.car"/>
</view>
@ -55,8 +55,8 @@
</view>
<view class="row">
<view class="lab">选择教练</view>
<view class="rightCon">
<view class="row" @click="goCoach">
<view class="rightCon" @click="goCoach">
<view class="row" >
<view class="val">
<mySelect :value="form.coach"/>
</view>
@ -259,7 +259,7 @@
</u-popup>
<!-- 选择班型 -->
<u-picker :show="showClassModel" :columns="columnsClassModel" keyName="label" @confirm="confirmClassModel"></u-picker>
<u-picker :show="showClassModel" :columns="columnsClassModel" keyName="label" @confirm="confirmClassModel" @close="showClassModel=false"></u-picker>
<!-- 选择车型 -->
<u-picker :show="showCar" :columns="columnsCar" keyName="label" @confirm="confirmCar"></u-picker>
<!-- 原驾驶证初领日期 -->
@ -359,6 +359,10 @@
this.showCar = false
this.form.car = item
},
showCarClick() {
if(!this.form.school) return this.$u.toast('请先选择驾校')
this.showCar = true
},
//
goCoach() {
if(!this.form.schoolId) return this.$u.toast('请先选择驾校')

42
pages/tabbar/index/index.vue

@ -40,7 +40,7 @@
<!-- 精钢区 -->
<view class="card traTop">
<view class="ul">
<view class="li" v-for="(item,index) in entrySection" :key="index" @click="item.click(item)">
<view class="li" v-for="(item,index) in entrySection" :key="index" @tap="$goPage(item.url)">
<view class="icon">
<image :src="item.icon" mode=""></image>
</view>
@ -128,15 +128,16 @@
text: '我要报名',
icon: require('../../../static/images/index/ic_baoming.png'),
url: '/pages/indexEntry/enroll/enroll',
click: (item)=>{
this.$goPage(item.url)
goPage: function (){
console.log(666)
// this.$goPage(item.url)
}
},
{
text: '找驾校',
icon: require('../../../static/images/index/ic_jiaxiao.png'),
url: '/pages/indexEntry/findShcool/findShcool',
click: (item)=>{
goPage: (item)=>{
this.$goPage(item.url)
}
},
@ -144,32 +145,32 @@
text: '找考场',
icon: require('../../../static/images/index/ic_kaochang.png'),
url: '/pages/indexEntry/examines/examines',
click: (item)=>{
goPage: ((item)=>{
this.$goPage(item.url)
}
})
},
{
text: '找驾驶馆',
icon: require('../../../static/images/index/ic_jsg.png'),
url: '/pages/carEntry/simulateAppointment/simulateAppointment',
click: (item)=>{
goPage: ((item)=>{
this.$goPage(item.url)
}
})
},
{
text: '找陪练',
icon: require('../../../static/images/index/ic_peilian.png'),
click: (item)=>{
goPage: ((item)=>{
this.$u.toast('正在开发中,敬请期待...')
}
})
},
{
text: '理论学习',
icon: require('../../../static/images/index/ic_lilun.png'),
url: '/pages/indexEntry/theory/theory',
click: (item)=>{
goPage: ((item)=>{
this.$goPage(item.url)
}
})
},
],
moreSection: [{
@ -276,9 +277,20 @@
}
},
async onLoad() {
await this.$store.dispatch('getCity')
console.log('有 啦')
console.log(this.$store.state.user.vuex_cityInfo)
// uni.getLocation({
// type: 'wgs84',
// success: function (res) {
// console.log('' + res.longitude);
// console.log('' + res.latitude);
// },
// fail(err) {
// console.log(err)
// }
// });
if(!this.$store.state.user.vuex_cityInfo.lat) {
await this.$store.dispatch('getCity')
}
// console.log(this.$store.state.user.vuex_cityInfo)
},

12
pages/tabbar/mine/index.vue

@ -1,9 +1,9 @@
<template>
<view class="pageBgImg">
<!-- 学员名字 -->
<view class="top_row flex-b" @click="$goPage('/pages/mineEntry/personaInfo/personaInfo')">
<view class="top_row flex-b" @click="topClick">
<view class="flex">
<view class="userName">Hi{{ vuex_userInfo.nickname?vuex_userInfo.nickname:vuex_userInfo.mobile}}</view>
<view class="userName">Hi{{ vuex_userInfo.nickname?vuex_userInfo.nickname:vuex_userInfo.mobile?vuex_userInfo.mobile:'请登录'}}</view>
<view class="arrowIcon">
<image src="../../../static/images/userCenter/ic_gengduo.png" mode=""></image>
</view>
@ -135,7 +135,13 @@
// uni.hideTabBar();
},
methods: {
goPage() {}
topClick() {
if(!this.vuex_userInfo.mobile) {
this.$goPage('/pages/userCenter/login/login')
}else {
this.$goPage('/pages/mineEntry/personaInfo/personaInfo')
}
}
}
}
</script>

30
store/modules/user.js

@ -125,8 +125,10 @@ function gaoDeFn(longitude,latitude,commit,resolve, reject,) {
}
function wxAdsFn(longitude,latitude, commit,resolve, reject,) {
console.log(longitude)
console.log(latitude)
var qqmapKey = new qqmapWx({
key: '2BTBZ-6BQRB-ZG4UG-NOYYG-KZMH7-B4BYN'
key: 'NRWBZ-TKRWV-CSAPH-5PFDS-J4HT6-IWF4O'
})
qqmapKey.reverseGeocoder({
location: {
@ -134,8 +136,8 @@ function wxAdsFn(longitude,latitude, commit,resolve, reject,) {
longitude:longitude
},
success(res2) {
// console.log('城市信息')
// console.log(res2.result)
console.log('城市信息')
console.log(res2)
let result = res2.result
let obj = {
lat: latitude,
@ -151,24 +153,32 @@ function wxAdsFn(longitude,latitude, commit,resolve, reject,) {
},
fail: function(res3) {
reject(res3)
console.log('出什么问题了?')
console.log(res3)
let obj = {
lat: latitude,
lng: longitude
}
// reject(res3)
commit('update_vuex_cityInfo', obj)
uni.hideLoading();
},
})
}
function getCityInfo(resolve, reject, commit) {
uni.showLoading({
title: '加载中...'
})
// uni.showLoading({
// title: '加载中...'
// })
console.log('来到这是里了吗?')
uni.getLocation({
type: 'wgs84',
// type: 'gcj02',
success: function(res) {
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res);
// #ifdef APP-PLUS||H5
// console.log('当前位置的纬度:' + res);
// #ifdef H5
gaoDeFn(res.longitude,res.latitude, commit, resolve, reject,);
// #endif
// #ifdef MP-WEIXIN

4
uni_modules/uview-ui/components/u-search/u-search.vue

@ -19,14 +19,14 @@
<text class="u-search__content__label">{{ label }}</text>
</slot>
</template>
<view class="u-search__content__icon">
<!-- <view class="u-search__content__icon">
<u-icon
@tap="clickIcon"
:size="searchIconSize"
:name="searchIcon"
:color="searchIconColor ? searchIconColor : color"
></u-icon>
</view>
</view> -->
<input
confirm-type="search"
@blur="blur"

Loading…
Cancel
Save