819527061@qq.com
2024-05-11 f73ed7862edc9c3cb78a2610486643a2fa079fde
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<template>
    <view class="pingjia-wrap">
        
        <u-popup v-model="popupShow"  mode="center" width="90%" height="40%" closeable>
          <view>
              <view class="haopingImg-box">
                    <image class="pingjiaImg" src="../../static/image/pingjia.png" mode="aspectFill"></image>
              </view>
              <view class="rate-box">
                  <u-rate :count="count" v-model="level"></u-rate>
              </view>
              <view class="btn-box">
                  <u-button
                    type="info" 
                    class="cacelBtn"
                    @click="cancleBtn">取消</u-button>
                  <u-button 
                    type="success" 
                    class="submitBtn"
                    @click="submitPingjiaBtn">提交</u-button>
              </view>
          </view>
        </u-popup>
    </view>
</template>
 
<script>
    export default {
        name:"pingjia",
        inject:['orderId'],
        data() {
            return {
                popupShow: false,
                count:5,
                level:5
            };
        },
        onLoad() {
        },
        mounted() {
            console.log('orderId====',this.orderId.orderId)
        },
        methods: {
            pingjiaInit() {
                this.popupShow = true
            },
            submitPingjiaBtn() {
                let params = {
                    level:this.level,
                    orderId:this.orderId.orderId
                }
                this.$u.api.remark(params).then(res => {
                    if(res.code == 200) {
                        this.$u.toast(res.message)
                        this.$emit('refeshOrderDetail')
                        this.popupShow = false
                    }else{
                        
                    }
                })
            },
            cancleBtn() {
                this.popupShow = false
            }
        }
    }
</script>
 
<style lang="scss" scoped>
    .pingjia-wrap{
        /deep/ .u-btn--default{
            border:none;
            color: #1F9F4C;
            background-color: transparent;
        }
    }
    
    .pingjia-wrap{
        width: 90%;
        margin: 0 auto;
    }
    .haopingImg-box{
        width: 100%;
        display: flex;
        justify-content: center;
        .pingjiaImg{
              width: 240rpx;
              height: 240rpx;
              margin-top: 80rpx;
        }
    }
    .rate-box{
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 20rpx;
    }
    .btn-box{
        display: flex;
        margin-top: 40rpx;
        justify-content: center;
        .cacelBtn{
            width: 260rpx;
            height: 72rpx;
            background-color: #CCCCCC;
            color: #FFFFFF;
            margin-right: 20rpx;
        }
        .submitBtn{
            width: 260rpx;
            height: 72rpx;
            background-color: #CCCCCC;
            color: #1F9F4C;
        }
    }
    
</style>