瀏覽代碼

Merge branch 'master' of http://192.168.1.41:3000/SmartCost/ConstructionCost

TonyKang 5 年之前
父節點
當前提交
fd192f8fb0
共有 77 個文件被更改,包括 59687 次插入4444 次删除
  1. 3 3
      lib/bootstrap/bootstrap.min.js
  2. 4 4
      lib/bootstrap/css/bootstrap.min.css
  3. 二進制
      lib/font-awesome/webfonts/fa-brands-400.eot
  4. 3300 0
      lib/font-awesome/webfonts/fa-brands-400.svg
  5. 二進制
      lib/font-awesome/webfonts/fa-brands-400.ttf
  6. 二進制
      lib/font-awesome/webfonts/fa-brands-400.woff
  7. 二進制
      lib/font-awesome/webfonts/fa-brands-400.woff2
  8. 二進制
      lib/font-awesome/webfonts/fa-light-300.eot
  9. 9896 0
      lib/font-awesome/webfonts/fa-light-300.svg
  10. 二進制
      lib/font-awesome/webfonts/fa-light-300.ttf
  11. 二進制
      lib/font-awesome/webfonts/fa-light-300.woff
  12. 二進制
      lib/font-awesome/webfonts/fa-light-300.woff2
  13. 二進制
      lib/font-awesome/webfonts/fa-regular-400.eot
  14. 9098 0
      lib/font-awesome/webfonts/fa-regular-400.svg
  15. 二進制
      lib/font-awesome/webfonts/fa-regular-400.ttf
  16. 二進制
      lib/font-awesome/webfonts/fa-regular-400.woff
  17. 二進制
      lib/font-awesome/webfonts/fa-regular-400.woff2
  18. 二進制
      lib/font-awesome/webfonts/fa-solid-900.eot
  19. 7702 0
      lib/font-awesome/webfonts/fa-solid-900.svg
  20. 二進制
      lib/font-awesome/webfonts/fa-solid-900.ttf
  21. 二進制
      lib/font-awesome/webfonts/fa-solid-900.woff
  22. 二進制
      lib/font-awesome/webfonts/fa-solid-900.woff2
  23. 200 0
      lib/lity/lity.css
  24. 638 0
      lib/lity/lity.js
  25. 1 1
      modules/main/controllers/info_price_controller.js
  26. 1 1
      modules/main/facade/info_price_facade.js
  27. 2 2
      modules/main/middleware/index.js
  28. 2 2
      modules/users/controllers/cld_controller.js
  29. 126 0
      modules/users/controllers/login_controller.js
  30. 69 2
      modules/users/models/user_model.js
  31. 8 0
      modules/users/routes/login_route.js
  32. 270 4
      package-lock.json
  33. 1847 150
      web/building_saas/css/all.css
  34. 84 2
      web/building_saas/css/style.css
  35. 二進制
      web/building_saas/css/videobg.png
  36. 二進制
      web/building_saas/css/webfonts/fa-brands-400.eot
  37. 694 964
      web/building_saas/css/webfonts/fa-brands-400.svg
  38. 二進制
      web/building_saas/css/webfonts/fa-brands-400.ttf
  39. 二進制
      web/building_saas/css/webfonts/fa-brands-400.woff
  40. 二進制
      web/building_saas/css/webfonts/fa-brands-400.woff2
  41. 二進制
      web/building_saas/css/webfonts/fa-light-300.eot
  42. 9896 0
      web/building_saas/css/webfonts/fa-light-300.svg
  43. 二進制
      web/building_saas/css/webfonts/fa-light-300.ttf
  44. 二進制
      web/building_saas/css/webfonts/fa-light-300.woff
  45. 二進制
      web/building_saas/css/webfonts/fa-light-300.woff2
  46. 二進制
      web/building_saas/css/webfonts/fa-regular-400.eot
  47. 8319 24
      web/building_saas/css/webfonts/fa-regular-400.svg
  48. 二進制
      web/building_saas/css/webfonts/fa-regular-400.ttf
  49. 二進制
      web/building_saas/css/webfonts/fa-regular-400.woff
  50. 二進制
      web/building_saas/css/webfonts/fa-regular-400.woff2
  51. 二進制
      web/building_saas/css/webfonts/fa-solid-900.eot
  52. 3596 594
      web/building_saas/css/webfonts/fa-solid-900.svg
  53. 二進制
      web/building_saas/css/webfonts/fa-solid-900.ttf
  54. 二進制
      web/building_saas/css/webfonts/fa-solid-900.woff
  55. 二進制
      web/building_saas/css/webfonts/fa-solid-900.woff2
  56. 二進制
      web/building_saas/img/vip3.png
  57. 3150 2558
      web/building_saas/main/js/models/calc_program.js
  58. 8 7
      web/building_saas/main/js/views/glj_view.js
  59. 3 5
      web/building_saas/main/js/views/project_view.js
  60. 1 0
      web/building_saas/main/js/views/quantity_edit_view.js
  61. 1 1
      web/building_saas/main/js/views/select_FB_view.js
  62. 2 0
      web/common/html/header.html
  63. 2 2
      web/over_write/js/chongqing_2018_export.js
  64. 181 93
      web/users/html/index.html
  65. 2 1
      web/users/html/login.html
  66. 6 1
      web/users/html/user-buy.html
  67. 84 0
      web/users/html/user-check.html
  68. 281 0
      web/users/html/user-reg.html
  69. 二進制
      web/users/images/favicon.ico
  70. 二進制
      web/users/images/home-desk.png
  71. 二進制
      web/users/images/softview/1.png
  72. 二進制
      web/users/images/softview/2.png
  73. 二進制
      web/users/images/softview/3.png
  74. 114 1
      web/users/images/undraw_work.svg
  75. 1 0
      web/users/images/undraw_work1.svg
  76. 66 6
      web/users/js/index.js
  77. 29 16
      web/users/js/login.js

File diff suppressed because it is too large
+ 3 - 3
lib/bootstrap/bootstrap.min.js


File diff suppressed because it is too large
+ 4 - 4
lib/bootstrap/css/bootstrap.min.css


二進制
lib/font-awesome/webfonts/fa-brands-400.eot


File diff suppressed because it is too large
+ 3300 - 0
lib/font-awesome/webfonts/fa-brands-400.svg


二進制
lib/font-awesome/webfonts/fa-brands-400.ttf


二進制
lib/font-awesome/webfonts/fa-brands-400.woff


二進制
lib/font-awesome/webfonts/fa-brands-400.woff2


二進制
lib/font-awesome/webfonts/fa-light-300.eot


File diff suppressed because it is too large
+ 9896 - 0
lib/font-awesome/webfonts/fa-light-300.svg


二進制
lib/font-awesome/webfonts/fa-light-300.ttf


二進制
lib/font-awesome/webfonts/fa-light-300.woff


二進制
lib/font-awesome/webfonts/fa-light-300.woff2


二進制
lib/font-awesome/webfonts/fa-regular-400.eot


File diff suppressed because it is too large
+ 9098 - 0
lib/font-awesome/webfonts/fa-regular-400.svg


二進制
lib/font-awesome/webfonts/fa-regular-400.ttf


二進制
lib/font-awesome/webfonts/fa-regular-400.woff


二進制
lib/font-awesome/webfonts/fa-regular-400.woff2


二進制
lib/font-awesome/webfonts/fa-solid-900.eot


File diff suppressed because it is too large
+ 7702 - 0
lib/font-awesome/webfonts/fa-solid-900.svg


二進制
lib/font-awesome/webfonts/fa-solid-900.ttf


二進制
lib/font-awesome/webfonts/fa-solid-900.woff


二進制
lib/font-awesome/webfonts/fa-solid-900.woff2


+ 200 - 0
lib/lity/lity.css

@@ -0,0 +1,200 @@
+/*! Lity - v2.4.0 - 2019-08-10
+* http://sorgalla.com/lity/
+* Copyright (c) 2015-2019 Jan Sorgalla; Licensed MIT */
+.lity {
+  z-index: 9990;
+  position: fixed;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  white-space: nowrap;
+  background: #0b0b0b;
+  background: rgba(0, 0, 0, 0.9);
+  outline: none !important;
+  opacity: 0;
+  -webkit-transition: opacity 0.3s ease;
+  -o-transition: opacity 0.3s ease;
+  transition: opacity 0.3s ease;
+}
+.lity.lity-opened {
+  opacity: 1;
+}
+.lity.lity-closed {
+  opacity: 0;
+}
+.lity * {
+  -webkit-box-sizing: border-box;
+     -moz-box-sizing: border-box;
+          box-sizing: border-box;
+}
+.lity-wrap {
+  z-index: 9990;
+  position: fixed;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  text-align: center;
+  outline: none !important;
+}
+.lity-wrap:before {
+  content: '';
+  display: inline-block;
+  height: 100%;
+  vertical-align: middle;
+  margin-right: -0.25em;
+}
+.lity-loader {
+  z-index: 9991;
+  color: #fff;
+  position: absolute;
+  top: 50%;
+  margin-top: -0.8em;
+  width: 100%;
+  text-align: center;
+  font-size: 14px;
+  font-family: Arial, Helvetica, sans-serif;
+  opacity: 0;
+  -webkit-transition: opacity 0.3s ease;
+  -o-transition: opacity 0.3s ease;
+  transition: opacity 0.3s ease;
+}
+.lity-loading .lity-loader {
+  opacity: 1;
+}
+.lity-container {
+  z-index: 9992;
+  position: relative;
+  text-align: left;
+  vertical-align: middle;
+  display: inline-block;
+  white-space: normal;
+  max-width: 100%;
+  max-height: 100%;
+  outline: none !important;
+}
+.lity-content {
+  z-index: 9993;
+  width: 100%;
+  -webkit-transform: scale(1);
+      -ms-transform: scale(1);
+       -o-transform: scale(1);
+          transform: scale(1);
+  -webkit-transition: -webkit-transform 0.3s ease;
+  transition: -webkit-transform 0.3s ease;
+  -o-transition: -o-transform 0.3s ease;
+  transition: transform 0.3s ease;
+  transition: transform 0.3s ease, -webkit-transform 0.3s ease, -o-transform 0.3s ease;
+}
+.lity-loading .lity-content,
+.lity-closed .lity-content {
+  -webkit-transform: scale(0.8);
+      -ms-transform: scale(0.8);
+       -o-transform: scale(0.8);
+          transform: scale(0.8);
+}
+.lity-content:after {
+  content: '';
+  position: absolute;
+  left: 0;
+  top: 0;
+  bottom: 0;
+  display: block;
+  right: 0;
+  width: auto;
+  height: auto;
+  z-index: -1;
+  -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
+          box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
+}
+.lity-close {
+  z-index: 9994;
+  width: 35px;
+  height: 35px;
+  position: fixed;
+  right: 0;
+  top: 0;
+  -webkit-appearance: none;
+  cursor: pointer;
+  text-decoration: none;
+  text-align: center;
+  padding: 0;
+  color: #fff;
+  font-style: normal;
+  font-size: 35px;
+  font-family: Arial, Baskerville, monospace;
+  line-height: 35px;
+  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
+  border: 0;
+  background: none;
+  outline: none;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+}
+.lity-close::-moz-focus-inner {
+  border: 0;
+  padding: 0;
+}
+.lity-close:hover,
+.lity-close:focus,
+.lity-close:active,
+.lity-close:visited {
+  text-decoration: none;
+  text-align: center;
+  padding: 0;
+  color: #fff;
+  font-style: normal;
+  font-size: 35px;
+  font-family: Arial, Baskerville, monospace;
+  line-height: 35px;
+  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
+  border: 0;
+  background: none;
+  outline: none;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+}
+.lity-close:active {
+  top: 1px;
+}
+/* Image */
+.lity-image img {
+  max-width: 100%;
+  display: block;
+  line-height: 0;
+  border: 0;
+}
+/* iFrame */
+.lity-iframe .lity-container,
+.lity-youtube .lity-container,
+.lity-vimeo .lity-container,
+.lity-facebookvideo .lity-container,
+.lity-googlemaps .lity-container {
+  width: 100%;
+  max-width: 964px;
+}
+.lity-iframe-container {
+  width: 100%;
+  height: 0;
+  padding-top: 56.25%;
+  overflow: auto;
+  pointer-events: auto;
+  -webkit-transform: translateZ(0);
+          transform: translateZ(0);
+  -webkit-overflow-scrolling: touch;
+}
+.lity-iframe-container iframe {
+  position: absolute;
+  display: block;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
+          box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
+  background: #000;
+}
+.lity-hide {
+  display: none;
+}

+ 638 - 0
lib/lity/lity.js

@@ -0,0 +1,638 @@
+/*! Lity - v2.4.0 - 2019-08-10
+* http://sorgalla.com/lity/
+* Copyright (c) 2015-2019 Jan Sorgalla; Licensed MIT */
+(function(window, factory) {
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery'], function($) {
+            return factory(window, $);
+        });
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        module.exports = factory(window, require('jquery'));
+    } else {
+        window.lity = factory(window, window.jQuery || window.Zepto);
+    }
+}(typeof window !== "undefined" ? window : this, function(window, $) {
+    'use strict';
+
+    var document = window.document;
+
+    var _win = $(window);
+    var _deferred = $.Deferred;
+    var _html = $('html');
+    var _instances = [];
+
+    var _attrAriaHidden = 'aria-hidden';
+    var _dataAriaHidden = 'lity-' + _attrAriaHidden;
+
+    var _focusableElementsSelector = 'a[href],area[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),button:not([disabled]),iframe,object,embed,[contenteditable],[tabindex]:not([tabindex^="-"])';
+
+    var _defaultOptions = {
+        esc: true,
+        handler: null,
+        handlers: {
+            image: imageHandler,
+            inline: inlineHandler,
+            youtube: youtubeHandler,
+            vimeo: vimeoHandler,
+            googlemaps: googlemapsHandler,
+            facebookvideo: facebookvideoHandler,
+            iframe: iframeHandler
+        },
+        template: '<div class="lity" role="dialog" aria-label="Dialog Window (Press escape to close)" tabindex="-1"><div class="lity-wrap" data-lity-close role="document"><div class="lity-loader" aria-hidden="true">Loading...</div><div class="lity-container"><div class="lity-content"></div><button class="lity-close" type="button" aria-label="Close (Press escape to close)" data-lity-close>&times;</button></div></div></div>'
+    };
+
+    var _imageRegexp = /(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i;
+    var _youtubeRegex = /(youtube(-nocookie)?\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?([\w-]{11})(.*)?/i;
+    var _vimeoRegex =  /(vimeo(pro)?.com)\/(?:[^\d]+)?(\d+)\??(.*)?$/;
+    var _googlemapsRegex = /((maps|www)\.)?google\.([^\/\?]+)\/?((maps\/?)?\?)(.*)/i;
+    var _facebookvideoRegex = /(facebook\.com)\/([a-z0-9_-]*)\/videos\/([0-9]*)(.*)?$/i;
+
+    var _transitionEndEvent = (function() {
+        var el = document.createElement('div');
+
+        var transEndEventNames = {
+            WebkitTransition: 'webkitTransitionEnd',
+            MozTransition: 'transitionend',
+            OTransition: 'oTransitionEnd otransitionend',
+            transition: 'transitionend'
+        };
+
+        for (var name in transEndEventNames) {
+            if (el.style[name] !== undefined) {
+                return transEndEventNames[name];
+            }
+        }
+
+        return false;
+    })();
+
+    function transitionEnd(element) {
+        var deferred = _deferred();
+
+        if (!_transitionEndEvent || !element.length) {
+            deferred.resolve();
+        } else {
+            element.one(_transitionEndEvent, deferred.resolve);
+            setTimeout(deferred.resolve, 500);
+        }
+
+        return deferred.promise();
+    }
+
+    function settings(currSettings, key, value) {
+        if (arguments.length === 1) {
+            return $.extend({}, currSettings);
+        }
+
+        if (typeof key === 'string') {
+            if (typeof value === 'undefined') {
+                return typeof currSettings[key] === 'undefined'
+                    ? null
+                    : currSettings[key];
+            }
+
+            currSettings[key] = value;
+        } else {
+            $.extend(currSettings, key);
+        }
+
+        return this;
+    }
+
+    function parseQueryParams(params) {
+        var pairs = decodeURI(params.split('#')[0]).split('&');
+        var obj = {}, p;
+
+        for (var i = 0, n = pairs.length; i < n; i++) {
+            if (!pairs[i]) {
+                continue;
+            }
+
+            p = pairs[i].split('=');
+            obj[p[0]] = p[1];
+        }
+
+        return obj;
+    }
+
+    function appendQueryParams(url, params) {
+        return url + (url.indexOf('?') > -1 ? '&' : '?') + $.param(params);
+    }
+
+    function transferHash(originalUrl, newUrl) {
+        var pos = originalUrl.indexOf('#');
+
+        if (-1 === pos) {
+            return newUrl;
+        }
+
+        if (pos > 0) {
+            originalUrl = originalUrl.substr(pos);
+        }
+
+        return newUrl + originalUrl;
+    }
+
+    function error(msg) {
+        return $('<span class="lity-error"/>').append(msg);
+    }
+
+    function imageHandler(target, instance) {
+        var desc = (instance.opener() && instance.opener().data('lity-desc')) || 'Image with no description';
+        var img = $('<img src="' + target + '" alt="' + desc + '"/>');
+        var deferred = _deferred();
+        var failed = function() {
+            deferred.reject(error('Failed loading image'));
+        };
+
+        img
+            .on('load', function() {
+                if (this.naturalWidth === 0) {
+                    return failed();
+                }
+
+                deferred.resolve(img);
+            })
+            .on('error', failed)
+        ;
+
+        return deferred.promise();
+    }
+
+    imageHandler.test = function(target) {
+        return _imageRegexp.test(target);
+    };
+
+    function inlineHandler(target, instance) {
+        var el, placeholder, hasHideClass;
+
+        try {
+            el = $(target);
+        } catch (e) {
+            return false;
+        }
+
+        if (!el.length) {
+            return false;
+        }
+
+        placeholder = $('<i style="display:none !important"/>');
+        hasHideClass = el.hasClass('lity-hide');
+
+        instance
+            .element()
+            .one('lity:remove', function() {
+                placeholder
+                    .before(el)
+                    .remove()
+                ;
+
+                if (hasHideClass && !el.closest('.lity-content').length) {
+                    el.addClass('lity-hide');
+                }
+            })
+        ;
+
+        return el
+            .removeClass('lity-hide')
+            .after(placeholder)
+        ;
+    }
+
+    function youtubeHandler(target) {
+        var matches = _youtubeRegex.exec(target);
+
+        if (!matches) {
+            return false;
+        }
+
+        return iframeHandler(
+            transferHash(
+                target,
+                appendQueryParams(
+                    'https://www.youtube' + (matches[2] || '') + '.com/embed/' + matches[4],
+                    $.extend(
+                        {
+                            autoplay: 1
+                        },
+                        parseQueryParams(matches[5] || '')
+                    )
+                )
+            )
+        );
+    }
+
+    function vimeoHandler(target) {
+        var matches = _vimeoRegex.exec(target);
+
+        if (!matches) {
+            return false;
+        }
+
+        return iframeHandler(
+            transferHash(
+                target,
+                appendQueryParams(
+                    'https://player.vimeo.com/video/' + matches[3],
+                    $.extend(
+                        {
+                            autoplay: 1
+                        },
+                        parseQueryParams(matches[4] || '')
+                    )
+                )
+            )
+        );
+    }
+
+    function facebookvideoHandler(target) {
+        var matches = _facebookvideoRegex.exec(target);
+
+        if (!matches) {
+            return false;
+        }
+
+        if (0 !== target.indexOf('http')) {
+            target = 'https:' + target;
+        }
+
+        return iframeHandler(
+            transferHash(
+                target,
+                appendQueryParams(
+                    'https://www.facebook.com/plugins/video.php?href=' + target,
+                    $.extend(
+                        {
+                            autoplay: 1
+                        },
+                        parseQueryParams(matches[4] || '')
+                    )
+                )
+            )
+        );
+    }
+
+    function googlemapsHandler(target) {
+        var matches = _googlemapsRegex.exec(target);
+
+        if (!matches) {
+            return false;
+        }
+
+        return iframeHandler(
+            transferHash(
+                target,
+                appendQueryParams(
+                    'https://www.google.' + matches[3] + '/maps?' + matches[6],
+                    {
+                        output: matches[6].indexOf('layer=c') > 0 ? 'svembed' : 'embed'
+                    }
+                )
+            )
+        );
+    }
+
+    function iframeHandler(target) {
+        return '<div class="lity-iframe-container"><iframe frameborder="0" allowfullscreen allow="autoplay; fullscreen" src="' + target + '"/></div>';
+    }
+
+    function winHeight() {
+        return document.documentElement.clientHeight
+            ? document.documentElement.clientHeight
+            : Math.round(_win.height());
+    }
+
+    function keydown(e) {
+        var current = currentInstance();
+
+        if (!current) {
+            return;
+        }
+
+        // ESC key
+        if (e.keyCode === 27 && !!current.options('esc')) {
+            current.close();
+        }
+
+        // TAB key
+        if (e.keyCode === 9) {
+            handleTabKey(e, current);
+        }
+    }
+
+    function handleTabKey(e, instance) {
+        var focusableElements = instance.element().find(_focusableElementsSelector);
+        var focusedIndex = focusableElements.index(document.activeElement);
+
+        if (e.shiftKey && focusedIndex <= 0) {
+            focusableElements.get(focusableElements.length - 1).focus();
+            e.preventDefault();
+        } else if (!e.shiftKey && focusedIndex === focusableElements.length - 1) {
+            focusableElements.get(0).focus();
+            e.preventDefault();
+        }
+    }
+
+    function resize() {
+        $.each(_instances, function(i, instance) {
+            instance.resize();
+        });
+    }
+
+    function registerInstance(instanceToRegister) {
+        if (1 === _instances.unshift(instanceToRegister)) {
+            _html.addClass('lity-active');
+
+            _win
+                .on({
+                    resize: resize,
+                    keydown: keydown
+                })
+            ;
+        }
+
+        $('body > *').not(instanceToRegister.element())
+            .addClass('lity-hidden')
+            .each(function() {
+                var el = $(this);
+
+                if (undefined !== el.data(_dataAriaHidden)) {
+                    return;
+                }
+
+                el.data(_dataAriaHidden, el.attr(_attrAriaHidden) || null);
+            })
+            .attr(_attrAriaHidden, 'true')
+        ;
+    }
+
+    function removeInstance(instanceToRemove) {
+        var show;
+
+        instanceToRemove
+            .element()
+            .attr(_attrAriaHidden, 'true')
+        ;
+
+        if (1 === _instances.length) {
+            _html.removeClass('lity-active');
+
+            _win
+                .off({
+                    resize: resize,
+                    keydown: keydown
+                })
+            ;
+        }
+
+        _instances = $.grep(_instances, function(instance) {
+            return instanceToRemove !== instance;
+        });
+
+        if (!!_instances.length) {
+            show = _instances[0].element();
+        } else {
+            show = $('.lity-hidden');
+        }
+
+        show
+            .removeClass('lity-hidden')
+            .each(function() {
+                var el = $(this), oldAttr = el.data(_dataAriaHidden);
+
+                if (!oldAttr) {
+                    el.removeAttr(_attrAriaHidden);
+                } else {
+                    el.attr(_attrAriaHidden, oldAttr);
+                }
+
+                el.removeData(_dataAriaHidden);
+            })
+        ;
+    }
+
+    function currentInstance() {
+        if (0 === _instances.length) {
+            return null;
+        }
+
+        return _instances[0];
+    }
+
+    function factory(target, instance, handlers, preferredHandler) {
+        var handler = 'inline', content;
+
+        var currentHandlers = $.extend({}, handlers);
+
+        if (preferredHandler && currentHandlers[preferredHandler]) {
+            content = currentHandlers[preferredHandler](target, instance);
+            handler = preferredHandler;
+        } else {
+            // Run inline and iframe handlers after all other handlers
+            $.each(['inline', 'iframe'], function(i, name) {
+                delete currentHandlers[name];
+
+                currentHandlers[name] = handlers[name];
+            });
+
+            $.each(currentHandlers, function(name, currentHandler) {
+                // Handler might be "removed" by setting callback to null
+                if (!currentHandler) {
+                    return true;
+                }
+
+                if (
+                    currentHandler.test &&
+                    !currentHandler.test(target, instance)
+                ) {
+                    return true;
+                }
+
+                content = currentHandler(target, instance);
+
+                if (false !== content) {
+                    handler = name;
+                    return false;
+                }
+            });
+        }
+
+        return {handler: handler, content: content || ''};
+    }
+
+    function Lity(target, options, opener, activeElement) {
+        var self = this;
+        var result;
+        var isReady = false;
+        var isClosed = false;
+        var element;
+        var content;
+
+        options = $.extend(
+            {},
+            _defaultOptions,
+            options
+        );
+
+        element = $(options.template);
+
+        // -- API --
+
+        self.element = function() {
+            return element;
+        };
+
+        self.opener = function() {
+            return opener;
+        };
+
+        self.options  = $.proxy(settings, self, options);
+        self.handlers = $.proxy(settings, self, options.handlers);
+
+        self.resize = function() {
+            if (!isReady || isClosed) {
+                return;
+            }
+
+            content
+                .css('max-height', winHeight() + 'px')
+                .trigger('lity:resize', [self])
+            ;
+        };
+
+        self.close = function() {
+            if (!isReady || isClosed) {
+                return;
+            }
+
+            isClosed = true;
+
+            removeInstance(self);
+
+            var deferred = _deferred();
+
+            // We return focus only if the current focus is inside this instance
+            if (
+                activeElement &&
+                (
+                    document.activeElement === element[0] ||
+                    $.contains(element[0], document.activeElement)
+                )
+            ) {
+                try {
+                    activeElement.focus();
+                } catch (e) {
+                    // Ignore exceptions, eg. for SVG elements which can't be
+                    // focused in IE11
+                }
+            }
+
+            content.trigger('lity:close', [self]);
+
+            element
+                .removeClass('lity-opened')
+                .addClass('lity-closed')
+            ;
+
+            transitionEnd(content.add(element))
+                .always(function() {
+                    content.trigger('lity:remove', [self]);
+                    element.remove();
+                    element = undefined;
+                    deferred.resolve();
+                })
+            ;
+
+            return deferred.promise();
+        };
+
+        // -- Initialization --
+
+        result = factory(target, self, options.handlers, options.handler);
+
+        element
+            .attr(_attrAriaHidden, 'false')
+            .addClass('lity-loading lity-opened lity-' + result.handler)
+            .appendTo('body')
+            .focus()
+            .on('click', '[data-lity-close]', function(e) {
+                if ($(e.target).is('[data-lity-close]')) {
+                    self.close();
+                }
+            })
+            .trigger('lity:open', [self])
+        ;
+
+        registerInstance(self);
+
+        $.when(result.content)
+            .always(ready)
+        ;
+
+        function ready(result) {
+            content = $(result)
+                .css('max-height', winHeight() + 'px')
+            ;
+
+            element
+                .find('.lity-loader')
+                .each(function() {
+                    var loader = $(this);
+
+                    transitionEnd(loader)
+                        .always(function() {
+                            loader.remove();
+                        })
+                    ;
+                })
+            ;
+
+            element
+                .removeClass('lity-loading')
+                .find('.lity-content')
+                .empty()
+                .append(content)
+            ;
+
+            isReady = true;
+
+            content
+                .trigger('lity:ready', [self])
+            ;
+        }
+    }
+
+    function lity(target, options, opener) {
+        if (!target.preventDefault) {
+            opener = $(opener);
+        } else {
+            target.preventDefault();
+            opener = $(this);
+            target = opener.data('lity-target') || opener.attr('href') || opener.attr('src');
+        }
+
+        var instance = new Lity(
+            target,
+            $.extend(
+                {},
+                opener.data('lity-options') || opener.data('lity'),
+                options
+            ),
+            opener,
+            document.activeElement
+        );
+
+        if (!target.preventDefault) {
+            return instance;
+        }
+    }
+
+    lity.version  = '2.4.0';
+    lity.options  = $.proxy(settings, lity, _defaultOptions);
+    lity.handlers = $.proxy(settings, lity, _defaultOptions.handlers);
+    lity.current  = currentInstance;
+
+    $(document).on('click.lity', '[data-lity]', lity);
+
+    return lity;
+}));

+ 1 - 1
modules/main/controllers/info_price_controller.js

@@ -36,7 +36,7 @@ module.exports = {
             let functionName = req.url.replace(/\//g,"");
             result.data = controller[functionName]?await controller[functionName](req):"";
         }catch (err){
-            logger.err(err);
+            logger.err(err.stack);
             result.error=1;
             result.message = err.message;
         }

+ 1 - 1
modules/main/facade/info_price_facade.js

@@ -160,7 +160,7 @@ async function getDataByCode(code, data) {
     }
   }
   //没有完全匹配的,分词匹配关键字
-  if (items.length === 0){
+  if (items.length === 0 && data.keyWord){
     let nameArray =  nodejieba.cut(data.keyWord);
     nameArray = cusSegment(nameArray,data.keyWord);
     let result = getMatchPrice(allItems,nameArray);

+ 2 - 2
modules/main/middleware/index.js

@@ -55,7 +55,7 @@ function isAjax(req) {
 // 登录状态全局判断
 async function stateChecking(req, res, next) {
     const url = req.originalUrl;
-    if (url=="\/"|| /^\/login/.test(url) || /\.map|\.ico$/.test(url) || /^\/sms/.test(url) || /^\/cld\/(?!getCategoryStaff)/.test(url) || /^\/captcha/.test(url)) {
+    if (url=="\/"|| /^\/login/.test(url) || /\.map|\.ico$/.test(url) || /^\/sms/.test(url) || /^\/cld\/(?!getCategoryStaff)/.test(url) || /^\/captcha/.test(url) || /^\/wap/.test(url)) {
         // 如果是登录页面或短信接口或cld接口则忽略判断数据
         next();
     } else {
@@ -97,4 +97,4 @@ async function stateChecking(req, res, next) {
         next();
         await online_logs.saveOnlineTime(req);//记录登录时长
     }
-}
+}

+ 2 - 2
modules/users/controllers/cld_controller.js

@@ -111,8 +111,8 @@ class CLDController {
         let compilationID = request.body.cid;
         let deadline = request.body.deadline || '';
         let status = parseInt(request.body.status); // 1.升级、2.降级、3.续期
-        let smssend = parseInt(request.body.smssend);
-        let lock = parseInt(request.body.lock);// 0.默认、1.借出(借用)、2.销售(购买)
+        let smssend = parseInt(request.body.smssend) || 0;
+        let lock = parseInt(request.body.lock) || 0;// 0.默认、1.借出(借用)、2.销售(购买)、3.赠送(借用)
         try {
 
             let userModel = new UserModel();

+ 126 - 0
modules/users/controllers/login_controller.js

@@ -421,6 +421,132 @@ class LoginController {
     //     response.json(res);
     // }
 
+    async regPage(request, response) {
+        let userModel = new UserModel();
+        const err = request.session.regError;
+        request.session.regError = undefined;
+        let renderData = {
+            err: err ? err : '',
+            provinceList: userModel.province,
+        };
+        response.render('users/html/user-reg', renderData);
+    }
+
+    async reg(request, response) {
+        try {
+            if (request.body.type === undefined || request.body.mobile === undefined || request.body.company === undefined || request.body.real_name === undefined || request.body.qq === undefined || request.body.province === undefined) {
+                throw '参数有误';
+            }
+            let userModel = new UserModel();
+            let responseData = '';
+            if (parseInt(request.body.type) === 2) { // 已注册sso但未注册大司空
+                responseData = await userModel.regForSSO(request.body.mobile, request.body.qq);
+            } else if (parseInt(request.body.type) === 1 && request.body.password !== undefined) { // 都未注册
+                const name = request.body.real_name + '_' + request.body.mobile;
+                responseData = await userModel.regForSSO(request.body.mobile, request.body.qq, request.body.password, name);
+            } else {
+                throw '参数有误';
+            }
+            responseData = JSON.parse(responseData);
+            if (typeof responseData !== 'object') {
+                throw 'SSO报错';
+            }
+
+            if (responseData.length <= 0) {
+                throw '接口返回数据错误';
+            }
+
+            // 正确登录后 存入session
+            let userData = responseData[0];
+            // makeuser
+            let addUserData = {
+                ssoId: userData.id,
+                company: request.body.company,
+                username: userData.username,
+                email: userData.useremail,
+                mobile: userData.mobile,
+                qq: userData.qq,
+                isUserActive: userData.isUserActive,
+                token: uuidV1(),
+                real_name: request.body.real_name,
+                province: request.body.province,
+            };
+            const result = await userModel.addUser(addUserData);
+            return response.redirect("/wap/checkuser?mobile=" + request.body.mobile);
+        } catch (err) {
+            console.log(err);
+            request.session.regError = err;
+            return response.redirect("/wap/reg");
+        }
+
+    }
+
+    async checkUser(request, response) {
+        const renderData = {
+            check: false,
+        };
+        if (request.query.mobile !== undefined) {
+            let userModel = new UserModel();
+            const userInfo = await userModel.findDataByAccount(request.query.mobile);
+            renderData.check = true;
+            renderData.mobile = request.query.mobile;
+            renderData.userinfo = userInfo;
+        }
+        response.render('users/html/user-check', renderData);
+    }
+
+    async checkUserAjax(request, response) {
+        let existUser = 0;
+        try {
+            if (request.body.mobile !== undefined && request.body.code !== undefined) {
+                let mobile = request.body.mobile;
+                let codeMsg = request.session.code;
+                if (codeMsg !== undefined && request.body.code !== '') {
+                    console.log(codeMsg);
+                    const validMobile = codeMsg.split('_')[0];
+                    const code = codeMsg.split('_')[1];
+                    const time = codeMsg.split('_')[2];
+                    if (validMobile !== mobile) {
+                        throw '短信验证码错误';
+                    }
+                    if (Date.parse(new Date())/1000 > time+60*5 || request.body.code !== code) {
+                        throw '短信验证码错误或已过期';
+                    } else {
+                        delete request.session.code;
+                    }
+                } else {
+                    throw '短信验证码错误或已过期。';
+                }
+                let userModel = new UserModel();
+                const userInfo = await userModel.findDataByAccount(mobile);
+                existUser = userInfo ? 1 : 0;
+                // 若未注册大司空,再判断是否已注册sso
+                if (existUser === 0) {
+                    let responseData = await userModel.getInfoFromSSOAccount(mobile);
+                    if ( responseData === '-2') {
+                        throw '参数有误';
+                    }
+                    if ( responseData === '-22') {
+                        existUser = 0;
+                    }
+                    responseData = JSON.parse(responseData);
+                    if (typeof responseData === 'object') {
+                        existUser = 2;
+                    }
+                }
+            } else {
+                throw '参数有误';
+            }
+        } catch (error) {
+            console.log(error);
+            return response.json({error: 1, msg: error});
+        }
+        response.json({
+            error: 0,
+            existUser,
+        });
+    }
+
 }
 
 module.exports = LoginController;

+ 69 - 2
modules/users/models/user_model.js

@@ -88,14 +88,46 @@ class UserModel extends BaseModel {
     }
 
     /**
+     * 根据用户手机调用SSO接口获取个人信息
+     *
+     * @param {string} account
+     * @return {object}
+     */
+    async getInfoFromSSOAccount(account) {
+        let postData = {
+            url: 'http://sso.smartcost.com.cn/building/api/userinfo',
+            form: {account: account},
+            encoding: 'utf8'
+        };
+        return new Promise(function (resolve, reject) {
+            try {
+                // 请求接口
+                Request.post(postData, function (err, postResponse, body) {
+                    if (err) {
+                        console.log('111');
+                        reject('请求错误');
+                    }
+                    if (postResponse.statusCode !== 200) {
+                        reject('通行证验证失败!');
+                    }
+                    resolve(body);
+                });
+            } catch (error) {
+                reject([]);
+            }
+        });
+    }
+
+    /**
      * 根据用户手机号码调用SSO接口获取信息
      *
      * @param {string} mobile
      * @param {string} login 1为登录,不存在则是查询
+     * @param {string} comefrom 1为来自大司空
      * @return {object}
      */
     async getInfoFromSSOMobile(mobile, login = '1') {
-        const fromData = {account: mobile};
+        const fromData = {account: mobile, comefrom: 1};
         if (login === '1') {
             fromData.login = 1;
         }
@@ -157,6 +189,38 @@ class UserModel extends BaseModel {
     }
 
     /**
+     * 注册sso账号或修改sso的qq信息
+     *
+     * @param {string} username
+     * @param {string} password
+     * @return {object}
+     */
+    async regForSSO(mobile, qq, pwd = '', name = '') {
+        let postData = {
+            url: 'http://sso.smartcost.com.cn/building/api/reg',
+            form: {mobile: mobile, qq: qq, password: pwd, name: name},
+            encoding: 'utf8'
+        };
+        return new Promise(function (resolve, reject) {
+            try {
+                // 请求接口
+                Request.post(postData, function (err, postResponse, body) {
+                    if (err) {
+                        console.log('111');
+                        reject('请求错误');
+                    }
+                    if (postResponse.statusCode !== 200) {
+                        reject('通行证验证失败!');
+                    }
+                    resolve(body);
+                });
+            } catch (error) {
+                reject([]);
+            }
+        });
+    }
+
+    /**
      * 标记用户
      *
      * @param {object} userData
@@ -307,7 +371,10 @@ class UserModel extends BaseModel {
             create_time: new Date().getTime(),
             latest_login: new Date().getTime(),
             isUserActive: userData.isUserActive,
-            token: userData.token
+            token: userData.token,
+            real_name: userData.real_name ? userData.real_name : '',
+            province: userData.province ? userData.province : -1,
+            company: userData.company ? userData.company : '',
         };
         return this.db.create(insertData);
     }

+ 8 - 0
modules/users/routes/login_route.js

@@ -19,6 +19,14 @@ module.exports = function (app) {
 // 登录操作
     router.post('/login', loginController.login);
 
+    router.get('/wap/reg', loginController.regPage);
+
+    router.post('/wap/reg', loginController.reg);
+
+    router.get('/wap/checkuser', loginController.checkUser);
+
+    router.post('/wap/checkuser', loginController.checkUserAjax);
+
     // router.post('/accountIsPro', loginController.accountIsPro);
 
     // 验证码相关

+ 270 - 4
package-lock.json

@@ -6,8 +6,7 @@
     "abbrev": {
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
-      "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
-      "dev": true
+      "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
     },
     "accepts": {
       "version": "1.3.7",
@@ -234,6 +233,11 @@
         "buffer-equal": "^1.0.0"
       }
     },
+    "aproba": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
+      "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
+    },
     "archive-type": {
       "version": "3.2.0",
       "resolved": "https://registry.npmjs.org/archive-type/-/archive-type-3.2.0.tgz",
@@ -248,6 +252,44 @@
       "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
       "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA="
     },
+    "are-we-there-yet": {
+      "version": "1.1.5",
+      "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
+      "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
+      "requires": {
+        "delegates": "^1.0.0",
+        "readable-stream": "^2.0.6"
+      },
+      "dependencies": {
+        "isarray": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+          "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
+        },
+        "readable-stream": {
+          "version": "2.3.7",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+          "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+          "requires": {
+            "core-util-is": "~1.0.0",
+            "inherits": "~2.0.3",
+            "isarray": "~1.0.0",
+            "process-nextick-args": "~2.0.0",
+            "safe-buffer": "~5.1.1",
+            "string_decoder": "~1.1.1",
+            "util-deprecate": "~1.0.1"
+          }
+        },
+        "string_decoder": {
+          "version": "1.1.1",
+          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+          "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+          "requires": {
+            "safe-buffer": "~5.1.0"
+          }
+        }
+      }
+    },
     "argparse": {
       "version": "1.0.10",
       "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
@@ -1592,6 +1634,11 @@
         "upper-case-first": "^1.1.0"
       }
     },
+    "chownr": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
+      "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
+    },
     "ci-info": {
       "version": "1.6.0",
       "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz",
@@ -1969,6 +2016,11 @@
         "mongodb": ">= 1.2.0 <3.0.0"
       }
     },
+    "console-control-strings": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
+      "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
+    },
     "console-stream": {
       "version": "0.1.1",
       "resolved": "https://registry.npmjs.org/console-stream/-/console-stream-0.1.1.tgz",
@@ -2859,6 +2911,11 @@
       "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
       "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
     },
+    "delegates": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
+      "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
+    },
     "denque": {
       "version": "1.4.1",
       "resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz",
@@ -2887,6 +2944,11 @@
         "repeating": "^2.0.0"
       }
     },
+    "detect-libc": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
+      "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups="
+    },
     "dfa": {
       "version": "1.2.0",
       "resolved": "https://registry.npmjs.org/dfa/-/dfa-1.2.0.tgz",
@@ -4509,6 +4571,14 @@
       "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
       "optional": true
     },
+    "fs-minipass": {
+      "version": "1.2.7",
+      "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz",
+      "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==",
+      "requires": {
+        "minipass": "^2.6.0"
+      }
+    },
     "fs-mkdirp-stream": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz",
@@ -5028,6 +5098,28 @@
       "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
       "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
     },
+    "gauge": {
+      "version": "2.7.4",
+      "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
+      "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
+      "requires": {
+        "aproba": "^1.0.3",
+        "console-control-strings": "^1.0.0",
+        "has-unicode": "^2.0.0",
+        "object-assign": "^4.1.0",
+        "signal-exit": "^3.0.0",
+        "string-width": "^1.0.1",
+        "strip-ansi": "^3.0.1",
+        "wide-align": "^1.1.0"
+      },
+      "dependencies": {
+        "object-assign": {
+          "version": "4.1.1",
+          "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+          "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
+        }
+      }
+    },
     "generate-function": {
       "version": "2.3.1",
       "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
@@ -6224,6 +6316,11 @@
       "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
       "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg=="
     },
+    "has-unicode": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
+      "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
+    },
     "has-value": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
@@ -6459,6 +6556,14 @@
       "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=",
       "dev": true
     },
+    "ignore-walk": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.4.tgz",
+      "integrity": "sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==",
+      "requires": {
+        "minimatch": "^3.0.4"
+      }
+    },
     "imagemin": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/imagemin/-/imagemin-4.0.0.tgz",
@@ -8770,6 +8875,30 @@
       "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
       "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
     },
+    "minipass": {
+      "version": "2.9.0",
+      "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz",
+      "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==",
+      "requires": {
+        "safe-buffer": "^5.1.2",
+        "yallist": "^3.0.0"
+      },
+      "dependencies": {
+        "yallist": {
+          "version": "3.1.1",
+          "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
+          "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
+        }
+      }
+    },
+    "minizlib": {
+      "version": "1.3.3",
+      "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz",
+      "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==",
+      "requires": {
+        "minipass": "^2.9.0"
+      }
+    },
     "mixin-deep": {
       "version": "1.3.2",
       "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
@@ -9087,8 +9216,7 @@
     "nan": {
       "version": "2.14.0",
       "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz",
-      "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==",
-      "optional": true
+      "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg=="
     },
     "nanomatch": {
       "version": "1.2.13",
@@ -9116,6 +9244,39 @@
         "xml-char-classes": "^1.0.0"
       }
     },
+    "needle": {
+      "version": "2.6.0",
+      "resolved": "https://registry.npmjs.org/needle/-/needle-2.6.0.tgz",
+      "integrity": "sha512-KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg==",
+      "requires": {
+        "debug": "^3.2.6",
+        "iconv-lite": "^0.4.4",
+        "sax": "^1.2.4"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "3.2.7",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+          "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+          "requires": {
+            "ms": "^2.1.1"
+          }
+        },
+        "iconv-lite": {
+          "version": "0.4.24",
+          "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+          "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+          "requires": {
+            "safer-buffer": ">= 2.1.2 < 3"
+          }
+        },
+        "ms": {
+          "version": "2.1.3",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+          "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
+        }
+      }
+    },
     "negotiator": {
       "version": "0.6.2",
       "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
@@ -9131,6 +9292,30 @@
       "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
       "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw="
     },
+    "node-pre-gyp": {
+      "version": "0.14.0",
+      "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz",
+      "integrity": "sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA==",
+      "requires": {
+        "detect-libc": "^1.0.2",
+        "mkdirp": "^0.5.1",
+        "needle": "^2.2.1",
+        "nopt": "^4.0.1",
+        "npm-packlist": "^1.1.6",
+        "npmlog": "^4.0.2",
+        "rc": "^1.2.7",
+        "rimraf": "^2.6.1",
+        "semver": "^5.3.0",
+        "tar": "^4.4.2"
+      },
+      "dependencies": {
+        "semver": {
+          "version": "5.7.1",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+          "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
+        }
+      }
+    },
     "node-schedule": {
       "version": "1.3.2",
       "resolved": "https://registry.npmjs.org/node-schedule/-/node-schedule-1.3.2.tgz",
@@ -9155,6 +9340,15 @@
         "xlsx": "^0.11.10"
       }
     },
+    "nodejieba": {
+      "version": "2.4.2",
+      "resolved": "https://registry.npmjs.org/nodejieba/-/nodejieba-2.4.2.tgz",
+      "integrity": "sha512-U/Yey+OCv7XvTnujtjyx+FEIQ+na8nlroyrzs3vM2dIM/Nx2XpoPA8DcfDXmLuLbnlfd0rd1FCsZ5b5yFTTI9A==",
+      "requires": {
+        "nan": "^2.14.0",
+        "node-pre-gyp": "^0.14.0"
+      }
+    },
     "nodemailer": {
       "version": "2.7.2",
       "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-2.7.2.tgz",
@@ -9353,6 +9547,15 @@
         }
       }
     },
+    "nopt": {
+      "version": "4.0.3",
+      "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz",
+      "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==",
+      "requires": {
+        "abbrev": "1",
+        "osenv": "^0.1.4"
+      }
+    },
     "normalize-package-data": {
       "version": "2.5.0",
       "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
@@ -9403,6 +9606,29 @@
         "once": "^1.3.2"
       }
     },
+    "npm-bundled": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz",
+      "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==",
+      "requires": {
+        "npm-normalize-package-bin": "^1.0.1"
+      }
+    },
+    "npm-normalize-package-bin": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz",
+      "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA=="
+    },
+    "npm-packlist": {
+      "version": "1.4.8",
+      "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz",
+      "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==",
+      "requires": {
+        "ignore-walk": "^3.0.1",
+        "npm-bundled": "^1.0.1",
+        "npm-normalize-package-bin": "^1.0.1"
+      }
+    },
     "npm-run-path": {
       "version": "2.0.2",
       "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
@@ -9412,6 +9638,17 @@
         "path-key": "^2.0.0"
       }
     },
+    "npmlog": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
+      "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
+      "requires": {
+        "are-we-there-yet": "~1.1.2",
+        "console-control-strings": "~1.1.0",
+        "gauge": "~2.7.3",
+        "set-blocking": "~2.0.0"
+      }
+    },
     "num2fraction": {
       "version": "1.2.2",
       "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz",
@@ -12303,6 +12540,27 @@
         }
       }
     },
+    "tar": {
+      "version": "4.4.13",
+      "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz",
+      "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==",
+      "requires": {
+        "chownr": "^1.1.1",
+        "fs-minipass": "^1.2.5",
+        "minipass": "^2.8.6",
+        "minizlib": "^1.2.1",
+        "mkdirp": "^0.5.0",
+        "safe-buffer": "^5.1.2",
+        "yallist": "^3.0.3"
+      },
+      "dependencies": {
+        "yallist": {
+          "version": "3.1.1",
+          "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
+          "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
+        }
+      }
+    },
     "tar-stream": {
       "version": "1.6.2",
       "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz",
@@ -13622,6 +13880,14 @@
       "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz",
       "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8="
     },
+    "wide-align": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
+      "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
+      "requires": {
+        "string-width": "^1.0.2 || 2"
+      }
+    },
     "widest-line": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz",

File diff suppressed because it is too large
+ 1847 - 150
web/building_saas/css/all.css


+ 84 - 2
web/building_saas/css/style.css

@@ -1,4 +1,23 @@
-
+/***** Google fonts import ************/
+@import url("https://fonts.googleapis.com/css?family=Gothic+A1:300,400,500,600,700,900");
+/*------------------------------------------------------------------
+[Layout]
+* body
++ Global styles
++ Header / .header
++ hero / benner
++ Start Call Action
++ What people say
++ price
++ Our Team
++ newsletter
++ Form
++ Footer / #footer
++ Responsive
+/*
+============================================
+Global styles
+============================================
 */
 /*
 01 -  Global styles
@@ -55,8 +74,12 @@ padding-bottom: 70px;
 .pb-50 {
 padding-bottom: 50px;
 }
+.mb-0{
+  position: relative;
+}
 .mb-100{
 margin-bottom: 100px;
+position: relative;
 }
 .mb-50{
 margin-bottom: 50px;
@@ -167,12 +190,19 @@ background-color: #fff;
 
 .hero.section {
 padding-top: 200px;
-max-height: 800px; min-height: 800px;
+max-height: 880px; 
+min-height: 880px;
 margin-bottom: 100px;
 }
 .home-desk {
 margin-bottom: -200px;
 }
+.home-desk .container{
+width: 1275px
+}
+.hero-slogan{
+  margin-top: 300px
+}
 /*Box card*/
 .bos.bg-bos { padding: 30px 30px; }
 .bos h2{
@@ -224,6 +254,25 @@ color: #fff;
 .box.bg-box:hover h3,.box.bg-box:hover p{
 color: #fff;
 }
+.softview-img {
+  position: absolute;
+  z-index: 99
+}
+.softview-img img{
+  height: 270px;
+}
+.softview-img-1 {
+  left:540px;
+  top:200px;
+}
+.softview-img-2 {
+  right:0px;
+  top:200px;
+}
+.softview-img-3 {
+  left:-50px;
+  top:250px;
+}
 /*-- ==== Start Call Action  ==== */
 .call_action .icon {
 width: 120px;
@@ -567,3 +616,36 @@ font-size:30px;
     transform: rotate(360deg);
   }
 }
+.video-bg {
+  background: url(videobg.png) no-repeat center center;
+  height: 180px;
+  width:255px;
+}
+.video-bg a{
+  display: block;
+  height:120px;
+}
+.video-bg a h3{
+  color: #fff ;
+  padding-top:40px;
+  font-weight: 400
+}
+.video-bg a h3{
+  color:#ccc;
+}
+.video-bg a h3 i{
+  transition: All 0.4s ease-in-out;
+            -webkit-transition: All 0.4s ease-in-out;
+            -moz-transition: All 0.4s ease-in-out;
+            -o-transition: All 0.4s ease-in-out;
+}
+.video-bg a:hover h3 i{
+            transform: rotate(360deg);
+            -webkit-transform: rotate(360deg);
+            -moz-transform: rotate(360deg);
+            -o-transform: rotate(360deg);
+            -ms-transform: rotate(360deg);
+}
+.video-bg a:hover{
+  color:#fff;
+}

二進制
web/building_saas/css/videobg.png


二進制
web/building_saas/css/webfonts/fa-brands-400.eot


File diff suppressed because it is too large
+ 694 - 964
web/building_saas/css/webfonts/fa-brands-400.svg


二進制
web/building_saas/css/webfonts/fa-brands-400.ttf


二進制
web/building_saas/css/webfonts/fa-brands-400.woff


二進制
web/building_saas/css/webfonts/fa-brands-400.woff2


二進制
web/building_saas/css/webfonts/fa-light-300.eot


File diff suppressed because it is too large
+ 9896 - 0
web/building_saas/css/webfonts/fa-light-300.svg


二進制
web/building_saas/css/webfonts/fa-light-300.ttf


二進制
web/building_saas/css/webfonts/fa-light-300.woff


二進制
web/building_saas/css/webfonts/fa-light-300.woff2


二進制
web/building_saas/css/webfonts/fa-regular-400.eot


File diff suppressed because it is too large
+ 8319 - 24
web/building_saas/css/webfonts/fa-regular-400.svg


二進制
web/building_saas/css/webfonts/fa-regular-400.ttf


二進制
web/building_saas/css/webfonts/fa-regular-400.woff


二進制
web/building_saas/css/webfonts/fa-regular-400.woff2


二進制
web/building_saas/css/webfonts/fa-solid-900.eot


File diff suppressed because it is too large
+ 3596 - 594
web/building_saas/css/webfonts/fa-solid-900.svg


二進制
web/building_saas/css/webfonts/fa-solid-900.ttf


二進制
web/building_saas/css/webfonts/fa-solid-900.woff


二進制
web/building_saas/css/webfonts/fa-solid-900.woff2


二進制
web/building_saas/img/vip3.png


File diff suppressed because it is too large
+ 3150 - 2558
web/building_saas/main/js/models/calc_program.js


+ 8 - 7
web/building_saas/main/js/views/glj_view.js

@@ -393,7 +393,7 @@ var gljOprObj = {
         }
     },
     onCheckBoxClick: function (sender, args) {
-      if(typeof projectObj != 'undefined'){  
+      if(typeof projectObj != 'undefined'){
         let selected = projectObj.project.mainTree.selected;
         if(selected.sourceType == ModuleNames.ration_glj){//选中的是工料机时不可编辑
             return ;
@@ -792,6 +792,7 @@ var gljOprObj = {
                         }
                     }
                     if(ration) gljOprObj.getTotalQuantity(ration_gljs[i], ration);
+                    // if(ration) ration_gljs[i].tenderQuantity = gljUtil.getRationGLJTenderQuantity(ration_gljs[i], ration,getDecimal("glj.quantity"),scMathUtil,glj);
                 }else {
                     console.log("没有找到工料机:"+ration_gljs[i].name)
                 }
@@ -1012,7 +1013,7 @@ var gljOprObj = {
        return false;
     },
     getParentPrice:function(subList,value,radio,type = 'modify'){
-      let marketPrice = 0,basePrice=0; 
+      let marketPrice = 0,basePrice=0;
       let decimal = getDecimal('glj.unitPrice');
       for(let s of subList){
         let c = parseFloat(s.consumption);
@@ -1033,7 +1034,7 @@ var gljOprObj = {
           subList = rg.subList;
           break;
         }
-      }  
+      }
       let [marketPrice,basePrice] = this.getParentPrice(subList,0,ratio,"delete");
       try {
         $.bootstrapLoading.start()
@@ -1069,7 +1070,7 @@ var gljOprObj = {
           subList = rg.subList;
           break;
         }
-      }  
+      }
       let [marketPrice,basePrice] = this.getParentPrice(subList,doc.consumption,ratio);
 
       try {
@@ -1081,14 +1082,14 @@ var gljOprObj = {
         if(pgljData.mixRatioMap && pgljData.mixRatioMap[pk]){
           for(let m of pgljData.mixRatioMap[pk]){
             if(m.id == ratio.mixRatioId) gljUtil.setProperty(m,doc);
-          } 
+          }
         }
         for(let r of ratio.parentGLJ.ratio_data){
           if(r.id == ratio.mixRatioId) gljUtil.setProperty(r,doc);
         }
         ratio.parentGLJ.unit_price.market_price = marketPrice;
         ratio.parentGLJ.unit_price.base_price = basePrice;
-      
+
 
         //重新计算消耗量
         projectObj.project.projectGLJ.calcQuantity();
@@ -1101,7 +1102,7 @@ var gljOprObj = {
       }finally{
         $.bootstrapLoading.end()
       }
-      
+
     },
 
 

+ 3 - 5
web/building_saas/main/js/views/project_view.js

@@ -2013,7 +2013,8 @@ var projectObj = {
         }
         //选中的都是数字, 如果不为0则悬浮显示
         if (notNumber === false && total > 0 && counter > 1) {
-            const div = $('<div id="total-tips"><p>合计: <input type="text" id="total" readonly="readonly" style="border: none;"/></p><p><a href="javascript:void(0);">复制</a></p></div>');
+            const totalString = total.toFixed(max);
+            const div = $(`<div id="total-tips"><p>合计:<label id="total">${totalString}</label> </p><p><a href="javascript:void(0);">复制</a></p></div>`);
             div.css({
                 position: "absolute",
                 border: "1px #C0C0C0 solid",
@@ -2028,7 +2029,6 @@ var projectObj = {
             div.children("p").first().css({
                 borderBottom: "1px #C0C0C0 solid"
             });
-            const totalString = total.toFixed(max);
             // input长度
             const inputWidth = totalString.length * 8;
             // 计算是否会超出显示范围
@@ -2047,7 +2047,6 @@ var projectObj = {
                 top: y,
             });
 
-            div.children().children("#total").width(inputWidth).val(totalString);
             $("body").append(div);
             // 用于判断是否要关闭窗体
             setTimeout(function() {
@@ -2338,8 +2337,7 @@ var projectObj = {
 // 点击合计框中的复制
 $("body").on("click", "#total-tips a", function() {
     const totalElement = $(this).parent().siblings("p").find("#total");
-    totalElement.select();
-    document.execCommand("Copy");
+    sheetCommonObj.copyTextToClipboard(totalElement.text());
     $(this).text("已复制");
 });
 // 合计框点击其他位置关闭

+ 1 - 0
web/building_saas/main/js/views/quantity_edit_view.js

@@ -197,6 +197,7 @@ let quantityEditObj = {
                 let exp = new Expression('');
                 exp.Expression(evalString);
                 value = Number(exp.Evaluate());
+                if(isNaN(value)) throw new Error("输入的表达式有误");
             }
             return value;
         }catch (error){

+ 1 - 1
web/building_saas/main/js/views/select_FB_view.js

@@ -63,7 +63,7 @@ let selectFBObject = {
         /*1.当前定位在“分项”,则弹出“选择分部”窗口,并且默认定位在:根据分项编号的前9位查找清单规则中的父项。如果查找不到父项,则默认定位在第一行。 */
         let selected = projectObj.project.mainTree.selected;
         if(selected.data.type==billType.FX || selected.data.type==billType.BX){
-            let code = selected.data.code;
+            let code = selected.data.code?selected.data.code:'';
             if(code.length === 12){
                 let matchCode =  code.substring(0,9);
                 for(let i of billsGuidance.bills.tree.items){

+ 2 - 0
web/common/html/header.html

@@ -58,6 +58,8 @@
                     <img width="38" src="/web/building_saas/img/vip2.png" data-toggle="tooltip" data-placement="bottom" data-original-title="借用">
                     <% } else if (sessionUser.compilationLock === 2) { %>
                     <img width="38" src="/web/building_saas/img/vip.png" data-toggle="tooltip" data-placement="bottom" data-original-title="购买">
+                    <% } else if (sessionUser.compilationLock === 3) { %>
+                    <img width="38" src="/web/building_saas/img/vip3.png" data-toggle="tooltip" data-placement="bottom" data-original-title="赠送">
                     <% } %>
                 </a>
               </li>

+ 2 - 2
web/over_write/js/chongqing_2018_export.js

@@ -348,14 +348,14 @@ const XMLStandard = (function () {
                     '土建工程', '装饰工程', '安装工程', '市政工程', '园林绿化工程',
                     '仿古建筑工程', '房修工程', '轨道工程', '构筑物工程', '机械(爆破)土石方',
                     '围墙工程', '幕墙工程', '市政安装工程', '城市轨道交通安装', '人工土石方',
-                    '房屋安装修缮工程', '房屋修缮单拆除', '城市地下综合管廊', '城市管线迁改'
+                    '房屋安装修缮工程', '房屋修缮单拆除', '城市地下综合管廊', '城市管线迁改', '排水管网养护和维修'
                 ]},
                 {name: '金额', value: exportKind === _config.EXPORT_KIND.Tender
                     ? source.summaryInfo.engineeringCost
                     : '0', type: _config.TYPE.NUM2},
                 {name: '定额库编码', value: source.defaultRationLibCode, enumeration: [
                     'CQ18TJ', 'CQ18ZS', 'CQ18AZ', 'CQ18SZ', 'CQ18YL', 'CQ18FG', 'CQ18GD', 'CQ18FS',
-                    'CQ18LS', 'CQ18GZW', 'CQ18BP', 'CQ18ZP', 'CQ18GL', 'CQ18GX'
+                    'CQ18LS', 'CQ18GZW', 'CQ18BP', 'CQ18ZP', 'CQ18GL', 'CQ18GX', 'CQ21YHWX'
                 ]},
                 {name: '计税方法', value: TAX[source.taxType], required: true, enumeration: ['营业税', '一般计税', '简易计税']},
             ];

File diff suppressed because it is too large
+ 181 - 93
web/users/html/index.html


+ 2 - 1
web/users/html/login.html

@@ -57,7 +57,8 @@
                 <a href="javascript:void(0)" id="changeLogin" data-status="user" class="mr-3">短信登录</a>
                 <div>
                     <a href="https://sso.smartcost.com.cn/getpasswd" target="_blank" class="mr-3">忘记密码</a>
-                    <a href="https://sso.smartcost.com.cn/reg" target="_blank">免费注册</a>
+                    <!--<a href="https://sso.smartcost.com.cn/reg" target="_blank">免费注册</a>-->
+                    <a href="javascript:void(0)" id="changeReg" data-status="user" class="mr-3">免费注册</a>
                 </div>
             </div>
         </form>

+ 6 - 1
web/users/html/user-buy.html

@@ -81,9 +81,12 @@
                                             <div class="d-inline-block mr-3">
                                                 <img width="24" src="/web/building_saas/img/vip.png">购买
                                             </div>
-                                            <div class="d-inline-block">
+                                            <div class="d-inline-block mr-3">
                                                 <img width="24" src="/web/building_saas/img/vip2.png">借用
                                             </div>
+                                            <div class="d-inline-block">
+                                                <img width="24" src="/web/building_saas/img/vip3.png">赠送
+                                            </div>
                                         </div>
                                       <!--<p class="card-text">-->
                                       <!--&lt;!&ndash;<ul class="pl-3">-->
@@ -102,6 +105,8 @@
                                                 <img width="38" src="/web/building_saas/img/vip2.png" data-toggle="tooltip" data-placement="bottom" data-original-title="借用">
                                                 <% } else if (compilation.lock !== undefined && compilation.lock === 2) { %>
                                                 <img width="38" src="/web/building_saas/img/vip.png" data-toggle="tooltip" data-placement="bottom" data-original-title="购买">
+                                                <% } else if (compilation.lock !== undefined && compilation.lock === 3) { %>
+                                                <img width="38" src="/web/building_saas/img/vip3.png" data-toggle="tooltip" data-placement="bottom" data-original-title="赠送">
                                                 <% } %>
                                             </div>
                                             <div class="ml-auto text-right">

+ 84 - 0
web/users/html/user-check.html

@@ -0,0 +1,84 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
+    <meta http-equiv="x-ua-compatible" content="ie=edge">
+    <title>用户注册状态-大司空云计价</title>
+    <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
+    <link rel="stylesheet" href="/web/building_saas/css/main.css">
+    <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">
+    <link rel="shortcut icon" href="/web/building_saas/css/favicon.ico">
+<style>
+html{height:100%;}
+</style>
+</head>
+<body class="login-body">
+    <div class="container">
+        <% if (!check) { %>
+        <form class="form-signin mt-5" method="get" onsubmit="return checkMobile();">
+            <h1 class="d-flex justify-content-center mb-0"><img src="/web/building_saas/img/building.png" width="40" height="40" class="mr-3" style="margin-top:5px"> 大司空云计价</h1>
+            <p class="text-center mb-4 text-muted">市政、房建、轨道、管廊管线等专业工程计价软件</p>
+            <p class="h3 text-center mb-3">查询注册状态</p>
+            <div class="form-group">
+                <input id="inputEmail" name="mobile" class="form-control " placeholder="输入手机号" required="" autofocus="">
+                <small id="mobileHelp" style="display: none" class="form-text text-danger">您输入的 手机 格式不对</small>
+            </div>
+            <div class="form-group">
+                <button type="submit" class="btn btn-success btn-block">查询</button>
+            </div>
+        </form>
+        <% } else { %>
+        <form class="form-signin mt-5">
+            <h1 class="d-flex justify-content-center mb-0"><img src="/web/building_saas/img/building.png" width="40" height="40" class="mr-3" style="margin-top:5px"> 大司空云计价</h1>
+            <p class="text-center mb-4 text-muted">市政、房建、轨道、管廊管线等专业工程计价软件</p>
+            <% if (userinfo) { %>
+            <p class="h3 text-center mb-3"><%= mobile %> 已经注册</p>
+            <div class="card bg-success text-white">
+                <div class="card-body">
+                    <p class="h4 mb-0">账号:<%= userinfo.mobile %></p>
+                    <hr class="border-light">
+                    <p class="h4 mb-0">单位:<%= userinfo.company %></p>
+                    <hr class="border-light">
+                    <p class="h4 mb-0">姓名:<%= userinfo.real_name %></p>
+                    <hr class="border-light">
+                    <p class="h4 mb-0"> QQ:<%= userinfo.qq %></p>
+                </div>
+            </div>
+            <p class="text-center mt-2 text-success" style="font-size:10px"><i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw"></i><i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw"></i><i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw"></i></p>
+            <div class="form-group">
+                <a href="/wap/checkuser" class="btn btn-outline-primary btn-block">返回</a>
+            </div>
+            <% } else { %>
+            <div class="card bg-danger text-white">
+                <div class="card-body">
+                    <p class="h4 mb-0"><%= mobile %> 未注册</p>
+                </div>
+            </div>
+            <p class="text-center mt-2 text-danger" style="font-size:10px"><i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw"></i><i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw"></i><i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw"></i></p>
+            <div class="form-group">
+                <a href="/wap/reg" class="btn btn-outline-primary btn-block">立即注册</a>
+            </div>
+            <% } %>
+        </form>
+        <% } %>
+
+       <!--  <div class="text-white fixed-bottom"><p class="text-center mb-1">Copyright © 2019 <a href="https://smartcost.com.cn" target="_blank" class="text-white">珠海纵横创新软件有限公司</a>.All Rights Reserved.<a class="text-white ml-2" href="http://www.miitbeian.gov.cn" target="_blank">粤ICP备14032472号</a></p></div> -->
+    </div>
+
+    <!-- JS. -->
+    <script src="/lib/jquery/jquery-3.2.1.min.js"></script>
+    <script src="/lib/popper/popper.min.js"></script>
+    <script src="/lib/bootstrap/bootstrap.min.js"></script>
+    <script src="/web/building_saas/js/global.js"></script>
+    <script>
+        function checkMobile() {
+            if(!/^1[3456789]\d{9}$/.test($('input[name="mobile"]').val())) {
+                $('#mobileHelp').show();
+                return false;
+            }
+        }
+    </script>
+</body>
+
+</html>

+ 281 - 0
web/users/html/user-reg.html

@@ -0,0 +1,281 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
+    <meta http-equiv="x-ua-compatible" content="ie=edge">
+    <title>用户注册-大司空云计价</title>
+    <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
+    <link rel="stylesheet" href="/web/building_saas/css/main.css">
+    <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">
+    <link rel="shortcut icon" href="/web/building_saas/css/favicon.ico">
+<style>
+html{height:100%;}
+</style>
+</head>
+<body class="login-body">
+    <div class="container">
+        <form class="form-signin mt-5" method="post" onsubmit="return checkForm();">
+            <h1 class="d-flex justify-content-center mb-0"><img src="/web/building_saas/img/building.png" width="40" height="40" class="mr-3" style="margin-top:5px"> 大司空云计价</h1>
+            <p class="text-center mb-4 text-muted">市政、房建、轨道、管廊管线等专业工程计价软件</p>
+            <p class="h3 text-center mb-3" id="tips">用户注册</p>
+            <div class="form-group">
+                <input id="mobile" name="mobile" class="form-control" type="number" placeholder="输入手机号" required="">
+                <small id="mobiletips" style="display: none" class="form-text text-danger">手机号格式不对</small>
+                <!-- <small id="e" class="form-text text-danger alert alert-danger">手机号已注册</small> -->
+            </div>
+            <div class="form-group">
+                <button type="button" class="btn btn-outline-primary btn-block" id="get-code">获取验证码</button>
+            </div>
+            <div class="form-group">
+                <input id="code" name="code" class="form-control " placeholder="输入验证码" required="" type="number">
+            </div>
+            <div class="form-group" id="error-tips" <% if (err === '') { %>style="display: none;"<% } %>>
+                <div class="alert alert-danger" role="alert">
+                    <strong>失败</strong> <span id="message"><%= err %></span>
+                </div>
+            </div>
+            <div class="form-group">
+                <button type="button" id="check-user" class="btn btn-primary btn-block">确认</button>
+            </div>
+            <div id="msg" style="display: none">
+            <hr>
+            <input id="type" name="type" type="hidden">
+            <div class="form-group">
+                <input id="password" disabled name="password" class="form-control " placeholder="输入您的密码" required="" type="password">
+                <small id="pwd-tips" style="display: none" class="form-text text-danger">密码长度为6~16位,建议使用数字与英文混合</small>
+            </div>
+            <div class="form-group">
+                <select id="province" name="province" class="form-control ">
+                    <option value="-1">企业所在地区</option>
+                    <% provinceList.forEach(function(province, index) {%>
+                    <option value="<%= index %>"><%= province %></option>
+                    <% })%>
+                </select>
+                <small id="province-tips" style="display: none" class="form-text text-danger">请选择企业地区</small>
+            </div>
+            <div class="form-group">
+                <input id="company" disabled name="company" class="form-control " placeholder="输入单位信息" required="" type="text">
+                <small id="company-tips" style="display: none" class="form-text text-danger">请输入单位信息</small>
+            </div>
+            <div class="form-group">
+                <input id="realname" disabled name="real_name" class="form-control " placeholder="输入您的姓名" required="" type="text">
+                <small id="name-tips" style="display: none" class="form-text text-danger">姓名存在特殊字符或空格</small>
+            </div>
+            <div class="form-group">
+                <input id="qq" disabled name="qq" class="form-control " placeholder="输入您的QQ号" required="" type="text">
+                <small id="qq-tips" style="display: none" class="form-text text-danger">请输入正确的QQ号码</small>
+            </div>
+            <div class="form-group">
+                <button type="submit" class="btn btn-primary btn-block">注册</button>
+            </div>
+            </div>
+            <div class="form-group mt-5">
+                <a href="/wap/checkuser" class="btn btn-success btn-block">查询注册状态</a>
+            </div>
+        </form>
+
+       <!--  <div class="text-white fixed-bottom"><p class="text-center mb-1">Copyright © 2019 <a href="https://smartcost.com.cn" target="_blank" class="text-white">珠海纵横创新软件有限公司</a>.All Rights Reserved.<a class="text-white ml-2" href="http://www.miitbeian.gov.cn" target="_blank">粤ICP备14032472号</a></p></div> -->
+    </div>
+
+    <!-- JS. -->
+    <script src="/lib/jquery/jquery-3.2.1.min.js"></script>
+    <script src="/lib/popper/popper.min.js"></script>
+    <script src="/lib/bootstrap/bootstrap.min.js"></script>
+    <script src="/web/building_saas/js/global.js"></script>
+    <script type="text/javascript" src="/web/users/js/gt.js"></script>
+<script>
+    $(function () {
+        $("#get-code").click(function() {
+            $('#mobiletips').hide();
+            const mobile = $("#mobile").val();
+            if(!validMobile(mobile)){
+                return false;
+            }
+            const btn = $(this);
+            if(!btn.hasClass('disabled')){
+                $.ajax({
+                    url: '/sms/code',
+                    type: 'post',
+                    data: { mobile: mobile, type: 3},
+                    error: function() {
+                        $('#mobiletips').text('短信接口出错!').show();
+                    },
+                    beforeSend: function() {
+                    },
+                    success: function(response) {
+                        if (response.err === 0) {
+                            codeSuccess(btn);
+                        } else {
+                            $('#mobiletips').text(response.msg).show();
+                        }
+                    }
+                });
+            }
+        });
+
+        $('#check-user').click(function () {
+            const mobile = $("#mobile").val();
+            const code = $('#code').val();
+            $("#error-tips").hide();
+            $('#mobiletips').hide();
+            if(!validMobile(mobile)){
+                return false;
+            }
+            if(code === '') {
+                return false;
+            }
+            $.ajax({
+                type: 'post',
+                url: '/wap/checkuser',
+                async: false,
+                data: { mobile: mobile, code: code },
+                dataType: 'json',
+                success: function (result) {
+                    if (result.error === 0) {
+                        if (result.existUser === 1) {
+                            window.location.href = '/wap/checkuser?mobile=' + mobile;
+                        } else {
+                            // $('#mobiletips').text('当前手机号未注册').show();
+                            $('#mobile').attr('readOnly', true);
+                            // $('#tips').text('用户注册');
+                            $('#msg').show();
+                            $('#msg input').removeAttr('disabled');
+                            // $('#check-user').parents('div').addClass('mt-5');
+                            // $('#check-user').siblings('a').show();
+                            $('#check-user').remove();
+                            $('#code').parents('.form-group').remove();
+                            $('#get-code').parents('.form-group').remove();
+                            if (result.existUser === 2) {
+                                $('#password').parents('.form-group').remove();
+                                $('#type').val(2); // 代表sso已有账号
+                            } else {
+                                $('#type').val(1); // 代表同时注册sso
+                            }
+                        }
+                    } else {
+                        showError(result.msg, null);
+                    }
+                }
+            })
+        })
+    });
+
+    /**
+     * 获取成功后的操作
+     *
+     * @param {Object} btn - 点击的按钮
+     * @return {void}
+     */
+    function codeSuccess(btn) {
+        let counter = 60;
+        btn.removeClass('btn-primary').addClass('btn-outline-secondary disabled').text('重新获取('+ counter +')');
+        btn.parents().siblings('div').children('input').removeAttr('readonly');
+
+        const countDown = setInterval(function() {
+            const countString = counter - 1 <= 0 ? '' : counter - 1;
+            // 倒数结束后
+            if (countString === '') {
+                clearInterval(countDown);
+                btn.removeClass('btn-outline-secondary disabled').addClass('btn-primary').text('获取验证码');
+            }
+            const text = '重新获取' + (countString === '' ? '' : '('+ countString +')');
+            btn.text(text);
+            counter -= 1;
+        }, 1000);
+    }
+
+    /**
+     * 提示错误
+     *
+     * @param {string} msg
+     * @param {object} element
+     * @return {void}
+     */
+    function showError(msg, element) {
+        if (element !== null) {
+            element.parent().addClass('has-danger');
+        }
+        $("#message").html(msg);
+        $("#error-tips").show("fast");
+    }
+
+    /**
+     * 提示错误
+     *
+     * @param {string} msg
+     * @param {object} element
+     * @return {void}
+     */
+    function showError2(msg, element) {
+        if (element !== null) {
+            element.parent().addClass('has-danger');
+        }
+        $("#message2").html(msg);
+        $("#error-tips2").show("fast");
+    }
+
+    /**
+     * 验证手机号是否正确
+     *
+     * @return {boolean}
+     */
+    function validMobile(mobile, status = 1) {
+        let result = true;
+        if($.trim(mobile) === ''){
+            $('#mobiletips').text('手机号不能为空').show();
+            return false;
+        }
+        let mobileValid = /^1[3456789]\d{9}$/;
+        if(!mobileValid.test(mobile)){
+            $('#mobiletips').text('手机号码格式有误!').show();
+            return false;
+        }
+        return result;
+    }
+
+    function checkForm() {
+        let flag = true;
+        if (parseInt($('#type').val()) === 1) {
+            $('#pwd-tips').hide();
+            const pwd = $('#password').val();
+            if (pwd.length < 6 || pwd.length > 16) {
+                flag = false;
+                $('#pwd-tips').show();
+            }
+        }
+        $('#province-tips').hide();
+        $('#company-tips').hide();
+        $('#name-tips').hide();
+        $('#qq-tips').hide();
+        const province = parseInt($('#province').val());
+        if (province === -1) {
+            flag = false;
+            $('#province-tips').show();
+        }
+        const company = $('#company').val();
+        if (company === '') {
+            flag = false;
+            $('#company-tips').show();
+        }
+        const realname = $('#realname').val();
+        const pattern2 = /^[A-Za-z0-9\u4e00-\u9fa5]+$/gi;
+        if (!pattern2.test(realname) && realname != '') {
+            flag = false;
+            $('#name-tips').show();
+        }
+        const qq = $('#qq').val();
+        const pattern = /^[1-9][0-9]{4,14}$/;
+        if(!pattern.test(qq) && qq !== ''){
+            flag = false;
+            $('#qq-tips').show();
+        }
+        if (flag) {
+            $('button[type="submit"]').text('注册中,请勿退出...').attr('disabled', true);
+        }
+        return flag;
+    }
+</script>
+</body>
+
+</html>

二進制
web/users/images/favicon.ico


二進制
web/users/images/home-desk.png


二進制
web/users/images/softview/1.png


二進制
web/users/images/softview/2.png


二進制
web/users/images/softview/3.png


File diff suppressed because it is too large
+ 114 - 1
web/users/images/undraw_work.svg


File diff suppressed because it is too large
+ 1 - 0
web/users/images/undraw_work1.svg


+ 66 - 6
web/users/js/index.js

@@ -1,4 +1,4 @@
-/* 
+/*
 lexar
 Author - bootstrapdevelop
 Project Version - v1.0
@@ -6,17 +6,76 @@ Project Version - v1.0
 (function ($) {
     "use strict";
     /**sticky*/
-  $("#header").sticky({topSpacing:0}); 
+  $("#header").sticky({topSpacing:0});
     //auto close navbar-collapse on click a
     $('.nav-item>[data-scroll]').on('click', function () {
         $('.navbar-toggler:visible').click();
     });
 
+    // owl-carousel
+
+    // $(".what_say_sldier").owlCarousel({
+    //     loop:true,
+    //     margin:30,
+    //     nav:false,
+    //     dots:true,
+    //     responsive:{
+    //         0:{
+    //             items:1
+    //         },
+    //         600:{
+    //             items:2
+    //         },
+    //         1000:{
+    //             items:3
+    //         }
+    //     }
+    // });
+    //
+    // $(".pricing_slider").owlCarousel({
+    //     loop:true,
+    //     margin:0,
+    //     nav:false,
+    //     dots:true,
+    //     responsive:{
+    //         0:{
+    //             items:1
+    //         },
+    //         600:{
+    //             items:2
+    //         },
+    //         1000:{
+    //             items:3
+    //         }
+    //     }
+    // });
+
+    // $(".team_slider").owlCarousel({
+    //     loop:true,
+    //     margin:10,
+    //     nav:false,
+    //     dots:true,
+    //     responsive:{
+    //         0:{
+    //             items:1
+    //         },
+    //         600:{
+    //             items:2
+    //         },
+    //         1000:{
+    //             items:3
+    //         },
+    //         1200:{
+    //             items:4
+    //         }
+    //     }
+    // });
+
 
 
 
 // Select all links with hashes
-/* 
+/*
 lexar - Software HTML5 Landing Page
 Author - nilssatasiya
 Project Version - v1.0
@@ -37,6 +96,7 @@ $('a[href*="#"]')
     // Remove links that don't actually link to anything
     .not('[href="#"]')
     .not('[href="#0"]')
+    .not('[href="#video-modal"]')
     .click(function(event) {
         // On-page links
         if (
@@ -51,10 +111,10 @@ $('a[href*="#"]')
                 // Only prevent default if animation is actually gonna happen
                 event.preventDefault();
                 $('html, body').animate({
-                    scrollTop: target.offset().top 
+                    scrollTop: target.offset().top
                 }, 1000, function() {
                     // Callback after animation
-                   
+
                 });
             }
         }
@@ -70,4 +130,4 @@ $(document).ready(function(){
 
 $(".loader_pre").fadeTo(1,1).fadeOut(1);
 
-})(jQuery);
+})(jQuery);

+ 29 - 16
web/users/js/login.js

@@ -197,6 +197,7 @@ $(document).ready(function () {
             $('.user-login-modal').hide();
             $('.sms-login-modal input').attr('disabled', false);
             $('.user-login-modal input').attr('disabled', true);
+            $('#login').text('登录');
         } else {
             $(this).attr('data-status', 'user');
             $('.change-login-p').text('账号登录');
@@ -205,9 +206,21 @@ $(document).ready(function () {
             $('.user-login-modal').show();
             $('.sms-login-modal input').attr('disabled', true);
             $('.user-login-modal input').attr('disabled', false);
+            $('#login').text('登录');
         }
     });
 
+    $('#changeReg').click(function () {
+        $('#changeLogin').attr('data-status', 'sms');
+        $('.change-login-p').text('短信注册');
+        $('#changeLogin').text('账号登录');
+        $('.sms-login-modal').show();
+        $('.user-login-modal').hide();
+        $('.sms-login-modal input').attr('disabled', false);
+        $('.user-login-modal input').attr('disabled', true);
+        $('#login').text('注册');
+    });
+
     // 切换到短信登录
     $('#changeSmsLogin').click(function () {
         $('#changeLogin').attr('data-status', 'sms');
@@ -228,17 +241,17 @@ $(document).ready(function () {
         const btn = $(this);
         if(!btn.hasClass('disabled')){
             // 判断该手机号是否已注册通行账号
-            $.ajax({
-                url: '/sms/check/mobile',
-                type: 'post',
-                data: {mobile: mobile},
-                error: function() {
-                    $('#phoneHelp').text('号码查询接口出错!');
-                },
-                beforeSend: function() {
-                },
-                success: function(response) {
-                    if (response.err === 0) {
+            // $.ajax({
+            //     url: '/sms/check/mobile',
+            //     type: 'post',
+            //     data: {mobile: mobile},
+            //     error: function() {
+            //         $('#phoneHelp').text('号码查询接口出错!');
+            //     },
+            //     beforeSend: function() {
+            //     },
+            //     success: function(response) {
+            //         if (response.err === 0) {
                         $.ajax({
                             url: '/sms/code',
                             type: 'post',
@@ -256,11 +269,11 @@ $(document).ready(function () {
                                 }
                             }
                         });
-                    } else {
-                        $('#phoneHelp').text(response.msg);
-                    }
-                }
-            })
+            //         } else {
+            //             $('#phoneHelp').text(response.msg);
+            //         }
+            //     }
+            // })
         }
     });
 });