소스 검색

人才便捷出行

linwu 2 주 전
부모
커밋
abb9aaa2bc

+ 5 - 3
api/talent/controller/AppointmentController.php

@@ -167,9 +167,11 @@ class AppointmentController extends RestUserBaseController
     {
         $setting = cmf_get_option('talent_setting');
         $this->success('成功', [
-            'route_guidance' => cmf_get_image_preview_url($setting['route_guidance']),
-            'real_guidance'  => cmf_get_image_preview_url($setting['real_guidance']),
-            'real_guidance_self'  => cmf_get_image_preview_url($setting['real_guidance_self']),
+            'route_guidance'           => cmf_get_image_preview_url($setting['route_guidance']),
+            'real_guidance_thumb'      => cmf_get_image_preview_url($setting['real_guidance_thumb']),
+            'real_guidance'            => cmf_get_image_preview_url($setting['real_guidance']),
+            'real_guidance_self'       => cmf_get_image_preview_url($setting['real_guidance_self']),
+            'real_guidance_self_thumb' => cmf_get_image_preview_url($setting['real_guidance_self_thumb']),
         ]);
     }
 

+ 4 - 4
applet/app.js

@@ -2,10 +2,10 @@
 App({
   globalData: {
     title: '晋爱人才',
-    http_host: 'http://bd.jarc.com/',
-    api_host: 'http://bd.jarc.com/api/',
-    // http_host: 'https://jarc.jucai.gov.cn/',
-    // api_host: 'https://jarc.jucai.gov.cn/api/',
+    // http_host: 'http://bd.jarc.com/',
+    // api_host: 'http://bd.jarc.com/api/',
+    http_host: 'https://jarc.jucai.gov.cn/',
+    api_host: 'https://jarc.jucai.gov.cn/api/',
   },
   onLaunch: function() {
     var self = this;

+ 1 - 1
applet/pages/talent/admin/index.js

@@ -134,7 +134,7 @@ Page({
 
   //滚动事件
   onPageScroll(e) {
-    if (e.scrollTop >= this.data.nav_top) {
+    if (e.scrollTop > this.data.nav_top) {
       if (!this.data.nav_fixed) {
         this.setData({
           nav_fixed: true

+ 1 - 1
applet/pages/talent/admin/index.wxml

@@ -14,7 +14,7 @@
 </view>
 
 <!-- tab导航 -->
-<scroll-view scroll-x class="bg-white nav" style="top:{{custombar}}px;position:{{nav_fixed ? 'fixed' : 'static'}}" id="nav">
+<scroll-view scroll-x class="bg-white nav" style="top:{{custombar}}px;position:{{nav_fixed ? 'fixed' : 'static'}};z-index:999;" id="nav">
   <view class="flex text-center">
     <view class="cu-item flex-sub {{0==tab?'text-red cur':''}}" bindtap="tabSelect" data-tab="0">
       待确认

+ 1 - 0
applet/pages/talent/admin/index.wxss

@@ -15,6 +15,7 @@
   position: fixed;
   bottom: 150rpx;
   right: 50rpx;
+  z-index: 999;
 }
 
 .scan {

+ 2 - 39
applet/pages/talent/admin/scheduling.js

@@ -8,10 +8,7 @@ Page({
   data: {
     CustomBar: app.globalData.CustomBar,
     list: [],
-    tabCur: 0,
-    mainCur: 0,
-    verticalNavTop: 0,
-    load: true
+    tabCur: 0
   },
 
   /**
@@ -23,48 +20,14 @@ Page({
   getList(){
     const self = this;
     app.get('talent/admin/getScheduling',function(res){
-      self.setData({list:res});
+      self.setData({list:res,tabCur:0});
     })
   },
   TabSelect(e) {
     this.setData({
       tabCur: e.currentTarget.dataset.id,
-      mainCur:e.currentTarget.dataset.id,
-      verticalNavTop:(e.currentTarget.dataset.id - 1) * 50
     });
   },
-  VerticalMain(e) {
-    let that = this;
-    let tabHeight = 0;
-    if (that.data.load) {
-      for (let i = 0; i < that.data.list.length; i++) {
-        let view = wx.createSelectorQuery().select("#main-" + i);
-        view.fields({
-          size: true
-        }, data => {
-          if (!data) {
-            data = {height:0};
-          }
-          let list = that.data.list;
-          list[i].top = tabHeight;
-          tabHeight = tabHeight + +data?.height;
-          list[i].bottom = tabHeight;
-          that.setData({list:list});
-        }).exec();
-      }
-      that.setData({load:false});
-    }
-    let scrollTop = e.detail.scrollTop + 10;
-    for (let i = 0; i < that.data.list.length; i++) {
-      if (scrollTop > that.data.list[i].top && scrollTop < that.data.list[i].bottom) {
-        that.setData({
-          verticalNavTop:i * 50,
-          tabCur: i
-        });
-        return false
-      }
-    }
-  },
   toIndex() {
     wx.redirectTo({
       url: '/pages/talent/admin/index',

+ 4 - 4
applet/pages/talent/admin/scheduling.wxml

@@ -17,14 +17,14 @@
   <scroll-view class="VerticalNav nav" scroll-y scroll-with-animation scroll-top="{{verticalNavTop}}" style="height:calc(100vh - 100rpx - {{CustomBar}}px - (env(safe-area-inset-bottom) / 2))">
     <view class="cu-item {{index==tabCur?'text-green cur':''}}" wx:for="{{list}}" wx:key="index" bind:tap="TabSelect" data-id="{{index}}">
       <view class="cu-tag badge" style="top:0;right:0;">{{item.list.length}}</view>
-      <view>{{item.hour}}</view>
+      <view>{{item.hour}}时段</view>
     </view>
   </scroll-view>
-  <scroll-view class="VerticalMain" scroll-y scroll-with-animation style="height:calc(100vh - 100rpx - {{CustomBar}}px - (env(safe-area-inset-bottom) / 2))" scroll-into-view="{{'main-'+mainCur}}" bindscroll="VerticalMain">
-    <view class="padding-top padding-lr" wx:for="{{list}}" wx:key="index" id="{{'main-'+index}}">
+  <scroll-view class="VerticalMain" scroll-y scroll-with-animation style="height:calc(100vh - 100rpx - {{CustomBar}}px - (env(safe-area-inset-bottom) / 2))" scroll-into-view="{{'main-'+mainCur}}">
+    <view class="padding-top padding-lr" wx:for="{{list}}" wx:key="index" id="{{'main-'+index}}" wx:if="{{index==tabCur}}">
       <view class="cu-bar solid-bottom bg-white">
         <view class="action">
-          <text class="cuIcon-title text-green"></text> {{item.hour}}
+          <text class="cuIcon-title text-green"></text> {{item.hour}}时段
         </view>
       </view>
       <view class="cu-list bg-white">

+ 4 - 7
applet/pages/talent/appointment/index.js

@@ -13,7 +13,7 @@ Page({
     startDate: '',
     image: '',
     companionNum: 0,
-    outTime: '00:00',
+    outTime: '09:00',
     comment: '',
   },
 
@@ -71,18 +71,15 @@ Page({
       urls: [this.data.image],
     });
   },
+  selectCompanionNum(e) {
+    this.setData({companionNum:e.currentTarget.dataset.value});
+  },
   submit() {
     let self = this;
     if (verify.isEmpty(this.data.shift) && verify.isEmpty(this.data.image)) {
       app.msg('方式一和方式二任选其一');
       return false;
     }
-
-    if (this.data.companionNum > 3) {
-      app.msg('同行人数不超过3人');
-      return false;
-    }
-
     app.post('talent/appointment/book', {
       shift: this.data.shift,
       date: this.data.date,

+ 8 - 3
applet/pages/talent/appointment/index.wxml

@@ -17,7 +17,7 @@
   </view>
   <view class="cu-form-group">
     <view class="title">出发时间</view>
-    <picker mode="time" :value="time" start="09:00" end="20:00" bind:change="TimeChange">
+    <picker mode="time" :value="time" bind:change="TimeChange">
       <view class="picker">
         {{time}}
       </view>
@@ -49,7 +49,7 @@
   <view class="padding text-bold">其他信息</view>
   <view class="cu-form-group">
     <view class="title"><text class="text-red">*</text> 到站时间</view>
-    <picker mode="time" start="09:00" end="20:00"  bind:change="outTimeChange">
+    <picker mode="time" start="09:00" end="20:00" bind:change="outTimeChange">
       <view class="picker">
         {{outTime}}
       </view>
@@ -57,7 +57,12 @@
   </view>
   <view class="cu-form-group">
     <view class="title"><text class="text-red">*</text> 同行人数</view>
-    <input placeholder="不含本人,不超过3人" bindinput="vmodel" data-value="companionNum" type="number"></input>
+    <view>
+      <view class="cu-tag {{companionNum == 0 ? 'bg-blue' : ''}}" data-value="0" bind:tap="selectCompanionNum">0人</view>
+      <view class="cu-tag {{companionNum == 1 ? 'bg-blue' : ''}}" data-value="1" bind:tap="selectCompanionNum">1人</view>
+      <view class="cu-tag {{companionNum == 2 ? 'bg-blue' : ''}}" data-value="2" bind:tap="selectCompanionNum">2人</view>
+      <view class="cu-tag {{companionNum == 3 ? 'bg-blue' : ''}}" data-value="3" bind:tap="selectCompanionNum">3人</view>
+    </view>
   </view>
   <view class="cu-form-group align-start">
 				<view class="title">其他需求</view>

+ 4 - 0
applet/pages/talent/appointment/route.js

@@ -8,7 +8,9 @@ Page({
   data: {
     route_guidance: '',
     real_guidance: '',
+    real_guidance_thumb: '',
     real_guidance_self: '',
+    real_guidance_self_thumb: '',
   },
 
   /**
@@ -23,8 +25,10 @@ Page({
     app.get('talent/appointment/route',function(res){
       self.setData({
         route_guidance:res.route_guidance,
+        real_guidance_thumb:res.real_guidance_thumb,
         real_guidance:res.real_guidance,
         real_guidance_self:res.real_guidance_self,
+        real_guidance_self_thumb:res.real_guidance_self_thumb,
       });
     });
   },

+ 16 - 4
applet/pages/talent/appointment/route.wxml

@@ -1,7 +1,7 @@
 <cu-custom bgColor="bg-lw-header" isCustom="{{true}}">
   <view slot="content">路线指引</view>
 </cu-custom>
-<view>
+<view wx:if="{{route_guidance}}">
   <view class="cu-bar justify-center bg-white">
     <view class="action border-title">
       <text class="text-xl text-bold">路线指引图</text>
@@ -9,21 +9,33 @@
     </view>
   </view>
   <image class="bg-img" src="{{route_guidance}}" bindtap="ViewImage" data-url="{{route_guidance}}" wx:if="{{route_guidance}}" mode="widthFix"></image>
+</view>
+
+<view wx:if="{{real_guidance}}">
   <view class="cu-bar justify-center bg-white">
     <view class="action border-title">
       <text class="text-xl text-bold">实景指引图 - 打车</text>
       <text class="bg-green" style="width:3rem"></text>
     </view>
   </view>
-  <image class="bg-img" src="{{real_guidance}}" bindtap="ViewImage" data-url="{{real_guidance}}" wx:if="{{real_guidance}}" mode="widthFix"></image>
+  <view bindtap="ViewImage" data-url="{{real_guidance}}">
+    <view class="text-center text-red">提示:点击查看大图,长按保存至手机。</view>
+    <image class="bg-img" src="{{real_guidance_thumb}}" wx:if="{{real_guidance_thumb}}" mode="widthFix"></image>
+  </view>
 </view>
-<view class="cu-bar justify-center bg-white">
+
+<view wx:if="{{real_guidance_self}}">
+  <view class="cu-bar justify-center bg-white">
     <view class="action border-title">
       <text class="text-xl text-bold">实景指引图 - 自驾</text>
       <text class="bg-green" style="width:3rem"></text>
     </view>
   </view>
-  <image class="bg-img" src="{{real_guidance_self}}" bindtap="ViewImage" data-url="{{real_guidance_self}}" wx:if="{{real_guidance_self}}" mode="widthFix"></image>
+  <view bindtap="ViewImage" data-url="{{real_guidance_self}}">
+    <view class="text-center text-red">提示:点击查看大图,长按保存至手机。</view>
+    <image class="bg-img" src="{{real_guidance_self_thumb}}" mode="widthFix"></image>
+  </view>
+</view>
 <view class="footer"></view>
 <view class="cu-bar tabbar bg-white foot">
   <view class="action" bind:tap="toIndex">

+ 1 - 1
applet/pages/talent/home/home.js

@@ -32,7 +32,7 @@ Page({
       app.globalData.userInfo = res;
       if (res.talent_id > 0) {
         wx.navigateTo({
-          url: '/pages/talent/appointment/list',
+          url: '/pages/talent/appointment/index',
         })
       }
       self.setData({userInfo:res});

+ 38 - 0
public/themes/admin_simpleboot3/talent/admin_talent/setting.html

@@ -34,6 +34,25 @@
                 </a>
             </div>
         </div>
+        <div class="form-group">
+            <label for="mobile" class="col-sm-2 control-label">
+                <span class="form-required">*</span>实景指引图 - 打车(缩略图)
+            </label>
+            <div class="col-md-6 col-sm-10">
+                <input type="hidden" name="real_guidance_thumb" id="real_guidance_thumb" value="{$real_guidance_thumb|default=''}">
+                <a href="javascript:uploadOneImage('图片上传','#real_guidance_thumb');">
+                    <if condition="empty($real_guidance_thumb)">
+                        <img src="__TMPL__/public/assets/images/default-thumbnail.png"
+                             id="real_guidance_thumb-preview"
+                             width="135" style="cursor: pointer"/>
+                        <else/>
+                        <img src="{:cmf_get_image_preview_url($real_guidance_thumb)}"
+                             id="real_guidance_thumb-preview"
+                             width="135" style="cursor: pointer"/>
+                    </if>
+                </a>
+            </div>
+        </div>
         <div class="form-group">
             <label for="mobile" class="col-sm-2 control-label">
                 <span class="form-required">*</span>实景指引图 - 打车
@@ -53,6 +72,25 @@
                 </a>
             </div>
         </div>
+        <div class="form-group">
+            <label for="mobile" class="col-sm-2 control-label">
+                <span class="form-required">*</span>实景指引图 - 自驾(缩略图)
+            </label>
+            <div class="col-md-6 col-sm-10">
+                <input type="hidden" name="real_guidance_self_thumb" id="real_guidance_self_thumb" value="{$real_guidance_self_thumb|default=''}">
+                <a href="javascript:uploadOneImage('图片上传','#real_guidance_self_thumb');">
+                    <if condition="empty($real_guidance_self_thumb)">
+                        <img src="__TMPL__/public/assets/images/default-thumbnail.png"
+                             id="real_guidance_self_thumb-preview"
+                             width="135" style="cursor: pointer"/>
+                        <else/>
+                        <img src="{:cmf_get_image_preview_url($real_guidance_self_thumb)}"
+                             id="real_guidance_self_thumb-preview"
+                             width="135" style="cursor: pointer"/>
+                    </if>
+                </a>
+            </div>
+        </div>
         <div class="form-group">
             <label for="mobile" class="col-sm-2 control-label">
                 <span class="form-required">*</span>实景指引图 - 自驾