|
@@ -11,7 +11,8 @@
|
|
|
<view class="content1" v-if="type==0">
|
|
|
<view class="history-city-title">历史发货地</view>
|
|
|
<view class="city-list">
|
|
|
- <view class="city" v-for="(item,index) in historyFcityList" :key='index' @click="historyClick(0,item)">
|
|
|
+ <view class="city" v-for="(item,index) in historyFcityList" :key='index'
|
|
|
+ @click="historyClick(0,item)">
|
|
|
{{item.selected}}
|
|
|
</view>
|
|
|
</view>
|
|
@@ -19,7 +20,8 @@
|
|
|
<view class="content2" v-if="type==1">
|
|
|
<view class="history-city-title">历史收货地</view>
|
|
|
<view class="city-list">
|
|
|
- <view class="city" v-for="(item,index) in historyScityList" :key='index' @click="historyClick(1,item)">
|
|
|
+ <view class="city" v-for="(item,index) in historyScityList" :key='index'
|
|
|
+ @click="historyClick(1,item)">
|
|
|
{{item.selected}}
|
|
|
</view>
|
|
|
</view>
|
|
@@ -56,7 +58,8 @@
|
|
|
<view class="container" v-if="(type==0?fstatus:sstatus)==0">
|
|
|
<view class="content-item" :class="index ==(type==0?isfprovince:issprovince) ?'active':''"
|
|
|
@click="selectProvince(item, index,(type==0?fstatus:sstatus))"
|
|
|
- v-for="(item,index) in (type==0?fprovincelist:sprovincelist)" v-show='type==1||type==0&&item.label!="全国"' :key="index">
|
|
|
+ v-for="(item,index) in (type==0?fprovincelist:sprovincelist)"
|
|
|
+ v-show='type==1||type==0&&item.label!="全国"' :key="index">
|
|
|
{{item.label}}
|
|
|
</view>
|
|
|
</view>
|
|
@@ -120,8 +123,8 @@
|
|
|
type: 0,
|
|
|
count: 0,
|
|
|
ftitle: '',
|
|
|
- ftitleList:[],
|
|
|
- stitleList:[],
|
|
|
+ ftitleList: [],
|
|
|
+ stitleList: [],
|
|
|
stitle: '',
|
|
|
selectList: [],
|
|
|
}
|
|
@@ -152,75 +155,75 @@
|
|
|
},
|
|
|
mounted() {
|
|
|
if (uni.getStorageSync('fPlaceObj')) {
|
|
|
- this.fchooseprovince=uni.getStorageSync('fPlaceObj').fchooseprovince
|
|
|
- this.fchoosecity=uni.getStorageSync('fPlaceObj').fchoosecity
|
|
|
- this.fchoosearea=uni.getStorageSync('fPlaceObj').fchoosearea
|
|
|
+ this.fchooseprovince = uni.getStorageSync('fPlaceObj').fchooseprovince
|
|
|
+ this.fchoosecity = uni.getStorageSync('fPlaceObj').fchoosecity
|
|
|
+ this.fchoosearea = uni.getStorageSync('fPlaceObj').fchoosearea
|
|
|
for (var i = 0; i < this.fprovincelist.length; i++) {
|
|
|
- if(this.fprovincelist[i].label==this.fchooseprovince){
|
|
|
- this.fprovincelist[i].checked=true
|
|
|
+ if (this.fprovincelist[i].label == this.fchooseprovince) {
|
|
|
+ this.fprovincelist[i].checked = true
|
|
|
this.fcitylist = this.fprovincelist[i].child
|
|
|
for (var q = 0; q < this.fcitylist.length; q++) {
|
|
|
- if(this.fcitylist[q].label==this.fchoosecity){
|
|
|
- this.fcitylist[q].checked=true
|
|
|
+ if (this.fcitylist[q].label == this.fchoosecity) {
|
|
|
+ this.fcitylist[q].checked = true
|
|
|
this.farealist = this.fcitylist[q].child
|
|
|
for (var area = 0; area < this.farealist.length; area++) {
|
|
|
- if(this.farealist[area].label==this.fchoosearea){
|
|
|
- this.farealist[area].checked=true
|
|
|
+ if (this.farealist[area].label == this.fchoosearea) {
|
|
|
+ this.farealist[area].checked = true
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- this.fstatus=2
|
|
|
+ this.fstatus = 2
|
|
|
}
|
|
|
if (uni.getStorageSync('sPlaceObj')) {
|
|
|
// sprovincelist
|
|
|
// console.log(this.sprovincelist)
|
|
|
- this.schooseprovince=uni.getStorageSync('sPlaceObj').schooseprovince
|
|
|
- this.schoosecity=uni.getStorageSync('sPlaceObj').schoosecity
|
|
|
- this.schoosearea=uni.getStorageSync('sPlaceObj').schoosearea
|
|
|
-
|
|
|
- if(this.schooseprovince=='全国'){
|
|
|
- this.sstatus=0
|
|
|
- this.$set(this.sprovincelist[0],'checked',true)
|
|
|
- this.issprovince=0
|
|
|
- }else{
|
|
|
+ this.schooseprovince = uni.getStorageSync('sPlaceObj').schooseprovince
|
|
|
+ this.schoosecity = uni.getStorageSync('sPlaceObj').schoosecity
|
|
|
+ this.schoosearea = uni.getStorageSync('sPlaceObj').schoosearea
|
|
|
+
|
|
|
+ if (this.schooseprovince == '全国') {
|
|
|
+ this.sstatus = 0
|
|
|
+ this.$set(this.sprovincelist[0], 'checked', true)
|
|
|
+ this.issprovince = 0
|
|
|
+ } else {
|
|
|
for (var i = 0; i < this.sprovincelist.length; i++) {
|
|
|
- if(this.sprovincelist[i].label==this.schooseprovince){
|
|
|
- this.sprovincelist[i].checked=true
|
|
|
+ if (this.sprovincelist[i].label == this.schooseprovince) {
|
|
|
+ this.sprovincelist[i].checked = true
|
|
|
this.scitylist = this.sprovincelist[i].child
|
|
|
for (var q = 0; q < this.scitylist.length; q++) {
|
|
|
- if(this.scitylist[q].label==this.schoosecity){
|
|
|
- this.scitylist[q].checked=true
|
|
|
+ if (this.scitylist[q].label == this.schoosecity) {
|
|
|
+ this.scitylist[q].checked = true
|
|
|
this.sarealist = this.scitylist[q].child
|
|
|
for (var area = 0; area < this.sarealist.length; area++) {
|
|
|
- if(this.sarealist[area].label==this.schoosearea){
|
|
|
- this.sarealist[area].checked=true
|
|
|
+ if (this.sarealist[area].label == this.schoosearea) {
|
|
|
+ this.sarealist[area].checked = true
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- this.sstatus=2
|
|
|
+ this.sstatus = 2
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- historyClick(type,val){
|
|
|
+ historyClick(type, val) {
|
|
|
console.log(type)
|
|
|
- if(type==0){
|
|
|
+ if (type == 0) {
|
|
|
this.historyFcityList.unshift(val)
|
|
|
let _newList = this.makeHistoryList(val)
|
|
|
uni.setStorageSync('fPlaceList', _newList);
|
|
|
uni.setStorageSync('fPlaceObj', val);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.historyScityList.unshift(val)
|
|
|
let _newList = this.makeHistoryList(val)
|
|
|
uni.setStorageSync('sPlaceList', _newList);
|
|
|
- uni.setStorageSync('sPlaceObj',val )
|
|
|
-
|
|
|
+ uni.setStorageSync('sPlaceObj', val)
|
|
|
+
|
|
|
}
|
|
|
uni.switchTab({
|
|
|
url: '/pages/goodSource/index'
|
|
@@ -281,155 +284,157 @@
|
|
|
}
|
|
|
},
|
|
|
confirmBtn() {
|
|
|
-
|
|
|
+
|
|
|
//设置地区 0发货地 1收货地
|
|
|
- if (this.fchooseprovince == '选择' ||(this.fchoosearea == '请选择区'&&this.fchoosecity!='全部')|| (this.fchoosecity == '请选择市' && this.fchooseprovince != '全国')) {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'error',
|
|
|
- message: "请选择发货地区域!",
|
|
|
- })
|
|
|
+ if (this.fchooseprovince == '选择' || (this.fchoosearea == '请选择区' && this.fchoosecity != '全部') || (this
|
|
|
+ .fchoosecity == '请选择市' && this.fchooseprovince != '全国')) {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ type: 'error',
|
|
|
+ message: "请选择发货地区域!",
|
|
|
+ })
|
|
|
return
|
|
|
+ }
|
|
|
+
|
|
|
+ //收货地
|
|
|
+ if (this.schooseprovince == '选择' || (this.schoosearea == '请选择区' && this.schoosecity != '全部' && this
|
|
|
+ .schooseprovince != '全国') || (this.schoosecity == '请选择市' && this.schooseprovince != '全国')) {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ type: 'error',
|
|
|
+ message: "请选择收货地区域!",
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // }
|
|
|
+ // console.log("省", this.fchooseprovince)
|
|
|
+ // console.log("市", this.fchoosecity)
|
|
|
+ // console.log("区", this.fchoosearea)
|
|
|
+ let _obj = {
|
|
|
+ fchooseprovince: this.fchooseprovince,
|
|
|
+ fchoosecity: this.fchoosecity,
|
|
|
+ fchoosearea: this.fchoosearea,
|
|
|
+ selected: ''
|
|
|
+ }
|
|
|
+ //选中全国
|
|
|
+ if (this.fchoosecity == '请选择市' && this.fchooseprovince == '全国') {
|
|
|
+ _obj.selected = this.fchooseprovince
|
|
|
+ this.historyFcityList.unshift(_obj)
|
|
|
+ let _newList = this.makeHistoryList(_obj)
|
|
|
+ uni.setStorageSync('fPlaceList', _newList);
|
|
|
+
|
|
|
+ }
|
|
|
+ //选择省
|
|
|
+ if (this.fchoosearea == '请选择区' && this.fchoosecity == '全部') {
|
|
|
+ _obj.selected = this.fchooseprovince
|
|
|
+ this.historyFcityList.unshift(_obj)
|
|
|
+ let _newList = this.makeHistoryList(_obj)
|
|
|
+
|
|
|
+ uni.setStorageSync('fPlaceList', _newList);
|
|
|
+ }
|
|
|
+ //选择市
|
|
|
+ if (this.fchoosearea == '全部') {
|
|
|
+ if (this.fchoosecity == '市辖区') {
|
|
|
+ _obj.selected = this.fchooseprovince
|
|
|
+ } else {
|
|
|
+ _obj.selected = this.fchoosecity
|
|
|
}
|
|
|
-
|
|
|
- //收货地
|
|
|
- if (this.schooseprovince == '选择' ||(this.schoosearea == '请选择区'&&this.schoosecity!='全部'&& this.schooseprovince != '全国')|| (this.schoosecity == '请选择市' && this.schooseprovince != '全国')) {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'error',
|
|
|
- message: "请选择收货地区域!",
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
+ this.historyFcityList.unshift(_obj)
|
|
|
+ let _newList = this.makeHistoryList(_obj)
|
|
|
+ uni.setStorageSync('fPlaceList', _newList);
|
|
|
+ }
|
|
|
+ uni.setStorageSync('fPlaceObj', _obj);
|
|
|
+ //选择区
|
|
|
+ if (this.fchoosearea != '请选择区' && this.fchoosearea != '全部') {
|
|
|
+ console.log(this.fchooseprovince, this.fchoosecity, this.fchoosearea)
|
|
|
+ // let _list = this.fchoosearea.split(',')
|
|
|
+ // let _newList
|
|
|
+ // //设置历史收发地并去重,区重名判断是否是同一个市在去重
|
|
|
+ // for (let i = 0; i < _list.length; i++) {
|
|
|
+ // let _deepObj = uni.$u.deepClone(_obj)
|
|
|
+ // _deepObj.selected = _list[i]
|
|
|
+ // this.historyFcityList.unshift(_deepObj)
|
|
|
+ // _newList = this.makeHistoryList(_deepObj)
|
|
|
+
|
|
|
// }
|
|
|
- // console.log("省", this.fchooseprovince)
|
|
|
- // console.log("市", this.fchoosecity)
|
|
|
- // console.log("区", this.fchoosearea)
|
|
|
- let _obj = {
|
|
|
+ // console.log(_newList)
|
|
|
+ uni.setStorageSync('fPlaceList', this.historyFcityList);
|
|
|
+ uni.setStorageSync('fPlaceObj', {
|
|
|
fchooseprovince: this.fchooseprovince,
|
|
|
fchoosecity: this.fchoosecity,
|
|
|
fchoosearea: this.fchoosearea,
|
|
|
- selected: ''
|
|
|
- }
|
|
|
- //选中全国
|
|
|
- if (this.fchoosecity == '请选择市' && this.fchooseprovince == '全国') {
|
|
|
- _obj.selected = this.fchooseprovince
|
|
|
- this.historyFcityList.unshift(_obj)
|
|
|
- let _newList = this.makeHistoryList(_obj)
|
|
|
- uni.setStorageSync('fPlaceList', _newList);
|
|
|
+ selected: this.fchoosearea
|
|
|
+ });
|
|
|
+ }
|
|
|
+ console.log(this.historyFcityList)
|
|
|
+ // uni.switchTab({
|
|
|
+ // url: '/pages/goodSource/index'
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
|
|
|
- }
|
|
|
- //选择省
|
|
|
- if (this.fchoosearea == '请选择区' && this.fchoosecity == '全部') {
|
|
|
- _obj.selected = this.fchooseprovince
|
|
|
- this.historyFcityList.unshift(_obj)
|
|
|
- let _newList = this.makeHistoryList(_obj)
|
|
|
+ let _obj1 = {
|
|
|
+ schooseprovince: this.schooseprovince,
|
|
|
+ schoosecity: this.schoosecity,
|
|
|
+ schoosearea: this.schoosearea,
|
|
|
+ selected: ''
|
|
|
+ }
|
|
|
+ //选中全国
|
|
|
+ if (this.schoosecity == '请选择市' && this.schooseprovince == '全国') {
|
|
|
+ _obj1.selected = this.schooseprovince
|
|
|
+ this.historyScityList.unshift(_obj1)
|
|
|
+ let _newList = this.makeHistoryList(_obj1)
|
|
|
+ uni.setStorageSync('sPlaceList', _newList);
|
|
|
+ }
|
|
|
+ //选择省
|
|
|
+ if (this.schoosearea == '请选择区' && this.schoosecity == '全部') {
|
|
|
+ _obj1.selected = this.schooseprovince
|
|
|
+ this.historyScityList.unshift(_obj1)
|
|
|
+ let _newList = this.makeHistoryList(_obj1)
|
|
|
|
|
|
- uni.setStorageSync('fPlaceList', _newList);
|
|
|
- }
|
|
|
- //选择市
|
|
|
- if (this.fchoosearea == '全部') {
|
|
|
- if(this.fchoosecity=='市辖区'){
|
|
|
- _obj.selected = this.fchooseprovince
|
|
|
- }else{
|
|
|
- _obj.selected = this.fchoosecity
|
|
|
- }
|
|
|
- this.historyFcityList.unshift(_obj)
|
|
|
- let _newList = this.makeHistoryList(_obj)
|
|
|
- uni.setStorageSync('fPlaceList', _newList);
|
|
|
+ uni.setStorageSync('sPlaceList', _newList);
|
|
|
+ }
|
|
|
+ //选择市
|
|
|
+ if (this.schoosearea == '全部') {
|
|
|
+ if (this.schoosecity == '市辖区') {
|
|
|
+ _obj1.selected = this.schooseprovince
|
|
|
+ } else {
|
|
|
+ _obj1.selected = this.schoosecity
|
|
|
}
|
|
|
- uni.setStorageSync('fPlaceObj', _obj);
|
|
|
- //选择区
|
|
|
- if (this.fchoosearea != '请选择区' && this.fchoosearea != '全部') {
|
|
|
- console.log(this.fchooseprovince,this.fchoosecity,this.fchoosearea)
|
|
|
- // let _list = this.fchoosearea.split(',')
|
|
|
- // let _newList
|
|
|
- // //设置历史收发地并去重,区重名判断是否是同一个市在去重
|
|
|
- // for (let i = 0; i < _list.length; i++) {
|
|
|
- // let _deepObj = uni.$u.deepClone(_obj)
|
|
|
- // _deepObj.selected = _list[i]
|
|
|
- // this.historyFcityList.unshift(_deepObj)
|
|
|
- // _newList = this.makeHistoryList(_deepObj)
|
|
|
-
|
|
|
- // }
|
|
|
- // console.log(_newList)
|
|
|
- uni.setStorageSync('fPlaceList', this.historyFcityList);
|
|
|
- uni.setStorageSync('fPlaceObj', {
|
|
|
- fchooseprovince: this.fchooseprovince,
|
|
|
- fchoosecity: this.fchoosecity,
|
|
|
- fchoosearea: this.fchoosearea,
|
|
|
- selected: this.fchoosearea
|
|
|
- });
|
|
|
+
|
|
|
+ this.historyScityList.unshift(_obj1)
|
|
|
+ let _newList = this.makeHistoryList(_obj1)
|
|
|
+ uni.setStorageSync('sPlaceList', _newList);
|
|
|
+ }
|
|
|
+ uni.setStorageSync('sPlaceObj', _obj1);
|
|
|
+ //选择区
|
|
|
+ if (this.schoosearea != '请选择区' && this.schoosearea != '全部') {
|
|
|
+ let _list = this.schoosearea.split(',')
|
|
|
+ let _newList
|
|
|
+ for (let i = 0; i < _list.length; i++) {
|
|
|
+
|
|
|
+ let _deepObj = uni.$u.deepClone(_obj1)
|
|
|
+ _deepObj.selected = _list[i]
|
|
|
+ this.historyScityList.unshift(_deepObj)
|
|
|
+ _newList = this.makeHistoryList(_deepObj)
|
|
|
}
|
|
|
- console.log(this.historyFcityList)
|
|
|
- // uni.switchTab({
|
|
|
- // url: '/pages/goodSource/index'
|
|
|
- // });
|
|
|
- // } else {
|
|
|
-
|
|
|
- let _obj1 = {
|
|
|
+ // console.log(_newList)
|
|
|
+ uni.setStorageSync('sPlaceList', this.historyScityList);
|
|
|
+ uni.setStorageSync('sPlaceObj', {
|
|
|
schooseprovince: this.schooseprovince,
|
|
|
schoosecity: this.schoosecity,
|
|
|
schoosearea: this.schoosearea,
|
|
|
- selected: ''
|
|
|
- }
|
|
|
- //选中全国
|
|
|
- if (this.schoosecity == '请选择市' && this.schooseprovince == '全国') {
|
|
|
- _obj1.selected = this.schooseprovince
|
|
|
- this.historyScityList.unshift(_obj1)
|
|
|
- let _newList = this.makeHistoryList(_obj1)
|
|
|
- uni.setStorageSync('sPlaceList', _newList);
|
|
|
- }
|
|
|
- //选择省
|
|
|
- if (this.schoosearea == '请选择区' && this.schoosecity == '全部') {
|
|
|
- _obj1.selected = this.schooseprovince
|
|
|
- this.historyScityList.unshift(_obj1)
|
|
|
- let _newList = this.makeHistoryList(_obj1)
|
|
|
-
|
|
|
- uni.setStorageSync('sPlaceList', _newList);
|
|
|
- }
|
|
|
- //选择市
|
|
|
- if (this.schoosearea == '全部') {
|
|
|
- if(this.schoosecity=='市辖区'){
|
|
|
- _obj1.selected = this.schooseprovince
|
|
|
- }else{
|
|
|
- _obj1.selected = this.schoosecity
|
|
|
- }
|
|
|
-
|
|
|
- this.historyScityList.unshift(_obj1)
|
|
|
- let _newList = this.makeHistoryList(_obj1)
|
|
|
- uni.setStorageSync('sPlaceList', _newList);
|
|
|
- }
|
|
|
- uni.setStorageSync('sPlaceObj', _obj1);
|
|
|
- //选择区
|
|
|
- if (this.schoosearea != '请选择区' && this.schoosearea != '全部') {
|
|
|
- let _list = this.schoosearea.split(',')
|
|
|
- let _newList
|
|
|
- for (let i = 0; i < _list.length; i++) {
|
|
|
-
|
|
|
- let _deepObj = uni.$u.deepClone(_obj1)
|
|
|
- _deepObj.selected = _list[i]
|
|
|
- this.historyScityList.unshift(_deepObj)
|
|
|
- _newList = this.makeHistoryList(_deepObj)
|
|
|
- }
|
|
|
- // console.log(_newList)
|
|
|
- uni.setStorageSync('sPlaceList', this.historyScityList);
|
|
|
- uni.setStorageSync('sPlaceObj', {
|
|
|
- schooseprovince: this.schooseprovince,
|
|
|
- schoosecity: this.schoosecity,
|
|
|
- schoosearea: this.schoosearea,
|
|
|
- selected: this.schoosearea
|
|
|
- });
|
|
|
- }
|
|
|
- console.log(this.historyScityList)
|
|
|
- this.schooseprovince='选择'
|
|
|
- this.schoosecity='请选择市'
|
|
|
- this.schoosearea='请选择区'
|
|
|
- this.fchooseprovince='选择'
|
|
|
- this.fchoosecity='请选择市'
|
|
|
- this.fchoosearea='请选择区'
|
|
|
- uni.removeStorageSync('longitudeAndLatitude')
|
|
|
- uni.switchTab({
|
|
|
- url: '/pages/goodSource/index'
|
|
|
+ selected: this.schoosearea
|
|
|
});
|
|
|
+ }
|
|
|
+ console.log(this.historyScityList)
|
|
|
+ this.schooseprovince = '选择'
|
|
|
+ this.schoosecity = '请选择市'
|
|
|
+ this.schoosearea = '请选择区'
|
|
|
+ this.fchooseprovince = '选择'
|
|
|
+ this.fchoosecity = '请选择市'
|
|
|
+ this.fchoosearea = '请选择区'
|
|
|
+ uni.removeStorageSync('longitudeAndLatitude')
|
|
|
+ uni.switchTab({
|
|
|
+ url: '/pages/goodSource/index'
|
|
|
+ });
|
|
|
},
|
|
|
//返回上一级
|
|
|
backLevel() {
|
|
@@ -445,13 +450,13 @@
|
|
|
this.fchoosearea = ''
|
|
|
this.ftitle = ''
|
|
|
this.isfcity = null
|
|
|
- this.ftitleList=[]
|
|
|
+ this.ftitleList = []
|
|
|
} else {
|
|
|
this.schoosecity = '请选择市'
|
|
|
this.schoosearea = ''
|
|
|
this.stitle = ''
|
|
|
this.isscity = null
|
|
|
- this.stitleList=[]
|
|
|
+ this.stitleList = []
|
|
|
}
|
|
|
} else if ((this.type == 0 ? this.fstatus : this.sstatus) == 0) {
|
|
|
if (this.type == 0) {
|
|
@@ -487,23 +492,23 @@
|
|
|
this.fchooseprovince = '选择'
|
|
|
this.fchoosecity = '请选择市'
|
|
|
this.fchoosearea = '请选择区'
|
|
|
- this.ftitleList=[]
|
|
|
+ this.ftitleList = []
|
|
|
} else {
|
|
|
this.schooseprovince = '选择'
|
|
|
this.schoosecity = '请选择市'
|
|
|
this.schoosearea = '请选择区'
|
|
|
- this.stitleList=[]
|
|
|
+ this.stitleList = []
|
|
|
}
|
|
|
|
|
|
} else if (status == 1) {
|
|
|
if (this.type == 0) {
|
|
|
this.fchoosecity = '请选择市'
|
|
|
this.fchoosearea = '请选择区'
|
|
|
- this.ftitleList=[]
|
|
|
+ this.ftitleList = []
|
|
|
} else {
|
|
|
this.schoosecity = '请选择市'
|
|
|
this.schoosearea = '请选择区'
|
|
|
- this.stitleList=[]
|
|
|
+ this.stitleList = []
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -553,13 +558,13 @@
|
|
|
},
|
|
|
// 选择市
|
|
|
selectCity(item, i, statusIndex) {
|
|
|
- if(item.label=='全部'){
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'error',
|
|
|
- message: "不能选择全部,请重新选择!"
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
+ if (item.label == '全部') {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ type: 'error',
|
|
|
+ message: "不能选择全部,请重新选择!"
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
this.count = 0;
|
|
|
if (this.type == 0) {
|
|
|
this.isfcity = i
|
|
@@ -601,7 +606,7 @@
|
|
|
this.farealist[i].checked = false
|
|
|
}
|
|
|
}
|
|
|
- this.ftitleList=[]
|
|
|
+ this.ftitleList = []
|
|
|
this.fchoosearea = '全部'
|
|
|
this.$forceUpdate()
|
|
|
return
|
|
@@ -613,7 +618,7 @@
|
|
|
this.sarealist[i].checked = false
|
|
|
}
|
|
|
}
|
|
|
- this.stitleList=[]
|
|
|
+ this.stitleList = []
|
|
|
this.schoosearea = '全部'
|
|
|
this.$forceUpdate()
|
|
|
return
|
|
@@ -623,15 +628,15 @@
|
|
|
this.farealist[0].checked = false
|
|
|
if (this.ftitleList.length < 3) {
|
|
|
item.checked = !item.checked
|
|
|
- if (item.checked ) {
|
|
|
- if(this.ftitleList.indexOf(item.label)==-1){
|
|
|
+ if (item.checked) {
|
|
|
+ if (this.ftitleList.indexOf(item.label) == -1) {
|
|
|
this.ftitleList.push(item.label)
|
|
|
}
|
|
|
} else if (!item.checked) {
|
|
|
for (var i = 0; i < this.ftitleList.length; i++) {
|
|
|
console.log(this.ftitleList[i])
|
|
|
- if(this.ftitleList[i]==item.label){
|
|
|
- this.ftitleList.splice(i,1)
|
|
|
+ if (this.ftitleList[i] == item.label) {
|
|
|
+ this.ftitleList.splice(i, 1)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -639,8 +644,8 @@
|
|
|
if (item.checked) {
|
|
|
item.checked = !item.checked
|
|
|
for (var i = 0; i < this.ftitleList.length; i++) {
|
|
|
- if(this.ftitleList[i]==item.label){
|
|
|
- this.ftitleList.splice(i,1)
|
|
|
+ if (this.ftitleList[i] == item.label) {
|
|
|
+ this.ftitleList.splice(i, 1)
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
@@ -650,21 +655,21 @@
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
- this.ftitle=this.ftitleList.toString()
|
|
|
- this.fchoosearea=this.ftitleList.toString()
|
|
|
- }else{
|
|
|
+ this.ftitle = this.ftitleList.toString()
|
|
|
+ this.fchoosearea = this.ftitleList.toString()
|
|
|
+ } else {
|
|
|
this.sarealist[0].checked = false
|
|
|
if (this.stitleList.length < 3) {
|
|
|
item.checked = !item.checked
|
|
|
- if (item.checked ) {
|
|
|
- if(this.stitleList.indexOf(item.label)==-1){
|
|
|
+ if (item.checked) {
|
|
|
+ if (this.stitleList.indexOf(item.label) == -1) {
|
|
|
this.stitleList.push(item.label)
|
|
|
}
|
|
|
} else if (!item.checked) {
|
|
|
for (var i = 0; i < this.stitleList.length; i++) {
|
|
|
console.log(this.stitleList[i])
|
|
|
- if(this.stitleList[i]==item.label){
|
|
|
- this.stitleList.splice(i,1)
|
|
|
+ if (this.stitleList[i] == item.label) {
|
|
|
+ this.stitleList.splice(i, 1)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -672,8 +677,8 @@
|
|
|
if (item.checked) {
|
|
|
item.checked = !item.checked
|
|
|
for (var i = 0; i < this.stitleList.length; i++) {
|
|
|
- if(this.stitleList[i]==item.label){
|
|
|
- this.stitleList.splice(i,1)
|
|
|
+ if (this.stitleList[i] == item.label) {
|
|
|
+ this.stitleList.splice(i, 1)
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
@@ -683,8 +688,8 @@
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
- this.stitle=this.stitleList.toString()
|
|
|
- this.schoosearea=this.stitleList.toString()
|
|
|
+ this.stitle = this.stitleList.toString()
|
|
|
+ this.schoosearea = this.stitleList.toString()
|
|
|
}
|
|
|
console.log(this.ftitleList)
|
|
|
this.$forceUpdate()
|
|
@@ -697,7 +702,7 @@
|
|
|
// if (item.checked && !this.fchoosearea.includes(item.label)) {
|
|
|
// if (this.ftitle) {
|
|
|
// this.ftitle += ',' + item.label
|
|
|
-
|
|
|
+
|
|
|
// } else {
|
|
|
// this.ftitle += item.label
|
|
|
// }
|
|
@@ -853,15 +858,14 @@
|
|
|
.content-item {
|
|
|
background: #F7F8FA;
|
|
|
margin: 10rpx;
|
|
|
- font-size: 30rpx;
|
|
|
+ font-size: 24rpx;
|
|
|
color: #333333;
|
|
|
text-align: center;
|
|
|
- padding: 10rpx 0;
|
|
|
- border-radius: 10rx;
|
|
|
+ padding: 15rpx 0;
|
|
|
+ border-radius: 10rpx;
|
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
|
white-space: nowrap;
|
|
|
- padding: 6rpx 8rpx;
|
|
|
box-sizing: border-box;
|
|
|
flex: 0 0 calc(25% - 20rpx);
|
|
|
}
|