Merge remote-tracking branch 'origin/master'
| | |
| | | <view class="index-wu" v-if="!isLogin"> |
| | | <image src="/static/icon/default_login@2x.png" mode="widthFix"></image> |
| | | <text>您还没有登录,请登录后查看订单</text> |
| | | <button>登录</button> |
| | | <button @click="toLogin">登录</button> |
| | | </view> |
| | | |
| | | <!-- 已登陆 --> |
| | |
| | | <view class="index-list-item-head-r" v-if="item.status === 2">已接单</view> |
| | | <view class="index-list-item-head-r" v-if="item.status === 3">进行中</view> |
| | | <view class="index-list-item-head-r" v-if="item.status === 2 && item.isUpdate === 1">已修改,待接单方确认</view> |
| | | <view class="index-list-item-head-r hui" v-if="item.status === 4">已完成</view> |
| | | <view class="index-list-item-head-r hui" v-if="item.status === 4 && item.commentStatus !== 0">已完成</view> |
| | | <view class="index-list-item-head-r hui" v-if="item.status === 99">已取消</view> |
| | | <view class="index-list-item-head-r" v-if="item.status === 4 && item.commentStatus === 0">待评价</view> |
| | | </view> |
| | |
| | | <view class="eidt-close" v-if="[0,1,2].includes(item.status)" @click.stop="orderId = item.id, show = true">取消订单</view> |
| | | <view class="eidt-phone" v-if="[2].includes(item.status)">联系师傅</view> |
| | | <view class="eidt-phone" v-if="item.status === 4 && item.commentStatus === 0">评价订单</view> |
| | | <view class="eidt-btn" v-if="[0,1,2].includes(item.status)" @click.stop="jumpEdit(item)">修改订单</view> |
| | | <view class="eidt-btn" v-if="[0,1,2].includes(item.status) && item.type !== 2" @click.stop="jumpEdit(item)">修改订单</view> |
| | | <view class="eidt-btn" v-if="(item.type === 2 && item.status === 0) || (item.type === 2 && item.status === 3)" @click.stop="jumpEdit(item)">继续支付</view> |
| | | <view class="eidt-btn" v-if="item.status === 2" @click.stop="startJobs(item.id)">开始作业</view> |
| | | <view class="eidt-btn" v-if="item.status === 3" @click.stop="jumpDesc(item)">完成并支付</view> |
| | |
| | | onShow(options) { |
| | | this.typeViewId = 0 |
| | | if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}'){ |
| | | console.log('已登陆') |
| | | this.isLogin = true |
| | | } |
| | | if (this.userInfo && this.userInfo.useIdentity == 1) { |
| | | this.typeViewId = 1 |
| | | } else { |
| | | this.typeViewId = 0 |
| | | } |
| | | if (!this.isOnce) { |
| | | this.commentStatus = '' |
| | | this.orderList = [] |
| | | this.next = true |
| | | this.page = 1 |
| | | this.getOrderList() |
| | | } |
| | | } else { |
| | | this.isLogin = false |
| | | console.log('未登陆') |
| | | } |
| | | if (this.userInfo && this.userInfo.useIdentity == 1) { |
| | | this.typeViewId = 1 |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | this.getOrderList() |
| | | }, |
| | | methods: { |
| | | toLogin() { |
| | | uni.navigateTo({ |
| | | url: '/pages/login/login' |
| | | }) |
| | | }, |
| | | startJobs(orderId) { |
| | | this.$u.api.begin({ orderId }) |
| | | .then(res => { |
| | |
| | | if (!this.form.linkPhone) { |
| | | return uni.showToast({ title: '请输入联系电话', icon: 'none' }) |
| | | } |
| | | if (!this.form.id) { |
| | | this.$u.api.release({ |
| | | ...this.form, |
| | | price: Number(this.form.price) * 100, |
| | |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | this.$u.api.updateOrder({ |
| | | ...this.form, |
| | | price: Number(this.form.price) * 100, |
| | | wayInfoDTOList: [ |
| | | { |
| | | lat: this.form.lat, |
| | | lgt: this.form.lgt, |
| | | location: this.form.location |
| | | }, |
| | | ...this.form.wayInfoDTOList, |
| | | { |
| | | lat: this.form.latEnd, |
| | | lgt: this.form.lgtEnd, |
| | | location: this.form.locationEnd |
| | | } |
| | | ] |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | uni.showToast({ |
| | | title: '编辑成功', |
| | | icon: 'success', |
| | | mask: true, |
| | | duration: 2000 |
| | | }) |
| | | setTimeout(() => { |
| | | uni.navigateBack({ delta: 1 }); |
| | | // uni.$emit('refresh') |
| | | }, 1500) |
| | | |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | uploadImg() { |
| | | var that = this; |
| | |
| | | }, |
| | | async onLoad() { |
| | | await this.$onLaunched; |
| | | this.getCategoryLists() |
| | | if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}') { |
| | | this.getOrderList() |
| | | this.getCategoryLists() |
| | | } |
| | | this.form.linkPhone = this.userInfo.telephone |
| | | }, |
| | | onShow(options) { |
| | | this.typeViewId = 0 |
| | | if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}'){ |
| | | console.log('已登陆') |
| | | this.isLogin = true |
| | | } |
| | | if (this.userInfo && this.userInfo.useIdentity == 1) { |
| | | this.typeViewId = 1 |
| | | } |
| | | |
| | | if (!this.isOnce && this.userInfo.useIdentity == 1) { |
| | | this.page = 1 |
| | | this.next = true |
| | | this.orderList = [] |
| | | this.getOrderList() |
| | | } |
| | | |
| | | } else { |
| | | this.isLogin = false |
| | | console.log('未登陆') |
| | | } |
| | | |
| | | if (this.userInfo && this.userInfo.useIdentity == 1) { |
| | | this.typeViewId = 1 |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | this.form.longitude = '' |
| | | this.form.location = '' |
| | | this.form.locationEnd = '' |
| | | this.form.wayInfoDTOList = '' |
| | | this.form.wayInfoDTOList = [] |
| | | this.form.workType = '' |
| | | this.form.days = '' |
| | | this.form.locationRemark = '' |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view style="width: 100%; height: calc(108rpx + env(safe-area-inset-bottom));" v-if="![4, 99].includes(info.status)"></view> |
| | | <view class="order-footer" v-if="![4, 99].includes(info.status)"> |
| | | <view style="width: 100%; height: calc(108rpx + env(safe-area-inset-bottom));" v-if="![99].includes(info.status)"></view> |
| | | <view class="order-footer" v-if="![99].includes(info.status)"> |
| | | <view class="order-footer-btn"> |
| | | <view class="order-footer-btn-a" @click="show = true" v-if="userInfo.id === info.acceptMemberId && info.status ===2">取消订单</view> |
| | | <view class="order-footer-btn-a" @click="show = true" v-if="userInfo.id === info.releaseMemberId && (info.status ===0 || info.status ===1|| info.status ===2)">取消订单</view> |
| | |
| | | uni.showToast({ title: '编辑成功', icon: 'success', mask: true, duration: 2000 }) |
| | | setTimeout(() => { |
| | | uni.navigateBack({ delta: 1 }); |
| | | uni.$emit('refresh') |
| | | // uni.$emit('refresh') |
| | | }, 1500) |
| | | } |
| | | } |
| | |
| | | uni.showToast({ title: '编辑成功', icon: 'success', mask: true, duration: 2000 }) |
| | | setTimeout(() => { |
| | | uni.navigateBack({ delta: 1 }); |
| | | uni.$emit('refresh') |
| | | // uni.$emit('refresh') |
| | | }, 1500) |
| | | } |
| | | }) |
| | |
| | | }) |
| | | setTimeout(() => { |
| | | uni.navigateBack({ delta: 1 }); |
| | | uni.$emit('refresh') |
| | | // uni.$emit('refresh') |
| | | }, 1500) |
| | | |
| | | } |
| | |
| | | // 请求拦截器 |
| | | uni.$u.http.interceptors.request.use((config) => { |
| | | const Headtoken = vm.$store.state.token |
| | | uni.showLoading({ title: '加载中' }); |
| | | // 判断有无token,有则加入请求头中 |
| | | if (Headtoken) { |
| | | config.header['token'] = Headtoken; |
| | |
| | | |
| | | // 响应拦截器 |
| | | uni.$u.http.interceptors.response.use((response) => { |
| | | uni.hideLoading(); |
| | | // console.log(response.data) |
| | | if (response.data.code === 5113) { |
| | | uni.switchTab({ |