|
@@ -233,7 +233,7 @@
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
pageInit() {
|
|
pageInit() {
|
|
- this.geRubbishTypeList()
|
|
|
|
|
|
+ // this.geRubbishTypeList()
|
|
this.getSaomaInfo()
|
|
this.getSaomaInfo()
|
|
this.getHasRider()
|
|
this.getHasRider()
|
|
this.getOrderNum()
|
|
this.getOrderNum()
|
|
@@ -287,7 +287,11 @@
|
|
},
|
|
},
|
|
// 未绑定骑手 校验3公里是否有启用的骑手
|
|
// 未绑定骑手 校验3公里是否有启用的骑手
|
|
getHasRider(){
|
|
getHasRider(){
|
|
- searchRider().then(res=>{
|
|
|
|
|
|
+ const params={}
|
|
|
|
+ params.lat=this.reverseReceiveAddress.lat?this.reverseReceiveAddress.lat:''
|
|
|
|
+ params.lng=this.reverseReceiveAddress.lng?this.reverseReceiveAddress.lng:''
|
|
|
|
+ console.log(params,'========canshu')
|
|
|
|
+ searchRider(params).then(res=>{
|
|
console.log(res,'==================')
|
|
console.log(res,'==================')
|
|
if(res.status==200){
|
|
if(res.status==200){
|
|
this.isBindRider=res.data.haveBindRider
|
|
this.isBindRider=res.data.haveBindRider
|
|
@@ -306,10 +310,12 @@
|
|
wx.chooseLocation({
|
|
wx.chooseLocation({
|
|
success:(res)=>{
|
|
success:(res)=>{
|
|
if(res){
|
|
if(res){
|
|
|
|
+ console.log(res,'========ditu')
|
|
this.getArea(res.address)
|
|
this.getArea(res.address)
|
|
this.reverseReceiveAddress.lat=res.latitude
|
|
this.reverseReceiveAddress.lat=res.latitude
|
|
this.reverseReceiveAddress.lng=res.longitude
|
|
this.reverseReceiveAddress.lng=res.longitude
|
|
this.reverseReceiveAddress.receiveAreasName= res.address
|
|
this.reverseReceiveAddress.receiveAreasName= res.address
|
|
|
|
+ this.getHasRider()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -372,97 +378,97 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 获取垃圾分类
|
|
// 获取垃圾分类
|
|
- geRubbishTypeList(){
|
|
|
|
- geRubbishType().then(res=>{
|
|
|
|
- if(res.status==200){
|
|
|
|
- console.log(res,'---------垃圾类型')
|
|
|
|
- this.rubbishPriceList=res.data
|
|
|
|
- const a= res.data.find(item=>item.code=='PAPER')
|
|
|
|
- const b= res.data.find(item=>item.code=='PLASTIC')
|
|
|
|
- const c= res.data.find(item=>item.code=='CLOTHES')
|
|
|
|
- const d= res.data.find(item=>item.code=='METAL')
|
|
|
|
- /* 纸张类 */
|
|
|
|
- this.rubbishPaperList=a.rubbishTypeVOList
|
|
|
|
- if (a.rubbishTypeVOList.length > 4) {
|
|
|
|
- this.indicatorDots=true
|
|
|
|
- let num=Math.ceil(a.rubbishTypeVOList.length/4)
|
|
|
|
- let arr = []
|
|
|
|
- for (var i = 0; i < num; i++) {
|
|
|
|
- arr[i]=a.rubbishTypeVOList.slice(i*4,(i+1)*4)
|
|
|
|
- console.log(arr,'===========arr')
|
|
|
|
- }
|
|
|
|
- this.rubbishPaperList= arr
|
|
|
|
- } else {
|
|
|
|
- this.rubbishPaperList = a.rubbishTypeVOList.length?[a.rubbishTypeVOList]:[]
|
|
|
|
- }
|
|
|
|
- console.log(this.rubbishPaperList, '--------aaaaaa')
|
|
|
|
- // this.rubbishPaperList=a.rubbishTypeVOList
|
|
|
|
- this.rubbishPaperList.map(item=>{
|
|
|
|
- item.map(item=>{
|
|
|
|
- if(item.code=='YELLOW_PAPER'){
|
|
|
|
- item.image='/static/index/icon_aper_yellow.png'
|
|
|
|
- }
|
|
|
|
- if(item.code=='COLOUR_PAPER'){
|
|
|
|
- item.image='/static/index/icon_aper_flower.png'
|
|
|
|
- }
|
|
|
|
- if(item.code=='BOOK_PAPER'){
|
|
|
|
- item.image='/static/index/icon_book.png'
|
|
|
|
- }
|
|
|
|
- if(item.code=='MAGAZINE'){
|
|
|
|
- item.image='/static/index/icon_magazine.png'
|
|
|
|
- }
|
|
|
|
- if(item.code=='OTHER_PAPER'){
|
|
|
|
- item.image='/static/index/icon_aper_miscellaneous.png'
|
|
|
|
- }
|
|
|
|
- if(item.code=='NEWS_PAPER'){
|
|
|
|
- item.image='/static/index/icon_newspaper.png'
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ // geRubbishTypeList(){
|
|
|
|
+ // geRubbishType().then(res=>{
|
|
|
|
+ // if(res.status==200){
|
|
|
|
+ // console.log(res,'---------垃圾类型')
|
|
|
|
+ // this.rubbishPriceList=res.data
|
|
|
|
+ // const a= res.data.find(item=>item.code=='PAPER')
|
|
|
|
+ // const b= res.data.find(item=>item.code=='PLASTIC')
|
|
|
|
+ // const c= res.data.find(item=>item.code=='CLOTHES')
|
|
|
|
+ // const d= res.data.find(item=>item.code=='METAL')
|
|
|
|
+ // /* 纸张类 */
|
|
|
|
+ // this.rubbishPaperList=a.rubbishTypeVOList
|
|
|
|
+ // if (a.rubbishTypeVOList.length > 4) {
|
|
|
|
+ // this.indicatorDots=true
|
|
|
|
+ // let num=Math.ceil(a.rubbishTypeVOList.length/4)
|
|
|
|
+ // let arr = []
|
|
|
|
+ // for (var i = 0; i < num; i++) {
|
|
|
|
+ // arr[i]=a.rubbishTypeVOList.slice(i*4,(i+1)*4)
|
|
|
|
+ // console.log(arr,'===========arr')
|
|
|
|
+ // }
|
|
|
|
+ // this.rubbishPaperList= arr
|
|
|
|
+ // } else {
|
|
|
|
+ // this.rubbishPaperList = a.rubbishTypeVOList.length?[a.rubbishTypeVOList]:[]
|
|
|
|
+ // }
|
|
|
|
+ // console.log(this.rubbishPaperList, '--------aaaaaa')
|
|
|
|
+ // // this.rubbishPaperList=a.rubbishTypeVOList
|
|
|
|
+ // this.rubbishPaperList.map(item=>{
|
|
|
|
+ // item.map(item=>{
|
|
|
|
+ // if(item.code=='YELLOW_PAPER'){
|
|
|
|
+ // item.image='/static/index/icon_aper_yellow.png'
|
|
|
|
+ // }
|
|
|
|
+ // if(item.code=='COLOUR_PAPER'){
|
|
|
|
+ // item.image='/static/index/icon_aper_flower.png'
|
|
|
|
+ // }
|
|
|
|
+ // if(item.code=='BOOK_PAPER'){
|
|
|
|
+ // item.image='/static/index/icon_book.png'
|
|
|
|
+ // }
|
|
|
|
+ // if(item.code=='MAGAZINE'){
|
|
|
|
+ // item.image='/static/index/icon_magazine.png'
|
|
|
|
+ // }
|
|
|
|
+ // if(item.code=='OTHER_PAPER'){
|
|
|
|
+ // item.image='/static/index/icon_aper_miscellaneous.png'
|
|
|
|
+ // }
|
|
|
|
+ // if(item.code=='NEWS_PAPER'){
|
|
|
|
+ // item.image='/static/index/icon_newspaper.png'
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
|
|
- })
|
|
|
|
- // 塑料类
|
|
|
|
- this.rubbishSLList=b.rubbishTypeVOList
|
|
|
|
- this.rubbishSLList.map(item=>{
|
|
|
|
- if(item.code=='PLASTIC_WHITE'){
|
|
|
|
- item.image='/static/index/icon_frame_white.png'
|
|
|
|
- }
|
|
|
|
- if(item.code=='PLASTIC_BLACK'){
|
|
|
|
- item.image='/static/index/icon_frame_black.png'
|
|
|
|
- }
|
|
|
|
- if(item.code=='PMMA'){
|
|
|
|
- item.image='/static/index/icon_acrylic.png'
|
|
|
|
- }
|
|
|
|
- if(item.code=='PLASTIC_LUCENCY'){
|
|
|
|
- item.image='/static/index/icon_bottle.png'
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- // 衣物
|
|
|
|
- this.rubbishYWList=c.rubbishTypeVOList
|
|
|
|
- this.rubbishYWList.map(item=>{
|
|
|
|
- if(item.code=='SIMPLE_CLOTHES'){
|
|
|
|
- item.image='/static/index/icon_clothes.png'
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- // 金属
|
|
|
|
- this.rubbishJSList=d.rubbishTypeVOList
|
|
|
|
- this.rubbishJSList.map(item=>{
|
|
|
|
- if(item.code=='THIN_IRON'){
|
|
|
|
- item.image='/static/index/icon_iron_thin.png'
|
|
|
|
- }
|
|
|
|
- if(item.code=='THICK_IRON'){
|
|
|
|
- item.image='/static/index/icon_iron_thick.png'
|
|
|
|
- }
|
|
|
|
- if(item.code=='STAINLESS_IRON'){
|
|
|
|
- item.image='/static/index/icon_steel.png'
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- this.rubbishPaperName=a.name
|
|
|
|
- this.rubbishSLName=b.name
|
|
|
|
- this.rubbishYWName=c.name
|
|
|
|
- this.rubbishJSName=d.name
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
|
|
+ // })
|
|
|
|
+ // // 塑料类
|
|
|
|
+ // this.rubbishSLList=b.rubbishTypeVOList
|
|
|
|
+ // this.rubbishSLList.map(item=>{
|
|
|
|
+ // if(item.code=='PLASTIC_WHITE'){
|
|
|
|
+ // item.image='/static/index/icon_frame_white.png'
|
|
|
|
+ // }
|
|
|
|
+ // if(item.code=='PLASTIC_BLACK'){
|
|
|
|
+ // item.image='/static/index/icon_frame_black.png'
|
|
|
|
+ // }
|
|
|
|
+ // if(item.code=='PMMA'){
|
|
|
|
+ // item.image='/static/index/icon_acrylic.png'
|
|
|
|
+ // }
|
|
|
|
+ // if(item.code=='PLASTIC_LUCENCY'){
|
|
|
|
+ // item.image='/static/index/icon_bottle.png'
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // // 衣物
|
|
|
|
+ // this.rubbishYWList=c.rubbishTypeVOList
|
|
|
|
+ // this.rubbishYWList.map(item=>{
|
|
|
|
+ // if(item.code=='SIMPLE_CLOTHES'){
|
|
|
|
+ // item.image='/static/index/icon_clothes.png'
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // // 金属
|
|
|
|
+ // this.rubbishJSList=d.rubbishTypeVOList
|
|
|
|
+ // this.rubbishJSList.map(item=>{
|
|
|
|
+ // if(item.code=='THIN_IRON'){
|
|
|
|
+ // item.image='/static/index/icon_iron_thin.png'
|
|
|
|
+ // }
|
|
|
|
+ // if(item.code=='THICK_IRON'){
|
|
|
|
+ // item.image='/static/index/icon_iron_thick.png'
|
|
|
|
+ // }
|
|
|
|
+ // if(item.code=='STAINLESS_IRON'){
|
|
|
|
+ // item.image='/static/index/icon_steel.png'
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // this.rubbishPaperName=a.name
|
|
|
|
+ // this.rubbishSLName=b.name
|
|
|
|
+ // this.rubbishYWName=c.name
|
|
|
|
+ // this.rubbishJSName=d.name
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // },
|
|
// 预约
|
|
// 预约
|
|
submit(){
|
|
submit(){
|
|
const testVal=/^1[34578]\d{9}$/
|
|
const testVal=/^1[34578]\d{9}$/
|