1 Commits

Author SHA1 Message Date
e2672d627e Merge pull request '1' (#11) from caolc1 into master
Reviewed-on: #11
2023-09-08 02:01:42 +00:00
6 changed files with 75 additions and 81 deletions

19
App.vue
View File

@@ -238,15 +238,16 @@
}, },
onShow: function() { onShow: function() {
// uni.getLocation({ console.log(12388)
// type: 'wgs84', uni.getLocation({
// success: function(res) { type: 'wgs84',
// uni.setStorageSync('location', { success: function(res) {
// longitude: res.longitude + '', uni.setStorageSync('location', {
// latitude: res.latitude + '' longitude: res.longitude + '',
// }) latitude: res.latitude + ''
// } })
// }); }
});
console.log('onReady') console.log('onReady')
const token = uni.getStorageSync('Authorization') const token = uni.getStorageSync('Authorization')
const openid = uni.getStorageSync('openid') const openid = uni.getStorageSync('openid')

View File

@@ -96,23 +96,33 @@
</view> </view>
<!-- 底部去支付 --> <!-- 底部去支付 -->
<view class=""> <view class="" v-if="activePay||qrcodePay">
<!-- <view class="btn bg-white placeholder-hidden"> <view class="btn bg-white placeholder-hidden">
<view class="flex bg-white padding flex-direction"> <view class="flex bg-white padding flex-direction">
<button class="cu-btn block bg-main-oil lg" v-if="activePay" @tap="makePay"> <button class="cu-btn block bg-main-oil lg" v-if="activePay" @tap="makePay">
<image class="site-icon margin-right-sm" :src="imgURL+'site-yz.png'" mode="widthFix"> <image class="site-icon margin-right-sm" :src="imgURL+'site-yz.png'" mode="widthFix">
</image> </image>
一键支付 一键支付
</button> </button>
<!-- <button v-if="qrcodePay" class="cu-btn block bg-main-oil margin-tb-sm lg" @tap="siteQrPay">
<image class="site-icon margin-right-sm" :src="imgURL+'site-qr.png'" mode="widthFix">
</image>
二维码支付
</button> -->
</view>
</view> </view>
</view> -->
<view class="btn bg-white fixed "> <view class="btn bg-white fixed ">
<view class="flex bg-white padding flex-direction"> <view class="flex bg-white padding flex-direction">
<button class="cu-btn block bg-main-oil lg" @tap="makePay"> <button class="cu-btn block bg-main-oil lg" v-if="activePay" @tap="makePay">
<image class="site-icon margin-right-sm" :src="imgURL+'site-yz.png'" mode="widthFix"> <image class="site-icon margin-right-sm" :src="imgURL+'site-yz.png'" mode="widthFix">
</image> </image>
一键支付 一键支付
</button> </button>
<!-- <button v-if="qrcodePay" class="cu-btn block bg-main-oil margin-tb-sm lg" @tap="siteQrPay">
<image class="site-icon margin-right-sm" :src="imgURL+'site-qr.png'" mode="widthFix">
</image>
二维码支付
</button> -->
</view> </view>
</view> </view>
</view> </view>

View File

@@ -38,12 +38,12 @@
<picker-view disabled :value="region" @change="bindChange" ref="showHide"> <picker-view disabled :value="region" @change="bindChange" ref="showHide">
<picker-view-column> <picker-view-column>
<view class="center" v-for="(item, index) in areaCodeList" :key="index"> <view class="center" v-for="(item, index) in areaCodeList" :key="index">
{{ areaNameDf(item) }} {{ item.areaName }}
</view> </view>
</picker-view-column> </picker-view-column>
<picker-view-column v-if="areaCodeList[areaIndex[0]]&& areaCodeList[areaIndex[0]].childList "> <picker-view-column>
<view class="center" v-for="(item, index) in areaCodeList[areaIndex[0]].childList" :key="index"> <view class="center" v-for="(item, index) in areaCodeList[areaIndex[0]].childList" :key="index">
{{ areaNameDf(item) }} {{ item.areaName }}
</view> </view>
</picker-view-column> </picker-view-column>
<!-- <picker-view-column v-if="areaCodeList[areaIndex[0]]"> <!-- <picker-view-column v-if="areaCodeList[areaIndex[0]]">
@@ -118,17 +118,15 @@
}, },
created() { created() {
console.log('%c 子组件参数↓','font-size:30px;color:red'); console.log('%c 子组件参数↓','font-size:30px;color:red')
}, },
mounted() { mounted() {
if(this.areaCodeList1.length == 0){ if(this.areaCodeList1.length == 0){
this.areaCodeList = uni.getStorageSync('areaCodeList') || []; this.areaCodeList = uni.getStorageSync('areaCodeList') || []
}else{ }else{
this.areaCodeList = this.areaCodeList1 this.areaCodeList = this.areaCodeList1
} }
this.areaCodeList.unshift({areaName:'全部'}); this.areaCodeList.unshift({areaName:'全部'})
console.log(this.areaCodeList,'==')
this.$forceUpdate(); this.$forceUpdate();
}, },
computed: { computed: {
@@ -154,9 +152,6 @@
} }
}, },
methods: { methods: {
areaNameDf(e){
return e.areaName
},
//选择值改变事件 省市区级联选择 //选择值改变事件 省市区级联选择
bindChange(e,ccc) { bindChange(e,ccc) {
// 用于对比滑动的是哪一列数据 // 用于对比滑动的是哪一列数据

View File

@@ -100,6 +100,7 @@
}) })
interstitialAd.onError((err) => { interstitialAd.onError((err) => {
setTimeout(() => { setTimeout(() => {
if (key == '在线') {
uni.switchTab({ uni.switchTab({
url: '/pages/tabbar/home/home', url: '/pages/tabbar/home/home',
fail: (err) => { fail: (err) => {
@@ -107,19 +108,11 @@
} }
// url:'/BagStation/orderDetail/orderDetail' // url:'/BagStation/orderDetail/orderDetail'
}) })
// if (key == '在线') { } else {
// uni.switchTab({ uni.redirectTo({
// url: '/pages/tabbar/home/home', url: '/BagAuth/pages/login/login'
// fail: (err) => { })
// console.log(err) }
// }
// // url:'/BagStation/orderDetail/orderDetail'
// })
// } else {
// uni.redirectTo({
// url: '/BagAuth/pages/login/login'
// })
// }
}, 2000) }, 2000)
console.log('onError event emit', err) console.log('onError event emit', err)
}) })

View File

@@ -260,7 +260,6 @@
this.tools.userLocationChenk().then(res => { this.tools.userLocationChenk().then(res => {
this.refreshLocation(); this.refreshLocation();
}).catch(err => {}); }).catch(err => {});
this.getSiteList()
}, },
onLoad() { onLoad() {
// this.refreshLocation() // this.refreshLocation()
@@ -269,6 +268,7 @@
} else { } else {
this.isFilterData=true this.isFilterData=true
} }
this.getSiteList()
}, },
onPullDownRefresh() { onPullDownRefresh() {
@@ -430,36 +430,31 @@
}, },
toDetail(item) { toDetail(item) {
let itemS = encodeURIComponent(JSON.stringify(item)); let itemS = encodeURIComponent(JSON.stringify(item))
if (uni.getStorageSync('user')) {
uni.navigateTo({ uni.navigateTo({
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`, url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`,
fail: (err) => {}, fail: (err) => {
success: () => {} // console.log(err)
},
success: () => {
// console.log('err')
}
}) })
// if (uni.getStorageSync('user')) { } else {
// uni.navigateTo({ uni.showModal({
// url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`, title: '请您登录',
// fail: (err) => { content: "登录小星加油才可以加油 |˛˙꒳​˙)♡",
// // console.log(err) confirmText: '去登陆',
// }, success: (res) => {
// success: () => { if (res.confirm) {
// // console.log('err') uni.reLaunch({
// } url: '../../../BagAuth/pages/login/login'
// }) })
// } else { }
// uni.showModal({ }
// title: '请您登录', })
// content: "登录小星加油才可以加油 |˛˙꒳​˙)♡", }
// confirmText: '去登陆',
// success: (res) => {
// if (res.confirm) {
// uni.reLaunch({
// url: '../../../BagAuth/pages/login/login'
// })
// }
// }
// })
// }
}, },
nameSelect(value, item) { nameSelect(value, item) {
this.title2 = item.text this.title2 = item.text

View File

@@ -4,11 +4,11 @@ import utils from '@/utils/encode'
// const env = process.env.NODE_ENV // const env = process.env.NODE_ENV
const env = 'production'/* */ const env = 'production'/* */
// const env = 'test' // const env = 'test'
// const testUrl = 'http://192.168.0.254:38080' const testUrl = 'http://192.168.0.254:38080'
// const productUrl = 'http://121.196.213.68/adminapi' //预生产 // const productUrl = 'http://121.196.213.68/adminapi' //预生产
const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new // const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
// const productUrl = 'http://uat.xingoil.com/adminapi' // 生产,加密 new const productUrl = 'http://uat.xingoil.com/adminapi' // 生产,加密 new
const service = axios.create({ const service = axios.create({
baseURL: env == 'production' ? productUrl : testUrl, baseURL: env == 'production' ? productUrl : testUrl,
// baseURL: testUrl, // baseURL: testUrl,