123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <template>
- <view class="content" :class="['qn-page-' + theme]">
- <view class="pj-top">
- <textarea placeholder="您对该项目的员工满意吗?说说你的评价." v-model="comment" placeholder-class="textholder"></textarea>
- </view>
- <view class="pj-xj">
- <view class="">
- 满意度:
- </view>
- <u-rate :count="count" v-model="score"></u-rate>
- </view>
- <view class="btn primary-btn" @click="fbpj()">
- 发布
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- comment: '',
- order_id: '',
- uid: '',
- yg: {},
- score: 5,
- count: 5,
- }
- },
- onLoad(opt) {
- this.order_id = opt.order_id
- this.uid = opt.uid
- },
- onShow() {
- },
- onReachBottom() {
- },
- onReady() {
-
- },
- methods: {
- fbpj() {
- if(this.comment == '') {
- return that.$u.toast('请输入评价');
- }
- console.log(this.score, this.comment)
- this.$u.api.pjYg({
- uid: this.uid, //员工id
- comment: this.comment, //评论
- score: this.score, //评分
- order_id: this.order_id //预约订单id
- }).then(res => {
- uni.showToast({
- title: '评价成功'
- });
-
- setTimeout(() => {
- uni.navigateBack()
- }, 1000);
- })
- }
- }
- }
- </script>
- <style lang="scss">
- page {
- background: #f8f6f6;
- height: auto;
- min-height: 100%;
- }
- .pj-top {
- background-color: #fff;
- padding: 20rpx;
- height: 250rpx;
- textarea {
- display: block;
- width: 100%;
- height: 100%;
- font-size: 28rpx;
- font-weight: 500;
- color: #333;
- }
- .textholder {
- font-size: 28rpx;
- font-weight: 500;
- color: #999;
- }
- }
- .pj-xj {
- margin-top: 20rpx;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- background-color: #fff;
- padding: 0 20rpx;
- height: 75rpx;
- }
- .btn {
- width: 560rpx;
- height: 90rpx;
- background: #E02020;
- border-radius: 45px;
- font-size: 36rpx;
- font-weight: 500;
- color: #FFFFFF;
- text-align: center;
- line-height: 90rpx;
- margin: 88rpx auto 0;
-
- }
- </style>
|