界面调整
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
<view class="proname">
|
||||
{{info.missionTitle}}
|
||||
</view>
|
||||
<view class="prolist">
|
||||
<!-- <view class="prolist">
|
||||
任务编码:{{info.missionNo}}
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="prolist">
|
||||
任务日期:{{dateFormat((info.stime))}}至{{dateFormat((info.etime))}}
|
||||
</view>
|
||||
@@ -86,8 +86,18 @@
|
||||
<map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map>
|
||||
</view>
|
||||
<view class="" style="height:200rpx;background-color: #f6f6f6;" v-if="isShow!=='0'"></view>
|
||||
<view class="btn" @click="submit" v-if="isShow!=='0'&&status===0">
|
||||
<view class="bottombtn flexbtn">
|
||||
<view class="btn" v-if="isShow!=='0'&&status===0">
|
||||
<view @click="collect" style="display: flex;align-items: center;margin-right: 10rpx;flex-direction: column;">
|
||||
<image v-if="collectStatus == 0" src="../../static/img/collect.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
|
||||
<image v-if="collectStatus == 1" src="../../static/img/collect_yes.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
|
||||
<view v-if="collectStatus == 0" style="font-size: 26rpx;color:#707070;margin-top:10rpx;">收藏</view>
|
||||
<view v-if="collectStatus == 1" style="font-size: 20rpx;color:#707070;margin-top:10rpx;">已收藏</view>
|
||||
</view>
|
||||
|
||||
<view @click="callPhone" class="bottombtn flexbtn" style="margin-right: 10rpx;background-color: #FBAD17;border-radius: 45rpx;">
|
||||
电话联系
|
||||
</view>
|
||||
<view @click="submit" class="bottombtn flexbtn" style="border-radius: 45rpx;">
|
||||
抢任务
|
||||
</view>
|
||||
</view>
|
||||
@@ -130,7 +140,7 @@
|
||||
|
||||
<script>
|
||||
import {mapGetters} from 'vuex'
|
||||
import {missionDetail,submit} from '@/api/mission.js';
|
||||
import {missionDetail,submit, getCollectState, updateCollectStatus} from '@/api/mission.js';
|
||||
import {GoLogin} from '@/untils/AxiosUtils.js';
|
||||
import {setRead} from '@/api/news.js';
|
||||
import {checkPass} from '@/api/auth.js';
|
||||
@@ -164,7 +174,8 @@
|
||||
type: '',
|
||||
id: '',
|
||||
src: 'https://jlfiles.oss-cn-zhangjiakou.aliyuncs.com/jobslink-api/doc/%E7%94%B5%E5%AD%90%E5%90%88%E5%90%8C%E9%A2%84%E8%A7%88%E5%9B%BE%E7%89%87.png',
|
||||
maxlength: 6
|
||||
maxlength: 6,
|
||||
collectStatus: 0, // 收藏状态
|
||||
}
|
||||
},
|
||||
components: {uniMask,validCode},
|
||||
@@ -186,6 +197,7 @@
|
||||
onShow: function() {
|
||||
this.showDetail = true
|
||||
this.getData();
|
||||
|
||||
},
|
||||
onShareAppMessage(obj) {
|
||||
return {
|
||||
@@ -195,6 +207,26 @@
|
||||
},
|
||||
methods: {
|
||||
dateFormat,
|
||||
collect() {
|
||||
// console.log('收藏,取消收藏')
|
||||
const status = this.collectStatus == 0 ? 1 : 0;
|
||||
updateCollectStatus(this.info.id, status).then(res => {
|
||||
if(res.data.code == 200) {
|
||||
this.getCollectStatus()
|
||||
}
|
||||
})
|
||||
},
|
||||
callPhone() {
|
||||
console.log('电话联系')
|
||||
},
|
||||
// 获取收藏状态
|
||||
getCollectStatus() {
|
||||
getCollectState(this.info.id).then(res => {
|
||||
// 0 未收藏,1 已收藏
|
||||
// console.log(res)
|
||||
this.collectStatus = res.data.data;
|
||||
})
|
||||
},
|
||||
getData: function() {
|
||||
const self = this;
|
||||
missionDetail(self.missionNo).then(res => {
|
||||
@@ -205,6 +237,7 @@
|
||||
self.covers[0].latitude = self.info.lat;
|
||||
self.covers[0].longitude = self.info.lon;
|
||||
self.showDetail = true;
|
||||
self.getCollectStatus();
|
||||
if (self.type === 1) {
|
||||
// 设置已读
|
||||
setRead(self.id).then(res => {
|
||||
|
||||
Reference in New Issue
Block a user