فهرست منبع

feat(client):新增评价页面

yizhiyang 10 ماه پیش
والد
کامیت
392d78ebd3
4فایلهای تغییر یافته به همراه122 افزوده شده و 2 حذف شده
  1. 91 0
      src/PageMine/gotoEvaluate/index.vue
  2. 9 0
      src/PageMine/orderModules/index.vue
  3. 16 2
      src/components/base-text/base-text.vue
  4. 6 0
      src/pages.json

+ 91 - 0
src/PageMine/gotoEvaluate/index.vue

@@ -0,0 +1,91 @@
+<template>
+  <view>
+    <page-navbar bgColor="#fff" title="去评价" />
+    <view class="gotoEvaluate">
+      <base-card padding="24rpx">
+        <view class="f-s-32 text-333 text-bold u-m-b-24">服务项目</view>
+        <view class="fl-flex u-m-b-10" v-for="(item, index) in 2" :key="index">
+          <base-img :src="src" width="150rpx" height="150rpx" borderRadius="16rpx"></base-img>
+          <view class="u-m-l-32">
+            <view class="f-s-30 text-333 u-m-b-8">汽车服务服务</view>
+            <view class="f-s-26 text-333 u-m-b-20">X1</view>
+            <base-text text="汽车美容" padding="6rpx 15rpx"></base-text>
+          </view>
+        </view>
+        <view class="fl-flex fl-justify-center">
+          <view class="f-s-24 text-999 u-m-r-8">展开(五种商品共5件)</view>
+          <u-icon name="arrow-down" color="#999" size="12" top="2"></u-icon>
+        </view>
+        <!-- <view class="fl-flex fl-justify-center">
+          <view class="f-s-24 text-999 u-m-r-8">收起</view>
+          <u-icon name="arrow-up" color="#999" size="12" top="2"></u-icon>
+        </view> -->
+        <view class="evaluate-line"></view>
+        <u--form labelPosition="left" :rules="rules" ref="uForm">
+          <view class="fl-flex-item">
+            <view>评价得分</view>
+            <u-rate v-model="value"></u-rate>
+          </view>
+          <u-form-item prop="name" ref="item1">
+            <u--textarea
+              v-model="name"
+              placeholder="请输入评价内容"
+              count
+              height="105"
+              maxlength="200"
+            />
+          </u-form-item>
+          <u-form-item>
+            <u-upload> </u-upload>
+          </u-form-item>
+        </u--form>
+      </base-card>
+    </view>
+
+    <view class="gotoEvaluate-bottom">
+      <base-button text="发布评价"></base-button>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'gotoEvaluate',
+  data() {
+    return {
+      src: '/static/img.jpg',
+      rules: {},
+      value: 4,
+      name: '',
+    };
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.gotoEvaluate {
+  padding: 20rpx 32rpx;
+  .evaluate-line {
+    height: 1rpx;
+    background-color: #dedede;
+    margin: 24rpx 0 28rpx 0;
+  }
+}
+.gotoEvaluate-bottom {
+  width: 100%;
+  height: 180rpx;
+  bottom: 0;
+  position: fixed;
+  padding: 33rpx 32rpx 0 32rpx;
+  background-color: #fff;
+  box-sizing: border-box;
+}
+::v-deep .u-textarea {
+  background-color: #f9f9f9 !important;
+  border: none !important;
+}
+
+::v-deep .u-textarea__count {
+  background-color: #f9f9f9 !important;
+}
+</style>

+ 9 - 0
src/PageMine/orderModules/index.vue

@@ -87,6 +87,7 @@
             height="60rpx"
             fontSize="28rpx"
             background="#fff"
+            @click="handleEvaluate"
           />
           <!-- 退款/取消 -->
           <!-- <base-text
@@ -140,6 +141,14 @@ export default {
       };
     },
   },
+  methods: {
+    handleEvaluate() {
+      console.log(1111111);
+      uni.navigateTo({
+        url: `/PageMine/gotoEvaluate/index`,
+      });
+    },
+  },
 };
 </script>
 

+ 16 - 2
src/components/base-text/base-text.vue

@@ -50,6 +50,10 @@ export default {
       type: String,
       default: '',
     },
+    padding: {
+      type: String,
+      default: '',
+    },
   },
 
   data() {
@@ -57,8 +61,17 @@ export default {
   },
   computed: {
     textStyle() {
-      const { width, height, fontSize, borderColor, color, background, borderRadius, textAlign } =
-        this;
+      const {
+        width,
+        height,
+        fontSize,
+        padding,
+        borderColor,
+        color,
+        background,
+        borderRadius,
+        textAlign,
+      } = this;
       return {
         width,
         height,
@@ -67,6 +80,7 @@ export default {
         background,
         borderRadius,
         textAlign,
+        padding,
         lineHeight: height,
         border: `2rpx solid ${borderColor}`,
         ...this.baseTextStyle,

+ 6 - 0
src/pages.json

@@ -178,6 +178,12 @@
             "navigationStyle": "custom"
           }
         },
+        {
+          "path": "gotoEvaluate/index",
+          "style": {
+            "navigationStyle": "custom"
+          }
+        },
         {
           "path": "orderDetail/index",
           "style": {