Browse Source

Merge branch 'master' of http://118.190.145.217:3000/xiaojincai/yifengxcx

xjc 4 years ago
parent
commit
6fde7237a1

+ 4 - 4
pages/apply/apply.wxml

@@ -8,8 +8,8 @@
         <text wx:if="{{item.order_status == -2}}">审核未通过</text> 
         <text wx:if="{{item.order_status == 1}}">已审核,待付款</text> 
         <text wx:if="{{item.order_status == 2}}">已付款,待培训</text> 
-        <text wx:if="{{item.order_status == 3}}">考试完成</text> 
-        <text wx:if="{{item.order_status == 7}}">已培训,待考试</text> 
+        <text wx:if="{{item.order_status == 7}}">考试完成</text> 
+        <text wx:if="{{item.order_status == 3}}">已培训,待考试</text> 
         <text style="color:green;">{{item.train_type}}</text></view>
         <view class="title">{{item.name}}   {{item.phone}}  <text>{{item.class_name}}</text></view>
         <view class="info">
@@ -29,8 +29,8 @@
         <text wx:if="{{item.order_status == -2}}">审核未通过</text> 
         <text wx:if="{{item.order_status == 1}}">已审核,待付款</text> 
         <text wx:if="{{item.order_status == 2}}">已付款,待培训</text> 
-        <text wx:if="{{item.order_status == 3}}">考试完成</text> 
-        <text wx:if="{{item.order_status == 7}}">已培训,待考试</text> 
+        <text wx:if="{{item.order_status == 7}}">考试完成</text> 
+        <text wx:if="{{item.order_status == 3}}">已培训,待考试</text> 
         <text style="color:green;">{{item.train_type}}</text></view>
         <view class="title">{{item.name}}   {{item.phone}}  <text>{{item.class_name}}</text></view>
         <view class="info">

+ 2 - 1
pages/classHour/classHour.js

@@ -15,7 +15,7 @@ Page({
    */
   onLoad: function (options) {
     wx.showLoading({
-      title: '',
+      title: 'test',
     })
     wx.request({
       url: host + '/api/wx/classhourcard',
@@ -28,6 +28,7 @@ Page({
         for (let i = 0; i < data.length; i++) {
           urls.push(data[i].url)
         }
+        console.log(urls,33333333333)
         this.setData({
           imgs: urls
         })

+ 7 - 0
pages/index/index.js

@@ -93,6 +93,13 @@ Page({
               break;
             }
         }
+      },
+      fail:res=>{
+        wx.showToast({
+          title: '服务器开小差啦!',
+          icon: 'none',
+          duration: 2000
+        })
       }
     })
   }

+ 1 - 1
pages/intro/intro.wxml

@@ -22,7 +22,7 @@
               <image src="../../images/addr.png" mode="widthFix"></image>
           </view>
       </view>
-      <editor style="height:calc(100vh - 300px);margin-top:10px;" read-only="{{true}}" id="editor"  class="ql-container">
+      <editor style="height:calc(100vh - 300px);padding: 0px 10px;" read-only="{{true}}" id="editor"  class="ql-container">
     </editor>
 </block>
 <view wx:else class="content">

+ 1 - 1
pages/onlinePost/onlinePost.js

@@ -45,7 +45,7 @@ Page({
     console.log(e)
     let id = e.currentTarget.dataset.id, name = e.currentTarget.dataset.name
     wx.navigateTo({
-      url: '../post/post?type=1&&s_id='+id,
+      url: '../post/post?type=1&&s_id='+id+'&&s_name='+name,
     })
   },
   /**

+ 3 - 2
pages/plan/plan.js

@@ -10,7 +10,8 @@ Page({
     index2: -1,
     index3: -1,
     list:[],
-    show:1
+    show:0,
+    year: new Date().getFullYear()
   },
   onLoad: function (options) {
     
@@ -53,7 +54,7 @@ Page({
   },
   show:function(){
     this.setData({
-      show: 1
+      show: 0
     })
   },
   sure:function(){

+ 5 - 5
pages/plan/plan.wxml

@@ -1,5 +1,5 @@
 <view class="section" bindtap="show">
-  请选择培训科目
+  {{year}}年各类安全培训计划
 </view>
 
 <view class="model" wx:if="{{show}}">
@@ -42,12 +42,12 @@
     </view>
 </view>
 <view class="content">
-  <!-- <view class="list" wx:for="{{list}}" wx:key="*this"> -->
-      <!-- <view class="title">{{item.type}}培训班</view> -->
-      <view class="list kc" wx:for="{{list}}" wx:for-item="class" wx:key="*this">
+  <view class="list" wx:for="{{list}}" wx:key="*this">
+      <view class="title">{{item.type}}培训班</view>
+      <view class="list kc" wx:for="{{item.classes}}" wx:for-item="class" wx:key="*this">
           <text class="name" decode="{{true}}">{{class.name}}</text>
           <text decode="{{true}}">计划100人/已报名{{class.signuped_count}}</text>
           <navigator url="../post/post?class_id={{class.id}}&price={{class.price_new}}_{{class.price_re}}_{{class.price_change}}&&type=3"  class="apply">立即报名</navigator>
       </view>
-  <!-- </view> -->
+  </view>
 </view>

+ 4 - 3
pages/plan/plan.wxss

@@ -53,7 +53,7 @@ page{
 }
 .list{
   background: #fff;
-  box-shadow:0px 2px 12px 0px rgba(0,0,0,0.08);
+  /* box-shadow:0px 2px 12px 0px rgba(0,0,0,0.08); */
   border-radius:4px;
   margin-bottom: 12px;
   
@@ -68,6 +68,7 @@ page{
   padding: 12px;
   font-weight: 600;
   border-bottom: 1px solid #F2F3F4;
+  border-left: 5px solid #358BFF;
 }
 .kc{
   color: #222;
@@ -94,8 +95,8 @@ page{
   position: absolute;
   text-align: center;
   color: #fff;
-  right: 12px;
-  bottom: 12px;
+  right: 10px;
+  bottom: 5px;
   line-height: 32px;
 }
 

+ 2 - 2
pages/post/post.js

@@ -69,7 +69,7 @@ Page({
         if (options.type == 1){
           //班级列表
           wx.request({
-            url: host + '/api/wx/class/list?subject_item0=' + options.s_id,
+            url: host + '/api/wx/class/list?subject_item0=' + options.s_name,
             method: 'GET',
             success: res => {
               // 过滤分类
@@ -117,7 +117,7 @@ Page({
                 }
                 //获取班级列表
                 wx.request({
-                  url: host + '/api/wx/class/list?subject_item0=' + list[0].id,
+                  url: host + '/api/wx/class/list?subject_item0=' + list[0].name,
                   method: 'GET',
                   success: res => {
                     let classes = res.data.data, class_=0

+ 2 - 1
pages/subject/subject.js

@@ -69,7 +69,8 @@ Page({
   },
   next:function(){
     const idx=this.data.idx+1
-    if(this.data.ans.length!=this.data.idx){
+    const cur = this.data.idx -1
+    if (!this.data.ans[cur].answer){
       wx.showToast({
         title: '请选择答案',
         icon: 'none',

+ 3 - 3
pages/subject/subject.wxml

@@ -4,13 +4,13 @@
   <view class="count">倒计时 {{time}}</view>
 </view>
 <!-- 判断 -->
-<view class="content" wx:for="{{data.questions}}"  hidden="{{idx != index+1}}">
-    <view class="num">{{index+1}}、
+<view class="content" wx:for="{{data.questions}}"  hidden="{{idx != index+1}}" wx:key="idx">
+    <view class="num">{{index+1}}、{{item.title}}
     <image wx:if="{{item.type == 1}}" src="../../images/danx.svg" mode="widthFix"></image>
     <image wx:if="{{item.type == 2}}" src="../../images/duox.svg" mode="widthFix"></image>
     <image wx:if="{{item.type == 3}}" src="../../images/pd.svg" mode="widthFix"></image>
     </view>
-    <view class="ques">  {{item.title}}  </view>
+    <!-- <view class="ques">  {{item.title}}  </view> -->
     <view class="ans">
         <checkbox-group wx:if="{{item.type == 2}}" bindchange='answer' data-id='{{item.id}}'>
             <view wx:for="{{item.options}}" wx:for-item="opt" wx:key="*this">

+ 4 - 2
pages/subject/subject.wxss

@@ -3,6 +3,7 @@
   padding: 12px;
 }
 .top text{
+  position: relative;
   width:60px;
   height:28px;
   border-radius:16px;
@@ -14,9 +15,10 @@
   top: -3px;
 }
 .count{
+  top:13px;
   position: absolute;
-  top: 55px;
-  right: 12px;
+  /* top: 55px; */
+  right: 85px;
   color: #358BFF;
   text-align: right;
 }