<template>
|
<view class="grabOrdersTask">
|
<once title="任务标题" :input="data.rname"></once>
|
<once title="任务内容" :input="data.content"></once>
|
<once title="任务地址" :input="data.place"></once>
|
</br>
|
<once title="开始时间" :input="data.time"></once>
|
<once title="结束时间" :input="data.alarmTime"></once>
|
</br>
|
<once title="活动要求" :input="data.infor">
|
</once>
|
</br>
|
<!-- <once title="结束时间" input="2021-08-10"></once> -->
|
<view class="but">
|
<u-button class="custom-style" type="primary" @click="inits(1)" v-show="data.current == 1"> 我参与</u-button>
|
<u-button class="custom-style" type="primary" @click="inits(2)" v-show="data.current == 0"> 我反馈</u-button>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
import once from './once.vue'
|
export default {
|
components: {
|
once
|
},
|
data() {
|
return {
|
data: ''
|
};
|
},
|
methods: {
|
inits(val) {
|
//
|
if (val == 1) { //接受任务
|
//
|
} else { //跳转反馈
|
//
|
uni.navigateTo({
|
url: './feedback?data=' + JSON.stringify(val),
|
});
|
}
|
}
|
},
|
onLoad: function(option) {
|
var b;
|
if (option.data == undefined) {
|
this.data = {
|
rname: '无数据',
|
content: '无数据',
|
district: '无数据',
|
place: '无数据',
|
time: '无数据',
|
num: "无数据",
|
ourNum: "无数据",
|
inNum: "无数据",
|
infor: "无数据"
|
}
|
return;
|
}
|
try {
|
b = JSON.parse(option.data);
|
} catch (e) {
|
//TODO handle the exception
|
}
|
console.log(b);
|
this.data = b;
|
}
|
};
|
</script>
|
|
<style lang="scss" scoped>
|
page {
|
width: 100%;
|
height: 100%;
|
background-color: #F0EFF5;
|
}
|
|
.but {
|
width: 30%;
|
margin: 0 auto;
|
|
.custom-style {
|
background-image: linear-gradient(to right, #08EFF6, #0693FD);
|
border-radius: 20px;
|
}
|
}
|
</style>
|