diff --git a/pages/index/index.vue b/pages/index/index.vue index 94a29e3..532ed6c 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -65,7 +65,7 @@ - + 回收品类 {{item.type_name}} @@ -86,7 +86,7 @@ 备注:{{item.remark}} - + {{item.accept_name}} @@ -115,7 +115,7 @@ {{item.order_time_text}} - 1.5公里 + {{item.distance}}公里 ‌{{item.accept_address}} @@ -144,7 +144,7 @@ 备注:{{item.remark}} - + {{item.person_name}} @@ -159,8 +159,9 @@ - 更多操作 - + + 更多操作 + 取消订单 改派订单 @@ -359,6 +360,7 @@ export default { data() { return { + path: this.path, userinfo: {}, personInfo: {}, jscode:'', @@ -425,7 +427,7 @@ pop3Show: false, pop4Show: false, notesText: '', - moreShow: false, + moreShow: {}, orderId: '', statusToast: '', showCity: false, @@ -479,6 +481,11 @@ }, onLoad() { this.getauth() + + /* #ifdef H5 */ + this.latitude = 32.199974 + this.longitude = 118.715805 + /* #endif */ // let _this = this; // util.getAddress(function(res){ // _this.cityText = res.city; @@ -532,6 +539,9 @@ } }, methods: { + moreClick(id){ + this.$set(this.moreShow, id, this.moreShow[id]?false:true) + }, callPhone(phoneNumber) { uni.makePhoneCall({ phoneNumber: phoneNumber, // 必需,电话号码字符串 @@ -545,6 +555,8 @@ }, initFun(){ let _this = this; + this.recycleList = [] + this.qiangdanArr = [] if(this.longitude){ util.getAddress(function(res){ _this.cityText = res.city; @@ -556,7 +568,7 @@ }) this.recycleOrderList() }else{ - _this.qiangdanlist() + this.qiangdanlist() this.recycleOrderList() } }, @@ -622,7 +634,8 @@ this.$api.cancelorder(data,res=>{ if(res.code == '1'){ uni.showToast({ title: this.statusToast , icon: 'success' }) - this.recycleOrderList() + // this.recycleOrderList() + this.initFun(); this.cancleShow = false setTimeout(()=>{ this.menuNum = 2 @@ -653,7 +666,8 @@ if(res.code == '1'){ _this.tabCur = 3; uni.showToast({ title: '签到成功' , icon: 'success' }) - _this.recycleOrderList() + // _this.recycleOrderList() + this.initFun(); setTimeout(()=>{ _this.menuNum = 2 },2000) @@ -670,7 +684,8 @@ if(res.code == '1'){ _this.tabCur = 3; uni.showToast({ title: '签到成功' , icon: 'success' }) - _this.recycleOrderList() + // _this.recycleOrderList() + this.initFun(); setTimeout(()=>{ _this.menuNum = 2 },2000) @@ -727,7 +742,8 @@ if(res.code == '1'){ this.tabCur = 2; uni.showToast({ title: this.statusToast , icon: 'success' }) - this.recycleOrderList() + // this.recycleOrderList() + this.initFun(); setTimeout(()=>{ this.menuNum = 2 },2000) @@ -745,7 +761,11 @@ if(res.code == '1'){ this.tabCur = 7; uni.showToast({ title: '抢单成功' , icon: 'success' }) - this.recycleOrderList() + // this.recycleList = [] + // this.qiangdanArr = [] + // this.recycleOrderList() + // this.qiangdanlist() + this.initFun(); setTimeout(()=>{ this.menuNum = 2 },2000) @@ -762,17 +782,20 @@ cancleClickOrder(id){ this.orderId = id this.cancleShow = true - this.moreShow = false + // this.moreShow = false + this.$set(this.moreShow, id, false) }, changeClickOrder(id){ this.pop4Show = true - this.moreShow = false + // this.moreShow = false this.orderId = id + this.$set(this.moreShow, id, false) }, selectTab(id){ - this.page=1 + this.page2=1 this.tabCur = id - // this.recycleList = [] + this.recycleList = [] + this.recycleOrderList(id) }, qiangdanlist(){ console.log('fffffffff') @@ -793,12 +816,14 @@ } }) }, - recycleOrderList(){ + recycleOrderList(status){ console.log('fffffffff') let data = { - status: '', + status: status, page: this.page2, limit: this.limit + // longitude: this.longitude, + // latitude: this.latitude } this.$api.recycleOrderList(data,res=>{ if(res.code == '1'){ diff --git a/pages/index/person.vue b/pages/index/person.vue new file mode 100644 index 0000000..f6e8d23 --- /dev/null +++ b/pages/index/person.vue @@ -0,0 +1,183 @@ + + + + + \ No newline at end of file diff --git a/pages/order/detail.vue b/pages/order/detail.vue index e82754b..85ebbdd 100644 --- a/pages/order/detail.vue +++ b/pages/order/detail.vue @@ -118,6 +118,7 @@ {{order_person_time}} + 选择预约时间