Commit 6ce387b0 authored by 和慭琛's avatar 和慭琛

bug fix

parent 44da11f6
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
*/ */
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
...@@ -16,38 +15,31 @@ ...@@ -16,38 +15,31 @@
}, },
{ {
"path": "pages/take/index", "path": "pages/index/success",
"style": { "style": {
"navigationBarTitleText": "接单", "navigationBarTitleText": "下单"
"enablePullDownRefresh": true
} }
}, },
{ {
"path": "pages/login/wxlogin", "path": "pages/take/index",
"style": { "style": {
"navigationBarTitleText": "授权登录" "navigationBarTitleText": "接单",
"enablePullDownRefresh": true
} }
}, },
{ {
"path": "pages/index/success", "path": "pages/login/wxlogin",
"style": { "style": {
"navigationBarTitleText": "下单" "navigationBarTitleText": "授权登录"
} }
},
},
{ {
......
...@@ -14,12 +14,14 @@ ...@@ -14,12 +14,14 @@
<view class="activeItemBottom" v-if="activeTop == 1"></view> <view class="activeItemBottom" v-if="activeTop == 1"></view>
</view> </view>
</view> </view>
<view class="listView .bottom_padding_120"> <view class="listView bottom_padding_120">
<view class="itemView" @click="itemClick(item)" v-if="activeTop == 0" v-for="(item,ikey) in unfinishList":key="ikey"> <view class="itemView" @click="itemClick(item)" v-if="activeTop == 0" v-for="(item,ikey) in unfinishList":key="ikey">
<view class="nameView"> <view class="nameView">
<view class="nameLeftView"> <view class="nameLeftView">
<text class="nameText u-line-1" v-if="item.contactName">{{item.contactName}}</text> <text class="nameText u-line-1" v-if="item.contactName && item.contactName.length > 5">{{item.contactName.substr(0,5)}}</text>
<text class="phoneText u-line-1" v-if="item.contactMobilephone">{{item.contactMobilephone}}</text> <text class="nameText u-line-1" v-if="item.contactName && item.contactName.length < 6">{{item.contactName}}</text>
<text class="phoneText u-line-1" v-if="item.contactMobilephone && item.contactName.length > 15">{{item.contactMobilephone.substr(0,15)}}</text>
<text class="phoneText u-line-1" v-if="item.contactMobilephone && item.contactName.length < 16">{{item.contactMobilephone}}</text>
</view> </view>
<text class="productText u-line-1" v-if="item.brandName && item.categoryName && item.orderServiceType">{{item.brandName}}-{{item.categoryName}}-{{item.orderServiceType}}</text> <text class="productText u-line-1" v-if="item.brandName && item.categoryName && item.orderServiceType">{{item.brandName}}-{{item.categoryName}}-{{item.orderServiceType}}</text>
</view> </view>
...@@ -208,7 +210,7 @@ ...@@ -208,7 +210,7 @@
this.unfinishList = res.data.data.list this.unfinishList = res.data.data.list
}else{ }else{
if(this.unfinishList.length = res.data.data.total){ if(this.unfinishList.length == res.data.data.total){
// uni.showToast({ // uni.showToast({
// icon:'none', // icon:'none',
// title:'没有更多数据了' // title:'没有更多数据了'
...@@ -231,7 +233,7 @@ ...@@ -231,7 +233,7 @@
this.finishList = res.data.data.list this.finishList = res.data.data.list
}else{ }else{
if(this.finishList.length = res.data.data.total){ if(this.finishList.length == res.data.data.total){
// uni.showToast({ // uni.showToast({
// icon:'none', // icon:'none',
// title:'没有更多数据了' // title:'没有更多数据了'
...@@ -253,8 +255,8 @@ ...@@ -253,8 +255,8 @@
topClick: function (active) { topClick: function (active) {
if(this.activeTop!=active){ if(this.activeTop!=active){
this.activeTop = active this.activeTop = active
this.createOrderList()
this.pageNumber = 0
if (active == 0){ if (active == 0){
this.finishList.length = 0 this.finishList.length = 0
} }
...@@ -263,6 +265,8 @@ ...@@ -263,6 +265,8 @@
this.unfinishList.length = 0 this.unfinishList.length = 0
} }
this.createOrderList()
} }
}, },
...@@ -403,12 +407,14 @@ ...@@ -403,12 +407,14 @@
} }
.phoneText{ .phoneText{
width: 170rpx;
margin-left: 20rpx; margin-left: 20rpx;
color: #999999; color: #999999;
font-size: 24rpx; font-size: 24rpx;
} }
.productText{ .productText{
width: 300rpx;
margin-right: 30rpx; margin-right: 30rpx;
font-size: 28rpx; font-size: 28rpx;
color: #333333; color: #333333;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<view class="bigView"> <view class="bigView">
<text class="u-font-36 u-p-b-10">已发给</text> <text class="u-font-36 u-p-b-10">已发给</text>
<text class="countText u-p-l-20 u-p-r-20" v-if="count<21">{{count}}</text> <text class="countText u-p-l-20 u-p-r-20" v-if="count<21">{{count}}</text>
<text class="countText u-p-l-20 u-p-r-20" v-if="count>20">20+</text> <text class="countText u-p-l-20 u-p-r-20" v-if=" count>20 || count == 20 ">20+</text>
<text class="u-font-36 u-p-b-10">位师傅</text> <text class="u-font-36 u-p-b-10">位师傅</text>
</view> </view>
<!--view class="textBackView height_92 u-m-t-80 u-row"> <!--view class="textBackView height_92 u-m-t-80 u-row">
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
data() { data() {
return { return {
activeService:'家电服务', activeService:'家电服务',
count:1, count:3,
phone:'400-8834-123', phone:'400-8834-123',
TimeID:-1 TimeID:-1
} }
...@@ -67,7 +67,8 @@ ...@@ -67,7 +67,8 @@
methods: { methods: {
setInfo: function (){ setInfo: function (){
this.count = Math.random(3,6).toFixed(0) this.count = this.getRandomNumberByRange(3,6)
//Math.random(3,6).toFixed(0)
let that = this let that = this
setTimeout(function() { setTimeout(function() {
that.addCount() that.addCount()
...@@ -76,7 +77,8 @@ ...@@ -76,7 +77,8 @@
addCount: function (){ addCount: function (){
let that = this let that = this
var addCount = Math.random(1,3).toFixed(0) var addCount = this.getRandomNumberByRange(1,3)
//Math.random(1,3).toFixed(0)
console.log('每10秒加一次') console.log('每10秒加一次')
console.log('加之前的addCount') console.log('加之前的addCount')
console.log(addCount) console.log(addCount)
...@@ -99,6 +101,13 @@ ...@@ -99,6 +101,13 @@
}, },
getRandomNumberByRange: function (start, end) {
return Math.floor(Math.random() * (end - start) + start)
},
//拨打客服 点击 //拨打客服 点击
phoneCallClick: function (phone) { phoneCallClick: function (phone) {
uni.makePhoneCall({ uni.makePhoneCall({
......
...@@ -48,10 +48,12 @@ ...@@ -48,10 +48,12 @@
</view> </view>
<view class="nameView" @click="itemClick(item)"> <view class="nameView" @click="itemClick(item)">
<view class="nameLeftView"> <view class="nameLeftView">
<text class="nameText u-line-1" v-if="item.contactName">{{item.contactName}}</text> <text class="nameText u-line-1" v-if="item.contactName && item.contactName.length > 5">{{item.contactName.substr(0,5)}}</text>
<text class="callPhoneText underLine u-line-1" @click.stop="callClick(item.contactMobilephone)" v-if="item.contactMobilephone">{{item.contactMobilephone}}</text> <text class="nameText u-line-1" v-if="item.contactName && item.contactName.length < 6">{{item.contactName}}</text>
<text class="callPhoneText underLine u-line-1" @click.stop="callClick(item.contactMobilephone)" v-if="item.contactMobilephone && item.contactMobilephone.length>15">{{item.contactMobilephone.substr(0,15)}}</text>
<text class="callPhoneText underLine u-line-1" @click.stop="callClick(item.contactMobilephone)" v-if="item.contactMobilephone && item.contactMobilephone.length<16">{{item.contactMobilephone}}</text>
</view> </view>
<text class="productText u-line-1" v-if="item.brandName && item.categoryName && item.orderServiceType">{{item.brandName}}-{{item.categoryName}}-{{item.orderServiceType}}</text> <text class="productText u-line-1" v-if="item.brandName && item.categoryName && item.orderServiceType">{{item.brandName}}-{{item.categoryName}}</text>
</view> </view>
<text class="addressText" @click="itemClick(item)" v-if="item.contactAddress">{{item.contactAddress}}</text> <text class="addressText" @click="itemClick(item)" v-if="item.contactAddress">{{item.contactAddress}}</text>
<view class="bookBottomView" v-if="item.maintainWorkerName || item.statusText"> <view class="bookBottomView" v-if="item.maintainWorkerName || item.statusText">
...@@ -75,10 +77,12 @@ ...@@ -75,10 +77,12 @@
</view> </view>
<view class="nameView"> <view class="nameView">
<view class="nameLeftView"> <view class="nameLeftView">
<text class="nameText u-line-1" v-if="item.contactName">{{item.contactName}}</text> <text class="nameText u-line-1" v-if="item.contactName && item.contactName.length > 5">{{item.contactName.substr(0,5)}}</text>
<text class="callPhoneText underLine u-line-1" @click.stop="callClick(item.contactMobilephone)" v-if="item.contactMobilephone">{{item.contactMobilephone}}</text> <text class="nameText u-line-1" v-if="item.contactName && item.contactName.length < 6">{{item.contactName}}</text>
<text class="callPhoneText underLine u-line-1" @click.stop="callClick(item.contactMobilephone)" v-if="item.contactMobilephone && item.contactMobilephone.length>15">{{item.contactMobilephone.substr(0,15)}}</text>
<text class="callPhoneText underLine u-line-1" @click.stop="callClick(item.contactMobilephone)" v-if="item.contactMobilephone && item.contactMobilephone.length<16">{{item.contactMobilephone}}</text>
</view> </view>
<text class="productText u-line-1" v-if="item.brandName && item.categoryName && item.orderServiceType">{{item.brandName}}-{{item.categoryName}}-{{item.orderServiceType}}</text> <text class="productText u-line-1" v-if="item.brandName && item.categoryName && item.orderServiceType">{{item.brandName}}-{{item.categoryName}}</text>
</view> </view>
<text class="addressText" v-if="item.contactAddress">{{item.contactAddress}}</text> <text class="addressText" v-if="item.contactAddress">{{item.contactAddress}}</text>
<view class="finishBottomView" v-if="item.maintainWorkerName || item.statusText"> <view class="finishBottomView" v-if="item.maintainWorkerName || item.statusText">
...@@ -516,7 +520,7 @@ ...@@ -516,7 +520,7 @@
this.finishList = res.data.data.list this.finishList = res.data.data.list
}else{ }else{
if(this.finishList.length = res.data.data.total){ if(this.finishList.length == res.data.data.total){
// uni.showToast({ // uni.showToast({
// icon:'none', // icon:'none',
// title:'没有更多数据了' // title:'没有更多数据了'
...@@ -538,7 +542,7 @@ ...@@ -538,7 +542,7 @@
this.unfinishList = res.data.data.list this.unfinishList = res.data.data.list
}else{ }else{
if(this.unfinishList.length = res.data.data.total){ if(this.unfinishList.length == res.data.data.total){
// uni.showToast({ // uni.showToast({
// icon:'none', // icon:'none',
// title:'没有更多数据了' // title:'没有更多数据了'
...@@ -574,8 +578,10 @@ ...@@ -574,8 +578,10 @@
itemClick: function (item) { itemClick: function (item) {
/*
clearTimeout(this.TimeID); clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => { 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){//抢单市场
...@@ -584,6 +590,8 @@ ...@@ -584,6 +590,8 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/take/rob' url: '/pages/take/rob'
+'?orderId='+item.orderId +'?orderId='+item.orderId
/*
+'&contactName='+item.contactName +'&contactName='+item.contactName
+'&contactMobilephone='+item.contactMobilephone +'&contactMobilephone='+item.contactMobilephone
+'&contactAddress='+item.contactAddress +'&contactAddress='+item.contactAddress
...@@ -594,6 +602,7 @@ ...@@ -594,6 +602,7 @@
+'&statusText='+item.statusText +'&statusText='+item.statusText
+'&serviceContent='+item.serviceContent +'&serviceContent='+item.serviceContent
+'&createDatetime='+item.createDatetime +'&createDatetime='+item.createDatetime
*/
}) })
...@@ -620,7 +629,9 @@ ...@@ -620,7 +629,9 @@
}) })
} }
/*
}, 1000); }, 1000);
*/
......
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