Silent 6 years ago
parent
commit
a128d4e961

+ 3 - 1
app/Http/Controllers/WeChat/ApiController.php

xqd
@@ -642,7 +642,9 @@ class ApiController extends Controller
         $result = $app->order->unify([
             'body' => '钢琴时间',
             'out_trade_no' => $out_trade_no,
-            'total_fee' => $request->input('money'),
+//            'total_fee' => $request->input('money'),
+            'notify_url' => url('/api/payNotify'),
+            'total_fee' => 1,
             'trade_type' => 'JSAPI',
             'openid' => $we_chat_user->open_id,
         ]);

+ 1 - 1
resources/views/teacher/students/index.blade.php

xqd
@@ -62,7 +62,7 @@
                                             <td>{{ $item->apply_date }}</td>
                                             <td>{{ $item->end_date }}</td>
                                             <td>{{ $item->teacher_names }}</td>
-                                            <td>{{ $item->remark }}</td>
+                                            <td>{!! str_replace(PHP_EOL, '<br>', $item->remark) !!}</td>
                                             <td>
                                                 <div class="btn-group">
                                                     <a class="btn btn-sm btn-success btn-courses" href="{{ $pre_uri . 'Course/index?student_id=' . $item->id }}">课程</a>

+ 1 - 1
routes/wechat.php

xqd
@@ -19,4 +19,4 @@ Route::post('updateUserInfo', 'ApiController@updateUserInfo');
 Route::get('bindPhone', 'ApiController@bindPhone');
 Route::post('getPhone', 'ApiController@getPhone');
 Route::get('getFormSet', 'ApiController@getFormSet');
-Route::post('submitForm', 'ApiController@submitForm');
+Route::get('submitForm', 'ApiController@submitForm');

+ 1 - 1
wechat/app.json

xqd xqd
@@ -1,5 +1,6 @@
 {
   "pages": [
+    "pages/form/index",
     "pages/index/index",
     "pages/article/article",
     "pages/announce/announce",
@@ -13,7 +14,6 @@
     "pages/login/index",
     "pages/bind-phone/index",
     "pages/rate/rate",
-    "pages/form/index",
     "pages/video/index"
   ],
   "window": {

+ 5 - 0
wechat/pages/apply-leave/apply-leave.js

xqd
@@ -15,6 +15,11 @@ Page({
       date: date
     })
   },
+  bindPickerChange: function (e) {
+    this.setData({
+      selectedType: e.detail.value
+    })
+  },
   getNowFormatDate() {
     var date = new Date();
     var seperator1 = "-";

+ 1 - 1
wechat/pages/apply-leave/apply-leave.wxml

xqd
@@ -8,7 +8,7 @@
         </picker>
       </zan-cell>
       <zan-cell title="请假类型" is-link>
-        <picker slot="footer" mode="selector" range="{{typeEnum}}" value="{{selectedType}}" name='type'>
+        <picker slot="footer" mode="selector" range="{{typeEnum}}" value="{{selectedType}}" name='type' bindchange="bindPickerChange">
           {{typeEnum[selectedType]}}
         </picker>
       </zan-cell>

+ 16 - 5
wechat/pages/article/article.wxss

xqd xqd xqd xqd xqd
@@ -59,15 +59,22 @@
   left: 0;
 }
 
-.info-content .info-label,
+.info-content .info-label {
+  width: 75%;
+  display: inline-block;
+  line-height: 80rpx;
+  font-weight: bold;
+}
+
 .info-content .info-date {
-  display: inline;
-  line-height: 100rpx;
+  display: inline-block;
+  line-height: 80rpx;
   font-weight: bold;
 }
 
 .info-content .info-date {
-  float: right;
+  font-size: 0.8rem;
+  color: grey;
 }
 
 .modal {
@@ -122,6 +129,7 @@
   height: 10rpx;
   margin-right: 16rpx;
 }
+
 .swiper-top-container {
   position: fixed;
   width: 100%;
@@ -131,6 +139,7 @@
   z-index: 4000;
   background-color: #efeff4;
 }
+
 .swiper-tab {
   width: 100%;
   border-bottom: 2rpx solid #ccc;
@@ -150,10 +159,12 @@
   color: #fb534b;
   border-bottom: 4rpx solid red;
 }
+
 .sg-swiper {
   margin-top: 88rpx;
   height: 100%;
 }
+
 .swiper-item {
   overflow: scroll;
 }
@@ -161,4 +172,4 @@
 .after-navber {
   height: 100%;
   overflow: scroll;
-}
+}

+ 7 - 0
wechat/pages/form/index.js

xqd
@@ -107,6 +107,13 @@ Page({
         console.log(res)
         if (res.data.status == 'success') {
           if(value.type == 'pay') {
+            // wx.requestPayment({
+            //   timeStamp: '',
+            //   nonceStr: '',
+            //   package: '',
+            //   signType: '',
+            //   paySign: '',
+            // })
             console.log(res);
           } else {
             wx.showToast({