liuyg
2022-02-21 e3dcaeb0180a4e37347ac9ceb44c8a59ae7af37f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<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>