更新
This commit is contained in:
@@ -212,7 +212,7 @@
|
|||||||
confirmColor: '#FE0505',
|
confirmColor: '#FE0505',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.setStorageSync('username', that.driver.username)
|
uni.setStorageSync('username', this.driver.username)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/BagAuth/pages/login/register'
|
url: '/BagAuth/pages/login/register'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -363,7 +363,11 @@
|
|||||||
activeCur: {
|
activeCur: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 0
|
default: 0
|
||||||
}
|
},
|
||||||
|
siteId: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -671,8 +675,8 @@
|
|||||||
checkInfo() {
|
checkInfo() {
|
||||||
// console.log(this.radio)
|
// console.log(this.radio)
|
||||||
this.tsetPlate(this.plateNumber ? this.plateNumber : this.plateNumberSel)
|
this.tsetPlate(this.plateNumber ? this.plateNumber : this.plateNumberSel)
|
||||||
if (!this.testPlateResult && !['1689182438357262336', '1689183144276463616', '1689185023261741056']
|
if (!this.testPlateResult && !['1689182438357262336', '1689183144276463616', '1689185023261741056','1762304610449412096']
|
||||||
.includes(this.oilItem.siteId)) {
|
.includes(this.siteId || this.oilItem.siteId)) {
|
||||||
// this.plateNumber=''
|
// this.plateNumber=''
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '车牌号不可为空或格式错误,请重新输入',
|
title: '车牌号不可为空或格式错误,请重新输入',
|
||||||
@@ -832,8 +836,8 @@
|
|||||||
beforeMake() {
|
beforeMake() {
|
||||||
// console.log(this.radio, 'beforeMake')
|
// console.log(this.radio, 'beforeMake')
|
||||||
this.tsetPlate(this.plateNumber ? this.plateNumber : this.plateNumberSel)
|
this.tsetPlate(this.plateNumber ? this.plateNumber : this.plateNumberSel)
|
||||||
if (!this.testPlateResult && !['1689182438357262336', '1689183144276463616', '1689185023261741056']
|
if (!this.testPlateResult && !['1689182438357262336', '1689183144276463616', '1689185023261741056','1762304610449412096']
|
||||||
.includes(this.oilItem.siteId)) {
|
.includes(this.siteId || this.oilItem.siteId)) {
|
||||||
// this.plateNumber=''
|
// this.plateNumber=''
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '车牌号不可为空或格式错误,请重新输入',
|
title: '车牌号不可为空或格式错误,请重新输入',
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
<!-- 价格 -->
|
<!-- 价格 -->
|
||||||
<price-select-tab @onChangePayQr="onChangePayQr" @onChangePay="onChangePay" :active-cur="activeCur"
|
<price-select-tab @onChangePayQr="onChangePayQr" @onChangePay="onChangePay" :active-cur="activeCur"
|
||||||
:site-name="siteInfo.siteName" :channel-list="siteInfo.oilSiteChannelDetailsVos"
|
:site-name="siteInfo.siteName" :channel-list="siteInfo.oilSiteChannelDetailsVos"
|
||||||
:channelJuli="siteInfo.juli"></price-select-tab>
|
:channelJuli="siteInfo.juli" :siteId="siteId"></price-select-tab>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@@ -79,6 +79,7 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isBackPrev: true,
|
isBackPrev: true,
|
||||||
|
siteId:'',
|
||||||
radio: 'B',
|
radio: 'B',
|
||||||
mainURL: this.global.mainURL,
|
mainURL: this.global.mainURL,
|
||||||
imgURL: this.global.imgURL,
|
imgURL: this.global.imgURL,
|
||||||
@@ -108,6 +109,7 @@
|
|||||||
if (authorization && target.siteId) {
|
if (authorization && target.siteId) {
|
||||||
// 扫码进入 返回按钮点击回到首页
|
// 扫码进入 返回按钮点击回到首页
|
||||||
this.isBackPrev = false
|
this.isBackPrev = false
|
||||||
|
this.siteId = target.siteId
|
||||||
this.getSiteInfo(target.siteId)
|
this.getSiteInfo(target.siteId)
|
||||||
}
|
}
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getSiteList();
|
this.refreshLocation();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toSitePage() {
|
toSitePage() {
|
||||||
@@ -72,13 +72,14 @@ export default {
|
|||||||
refreshLocation() {
|
refreshLocation() {
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: "wgs84",
|
type: "wgs84",
|
||||||
success: function (res) {
|
success: (res) => {
|
||||||
uni.setStorageSync("location", res);
|
uni.setStorageSync("location", res);
|
||||||
|
this.getSiteList()
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getSiteList() {
|
getSiteList() {
|
||||||
this.refreshLocation();
|
// this.refreshLocation();
|
||||||
let data1 = {
|
let data1 = {
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 3,
|
pageSize: 3,
|
||||||
|
|||||||
@@ -179,7 +179,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<msg-models :showAuthFrror="showAuthFrror" @hideOneModal="hideModel"></msg-models>
|
<msg-models :showAuthFrror="showAuthFrror" @hideOneModal="hideModel"></msg-models>
|
||||||
<three-sites @hideOneModal="showThreeSites=false" :showThreeSites="showThreeSites"></three-sites>
|
<three-sites v-if="showThreeSites" @hideOneModal="showThreeSites=false" :showThreeSites="showThreeSites"></three-sites>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -349,12 +349,13 @@
|
|||||||
const openid = uni.getStorageSync('openid')
|
const openid = uni.getStorageSync('openid')
|
||||||
if (token && openid) {
|
if (token && openid) {
|
||||||
this.getAuthInfo()
|
this.getAuthInfo()
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: '您还没有登录哦',
|
|
||||||
icon: "none"
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
// else {
|
||||||
|
// uni.showToast({
|
||||||
|
// title: '您还没有登录哦',
|
||||||
|
// icon: "none"
|
||||||
|
// })
|
||||||
|
// }
|
||||||
this.refreshLocation()
|
this.refreshLocation()
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -412,6 +413,7 @@
|
|||||||
type: 'wgs84',
|
type: 'wgs84',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
uni.setStorageSync('location', res)
|
uni.setStorageSync('location', res)
|
||||||
|
this.getSiteList()
|
||||||
},
|
},
|
||||||
fail: () => {
|
fail: () => {
|
||||||
uni.getSetting({
|
uni.getSetting({
|
||||||
@@ -423,30 +425,42 @@
|
|||||||
confirmText: '去设置',
|
confirmText: '去设置',
|
||||||
success: (resSec) => {
|
success: (resSec) => {
|
||||||
if (resSec.confirm) {
|
if (resSec.confirm) {
|
||||||
uni.openSetting({})
|
uni.openSetting({
|
||||||
}
|
complete:() => {
|
||||||
|
// this.getSiteList()
|
||||||
|
// this.realPosition()
|
||||||
|
// this.refreshLocation()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}else {
|
||||||
|
uni.showToast({
|
||||||
|
title:'获取定位失败,请稍后再试!',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
complete: () => {
|
// complete: () => {
|
||||||
this.getSiteList()
|
// this.getSiteList()
|
||||||
},
|
// },
|
||||||
});
|
|
||||||
},
|
|
||||||
realPosition() {
|
|
||||||
uni.getLocation({
|
|
||||||
type: 'wgs84',
|
|
||||||
success: (res) => {
|
|
||||||
uni.setStorageSync('location', res)
|
|
||||||
},
|
|
||||||
complete: () => {
|
|
||||||
this.getSiteList()
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// realPosition() {
|
||||||
|
// uni.getLocation({
|
||||||
|
// type: 'wgs84',
|
||||||
|
// success: (res) => {
|
||||||
|
// uni.setStorageSync('location', res)
|
||||||
|
// this.getSiteList()
|
||||||
|
// },
|
||||||
|
// // complete: () => {
|
||||||
|
// // this.getSiteList()
|
||||||
|
// // },
|
||||||
|
// });
|
||||||
|
// },
|
||||||
hideModel(name) {
|
hideModel(name) {
|
||||||
if (name == 'auth') {
|
if (name == 'auth') {
|
||||||
this.showAuthFrror = false
|
this.showAuthFrror = false
|
||||||
|
|||||||
@@ -262,7 +262,7 @@
|
|||||||
} else {
|
} else {
|
||||||
this.isFilterData=true
|
this.isFilterData=true
|
||||||
}
|
}
|
||||||
this.getSiteList()
|
// this.getSiteList()
|
||||||
},
|
},
|
||||||
|
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
@@ -363,17 +363,59 @@
|
|||||||
onSelected(e) {
|
onSelected(e) {
|
||||||
// console.log(e)
|
// console.log(e)
|
||||||
},
|
},
|
||||||
|
// refreshLocation() {
|
||||||
|
// uni.getLocation({
|
||||||
|
// type: 'wgs84',
|
||||||
|
// success: function(res) {
|
||||||
|
// uni.setStorageSync('location', res)
|
||||||
|
// this.getSiteList()
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// },
|
||||||
refreshLocation() {
|
refreshLocation() {
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'wgs84',
|
type: 'wgs84',
|
||||||
success: function(res) {
|
success: (res) => {
|
||||||
uni.setStorageSync('location', res)
|
uni.setStorageSync('location', res)
|
||||||
|
this.getSiteList()
|
||||||
|
},
|
||||||
|
fail: () => {
|
||||||
|
uni.getSetting({
|
||||||
|
success: (res) => {
|
||||||
|
if (!res.authSetting['scope.userLocation']) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '请您打开定位权限',
|
||||||
|
content: '用于获取您当前位置附近的油站',
|
||||||
|
confirmText: '去设置',
|
||||||
|
success: (resSec) => {
|
||||||
|
if (resSec.confirm) {
|
||||||
|
uni.openSetting({
|
||||||
|
complete:() => {
|
||||||
|
// this.getSiteList()
|
||||||
|
// this.realPosition()
|
||||||
|
this.refreshLocation()
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
uni.showToast({
|
||||||
|
title:'获取定位失败,请稍后再试!',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// complete: () => {
|
||||||
|
// this.getSiteList()
|
||||||
|
// },
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
getSiteList() {
|
getSiteList() {
|
||||||
this.refreshLocation()
|
// this.refreshLocation()
|
||||||
|
|
||||||
let data1 = {
|
let data1 = {
|
||||||
currentPage: this.currentPage,
|
currentPage: this.currentPage,
|
||||||
|
|||||||
Reference in New Issue
Block a user