Merge pull request '1212' (#12) from caolc1 into master
Reviewed-on: #12
This commit was merged in pull request #12.
This commit is contained in:
@@ -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">
|
||||||
{{ item.areaName }}
|
{{ areaNameDf(item) }}
|
||||||
</view>
|
</view>
|
||||||
</picker-view-column>
|
</picker-view-column>
|
||||||
<picker-view-column>
|
<picker-view-column v-if="areaCodeList[areaIndex[0]]&& areaCodeList[areaIndex[0]].childList ">
|
||||||
<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">
|
||||||
{{ item.areaName }}
|
{{ areaNameDf(item) }}
|
||||||
</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,15 +118,17 @@
|
|||||||
},
|
},
|
||||||
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: {
|
||||||
@@ -152,6 +154,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
areaNameDf(e){
|
||||||
|
return e.areaName
|
||||||
|
},
|
||||||
//选择值改变事件 省市区级联选择
|
//选择值改变事件 省市区级联选择
|
||||||
bindChange(e,ccc) {
|
bindChange(e,ccc) {
|
||||||
// 用于对比滑动的是哪一列数据
|
// 用于对比滑动的是哪一列数据
|
||||||
|
|||||||
@@ -260,6 +260,7 @@
|
|||||||
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()
|
||||||
@@ -268,7 +269,6 @@
|
|||||||
} else {
|
} else {
|
||||||
this.isFilterData=true
|
this.isFilterData=true
|
||||||
}
|
}
|
||||||
this.getSiteList()
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
@@ -430,31 +430,36 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
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)
|
})
|
||||||
},
|
// if (uni.getStorageSync('user')) {
|
||||||
success: () => {
|
// uni.navigateTo({
|
||||||
// console.log('err')
|
// url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`,
|
||||||
}
|
// fail: (err) => {
|
||||||
})
|
// // console.log(err)
|
||||||
} else {
|
// },
|
||||||
uni.showModal({
|
// success: () => {
|
||||||
title: '请您登录',
|
// // console.log('err')
|
||||||
content: "登录小星加油才可以加油 |˛˙꒳˙)♡",
|
// }
|
||||||
confirmText: '去登陆',
|
// })
|
||||||
success: (res) => {
|
// } else {
|
||||||
if (res.confirm) {
|
// uni.showModal({
|
||||||
uni.reLaunch({
|
// title: '请您登录',
|
||||||
url: '../../../BagAuth/pages/login/login'
|
// 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
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user