lhl 2 vuotta sitten
commit
03cb408de1
100 muutettua tiedostoa jossa 23845 lisäystä ja 0 poistoa
  1. 5 0
      .gitignore
  2. 26 0
      .hbuilderx/launch.json
  3. 8 0
      .idea/breedingmall_app.iml
  4. 6 0
      .idea/misc.xml
  5. 8 0
      .idea/modules.xml
  6. 6 0
      .idea/vcs.xml
  7. 244 0
      .idea/workspace.xml
  8. 279 0
      App.vue
  9. 7 0
      README.md
  10. 28 0
      androidPrivacy.json
  11. 30 0
      api/address/address.js
  12. 44 0
      api/appsecret.js
  13. 28 0
      api/broadcast/index.js
  14. 60 0
      api/cart/index.js
  15. 43 0
      api/getSetting.js
  16. 347 0
      api/home/index.js
  17. 227 0
      api/land/index.js
  18. 112 0
      api/login/login.js
  19. 446 0
      api/mall/index.js
  20. 203 0
      api/md5.js
  21. 618 0
      api/mine/index.js
  22. 157 0
      api/order/index.js
  23. 176 0
      api/paycenter/paycenter.js
  24. 99 0
      api/request.js
  25. 21 0
      api/seed/index.js
  26. 12 0
      api/update/index.js
  27. 131 0
      api/wall/index.js
  28. 4 0
      author.js
  29. 0 0
      common/nowvue.scss
  30. 1122 0
      common/qqmap-wx-jssdk.js
  31. 0 0
      common/qqmap-wx-jssdk.min.js
  32. 27 0
      common/until.js
  33. BIN
      components/.DS_Store
  34. 173 0
      components/admyself/admyself.vue
  35. 261 0
      components/nologin/nologin.vue
  36. 604 0
      components/nx-coupon/nx-coupon.vue
  37. 281 0
      components/nx-coupon/yh_coupon.vue
  38. 1253 0
      components/payment/payment.vue
  39. 506 0
      components/sharebox/sharebox.vue
  40. 75 0
      components/systhemes/themes1.vue
  41. 755 0
      components/systhemes/themes2.vue
  42. 121 0
      components/tabbar/tabbar.vue
  43. 224 0
      components/ui-component-load/index.vue
  44. 26 0
      components/ui-component-load/load-error.vue
  45. 238 0
      components/ui-component/U_activity/m/index.vue
  46. 289 0
      components/ui-component/U_adopt/m/index.vue
  47. 46 0
      components/ui-component/U_blank/m/index.vue
  48. 104 0
      components/ui-component/U_bull/m/index.vue
  49. 349 0
      components/ui-component/U_button/m/index.vue
  50. 328 0
      components/ui-component/U_coupon/m/index.vue
  51. 281 0
      components/ui-component/U_cube/m/index.vue
  52. 586 0
      components/ui-component/U_goods/m/index.vue
  53. 370 0
      components/ui-component/U_goods2/m/index.vue
  54. 242 0
      components/ui-component/U_land/m/index.vue
  55. 59 0
      components/ui-component/U_line/m/index.vue
  56. 363 0
      components/ui-component/U_monitor/m/index.vue
  57. 96 0
      components/ui-component/U_navbar/m/index.vue
  58. 137 0
      components/ui-component/U_public/m/index.vue
  59. 83 0
      components/ui-component/U_richtext/m/index.vue
  60. 244 0
      components/ui-component/U_seckill/m/index.vue
  61. 74 0
      components/ui-component/U_simplegraph/m/index.vue
  62. 145 0
      components/ui-component/U_slideshow/m/index.vue
  63. 194 0
      components/ui-component/U_suspendbutton/m/index.vue
  64. 98 0
      components/ui-component/U_title/m/index.vue
  65. 50 0
      components/ui-component/U_video/m/index.vue
  66. 130 0
      components/ui-component/U_weather/m/index.vue
  67. 32 0
      components/ui-component/common-config.js
  68. 160 0
      components/ui-component/component-unit/discount/index.vue
  69. 75 0
      components/ui-component/component-unit/image_goods/index.vue
  70. 61 0
      components/ui-component/component-unit/market_price/index.vue
  71. 33 0
      components/ui-component/component-unit/shop_price/index.vue
  72. 155 0
      components/ui-tarpty/ui-tarpty.vue
  73. BIN
      components/updatepage/static/upgrade.png
  74. 22 0
      components/updatepage/uni-popup/message.js
  75. 25 0
      components/updatepage/uni-popup/popup.js
  76. 243 0
      components/updatepage/uni-popup/uni-popup-dialog.vue
  77. 116 0
      components/updatepage/uni-popup/uni-popup-message.vue
  78. 168 0
      components/updatepage/uni-popup/uni-popup-share.vue
  79. 294 0
      components/updatepage/uni-popup/uni-popup.vue
  80. 279 0
      components/updatepage/uni-transition/uni-transition.vue
  81. 371 0
      components/updatepage/updatepage.vue
  82. 253 0
      components/waterfall/waterfall-item.vue
  83. 243 0
      components/waterfall/waterfall-list.vue
  84. 318 0
      components/wxinfo/wxinfo.vue
  85. 1163 0
      components/yfs-video/yfs-video.vue
  86. 93 0
      js/base64.js
  87. 33 0
      js/bindid.js
  88. 469 0
      js/htmlToWxml.js
  89. 273 0
      js/md5.js
  90. 196 0
      js/pathto64.js
  91. 1545 0
      js/underscore.js
  92. 954 0
      js/until.js
  93. 785 0
      js/util.js
  94. 82 0
      js/wxchar.js
  95. 31 0
      libs/amap-wx.130.js
  96. 250 0
      main.js
  97. 254 0
      manifest.json
  98. 461 0
      package-lock.json
  99. 12 0
      package.json
  100. 1087 0
      pages.json

+ 5 - 0
.gitignore

@@ -0,0 +1,5 @@
+
+./unpackage/dist/*
+./unpackage/resources/*
+unpackage
+node_modules

+ 26 - 0
.hbuilderx/launch.json

@@ -0,0 +1,26 @@
+{
+    // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+    // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+    "version" : "0.0",
+    "configurations" : [
+        {
+            "app-plus" : {
+                "launchtype" : "remote"
+            },
+            "default" : {
+                "launchtype" : "remote"
+            },
+            "h5" : {
+                "launchtype" : "remote"
+            },
+            "mp-weixin" : {
+                "launchtype" : "remote"
+            },
+            "type" : "uniCloud"
+        },
+        {
+            "playground" : "custom",
+            "type" : "uni-app:app-android"
+        }
+    ]
+}

+ 8 - 0
.idea/breedingmall_app.iml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 6 - 0
.idea/misc.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="JavaScriptSettings">
+    <option name="languageLevel" value="ES6" />
+  </component>
+</project>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/breedingmall_app.iml" filepath="$PROJECT_DIR$/.idea/breedingmall_app.iml" />
+    </modules>
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 244 - 0
.idea/workspace.xml

@@ -0,0 +1,244 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ChangeListManager">
+    <list default="true" id="97144772-e747-4bf4-ac94-e77a4275149f" name="默认更改列表" comment="">
+      <change beforePath="$PROJECT_DIR$/manifest.json" beforeDir="false" afterPath="$PROJECT_DIR$/manifest.json" afterDir="false" />
+    </list>
+    <ignored path="$PROJECT_DIR$/node_modules/" />
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
+    <option name="SHOW_DIALOG" value="false" />
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+    <option name="LAST_RESOLUTION" value="IGNORE" />
+  </component>
+  <component name="DatabaseView">
+    <option name="SHOW_INTERMEDIATE" value="true" />
+    <option name="GROUP_DATA_SOURCES" value="true" />
+    <option name="GROUP_SCHEMA" value="true" />
+    <option name="GROUP_CONTENTS" value="false" />
+    <option name="SORT_POSITIONED" value="false" />
+    <option name="SHOW_EMPTY_GROUPS" value="false" />
+    <option name="AUTO_SCROLL_FROM_SOURCE" value="false" />
+    <option name="HIDDEN_KINDS">
+      <set />
+    </option>
+    <expand />
+    <select />
+  </component>
+  <component name="FileEditorManager">
+    <leaf />
+  </component>
+  <component name="FindInProjectRecents">
+    <findStrings>
+      <find>pages/cart/cart</find>
+      <find>pages/broadcast/transmit</find>
+      <find>pages/mall/list</find>
+      <find>pages/mall/group</find>
+      <find>pages/index/adoplist/adoplist</find>
+      <find>pages/mall/mall</find>
+      <find>pages/land/land</find>
+      <find>pages/user/user</find>
+      <find>pagesC/pages/index/adoplist/adoplist</find>
+      <find>pagesC/pages/mall/mall</find>
+      <find>pagesC/pages/land/land</find>
+      <find>pagesC/pages/user/user</find>
+      <find>https</find>
+      <find>https://y</find>
+      <find>https://t</find>
+      <find>https://</find>
+      <find>https://z</find>
+    </findStrings>
+    <replaceStrings>
+      <replace />
+      <replace>pagesE/pages/mall/integral</replace>
+      <replace>pages/index/adoplist/adoplist</replace>
+      <replace>pages/mall/mall</replace>
+      <replace>pages/land/land</replace>
+      <replace>pages/user/user</replace>
+    </replaceStrings>
+    <dirStrings>
+      <dir>D:\project\八戒农场\breedingmall_app</dir>
+    </dirStrings>
+  </component>
+  <component name="Git.Settings">
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
+  </component>
+  <component name="IdeDocumentHistory">
+    <option name="CHANGED_PATHS">
+      <list>
+        <option value="$PROJECT_DIR$/pages/index/adoplist/adoplist.vue" />
+        <option value="$PROJECT_DIR$/pagesC/pages/user/user.vue" />
+        <option value="$PROJECT_DIR$/pagesE/pages/cart/cart.vue" />
+        <option value="$PROJECT_DIR$/pagesD/pages/set/renzheng/renzheng.vue" />
+        <option value="$PROJECT_DIR$/pagesC/pages/login/login.vue" />
+        <option value="$PROJECT_DIR$/api/request.js" />
+        <option value="$PROJECT_DIR$/components/ui-component/U_adopt/m/index.vue" />
+        <option value="$PROJECT_DIR$/pagesC/pages/mall/mall.vue" />
+        <option value="$PROJECT_DIR$/pagesD/pages/mall/groupShare.vue" />
+        <option value="$PROJECT_DIR$/pagesD/pages/mall/group_cart.vue" />
+        <option value="$PROJECT_DIR$/pagesD/pages/mall/Bargain_order.vue" />
+        <option value="$PROJECT_DIR$/pagesD/pages/mall/Bargain_cart.vue" />
+        <option value="$PROJECT_DIR$/pagesB/pages/chooseland/chooseland.vue" />
+        <option value="$PROJECT_DIR$/components/ui-component/U_land/m/index.vue" />
+        <option value="$PROJECT_DIR$/unpackage/dist/build/mp-weixin/siteinfo.js" />
+        <option value="$PROJECT_DIR$/../打包文件/前端/模板/siteinfo.js" />
+        <option value="$PROJECT_DIR$/../打包文件/后台/yq_breedingmall/manifest.xml" />
+        <option value="$PROJECT_DIR$/unpackage/dist/build/mp-weixin/common/vendor.js" />
+      </list>
+    </option>
+  </component>
+  <component name="ProjectFrameBounds" extendedState="6">
+    <option name="y" value="20" />
+    <option name="width" value="1920" />
+    <option name="height" value="970" />
+  </component>
+  <component name="ProjectView">
+    <navigator proportions="" version="1">
+      <foldersAlwaysOnTop value="true" />
+    </navigator>
+    <panes>
+      <pane id="Scope" />
+      <pane id="ProjectPane">
+        <subPane>
+          <expand>
+            <path>
+              <item name="breedingmall_app" type="b2602c69:ProjectViewProjectNode" />
+              <item name="breedingmall_app" type="462c0819:PsiDirectoryNode" />
+            </path>
+          </expand>
+          <select />
+        </subPane>
+      </pane>
+    </panes>
+  </component>
+  <component name="PropertiesComponent">
+    <property name="WebServerToolWindowFactoryState" value="false" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/../breedingmall_admin/yq_breedingmall" />
+    <property name="nodejs_interpreter_path" value="node" />
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
+    <property name="nodejs_package_manager_path" value="npm" />
+  </component>
+  <component name="RunDashboard">
+    <option name="ruleStates">
+      <list>
+        <RuleState>
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
+        </RuleState>
+        <RuleState>
+          <option name="name" value="StatusDashboardGroupingRule" />
+        </RuleState>
+      </list>
+    </option>
+  </component>
+  <component name="SvnConfiguration">
+    <configuration />
+  </component>
+  <component name="TaskManager">
+    <task active="true" id="Default" summary="Default task">
+      <changelist id="97144772-e747-4bf4-ac94-e77a4275149f" name="默认更改列表" comment="" />
+      <created>1663900890941</created>
+      <option name="number" value="Default" />
+      <option name="presentableId" value="Default" />
+      <updated>1663900890941</updated>
+      <workItem from="1663900892060" duration="377000" />
+      <workItem from="1663904594867" duration="276000" />
+      <workItem from="1666708707285" duration="345000" />
+      <workItem from="1666712309440" duration="347000" />
+      <workItem from="1666797467694" duration="43000" />
+      <workItem from="1667377654054" duration="1497000" />
+      <workItem from="1667382073714" duration="198000" />
+      <workItem from="1667382411466" duration="701000" />
+      <workItem from="1667383904220" duration="69000" />
+      <workItem from="1670413998925" duration="628000" />
+      <workItem from="1670460647249" duration="20000" />
+      <workItem from="1672198429794" duration="45000" />
+      <workItem from="1672232224849" duration="147000" />
+      <workItem from="1672283240150" duration="602000" />
+      <workItem from="1672284069531" duration="755000" />
+      <workItem from="1676544369822" duration="236000" />
+      <workItem from="1676545211907" duration="620000" />
+      <workItem from="1676549858908" duration="622000" />
+      <workItem from="1676597059269" duration="119000" />
+    </task>
+    <servers />
+  </component>
+  <component name="TimeTrackingManager">
+    <option name="totallyTimeSpent" value="7647000" />
+  </component>
+  <component name="ToolWindowManager">
+    <frame x="-8" y="-8" width="1936" height="1048" extended-state="6" />
+    <layout>
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.20770878" />
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
+      <window_info id="Favorites" order="2" side_tool="true" />
+      <window_info anchor="bottom" id="Message" order="0" />
+      <window_info anchor="bottom" id="Find" order="1" />
+      <window_info anchor="bottom" id="Run" order="2" weight="0.32997763" />
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
+      <window_info anchor="bottom" id="TODO" order="6" />
+      <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
+      <window_info anchor="bottom" id="Database Changes" order="8" />
+      <window_info anchor="bottom" id="Version Control" order="9" />
+      <window_info anchor="bottom" id="Terminal" order="10" />
+      <window_info anchor="bottom" id="Event Log" order="11" side_tool="true" />
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
+      <window_info active="true" anchor="right" id="Database" order="3" visible="true" weight="0.32976446" />
+    </layout>
+  </component>
+  <component name="TypeScriptGeneratedFilesManager">
+    <option name="version" value="1" />
+  </component>
+  <component name="editorHistoryManager">
+    <entry file="file://$PROJECT_DIR$/manifest.json">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="464">
+          <caret line="16" column="21" selection-start-line="16" selection-start-column="21" selection-end-line="16" selection-end-column="21" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/unpackage/dist/dev/mp-weixin/pagesE/pages/broadcast/transmit.js" />
+    <entry file="file://$PROJECT_DIR$/../打包文件/前端/模板/siteinfo.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="116">
+          <caret line="4" column="21" selection-start-line="4" selection-start-column="21" selection-end-line="4" selection-end-column="21" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/unpackage/dist/build/mp-weixin/siteinfo.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="58">
+          <caret line="2" column="13" lean-forward="true" selection-start-line="2" selection-start-column="13" selection-end-line="2" selection-end-column="13" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/../打包文件/后台/yq_breedingmall/manifest.xml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="203">
+          <caret line="7" column="39" lean-forward="true" selection-start-line="7" selection-start-column="39" selection-end-line="7" selection-end-column="39" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/main.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="774">
+          <caret line="56" column="23" selection-start-line="56" selection-start-column="23" selection-end-line="56" selection-end-column="23" />
+          <folding>
+            <element signature="e#0#21#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/unpackage/dist/build/mp-weixin/common/vendor.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="264">
+          <caret line="13" column="39913" selection-start-line="13" selection-start-column="39913" selection-end-line="13" selection-end-column="39913" />
+        </state>
+      </provider>
+    </entry>
+  </component>
+</project>

+ 279 - 0
App.vue

@@ -0,0 +1,279 @@
+<script>
+	import homeApi from '@/api/home/index.js'
+	export default {
+		
+		onLaunch: function() {
+			// console.log('進來了');
+			// #ifdef H5
+			let siteinfo=require('./siteinfo.js');
+			var script = document.createElement('script');
+			script.src = siteinfo.h5_siteroot+"/h5/static/js/EasyPlayer-element.min.js?v=202204071988";
+			document.body.appendChild(script);
+			// #endif
+		},
+		onShow: function() {
+			// console.log('App Show');
+			// #ifdef MP-WEIXIN
+			const updateManager = uni.getUpdateManager();
+			updateManager.onCheckForUpdate(function(res) {
+				// 请求完新版本信息的回调
+				console.log(res.hasUpdate);
+			});
+			updateManager.onUpdateReady(function(res) {
+				// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+				updateManager.applyUpdate();
+			});
+			updateManager.onUpdateFailed(function(res) {
+				// 新的版本下载失败
+			});
+			// #endif
+		},
+		onHide: function() {
+
+		},
+		util: require('./js/util.js'),
+		globalData: {
+			siteinfo: require('./siteinfo.js')
+		},
+		methods: {
+
+		}
+	};
+</script>
+<style lang="scss">
+	/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
+	@import "@/uni_modules/uview-ui/index.scss";
+	@import 'static/css/reset.css';
+	@import "static/style/base.scss";
+</style>
+<style lang="scss">
+	body {
+		/* #ifdef APP-PLUS || H5 */
+		font-family: newfont;
+		/* #endif */
+	}
+
+	uni-view {
+		/* #ifdef APP-PLUS || H5 */
+		font-family: newfont;
+		/* #endif */
+	}
+
+	.all_box {
+		min-height: calc(100vh);
+		max-width: 750rpx;
+		background-color: #f7f7f8;
+		/* #ifdef APP-PLUS || H5 */
+		font-family: newfont;
+		/* #endif */
+	}
+
+	/* #ifdef APP-PLUS || H5*/
+	@font-face {
+		font-family: newfont;
+		src: url("~@/static/font/myfont5.otf") format("truetype")
+	}
+
+	/* #endif */
+
+	/* 取消默认标题加粗 */
+	uni-page-head .uni-page-head__title {
+		font-weight: normal;
+	}
+</style>
+<style lang="less">
+	@import '@/uni_modules/tob-less/index.less';
+
+	/* A品牌的配色 */
+	.theme-A {
+
+		/* 提供配色依赖 */
+		.ProvideColors( {
+				/* 品牌色 */
+				primary: #ff8903;
+				/* 按钮 */
+				secondary: #ff8903;
+				/* 文字主色 */
+				accent: #333333;
+				/* 文字辅助 */
+				auxiliary: #666666;
+				/* 文字说明 */
+				explain:#999999;
+				/* 价格 */
+				neutral: #ff0000;
+				/* 背景 */
+				base: #f7f7f8;
+
+				/* 渐变 */
+				gradient1:#fea858;
+
+				gradient2:#ff8903
+			}
+
+		);
+	}
+
+	/* B品牌的配色 */
+	.theme-B {
+
+		/* 提供配色依赖 */
+		.ProvideColors( {
+				/* 品牌色 */
+				primary: #e52340;
+				/* 按钮 */
+				secondary: #e52340;
+				/* 文字主色 */
+				accent: #333333;
+				/* 文字辅助 */
+				auxiliary: #666666;
+				/* 文字说明 */
+				explain:#999999;
+				/* 价格 */
+				neutral: #ff0000;
+				/* 背景 */
+				base: #f7f7f8;
+
+				/* 渐变 */
+				gradient1:#fd876f;
+
+				gradient2:#e52340
+			}
+
+		);
+	}
+
+	/* C的配色 */
+	.theme-C {
+		.ProvideColors( {
+				/* 品牌色 */
+				primary: #ffd100;
+				/* 按钮 */
+				secondary: #ffd100;
+				/* 文字主色 */
+				accent: #333333;
+				/* 文字辅助 */
+				auxiliary: #666666;
+				/* 文字说明 */
+				explain:#999999;
+				/* 价格 */
+				neutral: #ff0000;
+				/* 背景 */
+				base: #f7f7f8;
+
+				/* 渐变 */
+				gradient1:#f4bb00;
+
+				gradient2:#ffd100
+			}
+
+		);
+	}
+
+	/* D的配色 */
+	.theme-D {
+		.ProvideColors( {
+				/* 品牌色 */
+				primary: #4B086D;
+				/* 按钮 */
+				secondary: #4B086D;
+				/* 文字主色 */
+				accent: #333333;
+				/* 文字辅助 */
+				auxiliary: #666666;
+				/* 文字说明 */
+				explain:#999999;
+				/* 价格 */
+				neutral: #ff0000;
+				/* 背景 */
+				base: #f7f7f8;
+
+				/* 渐变 */
+				gradient1:#acc0fe;
+
+				gradient2:#4B086D
+			}
+
+		);
+	}
+
+	/* E的配色 */
+	.theme-E {
+		.ProvideColors( {
+				/* 品牌色 */
+				primary: #014872;
+				/* 按钮 */
+				secondary: #014872;
+				/* 文字主色 */
+				accent: #333333;
+				/* 文字辅助 */
+				auxiliary: #666666;
+				/* 文字说明 */
+				explain:#999999;
+				/* 价格 */
+				neutral: #ff0000;
+				/* 背景 */
+				base: #f7f7f8;
+
+				/* 渐变 */
+				gradient1:#a0eacf;
+
+				gradient2:#014872
+			}
+
+		);
+	}
+
+	/* F的配色 */
+	.theme-F {
+		.ProvideColors( {
+				/* 品牌色 */
+				primary: #067d68;
+				/* 按钮 */
+				secondary: #067d68;
+				/* 文字主色 */
+				accent: #333333;
+				/* 文字辅助 */
+				auxiliary: #666666;
+				/* 文字说明 */
+				explain:#999999;
+				/* 价格 */
+				neutral: #ff0000;
+				/* 背景 */
+				base: #f7f7f8;
+
+				/* 渐变 */
+				gradient1:#50d5b7;
+
+				gradient2:#067d68
+			}
+
+		);
+	}
+
+	/* F的配色 */
+	.theme-G {
+		.ProvideColors( {
+				/* 品牌色 */
+				primary: #56AB2F;
+				/* 按钮 */
+				secondary: #56AB2F;
+				/* 文字主色 */
+				accent: #333333;
+				/* 文字辅助 */
+				auxiliary: #666666;
+				/* 文字说明 */
+				explain:#999999;
+				/* 价格 */
+				neutral: #ff0000;
+				/* 背景 */
+				base: #f7f7f8;
+
+				/* 渐变 */
+				gradient1:#56AB2F;
+
+				gradient2:#56AB2F
+			}
+
+		);
+	}
+</style>

+ 7 - 0
README.md

@@ -0,0 +1,7 @@
+# tabbar使用说明
+1.常规组件使用即可
+
+#### 参数说明
+1.modelData default [{label:"测试"},{label:"测试"},{label:"测试"}]
+ 
+2.initIndex default 0

+ 28 - 0
androidPrivacy.json

@@ -0,0 +1,28 @@
+{
+    "version" : "1",
+    "prompt" : "template",
+    "title" : "服务协议和隐私政策",
+    "message" : "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"https://zhly.yqin.cn/article/code/29\">《服务协议》</a>和<a href=\"https://zhly.yqin.cn/article/code/28\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
+    "buttonAccept" : "同意并接受",
+    "buttonRefuse" : "暂不同意",
+    "hrefLoader" : "system|default",
+    "second" : {
+        "title" : "确认提示",
+        "message" : "  进入应用前,你需先同意<a href=\"https://zhly.yqin.cn/article/code/29\">《服务协议》</a>和<a href=\"https://zhly.yqin.cn/article/code/28\">《隐私政策》</a>,否则将退出应用。",
+        "buttonAccept" : "同意并继续",
+        "buttonRefuse" : "退出应用"
+    },
+    "styles" : {
+        "backgroundColor" : "#f7f7f8",
+        "borderRadius" : "5px",
+        "title" : {
+            "color" : "#666666"
+        },
+        "buttonAccept" : {
+            "color" : "#333333"
+        },
+        "buttonRefuse" : {
+            "color" : "#999999"
+        }
+    }
+}

+ 30 - 0
api/address/address.js

@@ -0,0 +1,30 @@
+import request from '@/api/request.js'
+/* 添加收货地址 */
+function addressSet(data){
+	return request({
+		url: '/api/Vip/addressSet2',
+		method: 'post',
+		data
+	})
+}
+/* 获取收货地址 */
+function address(data){
+	return request({
+		url: '/api/Vip/addressList2',
+		method: 'post',
+		data
+	})
+}
+/* 获取收货地址 */
+function addressDel(data){
+	return request({
+		url: '/api/Vip/addressDel',
+		method: 'post',
+		data
+	})
+}
+export default {
+    addressSet,
+    address,
+    addressDel
+}

+ 44 - 0
api/appsecret.js

@@ -0,0 +1,44 @@
+import Vue from 'vue'
+import md5 from './md5.js';
+import App from '@/App.vue'
+
+export function getSign(params, timestamp) {
+
+	var relurt = '';
+	if (typeof params == "string") {
+		relurt = paramsStrSort(params, timestamp);
+	} else if (typeof params == "object") {
+		var relurt = jsonSort(params);
+		relurt = paramsStrSort(relurt, timestamp);
+	}
+	return relurt;
+}
+export function paramsStrSort(paramsStr, timestamp) {
+	console.log('paramsStr',paramsStr)
+	let author = Vue.prototype.$author;
+	let sp_paramsStr = paramsStr.split('&')
+	let newParamsStr = []
+	for (var i = 0; i < sp_paramsStr.length; i++) {
+		if (sp_paramsStr[i] != '' && sp_paramsStr[i] != 'null' && sp_paramsStr[i] != 'undefined') {
+			newParamsStr.push(sp_paramsStr[i])
+		}
+	}
+	newParamsStr = newParamsStr.join('&')
+	var newUrl = newParamsStr + '@' + timestamp + '@' + author.authkey;
+	return md5(newUrl);
+}
+export function jsonSort(jsonObj) {
+	let arr = [];
+	for (var key in jsonObj) {
+		if (jsonObj[key] != undefined)
+			arr.push(key);
+
+	}
+	arr.sort();
+	let str = '';
+	for (var i in arr) {
+		str += jsonObj[arr[i]] + "&"
+	}
+	const relurt = str.substr(0, str.length - 1)
+	return relurt;
+}

+ 28 - 0
api/broadcast/index.js

@@ -0,0 +1,28 @@
+import request from '@/api/request.js'
+function getList(data){
+	return request({
+		url: '/api/Video/catelist2',
+		method: 'get',
+		data
+	})
+}
+function getvideo(data){
+	return request({
+		url: '/api/Video/getvideo2',
+		method: 'get',
+		data
+	})
+}
+function indexList(data){
+	return request({
+		url: '/api/index/indexList',
+		method: 'post',
+		data
+	})
+}
+
+export default {
+	getList,
+	getvideo,
+	indexList
+}

+ 60 - 0
api/cart/index.js

@@ -0,0 +1,60 @@
+import request from '@/api/request.js'
+/* 购物车|查询购物车 */
+function basket(data){
+	return request({
+		url: '/api/Shop/basket',
+		method: 'get',
+		data
+	})
+}
+/* 购物车|删除购物车所有 */
+function clearbasket(data){
+	return request({
+		url: '/api/Shop/clearbasket',
+		method: 'post',
+		data
+	})
+}
+/* 购物车|删除购物 */
+function delbasket(data){
+	return request({
+		url: '/api/Shop/delbasket',
+		method: 'post',
+		data
+	})
+}
+/* 商城-订单信息 */
+function checkbasket(data){
+	return request({
+		url: '/api/shop/checkbasket',
+		method: 'post', 
+		data
+	})
+}
+
+/* 商城-自提查询 */
+function pickup(data){
+	return request({
+		url: '/api/Ajax/pickup',
+		method: 'post', 
+		data
+	})
+}
+/* 商城-支付 */
+function checkPayPassword(data){
+	return request({
+		url: '/api/Shop/checkPayPassword',
+		method: 'post', 
+		data
+	})
+}
+
+
+export default {
+    basket,
+    clearbasket,
+    delbasket,
+    checkbasket,
+    pickup,
+    checkPayPassword
+}

+ 43 - 0
api/getSetting.js

@@ -0,0 +1,43 @@
+//订阅模板消息函数
+
+/* tmplId 参数传数组   callback 回调函数*/
+function Setting(tmplId,callback){
+	uni.getSetting({
+	  withSubscriptions: true,
+	  success(res) {
+		var itemSettings = res.subscriptionsSetting.itemSettings?res.subscriptionsSetting.itemSettings:"";
+		console.log("订阅模板消息列表"+JSON.stringify(res))
+		if (itemSettings) {
+		  if (itemSettings[tmplId]=='accept') {
+			  // 已授权过不再显示
+			console.log('is accredit:ok')
+		  }else{
+			  //未授权唤起授权
+			  uni.requestSubscribeMessage({
+			    tmplIds: tmplId,
+			    success (res) {
+			  	console.log(res)
+			  	  // reject 表示取消授权
+			  	  if(res[tmplId] === 'reject'){}
+			  	  // accept 表示授权
+			  	  if(res[tmplId] === 'accept'){
+					  
+				  }
+			    }
+			  })
+		  }
+		}else{
+			uni.requestSubscribeMessage({
+			  tmplIds: tmplId,
+			  success (res) {
+				console.log(res)
+				  // reject 表示取消授权
+				  if(res[tmplId] === 'reject'){}
+				  // accept 表示授权
+				  if(res[tmplId] === 'accept'){}
+			  }
+			})
+		}
+	  }
+	})
+}

+ 347 - 0
api/home/index.js

@@ -0,0 +1,347 @@
+import request from '@/api/request.js'
+
+function home(data) {
+	return request({
+		url: '/api/shop/home',
+		method: 'post',
+		data
+	})
+}
+
+function getcar(data) {
+	return request({
+		url: '/api/shop/getcar',
+		method: 'post',
+		data
+	})
+}
+
+function share2(data) {
+	return request({
+		url: '/api/share/share2',
+		method: 'post',
+		data
+	})
+}
+
+function homeget(data) {
+	return request({
+		url: '/api/shop/home',
+		method: 'get',
+		data
+	})
+}
+
+function navtopage(item) {
+	console.log('item',JSON.stringify(item))
+	if (item.media_type == 1) {
+		uni.navigateTo({
+			url: `/pagesD/pages/product/product?id=${item.ad_link}`
+		});
+	} else if (item.media_type == 2) {
+		uni.navigateTo({
+			url: `/pagesA/pages/adopt/adopt?id=${item.ad_link}`
+		});
+	} else if (item.media_type == 3) {
+		let ad_link = encodeURIComponent(JSON.stringify(item.ad_link));
+		uni.navigateTo({
+			url: `/pagesE/pages/showhfive/showhfive?url=${ad_link}`
+		})
+	}
+}
+
+function index(data) {
+	return request({
+		url: '/api/shop/index2',
+		method: 'post',
+		data
+	})
+}
+
+function tabbar(data) {
+	return request({
+		url: '/api/shop/tabbar',
+		method: 'post',
+		data
+	})
+}
+
+function userShare(data) {
+	return request({
+		url: '/api/Share/userShare',
+		method: 'post',
+		data
+	})
+}
+
+function myqrcode(data) {
+	return request({
+		url: '/api/fx/myqrcode',
+		method: 'post',
+		data
+	})
+}
+//签到动作
+function vipSign(data) {
+	return request({
+		url: '/api/Vip/sign',
+		method: 'post',
+		data
+	})
+}
+//签到信息
+function shopSign(data) {
+	return request({
+		url: '/api/shop/sign',
+		method: 'get',
+		data
+	})
+}
+//签到信息
+function shopSignPost(data) {
+	return request({
+		url: '/api/shop/sign',
+		method: 'post',
+		data
+	})
+}
+
+function lists(data) {
+	return request({
+		url: '/api/Campaign/lists',
+		method: 'post',
+		data
+	})
+}
+
+function buyIndex(data) {
+	return request({
+		url: '/api/Buy/index',
+		method: 'post',
+		data
+	})
+}
+
+function ad_advertisement(data) {
+	return request({
+		url: '/api/Article/ad_advertisement',
+		method: 'post',
+		data
+	})
+}
+//共享联养
+function details(data) {
+	return request({
+		url: '/api/Buy/details',
+		method: 'post',
+		data
+	})
+}
+
+function order_make(data) {
+	return request({
+		url: '/api/Buy/order_make',
+		method: 'post',
+		data
+	})
+}
+
+function orderDetail(data) {
+	return request({
+		url: '/api/Buy/orderDetail',
+		method: 'post',
+		data
+	})
+}
+
+function cancoupon(data) {
+	return request({
+		url: '/api/Buy/cancoupon',
+		method: 'post',
+		data
+	})
+}
+
+function payNew(data) {
+	return request({
+		url: '/api/Buy/payNew',
+		method: 'post',
+		data
+	})
+}
+//合同详情
+function contract_tplinfo(data) {
+	return request({
+		url: '/api/ajax/contract_tplinfo',
+		method: 'post',
+		data
+	})
+}
+
+function partydetail(data) {
+	return request({
+		url: '/api/article/partydetail',
+		method: 'post',
+		data
+	})
+}
+//商品详情
+function choose(data) {
+	return request({
+		url: '/api/Buy/choose',
+		method: 'post',
+		data
+	})
+}
+//搜索
+function searchs(data) {
+	return request({
+		url: '/api/shop/searchs',
+		method: 'post',
+		data
+	})
+}
+
+function vipIndex(data) {
+	return request({
+		url: '/api/vip/index',
+		method: 'post',
+		data
+	})
+}
+
+function Campaign(data) {
+	return request({
+		url: '/api/Campaign/index',
+		method: 'get',
+		data
+	})
+}
+
+function Artical(data) {
+	return request({
+		url: '/api/Article/artical',
+		method: 'post',
+		data
+	})
+}
+function Notice(data) {
+	return request({
+		url: '/api/Article/index',
+		method: 'post',
+		data
+	})
+}
+
+function renyang_pay(data) {
+	return request({
+		url: '/api/Wxpaycz/renyang_pay',
+		method: 'post',
+		data
+	})
+}
+
+function addresOrder(data) {
+	return request({
+		url: '/api/Buy/addresOrder',
+		method: 'post',
+		data
+	})
+}
+
+function getgoods(data) {
+	return request({
+		url: '/api/index/getgoods2',
+		method: 'post',
+		data
+	})
+}
+function ptzctrl(data) {
+	return request({
+		url: '/api/video/ptzctrl',
+		method: 'post',
+		data
+	})
+}
+// 商户信息
+function merchantindex(data){
+	return request({
+		url: '/api/merchant/merchantindex',
+		method: 'post',
+		data
+	})
+}
+// 商户信息
+function farmproperty(data){
+	return request({
+		url: '/api/buy/farmproperty',
+		method: 'post',
+		data
+	})
+}
+ 
+// 商户信息
+function codeqorce(data){
+	return request({
+		url: '/api/buy/codeqorce',
+		method: 'post',
+		data
+	})
+}
+
+// 商户信息
+function bondindex(data){
+	return request({
+		url: '/api/merchant/bondindex',
+		method: 'post',
+		data
+	})
+}
+// 商户信息
+function thaw(data){
+	return request({
+		url: '/api/merchant/thaw',
+		method: 'post',
+		data
+	})
+}
+ 
+export default {
+	thaw,
+	bondindex,
+	ptzctrl,
+	share2,
+	getgoods,
+	index,
+	userShare,
+	myqrcode,
+	vipSign,
+	shopSign,
+	shopSignPost,
+	lists,
+	buyIndex,
+	ad_advertisement,
+	details,
+	order_make,
+	orderDetail,
+	cancoupon,
+	payNew,
+	contract_tplinfo,
+	partydetail,
+	choose,
+	home,
+	searchs,
+	vipIndex,
+	Campaign,
+	homeget,
+	tabbar,
+	Artical,
+	Notice,
+	renyang_pay,
+	navtopage,
+	getcar,
+	addresOrder,
+	merchantindex,
+	farmproperty,
+	codeqorce
+}

+ 227 - 0
api/land/index.js

@@ -0,0 +1,227 @@
+import request from '@/api/request.js'
+//种子列表
+function seed_list(data) {
+	return request({
+		url: '/api/seed/seed_list',
+		method: 'post',
+		data
+	})
+}
+//种子列表
+function seed_lists(data) {
+	return request({
+		url: '/api/seed/seed_list2',
+		method: 'post',
+		data
+	})
+}
+//获取土地列表
+function landlist(data) {
+	return request({
+		url: '/api/soil/soil_list',
+		method: 'post',
+		data
+	})
+}
+// 获取土地详情
+function getlanddeilt(data) {
+	return request({
+		url: '/api/soil/index',
+		method: 'post',
+		data
+	})
+}
+// 获取土地租赁协议
+function getlandpcol(data) {
+	return request({
+		url: '/api/soil/protocol',
+		method: 'post',
+		data
+	})
+}
+// 获取服务详情
+function getservicemanage(data) {
+	return request({
+		url: '/api/servicemanage/index',
+		method: 'post',
+		data
+	})
+}
+// 获取服务详情
+function getsecemist(data) {
+	return request({
+		url: '/api/servicemanage/servicemanage_list2',
+		method: 'post',
+		data
+	})
+}
+// 获取服务详情
+function getserdebyid(data) {
+	return request({
+		url: '/api/servicemanage/index',
+		method: 'post',
+		data
+	})
+}
+
+// 获取订单信息
+function getlandorder(data) {
+	return request({
+		url: '/api/soil/order_list',
+		method: 'post',
+		data
+	})
+}
+// 根据id查看订单详情
+function lookorderbyid(data) {
+	return request({
+		url: '/api/soil/order_index',
+		method: 'post',
+		data
+	})
+}
+// 根据id查看订单详情
+function lookorderbyids(data) {
+	return request({
+		url: '/api/soil/order_index2',
+		method: 'post',
+		data
+	})
+}
+// 修改订单
+function updateorder(data) {
+	return request({
+		url: '/api/soil/order_edit',
+		method: 'post',
+		data
+	})
+}
+// 查找服务信息
+function selordermessbyid(data) {
+	return request({
+		url: '/api/soil/soil_manage2',
+		method: 'post',
+		data
+	})
+}
+
+// 巡检记录
+function register(data) {
+	return request({
+		url: '/api/soil/register',
+		method: 'post',
+		data
+	})
+}
+// 获取订单
+function getwlorder(data) {
+	return request({
+		url: '/api/soil/soil_seed_delivery',
+		method: 'post',
+		data
+	})
+}
+// 土地租赁退款
+function soilTuikuan(data) {
+	return request({
+		url: '/api/soil/soilTuikuan',
+		method: 'post',
+		data
+	})
+}
+
+
+
+// 模块数据
+function getlist(data) {
+	return request({
+		url: '/api/cms/getlist',
+		method: 'post',
+		data
+	})
+}
+
+// 续租服务
+function renewal(data) {
+	return request({
+		url: '/api/soil/renewal',
+		method: 'post',
+		data
+	})
+}
+
+// 种子信息
+function cropseed(data) {
+	return request({
+		url: '/api/soil/cropseed',
+		method: 'post',
+		data
+	})
+}
+// 服务工单
+function getoperator(data) {
+	return request({
+		url: '/api/soil/getoperator',
+		method: 'post',
+		data
+	})
+}
+// 工单任务
+function workoperator(data) {
+	return request({
+		url: '/api/soil/workoperator',
+		method: 'post',
+		data
+	})
+}
+// 工单处理
+function chuoperator(data) {
+	return request({
+		url: '/api/soil/chuoperator',
+		method: 'post',
+		data
+	})
+}
+// 订单信息
+function orderinformation(data) {
+	return request({
+		url: '/api/soil/orderinformation',
+		method: 'post',
+		data
+	})
+}
+// 土地装饰
+function decoration(data) {
+	return request({
+		url: '/api/soil/decoration',
+		method: 'post',
+		data
+	})
+}
+
+export default {
+	getlist,
+	soilTuikuan,
+	landlist,
+	seed_list,
+	getlanddeilt,
+	getlandpcol,
+	getservicemanage,
+	getsecemist,
+	getserdebyid,
+	getlandorder,
+	lookorderbyid,
+	updateorder,
+	selordermessbyid,
+	getwlorder,
+	lookorderbyids,
+	renewal,
+	register,
+	seed_lists,
+	cropseed,
+	getoperator,
+	workoperator,
+	chuoperator,
+	orderinformation,
+	decoration
+}

+ 112 - 0
api/login/login.js

@@ -0,0 +1,112 @@
+import request from '@/api/request.js'
+    
+//登录
+function login(data){
+	return request({
+		url: '/api/login/login',
+		method: 'post',
+		data
+	})
+}
+//登录
+function editpass(data){
+	return request({
+		url: '/api/login/editpass',
+		method: 'post',
+		data
+	})
+}
+//登录
+function h5wxlogin(data){
+	return request({
+		url: '/api/login/h5wxlogin',
+		method: 'post',
+		data
+	})
+}
+
+function sendRegCode(data){
+	return request({
+		url: '/api/sms/sendRegCode',
+		method: 'post',
+		data
+	})
+}
+//注册
+function reg(data){
+	return request({
+		url: '/api/login/reg',
+		method: 'post',
+		data
+	})
+}
+//获取验证码
+function sendvecode(data) {
+	return request({
+		url: '/api/index/send ',
+		method: 'post',
+		data
+	})
+}
+//微信登录
+function wxlogin_v2(data) {
+	return request({
+		url: '/api/login/wxlogin',
+		method: 'post',
+		data
+	})
+}
+//微信登录
+function wxlogin(data) {
+	return request({
+		url: '/api/login/appwxlogin',
+		method: 'post',
+		data
+	})
+}
+function wxxcxLogin(data){
+	return request({
+		url: '/api/WxLogin/reglog',
+		method: 'post',
+		data
+	})
+}
+//QQ登录
+function qqlogin(data) {
+	return request({
+		url: '/api/login/appqqlogin',
+		method: 'post',
+		data
+	})
+}
+
+//获取配置(获取appid)
+function wxgzhappid(data) {
+	return request({
+		url: '/api/shop/wxgzhappid',
+		method: 'post',
+		data
+	})
+}
+//更新用户基本信息
+function upuserinfo(data) {
+	return request({
+		url: '/api/login/upuserinfo',
+		method: 'post',
+		data
+	})
+}
+export default {
+	wxgzhappid,
+	upuserinfo,
+	qqlogin,
+	wxlogin,
+	sendvecode,
+	login,
+	wxxcxLogin,
+	h5wxlogin,
+	editpass,
+	wxlogin_v2,
+	sendRegCode,
+	reg
+}

+ 446 - 0
api/mall/index.js

@@ -0,0 +1,446 @@
+import request from '@/api/request.js'
+
+function scoreshop(data) {
+	return request({
+		url: '/api/score/index',
+		method: 'post',
+		data
+	})
+}
+
+function exchange(data) {
+	return request({
+		url: '/api/score/exchange',
+		method: 'post',
+		data
+	})
+}
+/* 兑换详情 */
+function goods(data) {
+	return request({
+		url: '/api/score/goods',
+		method: 'post',
+		data
+	})
+}
+/* 积分商城-生成订单 */
+function orderMake(data) {
+	return request({
+		url: '/api/score/orderMake',
+		method: 'post',
+		data
+	})
+}
+
+/* 添加购物车 */
+function addtobasket(data) {
+	return request({
+		url: '/api/Shop/addtobasket',
+		method: 'post',
+		data
+	})
+}
+/* 积分商城-sku */
+function shoopgoods(data) {
+	return request({
+		url: '/api/Shop/goods',
+		method: 'post',
+		data
+	})
+}
+/* 积分商城-库存检测 */
+function fastbuys(data) {
+	return request({
+		url: '/api/Shop/fastbuy',
+		method: 'post',
+		data
+	})
+}
+/* 积分商城-支付订单获取 */
+function orderIndex(data) {
+	return request({
+		url: '/api/score/orderIndex',
+		method: 'post',
+		data
+	})
+}
+
+/* 商城-首页 */
+function shop(data) {
+	return request({
+		url: '/api/shop/home',
+		method: 'get',
+		data
+	})
+}
+
+/* 商城-订单信息 */
+function shop_orderMake(data) {
+	return request({
+		url: '/api/shop/orderMake',
+		method: 'get', // post 为提交
+		data
+	})
+}
+/* 商城-订单信息-提交 */
+function shop_orderMake_post(data) {
+	return request({
+		url: '/api/shop/orderMake',
+		method: 'post', // post 为提交
+		data
+	})
+}
+
+/* 商城-省份 && 城市*/
+function getRegion(data) {
+	return request({
+		url: '/api/Api/getRegion',
+		method: 'get',
+		data
+	})
+}
+
+/* 商城- 市区*/
+function getTwon(data) {
+	return request({
+		url: '/api/Api/getTwon',
+		method: 'get',
+		data
+	})
+}
+
+/* 商城- 拼团*/
+function actlist(data) {
+	return request({
+		url: '/api/Activity/actlist',
+		method: 'post',
+		data
+	})
+}
+
+/* 商城- 配送*/
+function category(data) {
+	return request({
+		url: '/api/Shop/category2',
+		method: 'post',
+		data
+	})
+}
+
+/* 商城- 配送*/
+function goodslist(data) {
+	return request({
+		url: '/api/Shop/goodslist2',
+		method: 'post',
+		data
+	})
+}
+/* 商城- 配送*/
+function pay(data) {
+	return request({
+		url: '/api/Shop/pay',
+		method: 'get',
+		data
+	})
+}
+
+
+/* 兑换记录     带来注册type=2    带来消费 type=5 */
+function credit(data) {
+	return request({
+		url: '/api/Vip/credit',
+		method: 'post', // post 为提交
+		data
+	})
+}
+
+/* 拼团- 列表*/
+function actgoods(data) {
+	return request({
+		url: '/api/Activity/actgoods',
+		method: 'post',
+		data
+	})
+}
+/* 拼团- 列表-详情*/
+function joinGroup(data) {
+	return request({
+		url: '/api/Activity/joinGroup',
+		method: 'post',
+		data
+	})
+}
+/* 拼团- 列表-分享*/
+function groupShare(data) {
+	return request({
+		url: '/api/Activity/groupShare',
+		method: 'post',
+		data
+	})
+}
+
+
+
+/* 砍价   type=1 全部砍价   type=2 砍价中  type=3 已购买*/
+function barlist(data) {
+	return request({
+		url: '/api/Activity/barlist',
+		method: 'post', // post 为提交
+		data
+	})
+}
+
+//砍价商品详情
+function bargoods(data) {
+	return request({
+		url: '/api/activity/bargoods',
+		method: 'post', // post 为提交
+		data
+	})
+}
+
+//砍价
+function bargain(data) {
+	return request({
+		url: '/api/Activity/bargain',
+		method: 'post', // post 为提交
+		data
+	})
+}
+
+//砍一刀
+function help(data) {
+	return request({
+		url: '/api/Activity/help',
+		method: 'post', // post 为提交
+		data
+	})
+}
+
+function wxpay(data) {
+	return request({
+		url: '/api/Wxpaycz/shoppay',
+		method: 'post',
+		data
+	})
+}
+
+function advertisement(data) {
+	return request({
+		url: '/api/Article/ad_advertisement',
+		method: 'post',
+		data
+	})
+}
+
+// 收藏
+function goodslike(data) {
+	return request({
+		url: '/api/shop/goodslike',
+		method: 'post',
+		data
+	})
+}
+
+//收藏列表
+function goodslikelist(data) {
+	return request({
+		url: '/api/shop/goodslikelist',
+		method: 'post',
+		data
+	})
+}
+
+//下单土地
+function singleland(data) {
+	return request({
+		url: '/api/wxpaysoil/pay',
+		method: 'post',
+		data
+	})
+}
+//获取后台实名认证状态
+function getrecation(data) {
+	return request({
+		url: '/api/vip/isneedaudit',
+		method: 'post',
+		data
+	})
+}
+//余额支付
+function paybyinfo(data) {
+	return request({
+		url: '/api/wxpaysoil/pay_money',
+		method: 'post',
+		data
+	})
+}
+//商城列表
+function cardlist(data) {
+	return request({
+		url: '/api/shop/cardlist2',
+		method: 'post',
+		data
+	})
+}
+//领取优惠卷
+function getcoupon(data) {
+	return request({
+		url: '/api/shop/getcard',
+		method: 'post',
+		data
+	})
+}
+//活动分类
+function getofflineindex(data) {
+	return request({
+		url: '/api/offline_activity/offline_index',
+		method: 'post',
+		data
+	})
+}
+//活动列表
+function getofinlist(data) {
+	return request({
+		url: '/api/offline_activity/offline_activity_list',
+		method: 'post',
+		data
+	})
+}
+//活动详情
+function getdeitbyid(data) {
+	return request({
+		url: '/api/offline_activity/index',
+		method: 'post',
+		data
+	})
+}
+//活动订单退款
+function refund(data){
+	return request({
+		url: '/api/offline_activity/refund',
+		method: 'post',
+		data,
+	})
+}
+//核销详情
+function writeindex(data){
+	return request({
+		url: '/api/offline_activity/write_index',
+		method: 'post',
+		data,
+	})
+}
+//确认核销
+function writeoff(data){
+	return request({
+		url: '/api/offline_activity/writeoff',
+		method: 'post',
+		data,
+	})
+}
+//收藏
+function setcareheart(data) {
+	return request({
+		url: '/api/offline_activity/activity_collect',
+		method: 'post',
+		data
+	})
+}
+//分销申请主页
+function fxindex(data) {
+	return request({
+		url: '/api/vip/fx_index',
+		method: 'post',
+		data
+	})
+}
+//分销申请
+function dionation(data) {
+	return request({
+		url: '/api/vip/fx_apply',
+		method: 'post',
+		data
+	})
+}
+//余额活动支付
+function payfooice(data) {
+	return request({
+		url: '/api/wxpayoffline/pay_money',
+		method: 'post',
+		data
+	})
+}
+//wx余额支付
+function wxpayfooice(data) {
+	return request({
+		url: '/api/wxpayoffline/pay',
+		method: 'post',
+		data
+	})
+}
+//我的活动
+function myacunton(data) {
+	return request({
+		url: '/api/offline_activity/order_list',
+		method: 'post',
+		data
+	})
+}
+//活动订单详情
+function orderindex(data) {
+	return request({
+		url: '/api/offline_activity/order_index',
+		method: 'post',
+		data
+	})
+}
+export default {
+	writeoff,
+	writeindex,
+	refund,
+	scoreshop,
+	exchange,
+	goods,
+	orderMake,
+	addtobasket,
+	shoopgoods,
+	fastbuys,
+	orderIndex,
+	shop,
+	shop_orderMake,
+	getRegion,
+	getTwon,
+	actlist,
+	category,
+	goodslist,
+	credit,
+	barlist,
+	actgoods,
+	joinGroup,
+	groupShare,
+	shop_orderMake_post,
+	bargoods,
+	bargain,
+	fxindex,
+	help,
+	pay,
+	wxpay,
+	advertisement,
+	goodslike,
+	goodslikelist,
+	singleland,
+	getrecation,
+	paybyinfo,
+	cardlist,
+	getcoupon,
+	getofinlist,
+	getdeitbyid,
+	setcareheart,
+	dionation,
+	payfooice,
+	wxpayfooice,
+	myacunton,
+	orderindex,
+	getofflineindex
+}

+ 203 - 0
api/md5.js

@@ -0,0 +1,203 @@
+/*  
+ * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message  
+ * Digest Algorithm, as defined in RFC 1321.  
+ * Version 1.1 Copyright (C) Paul Johnston 1999 - 2002.  
+ * Code also contributed by Greg Holt  
+ * See http://pajhome.org.uk/site/legal.html for details.  
+ */
+
+/*  
+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally  
+ * to work around bugs in some JS interpreters.  
+ */
+function safe_add(x, y) {
+  var lsw = (x & 0xFFFF) + (y & 0xFFFF)
+  var msw = (x >> 16) + (y >> 16) + (lsw >> 16)
+  return (msw << 16) | (lsw & 0xFFFF)
+}
+
+/*  
+ * Bitwise rotate a 32-bit number to the left.  
+ */
+function rol(num, cnt) {
+  return (num << cnt) | (num >>> (32 - cnt))
+}
+
+/*  
+ * These functions implement the four basic operations the algorithm uses.  
+ */
+function cmn(q, a, b, x, s, t) {
+  return safe_add(rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b)
+}
+function ff(a, b, c, d, x, s, t) {
+  return cmn((b & c) | ((~b) & d), a, b, x, s, t)
+}
+function gg(a, b, c, d, x, s, t) {
+  return cmn((b & d) | (c & (~d)), a, b, x, s, t)
+}
+function hh(a, b, c, d, x, s, t) {
+  return cmn(b ^ c ^ d, a, b, x, s, t)
+}
+function ii(a, b, c, d, x, s, t) {
+  return cmn(c ^ (b | (~d)), a, b, x, s, t)
+}
+
+/*  
+ * Calculate the MD5 of an array of little-endian words, producing an array  
+ * of little-endian words.  
+ */
+function coreMD5(x) {
+  var a = 1732584193
+  var b = -271733879
+  var c = -1732584194
+  var d = 271733878
+
+  for (var i = 0; i < x.length; i += 16) {
+    var olda = a
+    var oldb = b
+    var oldc = c
+    var oldd = d
+
+    a = ff(a, b, c, d, x[i + 0], 7, -680876936)
+    d = ff(d, a, b, c, x[i + 1], 12, -389564586)
+    c = ff(c, d, a, b, x[i + 2], 17, 606105819)
+    b = ff(b, c, d, a, x[i + 3], 22, -1044525330)
+    a = ff(a, b, c, d, x[i + 4], 7, -176418897)
+    d = ff(d, a, b, c, x[i + 5], 12, 1200080426)
+    c = ff(c, d, a, b, x[i + 6], 17, -1473231341)
+    b = ff(b, c, d, a, x[i + 7], 22, -45705983)
+    a = ff(a, b, c, d, x[i + 8], 7, 1770035416)
+    d = ff(d, a, b, c, x[i + 9], 12, -1958414417)
+    c = ff(c, d, a, b, x[i + 10], 17, -42063)
+    b = ff(b, c, d, a, x[i + 11], 22, -1990404162)
+    a = ff(a, b, c, d, x[i + 12], 7, 1804603682)
+    d = ff(d, a, b, c, x[i + 13], 12, -40341101)
+    c = ff(c, d, a, b, x[i + 14], 17, -1502002290)
+    b = ff(b, c, d, a, x[i + 15], 22, 1236535329)
+
+    a = gg(a, b, c, d, x[i + 1], 5, -165796510)
+    d = gg(d, a, b, c, x[i + 6], 9, -1069501632)
+    c = gg(c, d, a, b, x[i + 11], 14, 643717713)
+    b = gg(b, c, d, a, x[i + 0], 20, -373897302)
+    a = gg(a, b, c, d, x[i + 5], 5, -701558691)
+    d = gg(d, a, b, c, x[i + 10], 9, 38016083)
+    c = gg(c, d, a, b, x[i + 15], 14, -660478335)
+    b = gg(b, c, d, a, x[i + 4], 20, -405537848)
+    a = gg(a, b, c, d, x[i + 9], 5, 568446438)
+    d = gg(d, a, b, c, x[i + 14], 9, -1019803690)
+    c = gg(c, d, a, b, x[i + 3], 14, -187363961)
+    b = gg(b, c, d, a, x[i + 8], 20, 1163531501)
+    a = gg(a, b, c, d, x[i + 13], 5, -1444681467)
+    d = gg(d, a, b, c, x[i + 2], 9, -51403784)
+    c = gg(c, d, a, b, x[i + 7], 14, 1735328473)
+    b = gg(b, c, d, a, x[i + 12], 20, -1926607734)
+
+    a = hh(a, b, c, d, x[i + 5], 4, -378558)
+    d = hh(d, a, b, c, x[i + 8], 11, -2022574463)
+    c = hh(c, d, a, b, x[i + 11], 16, 1839030562)
+    b = hh(b, c, d, a, x[i + 14], 23, -35309556)
+    a = hh(a, b, c, d, x[i + 1], 4, -1530992060)
+    d = hh(d, a, b, c, x[i + 4], 11, 1272893353)
+    c = hh(c, d, a, b, x[i + 7], 16, -155497632)
+    b = hh(b, c, d, a, x[i + 10], 23, -1094730640)
+    a = hh(a, b, c, d, x[i + 13], 4, 681279174)
+    d = hh(d, a, b, c, x[i + 0], 11, -358537222)
+    c = hh(c, d, a, b, x[i + 3], 16, -722521979)
+    b = hh(b, c, d, a, x[i + 6], 23, 76029189)
+    a = hh(a, b, c, d, x[i + 9], 4, -640364487)
+    d = hh(d, a, b, c, x[i + 12], 11, -421815835)
+    c = hh(c, d, a, b, x[i + 15], 16, 530742520)
+    b = hh(b, c, d, a, x[i + 2], 23, -995338651)
+
+    a = ii(a, b, c, d, x[i + 0], 6, -198630844)
+    d = ii(d, a, b, c, x[i + 7], 10, 1126891415)
+    c = ii(c, d, a, b, x[i + 14], 15, -1416354905)
+    b = ii(b, c, d, a, x[i + 5], 21, -57434055)
+    a = ii(a, b, c, d, x[i + 12], 6, 1700485571)
+    d = ii(d, a, b, c, x[i + 3], 10, -1894986606)
+    c = ii(c, d, a, b, x[i + 10], 15, -1051523)
+    b = ii(b, c, d, a, x[i + 1], 21, -2054922799)
+    a = ii(a, b, c, d, x[i + 8], 6, 1873313359)
+    d = ii(d, a, b, c, x[i + 15], 10, -30611744)
+    c = ii(c, d, a, b, x[i + 6], 15, -1560198380)
+    b = ii(b, c, d, a, x[i + 13], 21, 1309151649)
+    a = ii(a, b, c, d, x[i + 4], 6, -145523070)
+    d = ii(d, a, b, c, x[i + 11], 10, -1120210379)
+    c = ii(c, d, a, b, x[i + 2], 15, 718787259)
+    b = ii(b, c, d, a, x[i + 9], 21, -343485551)
+
+    a = safe_add(a, olda)
+    b = safe_add(b, oldb)
+    c = safe_add(c, oldc)
+    d = safe_add(d, oldd)
+  }
+  return [a, b, c, d]
+}
+
+/*  
+ * Convert an array of little-endian words to a hex string.  
+ */
+function binl2hex(binarray) {
+  var hex_tab = "0123456789abcdef"
+  var str = ""
+  for (var i = 0; i < binarray.length * 4; i++) {
+    str += hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8 + 4)) & 0xF) +
+      hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8)) & 0xF)
+  }
+  return str
+}
+
+/*  
+ * Convert an array of little-endian words to a base64 encoded string.  
+ */
+function binl2b64(binarray) {
+  var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
+  var str = ""
+  for (var i = 0; i < binarray.length * 32; i += 6) {
+    str += tab.charAt(((binarray[i >> 5] << (i % 32)) & 0x3F) |
+      ((binarray[i >> 5 + 1] >> (32 - i % 32)) & 0x3F))
+  }
+  return str
+}
+
+/*  
+ * Convert an 8-bit character string to a sequence of 16-word blocks, stored  
+ * as an array, and append appropriate padding for MD4/5 calculation.  
+ * If any of the characters are >255, the high byte is silently ignored.  
+ */
+function str2binl(str) {
+  var nblk = ((str.length + 8) >> 6) + 1 // number of 16-word blocks    
+  var blks = new Array(nblk * 16)
+  for (var i = 0; i < nblk * 16; i++) blks[i] = 0
+  for (var i = 0; i < str.length; i++)
+    blks[i >> 2] |= (str.charCodeAt(i) & 0xFF) << ((i % 4) * 8)
+  blks[i >> 2] |= 0x80 << ((i % 4) * 8)
+  blks[nblk * 16 - 2] = str.length * 8
+  return blks
+}
+
+/*  
+ * Convert a wide-character string to a sequence of 16-word blocks, stored as  
+ * an array, and append appropriate padding for MD4/5 calculation.  
+ */
+function strw2binl(str) {
+  var nblk = ((str.length + 4) >> 5) + 1 // number of 16-word blocks    
+  var blks = new Array(nblk * 16)
+  for (var i = 0; i < nblk * 16; i++) blks[i] = 0
+  for (var i = 0; i < str.length; i++)
+    blks[i >> 1] |= str.charCodeAt(i) << ((i % 2) * 16)
+  blks[i >> 1] |= 0x80 << ((i % 2) * 16)
+  blks[nblk * 16 - 2] = str.length * 16
+  return blks
+}
+
+/*  
+ * External interface  
+ */
+function md5(str) { return binl2hex(coreMD5(str2binl(str))) }
+function hexMD5w(str) { return binl2hex(coreMD5(strw2binl(str))) }
+function b64MD5(str) { return binl2b64(coreMD5(str2binl(str))) }
+function b64MD5w(str) { return binl2b64(coreMD5(strw2binl(str))) }
+/* Backward compatibility */
+function calcMD5(str) { return binl2hex(coreMD5(str2binl(str))) }
+module.exports = md5

+ 618 - 0
api/mine/index.js

@@ -0,0 +1,618 @@
+import request from '@/api/request.js'
+
+//我的消息列表
+function newsList(data){
+	return request({
+		url: '/api/ajax/mymessage',
+		method: 'post',
+		data
+	})
+}
+// 阅读消息
+function msgRead(data){
+	return request({
+		url: '/api/Ajax/msgRead',
+		method: 'get',
+		data
+	})
+}
+function payinfo(data){
+	return request({
+		url: '/api/article/payinfo',
+		method: 'post',
+		data
+	})
+}
+
+//认购记录
+function buyOrderList(data){
+	return request({
+		url: '/api/Ajax/buyOrderList',
+		method: 'get',
+		data
+	})
+}
+
+//我的奖品
+function myprize(data){
+	return request({
+		url: '/api/Ajax/myprize',
+		method: 'get',
+		data
+	})
+}
+
+//合同数据
+function contract(data){
+	return request({
+		url: '/api/Ajax/contractList',
+		method: 'get',
+		data
+	})
+}
+
+//保单数据
+function insurance(data){
+	return request({
+		url: '/api/Ajax/insuranceList',
+		method: 'get',
+		data
+	})
+}
+
+//绑定银行卡
+function bindtxinfo(data){
+	return request({
+		url: '/api/vip/bindtxinfo',
+		method: 'post',
+		data
+	})
+}
+
+//优惠卷
+function mycard(data){
+	return request({
+		url: '/api/Ajax/mycard',
+		method: 'get',
+		data
+	})
+}
+
+//关于我们
+function about(data){
+	return request({
+		url: '/api/article/aboutindex2',
+		method: 'get',
+		data
+	})
+}
+
+//导报详情
+function articledetail(data){
+	return request({
+		url: '/api/article/articledetail',
+		method: 'get',
+		data
+	})
+}
+
+//分销中心主页
+function fxindex(data){
+	return request({
+		url: '/api/fx/index',
+		method: 'get',
+		data
+	})
+}
+
+//一级用户 && 二级用户
+function myuser(data){
+	return request({
+		url: '/api/Fx/myuser',
+		method: 'get',
+		data
+	})
+}
+
+//推广二维码
+function myqrcode(data){
+	return request({
+		url: '/api/fx/myqrcode',
+		method: 'get',
+		data
+	})
+}
+
+//账号设置
+function vipIndex(data){
+	return request({
+		url: '/api/vip/index',
+		method: 'get',
+		data
+	})
+}
+
+//会员信息
+function vipinfo(data){
+	return request({
+		url: '/api/vip/vipinfo',
+		method: 'get',
+		data
+	})
+}
+
+//修改昵称
+function myinfo(data){
+	return request({
+		url: '/api/vip/myinfo',
+		method: 'get',
+		data
+	})
+}
+
+//认证信息
+function rzIndex(data){
+	return request({
+		url: '/api/vip/index',
+		method: 'get',
+		data
+	})
+}
+
+//获取验证码
+function getAuthSmsCode(data){
+	return request({
+		url: '/api/sms/getAuthSmsCode',
+		method: 'post',
+		data
+	})
+}
+
+//提交认证
+function auth(data){
+	return request({
+		url: '/api/vip/auth',
+		method: 'post',
+		data
+	})
+}
+
+//修改支付密码 获取验证码
+function getPayPwdCode(data){
+	return request({
+		url: '/api/sms/getPayPwdCode',
+		method: 'post',
+		data
+	})
+}
+
+//确认修改密码
+function pay_password_reset(data){
+	return request({
+		url: '/api/vip/pay_password_reset',
+		method: 'post',
+		data
+	})
+}
+
+//上传头像
+function addheadimg(data,files){
+	return request({
+		url: '/api/vip/addheadimg',
+		method: 'post',
+		data,
+		// header: {
+		// 	'Content-Type': 'multipart/form-data',
+		// },
+	})
+}
+//绑定微信
+function bindwx(data,files){
+	return request({
+		url: '/api/wxlogin/bindwx',
+		method: 'post',
+		data
+	})
+}
+//认购记录详情
+function orderDetail(data){
+	return request({
+		url: '/api/Buy/orderDetail',
+		method: 'post',
+		data,
+	})
+}
+
+//认购记录详情
+function contract_info(data){
+	return request({
+		url: '/api/Vip/contract_info',
+		method: 'get',
+		data,
+	})
+}
+//保单合同详情
+function policy(data){
+	return request({
+		url: '/api/Ajax/financeInsuranceDetail',
+		method: 'get',
+		data,
+	})
+}
+
+// 分销政策
+function Fxabout(data){
+	return request({
+		url: '/api/Fx/about',
+		method: 'get',
+		data,
+	})
+}
+// 我的推广
+function tjlog(data){
+	return request({
+		url: '/api/Fx/tjlog',
+		method: 'get',
+		data,
+	})
+}
+// 已收佣金
+function fxlog(data){
+	return request({
+		url: '/api/Fx/fxlog',
+		method: 'get',
+		data,
+	})
+}
+
+//取消认养订单
+
+function cancelOrder(data){
+	return request({
+		url: '/api/Buy/cancelOrder',
+		method: 'get',
+		data,
+	})
+}
+//认养订单退款
+function finaceTuikuan(data){
+	return request({
+		url: '/api/ajax/finaceTuikuan',
+		method: 'post',
+		data,
+	})
+}
+
+
+//常见问题列表
+function aboutquestion(data){
+	return request({
+		url: '/api/article/aboutquestion',
+		method: 'post',
+		data
+	})
+}
+//农场入驻申请
+function farm_apply(data){
+	return request({
+		url: '/api/farm/farm_apply',
+		method: 'post',
+		data
+	})
+}
+//农场入驻申请状态
+function apply_status(data){
+	return request({
+		url: '/api/farm/apply_status',
+		method: 'post',
+		data
+	})
+}
+// 店铺列表
+function farm_list(data){
+	return request({
+		url: '/api/farm/farm_list',
+		method: 'post',
+		data
+	})
+}
+// 店铺详情
+function farm_item(data){
+	return request({
+		url: '/api/farm/farm_item',
+		method: 'post',
+		data
+	})
+}
+// 直播间列表
+function room_list(data){
+	return request({
+		url: '/api/wxlive/room_list',
+		method: 'post',
+		data
+	})
+}
+// 直播间详情
+function roominfo(data){
+	return request({
+		url: '/api/wxlive/roominfo',
+		method: 'post',
+		data
+	})
+}
+// 直播轮播
+function roomimgs(data){
+	return request({
+		url: '/api/wxlive/roomimgs',
+		method: 'post',
+		data
+	})
+}
+// 土地巡检
+function inspection(data){
+	return request({
+		url: '/api/soil/inspection',
+		method: 'post',
+		data
+	})
+}
+
+// 土地巡检提交
+function goinspection(data){
+	return request({
+		url: '/api/soil/goinspection',
+		method: 'post',
+		data
+	})
+}
+
+// 认养管理
+function financeoperator(data){
+	return request({
+		url: '/api/buy/financeoperator',
+		method: 'post',
+		data
+	})
+}
+// 认养管理
+function finantype(data){
+	return request({
+		url: '/api/buy/finantype',
+		method: 'post',
+		data
+	})
+}
+
+// 认养管理提交
+function getfinance(data){
+	return request({
+		url: '/api/buy/getfinance',
+		method: 'post',
+		data
+	})
+}
+// 认养日志
+function operatorlog(data){
+	return request({
+		url: '/api/buy/operatorlog',
+		method: 'post',
+		data
+	})
+}
+// 配送信息
+function financedelivery(data){
+	return request({
+		url: '/api/buy/financedelivery',
+		method: 'post',
+		data
+	})
+}
+// 认样排行
+function financeranking(data){
+	return request({
+		url: '/api/buy/financeranking',
+		method: 'post',
+		data
+	})
+}
+
+// 店铺管理
+function storemanagement(data){
+	return request({
+		url: '/api/merchant/storemanagement',
+		method: 'post',
+		data
+	})
+}
+// 修改密码
+function reset_pwd(data){
+	return request({
+		url: '/api/merchant/reset_pwd',
+		method: 'post',
+		data
+	})
+}
+// 店铺提交
+function getmanagement(data){
+	return request({
+		url: '/api/merchant/getmanagement',
+		method: 'post',
+		data
+	})
+}
+// 商品管理
+function shopmanagement(data){
+	return request({
+		url: '/api/merchant/shopmanagement',
+		method: 'post',
+		data
+	})
+}
+// 商品分类
+function getcatelist(data){
+	return request({
+		url: '/api/merchant/getcatelist',
+		method: 'post',
+		data
+	})
+}
+// 添加商品
+function addgoods(data){
+	return request({
+		url: '/api/merchant/addgoods',
+		method: 'post',
+		data
+	})
+}
+
+// 上架
+function upshop(data){
+	return request({
+		url: '/api/merchant/upshop',
+		method: 'post',
+		data
+	})
+}
+
+// 下架
+function downshop(data){
+	return request({
+		url: '/api/merchant/downshop',
+		method: 'post',
+		data
+	})
+}
+
+// 编辑
+function editshop(data){
+	return request({
+		url: '/api/merchant/editshop',
+		method: 'post',
+		data
+	})
+}
+// 编辑
+function goodinfo(data){
+	return request({
+		url: '/api/merchant/goodinfo',
+		method: 'post',
+		data
+	})
+}
+
+
+// 上传图片(非富文本)
+function upshopimg(data){
+	return request({
+		url: '/api/merchant/upshopimg',
+		method: 'post',
+		data
+	})
+}
+function teamindex(data) {
+	return request({
+		url: '/api/buy/teamindex',
+		method: 'post',
+		data
+	})
+}
+
+// 上传图片(富文本)
+function uprichimg(data){
+	return request({
+		url: '/api/merchant/uprichimg',
+		method: 'post',
+		data
+	})
+}
+//  
+function farmshoplist(data){
+	return request({
+		url: '/api/farm/farmshoplist',
+		method: 'post',
+		data
+	})
+}
+
+function farm_item2(data){
+	return request({
+		url: '/api/farm/farm_item2',
+		method: 'post',
+		data
+	})
+}
+
+function farm_item3(data){
+	return request({
+		url: '/api/farm/farm_item3',
+		method: 'post',
+		data
+	})
+}
+
+export default {
+	roomimgs,
+	roominfo,
+	room_list,
+	bindwx,
+	finaceTuikuan,
+	farm_item,
+	apply_status,
+	farm_list,
+	farm_apply,
+	newsList,
+	msgRead,
+	buyOrderList,
+	myprize,
+	contract,
+	insurance,
+	bindtxinfo,
+	mycard,
+	about,
+	articledetail,
+	fxindex,
+	myuser,
+	myqrcode,
+	vipIndex,
+	vipinfo,
+	myinfo,
+	rzIndex,
+	getAuthSmsCode,
+	auth,
+	getPayPwdCode,
+	pay_password_reset,
+	addheadimg,
+	orderDetail,
+	payinfo,
+	contract_info,
+	policy,
+	Fxabout,
+	tjlog,
+	fxlog,
+	cancelOrder,
+	aboutquestion,
+	inspection,
+	goinspection,
+	financeoperator,
+	finantype,
+	getfinance,
+	operatorlog,
+	financedelivery,
+	financeranking,
+	storemanagement,
+	reset_pwd,
+	getmanagement,
+	shopmanagement,
+	getcatelist,
+	addgoods,
+	upshop,
+	downshop,
+	editshop,
+	goodinfo,
+	upshopimg,
+	uprichimg,
+	teamindex,
+	farmshoplist,
+	farm_item2,
+	farm_item3
+}

+ 157 - 0
api/order/index.js

@@ -0,0 +1,157 @@
+import request from '@/api/request.js'
+
+function orderList(data){
+	return request({
+		url: '/api/shop/orderList',
+		method: 'post',
+		data
+	})
+}
+function orderCancel(data){
+	return request({
+		url: '/api/Shop/orderCancel',
+		method: 'post',
+		data
+	})
+}
+function orderDetail(data){
+	return request({
+		url: '/api/Shop/orderDetail',
+		method: 'post',
+		data
+	})
+}
+function pay(data){
+	return request({
+		url: '/api/Shop/pay',
+		method: 'post',
+		data
+	})
+}
+function orderTuikuanSave(data){
+	return request({
+		url: '/api/Shop/orderTuikuanSave',
+		method: 'post',
+		data
+	})
+}
+function orderTuihuo(data){
+	return request({
+		url: '/api/Shop/orderTuihuoSave',
+		method: 'post',
+		data
+	})
+} 
+
+function orderPickupSuccess(data){
+	return request({
+		url: '/api/Shop/orderPickupSuccess',
+		method: 'post',
+		data
+	})
+}
+function orderOK(data){
+	return request({
+		url: '/api/Shop/orderOK',
+		method: 'post',
+		data
+	})
+}
+
+function kuaididetails(data){
+	return request({
+		url: '/api/shop/kuaididetails',
+		method: 'post',
+		data
+	})
+}
+function ordermanagement(data){
+	return request({
+		url: '/api/buy/ordermanagement',
+		method: 'post',
+		data
+	})
+}
+
+function fhshop(data){
+	return request({
+		url: '/api/buy/fhshop',
+		method: 'post',
+		data
+	})
+}
+function orderSuccess(data){
+	return request({
+		url: '/api/buy/orderSuccess',
+		method: 'post',
+		data
+	})
+}
+function orderrejecttuikuan(data){
+	return request({
+		url: '/api/buy/orderrejecttuikuan',
+		method: 'post',
+		data
+	})
+}
+function orderClosePay(data){
+	return request({
+		url: '/api/buy/orderClosePay',
+		method: 'post',
+		data
+	})
+}
+function orderrejecttuihuo(data){
+	return request({
+		url: '/api/buy/orderrejecttuihuo',
+		method: 'post',
+		data
+	})
+}
+function ordertuihuo(data){
+	return request({
+		url: '/api/buy/ordertuihuo',
+		method: 'post',
+		data
+	})
+}
+function weifarmcash(data){
+	return request({
+		url: '/api/buy/weifarmcash',
+		method: 'post',
+		data
+	})
+}
+function jiefarmcash(data){
+	return request({
+		url: '/api/buy/jiefarmcash',
+		method: 'post',
+		data
+	})
+}
+
+
+
+
+export default {
+	orderList,
+	orderCancel,
+	orderDetail,
+	pay,
+	orderTuikuanSave,
+	orderTuihuo,
+	orderPickupSuccess,
+	orderOK,
+	kuaididetails,
+	ordermanagement,
+	fhshop,
+	orderSuccess,
+	orderrejecttuikuan,
+	orderClosePay,
+	orderrejecttuihuo,
+	ordertuihuo,
+	weifarmcash,
+	jiefarmcash
+	
+	
+	}

+ 176 - 0
api/paycenter/paycenter.js

@@ -0,0 +1,176 @@
+import request from '@/api/request.js'
+
+function paygood(data){
+	return request({
+		url: '/api/paycenter/paygood',
+		method: 'post',
+		data
+	})
+}
+function payrenyang(data){
+	return request({
+		url: '/api/paycenter/payrenyang',
+		method: 'post',
+		data
+	})
+}
+function ct_soil_order(data){
+	return request({
+		url: '/api/paycenter/ct_soil_order',
+		method: 'post',
+		data
+	})
+}
+function ct_renewal_order(data){
+	return request({
+		url: '/api/paycenter/ct_renewal_order',
+		method: 'post',
+		data
+	})
+}
+function pay_soil_money(data){
+	return request({
+		url: '/api/paycenter/pay_soil_money',
+		method: 'post',
+		data
+	})
+}
+function pay_ac_money(data){
+	return request({
+		url: '/api/paycenter/pay_ac_money',
+		method: 'post',
+		data
+	})
+}
+function pay_renewal_money(data){
+	return request({
+		url: '/api/paycenter/pay_renewal_money',
+		method: 'post',
+		data
+	})
+}
+function ct_ac_order(data){
+	return request({
+		url: '/api/paycenter/ct_ac_order',
+		method: 'post',
+		data
+	})
+}
+function paycz(data){
+	return request({
+		url: '/api/paycenter/paycz',
+		method: 'post',
+		data
+	})
+}
+function payland(data){
+	return request({
+		url: '/api/paycenter/payland',
+		method: 'post',
+		data
+	})
+}
+function payactivity(data){
+	return request({
+		url: '/api/paycenter/payactivity',
+		method: 'post',
+		data
+	})
+}
+
+function renewal(data){
+	return request({
+		url: '/api/paycenter/renewal',
+		method: 'post',
+		data
+	})
+}
+
+function pay_seed_money(data){
+	return request({
+		url: '/api/paycenter/pay_seed_money',
+		method: 'post',
+		data
+	})
+}
+function seedpay(data){
+	return request({
+		url: '/api/paycenter/seedpay',
+		method: 'post',
+		data
+	})
+}
+
+function pay_serve_money(data){
+	return request({
+		url: '/api/paycenter/pay_serve_money',
+		method: 'post',
+		data
+	})
+}
+function payserve(data){
+	return request({
+		url: '/api/paycenter/pay_serve_money',
+		method: 'post',
+		data
+	})
+}
+function ct_operator_order(data){
+	return request({
+		url: '/api/paycenter/ct_operator_order',
+		method: 'post',
+		data
+	})
+}
+function pay_operator_money(data){
+	return request({
+		url: '/api/paycenter/pay_operator_money',
+		method: 'post',
+		data
+	})
+}
+function operator(data){
+	return request({
+		url: '/api/paycenter/operator',
+		method: 'post',
+		data
+	})
+}
+function paybond(data){
+	return request({
+		url: '/api/paycenter/paybond',
+		method: 'post',
+		data
+	})
+}
+function pay_bond_money(data){
+	return request({
+		url: '/api/paycenter/pay_bond_money',
+		method: 'post',
+		data
+	})
+}
+
+export default {
+	pay_bond_money,
+	paybond,
+	paygood,
+	payrenyang,
+	payactivity,
+	payland,
+	pay_soil_money,
+	pay_ac_money,
+	ct_ac_order,
+	ct_soil_order,
+	paycz,
+	ct_renewal_order,
+	pay_renewal_money,
+	renewal,
+	pay_seed_money,
+	seedpay,
+	pay_serve_money,
+	payserve,
+	ct_operator_order,
+	pay_operator_money,
+	operator
+}

+ 99 - 0
api/request.js

@@ -0,0 +1,99 @@
+import App from '@/App.vue'
+import store from '@/store/index.js'; //在js文件引入store模块
+import Vue from 'vue'
+import Vuex from 'vuex'
+import {
+	getSign
+} from './appsecret.js';
+
+function guid2() {
+	function S4() {
+		return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
+	}
+	return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
+}
+let tiem;
+
+function http(options) {
+	return new Promise((resolve, reject) => {
+		let settingFile = Vue.prototype.$siteinfo;
+		let author = Vue.prototype.$author;
+		let token = uni.getStorageSync('token') || '';
+		let data = options.data || {};
+		let time = parseInt(new Date().getTime() / 1000)
+		data.version = settingFile.version;
+		data.token = token;
+		// #ifdef H5
+		data.unid = Vue.prototype.$uuid;
+		// #endif
+		// #ifndef H5
+		data.unid = settingFile.uniacid;
+		// #endif
+		var sdata={
+			unid:data.unid,
+			version:data.version
+		};
+		data.sign = getSign(sdata, time)
+		data.time = time;
+		let baseUrl = settingFile.siteroot;
+		// #ifdef H5
+		baseUrl = Vue.prototype.$siteinfo.h5_siteroot;
+		// #endif
+		let purl = baseUrl + options.url;
+		if (author.we7_v2 == 1) {
+			purl = baseUrl + '/addons/yq_breedingmall/index.php' + options.url;
+		}
+		// console.log('purl', purl)
+		// console.log('data', JSON.stringify(data))
+		var setting = {
+			url: purl,
+			data: data,
+			method: options.method.toUpperCase() || 'GET',
+			timeout: 60000,
+			header: {
+				'content-type': 'application/x-www-form-urlencoded', // from data
+			},
+			success(res) {
+				if (res.data.status == 401) {
+					console.log('进入了')
+					uni.showToast({
+						title: res.data.msg,
+						icon: 'none',
+						duration: 1000
+					})
+					store.commit('logout')
+					uni.clearStorage()
+					if (tiem) clearTimeout(tiem)
+					tiem = setTimeout(() => {
+						console.log('进入判断')
+						uni.switchTab({
+							url: '/pages/user/user'
+						})
+					}, 1000)
+
+				}
+				resolve(res.data);
+				uni.hideLoading();
+			},
+			fail(err) {
+				console.log('res', JSON.stringify(err))
+				uni.showToast({
+					icon: 'error',
+					title: '网络超时!'
+				})
+				reject(err);
+			},
+		}
+		if (options.files) {
+			setting.files = Object.assign(setting.files, options.files);
+		}
+		if (options.header) {
+			setting.header = Object.assign(setting.header, options.header);
+		}
+		uni.request(setting);
+	}).catch(error => {
+		console.log('error', JSON.stringify(error))
+		reject(error)
+	});
+}
+export default http;

+ 21 - 0
api/seed/index.js

@@ -0,0 +1,21 @@
+import request from '@/api/request.js'
+//获取种子列表
+function getseedlist(data) {
+	return request({
+		url: '/api/seed/seed_list',
+		method: 'post',
+		data
+	})
+}
+//获取种子详情
+function getvidebyid(data) {
+	return request({
+		url: '/api/seed/index',
+		method: 'post',
+		data
+	})
+}
+export default {
+	getseedlist,
+	getvidebyid
+}

+ 12 - 0
api/update/index.js

@@ -0,0 +1,12 @@
+import request from '@/api/request.js'
+function download_link(data) {
+	return request({
+		url: '/api/index/upgrade',
+		method: 'post',
+		data
+	})
+}
+
+export default {
+	download_link
+}

+ 131 - 0
api/wall/index.js

@@ -0,0 +1,131 @@
+import request from '@/api/request.js'
+
+//
+function income(data) {
+	return request({
+		url: '/api/Buy/income',
+		method: 'post',
+		data
+	})
+}
+
+function txOrder(data) {
+	return request({
+		url: '/api/vip/txOrder',
+		method: 'post',
+		data
+	})
+}
+
+function aliTxOrder(data) {
+	return request({
+		url: '/api/vip/aliTxOrder',
+		method: 'post',
+		data
+	})
+}
+
+function wxTxOrder(data) {
+	return request({
+		url: '/api/vip/wxTxOrder',
+		method: 'post',
+		data
+	})
+}
+function getorderinfo(data) {
+	return request({
+		url: '/api/Wxpaycz/getorderinfo',
+		method: 'post',
+		data
+	})
+}
+function uptransfershot(data) {
+	return request({
+		url: '/api/upload/uploadimgs',
+		method: 'post',
+		data
+	})
+}
+function czRecord(data) {
+	return request({
+		url: '/api/Ajax/czRecord',
+		method: 'post',
+		data
+	})
+}
+function txRecord(data) {
+	return request({
+		url: '/api/Ajax/txRecord',
+		method: 'post',
+		data
+	})
+}
+function record(data) {
+	return request({
+		url: '/api/Ajax/record',
+		method: 'post',
+		data
+	})
+}
+function transferindex(data) {
+	return request({
+		url: '/api/Ajax/transferindex',
+		method: 'post',
+		data
+	})
+}
+function maketransferorder(data) {
+	return request({
+		url: '/api/vip/maketransferorder',
+		method: 'post',
+		data
+	})
+}
+
+function Wxpaycz(data) {
+	return request({
+		url: '/api/Wxpaycz/pay',
+		method: 'post',
+		data
+	})
+}
+function tx_farm(data) {
+	return request({
+		url: '/api/buy/tx_farm',
+		method: 'post',
+		data
+	})
+}
+
+function txlist(data) {
+	return request({
+		url: '/api/buy/txlist',
+		method: 'post',
+		data
+	})
+}
+function shouzhi(data) {
+	return request({
+		url: '/api/buy/shouzhi',
+		method: 'post',
+		data
+	})
+}
+
+export default {
+	income,
+	txOrder,
+	aliTxOrder,
+	wxTxOrder,
+	getorderinfo,
+	uptransfershot,
+	czRecord,
+	txRecord,
+	record,
+	transferindex,
+	maketransferorder,
+	Wxpaycz,
+	tx_farm,
+	txlist,
+	shouzhi
+}

+ 4 - 0
author.js

@@ -0,0 +1,4 @@
+module.exports = {
+	we7_v2: 0,// 独立版为0  微擎为1
+	authkey: 'tzh3490xska62q4g',
+}

+ 0 - 0
common/nowvue.scss


+ 1122 - 0
common/qqmap-wx-jssdk.js

@@ -0,0 +1,1122 @@
+/**
+ * 微信小程序JavaScriptSDK
+ * 
+ * @version 1.2
+ * @date 2019-03-06
+ */
+
+var ERROR_CONF = {
+    KEY_ERR: 311,
+    KEY_ERR_MSG: 'key格式错误',
+    PARAM_ERR: 310,
+    PARAM_ERR_MSG: '请求参数信息有误',
+    SYSTEM_ERR: 600,
+    SYSTEM_ERR_MSG: '系统错误',
+    WX_ERR_CODE: 1000,
+    WX_OK_CODE: 200
+};
+var BASE_URL = 'https://apis.map.qq.com/ws/';
+var URL_SEARCH = BASE_URL + 'place/v1/search';
+var URL_SUGGESTION = BASE_URL + 'place/v1/suggestion';
+var URL_GET_GEOCODER = BASE_URL + 'geocoder/v1/';
+var URL_CITY_LIST = BASE_URL + 'district/v1/list';
+var URL_AREA_LIST = BASE_URL + 'district/v1/getchildren';
+var URL_DISTANCE = BASE_URL + 'distance/v1/';
+var URL_DIRECTION = BASE_URL + 'direction/v1/';
+var MODE = {
+  driving: 'driving',
+  transit: 'transit'
+};
+var EARTH_RADIUS = 6378136.49;
+var Utils = {
+  /**
+  * md5加密方法
+  * 版权所有©2011 Sebastian Tschan,https://blueimp.net
+  */
+  safeAdd(x, y) {
+    var lsw = (x & 0xffff) + (y & 0xffff);
+    var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+    return (msw << 16) | (lsw & 0xffff);
+  },
+  bitRotateLeft(num, cnt) {
+    return (num << cnt) | (num >>> (32 - cnt));
+  },
+  md5cmn(q, a, b, x, s, t) {
+    return this.safeAdd(this.bitRotateLeft(this.safeAdd(this.safeAdd(a, q), this.safeAdd(x, t)), s), b);
+  },
+  md5ff(a, b, c, d, x, s, t) {
+    return this.md5cmn((b & c) | (~b & d), a, b, x, s, t);
+  },
+  md5gg(a, b, c, d, x, s, t) {
+    return this.md5cmn((b & d) | (c & ~d), a, b, x, s, t);
+  },
+  md5hh(a, b, c, d, x, s, t) {
+    return this.md5cmn(b ^ c ^ d, a, b, x, s, t);
+  },
+  md5ii(a, b, c, d, x, s, t) {
+    return this.md5cmn(c ^ (b | ~d), a, b, x, s, t);
+  },
+  binlMD5(x, len) {
+    /* append padding */
+    x[len >> 5] |= 0x80 << (len % 32);
+    x[((len + 64) >>> 9 << 4) + 14] = len;
+
+    var i;
+    var olda;
+    var oldb;
+    var oldc;
+    var oldd;
+    var a = 1732584193;
+    var b = -271733879;
+    var c = -1732584194;
+    var d = 271733878;
+
+    for (i = 0; i < x.length; i += 16) {
+      olda = a;
+      oldb = b;
+      oldc = c;
+      oldd = d;
+
+      a = this.md5ff(a, b, c, d, x[i], 7, -680876936);
+      d = this.md5ff(d, a, b, c, x[i + 1], 12, -389564586);
+      c = this.md5ff(c, d, a, b, x[i + 2], 17, 606105819);
+      b = this.md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
+      a = this.md5ff(a, b, c, d, x[i + 4], 7, -176418897);
+      d = this.md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
+      c = this.md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
+      b = this.md5ff(b, c, d, a, x[i + 7], 22, -45705983);
+      a = this.md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
+      d = this.md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
+      c = this.md5ff(c, d, a, b, x[i + 10], 17, -42063);
+      b = this.md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
+      a = this.md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
+      d = this.md5ff(d, a, b, c, x[i + 13], 12, -40341101);
+      c = this.md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
+      b = this.md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
+
+      a = this.md5gg(a, b, c, d, x[i + 1], 5, -165796510);
+      d = this.md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
+      c = this.md5gg(c, d, a, b, x[i + 11], 14, 643717713);
+      b = this.md5gg(b, c, d, a, x[i], 20, -373897302);
+      a = this.md5gg(a, b, c, d, x[i + 5], 5, -701558691);
+      d = this.md5gg(d, a, b, c, x[i + 10], 9, 38016083);
+      c = this.md5gg(c, d, a, b, x[i + 15], 14, -660478335);
+      b = this.md5gg(b, c, d, a, x[i + 4], 20, -405537848);
+      a = this.md5gg(a, b, c, d, x[i + 9], 5, 568446438);
+      d = this.md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
+      c = this.md5gg(c, d, a, b, x[i + 3], 14, -187363961);
+      b = this.md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
+      a = this.md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
+      d = this.md5gg(d, a, b, c, x[i + 2], 9, -51403784);
+      c = this.md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
+      b = this.md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
+
+      a = this.md5hh(a, b, c, d, x[i + 5], 4, -378558);
+      d = this.md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
+      c = this.md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
+      b = this.md5hh(b, c, d, a, x[i + 14], 23, -35309556);
+      a = this.md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
+      d = this.md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
+      c = this.md5hh(c, d, a, b, x[i + 7], 16, -155497632);
+      b = this.md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
+      a = this.md5hh(a, b, c, d, x[i + 13], 4, 681279174);
+      d = this.md5hh(d, a, b, c, x[i], 11, -358537222);
+      c = this.md5hh(c, d, a, b, x[i + 3], 16, -722521979);
+      b = this.md5hh(b, c, d, a, x[i + 6], 23, 76029189);
+      a = this.md5hh(a, b, c, d, x[i + 9], 4, -640364487);
+      d = this.md5hh(d, a, b, c, x[i + 12], 11, -421815835);
+      c = this.md5hh(c, d, a, b, x[i + 15], 16, 530742520);
+      b = this.md5hh(b, c, d, a, x[i + 2], 23, -995338651);
+
+      a = this.md5ii(a, b, c, d, x[i], 6, -198630844);
+      d = this.md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
+      c = this.md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
+      b = this.md5ii(b, c, d, a, x[i + 5], 21, -57434055);
+      a = this.md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
+      d = this.md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
+      c = this.md5ii(c, d, a, b, x[i + 10], 15, -1051523);
+      b = this.md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
+      a = this.md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
+      d = this.md5ii(d, a, b, c, x[i + 15], 10, -30611744);
+      c = this.md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
+      b = this.md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
+      a = this.md5ii(a, b, c, d, x[i + 4], 6, -145523070);
+      d = this.md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
+      c = this.md5ii(c, d, a, b, x[i + 2], 15, 718787259);
+      b = this.md5ii(b, c, d, a, x[i + 9], 21, -343485551);
+
+      a = this.safeAdd(a, olda);
+      b = this.safeAdd(b, oldb);
+      c = this.safeAdd(c, oldc);
+      d = this.safeAdd(d, oldd);
+    }
+    return [a, b, c, d];
+  },
+  binl2rstr(input) {
+    var i;
+    var output = '';
+    var length32 = input.length * 32;
+    for (i = 0; i < length32; i += 8) {
+      output += String.fromCharCode((input[i >> 5] >>> (i % 32)) & 0xff);
+    }
+    return output;
+  },
+  rstr2binl(input) {
+    var i;
+    var output = [];
+    output[(input.length >> 2) - 1] = undefined;
+    for (i = 0; i < output.length; i += 1) {
+      output[i] = 0;
+    }
+    var length8 = input.length * 8;
+    for (i = 0; i < length8; i += 8) {
+      output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << (i % 32);
+    }
+    return output;
+  },
+  rstrMD5(s) {
+    return this.binl2rstr(this.binlMD5(this.rstr2binl(s), s.length * 8));
+  },
+  rstrHMACMD5(key, data) {
+    var i;
+    var bkey = this.rstr2binl(key);
+    var ipad = [];
+    var opad = [];
+    var hash;
+    ipad[15] = opad[15] = undefined;
+    if (bkey.length > 16) {
+      bkey = this.binlMD5(bkey, key.length * 8);
+    }
+    for (i = 0; i < 16; i += 1) {
+      ipad[i] = bkey[i] ^ 0x36363636;
+      opad[i] = bkey[i] ^ 0x5c5c5c5c;
+    }
+    hash = this.binlMD5(ipad.concat(this.rstr2binl(data)), 512 + data.length * 8);
+    return this.binl2rstr(this.binlMD5(opad.concat(hash), 512 + 128));
+  },
+  rstr2hex(input) {
+    var hexTab = '0123456789abcdef';
+    var output = '';
+    var x;
+    var i;
+    for (i = 0; i < input.length; i += 1) {
+      x = input.charCodeAt(i);
+      output += hexTab.charAt((x >>> 4) & 0x0f) + hexTab.charAt(x & 0x0f);
+    }
+    return output;
+  },
+  str2rstrUTF8(input) {
+    return unescape(encodeURIComponent(input));
+  },
+  rawMD5(s) {
+    return this.rstrMD5(this.str2rstrUTF8(s));
+  },
+  hexMD5(s) {
+    return this.rstr2hex(this.rawMD5(s));
+  },
+  rawHMACMD5(k, d) {
+    return this.rstrHMACMD5(this.str2rstrUTF8(k), str2rstrUTF8(d));
+  },
+  hexHMACMD5(k, d) {
+    return this.rstr2hex(this.rawHMACMD5(k, d));
+  },
+
+  md5(string, key, raw) {
+    if (!key) {
+      if (!raw) {
+        return this.hexMD5(string);
+      }
+      return this.rawMD5(string);
+    }
+    if (!raw) {
+      return this.hexHMACMD5(key, string);
+    }
+    return this.rawHMACMD5(key, string);
+  },
+  /**
+   * 得到md5加密后的sig参数
+   * @param {Object} requestParam 接口参数
+   * @param {String} sk签名字符串
+   * @param {String} featrue 方法名
+   * @return 返回加密后的sig参数
+   */
+  getSig(requestParam, sk, feature, mode) {
+    var sig = null;
+    var requestArr = [];
+    Object.keys(requestParam).sort().forEach(function(key){
+      requestArr.push(key + '=' + requestParam[key]);
+    });
+    if (feature == 'search') {
+      sig = '/ws/place/v1/search?' + requestArr.join('&') + sk;
+    }
+    if (feature == 'suggest') {
+      sig = '/ws/place/v1/suggestion?' + requestArr.join('&') + sk;
+    }
+    if (feature == 'reverseGeocoder') {
+      sig = '/ws/geocoder/v1/?' + requestArr.join('&') + sk;
+    }
+    if (feature == 'geocoder') {
+      sig = '/ws/geocoder/v1/?' + requestArr.join('&') + sk;
+    }
+    if (feature == 'getCityList') {
+      sig = '/ws/district/v1/list?' + requestArr.join('&') + sk;
+    }
+    if (feature == 'getDistrictByCityId') {
+      sig = '/ws/district/v1/getchildren?' + requestArr.join('&') + sk;
+    }
+    if (feature == 'calculateDistance') {
+      sig = '/ws/distance/v1/?' + requestArr.join('&') + sk;
+    }
+    if (feature == 'direction') {
+      sig = '/ws/direction/v1/' + mode + '?' + requestArr.join('&') + sk;
+    }
+    sig = this.md5(sig);
+    return sig;
+  },
+    /**
+     * 得到终点query字符串
+     * @param {Array|String} 检索数据
+     */
+    location2query(data) {
+        if (typeof data == 'string') {
+            return data;
+        }
+        var query = '';
+        for (var i = 0; i < data.length; i++) {
+            var d = data[i];
+            if (!!query) {
+                query += ';';
+            }
+            if (d.location) {
+                query = query + d.location.lat + ',' + d.location.lng;
+            }
+            if (d.latitude && d.longitude) {
+                query = query + d.latitude + ',' + d.longitude;
+            }
+        }
+        return query;
+    },
+
+    /**
+     * 计算角度
+     */
+    rad(d) {
+      return d * Math.PI / 180.0;
+    },  
+    /**
+     * 处理终点location数组
+     * @return 返回终点数组
+     */
+    getEndLocation(location){
+      var to = location.split(';');
+      var endLocation = [];
+      for (var i = 0; i < to.length; i++) {
+        endLocation.push({
+          lat: parseFloat(to[i].split(',')[0]),
+          lng: parseFloat(to[i].split(',')[1])
+        })
+      }
+      return endLocation;
+    },
+
+    /**
+     * 计算两点间直线距离
+     * @param a 表示纬度差
+     * @param b 表示经度差
+     * @return 返回的是距离,单位m
+     */
+    getDistance(latFrom, lngFrom, latTo, lngTo) {
+      var radLatFrom = this.rad(latFrom);
+      var radLatTo = this.rad(latTo);
+      var a = radLatFrom - radLatTo;
+      var b = this.rad(lngFrom) - this.rad(lngTo);
+      var distance = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLatFrom) * Math.cos(radLatTo) * Math.pow(Math.sin(b / 2), 2)));
+      distance = distance * EARTH_RADIUS;
+      distance = Math.round(distance * 10000) / 10000;
+      return parseFloat(distance.toFixed(0));
+    },
+    /**
+     * 使用微信接口进行定位
+     */
+    getWXLocation(success, fail, complete) {
+        wx.getLocation({
+            type: 'gcj02',
+            success: success,
+            fail: fail,
+            complete: complete
+        });
+    },
+
+    /**
+     * 获取location参数
+     */
+    getLocationParam(location) {
+        if (typeof location == 'string') {
+            var locationArr = location.split(',');
+            if (locationArr.length === 2) {
+                location = {
+                    latitude: location.split(',')[0],
+                    longitude: location.split(',')[1]
+                };
+            } else {
+                location = {};
+            }
+        }
+        return location;
+    },
+
+    /**
+     * 回调函数默认处理
+     */
+    polyfillParam(param) {
+        param.success = param.success || function () { };
+        param.fail = param.fail || function () { };
+        param.complete = param.complete || function () { };
+    },
+
+    /**
+     * 验证param对应的key值是否为空
+     * 
+     * @param {Object} param 接口参数
+     * @param {String} key 对应参数的key
+     */
+    checkParamKeyEmpty(param, key) {
+        if (!param[key]) {
+            var errconf = this.buildErrorConfig(ERROR_CONF.PARAM_ERR, ERROR_CONF.PARAM_ERR_MSG + key +'参数格式有误');
+            param.fail(errconf);
+            param.complete(errconf);
+            return true;
+        }
+        return false;
+    },
+
+    /**
+     * 验证参数中是否存在检索词keyword
+     * 
+     * @param {Object} param 接口参数
+     */
+    checkKeyword(param){
+        return !this.checkParamKeyEmpty(param, 'keyword');
+    },
+
+    /**
+     * 验证location值
+     * 
+     * @param {Object} param 接口参数
+     */
+    checkLocation(param) {
+        var location = this.getLocationParam(param.location);
+        if (!location || !location.latitude || !location.longitude) {
+            var errconf = this.buildErrorConfig(ERROR_CONF.PARAM_ERR, ERROR_CONF.PARAM_ERR_MSG + ' location参数格式有误');
+            param.fail(errconf);
+            param.complete(errconf);
+            return false;
+        }
+        return true;
+    },
+
+    /**
+     * 构造错误数据结构
+     * @param {Number} errCode 错误码
+     * @param {Number} errMsg 错误描述
+     */
+    buildErrorConfig(errCode, errMsg) {
+        return {
+            status: errCode,
+            message: errMsg
+        };
+    },
+
+    /**
+     * 
+     * 数据处理函数
+     * 根据传入参数不同处理不同数据
+     * @param {String} feature 功能名称
+     * search 地点搜索
+     * suggest关键词提示
+     * reverseGeocoder逆地址解析
+     * geocoder地址解析
+     * getCityList获取城市列表:父集
+     * getDistrictByCityId获取区县列表:子集
+     * calculateDistance距离计算
+     * @param {Object} param 接口参数
+     * @param {Object} data 数据
+     */
+    handleData(param,data,feature){
+      if (feature == 'search') {
+        var searchResult = data.data;
+        var searchSimplify = [];
+        for (var i = 0; i < searchResult.length; i++) {
+          searchSimplify.push({
+            id: searchResult[i].id || null,
+            title: searchResult[i].title || null,
+            latitude: searchResult[i].location && searchResult[i].location.lat || null,
+            longitude: searchResult[i].location && searchResult[i].location.lng || null,
+            address: searchResult[i].address || null,
+            category: searchResult[i].category || null,
+            tel: searchResult[i].tel || null,
+            adcode: searchResult[i].ad_info && searchResult[i].ad_info.adcode || null,
+            city: searchResult[i].ad_info && searchResult[i].ad_info.city || null,
+            district: searchResult[i].ad_info && searchResult[i].ad_info.district || null,
+            province: searchResult[i].ad_info && searchResult[i].ad_info.province || null
+          })
+        }
+        param.success(data, {
+          searchResult: searchResult,
+          searchSimplify: searchSimplify
+        })
+      } else if (feature == 'suggest') {
+        var suggestResult = data.data;
+        var suggestSimplify = [];
+        for (var i = 0; i < suggestResult.length; i++) {
+          suggestSimplify.push({
+            adcode: suggestResult[i].adcode || null,
+            address: suggestResult[i].address || null,
+            category: suggestResult[i].category || null,
+            city: suggestResult[i].city || null,
+            district: suggestResult[i].district || null,
+            id: suggestResult[i].id || null,
+            latitude: suggestResult[i].location && suggestResult[i].location.lat || null,
+            longitude: suggestResult[i].location && suggestResult[i].location.lng || null,
+            province: suggestResult[i].province || null,
+            title: suggestResult[i].title || null,
+            type: suggestResult[i].type || null
+          })
+        }
+        param.success(data, {
+          suggestResult: suggestResult,
+          suggestSimplify: suggestSimplify
+          })
+      } else if (feature == 'reverseGeocoder') {
+        var reverseGeocoderResult = data.result;
+        var reverseGeocoderSimplify = {
+          address: reverseGeocoderResult.address || null,
+          latitude: reverseGeocoderResult.location && reverseGeocoderResult.location.lat || null,
+          longitude: reverseGeocoderResult.location && reverseGeocoderResult.location.lng || null,
+          adcode: reverseGeocoderResult.ad_info && reverseGeocoderResult.ad_info.adcode || null,
+          city: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.city || null,
+          district: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.district || null,
+          nation: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.nation || null,
+          province: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.province || null,
+          street: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.street || null,
+          street_number: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.street_number || null,
+          recommend: reverseGeocoderResult.formatted_addresses && reverseGeocoderResult.formatted_addresses.recommend || null,
+          rough: reverseGeocoderResult.formatted_addresses && reverseGeocoderResult.formatted_addresses.rough || null
+        };
+        if (reverseGeocoderResult.pois) {//判断是否返回周边poi
+          var pois = reverseGeocoderResult.pois;
+          var poisSimplify = [];
+          for (var i = 0;i < pois.length;i++) {
+            poisSimplify.push({
+              id: pois[i].id || null,
+              title: pois[i].title || null,
+              latitude: pois[i].location && pois[i].location.lat || null,
+              longitude: pois[i].location && pois[i].location.lng || null,
+              address: pois[i].address || null,
+              category: pois[i].category || null,
+              adcode: pois[i].ad_info && pois[i].ad_info.adcode || null,
+              city: pois[i].ad_info && pois[i].ad_info.city || null,
+              district: pois[i].ad_info && pois[i].ad_info.district || null,
+              province: pois[i].ad_info && pois[i].ad_info.province || null
+            })
+          }
+          param.success(data,{
+            reverseGeocoderResult: reverseGeocoderResult,
+            reverseGeocoderSimplify: reverseGeocoderSimplify,
+            pois: pois,
+            poisSimplify: poisSimplify
+          })
+        } else {
+          param.success(data, {
+            reverseGeocoderResult: reverseGeocoderResult,
+            reverseGeocoderSimplify: reverseGeocoderSimplify
+          })
+        }
+      } else if (feature == 'geocoder') {
+        var geocoderResult = data.result;
+        var geocoderSimplify = {
+          title: geocoderResult.title || null,
+          latitude: geocoderResult.location && geocoderResult.location.lat || null,
+          longitude: geocoderResult.location && geocoderResult.location.lng || null,
+          adcode: geocoderResult.ad_info && geocoderResult.ad_info.adcode || null,
+          province: geocoderResult.address_components && geocoderResult.address_components.province || null,
+          city: geocoderResult.address_components && geocoderResult.address_components.city || null,
+          district: geocoderResult.address_components && geocoderResult.address_components.district || null,
+          street: geocoderResult.address_components && geocoderResult.address_components.street || null,
+          street_number: geocoderResult.address_components && geocoderResult.address_components.street_number || null,
+          level: geocoderResult.level || null
+        };
+        param.success(data,{
+          geocoderResult: geocoderResult,
+          geocoderSimplify: geocoderSimplify
+        });
+      } else if (feature == 'getCityList') {
+        var provinceResult = data.result[0];
+        var cityResult = data.result[1];
+        var districtResult = data.result[2];
+        param.success(data,{
+          provinceResult: provinceResult,
+          cityResult: cityResult,
+          districtResult: districtResult
+        });
+      } else if (feature == 'getDistrictByCityId') {
+        var districtByCity = data.result[0];
+        param.success(data, districtByCity);
+      } else if (feature == 'calculateDistance') {
+        var calculateDistanceResult = data.result.elements;  
+        var distance = [];
+        for (var i = 0; i < calculateDistanceResult.length; i++){
+          distance.push(calculateDistanceResult[i].distance);
+        }   
+        param.success(data, {
+          calculateDistanceResult: calculateDistanceResult,
+          distance: distance
+          });
+      } else if (feature == 'direction') {
+        var direction = data.result.routes;
+        param.success(data,direction);
+      } else {
+        param.success(data);
+      }
+    },
+
+    /**
+     * 构造微信请求参数,公共属性处理
+     * 
+     * @param {Object} param 接口参数
+     * @param {Object} param 配置项
+     * @param {String} feature 方法名
+     */
+    buildWxRequestConfig(param, options, feature) {
+        var that = this;
+        options.header = { "content-type": "application/json" };
+        options.method = 'GET';
+        options.success = function (res) {
+            var data = res.data;
+            if (data.status === 0) {
+              that.handleData(param, data, feature);
+            } else {
+                param.fail(data);
+            }
+        };
+        options.fail = function (res) {
+            res.statusCode = ERROR_CONF.WX_ERR_CODE;
+            param.fail(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg));
+        };
+        options.complete = function (res) {
+            var statusCode = +res.statusCode;
+            switch(statusCode) {
+                case ERROR_CONF.WX_ERR_CODE: {
+                    param.complete(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg));
+                    break;
+                }
+                case ERROR_CONF.WX_OK_CODE: {
+                    var data = res.data;
+                    if (data.status === 0) {
+                        param.complete(data);
+                    } else {
+                        param.complete(that.buildErrorConfig(data.status, data.message));
+                    }
+                    break;
+                }
+                default:{
+                    param.complete(that.buildErrorConfig(ERROR_CONF.SYSTEM_ERR, ERROR_CONF.SYSTEM_ERR_MSG));
+                }
+
+            }
+        };
+        return options;
+    },
+
+    /**
+     * 处理用户参数是否传入坐标进行不同的处理
+     */
+    locationProcess(param, locationsuccess, locationfail, locationcomplete) {
+        var that = this;
+        locationfail = locationfail || function (res) {
+            res.statusCode = ERROR_CONF.WX_ERR_CODE;
+            param.fail(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg));
+        };
+        locationcomplete = locationcomplete || function (res) {
+            if (res.statusCode == ERROR_CONF.WX_ERR_CODE) {
+                param.complete(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg));
+            }
+        };
+        if (!param.location) {
+            that.getWXLocation(locationsuccess, locationfail, locationcomplete);
+        } else if (that.checkLocation(param)) {
+            var location = Utils.getLocationParam(param.location);
+            locationsuccess(location);
+        }
+    }
+};
+
+
+class QQMapWX {
+
+    /**
+     * 构造函数
+     * 
+     * @param {Object} options 接口参数,key 为必选参数
+     */
+    constructor(options) {
+        if (!options.key) {
+            throw Error('key值不能为空');
+        }
+        this.key = options.key;
+    };
+
+    /**
+     * POI周边检索
+     *
+     * @param {Object} options 接口参数对象
+     * 
+     * 参数对象结构可以参考
+     * @see http://lbs.qq.com/webservice_v1/guide-search.html
+     */
+    search(options) {
+        var that = this;
+        options = options || {};
+
+        Utils.polyfillParam(options);
+
+        if (!Utils.checkKeyword(options)) {
+            return;
+        }
+
+        var requestParam = {
+            keyword: options.keyword,
+            orderby: options.orderby || '_distance',
+            page_size: options.page_size || 10,
+            page_index: options.page_index || 1,
+            output: 'json',
+            key: that.key
+        };
+
+        if (options.address_format) {
+            requestParam.address_format = options.address_format;
+        }
+
+        if (options.filter) {
+            requestParam.filter = options.filter;
+        }
+
+        var distance = options.distance || "1000";
+        var auto_extend = options.auto_extend || 1;
+        var region = null;
+        var rectangle = null;
+
+        //判断城市限定参数
+        if (options.region) {
+          region = options.region;
+        }
+
+        //矩形限定坐标(暂时只支持字符串格式)
+        if (options.rectangle) {
+          rectangle = options.rectangle;
+        }
+
+        var locationsuccess = function (result) {        
+          if (region && !rectangle) {
+            //城市限定参数拼接
+            requestParam.boundary = "region(" + region + "," + auto_extend + "," + result.latitude + "," + result.longitude + ")";
+            if (options.sig) {
+              requestParam.sig = Utils.getSig(requestParam, options.sig, 'search');
+            }
+          } else if (rectangle && !region) {
+            //矩形搜索
+            requestParam.boundary = "rectangle(" + rectangle + ")";
+            if (options.sig) {
+              requestParam.sig = Utils.getSig(requestParam, options.sig, 'search');
+            }
+            } else {
+              requestParam.boundary = "nearby(" + result.latitude + "," + result.longitude + "," + distance + "," + auto_extend + ")";
+            if (options.sig) {
+              requestParam.sig = Utils.getSig(requestParam, options.sig, 'search');
+            }
+            }            
+            wx.request(Utils.buildWxRequestConfig(options, {
+                url: URL_SEARCH,
+                data: requestParam
+            }, 'search'));
+        };
+        Utils.locationProcess(options, locationsuccess);
+    };
+
+    /**
+     * sug模糊检索
+     *
+     * @param {Object} options 接口参数对象
+     * 
+     * 参数对象结构可以参考
+     * http://lbs.qq.com/webservice_v1/guide-suggestion.html
+     */
+    getSuggestion(options) {
+        var that = this;
+        options = options || {};
+        Utils.polyfillParam(options);
+
+        if (!Utils.checkKeyword(options)) {
+            return;
+        }
+
+        var requestParam = {
+            keyword: options.keyword,
+            region: options.region || '全国',
+            region_fix: options.region_fix || 0,
+            policy: options.policy || 0,
+            page_size: options.page_size || 10,//控制显示条数
+            page_index: options.page_index || 1,//控制页数
+            get_subpois : options.get_subpois || 0,//返回子地点
+            output: 'json',
+            key: that.key
+        };
+        //长地址
+        if (options.address_format) {
+          requestParam.address_format = options.address_format;
+        }
+        //过滤
+        if (options.filter) {
+          requestParam.filter = options.filter;
+        }
+        //排序
+        if (options.location) {
+          var locationsuccess = function (result) {
+            requestParam.location = result.latitude + ',' + result.longitude;
+            if (options.sig) {
+              requestParam.sig = Utils.getSig(requestParam, options.sig, 'suggest');
+            }
+            wx.request(Utils.buildWxRequestConfig(options, {
+              url: URL_SUGGESTION,
+              data: requestParam
+            }, "suggest"));      
+          };
+          Utils.locationProcess(options, locationsuccess);
+        } else {
+          if (options.sig) {
+            requestParam.sig = Utils.getSig(requestParam, options.sig, 'suggest');
+          }
+          wx.request(Utils.buildWxRequestConfig(options, {
+            url: URL_SUGGESTION,
+            data: requestParam
+          }, "suggest"));      
+        }        
+    };
+
+    /**
+     * 逆地址解析
+     *
+     * @param {Object} options 接口参数对象
+     * 
+     * 请求参数结构可以参考
+     * http://lbs.qq.com/webservice_v1/guide-gcoder.html
+     */
+    reverseGeocoder(options) {
+        var that = this;
+        options = options || {};
+        Utils.polyfillParam(options);
+        var requestParam = {
+            coord_type: options.coord_type || 5,
+            get_poi: options.get_poi || 0,
+            output: 'json',
+            key: that.key
+        };
+        if (options.poi_options) {
+            requestParam.poi_options = options.poi_options
+        }
+
+        var locationsuccess = function (result) {
+            requestParam.location = result.latitude + ',' + result.longitude;
+          if (options.sig) {
+            requestParam.sig = Utils.getSig(requestParam, options.sig, 'reverseGeocoder');
+          }
+            wx.request(Utils.buildWxRequestConfig(options, {
+                url: URL_GET_GEOCODER,
+                data: requestParam
+            }, 'reverseGeocoder'));
+        };
+        Utils.locationProcess(options, locationsuccess);
+    };
+
+    /**
+     * 地址解析
+     *
+     * @param {Object} options 接口参数对象
+     * 
+     * 请求参数结构可以参考
+     * http://lbs.qq.com/webservice_v1/guide-geocoder.html
+     */
+    geocoder(options) {
+        var that = this;
+        options = options || {};
+        Utils.polyfillParam(options);
+
+        if (Utils.checkParamKeyEmpty(options, 'address')) {
+            return;
+        }
+
+        var requestParam = {
+            address: options.address,
+            output: 'json',
+            key: that.key
+        };
+
+        //城市限定
+        if (options.region) {
+          requestParam.region = options.region;
+        }
+
+        if (options.sig) {
+          requestParam.sig = Utils.getSig(requestParam, options.sig, 'geocoder');
+        }
+
+        wx.request(Utils.buildWxRequestConfig(options, {
+            url: URL_GET_GEOCODER,
+            data: requestParam
+        },'geocoder'));
+    };
+
+
+    /**
+     * 获取城市列表
+     *
+     * @param {Object} options 接口参数对象
+     * 
+     * 请求参数结构可以参考
+     * http://lbs.qq.com/webservice_v1/guide-region.html
+     */
+    getCityList(options) {
+        var that = this;
+        options = options || {};
+        Utils.polyfillParam(options);
+        var requestParam = {
+            output: 'json',
+            key: that.key
+        };
+
+        if (options.sig) {
+          requestParam.sig = Utils.getSig(requestParam, options.sig, 'getCityList');
+        }
+
+        wx.request(Utils.buildWxRequestConfig(options, {
+            url: URL_CITY_LIST,
+            data: requestParam
+        },'getCityList'));
+    };
+
+    /**
+     * 获取对应城市ID的区县列表
+     *
+     * @param {Object} options 接口参数对象
+     * 
+     * 请求参数结构可以参考
+     * http://lbs.qq.com/webservice_v1/guide-region.html
+     */
+    getDistrictByCityId(options) {
+        var that = this;
+        options = options || {};
+        Utils.polyfillParam(options);
+
+        if (Utils.checkParamKeyEmpty(options, 'id')) {
+            return;
+        }
+
+        var requestParam = {
+            id: options.id || '',
+            output: 'json',
+            key: that.key
+        };
+
+        if (options.sig) {
+          requestParam.sig = Utils.getSig(requestParam, options.sig, 'getDistrictByCityId');
+        }
+
+        wx.request(Utils.buildWxRequestConfig(options, {
+            url: URL_AREA_LIST,
+            data: requestParam
+        },'getDistrictByCityId'));
+    };
+
+    /**
+     * 用于单起点到多终点的路线距离(非直线距离)计算:
+     * 支持两种距离计算方式:步行和驾车。
+     * 起点到终点最大限制直线距离10公里。
+     *
+     * 新增直线距离计算。
+     * 
+     * @param {Object} options 接口参数对象
+     * 
+     * 请求参数结构可以参考
+     * http://lbs.qq.com/webservice_v1/guide-distance.html
+     */
+    calculateDistance(options) {
+        var that = this;
+        options = options || {};
+        Utils.polyfillParam(options);
+
+        if (Utils.checkParamKeyEmpty(options, 'to')) {
+            return;
+        }
+
+        var requestParam = {
+            mode: options.mode || 'walking',
+            to: Utils.location2query(options.to),
+            output: 'json',
+            key: that.key
+        };
+
+        if (options.from) {
+          options.location = options.from;
+        }
+
+        //计算直线距离
+        if(requestParam.mode == 'straight'){        
+          var locationsuccess = function (result) {
+            var locationTo = Utils.getEndLocation(requestParam.to);//处理终点坐标
+            var data = {
+              message:"query ok",
+              result:{
+                elements:[]
+              },
+              status:0
+            };
+            for (var i = 0; i < locationTo.length; i++) {
+              data.result.elements.push({//将坐标存入
+                distance: Utils.getDistance(result.latitude, result.longitude, locationTo[i].lat, locationTo[i].lng),
+                duration:0,
+                from:{
+                  lat: result.latitude,
+                  lng:result.longitude
+                },
+                to:{
+                  lat: locationTo[i].lat,
+                  lng: locationTo[i].lng
+                }
+              });            
+            }
+            var calculateResult = data.result.elements;
+            var distanceResult = [];
+            for (var i = 0; i < calculateResult.length; i++) {
+              distanceResult.push(calculateResult[i].distance);
+            }  
+            return options.success(data,{
+              calculateResult: calculateResult,
+              distanceResult: distanceResult
+            });
+          };
+          
+          Utils.locationProcess(options, locationsuccess);
+        } else {
+          var locationsuccess = function (result) {
+            requestParam.from = result.latitude + ',' + result.longitude;
+            if (options.sig) {
+              requestParam.sig = Utils.getSig(requestParam, options.sig, 'calculateDistance');
+            }
+            wx.request(Utils.buildWxRequestConfig(options, {
+              url: URL_DISTANCE,
+              data: requestParam
+            },'calculateDistance'));
+          };
+
+          Utils.locationProcess(options, locationsuccess);
+        }      
+    };
+
+  /**
+   * 路线规划:
+   * 
+   * @param {Object} options 接口参数对象
+   * 
+   * 请求参数结构可以参考
+   * https://lbs.qq.com/webservice_v1/guide-road.html
+   */
+  direction(options) {
+    var that = this;
+    options = options || {};
+    Utils.polyfillParam(options);
+
+    if (Utils.checkParamKeyEmpty(options, 'to')) {
+      return;
+    }
+
+    var requestParam = {
+      output: 'json',
+      key: that.key
+    };
+
+    //to格式处理
+    if (typeof options.to == 'string') {
+      requestParam.to = options.to;
+    } else {
+      requestParam.to = options.to.latitude + ',' + options.to.longitude;
+    }
+    //初始化局部请求域名
+    var SET_URL_DIRECTION = null;
+    //设置默认mode属性
+    options.mode = options.mode || MODE.driving;
+
+    //设置请求域名
+    SET_URL_DIRECTION = URL_DIRECTION + options.mode;
+
+    if (options.from) {
+      options.location = options.from;
+    }
+
+    if (options.mode == MODE.driving) {
+      if (options.from_poi) {
+        requestParam.from_poi = options.from_poi;
+      }
+      if (options.heading) {
+        requestParam.heading = options.heading;
+      }
+      if (options.speed) {
+        requestParam.speed = options.speed;
+      }
+      if (options.accuracy) {
+        requestParam.accuracy = options.accuracy;
+      }
+      if (options.road_type) {
+        requestParam.road_type = options.road_type;
+      }
+      if (options.to_poi) {
+        requestParam.to_poi = options.to_poi;
+      }
+      if (options.from_track) {
+        requestParam.from_track = options.from_track;
+      }
+      if (options.waypoints) {
+        requestParam.waypoints = options.waypoints;
+      }
+      if (options.policy) {
+        requestParam.policy = options.policy;
+      }
+      if (options.plate_number) {
+        requestParam.plate_number = options.plate_number;
+      }
+    }
+
+    if (options.mode == MODE.transit) {
+      if (options.departure_time) {
+        requestParam.departure_time = options.departure_time;
+      }
+      if (options.policy) {
+        requestParam.policy = options.policy;
+      }
+    } 
+
+    var locationsuccess = function (result) {
+      requestParam.from = result.latitude + ',' + result.longitude;
+      if (options.sig) {
+        requestParam.sig = Utils.getSig(requestParam, options.sig, 'direction',options.mode);
+      }
+      wx.request(Utils.buildWxRequestConfig(options, {
+        url: SET_URL_DIRECTION,
+        data: requestParam
+      }, 'direction'));
+    };
+
+    Utils.locationProcess(options, locationsuccess);
+  }
+};
+
+module.exports = QQMapWX;

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
common/qqmap-wx-jssdk.min.js


+ 27 - 0
common/until.js

@@ -0,0 +1,27 @@
+function formatDate(date, fmt) {
+	if (typeof date == 'string') {
+		return date;
+	}
+
+	if (!fmt) fmt = "yyyy.MM.dd hh:mm:ss";
+
+	if (!date || date == null) return null;
+	var o = {
+		'M+': date.getMonth() + 1, // 月份
+		'd+': date.getDate(), // 日
+		'h+': date.getHours(), // 小时
+		'm+': date.getMinutes(), // 分
+		's+': date.getSeconds(), // 秒
+		'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
+		'S': date.getMilliseconds() // 毫秒
+	}
+	if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
+	for (var k in o) {
+		if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : ((
+			'00' + o[k]).substr(('' + o[k]).length)))
+	}
+	return fmt
+}
+export default {
+	formatDate
+}

BIN
components/.DS_Store


+ 173 - 0
components/admyself/admyself.vue

@@ -0,0 +1,173 @@
+<template>
+	<view v-if="opshow2">
+		<!-- #ifdef MP-WEIXIN -->
+		<view class="content" v-if="aitem.atype=='banner'">
+			<ad :unit-id="aitem.adpid"></ad>
+		</view>
+		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN -->
+		<view class="content" v-if="opshow2&&aitem&&aitem.atype=='banner'">
+			<ad :adpid="aitem.adpids"></ad>
+		</view>
+		<view class="content" v-if="opshow2&&aitem&&aitem.atype=='mvideo'">
+			<ad-rewarded-video :adpid="aitem.adpids" :loadnext="true" v-slot:default="{loading, error}" @load="onadload"
+				@close="onadclose" @error="onaderror">
+			</ad-rewarded-video>
+		</view>
+		<view class="content" v-else-if="opshow2&&aitem&&aitem.atype=='pscreen'">
+			<ad-interstitial :adpid="aitem.adpids" :loadnext="true" v-slot:default="{loading, error}" @load="onadload"
+				@close="onadclose" @error="onaderror">
+			</ad-interstitial>
+		</view>
+		<!-- #endif -->
+	</view>
+</template>
+<script>
+	export default {
+		name: "admyself",
+		props: ['opshow'],
+		data() {
+			return {
+				opshow2: true,
+				aitem: {
+					atype: 0,
+					adpid: '',
+					adpids: []
+				},
+				advlist: []
+			};
+		},
+		created() {
+			let that = this;
+			// #ifdef MP-WEIXIN
+			if (that.$config) {
+				let ntime = Math.round(new Date() / 1000);
+				// console.log('admyself-广告配置获取成功', that.$config.advlist)
+				that.advlist = that.$config.advlist;
+				let path = '';
+				let pages = getCurrentPages(); // 获取当前页面栈的实例,以数组形式按栈的顺序给出,第一个元素为首页,最后一个元素为当前页面
+				let page = pages[pages.length - 1];
+				let adtype = page.route; // 当前的页面路由(小程序可以,H5也可以)
+				console.log(path)
+				if (that.advlist) {
+					let item = that.advlist[adtype]
+					if (item) {
+						that.aitem = item
+					}
+				}
+				// console.log('admyself-advlist', that.advlist)
+				// console.log('admyself-adtype', adtype)
+				// console.log('admyself-aitem', JSON.stringify(that.aitem))
+				if (that.aitem) {
+					if (that.aitem.atype == 'mvideo') {
+						if (ntime - that.$adtime.mvideo_time > 15) {
+							that.opshow2 = false;
+							that.$adtime.mvideo_time = ntime;
+							let videoAd = null;
+							// 在页面onLoad回调事件中创建激励视频广告实例
+							if (wx.createRewardedVideoAd) {
+								videoAd = wx.createRewardedVideoAd({
+									adUnitId: that.aitem.adpid
+								})
+								videoAd.onLoad(() => {})
+								videoAd.onError((err) => {})
+								videoAd.onClose((res) => {})
+							}
+							setTimeout(function() {
+								// 用户触发广告后,显示激励视频广告
+								if (videoAd) {
+									console.log('激励视频 展示开始')
+									videoAd.show().catch(() => {
+										// 失败重试
+										videoAd.load()
+											.then(() => videoAd.show())
+											.catch(err => {
+												console.log('激励视频 广告显示失败')
+											})
+									})
+								}
+							}, 1000)
+						} else {
+							console.log('激励视频 广告显示失败-' + (ntime - that.$adtime.mvideo_time))
+						}
+					} else if (that.aitem.atype == 'pscreen') {
+						if (ntime - that.$adtime.pscreen_time > 15) {
+							that.opshow2 = false;
+							that.$adtime.pscreen_time = ntime;
+							// 在页面中定义插屏广告
+							let interstitialAd = null
+							// 在页面onLoad回调事件中创建插屏广告实例
+							if (wx.createInterstitialAd) {
+								interstitialAd = wx.createInterstitialAd({
+									adUnitId: that.aitem.adpid
+								})
+								interstitialAd.onLoad(() => {})
+								interstitialAd.onError((err) => {})
+								interstitialAd.onClose(() => {})
+							}
+							setTimeout(function() {
+								// 在适合的场景显示插屏广告
+								if (interstitialAd) {
+									// console.log('插屏广告 展示开始')
+									interstitialAd.show().catch((err) => {
+										console.error(err)
+									})
+								}
+							}, 1000)
+
+						} else {
+							// console.log('插屏广告 广告显示失败-' + (ntime - that.$adtime.pscreen_time))
+						}
+					} else if (that.aitem.atype == 'banner') {
+						if (ntime - that.$adtime.banner_time > 15) {
+							// console.log('banner 展示开始' + that.aitem.adpid)
+							that.opshow2 = true;
+							that.$adtime.banner_time = ntime;
+						} else {
+							// console.log('banner广告 广告显示失败-' + (ntime - that.$adtime.banner_time))
+						}
+					}
+				}
+			} else {
+				console.log('admyself', '广告配置获取失败')
+			}
+			// #endif
+		},
+		methods: {
+			onadload(e) {
+				// console.log('广告数据加载成功');
+				if (this.opshow) {
+					e.show();
+				}
+			},
+			onadclose(e) {
+				if (this.aitem.atype == 'mvideo') {
+					//激励视频
+					const detail = e.detail
+					// 用户点击了【关闭广告】按钮
+					if (detail && detail.isEnded) {
+						// 正常播放结束
+						console.log("onadclose " + detail.isEnded);
+					} else {
+						// 播放中途退出
+						console.log("onadclose " + detail.isEnded);
+					}
+				} else if (this.aitem.atype == 'mvideo') {
+					//插屏广告
+					console.log("onadclose", e);
+				}
+			},
+			onaderror(e) {
+				// 广告加载失败
+				console.log("onaderror: ", e.detail);
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		padding: 0rpx 20rpx 20rpx 20rpx;
+		border-radius: 25rpx;
+	}
+</style>

+ 261 - 0
components/nologin/nologin.vue

@@ -0,0 +1,261 @@
+<template>
+	<view>
+		<u-modal :show="showAuthorizeUser" title="提示" confirmColor="#181a82" @confirm="confirm" @cancel='cancel'
+			confirmText="立即登录" cancelText="暂不登录" showConfirmButton="true" showCancelButton="true">
+			<view style="text-align: center;padding: 20rpx;">您还没有登录哦</view>
+		</u-modal>
+		<wxinfo ref="wxinfo" v-on:loginback="loginback"></wxinfo>
+	</view>
+</template>
+
+<script>
+	import loginApi from '@/api/login/login.js';
+	import mineApi from '@/api/mine/index.js';
+	import wxinfo from '@/components/wxinfo/wxinfo.vue';
+	export default {
+		name: "nologin",
+		props: [],
+		components: {
+			wxinfo
+		},
+		data() {
+			return {
+				user: {
+					headimgurl: 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0',
+					nickname: '',
+				},
+				hasUserInfo: false,
+				logo: '',
+				// 用户基本信息
+				userInfo: null,
+				// 微信,支付宝用户code
+				code: '',
+				// 是否弹出登录注册授权弹窗
+				showAuthorizeUser: false,
+				showAuthorizePhone: false,
+			};
+		},
+		methods: {
+			loginback() {
+				//登录回调
+				this.$emit('loginback');
+			},
+			open() {
+				let that = this;
+				uni.login({
+					provider: 'weixin',
+					success: loginRes => {
+						that.code = loginRes.code;
+					}
+				});
+				that.showAuthorizeUser = true
+			},
+			cancel() {
+				this.showAuthorizeUser = false
+			},
+			close() {
+				this.showAuthorizeUser = false
+			},
+			getInitInfo() {
+				let that = this;
+				that.$emit('getInitInfo');
+			},
+			confirm() {
+				let that = this;
+				uni.showLoading({
+					title: '登录中...'
+				});
+				// 获取用户基本信息
+				uni.getUserProfile({
+					desc: '登陆',
+					success: function(infoRes) {
+						let userInfo = JSON.parse(infoRes.rawData);
+						let logdata = {
+							type: 1,
+							code: that.code,
+							pid: uni.getStorageSync('sys_pid'),
+							...userInfo
+						};
+						loginApi
+							.wxlogin_v2(logdata)
+							.then(res => {
+								if (res.status == 200) {
+									that.close();
+									that.$store.commit('login', res.data.userinfo);
+									that.$emit('loginback');
+									if (!res.data.userinfo.nickname || !res.data.userinfo.headimgurl) {
+										that.$refs.wxinfo.open();
+									} else{
+										that.$api.msg('登录成功');
+									}
+								} else {
+									uni.showToast({
+										title: res.msg,
+										icon: 'none'
+									})
+								}
+							});
+					},
+					fail: err => {
+						uni.showToast({
+							title: '授权失败',
+							icon: 'none'
+						});
+						return false;
+					}
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.auth-btncard {
+		.btn-unok {
+			width: 50%;
+			float: left;
+		}
+
+		.btn-ok {
+			width: 50%;
+			float: left;
+			margin: 0;
+			padding: 0;
+			border: 0px solid transparent; //自定义边框
+			outline: none; //消除默认点击蓝色边框效果
+
+			u-button {
+				margin: 0;
+				padding: 0;
+				border: 0px solid transparent; //自定义边框
+				outline: none; //消除默认点击蓝色边框效果
+			}
+		}
+	}
+
+	.auth-card {
+		text-align: center;
+
+		.avatar-img {
+			width: 150rpx;
+			height: 150rpx;
+			overflow: hidden;
+			border-radius: 100%;
+			margin-top: 30rpx;
+		}
+
+		.title {
+			font-size: 20rpx;
+		}
+
+		.content {
+			margin-top: 10rpx;
+		}
+	}
+
+	.mine_box {
+		height: 360upx;
+		color: #fff;
+		// background-color: $primarycolor;
+
+		.avatar-img {
+			width: 150rpx;
+			height: 150rpx;
+			overflow: hidden;
+			border-radius: 100%;
+			/*margin-right: 40rpx;*/
+		}
+
+		.avatar_box {
+			position: relative;
+			width: 150rpx;
+			height: 150rpx;
+			overflow: hidden;
+			border-radius: 100%;
+			margin-right: 40rpx;
+
+			.avatar-img {
+				width: 100%;
+				height: 100%;
+				/* #ifdef MP-WEIXIN*/
+				width: 150rpx;
+				height: 150rpx;
+				/* #endif */
+			}
+
+			.get_user_data {
+				z-index: 11;
+				opacity: 0;
+				width: 100%;
+				height: 100%;
+				position: absolute;
+				left: 0;
+				top: 0;
+			}
+		}
+
+		.nick-name-box {
+			height: 100%;
+		}
+
+		.user-nickName {
+			font-size: 40rpx;
+			color: #fff;
+			margin-bottom: 20rpx;
+		}
+
+		.shiming_box {
+			border-radius: 10upx;
+			font-size: 28upx;
+			padding: 10upx 20upx;
+			background-color: rgba(15, 77, 139, 0.5);
+
+			.icon-shezhi {
+				margin-right: 10rpx;
+				margin-top: 5rpx;
+			}
+		}
+	}
+
+	.authorize-box {
+		background-color: transparent;
+		text-align: center;
+
+		.authorize-avatar {
+			width: 200rpx;
+			height: 200rpx;
+		}
+
+		.authorize-btn {
+			position: relative;
+			top: 40rpx;
+		}
+	}
+
+	/deep/.u-mode-center-box {
+		background-color: transparent !important;
+	}
+</style>
+<style>
+	.avatar-wrapper {
+		width: 150rpx;
+		height: 100rpx;
+		color: #333 !important;
+		text-align: center !important;
+		border: none !important;
+		border-radius: 0 !important;
+		background-color: transparent !important;
+	}
+
+	.avatar-wrapper::after {
+		border: none !important;
+	}
+
+	.avatar {
+		margin-right: 50rpx;
+		width: 100rpx;
+		height: 100rpx;
+		overflow: hidden;
+		border-radius: 100%;
+	}
+</style>

+ 604 - 0
components/nx-coupon/nx-coupon.vue

@@ -0,0 +1,604 @@
+<template>
+	<view class="coupon-item" @tap="selectCoupon">
+		
+		<view class="coupon_index" >
+			<view class="coupon_indexs">
+				<view class="coupon_index_1">
+					<view class="coupon_index_2">
+						<view class="coupon_index_3">{{item.typetitle}}</view>
+						<view class="coupon_index_4">
+							<view class="coupon_index_4_1">¥{{ item.money }}</view>
+							<view class="coupon_index_5">满元{{ item.usemoney }}可用</view>
+						</view>
+					</view>
+					<view>
+						<u-line color="gray" direction="col" length="100%" dashed></u-line>
+					</view>
+					
+					<view class="coupon_index_6">
+ 						<view class="coupon_index_8">
+							<view class="coupon_index_8_1">优惠券</view>
+							<view class="coupon_index_9">领取{{ item.day }}日内有效</view>
+						</view>
+		
+					</view>
+				</view>
+		   <u-line color="#939393"  margin="25rpx 10rpx 0 0"  ></u-line> 
+		 	<view class="coupon_index_10"  >
+					<image :src="item.farm_logo"></image>
+					<view class="coupon_index_10_1">{{item.farm_name}}</view>
+				</view>
+			</view>
+		      <view class="coupon_index_11">
+				  	<text  v-if="item.status===1" @click="gouse(item.type)"> 立   即   使   用</text>
+					<text  v-if="item.status===2">已    使    用</text>
+					<text  v-if="item.status===3">已    过    期</text>
+				 <!-- <view     @click.stop="!isover?gouse(item):''" >
+				  	{{isover?(item.status==2?'已使用':'已过期'):'立即     使用'}}
+				  </view> -->
+			  </view>
+		    
+			<!-- <view  class="coupon_index_11   " v-if="item.status === 0"   @click="getcoupon(item.id)">
+				<text class="coupon_index_11_1"> 立   即   领   取</text>
+		
+				</view>
+				<view v-else     class="coupon_index_11"  >
+					<text class="coupon_index_11_1"> 已   领   取</text>
+					</view>
+					
+					<!-- <view class="coupon_item_jin"  ></view> -->  
+		</view> 
+		
+		
+		
+		<!-- <view class="box-con">
+			<view :class="'box-text'+(!isover?item.type:'')" v-if="item.type==2">商城</view>
+			
+			<view :class="'box-text'+(!isover?item.type:'')" v-else-if="item.type==3">认养</view>
+			<view :class="'box-text'+(!isover?item.type:'')" v-else-if="item.type==4">通用</view>
+		</view> -->
+	<!-- 	<view class="coupon-money">
+			<view class="nick" v-if="!types">ID:{{item.cardno}}</view>
+			<view class="layof" :style="{color:theme}">¥{{item.money}}</view>
+			<view class="end_time">{{item.etime}}前使用</view>
+			<view v-if="!types">
+				<view class="demand">{{item.title}}</view>
+			</view>
+			<view style="padding: 4px 0;text-decoration:underline;" class="demand" @click.stop="gotoDetails()">
+				使用规则:满{{item.usemoney}}元,{{item.type==2?'商城':''}}{{item.type==3?'认养':''}}{{item.type==4?'全场':''}}可使用
+			</view>
+		</view> -->
+	<!-- 	<view style="z-index: 9;">
+			<view v-if="isShowCheck">
+				<checkbox class='round orange' :disabled="item.disable" :class="item.checked?'checked':''"
+					:checked="item.checked?true:false">
+				</checkbox>
+			</view>
+			<view v-else>
+				<view @click.stop="!isover?gouse(item):''" :class="!isover?'get-btn':'get-btn1'"
+					:style="{background:solid}">
+					{{isover?(item.status==2?'已使用':'已过期'):'去使用'}}
+				</view>
+			</view>
+		</view> -->
+	</view>
+</template>
+<script>
+import { object } from '../../js/underscore';
+	export default {
+		components: {
+
+		},
+		data() {
+			return {
+
+			}
+		},
+		props: {
+			index: {
+				type: Number,
+				default: 0
+			},
+			// 是否有勾选框
+			isShowCheck: {
+				type: Boolean,
+				default: false
+			},
+			item: {
+				type: Object
+			},
+			types: {
+				type: String,
+				default: ''
+			},
+			theme: {
+				type: String,
+				default: '#FF4A26'
+			},
+			solid: {
+				type: String,
+				default: '#ffffff'
+			},
+			color: {
+				type: String,
+				default: '#FF4A26'
+			},
+			isover: {
+				type: Boolean,
+				default: false
+			},
+			site:{
+				type:Object
+			}
+		},
+		methods: {
+			gouse(item) {
+				if(item==2){
+					uni.switchTab({
+						url: '/pages/mall/mall'
+					})
+				}else if(item==3){
+					uni.switchTab({
+						url: '/pages/index/adoplist/adoplist'
+					})
+				}else if(item==4){
+					uni.switchTab({
+						url: '/pages/land/land'
+					})
+				}
+				
+			},
+			// 查看优惠券使用范围
+			gotoDetails() {
+				console.log('优惠券使用范围')
+			},
+			selectCoupon() {
+				let that = this;
+				if (that.isShowCheck) {
+					that.$bus.$emit('updateChecked', that.index);
+
+				}
+
+			}
+
+		}
+	}
+</script>
+
+<style lang='scss'>
+	
+	.coupon-item {
+		/* height: auto; */
+		/* height: 131px; */
+		/* display: table; */
+		border-radius: 20rpx;
+		/* padding: 0 30upx; */
+		/* padding: 15px 5px 15px 15px; */
+		margin-top: 20rpx;
+		/* border: 1px solid #FFFFFF; */
+		/* position: relative; */
+		background-color: #fff;
+		
+		
+	.coupon_index {
+		display: flex;
+		justify-content: space-between;
+		background-color: #ffffff; 
+		border-radius: 20rpx;
+	   
+		.coupon_indexs {
+			   display: flex;
+			   flex-direction:column;
+			   width: 95%;
+			   
+			   
+			.coupon_index_1 {
+				display: flex;
+				justify-content: flex-start;
+	
+				.coupon_index_2 {
+					width: 13vh;
+	                 
+					.coupon_index_3 {
+						background-color: lightcoral;
+						width: 6vh;
+						text-align: center;
+						border-top-left-radius: 20rpx;
+						border-bottom-right-radius: 25rpx;
+						line-height: 40rpx;
+						color: #fff;
+						font-size: 25rpx;
+					}
+	
+					.coupon_index_4 {
+	
+						align-items: center;
+						text-align: center;
+	
+						.coupon_index_4_1 {
+							font-size: 50rpx;
+							color: red;
+							font-weight: 600;
+							padding: 10rpx 0;
+						}
+	
+						.coupon_index_5 {
+							font-size: 30rpx;
+							color: indianred;
+						}
+					}
+	
+				}
+	
+				.coupon_index_6 {
+					width: 25vh;
+	               
+					.coupon_index_7 {
+						background-color: brown;
+						line-height: 40rpx;
+						width: 10vh;
+						text-align: center;
+						font-size: 24rpx;
+						color: #fff;
+						border-radius: 40rpx;
+						float: right;
+						margin-top: 20rpx;
+						 
+						 margin-bottom: 30rpx;
+					}
+	
+					.coupon_index_8 {
+						   margin-left: 1vh;
+	
+						.coupon_index_8_1 {
+	
+							font-size: 35rpx;
+							font-weight: 600;
+							padding: 90rpx 0 30rpx 0;
+	
+						}
+	
+						.coupon_index_9 {
+							font-size: 26rpx;
+							color:  #939393;
+						}
+					}
+	
+				}
+			}
+		}
+		.coupon_index_10{
+			display: flex;
+			justify-content: flex-start;
+			text-align: center;
+			align-items: center;
+			padding: 10rpx;
+			image{
+				width: 50rpx;
+				height: 50rpx;
+				border-radius: 50%;
+			}
+			.coupon_index_10_1{
+				padding: 0 10rpx;
+				color: #939393;
+				font-size: 26rpx;
+			}
+		}
+		 
+	    .coupon_index_11{
+				 position: relative;
+				 background-color: limegreen;
+				 border-top-right-radius: 20rpx;
+				 border-bottom-right-radius: 20rpx;
+				 display: flex;
+				 width:5vh;
+				 min-height: 20px;
+				 padding: 6px 0 6px 20px;
+				 color: #fff; 
+				 align-items: center;
+				  text-align: center;
+				 
+			text{
+				  writing-mode : tb-rl;
+				  color: #fff;
+				  text-align: center;
+				 
+			}
+		}
+		.coupon_index_11::before {
+		    content: ' ';
+		    width: 0;
+		    height: 100%;
+		    width: 0;
+		    position: absolute;
+		    border-right: 6px dotted white;
+		    top: 0;
+		    left: -3px;    
+		}
+		
+		/* // .coupon_index_11::after {
+		//     content: ' ';
+		//     height: 100%;
+		//     position: absolute;
+		//     border-left: 6px dotted white;
+		//     top: 0;
+		//     right: -3px;    
+		
+		// }   
+	
+	}
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+
+		.box-con {
+			width: 85px;
+			height: 88px;
+			overflow: hidden;
+			position: absolute;
+			top: -3px;
+			right: -3px;
+			z-index: 1;
+		}
+		.box-text {
+			color: white;
+			text-align: center;
+			-webkit-transform: rotate(45deg);
+			-moz-transform: rotate(45deg);
+			-ms-transform: rotate(45deg);
+			-o-transform: rotate(45deg);
+			position: relative;
+			padding: 2px 0;
+			left: 37px;
+			top: 4px;
+			width: 65px;
+			background-color: #eeeeee;
+			background-image: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), to(#eeeeee));
+			background-image: -webkit-linear-gradient(top, #eeeeee, #eeeeee);
+			background-image: -moz-linear-gradient(top, #eeeeee, #eeeeee);
+			background-image: -ms-linear-gradient(top, #eeeeee, #eeeeee);
+			background-image: -o-linear-gradient(top, #eeeeee, #eeeeee);
+			-webkit-box-shadow: 0px 0px 3px #eeeeee;
+			-moz-box-shadow: 0px 0px 3px #eeeeee;
+			box-shadow: 0px 0px 3px #eeeeee;
+		}
+		.box-text2 {
+			color: white;
+			text-align: center;
+			-webkit-transform: rotate(45deg);
+			-moz-transform: rotate(45deg);
+			-ms-transform: rotate(45deg);
+			-o-transform: rotate(45deg);
+			position: relative;
+			padding: 2px 0;
+			left: 37px;
+			top: 4px;
+			width: 65px;
+			background-color: #76c500;
+			background-image: -webkit-gradient(linear, left top, left bottom, from(#76c500), to(#76c500));
+			background-image: -webkit-linear-gradient(top, #76c500, #76c500);
+			background-image: -moz-linear-gradient(top, #76c500, #76c500);
+			background-image: -ms-linear-gradient(top, #76c500, #76c500);
+			background-image: -o-linear-gradient(top, #76c500, #76c500);
+			-webkit-box-shadow: 0px 0px 3px #76c500;
+			-moz-box-shadow: 0px 0px 3px #76c500;
+			box-shadow: 0px 0px 3px #76c500;
+		}
+
+		.box-text2:before,
+		.box-text2:after {
+			content: "";
+			position: absolute;
+			bottom: -3px;
+		}
+
+		.box-text2:before {
+			left: 0;
+		}
+
+		.box-text2:after {
+			right: 0;
+		}
+
+		.box-text3 {
+			color: white;
+			text-align: center;
+			-webkit-transform: rotate(45deg);
+			-moz-transform: rotate(45deg);
+			-ms-transform: rotate(45deg);
+			-o-transform: rotate(45deg);
+			position: relative;
+			padding: 2px 0;
+			left: 37px;
+			top: 4px;
+			width: 65px;
+			background-color: #ff1b40;
+			background-image: -webkit-gradient(linear, left top, left bottom, from(#ff503e), to(#ff2f50));
+			background-image: -webkit-linear-gradient(top, #ff503e, #ff2f50);
+			background-image: -moz-linear-gradient(top, #ff503e, #ff2f50);
+			background-image: -ms-linear-gradient(top, #ff503e, #ff2f50);
+			background-image: -o-linear-gradient(top, #ff503e, #ff2f50);
+			-webkit-box-shadow: 0px 0px 3px #ff1b40;
+			-moz-box-shadow: 0px 0px 3px #ff1b40;
+			box-shadow: 0px 0px 3px #ff1b40;
+		}
+
+		.box-text3:before,
+		.box-text3:after {
+			content: "";
+			position: absolute;
+			bottom: -3px;
+		}
+
+		.box-text3:before {
+			left: 0;
+		}
+
+		.box-text3:after {
+			right: 0;
+		}
+
+		.box-text4 {
+			color: white;
+			text-align: center;
+			-webkit-transform: rotate(45deg);
+			-moz-transform: rotate(45deg);
+			-ms-transform: rotate(45deg);
+			-o-transform: rotate(45deg);
+			position: relative;
+			padding: 2px 0;
+			left: 37px;
+			top: 4px;
+			width: 65px;
+			background-color: #aa55ff;
+			background-image: -webkit-gradient(linear, left top, left bottom, from(#aa55ff), to(#aa55ff));
+			background-image: -webkit-linear-gradient(top, #aa55ff, #aa55ff);
+			background-image: -moz-linear-gradient(top, #aa55ff, #aa55ff);
+			background-image: -ms-linear-gradient(top, #aa55ff, #aa55ff);
+			background-image: -o-linear-gradient(top, #aa55ff, #aa55ff);
+			-webkit-box-shadow: 0px 0px 3px #aa55ff;
+			-moz-box-shadow: 0px 0px 3px #aa55ff;
+			box-shadow: 0px 0px 3px #aa55ff;
+		}
+
+		.box-text4:before,
+		.box-text4:after {
+			content: "";
+			position: absolute;
+			bottom: -3px;
+		}
+
+		.box-text4:before {
+			left: 0;
+		}
+
+		.box-text4:after {
+			right: 0;
+		}
+
+		.coupon-money {
+			width: 465upx;
+			height: auto;
+			/* display: table;
+             */
+			/* float: left; */
+		/* 	text-align: left;
+			padding: 26upx 0;
+			border-style: none dotted none none;
+			border-color: #eeeeee; */
+
+			/* .nick {
+				width: 100%;
+				height: 50upx;
+				line-height: 30upx;
+				font-size: $uni-font-size-sm;
+				color: $uni-text-color-grey;
+			}
+ */
+		/* 	.tit {
+				width: 100%;
+				height: 50upx;
+				line-height: 50upx;
+				font-size: $uni-font-size-sm;
+				color: $uni-text-color-grey;
+			} */
+
+		/* 	.demand {
+				width: 100%;
+				height: 30upx;
+				line-height: 30upx;
+				font-size: $uni-font-size-sm;
+				color: $uni-text-color-grey;
+			} */
+
+		/* 	.layof {
+				width: 100%;
+				height: 48upx;
+				line-height: 30upx;
+				font-size: 44upx;
+				color: #FF4A26;
+				font-weight: bold;
+			} */
+
+			/* .end_time {
+				width: 100%;
+				height: 30upx;
+				line-height: 30upx;
+				font-size: $uni-font-size-sm;
+				color: $uni-text-color-grey;
+			} */
+		}
+
+		/* .get-btn {
+			width: 146upx;
+			height: 52upx;
+			line-height: 50upx;
+			z-index: 99999999999999999;
+			/* position: absolute;
+            top: 50%;
+            right: 20upx; */
+		/* 	margin-top: -26upx;
+			text-align: center;
+			border-radius: 60upx;
+			color: #FF4A26;
+			border: 1px solid #FF4A26;
+			font-size: $uni-font-size-sm; */
+			/* float: right; */
+		/* } */ 
+		/* .get-btn1 {
+			width: 146upx;
+			height: 52upx;
+			line-height: 50upx;
+			z-index: 99999999999999999;
+			 
+			margin-top: -26upx;
+			text-align: center;
+			border-radius: 60upx;
+			color: #eeeeee;
+			border: 1px solid #eeeeee;
+			font-size: $uni-font-size-sm;
+			 
+		} */
+	}
+
+	/* .coupon-item:after {
+		width: 40upx;
+		height: 20upx;
+		position: absolute;
+		left: 470upx;
+		top: -1px;
+		border-radius: 0 0 40upx 40upx;
+		content: "";
+		display: block;
+		background: #F5F5F7;
+		border: 1px solid #eeeeee;
+		border-top: 0px;
+	} */
+
+	/* .coupon-item:before {
+		width: 40upx;
+		height: 20upx;
+		position: absolute;
+		left: 470upx;
+		bottom: -1px;
+		border-radius: 40upx 40upx 0 0;
+		content: "";
+		display: block;
+		background: #F5F5F7;
+		border: 1px solid #eeeeee;
+		border-bottom: 0px;
+	} */
+</style>

+ 281 - 0
components/nx-coupon/yh_coupon.vue

@@ -0,0 +1,281 @@
+<template>
+	<u-popup :show="show" @close="onClose"  round="12" :closeable="true" :closeOnClickOverlay="false">
+		<view :class="[AppTheme]" class="app">
+			<view class="price-box">
+				<text class="price-box_1">选择优惠券</text>
+				<text class="price" v-if="money>=0">已选着一张优惠券,共优惠{{money}}元</text>
+				<text class="price" v-else>已选着一张优惠券,共优惠0元</text>
+			</view>
+			<view class="pay-type-list">
+				<view v-for="(item, index) in  orderList.djq" :key="index">
+
+					<view class="type-item" @click="changePayType(index,item)">
+						<view class="type-item_1">
+							<view class="type-item_2">
+								<text>¥</text>
+								<text class="text_2">{{item.money}}</text>
+							</view>
+							<view class="type-item_3">满{{item.usemoney}}元可用</view>
+						</view>
+						<view class="type-item_4">
+							<text class="type-item_5">优惠券</text>
+							<text class="type-item_6">领取后{{item.day}}天内有效</text>
+						</view>
+						<label class="radio">
+							<radio value="index" :color="primary" :checked='payType == index' />
+							</radio>
+						</label>
+					</view>
+					<view style="margin-left: 5%;">
+						<u-line color="gray" length="95%"></u-line>
+					</view>
+
+				</view>
+			</view>
+			<view class="zhan_1" @click="changePayType(-1)">
+				<view class="zhan_2">
+					<view>暂不使用优惠券</view>
+					<label class="radio">
+						<radio value="-1" :color="primary" :checked='payType ==-1' />
+						</radio>
+					</label>
+				</view>
+				<view style="margin-left: 5%;">
+					<u-line color="gray" length="95%"></u-line>
+				</view>
+
+			</view>
+
+			<text class="mix-btn bg-linear-gradient" @click="confirm">完成</text>
+
+		</view>
+	</u-popup>
+</template>
+<script>
+	export default {
+		name: "yhcoupon",
+		props: {
+			orderList: Object,
+			showModal: {
+				type: Boolean,
+			}
+		},
+		data() {
+			return {
+				primary: this.$theme.primary,
+				show: false,
+				payType: '',
+				money: 0,
+				djqid: ''
+			}
+		},
+		watch: {
+			//因为是单项数据流,v-modal控制的组件显示隐藏,父组件不可以通过props内的参数直接改变子元素参数,所以我们通过watch来监控数据的变化,间接修改show的数据
+			showModal(val) {
+				console.log('val', val)
+				this.show = val
+
+			}
+		},
+		mounted() {
+			this.monitoring() // 注册监听事件
+		},
+
+		methods: {
+		 
+			confirm() {
+				this.onClose()
+			},
+			monitoring() {
+				console.log(' this.orderList', this.orderList)
+				this.orderList.djq.forEach((item, index) => {
+					if (this.orderList.totalprice >= item.usemoney) {
+						this.payType = index
+						this.djqid = item.id
+						this.money = item.money
+					}
+				})
+				this.onClose()
+			},
+			onClose() {
+				this.show = false
+				this.$emit('close', {
+					show: this.show,
+					money: this.money,
+					djqid: this.djqid
+				}) //通知父组件隐藏了
+			},
+			changePayType(index, item) {
+				if (index >= 0) {
+					this.payType = index
+					this.money = item.money
+					this.djqid = item.id
+				} else {
+					this.djqid = ''
+					this.payType = index
+					this.money = -2
+				}
+			}
+		}
+	}
+</script>
+
+<style lang='scss'>
+	.codeinput {
+		justify-content: space-evenly;
+		display: flex;
+	}
+
+	.app {
+		width: 100%;
+	}
+
+	.money {
+		font-size: 80rpx;
+		position: relative;
+		text-align: center;
+
+		.close {
+			position: absolute;
+			top: 20rpx;
+			right: 20rpx;
+			line-height: 28rpx;
+			font-size: 28rpx;
+		}
+	}
+
+	.tips {
+		color: $u-tips-color;
+		text-align: center;
+	}
+
+	.price-box {
+		background-color: #fff;
+
+		display: flex;
+		flex-direction: column;
+		/* justify-content: center; */
+		padding: 25rpx;
+
+		.price-box_1 {
+			font-size: 30upx;
+			font-weight: 600;
+		}
+
+
+
+		.price {
+			padding: 10rpx 0;
+			color: darkgrey;
+			font-size: 26upx;
+			margin-top: 12upx;
+		}
+	}
+
+	.zhan_1 {
+		display: flex;
+		flex-direction: column;
+
+		.zhan_2 {
+			display: flex;
+			justify-content: space-between;
+			padding: 80rpx 30rpx 20rpx 30rpx;
+		}
+
+	}
+
+	.pay-type-list {
+		background-color: #fff;
+
+		.type-item {
+			padding: 40upx 30rpx 30rpx 30rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			font-size: 30upx;
+			position: relative;
+
+			.type-item_1 {
+				display: flex;
+				flex-direction: column;
+
+				.type-item_2 {
+					color: red;
+					font-size: 34rpx;
+					margin-bottom: 20rpx;
+
+					.text_2 {
+						font-weight: 600;
+					}
+				}
+
+				.type-item_3 {
+					color: darkgrey;
+					font-size: 28rpx;
+				}
+			}
+
+			.type-item_4 {
+
+				display: flex;
+				flex-direction: column;
+				margin-left: -10vh;
+
+				.type-item_5 {
+					margin-bottom: 20rpx;
+					font-size: 35rpx;
+				}
+
+				.type-item_6 {
+					color: darkgrey;
+					font-size: 28rpx;
+				}
+			}
+
+		}
+
+		.icon {
+			width: 100upx;
+			font-size: 52upx;
+		}
+
+		.icon-erjiye-yucunkuan {
+			color: #fe8e2e;
+		}
+
+		.icon-weixinzhifu {
+			color: #36cb59;
+		}
+
+		.icon-alipay {
+			color: #01aaef;
+		}
+
+		.tit {
+			font-size: $font-lg;
+			color: $font-color-dark;
+			margin-bottom: 4upx;
+		}
+
+		.con {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			font-size: $font-sm;
+			color: $font-color-light;
+		}
+	}
+
+	.mix-btn {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 630upx;
+		height: 80upx;
+		margin: 80upx auto 30upx;
+		font-size: $font-lg;
+		color: #fff;
+		border-radius: 40upx;
+	}
+</style>

+ 1253 - 0
components/payment/payment.vue

@@ -0,0 +1,1253 @@
+<template>
+	<u-popup :show="payshow" @close="payclose" @open="payopen" round="12" :closeable="true">
+		<view :class="[AppTheme]" class="app">
+			<view class="price-box">
+				<text>支付金额</text>
+				<text class="price text-neutral">{{params.money}}</text>
+			</view>
+			<view class="pay-type-list">
+				<radio-group>
+					<view v-if="weixinpay2" class="type-item b-b" @click="changepaytype(1)">
+						<u-icon name="weixin-fill" color="#62b900" size="30"></u-icon>
+						<view class="con">
+							<text class="tit">微信支付</text>
+							<text style="padding-top: 10rpx;">推荐使用微信支付</text>
+						</view>
+						<label class="radio">
+							<radio value="1" :color="primary" :checked='params.paytype == 1' />
+							</radio>
+						</label>
+					</view>
+					<!-- #ifdef APP-PLUS || H5 -->
+					<view v-if="alipay2" class="type-item" @click="changepaytype(3)">
+						<u-icon name="zhifubao" color="rgb(85, 170, 255)" size="30"></u-icon>
+						<view class="con">
+							<text class="tit">支付宝支付</text>
+						</view>
+						<label class="radio">
+							<radio value="3" :color="primary" :checked='params.paytype == 3' />
+							</radio>
+						</label>
+					</view>
+					<!-- #endif -->
+					<view v-if="zhtpay" class="type-item" @click="changepaytype(2)">
+						<u-icon name="red-packet-fill" color="rgb(224, 116, 114)" size="30"></u-icon>
+						<view class="con">
+							<text class="tit">余额支付</text>
+							<text style="padding-top: 10rpx;">可用余额 ¥{{balance}}</text>
+						</view>
+						<label class="radio">
+							<radio value="2" :color="primary" :checked='params.paytype == 2' />
+							</radio>
+						</label>
+					</view>
+				</radio-group>
+			</view>
+
+			<text class="mix-btn bg-linear-gradient" @click="confirm">确认支付</text>
+			<u-keyboard ref="uKeyboard" mode="number" :tooltip="false" :safeAreaInsetBottom="true" :overlay="true"
+				:closeOnClickOverlay="true" :dotDisabled="false" @change="onChange" @backspace="onBackspace"
+				:show="show">
+				<view>
+					<view class="u-text-center u-padding-20 money">
+						<view class="text-neutral">
+							<text>{{params.money}}</text>
+							<text class="u-font-20 u-padding-left-10">元</text>
+						</view>
+						<view class="u-padding-10 close" data-flag="false" @tap="showPop(false)">
+							<u-icon name="close" color="#333333" size="28"></u-icon>
+						</view>
+					</view>
+					<view class="u-flex u-row-center codeinput" style="margin: 20rpx 0; padding: auto;100%;">
+						<u-code-input :color="primary" :borderColor="primary" :space="20" size="40" mode="box"
+							:maxlength="6" :dot="true" v-model="password" :disabledKeyboard="true" @finish="finish">
+						</u-code-input>
+					</view>
+				</view>
+			</u-keyboard>
+		</view>
+	</u-popup>
+</template>
+
+<script>
+	// #ifdef H5
+	var wx = require('jweixin-module');
+	// #endif
+	import wallApi from '@/api/wall/index.js';
+	import cart from '@/api/cart/index.js';
+	import api from '@/api/mall/index.js';
+	import adoptApi from '@/api/home/index.js';
+	import {
+		allKeys
+	} from '../../js/underscore';
+	export default {
+		name: "payment",
+		props: ["channel", "weixinpay", "alipay", "zhtpay"], //1:(商品,砍价 ,拼团),2:认养,,3:充值,4:租地,5:活动,6:保证金
+		data() {
+			return {
+				primary: this.$theme.primary,
+				settingFile: getApp().globalData.siteinfo,
+				payshow: false,
+				show: false,
+				password: '',
+				balance: 0,
+				params: {
+					// 支付方式
+					paytype: 1, //1:微信,2:余额,3:支付宝
+					systype: '', //h5 或 app 或 mpweixin
+					money: 0
+				},
+				weixinpay2: false,
+				alipay2: false,
+			};
+		},
+		created() {
+			let that = this;
+			wallApi.income({}).then(res => {
+				if (res.status == 200) {
+					that.balance = res.data.money; //余额
+				}
+			});
+			let config = that.$init_config(1, function(res) {
+				if (res && res.app) {
+					that.weixinpay2 = res.app.pay.wx.isopen;
+					that.alipay2 = res.app.pay.ali.isopen;
+				}
+			});
+		},
+		methods: {
+			init(data) {
+				let that = this;
+				if (data) {
+					that.params = data;
+					that.params.money = parseFloat(that.params.money).toFixed(2);
+					// #ifdef APP-PLUS
+					that.params.systype = 'app'
+					// #endif
+					// #ifdef H5
+					that.params.systype = 'h5'
+					// #endif
+					// #ifdef MP-WEIXIN
+					that.params.systype = 'mpweixin'
+					// #endif
+				}
+			},
+			payopen(data) {
+				let that = this;
+				that.init(data);
+				that.payshow = true;
+			},
+			payclose() {
+				let that = this;
+				that.payshow = false;
+			},
+			changepaytype(type) {
+				let that = this;
+				that.params.paytype = type;
+			},
+			confirm() {
+				let that = this;
+				if (that.params.paytype == 1) {
+					that.paywx();
+				} else if (that.params.paytype == 2) {
+					if (that.channel != 3) {
+						that.show = true;
+						that.password = ''
+					} else {
+						uni.showToast({
+							title: '请选择正确的支付方式',
+							icon: 'none'
+						})
+						return;
+					}
+				} else if (that.params.paytype == 3) {
+					that.payali();
+				} else {
+					uni.showToast({
+						title: '请选择正确的支付方式',
+						icon: 'none'
+					})
+					return;
+				}
+
+			},
+			onChange(val) {
+				let that = this;
+				if (that.password.length < 6) {
+					that.password += val;
+				}
+				if (that.password.length >= 6) {
+					if (that.params.paytype == 1) {
+						that.paywx();
+					} else if (that.params.paytype == 2) {
+						that.paybalance();
+					}
+				}
+			},
+			onBackspace(e) {
+				let that = this;
+				if (that.password.length > 0) {
+					that.password = that.password.substring(0, that.password.length - 1);
+				}
+			},
+			paywx() {
+				let that = this;
+				if (that.channel == 1) {
+					that.$paycenter.paygood(that.params).then(res => {
+						if (res.status === 0 || res.code === 0) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						} else {
+							// #ifdef APP-PLUS
+							that.wxPayAPPPLUS(res.data)
+							// #endif
+							// #ifdef H5
+							that.wxPayH5(res.data)
+							// #endif
+							// #ifdef MP-WEIXIN
+							that.wxPayWEIXIN(res.data)
+							// #endif
+						}
+					})
+				} else if (that.channel == 2) {
+					that.$paycenter.payrenyang(that.params).then(res => {
+						if (res.status === 0 || res.code === 0) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						} else {
+							// #ifdef APP-PLUS
+							that.wxPayAPPPLUS(res.data)
+							// #endif
+							// #ifdef H5
+							that.wxPayH5(res.data)
+							// #endif
+							// #ifdef MP-WEIXIN
+							that.wxPayWEIXIN(res.data)
+							// #endif
+						}
+					})
+				} else if (that.channel == 3) {
+					that.$paycenter.paycz(that.params).then(res => {
+						if (res.status === 0 || res.code === 0) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						} else {
+							// #ifdef APP-PLUS
+							that.wxPayAPPPLUS(res.data)
+							// #endif
+							// #ifdef H5
+							that.wxPayH5(res.data)
+							// #endif
+							// #ifdef MP-WEIXIN
+							that.wxPayWEIXIN(res.data)
+							// #endif
+						}
+					})
+				} else if (that.channel == 4) {
+					that.$paycenter.payland(that.params).then(res => {
+						if (res.status === 0 || res.code === 0) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						} else {
+							// #ifdef APP-PLUS
+							that.wxPayAPPPLUS(res.data)
+							// #endif
+							// #ifdef H5
+							that.wxPayH5(res.data)
+							// #endif
+							// #ifdef MP-WEIXIN
+							that.wxPayWEIXIN(res.data)
+							// #endif
+						}
+					})
+				} else if (that.channel == 5) {
+					that.$paycenter.payactivity(that.params).then(res => {
+						if (res.status === 0 || res.code === 0) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						} else {
+							// #ifdef APP-PLUS
+							that.wxPayAPPPLUS(res.data)
+							// #endif
+							// #ifdef H5
+							that.wxPayH5(res.data)
+							// #endif
+							// #ifdef MP-WEIXIN
+							that.wxPayWEIXIN(res.data)
+							// #endif
+						}
+					})
+				} else if (that.channel == 6) {
+					that.$paycenter.renewal(that.params).then(res => {
+						if (res.status === 0 || res.code === 0) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						} else {
+							// #ifdef APP-PLUS
+							that.wxPayAPPPLUS(res.data)
+							// #endif
+							// #ifdef H5
+							that.wxPayH5(res.data)
+							// #endif
+							// #ifdef MP-WEIXIN
+							that.wxPayWEIXIN(res.data)
+							// #endif
+						}
+					})
+				} else if (that.channel == 7) {
+					that.$paycenter.seedpay(that.params).then(res => {
+						if (res.status === 0 || res.code === 0) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						} else {
+							// #ifdef APP-PLUS
+							that.wxPayAPPPLUS(res.data)
+							// #endif
+							// #ifdef H5
+							that.wxPayH5(res.data)
+							// #endif
+							// #ifdef MP-WEIXIN
+							that.wxPayWEIXIN(res.data)
+							// #endif
+						}
+					})
+				} else if (that.channel == 8) {
+					that.$paycenter.payserve(that.params).then(res => {
+						if (res.status === 0 || res.code === 0) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						} else {
+							// #ifdef APP-PLUS
+							that.wxPayAPPPLUS(res.data)
+							// #endif
+							// #ifdef H5
+							that.wxPayH5(res.data)
+							// #endif
+							// #ifdef MP-WEIXIN
+							that.wxPayWEIXIN(res.data)
+							// #endif
+						}
+					})
+				} else if (that.channel == 9) {
+					that.$paycenter.operator(that.params).then(res => {
+						if (res.status === 0 || res.code === 0) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						} else {
+							// #ifdef APP-PLUS
+							that.wxPayAPPPLUS(res.data)
+							// #endif
+							// #ifdef H5
+							that.wxPayH5(res.data)
+							// #endif
+							// #ifdef MP-WEIXIN
+							that.wxPayWEIXIN(res.data)
+							// #endif
+						}
+					})
+				} else if (that.channel == 10) {
+					that.$paycenter.paybond(that.params).then(res => {
+						if (res.status === 0 || res.code === 0) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						} else {
+							// #ifdef APP-PLUS
+							that.wxPayAPPPLUS(res.data)
+							// #endif
+							// #ifdef H5
+							that.wxPayH5(res.data)
+							// #endif
+							// #ifdef MP-WEIXIN
+							that.wxPayWEIXIN(res.data)
+							// #endif
+						}
+					})
+				}
+			},
+
+			payali() {
+				let that = this;
+				if (that.channel == 1) {
+					that.$paycenter.paygood(that.params).then(res => {
+						if (res.status === 0 || res.code === 0) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						} else {
+							// #ifdef APP-PLUS
+							that.aliPayAPPPLUS(res.data)
+							// #endif
+							// #ifdef H5
+							that.aliPayH5(res.data)
+							// #endif
+						}
+					})
+				} else if (that.channel == 2) {
+					that.$paycenter.payrenyang(that.params).then(res => {
+						if (res.status === 0 || res.code === 0) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						} else {
+							// #ifdef APP-PLUS
+							that.aliPayAPPPLUS(res.data)
+							// #endif
+							// #ifdef H5
+							that.aliPayH5(res.data)
+							// #endif
+						}
+					})
+				} else if (that.channel == 3) {
+					that.$paycenter.paycz(that.params).then(res => {
+						if (res.status === 0 || res.code === 0) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						} else {
+							// #ifdef APP-PLUS
+							that.aliPayAPPPLUS(res.data)
+							// #endif
+							// #ifdef H5
+							that.aliPayH5(res.data)
+							// #endif
+						}
+					})
+				} else if (that.channel == 4) {
+					that.$paycenter.payland(that.params).then(res => {
+						if (res.status === 0 || res.code === 0) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						} else {
+							// #ifdef APP-PLUS
+							that.aliPayAPPPLUS(res.data)
+							// #endif
+							// #ifdef H5
+							that.aliPayH5(res.data)
+							// #endif
+						}
+					})
+				} else if (that.channel == 5) {
+					that.$paycenter.payactivity(that.params).then(res => {
+						if (res.status === 0 || res.code === 0) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						} else {
+							// #ifdef APP-PLUS
+							that.aliPayAPPPLUS(res.data)
+							// #endif
+							// #ifdef H5
+							that.aliPayH5(res.data)
+							// #endif
+						}
+					})
+				} else if (that.channel == 6) {
+					that.$paycenter.renewal(that.params).then(res => {
+						if (res.status === 0 || res.code === 0) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						} else {
+							// #ifdef APP-PLUS
+							that.aliPayAPPPLUS(res.data)
+							// #endif
+							// #ifdef H5
+							that.aliPayH5(res.data)
+							// #endif
+						}
+					})
+				} else if (that.channel == 7) {
+					that.$paycenter.seedpay(that.params).then(res => {
+						if (res.status === 0 || res.code === 0) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						} else {
+							// #ifdef APP-PLUS
+							that.aliPayAPPPLUS(res.data)
+							// #endif
+							// #ifdef H5
+							that.aliPayH5(res.data)
+							// #endif
+						}
+					})
+				} else if (that.channel == 8) {
+					that.$paycenter.payserve(that.params).then(res => {
+						if (res.status === 0 || res.code === 0) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						} else {
+							// #ifdef APP-PLUS
+							that.aliPayAPPPLUS(res.data)
+							// #endif
+							// #ifdef H5
+							that.aliPayH5(res.data)
+							// #endif
+						}
+					})
+				} else if (that.channel == 9) {
+					that.$paycenter.operator(that.params).then(res => {
+						if (res.status === 0 || res.code === 0) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						} else {
+							// #ifdef APP-PLUS
+							that.aliPayAPPPLUS(res.data)
+							// #endif
+							// #ifdef H5
+							that.aliPayH5(res.data)
+							// #endif
+						}
+					})
+				} else if (that.channel == 10) {
+					that.$paycenter.paybond(that.params).then(res => {
+						if (res.status === 0 || res.code === 0) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						} else {
+							// #ifdef APP-PLUS
+							that.aliPayAPPPLUS(res.data)
+							// #endif
+							// #ifdef H5
+							that.aliPayH5(res.data)
+							// #endif
+						}
+					})
+				}
+			},
+
+			paybalance() {
+				let that = this;
+				if (that.channel == 1) {
+					that.paybalance1()
+				} else if (that.channel == 2) {
+					that.paybalance2()
+				} else if (that.channel == 4) {
+					that.paybalance4()
+				} else if (that.channel == 5) {
+					that.paybalance5()
+				} else if (that.channel == 6) {
+					that.paybalance6()
+				} else if (that.channel == 7) {
+					that.paybalance7()
+				} else if (that.channel == 8) {
+					that.paybalance8()
+				} else if (that.channel == 9) {
+					that.paybalance9()
+				} else if (that.channel == 10) {
+					that.paybalance10()
+				}
+			},
+
+			wxPayWEIXIN(paydata) {
+				let that = this;
+				uni.requestPayment({
+					provider: 'wxpay',
+					timeStamp: paydata.timeStamp,
+					nonceStr: paydata.nonceStr,
+					package: paydata.package,
+					signType: paydata.signType,
+					paySign: paydata.paySign,
+					success: function(res) {
+
+						uni.showToast({
+							title: '支付成功',
+							icon: 'success',
+							duration: 1500
+						});
+						that.payfinish()
+					},
+					fail: function(err) {
+						console.log('err', err)
+					}
+				});
+			},
+
+			wxPayH5(paydata) {
+				let that = this;
+				wx.config({
+					debug: false,
+					appId: paydata.appid, // 必填,公众号的唯一标识
+					timestamp: paydata.timeStamp, // 必填,生成签名的时间戳
+					nonceStr: paydata.nonceStr, // 必填,生成签名的随机串
+					signature: paydata.paySign,
+					jsApiList: ['chooseWXPay']
+				});
+				wx.ready(function() {
+					wx.chooseWXPay({
+						timestamp: paydata.timeStamp,
+						nonceStr: paydata.nonceStr, // 支付签名随机串,不长于 32 位
+						package: paydata.package,
+						signType: 'MD5', // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
+						paySign: paydata.paySign, // 支付签名
+						success(res) {
+							that.payfinish()
+						},
+						fail(err) {
+							console.log('fail', err)
+							uni.showToast({
+								icon: 'none',
+								title: '未完成支付!'
+							})
+						}
+					});
+				});
+			},
+
+			wxPayAPPPLUS(paydata) {
+				let that = this;
+				console.log('paydata',paydata)
+				uni.requestPayment({
+					provider: 'wxpay',
+					orderInfo: paydata,
+					success: function(res) {
+						uni.showToast({
+							title: '支付成功',
+							icon: 'success',
+							duration: 1500
+						});
+						that.payfinish()
+					},
+					fail: function(err) {
+						console.log('fail', err)
+						uni.showToast({
+							title: err.errMsg,
+							icon: 'none'
+						})
+					}
+				});
+			},
+
+			aliPayH5(paydata) {
+				let that = this;
+				uni.showToast({
+					icon: 'none',
+					title: '暂未开放!'
+				})
+				wx.config({
+					debug: false,
+					appId: paydata.appid, // 必填,公众号的唯一标识
+					timestamp: paydata.timeStamp, // 必填,生成签名的时间戳
+					nonceStr: paydata.nonceStr, // 必填,生成签名的随机串
+					signature: paydata.paySign,
+					jsApiList: ['chooseWXPay']
+				});
+				wx.ready(function() {
+					wx.chooseWXPay({
+						timestamp: paydata.timeStamp,
+						nonceStr: paydata.nonceStr, // 支付签名随机串,不长于 32 位
+						package: paydata.package,
+						signType: 'MD5', // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
+						paySign: paydata.paySign, // 支付签名
+						success(res) {
+							that.payfinish()
+						},
+						fail(err) {
+							console.log('fail', err)
+							uni.showToast({
+								icon: 'none',
+								title: '未完成支付!'
+							})
+						}
+					});
+				});
+			},
+
+			aliPayAPPPLUS(paydata) {
+				let that = this;
+				console.log('paydata', paydata)
+				uni.requestPayment({
+					provider: 'alipay',
+					orderInfo: paydata,
+					success: function(res) {
+						uni.showToast({
+							title: '支付成功',
+							icon: 'success',
+							duration: 1500
+						});
+						that.payfinish()
+					},
+					fail: function(err) {
+						console.log('fail', err)
+						uni.showToast({
+							title: err.errMsg,
+							icon: 'none'
+						})
+					}
+				});
+			},
+
+			//余额支付
+			paybalance1() {
+				let that = this;
+				cart.checkPayPassword({
+					password: that.password
+				}).then(res => {
+
+					uni.hideLoading();
+					if (res.status == 200) {
+						var pdata = {
+							orderid: that.params.orderid,
+							djqid: that.params.djqid,
+							type: that.params.paytype == 1 ? 'wxpay' : 'money',
+							paypass: that.password
+						};
+						api.pay(pdata)
+							.then(res => {
+								uni.showToast({
+									title: res.msg,
+									icon: "none"
+								});
+								if (res.status == 200) {
+									that.payfinish()
+								}
+							});
+
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: "none"
+						});
+						if (res.msg === '未设置支付密码,现在进行设置!') {
+							setTimeout(() => {
+								uni.navigateTo({
+									url: '/pagesD/pages/set/changemima/changemima'
+								})
+							}, 1000)
+						}
+					}
+				})
+			},
+			//余额支付
+			paybalance2() {
+				let that = this;
+				cart.checkPayPassword({
+					password: that.password
+				}).then(res => {
+
+					uni.hideLoading();
+					if (res.status == 200) {
+						var pdata = {
+							orderid: that.params.orderid,
+							djqid: that.params.djqid,
+							type: that.params.paytype == 1 ? 'wxpay' : 'money',
+							paypass: that.password
+						};
+						adoptApi.payNew(pdata)
+							.then(res => {
+								uni.showToast({
+									title: res.msg,
+									icon: "none"
+								});
+								if (res.status == 200) {
+									that.payfinish()
+								}
+							});
+
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: "none"
+						});
+						if (res.msg === '未设置支付密码,现在进行设置!') {
+							setTimeout(() => {
+								uni.navigateTo({
+									url: '/pagesD/pages/set/changemima/changemima'
+								})
+							}, 1000)
+						}
+					}
+				})
+
+
+			},
+			//余额支付
+			paybalance4() {
+				let that = this;
+				cart.checkPayPassword({
+					password: that.password
+				}).then(res => {
+
+					uni.hideLoading();
+					if (res.status == 200) {
+						let pdata = {
+							order_info: JSON.stringify(that.params)
+						};
+						that.$paycenter.pay_soil_money(pdata)
+							.then(res => {
+								uni.showToast({
+									title: res.msg,
+									icon: "none"
+								});
+								if (res.status == 200) {
+									that.payfinish()
+								}
+							});
+
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: "none"
+						});
+						if (res.msg === '未设置支付密码,现在进行设置!') {
+							setTimeout(() => {
+								uni.navigateTo({
+									url: '/pagesD/pages/set/changemima/changemima'
+								})
+							}, 1000)
+						}
+					}
+				})
+
+
+			},
+			//余额支付
+			paybalance5() {
+				let that = this;
+
+				cart.checkPayPassword({
+					password: that.password
+				}).then(res => {
+
+					uni.hideLoading();
+					if (res.status == 200) {
+						that.$paycenter.pay_ac_money(that.params)
+							.then(res => {
+								uni.showToast({
+									title: res.msg,
+									icon: "none"
+								});
+								if (res.status == 200) {
+									that.payfinish()
+								}
+							});
+
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: "none"
+						});
+						if (res.msg === '未设置支付密码,现在进行设置!') {
+							setTimeout(() => {
+								uni.navigateTo({
+									url: '/pagesD/pages/set/changemima/changemima'
+								})
+							}, 1000)
+						}
+					}
+				})
+			},
+			//余额支付 
+			paybalance6() {
+				let that = this;
+				cart.checkPayPassword({
+					password: that.password
+				}).then(res => {
+
+					uni.hideLoading();
+					if (res.status == 200) {
+						that.$paycenter.pay_renewal_money(that.params)
+							.then(res => {
+								uni.showToast({
+									title: res.msg,
+									icon: "none"
+								});
+								if (res.status == 200) {
+									uni.showToast({
+										title: res.msg,
+										icon: "none"
+									});
+									setTimeout(() => {
+										uni.navigateTo({
+											url: '/pagesE/pages/plotdetails/plotdetails?orderid=' +
+												that.params.orderid
+										})
+									}, 2000)
+
+								}
+							});
+
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: "none"
+						});
+						if (res.msg === '未设置支付密码,现在进行设置!') {
+							setTimeout(() => {
+								uni.navigateTo({
+									url: '/pagesD/pages/set/changemima/changemima'
+								})
+							}, 1000)
+						}
+					}
+				})
+			},
+			//余额支付
+			paybalance7() {
+				let that = this;
+				cart.checkPayPassword({
+					password: that.password
+				}).then(res => {
+
+					uni.hideLoading();
+					if (res.status == 200) {
+						that.$paycenter.pay_seed_money(that.params)
+							.then(res => {
+								uni.showToast({
+									title: res.msg,
+									icon: "none"
+								});
+								if (res.status == 200) {
+									uni.showToast({
+										title: res.msg,
+										icon: "none"
+									});
+									setTimeout(() => {
+										uni.navigateTo({
+											url: '/pagesE/pages/plotdetails/plotdetails?orderid=' +
+												that.params.orderid
+										})
+									}, 2000)
+
+								}
+							});
+
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: "none"
+						});
+						if (res.msg === '未设置支付密码,现在进行设置!') {
+							setTimeout(() => {
+								uni.navigateTo({
+									url: '/pagesD/pages/set/changemima/changemima'
+								})
+							}, 1000)
+						}
+					}
+				})
+			},
+			//余额支付
+			paybalance8() {
+				let that = this;
+				cart.checkPayPassword({
+					password: that.password
+				}).then(res => {
+
+					uni.hideLoading();
+					if (res.status == 200) {
+						that.$paycenter.pay_serve_money(that.params)
+							.then(res => {
+								uni.showToast({
+									title: res.msg,
+									icon: "none"
+								});
+								if (res.status == 200) {
+									uni.showToast({
+										title: res.msg,
+										icon: "none"
+									});
+									setTimeout(() => {
+										uni.navigateTo({
+											url: '/pagesE/pages/plotdetails/plotdetails?orderid=' +
+												that.params.orderid
+										})
+									}, 2000)
+
+								}
+							});
+
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: "none"
+						});
+						if (res.msg === '未设置支付密码,现在进行设置!') {
+							setTimeout(() => {
+								uni.navigateTo({
+									url: '/pagesD/pages/set/changemima/changemima'
+								})
+							}, 1000)
+						}
+					}
+				})
+			},
+			//余额支付
+			paybalance9() {
+				let that = this;
+				cart.checkPayPassword({
+					password: that.password
+				}).then(res => {
+
+					uni.hideLoading();
+					if (res.status == 200) {
+						that.$paycenter.pay_operator_money(that.params)
+							.then(res => {
+								uni.showToast({
+									title: res.msg,
+									icon: "none"
+								});
+								if (res.status == 200) {
+									uni.showToast({
+										title: res.msg,
+										icon: "none"
+									});
+									console.log(that.params.type, 'that.params.type')
+									if (that.params.type == 2) {
+										setTimeout(() => {
+											uni.navigateTo({
+												url: '/pagesE/pages/seedlist/decoration/decoration?id=' +
+													that.params.order_id
+											})
+										}, 2000)
+									} else {
+										setTimeout(() => {
+											uni.navigateTo({
+												url: '/pagesE/pages/seedlist/crop?id=' + that
+													.params.seed_id
+											})
+										}, 2000)
+									}
+
+
+								}
+							});
+
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: "none"
+						});
+						if (res.msg === '未设置支付密码,现在进行设置!') {
+							setTimeout(() => {
+								uni.navigateTo({
+									url: '/pagesD/pages/set/changemima/changemima'
+								})
+							}, 1000)
+						}
+					}
+				})
+			},
+			//余额支付
+			paybalance10() {
+				let that = this;
+				cart.checkPayPassword({
+					password: that.password
+				}).then(res => {
+
+					uni.hideLoading();
+					if (res.status == 200) {
+						that.$paycenter.pay_bond_money(that.params)
+							.then(res => {
+								uni.showToast({
+									title: res.msg,
+									icon: "none"
+								});
+								if (res.status == 200) {
+									uni.showToast({
+										title: res.msg,
+										icon: "none"
+									});
+									setTimeout(() => {
+										uni.navigateTo({
+											url: '/pagesC/pages/merchantdetails/bond'
+										})
+									}, 1000)
+								}
+							});
+
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: "none"
+						});
+						if (res.msg === '未设置支付密码,现在进行设置!') {
+							setTimeout(() => {
+								uni.navigateTo({
+									url: '/pagesD/pages/set/changemima/changemima'
+								})
+							}, 1000)
+						}
+					}
+				})
+			},
+			showPop(flag = true) {
+				let that = this;
+				that.password = '';
+				that.show = flag;
+			},
+			finish() {
+
+			},
+			payfinish() {
+				let that = this;
+				if (that.channel == 3) {
+					that.payclose();
+					//1:(商品,砍价 ,拼团),2:认养,,3:充值,4:租地,5:活动
+					uni.navigateBack(-1);
+				} else if (that.channel == 10) {
+					that.payclose();
+					uni.navigateTo({
+						url: '/pagesC/pages/merchantdetails/bond'
+					});
+				} else {
+					setTimeout(function() {
+						//1:(商品,砍价 ,拼团),2:认养,,3:充值,4:租地,5:活动
+						uni.navigateTo({
+							url: '/pagesE/pages/common/paySuccess?channel=' + that.channel
+						});
+					}, 1000)
+				}
+			}
+		}
+	}
+</script>
+
+
+<style lang='scss'>
+	.codeinput {
+		justify-content: space-evenly;
+		display: flex;
+	}
+
+	.app {
+		width: 100%;
+	}
+
+	.money {
+		font-size: 80rpx;
+		position: relative;
+		text-align: center;
+
+		.close {
+			position: absolute;
+			top: 20rpx;
+			right: 20rpx;
+			line-height: 28rpx;
+			font-size: 28rpx;
+		}
+	}
+
+	.tips {
+		color: $u-tips-color;
+		text-align: center;
+	}
+
+	.price-box {
+		background-color: #fff;
+		height: 160rpx;
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		font-size: 28upx;
+		color: #909399;
+
+		.price {
+			font-size: 50upx;
+			margin-top: 12upx;
+
+			&:before {
+				content: '¥';
+				font-size: 40upx;
+			}
+		}
+	}
+
+	.pay-type-list {
+		/* margin-top: 20upx; */
+		background-color: #fff;
+		padding-left: 60upx;
+
+		.type-item {
+			height: 120upx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding-right: 60upx;
+			font-size: 30upx;
+			position: relative;
+
+			.con {
+				margin-left: 20rpx;
+			}
+		}
+
+		.icon {
+			width: 100upx;
+			font-size: 52upx;
+		}
+
+		.icon-erjiye-yucunkuan {
+			color: #fe8e2e;
+		}
+
+		.icon-weixinzhifu {
+			color: #36cb59;
+		}
+
+		.icon-alipay {
+			color: #01aaef;
+		}
+
+		.tit {
+			font-size: $font-lg;
+			color: $font-color-dark;
+			margin-bottom: 4upx;
+		}
+
+		.con {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			font-size: $font-sm;
+			color: $font-color-light;
+		}
+	}
+
+	.mix-btn {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 630upx;
+		height: 80upx;
+		margin: 80upx auto 30upx;
+		font-size: $font-lg;
+		color: #fff;
+		border-radius: 10upx;
+	}
+</style>

+ 506 - 0
components/sharebox/sharebox.vue

@@ -0,0 +1,506 @@
+<template>
+	<view :class="[AppTheme]">
+		<u-popup :show="ifshare" mode="bottom">
+			<view class="sharebox">
+				<view class="shareitem_title">分享到:</view>
+				<view class="shareitem_list">
+					<!-- #ifdef MP-WEIXIN -->
+					<view class="shareitem" v-for="(item,index) in shareitemlist" :key="index" @click="sharemsg(item)">
+						<u-icon v-if="item.provider!='weixin'" labelPos="bottom" :label="item.title" labelSize="12"
+							size="40" :name="reqimg(item.imgsrc,item.type)"></u-icon>
+						<button v-else class="separate" plain="true" data-name="shareBtn" open-type="share">
+							<u-icon labelPos="bottom" :label="item.title" labelSize="12" size="40"
+								:name="reqimg(item.imgsrc,item.type)"></u-icon>
+						</button>
+					</view>
+					<!-- #endif -->
+					<!-- #ifndef MP-WEIXIN -->
+					<view class="shareitem" v-for="(item,index) in shareitemlist" :key="index" @click="sharemsg(item)">
+						<u-icon labelPos="bottom" :label="item.title" labelSize="12" size="40"
+							:name="reqimg(item.imgsrc,item.type)"></u-icon>
+					</view>
+					<!-- #endif -->
+				</view>
+				<view class="sharecanle" @click="colosesharebox()">取消</view>
+			</view>
+		</u-popup>
+		<u-popup :show="showalert" mode="center">
+			<view class="dAlert" v-show="showalert">
+				<view class="wrapperAlert" @click="closeModal">
+					<view class="wrapperAlertBox" @click.stop="" @touchmove.stop.prevent="">
+						<view class="vueDAlertWrapper" style="border-radius: 20rpx;">
+							<view style="width: 100%;height: 50rpx;"></view>
+							<view class="vueDAlertWrapperTop" style="justify-content: center;display: flex;">
+								<u--image :src="sharedata.imageUrl" mode="aspectFit" width="600rpx" height="900rpx">
+									<template v-slot:loading>
+										<u-loading-icon color="#afafaf"></u-loading-icon>
+									</template>
+								</u--image>
+							</view>
+
+							<view class="vueDAlertWrapperBtn" @click.stop="saveImage()">
+								长安海报进行保存或者分享
+							</view>
+							<view style="justify-content: center;display: flex;" @click="closeModal()">
+								<u-icon name="close-circle" color="#ffffff" size="28"></u-icon>
+							</view>
+						</view>
+					</view>
+
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+<script>
+	// #ifdef H5
+	import FileSaver from 'file-saver'
+	import wxchar from '@/js/wxchar.js'
+	// #endif
+	export default {
+		props: ["data"],
+		data() {
+			return {
+				depng: '@/static/imgs/del.png',
+				showalert: false,
+				primary: this.$theme.primary,
+				settingFile: getApp().globalData.siteinfo,
+				sharedata: [],
+				ifshare: false,
+				shareitemlist: [{
+						title: '微信好友',
+						provider: 'weixin',
+						type: 1,
+						imgsrc: 'weixin.png'
+					},
+					// {
+					// 	title: 'QQ好友',
+					// 	provider: 'qq',
+					// 	type: 1,
+					// 	imgsrc: 'qq.png'
+					// },
+					// {
+					// 	title: 'QQ空间',
+					// 	provider: 'qq',
+					// 	type: 1,
+					// 	imgsrc: 'qqkjian.png'
+					// },
+					// {
+					// 	title: '复制链接',
+					// 	provider: 'copyhref',
+					// 	type: 1,
+					// 	imgsrc: 'href.png'
+					// },
+					{
+						title: '保存图片',
+						provider: 'saveimg',
+						type: 2,
+						imgsrc: 'download'
+					}
+				]
+			}
+		},
+		created() {
+			let that = this;
+			if (that.data) {
+				that.sharedata = that.data
+			} else {
+				that.sharedata = that.$config.sharedata
+			}
+			// #ifdef H5
+			let wxdata = {
+				title: that.sharedata.title,
+				desc: that.sharedata.title,
+				link: that.sharedata.path,
+				imageUrl: that.sharedata.imageUrl,
+			};
+			wxchar.initWeixinShareConfig(wxdata);
+			that.shareitemlist = [{
+					title: '复制链接',
+					provider: 'copyhref',
+					type: 1,
+					imgsrc: 'href.png'
+				},
+				{
+					title: '保存图片',
+					provider: 'saveimg',
+					type: 2,
+					imgsrc: 'download'
+				}
+			]
+			// #endif
+			// #ifdef APP-PLUS
+			that.shareitemlist = [{
+					title: '微信好友',
+					provider: 'weixin',
+					type: 1,
+					imgsrc: 'weixin.png'
+				},
+				{
+					title: '微信朋友圈',
+					provider: 'weixin',
+					type: 1,
+					imgsrc: 'pyq.png'
+				}, {
+					title: '复制链接',
+					provider: 'copyhref',
+					type: 1,
+					imgsrc: 'href.png'
+				},
+				{
+					title: '保存图片',
+					provider: 'saveimg',
+					type: 2,
+					imgsrc: 'download'
+				}
+			]
+			// #endif
+		},
+		methods: {
+			//保存图片到相册
+			saveImage() {
+				//判断用户授权
+				var that = this
+				uni.getSetting({
+					success(res) {
+						console.log('获取用户权限', res.authSetting)
+						if (Object.keys(res.authSetting).length > 0) {
+							//判断是否有相册权限
+							if (res.authSetting['scope.writePhotosAlbum'] == undefined) {
+								that.authorize();
+							} else {
+								if (!res.authSetting['scope.writePhotosAlbum']) {
+									that.authorize();
+								}
+							}
+						} else {
+							return
+						}
+					}
+				})
+				that.saveImg(that.sharedata.imageUrl);
+			},
+			authorize() {
+				let scope = 'scope.writePhotosAlbum'
+				return new Promise((resolve, reject) => {
+					wx.getSetting({
+						success: res => {
+							if (!res.authSetting[scope]) {
+								wx.authorize({
+									scope,
+									success: resolve,
+									fail: () => wx.showModal({
+										content: R.string
+											.prompt_authorize_photos, // 请允许小程序使用相册权限
+										success: () => wx.openSetting({
+											success: res => {
+												if (res.authSetting[
+														scope]) {
+													resolve(res
+														.authSetting)
+												} else {
+													wx.showModal({
+														content: R
+															.string
+															.prompt_authorize_cancel
+													}) // 未允许使用该权限
+													reject(res.authSetting)
+												}
+											}
+										})
+									})
+								})
+							} else {
+								resolve(res.authSetting)
+							}
+						}
+					})
+				})
+			},
+			closeModal() {
+				this.showalert = false;
+			},
+			// 引入图片
+			reqimg(imgsrc, type = 1) {
+				if (type == 2) {
+					return imgsrc;
+				} else {
+					return this.settingFile.root_img + '/static/app/imgs/farm/' + imgsrc;
+				}
+			},
+			//打开
+			opensharebox(data = null) {
+				let that = this;
+				if (data) {
+					that.sharedata = data;
+				}
+				this.ifshare = true;
+				// #ifdef H5
+				let wxdata = {
+					title: that.sharedata.title,
+					desc: that.sharedata.title,
+					link: that.sharedata.paht,
+					imageUrl: that.sharedata.imageUrl,
+				};
+				wxchar.initWeixinShareConfig(wxdata);
+				// #endif
+				console.log('that.sharedata', that.sharedata)
+			},
+			// 关闭分享窗口
+			colosesharebox() {
+				this.ifshare = false;
+			},
+			// 分享
+			sharemsg(item) {
+				let that = this
+				that.colosesharebox()
+				switch (item.provider) {
+					//微信分支
+					case 'weixin':
+						// #ifndef MP-WEIXIN
+						let scene = ''
+						//判定是发送到微信好友还有朋友圈
+						if (item.title === '微信好友') {
+							scene = 'WXSceneSession'
+						} else {
+							scene = 'WXSceneTimeline'
+						}
+						uni.share({
+							provider: item.provider,
+							type: 0,
+							scene: scene,
+							title: that.sharedata.title,
+							imageUrl: that.sharedata.imageUrl,
+							summary: that.sharedata.title,
+							href: that.sharedata.path,
+							success: function(res) {
+								uni.showToast({
+									title: '分享成功',
+									icon: 'none',
+									position: 'top'
+								})
+							},
+							fail: function(err) {
+								uni.showToast({
+									title: '分享失败',
+									icon: 'none',
+									position: 'top'
+								})
+							}
+						});
+						// #endif
+						break;
+					case 'qq':
+						uni.share({
+							provider: item.provider,
+							type: 2,
+							title: that.sharedata.title,
+							imageUrl: that.sharedata.imageUrl,
+							href: that.sharedata.path,
+							success: function(res) {
+								uni.showToast({
+									title: '分享成功',
+									icon: 'none',
+									position: 'top'
+								})
+							},
+							fail: function(err) {
+								uni.showToast({
+									title: '分享失败',
+									icon: 'none',
+									position: 'top'
+								})
+							}
+						});
+						break;
+					case 'copyhref':
+						var context = that.sharedata.title + "\r\n-------------\r\n打开链接:" + that.sharedata.tourl
+						console.log('context', context)
+						uni.setClipboardData({
+							data: context,
+							success() {
+								uni.showToast({
+									title: '已复制到剪贴板',
+									icon: 'none',
+									position: 'top'
+								})
+							}
+						})
+						break;
+					case 'saveimg':
+						// #ifdef H5
+						let isWeixin = that.isWeiXin();
+						console.log('isWeixin', isWeixin)
+						if (isWeixin) {
+							this.showalert = true;
+						} else {
+							FileSaver.saveAs(that.sharedata.imageUrl, 'saveimg.jpg');
+						}
+						// #endif
+						// #ifndef H5
+						that.saveImg(that.sharedata.imageUrl);
+						// #endif
+						break;
+				}
+			},
+			saveImg(url) {
+				const that = this;
+				console.log('url',url)
+				uni.downloadFile({
+					url: url,
+					success: res => {
+						if (res.statusCode === 200) {
+							uni.saveImageToPhotosAlbum({
+								filePath: res.tempFilePath,
+								success: function() {
+									uni.showToast({
+										title: '保存下载成功',
+										icon: 'none',
+										position: 'top'
+									})
+								},
+								fail: function() {
+									uni.showToast({
+										title: '保存失败,请稍后重试',
+										icon: 'none',
+										position: 'top'
+									})
+								}
+							});
+						} else {
+							uni.showToast({
+								title: '下载失败',
+								icon: 'none',
+								position: 'top'
+							})
+						}
+					}
+				});
+			}
+		}
+	}
+</script>
+<style lang="scss" scoped>
+	.separate {
+		// opacity: 0;
+		border: 0px;
+	}
+
+	.wrapperAlert {
+		z-index: 12000;
+		position: fixed;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 100;
+		transition: background-color .15s linear;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+
+		.vueDAlertWrapperBtn {
+			padding: 30rpx;
+			justify-content: center;
+			display: flex;
+			color: #FFFFFF;
+		}
+
+		.wrapperAlertBox {
+			width: 90%;
+			border-radius: 15rpx;
+
+			.wrapperAlertBoxTitle {
+				width: 100%;
+				height: 30rpx;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				color: #762cd9;
+			}
+
+			.wrapperAlertBoxCenter {
+				width: 100%;
+				height: 135rpx;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				color: #C0C0C0;
+				color: red;
+
+			}
+
+			.wrapperAlertBoxBit {
+				width: 100%;
+				height: 1rpx;
+				background-color: #f2f2f2;
+			}
+
+			.wrapperAlertBoxFooter {
+				width: 100%;
+				height: 100rpx;
+				display: flex;
+				justify-content: space-around;
+				align-items: center;
+
+				.wrapperAlertBoxFooterBox {
+					width: 290rpx;
+					height: 115rpx;
+					display: flex;
+					justify-content: center;
+					align-items: center;
+				}
+
+				.wrapperAlertBoxFooterBit {
+					width: 1rpx;
+					height: 40rpx;
+					background: #f2f2f2;
+				}
+			}
+		}
+	}
+
+	.sharebox {
+		background-color: #FFFFFF;
+		border-radius: 30rpx 30rpx 0 0;
+		width: calc(100% - 50rpx);
+		padding: 20rpx 25rpx 0 25rpx;
+
+		.shareitem_title {
+			color: #999;
+			font-size: 25rpx;
+		}
+
+		.shareitem_list {
+			display: flex;
+			justify-content: flex-start;
+			flex-wrap: wrap;
+			border-bottom: 1rpx solid #f3f3f3;
+
+			.shareitem {
+				width: 28%;
+				margin: 20rpx 2.5%;
+				text-align: center;
+
+				.shareitem_thu {
+					width: 80rpx;
+					height: 80rpx;
+				}
+
+				.shareitem_text {
+					color: #666;
+					font-size: 22rpx;
+					margin-top: 15rpx;
+				}
+			}
+		}
+
+		.sharecanle {
+			width: 100%;
+			font-size: 32rpx;
+			text-align: center;
+			color: #777;
+			height: 100rpx;
+			line-height: 100rpx;
+		}
+	}
+</style>

+ 75 - 0
components/systhemes/themes1.vue

@@ -0,0 +1,75 @@
+<template>
+	<view :class="[AppTheme]" class="all_box" v-if="thflag==1">
+		<!-- 中间预览区域 -->
+		<view v-for="(vdc, index) in tasks" :key="index">
+			<load-component ref="ldcomponent" :vdc="vdc" :uikey="vdc.component_key"
+				:template="vdc.template_name || 'template1'">
+			</load-component>
+		</view>
+	</view>
+</template>
+<script>
+	import Vue from 'vue'
+	// 组件加载主体
+	import loadComponent from '@/components/ui-component-load/index.vue';
+	export default {
+		name: "themes1",
+		props: ['primary2', 'thflag'],
+		components: {
+			loadComponent
+		},
+		data() {
+			return {
+				primary: this.$theme.primary,
+				ifhavehead: false,
+				tasks: []
+			}
+		},
+		methods: {
+			init() {
+				let that = this;
+				let config = that.$until.myCache(that.$cache_config_info_key);
+				if (!config) {
+					if (res && res.pagecfg) {
+						that.pagecfg = res.pagecfg;
+						that.pageinfo = res.pagecfg.page_info;
+						that.tasks = res.pagecfg.datas
+					}
+				} else {
+					that.pagecfg = config.pagecfg;
+					that.pageinfo = config.pagecfg.page_info;
+					that.tasks = config.pagecfg.datas
+				}
+				that.onload();
+			},
+			onload() {
+				let that = this
+				let slideshow = null;
+				if (that.$refs.ldcomponent) {
+					that.$refs.ldcomponent.forEach(item => {
+						if (item.$refs.slideshow) {
+							slideshow = item;
+						}
+					})
+					if (slideshow) {
+						slideshow.init();
+					}
+				}
+			},
+			toBottom(type) {
+				let that = this
+				let goodlist = null;
+				if (that.$refs.ldcomponent) {
+					that.$refs.ldcomponent.forEach(item => {
+						if (item.$refs.goodlist) {
+							goodlist = item;
+						}
+					})
+					if (goodlist) {
+						goodlist.toBottom(type);
+					}
+				}
+			},
+		}
+	}
+</script>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 755 - 0
components/systhemes/themes2.vue


+ 121 - 0
components/tabbar/tabbar.vue

@@ -0,0 +1,121 @@
+<template>
+	<view :class="[AppTheme]" class="tabbar" :style="{'padding-bottom':BottomBlackLineHeight+'rpx'}">
+		<view class="tabbar-item" v-for="(item,index) in tabbars" :key="index" @click="goswurl(item,index)">
+			<u-icon labelSize="12" :color="currentPage===item.url?primary2:'#82848a'" :label="item.title"
+				labelPos="bottom" :labelColor="currentPage===item.url?primary2:'#82848a'" size="24"
+				:name="currentPage===item.url?item.img:item.pic"></u-icon>
+		</view>
+	</view>
+</template>
+<script>
+	import homeApi from '@/api/home/index.js';
+	export default {
+		props: ["primary"],
+		data() {
+			return {
+				settingFile: this.$siteinfo,
+				onetabbars: [
+					'/pages/index/index',
+					'/pages/index/adoplist/adoplist',
+					'/pages/mall/mall',
+					'/pages/land/land',
+					'/pages/user/user'
+				],
+				tabbars: [{
+						img: "home",
+						pic: "home-fill",
+						title: "首页",
+						url: "/pages/index/index",
+					},
+					{
+						img: "account",
+						pic: "account-fill",
+						title: "我的",
+						url: "/pages/user/user",
+					}
+				],
+				active: 0,
+				currentPage: '',
+				primary2: "#56AB2F",
+				BottomBlackLineHeight: 10, //iphoneX底部一条黑线,有些页面要避开
+			};
+		},
+		methods: {
+			getMobileInfo() {
+				let that = this
+				const mobileInfo = uni.getSystemInfoSync();
+				let iphoneXArr = ["iPhone X", "iPhone 11", "iPhone 11 Pro Max"];
+				iphoneXArr.forEach(function(item) {
+					if (mobileInfo.model.search(item) !== -1) {
+						that.BottomBlackLineHeight = 40;
+						return
+					}
+				});
+			},
+			goswurl(item, swindex) {
+				let that = this
+				that.$until.toUrl(item.url);
+			},
+		},
+		created() {
+			let that = this
+			if (that.primary != '#ffffff') {
+				that.primary2 = that.primary
+			}
+			uni.hideTabBar({}) //隐藏系统默认tabbar
+			that.getMobileInfo();
+			let tlist = uni.getStorageSync("tabbar")
+			let pages = getCurrentPages(); // 获取当前页面栈的实例,以数组形式按栈的顺序给出,第一个元素为首页,最后一个元素为当前页面
+			let page = pages[pages.length - 1];
+			that.currentPage = '/' + page.route; // 当前的页面路由(小程序可以,H5也可以)
+			/* 初次进入获取tabbar列表 */
+			if (tlist && tlist.length > 0) {
+				that.tabbars = tlist
+			} else {
+				homeApi.tabbar().then(res => {
+					if (res.data.tarbar && res.data.tarbar.length > 0) {
+						that.tabbars = res.data.tarbar;
+						uni.setStorageSync('tabbar', res.data.tarbar)
+					}
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		width: 100%;
+	}
+
+	.tabbar {
+		height: 100rpx;
+		width: 100vw;
+		padding-top: 10rpx;
+		background-color: #fff;
+		border: 1px solid #f2f2f2;
+		position: fixed;
+		bottom: 0;
+		z-index: 999;
+		display: flex;
+		text-align: center;
+		align-items: center;
+
+		.tabbar-item {
+			flex: 1;
+			font-size: 23rpx;
+
+			.item-img {
+				width: 50rpx;
+				height: 50rpx;
+				display: inline-block;
+				margin-bottom: 10rpx;
+
+				.image {
+					width: 100%;
+					height: 100%;
+				}
+			}
+		}
+	}
+</style>

+ 224 - 0
components/ui-component-load/index.vue

@@ -0,0 +1,224 @@
+<template>
+	<view :class="[AppTheme]" :data-key="uikey" :data-theme="template">
+		<Utitle v-if="component && uikey=='U_title'" :styles="styles" :datas="datas">
+		</Utitle>
+		<Ublank v-else-if="component && uikey=='U_blank'" :styles="styles" :datas="datas">
+		</Ublank>
+		<Uline v-else-if="component && uikey=='U_line'" :styles="styles" :datas="datas">
+		</Uline>
+		<Urichtext v-else-if="component && uikey=='U_richtext'" :styles="styles" :datas="datas">
+		</Urichtext>
+		<Ucube v-else-if="component && uikey=='U_cube'" :styles="styles" :datas="datas">
+		</Ucube>
+		<Usimplegraph v-else-if="component && uikey=='U_simplegraph'" :styles="styles" :datas="datas">
+		</Usimplegraph>
+		<Uvideo v-else-if="component && uikey=='U_video'" :styles="styles" :datas="datas">
+		</Uvideo>
+		<Uslideshow ref="slideshow" v-else-if="component && uikey=='U_slideshow'" :styles="styles" :datas="datas">
+		</Uslideshow>
+		<Ubutton v-else-if="component && uikey=='U_button'" :styles="styles" :datas="datas">
+		</Ubutton>
+		<Ususpendbutton v-else-if="component && uikey=='U_suspendbutton'" :styles="styles" :datas="datas">
+		</Ususpendbutton>
+		<Ubull v-else-if="component && uikey=='U_bull'" :styles="styles" :datas="datas">
+		</Ubull>
+		<Uactivity v-else-if="component && uikey=='U_activity'" :styles="styles" :datas="datas">
+		</Uactivity>
+		<Umonitor v-else-if="component && uikey=='U_monitor'" :styles="styles" :datas="datas">
+		</Umonitor>
+		<Uadopt v-else-if="component && uikey=='U_adopt'" :styles="styles" :datas="datas">
+		</Uadopt>
+		<Uland v-else-if="component && uikey=='U_land'" :styles="styles" :datas="datas">
+		</Uland>
+		<Ucoupon v-else-if="component && uikey=='U_coupon'" :styles="styles" :datas="datas">
+		</Ucoupon>
+		<Ugoods v-else-if="component && uikey=='U_goods'" :styles="styles" :datas="datas">
+		</Ugoods>
+		<Ugoods2 ref="goodlist" v-else-if="component && uikey=='U_goods2'" :styles="styles" :datas="datas">
+		</Ugoods2>
+		<Unavbar v-else-if="component && uikey=='U_navbar'" :styles="styles" :datas="datas">
+		</Unavbar>
+		<Useckill v-else-if="component && uikey=='U_seckill'" :styles="styles" :datas="datas">
+		</Useckill>
+		<Upublic v-else-if="component && uikey=='U_public'" :styles="styles" :datas="datas">
+		</Upublic>
+		<Uweather v-else-if="component && uikey=='U_weather'" :styles="styles" :datas="datas">
+		</Uweather>
+	</view>
+</template>
+
+<script>
+	// 加载失败的组件
+	import ErrorComponent from './load-error.vue';
+	// import defaultGoods from '@/resource/images/default-goods.png';
+
+	// 默认的商品数据
+	const default_goods_item = {
+		// goods_sn: "269004202",
+		// goods_title: "Asymmetric Striped Slit Shirt Dress - Dark Gree",
+		// goods_img: defaultGoods,
+		tsk_price: 9.99, // 秒杀价格
+		shop_price: 9.99, // 销售价
+		market_price: 19.99, // 市场价
+		discount: 50,
+		promotions: [
+			'<span>BUY <em class="special fb">1</em> GET 1 <em class="special fb  ml5" data-orgp="">99%</em> OFF</span>',
+			'<span>BUY <em class="special fb">1</em> GET 1 <em class="special fb  ml5" data-orgp="">99%</em> OFF</span>'
+		]
+	};
+
+	// 默认的商品数据列表
+	const default_goods_list = [
+		default_goods_item,
+		default_goods_item,
+		default_goods_item,
+		default_goods_item
+	];
+	import Unavbar from '@/components/ui-component/U_navbar/m/index.vue';
+	import Utitle from '@/components/ui-component/U_title/m/index.vue';
+	import Uslideshow from '@/components/ui-component/U_slideshow/m/index.vue';
+	import Ubutton from '@/components/ui-component/U_button/m/index.vue';
+	import Ublank from '@/components/ui-component/U_blank/m/index.vue';
+	import Uline from '@/components/ui-component/U_line/m/index.vue';
+	import Urichtext from '@/components/ui-component/U_richtext/m/index.vue';
+	import Ucube from '@/components/ui-component/U_cube/m/index.vue';
+	import Usimplegraph from '@/components/ui-component/U_simplegraph/m/index.vue';
+	import Uvideo from '@/components/ui-component/U_video/m/index.vue';
+	import Ubull from '@/components/ui-component/U_bull/m/index.vue';
+	import Umonitor from '@/components/ui-component/U_monitor/m/index.vue';
+	import Uland from '@/components/ui-component/U_land/m/index.vue';
+	import Uadopt from '@/components/ui-component/U_adopt/m/index.vue';
+	import Ugoods from '@/components/ui-component/U_goods/m/index.vue';
+	import Ugoods2 from '@/components/ui-component/U_goods2/m/index.vue';
+	import Uactivity from '@/components/ui-component/U_activity/m/index.vue';
+	import Ucoupon from '@/components/ui-component/U_coupon/m/index.vue';
+	import Uweather from '@/components/ui-component/U_weather/m/index.vue';
+	import Upublic from '@/components/ui-component/U_public/m/index.vue';
+	import Useckill from '@/components/ui-component/U_seckill/m/index.vue';
+	export default {
+		props: {
+			// 组件KEY
+			uikey: {
+				type: String,
+				required: true,
+				default: 'U000001',
+			},
+			// 模版名
+			template: {
+				type: String,
+				required: true,
+				default: 'template1'
+			},
+			vdc: {
+				type: Object
+			}
+		},
+
+		components: {
+			Unavbar,
+			Ugoods2,
+			Utitle,
+			Uslideshow,
+			Ubutton,
+			Ublank,
+			Uline,
+			Urichtext,
+			Ucube,
+			Usimplegraph,
+			Uvideo,
+			Ubull,
+			Umonitor,
+			Uland,
+			Uadopt,
+			Ugoods,
+			Uactivity,
+			Ucoupon,
+			Uweather,
+			Upublic,
+			Useckill,
+			ErrorComponent
+		},
+
+		data() {
+			return {
+
+			};
+		},
+
+		computed: {
+			// 当前环境, 1=装修页, 2=预览, 3=发布
+			env() {
+				return this.$store.state.page.env;
+			},
+			// 当前组件信息
+			component() {
+				return this.vdc;
+			},
+			// 功能数据
+			datas() {
+				// 如果有配置项的话
+				if (this.component.is_loaded_config && this.component.hasOwnProperty('config')) {
+					const datas = {};
+					Object.keys(this.component.config.datas).map(key => {
+						datas[key] = this.component.config.datas[key].value;
+					});
+					return datas;
+				} else {
+					return this.component.remote_data || {};
+				}
+			},
+			// 样式数据
+			styles() {
+				// 如果有配置项的话
+				if (this.component.is_loaded_config && this.component.hasOwnProperty('config')) {
+					const styles = {};
+					Object.keys(this.component.config.styles).map(key => {
+						styles[key] = this.component.config.styles[key].value;
+					});
+					return styles;
+				} else {
+					return this.component.remote_style || {};
+				}
+			},
+
+		},
+		methods: {
+			toBottom(type) {
+				let that = this
+				that.$refs.goodlist.toBottom(type)
+			},
+			init() {
+				let that = this
+				if (that.$refs.slideshow) {
+					that.$refs.slideshow.init()
+				}
+			},
+		},
+	};
+</script>
+
+<style scoped>
+	.custom-transition .lazy-component-enter {
+		opacity: 0;
+	}
+
+	.custom-transition .lazy-component-enter-to {
+		opacity: 1;
+	}
+
+	.custom-transition .lazy-component-enter-active {
+		transition: all 0.5s;
+	}
+
+	.custom-transition .lazy-component-leave {
+		opacity: 1;
+	}
+
+	.custom-transition .lazy-component-leave-to {
+		opacity: 0;
+	}
+
+	.custom-transition .lazy-component-leave-active {
+		transition: all 0.5s;
+	}
+</style>

+ 26 - 0
components/ui-component-load/load-error.vue

@@ -0,0 +1,26 @@
+<template>
+    <div class="component-error">组件加载失败,可尝试强制刷新页面(Ctrl+F5)或点击左侧组件标题进行重新加载</div>
+</template>
+
+<script>
+export default {
+    data () {
+        return {};
+    },
+    mounted () {
+        this.$emit('errored');
+    }
+};
+</script>
+
+<style lang="less" scoped>
+
+.component-error {
+    height: 100px;
+    text-align: center;
+    line-height: 100px;
+    background: #f1f1f1;
+    color: #333;
+}
+
+</style>

+ 238 - 0
components/ui-component/U_activity/m/index.vue

@@ -0,0 +1,238 @@
+<template>
+	<view class="component-wrapper" :style="wrapper_style">
+		<view v-if="datas.show_title" class="morebox">
+			<view :style="title_style" class="title">{{ title }}</view>
+			<view  class="title2" @click="more">查看更多
+				<u-icon :style="img_style2" color="#949494" name="arrow-right" size="14"></u-icon>
+			</view>
+		</view>
+		<view class="bigbox" v-for="(item, index) in list" @click="gobuy(item.id)">
+			<view class="bigbox_top">
+				<u-icon class="img" name="share" color='orangered' size="22"></u-icon>
+				<view>{{item.activity_title}}</view>
+			</view>
+			<view class="img_box" :style="img_style">
+				<view class="avtivity_state">{{item.end_time}}</view>
+				<image :src="item.activity_img || emptyImage" :key="index" :style="img_style"></image>
+			</view>
+			<view class="case_titleblock">
+				<view class="case_title">{{item.activity_title}}</view>
+			</view>
+			<view class="price_selection">
+				<view class="commodity_price">
+					<view class="commodity_price_red " :style="price_style">{{item.child_fares+'-'+item.adult_fares }}
+					</view>
+					元
+				</view>
+			</view>
+			<view class="case_title_sm">{{item.start_time+'-'+item.end_time }}</view>
+		</view>
+	</view>
+</template>
+<script>
+	import landApi from '@/api/land/index.js'
+	export default {
+		props: ['styles', 'datas'],
+		data() {
+			let siteinfo = getApp().globalData.siteinfo;
+			this.activityinit()
+			return {
+				avtiveid:[],
+				settingFile: siteinfo,
+				emptyImage: siteinfo.root_img + '/static/app/image.png',
+				list:[]
+			}
+		},
+		computed: {
+			//价格设置
+			price_style() {
+				const {
+					price_color,
+					price_size
+				} = this.datas
+				return `
+				font-size:${price_size}px;
+				color:${price_color};
+				margin-right:5px;
+				`;
+			},
+			/** 副标题内容 */
+			title() {
+				return this.datas.title || '活动';
+			},
+			img_style2() {
+				return `
+				width:15px;
+				height:15px;
+				margin:auto;
+				`;
+			},
+			// 副标题栏样式
+			title_style() {
+				const {
+					text_size,
+					text_color,
+				} = this.datas;
+				return `
+			    font-size: ${text_size}px;
+			    color: ${text_color};
+			`;
+			},
+			/** 样式 */
+			wrapper_style() {
+				if (this.datas) {
+					const {
+						padding_top,
+						padding_bottom,
+						padding_left,
+						padding_right,
+						bg_color
+					} = this.datas;
+					return `
+				background-color:${bg_color};
+                padding-top: ${padding_top}px;
+                padding-bottom: ${padding_bottom}px;
+                padding-left: ${padding_left}px;
+                padding-right: ${padding_right}px;
+            `;
+				}
+			},
+
+			img_style() {
+				return `
+				width: 100%;
+				height:420rpx;
+				border-radius: 5px;
+				margin:5px 0;
+            `;
+			},
+		},
+		methods: {
+			async activityinit() {
+				let that = this
+				let ids = []
+				that.datas.goods.forEach(ele => {
+					ids.push(ele.id)
+				})
+				let res = landApi.getlist({
+					gids: ids,
+					gtype: 'activity',
+				}).then(res => {
+					if (res.status == 200) {
+						that.list = res.data;
+					}
+				});
+			},
+			more() {
+				uni.navigateTo({
+					url: '/pagesB/pages/activitylist/activitylist'
+				})
+			},
+			gobuy(id) {
+				uni.navigateTo({
+					url: '/pagesB/pages/activitydetails/activitydetails?id=' + id
+				})
+			},
+		}
+	};
+</script>
+<style lang="less" scoped>
+	.component-wrapper {
+
+		// width: 375px;
+		.morebox {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 0 12px;
+
+			.title2 {
+				font-size: 28rpx;
+				display: flex;
+				color: #949494;
+				align-items: center;
+			}
+		}
+
+		.bigbox {
+			padding: 10px;
+			border-radius: 5px;
+			margin-top: 15rpx;
+			background-color: #ffffff;
+
+			.bigbox_top {
+				display: flex;
+				align-items: center;
+
+				.img {
+					margin-right: 5px;
+				}
+			}
+
+			.img_box {
+				position: relative;
+
+				.avtivity_state {
+					position: absolute;
+					color: #fff;
+					right: 0;
+					top: 15px;
+					padding: 1px 15px;
+					background-color: rgba(51, 51, 51, .7);
+					border-bottom-left-radius: 5px;
+					border-top-left-radius: 5px;
+					z-index: 9;
+				}
+			}
+		}
+
+		.case_titleblock {
+			display: flex;
+			justify-content: flex-start;
+			align-items: center;
+			width: 100%;
+
+			.case_title {
+				font-size: 15px;
+				height: 27px;
+				line-height: 27px;
+				color: #000;
+				font-weight: 550;
+				white-space: nowrap;
+				text-overflow: ellipsis;
+				overflow: hidden;
+			}
+		}
+
+		.case_title_sm {
+			display: flex;
+			justify-content: flex-start;
+			align-items: center;
+			width: 80%;
+			font-size: 13px;
+			color: #999;
+			height: 27px;
+			text-overflow: ellipsis;
+			overflow: hidden;
+			white-space: nowrap;
+		}
+
+		.price_selection {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			height: 27px;
+
+			.commodity_price {
+				display: flex;
+				font-size: 14px;
+				color: #333;
+
+				.commodity_price_red {
+					font-weight: 800;
+					color: red;
+				}
+			}
+		}
+	}
+</style>

+ 289 - 0
components/ui-component/U_adopt/m/index.vue

@@ -0,0 +1,289 @@
+<template>
+	<view class="component-wrapper" :style="wrapper_style">
+		<view class="morebox">
+			<view :style="title_style" class="title">{{ title }}</view>
+			<view class="title2" @click="more">查看更多
+				<u-icon :style="img_style2" color="#949494" name="arrow-right" size="14"></u-icon>
+			</view>
+		</view>
+		<view :style="box_style" class="reinitem" v-for="(item, index) in list" @click="gobuy(item.id)">
+			
+			<view class="imgren">
+				<view class="leticon">认</view>
+				<image :src="item.pic || emptyImage" :key="index" :style="img_style" mode="aspectFill" class="renitem_thu">
+			</view>
+			
+			</image>
+			<view class="rightiation_bar">
+				<view class="rightiation_bar_p1">{{ item.name }}</view>
+				<view class="rightiation_bar_p2">收获:{{ item.bonusway }}</view>
+				<view class="rightiation_bar_p3">
+					<view class="right_text_p1">已售:</view>
+					<view class="right_text_p2 text-primary">{{ item.sells }}</view>
+					<view class="right_text_p1">剩余:</view>
+					<view class="right_text_p2 text-primary">{{ item.num }}</view>
+				</view>
+				<progress :activeColor="primary" :percent="item.rgbl" stroke-width="3" />
+				<view class="rightiation_bar_p3" :show-percent="false"
+					style="justify-content: space-between;margin: 15rpx 0 0 0">
+					<view class="right_buton_p1 text-neutral">¥{{ item.copies_price }}</view>
+					<view class="right_buton_p2 bg-primary " :style="buttonstyle">进行中</view>
+				</view>
+			</view>
+			<!-- <view class="uliline2"></view> -->
+
+		</view>
+	</view>
+</template>
+<script>
+	import landApi from '@/api/land/index.js'
+	export default {
+		props: ['styles', 'datas'],
+		data() {
+			let siteinfo = getApp().globalData.siteinfo;
+			this.adoptinit();
+			return {
+				primary: this.$theme.primary,
+				settingFile: siteinfo,
+				emptyImage: siteinfo.root_img + '/static/app/image.png',
+				adoptid: [],
+				list: []
+			}
+		},
+		computed: {
+			/** 副标题内容 */
+			title() {
+				return this.datas.title || '标题';
+			},
+			img_style2() {
+				return `
+				width:15px;
+				height:15px;
+				margin:auto;
+				`;
+			},
+			// 副标题栏样式
+			title_style() {
+				const {
+					text_size,
+					text_color,
+				} = this.datas;
+				return `
+			    font-size: ${text_size}px;
+			    color: ${text_color};
+			`;
+			},
+			/** 样式 */
+			wrapper_style() {
+				if (this.datas) {
+					const {
+						padding_top,
+						padding_bottom,
+						padding_left,
+						padding_right,
+						bg_color
+					} = this.datas;
+					return `
+				background-color:${bg_color};
+                padding-top: ${padding_top}px;
+                padding-bottom: ${padding_bottom}px;
+                padding-left: ${padding_left}px;
+                padding-right: ${padding_right}px;
+            `;
+				}
+			},
+
+			img_style() {
+				const {
+					picture_border,
+				} = this.datas;
+				return `
+				width: 220rpx;
+				height: 220rpx;
+            `;
+			},
+			box_style() {
+				const {
+					picture_border,
+				} = this.datas;
+				return `
+				overflow: hidden;
+            `;
+			},
+			leftbox_right() {
+				const {
+					bg_color
+				} = this.datas;
+				return `
+				overflow: hidden;
+				background-color:${bg_color};
+            `;
+			},
+			//按钮设置
+			buttonstyle() {
+				const {
+					border_radius,
+					button_color,
+					buttontitle_color
+				} = this.datas
+				return `
+				color:${buttontitle_color};
+				background-color:${button_color};
+				border-radius:${border_radius}px;
+				white-space: nowrap;
+				overflow: hidden;
+				text-overflow: ellipsis;
+				`
+			},
+
+			//价格设置
+			price_style() {
+				const {
+					price_color
+				} = this.datas
+				return `
+				color:${price_color};
+				font-weight: 600;
+				`;
+			},
+			//已售设置
+			soldout_style() {
+				const {
+					soldout_color
+				} = this.datas
+				return `
+				color:${soldout_color};
+				`;
+			},
+			//剩余设置
+			residue_style() {
+				const {
+					residue_color
+				} = this.datas
+				return `
+				color:${residue_color};
+				`;
+			},
+		},
+		methods: {
+			adoptinit() {
+				let that = this
+				let ids = []
+				that.datas.goods.forEach(ele => {
+					ids.push(ele.id)
+				})
+				let res = landApi.getlist({
+					gids: ids,
+					gtype: 'renyang',
+				}).then(res => {
+					if (res.status == 200) {
+						that.list = res.data;
+					}
+				});
+			},
+			more() {
+				uni.switchTab({
+					url: '/pages/index/adoplist/adoplist'
+				})
+			},
+			gobuy(id) {
+				uni.navigateTo({
+					url: '/pagesA/pages/adopt/adopt?id=' + id
+				})
+			},
+		}
+	};
+</script>
+<style lang="less" scoped>
+	.component-wrapper {
+		.morebox {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 0 12px;
+			margin-bottom: 15px;
+
+			.title2 {
+				font-size: 28rpx;
+				display: flex;
+				color: #949494;
+				align-items: center;
+			}
+		}
+
+		.reinitem {
+			display: flex;
+			justify-content: left;
+			align-items: flex-start;
+			margin: 25rpx 0 0 0;
+			.imgren{
+				position: relative;
+			}
+		}
+		.leticon {
+			background-color: #ff8000;
+			position: absolute;
+			left: 0;
+			top: 0;
+			padding: 15rpx 15rpx 20rpx 15rpx;
+			border-radius: 0 0 35rpx 35rpx;
+			color: #ffffff;
+			z-index: 9;
+		}
+		.renitem_thu {
+			width: 220rpx;
+			height: 220rpx;
+		}
+
+		.rightiation_bar {
+			margin-left: 20rpx;
+			width: 100%;
+		}
+
+		.rightiation_bar_p1 {
+			color: #000;
+			line-height: 38rpx;
+			font-size: 28rpx;
+			overflow:hidden; 
+			text-overflow:ellipsis;
+			display:-webkit-box; 
+			-webkit-box-orient:vertical;
+			-webkit-line-clamp:1; 
+		}
+
+		.rightiation_bar_p2 {
+			font-size: 24rpx;
+			color: #434343;
+			margin: 15rpx 0;
+		}
+
+		.rightiation_bar_p3 {
+			display: flex;
+			justify-content: flex-start;
+			margin: 15rpx 0;
+			align-items: center;
+		}
+
+		.right_text_p1 {
+			color: #999;
+			font-size: 22rpx;
+		}
+
+		.right_text_p2 {
+			font-size: 24rpx;
+			margin-right: 25rpx;
+		}
+
+		.right_buton_p1 {
+			font-size: 32rpx;
+			font-weight: 600;
+		}
+
+		.right_buton_p2 {
+			color: #fff;
+			border-radius: 30rpx;
+			font-size: 26rpx;
+			padding: 16rpx 30rpx;
+		}
+	}
+</style>

+ 46 - 0
components/ui-component/U_blank/m/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <view class="U000008-template1" >
+    <!-- style -->
+    <view :style="wrapper_style"></view>
+
+  </view>
+</template>
+
+<script>
+	export default {
+		props: ['datas', 'styles'],
+    data() {
+			return{
+      }
+    },
+		computed: {
+			/** 样式 */
+			wrapper_style() {
+				if(this.datas.preview_color) {
+					const {
+						preview_color,
+						search_height
+					} = this.datas;
+
+					return `
+                height: ${search_height}px;
+                background-color: ${preview_color.color};
+                background-image: url(${preview_color.isColor == 2 ? preview_color.image : ''});
+                background-size: 100% auto;
+                bakcground-position: center;
+            `;
+				}
+			},
+		},
+		methods: {
+		},
+
+	};
+</script>
+
+<style lang="less" scoped>
+  // 默认
+  .component-wrapper {
+   width: 750rpx;
+  }
+</style>

+ 104 - 0
components/ui-component/U_bull/m/index.vue

@@ -0,0 +1,104 @@
+<template>
+	<view class="component-wrapper u000242" :style="wrapper_style">
+		<u-notice-bar :text="announcetext" :bgColor="datas.bg_color" :fontSize="datas.text_size" @click="goMessage"
+			:color="datas.text_color" direction="column" mode="closable" speed="200">
+		</u-notice-bar>
+	</view>
+</template>
+<script>
+	import homeApi from '@/api/home/index.js'
+	export default {
+		props: ['styles', 'datas'],
+		data() {
+			let siteinfo = getApp().globalData.siteinfo;
+			this.homeInit();
+			return {
+				settingFile: siteinfo,
+				emptyImage: siteinfo.root_img + '/static/app/image.png',
+				announce: [],
+				announcetext: [],
+			}
+		},
+
+		computed: {
+			/** 样式 */
+			wrapper_style() {
+				const {
+					bg_color,
+					padding_top,
+					padding_bottom,
+					padding_left,
+					padding_right,
+				} = this.datas;
+				return `
+				padding-top: ${padding_top}rpx;
+				padding-bottom: ${padding_bottom}rpx;
+				padding-left: ${padding_left}rpx;
+				padding-right: ${padding_right}rpx;
+                background-color: ${bg_color};
+            `;
+			},
+
+			/** 标题样式 */
+			title_style() {
+				const {
+					text_align,
+					text_size,
+					text_color
+				} = this.datas;
+				return `
+				margin-left: 10px;
+                text-align: ${text_align};
+                font-size: ${text_size}px;
+                color: ${text_color};
+            `;
+			},
+			img_style() {
+				const {
+					button_size,
+					button_color
+				} = this.datas
+				return `
+				color: ${button_color};
+				margin-left: 10px;
+				font-size:${button_size}px;
+				`;
+			},
+
+			/** 标题 */
+			title() {
+				return '公告内容';
+			},
+		},
+		methods: {
+			goMessage(index) {
+				this.$until.toarticle('',this.announce[index].id)
+			},
+			async homeInit() {
+				let that = this;
+				let res = await homeApi.index()
+				if (res.data&&res.data.announce) {
+					that.announce = res.data.announce;
+					res.data.announce.forEach(item => {
+						that.announcetext.push(item.title);
+					});
+				}
+			},
+		},
+		mounted() {
+			this.$emit('loaded');
+		}
+	};
+</script>
+<style lang="less" scoped>
+	.component-wrapper {
+		display: block;
+		max-width: 100%;
+		margin-left: auto;
+		margin-right: auto;
+		overflow: hidden;
+		text-decoration: none;
+		display: flex;
+		align-items: center;
+	}
+</style>

+ 349 - 0
components/ui-component/U_button/m/index.vue

@@ -0,0 +1,349 @@
+<template>
+	<view :class="className" :style="box_style">
+		<!-- style -->
+		<view v-html="css"></view>
+		<!-- 列表 -->
+		<template v-if="datas.preview_color">
+			<view v-if="list.length <= 0" style="text-align: center;font-size: 32rpx;line-height: 64rpx">
+				请先添加按钮
+			</view>
+			<view v-if="list && list.length > 0&& !datas.is_scroll" :style="cswiper_style" class="cswiper">
+				<view v-for="(items, idx) in scroll_list" :key="idx" class="button-box">
+					<view v-if="item.is_minApp==1" @click="$until.u_gopage('U_button',item)" class="li"
+						:style="li_style" v-for="(item, index) in items" :key="item.id">
+						<image :style="liimg_style" class="button-img" :src="item.image || emptyImage" alt=""></image>
+						<span :style="texts_style" class="button-title">{{ item.text }}</span>
+					</view>
+					<!-- #ifdef MP-WEIXIN -->
+					<view v-else class="li" :style="li_style" @click="$until.u_gopage('U_button',item)"
+						:key="`${index}-${item.id}`">
+						<image :style="liimg_style" class="button-img" :src="item.image || emptyImage" alt=""></image>
+						<span :style="texts_style" class="button-title">{{ item.text }}</span>
+					</view>
+					<!-- #endif -->
+					<!-- #ifdef H5 -->
+					<view v-else class="li" :style="li_style">
+						<wx-open-launch-weapp :username="item.gh_id" :path="item.minApp_link"
+							style="text-align: center;">
+							<image :style="liimg_style" class="button-img" :src="item.image || emptyImage" alt="">
+							</image>
+						</wx-open-launch-weapp>
+						<span :style="texts_style" class="button-title">{{ item.text }}</span>
+					</view>
+					<!-- #endif -->
+				</view>
+			</view>
+			<swiper v-if="list && list.length > 0&& datas.is_scroll" :indicator-dots="true" :autoplay="false"
+				:interval="3000" :current="currentIndex" :style="cswiper_style" class="cswiper">
+				<swiper-item v-for="(items, idx) in scroll_list" :key="idx" class="button-box">
+					<view v-if="item.is_minApp==1" @click="$until.u_gopage('U_button',item)" class="li"
+						:style="li_style" v-for="(item, index) in items" :key="item.id">
+						<image :style="liimg_style" class="button-img" :src="item.image || emptyImage" alt=""></image>
+						<span :style="texts_style" class="button-title">{{ item.text }}</span>
+					</view>
+					<!-- #ifdef MP-WEIXIN -->
+					<view v-else class="li" :style="li_style" @click="$until.u_gopage('U_button',item)"
+						:key="`${index}-${item.id}`">
+						<image :style="liimg_style" class="button-img" :src="item.image || emptyImage" alt=""></image>
+						<span :style="texts_style" class="button-title">{{ item.text }}</span>
+					</view>
+					<!-- #endif -->
+					<!-- #ifdef H5 -->
+					<view v-else class="li" :style="li_style">
+						<wx-open-launch-weapp :username="item.gh_id" :path="item.minApp_link"
+							style="text-align: center;">
+							<image :style="liimg_style" class="button-img" :src="item.image || emptyImage" alt="">
+							</image>
+						</wx-open-launch-weapp>
+						<span :style="texts_style" class="button-title">{{ item.text }}</span>
+					</view>
+					<!-- #endif -->
+				</swiper-item>
+			</swiper>
+		</template>
+	</view>
+</template>
+<script>
+	// 自定义样式
+	const css = function() {
+		if (this.datas.preview_color) {
+			const {
+				padding_top,
+				padding_bottom,
+				button_size,
+				border_radius,
+				button_number,
+				preview_color,
+				font_size,
+				text_style,
+				font_color,
+				button_line,
+			} = this.datas;
+			let cheight = 0;
+			if (button_line == 1) {
+				cheight = (button_line * (padding_top + padding_bottom + button_size) + 40) * 2;
+			} else {
+				cheight = (button_line * (padding_top + padding_bottom + button_size) + 80) * 2;
+			}
+			return `
+			.component-${this.id} {
+			    background-color: ${preview_color.color || '#f8f8f8'};
+			}
+        .component-${this.id} .button-box{
+            background-color: ${preview_color.color || '#f8f8f8'};
+            background-image: url(${preview_color.isColor == 2 ? preview_color.image : ''});
+            background-size: 100% 100%;
+            background-position: center;
+            background-repeat: no-repeat;
+			
+        }
+		.component-${this.id} .cswiper{
+			  height: ${cheight}rpx;
+
+        }
+        .component-${this.id} .button-box .li{
+            width: ${button_number == 4 ? '25' : '20'}%;
+        }
+
+        .component-${this.id}  .button-img{
+            width: ${button_size}px;
+            height: ${button_size}px;
+            border-radius: ${border_radius}px;
+        }
+
+        .component-${this.id}  .button-title{
+            font-size:${font_size}px;
+            font-weight: ${text_style.includes('1') ? 'bold' : ''};
+            font-style: ${text_style.includes('2') ? 'italic' : ''};
+            color: ${font_color};
+        }
+    `;
+		}
+	};
+
+	export default {
+		props: ['datas', 'styles', 'languages'],
+		data() {
+			let siteinfo = getApp().globalData.siteinfo;
+			let data = {
+				settingFile: siteinfo,
+				emptyImage: siteinfo.root_img + '/static/app/image.png',
+				scroll_list: [], //轮播时用的数值结构
+				// 轮播图设置
+				swiperOption: {
+					autoplay: false,
+					// loop: true,   loop模式第二轮循环的时候第一张会闪烁
+					delay: 3000,
+					observer: true,
+					// autoHeight: true,
+					pagination: {
+						el: '.swiper-pagination',
+					}
+				},
+				currentIndex: 0,
+			};
+			return data;
+		},
+		computed: {
+			box_style() {
+				if (this.datas.preview_color) {
+					const {
+						preview_color
+					} = this.datas;
+					return `
+					background-color: ${preview_color.color || '#f8f8f8'};
+								`;
+				}
+			},
+			cswiper_style() {
+				if (this.datas.preview_color) {
+					const {
+						button_line,
+						padding_top,
+						button_size,
+						padding_bottom
+					} = this.datas;
+					let cheight = 0;
+					if (button_line == 1) {
+						cheight = (button_line * (padding_top + padding_bottom + button_size) + 40) * 2;
+					} else {
+						cheight = (button_line * (padding_top + padding_bottom + button_size) + 80) * 2;
+					}
+					return `
+			  height: ${cheight}rpx;
+      
+				`;
+				}
+			},
+			texts_style() {
+				if (this.datas.preview_color) {
+					const {
+						font_size,
+						text_style,
+						font_color
+					} = this.datas;
+					return `
+                      font-size:${font_size}px;
+                      font-weight: ${text_style.includes('1') ? 'bold' : ''};
+                      font-style: ${text_style.includes('2') ? 'italic' : ''};
+                      color: ${font_color};          
+				`;
+				}
+			},
+			liimg_style() {
+				if (this.datas.preview_color) {
+					const {
+						button_size,
+						border_radius
+					} = this.datas;
+					return `
+				     width: ${button_size}px;
+				     height: ${button_size}px;
+				     border-radius: ${border_radius}px;
+				`;
+				}
+			},
+			li_style() {
+				if (this.datas.preview_color) {
+					const {
+						button_number,
+					} = this.datas;
+
+					return `
+				        width: ${button_number == 4 ? '25' : '20'}%;
+				`;
+				}
+			},
+			css() {
+				return '<style>' + css.call(this) + '</style>';
+			},
+			className() {
+				const name = ['component-wrapper', `component-${this.id}`];
+				return name;
+			},
+			list() {
+				return this.datas.list;
+			},
+			button_number() {
+				return this.datas.button_number;
+			},
+			button_line() {
+				return this.datas.button_line || 1;
+			}
+		},
+		watch: {
+			list: {
+				deep: true, //深度监听
+				handler: function() {
+					let list = this.datas.list;
+					this.scroll_list = [];
+
+					if (!this.datas.button_line) {
+						this.datas.button_line = 1
+					}
+					let page = Math.ceil(this.datas.list.length / this.datas.button_number / this.datas
+						.button_line); //==> 页数
+					let num = this.datas.button_number * this.datas.button_line; // ==> 每页多少个
+
+					for (let i = 0; i < page; i++) {
+						this.scroll_list.push(list.slice(i * num, (i + 1) * num))
+					}
+
+				}
+			},
+			button_number(newValue) {
+				let list = this.datas.list;
+				this.scroll_list = [];
+
+				if (!this.datas.button_line) {
+					this.datas.button_line = 1
+				}
+				let page = Math.ceil(this.datas.list.length / newValue / this.datas.button_line); //==> 页数
+				let num = newValue * this.datas.button_line; // ==> 每页多少个
+
+				for (let i = 0; i < page; i++) {
+					this.scroll_list.push(list.slice(i * num, (i + 1) * num))
+				}
+
+			},
+			button_line(newValue) {
+				let list = this.datas.list;
+				this.scroll_list = [];
+
+				if (!newValue) {
+					newValue = 1
+				}
+				let page = Math.ceil(this.datas.list.length / this.datas.button_number / newValue); //==> 页数
+				let num = this.datas.button_number * newValue; // ==> 每页多少个
+
+				for (let i = 0; i < page; i++) {
+					this.scroll_list.push(list.slice(i * num, (i + 1) * num))
+				}
+
+			}
+		},
+
+		methods: {
+			initButtons() {
+				if (this.datas.list) {
+					let list = this.datas.list;
+					this.scroll_list = [];
+					if (!this.datas.button_line) {
+						this.datas.button_line = 1
+					}
+
+					let page = Math.ceil(this.datas.list.length / this.datas.button_number / this.datas
+						.button_line); //==> 页数
+					let num = this.datas.button_number * this.datas.button_line; // ==> 每页多少个
+
+					for (let i = 0; i < page; i++) {
+						this.scroll_list.push(list.slice(i * num, (i + 1) * num))
+					}
+				}
+			}
+		},
+		mounted() {
+			this.$nextTick(() => {
+				this.initButtons();
+			})
+		},
+	};
+</script>
+<style lang="less" scoped>
+	// 默认
+	.component-wrapper {
+		// display: flex;
+		justify-content: center;
+		width: 750rpx;
+
+		.button-box {
+			display: flex;
+			flex-wrap: wrap;
+			width: 100%;
+
+			.li {
+				position: relative;
+				margin: 20rpx 0;
+				list-style: none;
+				display: flex;
+				flex-direction: column;
+				align-self: center;
+				justify-self: center;
+			}
+
+			.button-img {
+				margin: 0 auto;
+			}
+
+			.button-title {
+				text-align: center;
+				margin: 0;
+				text-overflow: ellipsis;
+				padding-top: 10rpx;
+				white-space: nowrap;
+				word-wrap: break-word;
+				overflow: hidden;
+			}
+		}
+	}
+</style>

+ 328 - 0
components/ui-component/U_coupon/m/index.vue

@@ -0,0 +1,328 @@
+<template>
+	<view class="component-wrapper" :style="wrapper_style">
+		<view v-if="datas.show_title" class="morebox">
+			<view :style="title_style" class="title">{{ title }}</view>
+			<view  class="title2" @click="more">查看更多
+				<u-icon :style="img_style2" color="#949494" name="arrow-right" size="14"></u-icon>
+			</view>
+		</view>
+		<view>
+			<view class="box1" v-if="show==1">
+				<view class="coupon" :style="coupon" v-for="(item, index) in list" :key="item.id">
+					<view :style="circle_style" class="circle"></view>
+					<view :style="circle_style" class="circle2"></view>
+					<div class="coupon_left">
+						<div class="box_left">¥{{item.money}}</div>
+						<div class="box_right">
+							<div>{{item.type}}</div>
+							<div>{{item.usemoney}}</div>
+						</div>
+					</div>
+					<view class="coupon_right" @click="receive(item.batch_num)">领取</view>
+				</view>
+			</view>
+			<view v-if="show==2" class="box2">
+				<view class="coupon2" v-for="(item, index) in list" :key="item.id">
+					<view class="coupon2_left">
+						<div class="box2_top">¥{{item.money}}</div>
+						<div class="box2_bottom">
+							<div>{{item.type}}</div>
+						</div>
+					</view>
+					<view class="coupon2_right" @click="receive(item.batch_num)">领取</view>
+				</view>
+			</view>
+			<view class="box3" v-if="show==3">
+				<view class="coupon3" v-for="(item, index) in list" :key="item.id">
+					<div class="price">¥{{item.money}}</div>
+					<div class="discount">{{item.type}}</div>
+					<div class="mall">{{item.usemoney}}</div>
+					<view class="receive" @click="receive(item.batch_num)">领取</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+	import mallApi from '@/api/mall/index.js'
+	export default {
+		props: ['styles', 'datas'],
+		data() {
+			let siteinfo = getApp().globalData.siteinfo;
+			return {
+				settingFile: siteinfo,
+				emptyImage: siteinfo.root_img + '/static/app/image.png',
+			}
+		},
+		computed: {
+			/** 副标题内容 */
+			title() {
+				return this.datas.title || '优惠券';
+			},
+			img_style2() {
+				return `
+				width:15px;
+				height:15px;
+				margin:auto;
+				`;
+			},
+			// 副标题栏样式
+			title_style() {
+				const {
+					text_size,
+					text_color,
+				} = this.datas;
+				return `
+			    font-size: ${text_size}px;
+			    color: ${text_color};
+			`;
+			},
+			// 排列样式
+			show() {
+				const {
+					button_number
+				} = this.datas
+				return button_number
+			},
+			/** 样式 */
+			wrapper_style() {
+				if (this.datas) {
+					const {
+						padding_top,
+						padding_bottom,
+						padding_left,
+						padding_right,
+						bg_color
+					} = this.datas;
+					return `
+                padding-top: ${padding_top}px;
+                padding-bottom: ${padding_bottom}px;
+                padding-left: ${padding_left}px;
+                padding-right: ${padding_right}px;
+				background-color:${bg_color};
+            `;
+				}
+			},
+			coupon() {
+				return `
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				width:100%;
+				margin:auto;	
+				margin-bottom:10px;
+				border-radius: 10px;
+				`
+			},
+			img_style() {
+				const {
+					picture_border,
+				} = this.datas;
+				return `
+                border-radius: ${picture_border}px;
+            `;
+			},
+
+			circle_style() {
+				const {
+					bg_color
+				} = this.datas
+				return `
+					background-color:${bg_color};
+				`;
+			},
+
+			/** 标题 */
+			list() {
+				return this.datas.goods;
+			},
+		},
+		methods: {
+			more() {
+				uni.navigateTo({
+					url: '/pagesB/pages/getcoupon/getcoupon'
+				})
+			},
+			receive(batch_num) {
+				let that = this
+				let params = {
+					batch_num: batch_num
+				}
+				mallApi.getcoupon(params).then(res => {
+					if (res.status === 200) {
+						that.$api.msg(res.msg)
+					} else {
+						that.$api.msg(res.msg)
+					}
+				})
+			}
+		}
+	};
+</script>
+<style lang="less" scoped>
+	.component-wrapper {
+		.morebox {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			margin-bottom: 15px;
+
+			.title2 {
+				font-size: 28rpx;
+				display: flex;
+				color: #949494;
+				align-items: center;
+			}
+		}
+
+		.box1 {
+			display: flex;
+			flex-wrap: wrap;
+			justify-content: space-around;
+
+			.coupon {
+				color: #fff;
+				height: 80px;
+				position: relative;
+
+				.circle {
+					height: 26px;
+					width: 26px;
+					border-radius: 13px;
+					position: absolute;
+					top: -13px;
+					right: 26.5%;
+					background-color: #fff;
+				}
+
+				.circle2 {
+					height: 26px;
+					width: 26px;
+					border-radius: 13px;
+					position: absolute;
+					bottom: -13px;
+					right: 26.5%;
+					background-color: #fff;
+				}
+
+				.coupon_left {
+					background-image: linear-gradient(#BD8AFF, #5053FF);
+					height: 100%;
+					width: 70%;
+					display: flex;
+					justify-content: space-around;
+					align-items: center;
+					border-radius: 10px;
+
+					.box_left {
+						width: 30%;
+						text-align: center;
+						line-height: 80px;
+						font-size: 27px;
+					}
+
+					.box_right {
+						border-right: 2px dashed #fff;
+						height: 50px;
+						line-height: 25px;
+						width: 70%;
+						text-align: left;
+						font-size: 13px;
+					}
+				}
+
+				.coupon_right {
+					background-image: linear-gradient(#BD8AFF, #5053FF);
+					border-radius: 10px;
+					width: 30%;
+					height: 80px;
+					line-height: 80px;
+					text-align: center;
+					font-size: 14px;
+				}
+			}
+		}
+
+		.box2 {
+			display: flex;
+			flex-wrap: wrap;
+			width: 100%;
+
+			.coupon2 {
+				width: 45%;
+				height: 90px;
+				margin: 0 2.5%;
+				margin-bottom: 15px;
+				border-radius: 15px;
+				background-image: linear-gradient(#BD8AFF, #5053FF);
+				color: #fff;
+				display: flex;
+				align-items: center;
+
+				.coupon2_left {
+					width: 80%;
+					text-align: center;
+
+					.box2_top {
+						font-size: 27px;
+						margin-bottom: 5px;
+					}
+				}
+
+				.coupon2_right {
+					width: 20%;
+					padding: 10px;
+					font-size: 17px;
+					writing-mode: lr-tb;
+					text-align: center;
+				}
+			}
+		}
+
+		.box3 {
+			display: flex;
+			flex-wrap: wrap;
+			width: 100%;
+
+			.coupon3 {
+				color: #fff;
+				background-image: linear-gradient(#BD8AFF, #5053FF);
+				width: 31.3%;
+				margin: 0 1%;
+				margin-bottom: 15px;
+				padding: 15px 0;
+				font-weight: lighter;
+				border-radius: 15px;
+				text-align: center;
+
+				.price {
+					font-size: 25px;
+					margin-bottom: 10px;
+					font-weight: lighter;
+				}
+
+				.discount {
+					font-size: 15px;
+					margin-bottom: 10px;
+				}
+
+				.mall {
+					width: 100%;
+					font-size: 13px;
+					margin-bottom: 10px;
+				}
+
+				.receive {
+					height: 25px;
+					width: 60px;
+					line-height: 25px;
+					background-color: aliceblue;
+					color: #1889f6;
+					display: inline-block;
+					border-radius: 15px;
+					margin-top: 10px;
+				}
+			}
+		}
+	}
+</style>

+ 281 - 0
components/ui-component/U_cube/m/index.vue

@@ -0,0 +1,281 @@
+<template>
+	<view class="U000007-template1" :style="{backgroundColor: datas.preview_color}" :class="className">
+		<!-- style -->
+		<view v-html="css"></view>
+		<view :style="decorate_cube" class="decorate-cube" v-if="datas.preview_color">
+			<view v-if="!havePicture" style="text-align: center;display: flex;height: 100%;font-size: 16px">
+				<span style="flex: 1;align-self: center">暂无设置图片</span>
+			</view>
+			<view v-if="havePicture">
+				<view v-if="item.value.is_minApp==1" @click="$until.u_gopage('U_cube',item.value)" class="cube-selected"
+					v-for="(item, index) in datas.picture.cudeSelected" :key="index"
+					:style="{'width':getCubeSelectedWidth(item)+'px','height':getCubeSelectedHeight(item)+'px','top':getCubeSelectedTop(item)+'px','left':getCubeSelectedLeft(item)+'px',backgroundImage: `url(${item.value.image ? item.value.image : ''})`, backgroundSize: '100% 100%',backgroundPosition: 'center',backgroundRepeat: 'no-repeat'}">
+					<view class="cube-selected-text">
+					</view>
+				</view>
+				<!-- #ifdef MP-WEIXIN -->
+				<view v-else class="cube-selected" @click="$until.u_gopage('U_cube',item.value)"
+					:style="{'width':getCubeSelectedWidth(item)+'px','height':getCubeSelectedHeight(item)+'px','top':getCubeSelectedTop(item)+'px','left':getCubeSelectedLeft(item)+'px',backgroundImage: `url(${item.value.image ? item.value.image : ''})`, backgroundSize: '100% 100%',backgroundPosition: 'center',backgroundRepeat: 'no-repeat'}">
+					<view class="cube-selected-text">
+					</view>
+				</view>
+				<!-- #endif -->
+				<!-- #ifdef H5 -->
+
+				<view class="cube-selected" v-else
+					:style="{'width':getCubeSelectedWidth(item)+'px','height':getCubeSelectedHeight(item)+'px','top':getCubeSelectedTop(item)+'px','left':getCubeSelectedLeft(item)+'px',backgroundImage: `url(${item.value.image ? item.value.image : ''})`, backgroundSize: '100% 100%',backgroundPosition: 'center',backgroundRepeat: 'no-repeat'}">
+					<wx-open-launch-weapp :username="item.value.gh_id" :path="item.value.minApp_link">
+						<view class="cube-selected-text">
+						</view>
+					</wx-open-launch-weapp>
+				</view>
+
+				<!-- #endif -->
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+	// #ifdef H5
+	var wx = require('jweixin-module');
+	// #endif
+	// 自定义样式
+	const css = function() {
+		if (this.datas.picture) {
+			const {
+				margin,
+			} = this.datas;
+
+			return `
+        .component-${this.id} .decorate-cube {
+            height: ${this.datas.picture.icon == '1' ? this.cubeItemHeight*2 : this.cubeItemHeight*this.cubeX}px;
+            margin: 0 ${margin/2}px 0 ${margin/2}px;
+        }
+
+    `;
+		}
+	};
+
+	export default {
+		props: ['datas', 'styles'],
+		data() {
+			return {
+				// density:4, //密度
+				cubeWidth: 375, //魔方宽度
+				cubeHeight: 375, //魔方高度
+				cudeSelecting: {
+					start: null,
+					end: null,
+					data: []
+				},
+				cudeSelected: [], //已经生成的单元
+				havePicture: false,
+				cubeX: 1,
+			}
+		},
+		mounted() {
+			this.checkhavePicture();
+		},
+		computed: {
+			decorate_cube() {
+				if (this.datas.picture) {
+					const {
+						margin,
+					} = this.datas;
+
+					return `
+            height: ${this.datas.picture.icon == '1' ? this.cubeItemHeight*2 : this.cubeItemHeight*this.cubeX}px;
+            margin: 0 ${margin/2}px 0 ${margin/2}px;
+             `;
+				}
+			},
+			css() {
+				return '<style>' + css.call(this) + '</style>';
+			},
+			className() {
+				const name = ['component-wrapper', `component-${this.id}`];
+				return name;
+			},
+			//密度值
+			densityNum: function() {
+				return parseInt(this.datas.picture.density);
+			},
+			//单元魔方高度
+			cubeItemHeight: function() {
+				return this.cubeHeight / this.datas.picture.density;
+			},
+			//单元魔方宽度
+			cubeItemWidth: function() {
+				return this.cubeWidth / this.datas.picture.density;
+			},
+		},
+		watch: {
+			datas: {
+				deep: true, //深度监听
+				handler: function() {
+					this.havePicture = false;
+					this.cubeX = 1;
+					for (let i = 0; i < this.datas.picture.cudeSelected.length; i++) {
+						if (this.datas.picture.cudeSelected[i].end.x > this.cubeX) {
+							this.cubeX = this.datas.picture.cudeSelected[i].end.x;
+						}
+						if (this.datas.picture.cudeSelected[i].value.image) {
+							this.havePicture = true;
+						}
+					}
+					if (this.datas.picture.cudeSelected.length === 0 || !this.havePicture) {
+						this.cubeX = 4;
+					}
+
+				}
+			}
+		},
+
+		methods: {
+			checkhavePicture() {
+				if (this.datas.picture) {
+					this.havePicture = false;
+					this.cubeX = 1;
+					for (let i = 0; i < this.datas.picture.cudeSelected.length; i++) {
+						if (this.datas.picture.cudeSelected[i].end.x > this.cubeX) {
+							this.cubeX = this.datas.picture.cudeSelected[i].end.x;
+						}
+						if (this.datas.picture.cudeSelected[i].value.image) {
+							this.havePicture = true;
+						}
+					}
+					if (this.datas.picture.cudeSelected.length === 0 || !this.havePicture) {
+						this.cubeX = 4;
+					}
+				}
+			},
+			//判断是否正在选择
+			isSelecting: function(x, y) {
+				var cudeSelectingData = this.cudeSelecting.data;
+				for (var i = 0, len = cudeSelectingData.length; i < len; i++) {
+					var coord = cudeSelectingData[i];
+					if (parseInt(coord.x) === parseInt(x) && parseInt(coord.y) === parseInt(y)) {
+						return true;
+					}
+				}
+				return false;
+			},
+			//判断是否已经选择
+			isSelected: function(x, y) {
+				var list = this.cudeSelected;
+				for (var i = 0; i < list.length; i++) {
+					var data = list[i].data;
+					for (var j = 0; j < data.length; j++) {
+						var coord = data[j];
+						if (parseInt(coord.x) === parseInt(x) && parseInt(coord.y) === parseInt(y)) {
+							return true;
+						}
+					}
+				}
+				return false;
+			},
+			//计算选中层的宽度
+			getCubeSelectedWidth: function(item) {
+				return (parseInt(item.end.y) - parseInt(item.start.y) + 1) * this.cubeItemWidth - this.datas.margin;
+			},
+			//计算选中层的高度
+			getCubeSelectedHeight: function(item) {
+				return (parseInt(item.end.x) - parseInt(item.start.x) + 1) * this.cubeItemHeight - this.datas.margin;
+			},
+			//计算选中层的右边距离
+			getCubeSelectedTop: function(item) {
+				return (item.start.x - 1) * this.cubeItemHeight + this.datas.margin / 2;
+			},
+			//计算选中层的左边距离
+			getCubeSelectedLeft: function(item) {
+				// #ifdef H5
+				return (item.start.y - 1) * this.cubeItemWidth + this.datas.margin / 4;
+				// #endif
+				// #ifdef MP-WEIXIN
+				return (item.start.y - 1) * this.cubeItemWidth;
+				// #endif
+			}
+		},
+
+	};
+</script>
+<style lang="less" scoped>
+	// 默认
+	.component-wrapper {
+		// width: 750rpx;
+	}
+
+	.decorate-cube {
+		position: relative;
+		// width: 100%;
+		height: 390px;
+	}
+
+	.decorate-cube .cube-row:last-of-type .cube-item {
+		/*border-right: 1px solid #e5e5e5;*/
+	}
+
+	.decorate-cube .cube-selected {
+		position: absolute;
+		background-color: #fff;
+		/*border: 1px solid #ebedf0;*/
+		text-align: center;
+		color: #7d7e80;
+		cursor: pointer;
+		box-sizing: border-box;
+	}
+
+	.decorate-cube .cube-selected.cube-selected-click {
+		background: #e0edff;
+		/*border: 1px solid #155bd4;*/
+		color: #29ba9c;
+		z-index: 2;
+		cursor: auto;
+	}
+
+	.decorate-cube .cube-selected-text {
+		font-size: 12px;
+		width: 100%;
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		transform: translateX(-50%) translateY(-50%);
+	}
+
+	.decorate-cube .cube-row {
+		float: left;
+		list-style: none;
+		padding: 0;
+		margin: 0;
+	}
+
+	.decorate-cube .cube-item:first-child {
+		/*border-top: 1px solid #e5e5e5;*/
+	}
+
+	.decorate-cube .cube-item {
+		background: #f8f8f8;
+		/*border-left: 1px solid #e5e5e5;*/
+		/*border-bottom: 1px solid #e5e5e5;*/
+		cursor: pointer;
+		text-align: center;
+		box-sizing: border-box;
+	}
+
+	.decorate-cube .cube-item.item-selecting {
+		background: #e0edff;
+	}
+
+	.decorate-cube .cube-item.item-selecting .van-icon {
+		display: none;
+	}
+
+	.decorate-cube .cube-item.item-selected {
+		background: #e0edff;
+		visibility: hidden;
+	}
+
+	.decorate-cube .cube-item.item-selected .van-icon {
+		display: none;
+	}
+</style>

+ 586 - 0
components/ui-component/U_goods/m/index.vue

@@ -0,0 +1,586 @@
+<template>
+	<view :class="className" :style="wrapper_style">
+		<!-- style -->
+		<view v-html="css"></view>
+		<view v-if="datas.show_title" class="morebox">
+			<view :style="title_style" class="title">{{ title }}</view>
+			<view  class="title2" @click="more">查看更多
+				<u-icon :style="img_style2" color="#949494" name="arrow-right" size="14"></u-icon>
+			</view>
+		</view>
+		<!-- 列表 -->
+		<view class="goods-list">
+			<view class="li" v-for="(item, index) in list" :key="item.id">
+				<!--折扣标-->
+				<discount :value="item.discount" :config="datas" />
+				<!--商品图片-->
+				<view class="item-image">
+					<view class="image-goods">
+						<goodsimage :src="item.pic" :index="index" />
+					</view>
+				</view>
+				<view class="item-info">
+					<!-- 价格 -->
+					<view class="item-shop-market">
+						<!--销售价-->
+						<view class="item-shop bold">
+							<view class="shop-price" :style="shopprice_style">
+								<shopprice :value="item.price" :config="datas">
+								</shopprice>
+							</view>
+						</view>
+						<!--市场价-->
+						<view class="item-market" v-if="del" :style="market_style">
+							<marketprice :value="item.oprice" :shop-price="item.price" :config="datas" >
+							</marketprice>
+						</view>
+					</view>
+				</view>
+				<!-- 剩余 -->
+				<view class="item-claimed" :style="claimed_style">
+					<span>{{ filter_only_left(item.num) }}</span>
+				</view>
+				<!-- button -->
+				<view @click="$until.u_gopage('U_goods',item)" class="geshop-button-buynow" :style="buy_style">去购买
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+	import discount from '@/components/ui-component/component-unit/discount/index.vue';
+	import goodsimage from '@/components/ui-component/component-unit/image_goods/index.vue';
+	import marketprice from '@/components/ui-component/component-unit/market_price/index.vue';
+	import shopprice from '@/components/ui-component/component-unit/shop_price/index.vue';
+	import landApi from '@/api/land/index.js'
+	// 自定义样式
+	const css = function() {
+		const {
+			margin_top,
+			margin_bottom,
+			bg_color,
+			shop_price_color,
+			market_price_color,
+			text_bg_color,
+			text_color,
+			time_text_bg_color,
+			time_text_color,
+			bar_text_color,
+			buynow_bg_color,
+			buynow_text_color
+		} = this.datas;
+
+		return `
+        .component-${this.id} {
+           padding-top: ${margin_top}px;
+           padding-bottom: ${margin_bottom}px;
+           font-size: 24rpx;
+        }
+
+        .component-${this.id} .geshop-m-timer {
+            background-color: ${text_bg_color || '#D8D8D8'};
+        }
+        .component-${this.id} .geshop-m-timer .geshop-m-timer-title {
+            color: ${text_color};
+        }
+        .component-${this.id} .geshop-m-timer .geshop-m-timer-right {
+            color: ${time_text_bg_color};
+        }
+        .component-${this.id} .geshop-m-timer span.timer-spiner {
+            background-color: ${time_text_bg_color};
+            color: ${time_text_color};
+        }
+
+        .component-${this.id} .item-shop .shop-price {
+            color: ${shop_price_color};
+        }
+        .component-${this.id} .item-market {
+            color: ${market_price_color};
+        }
+
+        .component-${this.id} .item-claimed {
+            color: ${bar_text_color};
+        }
+
+        .component-${this.id} .geshop-button-buynow {
+            background-color: ${buynow_bg_color};
+            color: ${buynow_text_color};
+        }
+    `;
+	};
+
+	/**
+	 * 返回剩余秒数,正整值
+	 * @param {timestamp} timestamp 时间戳
+	 */
+	const get_second = (timestamp) => {
+		const now = new Date().getTime();
+		let left = timestamp - now;
+		left = Math.abs(left);
+		const second = parseInt((left / 1000));
+		return second;
+	};
+
+	/**
+	 * 判断当前的倒计时状态
+	 * @param {timestamp} start 开始的时间
+	 * @param {timestamp} end 结束的时间
+	 * @return {Number} 0=未开始,1=正在开始,2=已经结束
+	 */
+	const get_status = (start, end) => {
+		const now = new Date().getTime();
+		if (now < start) {
+			return 0;
+		}
+		if (now >= start && now < end) {
+			return 1;
+		}
+		if (now >= end) {
+			return 2;
+		}
+	};
+
+	/**
+	 * 秒数转换成日期
+	 * @param {Number} s 秒数
+	 * @returns {Array}
+	 */
+	const second_to_date = (s) => {
+		let t = ['00', '00', '00', '00'];
+		if (s > -1) {
+			t = [];
+			const day = Math.floor(s / 3600 / 24);
+			const hour = Math.floor(s / 3600) % 24;
+			const min = Math.floor(s / 60) % 60;
+			const sec = s % 60;
+			t.push(`${day}D`);
+			if (hour < 10) {
+				t.push('0' + hour);
+			} else {
+				t.push(hour);
+			}
+			if (min < 10) {
+				t.push('0' + min);
+			} else {
+				t.push(min);
+			}
+			if (sec < 10) {
+				t.push('0' + sec);
+			} else {
+				t.push(sec);
+			}
+		};
+		return t;
+	};
+
+	export default {
+		components: {
+			discount,
+			goodsimage,
+			marketprice,
+			shopprice,
+		},
+		props: ['datas', 'styles'],
+		data() {
+			this.goodsinit()
+			return {
+				// 加载状态
+				loading: true,
+				// 定时器钩子
+				timer_id: null,
+				// 倒计时秒数
+				spiner: ['00', '00', '00', '00'],
+				// 倒计时文案
+				spiner_text: '倒计时文案',
+				// 当前状态
+				status: 0,
+				list:[]
+			};
+		},
+
+		computed: {
+			shopprice_style(){
+				const { shop_price_color } = this.datas
+				return `color: ${shop_price_color};`;
+			},
+			market_style(){
+				const { market_price_color } = this.datas
+				return `color: ${market_price_color};`;
+				
+			},
+			claimed_style(){
+				const { bar_text_color } = this.datas
+				return `color: ${bar_text_color};`;
+				
+			},
+			buy_style() {
+				const { buynow_bg_color, buynow_text_color } = this.datas
+				return `
+				background-color: ${buynow_bg_color};
+				color: ${buynow_text_color};`;
+			},
+			className() {
+				const name = ['component-wrapper', `component-${this.id}`];
+				return name;
+			},
+			/** 副标题内容 */
+			title() {
+				return this.datas.title || '土地';
+			},
+			img_style2() {
+				return `
+				width:15px;
+				height:15px;
+				margin:auto;
+				`;
+			},
+			// 副标题栏样式
+			title_style() {
+				const {
+					text_size,
+					text_color,
+				} = this.datas;
+				return `
+			    font-size: ${text_size}px;
+			    color: ${text_color};
+			`;
+			},
+			/** 样式 */
+			wrapper_style() {
+				const {
+					padding_top,
+					padding_bottom,
+					padding_left,
+					padding_right,
+					bg_color,
+					margin_top,
+					margin_bottom,
+				} = this.datas;
+				return `
+				    width: 750rpx;
+				    padding-top: ${margin_top}px;
+				    padding-bottom: ${margin_bottom}px;
+				    padding-left: ${padding_left}px;
+				    padding-right: ${padding_right}px;
+					background-color:${bg_color};
+				`;
+			},
+			css() {
+				return '<style>' + css.call(this) + '</style>';
+			},
+			env() {
+				return this.$store.state.page.env;
+			},
+			// 返回远端数据属否加载完毕
+			remote_data_loaded() {
+				return this.$store.state.page.remote_data_loaded;
+			},
+			// 数据源ID
+			goods_source_id() {
+				return this.datas.goods[0].id || '';
+			},
+			// 开始时间
+			start_time() {
+				try {
+					const timestamp = parseInt(this.datas.goods[0].tsk_info.tsk_begin_time);
+					return timestamp * 1000;
+				} catch (err) {
+					return 1577265;
+				}
+			},
+			// 结束时间
+			end_time() {
+				try {
+					const timestamp = parseInt(this.datas.goods[0].tsk_info.tsk_end_time);
+					return timestamp * 1000;
+				} catch (err) {
+					return 1577265;
+				}
+			},
+			// 是否展示删除线
+			del() {
+				let visible = true;
+				visible = (this.datas.market_price_del === undefined || this.datas.market_price_del === null) ? true :
+					Number(
+						this.datas.market_price_del) >= 1;
+				return visible;
+			}
+		},
+
+		methods: {
+			 goodsinit() {
+				let that = this
+				let ids = []
+				that.datas.goods.forEach(ele => {
+					ids.push(ele.id)
+				})
+				let res = landApi.getlist({
+					gids: ids,
+					gtype: 'good',
+				}).then(res => {
+					console.log("res", res)
+					if (res.status == 200) {
+						that.list = res.data;
+					}
+				});
+			},
+			more() {
+				uni.navigateTo({
+					url: '/pagesE/pages/mall/list'
+				})
+			},
+			// 初始化
+			async init() {
+				// 首次状态更新
+				this.timer(this.start_time, this.end_time);
+				// 装修页不执行倒计时
+				if (this.env !== 1) {
+					clearInterval(this.timer_id);
+					this.timer_id = setInterval(() => {
+						this.timer(this.start_time, this.end_time);
+					}, 1000);
+				}
+				this.loading = false;
+			},
+
+			// 倒计时函数
+			timer(start, end) {
+				// 获取状态
+				this.status = get_status(start, end);
+				let second = 0;
+				// 判断状态
+				switch (this.status) {
+					case 0:
+						second = get_second(start);
+
+						break;
+					case 1:
+						second = get_second(end);
+
+						break;
+					case 2:
+						clearInterval(this.timer_id);
+
+						break;
+				}
+				// 更新时分秒
+				this.spiner = second_to_date(second);
+			},
+
+			// 剩余库存文案
+			filter_only_left(count = 0) {
+				return '剩余:' + count;
+			}
+		},
+
+		watch: {
+			// 监听是否加载远端数据,有的话重新执行倒计时
+			remote_data_loaded(tof) {
+				// 变更ID执行获取数据
+				tof && this.init();
+			},
+			start_time() {
+				this.init();
+			},
+			end_time() {
+				this.init();
+			},
+			// 监听商品列表是否有变化
+			goods_list() {
+				debugger
+				// this.$store.dispatch('global/async_goods_init_2', this);
+			},
+		},
+
+		mounted() {
+			// 初始化
+			this.remote_data_loaded && this.init();
+
+			this.$emit('loaded');
+			// 页面元素初始化
+			// this.$store.dispatch('global/async_goods_init_2', this);
+
+			// 绑定滚动时间,兼容图片懒加载在水平滚动下无效
+			// $(`.component-${this.id} .goods-list`).on('scroll', () => {
+			//     const images = $(this.$el).find('img.js_gdexp_lazy');
+			//     this.$store.dispatch('global/lazyload_img_by_dom', images);
+			// });
+		}
+	};
+</script>
+<style lang="less" scoped>
+	// 默认
+	.component-wrapper {
+		// display: flex;
+		// flex-wrap: wrap;
+		// justify-content: center;
+		width: 375px;
+
+		.morebox {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 10px 12px 10px 12px;
+
+			.title2 {
+				font-size: 28rpx;
+				display: flex;
+				color: #949494;
+				align-items: center;
+			}
+		}
+
+		// 倒计时的
+		.geshop-m-timer {
+			width: 100%;
+			padding: 24 / 75rem 0;
+			text-align: center;
+
+			.geshop-m-timer-title {
+				display: inline-block;
+				font-size: 40 / 75rem;
+				line-height: 54 / 75rem;
+				height: 54 / 75rem;
+			}
+
+			.geshop-m-timer-right {
+				font-size: 32 / 75rem;
+			}
+
+			span.timer-text {
+				margin-right: 12 / 75rem;
+			}
+
+			span.timer-spiner {
+				display: inline-block;
+				height: 36 / 75rem;
+				line-height: 36 / 75rem;
+				padding: 0 5 / 75rem;
+				text-align: center;
+				font-size: 24 / 75rem;
+				border-radius: 6 / 75rem;
+			}
+		}
+
+		// 列表
+		.goods-list {
+			display: flex;
+			flex-wrap: wrap;
+			justify-content: space-evenly;
+			padding: 20rpx;
+			padding-bottom: 20rpx;
+
+			.li {
+				position: relative;
+				flex-shrink: 0;
+				width: 44%;
+				overflow: hidden;
+				padding: 20rpx;
+				margin-top: 10rpx;
+				background-color: #ffffff;
+			}
+
+			// 商品详情
+			.item-info {
+				padding-top: 10px;
+				padding-bottom: 10px;
+			}
+
+			// 销售及市场价
+			.item-shop-market {
+				width: 100%;
+			}
+
+			.item-shop-market .item-shop {
+				display: flex;
+				flex-flow: row wrap;
+				color: #333333;
+				line-height: 24/37.5rem;
+				align-items: baseline;
+				padding-top: 10px;
+				padding-bottom: 10px;
+
+				.shop-price {
+					font-size: 32rpx;
+					font-weight: bold;
+				}
+			}
+
+			.item-market {
+				height: 30rpx;
+				line-height: 30rpx;
+			}
+
+			// 售空
+			.item-soldout {
+				position: absolute;
+				top: 50%;
+				left: 50%;
+				width: 160 / 75rem;
+				height: 160 / 75rem;
+				border-radius: 100%;
+				background-color: #000000;
+				opacity: 0.4;
+				z-index: 1;
+				margin-left: -80 / 75rem;
+				margin-top: -80 / 75rem;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+
+				>span {
+					display: block;
+					text-align: center;
+					font-size: 28 / 75rem;
+					color: #ffffff;
+					width: 80%;
+					text-align: center;
+					word-break: break-all;
+					line-height: 1em;
+				}
+			}
+
+			// 促销
+			.item-promotions {
+				position: relative;
+				height: 24/75rem;
+				line-height: 24/75rem;
+				overflow: hidden;
+				margin-top: 6/75rem;
+				margin-bottom: 24/75rem;
+				font-size: 24/75rem;
+
+				.gs-off-text {
+					.special {
+						font-weight: 700;
+						font-family: OpenSans-Bold, arial, serif;
+					}
+				}
+
+				.sjx {
+					position: absolute;
+					right: 0;
+					top: 0;
+					width: 28/75rem;
+					height: 28/75rem;
+				}
+
+				.icon-downs {
+					width: 100%;
+					height: 100%;
+				}
+			}
+		}
+
+		// 购买按钮
+		.geshop-button-buynow {
+			text-align: center;
+			margin-top: 20rpx;
+			width: 100%;
+			font-size: 28rpx;
+			height: 60rpx;
+			line-height: 60rpx;
+			padding: 0px;
+		}
+	}
+</style>

+ 370 - 0
components/ui-component/U_goods2/m/index.vue

@@ -0,0 +1,370 @@
+<template>
+	<view :class="[AppTheme,className]" :style="wrapper_style">
+		<!-- style -->
+		<view v-html="css"></view>
+		<view v-if="datas.show_title" class="morebox">
+			<view :style="title_style" class="title">{{ title }}</view>
+			<view class="title2" @click="more">查看更多
+				<u-icon :style="img_style2" color="#949494" name="arrow-right" size="14"></u-icon>
+			</view>
+		</view>
+		<!-- 列表 -->
+		<view class="wrap">
+			<waterfall :datas="datas" :status="waterfall.status" :list="waterfall.list" :reset="waterfall.reset"
+				@click="onClick" @done="onDone"></waterfall>
+		</view>
+	</view>
+</template>
+<script>
+	// 自定义样式
+	const css = function() {
+		const {
+			margin_top,
+			margin_bottom,
+			bg_color,
+			shop_price_color,
+			market_price_color,
+			text_bg_color,
+			text_color,
+			time_text_bg_color,
+			time_text_color,
+			bar_text_color,
+			buynow_bg_color,
+			buynow_text_color
+		} = this.datas;
+
+		return `
+        .component-${this.id} {
+            background-color: ${bg_color || '#f8f8f8'};
+            font-size: 24rpx;
+        }
+
+
+        .component-${this.id} .item-shop .shop-price {
+            color: ${shop_price_color};
+        }
+        .component-${this.id} .item-market {
+            color: ${market_price_color};
+        }
+
+        .component-${this.id} .item-claimed {
+            color: ${bar_text_color};
+        }
+
+        .component-${this.id} .geshop-button-buynow {
+            background-color: ${buynow_bg_color};
+            color: ${buynow_text_color};
+        }
+    `;
+	};
+
+	/**
+	 * 返回剩余秒数,正整值
+	 * @param {timestamp} timestamp 时间戳
+	 */
+	const get_second = (timestamp) => {
+		const now = new Date().getTime();
+		let left = timestamp - now;
+		left = Math.abs(left);
+		const second = parseInt((left / 1000));
+		return second;
+	};
+
+	/**
+	 * 判断当前的倒计时状态
+	 * @param {timestamp} start 开始的时间
+	 * @param {timestamp} end 结束的时间
+	 * @return {Number} 0=未开始,1=正在开始,2=已经结束
+	 */
+	const get_status = (start, end) => {
+		const now = new Date().getTime();
+		if (now < start) {
+			return 0;
+		}
+		if (now >= start && now < end) {
+			return 1;
+		}
+		if (now >= end) {
+			return 2;
+		}
+	};
+
+	/**
+	 * 秒数转换成日期
+	 * @param {Number} s 秒数
+	 * @returns {Array}
+	 */
+	const second_to_date = (s) => {
+		let t = ['00', '00', '00', '00'];
+		if (s > -1) {
+			t = [];
+			const day = Math.floor(s / 3600 / 24);
+			const hour = Math.floor(s / 3600) % 24;
+			const min = Math.floor(s / 60) % 60;
+			const sec = s % 60;
+			t.push(`${day}D`);
+			if (hour < 10) {
+				t.push('0' + hour);
+			} else {
+				t.push(hour);
+			}
+			if (min < 10) {
+				t.push('0' + min);
+			} else {
+				t.push(min);
+			}
+			if (sec < 10) {
+				t.push('0' + sec);
+			} else {
+				t.push(sec);
+			}
+		};
+		return t;
+	};
+	import homeApi from '@/api/home/index.js'
+	import waterfall from "@/components/waterfall/waterfall-list"
+	export default {
+		props: ['isdiy', 'datas', 'styles'],
+		components: {
+			"waterfall": waterfall
+		},
+		data() {
+			let siteinfo = getApp().globalData.siteinfo;
+			const img = siteinfo.root_img + '/static/app/imgs/default-goods.png';
+
+			return {
+				// 加载状态
+				loading: true,
+				// 定时器钩子
+				timer_id: null,
+				// 倒计时秒数
+				spiner: ['00', '00', '00', '00'],
+				// 倒计时文案
+				spiner_text: '倒计时文案',
+				// 当前状态
+				status: 0,
+				default_img: img,
+				// 瀑布流组件相关
+				waterfall: {
+					status: "",
+					reset: false,
+					list: null
+				},
+				total: 0,
+				last_page: 0,
+				current_page: 1
+			};
+		},
+
+		computed: {
+			/** 副标题内容 */
+			title() {
+				return this.datas.title || '';
+			},
+			img_style2() {
+				return `
+				width:15px;
+				height:15px;
+				margin:auto;
+				`;
+			},
+			// 副标题栏样式
+			title_style() {
+				const {
+					text_size,
+					text_color,
+				} = this.datas;
+				return `
+			    font-size: ${text_size}px;
+			    color: ${text_color};
+			`;
+			},
+			// 副标题栏样式
+			title_style1() {
+				const {
+					text_size,
+				} = this.datas;
+				return `
+				color:rgb(96, 98, 102);
+			    font-size: ${text_size}px;
+			`;
+			},
+
+			/** 样式 */
+			wrapper_style() {
+				const {
+					padding_top,
+					padding_bottom,
+					padding_left,
+					padding_right,
+					margin_top,
+					margin_bottom,
+					bg_color,
+				} = this.datas;
+				return `
+				    width: 100%;
+					background-color:${bg_color};
+				    padding-top: ${margin_top}px;
+				    padding-bottom: ${margin_bottom}px;
+				    padding-left: ${padding_left}px;
+				    padding-right: ${padding_right}px;
+				`;
+			},
+			className() {
+				const name = ['component-wrapper', `component-${this.id}`];
+				return name;
+			},
+			css() {
+				return '<style>' + css.call(this) + '</style>';
+			},
+			env() {
+				return this.$store.state.page.env;
+			},
+			// 开始时间
+			start_time() {
+				try {
+					const timestamp = parseInt(this.datas.goods[0].tsk_info.tsk_begin_time);
+					return timestamp * 1000;
+				} catch (err) {
+					return 1577265;
+				}
+			},
+			// 结束时间
+			end_time() {
+				try {
+					const timestamp = parseInt(this.datas.goods[0].tsk_info.tsk_end_time);
+					return timestamp * 1000;
+				} catch (err) {
+					return 1577265;
+				}
+			},
+			// 是否展示删除线
+			del() {
+				let visible = true;
+				visible = (this.datas.market_price_del === undefined || this.datas.market_price_del === null) ? true :
+					Number(
+						this.datas.market_price_del) >= 1;
+				return visible;
+			}
+		},
+
+		methods: {
+			// 监听瀑布流点击
+			onClick(data, index, tag) {
+				this.$until.u_gopage('U_goods2', data)
+			},
+			// 瀑布流渲染完成
+			onDone() {
+				// 设置组件为 非重置,这行代码保留不删即可
+				this.waterfall.reset = false;
+
+				// 恢复 getList 方法的调用
+
+				// 设置组件状态为 等待加载
+				// this.waterfall.status = '';
+			},
+			more() {
+				uni.navigateTo({
+					url: '/pagesE/pages/mall/list'
+				})
+			},
+			getlist(type) {
+				let that = this;
+				that.waterfall.status = 'loading';
+				if (that.isdiy && !that.isdiy) {
+					that.waterfall.status = 'success';
+					that.waterfall.list = that.datas.goods;
+				} else {
+					homeApi.getgoods({
+						page: that.current_page,
+						lable: that.datas.title,
+						show_num: that.datas.show_num
+					}).then(res => {
+						if (type == 1) {
+							that.waterfall.list = null;
+						}
+						uni.stopPullDownRefresh()
+						that.last_page = res.data.last_page;
+						that.total = res.data.total;
+						if (res.data.data && res.data.data.length > 0) {
+							that.waterfall.list = res.data.data
+						}
+						if (that.datas.show_num && that.datas.show_num > 0) {
+							that.waterfall.status = 'showline';
+						} else {
+							if (that.total <= 0) {
+								that.waterfall.status = 'finish';
+							} else {
+								let flag = parseInt(that.last_page) == parseInt(res.data.current_page);
+								if (flag) {
+									if (that.last_page == 1 && that.current_page == 1) {
+										that.waterfall.status = 'showline';
+									} else {
+										if (res.data.data && res.data.data.length > 0) {
+											that.waterfall.status = 'success';
+										} else {
+											that.waterfall.status = 'finish';
+										}
+									}
+								} else {
+									if (that.current_page < that.last_page) {
+										that.waterfall.status = 'await';
+									} else {
+										that.waterfall.status = 'success';
+									}
+								}
+							}
+						}
+					});
+				}
+			},
+			toBottom(type) {
+				if (type == 1) {
+					this.current_page = 0;
+					this.waterfall.reset = true;
+				}
+				this.current_page++;
+				console.log('this.datas.show_num', this.datas.show_num)
+				if (this.datas.show_num <= 0 || this.datas.show_num == undefined || this.current_page == 1) {
+					this.getlist(type);
+				}
+			},
+			// 剩余库存文案
+			filter_only_left(count = 0) {
+				return '剩余:' + count;
+			}
+		},
+
+		watch: {
+			// 监听商品列表是否有变化
+			goods_list() {
+				// this.$store.dispatch('global/async_goods_init_2', this);
+			},
+		},
+
+		mounted() {
+			this.getlist()
+			this.$emit('loaded');
+		}
+	};
+</script>
+<style lang="scss" scoped>
+	// 默认
+	.component-wrapper {
+		width: 750rpx;
+
+		.morebox {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 10px 12px 10px 12px;
+
+			.title2 {
+				font-size: 28rpx;
+				display: flex;
+				color: #949494;
+				align-items: center;
+			}
+		}
+	}
+</style>

+ 242 - 0
components/ui-component/U_land/m/index.vue

@@ -0,0 +1,242 @@
+<template>
+	<view class="component-wrapper" :style="wrapper_style">
+		<view v-if="datas.show_title" class="morebox">
+			<view :style="title_style" class="title">{{ title }}</view>
+			<view  class="title2" @click="more">查看更多
+				<u-icon :style="img_style2" color="#949494" name="arrow-right" size="14"></u-icon>
+			</view>
+		</view>
+		<view class="bigbox" v-for="(item, index) in list">
+			<view class="bimage">
+				<image :src="item.soil_cover_pic || emptyImage" :key="index" :style="img_style"></image>
+			</view>
+			<view class="case_titleblock">
+				<view class="case_title">{{item.soil_name}}</view>
+			</view>
+			<view class="case_title_sm" :style="info_style">{{item.soil_desc}}</view>
+			<view class="price_selection">
+				<view class="commodity_price">
+					价格:
+					<view class="commodity_price_red text-neutral" :style="price_style">¥{{ item.show_price}}</view>
+					元起
+				</view>
+				<view @click="gobuy(item.id)" class="btn" :style="buttonstyle">选择土地</view>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+	import landApi from '@/api/land/index.js'
+	export default {
+		props: ['styles', 'datas'],
+		data() {
+			let siteinfo = getApp().globalData.siteinfo;
+			this.landinit()
+			return {
+				settingFile: siteinfo,
+				emptyImage: siteinfo.root_img + '/static/app/image.png',
+				landid: [],
+				list:[]
+			}
+		},
+		computed: {
+			/** 副标题内容 */
+			title() {
+				return this.datas.title || '土地';
+			},
+			img_style2() {
+				const {
+					button_size
+				} = this.datas
+				return `
+				width:${button_size}px;
+				height:${button_size}px;
+				margin:auto;
+				`;
+			},
+			// 副标题栏样式
+			title_style() {
+				const {
+					text_size,
+					text_color,
+				} = this.datas;
+				return `
+			    font-size: ${text_size}px;
+			    color: ${text_color};
+			`;
+			},
+			/** 样式 */
+			wrapper_style() {
+				if (this.datas) {
+					const {
+						padding_top,
+						padding_bottom,
+						padding_left,
+						padding_right,
+						bg_color
+					} = this.datas;
+					return `
+				background-color:${bg_color};
+                padding-top: ${padding_top}px;
+                padding-bottom: ${padding_bottom}px;
+                padding-left: ${padding_left}px;
+                padding-right: ${padding_right}px;
+            `;
+				}
+			},
+
+			img_style() {
+				return `
+				width: 100%;
+				height:450rpx;
+				border-top-left-radius: 10px;
+				border-top-right-radius: 10px;
+            `;
+			},
+			//按钮设置
+			buttonstyle() {
+				const {
+					border_radius,
+					button_color,
+					buttontitle_color
+				} = this.datas
+				return `
+				color:${buttontitle_color};
+				font-size: 30rpx;
+				display: inline-block;
+				padding: 15rpx 20rpx;
+				background-color:${button_color};
+				border-radius:${border_radius}px;
+				white-space: nowrap;
+				overflow: hidden;
+				text-overflow: ellipsis;
+				margin-right:10px
+				`;
+			},
+
+			//土地描述设置
+			info_style() {
+				const {
+					info_color
+				} = this.datas
+				return `
+				color:${info_color};
+				`;
+			},
+			//价格设置
+			price_style() {
+				const {
+					peice_color
+				} = this.datas
+				return `
+				color:${peice_color};
+				`;
+			},
+		},
+		methods: {
+			landinit() {
+				let that = this
+				let ids = []
+				that.datas.goods.forEach(ele => {
+					ids.push(ele.id)
+				})
+				let res = landApi.getlist({
+					gids: ids,
+					gtype: 'land',
+				}).then(res => {
+					if (res.status == 200) {
+						that.list = res.data;
+					}
+				});
+
+			},
+			more() {
+				uni.switchTab({
+					url: '/pages/land/land'
+				})
+			},
+			gobuy(id) {
+				uni.navigateTo({
+					url: '/pagesB/pages/chooseland/chooseland?landid=' + id
+				})
+			},
+		},
+	};
+</script>
+<style lang="less" scoped>
+	.component-wrapper {
+		.morebox {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 0 12px;
+			margin-bottom: 15rpx;
+
+			.title2 {
+				font-size: 28rpx;
+				display: flex;
+				color: #949494;
+				align-items: center;
+			}
+		}
+
+		.bigbox {
+			background-color: #ffffff;
+			border-radius: 15px;
+			padding-bottom: 2px;
+			margin-top: 10px;
+
+			.bimage {
+				display: flex;
+				justify-content: center;
+			}
+		}
+
+		.case_titleblock {
+			display: flex;
+			justify-content: flex-start;
+			align-items: center;
+			padding: 0 10px;
+			.case_title {
+				font-size: 36rpx;
+				height: 75rpx;
+				line-height: 75rpx;
+				color: #000;
+				white-space: nowrap;
+				text-overflow: ellipsis;
+				overflow: hidden;
+			}
+		}
+
+		.case_title_sm {
+			width: 80%;
+			font-size: 30rpx;
+			color: #999;
+			padding: 0 10px;
+			text-overflow: ellipsis;
+			overflow: hidden;
+			white-space: nowrap;
+		}
+
+		.price_selection {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 5rpx 10px;
+			margin-bottom: 10px;
+			padding-bottom: 5px;
+
+			.commodity_price {
+				display: flex;
+				font-size: 30rpx;
+				color: #333;
+
+				.commodity_price_red {
+					font-weight: 800;
+					margin: 0 5px;
+					color: red;
+				}
+			}
+		}
+	}
+</style>

+ 59 - 0
components/ui-component/U_line/m/index.vue

@@ -0,0 +1,59 @@
+<template>
+  <view class="U000009-template1" :style="wrapper_style">
+    <!-- style -->
+    <view :style="border_style"></view>
+
+  </view>
+</template>
+
+<script>
+	export default {
+		props: ['datas', 'styles'],
+		data() {
+			return{
+			}
+		},
+		computed: {
+			/** 样式 */
+			wrapper_style() {
+				if(this.datas.preview_color) {
+					const {
+						preview_color,
+						border_padding,
+						search_height,
+					} = this.datas;
+
+					return `
+                background-color: ${preview_color.color};
+                background-image: url(${preview_color.isColor == 2? preview_color.image: ''});
+                background-size: 100% auto;
+                bakcground-position: center;
+                padding: ${search_height/2}px ${border_padding}px;
+            `;
+        }
+			},
+			border_style() {
+				const {
+					line_style,
+					border_color,
+					border_weight
+				} = this.datas;
+
+				return `
+            width: 100%;
+            border-top: ${border_weight}px ${line_style} ${border_color};
+            `;
+      }
+		},
+		methods: {
+		},
+
+	};
+</script>
+
+<style lang="less" scoped>
+  // 默认
+  .component-wrapper {
+    width: 750rpx;
+  }
+</style>

+ 363 - 0
components/ui-component/U_monitor/m/index.vue

@@ -0,0 +1,363 @@
+<template>
+	<view class="U000004-template1" :style="wrapper_style" :class="className">
+		<!-- style -->
+		<view v-html="css"></view>
+		<!-- 列表 -->
+		<template v-if="datas.preview_color">
+			<view v-if="datas.show_title" class="morebox">
+				<view :style="title_style" class="title">{{ title }}</view>
+				<view class="title2" @click="more">查看更多
+					<u-icon :style="img_style2" color="#949494" name="arrow-right" size="14"></u-icon>
+				</view>
+			</view>
+			<view v-if="list.length <= 0" style="text-align: center;font-size: 16px;line-height: 32px">
+				请先添加监控
+			</view>
+			<view class="button-box" :style="box_button" v-if="list && list.length > 0">
+				<view @click="govoide(item.id)" class="box_a" :style="boxa_style" v-for="(item, index) in list"
+					:key="item.id">
+					<image class="button-img" :style="imag_style" :src="item.pic || emptyImage" alt=""></image>
+					<image :src="settingFile.root_img+'/static/app/imgs/much/play.png'" class="item-play" mode="">
+					</image>
+					<text class="button-title" :style="titlea_style">{{ item.title }}</text>
+				</view>
+			</view>
+		</template>
+	</view>
+</template>
+<script>
+	// 自定义样式
+	const css = function() {
+		if (this.datas.preview_color) {
+			const {
+				padding_top,
+				padding_bottom,
+				padding_left,
+				padding_right,
+				logo_image_size,
+				border_radius,
+				button_number,
+				preview_color,
+				font_size,
+				font_color,
+
+			} = this.datas;
+			return `
+        .component-${this.id} .button-box{
+			padding:0;
+            background-image: url(${preview_color.isColor == 2 ? preview_color.image : ''});
+            background-size: 100% 100%;
+            background-position: center;
+            background-repeat: no-repeat;
+        }
+
+        .component-${this.id} .button-box .box_a {
+            width: ${button_number == 2 ? '50' : '33.3'}%;
+        }
+
+        .component-${this.id}  .button-img{
+            width: ${logo_image_size}px;
+            height: ${logo_image_size}px;
+            border-radius: ${border_radius}px;
+        }
+
+        .component-${this.id}  .button-title{
+            font-size:${font_size}px;
+            color: ${font_color};
+        }
+    `;
+		}
+	};
+	import landApi from '@/api/land/index.js'
+	export default {
+		props: ['datas', 'styles', 'languages'],
+		data() {
+			let siteinfo = getApp().globalData.siteinfo;
+			this.initdata();
+			return {
+				settingFile: siteinfo,
+				emptyImage: siteinfo.root_img + '/static/app/image.png',
+				scroll_list: [], //轮播时用的数值结构
+				// 轮播图设置
+				swiperOption: {
+					autoplay: false,
+					// loop: true,   loop模式第二轮循环的时候第一张会闪烁
+					delay: 3000,
+					observer: true,
+					// autoHeight: true,
+					pagination: {
+						el: '.swiper-pagination',
+					}
+				},
+				list: []
+			};
+		},
+		computed: {
+			titlea_style() {
+				if (this.datas.preview_color) {
+					const {
+						font_size,
+						font_color
+					} = this.datas;
+
+					return `
+                    font-size:${font_size}px;
+                    color: ${font_color};
+				`;
+				}
+			},
+			imag_style() {
+				if (this.datas.preview_color) {
+					const {
+						logo_image_size,
+						border_radius
+					} = this.datas;
+					let ht = parseInt(logo_image_size * 2 / 3)
+					return `
+                     width: ${logo_image_size*2}rpx;
+                     height: ${ht*2}rpx;
+                     border-radius: ${border_radius*2}rpx;
+				`;
+				}
+			},
+			boxa_style() {
+				if (this.datas.preview_color) {
+					const {
+						button_number,
+					} = this.datas;
+
+					return `
+                     width: ${button_number == 2 ? '50' : '33.3'}%;
+				`;
+				}
+			},
+			box_button() {
+				if (this.datas.preview_color) {
+					const {
+						preview_color,
+						bg_color
+					} = this.datas;
+
+					return `
+					    background-color: ${bg_color};
+						padding:0;
+				        background-image: url(${preview_color.isColor == 2 ? preview_color.image : ''});
+				        background-size: 100% 100%;
+				        background-position: center;
+				        background-repeat: no-repeat;
+				`;
+				}
+			},
+			// 副标题栏样式
+			title_style() {
+				const {
+					text_size,
+					text_color,
+				} = this.datas;
+				return `
+			    font-size: ${text_size}px;
+			    color: ${text_color};
+			`;
+			},
+			img_style2() {
+				const {
+					button_size
+				} = this.datas
+				return `
+				width:${button_size}px;
+				height:${button_size}px;
+				margin:auto;
+				`;
+			},
+			/** 样式 */
+			wrapper_style() {
+				const {
+					padding_top,
+					padding_bottom,
+					padding_left,
+					padding_right,
+					bg_color
+				} = this.datas;
+				return `
+				background-color:${bg_color};
+				padding: ${padding_top}px ${padding_right}px ${padding_bottom}px  ${padding_left}px;
+			    background-size: 100% auto;
+			    bakcground-position: center;
+			`;
+			},
+			css() {
+				return '<style>' + css.call(this) + '</style>';
+			},
+			className() {
+				const name = ['component-wrapper', `component-${this.id}`];
+				return name;
+			},
+			button_number() {
+				return this.datas.button_number;
+			},
+			button_line() {
+				return this.datas.button_line || 1;
+			},
+			img_style() {
+				const {
+					button_size
+				} = this.datas
+				return `
+				width:${button_size}px;
+				height:${button_size}px;
+				margin:auto;
+				`;
+			},
+			/** 标题内容 */
+			title() {
+				return this.datas.title || '标题';
+			},
+		},
+		watch: {
+			button_number(newValue) {
+				let list = this.datas.list;
+				this.scroll_list = [];
+
+				if (!this.datas.button_line) {
+					this.datas.button_line = 1
+				}
+				let page = Math.ceil(this.datas.list.length / newValue / this.datas.button_line); //==> 页数
+				let num = newValue * this.datas.button_line; // ==> 每页多少个
+
+				for (let i = 0; i < page; i++) {
+					this.scroll_list.push(list.slice(i * num, (i + 1) * num))
+				}
+
+			},
+			button_line(newValue) {
+				let list = this.datas.list;
+				this.scroll_list = [];
+
+				if (!newValue) {
+					newValue = 1
+				}
+				let page = Math.ceil(this.datas.list.length / this.datas.button_number / newValue); //==> 页数
+				let num = this.datas.button_number * newValue; // ==> 每页多少个
+
+				for (let i = 0; i < page; i++) {
+					this.scroll_list.push(list.slice(i * num, (i + 1) * num))
+				}
+
+			}
+		},
+
+		methods: {
+			more() {
+				uni.navigateTo({
+					url: '/pagesE/pages/broadcast/broadcast'
+				})
+			},
+			govoide(id) {
+				uni.navigateTo({
+					url: '/pagesE/pages/broadcast/transmit?id=' + id
+				})
+			},
+			initdata() {
+				let that = this
+				let ids = []
+				that.datas.goods.forEach(ele => {
+					ids.push(ele.id)
+				})
+				let res = landApi.getlist({
+					gids: ids,
+					gtype: 'monitor',
+				}).then(res => {
+					if (res.status == 200) {
+						that.list = res.data;
+					}
+				});
+
+			},
+			initButtons() {
+				if (this.datas.list) {
+					let list = this.datas.list;
+					this.scroll_list = [];
+					if (!this.datas.button_line) {
+						this.datas.button_line = 1
+					}
+
+					let page = Math.ceil(this.datas.list.length / this.datas.button_number / this.datas
+						.button_line); //==> 页数
+					let num = this.datas.button_number * this.datas.button_line; // ==> 每页多少个
+
+					for (let i = 0; i < page; i++) {
+						this.scroll_list.push(list.slice(i * num, (i + 1) * num))
+					}
+				}
+			}
+		},
+		mounted() {
+			this.$nextTick(() => {
+				this.initButtons();
+			})
+		}
+	};
+</script>
+<style lang="less" scoped>
+	// 默认
+	.component-wrapper {
+		.morebox {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 0 12px;
+			margin-bottom: 5px;
+
+			.title2 {
+				display: flex;
+				font-size: 28rpx;
+				color: #949494;
+				align-items: center;
+			}
+		}
+
+		.box_a {
+			.item-play {
+				width: 55rpx;
+				height: 55rpx;
+				position: absolute;
+				top: 45%;
+				left: 50%;
+				margin-top: -27.5rpx;
+				margin-left: -27.5rpx;
+			}
+		}
+
+		.button-box {
+			display: flex;
+			flex-wrap: wrap;
+			width: 100%;
+
+			view {
+				/*flex: 1;*/
+				/*width: 25%;*/
+				position: relative;
+				margin: 10px 0;
+				list-style: none;
+				display: flex;
+				flex-direction: column;
+				align-self: center;
+				justify-self: center;
+			}
+
+			.button-img {
+				margin: 0 auto;
+				margin-bottom: 5px;
+			}
+
+			.button-title {
+				text-align: center;
+				margin: 4rpx;
+				text-overflow: ellipsis;
+				white-space: nowrap;
+				word-wrap: break-word;
+				overflow: hidden;
+			}
+		}
+	}
+</style>

+ 96 - 0
components/ui-component/U_navbar/m/index.vue

@@ -0,0 +1,96 @@
+<template :class="[AppTheme]">
+	<u-navbar :titleStyle="{color:'#ffffff'}" :bgColor="datas.bg_color" :autoBack="false" :fixed="true"
+		:placeholder="true" :height="45">
+		<view class="u-nav-slot" slot="left" @click="scancode">
+			<u-icon name="scan" color="#ffffff" size="24"></u-icon>
+		</view>
+		<!-- #ifdef APP-PLUS || H5 -->
+		<view class="u-nav-slot" slot="center" style="width: 580rpx;">
+			<u-search actionText="" :showAction="false" placeholder="输入商品名称" bg-color="#fff" @search="doSearch"
+				v-model="search"></u-search>
+			</u-icon>
+		</view>
+		<!-- #endif -->
+		<!-- #ifdef MP-WEIXIN -->
+		<view class="u-nav-slot" slot="center" style="width: 580rpx;">
+			<view class="u-nav-slot" slot="center" style="width: 460rpx;">
+				<u-search actionText="" :showAction="false" placeholder="输入商品名称" bg-color="#fff" @search="doSearch"
+					v-model="search"></u-search>
+				</u-icon>
+			</view>
+		</view>
+		<!-- #endif -->
+		<!-- #ifdef APP-PLUS || H5 -->
+		<view class="u-nav-slot" slot="right" @click="tocar">
+			<u-icon name="shopping-cart" color="#ffffff" size="24"></u-icon>
+		</view>
+		<!-- #endif -->
+	</u-navbar>
+</template>
+<script>
+	export default {
+		props: ['styles', 'datas'],
+		data() {
+			return {
+				search: '',
+			};
+		},
+		methods: {
+			//打开扫一扫
+			scancode() {
+				uni.scanCode({
+					scanType: ['qrCode'],
+					success: function(res) {
+						uni.navigateTo({
+							url: '/pagesB/pages/activorderdails/writeoffdetails/writeoffdetails?code=' +
+								res.result
+						})
+					}
+				})
+			},
+			//打开购物车
+			tocar() {
+				uni.navigateTo({
+					url: '/pagesE/pages/cart/cart'
+				})
+			},
+			doSearch() {
+				uni.navigateTo({
+					url: `/pagesA/pages/search/search?value=${this.search}`
+				})
+			},
+		},
+	};
+</script>
+<style lang="less" scoped>
+	.component-wrapper {
+		display: block;
+		max-width: 100%;
+		// text-align: center;
+		margin-left: auto;
+		margin-right: auto;
+		overflow: hidden;
+		text-decoration: none;
+		display: flex;
+		align-items: center;
+	}
+
+	.search-input {
+		width: 100%;
+		height: 35px;
+		display: flex;
+		justify-items: center;
+		border-radius: 50px;
+		background-color: white;
+	}
+
+	.img {
+		width: 25px;
+		height: 25px;
+		margin: 10px;
+	}
+
+	.title {
+		width: 315px;
+	}
+</style>

+ 137 - 0
components/ui-component/U_public/m/index.vue

@@ -0,0 +1,137 @@
+<template>
+	<view class="component-wrapper u000242" :style="wrapper_style">
+		<view class="public_top">
+			{{"空白"}}关联的公众号
+		</view>
+		<view class="public_bottom">
+			<image class="img" :src="emptyImage"></image>
+			<view class="info">
+				<view class="public_info">{{"智慧农场"}}</view>
+				<view class="public_info info_a">{{"智慧农场系统官方研发团队,数字化农业系统"}}</view>
+			</view>
+			<view :style="img_style">查看</view>
+		</view>
+	</view>
+</template>
+<script>
+	export default {
+		props: ['styles', 'datas'],
+		data() {
+			let siteinfo = getApp().globalData.siteinfo;
+			return {
+				settingFile: siteinfo,
+				emptyImage: siteinfo.root_img + '/static/app/image.png',
+			}
+		},
+		computed: {
+			/** 样式 */
+			wrapper_style() {
+				const {
+					bg_color,
+					padding_top,
+					padding_bottom,
+					padding_left,
+					padding_right,
+				} = this.datas;
+				return `
+				min-height: 40px;
+				padding: ${padding_top}px ${padding_right}px ${padding_bottom}px  ${padding_left}px;
+                background-color: ${bg_color};
+                background-size: 100% auto;
+                bakcground-position: center;
+            `;
+			},
+
+			/** 标题样式 */
+			title_style() {
+				const {
+					text_align,
+					text_size,
+					text_color
+				} = this.datas;
+				return `
+				margin-left: 10px;
+                text-align: ${text_align};
+                font-size: ${text_size}px;
+                color: ${text_color};
+            `;
+			},
+			//文字颜色
+			weather_style() {
+				const { text_color } = this.datas
+				return `
+				color:${text_color};
+				`;
+			},
+			img_style() {
+				const { text_color } = this.datas
+				return `
+				height:15px;
+				font-size:14px;
+				line-height:14px;
+				border-radius:3px;
+				padding: 5px 10px;
+				text-align: center;
+				margin-left:5px;
+				color:${text_color};
+				border:1px solid ${text_color} ;
+				`;
+			},
+
+			/** 标题 */
+			title() {
+				return '公告内容';
+			},
+		},
+
+		mounted() {
+			this.$emit('loaded');
+		}
+	};
+</script>
+<style lang="less" scoped>
+	.component-wrapper {
+		display: block;
+		max-width: 100%;
+		// text-align: center;
+		margin-left: auto;
+		margin-right: auto;
+		overflow: hidden;
+		text-decoration: none;
+		align-items: center;
+
+		.public_top {
+			font-size: 10px;
+			color: #999;
+		}
+
+		.public_bottom {
+			display: flex;
+			align-items: center;
+			margin-top: 10px;
+
+			.img {
+				width: 50px;
+				height: 50px;
+				border-radius: 25px;
+				margin-right: 10px;
+			}
+
+			.info {
+				width: 65%;
+
+				.public_info {
+					white-space: nowrap;
+					text-overflow: ellipsis;
+					overflow: hidden;
+				}
+
+				.info_a {
+					font-size: 10px;
+					color: #999;
+					margin-top: 10px;
+				}
+			}
+		}
+	}
+</style>

+ 83 - 0
components/ui-component/U_richtext/m/index.vue

@@ -0,0 +1,83 @@
+<template>
+	<view class="U0000010-template1" :class="className">
+		<!-- style -->
+		<view v-html="css"></view>
+		<view :style="box_style" class="html-box" v-html="datas.html_value"></view>
+	</view>
+</template>
+<script>
+	// 自定义样式
+	const css = function() {
+		const {
+			bg_color,
+			padding_top,
+			padding_bottom,
+			padding_left,
+			padding_right,
+		} = this.datas;
+
+		return `
+        .component-${this.id} .html-box {
+            background-color: ${bg_color || '#f8f8f8'};
+            padding-top: ${padding_top}px;
+            padding-bottom: ${padding_bottom}px;
+            padding-left: ${padding_left}px;
+            padding-right: ${padding_right}px;
+        }
+
+        .component-${this.id} .html-box p {
+            margin: 0;
+        }
+
+        .component-${this.id} .html-box img {
+            max-width: 100%;
+        }
+    `;
+	};
+
+	export default {
+		props: ['datas', 'styles'],
+		data() {
+			return {}
+		},
+		computed: {
+			box_style() {
+				const {
+					bg_color,
+					padding_top,
+					padding_bottom,
+					padding_left,
+					padding_right,
+				} = this.datas;
+
+				return `
+				        background-color: ${bg_color || '#f8f8f8'};
+				        padding-top: ${padding_top}px;
+				        padding-bottom: ${padding_bottom}px;
+				        padding-left: ${padding_left}px;
+				        padding-right: ${padding_right}px;
+				`;
+			},
+			css() {
+				return '<style>' + css.call(this) + '</style>';
+			},
+			className() {
+				const name = ['component-wrapper', `component-${this.id}`];
+				return name;
+			},
+		},
+		methods: {},
+
+	};
+</script>
+<style lang="less" scoped>
+	// 默认
+	.component-wrapper {
+		width: 750rpx;
+	}
+
+	.html-box {
+		min-height: 60rpx;
+		line-height: 60rpx;
+	}
+</style>

+ 244 - 0
components/ui-component/U_seckill/m/index.vue

@@ -0,0 +1,244 @@
+<template>
+	<view class="component-wrapper u000242" :style="wrapper_style">
+		<view class="seckill_top">
+			<view class="seckill_top_left">
+				<u-icon name="bag-fill" size="28"></u-icon>
+				<view class="expenditures">爆款秒杀</view>
+				<view>一件也是批发价</view>
+			</view>
+			<view class="more">
+				查看更多
+				<u-icon name="arrow-right" size="18"></u-icon>
+			</view>
+		</view>
+		<view class="seckill_bottom">
+			<view class="item" v-for="item in list" :key="item.id">
+				<image class="img" :src="emptyImage||item.img"></image>
+				<view class="remaining">
+					<view>仅剩</view>
+					<view>{{item.remaining}}</view>
+				</view>
+				<view class="info">
+					<view class="public_info">{{item.name}}</view>
+					<view class="info_a">
+						<view>省</view>
+						<view>立省{{item.originalprice-item.price}}元</view>
+					</view>
+					<view class="price2">
+						<view class="price">
+							<view :style="price_style">¥{{item.price}}</view>
+							<view>¥{{item.originalprice}}</view>
+						</view>
+						<view class="buybtn" :style="btn_style">
+							去抢购
+							<u-icon :color="datas.text_color" name="arrow-right" size="17"></u-icon>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+	export default {
+		props: ['styles', 'datas'],
+		data() {
+			let siteinfo = getApp().globalData.siteinfo;
+			return {
+				settingFile: siteinfo,
+				emptyImage: siteinfo.root_img + '/static/app/image.png',
+			}
+		},
+		computed: {
+			/** 样式 */
+			wrapper_style() {
+				const {
+					bg_color,
+					padding_top,
+					padding_bottom,
+					padding_left,
+					padding_right,
+				} = this.datas;
+				return `
+				min-height: 40px;
+				padding: ${padding_top}px ${padding_right}px ${padding_bottom}px  ${padding_left}px;
+                background-color: ${bg_color};
+                background-size: 100% auto;
+                bakcground-position: center;
+            `;
+			},
+			list() {
+				let list = this.datas.list || [];
+				return list
+			},
+
+			//价格颜色
+			price_style() {
+				const { price_color } = this.datas
+				return `
+				color:${price_color};
+				font-size:20px;
+				font-weight:500;
+				margin-right:5px;
+				`;
+			},
+			//按钮及文字颜色
+			btn_style() {
+				const { button_color, text_color } = this.datas
+				return `
+				    width: 80px;
+				    background-color: ${button_color};
+				    text-align: center;
+					color:${text_color};
+					border-radius: 90px;
+					line-height:30px;
+				`;
+			},
+		},
+
+		mounted() {
+			this.$emit('loaded');
+		}
+	};
+</script>
+<style lang="less" scoped>
+	.component-wrapper {
+		display: block;
+		max-width: 100%;
+		// text-align: center;
+		margin-left: auto;
+		margin-right: auto;
+		overflow: hidden;
+		text-decoration: none;
+		align-items: center;
+
+		.seckill_top {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			.seckill_top_left {
+				display: flex;
+				align-items: center;
+
+				.expenditures {
+					margin: 0 10px;
+					font-size: 16px;
+					font-weight: 600;
+				}
+				view:last-child{
+					font-size: 12px;
+				}
+			}
+
+			.more {
+				display: flex;
+				align-items: center;
+			}
+		}
+
+		.seckill_bottom {
+			margin-top: 10px;
+			padding: 0;
+
+			.item {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				margin-bottom: 10px;
+				background-color: #fff;
+				padding: 10px;
+				border-radius: 10px;
+				position: relative;
+
+				.img {
+					width: 100px;
+					height: 100px;
+					border-radius: 5px;
+					margin-right: 10px;
+				}
+
+				.remaining {
+					color: #fff;
+					width: 45px;
+					height: 45px;
+					border-radius: 50%;
+					position: absolute;
+					top: 5px;
+					right: 10px;
+					background-color: red;
+					text-align: center;
+					font-size: 12px;
+					line-height: 20px;
+
+					view:last-child {
+						font-size: 18px;
+						line-height: 25px;
+					}
+				}
+
+				.info {
+					overflow: hidden;
+					width: 80%;
+
+					.public_info {
+						width: 70%;
+						height: 40px;
+						display: -webkit-box;
+						-webkit-box-orient: vertical;
+						-webkit-line-clamp: 2;
+						overflow: hidden;
+						font-size: 16px;
+						font-weight: 600;
+						line-height: 20px;
+					}
+
+					.info_a {
+						font-size: 10px;
+						color: #F26914;
+						width: 100px;
+						display: flex;
+						border-radius: 50px;
+						border: 1px solid red;
+						overflow: hidden;
+						margin: 5px 0;
+
+						view:first-child {
+							width: 25%;
+							border-right: 1px solid #F26914;
+							text-align: center;
+							background-color: #FBD2D2;
+						}
+
+						view:last-child {
+							width: 75%;
+							text-align: center;
+						}
+					}
+
+					.price2 {
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+
+						.price {
+							line-height: 20px;
+							display: flex;
+
+							view:last-child {
+								text-decoration: line-through;
+								color: #999;
+							}
+						}
+					}
+
+					.buybtn {
+						display: flex;
+						align-items: center;
+						justify-content: center;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 74 - 0
components/ui-component/U_simplegraph/m/index.vue

@@ -0,0 +1,74 @@
+<template>
+	<view class="component-wrapper" :style="wrapper_style">
+		<template v-if="list && list.length > 0">
+			<img v-if="img.is_minApp==1" @click="$until.u_gopage('U_simplegraph',{value:img,choose_style:datas.choose_style})"
+				v-for="(img, index) in list" :src="img.image || emptyImage" :key="index" :style="img_style">
+			<!-- #ifdef MP-WEIXIN -->
+			<img v-else @click="$until.u_gopage('U_simplegraph',{value:img,choose_style:datas.choose_style})" :src="img.image || emptyImage" :style="img_style">
+			<!-- #endif -->
+			<!-- #ifdef H5 -->
+			<wx-open-launch-weapp v-else :username="img.gh_id" :path="img.minApp_link">
+				<img @click="$until.u_gopage('U_simplegraph',{value:img,choose_style:datas.choose_style})" :src="img.image || emptyImage" :style="img_style">
+			</wx-open-launch-weapp>
+			<!-- #endif -->
+		</template>
+		<template v-else>
+			<img :src="emptyImage" :style="img_style">
+		</template>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: ['styles', 'datas'],
+		data() {
+			let siteinfo = getApp().globalData.siteinfo;
+			let data = {
+				settingFile: siteinfo,
+				emptyImage: siteinfo.root_img + '/static/app/image.png',
+			}
+			return data;
+		},
+		computed: {
+			/** 样式 */
+			wrapper_style() {
+				if (this.datas.list) {
+					const {
+						padding_top,
+						padding_bottom,
+						padding_left,
+						padding_right,
+					} = this.datas;
+					return `
+                padding-top: ${padding_top}px;
+                padding-bottom: ${padding_bottom}px;
+                padding-left: ${padding_left}px;
+                padding-right: ${padding_right}px;
+            `;
+				}
+			},
+
+			img_style() {
+				const {
+					picture_border,
+				} = this.datas;
+				return `
+				width: 100%;
+                border-radius: ${picture_border}px;
+            `;
+			},
+
+			/** 标题 */
+			list() {
+				return this.datas.list;
+			},
+		},
+
+	};
+</script>
+
+<style lang="less" scoped>
+	.component-wrapper {
+		width: 750rpx;
+	}
+</style>

+ 145 - 0
components/ui-component/U_slideshow/m/index.vue

@@ -0,0 +1,145 @@
+<template>
+	<view class="U000002-template1" :style="wrapper_style">
+		<image v-if="list.length == 0" @load="init" mode="widthFix" :src="defaultUrl" :style="img_style"
+			:id="'content-wrap0'">
+		</image>
+		<swiper v-if="list.length > 0" :indicator-dots="true" :autoplay="false" :interval="3000" @change="changeSwiper"
+			:current="currentIndex" :style="{height:swiperHeight+'px'}">
+			<swiper-item v-for="(item, index) in list" :key="item.id" :style="img_style">
+				<view v-if="item.is_minApp==1" @click="$until.u_gopage('U_slideshow',item)">
+					<image mode="widthFix" @load="init" :src="item.image" :style="img_style" :id="'content-wrap'+index">
+					</image>
+				</view>
+				<!-- #ifdef MP-WEIXIN -->
+				<view v-else @click="$until.u_gopage('U_slideshow',item)">
+					<image mode="widthFix" @load="init" :src="item.image" :style="img_style" :id="'content-wrap'+index">
+					</image>
+				</view>
+				<!-- #endif -->
+				<!-- #ifdef H5 -->
+				<view v-else>
+					<wx-open-launch-weapp :username="item.gh_id" :path="item.minApp_link">
+						<image mode="widthFix" @load="init" :src="item.image" :style="img_style"
+							:id="'content-wrap'+index"></image>
+					</wx-open-launch-weapp>
+				</view>
+				<!-- #endif -->
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: ['datas', 'styles'],
+		data() {
+			const self = this;
+			let siteinfo = getApp().globalData.siteinfo;
+			let data = {
+				settingFile: siteinfo,
+				defaultUrl: siteinfo.root_img + '/static/app/banner.png',
+				//滑块的高度(单位px)
+				swiperHeight: '180',
+				//当前索引
+				currentIndex: 0,
+				//列表数据
+				dataList: [],
+
+			};
+			return data;
+		},
+		computed: {
+			/** 样式 */
+			wrapper_style() {
+				const {
+					padding_top,
+					padding_bottom,
+					padding_left,
+					padding_right,
+					bg_color
+				} = this.datas;
+				if (this.list.length == 1) {
+					return `
+					    background-color: ${bg_color};
+					   padding-top: ${padding_top*2}rpx;
+					   padding-bottom: ${padding_bottom*2}rpx;
+					   padding-left: ${padding_left*2}rpx;
+					   padding-right: ${padding_right*2}rpx;
+					`;
+				} else {
+					return `
+                background-color: ${bg_color};
+                padding-top: ${padding_top*2}rpx;
+                padding-bottom: ${padding_bottom*2}rpx;
+                padding-left: ${padding_left*2}rpx;
+                padding-right: ${padding_right*2}rpx;
+            `;
+				}
+			},
+
+			img_style() {
+				const {
+					picture_border,
+				} = this.datas;
+				return `
+				width: 100%;
+                border-radius: ${picture_border}px;
+            `;
+			},
+
+			// 广告轮播列表
+			list() {
+				try {
+					let list = [...this.datas.list] || [];
+					list = list.filter(item => item.image != '');
+					return list;
+				} catch (err) {
+					return [];
+				}
+			}
+		},
+		methods: {
+			//手动切换题目
+			changeSwiper(e) {
+				this.currentIndex = e.detail.current;
+				//动态设置swiper的高度,使用nextTick延时设置
+				this.$nextTick(() => {
+					this.setSwiperHeight();
+				});
+			},
+			init() {
+				this.$nextTick(() => {
+					this.setSwiperHeight();
+				});
+			},
+			//动态设置swiper的高度
+			setSwiperHeight() {
+				let that = this;
+				let element = "#content-wrap" + this.currentIndex;
+				let query = uni.createSelectorQuery().in(that);
+				query.select(element).boundingClientRect();
+				query.exec((res) => {
+					if (res && res[0]) {
+						if (that.swiperHeight != res[0].height) {
+							that.swiperHeight = res[0].height;
+						}
+					}
+				});
+			},
+		}
+	};
+</script>
+
+<style lang="less" scoped>
+	.U000002-template1 {
+		display: block;
+		margin-left: auto;
+		margin-right: auto;
+		text-align: center;
+		overflow: hidden;
+
+		img {
+			width: 100%;
+		}
+	}
+</style>

+ 194 - 0
components/ui-component/U_suspendbutton/m/index.vue

@@ -0,0 +1,194 @@
+<template>
+	<view :class="className">
+		<!-- style -->
+		<!--<view v-html="css"></view>-->
+		<template v-if="datas.list && datas.list.choose_style ==1">
+			<view class="fixed-box" v-for="(item, index) in datas.list.list" :key="index"
+				:style="{top : `${(datas.over_top + 30)*2}rpx`}">
+				<!--悬浮按钮静态-->
+				<view class="btn" :style="button_style">
+					<u--image radius="25px" :style="{'width': datas.button_size+'px', 'height': datas.button_size+'px'}" :showLoading="true" :src="item.image || emptyImage" width="50px"
+						height="50px"></u--image>
+				</view>
+			</view>
+		</template>
+
+		<template v-if="datas.list && datas.list.choose_style ==2">
+			<view class="fixed-box2" :style="{top : `${(datas.over_top-15)*2}rpx`}" v-if="datas.list.show_style ==1">
+				<u--image radius="25px" :style="button_style" :showLoading="true" :src="datas.list.unfold_button || openImage" width="50px"
+					height="50px"></u--image>
+				<view class="btn" v-for="(item, index) in datas.list.list" :key="index"
+					:style="{top : `${-70*(index+1)}px`,left: `${datas.position_location =='left'?((datas.button_size-50)/2)+10: 315-((datas.button_size-50)/2)}px`}">
+					<u--image radius="25px" :showLoading="true" :src="item.image || emptyImage" width="50px"
+						height="50px"></u--image>
+				</view>
+			</view>
+
+			<view class="fixed-box2" :style="{top : `${(datas.over_top-15 )*2}rpx`}" v-if="datas.list.show_style ==2">
+				<u--image radius="25px" :style="button_style" :showLoading="true" :src="datas.list.unfold_button || openImage" width="50px"
+					height="50px"></u--image>
+				<view class="btn" style="top:-70px;" :style="btn_1_style" v-if="datas.list.list[0]">
+					<u--image radius="25px" :showLoading="true" :src="datas.list.list[0].image" width="50px"
+						height="50px"></u--image>
+				</view>
+				<view class="btn" :style="btn_3_style" v-if="datas.list.list[1]">
+					<u--image radius="25px" :showLoading="true" :src="datas.list.list[1].image" width="50px"
+						height="50px"></u--image>
+				</view>
+				<view class="btn" :style="btn_4_style" v-if="datas.list.list[2]">
+					<u--image radius="25px" :showLoading="true" :src="datas.list.list[2].image" width="50px"
+						height="50px"></u--image>
+				</view>
+				<view class="btn" style="top: 70px;" :style="btn_2_style" v-if="datas.list.list[3]">
+					<u--image radius="25px" :showLoading="true" :src="datas.list.list[3].image" width="50px"
+						height="50px"></u--image>
+				</view>
+			</view>
+		</template>
+
+	</view>
+</template>
+
+<script>
+	export default {
+		props: ['datas', 'styles'],
+		data() {
+			let siteinfo = getApp().globalData.siteinfo;
+			let data = {
+				settingFile: siteinfo,
+				emptyImage: siteinfo.root_img + '/static/app/image.png',
+				openImage: siteinfo.root_img + '/static/app/open.png',
+			}
+
+			return data;
+		},
+		computed: {
+			button_style() {
+				const {
+					button_size,
+					position_location,
+				} = this.datas;
+
+				return `
+                width: ${button_size}px;
+                height: ${button_size}px;
+                margin-left: ${position_location =='left'?25:630}rpx;
+            `;
+			},
+			btn_1_style() {
+				const {
+					position_location,
+				} = this.datas;
+
+				return `
+				        left: ${position_location =='left'?'10':315}px;
+            `;
+			},
+			btn_2_style() {
+				const {
+					button_size,
+					position_location,
+				} = this.datas;
+
+				return `
+				        top: ${20+button_size}px;
+				        left: ${position_location =='left'?'10':315}px;
+            `;
+			},
+			btn_3_style() {
+				const {
+					button_size,
+					position_location,
+				} = this.datas;
+
+				return `
+				        top: ${15-button_size}px;
+				        left: ${position_location =='left' ? 20+button_size:310-button_size}px;
+            `;
+			},
+			btn_4_style() {
+				const {
+					button_size,
+					position_location,
+				} = this.datas;
+
+				return `
+				        top: ${button_size-15}px;
+				        left: ${position_location =='left' ? 20+button_size:310-button_size}px;
+            `;
+			},
+			className() {
+				const name = ['component-wrapper', `component-${this.id}`];
+				return name;
+			},
+		},
+
+		methods: {},
+
+	};
+</script>
+
+<style lang="less" scoped>
+	// 默认
+	.component-wrapper {
+		width: 750rpx;
+	}
+
+	.fixed-box {
+		width: 750rpx;
+		position: fixed;
+		top: 114px;
+		z-index: 2;
+
+		.btn {
+			width: 50px;
+			height: 50px;
+			border-radius: 100%;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			position: absolute;
+			flex-direction: column;
+			font-size: 13px;
+
+			img {
+				width: 100%;
+				height: 100%;
+				border-radius: 50%;
+			}
+		}
+	}
+
+	.fixed-box2 {
+		width: 750rpx;
+		top: 114px;
+		z-index: 2;
+		position: fixed;
+
+		.imgs {
+			width: 60px;
+			height: 60px;
+			border-radius: 50%;
+			z-index: 2;
+			position: relative;
+		}
+
+		.btn {
+			width: 50px;
+			height: 50px;
+			border-radius: 100%;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			position: absolute;
+			flex-direction: column;
+			font-size: 13px;
+
+			img {
+				width: 50px;
+				height: 50px;
+				border-radius: 50%;
+			}
+		}
+	}
+</style>

+ 98 - 0
components/ui-component/U_title/m/index.vue

@@ -0,0 +1,98 @@
+<template>
+  <view class="component-wrapper u000242" :style="wrapper_style">
+    <view v-if="datas.show_title" :style="title_style" class="title">{{ title }}</view>
+    <view v-if="datas.show_second_title" :style="second_title_style" class="second-title">{{ second_title }}</view>
+  </view>
+</template>
+
+<script>
+	export default {
+		props: ['styles', 'datas'],
+
+		computed: {
+			/** 样式 */
+			wrapper_style() {
+				if(this.datas.preview_color) {
+					const {
+						preview_color,
+						padding_top,
+						padding_bottom,
+						padding_left,
+						padding_right,
+					} = this.datas;
+
+					return `
+                padding-top: ${padding_top}px;
+                padding-bottom: ${padding_bottom}px;
+                padding-left: ${padding_left}px;
+                padding-right: ${padding_right}px;
+                background-color: ${preview_color.color};
+                background-image: url(${preview_color.isColor == 2? preview_color.image: ''});
+                background-size: 100% auto;
+                bakcground-position: center;
+            `;
+        }
+			},
+
+			/** 标题样式 */
+			title_style() {
+				const {
+					text_style,
+					text_align,
+					text_size,
+					text_color
+				} = this.datas;
+				return `
+                font-weight: ${text_style.includes('1')?'bold':''};
+                font-style: ${text_style.includes('2')?'italic':''};
+                text-align: ${text_align};
+                font-size: ${text_size}px;
+                color: ${text_color};
+            `;
+			},
+
+			/** 副标题样式 */
+			second_title_style() {
+				const {
+					second_text_style,
+					second_text_align,
+					second_text_size,
+					second_text_color
+				} = this.datas;
+				return `
+                font-weight: ${second_text_style.includes('1')?'bold':''};
+                font-style: ${second_text_style.includes('2')?'italic':''};
+                text-align: ${second_text_align};
+                font-size: ${second_text_size}px;
+                color: ${second_text_color};
+            `;
+			},
+
+			/** 标题 */
+			title() {
+				return this.datas.title || '标题';
+			},
+			second_title() {
+				return this.datas.second_title || '副标题';
+			},
+
+		},
+
+		mounted() {
+			this.$emit('loaded');
+		}
+	};
+</script>
+
+<style lang="less" scoped>
+  .component-wrapper {
+    display: block;
+    max-width: 100%;
+	line-height: 40rpx;
+    text-align: center;
+    margin-left: auto;
+    margin-right: auto;
+    overflow: hidden;
+    text-decoration: none;
+  }
+</style>

+ 50 - 0
components/ui-component/U_video/m/index.vue

@@ -0,0 +1,50 @@
+<template>
+	<view class="component-wrapper u000242" :style="wrapper_style">
+		<video :poster="video_url.isShowPoster == '0' ? '' : video_url.poster" style="width: 100%;"
+			:src="video_url.video_url" controls="controls">
+		</video>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: ['styles', 'datas'],
+
+		computed: {
+			/** 样式 */
+			wrapper_style() {
+				const {
+					padding_top,
+					padding_bottom,
+					padding_left,
+					padding_right,
+				} = this.datas;
+				let total = padding_left + padding_right
+				return `
+				line-height: 0;
+                width: calc(100% - ${total*2}rpx);
+                padding-top: ${padding_top}px;
+                padding-bottom: ${padding_bottom}px;
+                padding-left: ${padding_left}px;
+                padding-right: ${padding_right}px;
+            `;
+			},
+
+			video_url() {
+				return this.datas.video_url || {};
+			},
+
+		},
+
+		mounted() {
+			this.$emit('loaded');
+		}
+	};
+</script>
+
+<style lang="less" scoped>
+	// 默认
+	.component-wrapper {
+		width: 750rpx;
+	}
+</style>

+ 130 - 0
components/ui-component/U_weather/m/index.vue

@@ -0,0 +1,130 @@
+<template>
+	<view class="component-wrapper u000242" :style="wrapper_style">
+		<view class="weather_left">
+			<view class="weather_left_top" :style="weather_style">
+				<view style="fontSize:20px ;">38℃</view>
+				<view>多云</view>
+				<view>2018-08-20</view>
+				<view>星期一</view>
+			</view>
+			<view class="weather_left_bottom">
+				<view>
+					温度变化:{{ '27°-37°'}}
+				</view>
+				<view>
+					空气质量: {{'轻度污染'}}
+				</view>
+				<view>
+					风力: {{'二级'}}
+				</view>
+			</view>
+		</view>
+		<u-icon :style="img_style"  name="eye" :color="datas.text_color" size="28"></u-icon>
+	</view>
+</template>
+<script>
+	export default {
+		props: ['styles', 'datas'],
+
+		computed: {
+			/** 样式 */
+			wrapper_style() {
+				const {
+					bg_color,
+					padding_top,
+					padding_bottom,
+					padding_left,
+					padding_right,
+				} = this.datas;
+				return `
+				min-height: 40px;
+				padding: ${padding_top}px ${padding_right}px ${padding_bottom}px  ${padding_left}px;
+                background-color: ${bg_color};
+                background-size: 100% auto;
+                bakcground-position: center;
+            `;
+			},
+
+			/** 标题样式 */
+			title_style() {
+				const {
+					text_align,
+					text_size,
+					text_color
+				} = this.datas;
+				return `
+				margin-left: 10px;
+                text-align: ${text_align};
+                font-size: ${text_size}px;
+                color: ${text_color};
+            `;
+			},
+			//文字颜色
+			weather_style() {
+				const { text_color } = this.datas
+				return `
+				color:${text_color};
+				`;
+			},
+			img_style() {
+				const { text_color } = this.datas
+				return `
+				color:${text_color};
+				font-size:35px;
+				margin-left:15px;
+				margin-top:-5px;
+				`;
+			},
+
+			/** 标题 */
+			title() {
+				return '公告内容';
+			},
+		},
+
+		mounted() {
+			this.$emit('loaded');
+		}
+	};
+</script>
+<style lang="less" scoped>
+	.component-wrapper {
+		display: block;
+		max-width: 100%;
+		// text-align: center;
+		margin-left: auto;
+		margin-right: auto;
+		overflow: hidden;
+		text-decoration: none;
+		display: flex;
+		align-items: center;
+
+		.weather_left {
+			width: 85%;
+
+			.weather_left_top {
+				color: #FCBD56;
+				display: flex;
+				align-items: flex-end;
+				justify-content: space-between;
+				width: 85%;
+				margin-bottom: 8px;
+			}
+
+			.weather_left_bottom {
+				width: 90%;
+				font-size: 10px;
+				width: 100%;
+				display: flex;
+				align-items: flex-end;
+				justify-content: space-between;
+			}
+		}
+	}
+
+	.img {
+		width: 25px;
+		height: 25px;
+		margin: 10px;
+	}
+</style>

+ 32 - 0
components/ui-component/common-config.js

@@ -0,0 +1,32 @@
+/**
+ * 基础数据
+ */
+class Config {
+    constructor () {
+        this.state = {
+            datas: {
+	            padding_top: { title: '上边距', type: 'number', value: 0, col: 4, },
+	            padding_bottom: { title: '下边距', type: 'number', value: 0, col: 4, },
+	            padding_left: { title: '左边距', type: 'number', value: 0, col: 4, },
+	            padding_right: { title: '右边距', type: 'number', value: 0, col: 4, },
+            },
+            styles: {}
+        }
+    }
+
+    /**
+     * 合并数据
+     * @param {Object} datas
+     * @param {Object} styles
+     * @returns {Object}
+     */
+    merge (data) {
+        const __data = data;
+        Object.keys(this.state).map(key => {
+            __data[key] = Object.assign(__data[key], this.state[key]);
+        });
+        return __data;
+    }
+}
+
+export default new Config();

+ 160 - 0
components/ui-component/component-unit/discount/index.vue

@@ -0,0 +1,160 @@
+<template>
+	<view class="ui-unit-discount" :style="box_style" v-if="visible">
+		<span class="bold">
+			<!-- 类型1 -->
+			<template v-if="type == 1">
+				{{ value_parse }}%<br />
+				<view>OFF</view>
+			</template>
+			<!-- 类型2 -->
+			<template v-else>
+				-{{ value_parse }}%
+			</template>
+		</span>
+	</view>
+</template>
+<script>
+	export default {
+		name: 'unit-discount',
+		props: {
+			value: {
+				default: 0
+			},
+			config: {
+				type: Object,
+				required: true
+			}
+		},
+		computed: {
+			/**
+			 * 控制是否展示
+			 * 1. 装修页强制展示
+			 * 2. 小于0隐藏
+			 */
+			visible() {
+				let visible = true;
+				visible = (this.config.discount_show === undefined || this.config.discount_show === null) ? true : Number(
+					this.config.discount_show) >= 1;
+				if (Number(this.value) <= 0) {
+					visible = false;
+				}
+				return visible;
+			},
+			/**
+			 * 折扣标的类型
+			 * @default 2
+			 * @example
+			 * 1 =  **%OFF
+			 * 2 =  -***%
+			 */
+			type() {
+				return this.config.discount_type || 1;
+			},
+			/**
+			 * 折扣标的右边距
+			 */
+			right() {
+				return 0;
+			},
+			/**
+			 * 折扣标的上边距
+			 */
+			top() {
+				return 0;
+			},
+			/**
+			 * 整体宽度
+			 */
+			width() {
+				return 40;
+			},
+			/**
+			 * 整体高度
+			 */
+			height() {
+				return 40;
+			},
+			// 折扣标的自定义样式
+			style_body() {
+				const style = {
+					width: this.width + 'px',
+					height: this.height + 'px',
+					right: this.right + 'px',
+					top: this.top + 'px',
+					color: this.config.discount_font_color || '#fff'
+				};
+				if (this.config.discount_bg_image) {
+					style['background-image'] = `url("${this.config.discount_bg_image}")`;
+					style['border-radius'] = 0;
+				} else {
+					style['background-color'] = this.config.discount_bg_color || '#333333';
+				}
+				return style;
+			},
+			box_style() {
+				if (this.config.discount_bg_image) {
+					return `
+					width: ${this.width} + 'px';
+					height: ${this.height} + 'px';
+					right: ${this.right} + 'px';
+					top: ${this.top} + 'px';
+					color:${this.config.discount_font_color};
+					background-image:url("${this.config.discount_bg_image}");
+					border-radius = 0;
+					`;
+				} else {
+					return `
+					width: ${this.width} + 'px';
+					height: ${this.height} + 'px';
+					right: ${this.right} + 'px';
+					top: ${this.top} + 'px';
+					color:${this.config.discount_font_color};
+					background-color:${this.config.discount_bg_color};
+					`;
+				}
+
+			},
+			// 计算值,四舍五入
+			value_parse() {
+				const nval = Math.round(this.value);
+				if (nval <= 0) {
+					return 0;
+				}
+				if (nval >= 100) {
+					return 100;
+				}
+				return nval;
+			}
+		}
+	};
+</script>
+<style lang="less" scoped>
+	// 浮动折扣标
+	.ui-unit-discount {
+		position: absolute;
+		right: 0px;
+		top: 0px;
+		width: 40px;
+		height: 40px;
+		border-radius: 100%;
+		overflow: hidden;
+		z-index: 1;
+		background-size: 100% 100%;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		text-align: center;
+
+		>span {
+			font-size: 12px;
+
+			// line-height: 22 / 75rem;
+			>view {
+				font-size: 12px;
+				font-style: normal;
+				font-weight: 400;
+				font-family: OpenSans-Regular, arial, serif;
+			}
+		}
+	}
+</style>

+ 75 - 0
components/ui-component/component-unit/image_goods/index.vue

@@ -0,0 +1,75 @@
+<template>
+	<view class="ui-unit-image-goods">
+		<u--image mode="aspectFit" :src="local_src"  width="355rpx" height="340rpx" :lazy-load="true" :fade="true"
+			duration="450">
+			<template v-slot:loading>
+				<u-loading-icon color="#f7f7f7"></u-loading-icon>
+			</template>
+		</u--image>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: 'unit-goods-image',
+		props: {
+			// 商品图片
+			src: {
+				type: String,
+				default: ''
+			},
+			default_img: {
+				type: String
+			},
+			// 商品SKU,用于埋点,曝光
+			sku: {
+				type: String,
+				default: ''
+			},
+			// 当前商品曝光顺序
+			index: {
+				type: Number,
+				default: 0
+			}
+		},
+		data() {
+			const lazyload = this.$store.state.page.env != 1;
+			let siteinfo = getApp().globalData.siteinfo;
+			const img = siteinfo.root_img + '/static/app/imgs/default-goods.png';
+			return {
+				local_src: this.src || img, // 默认图
+				lazyload // 是否开启懒加载
+			};
+		},
+		computed: {
+			// 埋点参数构造
+			analytics() {
+				const params = {
+					pm: `mp`,
+					p: `p-${this.$root.pageId}`,
+					bv: {
+						// cpID: `${this.$root.pageInstanceId}`,
+						// cpnum: `${this.$root.compKey}`,
+						// cplocation: `${this.$root.uiIndex}`,
+						sku: `${this.sku}`,
+						// cporder: `${this.$root.layoutIndex}`,
+						rank: `${this.index}`
+					}
+				};
+				return JSON.stringify(params);
+			}
+		}
+	};
+</script>
+
+<style lang="less" scoped>
+	.ui-unit-image-goods {
+		display: flex;
+		align-items: center;
+		align-content: center;
+
+		img {
+			width: 100%;
+		}
+	}
+</style>

+ 61 - 0
components/ui-component/component-unit/market_price/index.vue

@@ -0,0 +1,61 @@
+<template>
+	<span v-if="Number(value) >= Number(shopPrice)&&del" :class="{
+            'js_market_wrap': true,
+            'my_shop_price': true,
+            'is-del': del
+        }" :data-orgp="value" :data-currency="currency" :data-original_amount="value">
+		${{ value }}
+	</span>
+</template>
+
+<script>
+	/**
+	 * D网用的 my-shop-price
+	 * 其他网站 my_shop_price
+	 */
+	export default {
+		name: 'unit-market-price',
+		props: {
+			// 价格
+			value: {
+				default: '0.00',
+				required: true
+			},
+			// 售价,如果售价高于市场价,则不展示市场价
+			shopPrice: {
+				required: true
+			},
+			// 币种
+			currency: {
+				default: 'USD'
+			},
+			// 其他配置项
+			config: {
+				type: Object,
+				default () {
+					return {};
+				}
+			}
+		},
+		data() {
+			return {
+				
+			};
+		},
+		computed: {
+			// 是否展示删除线
+			del() {
+				let visible = true;
+				visible = (this.config.market_price_del === undefined || this.config.market_price_del === null) ? true : Number(
+					this.config.market_price_del) >= 1;
+				return visible;
+			}
+		}
+	};
+</script>
+
+<style lang="less" scoped>
+	span.is-del {
+		text-decoration: line-through;
+	}
+</style>

+ 33 - 0
components/ui-component/component-unit/shop_price/index.vue

@@ -0,0 +1,33 @@
+<template>
+    <span
+        class="my_shop_price my-shop-price bold"
+        :data-orgp="value"
+        :data-currency="currency"
+        :data-original_amount="value">
+        ${{ value }}
+    </span>
+</template>
+
+<script>
+export default {
+    name: 'unit-shop-price',
+    props: {
+        // 价格
+        value: {
+            default: '0.00',
+            required: true
+        },
+        // 币种,默认USD美元
+        currency: {
+            default: ''
+        },
+        // 配置项
+        config: {
+            type: Object,
+            default () {
+                return {};
+            }
+        }
+    }
+};
+</script>

+ 155 - 0
components/ui-tarpty/ui-tarpty.vue

@@ -0,0 +1,155 @@
+<template>
+	<view class="all_box">
+		<u-popup :show="show" @close="onClose(2)"  round="20rpx">
+			<view class="all_box_1">
+				<view class="all_box_2" v-if="type==1">《租赁协议》</view>
+					<view class="all_box_2" v-if="type==2">《认养协议》</view>
+				<scroll-view scroll-y="true" class="popup_three" @scrolltolower="scrolltolower">
+					<view class="popup_three_one">
+						<u-parse v-html="list" :style="styles"></u-parse>
+					</view>
+				</scroll-view>
+				<view class="all_box_4" @click="yudutap">
+					<view v-if="tap==1" class="all_box_4_1">请上滑看完协议在同意</view>
+					<view v-if="tap==2" class="all_box_4_2"> 我已阅读并知晓本协议</view>
+				</view>
+
+			</view>
+		</u-popup>
+	</view>
+</template>
+<script>
+	export default {
+		name: "tarpty",
+		props: {
+			list: String,
+			tarptyshow: Boolean,
+			type:Number
+		},
+
+		data() {
+			return {
+				styles: {
+					img: 'max-width: 95%;  padding: 20rpx;',
+					p: 'font-size:30rpx;padding:250rpx',
+					span: 'font-size: 30rpx;padding:10rpx'
+				},
+				show: false,
+				tap: 1,
+			};
+		},
+		watch: {
+			//因为是单项数据流,v-modal控制的组件显示隐藏,
+			//父组件不可以通过props内的参数直接改变子元素参数,
+			//所以我们通过watch来监控数据的变化,间接修改show的数据
+			tarptyshow(val) {
+				console.log('valzzz', val)
+				this.show = val
+
+			}
+		},
+		methods: {
+		 
+			scrolltolower() {
+				 this.tap=2
+				 this.onClose(1)
+			},
+			 
+			yudutap(){
+				this.tap=2
+				this.onClose(2)
+			},
+			onClose(e) {
+                if(e==2){
+					this.show = false
+				}
+				this.$emit('tarptycolse', {
+					show: this.show,
+                     tap:this.tap
+				}) //通知父组件隐藏了
+			},
+
+		}
+	}
+</script>
+
+<style lang='scss'>
+	.all_box {
+           min-height:0;
+		.all_box_1 {
+			display: flex;
+			flex-direction: column;
+
+			.popup_three {
+
+				padding: 0 30rpx;
+				width: 95%;
+				max-height: 55vh;
+				min-height: 30vh;
+				display: flex;
+				align-items: center;
+				flex-direction: column;
+				margin: 20rpx auto;
+				overflow: hidden;
+
+				.popup_three_one {
+
+					-webkit-overflow-scrolling: touch;
+
+
+
+
+				}
+			}
+
+			.all_box_2 {
+				padding: 30rpx 0 0 20rpx;
+				font-weight: 600;
+			}
+
+			.all_box_3 {
+				padding: 0 30rpx;
+
+				.all_box_3_1 {
+					padding: 30rpx;
+					min-height: 400rpx;
+					max-width: 700rpx;
+					background-color: #f5f5f5;
+
+				}
+
+			}
+
+			.all_box_4 {
+				background-color: #f5f5f5;
+				display: flex;
+				justify-content: center;
+				/* line-height: 70rpx; */
+
+				/* border-radius:100rpx; */
+				padding: 20rpx 0rpx 20rpx 0rpx;
+
+				.all_box_4_1 {
+					 background-color: darkgray;
+					line-height: 70rpx;
+					width: 60%;
+					color: #fff;
+					border-radius: 100rpx;
+					text-align: center;
+				}
+
+				.all_box_4_2 {
+					 background-color: limegreen;
+					line-height: 70rpx;
+					width: 60%;
+					color: #fff;
+					border-radius: 100rpx;
+					text-align: center;
+				}
+			}
+
+		}
+
+
+	}
+</style>

BIN
components/updatepage/static/upgrade.png


+ 22 - 0
components/updatepage/uni-popup/message.js

@@ -0,0 +1,22 @@
+export default {
+	created() {
+		if (this.type === 'message') {
+			// 不显示遮罩
+			this.maskShow = false 
+			// 获取子组件对象
+			this.childrenMsg = null
+		}
+	},
+	methods: {
+		customOpen() {
+			if (this.childrenMsg) {
+				this.childrenMsg.open()
+			}
+		},
+		customClose() {
+			if (this.childrenMsg) {
+				this.childrenMsg.close()
+			}
+		}
+	}
+}

+ 25 - 0
components/updatepage/uni-popup/popup.js

@@ -0,0 +1,25 @@
+import message from './message.js';
+// 定义 type 类型:弹出类型:top/bottom/center
+const config = {
+	// 顶部弹出
+	top:'top',
+	// 底部弹出
+	bottom:'bottom',
+	// 居中弹出
+	center:'center',
+	// 消息提示
+	message:'top',
+	// 对话框
+	dialog:'center',
+	// 分享
+	share:'bottom',
+}
+
+export default {
+	data(){
+		return {
+			config:config
+		}
+	},
+	mixins: [message],
+}

+ 243 - 0
components/updatepage/uni-popup/uni-popup-dialog.vue

@@ -0,0 +1,243 @@
+<template>
+	<view class="uni-popup-dialog">
+		<view class="uni-dialog-title">
+			<text class="uni-dialog-title-text" :class="['uni-popup__'+dialogType]">{{title}}</text>
+		</view>
+		<view class="uni-dialog-content">
+			<text class="uni-dialog-content-text" v-if="mode === 'base'">{{content}}</text>
+			<input v-else class="uni-dialog-input" v-model="val" type="text" :placeholder="placeholder" :focus="focus">
+		</view>
+		<view class="uni-dialog-button-group">
+			<view class="uni-dialog-button" @click="close">
+				<text class="uni-dialog-button-text">取消</text>
+			</view>
+			<view class="uni-dialog-button uni-border-left" @click="onOk">
+				<text class="uni-dialog-button-text uni-button-color">确定</text>
+			</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	/**
+	 * PopUp 弹出层-对话框样式
+	 * @description 弹出层-对话框样式
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+	 * @property {String} value input 模式下的默认值
+	 * @property {String} placeholder input 模式下输入提示
+	 * @property {String} type = [success|warning|info|error] 主题样式
+	 *  @value success 成功
+	 * 	@value warning 提示
+	 * 	@value info 消息
+	 * 	@value error 错误
+	 * @property {String} mode = [base|input] 模式、
+	 * 	@value base 基础对话框
+	 * 	@value input 可输入对话框
+	 * @property {String} content 对话框内容
+	 * @property {Boolean} beforeClose 是否拦截取消事件
+	 * @event {Function} confirm 点击确认按钮触发
+	 * @event {Function} close 点击取消按钮触发
+	 */
+
+	export default {
+		name: "uniPopupDialog",
+		props: {
+			value: {
+				type: [String, Number],
+				default: ''
+			},
+			placeholder: {
+				type: [String, Number],
+				default: '请输入内容'
+			},
+			/**
+			 * 对话框主题 success/warning/info/error	  默认 success
+			 */
+			type: {
+				type: String,
+				default: 'error'
+			},
+			/**
+			 * 对话框模式 base/input
+			 */
+			mode: {
+				type: String,
+				default: 'base'
+			},
+			/**
+			 * 对话框标题
+			 */
+			title: {
+				type: String,
+				default: '提示'
+			},
+			/**
+			 * 对话框内容
+			 */
+			content: {
+				type: String,
+				default: ''
+			},
+			/**
+			 * 拦截取消事件 ,如果拦截取消事件,必须监听close事件,执行 done()
+			 */
+			beforeClose: {
+				type: Boolean,
+				default: false
+			}
+		},
+		data() {
+			return {
+				dialogType: 'error',
+				focus: false,
+				val: ""
+			}
+		},
+		inject: ['popup'],
+		watch: {
+			type(val) {
+				this.dialogType = val
+			},
+			mode(val) {
+				if (val === 'input') {
+					this.dialogType = 'info'
+				}
+			},
+			value(val) {
+				this.val = val
+			}
+		},
+		created() {
+			// 对话框遮罩不可点击
+			this.popup.mkclick = false
+			if (this.mode === 'input') {
+				this.dialogType = 'info'
+				this.val = this.value
+			} else {
+				this.dialogType = this.type
+			}
+		},
+		mounted() {
+			this.focus = true
+		},
+		methods: {
+			/**
+			 * 点击确认按钮
+			 */
+			onOk() {
+				this.$emit('confirm', () => {
+					this.popup.close()
+					if (this.mode === 'input') this.val = this.value
+				}, this.mode === 'input' ? this.val : '')
+			},
+			/**
+			 * 点击取消按钮
+			 */
+			close() {
+				if (this.beforeClose) {
+					this.$emit('close', () => {
+						this.popup.close()
+					})
+					return
+				}
+				this.popup.close()
+			}
+		}
+	}
+</script>
+
+<style scoped>
+	.uni-popup-dialog {
+		width: 300px;
+		border-radius: 15px;
+		background-color: #fff;
+	}
+
+	.uni-dialog-title {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+		padding-top: 15px;
+		padding-bottom: 5px;
+	}
+
+	.uni-dialog-title-text {
+		font-size: 16px;
+		font-weight: 500;
+	}
+
+	.uni-dialog-content {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		padding: 5px 15px 15px 15px;
+	}
+
+	.uni-dialog-content-text {
+		font-size: 14px;
+		color: #6e6e6e;
+	}
+
+	.uni-dialog-button-group {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		border-top-color: #f5f5f5;
+		border-top-style: solid;
+		border-top-width: 1px;
+	}
+
+	.uni-dialog-button {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+
+		flex: 1;
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		height: 45px;
+	}
+
+	.uni-border-left {
+		border-left-color: #f0f0f0;
+		border-left-style: solid;
+		border-left-width: 1px;
+	}
+
+	.uni-dialog-button-text {
+		font-size: 14px;
+	}
+
+	.uni-button-color {
+		color: #007aff;
+	}
+
+	.uni-dialog-input {
+		flex: 1;
+		font-size: 14px;
+	}
+
+	.uni-popup__success {
+		color: #4cd964;
+	}
+
+	.uni-popup__warn {
+		color: #f0ad4e;
+	}
+
+	.uni-popup__error {
+		color: #dd524d;
+	}
+
+	.uni-popup__info {
+		color: #909399;
+	}
+</style>

+ 116 - 0
components/updatepage/uni-popup/uni-popup-message.vue

@@ -0,0 +1,116 @@
+<template>
+	<view class="uni-popup-message" :class="'uni-popup__'+[type]">
+		<text class="uni-popup-message-text" :class="'uni-popup__'+[type]+'-text'">{{message}}</text>
+	</view>
+</template>
+
+<script>
+	/**
+	 * PopUp 弹出层-消息提示
+	 * @description 弹出层-消息提示
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+	 * @property {String} type = [success|warning|info|error] 主题样式
+	 *  @value success 成功
+	 * 	@value warning 提示
+	 * 	@value info 消息
+	 * 	@value error 错误
+	 * @property {String} message 消息提示文字
+	 * @property {String} duration 显示时间,设置为 0 则不会自动关闭
+	 */
+
+	export default {
+		name: 'UniPopupMessage',
+		props: {
+			/**
+			 * 主题 success/warning/info/error	  默认 success
+			 */
+			type: {
+				type: String,
+				default: 'success'
+			},
+			/**
+			 * 消息文字
+			 */
+			message: {
+				type: String,
+				default: ''
+			},
+			/**
+			 * 显示时间,设置为 0 则不会自动关闭
+			 */
+			duration: {
+				type: Number,
+				default: 3000
+			}
+		},
+		inject: ['popup'],
+		data() {
+			return {}
+		},
+		created() {
+			this.popup.childrenMsg = this
+		},
+		methods: {
+			open() {
+				if (this.duration === 0) return
+				clearTimeout(this.popuptimer)
+				this.popuptimer = setTimeout(() => {
+					this.popup.close()
+				}, this.duration)
+			},
+			close() {
+				clearTimeout(this.popuptimer)
+			}
+		}
+	}
+</script>
+<style scoped>
+	.uni-popup-message {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		background-color: #e1f3d8;
+		padding: 10px 15px;
+		border-color: #eee;
+		border-style: solid;
+		border-width: 1px;
+	}
+
+	.uni-popup-message-text {
+		font-size: 14px;
+		padding: 0;
+	}
+
+	.uni-popup__success {
+		background-color: #e1f3d8;
+	}
+
+	.uni-popup__success-text {
+		color: #67C23A;
+	}
+
+	.uni-popup__warn {
+		background-color: #faecd8;
+	}
+
+	.uni-popup__warn-text {
+		color: #E6A23C;
+	}
+
+	.uni-popup__error {
+		background-color: #fde2e2;
+	}
+
+	.uni-popup__error-text {
+		color: #F56C6C;
+	}
+
+	.uni-popup__info {
+		background-color: #F2F6FC;
+	}
+
+	.uni-popup__info-text {
+		color: #909399;
+	}
+</style>

+ 168 - 0
components/updatepage/uni-popup/uni-popup-share.vue

@@ -0,0 +1,168 @@
+<template>
+	<view class="uni-popup-share">
+		<view class="uni-share-title"><text class="uni-share-title-text">{{title}}</text></view>
+		<view class="uni-share-content">
+			<view class="uni-share-content-box">
+				<view class="uni-share-content-item" v-for="(item,index) in bottomData" :key="index" @click.stop="select(item,index)">
+					<image class="uni-share-image" :src="item.icon" mode="aspectFill"></image>
+					<text class="uni-share-text">{{item.text}}</text>
+				</view>
+
+			</view>
+		</view>
+		<view class="uni-share-button-box">
+			<button class="uni-share-button" @click="close">取消</button>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: 'UniPopupShare',
+		props: {
+			title: {
+				type: String,
+				default: '分享到'
+			}
+		},
+		inject: ['popup'],
+		data() {
+			return {
+				bottomData: [{
+						text: '微信',
+						icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-2.png',
+						name: 'wx'
+					},
+					{
+						text: '支付宝',
+						icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-8.png',
+						name: 'wx'
+					},
+					{
+						text: 'QQ',
+						icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/gird-3.png',
+						name: 'qq'
+					},
+					{
+						text: '新浪',
+						icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-1.png',
+						name: 'sina'
+					},
+					{
+						text: '百度',
+						icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-7.png',
+						name: 'copy'
+					},
+					{
+						text: '其他',
+						icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-5.png',
+						name: 'more'
+					}
+				]
+			}
+		},
+		created() {},
+		methods: {
+			/**
+			 * 选择内容
+			 */
+			select(item, index) {
+				this.$emit('select', {
+					item,
+					index
+				}, () => {
+					this.popup.close()
+				})
+			},
+			/**
+			 * 关闭窗口
+			 */
+			close() {
+				this.popup.close()
+			}
+		}
+	}
+</script>
+<style scoped>
+	.uni-popup-share {
+		background-color: #fff;
+	}
+
+	.uni-share-title {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		align-items: center;
+		justify-content: center;
+		height: 40px;
+	}
+
+	.uni-share-title-text {
+		font-size: 14px;
+		color: #666;
+	}
+
+	.uni-share-content {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+		padding-top: 10px;
+	}
+
+	.uni-share-content-box {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		flex-wrap: wrap;
+		width: 360px;
+	}
+
+	.uni-share-content-item {
+		width: 90px;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		justify-content: center;
+		padding: 10px 0;
+		align-items: center;
+	}
+
+	.uni-share-content-item:active {
+		background-color: #f5f5f5;
+	}
+
+	.uni-share-image {
+		width: 30px;
+		height: 30px;
+	}
+
+	.uni-share-text {
+		margin-top: 10px;
+		font-size: 14px;
+		color: #3B4144;
+	}
+
+	.uni-share-button-box {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		padding: 10px 15px;
+	}
+
+	.uni-share-button {
+		flex: 1;
+		border-radius: 50px;
+		color: #666;
+		font-size: 16px;
+	}
+
+	.uni-share-button::after {
+		border-radius: 50px;
+	}
+</style>

+ 294 - 0
components/updatepage/uni-popup/uni-popup.vue

@@ -0,0 +1,294 @@
+<template>
+	<view v-if="showPopup" class="uni-popup" :class="[popupstyle]" @touchmove.stop.prevent="clear">
+		<uni-transition v-if="maskShow" class="uni-mask--hook" :mode-class="['fade']" :styles="maskClass" :duration="duration" :show="showTrans" @click="onTap" />
+		<uni-transition :mode-class="ani" :styles="transClass" :duration="duration" :show="showTrans" @click="onTap">
+			<view class="uni-popup__wrapper-box" @click.stop="clear">
+				<slot />
+			</view>
+		</uni-transition>
+	</view>
+</template>
+
+<script>
+	import uniTransition from '../uni-transition/uni-transition.vue'
+	import popup from './popup.js'
+	/**
+	 * PopUp 弹出层
+	 * @description 弹出层组件,为了解决遮罩弹层的问题
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+	 * @property {String} type = [top|center|bottom] 弹出方式
+	 * 	@value top 顶部弹出
+	 * 	@value center 中间弹出
+	 * 	@value bottom 底部弹出
+	 * 	@value message 消息提示
+	 * 	@value dialog 对话框
+	 * 	@value share 底部分享示例
+	 * @property {Boolean} animation = [ture|false] 是否开启动画
+	 * @property {Boolean} maskClick = [ture|false] 蒙版点击是否关闭弹窗
+	 * @event {Function} change 打开关闭弹窗触发,e={show: false}
+	 */
+
+	export default {
+		name: 'UniPopup',
+		components: {
+			uniTransition
+		},
+		props: {
+			// 开启动画
+			animation: {
+				type: Boolean,
+				default: true
+			},
+			// 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
+			// message: 消息提示 ; dialog : 对话框
+			type: {
+				type: String,
+				default: 'center'
+			},
+			// maskClick
+			maskClick: {
+				type: Boolean,
+				default: true
+			}
+		},
+		provide() {
+			return {
+				popup: this
+			}
+		},
+		mixins: [popup],
+		watch: {
+			/**
+			 * 监听type类型
+			 */
+			type: {
+				handler: function(newVal) {
+					this[this.config[newVal]]()
+				},
+				immediate: true
+			},
+			/**
+			 * 监听遮罩是否可点击
+			 * @param {Object} val
+			 */
+			maskClick(val) {
+				this.mkclick = val
+			}
+		},
+		data() {
+			return {
+				duration: 300,
+				ani: [],
+				showPopup: false,
+				showTrans: false,
+				maskClass: {
+					'position': 'fixed',
+					'bottom': 0,
+					'top': 0,
+					'left': 0,
+					'right': 0,
+					'backgroundColor': 'rgba(0, 0, 0, 0.4)'
+				},
+				transClass: {
+					'position': 'fixed',
+					'left': 0,
+					'right': 0,
+				},
+				maskShow: true,
+				mkclick: true,
+				popupstyle: 'top'
+			}
+		},
+		created() {
+			this.mkclick = this.maskClick
+			if (this.animation) {
+				this.duration = 300
+			} else {
+				this.duration = 0
+			}
+		},
+		methods: {
+			clear(e) {
+				// TODO nvue 取消冒泡
+				e.stopPropagation()
+			},
+			open() {
+				this.showPopup = true
+				this.$nextTick(() => {
+					new Promise(resolve => {
+						clearTimeout(this.timer)
+						this.timer = setTimeout(() => {
+							this.showTrans = true
+							// fixed by mehaotian 兼容 app 端
+							this.$nextTick(() => {
+								resolve();
+							})
+						}, 50);
+					}).then(res => {
+						// 自定义打开事件
+						clearTimeout(this.msgtimer)
+						this.msgtimer = setTimeout(() => {
+							this.customOpen && this.customOpen()
+						}, 100)
+						this.$emit('change', {
+							show: true,
+							type: this.type
+						})
+					})
+				})
+			},
+			close(type) {
+				this.showTrans = false
+				this.$nextTick(() => {
+					this.$emit('change', {
+						show: false,
+						type: this.type
+					})
+					clearTimeout(this.timer)
+					// 自定义关闭事件
+					this.customOpen && this.customClose()
+					this.timer = setTimeout(() => {
+						this.showPopup = false
+					}, 300)
+				})
+			},
+			onTap() {
+				if (!this.mkclick) return
+				this.close()
+			},
+			/**
+			 * 顶部弹出样式处理
+			 */
+			top() {
+				this.popupstyle = 'top'
+				this.ani = ['slide-top']
+				this.transClass = {
+					'position': 'fixed',
+					'left': 0,
+					'right': 0,
+				}
+			},
+			/**
+			 * 底部弹出样式处理
+			 */
+			bottom() {
+				this.popupstyle = 'bottom'
+				this.ani = ['slide-bottom']
+				this.transClass = {
+					'position': 'fixed',
+					'left': 0,
+					'right': 0,
+					'bottom': 0
+				}
+			},
+			/**
+			 * 中间弹出样式处理
+			 */
+			center() {
+				this.popupstyle = 'center'
+				this.ani = ['zoom-out', 'fade']
+				this.transClass = {
+					'position': 'fixed',
+					/* #ifndef APP-NVUE */
+					'display': 'flex',
+					'flexDirection': 'column',
+					/* #endif */
+					'bottom': 0,
+					'left': 0,
+					'right': 0,
+					'top': 0,
+					'justifyContent': 'center',
+					'alignItems': 'center'
+				}
+			}
+		}
+	}
+</script>
+<style scoped>
+	.uni-popup {
+		position: fixed;
+		/* #ifndef APP-NVUE */
+		z-index: 99;
+		/* #endif */
+	}
+
+	.uni-popup__mask {
+		position: absolute;
+		top: 0;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		background-color: rgba(0, 0, 0, 0.4);
+		opacity: 0;
+	}
+
+	.mask-ani {
+		transition-property: opacity;
+		transition-duration: 0.2s;
+	}
+
+	.uni-top-mask {
+		opacity: 1;
+	}
+
+	.uni-bottom-mask {
+		opacity: 1;
+	}
+
+	.uni-center-mask {
+		opacity: 1;
+	}
+
+	.uni-popup__wrapper {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		position: absolute;
+	}
+
+	.top {
+		/* #ifdef H5 */
+		top: var(--window-top);
+		/* #endif */
+		/* #ifndef H5 */
+		top: 0;
+		/* #endif */
+	}
+
+	.bottom {
+		bottom: 0;
+	}
+
+	.uni-popup__wrapper-box {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		position: relative;
+		/* iphonex 等安全区设置,底部安全区适配 */
+		/* #ifndef APP-NVUE */
+		padding-bottom: constant(safe-area-inset-bottom);
+		padding-bottom: env(safe-area-inset-bottom);
+		/* #endif */
+	}
+
+	.content-ani {
+		/* transition: transform 0.3s;
+ */
+		transition-property: transform, opacity;
+		transition-duration: 0.2s;
+	}
+
+
+	.uni-top-content {
+		transform: translateY(0);
+	}
+
+	.uni-bottom-content {
+		transform: translateY(0);
+	}
+
+	.uni-center-content {
+		transform: scale(1);
+		opacity: 1;
+	}
+</style>

+ 279 - 0
components/updatepage/uni-transition/uni-transition.vue

@@ -0,0 +1,279 @@
+<template>
+	<view v-if="isShow" ref="ani" class="uni-transition" :class="[ani.in]" :style="'transform:' +transform+';'+stylesObject" @click="change">
+		<slot></slot>
+	</view>
+</template>
+
+<script>
+	// #ifdef APP-NVUE
+	const animation = uni.requireNativePlugin('animation');
+	// #endif
+	/**
+	 * Transition 过渡动画
+	 * @description 简单过渡动画组件
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=985
+	 * @property {Boolean} show = [false|true] 控制组件显示或隐藏
+	 * @property {Array} modeClass = [fade|slide-top|slide-right|slide-bottom|slide-left|zoom-in|zoom-out] 过渡动画类型
+	 *  @value fade 渐隐渐出过渡
+	 *  @value slide-top 由上至下过渡
+	 *  @value slide-right 由右至左过渡
+	 *  @value slide-bottom 由下至上过渡
+	 *  @value slide-left 由左至右过渡
+	 *  @value zoom-in 由小到大过渡
+	 *  @value zoom-out 由大到小过渡
+	 * @property {Number} duration 过渡动画持续时间
+	 * @property {Object} styles 组件样式,同 css 样式,注意带’-‘连接符的属性需要使用小驼峰写法如:`backgroundColor:red`
+	 */
+	export default {
+		name: 'uniTransition',
+		props: {
+			show: {
+				type: Boolean,
+				default: false
+			},
+			modeClass: {
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			duration: {
+				type: Number,
+				default: 300
+			},
+			styles: {
+				type: Object,
+				default () {
+					return {}
+				}
+			}
+		},
+		data() {
+			return {
+				isShow: false,
+				transform: '',
+				ani: {
+					in: '',
+					active: ''
+				}
+			};
+		},
+		watch: {
+			show: {
+				handler(newVal) {
+					if (newVal) {
+						this.open()
+					} else {
+						this.close()
+					}
+				},
+				immediate: true
+			}
+		},
+		computed: {
+			stylesObject() {
+				let styles = {
+					...this.styles,
+					'transition-duration': this.duration / 1000 + 's'
+				}
+				let transfrom = ''
+				for (let i in styles) {
+					let line = this.toLine(i)
+					transfrom += line + ':' + styles[i] + ';'
+				}
+				return transfrom
+			}
+		},
+		created() {
+			// this.timer = null
+			// this.nextTick = (time = 50) => new Promise(resolve => {
+			// 	clearTimeout(this.timer)
+			// 	this.timer = setTimeout(resolve, time)
+			// 	return this.timer
+			// });
+		},
+		methods: {
+			change() {
+				this.$emit('click', {
+					detail: this.isShow
+				})
+			},
+			open() {
+				clearTimeout(this.timer)
+				this.isShow = true
+				this.transform = ''
+				this.ani.in = ''
+				for (let i in this.getTranfrom(false)) {
+					if (i === 'opacity') {
+						this.ani.in = 'fade-in'
+					} else {
+						this.transform += `${this.getTranfrom(false)[i]} `
+					}
+				}
+				this.$nextTick(() => {
+					setTimeout(() => {
+						this._animation(true)
+					}, 50)
+				})
+
+			},
+			close(type) {
+				clearTimeout(this.timer)
+				this._animation(false)
+			},
+			_animation(type) {
+				let styles = this.getTranfrom(type)
+				// #ifdef APP-NVUE
+				if (!this.$refs['ani']) return
+				animation.transition(this.$refs['ani'].ref, {
+					styles,
+					duration: this.duration, //ms
+					timingFunction: 'ease',
+					needLayout: false,
+					delay: 0 //ms
+				}, () => {
+					if (!type) {
+						this.isShow = false
+					}
+					this.$emit('change', {
+						detail: this.isShow
+					})
+				})
+				// #endif
+				// #ifndef APP-NVUE
+				this.transform = ''
+				for (let i in styles) {
+					if (i === 'opacity') {
+						this.ani.in = `fade-${type?'out':'in'}`
+					} else {
+						this.transform += `${styles[i]} `
+					}
+				}
+				this.timer = setTimeout(() => {
+					if (!type) {
+						this.isShow = false
+					}
+					this.$emit('change', {
+						detail: this.isShow
+					})
+
+				}, this.duration)
+				// #endif
+
+			},
+			getTranfrom(type) {
+				let styles = {
+					transform: ''
+				}
+				this.modeClass.forEach((mode) => {
+					switch (mode) {
+						case 'fade':
+							styles.opacity = type ? 1 : 0
+							break;
+						case 'slide-top':
+							styles.transform += `translateY(${type?'0':'-100%'}) `
+							break;
+						case 'slide-right':
+							styles.transform += `translateX(${type?'0':'100%'}) `
+							break;
+						case 'slide-bottom':
+							styles.transform += `translateY(${type?'0':'100%'}) `
+							break;
+						case 'slide-left':
+							styles.transform += `translateX(${type?'0':'-100%'}) `
+							break;
+						case 'zoom-in':
+							styles.transform += `scale(${type?1:0.8}) `
+							break;
+						case 'zoom-out':
+							styles.transform += `scale(${type?1:1.2}) `
+							break;
+					}
+				})
+				return styles
+			},
+			_modeClassArr(type) {
+				let mode = this.modeClass
+				if (typeof(mode) !== "string") {
+					let modestr = ''
+					mode.forEach((item) => {
+						modestr += (item + '-' + type + ',')
+					})
+					return modestr.substr(0, modestr.length - 1)
+				} else {
+					return mode + '-' + type
+				}
+			},
+			// getEl(el) {
+			// 	console.log(el || el.ref || null);
+			// 	return el || el.ref || null
+			// },
+			toLine(name) {
+				return name.replace(/([A-Z])/g, "-$1").toLowerCase();
+			}
+		}
+	}
+</script>
+
+<style scoped>
+	.uni-transition {
+		transition-timing-function: ease;
+		transition-duration: 0.3s;
+		transition-property: transform, opacity;
+	}
+
+	.fade-in {
+		opacity: 0;
+	}
+
+	.fade-active {
+		opacity: 1;
+	}
+
+	.slide-top-in {
+		/* transition-property: transform, opacity; */
+		transform: translateY(-100%);
+	}
+
+	.slide-top-active {
+		transform: translateY(0);
+		/* opacity: 1; */
+	}
+
+	.slide-right-in {
+		transform: translateX(100%);
+	}
+
+	.slide-right-active {
+		transform: translateX(0);
+	}
+
+	.slide-bottom-in {
+		transform: translateY(100%);
+	}
+
+	.slide-bottom-active {
+		transform: translateY(0);
+	}
+
+	.slide-left-in {
+		transform: translateX(-100%);
+	}
+
+	.slide-left-active {
+		transform: translateX(0);
+		opacity: 1;
+	}
+
+	.zoom-in-in {
+		transform: scale(0.8);
+	}
+
+	.zoom-out-active {
+		transform: scale(1);
+	}
+
+	.zoom-out-in {
+		transform: scale(1.2);
+	}
+</style>

+ 371 - 0
components/updatepage/updatepage.vue

@@ -0,0 +1,371 @@
+<template>
+	<view :class="[AppTheme]">
+		<view class="download">
+			<uni-popup ref="popup" type="center">
+				<view class="upgrade">
+					<view class="logo">
+						<image src="./static/upgrade.png" mode="widthFix" />
+					</view>
+					<view class="content">
+						<view class="title">
+							<text>{{ upgrading ? '正在升级' : '发现新版本' + versionStr }}</text>
+						</view>
+						<view class="container">
+							<view class="descriptions">
+								<text>{{ upgrading ? '正在为您下载,请耐心等待' : '本次版本更新描述内容:' }}</text>
+							</view>
+							<view class="details" v-if="!upgrading">
+								<view class="item">
+									<u-parse :content="versions_desc"></u-parse>
+								</view>
+							</view>
+							<view v-else class="prpgroess"><progress :percent="downloadTime" active-mode="forwards"
+									activeColor="red" active stroke-width="4" show-info /></view>
+						</view>
+						<view v-if="!upgrading" class="btn-group">
+							<view class="cancel" @click="hiddenUppop"><text>取 消</text></view>
+							<view class="confirm bg-primary" @click="upgradeEvent"><text>确 定</text></view>
+						</view>
+						<view v-else class="btn-group">
+							<view v-if="!isForceUpgrade" class="cancel" @click="abortDownload"><text>取消下载</text></view>
+							<view v-if="!isForceUpgrade" class="confirm bg-primary" @click="hiddenUpgradeEvent">
+								<text>后台下载</text>
+							</view>
+						</view>
+					</view>
+				</view>
+			</uni-popup>
+		</view>
+	</view>
+</template>
+
+<script>
+	import Vue from 'vue';
+	import uniPopup from './uni-popup/uni-popup.vue';
+	import uniPopupMessage from './uni-popup/uni-popup-message.vue';
+	import uniPopupDialog from './uni-popup/uni-popup-dialog.vue';
+	import update from "@/api/update/index.js"
+	export default {
+		props: {
+			isUpdate: false
+		},
+		data: () => ({
+			tempFilePaths: '',
+			// 版本代码
+			versionCode: 28,
+			// 版本字符串
+			versionStr: '1.0.0530',
+			// 是否更新
+			upgrading: false,
+			// 下载时间
+			downloadTime: 0,
+			// 定时器
+			timer: null,
+			// 是否强制更新
+			isForceUpgrade: false,
+			// 下载任务
+			downloadTask: null,
+			// 下载地址
+			downloadUrl: '',
+			//版本更新内容
+			versions_desc: '系统优化已知问题',
+			settingFile: getApp().globalData.siteinfo,
+		}),
+		// 使用的组件
+		components: {
+			uniPopup,
+			uniPopupMessage,
+			uniPopupDialog
+		},
+		mounted() {
+			let _this = this;
+			_this.init(_this.isUpdate)
+		},
+		methods: {
+			init(_isUpdate, fun) {
+				let _this = this;
+				const res = uni.getSystemInfoSync();
+				if (res.platform == 'android') {
+					let _this = this;
+					if (_isUpdate) {
+						update.download_link({
+								platform: 'android'
+							}).then(res => {
+								if (res.status == 1) {
+									plus.runtime.getProperty(plus.runtime.appid, function(inf) {
+										if (inf.version !== res.data.version_number) {
+											_this.$refs.popup.open();
+											_this.downloadUrl = res.data.link;
+											_this.versionStr = res.data.version_number;
+											_this.versions_desc = res.data.content
+											_this.versions_desc = _this.versions_desc.replace(/\<img src="/gi,
+												`<img style='width:100%;display:block' src="${_this.settingFile.root_rich_img}`
+											);
+										} else {
+											if (fun) {
+												fun();
+											}
+										}
+									});
+								}
+							})
+							.catch(error => {
+								console.log(error, "失败了")
+							});
+					}
+				} else if (res.platform == 'ios') {}
+
+			},
+			// 取消更新
+			hiddenUppop() {
+				this.$store.commit('changeUpdate', false);
+				this.$refs.popup.close();
+			},
+			// 检测更新
+			upgrade() {
+				let _this = this;
+				_this.init(true, function() {
+					uni.showToast({
+						title: '恭喜您的应用是最新版本!',
+						duration: 2000,
+						icon: 'none'
+					});
+				})
+			},
+			// 点击更新
+			upgradeEvent() {
+				this.$store.commit('changeUpdate', false);
+				if (!this.upgrading) {
+					let versionInfo = this.getVersionAndPlatform();
+					// 如果是正式更新需要打开下面这行注释
+					// 这里只是做了简单的判断
+					// 这里可以更据平台来下载
+					// -------------------------
+					console.log('versionInfo',versionInfo)
+					if (versionInfo) {
+						this.upgrading = true;
+						// 如果是强制更新
+						this.isForceUpgrade = true;
+						// 正式下载请打开这里的注释
+						this.downloadApplications();
+					}
+					// -----------------------
+				}
+			},
+			// 后台下载
+			hiddenUpgradeEvent() {
+				this.$store.commit('changeUpdate', false);
+				this.$refs.popup.close();
+			},
+			// 检测平台和当前app版本号
+			getVersionAndPlatform() {
+				// 这里try-catch是因为,当前代码是在浏览器上调试的
+				// 由于浏览器不支持所以加了try-catch
+				// 你也可以加这个玩意
+				// #ifdef APP-PLUS
+
+				// #endif
+				// 你可以删除
+				try {
+					// 获取版本号
+					let version = plus.runtime.version;
+					// 获取当前平台
+					// - Android
+					// - Ios
+					// 两种平台
+					let platform = plus.os.name;
+					return {
+						version: version,
+						platform: platform
+					};
+				} catch {
+					console.error('当前平台不支持5+SDK!');
+				}
+			},
+			// 下载
+			downloadApplications() {
+				let that = this;
+				// 建立下载任务
+				that.downloadTask = uni.downloadFile({
+					// 下载地址
+					url: that.downloadUrl,
+					success: res => {
+						console.log('res',res)
+						if (res.statusCode === 200) {
+							// 把当前app保存下载
+							let tempFilePaths = res.tempFilePath
+							uni.saveFile({
+								tempFilePath: tempFilePaths,
+								success: resp => {
+									// 保存成功
+									var savedFilePath = resp.savedFilePath;
+									const installPath = plus.io.convertLocalFileSystemURL(
+										savedFilePath);
+									// 安装
+									that.installApplications({
+										filePath: installPath,
+										success: res => {
+											that.$store.commit('changeUpdate', false);
+											that.$refs.popup.close();
+											plus.nativeUI.alert("应用资源更新完成!",
+												function() {
+													plus.runtime.restart();
+												});
+										},
+										error: err => {
+											that.$refs.popup.close();
+											that.upgrading = false;
+											that.$api.msg(err);
+										}
+									});
+								},
+								fail: err => {
+									// 保存失败
+									that.upgrading = false;
+									that.$refs.popup.close();
+									that.$api.msg(err);
+								}
+							});
+						}
+					}
+				});
+
+				that.downloadTask.onProgressUpdate(res => {
+					// 下载进度
+					that.downloadTime = res.progress;
+				});
+			},
+			// 取消下载
+			abortDownload() {
+				let that = this;
+				that.downloadTime = 0;
+				if (that.$refs.popup) {
+					that.$refs.popup.close();
+					setTimeout(() => {
+						that.upgrading = false;
+					}, 200)
+				}
+				clearInterval(that.timer);
+				if (that.downloadTask) {
+					that.downloadTask.abort();
+				}
+			},
+			//安装
+			installApplications({
+				filePath,
+				success,
+				error
+			}) {
+				let that = this;
+				plus.runtime.install(filePath, {
+					force: that.isForceUpgrade
+				}, success, error);
+			}
+		},
+		computed: {},
+		watch: {}
+	};
+</script>
+
+<style>
+	.scroll-view_H {
+		hight: 400rpx;
+	}
+
+	.download .logo {
+		width: 208rpx;
+	}
+
+	.cancel {
+		background-color: #cbcbcb;
+	}
+
+	.download .upgrade {
+		position: relative;
+		background: #fff;
+		width: 680rpx;
+		min-height: 400rpx;
+		border-radius: 20rpx;
+	}
+
+	.download .logo image {
+		width: 208rpx;
+		position: absolute;
+		top: -80rpx;
+		left: 0;
+		right: 0;
+		margin: 0 auto;
+	}
+
+	.download .content {
+		padding-top: 80rpx;
+	}
+
+	.download .content .title {
+		text-align: center;
+		font-size: 30rpx;
+		font-weight: bold;
+	}
+
+	.download .content .container {
+		color: #666;
+		overflow-y: scroll;
+		min-height: 200rpx;
+	}
+
+	.download .content .container .descriptions {
+		padding: 15rpx 30rpx;
+		text-align: center;
+		font-size: 28rpx;
+	}
+
+	.download .content .container .details {
+		/* max-height:300rpx; */
+		/* overflow: auto; */
+		/* word-wrap:break-word; */
+	}
+
+	,
+	.download .content .container .details .item {
+		padding: 20rpx;
+		max-height: 500rpx;
+		overflow-y: scroll;
+		font-size: 30rpx;
+	}
+
+	,
+	.download .content .prpgroess {
+		padding: 16rpx 46rpx;
+		box-sizing: border-box;
+		font-size: 24rpx;
+	}
+
+	.download .content .prpgroess {
+		padding: 16rpx 22rpx;
+		margin: 20rpx 0;
+	}
+
+	.download .content .btn-group {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		padding-bottom: 25rpx;
+	}
+
+	.download .content .btn-group view {
+		width: 200rpx;
+		height: 70rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		margin: 14rpx;
+		font-size: 28rpx;
+		border-radius: 42rpx;
+		line-height: 70rpx;
+	}
+
+	.download .content .btn-group view:last-child {
+		/* 		background: #ef5656; */
+		color: #fff;
+	}
+</style>

+ 253 - 0
components/waterfall/waterfall-item.vue

@@ -0,0 +1,253 @@
+<template>
+	<view class="waterfall-item-container">
+		<view class="waterfall-item" @tap="onTap">
+			<image :src="params.pic||default_img" mode="widthFix" @load="emitHeight" @error="emitHeight" lazy-load>
+			</image>
+			<view class="demo-title" :style="goodtitle_style">
+				{{params.name}}
+			</view>
+			<view class="message_bot">
+				<view class="f_left">
+					<view class="color_org text-neutral" :style='goodprice_style'>
+						{{ params.price }}元/{{ params.unit }}
+					</view>
+					<view class="old_price" :style='goodoprice_style'>原价:{{ params.oprice }}元</view>
+				</view>
+				<view class="f_right">
+					<u-icon name="shopping-cart-fill" :color="primary" size="30"></u-icon>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "helang-waterfall",
+		props: {
+			params: {
+				type: Object,
+				default () {
+					return {}
+				}
+			},
+			tag: {
+				type: String | Number,
+				default: ''
+			},
+			index: {
+				type: Number,
+				default: -1
+			},
+			datas: {
+				type: Object,
+				default: ''
+			}
+		},
+		data() {
+			let siteinfo = getApp().globalData.siteinfo;
+			const img = siteinfo.root_img + '/static/app/imgs/default-goods.png';
+			return {
+				default_img: img,
+				primary: this.$theme.primary,
+			};
+		},
+		computed: {
+			/** 副标题内容 */
+			title() {
+				return this.datas.title || '';
+			},
+			img_style2() {
+				return `
+				width:15px;
+				height:15px;
+				margin:auto;
+				`;
+			},
+			// 副标题栏样式
+			title_style() {
+				const {
+					text_size,
+					text_color,
+				} = this.datas;
+				return `
+			    font-size: ${text_size}px;
+			    color: ${text_color};
+			`;
+			},
+			// 副标题栏样式
+			title_style1() {
+				const {
+					text_size,
+				} = this.datas;
+				return `
+				color:rgb(96, 98, 102);
+			    font-size: ${text_size}px;
+			`;
+			},
+			// 商品标题
+			goodtitle_style() {
+				if (!this.datas.good_text_size) {
+					this.datas.good_text_size = 15;
+				}
+				const {
+					good_text_size,
+					good_text_color
+				} = this.datas;
+				return `
+			   font-size: ${good_text_size*2}rpx;
+			   line-height: 40rpx;
+			   color: ${good_text_color};
+			`;
+			},
+			// 商品价格
+			goodprice_style() {
+				const {
+					shop_price_color,
+				} = this.datas;
+				return `
+			    color: ${shop_price_color};
+			`;
+			},
+			// 商品价格
+			goodoprice_style() {
+				const {
+					market_price_color,
+				} = this.datas;
+				return `
+			    color: ${market_price_color};
+			`;
+			},
+			// 商品图标
+			goodiocn_style() {
+				const {
+					buynow_bg_color,
+				} = this.datas;
+				return `
+				font-size: 25px;
+			    color: ${buynow_bg_color};
+			`;
+			},
+			/** 样式 */
+			wrapper_style() {
+				const {
+					padding_top,
+					padding_bottom,
+					padding_left,
+					padding_right,
+					margin_top,
+					margin_bottom,
+					bg_color,
+				} = this.datas;
+				return `
+				    width: 100%;
+					background-color:${bg_color};
+				    padding-top: ${margin_top}px;
+				    padding-bottom: ${margin_bottom}px;
+				    padding-left: ${padding_left}px;
+				    padding-right: ${padding_right}px;
+				`;
+			},
+
+			// 商品列表
+			list() {
+				let list = this.list2;
+				if (!list || list.length <= 0) {
+					list = this.datas.goods || [];
+				}
+				return list;
+			},
+		},
+		methods: {
+			// 发出组件高度信息,在此处可以区分正确和错误的加载,给予错误的提示图片
+			emitHeight(e) {
+				const query = uni.createSelectorQuery().in(this);
+				query.select('.waterfall-item-container').boundingClientRect(data => {
+					let height = Math.floor(data.height);
+					this.$emit("height", height, this.$props.tag);
+				}).exec();
+			},
+			onTap() {
+				this.$emit("click", this.$props.index, this.$props.tag);
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.demo-title {
+		padding: 0rpx 16rpx 0rpx 16rpx;
+		font-size: 26rpx;
+		margin-top: 15rpx;
+		color: $u-main-color;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		display: -webkit-box;
+		-webkit-line-clamp: 2;
+		line-height: 40rpx;
+		-webkit-box-orient: vertical;
+	}
+
+	.message_bot {
+		padding: 0rpx 16rpx 0rpx 16rpx;
+		border-top: 1px solid #f3f3f3;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding-top: 10rpx;
+		margin-top: 5rpx;
+
+		.f_left {
+			.color_org {
+				font-size: 28rpx;
+			}
+
+			.old_price {
+				padding: 10rpx 0rpx 10rpx 4rpx;
+				color: #999;
+				font-size: 22rpx;
+				text-decoration: line-through;
+			}
+		}
+
+		.f_right {}
+	}
+
+	.waterfall-item {
+		// padding: 16rpx;
+		background-color: #fff;
+		border-radius: 4px;
+		font-size: 28rpx;
+		color: #666;
+
+		image {
+			display: block;
+			width: 100%;
+			height: 350rpx;
+			border-top-left-radius: 15rpx;
+			border-top-right-radius: 15rpx;
+		}
+
+		.content {
+			margin-top: 16rpx;
+
+			.money {
+				color: #fa3534;
+				margin-top: 8rpx;
+			}
+
+			.label {
+				background-color: #fa3534;
+				color: #fff;
+				font-size: 20rpx;
+				padding: 4rpx 16rpx;
+				border-radius: 20rpx;
+			}
+
+			.shop-name {
+				font-size: 20rpx;
+				color: #999;
+			}
+		}
+	}
+</style>

+ 243 - 0
components/waterfall/waterfall-list.vue

@@ -0,0 +1,243 @@
+<template>
+	<view>
+		<view class="waterfall-box h-flex-x h-flex-2">
+			<view>
+				<view v-for="(item,index) in leftList" :key="item._render_id" class="list-item show">
+					<helang-waterfall-item :datas="datas" :params="item" tag="left" :index="index" @height="onHeight"
+						@click="onClick">
+					</helang-waterfall-item>
+				</view>
+			</view>
+			<view>
+				<view v-for="(item,index) in rightList" :key="item._render_id" class="list-item show">
+					<helang-waterfall-item :datas="datas" :params="item" @height="onHeight" @click="onClick" tag="right"
+						:index="index"></helang-waterfall-item>
+				</view>
+			</view>
+		</view>
+		<view class="load-txt" v-if="statusText">{{statusText}}</view>
+	</view>
+</template>
+
+<script>
+	import helangWaterfallItem from "./waterfall-item.vue"
+
+	export default {
+		components: {
+			"helang-waterfall-item": helangWaterfallItem
+		},
+		props: {
+			// 组件状态
+			status: {
+				type: String,
+				default: ''
+			},
+			// 只显示一行
+			showlineText: {
+				type: String,
+				default: ''
+			},
+			// 等待加载文案
+			awaitText: {
+				type: String,
+				default: '上拉加载更多'
+			},
+			// 加载中文案
+			loadingText: {
+				type: String,
+				default: '加载中'
+			},
+			// 加载成功文案,一般与加载中保持一致即可,主要为提示组件可以开始渲染了
+			successText: {
+				type: String,
+				default: '加载中'
+			},
+			// 加载结束文案,用于没有更多数据时候展示
+			finishText: {
+				type: String,
+				default: '没有更多了'
+			},
+			// 加载失败文案,用于数据获取异常时展示
+			failText: {
+				type: String,
+				default: '加载失败'
+			},
+			// 待渲染的数据
+			list: {
+				type: Array,
+				default () {
+					return [];
+				}
+			},
+			// 重置列表,设置为 true 时,瀑布流会自动重新渲染列表
+			reset: {
+				type: Boolean,
+				default: false
+			},
+			datas: {
+				type: Object,
+				default: ''
+			}
+		},
+		watch: {
+			"$props.status"(newValue, oldValue) {
+				// 状态变更为 加载成功 时,执行瀑布流数据渲染	
+				if (newValue == 'success' || newValue == 'await' || newValue == 'showline') {
+					if (!this.$props.list || this.$props.list.length < 1) {
+						console.log('河浪瀑布流插件提示:当前数据无效');
+						return;
+					}
+
+					// 若本次渲染为 重置 则先恢复组件的默认参数
+					if (this.$props.reset) {
+						this.leftHeight = 0;
+						this.rightHeight = 0;
+						this.leftList = [];
+						this.rightList = [];
+						this.awaitRenderList = [];
+						// 当前展示页码数据
+						this.showPage = 1;
+					}
+
+					this.awaitRenderList = [...this.$props.list];
+
+					this.renderList();
+				}
+			}
+		},
+		computed: {
+			statusText() {
+				if (!this.$props.status) {
+					return false;
+				}
+				let key = `${this.$props.status}Text`;
+				return this.$props[key] || false;
+			}
+		},
+		data() {
+			return {
+				// 左侧列表高度
+				leftHeight: 0,
+				// 右侧列表高度
+				rightHeight: 0,
+				// 左侧列表数据
+				leftList: [],
+				// 右侧列表数据
+				rightList: [],
+				// 待渲染列表
+				awaitRenderList: [],
+				// 当前展示页码数据
+				showPage: 1
+			}
+		},
+		methods: {
+			// 监听高度变化
+			onHeight(height, tag) {
+				/**
+				 * 这个为实际渲染后 CSS 中 margin-buttom 的值,本示例默认为20rpx
+				 * 用于解决实际渲染后因为数据条数关系,高度差计算偏差的问题
+				 * */
+				let marginBottom = uni.upx2px(20);
+
+				// console.log(`左高:${this.leftHeight},右高:${this.rightHeight},当前高:${height},插入方向:${tag}`)
+
+				if (tag == 'left') {
+					this.leftHeight += (height + marginBottom);
+				} else {
+					this.rightHeight += (height + marginBottom);
+				}
+				this.renderList();
+			},
+			// 组件点击事件
+			onClick(index, tag) {
+				// 对应的数据
+				if (tag == 'left') {
+					this.$emit("click", this.leftList[index], index, tag);
+				} else {
+					this.$emit("click", this.rightList[index], index, tag);
+				}
+			},
+			// 渲染列表,这里实现瀑布流的左右分栏
+			renderList() {
+				// 待渲染长度为 0 时表示已渲染完成
+				if (this.awaitRenderList.length < 1) {
+					this.showPage++;
+					this.$emit("done");
+
+					// 为防止 js 数值类型最大值溢出,当高度值大于 1亿时重置高度
+					if (this.leftHeight > 100000000) {
+						if (this.leftHeight > this.rightHeight) {
+							this.leftHeight = 2;
+							this.rightHeight = 1;
+						} else {
+							this.leftHeight = 1;
+							this.rightHeight = 2;
+						}
+					}
+					return;
+				}
+				let item = {
+					...this.awaitRenderList.splice(0, 1)[0],
+					// 当前数据添加当前页面标识
+					_current_page: this.showPage,
+					// 当前数据添加一个渲染id,解决 v-for 重复会出现不执行 load 的 BUG
+					_render_id: new Date().getTime()
+				};
+				if (this.leftHeight > this.rightHeight) {
+					this.rightList.push(item);
+				} else {
+					this.leftList.push(item);
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.waterfall-box {
+		padding: 20rpx 10rpx;
+		box-sizing: border-box;
+
+		>view {
+			padding: 0 10rpx;
+		}
+
+		.list-item {
+			margin-bottom: 0;
+			// 设置透明,默认是可视的
+			opacity: 0;
+			// 默认超出隐藏,不影响加载中的文字显示效果
+			overflow: hidden;
+			height: 0;
+
+			&.show {
+				margin-bottom: 20rpx;
+				opacity: 1;
+				overflow: auto;
+				height: auto;
+			}
+		}
+	}
+
+	.h-flex-x {
+		display: flex;
+		flex-direction: row;
+		flex-wrap: nowrap;
+		justify-content: flex-start;
+		align-items: flex-start;
+		align-content: flex-start;
+
+		&.h-flex-2 {
+			>view {
+				width: 50%;
+			}
+		}
+	}
+
+	.load-txt {
+		padding: 0 0 20rpx 0;
+		text-align: center;
+		color: #999;
+		font-size: 24rpx;
+	}
+</style>

+ 318 - 0
components/wxinfo/wxinfo.vue

@@ -0,0 +1,318 @@
+<template>
+	<view>
+		<u-modal :show="showAuthorizeUser" :show-title="false" :show-confirm-button="false">
+			<view class="slot-content">
+				<div class="auth-card">
+					<div class="img">
+						<img class="avatar-img" :src="logo" mode="widthFix">
+					</div>
+					<div class="title">{{bname}}</div>
+					<div class="content">邀请您补全个人信息<br></br>(昵称、头像)</div>
+					<div style="margin-left: 100rpx;margin-right: 100rpx">
+						<u-form :model="user" ref="uForm">
+							<u-form-item label="头像">
+								<view style="width:300rpx; height: 100rpx;">
+									<button class="avatar-wrapper" open-type="chooseAvatar"
+										@chooseavatar="onChooseAvatar" slot="right">
+										<image class="avatar" :src="user.headimgurl"></image>
+									</button>
+								</view>
+							</u-form-item>
+							<u-form-item label="昵称">
+								<input type="nickname" class="weui-input" @blur="userNameInput" placeholder="请输入昵称" />
+							</u-form-item>
+						</u-form>
+					</div>
+				</div>
+				<div class="auth-btncard">
+					<div class="btn-unok">
+						<u-button :hair-line='false' :custom-style="customStyleUnOk" @click="showAuthorizeUser=false">
+							拒绝</u-button>
+					</div>
+					<div class="btn-ok">
+						<u-button :hair-line='false' :custom-style="customStyleOk" @click="authUser"> 允许</u-button>
+					</div>
+				</div>
+			</view>
+		</u-modal>
+	</view>
+</template>
+
+<script>
+	import loginApi from '@/api/login/login.js';
+	import mineApi from '@/api/mine/index.js';
+	export default {
+		name: "nologin",
+		props: [],
+		data() {
+			return {
+				user: {
+					headimgurl: 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0',
+					nickname: '',
+				},
+				hasUserInfo: false,
+				logo: '',
+				// 用户基本信息
+				userInfo: null,
+				// 微信,支付宝用户code
+				code: '',
+				// 是否弹出登录注册授权弹窗
+				showAuthorizeUser: false,
+				showAuthorizePhone: false,
+			};
+		},
+		methods: {
+			open() {
+				if (this.$config.shop && this.$config.shop.logo) {
+					this.logo = this.$config.shop.logo
+				} else {
+					this.logo = this.user.headimgurl
+				}
+				this.showAuthorizeUser = true
+			},
+			//获取昵称输入内容
+			userNameInput(e) {
+				this.user.nickname = e.detail.value
+			},
+			onChooseAvatar(e) {
+				let that = this;
+				that.user.headimgurl = e.detail.avatarUrl;
+				console.log('this.user.headimgurl1', this.user.headimgurl)
+				uni.getFileSystemManager().readFile({
+					filePath: that.user.headimgurl, //选择图片返回的相对路径
+					encoding: 'base64', //编码格式
+					success: v => {
+						//成功的回调
+						let base64 = 'data:image/jpeg;base64,' + v
+							.data; // 返回的是没有 'data:image/jpeg;base64,'头的数据, 有需要可自行追加上
+						mineApi.addheadimg({
+								pic: base64
+							})
+							.then(res => {
+								if (res.status == 200) {
+									that.user.headimgurl = res.data;
+									console.log('that.user.headimgurl2', that.user.headimgurl)
+								}
+
+							});
+					}
+				});
+			},
+			chooseAvatar() {
+				let that = this;
+
+				function guid2() {
+					function S4() {
+						return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
+					}
+					return S4() + S4() + '-' + S4() + '-' + S4() + '-' + S4() + '-' + S4() + S4() + S4();
+				}
+				let token = uni.getStorageSync('token') || '';
+				let timestamp = parseInt(new Date().getTime() / 1000);
+				let sign = 'getSign'(data);
+				let uniqueid = guid2();
+				uni.chooseImage({
+					count: 1, //默认9
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					success: function(res) {
+						console.log(res, 'resresres')
+						uni.getFileSystemManager().readFile({
+							filePath: res.tempFilePaths[0], //选择图片返回的相对路径
+							encoding: 'base64', //编码格式
+							success: v => {
+								//成功的回调
+								let base64 = 'data:image/jpeg;base64,' + v
+									.data; // 返回的是没有 'data:image/jpeg;base64,'头的数据, 有需要可自行追加上
+								mineApi.addheadimg({
+										pic: base64
+									})
+									.then(res => {
+										if (res.status == 200) {
+											this.user.headimgurl = res.data;
+										}
+
+									});
+							}
+						});
+					}
+				});
+			},
+			authUser() {
+				let that = this;
+				let userInfo = uni.getStorageSync('userInfo')
+				if (that.user.nickname == '') {
+					that.$api.msg('请输入您的昵称!');
+					return;
+				}
+				userInfo.headimgurl = that.user.headimgurl;
+				userInfo.nickname = that.user.nickname;
+				that.userInfo = userInfo;
+				uni.setStorageSync('userInfo', userInfo)
+				that.user.id = userInfo.id;
+				loginApi.upuserinfo(that.user).then(res => {
+					if (res.status == 200) {
+						that.hasUserInfo = true;
+						that.showAuthorizeUser = false;
+						that.$emit('loginback');
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						})
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.auth-btncard {
+		.btn-unok {
+			width: 50%;
+			float: left;
+		}
+
+		.btn-ok {
+			width: 50%;
+			float: left;
+			margin: 0;
+			padding: 0;
+			border: 0px solid transparent; //自定义边框
+			outline: none; //消除默认点击蓝色边框效果
+
+			u-button {
+				margin: 0;
+				padding: 0;
+				border: 0px solid transparent; //自定义边框
+				outline: none; //消除默认点击蓝色边框效果
+			}
+		}
+	}
+
+	.auth-card {
+		text-align: center;
+
+		.avatar-img {
+			width: 150rpx;
+			height: 150rpx;
+			overflow: hidden;
+			border-radius: 100%;
+			margin-top: 30rpx;
+		}
+
+		.title {
+			font-size: 20rpx;
+		}
+
+		.content {
+			margin-top: 10rpx;
+		}
+	}
+
+	.mine_box {
+		height: 360upx;
+		color: #fff;
+		// background-color: $primarycolor;
+
+		.avatar-img {
+			width: 150rpx;
+			height: 150rpx;
+			overflow: hidden;
+			border-radius: 100%;
+			/*margin-right: 40rpx;*/
+		}
+
+		.avatar_box {
+			position: relative;
+			width: 150rpx;
+			height: 150rpx;
+			overflow: hidden;
+			border-radius: 100%;
+			margin-right: 40rpx;
+
+			.avatar-img {
+				width: 100%;
+				height: 100%;
+				/* #ifdef MP-WEIXIN*/
+				width: 150rpx;
+				height: 150rpx;
+				/* #endif */
+			}
+
+			.get_user_data {
+				z-index: 11;
+				opacity: 0;
+				width: 100%;
+				height: 100%;
+				position: absolute;
+				left: 0;
+				top: 0;
+			}
+		}
+
+		.nick-name-box {
+			height: 100%;
+		}
+
+		.user-nickName {
+			font-size: 40rpx;
+			color: #fff;
+			margin-bottom: 20rpx;
+		}
+
+		.shiming_box {
+			border-radius: 10upx;
+			font-size: 28upx;
+			padding: 10upx 20upx;
+			background-color: rgba(15, 77, 139, 0.5);
+
+			.icon-shezhi {
+				margin-right: 10rpx;
+				margin-top: 5rpx;
+			}
+		}
+	}
+
+	.authorize-box {
+		background-color: transparent;
+		text-align: center;
+
+		.authorize-avatar {
+			width: 200rpx;
+			height: 200rpx;
+		}
+
+		.authorize-btn {
+			position: relative;
+			top: 40rpx;
+		}
+	}
+
+	/deep/.u-mode-center-box {
+		background-color: transparent !important;
+	}
+</style>
+<style>
+	.avatar-wrapper {
+		width: 150rpx;
+		height: 100rpx;
+		color: #333 !important;
+		text-align: center !important;
+		border: none !important;
+		border-radius: 0 !important;
+		background-color: transparent !important;
+	}
+
+	.avatar-wrapper::after {
+		border: none !important;
+	}
+
+	.avatar {
+		margin-right: 50rpx;
+		width: 100rpx;
+		height: 100rpx;
+		overflow: hidden;
+		border-radius: 100%;
+	}
+</style>

+ 1163 - 0
components/yfs-video/yfs-video.vue

@@ -0,0 +1,1163 @@
+<template>
+	<view class="bbl-content">
+		<view class="uni-padding-wrap uni-common-mt">
+			<view class="bbl-content_video">
+				<!-- #ifdef H5 -->
+				<EasyPlayer v-model="videoUrl" :muted="muted" ref="easyPlayer" live :reconnection="true"></EasyPlayer>
+				<!-- #endif -->
+				<!-- #ifndef H5 -->
+				<video id="myVideo" :src="videoUrl" :autoplay="autoplay" :muted="muted" :loop="loop"
+					:initial-time="initialtime" :duration="duration" :controls="controls"
+					:show-center-play-btn="showcenterplaybtn" :danmu-list="danmuList" :enable-danmu="enabledanmu"
+					:page-gesture="pagegesture" :direction="90" :show-play-btn="false" :show-fullscreen-btn="true"
+					:objectFit="objectFit" :poster="poster" :enable-progress-gesture="false"
+					:enable-play-gesture="enableplaygesture" :videoTitle="videoTitle" @play="Clickplay"
+					@pause="Clickpause" @error="videoErrorCallback" @ended="Clickended" @timeupdate="Clicktimeupdate"
+					@loadedmetadata="loadedmetadata" @fullscreenchange="Clickfullscreenchange" @waiti="Clickwaitin"
+					@click="clk" @waiting="waiting">
+					<!--顶部栏 竖屏-->
+
+					<view class="video-control" v-if="isMenu && showLeftBack" @tap.stop>
+						<view class="video-control-back" @tap.native.stop="backup">
+							<cover-image :src="settingFile.root_img+'/static/app/yfs-video/backup.png'"></cover-image>
+						</view>
+						<view class="video-control-text" v-if="isFullScree" @tap.native.stop="backup">
+							{{ ResVideoTitle }}
+						</view>
+						<view class="video-control-more" v-if="isFullScree">
+							<cover-image :src="settingFile.root_img+'/static/app/yfs-video/more.png'"></cover-image>
+						</view>
+					</view>
+					<!--全屏左侧锁定-->
+					<view class="video-hz-lock" v-if="isFullScree && isMenu" @tap.native.stop="lock">
+						<cover-image :src="srcLock"></cover-image>
+					</view>
+					<!--全屏右侧截屏-->
+					<!-- <view class="video-hz-jp" @tap.native.stop="tapImg">
+							<cover-image :src="srcLock"></cover-image>
+						</view> -->
+					<!--底部栏 竖屏 非全屏-->
+					<view class="video-control-bottom" v-if="isMenu && !isFullScree" @tap.native.stop>
+						<!--播放暂停区域-->
+						<view class="video-control-bottom-playOrPause" @tap.native.stop="playPause">
+							<cover-image :src="playOrPauseSrc" mode="aspectFit"></cover-image>
+						</view>
+						<!--时间区域-->
+						<view class="video-control-bottom-time">{{ currtime }}/{{ druation }}</view>
+						<!--进度条区域-->
+						<view class="video-control-bottom-bar" :style="[{ width: dotBaseWidth + 'rpx' }]">
+							<!--灰色进度条区域-->
+							<view class="video-control-bottom-bar-gray">
+								<!--动态有进度进度条区域-->
+								<view class="video-control-bottom-bar-color" :style="[{ width: dotSlide + 'rpx' }]">
+								</view>
+							</view>
+							<view class="video-control-bottom-bar-dot" :style="[{ left: dotSlide + 'rpx' }]"
+								@touchmove.stop.prevent="moveDot" @touchstart="touchstartDot" @touchend="touchendDot">
+								<view class="video-control-bottom-bar-dot-pad"></view>
+							</view>
+						</view>
+						<!--全屏按钮区域-->
+						<view class="video-control-bottom-fullScree" @tap.native.stop="fullscree">
+							<cover-image :src="settingFile.root_img+'/static/app/yfs-video/full.png'"></cover-image>
+						</view>
+					</view>
+					<!--底部栏 竖屏 全屏-->
+					<view class="video-control-bottom" v-if="isMenu && isFullScree" @tap.stop>
+						<!--播放暂停区域-->
+						<view class="video-control-bottom-playOrPause" @tap.native.stop="playPause">
+							<cover-image :src="playOrPauseSrc" mode="aspectFit"></cover-image>
+						</view>
+						<!--时间区域-->
+						<view class="video-control-bottom-time">{{ currtime }}/{{ druation }}</view>
+						<!--进度条区域-->
+						<view class="video-control-bottom-bar" :style="[{ width: dotBaseWidth + 'rpx' }]">
+							<!--灰色进度条区域-->
+							<view class="video-control-bottom-bar-gray">
+								<!--动态有进度进度条区域-->
+								<view class="video-control-bottom-bar-color" :style="[{ width: dotSlide + 'rpx' }]">
+								</view>
+							</view>
+							<view class="video-control-bottom-bar-dot" :style="[{ left: dotSlide + 'rpx' }]"
+								@touchmove.stop.prevent="moveDot" @touchstart="touchstartDot" @touchend="touchendDot">
+								<view class="video-control-bottom-bar-dot-pad"></view>
+							</view>
+						</view>
+						<view class="video-fullScree-speed" @tap.native.stop="showSwitchRate">x {{ currentRate }}
+						</view>
+						<!--全屏按钮区域-->
+						<view class="video-control-bottom-fullScree" @tap.native.stop="fullscree">
+							<cover-image :src="settingFile.root_img+'/static/app/yfs-video/exitfull.png'"></cover-image>
+						</view>
+					</view>
+					<!--上顶菜单栏-->
+					<view class="multi-list rate" :class="{ active: rateShow }" @tap.native.stop>
+						<view v-for="(item, index) in ['0.5', '0.8', '1.0', '1.25', '1.5']" :key="index"
+							class="multi-item rate" :data-rate="item" @tap="switchRate"
+							:class="{ active: item == currentRate }">
+							{{ item }}
+						</view>
+					</view>
+				</video>
+				<!-- #endif -->
+				<view v-if="hasptz==1" class="outer-ring">
+					<view class="control-wrapper">
+						<view @touchstart="PtzCtrl(1,'ptz1')" id="ptz1" @touchend="onMouseOut('ptz1')"
+							:class="ptzid=='ptz1'?'control-btn control-top selectbtn':'control-btn control-top'"></view>
+						<view @touchstart="PtzCtrl(7,'ptz7')" id="ptz7" @touchend="onMouseOut('ptz7')"
+							:class="ptzid=='ptz7'?'control-btn control-left selectbtn':'control-btn control-left'">
+						</view>
+						<view @touchstart="PtzCtrl(4,'ptz4')" id="ptz4" @touchend="onMouseOut('ptz4')"
+							:class="ptzid=='ptz4'?'control-btn control-bottom selectbtn':'control-btn control-bottom'">
+						</view>
+						<view @touchstart="PtzCtrl(8,'ptz8')" id="ptz8" @touchend="onMouseOut('ptz8')"
+							:class="ptzid=='ptz8'?'control-btn control-right selectbtn':'control-btn control-right'">
+						</view>
+						<view class="control-round">
+							<view :class="ptzid=='ptz9'?'inner-ring1':(ptzid=='ptz10'?'inner-ring2':'inner-ring')">
+								<view class="anticon anticon-plus plus" style="border: none;">
+									<u-icon @touchstart="PtzCtrl(9,'ptz9')" id="ptz9" @touchend="onMouseOut('ptz9')"
+										name="plus" size="20"></u-icon>
+								</view>
+								<view class="line"></view>
+								<view class="anticon anticon-minus minus" style="border: none;">
+									<u-icon @touchstart="PtzCtrl(10,'ptz10')" id="ptz10" @touchend="onMouseOut('ptz10')"
+										name="minus" size="20"></u-icon>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+	import home from '@/api/home/index.js';
+	// #ifdef H5
+	import EasyPlayer from "@easydarwin/easyplayer"
+	// #endif
+	export default {
+		props: {
+			src: {
+				//视频路径
+				type: String,
+				default: ''
+			},
+			videoTitle: {
+				//视频标题
+				type: String,
+				default: ''
+			},
+			autoplay: {
+				//是否自播放
+				type: Boolean,
+				default: true
+			},
+			showcenterplaybtn: {
+				//视频中间按钮
+				type: Boolean,
+				default: false
+			},
+			loop: {
+				//是否循环播放
+				type: Boolean,
+				default: false
+			},
+			muted: {
+				//是否静音播放
+				type: Boolean,
+				default: false
+			},
+			initialtime: {
+				//指定视频初始播放位置 单位为秒(s)
+				type: Number,
+				default: 0
+			},
+			showLeftBack: {
+				type: Boolean,
+				default: false
+			},
+			duration: {
+				//指定视频时长
+				type: Number,
+				default: 0
+			},
+			danmuList: {
+				//弹幕列表
+				type: Array,
+				default: () => []
+			},
+			enabledanmu: {
+				//是否展示弹幕,只在初始化时有效,不能动态变更
+				type: Boolean,
+				default: false
+			},
+			pagegesture: {
+				//在非全屏模式下,是否开启亮度与音量调节手势
+				type: Boolean,
+				default: false
+			},
+			controls: {
+				//在非全屏模式下,是否开启亮度与音量调节手势
+				type: Boolean,
+				default: true
+			},
+			objectFit: {
+				//当视频大小与 video 容器大小不一致时,视频的表现形式。contain:包含,fill:填充,cover:覆盖
+				type: String,
+				default: 'contain'
+			},
+			poster: {
+				//视频封面的图片网络资源地址,如果 controls 属性值为 false 则设置 poster 无效
+				type: String,
+				default: ''
+			},
+			enableplaygesture: {
+				//是否开启播放手势,即双击切换播放/暂停
+				type: Boolean,
+				default: true
+			},
+			isMenu: {
+				//是否显示控制面板
+				type: Boolean,
+				default: false
+			}
+		},
+		components: {
+			// #ifdef H5
+			EasyPlayer
+			// #endif
+		},
+		data() {
+			return {
+				videoUrl: '',
+				input: '',
+				startVideotape: false,
+				settingFile: getApp().globalData.siteinfo,
+				rateShow: false, //是否显示播放速度选项
+				fullControlsWidth: 0, //屏幕窗口宽度
+				fullControlsHeigt: 0, //屏幕窗口高度
+				currentRate: '1.0', //当前播放速度
+				videoCtx: '', //视频上下文
+				touchStartTime: 0, //双击视频播放还是暂停
+				damu: {}, //弹幕
+				dotLeftBase: 0, //基础偏移度 初步计算为滑块的半径 现在 为0
+				dotSlide: 0, //进度
+				dotBaseWidth: 0, //进度条计算后宽度
+				currtime: '00:00:00', //当前播放时间 字符串 计算后
+				druation: '00:00:00', //总时间 字符串 计算后
+				durationInt: 0, //总时间
+				currentInt: 0, //当前播放时间
+				isPlay: false, //是否播放
+				isFullScree: false, //是否全屏
+				// ismoregn:false,
+				rdo: 0.94, //基础比例 为了设置进度条
+				playOrPauseSrc: getApp().globalData.siteinfo.siteroot + '/public/static/app/yfs-video/play.png', //播放或者暂停图片
+				srcLock: getApp().globalData.siteinfo.siteroot + '/public/static/app/yfs-video/uplock.png', //锁住横屏
+				isLock: false, //是否锁屏
+				hasptz: 0,
+				did: 0,
+				ptzid: '',
+			};
+		},
+		mounted() {
+
+		},
+		destroyed() {
+
+		},
+		created() {
+
+		},
+
+		onResize: function() {
+
+		},
+		methods: {
+			PtzCtrl(ptztype, id) {
+				let that = this;
+				that.ptzid = id;
+				let pdata = {
+					id: that.did,
+					ptztype: ptztype,
+					speed: 250
+				};
+				home.ptzctrl(pdata).then(res => {
+					if (res.status != 200) {
+						that.$api.msg(res.msg);
+					}
+				});
+			},
+			onMouseOut(id) {
+				let that = this;
+				let pdata = {
+					id: that.did,
+					ptztype: 0,
+					speed: 250
+				};
+				setTimeout(function() {
+					that.ptzid = '';
+				}, 100)
+				setTimeout(function() {
+					home.ptzctrl(pdata).then(res => {
+						if (res.status != 200) {
+							that.$api.msg(res.msg);
+						}
+					});
+				}, 1000)
+			},
+			playvideo(_src, _did = 0, _hasptz = 0) {
+
+				this.hasptz = _hasptz;
+				this.did = _did;
+				this.videoUrl = _src
+			},
+			player() {
+				if (!this.input) {
+					this.$api.msg('播放地址错误!');
+				} else {
+					this.videoUrl = this.input
+				}
+			},
+			//保存快照
+			saveSnap() {
+				if (!this.videoUrl) {
+					this.$api.msg('播放地址错误!');
+				} else {
+					this.$refs.easyPlayer.saveLocalSnapshot()
+				}
+			},
+			//录像
+			videotape() {
+				if (!this.videoUrl) {
+					this.$api.msg('播放地址错误!');
+				} else {
+					if (this.$refs.easyPlayer.switchRecording) {
+						this.$refs.easyPlayer.switchRecording()
+						this.startVideotape = !this.startVideotape
+					}
+				}
+			},
+			play() {
+				this.$refs.easyPlayer.play()
+			},
+			pause() {
+				this.$refs.easyPlayer.pause()
+			},
+			switchAudio() {
+				this.$refs.easyPlayer.switchAudio()
+				this.muted = !this.muted
+			},
+			fullScreen() {
+				this.$refs.easyPlayer.fullscreen()
+			},
+			loadedmetadata: function() {
+				console.log('loadedmetadata')
+				this.closeloading();
+			},
+			waiting: function() {
+				console.log('waiting')
+				this.closeloading();
+			},
+			closeloading: function() {
+				setTimeout(function() {
+					uni.hideLoading();
+				}, 1000)
+			},
+			videoErrorCallback: function(e) {
+				console.log(e);
+				let that = this;
+				that.closeloading();
+			},
+			sendDanMu: function(obj) {
+				//发送弹幕
+				let that = this;
+				that.videoCtx.sendDanmu(obj);
+			},
+			Clickplay: function(e) {
+				let that = this;
+				that.isPlay = true;
+				that.playOrPauseSrc = that.settingFile.siteroot + '/public/static/app/yfs-video/pause.png';
+			},
+			Clickpause: function(e) {
+				let that = this;
+				that.isPlay = false;
+				that.playOrPauseSrc = that.settingFile.siteroot + '/public/static/app/yfs-video/play.png';
+			},
+			Clickended: function() {
+				//当播放到末尾时触发 ended 事件
+				console.log('ended');
+			},
+			Clicktimeupdate: function(event) {
+				let that = this;
+				//播放进度变化时触发,event.detail = {currentTime, duration} 。触发频率 250ms 一次
+				that.$emit('getTimeVideo', event.detail.currentTime);
+				that.dotSlide = (event.detail.currentTime / event.detail.duration) * that.dotBaseWidth * that.rdo;
+				that.druation = that.formatSeconds(event.detail.duration);
+				that.currtime = that.formatSeconds(event.detail.currentTime);
+				that.durationInt = event.detail.duration;
+				that.currentInt = event.detail.currentTime;
+			},
+			Clickfullscreenchange: function(e) {
+				let that = this;
+				if (!that.isFullScree) {
+					that.dotBaseWidth = that.fullControlsHeigt * 1.4;
+				} else {
+					that.dotBaseWidth = that.fullControlsWidth * 1.2;
+				}
+				that.isFullScree = !that.isFullScree;
+			},
+			Clickwaitin: function() {
+				//视频出现缓冲时触发
+				console.log('Clickwaitin');
+			},
+			showSwitchRate: function(rate) {
+				let that = this;
+				that.rateShow = true;
+			},
+			switchRate: function(e) {
+				let that = this;
+				let rate = Number(e.currentTarget.dataset.rate);
+				that.currentRate = rate;
+				that.rateShow = false;
+				that.videoCtx.playbackRate(rate * 1);
+				if (!that.isPlay) {
+					that.videoCtx.play();
+				}
+			},
+			clk: function() {
+				//video点击事件
+				let that = this;
+				that.rateShow = false;
+				if (!that.isPlay) {
+					that.videoCtx.play();
+				} else {
+					// that.videoCtx.pause();
+				}
+			},
+			formatSeconds(a) {
+				var hh = parseInt(a / 3600);
+				var mm = parseInt((a - hh * 3600) / 60);
+				if (mm < 10) mm = '0' + mm;
+				var ss = parseInt((a - hh * 3600) % 60);
+				if (ss < 10) ss = '0' + ss;
+				if (hh < 10) hh = hh == 0 ? '' : `0${hh}:`;
+				var length = hh + mm + ':' + ss;
+				if (a >= 0) {
+					return length;
+				} else {
+					return '00:00';
+				}
+			},
+			playPause: function() {
+				let that = this;
+				if (!that.isPlay) {
+					that.videoCtx.play();
+				} else {
+					// that.videoCtx.pause();
+				}
+			},
+			fullscree: function() {
+				let that = this;
+				if (that.isLock) {
+					return false;
+				}
+				if (!that.isFullScree) {
+					that.videoCtx.requestFullScreen({
+						direction: 'horizontal'
+					});
+					that.dotBaseWidth = that.fullControlsHeigt * 1.4;
+				} else {
+					that.videoCtx.exitFullScreen();
+					that.dotBaseWidth = that.fullControlsWidth * 1.2;
+				}
+			},
+			backup: function() {
+				let that = this;
+				if (that.isFullScree) {
+					that.fullscree();
+					return false;
+				}
+				uni.navigateBack();
+			},
+			moregn: function() {
+				this.ismoregn = !this.ismoregn;
+			},
+			hideModal: function() {
+				this.ismoregn = false;
+			},
+			moveDot: function(e) {
+				//进度条移动点 触摸移动
+				// 单指触摸 不是单指触摸不移动
+				let that = this;
+				if (e.touches.length !== 1) {
+					return false;
+				}
+
+				that.dotSlide = e.touches[0].clientX;
+				if (that.dotSlide < 0) {
+					//左边界
+					that.dotSlide = 0;
+				}
+				if (that.dotSlide > that.dotBaseWidth * that.rdo) {
+					//右边界
+					that.dotSlide = that.dotBaseWidth * that.rdo;
+				}
+				let time = (that.dotSlide / that.dotBaseWidth) * that.rdo * that.durationInt;
+				that.currentInt = time;
+				that.currtime = that.formatSeconds(time);
+				that.videoCtx.seek(time);
+			},
+			touchstartDot: function(e) {
+				//进度条移动点 触摸开始
+				// this.initX = e.changedTouches[0].clientX;
+				console.log('startdot');
+			},
+			touchendDot: function(e) {
+				console.log('enddot');
+			},
+			lock: function() {
+				if (this.isLock) {
+					this.srcLock = this.settingFile.siteroot + '/public/static/app/yfs-video/uplock.png';
+				} else {
+					this.srcLock = this.settingFile.siteroot + '/public/static/app/yfs-video/downlock.png';
+				}
+
+				this.isLock = !this.isLock;
+			}
+		}
+	};
+</script>
+
+<style>
+	.selectbtn {
+		color: black;
+		background: #1298c8;
+	}
+
+	.control-wrapper {
+		position: relative;
+		width: 50vw;
+		height: 50vw;
+		max-width: 300px;
+		max-height: 300px;
+		min-width: 240px;
+		min-height: 240px;
+		margin: 0 auto;
+		border-radius: 50%;
+		background: transparent;
+	}
+
+	.control-btn {
+		position: absolute;
+		width: 38%;
+		height: 38%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		border: 1px solid #78aee4;
+		box-sizing: border-box;
+		transition: all .3s linear;
+	}
+
+	.control-btn:after {
+		content: '';
+		position: absolute;
+		width: 60%;
+		height: 60%;
+		background: #fff;
+		z-index: 2;
+	}
+
+	.control-btn:before {
+		content: '';
+		position: relative;
+		display: block;
+		width: 16px;
+		height: 16px;
+		border-top: 3px solid #78aee4;
+		border-right: 3px solid #78aee4;
+		border-radius: 0 4px 0 0;
+		box-sizing: border-box;
+		z-index: 2;
+	}
+
+	.control-top {
+		top: 0;
+		left: 50%;
+		transform: translateX(-50%) rotate(-45deg);
+		border-radius: 4px 100% 4px 4px;
+	}
+
+	.control-top:before {
+		transform: translate(30%, -25%);
+	}
+
+	.control-top:after {
+		left: 0;
+		bottom: 0;
+		border-top: 1px solid #78aee4;
+		border-right: 1px solid #78aee4;
+		border-radius: 0 100% 0 0;
+	}
+
+	.control-bottom {
+		left: 50%;
+		bottom: 0;
+		transform: translateX(-50%) rotate(45deg);
+		border-radius: 4px 4px 100% 4px;
+	}
+
+	.control-bottom:before {
+		transform: translate(25%, 25%) rotate(90deg);
+	}
+
+	.control-bottom:after {
+		top: 0;
+		left: 0;
+		border-bottom: 1px solid #78aee4;
+		border-right: 1px solid #78aee4;
+		border-radius: 0 0 100% 0;
+	}
+
+	.control-left {
+		top: 50%;
+		left: 0;
+		transform: translateY(-50%) rotate(45deg);
+		border-radius: 4px 4px 4px 100%;
+	}
+
+	.control-left:before {
+		transform: translate(-25%, 30%) rotate(180deg);
+	}
+
+	.control-left:after {
+		right: 0;
+		top: 0;
+		border-bottom: 1px solid #78aee4;
+		border-left: 1px solid #78aee4;
+		border-radius: 0 0 0 100%;
+	}
+
+	.control-right {
+		top: 50%;
+		right: 0;
+		transform: translateY(-50%) rotate(45deg);
+		border-radius: 4px 100% 4px 4px;
+	}
+
+	.control-right:before {
+		transform: translate(30%, -25%);
+	}
+
+	.control-right:after {
+		left: 0;
+		bottom: 0;
+		border-top: 1px solid #78aee4;
+		border-right: 1px solid #78aee4;
+		border-radius: 0 100% 0 0;
+	}
+
+	.control-round {
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		transform: translate(-50%, -50%);
+		width: 51.2%;
+		height: 51.2%;
+		background: #fff;
+		border-radius: 50%;
+	}
+
+	.control-round-inner {
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		transform: translate(-50%, -50%);
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		width: 66%;
+		height: 66%;
+		border: 1px solid #78aee4;
+		border-radius: 50%;
+	}
+
+	.control-round-inner:after {
+		content: "| |";
+		display: block;
+		width: 50px;
+		line-height: 50px;
+		text-align: center;
+		font-weight: bolder;
+		color: #fff;
+		border-radius: 50%;
+	}
+
+
+	.outer-ring .inner-ring .line {
+		height: 1px;
+		width: 100%;
+		background-color: #ddd;
+		position: absolute;
+		top: 50px;
+		left: 0;
+	}
+
+	.outer-ring .inner-ring {
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		transform: translate(-50%, -50%);
+		width: 100px;
+		height: 100px;
+		border-radius: 50%;
+		background-color: #fff;
+		border: 1px solid #ddd;
+	}
+
+	.outer-ring .inner-ring1 {
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		transform: translate(-50%, -50%);
+		width: 100px;
+		height: 100px;
+		border-radius: 50%;
+		background-color: #fff;
+		border: 1px solid #ddd;
+		background: linear-gradient(to top,
+				white 0%,
+				white 50%,
+				#1298c8 50.01%,
+				#1298c8 100%);
+	}
+
+	.outer-ring .inner-ring2 {
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		transform: translate(-50%, -50%);
+		width: 100px;
+		height: 100px;
+		border-radius: 50%;
+		background-color: #fff;
+		border: 1px solid #ddd;
+		background: linear-gradient(to bottom,
+				white 0%,
+				white 50%,
+				#1298c8 50.01%,
+				#1298c8 100%);
+	}
+
+	.outer-ring .inner-ring .minus {
+		position: absolute;
+		bottom: 15px;
+		left: 41px;
+	}
+
+	.outer-ring .inner-ring .plus {
+		position: absolute;
+		top: 15px;
+		left: 41px;
+	}
+
+	.outer-ring .inner-ring1 .minus {
+		position: absolute;
+		bottom: 15px;
+		left: 41px;
+	}
+
+	.outer-ring .inner-ring1 .plus {
+		position: absolute;
+		top: 15px;
+		left: 41px;
+	}
+
+	.outer-ring .inner-ring2 .minus {
+		position: absolute;
+		bottom: 15px;
+		left: 41px;
+	}
+
+	.outer-ring .inner-ring2 .plus {
+		position: absolute;
+		top: 15px;
+		left: 41px;
+	}
+
+	video {
+		width: 100%;
+		height: 419rpx;
+	}
+
+	video::-webkit-media-controls {
+		display: none !important;
+	}
+
+	.bbl-content {
+		width: 100%;
+	}
+
+	.bbl-content_video {
+		width: 100%;
+		height: 419rpx;
+	}
+
+	.uni-padding-wrap.uni-common-mt {
+		width: 100%;
+	}
+
+	#myVideo {
+		width: 100%;
+		height: 419rpx;
+	}
+
+	.video {
+		width: 100%;
+	}
+
+	.video-wrap {
+		position: relative;
+	}
+
+	.multi-list.full-screen.vertical {
+		height: 100vh !important;
+		padding: 8vh 0;
+	}
+
+	.multi-list.full-screen.horizontal {
+		height: 100vw !important;
+		padding: 8vw 0;
+	}
+
+	.multi {
+		position: absolute;
+		right: 30rpx;
+		top: 50%;
+		transform: translateY(-50%);
+		z-index: 998;
+		width: 100rpx;
+		color: red;
+		padding: 10rpx 0;
+		text-align: center;
+		transition: color ease 0.3s;
+	}
+
+	.multi.rate {
+		right: 30rpx;
+		color: red;
+	}
+
+	.multi-list {
+		position: absolute;
+		height: 100%;
+		width: 0;
+		background-color: rgba(0, 0, 0, 0.65);
+		top: 0;
+		right: 0;
+		transition: width 0.3s ease;
+		z-index: 999;
+		box-sizing: border-box;
+		padding: 50rpx 0;
+	}
+
+	.multi-list.rate {
+		padding: 25rpx 0;
+	}
+
+	.multi-list.active {
+		width: 300rpx;
+	}
+
+	.multi-item {
+		text-align: center;
+		color: #fff;
+		line-height: 80rpx;
+		transition: color ease 0.3s;
+	}
+
+	.multi-item.rate {
+		line-height: 70rpx;
+	}
+
+	.multi-item:hover,
+	.multi:hover {
+		color: #00d8ff;
+	}
+
+	.multi-item.active {
+		color: #00d8ff;
+	}
+
+	.cuIcon-more.text-white {
+		color: #ffffff;
+		font-size: 40upx;
+	}
+
+	.video-contrl-top {
+		height: 80upx;
+		line-height: 80upx;
+		min-height: 80upx;
+		display: flex;
+		padding: 0;
+		z-index: 999;
+		background-color: rgba(0, 0, 0, 0.1);
+		background: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.1)));
+		background: -o-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
+		background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
+	}
+
+	.cu-list-tb {
+		width: 60upx;
+		height: 60upx;
+		border-radius: 50%;
+		background: #cccccc;
+		padding: auto;
+		margin: auto;
+		text-align: center;
+		height: auto;
+		line-height: 60upx;
+		align-items: center;
+	}
+
+	.cu-list {
+		align-items: flex-start;
+		justify-items: left;
+		text-align: left;
+		padding: 30upx 0;
+	}
+
+	.video-control {
+		background-color: rgba(0, 0, 0, 0.2);
+		height: 80upx;
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		z-index: 999;
+		flex-direction: row;
+		display: flex;
+	}
+
+	.video-control-back {
+		position: relative;
+		width: 74rpx;
+		height: 100%;
+		line-height: 80upx;
+	}
+
+	.video-control-back cover-image {
+		position: absolute;
+		top: 20rpx;
+		left: 10rpx;
+		width: 50%;
+		height: 50%;
+	}
+
+	.video-control-text {
+		color: #ffffff;
+		width: 70%;
+		height: 100%;
+		text-align: left;
+		line-height: 80upx;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		display: -webkit-box;
+		word-break: break-all;
+		-webkit-box-orient: vertical;
+		-webkit-line-clamp: 1;
+	}
+
+	.video-control-more {
+		position: relative;
+		height: 100%;
+		width: 80upx;
+		margin-left: 10%;
+	}
+
+	.video-control-more cover-image {
+		position: absolute;
+		top: 20rpx;
+		left: 10rpx;
+		width: 50%;
+		height: 50%;
+	}
+
+	/* 底部栏样式 */
+	.video-control-bottom {
+		background-color: rgba(0, 0, 0, 0.2);
+		height: 60rpx;
+		position: absolute;
+		padding-top: 10rpx;
+		line-height: 60rpx;
+		padding: 5upx;
+		bottom: 0;
+		left: 0;
+		width: 100%;
+		z-index: 999;
+		display: flex;
+		align-items: center;
+		justify-items: center;
+	}
+
+	.video-control-bottom-playOrPause {
+		height: 80%;
+		width: 48rpx;
+		align-items: center;
+		justify-items: center;
+		padding-top: 10rpx;
+		flex-shrink: none;
+	}
+
+	.video-control-bottom-playOrPause cover-image {
+		width: 80%;
+		height: 80%;
+		margin: auto;
+	}
+
+	.video-control-bottom-time {
+		height: 80%;
+		width: 185rpx;
+		line-height: 48rpx;
+		align-items: center;
+		justify-items: center;
+		text-align: center;
+		margin-right: 10upx;
+		flex-shrink: none;
+		color: #ffffff;
+		font-size: 20rpx;
+	}
+
+	.video-control-bottom-bar {
+		height: 80%;
+		line-height: 48rpx;
+		align-items: center;
+		justify-items: center;
+		flex-shrink: none;
+		padding: 0 10rpx;
+	}
+
+	.video-control-bottom-bar-gray {
+		background-color: #fcf7e9;
+		position: relative;
+		height: 5rpx;
+		width: 94%;
+		top: 45%;
+		left: 12.5rpx;
+		right: 12.5rpx;
+		border-radius: 5rpx;
+	}
+
+	.video-control-bottom-bar-color {
+		height: 100%;
+		background-color: #e54d42;
+	}
+
+	.video-control-bottom-bar-dot {
+		position: relative;
+		width: 25rpx;
+		height: 25rpx;
+		line-height: 15rpx;
+		border-radius: 50%;
+		top: 15%;
+		background-color: rgba(255, 0, 0, 0.3);
+		box-shadow: -1px 1px 1px 2px rgba(255, 255, 255, 0.1), -1px 1px 1px 0 rgba(0, 0, 0, 0.1) inset;
+	}
+
+	.video-control-bottom-bar-dot-pad {
+		width: 15upx;
+		height: 15upx;
+		border-radius: 50%;
+		background: #e54d42;
+		/* box-shadow: 0 0 2px 0 rgba(0,0,0,0.2) inset; */
+		position: absolute;
+		left: 0;
+		top: 0;
+		right: 0;
+		bottom: 0;
+		margin: auto;
+	}
+
+	.video-control-bottom-fullScree {
+		height: 25rpx;
+		width: 25rpx;
+		flex-shrink: none;
+		margin-right: 10rpx;
+	}
+
+	.video-control-bottom-fullScree cover-image {
+		width: 100%;
+		height: 100%;
+	}
+
+	.video-control-item {
+		color: #cccccc;
+		padding: 2rpx;
+		margin-top: 10rpx;
+		width: 100%;
+	}
+
+	.video-heizith-menu {
+		position: absolute;
+		right: 0;
+		top: 20%;
+		z-index: 998;
+		/* background-color: rgba(0,0,0,0.1); */
+		height: 100rpx;
+		width: 80rpx;
+		padding: 10rpx;
+		padding-top: 30rpx;
+		border-top-left-radius: 10rpx;
+		border-bottom-left-radius: 10rpx;
+		line-height: 200rpx;
+		align-items: center;
+		justify-items: center;
+		text-align: center;
+		flex-direction: row;
+	}
+
+	.video-fullScree-speed {
+		margin-right: 20rpx;
+		color: #ffffff;
+		font-size: 25rpx;
+		text-align: center;
+		align-items: center;
+	}
+
+	.video-hz-lock {
+		position: absolute;
+		left: 50rpx;
+		top: 45%;
+		z-index: 998;
+		background-color: rgba(0, 0, 0, 0.1);
+		height: 50rpx;
+		width: 50rpx;
+		border-radius: 50%;
+		padding: 10rpx;
+	}
+
+	.video-hz-lock cover-image {
+		height: 100%;
+		width: 100%;
+	}
+
+	.video-hz-jp {
+		position: absolute;
+		right: 50rpx;
+		top: 45%;
+		z-index: 998;
+		background-color: rgba(0, 0, 0, 0.1);
+		height: 50rpx;
+		width: 50rpx;
+		border-radius: 50%;
+		padding: 10rpx;
+	}
+
+	.video-hz-jp cover-image {
+		height: 100%;
+		width: 100%;
+	}
+</style>

+ 93 - 0
js/base64.js

@@ -0,0 +1,93 @@
+function base64_encode(str) {
+	var c1, c2, c3;
+	var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+	var i = 0, len = str.length, string = '';
+
+	while (i < len) {
+		c1 = str.charCodeAt(i++) & 0xff;
+		if (i == len) {
+			string += base64EncodeChars.charAt(c1 >> 2);
+			string += base64EncodeChars.charAt((c1 & 0x3) << 4);
+			string += "==";
+			break;
+		}
+		c2 = str.charCodeAt(i++);
+		if (i == len) {
+			string += base64EncodeChars.charAt(c1 >> 2);
+			string += base64EncodeChars.charAt(((c1 & 0x3) << 4)
+				| ((c2 & 0xF0) >> 4));
+			string += base64EncodeChars.charAt((c2 & 0xF) << 2);
+			string += "=";
+			break;
+		}
+		c3 = str.charCodeAt(i++);
+		string += base64EncodeChars.charAt(c1 >> 2);
+		string += base64EncodeChars.charAt(((c1 & 0x3) << 4)
+			| ((c2 & 0xF0) >> 4));
+		string += base64EncodeChars.charAt(((c2 & 0xF) << 2)
+			| ((c3 & 0xC0) >> 6));
+		string += base64EncodeChars.charAt(c3 & 0x3F)
+	}
+	return string
+}
+
+function base64_decode(str) {
+	var c1, c2, c3, c4;
+	var base64DecodeChars = new Array(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+		-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+		-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62,
+		-1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1,
+		-1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+		15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1,
+		26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+		43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
+	var i = 0, len = str.length, string = '';
+
+	while (i < len) {
+		do {
+			c1 = base64DecodeChars[str.charCodeAt(i++) & 0xff]
+		} while (i < len && c1 == -1);
+
+		if (c1 == -1)
+			break;
+
+		do {
+			c2 = base64DecodeChars[str.charCodeAt(i++) & 0xff]
+		} while (i < len && c2 == -1);
+
+		if (c2 == -1)
+			break;
+
+		string += String.fromCharCode((c1 << 2) | ((c2 & 0x30) >> 4));
+
+		do {
+			c3 = str.charCodeAt(i++) & 0xff;
+			if (c3 == 61)
+				return string;
+
+			c3 = base64DecodeChars[c3]
+		} while (i < len && c3 == -1);
+
+		if (c3 == -1)
+			break;
+
+		string += String.fromCharCode(((c2 & 0XF) << 4) | ((c3 & 0x3C) >> 2));
+
+		do {
+			c4 = str.charCodeAt(i++) & 0xff;
+			if (c4 == 61)
+				return string;
+			c4 = base64DecodeChars[c4]
+		} while (i < len && c4 == -1);
+
+		if (c4 == -1)
+			break;
+
+		string += String.fromCharCode(((c3 & 0x03) << 6) | c4)
+	}
+	return string;
+}
+module.exports = {
+	'base64_encode': base64_encode,
+	'base64_decode': base64_decode
+};

+ 33 - 0
js/bindid.js

@@ -0,0 +1,33 @@
+function getbindid(options, store) {
+	/* 通过分享小程序进入 */
+	if (options.pid) {
+		let pid = uni.getStorageSync('sys_pid');
+		if (pid == '') {
+			uni.setStorageSync('sys_pid', options.pid)
+		} else {
+			if (options.pid != '' && options.pid != pid) {
+				uni.setStorageSync('sys_pid', options.pid)
+			}
+		}
+		console.log('通过分享小程序进入首页1', options)
+	}
+	/* 通过扫推广小程序码进入首页 */
+	if (options.scene) {
+		const scene = decodeURIComponent(options.scene)
+		if (scene) {
+			let pid = uni.getStorageSync('sys_pid');
+			if (pid == '') {
+				uni.setStorageSync('sys_pid', scene)
+			} else {
+				if (scene != '' && scene != pid) {
+					uni.setStorageSync('sys_pid', scene)
+				}
+			}
+		}
+		console.log('通过分享小程序进入首页2', uni.getStorageSync('sys_pid'))
+	}
+
+}
+module.exports = {
+	getbindid
+}

+ 469 - 0
js/htmlToWxml.js

@@ -0,0 +1,469 @@
+/**
+ * Created by kevenfeng on 2016/10/12.
+ */
+// Regular Expressions for parsing tags and attributes
+var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,
+	endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/,
+	attr = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;
+
+// Empty Elements - HTML 5
+var empty = makeMap("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr");
+
+// Block Elements - HTML 5
+var block = makeMap("a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video");
+
+// Inline Elements - HTML 5
+var inline = makeMap("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var");
+
+// Elements that you can, intentionally, leave open
+// (and which close themselves)
+var closeSelf = makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");
+
+// Attributes that have their values filled in disabled="disabled"
+var fillAttrs = makeMap("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected");
+
+// Special Elements (can contain anything)
+var special = makeMap("script,style");
+
+var HTMLParser = function (html, handler) {
+	var index, chars, match, stack = [], last = html;
+	stack.last = function () {
+		return this[this.length - 1];
+	};
+
+	while (html) {
+		chars = true;
+
+		// Make sure we're not in a script or style element
+		if (!stack.last() || !special[stack.last()]) {
+
+			// Comment
+			if (html.indexOf("<!--") == 0) {
+				index = html.indexOf("-->");
+
+				if (index >= 0) {
+					if (handler.comment)
+						handler.comment(html.substring(4, index));
+					html = html.substring(index + 3);
+					chars = false;
+				}
+
+				// end tag
+			} else if (html.indexOf("</") == 0) {
+				match = html.match(endTag);
+
+				if (match) {
+					html = html.substring(match[0].length);
+					match[0].replace(endTag, parseEndTag);
+					chars = false;
+				}
+
+				// start tag
+			} else if (html.indexOf("<") == 0) {
+				match = html.match(startTag);
+
+				if (match) {
+					html = html.substring(match[0].length);
+					match[0].replace(startTag, parseStartTag);
+					chars = false;
+				}
+			}
+
+			if (chars) {
+				index = html.indexOf("<");
+
+				var text = index < 0 ? html : html.substring(0, index);
+				html = index < 0 ? "" : html.substring(index);
+
+				if (handler.chars)
+					handler.chars(text);
+			}
+
+		} else {
+			html = html.replace(new RegExp("([\\s\\S]*?)<\/" + stack.last() + "[^>]*>"), function (all, text) {
+				text = text.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g, "$1$2");
+				if (handler.chars)
+					handler.chars(text);
+
+				return "";
+			});
+
+			parseEndTag("", stack.last());
+		}
+
+		if (html == last)
+			throw "Parse Error: " + html;
+		last = html;
+	}
+
+	// Clean up any remaining tags
+	parseEndTag();
+
+	function parseStartTag(tag, tagName, rest, unary) {
+		tagName = tagName.toLowerCase();
+
+		if (block[tagName]) {
+			while (stack.last() && inline[stack.last()]) {
+				parseEndTag("", stack.last());
+			}
+		}
+
+		if (closeSelf[tagName] && stack.last() == tagName) {
+			parseEndTag("", tagName);
+		}
+
+		unary = empty[tagName] || !!unary;
+
+		if (!unary)
+			stack.push(tagName);
+
+		if (handler.start) {
+			var attrs = [];
+
+			rest.replace(attr, function (match, name) {
+				var value = arguments[2] ? arguments[2] :
+					arguments[3] ? arguments[3] :
+						arguments[4] ? arguments[4] :
+							fillAttrs[name] ? name : "";
+
+				attrs.push({
+					name: name,
+					value: value,
+					escaped: value.replace(/(^|[^\\])"/g, '$1\\\"') //"
+				});
+			});
+
+			if (handler.start)
+				handler.start(tagName, attrs, unary);
+		}
+	}
+
+	function parseEndTag(tag, tagName) {
+		// If no tag name is provided, clean shop
+		if (!tagName)
+			var pos = 0;
+
+		// Find the closest opened tag of the same type
+		else
+			for (var pos = stack.length - 1; pos >= 0; pos--)
+				if (stack[pos] == tagName)
+					break;
+
+		if (pos >= 0) {
+			// Close all the open elements, up the stack
+			for (var i = stack.length - 1; i >= pos; i--)
+				if (handler.end)
+					handler.end(stack[i]);
+
+			// Remove the open elements from the stack
+			stack.length = pos;
+		}
+	}
+};
+
+function makeMap(str) {
+	var obj = {}, items = str.split(",");
+	for (var i = 0; i < items.length; i++)
+		obj[items[i]] = true;
+	return obj;
+}
+var global = {};
+var debug = function () { };
+
+function q(v) {
+	return '"' + v + '"';
+}
+
+function removeDOCTYPE(html) {
+	return html
+		.replace(/<\?xml.*\?>\n/, '')
+		.replace(/<!doctype.*\>\n/, '')
+		.replace(/<!DOCTYPE.*\>\n/, '');
+}
+global.html2json = function html2json(html) {
+	html = removeDOCTYPE(html);
+	var bufArray = [];
+	var results = {
+		node: 'root',
+		child: [],
+	};
+	HTMLParser(html, {
+		start: function (tag, attrs, unary) {
+			debug(tag, attrs, unary);
+			// node for this element
+			var node = {
+				node: 'element',
+				tag: tag,
+			};
+			if (attrs.length !== 0) {
+				node.attr = attrs.reduce(function (pre, attr) {
+					var name = attr.name;
+					var value = attr.value;
+
+					// has multi attibutes
+					// make it array of attribute
+					if (value.match(/ /)) {
+						value = value.split(' ');
+					}
+
+					// if attr already exists
+					// merge it
+					if (pre[name]) {
+						if (Array.isArray(pre[name])) {
+							// already array, push to last
+							pre[name].push(value);
+						} else {
+							// single value, make it array
+							pre[name] = [pre[name], value];
+						}
+					} else {
+						// not exist, put it
+						pre[name] = value;
+					}
+
+					return pre;
+				}, {});
+			}
+			if (unary) {
+				var parent = bufArray[0] || results;
+				if (parent.child === undefined) {
+					parent.child = [];
+				}
+				parent.child.push(node);
+			} else {
+				bufArray.unshift(node);
+			}
+		},
+		end: function (tag) {
+			debug(tag);
+			// merge into parent tag
+			var node = bufArray.shift();
+			if (node.tag !== tag) console.error('invalid state: mismatch end tag');
+
+			if (bufArray.length === 0) {
+				results.child.push(node);
+			} else {
+				var parent = bufArray[0];
+				if (parent.child === undefined) {
+					parent.child = [];
+				}
+				parent.child.push(node);
+			}
+		},
+		chars: function (text) {
+			debug(text);
+			var node = {
+				node: 'text',
+				text: text,
+			};
+			if (bufArray.length === 0) {
+				results.child.push(node);
+			} else {
+				var parent = bufArray[0];
+				if (parent.child === undefined) {
+					parent.child = [];
+				}
+				parent.child.push(node);
+			}
+		},
+		comment: function (text) {
+			debug(text);
+			var node = {
+				node: 'comment',
+				text: text,
+			};
+			var parent = bufArray[0];
+			if (parent.child === undefined) {
+				parent.child = [];
+			}
+			parent.child.push(node);
+		},
+	});
+	return results;
+};
+
+global.json2html = function json2html(json) {
+	// Empty Elements - HTML 4.01
+	var empty = ['area', 'base', 'basefont', 'br', 'col', 'frame', 'hr', 'img', 'input', 'isindex', 'link', 'meta', 'param', 'embed'];
+
+	var child = '';
+	if (json.child) {
+		child = json.child.map(function (c) {
+			return json2html(c);
+		}).join('');
+	}
+
+	var attr = '';
+	if (json.attr) {
+		attr = Object.keys(json.attr).map(function (key) {
+			var value = json.attr[key];
+			if (Array.isArray(value)) value = value.join(' ');
+			return key + '=' + q(value);
+		}).join(' ');
+		if (attr !== '') attr = ' ' + attr;
+	}
+
+	if (json.node === 'element') {
+		var tag = json.tag;
+		if (empty.indexOf(tag) > -1) {
+			// empty element
+			return '<' + json.tag + attr + '/>';
+		}
+
+		// non empty element
+		var open = '<' + json.tag + attr + '>';
+		var close = '</' + json.tag + '>';
+		return open + child + close;
+	}
+
+	if (json.node === 'text') {
+		return json.text;
+	}
+
+	if (json.node === 'comment') {
+		return '<!--' + json.text + '-->';
+	}
+
+	if (json.node === 'root') {
+		return child;
+	}
+};
+
+var html2wxwebview = function (html) {
+	var htmlNode = global.html2json(html);
+	htmlNode = parseHtmlNode(htmlNode);
+	htmlNode = arrangeNode(htmlNode);
+
+	return htmlNode;
+}
+//整理节点
+var arrangeNode = function (htmlNode) {
+	var arrangeArray = [];
+	var nodeObj = [];
+	for (var i = 0, j = htmlNode.length; i < j; i++) {
+		if (i == 0) {
+			if (htmlNode[i].type == "view") {
+				continue;
+			}
+			arrangeArray.push(htmlNode[i]);
+		} else {
+			if (htmlNode[i].type == "view") {
+				if (arrangeArray.length > 0) {
+					var obj = {
+						type: "view",
+						child: arrangeArray
+					}
+					nodeObj.push(obj);
+				}
+				arrangeArray = [];
+			} else if (htmlNode[i].type == "img") {
+				if (arrangeArray.length > 0) {
+					var obj = {
+						type: "view",
+						child: arrangeArray
+					}
+					nodeObj.push(obj);
+				}
+
+				var attr =  htmlNode[i].attr;
+				if (htmlNode[i].attr.width && htmlNode[i].attr.width.indexOf('%') === -1 && htmlNode[i].attr.width.indexOf('px') === -1) {
+					htmlNode[i].attr.width = htmlNode[i].attr.width + 'px'
+				}
+				if (htmlNode[i].attr.height && htmlNode[i].attr.height.indexOf('%') === -1 && htmlNode[i].attr.height.indexOf('px') === -1) {
+					htmlNode[i].attr.height = htmlNode[i].attr.height + 'px'
+				}
+				var obj = {
+					type: "img",
+					attr: attr
+				}
+				nodeObj.push(obj);
+
+				arrangeArray = [];
+			} else {
+				arrangeArray.push(htmlNode[i]);
+				if (i == (j - 1)) {
+					var obj = {
+						type: "view",
+						child: arrangeArray
+					}
+					nodeObj.push(obj);
+				}
+			}
+		}
+	}
+
+	return nodeObj;
+}
+
+//将html节点转成小程序可用的接口
+var parseHtmlNode = function (htmlNode) {
+	var tagsArray = [];
+	var parsetags = function (node) {
+		var tag = {};
+		if (node.node == "root") {
+
+		} else if (node.node == "element") {
+			switch (node.tag) {
+				case "a":
+					tag = {
+						type: "a",
+						text: node.child[0].text,
+					}
+					break;
+				case "img":
+					tag = {
+						type: "img",
+						text: node.text,
+					}
+					break;
+				case "p":
+					tag = {
+						type: "view",
+						text: node.text,
+					}
+					break;
+				case "div":
+					tag = {
+						type: "view",
+						text: node.text,
+					}
+					break;
+			}
+		} else if (node.node == "text") {
+			tag = {
+				type: "text",
+				text: node.text,
+			}
+		}
+
+		if (node.attr) {
+			tag.attr = node.attr;
+		}
+
+		if (Object.keys(tag).length != 0) {
+			// if(tag.text||node.tag=="img"){
+			tagsArray.push(tag);
+			// }
+		}
+
+		if (node.tag == "a") {//如果是a标签就不去解析他的child
+			return;
+		}
+
+		var child = node.child;
+
+		if (child) {
+			for (var val in child) {
+				parsetags(child[val]);
+			}
+		}
+	}
+
+	parsetags(htmlNode);
+	return tagsArray;
+}
+
+module.exports = {
+	html2json: html2wxwebview
+}
+

+ 273 - 0
js/md5.js

@@ -0,0 +1,273 @@
+/*
+ * JavaScript MD5
+ * https://github.com/blueimp/JavaScript-MD5
+ *
+ * Copyright 2011, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * http://www.opensource.org/licenses/MIT
+ *
+ * Based on
+ * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
+ * Digest Algorithm, as defined in RFC 1321.
+ * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ * Distributed under the BSD License
+ * See http://pajhome.org.uk/crypt/md5 for more info.
+ */
+
+/*global unescape, define, module */
+
+; (function ($) {
+	'use strict'
+
+	/*
+	* Add integers, wrapping at 2^32. This uses 16-bit operations internally
+	* to work around bugs in some JS interpreters.
+	*/
+	function safe_add(x, y) {
+		var lsw = (x & 0xFFFF) + (y & 0xFFFF)
+		var msw = (x >> 16) + (y >> 16) + (lsw >> 16)
+		return (msw << 16) | (lsw & 0xFFFF)
+	}
+
+	/*
+	* Bitwise rotate a 32-bit number to the left.
+	*/
+	function bit_rol(num, cnt) {
+		return (num << cnt) | (num >>> (32 - cnt))
+	}
+
+	/*
+	* These functions implement the four basic operations the algorithm uses.
+	*/
+	function md5_cmn(q, a, b, x, s, t) {
+		return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b)
+	}
+	function md5_ff(a, b, c, d, x, s, t) {
+		return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t)
+	}
+	function md5_gg(a, b, c, d, x, s, t) {
+		return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t)
+	}
+	function md5_hh(a, b, c, d, x, s, t) {
+		return md5_cmn(b ^ c ^ d, a, b, x, s, t)
+	}
+	function md5_ii(a, b, c, d, x, s, t) {
+		return md5_cmn(c ^ (b | (~d)), a, b, x, s, t)
+	}
+
+	/*
+	* Calculate the MD5 of an array of little-endian words, and a bit length.
+	*/
+	function binl_md5(x, len) {
+		/* append padding */
+		x[len >> 5] |= 0x80 << (len % 32)
+		x[(((len + 64) >>> 9) << 4) + 14] = len
+
+		var i
+		var olda
+		var oldb
+		var oldc
+		var oldd
+		var a = 1732584193
+		var b = -271733879
+		var c = -1732584194
+		var d = 271733878
+
+		for (i = 0; i < x.length; i += 16) {
+			olda = a
+			oldb = b
+			oldc = c
+			oldd = d
+
+			a = md5_ff(a, b, c, d, x[i], 7, -680876936)
+			d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586)
+			c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819)
+			b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330)
+			a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897)
+			d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426)
+			c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341)
+			b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983)
+			a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416)
+			d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417)
+			c = md5_ff(c, d, a, b, x[i + 10], 17, -42063)
+			b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162)
+			a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682)
+			d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101)
+			c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290)
+			b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329)
+
+			a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510)
+			d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632)
+			c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713)
+			b = md5_gg(b, c, d, a, x[i], 20, -373897302)
+			a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691)
+			d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083)
+			c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335)
+			b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848)
+			a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438)
+			d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690)
+			c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961)
+			b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501)
+			a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467)
+			d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784)
+			c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473)
+			b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734)
+
+			a = md5_hh(a, b, c, d, x[i + 5], 4, -378558)
+			d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463)
+			c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562)
+			b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556)
+			a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060)
+			d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353)
+			c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632)
+			b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640)
+			a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174)
+			d = md5_hh(d, a, b, c, x[i], 11, -358537222)
+			c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979)
+			b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189)
+			a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487)
+			d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835)
+			c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520)
+			b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651)
+
+			a = md5_ii(a, b, c, d, x[i], 6, -198630844)
+			d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415)
+			c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905)
+			b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055)
+			a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571)
+			d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606)
+			c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523)
+			b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799)
+			a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359)
+			d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744)
+			c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380)
+			b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649)
+			a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070)
+			d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379)
+			c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259)
+			b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551)
+
+			a = safe_add(a, olda)
+			b = safe_add(b, oldb)
+			c = safe_add(c, oldc)
+			d = safe_add(d, oldd)
+		}
+		return [a, b, c, d]
+	}
+
+	/*
+	* Convert an array of little-endian words to a string
+	*/
+	function binl2rstr(input) {
+		var i
+		var output = ''
+		var length32 = input.length * 32
+		for (i = 0; i < length32; i += 8) {
+			output += String.fromCharCode((input[i >> 5] >>> (i % 32)) & 0xFF)
+		}
+		return output
+	}
+
+	/*
+	* Convert a raw string to an array of little-endian words
+	* Characters >255 have their high-byte silently ignored.
+	*/
+	function rstr2binl(input) {
+		var i
+		var output = []
+		output[(input.length >> 2) - 1] = undefined
+		for (i = 0; i < output.length; i += 1) {
+			output[i] = 0
+		}
+		var length8 = input.length * 8
+		for (i = 0; i < length8; i += 8) {
+			output[i >> 5] |= (input.charCodeAt(i / 8) & 0xFF) << (i % 32)
+		}
+		return output
+	}
+
+	/*
+	* Calculate the MD5 of a raw string
+	*/
+	function rstr_md5(s) {
+		return binl2rstr(binl_md5(rstr2binl(s), s.length * 8))
+	}
+
+	/*
+	* Calculate the HMAC-MD5, of a key and some data (raw strings)
+	*/
+	function rstr_hmac_md5(key, data) {
+		var i
+		var bkey = rstr2binl(key)
+		var ipad = []
+		var opad = []
+		var hash
+		ipad[15] = opad[15] = undefined
+		if (bkey.length > 16) {
+			bkey = binl_md5(bkey, key.length * 8)
+		}
+		for (i = 0; i < 16; i += 1) {
+			ipad[i] = bkey[i] ^ 0x36363636
+			opad[i] = bkey[i] ^ 0x5C5C5C5C
+		}
+		hash = binl_md5(ipad.concat(rstr2binl(data)), 512 + data.length * 8)
+		return binl2rstr(binl_md5(opad.concat(hash), 512 + 128))
+	}
+
+	/*
+	* Convert a raw string to a hex string
+	*/
+	function rstr2hex(input) {
+		var hex_tab = '0123456789abcdef'
+		var output = ''
+		var x
+		var i
+		for (i = 0; i < input.length; i += 1) {
+			x = input.charCodeAt(i)
+			output += hex_tab.charAt((x >>> 4) & 0x0F) +
+				hex_tab.charAt(x & 0x0F)
+		}
+		return output
+	}
+
+	/*
+	* Encode a string as utf-8
+	*/
+	function str2rstr_utf8(input) {
+		return unescape(encodeURIComponent(input))
+	}
+
+	/*
+	* Take string arguments and return either raw or hex encoded strings
+	*/
+	function raw_md5(s) {
+		return rstr_md5(str2rstr_utf8(s))
+	}
+	function hex_md5(s) {
+		return rstr2hex(raw_md5(s))
+	}
+	function raw_hmac_md5(k, d) {
+		return rstr_hmac_md5(str2rstr_utf8(k), str2rstr_utf8(d))
+	}
+	function hex_hmac_md5(k, d) {
+		return rstr2hex(raw_hmac_md5(k, d))
+	}
+
+	function md5(string, key, raw) {
+		if (!key) {
+			if (!raw) {
+				return hex_md5(string)
+			}
+			return raw_md5(string)
+		}
+		if (!raw) {
+			return hex_hmac_md5(key, string)
+		}
+		return raw_hmac_md5(key, string)
+	}
+
+	module.exports = md5;
+}(this))

+ 196 - 0
js/pathto64.js

@@ -0,0 +1,196 @@
+function getLocalFilePath(path) {
+    if (path.indexOf('_www') === 0 || path.indexOf('_doc') === 0 || path.indexOf('_documents') === 0 || path.indexOf('_downloads') === 0) {
+        return path
+    }
+    if (path.indexOf('file://') === 0) {
+        return path
+    }
+    if (path.indexOf('/storage/emulated/0/') === 0) {
+        return path
+    }
+    if (path.indexOf('/') === 0) {
+        var localFilePath = plus.io.convertAbsoluteFileSystem(path)
+        if (localFilePath !== path) {
+            return localFilePath
+        } else {
+            path = path.substr(1)
+        }
+    }
+    return '_www/' + path
+}
+
+function dataUrlToBase64(str) {
+    var array = str.split(',')
+    return array[array.length - 1]
+}
+
+var index = 0
+function getNewFileId() {
+    return Date.now() + String(index++)
+}
+
+function biggerThan(v1, v2) {
+    var v1Array = v1.split('.')
+    var v2Array = v2.split('.')
+    var update = false
+    for (var index = 0; index < v2Array.length; index++) {
+        var diff = v1Array[index] - v2Array[index]
+        if (diff !== 0) {
+            update = diff > 0
+            break
+        }
+    }
+    return update
+}
+
+export function pathToBase64(path) {
+    return new Promise(function(resolve, reject) {
+        if (typeof window === 'object' && 'document' in window) {
+            if (typeof FileReader === 'function') {
+                var xhr = new XMLHttpRequest()
+                xhr.open('GET', path, true)
+                xhr.responseType = 'blob'
+                xhr.onload = function() {
+                    if (this.status === 200) {
+                        let fileReader = new FileReader()
+                        fileReader.onload = function(e) {
+                            resolve(e.target.result)
+                        }
+                        fileReader.onerror = reject
+                        fileReader.readAsDataURL(this.response)
+                    }
+                }
+                xhr.onerror = reject
+                xhr.send()
+                return
+            }
+            var canvas = document.createElement('canvas')
+            var c2x = canvas.getContext('2d')
+            var img = new Image
+            img.onload = function() {
+                canvas.width = img.width
+                canvas.height = img.height
+                c2x.drawImage(img, 0, 0)
+                resolve(canvas.toDataURL())
+                canvas.height = canvas.width = 0
+            }
+            img.onerror = reject
+            img.src = path
+            return
+        }
+        if (typeof plus === 'object') {
+            plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), function(entry) {
+                entry.file(function(file) {
+                    var fileReader = new plus.io.FileReader()
+                    fileReader.onload = function(data) {
+                        resolve(data.target.result)
+                    }
+                    fileReader.onerror = function(error) {
+                        reject(error)
+                    }
+                    fileReader.readAsDataURL(file)
+                }, function(error) {
+                    reject(error)
+                })
+            }, function(error) {
+                reject(error)
+            })
+            return
+        }
+        if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) {
+            wx.getFileSystemManager().readFile({
+                filePath: path,
+                encoding: 'base64',
+                success: function(res) {
+                    resolve('data:image/png;base64,' + res.data)
+                },
+                fail: function(error) {
+                    reject(error)
+                }
+            })
+            return
+        }
+        reject(new Error('not support'))
+    })
+}
+
+export function base64ToPath(base64) {
+    return new Promise(function(resolve, reject) {
+        if (typeof window === 'object' && 'document' in window) {
+            base64 = base64.split(',')
+            var type = base64[0].match(/:(.*?);/)[1]
+            var str = atob(base64[1])
+            var n = str.length
+            var array = new Uint8Array(n)
+            while (n--) {
+                array[n] = str.charCodeAt(n)
+            }
+            return resolve((window.URL || window.webkitURL).createObjectURL(new Blob([array], { type: type })))
+        }
+        var extName = base64.split(',')[0].match(/data\:\S+\/(\S+);/)
+        if (extName) {
+            extName = extName[1]
+        } else {
+            reject(new Error('base64 error'))
+        }
+        var fileName = getNewFileId() + '.' + extName
+        if (typeof plus === 'object') {
+            var basePath = '_doc'
+            var dirPath = 'uniapp_temp'
+            var filePath = basePath + '/' + dirPath + '/' + fileName
+            if (!biggerThan(plus.os.name === 'Android' ? '1.9.9.80627' : '1.9.9.80472', plus.runtime.innerVersion)) {
+                plus.io.resolveLocalFileSystemURL(basePath, function(entry) {
+                    entry.getDirectory(dirPath, {
+                        create: true,
+                        exclusive: false,
+                    }, function(entry) {
+                        entry.getFile(fileName, {
+                            create: true,
+                            exclusive: false,
+                        }, function(entry) {
+                            entry.createWriter(function(writer) {
+                                writer.onwrite = function() {
+                                    resolve(filePath)
+                                }
+                                writer.onerror = reject
+                                writer.seek(0)
+                                writer.writeAsBinary(dataUrlToBase64(base64))
+                            }, reject)
+                        }, reject)
+                    }, reject)
+                }, reject)
+                return
+            }
+            var bitmap = new plus.nativeObj.Bitmap(fileName)
+            bitmap.loadBase64Data(base64, function() {
+                bitmap.save(filePath, {}, function() {
+                    bitmap.clear()
+                    resolve(filePath)
+                }, function(error) {
+                    bitmap.clear()
+                    reject(error)
+                })
+            }, function(error) {
+                bitmap.clear()
+                reject(error)
+            })
+            return
+        }
+        if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) {
+            var filePath = wx.env.USER_DATA_PATH + '/' + fileName
+            wx.getFileSystemManager().writeFile({
+                filePath: filePath,
+                data: dataUrlToBase64(base64),
+                encoding: 'base64',
+                success: function() {
+                    resolve(filePath)
+                },
+                fail: function(error) {
+                    reject(error)
+                }
+            })
+            return
+        }
+        reject(new Error('not support'))
+    })
+}

+ 1545 - 0
js/underscore.js

@@ -0,0 +1,1545 @@
+//     Underscore.js 1.8.2
+//     http://underscorejs.org
+//     (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+//     Underscore may be freely distributed under the MIT license.
+
+(function () {
+
+	// Baseline setup
+	// --------------
+
+	// Establish the root object, `window` in the browser, or `exports` on the server.
+	//   var root = this;
+
+	//   // Save the previous value of the `_` variable.
+	//   var previousUnderscore = root._;
+
+	// Save bytes in the minified (but not gzipped) version:
+	var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
+
+	// Create quick reference variables for speed access to core prototypes.
+	var
+		push = ArrayProto.push,
+		slice = ArrayProto.slice,
+		toString = ObjProto.toString,
+		hasOwnProperty = ObjProto.hasOwnProperty;
+
+	// All **ECMAScript 5** native function implementations that we hope to use
+	// are declared here.
+	var
+		nativeIsArray = Array.isArray,
+		nativeKeys = Object.keys,
+		nativeBind = FuncProto.bind,
+		nativeCreate = Object.create;
+
+	// Naked function reference for surrogate-prototype-swapping.
+	var Ctor = function () { };
+
+	// Create a safe reference to the Underscore object for use below.
+	var _ = function (obj) {
+		if (obj instanceof _) return obj;
+		if (!(this instanceof _)) return new _(obj);
+		this._wrapped = obj;
+	};
+
+	// Export the Underscore object for **Node.js**, with
+	// backwards-compatibility for the old `require()` API. If we're in
+	// the browser, add `_` as a global object.
+	//   if (typeof exports !== 'undefined') {
+	//     if (typeof module !== 'undefined' && module.exports) {
+	//       exports = module.exports = _;
+	//     }
+	//     exports._ = _;
+	//   } else {
+	//     root._ = _;
+	//   }
+	module.exports = _;
+	// Current version.
+	_.VERSION = '1.8.2';
+
+	// Internal function that returns an efficient (for current engines) version
+	// of the passed-in callback, to be repeatedly applied in other Underscore
+	// functions.
+	var optimizeCb = function (func, context, argCount) {
+		if (context === void 0) return func;
+		switch (argCount == null ? 3 : argCount) {
+			case 1: return function (value) {
+				return func.call(context, value);
+			};
+			case 2: return function (value, other) {
+				return func.call(context, value, other);
+			};
+			case 3: return function (value, index, collection) {
+				return func.call(context, value, index, collection);
+			};
+			case 4: return function (accumulator, value, index, collection) {
+				return func.call(context, accumulator, value, index, collection);
+			};
+		}
+		return function () {
+			return func.apply(context, arguments);
+		};
+	};
+
+	// A mostly-internal function to generate callbacks that can be applied
+	// to each element in a collection, returning the desired result 鈥� either
+	// identity, an arbitrary callback, a property matcher, or a property accessor.
+	var cb = function (value, context, argCount) {
+		if (value == null) return _.identity;
+		if (_.isFunction(value)) return optimizeCb(value, context, argCount);
+		if (_.isObject(value)) return _.matcher(value);
+		return _.property(value);
+	};
+	_.iteratee = function (value, context) {
+		return cb(value, context, Infinity);
+	};
+
+	// An internal function for creating assigner functions.
+	var createAssigner = function (keysFunc, undefinedOnly) {
+		return function (obj) {
+			var length = arguments.length;
+			if (length < 2 || obj == null) return obj;
+			for (var index = 1; index < length; index++) {
+				var source = arguments[index],
+					keys = keysFunc(source),
+					l = keys.length;
+				for (var i = 0; i < l; i++) {
+					var key = keys[i];
+					if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key];
+				}
+			}
+			return obj;
+		};
+	};
+
+	// An internal function for creating a new object that inherits from another.
+	var baseCreate = function (prototype) {
+		if (!_.isObject(prototype)) return {};
+		if (nativeCreate) return nativeCreate(prototype);
+		Ctor.prototype = prototype;
+		var result = new Ctor;
+		Ctor.prototype = null;
+		return result;
+	};
+
+	// Helper for collection methods to determine whether a collection
+	// should be iterated as an array or as an object
+	// Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
+	var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
+	var isArrayLike = function (collection) {
+		var length = collection != null && collection.length;
+		return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;
+	};
+
+	// Collection Functions
+	// --------------------
+
+	// The cornerstone, an `each` implementation, aka `forEach`.
+	// Handles raw objects in addition to array-likes. Treats all
+	// sparse array-likes as if they were dense.
+	_.each = _.forEach = function (obj, iteratee, context) {
+		iteratee = optimizeCb(iteratee, context);
+		var i, length;
+		if (isArrayLike(obj)) {
+			for (i = 0, length = obj.length; i < length; i++) {
+				iteratee(obj[i], i, obj);
+			}
+		} else {
+			var keys = _.keys(obj);
+			for (i = 0, length = keys.length; i < length; i++) {
+				iteratee(obj[keys[i]], keys[i], obj);
+			}
+		}
+		return obj;
+	};
+
+	// Return the results of applying the iteratee to each element.
+	_.map = _.collect = function (obj, iteratee, context) {
+		iteratee = cb(iteratee, context);
+		var keys = !isArrayLike(obj) && _.keys(obj),
+			length = (keys || obj).length,
+			results = Array(length);
+		for (var index = 0; index < length; index++) {
+			var currentKey = keys ? keys[index] : index;
+			results[index] = iteratee(obj[currentKey], currentKey, obj);
+		}
+		return results;
+	};
+
+	// Create a reducing function iterating left or right.
+	function createReduce(dir) {
+		// Optimized iterator function as using arguments.length
+		// in the main function will deoptimize the, see #1991.
+		function iterator(obj, iteratee, memo, keys, index, length) {
+			for (; index >= 0 && index < length; index += dir) {
+				var currentKey = keys ? keys[index] : index;
+				memo = iteratee(memo, obj[currentKey], currentKey, obj);
+			}
+			return memo;
+		}
+
+		return function (obj, iteratee, memo, context) {
+			iteratee = optimizeCb(iteratee, context, 4);
+			var keys = !isArrayLike(obj) && _.keys(obj),
+				length = (keys || obj).length,
+				index = dir > 0 ? 0 : length - 1;
+			// Determine the initial value if none is provided.
+			if (arguments.length < 3) {
+				memo = obj[keys ? keys[index] : index];
+				index += dir;
+			}
+			return iterator(obj, iteratee, memo, keys, index, length);
+		};
+	}
+
+	// **Reduce** builds up a single result from a list of values, aka `inject`,
+	// or `foldl`.
+	_.reduce = _.foldl = _.inject = createReduce(1);
+
+	// The right-associative version of reduce, also known as `foldr`.
+	_.reduceRight = _.foldr = createReduce(-1);
+
+	// Return the first value which passes a truth test. Aliased as `detect`.
+	_.find = _.detect = function (obj, predicate, context) {
+		var key;
+		if (isArrayLike(obj)) {
+			key = _.findIndex(obj, predicate, context);
+		} else {
+			key = _.findKey(obj, predicate, context);
+		}
+		if (key !== void 0 && key !== -1) return obj[key];
+	};
+
+	// Return all the elements that pass a truth test.
+	// Aliased as `select`.
+	_.filter = _.select = function (obj, predicate, context) {
+		var results = [];
+		predicate = cb(predicate, context);
+		_.each(obj, function (value, index, list) {
+			if (predicate(value, index, list)) results.push(value);
+		});
+		return results;
+	};
+
+	// Return all the elements for which a truth test fails.
+	_.reject = function (obj, predicate, context) {
+		return _.filter(obj, _.negate(cb(predicate)), context);
+	};
+
+	// Determine whether all of the elements match a truth test.
+	// Aliased as `all`.
+	_.every = _.all = function (obj, predicate, context) {
+		predicate = cb(predicate, context);
+		var keys = !isArrayLike(obj) && _.keys(obj),
+			length = (keys || obj).length;
+		for (var index = 0; index < length; index++) {
+			var currentKey = keys ? keys[index] : index;
+			if (!predicate(obj[currentKey], currentKey, obj)) return false;
+		}
+		return true;
+	};
+
+	// Determine if at least one element in the object matches a truth test.
+	// Aliased as `any`.
+	_.some = _.any = function (obj, predicate, context) {
+		predicate = cb(predicate, context);
+		var keys = !isArrayLike(obj) && _.keys(obj),
+			length = (keys || obj).length;
+		for (var index = 0; index < length; index++) {
+			var currentKey = keys ? keys[index] : index;
+			if (predicate(obj[currentKey], currentKey, obj)) return true;
+		}
+		return false;
+	};
+
+	// Determine if the array or object contains a given value (using `===`).
+	// Aliased as `includes` and `include`.
+	_.contains = _.includes = _.include = function (obj, target, fromIndex) {
+		if (!isArrayLike(obj)) obj = _.values(obj);
+		return _.indexOf(obj, target, typeof fromIndex == 'number' && fromIndex) >= 0;
+	};
+
+	// Invoke a method (with arguments) on every item in a collection.
+	_.invoke = function (obj, method) {
+		var args = slice.call(arguments, 2);
+		var isFunc = _.isFunction(method);
+		return _.map(obj, function (value) {
+			var func = isFunc ? method : value[method];
+			return func == null ? func : func.apply(value, args);
+		});
+	};
+
+	// Convenience version of a common use case of `map`: fetching a property.
+	_.pluck = function (obj, key) {
+		return _.map(obj, _.property(key));
+	};
+
+	// Convenience version of a common use case of `filter`: selecting only objects
+	// containing specific `key:value` pairs.
+	_.where = function (obj, attrs) {
+		return _.filter(obj, _.matcher(attrs));
+	};
+
+	// Convenience version of a common use case of `find`: getting the first object
+	// containing specific `key:value` pairs.
+	_.findWhere = function (obj, attrs) {
+		return _.find(obj, _.matcher(attrs));
+	};
+
+	// Return the maximum element (or element-based computation).
+	_.max = function (obj, iteratee, context) {
+		var result = -Infinity, lastComputed = -Infinity,
+			value, computed;
+		if (iteratee == null && obj != null) {
+			obj = isArrayLike(obj) ? obj : _.values(obj);
+			for (var i = 0, length = obj.length; i < length; i++) {
+				value = obj[i];
+				if (value > result) {
+					result = value;
+				}
+			}
+		} else {
+			iteratee = cb(iteratee, context);
+			_.each(obj, function (value, index, list) {
+				computed = iteratee(value, index, list);
+				if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
+					result = value;
+					lastComputed = computed;
+				}
+			});
+		}
+		return result;
+	};
+
+	// Return the minimum element (or element-based computation).
+	_.min = function (obj, iteratee, context) {
+		var result = Infinity, lastComputed = Infinity,
+			value, computed;
+		if (iteratee == null && obj != null) {
+			obj = isArrayLike(obj) ? obj : _.values(obj);
+			for (var i = 0, length = obj.length; i < length; i++) {
+				value = obj[i];
+				if (value < result) {
+					result = value;
+				}
+			}
+		} else {
+			iteratee = cb(iteratee, context);
+			_.each(obj, function (value, index, list) {
+				computed = iteratee(value, index, list);
+				if (computed < lastComputed || computed === Infinity && result === Infinity) {
+					result = value;
+					lastComputed = computed;
+				}
+			});
+		}
+		return result;
+	};
+
+	// Shuffle a collection, using the modern version of the
+	// [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher鈥揧ates_shuffle).
+	_.shuffle = function (obj) {
+		var set = isArrayLike(obj) ? obj : _.values(obj);
+		var length = set.length;
+		var shuffled = Array(length);
+		for (var index = 0, rand; index < length; index++) {
+			rand = _.random(0, index);
+			if (rand !== index) shuffled[index] = shuffled[rand];
+			shuffled[rand] = set[index];
+		}
+		return shuffled;
+	};
+
+	// Sample **n** random values from a collection.
+	// If **n** is not specified, returns a single random element.
+	// The internal `guard` argument allows it to work with `map`.
+	_.sample = function (obj, n, guard) {
+		if (n == null || guard) {
+			if (!isArrayLike(obj)) obj = _.values(obj);
+			return obj[_.random(obj.length - 1)];
+		}
+		return _.shuffle(obj).slice(0, Math.max(0, n));
+	};
+
+	// Sort the object's values by a criterion produced by an iteratee.
+	_.sortBy = function (obj, iteratee, context) {
+		iteratee = cb(iteratee, context);
+		return _.pluck(_.map(obj, function (value, index, list) {
+			return {
+				value: value,
+				index: index,
+				criteria: iteratee(value, index, list)
+			};
+		}).sort(function (left, right) {
+			var a = left.criteria;
+			var b = right.criteria;
+			if (a !== b) {
+				if (a > b || a === void 0) return 1;
+				if (a < b || b === void 0) return -1;
+			}
+			return left.index - right.index;
+		}), 'value');
+	};
+
+	// An internal function used for aggregate "group by" operations.
+	var group = function (behavior) {
+		return function (obj, iteratee, context) {
+			var result = {};
+			iteratee = cb(iteratee, context);
+			_.each(obj, function (value, index) {
+				var key = iteratee(value, index, obj);
+				behavior(result, value, key);
+			});
+			return result;
+		};
+	};
+
+	// Groups the object's values by a criterion. Pass either a string attribute
+	// to group by, or a function that returns the criterion.
+	_.groupBy = group(function (result, value, key) {
+		if (_.has(result, key)) result[key].push(value); else result[key] = [value];
+	});
+
+	// Indexes the object's values by a criterion, similar to `groupBy`, but for
+	// when you know that your index values will be unique.
+	_.indexBy = group(function (result, value, key) {
+		result[key] = value;
+	});
+
+	// Counts instances of an object that group by a certain criterion. Pass
+	// either a string attribute to count by, or a function that returns the
+	// criterion.
+	_.countBy = group(function (result, value, key) {
+		if (_.has(result, key)) result[key]++; else result[key] = 1;
+	});
+
+	// Safely create a real, live array from anything iterable.
+	_.toArray = function (obj) {
+		if (!obj) return [];
+		if (_.isArray(obj)) return slice.call(obj);
+		if (isArrayLike(obj)) return _.map(obj, _.identity);
+		return _.values(obj);
+	};
+
+	// Return the number of elements in an object.
+	_.size = function (obj) {
+		if (obj == null) return 0;
+		return isArrayLike(obj) ? obj.length : _.keys(obj).length;
+	};
+
+	// Split a collection into two arrays: one whose elements all satisfy the given
+	// predicate, and one whose elements all do not satisfy the predicate.
+	_.partition = function (obj, predicate, context) {
+		predicate = cb(predicate, context);
+		var pass = [], fail = [];
+		_.each(obj, function (value, key, obj) {
+			(predicate(value, key, obj) ? pass : fail).push(value);
+		});
+		return [pass, fail];
+	};
+
+	// Array Functions
+	// ---------------
+
+	// Get the first element of an array. Passing **n** will return the first N
+	// values in the array. Aliased as `head` and `take`. The **guard** check
+	// allows it to work with `_.map`.
+	_.first = _.head = _.take = function (array, n, guard) {
+		if (array == null) return void 0;
+		if (n == null || guard) return array[0];
+		return _.initial(array, array.length - n);
+	};
+
+	// Returns everything but the last entry of the array. Especially useful on
+	// the arguments object. Passing **n** will return all the values in
+	// the array, excluding the last N.
+	_.initial = function (array, n, guard) {
+		return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
+	};
+
+	// Get the last element of an array. Passing **n** will return the last N
+	// values in the array.
+	_.last = function (array, n, guard) {
+		if (array == null) return void 0;
+		if (n == null || guard) return array[array.length - 1];
+		return _.rest(array, Math.max(0, array.length - n));
+	};
+
+	// Returns everything but the first entry of the array. Aliased as `tail` and `drop`.
+	// Especially useful on the arguments object. Passing an **n** will return
+	// the rest N values in the array.
+	_.rest = _.tail = _.drop = function (array, n, guard) {
+		return slice.call(array, n == null || guard ? 1 : n);
+	};
+
+	// Trim out all falsy values from an array.
+	_.compact = function (array) {
+		return _.filter(array, _.identity);
+	};
+
+	// Internal implementation of a recursive `flatten` function.
+	var flatten = function (input, shallow, strict, startIndex) {
+		var output = [], idx = 0;
+		for (var i = startIndex || 0, length = input && input.length; i < length; i++) {
+			var value = input[i];
+			if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {
+				//flatten current level of array or arguments object
+				if (!shallow) value = flatten(value, shallow, strict);
+				var j = 0, len = value.length;
+				output.length += len;
+				while (j < len) {
+					output[idx++] = value[j++];
+				}
+			} else if (!strict) {
+				output[idx++] = value;
+			}
+		}
+		return output;
+	};
+
+	// Flatten out an array, either recursively (by default), or just one level.
+	_.flatten = function (array, shallow) {
+		return flatten(array, shallow, false);
+	};
+
+	// Return a version of the array that does not contain the specified value(s).
+	_.without = function (array) {
+		return _.difference(array, slice.call(arguments, 1));
+	};
+
+	// Produce a duplicate-free version of the array. If the array has already
+	// been sorted, you have the option of using a faster algorithm.
+	// Aliased as `unique`.
+	_.uniq = _.unique = function (array, isSorted, iteratee, context) {
+		if (array == null) return [];
+		if (!_.isBoolean(isSorted)) {
+			context = iteratee;
+			iteratee = isSorted;
+			isSorted = false;
+		}
+		if (iteratee != null) iteratee = cb(iteratee, context);
+		var result = [];
+		var seen = [];
+		for (var i = 0, length = array.length; i < length; i++) {
+			var value = array[i],
+				computed = iteratee ? iteratee(value, i, array) : value;
+			if (isSorted) {
+				if (!i || seen !== computed) result.push(value);
+				seen = computed;
+			} else if (iteratee) {
+				if (!_.contains(seen, computed)) {
+					seen.push(computed);
+					result.push(value);
+				}
+			} else if (!_.contains(result, value)) {
+				result.push(value);
+			}
+		}
+		return result;
+	};
+
+	// Produce an array that contains the union: each distinct element from all of
+	// the passed-in arrays.
+	_.union = function () {
+		return _.uniq(flatten(arguments, true, true));
+	};
+
+	// Produce an array that contains every item shared between all the
+	// passed-in arrays.
+	_.intersection = function (array) {
+		if (array == null) return [];
+		var result = [];
+		var argsLength = arguments.length;
+		for (var i = 0, length = array.length; i < length; i++) {
+			var item = array[i];
+			if (_.contains(result, item)) continue;
+			for (var j = 1; j < argsLength; j++) {
+				if (!_.contains(arguments[j], item)) break;
+			}
+			if (j === argsLength) result.push(item);
+		}
+		return result;
+	};
+
+	// Take the difference between one array and a number of other arrays.
+	// Only the elements present in just the first array will remain.
+	_.difference = function (array) {
+		var rest = flatten(arguments, true, true, 1);
+		return _.filter(array, function (value) {
+			return !_.contains(rest, value);
+		});
+	};
+
+	// Zip together multiple lists into a single array -- elements that share
+	// an index go together.
+	_.zip = function () {
+		return _.unzip(arguments);
+	};
+
+	// Complement of _.zip. Unzip accepts an array of arrays and groups
+	// each array's elements on shared indices
+	_.unzip = function (array) {
+		var length = array && _.max(array, 'length').length || 0;
+		var result = Array(length);
+
+		for (var index = 0; index < length; index++) {
+			result[index] = _.pluck(array, index);
+		}
+		return result;
+	};
+
+	// Converts lists into objects. Pass either a single array of `[key, value]`
+	// pairs, or two parallel arrays of the same length -- one of keys, and one of
+	// the corresponding values.
+	_.object = function (list, values) {
+		var result = {};
+		for (var i = 0, length = list && list.length; i < length; i++) {
+			if (values) {
+				result[list[i]] = values[i];
+			} else {
+				result[list[i][0]] = list[i][1];
+			}
+		}
+		return result;
+	};
+
+	// Return the position of the first occurrence of an item in an array,
+	// or -1 if the item is not included in the array.
+	// If the array is large and already in sort order, pass `true`
+	// for **isSorted** to use binary search.
+	_.indexOf = function (array, item, isSorted) {
+		var i = 0, length = array && array.length;
+		if (typeof isSorted == 'number') {
+			i = isSorted < 0 ? Math.max(0, length + isSorted) : isSorted;
+		} else if (isSorted && length) {
+			i = _.sortedIndex(array, item);
+			return array[i] === item ? i : -1;
+		}
+		if (item !== item) {
+			return _.findIndex(slice.call(array, i), _.isNaN);
+		}
+		for (; i < length; i++) if (array[i] === item) return i;
+		return -1;
+	};
+
+	_.lastIndexOf = function (array, item, from) {
+		var idx = array ? array.length : 0;
+		if (typeof from == 'number') {
+			idx = from < 0 ? idx + from + 1 : Math.min(idx, from + 1);
+		}
+		if (item !== item) {
+			return _.findLastIndex(slice.call(array, 0, idx), _.isNaN);
+		}
+		while (--idx >= 0) if (array[idx] === item) return idx;
+		return -1;
+	};
+
+	// Generator function to create the findIndex and findLastIndex functions
+	function createIndexFinder(dir) {
+		return function (array, predicate, context) {
+			predicate = cb(predicate, context);
+			var length = array != null && array.length;
+			var index = dir > 0 ? 0 : length - 1;
+			for (; index >= 0 && index < length; index += dir) {
+				if (predicate(array[index], index, array)) return index;
+			}
+			return -1;
+		};
+	}
+
+	// Returns the first index on an array-like that passes a predicate test
+	_.findIndex = createIndexFinder(1);
+
+	_.findLastIndex = createIndexFinder(-1);
+
+	// Use a comparator function to figure out the smallest index at which
+	// an object should be inserted so as to maintain order. Uses binary search.
+	_.sortedIndex = function (array, obj, iteratee, context) {
+		iteratee = cb(iteratee, context, 1);
+		var value = iteratee(obj);
+		var low = 0, high = array.length;
+		while (low < high) {
+			var mid = Math.floor((low + high) / 2);
+			if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
+		}
+		return low;
+	};
+
+	// Generate an integer Array containing an arithmetic progression. A port of
+	// the native Python `range()` function. See
+	// [the Python documentation](http://docs.python.org/library/functions.html#range).
+	_.range = function (start, stop, step) {
+		if (arguments.length <= 1) {
+			stop = start || 0;
+			start = 0;
+		}
+		step = step || 1;
+
+		var length = Math.max(Math.ceil((stop - start) / step), 0);
+		var range = Array(length);
+
+		for (var idx = 0; idx < length; idx++ , start += step) {
+			range[idx] = start;
+		}
+
+		return range;
+	};
+
+	// Function (ahem) Functions
+	// ------------------
+
+	// Determines whether to execute a function as a constructor
+	// or a normal function with the provided arguments
+	var executeBound = function (sourceFunc, boundFunc, context, callingContext, args) {
+		if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
+		var self = baseCreate(sourceFunc.prototype);
+		var result = sourceFunc.apply(self, args);
+		if (_.isObject(result)) return result;
+		return self;
+	};
+
+	// Create a function bound to a given object (assigning `this`, and arguments,
+	// optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if
+	// available.
+	_.bind = function (func, context) {
+		if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
+		if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');
+		var args = slice.call(arguments, 2);
+		var bound = function () {
+			return executeBound(func, bound, context, this, args.concat(slice.call(arguments)));
+		};
+		return bound;
+	};
+
+	// Partially apply a function by creating a version that has had some of its
+	// arguments pre-filled, without changing its dynamic `this` context. _ acts
+	// as a placeholder, allowing any combination of arguments to be pre-filled.
+	_.partial = function (func) {
+		var boundArgs = slice.call(arguments, 1);
+		var bound = function () {
+			var position = 0, length = boundArgs.length;
+			var args = Array(length);
+			for (var i = 0; i < length; i++) {
+				args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i];
+			}
+			while (position < arguments.length) args.push(arguments[position++]);
+			return executeBound(func, bound, this, this, args);
+		};
+		return bound;
+	};
+
+	// Bind a number of an object's methods to that object. Remaining arguments
+	// are the method names to be bound. Useful for ensuring that all callbacks
+	// defined on an object belong to it.
+	_.bindAll = function (obj) {
+		var i, length = arguments.length, key;
+		if (length <= 1) throw new Error('bindAll must be passed function names');
+		for (i = 1; i < length; i++) {
+			key = arguments[i];
+			obj[key] = _.bind(obj[key], obj);
+		}
+		return obj;
+	};
+
+	// Memoize an expensive function by storing its results.
+	_.memoize = function (func, hasher) {
+		var memoize = function (key) {
+			var cache = memoize.cache;
+			var address = '' + (hasher ? hasher.apply(this, arguments) : key);
+			if (!_.has(cache, address)) cache[address] = func.apply(this, arguments);
+			return cache[address];
+		};
+		memoize.cache = {};
+		return memoize;
+	};
+
+	// Delays a function for the given number of milliseconds, and then calls
+	// it with the arguments supplied.
+	_.delay = function (func, wait) {
+		var args = slice.call(arguments, 2);
+		return setTimeout(function () {
+			return func.apply(null, args);
+		}, wait);
+	};
+
+	// Defers a function, scheduling it to run after the current call stack has
+	// cleared.
+	_.defer = _.partial(_.delay, _, 1);
+
+	// Returns a function, that, when invoked, will only be triggered at most once
+	// during a given window of time. Normally, the throttled function will run
+	// as much as it can, without ever going more than once per `wait` duration;
+	// but if you'd like to disable the execution on the leading edge, pass
+	// `{leading: false}`. To disable execution on the trailing edge, ditto.
+	_.throttle = function (func, wait, options) {
+		var context, args, result;
+		var timeout = null;
+		var previous = 0;
+		if (!options) options = {};
+		var later = function () {
+			previous = options.leading === false ? 0 : _.now();
+			timeout = null;
+			result = func.apply(context, args);
+			if (!timeout) context = args = null;
+		};
+		return function () {
+			var now = _.now();
+			if (!previous && options.leading === false) previous = now;
+			var remaining = wait - (now - previous);
+			context = this;
+			args = arguments;
+			if (remaining <= 0 || remaining > wait) {
+				if (timeout) {
+					clearTimeout(timeout);
+					timeout = null;
+				}
+				previous = now;
+				result = func.apply(context, args);
+				if (!timeout) context = args = null;
+			} else if (!timeout && options.trailing !== false) {
+				timeout = setTimeout(later, remaining);
+			}
+			return result;
+		};
+	};
+
+	// Returns a function, that, as long as it continues to be invoked, will not
+	// be triggered. The function will be called after it stops being called for
+	// N milliseconds. If `immediate` is passed, trigger the function on the
+	// leading edge, instead of the trailing.
+	_.debounce = function (func, wait, immediate) {
+		var timeout, args, context, timestamp, result;
+
+		var later = function () {
+			var last = _.now() - timestamp;
+
+			if (last < wait && last >= 0) {
+				timeout = setTimeout(later, wait - last);
+			} else {
+				timeout = null;
+				if (!immediate) {
+					result = func.apply(context, args);
+					if (!timeout) context = args = null;
+				}
+			}
+		};
+
+		return function () {
+			context = this;
+			args = arguments;
+			timestamp = _.now();
+			var callNow = immediate && !timeout;
+			if (!timeout) timeout = setTimeout(later, wait);
+			if (callNow) {
+				result = func.apply(context, args);
+				context = args = null;
+			}
+
+			return result;
+		};
+	};
+
+	// Returns the first function passed as an argument to the second,
+	// allowing you to adjust arguments, run code before and after, and
+	// conditionally execute the original function.
+	_.wrap = function (func, wrapper) {
+		return _.partial(wrapper, func);
+	};
+
+	// Returns a negated version of the passed-in predicate.
+	_.negate = function (predicate) {
+		return function () {
+			return !predicate.apply(this, arguments);
+		};
+	};
+
+	// Returns a function that is the composition of a list of functions, each
+	// consuming the return value of the function that follows.
+	_.compose = function () {
+		var args = arguments;
+		var start = args.length - 1;
+		return function () {
+			var i = start;
+			var result = args[start].apply(this, arguments);
+			while (i--) result = args[i].call(this, result);
+			return result;
+		};
+	};
+
+	// Returns a function that will only be executed on and after the Nth call.
+	_.after = function (times, func) {
+		return function () {
+			if (--times < 1) {
+				return func.apply(this, arguments);
+			}
+		};
+	};
+
+	// Returns a function that will only be executed up to (but not including) the Nth call.
+	_.before = function (times, func) {
+		var memo;
+		return function () {
+			if (--times > 0) {
+				memo = func.apply(this, arguments);
+			}
+			if (times <= 1) func = null;
+			return memo;
+		};
+	};
+
+	// Returns a function that will be executed at most one time, no matter how
+	// often you call it. Useful for lazy initialization.
+	_.once = _.partial(_.before, 2);
+
+	// Object Functions
+	// ----------------
+
+	// Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.
+	var hasEnumBug = !{ toString: null }.propertyIsEnumerable('toString');
+	var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
+		'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
+
+	function collectNonEnumProps(obj, keys) {
+		var nonEnumIdx = nonEnumerableProps.length;
+		var constructor = obj.constructor;
+		var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto;
+
+		// Constructor is a special case.
+		var prop = 'constructor';
+		if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);
+
+		while (nonEnumIdx--) {
+			prop = nonEnumerableProps[nonEnumIdx];
+			if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {
+				keys.push(prop);
+			}
+		}
+	}
+
+	// Retrieve the names of an object's own properties.
+	// Delegates to **ECMAScript 5**'s native `Object.keys`
+	_.keys = function (obj) {
+		if (!_.isObject(obj)) return [];
+		if (nativeKeys) return nativeKeys(obj);
+		var keys = [];
+		for (var key in obj) if (_.has(obj, key)) keys.push(key);
+		// Ahem, IE < 9.
+		if (hasEnumBug) collectNonEnumProps(obj, keys);
+		return keys;
+	};
+
+	// Retrieve all the property names of an object.
+	_.allKeys = function (obj) {
+		if (!_.isObject(obj)) return [];
+		var keys = [];
+		for (var key in obj) keys.push(key);
+		// Ahem, IE < 9.
+		if (hasEnumBug) collectNonEnumProps(obj, keys);
+		return keys;
+	};
+
+	// Retrieve the values of an object's properties.
+	_.values = function (obj) {
+		var keys = _.keys(obj);
+		var length = keys.length;
+		var values = Array(length);
+		for (var i = 0; i < length; i++) {
+			values[i] = obj[keys[i]];
+		}
+		return values;
+	};
+
+	// Returns the results of applying the iteratee to each element of the object
+	// In contrast to _.map it returns an object
+	_.mapObject = function (obj, iteratee, context) {
+		iteratee = cb(iteratee, context);
+		var keys = _.keys(obj),
+			length = keys.length,
+			results = {},
+			currentKey;
+		for (var index = 0; index < length; index++) {
+			currentKey = keys[index];
+			results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
+		}
+		return results;
+	};
+
+	// Convert an object into a list of `[key, value]` pairs.
+	_.pairs = function (obj) {
+		var keys = _.keys(obj);
+		var length = keys.length;
+		var pairs = Array(length);
+		for (var i = 0; i < length; i++) {
+			pairs[i] = [keys[i], obj[keys[i]]];
+		}
+		return pairs;
+	};
+
+	// Invert the keys and values of an object. The values must be serializable.
+	_.invert = function (obj) {
+		var result = {};
+		var keys = _.keys(obj);
+		for (var i = 0, length = keys.length; i < length; i++) {
+			result[obj[keys[i]]] = keys[i];
+		}
+		return result;
+	};
+
+	// Return a sorted list of the function names available on the object.
+	// Aliased as `methods`
+	_.functions = _.methods = function (obj) {
+		var names = [];
+		for (var key in obj) {
+			if (_.isFunction(obj[key])) names.push(key);
+		}
+		return names.sort();
+	};
+
+	// Extend a given object with all the properties in passed-in object(s).
+	_.extend = createAssigner(_.allKeys);
+
+	// Assigns a given object with all the own properties in the passed-in object(s)
+	// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
+	_.extendOwn = _.assign = createAssigner(_.keys);
+
+	// Returns the first key on an object that passes a predicate test
+	_.findKey = function (obj, predicate, context) {
+		predicate = cb(predicate, context);
+		var keys = _.keys(obj), key;
+		for (var i = 0, length = keys.length; i < length; i++) {
+			key = keys[i];
+			if (predicate(obj[key], key, obj)) return key;
+		}
+	};
+
+	// Return a copy of the object only containing the whitelisted properties.
+	_.pick = function (object, oiteratee, context) {
+		var result = {}, obj = object, iteratee, keys;
+		if (obj == null) return result;
+		if (_.isFunction(oiteratee)) {
+			keys = _.allKeys(obj);
+			iteratee = optimizeCb(oiteratee, context);
+		} else {
+			keys = flatten(arguments, false, false, 1);
+			iteratee = function (value, key, obj) { return key in obj; };
+			obj = Object(obj);
+		}
+		for (var i = 0, length = keys.length; i < length; i++) {
+			var key = keys[i];
+			var value = obj[key];
+			if (iteratee(value, key, obj)) result[key] = value;
+		}
+		return result;
+	};
+
+	// Return a copy of the object without the blacklisted properties.
+	_.omit = function (obj, iteratee, context) {
+		if (_.isFunction(iteratee)) {
+			iteratee = _.negate(iteratee);
+		} else {
+			var keys = _.map(flatten(arguments, false, false, 1), String);
+			iteratee = function (value, key) {
+				return !_.contains(keys, key);
+			};
+		}
+		return _.pick(obj, iteratee, context);
+	};
+
+	// Fill in a given object with default properties.
+	_.defaults = createAssigner(_.allKeys, true);
+
+	// Creates an object that inherits from the given prototype object.
+	// If additional properties are provided then they will be added to the
+	// created object.
+	_.create = function (prototype, props) {
+		var result = baseCreate(prototype);
+		if (props) _.extendOwn(result, props);
+		return result;
+	};
+
+	// Create a (shallow-cloned) duplicate of an object.
+	_.clone = function (obj) {
+		if (!_.isObject(obj)) return obj;
+		return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
+	};
+
+	// Invokes interceptor with the obj, and then returns obj.
+	// The primary purpose of this method is to "tap into" a method chain, in
+	// order to perform operations on intermediate results within the chain.
+	_.tap = function (obj, interceptor) {
+		interceptor(obj);
+		return obj;
+	};
+
+	// Returns whether an object has a given set of `key:value` pairs.
+	_.isMatch = function (object, attrs) {
+		var keys = _.keys(attrs), length = keys.length;
+		if (object == null) return !length;
+		var obj = Object(object);
+		for (var i = 0; i < length; i++) {
+			var key = keys[i];
+			if (attrs[key] !== obj[key] || !(key in obj)) return false;
+		}
+		return true;
+	};
+
+
+	// Internal recursive comparison function for `isEqual`.
+	var eq = function (a, b, aStack, bStack) {
+		// Identical objects are equal. `0 === -0`, but they aren't identical.
+		// See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).
+		if (a === b) return a !== 0 || 1 / a === 1 / b;
+		// A strict comparison is necessary because `null == undefined`.
+		if (a == null || b == null) return a === b;
+		// Unwrap any wrapped objects.
+		if (a instanceof _) a = a._wrapped;
+		if (b instanceof _) b = b._wrapped;
+		// Compare `[[Class]]` names.
+		var className = toString.call(a);
+		if (className !== toString.call(b)) return false;
+		switch (className) {
+			// Strings, numbers, regular expressions, dates, and booleans are compared by value.
+			case '[object RegExp]':
+			// RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
+			case '[object String]':
+				// Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
+				// equivalent to `new String("5")`.
+				return '' + a === '' + b;
+			case '[object Number]':
+				// `NaN`s are equivalent, but non-reflexive.
+				// Object(NaN) is equivalent to NaN
+				if (+a !== +a) return +b !== +b;
+				// An `egal` comparison is performed for other numeric values.
+				return +a === 0 ? 1 / +a === 1 / b : +a === +b;
+			case '[object Date]':
+			case '[object Boolean]':
+				// Coerce dates and booleans to numeric primitive values. Dates are compared by their
+				// millisecond representations. Note that invalid dates with millisecond representations
+				// of `NaN` are not equivalent.
+				return +a === +b;
+		}
+
+		var areArrays = className === '[object Array]';
+		if (!areArrays) {
+			if (typeof a != 'object' || typeof b != 'object') return false;
+
+			// Objects with different constructors are not equivalent, but `Object`s or `Array`s
+			// from different frames are.
+			var aCtor = a.constructor, bCtor = b.constructor;
+			if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&
+				_.isFunction(bCtor) && bCtor instanceof bCtor)
+				&& ('constructor' in a && 'constructor' in b)) {
+				return false;
+			}
+		}
+		// Assume equality for cyclic structures. The algorithm for detecting cyclic
+		// structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
+
+		// Initializing stack of traversed objects.
+		// It's done here since we only need them for objects and arrays comparison.
+		aStack = aStack || [];
+		bStack = bStack || [];
+		var length = aStack.length;
+		while (length--) {
+			// Linear search. Performance is inversely proportional to the number of
+			// unique nested structures.
+			if (aStack[length] === a) return bStack[length] === b;
+		}
+
+		// Add the first object to the stack of traversed objects.
+		aStack.push(a);
+		bStack.push(b);
+
+		// Recursively compare objects and arrays.
+		if (areArrays) {
+			// Compare array lengths to determine if a deep comparison is necessary.
+			length = a.length;
+			if (length !== b.length) return false;
+			// Deep compare the contents, ignoring non-numeric properties.
+			while (length--) {
+				if (!eq(a[length], b[length], aStack, bStack)) return false;
+			}
+		} else {
+			// Deep compare objects.
+			var keys = _.keys(a), key;
+			length = keys.length;
+			// Ensure that both objects contain the same number of properties before comparing deep equality.
+			if (_.keys(b).length !== length) return false;
+			while (length--) {
+				// Deep compare each member
+				key = keys[length];
+				if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
+			}
+		}
+		// Remove the first object from the stack of traversed objects.
+		aStack.pop();
+		bStack.pop();
+		return true;
+	};
+
+	// Perform a deep comparison to check if two objects are equal.
+	_.isEqual = function (a, b) {
+		return eq(a, b);
+	};
+
+	// Is a given array, string, or object empty?
+	// An "empty" object has no enumerable own-properties.
+	_.isEmpty = function (obj) {
+		if (obj == null) return true;
+		if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;
+		return _.keys(obj).length === 0;
+	};
+
+	// Is a given value a DOM element?
+	_.isElement = function (obj) {
+		return !!(obj && obj.nodeType === 1);
+	};
+
+	// Is a given value an array?
+	// Delegates to ECMA5's native Array.isArray
+	_.isArray = nativeIsArray || function (obj) {
+		return toString.call(obj) === '[object Array]';
+	};
+
+	// Is a given variable an object?
+	_.isObject = function (obj) {
+		var type = typeof obj;
+		return type === 'function' || type === 'object' && !!obj;
+	};
+
+	// Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError.
+	_.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function (name) {
+		_['is' + name] = function (obj) {
+			return toString.call(obj) === '[object ' + name + ']';
+		};
+	});
+
+	// Define a fallback version of the method in browsers (ahem, IE < 9), where
+	// there isn't any inspectable "Arguments" type.
+	if (!_.isArguments(arguments)) {
+		_.isArguments = function (obj) {
+			return _.has(obj, 'callee');
+		};
+	}
+
+	// Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,
+	// IE 11 (#1621), and in Safari 8 (#1929).
+	if (typeof /./ != 'function' && typeof Int8Array != 'object') {
+		_.isFunction = function (obj) {
+			return typeof obj == 'function' || false;
+		};
+	}
+
+	// Is a given object a finite number?
+	_.isFinite = function (obj) {
+		return isFinite(obj) && !isNaN(parseFloat(obj));
+	};
+
+	// Is the given value `NaN`? (NaN is the only number which does not equal itself).
+	_.isNaN = function (obj) {
+		return _.isNumber(obj) && obj !== +obj;
+	};
+
+	// Is a given value a boolean?
+	_.isBoolean = function (obj) {
+		return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
+	};
+
+	// Is a given value equal to null?
+	_.isNull = function (obj) {
+		return obj === null;
+	};
+
+	// Is a given variable undefined?
+	_.isUndefined = function (obj) {
+		return obj === void 0;
+	};
+
+	// Shortcut function for checking if an object has a given property directly
+	// on itself (in other words, not on a prototype).
+	_.has = function (obj, key) {
+		return obj != null && hasOwnProperty.call(obj, key);
+	};
+
+	// Utility Functions
+	// -----------------
+
+	// Run Underscore.js in *noConflict* mode, returning the `_` variable to its
+	// previous owner. Returns a reference to the Underscore object.
+	_.noConflict = function () {
+		root._ = previousUnderscore;
+		return this;
+	};
+
+	// Keep the identity function around for default iteratees.
+	_.identity = function (value) {
+		return value;
+	};
+
+	// Predicate-generating functions. Often useful outside of Underscore.
+	_.constant = function (value) {
+		return function () {
+			return value;
+		};
+	};
+
+	_.noop = function () { };
+
+	_.property = function (key) {
+		return function (obj) {
+			return obj == null ? void 0 : obj[key];
+		};
+	};
+
+	// Generates a function for a given object that returns a given property.
+	_.propertyOf = function (obj) {
+		return obj == null ? function () { } : function (key) {
+			return obj[key];
+		};
+	};
+
+	// Returns a predicate for checking whether an object has a given set of 
+	// `key:value` pairs.
+	_.matcher = _.matches = function (attrs) {
+		attrs = _.extendOwn({}, attrs);
+		return function (obj) {
+			return _.isMatch(obj, attrs);
+		};
+	};
+
+	// Run a function **n** times.
+	_.times = function (n, iteratee, context) {
+		var accum = Array(Math.max(0, n));
+		iteratee = optimizeCb(iteratee, context, 1);
+		for (var i = 0; i < n; i++) accum[i] = iteratee(i);
+		return accum;
+	};
+
+	// Return a random integer between min and max (inclusive).
+	_.random = function (min, max) {
+		if (max == null) {
+			max = min;
+			min = 0;
+		}
+		return min + Math.floor(Math.random() * (max - min + 1));
+	};
+
+	// A (possibly faster) way to get the current timestamp as an integer.
+	_.now = Date.now || function () {
+		return new Date().getTime();
+	};
+
+	// List of HTML entities for escaping.
+	var escapeMap = {
+		'&': '&amp;',
+		'<': '&lt;',
+		'>': '&gt;',
+		'"': '&quot;',
+		"'": '&#x27;',
+		'`': '&#x60;'
+	};
+	var unescapeMap = _.invert(escapeMap);
+
+	// Functions for escaping and unescaping strings to/from HTML interpolation.
+	var createEscaper = function (map) {
+		var escaper = function (match) {
+			return map[match];
+		};
+		// Regexes for identifying a key that needs to be escaped
+		var source = '(?:' + _.keys(map).join('|') + ')';
+		var testRegexp = RegExp(source);
+		var replaceRegexp = RegExp(source, 'g');
+		return function (string) {
+			string = string == null ? '' : '' + string;
+			return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
+		};
+	};
+	_.escape = createEscaper(escapeMap);
+	_.unescape = createEscaper(unescapeMap);
+
+	// If the value of the named `property` is a function then invoke it with the
+	// `object` as context; otherwise, return it.
+	_.result = function (object, property, fallback) {
+		var value = object == null ? void 0 : object[property];
+		if (value === void 0) {
+			value = fallback;
+		}
+		return _.isFunction(value) ? value.call(object) : value;
+	};
+
+	// Generate a unique integer id (unique within the entire client session).
+	// Useful for temporary DOM ids.
+	var idCounter = 0;
+	_.uniqueId = function (prefix) {
+		var id = ++idCounter + '';
+		return prefix ? prefix + id : id;
+	};
+
+	// By default, Underscore uses ERB-style template delimiters, change the
+	// following template settings to use alternative delimiters.
+	_.templateSettings = {
+		evaluate: /<%([\s\S]+?)%>/g,
+		interpolate: /<%=([\s\S]+?)%>/g,
+		escape: /<%-([\s\S]+?)%>/g
+	};
+
+	// When customizing `templateSettings`, if you don't want to define an
+	// interpolation, evaluation or escaping regex, we need one that is
+	// guaranteed not to match.
+	var noMatch = /(.)^/;
+
+	// Certain characters need to be escaped so that they can be put into a
+	// string literal.
+	var escapes = {
+		"'": "'",
+		'\\': '\\',
+		'\r': 'r',
+		'\n': 'n',
+		'\u2028': 'u2028',
+		'\u2029': 'u2029'
+	};
+
+	var escaper = /\\|'|\r|\n|\u2028|\u2029/g;
+
+	var escapeChar = function (match) {
+		return '\\' + escapes[match];
+	};
+
+	// JavaScript micro-templating, similar to John Resig's implementation.
+	// Underscore templating handles arbitrary delimiters, preserves whitespace,
+	// and correctly escapes quotes within interpolated code.
+	// NB: `oldSettings` only exists for backwards compatibility.
+	_.template = function (text, settings, oldSettings) {
+		if (!settings && oldSettings) settings = oldSettings;
+		settings = _.defaults({}, settings, _.templateSettings);
+
+		// Combine delimiters into one regular expression via alternation.
+		var matcher = RegExp([
+			(settings.escape || noMatch).source,
+			(settings.interpolate || noMatch).source,
+			(settings.evaluate || noMatch).source
+		].join('|') + '|$', 'g');
+
+		// Compile the template source, escaping string literals appropriately.
+		var index = 0;
+		var source = "__p+='";
+		text.replace(matcher, function (match, escape, interpolate, evaluate, offset) {
+			source += text.slice(index, offset).replace(escaper, escapeChar);
+			index = offset + match.length;
+
+			if (escape) {
+				source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
+			} else if (interpolate) {
+				source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
+			} else if (evaluate) {
+				source += "';\n" + evaluate + "\n__p+='";
+			}
+
+			// Adobe VMs need the match returned to produce the correct offest.
+			return match;
+		});
+		source += "';\n";
+
+		// If a variable is not specified, place data values in local scope.
+		if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
+
+		source = "var __t,__p='',__j=Array.prototype.join," +
+			"print=function(){__p+=__j.call(arguments,'');};\n" +
+			source + 'return __p;\n';
+
+		try {
+			var render = new Function(settings.variable || 'obj', '_', source);
+		} catch (e) {
+			e.source = source;
+			throw e;
+		}
+
+		var template = function (data) {
+			return render.call(this, data, _);
+		};
+
+		// Provide the compiled source as a convenience for precompilation.
+		var argument = settings.variable || 'obj';
+		template.source = 'function(' + argument + '){\n' + source + '}';
+
+		return template;
+	};
+
+	// Add a "chain" function. Start chaining a wrapped Underscore object.
+	_.chain = function (obj) {
+		var instance = _(obj);
+		instance._chain = true;
+		return instance;
+	};
+
+	// OOP
+	// ---------------
+	// If Underscore is called as a function, it returns a wrapped object that
+	// can be used OO-style. This wrapper holds altered versions of all the
+	// underscore functions. Wrapped objects may be chained.
+
+	// Helper function to continue chaining intermediate results.
+	var result = function (instance, obj) {
+		return instance._chain ? _(obj).chain() : obj;
+	};
+
+	// Add your own custom functions to the Underscore object.
+	_.mixin = function (obj) {
+		_.each(_.functions(obj), function (name) {
+			var func = _[name] = obj[name];
+			_.prototype[name] = function () {
+				var args = [this._wrapped];
+				push.apply(args, arguments);
+				return result(this, func.apply(_, args));
+			};
+		});
+	};
+
+	// Add all of the Underscore functions to the wrapper object.
+	_.mixin(_);
+
+	// Add all mutator Array functions to the wrapper.
+	_.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function (name) {
+		var method = ArrayProto[name];
+		_.prototype[name] = function () {
+			var obj = this._wrapped;
+			method.apply(obj, arguments);
+			if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];
+			return result(this, obj);
+		};
+	});
+
+	// Add all accessor Array functions to the wrapper.
+	_.each(['concat', 'join', 'slice'], function (name) {
+		var method = ArrayProto[name];
+		_.prototype[name] = function () {
+			return result(this, method.apply(this._wrapped, arguments));
+		};
+	});
+
+	// Extracts the result from a wrapped and chained object.
+	_.prototype.value = function () {
+		return this._wrapped;
+	};
+
+	// Provide unwrapping proxy for some methods used in engine operations
+	// such as arithmetic and JSON stringification.
+	_.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
+
+	_.prototype.toString = function () {
+		return '' + this._wrapped;
+	};
+
+	// AMD registration happens at the end for compatibility with AMD loaders
+	// that may not enforce next-turn semantics on modules. Even though general
+	// practice for AMD registration is to be anonymous, underscore registers
+	// as a named module because, like jQuery, it is a base library that is
+	// popular enough to be bundled in a third party lib, but not be part of
+	// an AMD load request. Those cases could generate an error when an
+	// anonymous define() is called outside of a loader request.
+	//   if (typeof define === 'function' && define.amd) {
+	//     define('underscore', [], function() {
+	//       return _;
+	//     });
+	//   }
+}.call(this));

+ 954 - 0
js/until.js

@@ -0,0 +1,954 @@
+// vuex使用
+import store from '@/store/index.js'
+import request from '@/api/request.js'
+import amapFile from "@/libs/amap-wx.130.js";
+// 跳转tab
+function beforeSwitch(e) {
+	// 返回一个promisea
+	let assitindex = new Promise((resolve, reject) => {
+		//验证是否是当前页面重复跳转
+		let lastcurrentpro = store.state.lastcurrentpro
+		let currentpro = store.state.currentpro
+		if (lastcurrentpro === null) {
+			resolve('赋值tabbar下标成功')
+		} else {
+			// 非首次登录,验证是否重复跳转
+			if (lastcurrentpro !== e) {
+				resolve('赋值tabbar下标成功')
+			} else {
+				reject('重复跳转')
+			}
+		}
+	})
+	//赋值完毕跳转
+	assitindex.then(function(data) {
+		uni.switchTab({
+			url: store.state.vuex_tabbar[store.state.currentpro].pagePath
+		})
+	}).catch(function(reason) {
+		console.log(reason)
+	})
+}
+//跳转登录
+function gologin(text) {
+	//清除缓存
+	uni.clearStorage()
+	uni.showToast({
+		icon: 'none',
+		title: text,
+		duration: 600
+	})
+	setTimeout(() => {
+		uni.redirectTo({
+			url: '/pages/usercenter/login/login'
+		})
+	}, 600)
+}
+//修正路径tabber
+function pageaddress(route) {
+	store.state.vuex_tabbar.forEach((item, index) => {
+		if (item.pagePath === route) {
+			store.commit('changecurrentprot', index)
+		}
+	})
+}
+//发送指令(向PC)
+function postMessage(pdata) {
+	// #ifdef H5
+	parent.postMessage(JSON.stringify(pdata), "*");
+	// #endif
+}
+// 获取配置
+function getsetting(data) {
+	return request({
+		url: 'api/index/setting',
+		method: 'post',
+		data
+	})
+}
+//微信授权登录
+function h5_wx_auth(appid, redirect_uri) {
+	//固定方法  打开授权页面
+	uni.showLoading({
+		title: '获取授权'
+	});
+	setTimeout(function() {
+		uni.hideLoading();
+		window.location.href =
+			'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' +
+			appid +
+			'&redirect_uri=' +
+			redirect_uri +
+			'&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect';
+	}, 1000);
+}
+// 扫一扫
+function getscan(data) {
+	return request({
+		url: 'api/vip/getscan',
+		method: 'post',
+		data
+	})
+}
+//单选更改数据通用处理方法
+function radiochangedata(e, operationdata) {
+	let params = {
+		item: null,
+		list: operationdata
+	}
+	operationdata.forEach((item, index) => {
+		if (item.id === e.id) {
+			item.selected = 1
+			params.item = item
+			return params
+		} else {
+			item.selected = 0
+		}
+	})
+	return params
+}
+// 多选更改数据通用处理方法
+function multisedata(e, operationdata) {
+	let seedlengh = operationdata.filter(item => item.selected === 1)
+	let selength = seedlengh.filter(item => item.id === e.id).length
+	if (selength > 0) {
+		operationdata.forEach((item, index) => {
+			if (item.id === e.id) {
+				if (item.selected === 1) {
+					item.selected = 0
+				}
+			}
+		})
+		return operationdata
+	} else {
+		if (seedlengh.length < 5) {
+			operationdata.forEach((item, index) => {
+				if (item.id === e.id) {
+					if (item.selected === 0) {
+						item.selected = 1
+					}
+				}
+			})
+		} else {
+			uni.showToast({
+				title: '最多选五项',
+				icon: 'none'
+			})
+		}
+	}
+	return operationdata
+}
+// form多选装载数据
+function setdata(data) {
+	// type等于1则是单选装载数据,否则是多选装载数据
+	if (data.length === 0) {
+		uni.showToast({
+			title: '请选择数据',
+			icon: 'none'
+		})
+		return ''
+	} else {
+		let arraystring = ''
+		let adnum = 0
+		data.forEach((item, index) => {
+			if (item.selected === 1) {
+				if (index !== data.length && adnum !== 0) {
+					arraystring = arraystring + ','
+				}
+				arraystring = arraystring + item.name
+				adnum = adnum + 1
+			}
+		})
+		return arraystring
+	}
+}
+// form多选装载数据
+function setdata_(data) {
+	// type等于1则是单选装载数据,否则是多选装载数据
+	if (data.length === 0) {
+		uni.showToast({
+			title: '请选择数据',
+			icon: 'none'
+		})
+		return ''
+	} else {
+		let Arr_ = []
+		data.forEach((item, index) => {
+			let Arr = {
+				id: '',
+				name: ''
+			}
+			if (item.selected == 1) {
+				Arr.id = item.id
+				Arr.name = item.name
+				Arr_.push(Arr)
+			}
+		})
+		return Arr_
+	}
+}
+
+function setdata_Cake(data) {
+	var cake = data[0].code
+	// type等于1则是单选装载数据,否则是多选装载数据
+	if (data.length === 0) {
+		uni.showToast({
+			title: '请选择数据',
+			icon: 'none'
+		})
+		return ''
+	} else {
+		let Arr_ = {
+			facilitator_key: '',
+			typecode: '',
+			type: []
+		}
+		Arr_.facilitator_key = cake
+		Arr_.typecode = cake
+		data.forEach((item, index) => {
+			let Arr = {
+				typeid: '',
+				typename: ''
+			}
+			if (item.selected == 1) {
+				Arr.typeid = item.id
+				Arr.typename = item.name
+				Arr_.type.push(Arr)
+			}
+		})
+		return Arr_
+	}
+}
+
+function push_code(data) {
+	var cake = data[0].code
+	// type等于1则是单选装载数据,否则是多选装载数据
+	let Arr_ = {
+		push_key: '',
+		typecode: '',
+		type: []
+	}
+	Arr_.push_key = cake
+	Arr_.typecode = cake
+	data.forEach((item, index) => {
+		let Arr = {
+			typeid: '',
+			typename: ''
+		}
+		if (item.selected == true) {
+			Arr.typeid = item.id
+			Arr.typename = item.name
+			Arr_.type.push(Arr)
+		}
+	})
+	return Arr_
+}
+
+function park_code(data) {
+	var cake = data[0].code
+	// type等于1则是单选装载数据,否则是多选装载数据
+	let Arr_ = {
+		park_key: '',
+		typecode: '',
+		type: []
+	}
+	Arr_.park_key = cake
+	Arr_.typecode = cake
+	data.forEach((item, index) => {
+		let Arr = {
+			typeid: '',
+			typename: ''
+		}
+		if (item.selected == true) {
+			Arr.typeid = item.id
+			Arr.typename = item.name
+			Arr_.type.push(Arr)
+		}
+	})
+	return Arr_
+}
+let jumplist = {
+	// 集市
+	countryfair: {
+		type: 1,
+		url: '/pages/mine/market/market',
+		typecode: 'countryfair',
+		tabcode: 'resourcezhtype'
+	},
+	// 资源置换
+	replacement: {
+		type: 1,
+		url: '/pages/index/screendetil/screendetil',
+		typecode: 'replacement',
+		tabcode: 'resourcezhtype'
+	},
+	// 效果甲方
+	aeffectparty: {
+		type: 1,
+		url: '/pages/index/screendetil/screendetil',
+		typecode: 'aeffectparty',
+		tabcode: 'cooperationtype'
+	},
+	// 效果乙方
+	beffectparty: {
+		type: 1,
+		url: '/pages/index/screendetil/screendetil',
+		typecode: 'beffectparty',
+		tabcode: 'generalization'
+	},
+	// 产品寻销
+	pmarketing: {
+		type: 1,
+		url: '/pages/index/screendetil/screendetil_cpxx',
+		typecode: 'pmarketing',
+		tabcode: 'cooperationcxxs'
+	},
+	// 销货渠道
+	saleschannel: {
+		type: 1,
+		url: '/pages/index/screendetil/screendetil_xhqd',
+		typecode: 'saleschannel',
+		tabcode: 'providechannels'
+	},
+	// 免费专区
+	industryepe: {
+		type: 1,
+		url: '/pages/index/freezone/freezone',
+		typecode: 'replacement',
+		tabcode: 'industryepe'
+	},
+	// 活动合作
+	activityhz: {
+		type: 1,
+		url: '/pages/index/screendetil/screendetil',
+		typecode: 'activityhz',
+		tabcode: 'activitytype'
+	},
+	// 场地资源
+	siteresources: {
+		type: 1,
+		url: '/pages/index/screendetil/screendetil',
+		typecode: 'siteresources',
+		tabcode: 'sitetype'
+	},
+	// 线下媒体
+	offlinemedia: {
+		type: 1,
+		url: '/pages/index/screendetil/screendetil',
+		typecode: 'offlinemedia',
+		tabcode: 'advertisingtypexx'
+	},
+	// 采购需求
+	ptdemand: {
+		type: 1,
+		url: '/pages/index/screendetil/screendetil',
+		typecode: 'ptdemand',
+		tabcode: 'resourcezhtype'
+	},
+	// 企业服务
+	cpservices: {
+		type: 1,
+		url: '/pages/index/screendetil/screendetil',
+		typecode: 'cpservices',
+		tabcode: 'facilitatortype'
+	},
+	// 招商加盟
+	itpromotion: {
+		type: 1,
+		url: '/pages/index/screendetil/screendetil_zsjm',
+		typecode: 'itpromotion',
+		tabcode: 'cooperationtype'
+	},
+	// 线上媒体
+	onlinemedia: {
+		type: 1,
+		url: '/pages/index/screendetil/screendetil',
+		typecode: 'onlinemedia',
+		tabcode: 'advertisingtypexs'
+	},
+	// 项目找代理
+	projectagent: {
+		type: 1,
+		url: '/pages/index/screendetil/screendetil',
+		typecode: 'projectagent',
+		tabcode: 'joinagentfee'
+	},
+	// 项目找合伙人
+	pproject: {
+		type: 1,
+		url: '/pages/index/screendetil/screendetil',
+		typecode: 'pproject',
+		tabcode: 'roletype'
+	},
+	// 渠道商
+	channelbusines: {
+		type: 2,
+		url: '/pages/index/merchant/merchant_qds'
+	},
+	// 服务商
+	serviceprovider: {
+		type: 2,
+		url: '/pages/index/merchant/merchant_fws'
+	},
+	// 品牌主
+	brandowner: {
+		type: 2,
+		url: '/pages/index/merchant/merchant_ppz'
+	},
+	// 媒体
+	media: {
+		type: 2,
+		url: '/pages/index/merchant/merchant_mt'
+	},
+	// 金牌会员
+	openmember: {
+		type: 3,
+		url: '/pages/usercenter/openmember/openmember'
+	},
+	//道具商店
+	propsmall: {
+		type: 3,
+		url: '/pages/usercenter/propsmall/propsmall'
+	},
+	// 邀请有礼
+	sharecenter: {
+		type: 3,
+		url: '/pages/usercenter/sharecenter/sharecenter'
+	},
+	// 活动
+	activitylist: {
+		type: 3,
+		url: '/pages/usercenter/activitylist/findactivity/findactivity'
+	}
+}
+
+function charinit(bytedesk) {
+	var appsetting = uni.getStorageSync('appsetting')
+	if (!appsetting) {
+		// 获取系统配置
+		getsetting().then(res => {
+			if (res.code === 1) {
+				uni.setStorageSync('appsetting', res.data)
+				var kf = res.data.set.kf
+				if (kf.status == 1) {
+					// 登录后台->渠道管理-》uniapp中创建应用获取
+					bytedesk.init(kf.subdomain, kf.appKey)
+				}
+			}
+		})
+	} else {
+		if (appsetting.set && appsetting.set.kf) {
+			var kf = appsetting.set.kf
+			if (kf.status == 1) {
+				// 登录后台->渠道管理-》uniapp中创建应用获取
+				bytedesk.init(kf.subdomain, kf.appKey)
+			}
+		}
+	}
+}
+
+function toChar() {
+	var appsetting = uni.getStorageSync('appsetting')
+	if (!appsetting) {
+		// 获取系统配置
+		getsetting().then(res => {
+			if (res.code === 1) {
+				uni.setStorageSync('appsetting', res.data)
+				var kf = res.data.set.kf
+				console.log(JSON.stringify(kf))
+				if (kf.status == 1) {
+					uni.navigateTo({
+						url: '/components/bytedesk_kefu/chat-kf?wid=' + kf.wid +
+							'&type=workGroup&aid=&title=在线客服'
+					})
+				} else {
+					uni.showToast({
+						icon: 'none',
+						title: '客服暂未开通'
+					})
+				}
+			}
+		})
+	} else {
+		var kf = appsetting.set.kf
+
+		if (kf.status == 1) {
+			uni.navigateTo({
+				url: '/components/bytedesk_kefu/chat-kf?wid=' + kf.wid + '&type=workGroup&aid=&title=在线客服'
+			})
+			console.log(JSON.stringify(kf))
+		} else {
+			uni.showToast({
+				icon: 'none',
+				title: '客服暂未开通'
+			})
+		}
+	}
+}
+
+function onNetworkStatusChange() {
+	// uni.getNetworkType({
+	// 	success: (res) => {
+	// 		if (res.networkType == 'none'||res.networkType == 'unknown') {
+	// 			uni.navigateTo({
+	// 				url: '/pages/index/nonetwork'
+	// 			})
+	// 		}
+	// 	}
+	// })
+}
+// 综合跳转方法
+function jumphref(jumpitem) {
+	console.log(JSON.stringify(jumpitem))
+	if (jumpitem.url != '#' && jumpitem.url != '') {
+		//跳入内部制定好的页面
+		if (jumpitem.opentype === 'inside') {
+			let jumpurl = jumpitem.url
+			var regPhone = (/pages/)
+			if (!regPhone.test(jumpurl)) {
+				let pageitem = jumplist[jumpitem.url]
+				//tab筛选页面
+				let params = {
+					title: jumpitem.modularname,
+					typecode: pageitem.typecode,
+					tabcode: pageitem.tabcode
+				}
+				jumpurl = pageitem.url + '?params=' + JSON.stringify(params)
+			}
+			uni.navigateTo({
+				url: jumpurl
+			})
+		}
+		//跳入外部链接
+		else if (jumpitem.opentype === 'web') {
+			console.log(jumpitem.url)
+			uni.navigateTo({
+				url: '/pages/index/webpage?title=' + (jumpitem.modularname || jumpitem.title) + '&url=' +
+					jumpitem.url
+			})
+		}
+		//跳入文章
+		else if (jumpitem.opentype === 'article') {
+			uni.navigateTo({
+				url: '/pages/release/agreement/agreement?type=3&title=' + jumpitem.modularname + '&id=' +
+					jumpitem.url
+			})
+		}
+	}
+}
+
+function toarticle(title, id = 0, type = 1) {
+	uni.navigateTo({
+		url: '/pagesC/pages/index/message/message?id=' + id + '&title=' + title + '&type=' + type
+	})
+}
+
+function EACh(data, res) {
+	var cake = data[0].code
+	// type等于1则是单选装载数据,否则是多选装载数据
+	let Arr_ = {
+		type: [],
+		title: ''
+	}
+	let name = ''
+	data.forEach((item, index) => {
+		res.forEach(d => {
+			if (item.name == d.name) {
+				name = d.name + ',' + name
+				item.selected = 1
+			}
+		})
+	})
+	Arr_.type = data
+	Arr_.title = name
+	return Arr_
+}
+
+function u_gopage(key, item) {
+	// console.log('key', key)
+	// console.log('u_gopage', JSON.stringify(item))
+	switch (key) {
+		case 'U_cube':
+		case 'U_slideshow':
+		case 'U_button':
+		case 'U_monitor':
+			if (item.is_minApp == 1) {
+				toUrl(item.h5_link);
+			} else if (item.is_minApp == 2) {
+				//跳转小程序
+				skip(item.appid, item.minApp_link)
+			}
+			break;
+		case 'U_goods':
+		case 'U_goods2':
+			toUrl('/pagesD/pages/product/product?id=' + item.id);
+			break;
+		case 'U_simplegraph':
+			if (item.choose_style == 2) {
+				if (item.value.is_minApp == 1) {
+					toUrl(item.value.h5_link);
+				} else if (item.value.is_minApp == 2) {
+					//跳转小程序
+					skip(item.value.appid, item.value.minApp_link)
+				}
+			} else if (item.choose_style == 3) {
+				if (item.value.hotArea) {
+					item = item.value.hotArea[0]
+					if (item.is_minApp == 1) {
+						toUrl(item.h5_link);
+					} else if (item.is_minApp == 2) {
+						//跳转小程序
+						skip(item.appid, item.minApp_link)
+					}
+				}
+			}
+			break;
+	}
+}
+
+function toUrl(_url) {
+	//处理老版本更新 分包 url 变更
+	let allurl = {
+		'/pages/broadcast/broadcast': '/pagesE/pages/broadcast/broadcast',
+		'/pages/mall/list': '/pagesE/pages/mall/list',
+		'/pages/mall/group': '/pagesE/pages/mall/group',
+		'/pages/mall/integral': '/pagesE/pages/mall/integral',
+		'/pages/user/coupon/coupon': '/pagesE/pages/user/coupon/coupon',
+		'/pages/index/signin/signin': '/pagesE/pages/index/signin/signin',
+		'/pages/mynews/mynews': '/pagesE/pages/mynews/mynews',
+		'/pages/user/problem/problem': '/pagesE/pages/user/problem/problem',
+		'/pages/cart/cart': '/pagesE/pages/cart/cart',
+	};
+	let okeys = Object.keys(allurl)
+	let tlist = uni.getStorageSync("tabbar")
+	let flag = false
+	if (tlist) {
+		tlist.forEach((item, index) => {
+			if (flag == false && _url.indexOf(item.url) > -1) {
+				flag = true
+			}
+		})
+	}
+	okeys.forEach(function(item) {
+		if (item == _url) {
+			_url = allurl[item];
+			return;
+		}
+	})
+	// console.log('_url2', _url)
+	// console.log('flag', flag)
+	if (flag) {
+		uni.switchTab({
+			url: _url,
+			fail: function(e) {
+				uni.navigateTo({
+					url: _url
+				})
+			}
+		})
+	} else {
+		uni.navigateTo({
+			url: _url,
+			fail: function(e) {
+				uni.switchTab({
+					url: _url
+				})
+			}
+		})
+	}
+}
+
+//小程序跳转小程序
+function skip(appId, path) {
+	// #ifdef MP-WEIXIN
+	uni.navigateToMiniProgram({
+		// appid  写你要跳转的小程序的 appid
+		appId: appId,
+		// 路径写  src下的路径,假如你跳转的是pages下的页面,就可以写pages/index
+		path: path,
+		extraData: {
+			// 'type': 'out'
+		},
+		// 这个不写的话会显示开发环境,不能正常跳转,写上就能正常跳转了
+		envVersion: 'develop',
+		success(res) {
+			// 打开成功
+			uni.showToast({
+				title: '跳转成功'
+			})
+		},
+		fail(err) {
+			// 打开失败/取消
+			uni.showToast({
+				title: '跳转不成功'
+			})
+		}
+	})
+	// #endif	
+}
+
+function getselectlist(list1, list2) {
+	for (var i = 0; i < list1.length; i++) {
+		var item = list1[i]
+		if (list2 && list2.length > 0) {
+			for (var ii = 0; ii < list2.length; ii++) {
+				var item2 = list2[ii]
+				if (item.id == item2) {
+					list1[i].selected = 1
+				}
+			}
+		}
+	}
+	return list1
+}
+
+function myCache(k, v, t = 3600 * 24) {
+	let dtime = '_deadtime';
+	if (v) {
+		uni.setStorageSync(k, v)
+		var seconds = parseInt(t);
+		if (seconds > 0) {
+			var timestamp = Date.parse(new Date()); // 获取时间戳的毫秒数
+			timestamp = timestamp / 1000 + seconds; // 时间戳 + 过期时间
+			uni.setStorageSync(k + dtime, timestamp + "")
+		} else {
+			uni.removeStorageSync(k + dtime)
+		}
+	} else {
+		var deadtime = parseInt(uni.getStorageSync(k + dtime)) // 获取缓存的时间
+		if (deadtime) {
+			if (parseInt(deadtime) < Date.parse(new Date()) / 1000) { // 如果缓存时间小于 当前时间戳
+				return null;
+			}
+		}
+		var res = uni.getStorageSync(k); // 否则直接读取真正的缓存名, 并且返回出去
+		if (res) {
+			return res;
+		} else {
+			return null;
+		}
+	}
+}
+
+// 位置授权(小程序)
+function getAuthorizeInfo() {
+	uni.authorize({
+		scope: 'scope.userLocation',
+		success() { // 允许授权
+			uni.getLocation({
+				success: function(res) {
+					console.log("经纬度", res);
+				},
+			})
+		},
+		fail() { // 拒绝授权
+			console.log("你拒绝了授权,无法获得周边信息")
+		}
+	})
+}
+// 获取地理位置
+function getLocationInfo(mapkey, fun) {
+	let amapObject = new amapFile.AMapWX({
+		key: mapkey
+	})
+	amapObject.getRegeo({
+		iconPath: "../../static/marker.png",
+		success: (res) => {
+			console.log(res, res[0].regeocodeData.formatted_address)
+			// 移动到当前位置
+			if (fun) {
+				fun(res)
+			}
+		},
+		fail: (err) => {
+			console.log(err)
+		}
+	})
+}
+//改变地图中心位置
+function toLocation(mapCtx, obj) {
+	// 改变地图中心位置
+	console.log('改变地图中心位置', obj)
+	mapCtx.moveToLocation(obj)
+	// 移动标记点并添加动画效果
+	mapCtx.translateMarker({
+		markerId: 1,
+		autoRotate: false,
+		duration: 100,
+		destination: {
+			latitude: obj.latitude,
+			longitude: obj.longitude,
+		},
+		animationEnd() {
+			console.log('animation end')
+		}
+	})
+}
+
+function chooseLocation(fun) {
+	uni.chooseLocation({
+		success: (res) => {
+			if (fun) {
+				fun(res);
+			}
+		},
+		fail: () => {
+			// 如果用uni.chooseLocation没有获取到地理位置,则需要获取当前的授权信息,判断是否有地理授权信息
+			uni.getSetting({
+				success: (res) => {
+					console.log('getSetting', JSON.stringify(res));
+					var status = res.authSetting;
+					if (!status['scope.userLocation']) {
+						// 如果授权信息中没有地理位置的授权,则需要弹窗提示用户需要授权地理信息
+						uni.showModal({
+							title: "是否授权当前位置",
+							content: "需要获取您的地理位置,请确认授权,否则地图功能将无法使用",
+							success: (tip) => {
+								if (tip.confirm) {
+									// 如果用户同意授权地理信息,则打开授权设置页面,判断用户的操作
+									uni.openSetting({
+										success: (data) => {
+											// 如果用户授权了地理信息在,则提示授权成功
+											if (data
+												.authSetting[
+													'scope.userLocation'
+												] === true
+											) {
+												uni.showToast({
+													title: "授权成功",
+													icon: "success",
+													duration: 1000
+												})
+												// 授权成功后,然后再次chooseLocation获取信息
+												uni.chooseLocation({
+													success: (
+														res
+													) => {
+														if (
+															fun
+														) {
+															fun(
+																res
+															);
+														}
+													}
+												})
+											} else {
+												uni.showToast({
+													title: "授权失败",
+													icon: "none",
+													duration: 1000
+												})
+											}
+										}
+									})
+								}
+							}
+						})
+					}
+				},
+				fail: (res) => {
+					console.log('chooseLocationfail', JSON.stringify(res));
+					uni.showToast({
+						title: "调用授权窗口失败",
+						icon: "none",
+						duration: 1000
+					})
+				}
+			})
+		}
+	});
+}
+
+function getnewurl() {
+	let url = document.location.href;
+	let reg = /[^\w](state|code)=?([^&|^#]*)/g;
+	url = url.replace(reg, "");
+	reg = /&&/g;
+	url = url.replace(reg, "");
+	reg = /&#/g;
+	url = url.replace(reg, "#");
+	reg = /\?#/g;
+	url = url.replace(reg, "#");
+	reg = /\?#/g;
+	url = url.replace(reg, "#");
+	return url;
+}
+
+function requestSubscribeMessage(tids, tmplId, callback) {
+	// #ifdef MP-WEIXIN
+	uni.getSetting({
+	 
+		withSubscriptions: true,
+		success(res) {
+			
+			
+			var itemSettings = res.subscriptionsSetting.itemSettings ? res.subscriptionsSetting
+				.itemSettings : "";
+			var flag = false;
+			 
+			//校验是否
+			if (tids && tids.length > 0) {
+				if (itemSettings) {
+					tids.forEach((item, index) => {
+						if (itemSettings[item] != 'accept') {
+							flag = true;
+						}
+					});
+				} else {
+					flag = true;
+				}
+			}
+			if (flag) {
+				//未授权唤起授权
+				uni.requestSubscribeMessage({
+					tmplIds: tids,
+					success(res) {},
+					fail(err) {},
+					complete() {
+						callback ? callback() : null;
+					}
+				})
+			} else {
+				callback ? callback() : null;
+			}
+		}
+	})
+	// #endif
+	// #ifndef MP-WEIXIN
+	callback ? callback() : null;
+	// #endif
+}
+
+export default {
+	requestSubscribeMessage,
+	getnewurl,
+	chooseLocation,
+	getAuthorizeInfo,
+	getLocationInfo,
+	toLocation,
+	park_code,
+	myCache,
+	getselectlist,
+	EACh,
+	beforeSwitch,
+	getsetting,
+	radiochangedata,
+	multisedata,
+	setdata,
+	setdata_,
+	setdata_Cake,
+	push_code,
+	jumphref,
+	toChar,
+	charinit,
+	pageaddress,
+	getscan,
+	toarticle,
+	h5_wx_auth,
+	onNetworkStatusChange,
+	gologin,
+	postMessage,
+	toUrl,
+	u_gopage
+}

+ 785 - 0
js/util.js

@@ -0,0 +1,785 @@
+import { base64_encode, base64_decode } from './base64';
+import md5 from './md5';
+var util = {};
+
+util.base64_encode = function (str) {
+	return base64_encode(str)
+};
+
+util.base64_decode = function (str) {
+	return base64_decode(str)
+};
+
+util.md5 = function (str) {
+	return md5(str)
+};
+/**
+	构造微擎地址, 
+	@params action 微擎系统中的controller, action, do,格式为 'wxapp/home/navs'
+	@params querystring 格式为 {参数名1 : 值1, 参数名2 : 值2}
+*/
+util.url = function (action, querystring) {
+	var settingFile = getApp().globalData.siteInfo;
+	var url = settingFile.siteroot + '?i=' + settingFile.uniacid + '&t=' + settingFile.multiid + '&v=' + settingFile.version + '&from=wxapp&';
+
+	if (action) {
+		action = action.split('/');
+		if (action[0]) {
+			url += 'c=' + action[0] + '&';
+		}
+		if (action[1]) {
+			url += 'a=' + action[1] + '&';
+		}
+		if (action[2]) {
+			url += 'do=' + action[2] + '&';
+		}
+	}
+	if (querystring && typeof querystring === 'object') {
+		for (let param in querystring) {
+            if (param && querystring.hasOwnProperty(param) && querystring[param]) {
+				url += param + '=' + querystring[param] + '&';
+			}
+		}
+	}
+	return url;
+}
+
+function getQuery(url) {
+	var theRequest = [];
+	if (url.indexOf("?") != -1) {
+		var str = url.split('?')[1];
+		var strs = str.split("&");
+		for (var i = 0; i < strs.length; i++) {
+			if (strs[i].split("=")[0] && unescape(strs[i].split("=")[1])) {
+				theRequest[i] = {
+					'name': strs[i].split("=")[0],
+					'value': unescape(strs[i].split("=")[1])
+				}
+			}
+		}
+	}
+	return theRequest;
+}
+/*
+* 获取链接某个参数
+* url 链接地址
+* name 参数名称
+*/
+function getUrlParam(url, name) {
+	var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象  
+	var r = url.split('?')[1].match(reg);  //匹配目标参数  
+	if (r != null) return unescape(r[2]); return null; //返回参数值  
+}
+/**
+ * 获取签名 将链接地址的所有参数按字母排序后拼接加上token进行md5
+ * url 链接地址
+ * date 参数{参数名1 : 值1, 参数名2 : 值2} *
+ * token 签名token 非必须
+ */
+function getSign(url, data, token) {
+	var _ = require('./underscore.js');
+	var md5 = require('./md5.js');
+	var querystring = '';
+	var sign = getUrlParam(url, 'sign');
+	if (sign || (data && data.sign)) {
+		return false;
+	} else {
+		if (url) {
+			querystring = getQuery(url);
+		}
+		if (data) {
+			var theRequest = [];
+			for (let param in data) {
+				if (param && data[param]) {
+					theRequest = theRequest.concat({
+						'name': param,
+						'value': data[param]
+					})
+				}
+			}
+			querystring = querystring.concat(theRequest);
+		}
+		//排序
+		querystring = _.sortBy(querystring, 'name');
+		//去重
+		querystring = _.uniq(querystring, true, 'name');
+		var urlData = '';
+		for (let i = 0; i < querystring.length; i++) {
+			if (querystring[i] && querystring[i].name && querystring[i].value) {
+				urlData += querystring[i].name + '=' + querystring[i].value;
+				if (i < (querystring.length - 1)) {
+					urlData += '&';
+				}
+			}
+		}
+		token = token ? token : '';
+		sign = md5(urlData + token);
+		return sign;
+	}
+}
+util.getSign = function (url, data, token) {
+	return getSign(url, data, token);
+};
+/**
+	二次封装微信wx.request函数、增加交互体全、配置缓存、以及配合微擎格式化返回数据
+
+	@params option 弹出参数表,
+	{
+		url : 同微信,
+		data : 同微信,
+		header : 同微信,
+		method : 同微信,
+		success : 同微信,
+		fail : 同微信,
+		complete : 同微信,
+
+		cachetime : 缓存周期,在此周期内不重复请求http,默认不缓存
+	}
+*/
+util.request = function (option) {
+	var _ = require('./underscore.js');
+	var md5 = require('./md5.js');
+	var app = getApp();
+	var option = option ? option : {};
+	option.cachetime = option.cachetime ? option.cachetime : 0;
+	option.showLoading = typeof option.showLoading != 'undefined' ? option.showLoading : true;
+
+	var sessionid = wx.getStorageSync('userInfo').sessionid;
+	var url = option.url;
+	if (url.indexOf('http://') == -1 && url.indexOf('https://') == -1) {
+		url = util.url(url);
+	}
+	var state = getUrlParam(url, 'state');
+	if (!state && !(option.data && option.data.state) && sessionid) {
+		url = url + '&state=we7sid-' + sessionid
+	}
+	if (!option.data || !option.data.m) {
+		var nowPage = getCurrentPages();
+   
+		if (nowPage.length) {
+			nowPage = nowPage[getCurrentPages().length - 1];
+      if (nowPage && nowPage.__route__) {
+				url = url + '&m=' + nowPage.__route__.split('/')[0];
+			}
+		}
+	}
+
+	var sign = getSign(url, option.data);
+	if (sign) {
+		url = url + "&sign=" + sign;
+	}
+	if (!url) {
+		return false;
+	}
+	wx.showNavigationBarLoading();
+	if (option.showLoading) {
+		util.showLoading();
+	}
+	if (option.cachetime) {
+		var cachekey = md5(url);
+		var cachedata = wx.getStorageSync(cachekey);
+		var timestamp = Date.parse(new Date());
+
+		if (cachedata && cachedata.data) {
+			if (cachedata.expire > timestamp) {
+				if (option.complete && typeof option.complete == 'function') {
+					option.complete(cachedata);
+				}
+				if (option.success && typeof option.success == 'function') {
+					option.success(cachedata);
+				}
+				console.log('cache:' + url);
+				wx.hideLoading();
+				wx.hideNavigationBarLoading();
+				return true;
+			} else {
+				wx.removeStorageSync(cachekey)
+			}
+		}
+	}
+	wx.request({
+		'url': url,
+		'data': option.data ? option.data : {},
+		'header': option.header ? option.header : {},
+		'method': option.method ? option.method : 'GET',
+		'header': {
+			'content-type': 'application/x-www-form-urlencoded'
+		},
+		'success': function (response) {
+			wx.hideNavigationBarLoading();
+			wx.hideLoading();
+			if (response.data.errno) {
+				if (response.data.errno == '41009') {
+					wx.setStorageSync('userInfo', '');
+					util.getUserInfo(function () {
+						util.request(option)
+					});
+					return;
+				} else {
+					if (option.fail && typeof option.fail == 'function') {
+						option.fail(response);
+					} else {
+						if (response.data.message) {
+							if (response.data.data != null && response.data.data.redirect) {
+								var redirect = response.data.data.redirect;
+							} else {
+								var redirect = '';
+							}
+							app.util.message(response.data.message, redirect, 'error');
+						}
+					}
+					return;
+				}
+            } else {
+				if (option.success && typeof option.success == 'function') {
+					option.success(response);
+				}
+				//写入缓存,减少HTTP请求,并且如果网络异常可以读取缓存数据
+				if (option.cachetime) {
+					var cachedata = { 'data': response.data, 'expire': timestamp + option.cachetime * 1000 };
+					wx.setStorageSync(cachekey, cachedata);
+				}
+			}
+		},
+		'fail': function (response) {
+			wx.hideNavigationBarLoading();
+			wx.hideLoading();
+			
+			//如果请求失败,尝试从缓存中读取数据
+			var md5 = require('./md5.js');
+			var cachekey = md5(url);
+			var cachedata = wx.getStorageSync(cachekey);
+			if (cachedata && cachedata.data) {
+				if (option.success && typeof option.success == 'function') {
+					option.success(cachedata);
+				}
+				console.log('failreadcache:' + url);
+				return true;
+			} else {
+				if (option.fail && typeof option.fail == 'function') {
+					option.fail(response);
+				}
+			}
+		},
+		'complete': function (response) {
+			// wx.hideNavigationBarLoading();
+			// wx.hideLoading();
+			if (option.complete && typeof option.complete == 'function') {
+				option.complete(response);
+			}
+		}
+	});
+}
+/*
+* 获取用户信息
+*/
+util.getUserInfo = function (cb) {
+	var login = function() {
+		console.log('start login');
+		var userInfo = {
+			'sessionid': '',
+			'wxInfo': '',
+			'memberInfo': '',
+		};
+		wx.login({
+			success: function (res) {
+				util.request({
+					url: 'auth/session/openid',
+					data: { code: res.code },
+					cachetime: 0,
+					success: function (session) {
+						if (!session.data.errno) {
+							userInfo.sessionid = session.data.data.sessionid
+							wx.setStorageSync('userInfo', userInfo);
+							wx.getUserInfo({
+								success: function (wxInfo) {
+									userInfo.wxInfo = wxInfo.userInfo
+									wx.setStorageSync('userInfo', userInfo);
+									util.request({
+										url: 'auth/session/userinfo',
+										data: {
+											signature: wxInfo.signature,
+											rawData: wxInfo.rawData,
+											iv: wxInfo.iv,
+											encryptedData: wxInfo.encryptedData
+										},
+										method: 'POST',
+										header: {
+											'content-type': 'application/x-www-form-urlencoded'
+										},
+										cachetime: 0,
+										success: function (res) {
+											if (!res.data.errno) {
+												userInfo.memberInfo = res.data.data;
+												wx.setStorageSync('userInfo', userInfo);
+											}
+											typeof cb == "function" && cb(userInfo);
+										}
+									});
+								},
+								fail: function () {
+									typeof cb == "function" && cb(userInfo);
+								},
+								complete: function () {
+								}
+							})
+						}
+					}
+				});
+			},
+			fail: function () {
+				wx.showModal({
+					title: '获取信息失败',
+					content: '请允许授权以便为您提供给服务',
+					success: function (res) {
+						if (res.confirm) {
+							util.getUserInfo();
+						}
+					}
+				})
+			}
+		});
+	};
+
+	var app = wx.getStorageSync('userInfo');
+	if (app.sessionid) {
+		wx.checkSession({
+			success: function(){
+				typeof cb == "function" && cb(app);
+			},
+			fail: function(){
+				app.sessionid = '';
+				console.log('relogin');
+				wx.removeStorageSync('userInfo');
+				login();
+			}
+		})
+	} else {
+		//调用登录接口
+		login();
+	}
+}
+
+util.navigateBack = function (obj) {
+	let delta = obj.delta ? obj.delta : 1;
+	if (obj.data) {
+		let pages = getCurrentPages()
+		let curPage = pages[pages.length - (delta + 1)];
+		if (curPage.pageForResult) {
+			curPage.pageForResult(obj.data);
+		} else {
+			curPage.setData(obj.data);
+		}
+	}
+	wx.navigateBack({
+		delta: delta, // 回退前 delta(默认为1) 页面
+		success: function (res) {
+			// success
+			typeof obj.success == "function" && obj.success(res);
+		},
+		fail: function (err) {
+			// fail
+			typeof obj.fail == "function" && obj.fail(err);
+		},
+		complete: function () {
+			// complete
+			typeof obj.complete == "function" && obj.complete();
+		}
+	})
+};
+
+util.footer = function ($this) {
+	let app = getApp();
+	let that = $this;
+	let tabBar = app.tabBar;
+	for (let i in tabBar['list']) {
+		tabBar['list'][i]['pageUrl'] = tabBar['list'][i]['pagePath'].replace(/(\?|#)[^"]*/g, '')
+	}
+	that.setData({
+		tabBar: tabBar,
+		'tabBar.thisurl': that.__route__
+	})
+};
+/*
+ * 提示信息
+ * type 为 success, error 当为 success,  时,为toast方式,否则为模态框的方式
+ * redirect 为提示后的跳转地址, 跳转的时候可以加上 协议名称  
+ * navigate:/we7/pages/detail/detail 以 navigateTo 的方法跳转,
+ * redirect:/we7/pages/detail/detail 以 redirectTo 的方式跳转,默认为 redirect
+*/
+util.message = function(title, redirect, type) {
+	if (!title) {
+		return true;
+	}
+	if (typeof title == 'object') {
+		redirect = title.redirect;
+		type = title.type;
+		title = title.title;
+	}
+	if (redirect) {
+		var redirectType = redirect.substring(0, 9), url = '', redirectFunction = '';
+		if (redirectType == 'navigate:') {
+			redirectFunction = 'navigateTo';
+			url = redirect.substring(9);
+		} else if (redirectType == 'redirect:') {
+			redirectFunction = 'redirectTo';
+			url = redirect.substring(9);
+		} else {
+			url = redirect;
+			redirectFunction = 'redirectTo';
+		}
+	}
+	console.log(url)
+	if (!type) {
+		type = 'success';
+	}
+
+	if (type == 'success') {
+		wx.showToast({
+			title: title,
+			icon: 'success',
+			duration: 2000,
+			mask : url ? true : false,
+			complete : function() {
+				if (url) {
+					setTimeout(function(){
+						wx[redirectFunction]({
+							url: url,
+						});
+					}, 1800);
+				}
+				
+			}
+		});
+	} else if (type == 'error') {
+		wx.showModal({
+			title: '系统信息',
+			content : title,
+			showCancel : false,
+			complete : function() {
+				if (url) {
+					wx[redirectFunction]({
+						url: url,
+					});
+				}
+			}
+		});
+	}
+}
+
+util.user = util.getUserInfo;
+
+//封装微信等待提示,防止ajax过多时,show多次
+util.showLoading = function() {
+	var isShowLoading = wx.getStorageSync('isShowLoading');
+	if (isShowLoading) {
+		wx.hideLoading();
+		wx.setStorageSync('isShowLoading', false);
+	}
+
+	wx.showLoading({
+		title : '加载中',
+		complete : function() {
+			wx.setStorageSync('isShowLoading', true);
+		},
+		fail : function() {
+			wx.setStorageSync('isShowLoading', false);
+		}
+	});
+}
+
+util.showImage = function(event) {
+	var url = event ? event.currentTarget.dataset.preview : '';
+	if (!url) {
+		return false;
+	}
+	wx.previewImage({
+		urls: [url]
+	});
+}
+
+/**
+ * 转换内容中的emoji表情为 unicode 码点,在Php中使用utf8_bytes来转换输出
+*/
+util.parseContent = function(string) {
+	if (!string) {
+		return string;
+	}
+
+	var ranges = [
+			'\ud83c[\udf00-\udfff]', // U+1F300 to U+1F3FF
+			'\ud83d[\udc00-\ude4f]', // U+1F400 to U+1F64F
+			'\ud83d[\ude80-\udeff]'  // U+1F680 to U+1F6FF
+		];
+	var emoji = string.match(
+		new RegExp(ranges.join('|'), 'g'));
+
+	if (emoji) {
+		for (var i in emoji) {
+			string = string.replace(emoji[i], '[U+' + emoji[i].codePointAt(0).toString(16).toUpperCase() + ']');
+		}
+	}
+	return string;
+}
+
+util.date = function(){
+	/**
+	 * 判断闰年
+	 * @param date Date日期对象
+	 * @return boolean true 或false
+	 */
+	this.isLeapYear = function(date){
+		return (0==date.getYear()%4&&((date.getYear()%100!=0)||(date.getYear()%400==0))); 
+	}
+	
+	/**
+	 * 日期对象转换为指定格式的字符串
+	 * @param f 日期格式,格式定义如下 yyyy-MM-dd HH:mm:ss
+	 * @param date Date日期对象, 如果缺省,则为当前时间
+	 *
+	 * YYYY/yyyy/YY/yy 表示年份  
+	 * MM/M 月份  
+	 * W/w 星期  
+	 * dd/DD/d/D 日期  
+	 * hh/HH/h/H 时间  
+	 * mm/m 分钟  
+	 * ss/SS/s/S 秒  
+	 * @return string 指定格式的时间字符串
+	 */
+	this.dateToStr = function(formatStr, date){
+		formatStr = arguments[0] || "yyyy-MM-dd HH:mm:ss";
+		date = arguments[1] || new Date();
+		var str = formatStr;   
+		var Week = ['日','一','二','三','四','五','六'];  
+		str=str.replace(/yyyy|YYYY/,date.getFullYear());   
+		str=str.replace(/yy|YY/,(date.getYear() % 100)>9?(date.getYear() % 100).toString():'0' + (date.getYear() % 100));   
+		str=str.replace(/MM/,date.getMonth()>9?(date.getMonth() + 1):'0' + (date.getMonth() + 1));   
+		str=str.replace(/M/g,date.getMonth());   
+		str=str.replace(/w|W/g,Week[date.getDay()]);   
+	  
+		str=str.replace(/dd|DD/,date.getDate()>9?date.getDate().toString():'0' + date.getDate());   
+		str=str.replace(/d|D/g,date.getDate());   
+	  
+		str=str.replace(/hh|HH/,date.getHours()>9?date.getHours().toString():'0' + date.getHours());   
+		str=str.replace(/h|H/g,date.getHours());   
+		str=str.replace(/mm/,date.getMinutes()>9?date.getMinutes().toString():'0' + date.getMinutes());   
+		str=str.replace(/m/g,date.getMinutes());   
+	  
+		str=str.replace(/ss|SS/,date.getSeconds()>9?date.getSeconds().toString():'0' + date.getSeconds());   
+		str=str.replace(/s|S/g,date.getSeconds());   
+	  
+		return str;   
+	}
+ 
+	
+	/**
+	* 日期计算  
+	* @param strInterval string  可选值 y 年 m月 d日 w星期 ww周 h时 n分 s秒  
+	* @param num int
+	* @param date Date 日期对象
+	* @return Date 返回日期对象
+	*/
+	this.dateAdd = function(strInterval, num, date){
+		date =  arguments[2] || new Date();
+		switch (strInterval) { 
+			case 's' :return new Date(date.getTime() + (1000 * num));  
+			case 'n' :return new Date(date.getTime() + (60000 * num));  
+			case 'h' :return new Date(date.getTime() + (3600000 * num));  
+			case 'd' :return new Date(date.getTime() + (86400000 * num));  
+			case 'w' :return new Date(date.getTime() + ((86400000 * 7) * num));  
+			case 'm' :return new Date(date.getFullYear(), (date.getMonth()) + num, date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds());  
+			case 'y' :return new Date((date.getFullYear() + num), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds());  
+		}  
+	}  
+	
+	/**
+	* 比较日期差 dtEnd 格式为日期型或者有效日期格式字符串
+	* @param strInterval string  可选值 y 年 m月 d日 w星期 ww周 h时 n分 s秒  
+	* @param dtStart Date  可选值 y 年 m月 d日 w星期 ww周 h时 n分 s秒
+	* @param dtEnd Date  可选值 y 年 m月 d日 w星期 ww周 h时 n分 s秒 
+	*/
+	this.dateDiff = function(strInterval, dtStart, dtEnd) {   
+		switch (strInterval) {   
+			case 's' :return parseInt((dtEnd - dtStart) / 1000);  
+			case 'n' :return parseInt((dtEnd - dtStart) / 60000);  
+			case 'h' :return parseInt((dtEnd - dtStart) / 3600000);  
+			case 'd' :return parseInt((dtEnd - dtStart) / 86400000);  
+			case 'w' :return parseInt((dtEnd - dtStart) / (86400000 * 7));  
+			case 'm' :return (dtEnd.getMonth()+1)+((dtEnd.getFullYear()-dtStart.getFullYear())*12) - (dtStart.getMonth()+1);  
+			case 'y' :return dtEnd.getFullYear() - dtStart.getFullYear();  
+		}  
+	}
+ 
+	/**
+	* 字符串转换为日期对象 // eval 不可用
+	* @param date Date 格式为yyyy-MM-dd HH:mm:ss,必须按年月日时分秒的顺序,中间分隔符不限制
+	*/
+	this.strToDate = function(dateStr){
+		var data = dateStr;  
+		var reCat = /(\d{1,4})/gm;   
+		var t = data.match(reCat);
+		t[1] = t[1] - 1;
+		eval('var d = new Date('+t.join(',')+');');
+		return d;
+	}
+ 
+	/**
+	* 把指定格式的字符串转换为日期对象yyyy-MM-dd HH:mm:ss
+	* 
+	*/
+	this.strFormatToDate = function(formatStr, dateStr){
+		var year = 0;
+		var start = -1;
+		var len = dateStr.length;
+		if((start = formatStr.indexOf('yyyy')) > -1 && start < len){
+			year = dateStr.substr(start, 4);
+		}
+		var month = 0;
+		if((start = formatStr.indexOf('MM')) > -1  && start < len){
+			month = parseInt(dateStr.substr(start, 2)) - 1;
+		}
+		var day = 0;
+		if((start = formatStr.indexOf('dd')) > -1 && start < len){
+			day = parseInt(dateStr.substr(start, 2));
+		}
+		var hour = 0;
+		if( ((start = formatStr.indexOf('HH')) > -1 || (start = formatStr.indexOf('hh')) > 1) && start < len){
+			hour = parseInt(dateStr.substr(start, 2));
+		}
+		var minute = 0;
+		if((start = formatStr.indexOf('mm')) > -1  && start < len){
+			minute = dateStr.substr(start, 2);
+		}
+		var second = 0;
+		if((start = formatStr.indexOf('ss')) > -1  && start < len){
+			second = dateStr.substr(start, 2);
+		}
+		return new Date(year, month, day, hour, minute, second);
+	}
+ 
+ 
+	/**
+	* 日期对象转换为毫秒数
+	*/
+	this.dateToLong = function(date){
+		return date.getTime();
+	}
+ 
+	/**
+	* 毫秒转换为日期对象
+	* @param dateVal number 日期的毫秒数 
+	*/
+	this.longToDate = function(dateVal){
+		return new Date(dateVal);
+	}
+ 
+	/**
+	* 判断字符串是否为日期格式
+	* @param str string 字符串
+	* @param formatStr string 日期格式, 如下 yyyy-MM-dd
+	*/
+	this.isDate = function(str, formatStr){
+		if (formatStr == null){
+			formatStr = "yyyyMMdd";	
+		}
+		var yIndex = formatStr.indexOf("yyyy");	 
+		if(yIndex==-1){
+			return false;
+		}
+		var year = str.substring(yIndex,yIndex+4);	 
+		var mIndex = formatStr.indexOf("MM");	 
+		if(mIndex==-1){
+			return false;
+		}
+		var month = str.substring(mIndex,mIndex+2);	 
+		var dIndex = formatStr.indexOf("dd");	 
+		if(dIndex==-1){
+			return false;
+		}
+		var day = str.substring(dIndex,dIndex+2);	 
+		if(!isNumber(year)||year>"2100" || year< "1900"){
+			return false;
+		}
+		if(!isNumber(month)||month>"12" || month< "01"){
+			return false;
+		}
+		if(day>getMaxDay(year,month) || day< "01"){
+			return false;
+		}
+		return true;   
+	}
+	
+	this.getMaxDay = function(year,month) {	 
+		if(month==4||month==6||month==9||month==11)	 
+			return "30";	 
+		if(month==2)	 
+			if(year%4==0&&year%100!=0 || year%400==0)	 
+				return "29";	 
+			else	 
+				return "28";	 
+		return "31";	 
+	}	 
+	/**
+	*	变量是否为数字
+	*/
+	this.isNumber = function(str)
+	{
+		var regExp = /^\d+$/g;
+		return regExp.test(str);
+	}
+	
+	/**
+	* 把日期分割成数组 [年、月、日、时、分、秒]
+	*/
+	this.toArray = function(myDate)  
+	{   
+		myDate = arguments[0] || new Date();
+		var myArray = Array();  
+		myArray[0] = myDate.getFullYear();  
+		myArray[1] = myDate.getMonth();  
+		myArray[2] = myDate.getDate();  
+		myArray[3] = myDate.getHours();  
+		myArray[4] = myDate.getMinutes();  
+		myArray[5] = myDate.getSeconds();  
+		return myArray;  
+	}  
+	
+	/**
+	* 取得日期数据信息  
+	* 参数 interval 表示数据类型  
+	* y 年 M月 d日 w星期 ww周 h时 n分 s秒  
+	*/
+	this.datePart = function(interval, myDate)  
+	{   
+		myDate = arguments[1] || new Date();
+		var partStr='';  
+		var Week = ['日','一','二','三','四','五','六'];  
+		switch (interval)  
+		{   
+			case 'y' :partStr = myDate.getFullYear();break;  
+			case 'M' :partStr = myDate.getMonth()+1;break;  
+			case 'd' :partStr = myDate.getDate();break;  
+			case 'w' :partStr = Week[myDate.getDay()];break;  
+			case 'ww' :partStr = myDate.WeekNumOfYear();break;  
+			case 'h' :partStr = myDate.getHours();break;  
+			case 'm' :partStr = myDate.getMinutes();break;  
+			case 's' :partStr = myDate.getSeconds();break;  
+		}  
+		return partStr;  
+	}  
+	
+	/**
+	* 取得当前日期所在月的最大天数  
+	*/
+	this.maxDayOfDate = function(date)  
+	{   
+		date = arguments[0] || new Date();
+		date.setDate(1);
+		date.setMonth(date.getMonth() + 1);
+		var time = date.getTime() - 24 * 60 * 60 * 1000;
+		var newDate = new Date(time);
+		return newDate.getDate();
+	}
+};
+
+module.exports = util;

+ 82 - 0
js/wxchar.js

@@ -0,0 +1,82 @@
+// vuex使用
+import request from '@/api/request.js'
+import homeApi from '@/api/home/index.js'
+const jweixin = require("jweixin-module");
+export const getPlatform = () => {
+	//默认web
+	let platform = 5;
+	//#ifdef APP-PLUS || APP-NVUE
+	const system = uni.getSystemInfoSync();
+	if (system.platform === "ios") {
+		platform = 1;
+	} else {
+		platform = 2;
+	}
+	//#endif
+
+	//#ifdef H5
+	platform = 3;
+	//#endif
+
+	//#ifdef MP-WEIXIN
+	platform = 4;
+	//#endif
+	return platform;
+};
+//判断浏览器是否是微信浏览器
+export const checkIsWechatBrowser = () => {
+	let platform = getPlatform();
+	if (platform === 3) {
+		return (
+			navigator.userAgent.toLowerCase().match(/MicroMessenger/i) ==
+			"micromessenger"
+		);
+	} else {
+		return false;
+	}
+};
+//初始化微信分享配置(以下代码是封装在一个类文件的一个方法)
+async function initWeixinShareConfig(options = {}) {
+	//检测是否处于微信浏览器环境下
+	if (!checkIsWechatBrowser()) {
+		return;
+	}
+	let _this = this;
+	//获取请求服务端获取签名信息
+	const res = await homeApi.share2();
+	if (res.status == 200) {
+		//配置
+		var data = {
+			debug: res.data.jsapi.debug ? true : false, //根据服务端来控制是否开启调试模式
+			appId: res.data.jsapi.appId,
+			timestamp: res.data.jsapi.timestamp,
+			nonceStr: res.data.jsapi.nonceStr,
+			signature: res.data.jsapi.signature,
+			jsApiList: res.data.jsapi.jsApiList,
+		};
+		jweixin.config(data);
+		//分享的触发动作必须写再ready里面
+		jweixin.ready(() => {
+			//配置分享数据
+			let shareData = {
+				title: options.title || "", //分享的标题
+				desc: options.desc || "", //分享的描述
+				link: options.link, //分享的链接
+				imgUrl: options.imageUrl || "", //分享的图片链接
+				success(response) {
+					//配置成功之后的回调(并不是分享成功之后的回调,这个地方是个坑,要注意下)
+					console.log('user shared');
+				},
+			};
+			//分享给朋友接口
+			jweixin.updateAppMessageShareData(shareData);
+			//分享到朋友圈接口
+			jweixin.updateTimelineShareData(shareData);
+		});
+	} else {
+		console.log(JSON.stringify(res));
+	}
+};
+export default {
+	initWeixinShareConfig
+}

+ 31 - 0
libs/amap-wx.130.js

@@ -0,0 +1,31 @@
+function AMapWX(a){this.key=a.key;this.requestConfig={key:a.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"};this.MeRequestConfig={key:a.key,serviceName:"https://restapi.amap.com/rest/me"}}
+AMapWX.prototype.getWxLocation=function(a,b){wx.getLocation({type:"gcj02",success:function(c){c=c.longitude+","+c.latitude;wx.setStorage({key:"userLocation",data:c});b(c)},fail:function(c){wx.getStorage({key:"userLocation",success:function(d){d.data&&b(d.data)}});a.fail({errCode:"0",errMsg:c.errMsg||""})}})};
+AMapWX.prototype.getMEKeywordsSearch=function(a){if(!a.options)return a.fail({errCode:"0",errMsg:"\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"});var b=a.options,c=this.MeRequestConfig,d={key:c.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"};b.layerId&&(d.layerId=b.layerId);b.keywords&&(d.keywords=b.keywords);b.city&&(d.city=b.city);b.filter&&(d.filter=b.filter);b.sortrule&&(d.sortrule=b.sortrule);b.pageNum&&(d.pageNum=b.pageNum);b.pageSize&&(d.pageSize=b.pageSize);b.sig&&(d.sig=
+b.sig);wx.request({url:c.serviceName+"/cpoint/datasearch/local",data:d,method:"GET",header:{"content-type":"application/json"},success:function(e){(e=e.data)&&e.status&&"1"===e.status&&0===e.code?a.success(e.data):a.fail({errCode:"0",errMsg:e})},fail:function(e){a.fail({errCode:"0",errMsg:e.errMsg||""})}})};
+AMapWX.prototype.getMEIdSearch=function(a){if(!a.options)return a.fail({errCode:"0",errMsg:"\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"});var b=a.options,c=this.MeRequestConfig,d={key:c.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"};b.layerId&&(d.layerId=b.layerId);b.id&&(d.id=b.id);b.sig&&(d.sig=b.sig);wx.request({url:c.serviceName+"/cpoint/datasearch/id",data:d,method:"GET",header:{"content-type":"application/json"},success:function(e){(e=e.data)&&e.status&&"1"===e.status&&
+0===e.code?a.success(e.data):a.fail({errCode:"0",errMsg:e})},fail:function(e){a.fail({errCode:"0",errMsg:e.errMsg||""})}})};
+AMapWX.prototype.getMEPolygonSearch=function(a){if(!a.options)return a.fail({errCode:"0",errMsg:"\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"});var b=a.options,c=this.MeRequestConfig,d={key:c.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"};b.layerId&&(d.layerId=b.layerId);b.keywords&&(d.keywords=b.keywords);b.polygon&&(d.polygon=b.polygon);b.filter&&(d.filter=b.filter);b.sortrule&&(d.sortrule=b.sortrule);b.pageNum&&(d.pageNum=b.pageNum);b.pageSize&&(d.pageSize=b.pageSize);
+b.sig&&(d.sig=b.sig);wx.request({url:c.serviceName+"/cpoint/datasearch/polygon",data:d,method:"GET",header:{"content-type":"application/json"},success:function(e){(e=e.data)&&e.status&&"1"===e.status&&0===e.code?a.success(e.data):a.fail({errCode:"0",errMsg:e})},fail:function(e){a.fail({errCode:"0",errMsg:e.errMsg||""})}})};
+AMapWX.prototype.getMEaroundSearch=function(a){if(!a.options)return a.fail({errCode:"0",errMsg:"\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"});var b=a.options,c=this.MeRequestConfig,d={key:c.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"};b.layerId&&(d.layerId=b.layerId);b.keywords&&(d.keywords=b.keywords);b.center&&(d.center=b.center);b.radius&&(d.radius=b.radius);b.filter&&(d.filter=b.filter);b.sortrule&&(d.sortrule=b.sortrule);b.pageNum&&(d.pageNum=b.pageNum);b.pageSize&&
+(d.pageSize=b.pageSize);b.sig&&(d.sig=b.sig);wx.request({url:c.serviceName+"/cpoint/datasearch/around",data:d,method:"GET",header:{"content-type":"application/json"},success:function(e){(e=e.data)&&e.status&&"1"===e.status&&0===e.code?a.success(e.data):a.fail({errCode:"0",errMsg:e})},fail:function(e){a.fail({errCode:"0",errMsg:e.errMsg||""})}})};
+AMapWX.prototype.getGeo=function(a){var b=this.requestConfig,c=a.options;b={key:this.key,extensions:"all",s:b.s,platform:b.platform,appname:this.key,sdkversion:b.sdkversion,logversion:b.logversion};c.address&&(b.address=c.address);c.city&&(b.city=c.city);c.batch&&(b.batch=c.batch);c.sig&&(b.sig=c.sig);wx.request({url:"https://restapi.amap.com/v3/geocode/geo",data:b,method:"GET",header:{"content-type":"application/json"},success:function(d){(d=d.data)&&d.status&&"1"===d.status?a.success(d):a.fail({errCode:"0",
+errMsg:d})},fail:function(d){a.fail({errCode:"0",errMsg:d.errMsg||""})}})};
+AMapWX.prototype.getRegeo=function(a){function b(d){var e=c.requestConfig;wx.request({url:"https://restapi.amap.com/v3/geocode/regeo",data:{key:c.key,location:d,extensions:"all",s:e.s,platform:e.platform,appname:c.key,sdkversion:e.sdkversion,logversion:e.logversion},method:"GET",header:{"content-type":"application/json"},success:function(g){if(g.data.status&&"1"==g.data.status){g=g.data.regeocode;var h=g.addressComponent,f=[],k=g.roads[0].name+"\u9644\u8fd1",m=d.split(",")[0],n=d.split(",")[1];if(g.pois&&
+g.pois[0]){k=g.pois[0].name+"\u9644\u8fd1";var l=g.pois[0].location;l&&(m=parseFloat(l.split(",")[0]),n=parseFloat(l.split(",")[1]))}h.provice&&f.push(h.provice);h.city&&f.push(h.city);h.district&&f.push(h.district);h.streetNumber&&h.streetNumber.street&&h.streetNumber.number?(f.push(h.streetNumber.street),f.push(h.streetNumber.number)):f.push(g.roads[0].name);f=f.join("");a.success([{iconPath:a.iconPath,width:a.iconWidth,height:a.iconHeight,name:f,desc:k,longitude:m,latitude:n,id:0,regeocodeData:g}])}else a.fail({errCode:g.data.infocode,
+errMsg:g.data.info})},fail:function(g){a.fail({errCode:"0",errMsg:g.errMsg||""})}})}var c=this;a.location?b(a.location):c.getWxLocation(a,function(d){b(d)})};
+AMapWX.prototype.getWeather=function(a){function b(g){var h="base";a.type&&"forecast"==a.type&&(h="all");wx.request({url:"https://restapi.amap.com/v3/weather/weatherInfo",data:{key:d.key,city:g,extensions:h,s:e.s,platform:e.platform,appname:d.key,sdkversion:e.sdkversion,logversion:e.logversion},method:"GET",header:{"content-type":"application/json"},success:function(f){if(f.data.status&&"1"==f.data.status)if(f.data.lives){if((f=f.data.lives)&&0<f.length){f=f[0];var k={city:{text:"\u57ce\u5e02",data:f.city},
+weather:{text:"\u5929\u6c14",data:f.weather},temperature:{text:"\u6e29\u5ea6",data:f.temperature},winddirection:{text:"\u98ce\u5411",data:f.winddirection+"\u98ce"},windpower:{text:"\u98ce\u529b",data:f.windpower+"\u7ea7"},humidity:{text:"\u6e7f\u5ea6",data:f.humidity+"%"}};k.liveData=f;a.success(k)}}else f.data.forecasts&&f.data.forecasts[0]&&a.success({forecast:f.data.forecasts[0]});else a.fail({errCode:f.data.infocode,errMsg:f.data.info})},fail:function(f){a.fail({errCode:"0",errMsg:f.errMsg||""})}})}
+function c(g){wx.request({url:"https://restapi.amap.com/v3/geocode/regeo",data:{key:d.key,location:g,extensions:"all",s:e.s,platform:e.platform,appname:d.key,sdkversion:e.sdkversion,logversion:e.logversion},method:"GET",header:{"content-type":"application/json"},success:function(h){if(h.data.status&&"1"==h.data.status){h=h.data.regeocode;if(h.addressComponent)var f=h.addressComponent.adcode;else h.aois&&0<h.aois.length&&(f=h.aois[0].adcode);b(f)}else a.fail({errCode:h.data.infocode,errMsg:h.data.info})},
+fail:function(h){a.fail({errCode:"0",errMsg:h.errMsg||""})}})}var d=this,e=d.requestConfig;a.city?b(a.city):d.getWxLocation(a,function(g){c(g)})};
+AMapWX.prototype.getPoiAround=function(a){function b(e){e={key:c.key,location:e,s:d.s,platform:d.platform,appname:c.key,sdkversion:d.sdkversion,logversion:d.logversion};a.querytypes&&(e.types=a.querytypes);a.querykeywords&&(e.keywords=a.querykeywords);wx.request({url:"https://restapi.amap.com/v3/place/around",data:e,method:"GET",header:{"content-type":"application/json"},success:function(g){if(g.data.status&&"1"==g.data.status){if((g=g.data)&&g.pois){for(var h=[],f=0;f<g.pois.length;f++){var k=0==
+f?a.iconPathSelected:a.iconPath;h.push({latitude:parseFloat(g.pois[f].location.split(",")[1]),longitude:parseFloat(g.pois[f].location.split(",")[0]),iconPath:k,width:22,height:32,id:f,name:g.pois[f].name,address:g.pois[f].address})}a.success({markers:h,poisData:g.pois})}}else a.fail({errCode:g.data.infocode,errMsg:g.data.info})},fail:function(g){a.fail({errCode:"0",errMsg:g.errMsg||""})}})}var c=this,d=c.requestConfig;a.location?b(a.location):c.getWxLocation(a,function(e){b(e)})};
+AMapWX.prototype.getStaticmap=function(a){function b(e){c.push("location="+e);a.zoom&&c.push("zoom="+a.zoom);a.size&&c.push("size="+a.size);a.scale&&c.push("scale="+a.scale);a.markers&&c.push("markers="+a.markers);a.labels&&c.push("labels="+a.labels);a.paths&&c.push("paths="+a.paths);a.traffic&&c.push("traffic="+a.traffic);e="https://restapi.amap.com/v3/staticmap?"+c.join("&");a.success({url:e})}var c=[];c.push("key="+this.key);var d=this.requestConfig;c.push("s="+d.s);c.push("platform="+d.platform);
+c.push("appname="+d.appname);c.push("sdkversion="+d.sdkversion);c.push("logversion="+d.logversion);a.location?b(a.location):this.getWxLocation(a,function(e){b(e)})};
+AMapWX.prototype.getInputtips=function(a){var b=Object.assign({},this.requestConfig);a.location&&(b.location=a.location);a.keywords&&(b.keywords=a.keywords);a.type&&(b.type=a.type);a.city&&(b.city=a.city);a.citylimit&&(b.citylimit=a.citylimit);wx.request({url:"https://restapi.amap.com/v3/assistant/inputtips",data:b,method:"GET",header:{"content-type":"application/json"},success:function(c){c&&c.data&&c.data.tips&&a.success({tips:c.data.tips})},fail:function(c){a.fail({errCode:"0",errMsg:c.errMsg||
+""})}})};
+AMapWX.prototype.getDrivingRoute=function(a){var b=Object.assign({},this.requestConfig);a.origin&&(b.origin=a.origin);a.destination&&(b.destination=a.destination);a.strategy&&(b.strategy=a.strategy);a.waypoints&&(b.waypoints=a.waypoints);a.avoidpolygons&&(b.avoidpolygons=a.avoidpolygons);a.avoidroad&&(b.avoidroad=a.avoidroad);wx.request({url:"https://restapi.amap.com/v3/direction/driving",data:b,method:"GET",header:{"content-type":"application/json"},success:function(c){c&&c.data&&c.data.route&&a.success({paths:c.data.route.paths,
+taxi_cost:c.data.route.taxi_cost||""})},fail:function(c){a.fail({errCode:"0",errMsg:c.errMsg||""})}})};
+AMapWX.prototype.getWalkingRoute=function(a){var b=Object.assign({},this.requestConfig);a.origin&&(b.origin=a.origin);a.destination&&(b.destination=a.destination);wx.request({url:"https://restapi.amap.com/v3/direction/walking",data:b,method:"GET",header:{"content-type":"application/json"},success:function(c){c&&c.data&&c.data.route&&a.success({paths:c.data.route.paths})},fail:function(c){a.fail({errCode:"0",errMsg:c.errMsg||""})}})};
+AMapWX.prototype.getTransitRoute=function(a){var b=Object.assign({},this.requestConfig);a.origin&&(b.origin=a.origin);a.destination&&(b.destination=a.destination);a.strategy&&(b.strategy=a.strategy);a.city&&(b.city=a.city);a.cityd&&(b.cityd=a.cityd);wx.request({url:"https://restapi.amap.com/v3/direction/transit/integrated",data:b,method:"GET",header:{"content-type":"application/json"},success:function(c){c&&c.data&&c.data.route&&(c=c.data.route,a.success({distance:c.distance||"",taxi_cost:c.taxi_cost||
+"",transits:c.transits}))},fail:function(c){a.fail({errCode:"0",errMsg:c.errMsg||""})}})};
+AMapWX.prototype.getRidingRoute=function(a){var b=Object.assign({},this.requestConfig);a.origin&&(b.origin=a.origin);a.destination&&(b.destination=a.destination);wx.request({url:"https://restapi.amap.com/v3/direction/riding",data:b,method:"GET",header:{"content-type":"application/json"},success:function(c){c&&c.data&&c.data.route&&a.success({paths:c.data.route.paths})},fail:function(c){a.fail({errCode:"0",errMsg:c.errMsg||""})}})};module.exports.AMapWX=AMapWX;

+ 250 - 0
main.js

@@ -0,0 +1,250 @@
+import Vue from 'vue'
+import store from './store'
+import App from './App'
+import util from './js/util.js'
+import until from './js/until.js'
+import bindid from './js/bindid.js'
+import uView from '@/uni_modules/uview-ui'
+import homeApi from '@/api/home/index.js'
+import paycenter from '@/api/paycenter/paycenter.js'
+// 引入 tob-less
+import setupTobLess from '@/uni_modules/tob-less/index.js'
+import siteinfo from "@/siteinfo.js"
+import author from "@/author.js"
+import sharebox from "@/components/sharebox/sharebox.vue"
+// #ifdef MP-WEIXIN
+let mpShare = require('@/uni_modules/uview-ui/libs/mixin/mpShare.js');
+// #endif
+App.mpType = 'app'
+
+Vue.component('sharebox', sharebox)
+const showToast = (title, duration = 2000, mask = false, icon = 'none') => {
+	uni.showToast({
+		title,
+		duration,
+		mask,
+		icon
+	});
+}
+/**
+
+ *  因工具函数属于公司资产, 所以直接在Vue实例挂载几个常用的函数
+ *  所有测试用数据均存放于根目录json.js
+ *  
+ *  css部分使用了App.vue下的全局样式和iconfont图标,有需要图标库的可以留言。
+ *  示例使用了uni.scss下的变量, 除变量外已尽量移除特有语法,可直接替换为其他预处理器使用
+ */
+const msg = (title, duration = 2000, mask = false, icon = 'none') => {
+	//统一提示方便全局修改
+	if (Boolean(title) === false) {
+		return;
+	}
+	uni.showToast({
+		title,
+		duration,
+		mask,
+		icon
+	});
+}
+const json = type => {}
+
+const prePage = () => {
+	let pages = getCurrentPages();
+	let prePage = pages[pages.length - 2];
+	// #ifdef H5
+	return prePage;
+	// #endif
+	if (prePage && prePage.$vm) {
+		return prePage.$vm;
+	} else {
+		return null;
+	}
+}
+Vue.config.productionTip = false
+Vue.prototype.$store = store;
+//获取登录用户ID
+Vue.prototype.$getuid = () => {
+	let userInfo = uni.getStorageSync('userInfo');
+	if (userInfo) {
+		return userInfo.id;
+	} else {
+		return 0;
+	}
+}
+
+// #ifdef H5
+const getUrlParms = name => {
+	const reg = new RegExp(`(^|&)${name}=([^&]*)(&|$)`)
+	const r = window.location.search.substr(1).match(reg)
+	if (r !== null)
+		return unescape(r[2])
+	return null
+}
+Vue.prototype.$getUrlParms = getUrlParms //全局配置
+// #endif
+//判断是否是微信浏览器的函数
+Vue.prototype.isWeiXin = function() {
+	// #ifdef H5
+	var ua = window.navigator.userAgent.toLowerCase();
+	if (ua.match(/MicroMessenger/i) == 'micromessenger') {
+		return true;
+	} else {
+		// 普通浏览器
+		return false;
+	}
+	// #endif
+	return false;
+}
+//广告时间
+Vue.prototype.$adtime = {
+	mvideo_time: 0,
+	pscreen_time: 0,
+	banner_time: 0
+};
+Vue.prototype.$paycenter = paycenter;
+
+
+Vue.prototype.$primarys = {
+	"A": "#ff8903",
+	"B": "#e52340",
+	"C": "#ffd100",
+	"D": "#4B086D",
+	"E": "#014872",
+	"F": "#067d68",
+	"G": "#56AB2F",
+
+}
+Vue.prototype.$api = {
+	msg,
+	json,
+	prePage
+};
+Vue.prototype.$util = util;
+Vue.prototype.$until = until;
+Vue.prototype.$bindid = bindid;
+Vue.prototype.$Toast = showToast;
+Vue.prototype.$siteinfo = siteinfo
+Vue.prototype.$author = author
+Vue.prototype.$siteinfo.root_img = siteinfo.siteroot;
+Vue.prototype.$siteinfo.root_rich_img = siteinfo.siteroot;
+if (process.env.NODE_ENV === 'development') {
+	Vue.prototype.$siteinfo.h5_siteroot = siteinfo.siteroot;
+} else {
+	//生产环境
+	// #ifdef H5
+	let httpurl = ''
+	if (location.href.indexOf('https') != -1) {
+		httpurl = `https://${window.location.host}`
+	} else {
+		httpurl = `http://${window.location.host}` //全局配置
+	}
+	Vue.prototype.$siteinfo.h5_siteroot = httpurl
+	Vue.prototype.$siteinfo.root_rich_img = httpurl;
+	// #endif
+}
+if (Vue.prototype.$author.we7_v2 == 1) {
+	// #ifdef H5
+	Vue.prototype.$siteinfo.root_img = Vue.prototype.$siteinfo.h5_siteroot + "/addons/yq_breedingmall/public"
+	// #endif
+	// #ifndef H5
+	Vue.prototype.$siteinfo.root_img = Vue.prototype.$siteinfo.root_img + "/addons/yq_breedingmall/public"
+	// #endif
+}
+Vue.prototype.$config = {
+	app: {
+		position: 0
+	}
+} //全局配置
+Vue.prototype.platform = 0
+Vue.prototype.$uuid = 0
+// #ifdef H5
+Vue.config.ignoredElements = [...Vue.config.ignoredElements, 'wx-open-launch-weapp']
+// #endif
+const init_data = (data, fun) => {
+	Vue.prototype.$config = data;
+	if (fun) {
+		fun(data);
+	}
+}
+Vue.prototype.$init_data = init_data
+Vue.prototype.$cache_config_info_key = 'config_info_key';
+
+const getprimary = () => {
+	let config = until.myCache(Vue.prototype.$cache_config_info_key);
+	if (config) {
+		return config.primary
+	}
+	return '#56AB2F'
+}
+Vue.prototype.$getprimary = getprimary
+Vue.prototype.$theme = {
+	primary: getprimary()
+}
+
+const init_config = (rtype = 2, fun = null) => {
+	let config = until.myCache(Vue.prototype.$cache_config_info_key);
+	if (rtype == 1) {
+		until.myCache(Vue.prototype.$cache_config_info_key, null)
+		config = null;
+	}
+	if (config) {
+		Vue.prototype.$init_data(config, fun);
+	} else {
+		homeApi.home().then(res => {
+			if (res.status == 200) {
+				// #ifdef MP-WEIXIN
+				uni.$u.mpShare = {
+					title: res.data.sharedata.title, // 默认为小程序名称,可自定义
+					path: '', // 默认为当前页面路径,一般无需修改,QQ小程序不支持
+					// 分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径。
+					// 支持PNG及JPG,默认为当前页面的截图
+					imageUrl: res.data.sharedata.imageUrl
+				}
+				// #endif
+				res.data['primary'] = Vue.prototype.$primarys[res.data.initAppTheme]
+				Vue.prototype.$theme.primary = res.data['primary']
+				until.myCache(Vue.prototype.$cache_config_info_key, res.data, 60 * 10);
+				setupTobLess(Vue, {
+					initAppTheme: res.data.initAppTheme
+				})
+				Vue.prototype.$init_data(res.data, fun);
+			} else {
+				uni.showToast({
+					icon: 'none',
+					title: res.data
+				})
+			}
+		})
+	}
+}
+Vue.prototype.$init_config = init_config
+
+const start = () => {
+	setupTobLess(Vue, {
+		initAppTheme: "G"
+	})
+	// #ifdef H5
+	Vue.prototype.$uuid = Vue.prototype.$getUrlParms("uuid")
+	Vue.prototype.$bindid.getbindid({
+		pid: Vue.prototype.$getUrlParms("pid")
+	}, Vue.prototype.$store);
+	// #endif
+	Vue.prototype.$init_config(1);
+	uni.setStorageSync('tabbar', null)
+	const res = uni.getSystemInfoSync();
+	if (res.platform == 'android') {
+		Vue.prototype.platform = 1
+	} else if (res.platform == 'ios') {
+		Vue.prototype.platform = 2
+	}
+	//全局配置
+	// #ifdef MP-WEIXIN
+	Vue.mixin(mpShare)
+	// #endif
+	Vue.use(uView);
+	const app = new Vue({
+		...App
+	})
+	app.$mount()
+}
+start();

+ 254 - 0
manifest.json

@@ -0,0 +1,254 @@
+{
+    "name" : "华微农业",
+    "appid" : "__UNI__2345442",
+    "description" : "华微农业",
+    "versionName" : "2.1.9",
+    "versionCode" : 219,
+    "transformPx" : false,
+    "app-plus" : {
+        /* 5+App特有相关 */
+        "usingComponents" : true,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        "modules" : {
+            "Payment" : {},
+            "VideoPlayer" : {},
+            "OAuth" : {},
+            "Share" : {},
+            "Maps" : {},
+            "Camera" : {},
+            "Barcode" : {}
+        },
+        /* 模块配置 */
+        "distribute" : {
+            /* 应用发布信息 */
+            "android" : {
+                /* android打包配置 */
+                "permissions" : [
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-permission android:name=\"android.permission.INTERNET\"/>",
+                    "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ],
+                "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
+            },
+            "ios" : {
+                "dSYMs" : false
+            },
+            /* ios打包配置 */
+            "sdkConfigs" : {
+                "ad" : {},
+                "oauth" : {
+                    "weixin" : {
+                        "appid" : "wxd475830c2971dac3",
+                        "appsecret" : "d92f14d01ec287dcb35bffb1cc2f2d5d",
+                        "UniversalLinks" : ""
+                    }
+                },
+                "share" : {
+                    "weixin" : {
+                        "appid" : "wxd475830c2971dac3",
+                        "UniversalLinks" : ""
+                    }
+                },
+                "geolocation" : {},
+                "payment" : {
+                    "weixin" : {
+                        "__platform__" : [ "ios", "android" ],
+                        "appid" : "wxd475830c2971dac3",
+                        "UniversalLinks" : ""
+                    },
+                    "alipay" : {
+                        "__platform__" : [ "ios", "android" ]
+                    }
+                },
+                "maps" : {
+                    "amap" : {
+                        "appkey_ios" : "c5f891e346bc1eac7d34f74fc4c4136a",
+                        "appkey_android" : "c5f891e346bc1eac7d34f74fc4c4136a"
+                    }
+                },
+                "speech" : {},
+                "statics" : {}
+            },
+            "icons" : {
+                "android" : {
+                    "hdpi" : "",
+                    "xhdpi" : "",
+                    "xxhdpi" : "",
+                    "xxxhdpi" : ""
+                },
+                "ios" : {
+                    "appstore" : "",
+                    "ipad" : {
+                        "app" : "",
+                        "app@2x" : "",
+                        "notification" : "",
+                        "notification@2x" : "",
+                        "proapp@2x" : "",
+                        "settings" : "",
+                        "settings@2x" : "",
+                        "spotlight" : "",
+                        "spotlight@2x" : ""
+                    },
+                    "iphone" : {
+                        "app@2x" : "",
+                        "app@3x" : "",
+                        "notification@2x" : "",
+                        "notification@3x" : "",
+                        "settings@2x" : "",
+                        "settings@3x" : "",
+                        "spotlight@2x" : "",
+                        "spotlight@3x" : ""
+                    }
+                }
+            },
+            "splashscreen" : {
+                "androidStyle" : "common",
+                "android" : {
+                    "hdpi" : "C:/Users/Administrator/Desktop/test/1.png",
+                    "xhdpi" : "C:/Users/Administrator/Desktop/test/2.png",
+                    "xxhdpi" : "C:/Users/Administrator/Desktop/test/3.png"
+                },
+                "iosStyle" : "common",
+                "useOriginalMsgbox" : true
+            }
+        },
+        "uniStatistics" : {
+            "enable" : false
+        }
+    },
+    /* SDK配置 */
+    "quickapp" : {},
+    /* 快应用特有相关 */
+    "mp-weixin" : {
+        /* 小程序特有相关 */
+        "usingComponents" : true,
+        "appid" : "wx0614bdd665e53bb2",
+        "setting" : {
+            "urlCheck" : true,
+            "es6" : true,
+            "minified" : true,
+            "postcss" : true
+        },
+        "optimization" : {
+            "subPackages" : true
+        },
+        "uniStatistics" : {
+            "enable" : false
+        },
+        "plugins" : {},
+        "permission" : {
+            "scope.userLocation" : {
+                "desc" : "获取当前用户位置信息"
+            }
+        },
+        "requiredPrivateInfos" : [ "getLocation", "chooseLocation", "chooseAddress" ]
+    },
+    "uniStatistics" : {
+        "enable" : false
+    },
+    "h5" : {
+        "devServer" : {
+            "port" : 8083, //端口号
+            "disableHostCheck" : true,
+            "proxy" : {
+                "/api" : {
+                    "target" : "https://hwny.liuniukj.com/api", //目标接口域名
+                    "changeOrigin" : true, //是否跨域
+                    "secure" : false, // 设置支持https协议的代理
+                    "pathRewrite" : {
+                        "^/api" : ""
+                    }
+                }
+            },
+            "https" : false
+        },
+        "title" : "华微农业",
+        "router" : {
+            "mode" : "hash",
+            "base" : "/h5/"
+        },
+        "optimization" : {
+            "treeShaking" : {
+                "enable" : false
+            }
+        },
+        "sdkConfigs" : {
+            "maps" : {}
+        },
+        "domain" : "https://zhly.yqin.cn",
+        "template" : "index.html",
+        "uniStatistics" : {
+            "enable" : false
+        }
+    },
+    "mp-alipay" : {
+        "uniStatistics" : {
+            "enable" : false
+        }
+    },
+    "mp-baidu" : {
+        "uniStatistics" : {
+            "enable" : false
+        }
+    },
+    "mp-qq" : {
+        "uniStatistics" : {
+            "enable" : false
+        }
+    },
+    "mp-toutiao" : {
+        "uniStatistics" : {
+            "enable" : false
+        }
+    },
+    "mp-jd" : {
+        "uniStatistics" : {
+            "enable" : false
+        }
+    },
+    "mp-kuaishou" : {
+        "uniStatistics" : {
+            "enable" : false
+        }
+    },
+    "mp-lark" : {
+        "uniStatistics" : {
+            "enable" : false
+        }
+    },
+    "quickapp-webview-huawei" : {
+        "uniStatistics" : {
+            "enable" : false
+        }
+    },
+    "quickapp-webview-union" : {
+        "uniStatistics" : {
+            "enable" : false
+        }
+    }
+}
+//匹配请求路径里面有 /api 替换成 https://www.xxx.cn
+

+ 461 - 0
package-lock.json

@@ -0,0 +1,461 @@
+{
+  "requires": true,
+  "lockfileVersion": 1,
+  "dependencies": {
+    "@babel/runtime": {
+      "version": "7.19.4",
+      "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.19.4.tgz",
+      "integrity": "sha512-EXpLCrk55f+cYqmHsSR+yD/0gAIMxxA9QK9lnQWzhMCvt+YmoBN7Zx94s++Kv0+unHk39vxNO8t+CMA2WSS3wA==",
+      "requires": {
+        "regenerator-runtime": "^0.13.4"
+      }
+    },
+    "@easydarwin/easyplayer": {
+      "version": "5.0.5",
+      "resolved": "https://registry.npmmirror.com/@easydarwin/easyplayer/-/easyplayer-5.0.5.tgz",
+      "integrity": "sha512-gip21OGeY1YZDSjBDfqPvMy2ZrChr8edCHctUs6zoTxUDv7iaLYPQOYGY5nRl/h8o3t7p8pUBFQaIvjAQn+ifw=="
+    },
+    "@videojs/http-streaming": {
+      "version": "2.14.3",
+      "resolved": "https://registry.npmmirror.com/@videojs/http-streaming/-/http-streaming-2.14.3.tgz",
+      "integrity": "sha512-2tFwxCaNbcEZzQugWf8EERwNMyNtspfHnvxRGRABQs09W/5SqmkWFuGWfUAm4wQKlXGfdPyAJ1338ASl459xAA==",
+      "requires": {
+        "@babel/runtime": "^7.12.5",
+        "@videojs/vhs-utils": "3.0.5",
+        "aes-decrypter": "3.1.3",
+        "global": "^4.4.0",
+        "m3u8-parser": "4.7.1",
+        "mpd-parser": "0.21.1",
+        "mux.js": "6.0.1",
+        "video.js": "^6 || ^7"
+      }
+    },
+    "@videojs/vhs-utils": {
+      "version": "3.0.5",
+      "resolved": "https://registry.npmmirror.com/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz",
+      "integrity": "sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw==",
+      "requires": {
+        "@babel/runtime": "^7.12.5",
+        "global": "^4.4.0",
+        "url-toolkit": "^2.2.1"
+      }
+    },
+    "@videojs/xhr": {
+      "version": "2.6.0",
+      "resolved": "https://registry.npmmirror.com/@videojs/xhr/-/xhr-2.6.0.tgz",
+      "integrity": "sha512-7J361GiN1tXpm+gd0xz2QWr3xNWBE+rytvo8J3KuggFaLg+U37gZQ2BuPLcnkfGffy2e+ozY70RHC8jt7zjA6Q==",
+      "requires": {
+        "@babel/runtime": "^7.5.5",
+        "global": "~4.4.0",
+        "is-function": "^1.0.1"
+      }
+    },
+    "@xmldom/xmldom": {
+      "version": "0.7.5",
+      "resolved": "https://registry.npmmirror.com/@xmldom/xmldom/-/xmldom-0.7.5.tgz",
+      "integrity": "sha512-V3BIhmY36fXZ1OtVcI9W+FxQqxVLsPKcNjWigIaa81dLC9IolJl5Mt4Cvhmr0flUnjSpTdrbMTSbXqYqV5dT6A=="
+    },
+    "aes-decrypter": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmmirror.com/aes-decrypter/-/aes-decrypter-3.1.3.tgz",
+      "integrity": "sha512-VkG9g4BbhMBy+N5/XodDeV6F02chEk9IpgRTq/0bS80y4dzy79VH2Gtms02VXomf3HmyRe3yyJYkJ990ns+d6A==",
+      "requires": {
+        "@babel/runtime": "^7.12.5",
+        "@videojs/vhs-utils": "^3.0.5",
+        "global": "^4.4.0",
+        "pkcs7": "^1.0.4"
+      }
+    },
+    "balanced-match": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz",
+      "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+      "dev": true
+    },
+    "big.js": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-3.2.0.tgz",
+      "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==",
+      "dev": true
+    },
+    "bluebird": {
+      "version": "2.11.0",
+      "resolved": "https://registry.npmmirror.com/bluebird/-/bluebird-2.11.0.tgz",
+      "integrity": "sha512-UfFSr22dmHPQqPP9XWHRhq+gWnHCYguQGkXQlbyPtW5qTnhFWA8/iXg765tH0cAjy7l/zPJ1aBTO0g5XgA7kvQ==",
+      "dev": true
+    },
+    "brace-expansion": {
+      "version": "1.1.11",
+      "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz",
+      "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+      "dev": true,
+      "requires": {
+        "balanced-match": "^1.0.0",
+        "concat-map": "0.0.1"
+      }
+    },
+    "concat-map": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz",
+      "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+      "dev": true
+    },
+    "copy-webpack-plugin": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmmirror.com/copy-webpack-plugin/-/copy-webpack-plugin-4.0.1.tgz",
+      "integrity": "sha512-XtjAxY0Ns/Teukcc7OC0nTjKcZ+Cjub/qDQR3gDXiaXQ/7pqKNsewzaEJEUHv/FbTRB1H3AhscDfUz33Z3T5oA==",
+      "dev": true,
+      "requires": {
+        "bluebird": "^2.10.2",
+        "fs-extra": "^0.26.4",
+        "glob": "^6.0.4",
+        "is-glob": "^3.1.0",
+        "loader-utils": "^0.2.15",
+        "lodash": "^4.3.0",
+        "minimatch": "^3.0.0",
+        "node-dir": "^0.1.10"
+      }
+    },
+    "dom-walk": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmmirror.com/dom-walk/-/dom-walk-0.1.2.tgz",
+      "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w=="
+    },
+    "emojis-list": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmmirror.com/emojis-list/-/emojis-list-2.1.0.tgz",
+      "integrity": "sha512-knHEZMgs8BB+MInokmNTg/OyPlAddghe1YBgNwJBc5zsJi/uyIcXoSDsL/W9ymOsBoBGdPIHXYJ9+qKFwRwDng==",
+      "dev": true
+    },
+    "file-saver": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.5.tgz",
+      "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
+    },
+    "fs-extra": {
+      "version": "0.26.7",
+      "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-0.26.7.tgz",
+      "integrity": "sha512-waKu+1KumRhYv8D8gMRCKJGAMI9pRnPuEb1mvgYD0f7wBscg+h6bW4FDTmEZhB9VKxvoTtxW+Y7bnIlB7zja6Q==",
+      "dev": true,
+      "requires": {
+        "graceful-fs": "^4.1.2",
+        "jsonfile": "^2.1.0",
+        "klaw": "^1.0.0",
+        "path-is-absolute": "^1.0.0",
+        "rimraf": "^2.2.8"
+      }
+    },
+    "fs.realpath": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz",
+      "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
+      "dev": true
+    },
+    "glob": {
+      "version": "6.0.4",
+      "resolved": "https://registry.npmmirror.com/glob/-/glob-6.0.4.tgz",
+      "integrity": "sha512-MKZeRNyYZAVVVG1oZeLaWie1uweH40m9AZwIwxyPbTSX4hHrVYSzLg0Ro5Z5R7XKkIX+Cc6oD1rqeDJnwsB8/A==",
+      "dev": true,
+      "requires": {
+        "inflight": "^1.0.4",
+        "inherits": "2",
+        "minimatch": "2 || 3",
+        "once": "^1.3.0",
+        "path-is-absolute": "^1.0.0"
+      }
+    },
+    "global": {
+      "version": "4.4.0",
+      "resolved": "https://registry.npmmirror.com/global/-/global-4.4.0.tgz",
+      "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==",
+      "requires": {
+        "min-document": "^2.19.0",
+        "process": "^0.11.10"
+      }
+    },
+    "graceful-fs": {
+      "version": "4.2.10",
+      "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.10.tgz",
+      "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
+      "dev": true
+    },
+    "individual": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmmirror.com/individual/-/individual-2.0.0.tgz",
+      "integrity": "sha512-pWt8hBCqJsUWI/HtcfWod7+N9SgAqyPEaF7JQjwzjn5vGrpg6aQ5qeAFQ7dx//UH4J1O+7xqew+gCeeFt6xN/g=="
+    },
+    "inflight": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz",
+      "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+      "dev": true,
+      "requires": {
+        "once": "^1.3.0",
+        "wrappy": "1"
+      }
+    },
+    "inherits": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz",
+      "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+      "dev": true
+    },
+    "is-extglob": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz",
+      "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+      "dev": true
+    },
+    "is-function": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmmirror.com/is-function/-/is-function-1.0.2.tgz",
+      "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ=="
+    },
+    "is-glob": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-3.1.0.tgz",
+      "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==",
+      "dev": true,
+      "requires": {
+        "is-extglob": "^2.1.0"
+      }
+    },
+    "json5": {
+      "version": "0.5.1",
+      "resolved": "https://registry.npmmirror.com/json5/-/json5-0.5.1.tgz",
+      "integrity": "sha512-4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw==",
+      "dev": true
+    },
+    "jsonfile": {
+      "version": "2.4.0",
+      "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-2.4.0.tgz",
+      "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==",
+      "dev": true,
+      "requires": {
+        "graceful-fs": "^4.1.6"
+      }
+    },
+    "jweixin-module": {
+      "version": "1.6.0",
+      "resolved": "https://registry.npmmirror.com/jweixin-module/-/jweixin-module-1.6.0.tgz",
+      "integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
+    },
+    "keycode": {
+      "version": "2.2.1",
+      "resolved": "https://registry.npmmirror.com/keycode/-/keycode-2.2.1.tgz",
+      "integrity": "sha512-Rdgz9Hl9Iv4QKi8b0OlCRQEzp4AgVxyCtz5S/+VIHezDmrDhkp2N2TqBWOLz0/gbeREXOOiI9/4b8BY9uw2vFg=="
+    },
+    "klaw": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmmirror.com/klaw/-/klaw-1.3.1.tgz",
+      "integrity": "sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==",
+      "dev": true,
+      "requires": {
+        "graceful-fs": "^4.1.9"
+      }
+    },
+    "loader-utils": {
+      "version": "0.2.17",
+      "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-0.2.17.tgz",
+      "integrity": "sha512-tiv66G0SmiOx+pLWMtGEkfSEejxvb6N6uRrQjfWJIT79W9GMpgKeCAmm9aVBKtd4WEgntciI8CsGqjpDoCWJug==",
+      "dev": true,
+      "requires": {
+        "big.js": "^3.1.3",
+        "emojis-list": "^2.0.0",
+        "json5": "^0.5.0",
+        "object-assign": "^4.0.1"
+      }
+    },
+    "lodash": {
+      "version": "4.17.21",
+      "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
+      "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+      "dev": true
+    },
+    "m3u8-parser": {
+      "version": "4.7.1",
+      "resolved": "https://registry.npmmirror.com/m3u8-parser/-/m3u8-parser-4.7.1.tgz",
+      "integrity": "sha512-pbrQwiMiq+MmI9bl7UjtPT3AK603PV9bogNlr83uC+X9IoxqL5E4k7kU7fMQ0dpRgxgeSMygqUa0IMLQNXLBNA==",
+      "requires": {
+        "@babel/runtime": "^7.12.5",
+        "@videojs/vhs-utils": "^3.0.5",
+        "global": "^4.4.0"
+      }
+    },
+    "min-document": {
+      "version": "2.19.0",
+      "resolved": "https://registry.npmmirror.com/min-document/-/min-document-2.19.0.tgz",
+      "integrity": "sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==",
+      "requires": {
+        "dom-walk": "^0.1.0"
+      }
+    },
+    "minimatch": {
+      "version": "3.1.2",
+      "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz",
+      "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+      "dev": true,
+      "requires": {
+        "brace-expansion": "^1.1.7"
+      }
+    },
+    "mpd-parser": {
+      "version": "0.21.1",
+      "resolved": "https://registry.npmmirror.com/mpd-parser/-/mpd-parser-0.21.1.tgz",
+      "integrity": "sha512-BxlSXWbKE1n7eyEPBnTEkrzhS3PdmkkKdM1pgKbPnPOH0WFZIc0sPOWi7m0Uo3Wd2a4Or8Qf4ZbS7+ASqQ49fw==",
+      "requires": {
+        "@babel/runtime": "^7.12.5",
+        "@videojs/vhs-utils": "^3.0.5",
+        "@xmldom/xmldom": "^0.7.2",
+        "global": "^4.4.0"
+      }
+    },
+    "mux.js": {
+      "version": "6.0.1",
+      "resolved": "https://registry.npmmirror.com/mux.js/-/mux.js-6.0.1.tgz",
+      "integrity": "sha512-22CHb59rH8pWGcPGW5Og7JngJ9s+z4XuSlYvnxhLuc58cA1WqGDQPzuG8I+sPm1/p0CdgpzVTaKW408k5DNn8w==",
+      "requires": {
+        "@babel/runtime": "^7.11.2",
+        "global": "^4.4.0"
+      }
+    },
+    "node-dir": {
+      "version": "0.1.17",
+      "resolved": "https://registry.npmmirror.com/node-dir/-/node-dir-0.1.17.tgz",
+      "integrity": "sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg==",
+      "dev": true,
+      "requires": {
+        "minimatch": "^3.0.2"
+      }
+    },
+    "object-assign": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz",
+      "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
+      "dev": true
+    },
+    "once": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz",
+      "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+      "dev": true,
+      "requires": {
+        "wrappy": "1"
+      }
+    },
+    "path-is-absolute": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+      "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
+      "dev": true
+    },
+    "pkcs7": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmmirror.com/pkcs7/-/pkcs7-1.0.4.tgz",
+      "integrity": "sha512-afRERtHn54AlwaF2/+LFszyAANTCggGilmcmILUzEjvs3XgFZT+xE6+QWQcAGmu4xajy+Xtj7acLOPdx5/eXWQ==",
+      "requires": {
+        "@babel/runtime": "^7.5.5"
+      }
+    },
+    "process": {
+      "version": "0.11.10",
+      "resolved": "https://registry.npmmirror.com/process/-/process-0.11.10.tgz",
+      "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A=="
+    },
+    "regenerator-runtime": {
+      "version": "0.13.10",
+      "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.10.tgz",
+      "integrity": "sha512-KepLsg4dU12hryUO7bp/axHAKvwGOCV0sGloQtpagJ12ai+ojVDqkeGSiRX1zlq+kjIMZ1t7gpze+26QqtdGqw=="
+    },
+    "rimraf": {
+      "version": "2.7.1",
+      "resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-2.7.1.tgz",
+      "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
+      "dev": true,
+      "requires": {
+        "glob": "^7.1.3"
+      },
+      "dependencies": {
+        "glob": {
+          "version": "7.2.3",
+          "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz",
+          "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+          "dev": true,
+          "requires": {
+            "fs.realpath": "^1.0.0",
+            "inflight": "^1.0.4",
+            "inherits": "2",
+            "minimatch": "^3.1.1",
+            "once": "^1.3.0",
+            "path-is-absolute": "^1.0.0"
+          }
+        }
+      }
+    },
+    "rust-result": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmmirror.com/rust-result/-/rust-result-1.0.0.tgz",
+      "integrity": "sha512-6cJzSBU+J/RJCF063onnQf0cDUOHs9uZI1oroSGnHOph+CQTIJ5Pp2hK5kEQq1+7yE/EEWfulSNXAQ2jikPthA==",
+      "requires": {
+        "individual": "^2.0.0"
+      }
+    },
+    "safe-json-parse": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmmirror.com/safe-json-parse/-/safe-json-parse-4.0.0.tgz",
+      "integrity": "sha512-RjZPPHugjK0TOzFrLZ8inw44s9bKox99/0AZW9o/BEQVrJfhI+fIHMErnPyRa89/yRXUUr93q+tiN6zhoVV4wQ==",
+      "requires": {
+        "rust-result": "^1.0.0"
+      }
+    },
+    "url-toolkit": {
+      "version": "2.2.5",
+      "resolved": "https://registry.npmmirror.com/url-toolkit/-/url-toolkit-2.2.5.tgz",
+      "integrity": "sha512-mtN6xk+Nac+oyJ/PrI7tzfmomRVNFIWKUbG8jdYFt52hxbiReFAXIjYskvu64/dvuW71IcB7lV8l0HvZMac6Jg=="
+    },
+    "uview-ui": {
+      "version": "2.0.31",
+      "resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.31.tgz",
+      "integrity": "sha512-I/0fGuvtiKHH/mBb864SGYk+SJ7WaF32tsBgYgeBOsxlUp+Th+Ac2tgz2cTvsQJl6eZYWsKZ3ixiSXCAcxZ8Sw=="
+    },
+    "video.js": {
+      "version": "7.20.3",
+      "resolved": "https://registry.npmmirror.com/video.js/-/video.js-7.20.3.tgz",
+      "integrity": "sha512-JMspxaK74LdfWcv69XWhX4rILywz/eInOVPdKefpQiZJSMD5O8xXYueqACP2Q5yqKstycgmmEKlJzZ+kVmDciw==",
+      "requires": {
+        "@babel/runtime": "^7.12.5",
+        "@videojs/http-streaming": "2.14.3",
+        "@videojs/vhs-utils": "^3.0.4",
+        "@videojs/xhr": "2.6.0",
+        "aes-decrypter": "3.1.3",
+        "global": "^4.4.0",
+        "keycode": "^2.2.0",
+        "m3u8-parser": "4.7.1",
+        "mpd-parser": "0.21.1",
+        "mux.js": "6.0.1",
+        "safe-json-parse": "4.0.0",
+        "videojs-font": "3.2.0",
+        "videojs-vtt.js": "^0.15.4"
+      }
+    },
+    "videojs-font": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmmirror.com/videojs-font/-/videojs-font-3.2.0.tgz",
+      "integrity": "sha512-g8vHMKK2/JGorSfqAZQUmYYNnXmfec4MLhwtEFS+mMs2IDY398GLysy6BH6K+aS1KMNu/xWZ8Sue/X/mdQPliA=="
+    },
+    "videojs-vtt.js": {
+      "version": "0.15.4",
+      "resolved": "https://registry.npmmirror.com/videojs-vtt.js/-/videojs-vtt.js-0.15.4.tgz",
+      "integrity": "sha512-r6IhM325fcLb1D6pgsMkTQT1PpFdUdYZa1iqk7wJEu+QlibBwATPfPc9Bg8Jiym0GE5yP1AG2rMLu+QMVWkYtA==",
+      "requires": {
+        "global": "^4.3.1"
+      }
+    },
+    "wrappy": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz",
+      "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+      "dev": true
+    }
+  }
+}

+ 12 - 0
package.json

@@ -0,0 +1,12 @@
+{
+  "dependencies": {
+    "@easydarwin/easyplayer": "^5.0.5",
+    "file-saver": "^2.0.5",
+    "jweixin-module": "^1.6.0",
+    "uview-ui": "^2.0.31",
+    "video.js": "^7.20.3"
+  },
+  "devDependencies": {
+    "copy-webpack-plugin": "^4.0.1"
+  }
+}

+ 1087 - 0
pages.json

@@ -0,0 +1,1087 @@
+{
+	"pages": [
+		{
+			"path": "pages/index/index",
+			"style": {
+				"navigationBarTitleText": "首页",
+				"enablePullDownRefresh": true,
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/user/user",
+			"style": {
+				"navigationBarTitleText": "个人中心",
+				"enablePullDownRefresh": true,
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/index/adoplist/adoplist",
+			"style": {
+				"navigationBarTitleText": "农场认养",
+				"enablePullDownRefresh": true,
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/land/land",
+			"style": {
+				"navigationBarTitleText": "土地列表",
+				"enablePullDownRefresh": true,
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/mall/mall",
+			"style": {
+				"navigationBarTitleText": "在线商城",
+				"enablePullDownRefresh": true,
+				"navigationStyle": "custom"
+			}
+		}, {
+			"path": "components/nx-coupon/yh_coupon",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+
+		}
+	],
+	"subPackages": [{
+			"root": "pagesA",
+			"pages": [{
+					"path": "pages/distribution/distribution",
+					"style": {
+						"navigationBarTitleText": "分销中心",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/adopt/adopt",
+					"style": {
+						"navigationBarTitleText": "认养详情",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/about/meitidetail/meitidetail",
+					"style": {
+						"navigationBarTitleText": "报道详情",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/search/search",
+					"style": {
+						"navigationBarTitleText": "商品搜索",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/distribution/records/records",
+					"style": {
+						"navigationBarTitleText": "佣金记录",
+						"enablePullDownRefresh": true
+					}
+				},
+				{
+					"path": "pages/distribution/extension/extension",
+					"style": {
+						"navigationBarTitleText": "推广记录",
+						"enablePullDownRefresh": true
+					}
+				},
+				{
+					"path": "pages/distribution/myteam/myteam",
+					"style": {
+						"navigationBarTitleText": "我的团队",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/distribution/goCode/goCode",
+					"style": {
+						"navigationBarTitleText": "推广海报",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/distribution/policy/policy",
+					"style": {
+						"navigationBarTitleText": "分销政策",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/mypurse/index",
+					"style": {
+						"navigationBarTitleText": "我的钱包",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/mypurse/czinfo/czinfo",
+					"style": {
+						"navigationBarTitleText": "充值记录",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/mypurse/txinfo/txinfo",
+					"style": {
+						"navigationBarTitleText": "提现记录",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/mypurse/recharge/recharge",
+					"style": {
+						"navigationBarTitleText": "充值",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/mypurse/withdraw/withdraw",
+					"style": {
+						"navigationBarTitleText": "申请提现",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/mypurse/transfer/transfer",
+					"style": {
+						"navigationBarTitleText": "线下汇款",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/mypurse/other/other",
+					"style": {
+						"navigationBarTitleText": "其他消费记录",
+						"enablePullDownRefresh": true
+					}
+				},
+				{
+					"path": "pages/mypurse/evidence/evidence",
+					"style": {
+						"navigationBarTitleText": "汇款凭证",
+						"enablePullDownRefresh": true
+					}
+				},
+				{
+					"path": "pages/contracts/contract_info",
+					"style": {
+						"navigationBarTitleText": "认养合同",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/subrecord/subrecord",
+					"style": {
+						"navigationBarTitleText": "认购记录",
+						"enablePullDownRefresh": true,
+						"onReachBottomDistance": 50,
+						"app-plus": {
+							// "bounce": "none",
+							"pullToRefresh": {
+								"support": "true"
+							}
+						}
+					}
+				},
+				{
+					"path": "pages/subrecord/detail",
+					"style": {
+						"navigationBarTitleText": "认购详情"
+					}
+				},
+				{
+					"path": "pages/subrecord/financedetail",
+					"style": {
+						"navigationBarTitleText": "订单详情"
+					}
+				}
+			]
+		},
+		{
+			"root": "pagesB",
+			"pages": [{
+					"path": "pages/chooseland/chooseland",
+					"style": {
+						"navigationBarTitleText": "选择土地",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/chooseland/landservice/comnproblem",
+					"style": {
+						"navigationBarTitleText": "常见问题",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/chooseland/landservice/landservice",
+					"style": {
+						"navigationBarTitleText": "服务类型",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/chooseland/seed/moreseed",
+					"style": {
+						"navigationBarTitleText": "种子列表",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/chooseland/seed/vilegedetail",
+					"style": {
+						"navigationBarTitleText": "种子详情",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/creatorder/creatorder",
+					"style": {
+						"navigationBarTitleText": "确认订单",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/creatorder/addseed",
+					"style": {
+						"navigationBarTitleText": "选择种子",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/creatorder/pay",
+					"style": {
+						"navigationBarTitleText": "支付",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/myland/myland",
+					"style": {
+						"navigationBarTitleText": "我的土地",
+						"enablePullDownRefresh": true
+					}
+				},
+				{
+					"path": "pages/orderdeleti/orderdeleti",
+					"style": {
+						"navigationBarTitleText": "订单详情",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/chooseland/seed/appseed/appseed",
+					"style": {
+						"navigationBarTitleText": "追加种子",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/creatorder/landpaysuccess/landpaysuccess",
+					"style": {
+						"navigationBarTitleText": "",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/updateorder/updateorder",
+					"style": {
+						"navigationBarTitleText": "修改订单",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/updateorder/changeseed",
+					"style": {
+						"navigationBarTitleText": "修改订单种子",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/getcoupon/getcoupon",
+					"style": {
+						"navigationBarTitleText": "领取优惠卷",
+						"enablePullDownRefresh": true,
+						"app-plus": {
+							"bounce": "none"
+						}
+					}
+				},
+				{
+					"path": "pages/activitylist/activitylist",
+					"style": {
+						"navigationBarTitleText": "活动列表",
+						"enablePullDownRefresh": true
+					}
+				},
+				{
+					"path": "pages/activitydetails/activitydetails",
+					"style": {
+						"navigationBarTitleText": "活动详情",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/chooseticket/chooseticket",
+					"style": {
+						"navigationBarTitleText": "活动购票",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/activorderdails/writeoffdetails/writeoffdetails",
+					"style": {
+						"navigationBarTitleText": "详情核销",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/activorderdails/showactivitydetails/showactivitydetails",
+					"style": {
+						"navigationBarTitleText": "核销成功",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/applyfofpromotion/applyfofpromotion",
+					"style": {
+						"navigationBarTitleText": "分销申请",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/chooseticket/tickpay/tickpay",
+					"style": {
+						"navigationBarTitleText": "活动支付",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/activitylist/myactivity/myactivity",
+					"style": {
+						"navigationBarTitleText": "我的活动",
+						"enablePullDownRefresh": true
+					}
+				},
+				{
+					"path": "pages/creatorder/apforpaysuccess/apforpaysuccess",
+					"style": {
+						"navigationBarTitleText": "活动支付成功",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/activorderdails/activorderdails",
+					"style": {
+						"navigationBarTitleText": "订单详情",
+						"enablePullDownRefresh": false
+					}
+				}
+
+
+			]
+		},
+		{
+			"root": "pagesC",
+			"pages": [{
+					"path": "pages/shoplist/shoplist",
+					"style": {
+						"navigationBarTitleText": "店铺列表",
+						"enablePullDownRefresh": true,
+						"onReachBottomDistance": 200
+					}
+				},
+				{
+					"path": "pages/merchantdetails/merchantdetails",
+					"style": {
+						"navigationBarTitleText": "商家详情",
+						"enablePullDownRefresh": false,
+						"onReachBottomDistance": 50
+					}
+				},
+				{
+					"path": "pages/index/article/article",
+					"style": {
+						"navigationBarTitleText": "文章详情",
+						"enablePullDownRefresh": false,
+						"onReachBottomDistance": 50
+					}
+				},
+				{
+					"path": "pages/merchantdetails/bond",
+					"style": {
+						"navigationBarTitleText": "缴纳保证金",
+						"enablePullDownRefresh": false,
+						"onReachBottomDistance": 50
+					}
+				},
+				{
+					"path": "pages/shoprequ/shoprequ",
+					"style": {
+						"navigationBarTitleText": "农场入驻",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/index/canintegral/canintegral",
+					"style": {
+						"navigationBarTitleText": "可用积分"
+					}
+				},
+				{
+					"path": "pages/weixinliveplayer/index/index",
+					"style": {
+						"navigationBarTitleText": "直播",
+						"enablePullDownRefresh": true
+					}
+				},
+				{
+					"path": "pages/weixinliveplayer/search/search",
+					"style": {
+						"navigationBarTitleText": "直播列表"
+					}
+				},
+				{
+					"path": "pages/index/farmorder/farmorder",
+					"style": {
+						"navigationBarTitleText": "订单信息",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/index/partya/partya",
+					"style": {
+						"navigationBarTitleText": "商品详情",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/index/contract/contract",
+					"style": {
+						"navigationBarTitleText": "认养协议",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/index/message/message",
+					"style": {
+						"navigationBarTitleText": "系统文章",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/user/collection/collection",
+					"style": {
+						"navigationBarTitleText": "我的收藏",
+						"enablePullDownRefresh": true
+					}
+				},
+				{
+					"path": "pages/user/funds/funds",
+					"style": {
+						"navigationBarTitleText": "资金流水",
+						"enablePullDownRefresh": true
+					}
+				},
+				{
+					"path": "pages/login/login",
+					"style": {
+						"navigationBarTitleText": "登录",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/login/forgetpassword",
+					"style": {
+						"navigationBarTitleText": "忘记密码",
+						"enablePullDownRefresh": false
+					}
+				},
+
+				{
+					"path": "pages/register/register",
+					"style": {
+						"navigationBarTitleText": "注册",
+						"enablePullDownRefresh": false
+					}
+				},
+
+				{
+					"path": "pages/merchantdetails/index",
+					"style": {
+						"navigationBarTitleText": "农场中心",
+						"enablePullDownRefresh": false
+					}
+				}
+			    ,{
+                    "path" : "pages/merchantdetails/storemanagement",
+                    "style" :                                                                                    
+                {
+                    "navigationBarTitleText": "店铺管理",
+                    "enablePullDownRefresh": false
+                }
+                
+                },{
+                    "path" : "pages/merchantdetails/shoplist",
+                    "style" :                                                                                    
+                {
+                    "navigationBarTitleText": "商品管理",
+                    "enablePullDownRefresh": false
+                }
+                
+                },{
+                    "path" : "pages/merchantdetails/addshop",
+                    "style" :                                                                                    
+                {
+                    "navigationBarTitleText": "添加商品",
+                    "enablePullDownRefresh": false
+                }
+                
+                },{
+                    "path" : "pages/merchantdetails/editshop",
+                    "style" :                                                                                    
+                {
+                    "navigationBarTitleText": "编辑商品",
+                    "enablePullDownRefresh": false
+                }
+                
+                }
+                ,{
+                    "path" : "pages/merchantdetails/orderlist",
+                    "style" :                                                                                    
+                {
+                    "navigationBarTitleText": "订单管理",
+                    "enablePullDownRefresh": true,
+					"onReachBottomDistance": 50
+                }
+                
+                }
+                ,{
+                    "path" : "pages/merchantdetails/property",
+                    "style" :                                                                                    
+                {
+                    "navigationBarTitleText": "资产",
+                    "enablePullDownRefresh": false
+                }
+                
+                }
+                ,{
+                    "path" : "pages/merchantdetails/txinfo",
+                    "style" :                                                                                    
+                {
+                    "navigationBarTitleText": "商户提现",
+                    "enablePullDownRefresh": false
+                }
+                
+                } ,{
+                    "path" : "pages/merchantdetails/count",
+                    "style" :                                                                                    
+                {
+                    "navigationBarTitleText": "数据统计",
+                    "enablePullDownRefresh": false
+                }
+                
+                }
+                
+               
+                ,{
+                    "path" : "pages/merchantdetails/settle",
+                    "style" :                                                                                    
+                {
+                    "navigationBarTitleText": "订单",
+                    "enablePullDownRefresh": true
+                }
+                
+                },
+				{
+				    "path" : "pages/merchantdetails/qrcode",
+				    "style" :                                                                                    
+				{
+				    "navigationBarTitleText": "店铺二维码",
+				    "enablePullDownRefresh": false
+				}
+				
+				},
+				{
+				    "path" : "pages/merchantdetails/farmshoplist",
+				    "style" :                                                                                    
+				{
+				    "navigationBarTitleText": "商品列表",
+				    "enablePullDownRefresh": false
+				}
+				
+				}
+            ]
+		},
+		{
+			"root": "pagesD",
+			"pages": [{
+					"path": "pages/mall/joinGroup",
+					"style": {
+						"navigationBarTitleText": "参团",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/mall/goodslist",
+					"style": {
+						"navigationBarTitleText": "商品分类",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/mall/Bargain_order",
+					"style": {
+						"navigationBarTitleText": "砍价活动",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/mall/groupShare",
+					"style": {
+						"navigationBarTitleText": "分享拼团",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/mall/convert",
+					"style": {
+						"navigationBarTitleText": "兑换",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/mall/group_cart",
+					"style": {
+						"navigationBarTitleText": "拼团",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/mall/Bargain",
+					"style": {
+						"navigationBarTitleText": "砍价",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/mall/Bargain_cart",
+					"style": {
+						"navigationBarTitleText": "商品详情",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/address/address",
+					"style": {
+						"navigationBarTitleText": "收货地址",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/address/addressManage",
+					"style": {
+						"navigationBarTitleText": "添加收货地址"
+					}
+				},
+				{
+					"path": "pages/money/paySuccess",
+					"style": {
+						"navigationBarTitleText": "支付成功"
+					}
+				},
+				{
+					"path": "pages/money/pay",
+					"style": {
+						"navigationBarTitleText": "支付"
+					}
+				},
+				{
+					"path": "pages/order/logistics/logistics",
+					"style": {
+						"navigationBarTitleText": "物流信息",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/order/orderDetail",
+					"style": {
+						"navigationBarTitleText": "订单详情",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/order/integrals/integrals",
+					"style": {
+						"navigationBarTitleText": "确认订单",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/order/createOrder",
+					"style": {
+						"navigationBarTitleText": "创建订单"
+					}
+				},
+				{
+					"path": "pages/order/order",
+					"style": {
+						"navigationBarTitleText": "我的订单",
+						"enablePullDownRefresh": true,
+						"onReachBottomDistance": 50,
+						"app-plus": {
+							// "bounce": "none",
+							"pullToRefresh": {
+								"support": "true"
+							}
+						}
+					}
+				},
+				{
+					"path": "pages/product/product",
+					"style": {
+						"navigationBarTitleText": "商品详情",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/product/list",
+					"style": {
+						"enablePullDownRefresh": true,
+						"navigationBarTitleText": "商品列表"
+					}
+				},
+				{
+					"path": "pages/set/changemima/changemima",
+					"style": {
+						"navigationBarTitleText": "修改支付密码",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/set/renzheng/renzheng",
+					"style": {
+						"navigationBarTitleText": "实名认证",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/set/cname/cname",
+					"style": {
+						"navigationBarTitleText": "更改昵称",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/set/set",
+					"style": {
+						"navigationBarTitleText": "设置"
+					}
+				}, {
+					"path": "pages/inspection/inspection",
+					"style": {
+						"navigationBarTitleText": "巡检任务",
+						"enablePullDownRefresh": false,
+						"onReachBottomDistance": 50
+					}
+
+				}, {
+					"path": "pages/inspection/index",
+					"style": {
+						"navigationBarTitleText": "巡检详情",
+						"enablePullDownRefresh": false
+					}
+
+				}, {
+					"path": "pages/financeoperator/financeoperator",
+					"style": {
+						"navigationBarTitleText": "认养管理",
+						"enablePullDownRefresh": false
+					}
+
+				}, {
+					"path": "pages/financeoperator/index",
+					"style": {
+						"navigationBarTitleText": "管理详情",
+						"enablePullDownRefresh": false
+					}
+
+				} 
+			    
+            ]
+		},
+		{
+			"root": "pagesE",
+			"pages": [{
+					"path": "pages/cart/cart",
+					"style": {
+						"navigationBarTitleText": "购物车"
+					}
+				},
+				{
+					"path": "pages/common/paySuccess",
+					"style": {
+						"navigationBarTitleText": "支付成功"
+					}
+				},
+				{
+					"path": "pages/category/category",
+					"style": {
+						"navigationBarTitleText": "分类",
+						"app-plus": {
+							"bounce": "none"
+						}
+					}
+				},
+				{
+					"path": "pages/index/signin/signin",
+					"style": {
+						"navigationBarTitleText": "农场签到",
+						"app-plus": {
+							"bounce": "none"
+						}
+					}
+				},
+				{
+					"path": "pages/index/activity/activity",
+					"style": {
+						"navigationBarTitleText": "农场活动",
+						"enablePullDownRefresh": true,
+						"app-plus": {
+							"bounce": "none"
+						}
+					}
+				},
+				{
+					"path": "pages/broadcast/broadcast",
+					"style": {
+						"navigationBarTitleText": "农场监控", //监控
+						"enablePullDownRefresh": true
+					}
+				},
+				{
+					"path": "pages/broadcast/transmit",
+					"style": {
+						"navigationBarTitleText": "",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/mynews/mynews",
+					"style": {
+						"enablePullDownRefresh": true,
+						"navigationBarTitleText": "我的消息"
+					}
+				},
+				{
+					"path": "pages/user/coupon/coupon",
+					"style": {
+						"navigationBarTitleText": "我的优惠券",
+						"enablePullDownRefresh": true
+					}
+				},
+				{
+					"path": "pages/mynews/news/news",
+					"style": {
+						"navigationBarTitleText": "我的信息",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/index/activity/activityContent",
+					"style": {
+						"navigationBarTitleText": "活动详情",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/user/problem/problem",
+					"style": {
+						"navigationBarTitleText": "常见问题",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/user/problem/problem_det/problem_det",
+					"style": {
+						"navigationBarTitleText": "常见问题",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/showhfive/showhfive",
+					"style": {
+						"navigationBarTitleText": "",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/index/adoplist/adoitemlist/adoitemlist",
+					"style": {
+						"navigationBarTitleText": "认养列表",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/mall/list",
+					"style": {
+						"navigationBarTitleText": "商品分类",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/mall/integral",
+					"style": {
+						"navigationBarTitleText": "积分商城",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/mall/group",
+					"style": {
+						"navigationBarTitleText": "拼团",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/plotdetails/plotdetails",
+					"style": {
+						"navigationBarTitleText": "我的地块",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "pages/renewal/renewal",
+					"style": {
+						"navigationBarTitleText": "续租服务",
+						"enablePullDownRefresh": false
+					}
+				}, {
+					"path": "pages/register/register",
+					"style": {
+						"navigationBarTitleText": "巡检记录",
+						"enablePullDownRefresh": false
+					}
+
+				}, {
+					"path": "pages/seedlist/seedlist",
+					"style": {
+						"navigationBarTitleText": "添加种子",
+						"enablePullDownRefresh": false
+					}
+
+				}
+			    ,{
+                    "path" : "pages/seedlist/crop",
+                    "style" :                                                                                    
+                {
+                    "navigationBarTitleText": "作物信息",
+                    "enablePullDownRefresh": false
+                }
+                
+                } ,{
+                    "path" : "pages/serviceorder/serviceorder",
+                    "style" :                                                                                    
+                {
+                    "navigationBarTitleText": "服务订单",
+                    "enablePullDownRefresh": false
+                }
+                
+                }
+                ,{
+                    "path" : "pages/serviceorder/operator/operator",
+                    "style" :                                                                                    
+                {
+                    "navigationBarTitleText": "工单任务",
+                    "enablePullDownRefresh": false
+                }
+                
+                },{
+                    "path" : "pages/serviceorder/detaillist/detaillist",
+                    "style" :                                                                                    
+                {
+                    "navigationBarTitleText": "订单信息",
+                    "enablePullDownRefresh": false
+                }
+                
+                },{
+                    "path" : "pages/seedlist/decoration/decoration",
+                    "style" :                                                                                    
+                {
+                    "navigationBarTitleText": "土地装饰",
+                    "enablePullDownRefresh": false
+                }
+                
+                }
+            ]
+		}
+	],
+	"globalStyle": {
+		"h5": {
+			"maxWidth": 425
+		},
+		"app-plus": {
+			"bounce": "none",
+			"animationType": "fade-in",
+			"animationDuration": 300,
+			"scrollIndicator": "none",
+			"softinputMode": "adjustResize"
+		},
+		"navigationBarTextStyle": "black",
+		"enablePullDownRefresh": false,
+		"navigationBarBackgroundColor": "#FFFFFF"
+	},
+	"tabBar": {
+		"custom": true,
+		"color": "#C0C4CC",
+		"selectedColor": "#ffffff",
+		"borderStyle": "black",
+		"backgroundColor": "#ffffff",
+		"list": [{
+				"pagePath": "pages/index/index",
+				"text": "首页"
+			},
+			{
+				"pagePath": "pages/index/adoplist/adoplist",
+				"text": "农场认养"
+			},
+			{
+				"pagePath": "pages/mall/mall",
+				"text": "商城"
+			},
+			{
+				"pagePath": "pages/land/land",
+				"text": "土地租赁"
+			},
+			{
+				"pagePath": "pages/user/user",
+				"text": "个人中心"
+			}
+		]
+	},
+	"condition": {
+		"current": 0,
+		"list": [{
+			"name": "",
+			"path": "",
+			"query": ""
+		}]
+	},
+	"permission": {
+		"scope.userLocation": {
+			"desc": "你的位置信息将用于小程序位置接口的效果展示"
+		}
+	},
+	"requiredPrivateInfos": [
+		"getLocation",
+		"chooseAddress",
+		"chooseLocation"
+	]
+}

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä