修改
This commit is contained in:
parent
164f752f52
commit
3f10822514
@ -24,12 +24,15 @@
|
|||||||
{{item.totalFraction}}
|
{{item.totalFraction}}
|
||||||
<span>分</span>
|
<span>分</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="baogao">
|
<view class="baogao" @tap='lookbook(item)'>
|
||||||
<view class="image">
|
<view class="image">
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="look">查看报告</view> -->
|
<view class="look" v-if="item.existFlag==false">暂无报告</view>
|
||||||
<view class="look" @tap='showToast(item)' v-if="item.existFlag==false">查看报告</view>
|
<view class="lookreport" v-else>查看报告</view>
|
||||||
<view class="lookreport" @tap='lookbook(item)' v-else>查看报告</view>
|
<view class="lookreport" @tap='lookbook(item)' v-else>
|
||||||
|
<view class="image">
|
||||||
|
</view>查看报告
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-toast ref="uToast" />
|
<u-toast ref="uToast" />
|
||||||
@ -70,42 +73,42 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
showToast() {
|
|
||||||
this.$refs.uToast.show({
|
|
||||||
message: "暂无报告",
|
|
||||||
type: 'error',
|
|
||||||
duration: 1000
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
lookbook(item) {
|
lookbook(item) {
|
||||||
uni.showLoading({
|
if (item.existFlag == false) {
|
||||||
title: '获取报告中'
|
this.$refs.uToast.show({
|
||||||
});
|
message: "暂无报告",
|
||||||
var that = this
|
type: 'error',
|
||||||
wx.downloadFile({
|
duration: 1000
|
||||||
url: baseurl + item.downloadAddress,
|
})
|
||||||
success: function(res) {
|
} else {
|
||||||
var filePath = res.tempFilePath;
|
uni.showLoading({
|
||||||
wx.openDocument({
|
title: '获取报告中'
|
||||||
filePath: filePath,
|
});
|
||||||
showMenu: true,
|
var that = this
|
||||||
success: function(res) {
|
wx.downloadFile({
|
||||||
uni.hideLoading();
|
url: baseurl + item.downloadAddress,
|
||||||
},
|
success: function(res) {
|
||||||
fail: function(err) {
|
var filePath = res.tempFilePath;
|
||||||
uni.hideLoading();
|
wx.openDocument({
|
||||||
}
|
filePath: filePath,
|
||||||
});
|
showMenu: true,
|
||||||
},
|
success: function(res) {
|
||||||
fail: function(err) {
|
uni.hideLoading();
|
||||||
uni.hideLoading();
|
},
|
||||||
that.$refs.uToast.show({
|
fail: function(err) {
|
||||||
message: '请求报告失败',
|
uni.hideLoading();
|
||||||
type: 'error'
|
}
|
||||||
})
|
});
|
||||||
}
|
},
|
||||||
});
|
fail: function(err) {
|
||||||
|
uni.hideLoading();
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: '请求报告失败',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getPhoneNumberp(val) {
|
getPhoneNumberp(val) {
|
||||||
wx.login({
|
wx.login({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user