Commit 8d66b09a authored by 和慭琛's avatar 和慭琛

细节优化

parent fa97b638
......@@ -197,6 +197,17 @@
this.isClean = true
},
onShareAppMessage(res) {
let shareObj = {
title: '',
path: '/pages/index/index',
imageUrl: '',
success(){},
fail(){}
}
return shareObj
},
methods: {
......@@ -279,11 +290,36 @@
//服务协议 点击
protocolClick: function () {
let that = this
uni.getStorage({
key: 'protocolPath',
success: function (res) {
console.log('本地获取 服务协议路径 成功')
console.log(res.data);
that.openProtocol(res.data)
},
fail() {
that.downloadProtocol()
}
})
},
//下载协议
downloadProtocol: function () {
/*
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
*/
console.log('服务协议 点击')
let that = this
uni.showLoading({
title:'加载中'
})
......@@ -296,28 +332,9 @@
uni.showLoading({
title:'打开中'
})
console.log('下载成功');
var filePath = res.tempFilePath;
uni.openDocument({
filePath:filePath,
success() {
uni.hideLoading()
console.log('打开成功');
// uni.showToast({
// icon:'none',
// title:'打开成功'
// })
},
fail() {
uni.hideLoading()
uni.showToast({
icon:'none',
title:'打开失败'
})
}
})
console.log('下载成功');
that.saveProtocolPath(res.tempFilePath)
}
},
......@@ -336,6 +353,47 @@
*/
},
//保存协议路径
saveProtocolPath: function (filePath) {
let that = this
uni.setStorage({
key: 'protocolPath',
data: filePath,
success: function (e) {
console.log('保存 服务协议 成功'+e);
that.openProtocol(filePath)
}
});
},
//打开协议
openProtocol: function (filePath) {
uni.showLoading({
title:'打开中'
})
uni.openDocument({
filePath:filePath,
success() {
uni.hideLoading()
console.log('打开成功');
// uni.showToast({
// icon:'none',
// title:'打开成功'
// })
},
fail() {
uni.hideLoading()
uni.showToast({
icon:'none',
title:'打开失败'
})
}
})
},
......
......@@ -30,7 +30,8 @@
<text class="workerPhoneText" v-if="item.maintainWorkerPhone" @click.stop="callClick(item.maintainWorkerPhone)">{{item.maintainWorkerPhone}}</text>
</view>
<view class="statusView" v-if="item.statusText">
<text class="statusText u-line-1" v-if="item.statusText">{{item.statusText}}</text>
<text class="statusText blueColor u-line-1" v-if="item.statusText && item.statusText == '待抢单' ">{{item.statusText}}</text>
<text class="statusText redColor u-line-1" v-if="item.statusText && item.statusText == '待完工' ">{{item.statusText}}</text>
</view>
</view>
<view class="divideLine u-m-t-30"></view>
......@@ -54,7 +55,7 @@
<text class="workerPhoneText" v-if="item.maintainWorkerPhone" @click="callClick(item.maintainWorkerPhone)">{{item.maintainWorkerPhone}}</text>
</view>
<view class="statusView" v-if="item.statusText">
<text class="statusText u-line-1" v-if="item.statusText">{{item.statusText}}</text>
<text class="statusText gray999 u-line-1" v-if="item.statusText">{{item.statusText}}</text>
</view>
</view>
<view class="divideLine u-m-t-30"></view>
......@@ -464,7 +465,6 @@
}
.statusText{
color: #2272FF;
font-size: 28rpx;
margin-right: 30rpx;
}
......@@ -534,5 +534,17 @@
font-size: 24rpx;
}
.blueColor{
color: #2272FF;
}
.redColor{
color: #D73400;
}
.gray999{
color: #999999;
}
</style>
......@@ -198,6 +198,19 @@
},
//'/pages/take/detail' ,+ '?orderId=' + this.orderId+ '&isBottomShow=false',
onShareAppMessage(res) {
let shareObj = {
title: '',
path: '/pages/index/index',
imageUrl: '',
success(){},
fail(){}
}
return shareObj
},
methods: {
async getToken () {
......
......@@ -203,7 +203,7 @@
},
onPullDownRefresh() {
console.log('onPullDownRefresh')
let that = this
setTimeout(function() {
that.getData()
......@@ -215,7 +215,7 @@
//底部加载更多
onReachBottom() {
console.log('onReachBottom')
let that = this
setTimeout(function() {
that.pageNumber = that.pageNumber + 1
......@@ -334,7 +334,7 @@
//抢单广场
if(this.activeTop==0){
if(this.pageNumber == 1){
if(this.pageNumber > 0){
// uni.showToast({
// icon:'none',
// title:'没有更多数据了'
......
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