Commit d8b0352f authored by 和慭琛's avatar 和慭琛

第二轮提测

parent c869735d
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
<view class="locationTitleView"> <view class="locationTitleView">
<image class="locationIcon" :src="icon_location" mode=""></image> <image class="locationIcon" :src="icon_location" mode=""></image>
<text class="locationTitle">定位位置</text> <text class="locationTitle">定位位置</text>
<text class="itemRedStar">*</text>
</view> </view>
<view class="locationRightView"> <view class="locationRightView">
<text class="reLocationTitle">重新定位</text> <text class="reLocationTitle">重新定位</text>
...@@ -87,12 +86,10 @@ ...@@ -87,12 +86,10 @@
</view> </view>
<view class="bottomView"> <view class="bottomView">
<view class="bottomLeftView" @click="recordClick()"> <view class="bottomLeftView" @click="recordClick()">
<!--text class="u-font-28 Gray666">查看历史订单</text-->
<image class="mineIcon" :src="icon_mine" mode=""></image> <image class="mineIcon" :src="icon_mine" mode=""></image>
<text class="mineText">我的</text> <text class="mineText">我的</text>
</view> </view>
<!--@click="confirmClick()"--> <view class="bottomRightView" @click='confirmClick()'>
<view class="bottomRightView" @click='confirmClick()' >
<text class="u-font-32 whiteColor">立即下单</text> <text class="u-font-32 whiteColor">立即下单</text>
</view> </view>
</view> </view>
...@@ -128,7 +125,8 @@ ...@@ -128,7 +125,8 @@
icon_agree_yes:'', icon_agree_yes:'',
icon_agree_no:'', icon_agree_no:'',
icon_top:'', icon_top:'',
icon_mine:'' icon_mine:'',
TimeID:-1
} }
}, },
...@@ -149,6 +147,7 @@ ...@@ -149,6 +147,7 @@
onShow() { onShow() {
//this.getWorkerType() //this.getWorkerType()
//this.getPerson() //this.getPerson()
this.isClean = true
this.checkClean() this.checkClean()
//getApp().initAPIneedToken //getApp().initAPIneedToken
...@@ -156,6 +155,7 @@ ...@@ -156,6 +155,7 @@
methods: { methods: {
nameInput(e){ nameInput(e){
this.name = e.detail.value
// console.log('联系人 监听:') // console.log('联系人 监听:')
// console.log(e.detail.value) // console.log(e.detail.value)
// console.log('name:') // console.log('name:')
...@@ -210,18 +210,31 @@ ...@@ -210,18 +210,31 @@
//勾选点击 //勾选点击
agreeClick: function (isAgree) { agreeClick: function (isAgree) {
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
this.isAgree = !isAgree this.isAgree = !isAgree
console.log(this.isAgree) console.log(this.isAgree)
}, 1000);
}, },
//服务协议 点击 //服务协议 点击
protocolClick: function () { protocolClick: function () {
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
console.log('服务协议 点击') console.log('服务协议 点击')
uni.showLoading({ uni.showLoading({
title:'加载中' title:'加载中'
}) })
//https://system.dev.banshouhui.com/pdfjs/web/用户注册协议.pdf
uni.downloadFile({ uni.downloadFile({
url: 'https://system.dev.banshouhui.com/pdfjs/web/用户注册协议.pdf', url: getApp().globalData.domain_Name +'/pdfjs/web/用户注册协议.pdf',
success: (res) => { success: (res) => {
uni.hideLoading() uni.hideLoading()
if (res.statusCode === 200) { if (res.statusCode === 200) {
...@@ -249,7 +262,9 @@ ...@@ -249,7 +262,9 @@
} }
}, },
fail() { fail(res) {
console.log('打开服务协议失败')
console.log(res)
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
icon:'none', icon:'none',
...@@ -257,11 +272,19 @@ ...@@ -257,11 +272,19 @@
}) })
} }
}); });
}, 1000);
}, },
//查看历史订单 //查看历史订单
recordClick: function () { recordClick: function () {
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
if(!getApp().globalData.token){ if(!getApp().globalData.token){
uni.navigateTo({ uni.navigateTo({
url: '/pages/login/wxlogin' url: '/pages/login/wxlogin'
...@@ -273,10 +296,21 @@ ...@@ -273,10 +296,21 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/record' url: '/pages/index/record'
}) })
},
1000);
}, },
//立即下单 //立即下单
confirmClick: function () { confirmClick: function () {
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
console.log('立即下单') console.log('立即下单')
console.log(getApp().globalData.token) console.log(getApp().globalData.token)
...@@ -309,11 +343,24 @@ ...@@ -309,11 +343,24 @@
this.createAppletsOrder() this.createAppletsOrder()
}, 1000);
}, },
//非空判断 //非空判断
checkAllInput: function () { checkAllInput: function () {
console.log('下单前的 联系人:'+this.name+'字符串长度:'+this.name.length)
console.log('下单前的 联系人电话:'+this.phone)
console.log('下单前的 地址:'+this.address)
console.log('下单前的 产品类型:'+this.activeProduct)
console.log('下单前的 服务类型:'+this.activeService)
console.log('下单前的 服务需求:'+this.demandContent)
if(this.name.length>0 if(this.name.length>0
&& this.phone.length>0 && this.phone.length>0
//&& this.location.length>0 //&& this.location.length>0
...@@ -323,16 +370,7 @@ ...@@ -323,16 +370,7 @@
&& this.demandContent.length>0){ && this.demandContent.length>0){
this.isAllInput = true this.isAllInput = true
} }
/*
this.name = '',
this.phone = '',
this.location = '',
this.address = '',
this.activeProduct = '',
this.activeService = '',
this.demandContent= '',
this.isAgree = false,
*/
}, },
...@@ -919,6 +957,13 @@ ...@@ -919,6 +957,13 @@
height: 168rpx; height: 168rpx;
} }
.uButton{
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
</style> </style>
...@@ -73,7 +73,8 @@ ...@@ -73,7 +73,8 @@
activeTop:0, activeTop:0,
unfinishList:[], unfinishList:[],
finishList:[], finishList:[],
icon_noData:'' icon_noData:'',
TimeID:-1
} }
}, },
onLoad() { onLoad() {
...@@ -205,18 +206,31 @@ ...@@ -205,18 +206,31 @@
//详情点击 //详情点击
itemClick: function (item) { itemClick: function (item) {
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
uni.navigateTo({ uni.navigateTo({
url: '/pages/take/detail' url: '/pages/take/detail'
+'?orderId='+item.orderId +'?orderId='+item.orderId
+'&isBottomShow='+false, +'&isBottomShow='+false,
}) })
}, 1000);
}, },
bottomClick: function (item) { bottomClick: function (item) {
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
uni.navigateTo({ uni.navigateTo({
url: '/pages/take/index', url: '/pages/take/index',
}) })
}, 1000);
}, },
...@@ -232,7 +246,6 @@ ...@@ -232,7 +246,6 @@
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
......
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
return { return {
activeService:'家电服务', activeService:'家电服务',
count:'3', count:'3',
phone:'400-8834-123' phone:'400-8834-123',
TimeID:-1
} }
}, },
onLoad(e) { onLoad(e) {
...@@ -65,25 +66,90 @@ ...@@ -65,25 +66,90 @@
//订阅公众号 点击 //订阅公众号 点击
noticeClick: function () { noticeClick: function () {
this.showSubscribeModal()
},
showSubscribeModal: function (){
let that = this
uni.showModal({
title:'提示',
content:'为更好的追踪工单实时状态,服务号需要在您的下单时向您发送消息',
confirmText:'同意',
cancelText:'拒绝',
success(res) {
if (res.confirm) {
//调用订阅消息
console.log('用户点击 确定');
//调用订阅
that.getSubSubscribeMessage();
}else if (res.cancel) {
console.log('用户点击 拒绝');
}
}
})
}, },
//获取消息订阅信息
getSubSubscribeMessage: function (){
let that = this
uni.requestSubscribeMessage({
tmplIds: ['3doUrjIT3-FIfmzsLdBy5MQ5i_q5braPzIbVZRBoEjU'],
success (res) {
console.log('请求订阅信息 成功:')
console.log(res)
uni.showToast({
icon:'none',
title:'订阅成功'
})
//this.createAppletsOrder()
},
fail (res){
console.log('请求订阅信息 失败:')
console.log(res)
}
})
},
//下单记录 点击 //下单记录 点击
recordClick: function () { recordClick: function () {
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/record' url: '/pages/index/record'
}) })
}, 1000);
}, },
//再下一单 点击 //再下一单 点击
oneMoreClick: function () { oneMoreClick: function () {
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
let pages = getCurrentPages(); let pages = getCurrentPages();
let prevPage = pages[pages.length - 2]; //上一个页面 let prevPage = pages[pages.length - 2]; //上一个页面
prevPage.$vm.isClean = true; prevPage.$vm.isClean = true;
uni.navigateBack({ uni.navigateBack({
}) })
}, 1000);
}, },
} }
} }
...@@ -133,7 +199,6 @@ ...@@ -133,7 +199,6 @@
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
......
...@@ -25,7 +25,8 @@ ...@@ -25,7 +25,8 @@
isNewUser:false, isNewUser:false,
unionID:'', unionID:'',
openID:'', openID:'',
icon_notice:'' icon_notice:'',
TimeID:-1
} }
}, },
onLoad() { onLoad() {
...@@ -39,15 +40,13 @@ ...@@ -39,15 +40,13 @@
//用户授权得到用户的信息 //用户授权得到用户的信息
getUserInfo: async function(e) { getUserInfo: async function(e) {
// this.getSSOID() clearTimeout(this.TimeID);
// return this.TimeID = setTimeout(() => {
console.log('获取用户信息') console.log('获取用户信息')
console.log(e.detail.userInfo) console.log(e.detail.userInfo)
if (e.detail.errMsg == 'getUserInfo:fail auth deny') { if (e.detail.errMsg == 'getUserInfo:fail auth deny') {
//this.$u.toast('未授权');
uni.showModal({ uni.showModal({
title: '授权失败', title: '授权失败',
content: '请允许获取用户信息的授权', content: '请允许获取用户信息的授权',
...@@ -57,28 +56,12 @@ ...@@ -57,28 +56,12 @@
this.getCode() this.getCode()
/*
try {
let code = await this.getCode();
let rawData = e.detail
let data = {
code: code,
nickname: rawData.userInfo.nickName,
avatar: rawData.userInfo.avatarUrl,
encryptedData: rawData.encryptedData,
iv: rawData.iv
} }
this.getUsersByCode(code) }, 1000);
//this.getUnionID(code)
//this.toLogin(data);
} catch (e) {
this.$u.toast(e);
}
*/
}
}, },
...@@ -210,6 +193,9 @@ ...@@ -210,6 +193,9 @@
//获取用户手机号 //获取用户手机号
getPhoneNumber: async function(e) { getPhoneNumber: async function(e) {
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
console.log('获取用户手机号') console.log('获取用户手机号')
console.log(e.detail) console.log(e.detail)
...@@ -224,6 +210,10 @@ ...@@ -224,6 +210,10 @@
this.findByMobile(e) this.findByMobile(e)
} }
}, 1000);
}, },
...@@ -415,7 +405,6 @@ ...@@ -415,7 +405,6 @@
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
......
<template> <template>
<view class="backView"> <view class="backView">
<view class="topView"> <view class="topView">
<view class="itemView u-m-t-30"> <view class="itemView u-m-t-30" v-if="orderInfo.contactName">
<text class="titleText u-m-l-30">联系人:</text> <text class="titleText u-m-l-30">联系人:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.contactName">{{orderInfo.contactName}}</text> <text class="contentText u-m-l-20">{{orderInfo.contactName}}</text>
<text class="contentText u-m-l-20" v-if="orderInfo.contactMobilephone">{{orderInfo.contactMobilephone}}</text> <text class="contentText u-m-l-20" v-if="orderInfo.contactMobilephone">{{orderInfo.contactMobilephone}}</text>
</view> </view>
<view class="itemView u-m-t-30"> <view class="itemView u-m-t-30" v-if="orderInfo.contactAddress">
<text class="titleText u-m-l-30">地址:</text> <text class="titleText u-m-l-30">地址:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.contactAddress">{{orderInfo.contactAddress}}</text> <text class="contentText u-m-l-20">{{orderInfo.contactAddress}}</text>
</view> </view>
<view class="itemView u-m-t-60"> <view class="itemView u-m-t-60">
<text class="titleText u-m-l-30">类型:</text> <text class="titleText u-m-l-30">类型:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.inGuaranteePeriodText">({{orderInfo.inGuaranteePeriodText}}) {{orderInfo.orderServiceType}}</text> <text class="contentText u-m-l-20" v-if="orderInfo.inGuaranteePeriodText">({{orderInfo.inGuaranteePeriodText}}) {{orderInfo.orderServiceType}}</text>
</view> </view>
<view class="itemView u-m-t-30"> <view class="itemView u-m-t-30" v-if="orderInfo.brandName">
<text class="titleText u-m-l-30">产品:</text> <text class="titleText u-m-l-30">产品:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.brandName">{{orderInfo.brandName}}-{{orderInfo.categoryName}}</text> <text class="contentText u-m-l-20">{{orderInfo.brandName}}-{{orderInfo.categoryName}}</text>
</view> </view>
<view class="itemView u-m-t-30"> <view class="itemView u-m-t-30" v-if="orderInfo.statusText">
<text class="titleText u-m-l-30">状态:</text> <text class="titleText u-m-l-30">状态:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.statusText">{{orderInfo.statusText}}</text> <text class="contentText u-m-l-20">{{orderInfo.statusText}}</text>
</view> </view>
<view class="itemView u-m-t-30"> <view class="itemView u-m-t-30" v-if="orderInfo.serviceContent">
<text class="titleText u-m-l-30">描述:</text> <text class="titleText u-m-l-30">描述:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.serviceContent">{{orderInfo.serviceContent}}</text> <text class="contentText u-m-l-20">{{orderInfo.serviceContent}}</text>
</view> </view>
<view class="itemView u-m-t-60 u-p-b-40"> <view class="itemView u-m-t-60 u-p-b-40" v-if="orderInfo.createDatetime">
<text class="titleText u-m-l-30">下单时间:</text> <text class="titleText u-m-l-30">下单时间:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.createDatetime">{{formatDate(orderInfo.createDatetime)}}</text> <text class="contentText u-m-l-20">{{formatDate(orderInfo.createDatetime)}}</text>
</view> </view>
<view class="divideLine"></view> <view class="divideLine"></view>
</view> </view>
<!--view class="willTakeView" v-if="orderInfo.statusText == '待接单'">
<view class="itemView u-m-t-50">
<text class="titleText u-m-l-30">预约时间:</text>
<text class="blueContentText u-m-l-20" v-if="!orderInfo.appointmentDatetime">接单后可预约上门服务时间</text>
<text class="blueContentText u-m-l-20" v-if="orderInfo.appointmentDatetime">{{formatDate(orderInfo.appointmentDatetime)}}</text>
</view>
<mx-date-picker :show="showPicker" :type="type" :value="value" :show-tips="true" :begin-text="'入住'" :end-text="'离店'" :show-seconds="true" @confirm="onSelected" @cancel="onSelected" />
</view-->
<view class="willFinishView" v-if="orderInfo.statusText == '待完工'"> <view class="willFinishView" v-if="orderInfo.statusText == '待完工'">
<view class="itemView u-m-t-50"> <view class="itemView u-m-t-50" v-if="orderInfo.appointmentDatetime">
<text class="titleText u-m-l-30">预约时间:</text> <text class="titleText u-m-l-30">预约时间:</text>
<text class="blueContentText underLine u-m-l-20" v-if="orderInfo.appointmentDatetime">{{formatDate(orderInfo.appointmentDatetime)}}</text> <text class="blueContentText underLine u-m-l-20">{{formatDate(orderInfo.appointmentDatetime)}}</text>
</view> </view>
<view class="itemView u-m-t-30"> <view class="itemView u-m-t-30" v-if="orderInfo.maintainWorkerName">
<text class="titleText u-m-l-30">接单师傅:</text> <text class="titleText u-m-l-30">接单师傅:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.maintainWorkerName">{{orderInfo.maintainWorkerName}}</text> <text class="contentText u-m-l-20">{{orderInfo.maintainWorkerName}}</text>
<text class="blueContentText underLine u-m-l-20" v-if="orderInfo.maintainWorkerPhone">{{orderInfo.maintainWorkerPhone}}</text> <text class="blueContentText underLine u-m-l-20" v-if="orderInfo.maintainWorkerPhone">{{orderInfo.maintainWorkerPhone}}</text>
</view> </view>
<view class="itemView u-m-t-30 padding_bottom_130"> <view class="itemView u-m-t-30 padding_bottom_130" v-if="orderInfo.allocateWorkerDatetime">
<text class="titleText u-m-l-30">接单时间:</text> <text class="titleText u-m-l-30">接单时间:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.allocateWorkerDatetime">{{formatDate(orderInfo.allocateWorkerDatetime)}}</text> <text class="contentText u-m-l-20">{{formatDate(orderInfo.allocateWorkerDatetime)}}</text>
</view> </view>
</view> </view>
<view class="finishView" v-if="orderInfo.statusText == '已完工'"> <view class="finishView" v-if="orderInfo.statusText == '已完工'">
<view class="itemView u-m-t-50"> <view class="itemView u-m-t-50" v-if="orderInfo.maintainWorkerName">
<text class="titleText u-m-l-30">接单师傅:</text> <text class="titleText u-m-l-30">接单师傅:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.maintainWorkerName">{{orderInfo.maintainWorkerName}}</text> <text class="contentText u-m-l-20">{{orderInfo.maintainWorkerName}}</text>
<text class="blueContentText underLine u-m-l-20" v-if="orderInfo.maintainWorkerPhone">{{orderInfo.maintainWorkerPhone}}</text> <text class="blueContentText underLine u-m-l-20" v-if="orderInfo.maintainWorkerPhone">{{orderInfo.maintainWorkerPhone}}</text>
</view> </view>
<view class="itemView u-m-t-30 u-p-b-50"> <view class="itemView u-m-t-30 u-p-b-50" v-if="orderInfo.allocateWorkerDatetime">
<text class="titleText u-m-l-30">接单时间:</text> <text class="titleText u-m-l-30">接单时间:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.allocateWorkerDatetime">{{formatDate(orderInfo.allocateWorkerDatetime)}}</text> <text class="contentText u-m-l-20">{{formatDate(orderInfo.allocateWorkerDatetime)}}</text>
</view> </view>
<view class="divideLine"></view> <view class="divideLine"></view>
<view class="itemView u-m-t-50"> <view class="itemView u-m-t-50" v-if="orderInfo.orderFinishDatetime">
<text class="titleText u-m-l-30">完工时间:</text> <text class="titleText u-m-l-30">完工时间:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.orderFinishDatetime">{{formatDate(orderInfo.orderFinishDatetime)}}</text> <text class="contentText u-m-l-20">{{formatDate(orderInfo.orderFinishDatetime)}}</text>
</view> </view>
<view class="itemView u-m-t-30"> <view class="itemView u-m-t-30" v-if="orderInfo.images">
<text class="titleText u-m-l-30">完工凭证:</text> <text class="titleText u-m-l-30">完工凭证:</text>
</view> </view>
<view class="photoBackView u-p-b-24" v-if="orderInfo.images"> <view class="photoBackView u-p-b-24" v-if="orderInfo.images">
...@@ -78,9 +70,9 @@ ...@@ -78,9 +70,9 @@
<image class="photoImage" :src="item" mode="aspectFill"></image> <image class="photoImage" :src="item" mode="aspectFill"></image>
</view> </view>
</view> </view>
<view class="itemView u-m-t-30 padding_bottom_180"> <view class="itemView u-m-t-30 padding_bottom_180" v-if="orderInfo.guaranteeExplain">
<text class="titleText u-m-l-30">完工描述:</text> <text class="titleText u-m-l-30">完工描述:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.guaranteeExplain">{{orderInfo.guaranteeExplain}}</text> <text class="contentText u-m-l-20">{{orderInfo.guaranteeExplain}}</text>
</view> </view>
</view> </view>
<view class="bottomView" v-if="orderInfo.statusText != '已完工' && isBottomShow == true"> <view class="bottomView" v-if="orderInfo.statusText != '已完工' && isBottomShow == true">
...@@ -113,6 +105,7 @@ ...@@ -113,6 +105,7 @@
datetime: '2020/12/05 15:00:12', datetime: '2020/12/05 15:00:12',
type: '', type: '',
value: '', value: '',
TimeID:-1
} }
}, },
...@@ -134,10 +127,34 @@ ...@@ -134,10 +127,34 @@
}, },
onShow(){ onShow(){
this.getOrderDetail()
this.getToken()
}, },
methods: { methods: {
async getToken () {
let that = this
await uni.getStorage({
key: 'token',
success: function (res) {
console.log('本地获取token成功')
console.log(res.data);
getApp().globalData.token = res.data
that.getOrderDetail()
},
fail() {
uni.navigateTo({
url:'/pages/login/wxlogin'
})
}
})
//await this.getData()
},
//'/wxh-worker-rest/rest/order/revision/applets/' //'/wxh-worker-rest/rest/order/revision/applets/'
//+this.globalData.token+'/order/detail', //+this.globalData.token+'/order/detail',
...@@ -148,6 +165,10 @@ ...@@ -148,6 +165,10 @@
console.log(getApp().globalData.domain_Name console.log(getApp().globalData.domain_Name
+getApp().globalData.workOrderDetail) +getApp().globalData.workOrderDetail)
uni.showLoading({
title:'加载中'
})
uni.request({ uni.request({
url: getApp().globalData.domain_Name url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/order/revision/applets/' +'/wxh-worker-rest/rest/order/revision/applets/'
...@@ -157,6 +178,7 @@ ...@@ -157,6 +178,7 @@
orderId:this.orderId orderId:this.orderId
}, },
success: (res) => { success: (res) => {
uni.hideLoading()
console.log('获取工单详情 成功') console.log('获取工单详情 成功')
console.log(res) console.log(res)
...@@ -186,8 +208,13 @@ ...@@ -186,8 +208,13 @@
}, },
fail: (e) => { fail: (e) => {
uni.hideLoading()
console.log('获取工单详情 失败') console.log('获取工单详情 失败')
console.log(e) console.log(e)
uni.showToast({
icon:'none',
title:'获取工单详情失败'
})
} }
}) })
}, },
...@@ -233,6 +260,10 @@ ...@@ -233,6 +260,10 @@
//时间选择器 选择 //时间选择器 选择
onSelected: function (e) {//选择 onSelected: function (e) {//选择
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
this.showPicker = false; this.showPicker = false;
if(e) { if(e) {
this[this.type] = e.value; this[this.type] = e.value;
...@@ -242,6 +273,9 @@ ...@@ -242,6 +273,9 @@
//原始的Date对象 //原始的Date对象
console.log('date => ' + e.date); console.log('date => ' + e.date);
} }
}, 1000);
}, },
//预约请求 //预约请求
...@@ -301,6 +335,10 @@ ...@@ -301,6 +335,10 @@
cancelClick: function () { cancelClick: function () {
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
console.log('退单点击') console.log('退单点击')
uni.showLoading({ uni.showLoading({
title:'请稍候' title:'请稍候'
...@@ -353,10 +391,18 @@ ...@@ -353,10 +391,18 @@
} }
}) })
}, 1000);
}, },
finishClick: function () { finishClick: function () {
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
if(this.bottomTitle=='接单'){ if(this.bottomTitle=='接单'){
this.acceptPost() this.acceptPost()
return return
...@@ -374,6 +420,10 @@ ...@@ -374,6 +420,10 @@
+'&inGuaranteePeriodText='+this.orderInfo.inGuaranteePeriodText +'&inGuaranteePeriodText='+this.orderInfo.inGuaranteePeriodText
+'&orderServiceType='+this.orderInfo.orderServiceType, +'&orderServiceType='+this.orderInfo.orderServiceType,
}) })
}, 1000);
}, },
//接单请求 //接单请求
...@@ -431,7 +481,7 @@ ...@@ -431,7 +481,7 @@
//时间戳转换成日期时间 //时间戳转换成日期时间
formatDate: function(value) { formatDate: function(value) {
var date = new Date(); var date = new Date();
//date.setTime(value); date.setTime(value);
var month = date.getMonth() + 1; var month = date.getMonth() + 1;
var hours = date.getHours(); var hours = date.getHours();
if (hours < 10) if (hours < 10)
......
...@@ -168,6 +168,7 @@ ...@@ -168,6 +168,7 @@
orderServiceType:'', orderServiceType:'',
orderInfo:{}, orderInfo:{},
currentIndex:0, currentIndex:0,
TimeID:-1,
//产品规格 相关 //产品规格 相关
is_SPECIFICATIONS_picker_show:false, is_SPECIFICATIONS_picker_show:false,
...@@ -326,7 +327,7 @@ ...@@ -326,7 +327,7 @@
}else{ }else{
uni.showToast({ uni.showToast({
icon:'none', icon:'none',
title:res.errMsg title:'获取完工页详情失败'
}) })
...@@ -338,6 +339,10 @@ ...@@ -338,6 +339,10 @@
uni.hideLoading() uni.hideLoading()
console.log('获取完工页详情 失败') console.log('获取完工页详情 失败')
console.log(e) console.log(e)
uni.showToast({
icon:'none',
title:'获取完工页详情失败'
})
} }
}) })
}, },
...@@ -405,6 +410,10 @@ ...@@ -405,6 +410,10 @@
//点击类 事件处理 //点击类 事件处理
clickTypeClick: function (item,ikey) { clickTypeClick: function (item,ikey) {
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
console.log('点击类 点击') console.log('点击类 点击')
console.log(ikey) console.log(ikey)
console.log(item.fieldsTitle) console.log(item.fieldsTitle)
...@@ -521,6 +530,11 @@ ...@@ -521,6 +530,11 @@
//文本(多行) TEXT //文本(多行) TEXT
*/ */
}, 1000);
}, },
//http://system.banshouhui.com/wxh-worker-rest/rest/specification/RTOKEN513816878fd89281eceb1e13919b92bd6953a1b9/88 //http://system.banshouhui.com/wxh-worker-rest/rest/specification/RTOKEN513816878fd89281eceb1e13919b92bd6953a1b9/88
...@@ -802,6 +816,8 @@ ...@@ -802,6 +816,8 @@
//照片 点击 //照片 点击
photoClick: function (item,ikey) { photoClick: function (item,ikey) {
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
console.log('照片点击') console.log('照片点击')
console.log(item) console.log(item)
console.log(ikey) console.log(ikey)
...@@ -811,6 +827,9 @@ ...@@ -811,6 +827,9 @@
}else{ }else{
this.previewImage(ikey) this.previewImage(ikey)
} }
}, 1000);
}, },
//照片预览 //照片预览
...@@ -1068,12 +1087,18 @@ ...@@ -1068,12 +1087,18 @@
confirmClick: function () { confirmClick: function () {
console.log('确认完工 点击')
//this.photoUpload() clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
console.log('确认完工 点击')
//this.photoUpload()
this.checkAllRequired() this.checkAllRequired()
}, 1000);
}, },
//判断所有必填项 //判断所有必填项
......
...@@ -133,7 +133,8 @@ ...@@ -133,7 +133,8 @@
//{title:'已完成',type:5}, //{title:'已完成',type:5},
], ],
currentOrderType: 0, currentOrderType: 0,
currentOrderTypeTitle:'全部' currentOrderTypeTitle:'全部',
TimeID:-1
} }
}, },
...@@ -142,6 +143,14 @@ ...@@ -142,6 +143,14 @@
this.icon_noData = getApp().globalData.icon_noData this.icon_noData = getApp().globalData.icon_noData
//this.getToken() //this.getToken()
this.datetime = this.getTime()
console.log('当前时间:'+this.datetime)
var yuyueDate = this.formatDate(1608249600000)
console.log('预约时间:'+yuyueDate)
}, },
onShow() { onShow() {
...@@ -295,9 +304,9 @@ ...@@ -295,9 +304,9 @@
//getApp().globalData.workOrderList //getApp().globalData.workOrderList
//获取工单列表 //获取工单列表
getOrderList: function (type) { getOrderList: function (type) {
uni.showLoading({ // uni.showLoading({
title:'加载中' // title:'加载中'
}) // })
uni.request({ uni.request({
url: getApp().globalData.domain_Name url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/order/revision/applets/' +'/wxh-worker-rest/rest/order/revision/applets/'
...@@ -306,7 +315,7 @@ ...@@ -306,7 +315,7 @@
data: { data: {
type:type, type:type,
pageNumber:0, pageNumber:0,
pageSize:10, pageSize:20,
}, },
success: (res) => { success: (res) => {
uni.hideLoading() uni.hideLoading()
...@@ -364,23 +373,14 @@ ...@@ -364,23 +373,14 @@
}, },
itemClick: function (item) { itemClick: function (item) {
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
console.log(item.statusText) console.log(item.statusText)
console.log(item.orderId) console.log(item.orderId)
if(this.activeTop==0){//抢单市场 if(this.activeTop==0){//抢单市场
if(item.statusText=='待抢单'){ if(item.statusText=='待抢单'){
/*
contactName:'',
contactMobilephone:'',
contactAddress:'',
inGuaranteePeriodText:'',
orderServiceType:'',
brandName:'',
categoryName:'',
statusText:'',
serviceContent:'',
createDatetime:'',
*/
uni.navigateTo({ uni.navigateTo({
url: '/pages/take/rob' url: '/pages/take/rob'
+'?orderId='+item.orderId +'?orderId='+item.orderId
...@@ -420,6 +420,11 @@ ...@@ -420,6 +420,11 @@
}) })
} }
}, 1000);
}, },
...@@ -437,6 +442,10 @@ ...@@ -437,6 +442,10 @@
//时间选择器 选择 //时间选择器 选择
onSelected: function (e) {//选择 onSelected: function (e) {//选择
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
this.showPicker = false; this.showPicker = false;
if(e) { if(e) {
this[this.type] = e.value; this[this.type] = e.value;
...@@ -446,6 +455,10 @@ ...@@ -446,6 +455,10 @@
//原始的Date对象 //原始的Date对象
console.log('date => ' + e.date); console.log('date => ' + e.date);
} }
}, 1000);
}, },
//预约请求 //预约请求
...@@ -487,6 +500,7 @@ ...@@ -487,6 +500,7 @@
icon:'none', icon:'none',
title:'预约成功' title:'预约成功'
}) })
console.log('是不是预约成功了?')
that.getOrderList(0) that.getOrderList(0)
}else{ }else{
uni.showToast({ uni.showToast({
...@@ -510,7 +524,7 @@ ...@@ -510,7 +524,7 @@
//时间戳转换成日期时间 //时间戳转换成日期时间
formatDate: function(value) { formatDate: function(value) {
var date = new Date(); var date = new Date();
//date.setTime(value); date.setTime(value);
var month = date.getMonth() + 1; var month = date.getMonth() + 1;
var hours = date.getHours(); var hours = date.getHours();
if (hours < 10) if (hours < 10)
...@@ -521,7 +535,23 @@ ...@@ -521,7 +535,23 @@
var time = date.getFullYear() + "-" + month + "-" + date.getDate() + var time = date.getFullYear() + "-" + month + "-" + date.getDate() +
" " + hours + ":" + minutes; " " + hours + ":" + minutes;
return time; return time;
} },
//获取当前时间
getTime:function(){
var date = new Date(),
year = date.getFullYear(),
month = date.getMonth() + 1,
day = date.getDate(),
hour = date.getHours() < 10 ? "0" + date.getHours() : date.getHours(),
minute = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes(),
second = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
month >= 1 && month <= 9 ? (month = "0" + month) : "";
day >= 0 && day <= 9 ? (day = "0" + day) : "";
var timer = year + '/' + month + '/' + day + ' ' + hour + ':' + minute + ':' + second;
return timer;
},
......
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
statusText:'', statusText:'',
serviceContent:'', serviceContent:'',
createDatetime:'', createDatetime:'',
TimeID:-1
} }
}, },
...@@ -211,9 +212,16 @@ ...@@ -211,9 +212,16 @@
}, },
robClick: function (item) { robClick: function (item) {
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
console.log('抢单 点击') console.log('抢单 点击')
this.checkUserStatus() this.checkUserStatus()
}, 1000);
}, },
//'/wxh-worker-rest/rest/order/revision/applets/' //'/wxh-worker-rest/rest/order/revision/applets/'
...@@ -338,6 +346,8 @@ ...@@ -338,6 +346,8 @@
//确认按钮 //确认按钮
modalConfirm: function (data) { modalConfirm: function (data) {
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
//1不是师傅 //1不是师傅
if(data==1){ if(data==1){
this.enterNow() this.enterNow()
...@@ -350,8 +360,12 @@ ...@@ -350,8 +360,12 @@
//3技能不匹配 //3技能不匹配
if(data==3){ if(data==3){
//this.completeNow()
this.contactService() this.contactService()
} }
}, 1000);
}, },
//立即入驻 //立即入驻
...@@ -411,15 +425,21 @@ ...@@ -411,15 +425,21 @@
icon:'none', icon:'none',
title:'抢单成功' title:'抢单成功'
}) })
uni.navigateBack({})
uni.navigateTo({
url: '/pages/take/detail'
+'?orderId='+this.orderId,
})
}else{ }else{
// uni.showToast({ // uni.showToast({
// icon:'none', // icon:'none',
// title:res.data.message // title:res.data.message
// }) // })
console.log('抢单不为200时候')
uni.showToast({ uni.showToast({
icon:'none', icon:'none',
title:res.message title:res.data.message
}) })
...@@ -443,7 +463,7 @@ ...@@ -443,7 +463,7 @@
//时间戳转换成日期时间 //时间戳转换成日期时间
formatDate: function(value) { formatDate: function(value) {
var date = new Date(); var date = new Date();
//date.setTime(value); date.setTime(value);
var month = date.getMonth() + 1; var month = date.getMonth() + 1;
var hours = date.getHours(); var hours = date.getHours();
if (hours < 10) if (hours < 10)
......
<template> <template>
<view class=""> <view class="">
<web-view src="https://system.banshouhui.com/weixiuapp/site/index.html#/?pioneerId=40"></web-view> <web-view :src="webUrl"></web-view>
</view> </view>
</template> </template>
...@@ -8,13 +8,15 @@ ...@@ -8,13 +8,15 @@
export default { export default {
data() { data() {
return { return {
activeService:'家电服务', webUrl:''
count:'3',
phone:'400-8834-123'
} }
}, },
onLoad(e) { onLoad(e) {
//https://system.banshouhui.com/weixiuapp/site/index.html#/?pioneerId=40
this.webUrl = getApp().globalData.domain_Name
+ '/weixiuapp/site/index.html#/?pioneerId=40'
console.log(this.webUrl)
}, },
methods: { methods: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment