|
@@ -122,6 +122,7 @@
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
var that
|
|
var that
|
|
|
|
+ import permision from "@/js_sdk/wa-permission/permission.js"
|
|
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
|
|
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
|
|
import {
|
|
import {
|
|
mapState
|
|
mapState
|
|
@@ -192,28 +193,27 @@
|
|
// this.upCallback({page});
|
|
// this.upCallback({page});
|
|
// },
|
|
// },
|
|
},
|
|
},
|
|
|
|
+ onLoad() {
|
|
|
|
+ this.checkOpenGPSServiceByAndroidIOS()
|
|
|
|
+ },
|
|
onShow() {
|
|
onShow() {
|
|
- //获取上一次点击起装卸地
|
|
|
|
- if (uni.getStorageSync('fPlaceObj')) {
|
|
|
|
- this.startPlace = uni.getStorageSync('fPlaceObj');
|
|
|
|
-
|
|
|
|
- } else {
|
|
|
|
- // #ifdef APP-PLUS
|
|
|
|
- var that=this
|
|
|
|
- console.log('good',1111)
|
|
|
|
- // this.$nextTick(function(){
|
|
|
|
- // this.getLngLat();
|
|
|
|
- // })
|
|
|
|
- // #endif
|
|
|
|
- }
|
|
|
|
- if (uni.getStorageSync('sPlaceObj')) {
|
|
|
|
- this.endPlace = uni.getStorageSync('sPlaceObj');
|
|
|
|
-
|
|
|
|
- } else {
|
|
|
|
- this.endPlace.selected = '全国'
|
|
|
|
- }
|
|
|
|
- this.upCallback({size:10,num:1})
|
|
|
|
|
|
+
|
|
var that= this
|
|
var that= this
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ // var photol=await permision.checkSystemEnableLocation()
|
|
|
|
+ if(uni.getStorageSync('confirm_location')){
|
|
|
|
+ that.get_localtion_permission()
|
|
|
|
+ }
|
|
|
|
+ //获取上一次点击起装卸地
|
|
|
|
+ if (uni.getStorageSync('fPlaceObj')) {
|
|
|
|
+ that.startPlace = uni.getStorageSync('fPlaceObj');
|
|
|
|
+ }
|
|
|
|
+ if (uni.getStorageSync('sPlaceObj')) {
|
|
|
|
+ that.endPlace = uni.getStorageSync('sPlaceObj');
|
|
|
|
+ }
|
|
|
|
+ that.upCallback({size:10,num:1})
|
|
|
|
+ },1500)
|
|
|
|
+
|
|
that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
|
|
that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
|
|
reCommonId: this.userInfo.id,
|
|
reCommonId: this.userInfo.id,
|
|
}).then(res3 => {
|
|
}).then(res3 => {
|
|
@@ -280,9 +280,164 @@
|
|
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ async get_localtion_permission() {
|
|
|
|
+ var photol=await permision.checkSystemEnableLocation()
|
|
|
|
+ if(photol == true){
|
|
|
|
+ uni.removeStorageSync('confirm_location')
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '只有文字弹窗',
|
|
|
|
+ icon: 'none', //如果要纯文本,不要icon,将值设为'none'
|
|
|
|
+ duration: 2000 //持续时间为 2秒
|
|
|
|
+ })
|
|
|
|
+ this.getLngLat()
|
|
|
|
+ }else{
|
|
|
|
+ if(uni.getStorageSync('confirm_location')){
|
|
|
|
+ uni.removeStorageSync('confirm_location')
|
|
|
|
+ }
|
|
|
|
+ uni.setStorageSync('fPlaceObj',{
|
|
|
|
+ fchoosearea:'全部',
|
|
|
|
+ fchoosecity:'市辖区',
|
|
|
|
+ fchooseprovince:'北京',
|
|
|
|
+ selected:'东城'
|
|
|
|
+ })
|
|
|
|
+ uni.setStorageSync('sPlaceObj',{
|
|
|
|
+ schoosearea:'请选择区',
|
|
|
|
+ schoosecity:'请选择市',
|
|
|
|
+ schooseprovince:'全国',
|
|
|
|
+ selected:'全国'
|
|
|
|
+ })
|
|
|
|
+ uni.setStorageSync('longitudeAndLatitude','116.3972,39.9096')
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ async getLngLat(){
|
|
|
|
+ await uni.getLocation({
|
|
|
|
+ type: 'gcj02',
|
|
|
|
+ geocode: true,
|
|
|
|
+ success: res => {
|
|
|
|
+ if (res.latitude) {
|
|
|
|
+ if(res.address.city){
|
|
|
|
+ if(res.address.city.indexOf('市')!=-1){
|
|
|
|
+ res.address.city=res.address.city.substring(0,res.address.city.length-1)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(res.address.province){
|
|
|
|
+ if(res.address.province.indexOf('省')!=-1){
|
|
|
|
+ res.address.province=res.address.province.substring(0,res.address.province.length-1)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ uni.setStorageSync('fPlaceObj',{
|
|
|
|
+ fchoosearea:'全部',
|
|
|
|
+ fchoosecity:res.address.city,
|
|
|
|
+ fchooseprovince:res.address.province,
|
|
|
|
+ selected:res.address.city
|
|
|
|
+ })
|
|
|
|
+ uni.setStorageSync('sPlaceObj',{
|
|
|
|
+ schoosearea:'请选择区',
|
|
|
|
+ schoosecity:'请选择市',
|
|
|
|
+ schooseprovince:'全国',
|
|
|
|
+ selected:'全国'
|
|
|
|
+ })
|
|
|
|
+ uni.setStorageSync('longitudeAndLatitude',res.longitude+','+res.latitude)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ checkOpenGPSServiceByAndroidIOS() {
|
|
|
|
+ let system = uni.getSystemInfoSync(); // 获取系统信息
|
|
|
|
+ // console.log(system);
|
|
|
|
+ if (system.platform === 'android') { // 判断平台
|
|
|
|
+ var context = plus.android.importClass("android.content.Context");
|
|
|
|
+ var locationManager = plus.android.importClass("android.location.LocationManager");
|
|
|
|
+ var main = plus.android.runtimeMainActivity();
|
|
|
|
+ var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
|
|
|
|
+ if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '请打开定位服务功能',
|
|
|
|
+ // showCancel: false, // 不显示取消按钮
|
|
|
|
+ success(res) {
|
|
|
|
+ if(res.confirm){
|
|
|
|
+ uni.setStorageSync('confirm_location',1)
|
|
|
|
+ if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
|
|
|
|
+
|
|
|
|
+ var Intent = plus.android.importClass('android.content.Intent');
|
|
|
|
+ var Settings = plus.android.importClass('android.provider.Settings');
|
|
|
|
+ var intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
|
|
|
|
+ main.startActivity(intent); // 打开系统设置GPS服务页面
|
|
|
|
+ } else {
|
|
|
|
+ uni.setStorageSync('fPlaceObj',{
|
|
|
|
+ fchoosearea:'全部',
|
|
|
|
+ fchoosecity:'市辖区',
|
|
|
|
+ fchooseprovince:'北京',
|
|
|
|
+ selected:'东城'
|
|
|
|
+ })
|
|
|
|
+ uni.setStorageSync('sPlaceObj',{
|
|
|
|
+ schoosearea:'请选择区',
|
|
|
|
+ schoosecity:'请选择市',
|
|
|
|
+ schooseprovince:'全国',
|
|
|
|
+ selected:'全国'
|
|
|
|
+ })
|
|
|
|
+ uni.setStorageSync('longitudeAndLatitude','116.3972,39.9096')
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ uni.setStorageSync('fPlaceObj',{
|
|
|
|
+ fchoosearea:'全部',
|
|
|
|
+ fchoosecity:'市辖区',
|
|
|
|
+ fchooseprovince:'北京',
|
|
|
|
+ selected:'东城'
|
|
|
|
+ })
|
|
|
|
+ uni.setStorageSync('sPlaceObj',{
|
|
|
|
+ schoosearea:'请选择区',
|
|
|
|
+ schoosecity:'请选择市',
|
|
|
|
+ schooseprovince:'全国',
|
|
|
|
+ selected:'全国'
|
|
|
|
+ })
|
|
|
|
+ uni.setStorageSync('longitudeAndLatitude','116.3972,39.9096')
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }else{
|
|
|
|
+ this.getLngLat()
|
|
|
|
+ }
|
|
|
|
+ } else if (system.platform === 'ios') {
|
|
|
|
+ // console.log("苹果");
|
|
|
|
+ var cllocationManger = plus.ios.import("CLLocationManager");
|
|
|
|
+ var enable = cllocationManger.locationServicesEnabled();
|
|
|
|
+ var status = cllocationManger.authorizationStatus();
|
|
|
|
+ plus.ios.deleteObject(cllocationManger);
|
|
|
|
+ if (enable && status != 2) {
|
|
|
|
+ this.getLngLat()
|
|
|
|
+ console.log("手机系统的定位已经打开");
|
|
|
|
+ } else {
|
|
|
|
+ console.log("手机系统的定位没有打开");
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '请前往设置-隐私-定位服务打开定位服务功能',
|
|
|
|
+ // showCancel: false, // 不显示取消按钮
|
|
|
|
+ success(res) {
|
|
|
|
+ if(res.confirm){
|
|
|
|
+ var UIApplication = plus.ios.import("UIApplication");
|
|
|
|
+ var application2 = UIApplication.sharedApplication();
|
|
|
|
+ var NSURL2 = plus.ios.import("NSURL");
|
|
|
|
+ // var setting2 = NSURL2.URLWithString("prefs:root=LOCATION_SERVICES");
|
|
|
|
+ // var setting2 = NSURL2.URLWithString("App-Prefs:root=LOCATION_SERVICES");
|
|
|
|
+ // var setting2 = NSURL2.URLWithString("app-settings");
|
|
|
|
+ var setting2 = NSURL2.URLWithString("App-Prefs:root=Privacy&path=LOCATION");
|
|
|
|
+ // var setting2 = NSURL2.URLWithString("App-Prefs:root=Privacy&path=LOCATION_SERVICES");
|
|
|
|
+ application2.openURL(setting2);
|
|
|
|
+ plus.ios.deleteObject(setting2);
|
|
|
|
+ plus.ios.deleteObject(NSURL2);
|
|
|
|
+ plus.ios.deleteObject(application2);
|
|
|
|
+ this.getLngLat()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
cargoOwner(_obj){
|
|
cargoOwner(_obj){
|
|
// uni.$u.route('/pages/order/evaluateList');
|
|
// uni.$u.route('/pages/order/evaluateList');
|
|
- console.log("查看---------------",_obj)
|
|
|
|
|
|
+ // console.log("查看---------------",_obj)
|
|
uni.$u.route('/pages/goodSource/cargoOwnerSee',_obj)
|
|
uni.$u.route('/pages/goodSource/cargoOwnerSee',_obj)
|
|
},
|
|
},
|
|
mescrollInit(mescroll) {
|
|
mescrollInit(mescroll) {
|
|
@@ -419,123 +574,123 @@
|
|
selectType() {
|
|
selectType() {
|
|
this.show = true
|
|
this.show = true
|
|
},
|
|
},
|
|
- getLngLat() {
|
|
|
|
- var that=this
|
|
|
|
- // uni.showLoading({
|
|
|
|
- // title: '获取定位信息'
|
|
|
|
- // })
|
|
|
|
|
|
+ // getLngLat() {
|
|
|
|
+ // var that=this
|
|
|
|
+ // // uni.showLoading({
|
|
|
|
+ // // title: '获取定位信息'
|
|
|
|
+ // // })
|
|
|
|
|
|
- uni.getLocation({
|
|
|
|
- type: 'gcj02',
|
|
|
|
- geocode: true,
|
|
|
|
- success: res => {
|
|
|
|
- if (res.latitude) {
|
|
|
|
- console.log(res)
|
|
|
|
- if(res.address.city){
|
|
|
|
- if(res.address.city.indexOf('市')!=-1){
|
|
|
|
- res.address.city=res.address.city.substring(0,res.address.city.length-1)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if(res.address.province){
|
|
|
|
- if(res.address.province.indexOf('省')!=-1){
|
|
|
|
- res.address.province=res.address.province.substring(0,res.address.province.length-1)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- uni.setStorageSync('fPlaceObj',{
|
|
|
|
- fchoosearea:'全部',
|
|
|
|
- fchoosecity:res.address.city,
|
|
|
|
- fchooseprovince:res.address.province,
|
|
|
|
- selected:res.address.city
|
|
|
|
- })
|
|
|
|
- uni.setStorageSync('sPlaceObj',{
|
|
|
|
- schoosearea:'请选择区',
|
|
|
|
- schoosecity:'请选择市',
|
|
|
|
- schooseprovince:'全国',
|
|
|
|
- selected:'全国'
|
|
|
|
- })
|
|
|
|
- let _pickerSelect;
|
|
|
|
- if (that.pickerSelect == '运费先付') {
|
|
|
|
- _pickerSelect = 1
|
|
|
|
- } else {
|
|
|
|
- _pickerSelect = 0
|
|
|
|
- }
|
|
|
|
- that.startPlace.selected=res.address.city
|
|
|
|
- that.startPlace.fchoosecity=res.address.city
|
|
|
|
- let _data = {
|
|
|
|
- searchKeyWord: this.tabIndex + 1,
|
|
|
|
- searchType: _pickerSelect,
|
|
|
|
- pageSize: 10,
|
|
|
|
- currentPage: 1,
|
|
|
|
- loadingPlaceCity: that.startPlace.fchoosecity,
|
|
|
|
- // unLoadingPlaceCity: this.endPlace.schoosecity
|
|
|
|
|
|
+ // uni.getLocation({
|
|
|
|
+ // type: 'gcj02',
|
|
|
|
+ // geocode: true,
|
|
|
|
+ // success: res => {
|
|
|
|
+ // if (res.latitude) {
|
|
|
|
+ // console.log(res)
|
|
|
|
+ // if(res.address.city){
|
|
|
|
+ // if(res.address.city.indexOf('市')!=-1){
|
|
|
|
+ // res.address.city=res.address.city.substring(0,res.address.city.length-1)
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // if(res.address.province){
|
|
|
|
+ // if(res.address.province.indexOf('省')!=-1){
|
|
|
|
+ // res.address.province=res.address.province.substring(0,res.address.province.length-1)
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // uni.setStorageSync('fPlaceObj',{
|
|
|
|
+ // fchoosearea:'全部',
|
|
|
|
+ // fchoosecity:res.address.city,
|
|
|
|
+ // fchooseprovince:res.address.province,
|
|
|
|
+ // selected:res.address.city
|
|
|
|
+ // })
|
|
|
|
+ // uni.setStorageSync('sPlaceObj',{
|
|
|
|
+ // schoosearea:'请选择区',
|
|
|
|
+ // schoosecity:'请选择市',
|
|
|
|
+ // schooseprovince:'全国',
|
|
|
|
+ // selected:'全国'
|
|
|
|
+ // })
|
|
|
|
+ // let _pickerSelect;
|
|
|
|
+ // if (that.pickerSelect == '运费先付') {
|
|
|
|
+ // _pickerSelect = 1
|
|
|
|
+ // } else {
|
|
|
|
+ // _pickerSelect = 0
|
|
|
|
+ // }
|
|
|
|
+ // that.startPlace.selected=res.address.city
|
|
|
|
+ // that.startPlace.fchoosecity=res.address.city
|
|
|
|
+ // let _data = {
|
|
|
|
+ // searchKeyWord: this.tabIndex + 1,
|
|
|
|
+ // searchType: _pickerSelect,
|
|
|
|
+ // pageSize: 10,
|
|
|
|
+ // currentPage: 1,
|
|
|
|
+ // loadingPlaceCity: that.startPlace.fchoosecity,
|
|
|
|
+ // // unLoadingPlaceCity: this.endPlace.schoosecity
|
|
|
|
|
|
- }
|
|
|
|
- that.$forceUpdate()
|
|
|
|
- // that.$set(that.startPlace,'selected',res.address.city)
|
|
|
|
- // that.lng = res.longitude;
|
|
|
|
- // that.lat = res.latitude;
|
|
|
|
- that.$request.baseRequest('get', '/publishTaskInfo/selectGoodsSource', _data).then(res => {
|
|
|
|
- if (res.code == 200) {
|
|
|
|
- console.log(res.data.records)
|
|
|
|
- uni.hideLoading()
|
|
|
|
- that.mescroll.endBySize(res.data.records.length, res.data.total);
|
|
|
|
- if(res.data.records){
|
|
|
|
- that.goods = res.data.records
|
|
|
|
- for (let i = 0; i < that.goods.length; i++) {
|
|
|
|
- if (that.goods[i].peripheralInfo == 1) {
|
|
|
|
- that.isFirstIndex = i
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }else{
|
|
|
|
- that.goods=[]
|
|
|
|
- }
|
|
|
|
|
|
+ // }
|
|
|
|
+ // that.$forceUpdate()
|
|
|
|
+ // // that.$set(that.startPlace,'selected',res.address.city)
|
|
|
|
+ // // that.lng = res.longitude;
|
|
|
|
+ // // that.lat = res.latitude;
|
|
|
|
+ // that.$request.baseRequest('get', '/publishTaskInfo/selectGoodsSource', _data).then(res => {
|
|
|
|
+ // if (res.code == 200) {
|
|
|
|
+ // console.log(res.data.records)
|
|
|
|
+ // uni.hideLoading()
|
|
|
|
+ // that.mescroll.endBySize(res.data.records.length, res.data.total);
|
|
|
|
+ // if(res.data.records){
|
|
|
|
+ // that.goods = res.data.records
|
|
|
|
+ // for (let i = 0; i < that.goods.length; i++) {
|
|
|
|
+ // if (that.goods[i].peripheralInfo == 1) {
|
|
|
|
+ // that.isFirstIndex = i
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }else{
|
|
|
|
+ // that.goods=[]
|
|
|
|
+ // }
|
|
|
|
|
|
- }
|
|
|
|
- uni.hideLoading()
|
|
|
|
- })
|
|
|
|
- .catch(res => {
|
|
|
|
- uni.$u.toast(res.message);
|
|
|
|
- that.mescroll.endErr();
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
- if (uni.getSystemInfoSync().platform == 'android') {
|
|
|
|
- var context = plus.android.importClass("android.content.Context");
|
|
|
|
- var locationManager = plus.android.importClass(
|
|
|
|
- "android.location.LocationManager");
|
|
|
|
- var main = plus.android.runtimeMainActivity();
|
|
|
|
- var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
|
|
|
|
- that.bool = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)
|
|
|
|
- }
|
|
|
|
- if (that.bool === false) {
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '请打开定位服务',
|
|
|
|
- success: ({
|
|
|
|
- confirm,
|
|
|
|
- cancel
|
|
|
|
- }) => {
|
|
|
|
- if (confirm) {
|
|
|
|
- if (uni.getSystemInfoSync().platform == 'android') {
|
|
|
|
- var Intent = plus.android.importClass(
|
|
|
|
- 'android.content.Intent');
|
|
|
|
- var Settings = plus.android.importClass(
|
|
|
|
- 'android.provider.Settings');
|
|
|
|
- var intent = new Intent(Settings
|
|
|
|
- .ACTION_LOCATION_SOURCE_SETTINGS);
|
|
|
|
- var main = plus.android.runtimeMainActivity();
|
|
|
|
- main.startActivity(intent); // 打开系统设置GPS服务页面
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- uni.hideLoading()
|
|
|
|
|
|
+ // }
|
|
|
|
+ // uni.hideLoading()
|
|
|
|
+ // })
|
|
|
|
+ // .catch(res => {
|
|
|
|
+ // uni.$u.toast(res.message);
|
|
|
|
+ // that.mescroll.endErr();
|
|
|
|
+ // });
|
|
|
|
+ // } else {
|
|
|
|
+ // if (uni.getSystemInfoSync().platform == 'android') {
|
|
|
|
+ // var context = plus.android.importClass("android.content.Context");
|
|
|
|
+ // var locationManager = plus.android.importClass(
|
|
|
|
+ // "android.location.LocationManager");
|
|
|
|
+ // var main = plus.android.runtimeMainActivity();
|
|
|
|
+ // var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
|
|
|
|
+ // that.bool = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)
|
|
|
|
+ // }
|
|
|
|
+ // if (that.bool === false) {
|
|
|
|
+ // uni.showModal({
|
|
|
|
+ // title: '提示',
|
|
|
|
+ // content: '请打开定位服务',
|
|
|
|
+ // success: ({
|
|
|
|
+ // confirm,
|
|
|
|
+ // cancel
|
|
|
|
+ // }) => {
|
|
|
|
+ // if (confirm) {
|
|
|
|
+ // if (uni.getSystemInfoSync().platform == 'android') {
|
|
|
|
+ // var Intent = plus.android.importClass(
|
|
|
|
+ // 'android.content.Intent');
|
|
|
|
+ // var Settings = plus.android.importClass(
|
|
|
|
+ // 'android.provider.Settings');
|
|
|
|
+ // var intent = new Intent(Settings
|
|
|
|
+ // .ACTION_LOCATION_SOURCE_SETTINGS);
|
|
|
|
+ // var main = plus.android.runtimeMainActivity();
|
|
|
|
+ // main.startActivity(intent); // 打开系统设置GPS服务页面
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // uni.hideLoading()
|
|
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
|
|
+ // },
|
|
toDetail(id) {
|
|
toDetail(id) {
|
|
var that=this
|
|
var that=this
|
|
that.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
|
|
that.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
|
|
@@ -587,11 +742,10 @@
|
|
}
|
|
}
|
|
console.log(uni.getStorageSync('longitudeAndLatitude'))
|
|
console.log(uni.getStorageSync('longitudeAndLatitude'))
|
|
// if (this.tabIndex == 2) {
|
|
// if (this.tabIndex == 2) {
|
|
- if(!this.startPlace.selected){
|
|
|
|
- console.log(1)
|
|
|
|
- // this.getLngLat();
|
|
|
|
- }else{
|
|
|
|
-
|
|
|
|
|
|
+ if(uni.getStorageSync('longitudeAndLatitude')){
|
|
|
|
+ this.lng=uni.getStorageSync('longitudeAndLatitude').split(',')[0]
|
|
|
|
+ this.lat=uni.getStorageSync('longitudeAndLatitude').split(',')[1]
|
|
|
|
+ }
|
|
_data.driverLongitude = this.lng
|
|
_data.driverLongitude = this.lng
|
|
_data.driverLatitude = this.lat
|
|
_data.driverLatitude = this.lat
|
|
// }
|
|
// }
|
|
@@ -649,7 +803,6 @@
|
|
this.goods = [];
|
|
this.goods = [];
|
|
// this.otherGoods = []
|
|
// this.otherGoods = []
|
|
};
|
|
};
|
|
- console.log(res.data.records,1111111)
|
|
|
|
if(res.data.records){
|
|
if(res.data.records){
|
|
for(var i=0;i<res.data.records.length;i++){
|
|
for(var i=0;i<res.data.records.length;i++){
|
|
if(res.data.records[i].cargoDistance){
|
|
if(res.data.records[i].cargoDistance){
|
|
@@ -692,8 +845,6 @@
|
|
uni.$u.toast(res.message);
|
|
uni.$u.toast(res.message);
|
|
this.mescroll.endErr();
|
|
this.mescroll.endErr();
|
|
});
|
|
});
|
|
- }
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
clickTab(val) {
|
|
clickTab(val) {
|
|
this.tabIndex = val.index
|
|
this.tabIndex = val.index
|