linwu 1 year ago
parent
commit
7c7a3d219e

+ 1 - 0
api/activity/controller/ActivityReviewController.php

@@ -38,6 +38,7 @@ class ActivityReviewController extends RestBaseController
             foreach ($list as $v) {
                 $v['main_image']    = cmf_get_image_preview_url($v['main_image']);
                 $v['activity_time'] = date('Y-m-d H:i', $v['activity']['start_time']);
+                $v['create_time'] = date('Y-m-d H:i', $v['create_time']);
                 $v['address']       = $v['activity']['address'];
             }
         }

+ 0 - 1
app/activity/controller/AdminActivityController.php

@@ -29,7 +29,6 @@ class AdminActivityController extends AdminBaseController
             $where[] = ['title', 'like', "%{$param['keyword']}%"];
         }
         $activity = ActivityModel::where($where)->order('create_time', 'DESC')->paginate(10, false, ['query' => $param]);
-
         $this->assign('start_time', isset($param['start_time']) ? $param['start_time'] : '');
         $this->assign('end_time', isset($param['end_time']) ? $param['end_time'] : '');
         $this->assign('keyword', isset($param['keyword']) ? $param['keyword'] : '');

+ 4 - 4
applet/app.js

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

+ 6 - 4
applet/app.json

@@ -26,7 +26,9 @@
     "pages/business/feedback/feedback",
     "pages/business/ad/ad",
     "pages/webview/recuperate/recuperate",
-    "pages/my/score/score"
+    "pages/my/score/score",
+    "pages/my/agreement/service",
+    "pages/my/agreement/privacy"
   ],
   "window": {
     "navigationStyle": "custom",
@@ -50,9 +52,9 @@
       },
       {
         "pagePath": "pages/webview/rcmap/rcmap",
-        "iconPath": "common/images/tabbar/business.png",
-        "selectedIconPath": "common/images/tabbar/business_cur.png",
-        "text": "人才图谱"
+        "iconPath": "common/images/tabbar/calc.png",
+        "selectedIconPath": "common/images/tabbar/calc_cur.png",
+        "text": "政策计算器"
       },
       {
         "pagePath": "pages/rob/home/home",

+ 1 - 0
applet/compenents/review/index.js

@@ -25,6 +25,7 @@ Component({
    */
   methods: {
     toDetail(e) {
+      console.log(e);
       wx.navigateTo({
         url: '/pages/activity/reviewdetail/reviewdetail?id=' + e.currentTarget.dataset.id,
       })

+ 1 - 1
applet/compenents/review/index.wxml

@@ -8,7 +8,7 @@
         <view class="text-join"></view>
         <view>
           <view class="cu-tag bg-red sm radius fl">回顾</view>
-          <view class="cu-tag bg-blue sm radius fr">{{item.activity_time}}</view>
+          <view class="cu-tag bg-blue sm radius fr">{{item.create_time}}</view>
         </view>
       </view>
     </view>

+ 1 - 2
applet/pages/activity/reviewdetail/reviewdetail.js

@@ -15,8 +15,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    // let id = options.id;
-    let id = 1;
+    let id = options.id;
     this.setData({id:id});
     this.getInfo();
   },

+ 22 - 15
applet/pages/business/home/home.js

@@ -41,15 +41,19 @@ Page({
       }
 
       //首页
-      if (page == 1) {
-        let marker = JSON.parse(JSON.stringify(self.data.default_marker));
-        if (res.length > 0) {
-          marker.latitude = res[0].latitude;
-          marker.longitude = res[0].longitude;
-          marker.title = res[0].title;
-          self.setData({latitude:marker.latitude,longitude:marker.longitude,markers:[marker]});
-        } else {
-          self.setData({latitude:marker.latitude,longitude:marker.longitude,markers:[marker]});
+      let markers = self.data.markers;
+      if (res.length > 0) {
+        let default_marker = self.data.default_marker;
+        for (let i = 0; i < res.length; i++) {
+          let marker = {height:default_marker.height,iconPath:default_marker.iconPath,width:default_marker.width};
+          marker.latitude = res[i].latitude;
+          marker.longitude = res[i].longitude;
+          marker.title = res[i].title;
+          marker.id = res[i].id;
+          markers.push(marker);
+        }
+        if (page == 1) {
+          self.setData({latitude:res[0].latitude,longitude:res[0].longitude});
         }
       }
 
@@ -58,14 +62,14 @@ Page({
       list = list.concat(res);
 
       page++;
-      self.setData({list:list,page:page});
+      self.setData({list:list,page:page,markers:markers});
     });
   },
   /**
    * 页面相关事件处理函数--监听用户下拉动作
    */
   onPullDownRefresh: function () {
-    this.setData({list:[],keyword:'',page:1,no_more:false});
+    this.setData({markers:[],list:[],keyword:'',page:1,no_more:false});
     this.getList();
     wx.stopPullDownRefresh();
   },
@@ -74,16 +78,16 @@ Page({
    * 页面上拉触底事件的处理函数
    */
   onReachBottom: function () {
-
+    this.getList();
   },
 
   //设置地点
   setLocation(e) {
-    let marker = JSON.parse(JSON.stringify(this.data.default_marker));
+    let marker = this.data.default_marker;
     marker.latitude = e.currentTarget.dataset.lat;
     marker.longitude = e.currentTarget.dataset.lon;
     marker.title = e.currentTarget.dataset.title;
-    this.setData({latitude:marker.latitude,longitude:marker.longitude,markers:[marker]});
+    this.setData({latitude:marker.latitude,longitude:marker.longitude});
   },
   //拔打电话
   callMobile(e){
@@ -109,9 +113,12 @@ Page({
   },
   //搜索
   bindSearch() {
-    this.setData({list:[],page:1,no_more:false});
+    this.setData({list:[],markers:[],page:1,no_more:false});
     this.getList();
   },
+  bindInput() {
+    
+  },
 
   /**
    * 用户点击右上角分享

+ 4 - 4
applet/pages/business/home/home.wxml

@@ -4,18 +4,18 @@
 
 <!-- <image src="/common/images/business_backgroud.jpg" style="width:750rpx;height:400rpx;" bindtap="toAd"></image> -->
 <!-- 地图 -->
-<!-- <view class="business-header">
+<view class="business-header">
 	<map longitude="{{longitude}}" latitude="{{latitude}}" scale="15" markers="{{markers}}" style="width: 100%; height: 400rpx;"></map>
 	<view class="lw-search">
 		<view class="search-form">
-			<input type="text" placeholder="请输入关键字" placeholder-class="placeholder" model:value="{{keyword}}" confirm-type="search" bindconfirm="bindSearch"></input>
+			<input type="text" placeholder="请输入关键字" placeholder-class="placeholder" model:value="{{keyword}}" confirm-type="search" bindconfirm="bindSearch" bindinput="bindInput"></input>
 		</view>
 		<view class="search-icon">
 			<text class="cuIcon-search" style="font-size:30rpx;color:#687a9c;"></text>
 		</view>
 	</view>
-</view> -->
-
+</view>
+<view style="width:100%;height: 200px;"></view>
 <!-- 列表 -->
 <view class="site-list">
 	<view class="site-item" wx:for="{{list}}" wx:key="key">

+ 2 - 1
applet/pages/business/home/home.wxss

@@ -2,7 +2,8 @@
 /* 搜索和轮播图 */
 .business-header{
   width:750rpx;
-  position: relative;
+  position: fixed;
+  z-index: 99;
 }
 .lw-search {
   position: absolute;

+ 20 - 1
applet/pages/my/info/info.js

@@ -12,6 +12,7 @@ Page({
     sex_index: 1,
     level: ['请选择人才层次','第一层次','第二层次','第三层次','第四层次','第五层次','第六层次','第七层次'],
     level_index: 0,
+    checked: false,
   },
 
   /**
@@ -49,8 +50,26 @@ Page({
       ['userInfo.'+e.currentTarget.dataset.value]:e.detail.value
     })
   },
+  toUrl(e){
+    const url = e.currentTarget.dataset.url;
+    wx.navigateTo({
+      url: url,
+    })
+  },
+  checkboxChange(e) {
+    let value = e.detail.value[0];
+    if (value == 1) {
+      this.setData({checked:true});
+    } else {
+      this.setData({checked:false});
+    }
+  },
   submit() {
     let userInfo = this.data.userInfo;
+    if (this.data.checked == false) {
+      app.msg('请阅读并同意协议');
+      return false;
+    }
     if (verify.isEmpty(userInfo.user_nickname)) {
       app.msg('昵称不能为空');
       return false;
@@ -80,5 +99,5 @@ Page({
       app.globalData.userInfo = userInfo;
       wx.navigateBack();
     });
-  }
+  },
 })

+ 6 - 1
applet/pages/my/info/info.wxml

@@ -56,7 +56,12 @@
 		<view class="title">人才证号</view>
 		<input placeholder="请输入人才证号" value="{{userInfo.talent_card}}" bindinput="vmodel" data-value="talent_card"></input>
 	</view>
-
+  <view class="registertip">
+    <checkbox-group bindchange="checkboxChange">
+      <checkbox  value="1" checked="{{checked}}"/>
+    </checkbox-group>
+    我已阅读并同意<text bindtap="toUrl" data-url="/pages/my/agreement/service">《用户服务协议》</text>、<text  bindtap="toUrl" data-url="/pages/my/agreement/privacy">《隐私政策》</text>
+  </view>
 	<view class="padding flex flex-direction">
 		<button class="cu-btn lw-red margin-tb-sm lg" style="width:600rpx;" bindtap="submit">提 交</button>
 	</view>

+ 4 - 0
applet/pages/my/info/info.wxss

@@ -4,3 +4,7 @@
 .placeholder-input{
 	color:#999;
 }
+.registertip {display: flex;align-items: center;justify-content: center;margin-top:20rpx;}
+.registertip checkbox-group {margin-right:10rpx;}
+.registertip checkbox {zoom: .7;}
+.registertip text {color:blue;}

+ 1 - 1
applet/project.config.json

@@ -2,7 +2,7 @@
   "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
   "setting": {
     "urlCheck": true,
-    "es6": false,
+    "es6": true,
     "enhance": true,
     "postcss": true,
     "preloadBackgroundData": false,

+ 14 - 1
applet/project.private.config.json

@@ -4,5 +4,18 @@
     "urlCheck": false,
     "compileHotReLoad": true
   },
-  "projectname": "%E6%99%8B%E7%88%B1%E4%BA%BA%E6%89%8D"
+  "projectname": "%E6%99%8B%E7%88%B1%E4%BA%BA%E6%89%8D",
+  "condition": {
+    "miniprogram": {
+      "list": [
+        {
+          "name": "",
+          "pathName": "pages/my/agreement/privacy",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        }
+      ]
+    }
+  }
 }

+ 3 - 3
data/config/database.php

@@ -7,13 +7,13 @@ return [
     // 数据库类型
     'type'     => 'mysql',
     // 服务器地址
-    'hostname' => '192.168.51.99',
+    'hostname' => 'localhost',
     // 数据库名
     'database' => 'jarc',
     // 用户名
-    'username' => 'jinjianghc',
+    'username' => 'root',
     // 密码
-    'password' => 'l9cb9kWrGqjFMl^W',
+    'password' => '',
     // 端口
     'hostport' => '3306',
     // 数据库编码默认采用utf8

+ 6 - 0
public/themes/admin_simpleboot3/activity/admin_activity/add.html

@@ -42,6 +42,12 @@
                         <td><input class="form-control" type="text" name="author" value=""
                                    placeholder="请输入作者"></td>
                     </tr>
+                    <tr>
+                        <th width="100">参加人数<span class="form-required">*</span></th>
+                        <td>
+                            <input class="form-control" type="number" name="join_num" required value="0"/>
+                        </td>
+                    </tr>
                     <tr>
                         <th width="100">活动积分<span class="form-required">*</span></th>
                         <td>

+ 6 - 0
public/themes/admin_simpleboot3/activity/admin_activity/edit.html

@@ -55,6 +55,12 @@
                         <td><input class="form-control" type="text" name="author" value="{$info.author}"
                                    placeholder="请输入作者"></td>
                     </tr>
+                    <tr>
+                        <th width="100">参加人数<span class="form-required">*</span></th>
+                        <td>
+                            <input class="form-control" type="number" name="join_num" required value="{$info.join_num}"/>
+                        </td>
+                    </tr>
                     <tr>
                         <th width="100">活动积分<span class="form-required">*</span></th>
                         <td>