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

第六轮提测

parent ebfd1fd6
......@@ -3,6 +3,10 @@
@import 'uview-ui/index.scss';
</style>
<script>
import {
AnalysysAgent
} from '@/utils/analysys_paas.js'
export default {
......@@ -109,6 +113,8 @@
this.getProtocolContent()
AnalysysAgent.registerSuperProperty("platform","take-order");
},
onShow: function() {
console.log('App Show')
......
//易观方舟
let argo ={
appkey: "5f2ac5996f36c714",
open: true,
/*
0 关闭调试模式(默认)。类型:Number。
1 开启调试模式,数据不入库。类型:Number。
2 开启调试模式,数据入库。类型:Number。
*/
debugMode:0,
autoTrack:true,
uploadURL: 'https://argo.banshouhui.com/'
}
export {
argo,
}
\ No newline at end of file
......@@ -6,6 +6,7 @@
*/
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
......@@ -15,25 +16,29 @@
},
{
"path": "pages/login/wxlogin",
"path": "pages/take/index",
"style": {
"navigationBarTitleText": "授权登录"
"navigationBarTitleText": "接单",
"enablePullDownRefresh": true
}
},
{
"path": "pages/take/index",
"path": "pages/login/wxlogin",
"style": {
"navigationBarTitleText": "接单",
"enablePullDownRefresh": true
"navigationBarTitleText": "授权登录"
}
},
{
"path": "pages/index/success",
"style": {
......
......@@ -196,6 +196,8 @@
onHide() {
this.isClean = true
},
methods: {
......@@ -346,8 +348,10 @@
//去接单列表页
goTakeClick: function () {
/*
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
*/
this.isMineShow = false
if(!getApp().globalData.token){
uni.navigateTo({
......@@ -362,15 +366,20 @@
})
},
1000);
/*
}, 1000);
*/
},
//查看历史订单
recordClick: function () {
/*
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
*/
this.isMineShow = false
if(!getApp().globalData.token){
uni.navigateTo({
......@@ -385,8 +394,11 @@
})
},
1000);
/*
}, 1000);
*/
},
......@@ -394,9 +406,10 @@
//立即下单
confirmClick: function () {
/*
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
*/
console.log('立即下单')
console.log(getApp().globalData.token)
......@@ -431,8 +444,9 @@
this.createAppletsOrder()
/*
}, 1000);
*/
......
......@@ -50,9 +50,10 @@
<view class="itemView u-m-t-50" v-if="orderInfo.appointmentDatetime">
<view class="u-p-l-30 u-p-r-30">
<text class="titleText">预约时间:</text>
<text class="blueContentText underLine u-m-l-10">{{formatDate(orderInfo.appointmentDatetime)}}</text>
<text class="blueContentText underLine u-m-l-10" @click.stop="onShowDatePicker('datetime',orderInfo)">{{formatDate(orderInfo.appointmentDatetime)}}</text>
</view>
</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 class="itemView u-m-t-30" v-if="orderInfo.maintainWorkerName">
<view class="u-p-l-30 u-p-r-30">
<text class="titleText">接单师傅:</text>
......@@ -60,6 +61,7 @@
<text class="blueContentText underLine u-m-l-10" @click="phoneCallClick(orderInfo.maintainWorkerPhone)" v-if="orderInfo.maintainWorkerPhone">{{orderInfo.maintainWorkerPhone}}</text>
</view>
</view>
<view class="itemView u-m-t-30 padding_bottom_130" v-if="orderInfo.allocateWorkerDatetime">
<view class="u-p-l-30 u-p-r-30">
<text class="titleText">接单时间:</text>
......@@ -123,12 +125,15 @@
ref="selector"
></w-picker>
</view>
</template>
<script>
import MxDatePicker from "@/components/mx-datepicker/mx-datepicker.vue";
export default {
components: {MxDatePicker},
data() {
return {
orderId:'',
......@@ -163,6 +168,7 @@
{title:'重复单',type:4},
{title:'单派错了',type:5},
],
}
},
......@@ -176,6 +182,9 @@
this.isBottomShow = e.isBottomShow
}
this.datetime = this.getTime()
console.log('当前时间:'+this.datetime)
//this.domain_name = getApp().globalData.domain_Name
......@@ -340,6 +349,15 @@
this.value = this['datetime'];
},
//时间选择器 选择
onShowDatePicker: function (type,item){//显示
console.log('当前工单ID:'+item.orderId)
this.orderId = item.orderId
this.type = type;
this.showPicker = true;
this.value = this[type];
},
//时间选择器 选择
onSelected: function (e) {//选择
......@@ -372,6 +390,9 @@
//2020/12/25 15:00:12
console.log('预约请求 dateTime'+dateTime)
let that = this
uni.showLoading({
title:'加载中'
})
uni.request({
url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/order/traceAndAppointment/traceOrder/'
......@@ -388,6 +409,7 @@
'Content-Type': 'application/x-www-form-urlencoded',
},
success: (res) => {
uni.hideLoading()
console.log('预约请求 成功')
console.log(res)
......@@ -396,7 +418,7 @@
icon:'none',
title:'预约成功'
})
this.getOrderDetail()
that.getOrderDetail()
}else{
uni.showToast({
icon:'none',
......@@ -409,6 +431,7 @@
},
fail: (e) => {
uni.hideLoading()
console.log('预约请求 失败')
console.log(e)
}
......@@ -595,6 +618,7 @@
})
},
//时间戳转换成日期时间
formatDate: function(value) {
var date = new Date();
......@@ -609,7 +633,28 @@
var time = date.getFullYear() + "-" + month + "-" + date.getDate() +
" " + hours + ":" + minutes;
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;
},
......@@ -797,4 +842,6 @@
align-items: center;
}
</style>
......@@ -14,7 +14,7 @@
<view class="activeItemBottom" v-if="activeTop == 2"></view>
</view>
</view>
<view class="listView">
<scroll-view class="listView">
<view class="itemView" v-if="activeTop == 0" @click="itemClick(item)" v-for="(item,ikey) in grabList":key="ikey">
<view class="nameView">
<view class="nameLeftView">
......@@ -91,7 +91,7 @@
<image class="noDataIcon" :src="icon_noData" mode=""></image>
<text class="noDataText">{{noDataTitle}}</text>
</view>
</view>
</scroll-view>
<!--w-picker
:visible.sync="isOrderTypeShow"
mode="selector"
......@@ -118,6 +118,8 @@
</view>
</view>
</view>
......@@ -168,8 +170,10 @@
pageSize:20,
icon_trangle_up:'',
isCoverShow:true,
icon_selected:''
icon_selected:'',
canScroll:false,
totalMid:20,
totalRight:20
}
},
......@@ -199,25 +203,30 @@
},
onPullDownRefresh() {
let that = this
setTimeout(function() {
that.getData()
uni.stopPullDownRefresh()
}, 1000);
}, 1000);
},
//底部加载更多
onReachBottom() {
let that = this
setTimeout(function() {
that.pageNumber = that.pageNumber + 1
console.log('底部加载更多 pageNumber'+ that.pageNumber)
that.getData()
}, 1000);
},
methods: {
async getToken () {
......@@ -324,6 +333,16 @@
//抢单广场
if(this.activeTop==0){
if(this.pageNumber == 1){
// uni.showToast({
// icon:'none',
// title:'没有更多数据了'
// })
return
}
this.getRobList()
}
......@@ -350,9 +369,13 @@
//+getApp().globalData.token+'/order/grabbing'
//获取抢单广场列表
getRobList: function () {
this.isLoading = true
uni.showLoading({
title:'加载中'
title:'加载中',
})
let that = this
uni.request({
url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/order/revision/applets/'
......@@ -363,6 +386,7 @@
pageSize:this.pageSize,
},
success: (res) => {
that.isLoading = false
uni.hideLoading()
console.log('获取抢单广场列表 成功')
console.log(res.statusCode)
......@@ -391,6 +415,7 @@
},
fail: (e) => {
that.isLoading = false
uni.hideLoading()
console.log('获取抢单广场列表 失败')
console.log(e)
......@@ -411,7 +436,11 @@
// })
}else{
var newList = this.grabList;
console.log('前 newList:')
console.log(newList)
newList = newList.concat(res.data.data.list)
console.log('后 newList:')
console.log(newList)
this.grabList = newList
}
......@@ -480,6 +509,8 @@
if(type == 5){
console.log('已完工')
this.totalRight = res.data.data.total
if(this.finishList && this.finishList.length==0){
this.finishList = res.data.data.list
}else{
......@@ -500,6 +531,7 @@
}else{
console.log('中间')
this.totalMid = res.data.data.total
if(this.unfinishList && this.unfinishList.length==0){
this.unfinishList = res.data.data.list
......@@ -1077,4 +1109,17 @@
height: 2rpx;
}
.shadowBackView{
background-color: rgba(0,0,0,0.5);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
position: fixed;
display: flex;
flex-direction: column;
align-items: center;
}
</style>
import {
argo
} from '@/config';
// #ifdef MP-WEIXIN
import AnalysysAgent from '@/include/libs/analysys_paas/mp-weixin/AnalysysAgent_WX_SDK.custom.es6.min.js'
if (AnalysysAgent) {
AnalysysAgent.identify(AnalysysAgent.getDistinctId());
AnalysysAgent.appkey = argo.appkey //设置您的APPKEY
AnalysysAgent.debugMode = argo.debugMode
AnalysysAgent.uploadURL = argo.uploadURL;
// AnalysysAgent.autoShare = true
AnalysysAgent.allowTimeCheck = true
AnalysysAgent.autoTrack = true
AnalysysAgent.registerSuperProperty("platform","take-order");
}
// #endif
export {
AnalysysAgent,
}
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