Shan9312 3 сар өмнө
commit
b6c729950f
100 өөрчлөгдсөн 917 нэмэгдсэн , 0 устгасан
  1. 13 0
      app.js
  2. 135 0
      app.json
  3. 51 0
      app.wxss
  4. BIN
      images/baifang.png
  5. BIN
      images/dianhua.png
  6. BIN
      images/index/arrow.png
  7. BIN
      images/index/cow.png
  8. BIN
      images/index/kg.png
  9. BIN
      images/index/more.png
  10. BIN
      images/lg-img.png
  11. BIN
      images/login/ic-my.png
  12. BIN
      images/login/ic-pass.png
  13. BIN
      images/login/lg-img.png
  14. BIN
      images/login/lg-img1.png
  15. BIN
      images/login/lg-img2.jpg
  16. BIN
      images/login/lg-logo.jpg
  17. BIN
      images/my/img-logo.png
  18. BIN
      images/my/in-ic1.png
  19. BIN
      images/my/in-ic2.png
  20. BIN
      images/my/in-ic3.png
  21. BIN
      images/my/in-ic4.png
  22. BIN
      images/noData.png
  23. BIN
      images/proplan/cale-img.png
  24. BIN
      images/proplan/pp-img.png
  25. BIN
      images/proplan/pp-img2.png
  26. BIN
      images/proplan/pp-img3.png
  27. BIN
      images/proplan/pp-img4.png
  28. BIN
      images/tab/analysis.png
  29. BIN
      images/tab/analysis_h.png
  30. BIN
      images/tab/customerInformation.png
  31. BIN
      images/tab/customerInformation_h.png
  32. BIN
      images/tab/home.png
  33. BIN
      images/tab/home_h.png
  34. BIN
      images/tab/my.png
  35. BIN
      images/tab/my_h.png
  36. BIN
      images/tab/proplan.png
  37. BIN
      images/tab/proplan_h.png
  38. BIN
      images/tab/workbench.png
  39. BIN
      images/tab/workbench_h.png
  40. BIN
      images/tab/我的-灰色.png
  41. BIN
      images/tab/我的-选中.png
  42. BIN
      images/tab/首页-灰色.png
  43. BIN
      images/tab/首页-选中.png
  44. BIN
      images/tousu.png
  45. BIN
      images/workbench/cale-img.png
  46. BIN
      images/workbench/pp-img.png
  47. BIN
      images/workbench/pp-img1.png
  48. BIN
      images/workbench/pp-img2.png
  49. BIN
      images/workbench/pp-img3.png
  50. BIN
      images/workbench/pp-img4.png
  51. BIN
      images/xianchang.png
  52. BIN
      images/yuan.png
  53. 452 0
      libs/bmap-wx.js
  54. 1 0
      miniprogram_npm/lin-ui/action-sheet/index.js
  55. 1 0
      miniprogram_npm/lin-ui/action-sheet/index.json
  56. 21 0
      miniprogram_npm/lin-ui/action-sheet/index.wxml
  57. 1 0
      miniprogram_npm/lin-ui/action-sheet/index.wxss
  58. 1 0
      miniprogram_npm/lin-ui/album/index.js
  59. 1 0
      miniprogram_npm/lin-ui/album/index.json
  60. 12 0
      miniprogram_npm/lin-ui/album/index.wxml
  61. 79 0
      miniprogram_npm/lin-ui/album/index.wxs
  62. 1 0
      miniprogram_npm/lin-ui/album/index.wxss
  63. 1 0
      miniprogram_npm/lin-ui/arc-popup/index.js
  64. 1 0
      miniprogram_npm/lin-ui/arc-popup/index.json
  65. 10 0
      miniprogram_npm/lin-ui/arc-popup/index.wxml
  66. 1 0
      miniprogram_npm/lin-ui/arc-popup/index.wxss
  67. 1 0
      miniprogram_npm/lin-ui/avatar/index.js
  68. 1 0
      miniprogram_npm/lin-ui/avatar/index.json
  69. 12 0
      miniprogram_npm/lin-ui/avatar/index.wxml
  70. 1 0
      miniprogram_npm/lin-ui/avatar/index.wxss
  71. 1 0
      miniprogram_npm/lin-ui/badge/index.js
  72. 1 0
      miniprogram_npm/lin-ui/badge/index.json
  73. 7 0
      miniprogram_npm/lin-ui/badge/index.wxml
  74. 1 0
      miniprogram_npm/lin-ui/badge/index.wxss
  75. 1 0
      miniprogram_npm/lin-ui/behaviors/computeOffset.js
  76. 0 0
      miniprogram_npm/lin-ui/behaviors/countdown.js
  77. 1 0
      miniprogram_npm/lin-ui/behaviors/hover.js
  78. 1 0
      miniprogram_npm/lin-ui/behaviors/rules.js
  79. 1 0
      miniprogram_npm/lin-ui/behaviors/scrollCenter.js
  80. 0 0
      miniprogram_npm/lin-ui/behaviors/transition.js
  81. 1 0
      miniprogram_npm/lin-ui/behaviors/validator.js
  82. 1 0
      miniprogram_npm/lin-ui/behaviors/watchShow.js
  83. 1 0
      miniprogram_npm/lin-ui/behaviors/zIndex.js
  84. 1 0
      miniprogram_npm/lin-ui/button/index.js
  85. 1 0
      miniprogram_npm/lin-ui/button/index.json
  86. 16 0
      miniprogram_npm/lin-ui/button/index.wxml
  87. 0 0
      miniprogram_npm/lin-ui/button/index.wxss
  88. 14 0
      miniprogram_npm/lin-ui/calendar/calendar.wxml
  89. 1 0
      miniprogram_npm/lin-ui/calendar/components/day/index.js
  90. 1 0
      miniprogram_npm/lin-ui/calendar/components/day/index.json
  91. 6 0
      miniprogram_npm/lin-ui/calendar/components/day/index.wxml
  92. 27 0
      miniprogram_npm/lin-ui/calendar/components/day/index.wxs
  93. 1 0
      miniprogram_npm/lin-ui/calendar/components/day/index.wxss
  94. 1 0
      miniprogram_npm/lin-ui/calendar/components/header/index.js
  95. 1 0
      miniprogram_npm/lin-ui/calendar/components/header/index.json
  96. 18 0
      miniprogram_npm/lin-ui/calendar/components/header/index.wxml
  97. 1 0
      miniprogram_npm/lin-ui/calendar/components/header/index.wxss
  98. 1 0
      miniprogram_npm/lin-ui/calendar/components/mounth/index.js
  99. 1 0
      miniprogram_npm/lin-ui/calendar/components/mounth/index.json
  100. 12 0
      miniprogram_npm/lin-ui/calendar/components/mounth/index.wxml

+ 13 - 0
app.js

@@ -0,0 +1,13 @@
+App({
+  globalData: {
+    g_url: '',
+    g_token: '',
+    g_lgName: '',
+    g_createrId: '',
+    g_countName: '',
+    g_depName: '',
+    g_lgNameId: '',
+    g_userId: '',
+    g_roleId: ''
+  },
+})

+ 135 - 0
app.json

@@ -0,0 +1,135 @@
+{
+  "pages": [
+    
+    
+    
+
+    "pages/login/login",
+
+     
+    "pages/workbench/workbench",
+    "pages/workbench/visitRecord/visitRecord",
+
+    "pages/workbench/siteService/siteService",
+    "pages/workbench/siteServiceAdd/siteServiceAdd",
+    "pages/workbench/siteServiceEdit/siteServiceEdit",
+    "pages/workbench/siteServiceSee/siteServiceSee",
+    "pages/workbench/siteServiceCompleteService/siteServiceCompleteService",
+    "pages/workbench/siteServiceFeedback/siteServiceFeedback",
+    "pages/workbench/siteServiceRevoke/siteServiceRevoke",
+    
+
+    "pages/workbench/telephoneFollow/telephoneFollow",
+    "pages/workbench/telephoneFollowAdd/telephoneFollowAdd",
+    "pages/workbench/telephoneFollowEdit/telephoneFollowEdit",
+    "pages/workbench/telephoneFollowSee/telephoneFollowSee",
+
+    "pages/workbench/remoteService/remoteService",
+    "pages/workbench/remoteServiceAdd/remoteServiceAdd",
+    "pages/workbench/remoteServiceEdit/remoteServiceEdit",
+    "pages/workbench/remoteServiceSee/remoteServiceSee",
+    
+    
+    "pages/workbench/visitRecordAdd/visitRecordAdd",
+    "pages/workbench/visitRecordEdit/visitRecordEdit",
+    "pages/workbench/visitRecordSee/visitRecordSee",
+
+    "pages/workbench/complaintRecord/complaintRecord",
+    "pages/workbench/complaintRecordAdd/complaintRecordAdd",
+    "pages/workbench/complaintRecordEdit/complaintRecordEdit",
+    "pages/workbench/complaintRecordSee/complaintRecordSee",
+    "pages/workbench/complaintRecordDeal/complaintRecordDeal",
+    
+    
+    "pages/index/index",
+
+  
+    "pages/customerInformation/customerInformation",
+    "pages/customerInformationAdd/customerInformationAdd",
+    "pages/customerInformationEdit/customerInformationEdit",
+    "pages/customerInformationSee/customerInformationSee",
+
+    "pages/contact/contact",
+    "pages/contactAdd/contactAdd",
+    "pages/contactEdit/contactEdit",
+    "pages/contactSee/contactSee",
+
+    "pages/servicepg/servicepg",
+    "pages/my/my"
+   
+
+     
+  ],
+  "requiredPrivateInfos":[
+      "getLocation"
+  ],
+  "permission": {
+    "scope.userLocation": {
+      "desc": "你的位置信息将用于小程序位置接口的效果展示" 
+    }
+  },
+  "window": {
+    "backgroundTextStyle": "light",
+    "navigationBarBackgroundColor": "#73a2ff",
+    "navigationBarTitleText": "CRM系统",
+    "navigationBarTextStyle": "white"
+  },
+  "tabBar": {
+    "borderStyle": "white",
+    "position": "bottom",
+    "color": "#666666",
+    "selectedColor": "#2580a5",
+    "list": [
+      {
+        "pagePath": "pages/index/index",
+        "text": "首页",
+        "iconPath": "images/tab/home.png",
+        "selectedIconPath": "images/tab/home_h.png"
+      },
+      {
+        "pagePath": "pages/workbench/workbench",
+        "text": "工作台",
+        "iconPath": "images/tab/workbench.png",
+        "selectedIconPath": "images/tab/workbench_h.png"
+      },
+      {
+        "pagePath": "pages/customerInformation/customerInformation",
+        "text": "客户",
+        "iconPath": "images/tab/customerInformation.png",
+        "selectedIconPath": "images/tab/customerInformation_h.png"
+      },
+      {
+        "pagePath": "pages/my/my",
+        "text": "我的",
+        "iconPath": "images/tab/my.png",
+        "selectedIconPath": "images/tab/my_h.png"
+      }
+    ]
+  },
+  "usingComponents": {
+    "l-button": "/miniprogram_npm/lin-ui/button/index",
+    "l-list": "/miniprogram_npm/lin-ui/list/index",
+    "l-form": "/miniprogram_npm/lin-ui/form/index",
+    "l-form-item": "/miniprogram_npm/lin-ui/form-item/index",
+    "l-checkbox-group": "/miniprogram_npm/lin-ui/checkbox-group/index",
+    "l-checkbox": "/miniprogram_npm/lin-ui/checkbox/index",
+    "l-radio-group": "/miniprogram_npm/lin-ui/radio-group/index",
+    "l-radio": "/miniprogram_npm/lin-ui/radio/index",
+    "l-textarea": "/miniprogram_npm/lin-ui/textarea/index",
+    "l-tag": "/miniprogram_npm/lin-ui/tag/index",
+    "l-toast": "/miniprogram_npm/lin-ui/toast/index",
+    "l-counter": "/miniprogram_npm/lin-ui/counter/index",
+    "l-image-picker": "/miniprogram_npm/lin-ui/image-picker/index",
+    "l-tabs": "/miniprogram_npm/lin-ui/tabs/index",
+    "l-tabpanel": "/miniprogram_npm/lin-ui/tabpanel/index",
+    "l-search-bar": "/miniprogram_npm/lin-ui/search-bar/index",
+    "l-input": "/miniprogram_npm/lin-ui/input/index",
+    "l-dialog": "/miniprogram_npm/lin-ui/dialog/index",
+    "l-icon": "/miniprogram_npm/lin-ui/icon/index"
+  },
+
+  "sitemapLocation": "sitemap.json",
+  
+  "onReachBottomDistance": 50
+   
+}

+ 51 - 0
app.wxss

@@ -0,0 +1,51 @@
+page{
+  background-color:#f5f5f5;
+  height:100%;
+}
+.customer_bx{background:#fff;width:480rpx;height:980rpx;position:absolute;top:90rpx;z-index:99999; margin-left:230rpx;border:1px solid #eee; } 
+.customer_txt{font-size: 28rpx;height:auto;width:88%;padding:20rpx 0rpx;margin-left:20rpx;border-bottom:1px solid #eee;}
+
+.receiver_bx{background:#fff;width:480rpx;height:650rpx;position:absolute;top:90rpx;z-index:999;margin-left:250rpx;border:1px solid #eee; } 
+.receiver_txt{font-size: 28rpx;height:auto;width:100%;padding:20rpx 0rpx;margin-left:20rpx;border-bottom:1px solid #eee;}
+
+
+
+.search-bx{padding:0rpx 30rpx;} 
+.search-icon{position:absolute;top:20rpx;left:20rpx}
+
+.error-icon{position:absolute;top:20rpx;right:20rpx;z-index:99;}
+
+.search-input{background-color:#fff;border-radius:40rpx;height:70rpx;font-size:28rpx;margin:20rpx 0rpx;padding-left:70rpx;}
+.search-date{display:inline-block;vertical-align:text-top;background-color:#fff;font-size:28rpx;padding:6rpx 10rpx;border-radius:20rpx;}
+.fenge{display:inline-block;margin:0 10rpx;}
+
+.search-picker{display:inline-block;vertical-align:text-top;background-color:#fff;font-size:28rpx;border-radius:20rpx;width:140rpx;height:48rpx;margin-left:20rpx;}
+.search-picker-input{text-align: center;line-height: 200;}
+
+.disabled_txt{padding-right:30rpx;color:#ff7e7e}
+.import_txt{color:#333!important;}
+
+
+.btn-search{display:inline-block;height: 60rpx;min-width: 140rpx;font-size: 24rpx; border:none;    padding: 0 12rpx;font-size:28rpx;text-align:center;background:#ffbd4a;color:#333;border-radius:10rpx;}
+
+
+text{
+    font-family: MicroSoft Yahei;
+    font-size: 28rpx;
+    color: #777;
+}
+
+input{
+    font-family: MicroSoft YaHei;
+}
+
+.btn-add{position: fixed;bottom:20rpx;right:38%;}
+
+.hd_tt{font-size:32rpx;color:#333;font-weight:bold;display:inline-block;width:500rpx}
+
+/* .service_bx{position: fixed;bottom:20rpx;right:11%;} */
+.service_bx{margin-left:50rpx;}
+
+.mr20{margin-right:20rpx;}
+
+ 

BIN
images/baifang.png


BIN
images/dianhua.png


BIN
images/index/arrow.png


BIN
images/index/cow.png


BIN
images/index/kg.png


BIN
images/index/more.png


BIN
images/lg-img.png


BIN
images/login/ic-my.png


BIN
images/login/ic-pass.png


BIN
images/login/lg-img.png


BIN
images/login/lg-img1.png


BIN
images/login/lg-img2.jpg


BIN
images/login/lg-logo.jpg


BIN
images/my/img-logo.png


BIN
images/my/in-ic1.png


BIN
images/my/in-ic2.png


BIN
images/my/in-ic3.png


BIN
images/my/in-ic4.png


BIN
images/noData.png


BIN
images/proplan/cale-img.png


BIN
images/proplan/pp-img.png


BIN
images/proplan/pp-img2.png


BIN
images/proplan/pp-img3.png


BIN
images/proplan/pp-img4.png


BIN
images/tab/analysis.png


BIN
images/tab/analysis_h.png


BIN
images/tab/customerInformation.png


BIN
images/tab/customerInformation_h.png


BIN
images/tab/home.png


BIN
images/tab/home_h.png


BIN
images/tab/my.png


BIN
images/tab/my_h.png


BIN
images/tab/proplan.png


BIN
images/tab/proplan_h.png


BIN
images/tab/workbench.png


BIN
images/tab/workbench_h.png


BIN
images/tab/我的-灰色.png


BIN
images/tab/我的-选中.png


BIN
images/tab/首页-灰色.png


BIN
images/tab/首页-选中.png


BIN
images/tousu.png


BIN
images/workbench/cale-img.png


BIN
images/workbench/pp-img.png


BIN
images/workbench/pp-img1.png


BIN
images/workbench/pp-img2.png


BIN
images/workbench/pp-img3.png


BIN
images/workbench/pp-img4.png


BIN
images/xianchang.png


BIN
images/yuan.png


+ 452 - 0
libs/bmap-wx.js

@@ -0,0 +1,452 @@
+/**
+ * @file 微信小程序JSAPI
+ * @author 崔健 cuijian03@baidu.com 2017.01.10
+ * @update 邓淑芳 623996689@qq.com 2019.07.03
+ */
+
+/**
+ * 百度地图微信小程序API类
+ *
+ * @class
+ */
+class BMapWX {
+
+    /**
+     * 百度地图微信小程序API类
+     *
+     * @constructor
+     */
+    constructor(param) {
+      this.ak = param["ak"];
+    }
+  
+    /**
+     * 使用微信接口进行定位
+     *
+     * @param {string} type 坐标类型
+     * @param {Function} success 成功执行
+     * @param {Function} fail 失败执行
+     * @param {Function} complete 完成后执行
+     */
+    getWXLocation(type, success, fail, complete) {
+      type = type || 'gcj02',
+      success = success || function () { };
+      fail = fail || function () { };
+      complete = complete || function () { };
+      wx.getLocation({
+        type: type,
+        success: success,
+        fail: fail,
+        complete: complete
+      });
+    }
+  
+    /**
+     * POI周边检索
+     *
+     * @param {Object} param 检索配置
+     * 参数对象结构可以参考
+     * http://lbsyun.baidu.com/index.php?title=webapi/guide/webservice-placeapi
+     */
+    search(param) {
+      var that = this;
+      param = param || {};
+      let searchparam = {
+        query: param["query"] || '生活服务$美食&酒店',
+        scope: param["scope"] || 1,
+        filter: param["filter"] || '',
+        coord_type: param["coord_type"] || 2,
+        page_size: param["page_size"] || 10,
+        page_num: param["page_num"] || 0,
+        output: param["output"] || 'json',
+        ak: that.ak,
+        sn: param["sn"] || '',
+        timestamp: param["timestamp"] || '',
+        radius: param["radius"] || 2000,
+        ret_coordtype: 'gcj02ll'
+      };
+      let otherparam = {
+        iconPath: param["iconPath"],
+        iconTapPath: param["iconTapPath"],
+        width: param["width"],
+        height: param["height"],
+        alpha: param["alpha"] || 1,
+        success: param["success"] || function () { },
+        fail: param["fail"] || function () { }
+      };
+      let type = 'gcj02';
+      let locationsuccess = function (result) {
+        searchparam["location"] = result["latitude"] + ',' + result["longitude"];
+        wx.request({
+          url: 'https://api.map.baidu.com/place/v2/search',
+          data: searchparam,
+          header: {
+            "content-type": "application/json"
+          },
+          method: 'GET',
+          success(data) {
+            let res = data["data"];
+            if (res["status"] === 0) {
+              let poiArr = res["results"];
+              // outputRes 包含两个对象,
+              // originalData为百度接口返回的原始数据
+              // wxMarkerData为小程序规范的marker格式
+              let outputRes = {};
+              outputRes["originalData"] = res;
+              outputRes["wxMarkerData"] = [];
+              for (let i = 0; i < poiArr.length; i++) {
+                outputRes["wxMarkerData"][i] = {
+                  id: i,
+                  latitude: poiArr[i]["location"]["lat"],
+                  longitude: poiArr[i]["location"]["lng"],
+                  title: poiArr[i]["name"],
+                  iconPath: otherparam["iconPath"],
+                  iconTapPath: otherparam["iconTapPath"],
+                  address: poiArr[i]["address"],
+                  telephone: poiArr[i]["telephone"],
+                  alpha: otherparam["alpha"],
+                  width: otherparam["width"],
+                  height: otherparam["height"]
+                }
+              }
+              otherparam.success(outputRes);
+            } else {
+              otherparam.fail({
+                errMsg: res["message"],
+                statusCode: res["status"]
+              });
+            }
+          },
+          fail(data) {
+            otherparam.fail(data);
+          }
+        });
+      }
+      let locationfail = function (result) {
+        otherparam.fail(result);
+      };
+      let locationcomplete = function (result) {
+      };
+      if (!param["location"]) {
+        that.getWXLocation(type, locationsuccess, locationfail, locationcomplete);
+      } else {
+        let longitude = param.location.split(',')[1];
+        let latitude = param.location.split(',')[0];
+        let errMsg = 'input location';
+        let res = {
+          errMsg: errMsg,
+          latitude: latitude,
+          longitude: longitude
+        };
+        locationsuccess(res);
+      }
+    }
+  
+    /**
+     * sug模糊检索
+     *
+     * @param {Object} param 检索配置
+     * 参数对象结构可以参考
+     * http://lbsyun.baidu.com/index.php?title=webapi/place-suggestion-api
+     */
+    suggestion(param) {
+      var that = this;
+      param = param || {};
+      let suggestionparam = {
+        query: param["query"] || '',
+        region: param["region"] || '全国',
+        city_limit: param["city_limit"] || false,
+        output: param["output"] || 'json',
+        ak: that.ak,
+        sn: param["sn"] || '',
+        timestamp: param["timestamp"] || '',
+        ret_coordtype: 'gcj02ll'
+      };
+      let otherparam = {
+        success: param["success"] || function () { },
+        fail: param["fail"] || function () { }
+      };
+      wx.request({
+        url: 'https://api.map.baidu.com/place/v2/suggestion',
+        data: suggestionparam,
+        header: {
+          "content-type": "application/json"
+        },
+        method: 'GET',
+        success(data) {
+          let res = data["data"];
+          if (res["status"] === 0) {
+            otherparam.success(res);
+          } else {
+            otherparam.fail({
+              errMsg: res["message"],
+              statusCode: res["status"]
+            });
+          }
+        },
+        fail(data) {
+          otherparam.fail(data);
+        }
+      });
+    }
+  
+    /**
+     * rgc检索(逆地理编码:经纬度->地点描述)
+     * 
+     * @param {Object} param 检索配置
+     * 参数对象结构可以参考
+     * https://lbs.baidu.com/index.php?title=webapi/guide/webservice-geocoding-abroad
+     * 
+     */
+    regeocoding (param) {
+      var that = this;
+      param = param || {};
+      let regeocodingparam = {
+        coordtype: param["coordtype"] || 'gcj02ll',         
+        ret_coordtype: 'gcj02ll',                          
+        radius: param["radius"] || 1000,                    
+        ak: that.ak,                                        
+        sn: param["sn"] || '',                              
+        output: param["output"] || 'json',                 
+        callback: param["callback"] || function () { },     
+        extensions_poi: param["extensions_poi"] || 1,      
+        extensions_road: param["extensions_road"] || false, 
+        extensions_town: param["extensions_town"] || false, 
+        language: param["language"] || 'zh-CN',             
+        language_auto: param["language_auto"] || 0        
+      };
+      let otherparam = {
+        iconPath: param["iconPath"],
+        iconTapPath: param["iconTapPath"],
+        width: param["width"],
+        height: param["height"],
+        alpha: param["alpha"] || 1, 
+        success: param["success"] || function () { },
+        fail: param["fail"] || function () { }
+      };
+      let type = 'gcj02';
+      let locationsuccess = function (result) {
+        regeocodingparam["location"] = result["latitude"] + ',' + result["longitude"];
+        wx.request({
+          url: 'https://api.map.baidu.com/reverse_geocoding/v3',
+          data: regeocodingparam,
+          header: {
+            "content-type": "application/json"
+          },
+          method: 'GET',
+          success(data) {
+            let res = data["data"];
+            if (res["status"] === 0) {
+              let poiObj = res["result"];
+              // outputRes 包含两个对象:
+              // originalData为百度接口返回的原始数据
+              // wxMarkerData为小程序规范的marker格式
+              let outputRes = {};
+              outputRes["originalData"] = res;
+              outputRes["wxMarkerData"] = [];
+              outputRes["wxMarkerData"][0] = {
+                id: 0,
+                latitude: result["latitude"],
+                longitude: result["longitude"],
+                address: poiObj["formatted_address"],
+                iconPath: otherparam["iconPath"],
+                iconTapPath: otherparam["iconTapPath"],
+                desc: poiObj["sematic_description"],
+                business: poiObj["business"],
+                alpha: otherparam["alpha"],
+                width: otherparam["width"],
+                height: otherparam["height"]
+              }
+              otherparam.success(outputRes);
+            } else {
+              otherparam.fail({
+                errMsg: res["message"],
+                statusCode: res["status"]
+              });
+            }
+          },
+          fail(data) {
+            otherparam.fail(data);
+          }
+        });
+      };
+      let locationfail = function (result) {
+        otherparam.fail(result);
+      }
+      let locationcomplete = function (result) {
+      };
+      if (!param["location"]) {
+        that.getWXLocation(type, locationsuccess, locationfail, locationcomplete);
+      } else {
+        let longitude = param.location.split(',')[1];
+        let latitude = param.location.split(',')[0];
+        let errMsg = 'input location';
+        let res = {
+          errMsg: errMsg,
+          latitude: latitude,
+          longitude: longitude
+        };
+        locationsuccess(res);
+      }
+    }
+  
+    /**
+     * gc检索(地理编码:地点->经纬度)
+     *
+     * @param {Object} param 检索配置
+     * 参数对象结构可以参考
+     * https://lbs.baidu.com/index.php?title=webapi/guide/webservice-geocoding
+     * 
+     */
+    geocoding(param) {
+      var that = this;
+      param = param || {};
+      let geocodingparam = {
+        address: param["address"] || '',                    
+        city: param["city"] || '',                          
+        ret_coordtype: param["coordtype"] || 'gcj02ll',     
+        ak: that.ak,                                        
+        sn: param["sn"] || '',                              
+        output: param["output"] || 'json',                  
+        callback: param["callback"] || function () { }
+      };
+      let otherparam = {
+        iconPath: param["iconPath"],
+        iconTapPath: param["iconTapPath"],
+        width: param["width"],
+        height: param["height"],
+        alpha: param["alpha"] || 1, 
+        success: param["success"] || function () { },
+        fail: param["fail"] || function () { }
+      };
+      if (param["address"]) {
+        wx.request({
+          url: 'https://api.map.baidu.com/geocoding/v3',
+          data: geocodingparam,
+          header: {
+            "content-type": "application/json"
+          },
+          method: 'GET',
+          success(data) {
+            let res = data["data"];
+            if (res["status"] === 0){
+              let poiObj = res["result"];
+              // outputRes 包含两个对象:
+              // originalData为百度接口返回的原始数据
+              // wxMarkerData为小程序规范的marker格式
+              let outputRes = res;
+              outputRes["originalData"] = res;
+              outputRes["wxMarkerData"] = [];
+              outputRes["wxMarkerData"][0] = {
+                id: 0,
+                latitude: poiObj["location"]["lat"],
+                longitude: poiObj["location"]["lng"],
+                iconPath: otherparam["iconPath"],
+                iconTapPath: otherparam["iconTapPath"],
+                alpha: otherparam["alpha"],
+                width: otherparam["width"],
+                height: otherparam["height"]
+              }
+              otherparam.success(outputRes);
+            } else {
+              otherparam.fail({
+                errMsg: res["message"],
+                statusCode: res["status"]
+              });
+            }
+          },
+          fail(data) {
+            otherparam.fail(data);
+          }
+        });
+      } else {
+        let errMsg = 'input address!';
+        let res = {
+          errMsg: errMsg
+        };
+        otherparam.fail(res);
+      }
+    } 
+  
+    /**
+     * 天气检索
+     *
+     * @param {Object} param 检索配置
+     */
+    weather(param) {
+      var that = this;
+      param = param || {};
+      let weatherparam = {
+        coord_type: param["coord_type"] || 'gcj02',
+        output: param["output"] || 'json',
+        ak: that.ak,
+        sn: param["sn"] || '',
+        timestamp: param["timestamp"] || ''
+      };
+      let otherparam = {
+        success: param["success"] || function () { },
+        fail: param["fail"] || function () { }
+      };
+      let type = 'gcj02';
+      let locationsuccess = function (result) {
+        weatherparam["location"] = result["longitude"] + ',' + result["latitude"];
+        wx.request({
+          url: 'https://api.map.baidu.com/telematics/v3/weather',
+          data: weatherparam,
+          header: {
+            "content-type": "application/json"
+          },
+          method: 'GET',
+          success(data) {
+            let res = data["data"];
+            if (res["error"] === 0 && res["status"] === 'success') {
+              let weatherArr = res["results"];
+              // outputRes 包含两个对象,
+              // originalData为百度接口返回的原始数据
+              // wxMarkerData为小程序规范的marker格式
+              let outputRes = {};
+              outputRes["originalData"] = res;
+              outputRes["currentWeather"] = [];
+              outputRes["currentWeather"][0] = {
+                currentCity: weatherArr[0]["currentCity"],
+                pm25: weatherArr[0]["pm25"],
+                date: weatherArr[0]["weather_data"][0]["date"],
+                temperature: weatherArr[0]["weather_data"][0]["temperature"],
+                weatherDesc: weatherArr[0]["weather_data"][0]["weather"],
+                wind: weatherArr[0]["weather_data"][0]["wind"]
+              };
+              otherparam.success(outputRes);
+            } else {
+              otherparam.fail({
+                errMsg: res["message"],
+                statusCode: res["status"]
+              });
+            }
+          },
+          fail(data) {
+            otherparam.fail(data);
+          }
+        });
+      }
+      let locationfail = function (result) {
+        otherparam.fail(result);
+      }
+      let locationcomplete = function (result) {
+      }
+      if (!param["location"]) {
+        that.getWXLocation(type, locationsuccess, locationfail, locationcomplete);
+      } else {
+        let longitude = param.location.split(',')[0];
+        let latitude = param.location.split(',')[1];
+        let errMsg = 'input location';
+        let res = {
+          errMsg: errMsg,
+          latitude: latitude,
+          longitude: longitude
+        };
+        locationsuccess(res);
+      }
+    }
+  }
+  
+  module.exports.BMapWX = BMapWX;

+ 1 - 0
miniprogram_npm/lin-ui/action-sheet/index.js

@@ -0,0 +1 @@
+import zIndex from"../behaviors/zIndex";import hover from"../behaviors/hover";Component({behaviors:[zIndex,hover],externalClasses:["l-class-title","l-class-item","l-class-cancel","l-title-class","l-item-class","l-cancel-class"],properties:{locked:Boolean,showCancel:Boolean,show:Boolean,itemList:Array,cancelText:{type:String,value:"取消"},title:String,zIndex:{type:Number,value:777},openApi:{type:Boolean,value:!0}},data:{success:"",fail:"",isIphoneX:!1},attached(){this.data.openApi&&this.initActionSheet(),this.initUIAdapter()},pageLifetimes:{show(){this.data.openApi&&this.initActionSheet()}},methods:{initUIAdapter(){wx.getSystemInfo({success:e=>{this.setData({isIphoneX:"iPhone X"===e.model})}})},initActionSheet(){wx.lin=wx.lin||{},wx.lin.showActionSheet=(e={})=>{const{itemList:t=[],success:s=null,fail:i=null,title:a="",locked:l=!1,cancelText:n="取消",showCancel:c=!1}=e;return this.setData({itemList:t.slice(0,10),success:s,fail:i,title:a,locked:l,cancelText:n,showCancel:c,show:!0}),this}},handleClickItem(e){const{success:t}=this.data;t&&t({...e.currentTarget.dataset}),this.triggerEvent("linitemtap",{...e.currentTarget.dataset},{bubbles:!0,composed:!0}),this._hideActionSheet()},_showActionSheet(){this.setData({show:!0})},_hideActionSheet(){this.setData({show:!1})},handleClickCancel(){const{fail:e}=this.data;e&&e({errMsg:"showactionsheet:fail cancel"}),this.triggerEvent("lincancel",{errMsg:"showactionsheet:fail cancel"},{bubbles:!0,composed:!0}),this._hideActionSheet()},handleClickPopUp(){this.data.locked||this.handleClickCancel()}}});

+ 1 - 0
miniprogram_npm/lin-ui/action-sheet/index.json

@@ -0,0 +1 @@
+{"component":true,"usingComponents":{"l-icon":"../icon/index","l-popup":"../popup/index","l-button":"../button/index"}  }

+ 21 - 0
miniprogram_npm/lin-ui/action-sheet/index.wxml

@@ -0,0 +1,21 @@
+<l-popup show="{{show}}" showMask="{{true}}" contentAlign="bottom" locked="{{locked}}" bind:lintap="handleClickPopUp" z-index="{{zIndex}}">
+    <view class="l-action-sheet">
+        <view class="l-item-button l-class-title l-title-class" wx:if="{{title}}">
+            {{ title }}
+        </view>
+        <view wx:for="{{ itemList }}" wx:key="name" hover-class="{{isHover?'list-hover':''}}">
+            <l-button bind:lintap="handleClickItem" data-index="{{ index }}" data-item="{{ item }}" open-type="{{ item.openType }}" icon="{{ item.icon }}" type="default" size="large" special="{{true}}" long>
+                <view style="{{ item.color ? 'color: ' + item.color : '' }}" class="l-item-button l-class-item l-item-class {{item.image || item.icon ? 'l-image-button':''}}">
+                    <image wx:if="{{item.image}}" class="l-button-image" src="{{item.image}}" style="{{item.imageStyle}}"/>
+                    <l-icon wx:elif="{{ item.icon }}" name="{{ item.icon }}" l-class="l-item-button" size="{{ item.iconSize }}" color="{{item.iconColor?item.iconColor:item.color}}"></l-icon>
+                    <text class="l-button-text">{{ item.name }}</text>
+                </view>
+            </l-button>
+        </view>
+        <view class="l-cancel l-class-cancel l-cancel-class {{isIphoneX ? 'l-cancel-x':''}}" wx:if="{{ showCancel }}" hover-class="{{isHover?'list-hover':''}}">
+            <l-button type="default" size="large" long="true" bind:lintap="handleClickCancel" special="{{true}}">
+                <view class="l-item-button l-cancel-button">{{ cancelText }}</view>
+            </l-button>
+        </view>
+    </view>
+</l-popup>

+ 1 - 0
miniprogram_npm/lin-ui/action-sheet/index.wxss

@@ -0,0 +1 @@
+.l-action-sheet{background:#f7f7f7}.l-item-button{height:88rpx;line-height:88rpx;text-align:center;background:#fff;border-bottom:2rpx solid #f3f3f3;font-size:28rpx;color:#45526b;display:flex;align-items:center;justify-content:center;width:100%;overflow:hidden}.l-cancel{margin-top:12rpx}.l-cancel-x .l-item-button{padding-bottom:44rpx}.l-image-button>.l-button-text{margin-left:20rpx}.list-hover{opacity:.8}

+ 1 - 0
miniprogram_npm/lin-ui/album/index.js

@@ -0,0 +1 @@
+Component({externalClasses:["l-class","l-single-image-class","l-multi-image-class"],properties:{urls:{type:Array},preview:{type:Boolean,value:!0},gapRow:{type:Number,value:10},gapColumn:{type:Number,value:10},singleSize:{type:Number,value:360},multipleSize:{type:Number,value:158},singleMode:{type:String,value:"aspectFit"},multipleMode:{type:String,value:"aspectFill"},key:{type:String,value:"url"},maxNumber:{type:Number,value:9},customRowNumber:{type:Boolean,value:!1},everyRowNumber:{type:Number,value:3},previewFullImage:{type:Boolean,value:!0}},data:{newType:!0,shortSideValue:0,showUrls:[],isLong:!1},observers:{urls:function(){this.init()}},methods:{init(){let{urls:e,maxNumber:t,key:a}=this.data;if(e.length>t&&(e=e.slice(0,t),this.setData({isLong:!0})),this.setData({showUrls:e}),!this.data.customRowNumber){let e=this.data.showUrls.length;e>1&&e<5?this.setData({everyRowNumber:2}):this.setData({everyRowNumber:3})}const s=this.judgeType();this.setData({newType:s}),1===e.length&&this.horizontalOrVertical(s?e[0][a]:e[0])},judgeType(){const e=this.data.urls;return 0===e.length||"object"==typeof e[0]},horizontalOrVertical:function(e){wx.getImageInfo({src:e,success:e=>{const t=e.width>=e.height?e.width:e.height,a=e.width>=e.height?e.height:e.width;this.setData({horizontalScreen:e.width>=e.height,shortSideValue:a*this.data.singleSize/t})}})},onPreviewTap(e){const t=e.currentTarget.id;let a;a=this.data.previewFullImage?this.data.urls:this.data.showUrls;let s="",i=[];const l=this.data.newType,r=this.data.key;if(l){s=a[t][r];for(let e=0;e<a.length;e++)i.push(a[e][r])}else s=a[t],i=a;let h={index:t,current:a[t],all:a};!0===this.data.preview&&wx.previewImage({current:s,urls:i}),this.triggerEvent("lintap",h,{})}}});

+ 1 - 0
miniprogram_npm/lin-ui/album/index.json

@@ -0,0 +1 @@
+{"component":true,"usingComponents":{}}

+ 12 - 0
miniprogram_npm/lin-ui/album/index.wxml

@@ -0,0 +1,12 @@
+<wxs src="index.wxs" module="album"></wxs>
+
+<view style="display:flex">
+  <view style="{{album.gridStyle(gapRow, gapColumn, multipleSize, everyRowNumber)}}">
+    <block wx:for="{{showUrls}}" wx:key="index" class="child">
+      <view class="imageContainer {{album.dimBack(isLong, index, maxNumber, previewFullImage)}}" style="{{album.blockStyle(urls, horizontalScreen, shortSideValue, singleSize, multipleSize)}}">
+        <image class="{{album.dim(isLong, index, maxNumber, previewFullImage)}}}" id="{{index}}" bind:tap="onPreviewTap" style="{{album.blockStyle(urls, horizontalScreen, shortSideValue, singleSize, multipleSize)}}" src="{{newType?item[key]:item}}" mode="{{urls.length === 1?singleMode:multipleMode}}"/>
+        <view wx:if="{{album.image(isLong, index, maxNumber, previewFullImage)}}" class="text">+{{urls.length-maxNumber}}</view>
+      </view>
+    </block>
+  </view>
+</view>

+ 79 - 0
miniprogram_npm/lin-ui/album/index.wxs

@@ -0,0 +1,79 @@
+var containerStyle = function (urls, multipleSize, gapRow, gapColumn) {
+    if (urls.length === 2 || urls.length === 4) {
+        return 'width:' + (2 * multipleSize + gapRow) + 'rpx; grid-row-gap:' + gapColumn + 'rpx; grid-column-gap:' + gapRow + 'rpx;grid-template-columns:repeat(auto-fit, ' + multipleSize + 'rpx);'
+    } else {
+        return 'width:' + (3 * multipleSize + 2 * gapRow) + 'rpx; grid-row-gap:' + gapColumn + 'rpx; grid-column-gap:' + gapRow + 'rpx;grid-template-columns:repeat(auto-fit, ' + multipleSize + 'rpx);'
+    }
+
+}
+
+var blockClass = function (urls, horizontalScreen) {
+    if (urls.length === 1) {
+        if (horizontalScreen) {
+            return 'l-single-image-class'
+        } else {
+            return 'vertical l-single-image-class'
+        }
+    } else {
+        return 'l-multi-image-class'
+    }
+}
+
+var blockStyle = function (urls, horizontalScreen, shortSideValue, singleSize, multipleSize) {
+    if (urls.length === 1) {
+        if (horizontalScreen) {
+            return 'height:' + shortSideValue + 'rpx;width:' + singleSize + 'rpx;'
+        } else {
+            return 'width:' + shortSideValue + 'rpx;height:' + singleSize + 'rpx;'
+        }
+    } else {
+        return 'height:' + multipleSize + 'rpx;width:' + multipleSize + 'rpx;'
+    }
+}
+
+var gridStyle = function (gapRow, gapColumn, multipleSize, everyRowNumber) {
+    return 'display:inline-grid;grid-template-columns: repeat(' + everyRowNumber + ',' + multipleSize + 'rpx);grid-row-gap:' + gapRow + 'rpx;grid-column-gap:' + gapColumn + 'rpx;'
+}
+
+var dimBack = function (isLong, index, maxNumber, previewFullImage) {
+    if (previewFullImage) {
+        if (isLong) {
+            if (index == maxNumber - 1) {
+                return 'dimback'
+            }
+        }
+    }
+    return ''
+}
+
+var dim = function (isLong, index, maxNumber, previewFullImage) {
+    if (previewFullImage) {
+        if (isLong) {
+            if (index == maxNumber - 1) {
+                return 'dim'
+            }
+        }
+    }
+    return ''
+}
+
+var image = function (isLong, index, maxNumber, previewFullImage) {
+    if (previewFullImage) {
+        if (isLong) {
+            if (index == maxNumber - 1) {
+                return true
+            }
+        }
+    }
+    return false
+}
+
+module.exports = {
+    containerStyle: containerStyle,
+    blockClass: blockClass,
+    blockStyle: blockStyle,
+    gridStyle: gridStyle,
+    dimBack: dimBack,
+    dim: dim,
+    image: image,
+}

+ 1 - 0
miniprogram_npm/lin-ui/album/index.wxss

@@ -0,0 +1 @@
+.container{display:grid}.vertical{height:360rpx}.parent{display:inline-grid;grid-template-columns:repeat(auto-fill)}.child{box-sizing:border-box;background-color:#fff;flex:0 0 44%;height:100px;border:1px solid red;margin-top:4%;margin-left:2%;margin-right:2%}.dimback{background:#000}.dim{opacity:.6}.imageContainer{position:relative}.imageContainer:last-child>.text{color:#fff;font-weight:700;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:larger}

+ 1 - 0
miniprogram_npm/lin-ui/arc-popup/index.js

@@ -0,0 +1 @@
+import validator from"../behaviors/validator";import zIndex from"../behaviors/zIndex";const detail=!0,option={bubbles:!0,composed:!0};Component({behaviors:[zIndex,validator],externalClasses:["l-class","l-panel-class","l-bg-class","l-header-class"],options:{multipleSlots:!0},properties:{show:{type:Boolean,value:!1},maxHeight:{type:Number,value:600},minHeight:{type:Number,value:200},arcRadius:{type:Number,value:18},transition:{type:Boolean,value:!0},locked:{type:Boolean,value:!1},opacity:{type:Number,value:.4},direction:{type:String,options:["top","bottom"],value:"bottom"},headerFixed:{type:Boolean,value:!0}},data:{_arcRadiusTop:12,_ardRadiusBottom:18,arcStyle:""},observers:{show:function(t){t?(this.triggerEvent("linshow",!0,option),this.getArcPopupStyle()):this.triggerEvent("linclose",!0,option)},arcRadius:function(t){"top"===this.properties.direction?this.data._arcRadiusTop=t:this.data._ardRadiusBottom=t,this.getArcPopupStyle()}},pageLifetimes:{show(){this._init()}},methods:{_init(){wx.lin=wx.lin||{},wx.lin.showArcPopup=t=>{const{zIndex:o=99,tranistion:e=!0,direction:i="bottom",locked:a=!1}={...t};this.setData({zIndex:o,tranistion:e,direction:i,locked:a,show:!0})},wx.lin.hideArcPopup=()=>{this.setData({show:!1})}},getArcPopupStyle(){const t=this.properties.direction,o=this.data._arcRadiusTop,e=this.data._ardRadiusBottom,i=`\n        border-bottom-left-radius:${"top"===t?o:0}rpx;\n        border-bottom-right-radius:${"top"===t?o:0}rpx;\n        border-top-left-radius:${"bottom"===t?e:0}rpx;\n        border-top-right-radius:${"bottom"===t?e:0}rpx;\n        max-height:${this.properties.maxHeight}rpx;\n        min-height:${this.properties.minHeight}rpx;\n      `;this.setData({arcStyle:i})},onArcPopupTap(){this.data.locked||this.properties.show&&this.setData({show:!1})}},ready(){this.getArcPopupStyle()}});

+ 1 - 0
miniprogram_npm/lin-ui/arc-popup/index.json

@@ -0,0 +1 @@
+{"component":true,"usingComponents":{"l-popup":"../popup/index"}}

+ 10 - 0
miniprogram_npm/lin-ui/arc-popup/index.wxml

@@ -0,0 +1,10 @@
+<l-popup show="{{show}}" direction="{{direction}}" transition="{{transition}}" opacity="{{opacity}}" locked="{{locked}}" z-index="{{zIndex}}" l-class="l-class" l-bg-class="l-bg-class" bind:lintap="onArcPopupTap">
+  <scroll-view scroll-y="true" class="arc-popup l-panel-class" style="{{arcStyle}}">
+    <view class="header-popup {{headerFixed ? 'fixed' : ''}} l-header-class">
+      <slot name="header"/>
+    </view>
+    <view class="content-arc-popup">
+      <slot/>
+    </view>
+  </scroll-view>
+</l-popup>

+ 1 - 0
miniprogram_npm/lin-ui/arc-popup/index.wxss

@@ -0,0 +1 @@
+.container-arc-popup{width:100%}.arc-popup{overflow:hidden;width:100%;background:#fff}.content-arc-popup{padding:30rpx;box-sizing:border-box}.header-popup{width:100%;z-index:999}.header-popup.fixed{position:sticky;top:0;background-color:#fff}

+ 1 - 0
miniprogram_npm/lin-ui/avatar/index.js

@@ -0,0 +1 @@
+Component({externalClasses:["l-class","l-class-text","l-text-class"],properties:{icon:String,iconColor:{type:String,value:"#3963BC"},iconSize:{type:String,value:"28"},text:String,src:String,openData:{type:Array,observer:"_initOpenData"},shape:{type:String,value:"circle"},mode:{type:String,value:"scaleToFill"},size:{type:Number,value:120},placement:{type:String,value:"right"}},data:{_isHaveUserNickName:!1,_isHaveUserAvatarUrl:!1,_iconSize:"",_iconColor:"#ffffff"},methods:{_initOpenData:function(e){this._isHaveUserAvatarUrl(e),this._isHaveUserNickName(e)},_isHaveUserAvatarUrl:function(e){this.setData({_isHaveUserAvatarUrl:-1!==e.indexOf("userAvatarUrl")})},_isHaveUserNickName:function(e){this.setData({_isHaveUserNickName:-1!==e.indexOf("userNickName")})},tapAvatar:function(e){this.triggerEvent("lintap",e,{bubbles:!0,composed:!0})}}});

+ 1 - 0
miniprogram_npm/lin-ui/avatar/index.json

@@ -0,0 +1 @@
+{"component":true,"usingComponents":{"l-icon":"../icon/index"}  }

+ 12 - 0
miniprogram_npm/lin-ui/avatar/index.wxml

@@ -0,0 +1,12 @@
+
+<view class="l-avatar {{text||_isHaveUserNickName?'l-placement-'+placement:''}}" mut-bind:tap="tapAvatar">
+    <view class="l-avatar-image {{shape?'l-'+shape:''}} l-class" wx:if="{{_isHaveUserAvatarUrl||icon||src}}" style="width:{{size}}rpx;height:{{size}}rpx;min-width:{{size}}rpx;min-height:{{size}}rpx;">
+        <open-data class="open-data" wx:if="{{_isHaveUserAvatarUrl}}" type="userAvatarUrl"/>
+        <l-icon wx:elif="{{icon}}" size="{{iconSize || size*0.6}}" color="{{iconColor||'#ffffff'}}" name="{{icon}}"/>
+        <image wx:elif="{{src}}" src="{{src}}" mode="{{mode}}" style="width:{{size}}rpx;height:{{size}}rpx"/>
+    </view>
+    <view class="l-avatar-text l-class-text l-text-class" wx:if="{{text||_isHaveUserNickName}}">
+        <open-data class="open-data" wx:if="{{_isHaveUserNickName}}" type="userNickName"/>
+        <text class="l-avatar-text-text" wx:elif="{{text}}">{{text}}</text>
+    </view>
+</view>

+ 1 - 0
miniprogram_npm/lin-ui/avatar/index.wxss

@@ -0,0 +1 @@
+.l-avatar{display:inline-flex;justify-content:center;align-items:center}.l-avatar-image{flex:1;display:inline-flex;justify-content:center;align-items:center;background:#ccc;overflow:hidden}.l-avatar-text{display:inline-block;height:max-content;width:max-content;font-size:28rpx;color:#45526b;line-height:40px}.open-data{width:100%;height:100%}.l-avatar-text .l-avatar-text-text,.l-avatar-text .open-data{font-size:inherit;color:inherit;line-height:inherit}.l-square{border-radius:8rpx}.l-circle{border-radius:50%}.l-placement-left,.l-placement-right{align-items:center;justify-content:center}.l-placement-left{margin-right:24rpx;flex-direction:row-reverse}.l-placement-left .l-avatar-text{margin-right:24rpx}.l-placement-right{flex-direction:row}.l-placement-right .l-avatar-text{margin-left:24rpx}.l-placement-top{flex-direction:column-reverse}.l-placement-top .l-avatar-text{margin-bottom:12rpx}.l-placement-bottom{flex-direction:column}.l-placement-bottom .l-avatar-text{margin-top:12rpx}

+ 1 - 0
miniprogram_npm/lin-ui/badge/index.js

@@ -0,0 +1 @@
+import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-class-self","l-self-class"],behaviors:[validator],properties:{dot:{type:Boolean,value:!1},shape:{type:String,value:"horn",options:["horn","circle"]},value:{type:String,value:"0"},mode:{type:String,value:"number",options:["number","text"]},maxCount:{type:Number,value:99},numberType:{type:String,value:"overflow",options:["overflow","limit","ellipsis"]},show:{type:Boolean,value:!0}},data:{finalCount:0},observers:{value:function(){this.finalCount()}},methods:{finalCount(){isNaN(Number(this.data.value))||"text"===this.data.mode?this.setData({finalCount:this.data.value}):this.switchType()},switchType(){switch(this.data.numberType){case"overflow":this.setData({finalCount:Number(this.data.value)>Number(this.data.maxCount)?this.data.maxCount+"+":this.data.value});break;case"ellipsis":this.setData({finalCount:Number(this.data.value)>Number(this.data.maxCount)?"...":this.data.value});break;case"limit":this.setData({finalCount:Number(this.data.value)>999?Number(this.data.value)>=9999?Math.floor(this.data.value/1e4*100)/100+"w":Math.floor(this.data.value/1e3*100)/100+"k":this.data.value});break;default:this.setData({finalCount:Number(this.data.value)})}},handleTap(){this.triggerEvent("lintap",{},{bubbles:!0,composed:!0})}}});

+ 1 - 0
miniprogram_npm/lin-ui/badge/index.json

@@ -0,0 +1 @@
+{"component":true,"usingComponents":{}}

+ 7 - 0
miniprogram_npm/lin-ui/badge/index.wxml

@@ -0,0 +1,7 @@
+<view class="l-badge" mut-bind:tap="handleTap">
+  <slot/>
+  <block wx:if="{{show}}">
+    <view wx:if="{{dot}}" class="l-badge-dot l-class l-class-self l-self-class"></view>
+    <view wx:else class="{{'l-badge-content-'+shape}} l-badge-content l-class l-class-self l-self-class">{{finalCount}}</view>
+  </block>
+</view>

+ 1 - 0
miniprogram_npm/lin-ui/badge/index.wxss

@@ -0,0 +1 @@
+.l-badge{position:relative;display:inline-block;line-height:1;vertical-align:middle}.l-badge-content{max-width:650rpx;left:70%;background-color:#ff474b;color:#fff;position:absolute;font-size:20rpx;display:inline-block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:center;box-sizing:border-box;z-index:10;letter-spacing:.5rpx}.l-badge-content-horn{height:28rpx;min-width:54rpx;padding:0 8rpx;border-radius:14rpx 14rpx 14rpx 0rpx;line-height:28rpx;top:-10rpx}.l-badge-content-circle{height:32rpx;min-width:32rpx;padding:0 10rpx;border-radius:16rpx;line-height:32rpx;top:-10rpx}.l-badge-dot{height:16rpx;width:16rpx;transform:translateX(50%);border-radius:50%;background-color:#ff474b;position:absolute;top:-4rpx;right:0rpx}

+ 1 - 0
miniprogram_npm/lin-ui/behaviors/computeOffset.js

@@ -0,0 +1 @@
+export default Behavior({behaviors:[],properties:{},data:{distance:0},attached(){this.offsetMargin()},methods:{offsetMargin(){const{windowHeight:t,screenHeight:e}=wx.getSystemInfoSync();this.setData({distance:e-t})}}});

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
miniprogram_npm/lin-ui/behaviors/countdown.js


+ 1 - 0
miniprogram_npm/lin-ui/behaviors/hover.js

@@ -0,0 +1 @@
+export default Behavior({behaviors:[],properties:{isHover:{type:Boolean,value:!0}}});

+ 1 - 0
miniprogram_npm/lin-ui/behaviors/rules.js

@@ -0,0 +1 @@
+import Schema from"../common/async-validator/index";import validator from"../behaviors/validator";export default Behavior({behaviors:[validator],properties:{rules:{type:[Object,Array],value:[]},tipType:{type:String,value:"toast",options:["toast","message","text"]}},data:{schema:"",tipFun:{message:"showMessage",toast:"showToast"},tipContent:{message:"content",toast:"title"},errorText:"",errors:[]},methods:{initRules(){const{rules:t}=this.data;t&&("[object Object]"===Object.prototype.toString.call(t)&&(this.data.rules=[t]),this.data.rules.forEach(t=>{t.trigger?"string"!=typeof t.trigger||(t.trigger=[t.trigger]):t.trigger=[]}))},getNeedValidateRule(t){const e=this.data.name,{rules:a}=this.data;if(!a)return;const r=t?a.filter(e=>e.trigger.indexOf(t)>-1):a,s=new Schema({[e]:r});return this.setData({schema:s}),r},validatorData(t,e){const{tipType:a,tipFun:r,tipContent:s}=this.data;this.getNeedValidateRule(e)&&(Object.getOwnPropertyNames(t).forEach(e=>{""===t[e]&&(t[e]=void 0)}),this.data.schema.validate(t,t=>{if(this.setData({errors:t||[]}),this.triggerEvent("linvalidate",{errors:t,isError:!!t}),t&&a){const e=r[a],i=s[a];return"text"===a?(this.setData({errorText:t[0].message}),t):wx.lin&&wx.lin[e]?(wx.lin[e]&&wx.lin[e]({[i]:t[0].message,duration:1500,mask:!1}),t):(t)}!t&&a&&this.setData({errorText:""})}))}}});

+ 1 - 0
miniprogram_npm/lin-ui/behaviors/scrollCenter.js

@@ -0,0 +1 @@
+export default Behavior({methods:{getRect(e,t=!1){return new Promise((r,o)=>{const s=wx.createSelectorQuery().in(this);(t?s.selectAll(e):s.select(e)).boundingClientRect(e=>{if(!e)return o("找不到元素");r(e)}).exec()})},queryScrollNode(e,t,r="width"){if(t<0)return;const o=e[t];this.getRect(".l-tabsscroll").then(s=>{if(!s)return console.error("找不到元素");const c=s[r];let n=e.slice(0,t).reduce((e,t)=>e+t[r],0);n+=(o[r]-c)/2,"width"===r?this.setData({transformX:n,transformY:0}):this.setData({transformX:0,transformY:n})}).catch(e=>{console.error(e)})},queryMultipleNodes(){const{placement:e,currentIndex:t}=this.data;this.getRect(".l-tabs-item",!0).then(r=>{-1!==["top","bottom"].indexOf(e)?this.queryScrollNode(r,t):this.queryScrollNode(r,t,"height")}).catch(e=>{console.error(e)})}}});

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
miniprogram_npm/lin-ui/behaviors/transition.js


+ 1 - 0
miniprogram_npm/lin-ui/behaviors/validator.js

@@ -0,0 +1 @@
+export default Behavior({definitionFilter(e){const{properties:o}=e;Object.keys(o).forEach(e=>{const{options:t}=o[e];t&&(o[e].observer=function(o){!t.includes(o)&&o&&console.error(`${e}: ${o} must be in the [${t}]`)})})}});

+ 1 - 0
miniprogram_npm/lin-ui/behaviors/watchShow.js

@@ -0,0 +1 @@
+export default Behavior({observers:{show:function(t){t&&this.changeStatus(),t||this.setData({status:t})}},methods:{changeStatus(){this.setData({status:!0}),this.data.timer&&clearTimeout(this.data.timer),this.data.timer=setTimeout(()=>{this.setData({status:!1}),this.data.success&&this.data.success(),this.data.timer=null},this.properties.duration)}}});

+ 1 - 0
miniprogram_npm/lin-ui/behaviors/zIndex.js

@@ -0,0 +1 @@
+export default Behavior({behaviors:[],properties:{zIndex:{type:Number,value:777}}});

+ 1 - 0
miniprogram_npm/lin-ui/button/index.js

@@ -0,0 +1 @@
+import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-label-class","l-hover-class","l-img-class","l-icon-class"],behaviors:[validator],properties:{name:{type:String,value:"lin"},type:{type:String,value:"default",options:["warning","success","error","default"]},plain:Boolean,size:{type:String,value:"medium",options:["medium","large","mini","long"]},shape:{type:String,value:"circle",options:["square","circle","semicircle"]},disabled:{type:Boolean,value:!1},special:{type:Boolean,value:!1},loading:{type:Boolean,value:!1},width:Number,height:Number,icon:String,image:String,bgColor:String,iconColor:String,iconSize:String,openType:String,appParameter:String,lang:String,hoverStopPropagation:Boolean,hoverStartTime:{type:Number,value:20},hoverStayTime:{type:Number,value:70},sessionFrom:{type:String,value:""},sendMessageTitle:String,sendMessagePath:String,sendMessageImg:String,showMessageCard:Boolean,formType:String,disabledHover:{type:Boolean,value:!1}},methods:{handleTap(){if(this.data.disabled||this.data.loading)return!1;this.triggerEvent("lintap",{},{bubbles:!0,composed:!0})},openTypeEvent(e){this.triggerEvent(e.type,e.detail,{})}}});

+ 1 - 0
miniprogram_npm/lin-ui/button/index.json

@@ -0,0 +1 @@
+{"component":true,"usingComponents":{"l-icon":"../icon/index"}}

+ 16 - 0
miniprogram_npm/lin-ui/button/index.wxml

@@ -0,0 +1,16 @@
+<label for="{{name}}" mut-bind:tap="handleTap" class="l-label-class">
+  <block wx:if="{{special}}">
+    <view class="special-container l-class">
+      <slot/>
+    </view>
+  </block>
+  <block wx:else>
+    <view class="l-btn {{ 'l-btn-' + size }} {{ 'l-btn-' + type }} {{ 'l-btn-' + shape }} {{plain?'l-btn-plain':''}} {{ disabled ? 'l-btn-disabled' : ''}} l-class" hover-class="{{disabled?'':disabledHover?'':'btn-hover l-hover-class'}}" hover-stop-propagation="{{hoverStopPropagation}}" hover-start-time="{{hoverStartTime}}" hover-stay-time="{{hoverStayTime}}" style="{{width?'min-width:'+width+'rpx;':''}} {{height?'height:'+height+'rpx;'+'line-height:'+height+'rpx;':''}} {{size=='long'?'border-radius:0;':''}} {{'background-color:'+bgColor}}">
+      <view wx:if="{{loading}}" class="l-btn-loading {{'margin-' + size}} {{ plain ?'l-btn-loading-' + type : '' }}"></view>
+      <l-icon l-class="l-icon-class" class="{{'margin-' + size}}" wx:if="{{icon}}" name="{{icon}}" color="{{iconColor}}" size="{{iconSize}}"/>
+      <slot/>
+    </view>
+  </block>
+</label>
+<button style="position: absolute;top: -999px;left: -999px;" wx:if="{{openType}}" id="{{name}}" lang="{{lang}}" form-type="{{formType}}" open-type="{{openType}}" app-parameter="{{ appParameter }}" hover-stop-propagation="{{ hoverStopPropagation }}" hover-start-time="{{ hoverStartTime }}" hover-stay-time="{{ hoverStayTime }}" session-from="{{ sessionFrom }}" send-message-title="{{ sendMessageTitle }}" send-message-path="{{ sendMessagePath }}" send-message-img="{{ sendMessageImg }}" show-message-card="{{ showMessageCard }}" bindcontact="openTypeEvent" bindgetuserinfo="openTypeEvent" bindgetphonenumber="openTypeEvent" bindopensetting="openTypeEvent">
+</button>

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
miniprogram_npm/lin-ui/button/index.wxss


+ 14 - 0
miniprogram_npm/lin-ui/calendar/calendar.wxml

@@ -0,0 +1,14 @@
+<wxs src="./index.wxs" module="computed"></wxs>
+
+<template name="calendar">
+  <view class="calendar-container">
+    <header showTitle="{{ showTitle }}" showSubtitle="{{ showSubtitle }}" title="{{ title }}" subTitle="{{ subTitle }}"></header>
+    <scroll-view class="calendar-body-wrap" scroll-y scroll-into-view="{{ scrollIntoViewIndex }}">
+      <mounth wx:for="{{ computed.getMonths(minDate, maxDate) }}" wx:key="index" id="month{{ index }}" class="month" data-date="{{ item }}" date="{{ item }}" minDate="{{ minDate }}" maxDate="{{ maxDate }}" currentDate="{{ currentDate }}" type="{{ type }}" bind:clickDay="clickDay" showMonthTitle="{{ index !== 0 }}" formatter="{{ formatter }}" color="{{ color }}">
+      </mounth>
+    </scroll-view>
+    <view>
+      <l-button type="default" l-class="bottom-button" size="long" bind:lintap="onClickConfirm" bg-color="{{ color }}">{{confirmText}}</l-button>
+    </view>
+  </view>
+</template>

+ 1 - 0
miniprogram_npm/lin-ui/calendar/components/day/index.js

@@ -0,0 +1 @@
+Component({data:{},properties:{text:null,topInfo:null,bottomInfo:null,type:null,color:{type:String,value:""}},methods:{}});

+ 1 - 0
miniprogram_npm/lin-ui/calendar/components/day/index.json

@@ -0,0 +1 @@
+{"component":true}

+ 6 - 0
miniprogram_npm/lin-ui/calendar/components/day/index.wxml

@@ -0,0 +1,6 @@
+<wxs src="./index.wxs" module="computed"></wxs>
+<view class="calendar-day-container {{ type }}" style="{{ computed.getDayStyle(type, color) }}">
+  <view class="top">{{ topInfo }}</view>
+  <view class="text">{{ text }}</view>
+  <view class="bottom">{{ bottomInfo }}</view>
+</view>

+ 27 - 0
miniprogram_npm/lin-ui/calendar/components/day/index.wxs

@@ -0,0 +1,27 @@
+function getDayStyle(type, color) {
+  var style = [];
+
+  if (color) {
+    if (
+      type === 'start' ||
+      type === 'end' ||
+      type === 'selected'
+    ) {
+      style.push(['background', color]);
+    } else if (type === 'middle') {
+      style.push(['color', color]);
+      // style.push(['background', color]);
+      // style.push(['opacity', '0.1']);
+    }
+  }
+
+  return style
+    .map(function(item) {
+      return item.join(':');
+    })
+    .join(';');
+}
+
+module.exports = {
+  getDayStyle: getDayStyle,
+};

+ 1 - 0
miniprogram_npm/lin-ui/calendar/components/day/index.wxss

@@ -0,0 +1 @@
+.calendar-day-container{display:flex;flex-direction:column;height:100%;align-items:center;position:relative;color:#666}.calendar-day-container.selected{background-color:#3963bc;color:#fff;border-radius:8rpx}.calendar-day-container.start{background-color:#3963bc;color:#fff;border-radius:8rpx}.calendar-day-container.end{background-color:#3963bc;color:#fff;border-radius:8rpx}.calendar-day-container.disabled{color:#c8c9cc;cursor:default;background:#fff}.calendar-day-container.middle{color:#3963bc}.calendar-day-container.middle::after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;opacity:.1;content:''}.calendar-day-container .top{height:24rpx;line-height:24rpx;font-size:16rpx}.calendar-day-container .text{flex:1;font-size:32rpx}.calendar-day-container .bottom{height:24rpx;line-height:24rpx;font-size:16rpx}

+ 1 - 0
miniprogram_npm/lin-ui/calendar/components/header/index.js

@@ -0,0 +1 @@
+Component({data:{weekdays:["日","一","二","三","四","五","六"]},properties:{title:{type:String,value:"日期选择"},subTitle:String,showTitle:Boolean,showSubtitle:Boolean},methods:{}});

+ 1 - 0
miniprogram_npm/lin-ui/calendar/components/header/index.json

@@ -0,0 +1 @@
+{"component":true}

+ 18 - 0
miniprogram_npm/lin-ui/calendar/components/header/index.wxml

@@ -0,0 +1,18 @@
+<view class="calendar-header-container">
+  <block wx:if="{{ showTitle }}">
+    
+   <view class="calendar-header-container_title">
+      {{ title }}
+    </view>
+  </block>
+
+  <view wx:if="{{ showSubtitle }}" class="calendar-header-container_subtitle">
+    {{ subTitle }}
+  </view>
+
+  <view class="calendar-header__weekdays">
+    <view wx:for="{{ weekdays }}" wx:key="index" class="calendar-header__weekday">
+      {{ item }}
+    </view>
+  </view>
+</view>

+ 1 - 0
miniprogram_npm/lin-ui/calendar/components/header/index.wxss

@@ -0,0 +1 @@
+.calendar-header-container .calendar-header-container_title{text-align:center;padding:20rpx 0;font-size:36rpx;line-height:44rpx}.calendar-header-container .calendar-header-container_subtitle{text-align:center;font-size:36rpx;line-height:44rpx;margin-bottom:30rpx}.calendar-header-container .calendar-header__weekdays{display:flex;justify-content:center;align-items:center;margin:0 20rpx;padding:10rpx 0;border-bottom:1rpx solid #f3f3f3}.calendar-header-container .calendar-header__weekdays .calendar-header__weekday{width:14.285%;text-align:center}

+ 1 - 0
miniprogram_npm/lin-ui/calendar/components/mounth/index.js

@@ -0,0 +1 @@
+import{compareDay,getMonthEndDay}from"../../util";import*as config from"../../config";Component({data:{days:[]},properties:{minDate:{type:[Date,String,null]},maxDate:{type:[Date,String,null]},formatter:{type:null,observer:"setDays"},date:{type:null,observer:"setDays"},currentDate:{type:[null,Array],observer(){this.setDays()}},type:{type:String,observer:"setDays"},showMonthTitle:Boolean,color:{type:String,value:""}},methods:{onClick(t){const{item:e}=t.currentTarget.dataset;"disabled"!==e.type&&"empty"!==e.type&&this.triggerEvent("clickDay",e)},debounce(t){let e;return()=>{let a=this,r=arguments;e&&clearTimeout(e),e=setTimeout((function(){t.apply(a,r)}),300)}},setDays(){this.debounce(this.setDay)()},setDay(){let t=[];const e=new Date(this.data.date),a=e.getFullYear(),r=e.getMonth(),n=new Date(a,r,1).getDay(),o=getMonthEndDay(a,r+1);for(let e=1;e<=o;e++){const n=new Date(a,r,e).getTime(),o=this.getDayType(n);let s={date:n,type:o,text:e,bottomInfo:this.getBottomInfo(o),topInfo:""};this.data.formatter&&(s=this.data.formatter(s)),t.push(s)}for(let e=0;e<n;e++)t.unshift({type:"empty"});this.setData({days:t})},isDateInCurrent(t){const{currentDate:e}=this.data;return e.some(e=>0===compareDay(e,t))},getMultipleDayType(t){const{currentDate:e}=this.data;return Array.isArray(e)&&this.isDateInCurrent(t)?"selected":""},getRangeDayType(t){const{currentDate:e}=this.data;if(!Array.isArray(e))return;const[a,r]=e;if(!a)return;const n=compareDay(t,a);if(!r)return 0===n?"start":"";const o=compareDay(t,r);return 0===n?"start":0===o?"end":n>0&&o<0?"middle":void 0},getDayType(t){const{type:e,minDate:a,maxDate:r,currentDate:n}=this.data;return compareDay(t,a)<0||compareDay(t,r)>0?"disabled":e===config.TYPE_SINGLE?0===compareDay(t,n)?"selected":"":e===config.TYPE_MULTIPLE?this.getMultipleDayType(t):e===config.TYPE_RANGE?this.getRangeDayType(t):void 0},getBottomInfo(t){return this.data.type===config.TYPE_RANGE?"start"===t?"开始":"end"===t?"结束":"":""}}});

+ 1 - 0
miniprogram_npm/lin-ui/calendar/components/mounth/index.json

@@ -0,0 +1 @@
+{"component":true,"usingComponents":{"day":"../day/index"}}

+ 12 - 0
miniprogram_npm/lin-ui/calendar/components/mounth/index.wxml

@@ -0,0 +1,12 @@
+<wxs src="./index.wxs" module="computed"></wxs>
+
+<view class="calendar-mounth-container">
+  <view class="title" wx:if="{{ showMonthTitle }}">
+    {{ computed.formatMonthTitle(date) }}
+  </view>
+  <view class="calendar-day-container">
+    <view class="calendar-day-wrap" wx:for="{{ days }}" wx:key="index">
+      <day bind:tap="onClick" data-item="{{ item }}" wx:if="{{ item.type !== 'empty' }}" text="{{ item.text }}" topInfo="{{ item.topInfo }}" bottomInfo="{{ item.bottomInfo }}" type="{{ item.type }}" color=" {{ color }}"/>
+    </view>
+  </view>
+</view>

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно