yukangzhe 4 years ago
parent
commit
f70ff211ae

BIN
images/cur-xing.png


BIN
images/xing.png


+ 24 - 0
pages/Components/rating/rating.js

@@ -0,0 +1,24 @@
+// pages/Components/rating/rating.js
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    title:'课堂互动',
+    score: 4
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+
+  }
+})

+ 4 - 0
pages/Components/rating/rating.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 11 - 0
pages/Components/rating/rating.wxml

@@ -0,0 +1,11 @@
+<view>
+  <view class="rating-title" wx:for="{{5}}">
+    <view class="title">{{title}}</view>
+    <view class="xing-view">
+      <view wx:for="{{5}}" wx:key="index" class="xing-box">
+        <image wx:if="{{item >= score}}" src="/images/xing.png"></image>
+        <image wx:if="{{item < score}}" src="/images/cur-xing.png"></image>
+      </view>
+    </view>
+  </view>
+</view>

+ 22 - 0
pages/Components/rating/rating.wxss

@@ -0,0 +1,22 @@
+.xing-view,.rating-title{
+  display: flex;
+}
+.xing-box{
+  height: 40rpx;
+  width: 40rpx;
+  margin-right: 20rpx;
+}
+.title{
+  margin-right: 20rpx;
+  font-size: 32rpx;
+  height: 40rpx;
+  line-height: 40rpx;
+}
+.xing-box image{
+  height: 100%;
+  width: 100%;
+}
+.rating-title{
+  width: 90%;
+  margin: 20rpx auto;
+}

+ 1 - 1
pages/growUp/growUp.wxss

@@ -53,7 +53,7 @@
 .loading {
   height: 200rpx;
   line-height: 100rpx;
-  background: #f1f1f1;
+  background: #FFF;
   color: #999;
   text-align: center;
 }

+ 7 - 1
project.config.json

@@ -60,7 +60,13 @@
       "list": []
     },
     "miniprogram": {
-      "list": []
+      "list": [
+        {
+          "name": "pages/login/login",
+          "pathName": "pages/Components/rating/rating",
+          "scene": null
+        }
+      ]
     }
   }
 }