Silent пре 6 година
родитељ
комит
65ba2fa818

+ 7 - 0
app/Http/Controllers/WeChat/ApiController.php

xqd
@@ -271,4 +271,11 @@ class ApiController extends Controller
         $titles = RemarkTitle::where('status', 2)->get();
         return response()->json(['status' => 'success', 'titles' => $titles]);
     }
+
+    public function remarkTeacher(Request $request)
+    {
+        Log::info($request->all());
+
+        return response()->json(['status' => 'success']);
+    }
 }

+ 2 - 1
routes/wechat.php

xqd
@@ -10,4 +10,5 @@ Route::get('getMoreVideos', 'ApiController@getMoreVideos');
 Route::get('getCourseInfo', 'ApiController@getCourseInfo');
 Route::get('getMyLearnInfo', 'ApiController@getMyLearnInfo');
 Route::get('applyLeave', 'ApiController@applyLeave');
-Route::get('getRemarkTitles', 'ApiController@getRemarkTitles');
+Route::get('getRemarkTitles', 'ApiController@getRemarkTitles');
+Route::get('remarkTeacher', 'ApiController@remarkTeacher');

+ 9 - 3
wechat/pages/rate/rate.js

xqd xqd
@@ -4,16 +4,22 @@ var api = require('../../utils/api.js');
 
 Page({
   data: {
-    titles: []
+    titles: [],
+    course_name: '',
+    teacher: ''
   },
   onLoad: function (options) {
     let that = this;
-    console.log(options)
+    that.setData({
+      course_name: options.course_name,
+      teacher: options.teacher
+    })
     wx.request({
       url: api.getRemarkTitlesUrl,
       method: 'GET',
       success: res => {
         if (res.data.status == 'success') {
+          console.log(res)
           that.setData({
             titles: res.data.titles
           })
@@ -22,7 +28,7 @@ Page({
     })
   },
   formSubmit: function (e) {
-
+    console.log(e)
   },
   onSubmit: function() {
     wx.navigateTo({url: '/pages/rate-review/rate-review'})

+ 3 - 15
wechat/pages/rate/rate.wxml

xqd
@@ -1,21 +1,9 @@
 <zan-panel title='课程名称:成人钢琴培训初级\n讲师姓名:余军'>
   <form bindsubmit="formSubmit">
     <view>
-      <view>
-        <zan-cell title="Q1:礼貌礼仪/精神面貌">
-          <zan-field placeholder="(满分10.0)" value="{{ field.value }}" type="digit">
-          </zan-field>
-        </zan-cell>
-      </view>
-      <view>
-        <zan-cell title="Q2:准备充分,技巧成熟">
-          <zan-field placeholder="(满分10.0)" value="{{ field.value }}" type="digit">
-          </zan-field>
-        </zan-cell>
-      </view>
-      <view>
-        <zan-cell title="Q3:使用清楚、容易理解的语言讲解">
-          <zan-field placeholder="(满分10.0)" value="{{ field.value }}" type="digit">
+      <view wx:for="{{ titles }}">
+        <zan-cell title="{{ item.name }}">
+          <zan-field placeholder="(满分10.0)" type="digit" name="{{ item.id }}">
           </zan-field>
         </zan-cell>
       </view>