Browse Source

Merge branch 'master' of http://39.106.8.246:3003/sagacloud/sagacloud-sagacare-weChat

zhaojing 1 year ago
parent
commit
244b997a94

File diff suppressed because it is too large
+ 9298 - 19
package-lock.json


+ 15 - 12
project.config.json

@@ -2,22 +2,25 @@
   "description": "项目配置文件",
   "setting": {
     "urlCheck": true,
+    "scopeDataCheck": false,
+    "coverView": true,
     "es6": false,
-    "enhance": false,
     "postcss": false,
+    "compileHotReLoad": false,
     "preloadBackgroundData": false,
     "minified": true,
+    "autoAudits": false,
     "newFeature": false,
-    "coverView": true,
+    "uglifyFileName": false,
+    "uploadWithSourceMap": true,
+    "useIsolateContext": true,
     "nodeModules": false,
-    "autoAudits": false,
+    "enhance": false,
+    "useCompilerModule": false,
+    "userConfirmedUseCompilerModuleSwitch": false,
     "showShadowRootInWxmlPanel": true,
-    "scopeDataCheck": false,
-    "uglifyFileName": false,
     "checkInvalidKey": true,
     "checkSiteMap": true,
-    "uploadWithSourceMap": true,
-    "compileHotReLoad": false,
     "useMultiFrameRuntime": true,
     "babelSetting": {
       "ignore": [],
@@ -25,9 +28,6 @@
       "outputPath": ""
     },
     "enableEngineNative": false,
-    "useIsolateContext": true,
-    "useCompilerModule": true,
-    "userConfirmedUseCompilerModuleSwitch": false,
     "userConfirmedBundleSwitch": false,
     "packNpmManually": false,
     "packNpmRelationList": [],
@@ -38,7 +38,6 @@
   "compileType": "miniprogram",
   "miniprogramRoot": "weapp/",
   "srcMiniprogramRoot": "weapp/",
-  "condition": {},
   "editorSetting": {
     "tabIndent": "insertSpaces",
     "tabSize": 2
@@ -52,5 +51,9 @@
     ],
     "include": []
   },
-  "appid": "wxda2ef261ac3cca32"
+  "appid": "wxda2ef261ac3cca32",
+  "projectname": "sagacloud-sagacare-weChat",
+  "simulatorType": "wechat",
+  "simulatorPluginLibVersion": {},
+  "condition": {}
 }

+ 1 - 1
project.private.config.json

@@ -14,7 +14,7 @@
       "list": [
         {
           "name": "",
-          "pathName": "packagesEnv/pages/officehome/index",
+          "pathName": "packagesEnv/pages/search/index",
           "query": "",
           "launchMode": "default",
           "scene": null

+ 2 - 1
src/app.wpy

@@ -77,7 +77,8 @@ wepy.app({
           'pages/personalCenter/xiaosa',
           'pages/administration/index',
           'pages/administration/asuccess',
-          'pages/administration/chooseIdentity'
+          'pages/administration/chooseIdentity',
+          'pages/search/index'
         ]
       },
     ],

+ 2 - 3
src/packagesEnv/pages/intelligentControl/home2.wpy

@@ -570,6 +570,7 @@ wepy.component({
     space: function(newObj, oldObj) {
       //更新一下空间
       if (oldObj && newObj && oldObj.spaceId !== newObj.spaceId) {
+
       }
     }
   },
@@ -868,9 +869,7 @@ wepy.component({
     toSearchPage() {
       console.log('被点击了');
       wx.navigateTo({
-        url: `/packagesEnv/pages/intelligentControl/search/search?canSearchPerson=${
-          this.canSearchPerson
-        }&companyId=${this.companyId}&from=officehome`
+        url: `/packagesEnv/pages/search/index`
       });
     },
     goBack() {

+ 52 - 52
src/packagesEnv/pages/intelligentControl/service/location.js

@@ -67,59 +67,59 @@ function checkLoactionInDestance(targetLocationInfo, maxDistance) {
           wx.authorize({
             scope: 'scope.userLocation',
             success: () => {
-              wx.getLocation({
-                success(res) {
-                  let distance = getDistance(res.latitude, res.longitude, targetLocationInfo.latitude, targetLocationInfo.longitude);
+              // wx.getLocation({
+              //   success(res) {
+              //     let distance = getDistance(res.latitude, res.longitude, targetLocationInfo.latitude, targetLocationInfo.longitude);
                
-                  if (distance <= maxDistance) {
-                    store.commit('setLocationInfo', {
-                      getLastTime: new Date().getTime(),
-                      data: null,
-                      method: 'resolve'
-                    });
-                    resolve()
-                  } else {
-                    store.commit('locaitonInfo', {
-                      getLastTime: new Date().getTime(),
-                      data: { reason: 'overDistance' },
-                      method: 'reject'
-                    });
-                    reject({ reason: 'overDistance' });
-                  }
-                },
-                fail(res) {
-                  let msg = res.errMsg;
-                  switch (res.error) {
-                    case 11:
-                      msg = '无法使用位置服务';
-                      break;
-                    case 12:
-                      msg = '网络异常,请稍后再试';
-                      break;
-                    case 13:
-                      msg = '定位失败,请稍后再试';
-                      break;
-                    case 14:
-                      msg = '业务定位超时,请稍后再试';
-                      break;
-                    default:
-                      msg = '请前往系统设置开启微信定位权限';
-                  }
-                  store.commit('locaitonInfo', {
-                    getLastTime: new Date().getTime(),
-                    data: { reason: 'systemError' },
-                    method: 'reject'
-                  });
-                  reject({ reason: 'systemError' });
-                  setTimeout(() => {
-                    wx.showToast({
-                      title: msg,
-                      duration: 2000,
-                      icon: 'none'
-                    });
-                  }, 0);
-                }
-              })
+              //     if (distance <= maxDistance) {
+              //       store.commit('setLocationInfo', {
+              //         getLastTime: new Date().getTime(),
+              //         data: null,
+              //         method: 'resolve'
+              //       });
+              //       resolve()
+              //     } else {
+              //       store.commit('locaitonInfo', {
+              //         getLastTime: new Date().getTime(),
+              //         data: { reason: 'overDistance' },
+              //         method: 'reject'
+              //       });
+              //       reject({ reason: 'overDistance' });
+              //     }
+              //   },
+              //   fail(res) {
+              //     let msg = res.errMsg;
+              //     switch (res.error) {
+              //       case 11:
+              //         msg = '无法使用位置服务';
+              //         break;
+              //       case 12:
+              //         msg = '网络异常,请稍后再试';
+              //         break;
+              //       case 13:
+              //         msg = '定位失败,请稍后再试';
+              //         break;
+              //       case 14:
+              //         msg = '业务定位超时,请稍后再试';
+              //         break;
+              //       default:
+              //         msg = '请前往系统设置开启微信定位权限';
+              //     }
+              //     store.commit('locaitonInfo', {
+              //       getLastTime: new Date().getTime(),
+              //       data: { reason: 'systemError' },
+              //       method: 'reject'
+              //     });
+              //     reject({ reason: 'systemError' });
+              //     setTimeout(() => {
+              //       wx.showToast({
+              //         title: msg,
+              //         duration: 2000,
+              //         icon: 'none'
+              //       });
+              //     }, 0);
+              //   }
+              // })
             },
             fail: () => {
               wx.showModal({

+ 10 - 10
src/packagesEnv/pages/officehome/Header/space-basic.wpy

@@ -24,7 +24,7 @@
     <div class="room-bg">
         <div class="space-name">
             <div class="g-fl room-name">
-                <span class="name_text" v-if="isSpaceCanControl">{{officeData.localName}}</span>
+                <span class="name_text" v-if="isSpaceCanControlCopy">{{officeData.localName}}</span>
                 <span class="name_text" v-else>该空间不可调节</span>
                 <has-person
                     v-if="officeData.isPassengerPass !== undefined && IsShowPerson"
@@ -58,18 +58,18 @@ wepy.component({
     userInfo: Object
   },
   data: {
-    h5StaticPath: config.h5StaticPath + '/page-officehome/'
+    h5StaticPath: config.h5StaticPath + '/page-officehome/',
+    isSpaceCanControlCopy: true
   },
   computed: {},
-  methods: {
-
+  watch: {
+    isSpaceCanControl(val) {
+      console.log(val, '-----2222--isSpaceCanControl')
+      this.isSpaceCanControlCopy = val
+    },
+    immediate: true
   },
-    // 生命周期 - 创建完成(可以访问当前this实例)
-  created() {
-
-  },
-    // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {
+  methods: {
 
   }
 })

+ 1 - 4
src/packagesEnv/pages/officehome/index.wpy

@@ -1232,7 +1232,6 @@ wepy.page({
       if (this.userControlSpace.isControlSpace === 1 || this.userControlSpace.isControlSpace === 2 || !this.isUserControlFromMap) {
         flag = false
       }
-      console.log(flag, '----flag')
       return flag
     }
   },
@@ -1314,7 +1313,7 @@ wepy.page({
       } else {
         // 从首页进入
         await this.getCurrentSpace('home')
-        if (this.options.spaceId) {
+        if (this.options.spaceId !== '') {
           await this.getData()
         }
         let setAirtemp = this.$refs.airHandCard.airTemp
@@ -1608,11 +1607,9 @@ wepy.page({
     },
     getSpaceInfo() {
             // 空间信息
-      if (!this.options.spaceId) return
       const params = {
         criteria: {
           spaceId: this.options.spaceId
-                    // userId: 391
         },
         pubname: config.brsgServer.pubname,
         openid: this.userInfo.userId

+ 2 - 2
src/packagesEnv/pages/personalCenter/personalInfo.wpy

@@ -91,8 +91,8 @@ wepy.page({
         {name: '手机号', text: '', url: ''}
     ],
     nextArr: [
-        {name: '岗位', text: 'UX设计师'},
-        {name: '所属', text: '上格云智能技术有限公司'}
+        {name: '岗位', text: ''},
+        {name: '所属', text: ''}
     ]
   },
   computed: {},

+ 170 - 5
src/packagesEnv/pages/search/index.wpy

@@ -1,26 +1,185 @@
 <style lang="less">
+   page {
+    width:100%;
+   }
+  .page-search {
+    position: relative;
+    padding-top: 136rpx;
+    .input-wrap {
+      box-sizing:border-box;
+      display: flex;
+      position: relative;
+      margin:40rpx auto;
+      width: 670rpx;
+      height: 96rpx;
+      line-height: 96rpx;
+      background: #F4F5F6;
+      border-radius: 82rpx;
+    }
+
+    .input-wrap input,
+    textarea {
+      padding-left:120rpx;
+      padding-right:40rpx;
+      box-sizing:border-box;
+      width: 100%;
+      height:48rpx;
+      margin-top:24rpx;
+     line-height: 48rpx;
+      background-color: transparent;
+      font-size: 14px;
+    }
+
+    .input-wrap .icon {
+      width: 48rpx;
+      height: 48rpx;
+      display: block;
+    }
+
+    .input-wrap .icon-search-wrap {
+      position: absolute;
+      left: 40rpx;
+      top: 24rpx;
+    }
+
+    .input-wrap .icon-close-wrap {
+      position: absolute;
+      right: 32rpx;
+      top: 24rpx;
+    }
+    .search-box{
+       box-sizing:border-box; 
+       padding-top:32rpx;
+       padding-bottom:16rpx;
+       padding-left:34rpx;
+       padding-right:56rpx;
+       line-height:60rpx;
+       color: #8B949E;
+
+       .title{
+         padding-left:22rpx;
+        label {
+        display:block;  
+        color: #8B949E;
+        font-family: PingFang SC;
+        font-size: 14px;
+        font-weight: 400;
+        line-height: 22px;
+        padding:8rpx 0;
+       
+        letter-spacing: 0px;
+        text-align: left;
+        border-bottom: 1px solid #C4C9CF4D
+        }
+       }
+       .content{
+        width:100%;
+        .content-item{
+          display:inline-block;
+          vertical-align:middle;
+          margin-left:22rpx;
+          width:308rpx;
+          height:48rpx;
+          padding:24rpx 0;
+        }
+       }
+    }
+}
+
 
 </style>
 
 <template>
-   
+<view class="page-search">
+      
+<page-top-bar 
+      titleColor="#1B2129" 
+      bgColor="#ffffff"></page-top-bar>
+      <!--搜索框-->
+      <view class="input-wrap">
+        <label for="spaceSearchInputId" class="icon-search-wrap">
+          <image class="icon" src="{{h5StaticPath+ 'icon_search.svg'}}" />
+        </label>
+        <input
+          id="spaceSearchInputId"
+          value="{{inputValue}}"
+          bindinput="getInputValue"
+          placeholder="输入人名/地点"
+          focus="{{autoFocus}}"
+        />
+        <label for="spaceSearchInputId" class="icon-close-wrap">
+          <image
+            wx:if="{{inputValue}}"
+            bindtap="clearInput"
+            class="icon"
+            src="{{h5StaticPath+ 'icon_close.svg'}}"
+          />
+        </label>
+      </view>
+
+       <!--最近搜索-->
+      <view class="search-box">
+         <view class="title">
+          <label>最近搜索</label>
+         </view>
+         <view class="content">
+          <view class="content-item" 
+          :key="index"
+          v-for="(item,index) in 20">
+            ddgggggg
+          </view>
+         </view> 
+      </view> 
+
+      <!--会议室-->
+      <view class="search-box">
+         <view class="title">
+           <label>所有会议室</span>
+         </view>
+         <view class="content">
+          <view class="content-item" v-for="item in 20">
+            ddgggggg
+          </view>
+         </view> 
+      </view> 
+   </view>
 </template>
 
 <script>
+import config from '@/config';
 import wepy from '@wepy/core'
 import eventHub from '@/common/eventHub'
 import { mapState } from '@wepy/x'
 import store from '@/store'
 import testMixin from '@/mixins/test'
 
+let h5StaticPath = config.h5StaticPath + '/page-intelligent-control/';
+
 wepy.page({
   store,
   config: {
     navigationBarTitleText: 'test'
   },
 
-  data: {},
+  data: {
+     inputValue: '',
+      autoFocus: false,
+    h5StaticPath,
+  },
+  onLoad(){
+    
+  },
+  onReady() {
+    this.autoFocus = true;
+  },
   methods: {
+     getInputValue(e) {
+      let keyword = e.$wx.detail.value || '';
+      keyword = keyword.trim();
+      let searchResultList = [];
+      this.inputValue = keyword;
+
+    },
     goEnv() {
       wx.navigateTo({
         url: '/packagesEnv/pages/officehome/index?spaceId=Sp1101080259b3510e26e7dd4dd9bf9784f06f3feb68'
@@ -42,8 +201,14 @@ wepy.page({
 </script>
 <config>
 {
-navigationBarTitleText: '首页',
-usingComponents: {
-}
+  "navigationBarTitleText": "公司身份选择",
+  "backgroundColor": "#EBF5FA",
+  navigationStyle:"custom",
+  usingComponents: {
+    'page-top-bar': '~@/components/common/page-top-bar',      
+  },
+  componentPlaceholder:{
+    'page-top-bar': 'view'
+  }
 }
 </config>

+ 52 - 52
src/service/location.js

@@ -67,59 +67,59 @@ function checkLoactionInDestance(targetLocationInfo, maxDistance) {
           wx.authorize({
             scope: 'scope.userLocation',
             success: () => {
-              wx.getLocation({
-                success(res) {
-                  let distance = getDistance(res.latitude, res.longitude, targetLocationInfo.latitude, targetLocationInfo.longitude);
+              // wx.getLocation({
+              //   success(res) {
+              //     let distance = getDistance(res.latitude, res.longitude, targetLocationInfo.latitude, targetLocationInfo.longitude);
                
-                  if (distance <= maxDistance) {
-                    store.commit('setLocationInfo', {
-                      getLastTime: new Date().getTime(),
-                      data: null,
-                      method: 'resolve'
-                    });
-                    resolve()
-                  } else {
-                    store.commit('locaitonInfo', {
-                      getLastTime: new Date().getTime(),
-                      data: { reason: 'overDistance' },
-                      method: 'reject'
-                    });
-                    reject({ reason: 'overDistance' });
-                  }
-                },
-                fail(res) {
-                  let msg = res.errMsg;
-                  switch (res.error) {
-                    case 11:
-                      msg = '无法使用位置服务';
-                      break;
-                    case 12:
-                      msg = '网络异常,请稍后再试';
-                      break;
-                    case 13:
-                      msg = '定位失败,请稍后再试';
-                      break;
-                    case 14:
-                      msg = '业务定位超时,请稍后再试';
-                      break;
-                    default:
-                      msg = '请前往系统设置开启微信定位权限';
-                  }
-                  store.commit('locaitonInfo', {
-                    getLastTime: new Date().getTime(),
-                    data: { reason: 'systemError' },
-                    method: 'reject'
-                  });
-                  reject({ reason: 'systemError' });
-                  setTimeout(() => {
-                    wx.showToast({
-                      title: msg,
-                      duration: 2000,
-                      icon: 'none'
-                    });
-                  }, 0);
-                }
-              })
+              //     if (distance <= maxDistance) {
+              //       store.commit('setLocationInfo', {
+              //         getLastTime: new Date().getTime(),
+              //         data: null,
+              //         method: 'resolve'
+              //       });
+              //       resolve()
+              //     } else {
+              //       store.commit('locaitonInfo', {
+              //         getLastTime: new Date().getTime(),
+              //         data: { reason: 'overDistance' },
+              //         method: 'reject'
+              //       });
+              //       reject({ reason: 'overDistance' });
+              //     }
+              //   },
+              //   fail(res) {
+              //     let msg = res.errMsg;
+              //     switch (res.error) {
+              //       case 11:
+              //         msg = '无法使用位置服务';
+              //         break;
+              //       case 12:
+              //         msg = '网络异常,请稍后再试';
+              //         break;
+              //       case 13:
+              //         msg = '定位失败,请稍后再试';
+              //         break;
+              //       case 14:
+              //         msg = '业务定位超时,请稍后再试';
+              //         break;
+              //       default:
+              //         msg = '请前往系统设置开启微信定位权限';
+              //     }
+              //     store.commit('locaitonInfo', {
+              //       getLastTime: new Date().getTime(),
+              //       data: { reason: 'systemError' },
+              //       method: 'reject'
+              //     });
+              //     reject({ reason: 'systemError' });
+              //     setTimeout(() => {
+              //       wx.showToast({
+              //         title: msg,
+              //         duration: 2000,
+              //         icon: 'none'
+              //       });
+              //     }, 0);
+              //   }
+              // })
             },
             fail: () => {
               wx.showModal({