diff --git a/.gitignore b/.gitignore
index 5d947ca..5548ec0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,7 +6,7 @@ bin-release/
# Other files and folders
.settings/
-
+nativeplugins
# Executables
*.swf
*.air
diff --git a/App.vue b/App.vue
new file mode 100644
index 0000000..99f6e28
--- /dev/null
+++ b/App.vue
@@ -0,0 +1,17 @@
+
+
+
diff --git a/README.md b/README.md
index b95a62e..faf5f42 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,251 @@
-# wifiDemo-dcloud
-Wifi 插件Demo
+## Googbuild-WIFI插件说明
+集成 ESPTouch 和 AirKiss 配网协议,帮助物联网设备连接Wi-Fi网络, 快捷简单。
+本插件持续开发中,目前仅支持 Android 版本,IOS 就快面世。到时可以同步升级。
+
+[Googbuild-WIFI](https://ext.dcloud.net.cn/plugin?id=430)
+
+## 版本说明
+当前版本: 0.0.3
+更新时间: 2019-08-29
+更新内容: 增加IOS平台
+
+版本: 0.0.2
+更新时间: 2019-05-31
+更新内容: 配网成功信息返回原始数据
+
+版本: 0.0.1
+更新时间: 2019-05-23
+更新内容: 初版基本功能
+作者: whc
+
+## 引用方式
+``````
+const gbWiFi = uni.requireNativePlugin('Googbuild-WIFI');
+``````
+
+## 功能列表
+|名称|接口名|平台支持||
+|---|---|---|---|
+|获取WiFi名称|getWiFiName|Andorid||
+|获取网络类型|getNetWorkType|Andorid||
+|获取BSSID|getBSSID|Andorid||
+|AirKiss配网|linkAirKiss|Andorid|IOS|
+|取消AirKiss配网|cancelAirKiss|Andorid|IOS|
+|EspTouch配网|linkEsptouch|Andorid|IOS|
+|取消EspTouch配网|cancelEsptouch|Andorid|IOS|
+
+
+## API Demo
+### 获取WiFi名称
+`gbWiFi.getWiFiName(callback)`
+#### 参数
+无
+#### 返回
+```
+{
+ ssid //Wifi 名称
+}
+```
+示例:
+
+```javascript
+gbWiFi.getWiFiName(result => {
+ console.log(result.ssid);
+});
+
+```
+
+### 获取网络类型
+`gbWiFi.getNetWorkType(callback)`
+#### 参数
+无
+#### 返回
+```
+{
+ type // 网络类型
+}
+```
+示例:
+
+```javascript
+gbWiFi.getNetWorkType(result => {
+ switch(result.type) {
+ case 1:
+ console.log('wap网络');
+ break;
+ case 2:
+ console.log('2G网络');
+ break;
+ case 3:
+ console.log('3G网络');
+ break;
+ case 4:
+ console.log('4G网络');
+ break;
+ case 5:
+ console.log('5G网络'); // 预留值
+ break;
+ case 6:
+ console.log('WiFi 2.4G网段');
+ break;
+ case 7:
+ console.log('5G WiFi');
+ break;
+ default:
+ console.log('没有网络');
+ break;
+ }
+});
+```
+
+
+
+### 获取 BSSID
+`gbWiFi.getBSSID(callback)`
+#### 参数
+无
+#### 返回
+```
+{
+ bssid // BSSID
+}
+```
+示例:
+
+```javascript
+gbWiFi.getBSSID(result => {
+ console.log(result.bssid);
+});
+
+```
+
+
+
+### 使用 AirKiss 协议进行配网
+`gbWiFi.linkAirKiss(option, callback)`
+#### 参数
+```
+{
+ ssid, //wifi名称(必填)
+ pwd // wifi密码(必填)
+}
+```
+#### 返回
+```
+{
+ code: 0, //状态码: 0-失败 1-成功 2-特殊情况导致失败
+ massage: 'xxx', //返回消息
+}
+```
+```
+备注: IOS airkiss 配网成功无回调
+```
+示例:
+
+```javascript
+gbWiFi.linkAirKiss({
+ ssid: 'wifiName',
+ pwd: '12345678'
+ },
+ result => {
+ switch(result.code) {
+ case 1:
+ console.log('连接成功'); break;
+ case 0:
+ case 2:
+ console.log('连接失败', result.massage); break;
+ default:
+ break;
+ }
+});
+
+```
+
+
+### 取消 AirKiss 配网
+`gbWiFi.cancelAirKiss(callback)`
+#### 参数
+无
+#### 返回
+```
+{
+ code: 0, //状态码: 0-失败 1-成功
+ massage: 'xxx', //返回消息
+}
+```
+示例:
+
+```javascript
+gbWiFi.cancelAirKiss(result => {
+ if (result.code) {
+ console.log('取消成功');
+ } else {
+ console.log('取消失败');
+ }
+});
+
+```
+
+### 使用 Esptouch 协议进行配网
+`gbWiFi.linkEsptouch(option, callback)`
+#### 参数
+```
+{
+ ssid, //wifi名称(必填)
+ pwd, // wifi密码(必填)
+ mode // 配网模式 (可选): 'Broadcast'(默认), 'Multicast'
+}
+```
+#### 返回
+```
+{
+ code: 0, //状态码: 0-失败 1-成功 2-特殊情况导致失败
+ massage: 'xxx' //返回消息
+}
+```
+示例:
+
+```javascript
+gbWiFi.linkEsptouch({
+ ssid: 'wifiName',
+ pwd: '12345678',
+ model: 'Broadcast'
+ },
+ result => {
+ switch(result.code) {
+ case 1:
+ console.log('连接成功'); break;
+ case 0:
+ case 2:
+ console.log('连接失败', result.massage); break;
+ default:
+ break;
+ }
+});
+
+```
+
+
+### 取消 EspTouch 配网
+`gbWiFi.cancelEsptouch(callback)`
+#### 参数
+无
+#### 返回
+```
+{
+ code: 0, //状态码: 0-失败 1-成功
+ massage: 'xxxx' //返回消息
+}
+```
+示例:
+
+```javascript
+gbWiFi.cancelEsptouch(result => {
+ if (result.code) {
+ console.log('取消成功');
+ } else {
+ console.log('取消失败');
+ }
+});
+
+```
diff --git a/common/common.css b/common/common.css
new file mode 100644
index 0000000..f3a9b26
--- /dev/null
+++ b/common/common.css
@@ -0,0 +1,223 @@
+
+/**颜色**/
+.avtive-blue {
+ color: rgb(75, 79, 156);
+}
+.blue {
+ color: #1E90FF;
+}
+
+.lightBlue {
+ color: #24AAD3;
+}
+
+.green {
+ color: #00B26A;
+}
+
+.grey {
+ color: #9A9FB2;
+}
+
+.black {
+ color: #142748;
+}
+
+.red {
+ color: #FF7070;
+}
+.warning-red {
+ color: #FF6666;
+}
+
+.bg-white {
+ background-color: #FFFFFF !important;
+}
+
+.bg-grey {
+ background-color: #9A9FB2;
+}
+
+.bbg-red {
+ background: #FF6666;
+}
+.bg-green {
+ background: #24AAD3;
+}
+/** 伪元素 bg**/
+.bbg-orange:before {
+ background: #FE6012 !important;
+}
+
+.bbg-blue:before {
+ background: #4244FB !important;;
+}
+.bbg-green:before {
+ background: #21C7AA !important;;
+}
+.bbg-violet:before {
+ background: #6036DF !important;;
+}
+
+/**行高**/
+.ll40 {
+ line-height: 40upx;
+}
+.ll60 {
+ line-height: 60upx;
+}
+.ll70 {
+ line-height: 70upx;
+}
+.ll80 {
+ line-height: 80upx;
+}
+/**字间距**/
+.ls8 {
+ letter-spacing: 8upx;
+}
+/**字体大小**/
+.font30 {
+ font-size: 30upx;
+}
+.font35 {
+ font-size: 35upx;
+}
+.font38 {
+ font-size: 38upx;
+}
+.font40 {
+ font-size: 40upx;
+}
+.font45 {
+ font-size: 45upx;
+}
+.font50 {
+ font-size: 50upx;
+}
+
+/**字体大小**/
+.fw1 { font-weight: 100;}
+.fw2 { font-weight: 200;}
+.fw3 { font-weight: 300;}
+.fw4 { font-weight: 400;}
+.fw5 { font-weight: 500;}
+.fw6 { font-weight: 600;}
+.fw7 { font-weight: 700;}
+.fw8 { font-weight: 800;}
+.fw9 { font-weight: 900;}
+
+.fwN { font-weight: normal;}
+.fwB { font-weight: bold}
+
+/**布局***/
+.fl1 {
+ flex: 1;
+}
+
+.fl2 {
+ flex: 2;
+}
+
+.fl3 {
+ flex: 3;
+}
+
+.fl4 {
+ flex: 4;
+}
+
+.fl5 {
+ flex: 5;
+}
+
+.fl6 {
+ flex: 6;
+}
+
+.fl7 {
+ flex: 7;
+}
+
+.fl8 {
+ flex: 8;
+}
+
+.fl9 {
+ flex: 9;
+}
+
+.mr8 {
+ margin-right: 8upx;
+}
+.ml8 {
+ margin-left: 8upx;
+}
+.mt10 {
+ margin-top: 10upx;
+}
+
+.mt20 {
+ margin-top: 20upx !important;
+}
+
+.mt30 {
+ margin-top: 30upx !important;
+}
+.mt40 {
+ margin-top: 40upx !important;
+}
+.mt50 {
+ margin-top: 50upx !important;
+}
+.mt60 {
+ margin-top: 60upx !important;
+}
+.mt70 {
+ margin-top: 70upx !important;;
+}
+.mt80 {
+ margin-top: 80upx !important;
+}
+
+.mt90 {
+ margin-top: 90upx !important;
+}
+
+.mt100 {
+ margin-top: 100upx !important;
+}
+.ml10 {
+ margin-left: 10upx !important;
+}
+.ml20 {
+ margin-left: 20upx !important;
+}
+.ml30 {
+ margin-left: 30upx !important;
+}
+.ml40 {
+ margin-left: 40upx !important;
+}
+.ml50 {
+ margin-left: 50upx !important;
+}
+.ml60 {
+ margin-left: 60upx !important;
+}
+
+.mr10 {margin-right: 10upx !important;}
+.mr40 {
+ margin-right: 40upx !important;
+}
+.mr50 {
+ margin-right: 50upx !important;
+}
+.mr60 {
+ margin-right: 60upx !important;
+}
+
+.pt80 {
+ padding-top: 80upx !important;
+}
+
diff --git a/common/dataTool.js b/common/dataTool.js
new file mode 100644
index 0000000..cb566ce
--- /dev/null
+++ b/common/dataTool.js
@@ -0,0 +1,7 @@
+module.exports = {
+ inputData: (e, _this) => {
+ let {dataset, value} = e.target;
+ let id = dataset.id;
+ _this[id] = value;
+ }
+}
\ No newline at end of file
diff --git a/common/uni.css b/common/uni.css
new file mode 100644
index 0000000..47f507d
--- /dev/null
+++ b/common/uni.css
@@ -0,0 +1,1815 @@
+@font-face {
+ font-family: uniicons;
+ font-weight: normal;
+ font-style: normal;
+ src: url('https://img-cdn-qiniu.dcloud.net.cn/fonts/uni.ttf') format('truetype');
+}
+
+/*通用 */
+view {
+ font-size: 24upx;
+ line-height: 1.8;
+}
+
+progress,
+checkbox-group {
+ width: 100%;
+}
+
+form {
+ width: 100%;
+}
+
+.uni-flex {
+ display: flex;
+ flex-direction: row;
+}
+
+.uni-flex-item {
+ flex: 1;
+}
+
+.uni-row {
+ flex-direction: row;
+}
+
+.uni-column {
+ flex-direction: column;
+}
+
+.uni-link {
+ color: #576B95;
+ font-size: 26upx;
+}
+
+.uni-center {
+ text-align: center;
+}
+
+.uni-inline-item {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+}
+
+.uni-inline-item text {
+ margin-right: 20upx;
+}
+
+.uni-inline-item text:last-child {
+ margin-right: 0upx;
+ margin-left: 20upx;
+}
+
+/* page */
+.uni-page-head {
+ padding: 35upx;
+ text-align: center;
+ background-color: #4244FB;
+}
+
+.uni-page-head-title {
+ display: inline-block;
+ padding: 0 40upx;
+ font-size: 30upx;
+ height: 88upx;
+ line-height: 88upx;
+ color: #FFFFFF;
+ box-sizing: border-box;
+}
+
+.uni-page-body {
+ width: 100%;
+ flex-grow: 1;
+ overflow-x: hidden;
+}
+
+.uni-padding-wrap {
+ width: 690upx;
+ padding: 0 30upx;
+}
+
+.uni-word {
+ text-align: center;
+ padding: 200upx 100upx;
+}
+
+.uni-title {
+ font-size: 30upx;
+ font-weight: 500;
+ padding: 20upx 0;
+ line-height: 1.5;
+}
+
+.uni-text {
+ font-size: 28upx;
+}
+
+.uni-title text {
+ font-size: 24upx;
+ color: #888;
+}
+
+.uni-text-gray {
+ color: #ccc;
+}
+
+.uni-text-small {
+ font-size: 24upx;
+}
+
+.uni-common-mb {
+ margin-bottom: 30upx;
+}
+
+.uni-common-pb {
+ padding-bottom: 30upx;
+}
+
+.uni-common-pl {
+ padding-left: 30upx;
+}
+
+.uni-common-mt {
+ margin-top: 30upx;
+}
+
+/* 背景色 */
+.uni-bg-red {
+ background: #F76260;
+ color: #FFF;
+}
+
+.uni-bg-green {
+ background: #09BB07;
+ color: #FFF;
+}
+
+.uni-bg-blue {
+ background: #007AFF;
+ color: #FFF;
+}
+
+/* 标题 */
+.uni-h1 {
+ font-size: 80upx;
+ font-weight: 700;
+}
+
+.uni-h2 {
+ font-size: 60upx;
+ font-weight: 700;
+}
+
+.uni-h3 {
+ font-size: 48upx;
+ font-weight: 800;
+}
+
+.uni-h4 {
+ font-size: 36upx;
+ font-weight: 700;
+}
+
+.uni-h5 {
+ font-size: 28upx;
+ color: #8f8f94;
+}
+
+.uni-h6 {
+ font-size: 24upx;
+ color: #8f8f94;
+}
+
+.uni-h7 {
+ font-size: 20upx;
+ color: #8f8f94;
+}
+
+.uni-bold {
+ font-weight: bold;
+}
+
+/* 文本溢出隐藏 */
+.uni-ellipsis {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+
+/* 竖向百分百按钮 */
+.uni-btn-v {
+ padding: 10upx 0;
+}
+
+.uni-btn-v button {
+ margin: 20upx 0;
+}
+
+/* 表单 */
+.uni-form-item {
+ display: flex;
+ width: 100%;
+ padding: 10upx 0;
+}
+
+.uni-form-item .title {
+ padding: 10upx 25upx;
+}
+
+.uni-label {
+ width: 210upx;
+ word-wrap: break-word;
+ word-break: break-all;
+ text-indent: 20upx;
+}
+
+.uni-input {
+ height: 50upx;
+ padding: 15upx 25upx;
+ line-height: 50upx;
+ font-size: 28upx;
+ background: #FFF;
+ flex: 1;
+}
+
+radio-group,
+checkbox-group {
+ width: 100%;
+}
+
+radio-group label,
+checkbox-group label {
+ padding-right: 20upx;
+}
+
+.uni-form-item .with-fun {
+ display: flex;
+ flex-wrap: nowrap;
+ /* background: #FFFFFF; */
+}
+
+.uni-form-item .with-fun .uni-icon {
+ width: 40px;
+ height: 80upx;
+ line-height: 80upx;
+ flex-shrink: 0;
+}
+
+/* loadmore */
+.uni-loadmore {
+ height: 80upx;
+ line-height: 80upx;
+ text-align: center;
+ padding-bottom: 30upx;
+}
+
+/*数字角标*/
+.uni-badge,
+.uni-badge-default {
+ font-family: 'Helvetica Neue', Helvetica, sans-serif;
+ font-size: 12px;
+ line-height: 1;
+ display: inline-block;
+ padding: 3px 6px;
+ color: #333;
+ border-radius: 100px;
+ background-color: rgba(0, 0, 0, .15);
+}
+
+.uni-badge.uni-badge-inverted {
+ padding: 0 5px 0 0;
+ color: #929292;
+ background-color: transparent
+}
+
+.uni-badge-primary {
+ color: #fff;
+ background-color: #007aff
+}
+
+.uni-badge-blue.uni-badge-inverted,
+.uni-badge-primary.uni-badge-inverted {
+ color: #007aff;
+ background-color: transparent
+}
+
+.uni-badge-green,
+.uni-badge-success {
+ color: #fff;
+ background-color: #4cd964;
+}
+
+.uni-badge-green.uni-badge-inverted,
+.uni-badge-success.uni-badge-inverted {
+ color: #4cd964;
+ background-color: transparent
+}
+
+.uni-badge-warning,
+.uni-badge-yellow {
+ color: #fff;
+ background-color: #f0ad4e
+}
+
+.uni-badge-warning.uni-badge-inverted,
+.uni-badge-yellow.uni-badge-inverted {
+ color: #f0ad4e;
+ background-color: transparent
+}
+
+.uni-badge-danger,
+.uni-badge-red {
+ color: #fff;
+ background-color: #dd524d
+}
+
+.uni-badge-danger.uni-badge-inverted,
+.uni-badge-red.uni-badge-inverted {
+ color: #dd524d;
+ background-color: transparent
+}
+
+.uni-badge-purple,
+.uni-badge-royal {
+ color: #fff;
+ background-color: #8a6de9
+}
+
+.uni-badge-purple.uni-badge-inverted,
+.uni-badge-royal.uni-badge-inverted {
+ color: #8a6de9;
+ background-color: transparent
+}
+
+/*折叠面板 */
+.uni-collapse-content {
+ height: 0;
+ width: 100%;
+ overflow: hidden;
+}
+
+.uni-collapse-content.uni-active {
+ height: auto;
+}
+
+/*卡片视图 */
+.uni-card {
+ background: #fff;
+ border-radius: 8upx;
+ margin: 20upx 0;
+ position: relative;
+ box-shadow: 0 2upx 4upx rgba(0, 0, 0, .3);
+}
+
+.uni-card-content {
+ font-size: 30upx;
+}
+
+.uni-card-content.image-view {
+ width: 100%;
+ margin: 0;
+}
+
+.uni-card-content-inner {
+ position: relative;
+ padding: 30upx;
+}
+
+.uni-card-footer,
+.uni-card-header {
+ position: relative;
+ display: flex;
+ min-height: 50upx;
+ padding: 20upx 0upx;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.uni-card-header {
+ font-size: 36upx;
+}
+
+.uni-card-footer {
+ color: #6d6d72;
+}
+
+.uni-card-footer:before,
+.uni-card-header:after {
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ height: 2upx;
+ content: '';
+ -webkit-transform: scaleY(.5);
+ transform: scaleY(.5);
+ background-color: #c8c7cc;
+}
+
+.uni-card-header:after {
+ top: auto;
+ bottom: 0;
+}
+
+.uni-card-media {
+ justify-content: flex-start;
+}
+
+.uni-card-media-logo {
+ height: 84upx;
+ width: 84upx;
+ margin-right: 20upx;
+}
+
+.uni-card-media-body {
+ height: 84upx;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ align-items: flex-start;
+}
+
+.uni-card-media-text-top {
+ line-height: 36upx;
+ font-size: 34upx;
+}
+
+.uni-card-media-text-bottom {
+ line-height: 30upx;
+ font-size: 28upx;
+ color: #8f8f94;
+}
+
+.uni-card-link {
+ color: #007AFF;
+}
+
+/* 列表 */
+.uni-list {
+ background-color: #FFFFFF;
+ position: relative;
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+}
+
+.uni-list:after {
+ position: absolute;
+ z-index: 10;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ height: 1px;
+ content: '';
+ -webkit-transform: scaleY(.5);
+ transform: scaleY(.5);
+ background-color: #c8c7cc;
+}
+
+.uni-list::before {
+ position: absolute;
+ z-index: 10;
+ right: 0;
+ top: 0;
+ left: 0;
+ height: 1px;
+ content: '';
+ -webkit-transform: scaleY(.5);
+ transform: scaleY(.5);
+ background-color: #c8c7cc;
+}
+
+.uni-list-cell {
+ position: relative;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.uni-list-cell-hover {
+ background-color: #eee;
+}
+
+.uni-list-cell-pd {
+ padding: 22upx 30upx;
+}
+
+.uni-list-cell-left {
+ font-size: 28upx;
+ padding: 0 30upx;
+}
+
+.uni-list-cell-db,
+.uni-list-cell-right {
+ flex: 1;
+}
+
+.uni-list-cell::after {
+ position: absolute;
+ z-index: 3;
+ right: 0;
+ bottom: 0;
+ left: 30upx;
+ height: 1px;
+ content: '';
+ -webkit-transform: scaleY(.5);
+ transform: scaleY(.5);
+ background-color: #c8c7cc;
+}
+
+.uni-list .uni-list-cell:last-child::after {
+ height: 0upx;
+}
+
+.uni-list-cell-last.uni-list-cell::after {
+ height: 0upx;
+}
+
+.uni-list-cell-divider {
+ position: relative;
+ display: flex;
+ color: #999;
+ background-color: #f7f7f7;
+ padding: 15upx 20upx;
+}
+
+.uni-list-cell-divider::before {
+ position: absolute;
+ right: 0;
+ top: 0;
+ left: 0;
+ height: 1px;
+ content: '';
+ -webkit-transform: scaleY(.5);
+ transform: scaleY(.5);
+ background-color: #c8c7cc;
+}
+
+.uni-list-cell-divider::after {
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ left: 0upx;
+ height: 1px;
+ content: '';
+ -webkit-transform: scaleY(.5);
+ transform: scaleY(.5);
+ background-color: #c8c7cc;
+}
+
+.uni-list-cell-navigate {
+ font-size: 30upx;
+ padding: 22upx 30upx;
+ line-height: 48upx;
+ position: relative;
+ display: flex;
+ box-sizing: border-box;
+ width: 100%;
+ flex: 1;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.uni-list-cell-navigate {
+ padding-right: 36upx;
+}
+
+.uni-navigate-badge {
+ padding-right: 50upx;
+}
+
+.uni-navigate-right:after {
+ font-family: uniicons;
+ content: '\e583';
+ position: absolute;
+ right: 24upx;
+ top: 50%;
+ color: #bbb;
+ -webkit-transform: translateY(-50%);
+ transform: translateY(-50%);
+}
+
+.uni-list-cell-navigate.uni-navigate-left:after {
+ font-family: uniicons;
+ content: '\e582';
+ position: absolute;
+ left: 0upx;
+ top: 50%;
+ color: #bbb;
+ -webkit-transform: translateY(-50%);
+ transform: translateY(-50%);
+}
+
+.uni-list-cell-navigate.uni-navigate-bottom:after {
+ font-family: uniicons;
+ content: '\e581';
+ position: absolute;
+ right: 24upx;
+ top: 50%;
+ color: #bbb;
+ -webkit-transform: translateY(-50%);
+ transform: translateY(-50%);
+}
+
+.uni-list-cell-navigate.uni-navigate-bottom.uni-active::after {
+ font-family: uniicons;
+ content: '\e580';
+ position: absolute;
+ right: 24upx;
+ top: 50%;
+ color: #bbb;
+ -webkit-transform: translateY(-50%);
+ transform: translateY(-50%);
+}
+
+.uni-collapse.uni-list-cell {
+ flex-direction: column;
+}
+
+.uni-list-cell-navigate.uni-active {
+ background: #eee;
+}
+
+.uni-list.uni-collapse {
+ box-sizing: border-box;
+ height: 0;
+ overflow: hidden;
+}
+
+.uni-collapse .uni-list-cell {
+ padding-left: 20upx;
+}
+
+.uni-collapse .uni-list-cell::after {
+ left: 52upx;
+}
+
+.uni-list.uni-active {
+ height: auto;
+}
+
+/* 三行列表 */
+.uni-triplex-row {
+ display: flex;
+ flex: 1;
+ width: 100%;
+ box-sizing: border-box;
+ flex-direction: row;
+ padding: 22upx 30upx;
+}
+
+.uni-triplex-right,
+.uni-triplex-left {
+ display: flex;
+ flex-direction: column;
+}
+
+.uni-triplex-left {
+ width: 84%;
+}
+
+.uni-triplex-left .uni-title {
+ padding: 8upx 0;
+}
+
+.uni-triplex-left .uni-text,
+.uni-triplex-left .uni-text-small {
+ color: #999999;
+}
+
+.uni-triplex-right {
+ width: 16%;
+ text-align: right;
+}
+
+/* 图文列表 */
+.uni-media-list {
+ padding: 22upx 30upx;
+ box-sizing: border-box;
+ display: flex;
+ width: 100%;
+ flex-direction: row;
+}
+
+.uni-navigate-right.uni-media-list {
+ padding-right: 74upx;
+}
+
+.uni-pull-right {
+ flex-direction: row-reverse;
+}
+
+.uni-pull-right>.uni-media-list-logo {
+ margin-right: 0upx;
+ margin-left: 20upx;
+}
+
+.uni-media-list-logo {
+ height: 84upx;
+ width: 84upx;
+ margin-right: 20upx;
+}
+
+.uni-media-list-logo image {
+ height: 100%;
+ width: 100%;
+}
+
+.uni-media-list-body {
+ height: 84upx;
+ display: flex;
+ flex: 1;
+ flex-direction: column;
+ justify-content: space-between;
+ align-items: flex-start;
+ overflow: hidden;
+}
+
+.uni-media-list-text-top {
+ width: 100%;
+ line-height: 36upx;
+ font-size: 30upx;
+}
+
+.uni-media-list-text-bottom {
+ width: 100%;
+ line-height: 30upx;
+ font-size: 26upx;
+ color: #8f8f94;
+}
+
+/* 九宫格 */
+.uni-grid-9 {
+ background: #f2f2f2;
+ width: 750upx;
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ border-top: 2upx solid #eee;
+}
+
+.uni-grid-9-item {
+ width: 250upx;
+ height: 200upx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ border-bottom: 2upx solid;
+ border-right: 2upx solid;
+ border-color: #eee;
+ box-sizing: border-box;
+}
+
+.no-border-right {
+ border-right: none;
+}
+
+.uni-grid-9-image {
+ width: 100upx;
+ height: 100upx;
+}
+
+.uni-grid-9-text {
+ width: 250upx;
+ line-height: 4upx;
+ height: 40upx;
+ text-align: center;
+ font-size: 30upx;
+}
+
+.uni-grid-9-item-hover {
+ background: rgba(0, 0, 0, 0.1);
+}
+
+/* 上传 */
+.uni-uploader {
+ flex: 1;
+ flex-direction: column;
+}
+
+.uni-uploader-head {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+}
+
+.uni-uploader-info {
+ color: #B2B2B2;
+}
+
+.uni-uploader-body {
+ margin-top: 16upx;
+}
+
+.uni-uploader__files {
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+}
+
+.uni-uploader__file {
+ margin: 10upx;
+ width: 210upx;
+ height: 210upx;
+}
+
+.uni-uploader__img {
+ display: block;
+ width: 210upx;
+ height: 210upx;
+}
+
+.uni-uploader__input-box {
+ position: relative;
+ margin: 10upx;
+ width: 208upx;
+ height: 208upx;
+ border: 2upx solid #D9D9D9;
+}
+
+.uni-uploader__input-box:before,
+.uni-uploader__input-box:after {
+ content: " ";
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ -webkit-transform: translate(-50%, -50%);
+ transform: translate(-50%, -50%);
+ background-color: #D9D9D9;
+}
+
+.uni-uploader__input-box:before {
+ width: 4upx;
+ height: 79upx;
+}
+
+.uni-uploader__input-box:after {
+ width: 79upx;
+ height: 4upx;
+}
+
+.uni-uploader__input-box:active {
+ border-color: #999999;
+}
+
+.uni-uploader__input-box:active:before,
+.uni-uploader__input-box:active:after {
+ background-color: #999999;
+}
+
+.uni-uploader__input {
+ position: absolute;
+ z-index: 1;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ opacity: 0;
+}
+
+/*问题反馈*/
+.feedback-title {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20upx;
+ color: #8f8f94;
+ font-size: 28upx;
+}
+
+.feedback-star-view.feedback-title {
+ justify-content: flex-start;
+ margin: 0;
+}
+
+.feedback-quick {
+ position: relative;
+ padding-right: 40upx;
+}
+
+.feedback-quick:after {
+ font-family: uniicons;
+ font-size: 40upx;
+ content: '\e581';
+ position: absolute;
+ right: 0;
+ top: 50%;
+ color: #bbb;
+ -webkit-transform: translateY(-50%);
+ transform: translateY(-50%);
+}
+
+.feedback-body {
+ background: #fff;
+}
+
+.feedback-textare {
+ height: 200upx;
+ font-size: 34upx;
+ line-height: 50upx;
+ width: 100%;
+ box-sizing: border-box;
+ padding: 20upx 30upx 0;
+}
+
+.feedback-input {
+ font-size: 34upx;
+ height: 50upx;
+ min-height: 50upx;
+ padding: 15upx 20upx;
+ line-height: 50upx;
+}
+
+.feedback-uploader {
+ padding: 22upx 20upx;
+}
+
+.feedback-star {
+ font-family: uniicons;
+ font-size: 40upx;
+ margin-left: 6upx;
+}
+
+.feedback-star-view {
+ margin-left: 20upx;
+}
+
+.feedback-star:after {
+ content: '\e408';
+}
+
+.feedback-star.active {
+ color: #FFB400;
+}
+
+.feedback-star.active:after {
+ content: '\e438';
+}
+
+.feedback-submit {
+ background: #007AFF;
+ color: #FFFFFF;
+ margin: 20upx;
+}
+
+/* input group */
+.uni-input-group {
+ position: relative;
+ padding: 0;
+ border: 0;
+ background-color: #fff;
+}
+
+.uni-input-group:before {
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ height: 2upx;
+ content: '';
+ transform: scaleY(.5);
+ background-color: #c8c7cc;
+}
+
+.uni-input-group:after {
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ height: 2upx;
+ content: '';
+ transform: scaleY(.5);
+ background-color: #c8c7cc;
+}
+
+.uni-input-row {
+ position: relative;
+ display: flex;
+ flex-direction: row;
+ font-size: 28upx;
+ padding: 22upx 30upx;
+ justify-content: space-between;
+}
+
+.uni-input-group .uni-input-row:after {
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ left: 30upx;
+ height: 2upx;
+ content: '';
+ transform: scaleY(.5);
+ background-color: #c8c7cc;
+}
+
+.uni-input-row label {
+ line-height: 70upx;
+}
+
+/* textarea */
+.uni-textarea {
+ width: 100%;
+ background: #FFF;
+}
+
+.uni-textarea textarea {
+ width: 96%;
+ padding: 18upx 2%;
+ line-height: 1.6;
+ font-size: 28upx;
+ height: 150upx;
+}
+
+/* tab bar */
+.uni-tab-bar {
+ display: flex;
+ flex: 1;
+ flex-direction: column;
+ overflow: hidden;
+ height: 100%;
+}
+
+.uni-tab-bar .list {
+ width: 750upx;
+ height: 100%;
+}
+
+.uni-swiper-tab {
+ width: 100%;
+ white-space: nowrap;
+ line-height: 100upx;
+ height: 100upx;
+ border-bottom: 1px solid #c8c7cc;
+}
+
+.swiper-tab-list {
+ font-size: 30upx;
+ width: 150upx;
+ display: inline-block;
+ text-align: center;
+ color: #555;
+}
+
+.uni-tab-bar .active {
+ color: #007AFF;
+}
+
+.uni-tab-bar .swiper-box {
+ flex: 1;
+ width: 100%;
+ height: calc(100% - 100upx);
+}
+
+.uni-tab-bar-loading {
+ padding: 20upx 0;
+}
+
+/* steps */
+.uni-steps {
+ padding: 20upx 30upx;
+ flex-grow: 1;
+ display: flex;
+ flex-wrap: wrap;
+}
+
+.uni-steps view {
+ display: flex;
+ flex-wrap: wrap;
+ float: none;
+}
+
+.uni-steps .step {
+ flex: 1;
+ margin: 0 1%;
+ flex-wrap: nowrap;
+}
+
+.uni-steps .step:last-child {
+ flex: none;
+}
+
+.uni-steps .step-circle {
+ width: 50upx;
+ height: 50upx;
+ border-radius: 50upx;
+ background: #A9A9A9;
+ justify-content: center;
+ line-height: 50upx;
+ flex-shrink: 0;
+ margin-right: 15upx;
+ color: #ffffff;
+ font-size: 28upx;
+}
+
+.uni-steps .step-content {
+ width: 100%;
+ height: 22upx;
+ border-bottom: 2px solid #A9A9A9;
+}
+
+.uni-steps .step-title {
+ line-height: 50upx;
+ height: 50upx;
+ background: #FFFFFF;
+ width: auto;
+ overflow: hidden;
+ padding-right: 8upx;
+}
+
+.uni-steps .current .step-circle {
+ background: #00B26A;
+ color: #FFFFFF;
+}
+
+.uni-steps .current .step-content {
+ border-color: #00B26A;
+}
+
+.uni-steps .current .step-title {
+ color: #00B26A;
+}
+
+/* comment */
+.uni-comment {
+ padding: 5rpx 0;
+ display: flex;
+ flex-grow: 1;
+ flex-direction: column;
+}
+
+.uni-comment-list {
+ flex-wrap: nowrap;
+ padding: 10rpx 0;
+ margin: 10rpx 0;
+ width: 100%;
+ display: flex;
+}
+
+.uni-comment-face {
+ width: 70upx;
+ height: 70upx;
+ border-radius: 100%;
+ margin-right: 20upx;
+ flex-shrink: 0;
+ overflow: hidden;
+}
+
+.uni-comment-face image {
+ width: 100%;
+ border-radius: 100%;
+}
+
+.uni-comment-body {
+ width: 100%;
+}
+
+.uni-comment-top {
+ line-height: 1.5em;
+ justify-content: space-between;
+}
+
+.uni-comment-top text {
+ color: #0A98D5;
+ font-size: 24upx;
+}
+
+.uni-comment-date {
+ line-height: 38upx;
+ flex-direction: row;
+ justify-content: space-between;
+ display: flex !important;
+ flex-grow: 1;
+}
+
+.uni-comment-date view {
+ color: #666666;
+ font-size: 24upx;
+ line-height: 38upx;
+}
+
+.uni-comment-content {
+ line-height: 1.6em;
+ font-size: 28upx;
+ padding: 8rpx 0;
+}
+
+.uni-comment-replay-btn {
+ background: #FFF;
+ font-size: 24upx;
+ line-height: 28upx;
+ padding: 5rpx 20upx;
+ border-radius: 30upx;
+ color: #333 !important;
+ margin: 0 10upx;
+}
+
+/* swiper msg */
+.uni-swiper-msg {
+ width: 100%;
+ padding: 12rpx 0;
+ flex-wrap: nowrap;
+ display: flex;
+}
+
+.uni-swiper-msg-icon {
+ width: 50upx;
+ margin-right: 20upx;
+}
+
+.uni-swiper-msg-icon image {
+ width: 100%;
+ flex-shrink: 0;
+}
+
+.uni-swiper-msg swiper {
+ width: 100%;
+ height: 50upx;
+}
+
+.uni-swiper-msg swiper-item {
+ line-height: 50upx;
+}
+
+/* product */
+.uni-product-list {
+ display: flex;
+ width: 100%;
+ flex-wrap: wrap;
+ flex-direction: row;
+}
+
+.uni-product {
+ padding: 20upx;
+ display: flex;
+ flex-direction: column;
+}
+
+.image-view {
+ height: 330upx;
+ width: 330upx;
+ margin: 12upx 0;
+}
+
+.uni-product-image {
+ height: 330upx;
+ width: 330upx;
+}
+
+.uni-product-title {
+ width: 300upx;
+ word-break: break-all;
+ display: -webkit-box;
+ overflow: hidden;
+ line-height: 1.5;
+ text-overflow: ellipsis;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+}
+
+.uni-product-price {
+ margin-top: 10upx;
+ font-size: 28upx;
+ line-height: 1.5;
+ position: relative;
+}
+
+.uni-product-price-original {
+ color: #e80080;
+}
+
+.uni-product-price-favour {
+ color: #888888;
+ text-decoration: line-through;
+ margin-left: 10upx;
+}
+
+.uni-product-tip {
+ position: absolute;
+ right: 10upx;
+ background-color: #ff3333;
+ color: #ffffff;
+ padding: 0 10upx;
+ border-radius: 5upx;
+}
+
+/* timeline */
+.uni-timeline {
+ margin: 35upx 0;
+ display: flex;
+ flex-direction: column;
+ position: relative;
+}
+
+
+.uni-timeline-item {
+ display: flex;
+ flex-direction: row;
+ position: relative;
+ padding-bottom: 20upx;
+ box-sizing: border-box;
+ overflow: hidden;
+
+}
+
+.uni-timeline-item .uni-timeline-item-keynode {
+ width: 160upx;
+ flex-shrink: 0;
+ box-sizing: border-box;
+ padding-right: 20upx;
+ text-align: right;
+ line-height: 65upx;
+}
+
+.uni-timeline-item .uni-timeline-item-divider {
+ flex-shrink: 0;
+ position: relative;
+ width: 30upx;
+ height: 30upx;
+ top: 15upx;
+ border-radius: 50%;
+ background-color: #bbb;
+}
+
+
+
+.uni-timeline-item-divider::before,
+.uni-timeline-item-divider::after {
+ position: absolute;
+ left: 15upx;
+ width: 1upx;
+ height: 100vh;
+ content: '';
+ background: inherit;
+}
+
+.uni-timeline-item-divider::before {
+ bottom: 100%;
+}
+
+.uni-timeline-item-divider::after {
+ top: 100%;
+}
+
+
+.uni-timeline-last-item .uni-timeline-item-divider:after {
+ display: none;
+}
+
+.uni-timeline-first-item .uni-timeline-item-divider:before {
+ display: none;
+}
+
+.uni-timeline-item .uni-timeline-item-content {
+ padding-left: 20upx;
+}
+
+.uni-timeline-last-item .bottom-border::after {
+ display: none;
+}
+
+.uni-timeline-item-content .datetime {
+ color: #CCCCCC;
+}
+
+/* 自定义节点颜色 */
+.uni-timeline-last-item .uni-timeline-item-divider {
+ background-color: #1AAD19;
+}
+
+
+/* uni-icon */
+
+
+@font-face {
+ font-family: 'iconfont';
+ src: url('https://at.alicdn.com/t/font_1028200_xhbo4rn58rp.ttf?t=1548214263520') format('truetype');
+}
+
+.icon {
+ font-family: 'iconfont' !important;
+ font-size: 16px;
+ font-style: normal;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-jia:before {
+ content: '\e630';
+}
+
+.icon-arrow-up:before {
+ content: '\e603';
+}
+
+.uni-icon {
+ font-family: uniicons;
+ font-size: 24px;
+ font-weight: normal;
+ font-style: normal;
+ line-height: 1;
+ display: inline-block;
+ text-decoration: none;
+ -webkit-font-smoothing: antialiased;
+}
+
+.uni-icon.uni-active {
+ color: #007aff;
+}
+
+.uni-icon-contact:before {
+ content: '\e100';
+}
+
+.uni-icon-person:before {
+ content: '\e101';
+}
+
+.uni-icon-personadd:before {
+ content: '\e102';
+}
+
+.uni-icon-contact-filled:before {
+ content: '\e130';
+}
+
+.uni-icon-person-filled:before {
+ content: '\e131';
+}
+
+.uni-icon-personadd-filled:before {
+ content: '\e132';
+}
+
+.uni-icon-phone:before {
+ content: '\e200';
+}
+
+.uni-icon-email:before {
+ content: '\e201';
+}
+
+.uni-icon-chatbubble:before {
+ content: '\e202';
+}
+
+.uni-icon-chatboxes:before {
+ content: '\e203';
+}
+
+.uni-icon-phone-filled:before {
+ content: '\e230';
+}
+
+.uni-icon-email-filled:before {
+ content: '\e231';
+}
+
+.uni-icon-chatbubble-filled:before {
+ content: '\e232';
+}
+
+.uni-icon-chatboxes-filled:before {
+ content: '\e233';
+}
+
+.uni-icon-weibo:before {
+ content: '\e260';
+}
+
+.uni-icon-weixin:before {
+ content: '\e261';
+}
+
+.uni-icon-pengyouquan:before {
+ content: '\e262';
+}
+
+.uni-icon-chat:before {
+ content: '\e263';
+}
+
+.uni-icon-qq:before {
+ content: '\e264';
+}
+
+.uni-icon-videocam:before {
+ content: '\e300';
+}
+
+.uni-icon-camera:before {
+ content: '\e301';
+}
+
+.uni-icon-mic:before {
+ content: '\e302';
+}
+
+.uni-icon-location:before {
+ content: '\e303';
+}
+
+.uni-icon-mic-filled:before,
+.uni-icon-speech:before {
+ content: '\e332';
+}
+
+.uni-icon-location-filled:before {
+ content: '\e333';
+}
+
+.uni-icon-micoff:before {
+ content: '\e360';
+}
+
+.uni-icon-image:before {
+ content: '\e363';
+}
+
+.uni-icon-map:before {
+ content: '\e364';
+}
+
+.uni-icon-compose:before {
+ content: '\e400';
+}
+
+.uni-icon-trash:before {
+ content: '\e401';
+}
+
+.uni-icon-upload:before {
+ content: '\e402';
+}
+
+.uni-icon-download:before {
+ content: '\e403';
+}
+
+.uni-icon-close:before {
+ content: '\e404';
+}
+
+.uni-icon-redo:before {
+ content: '\e405';
+}
+
+.uni-icon-undo:before {
+ content: '\e406';
+}
+
+.uni-icon-refresh:before {
+ content: '\e407';
+}
+
+.uni-icon-star:before {
+ content: '\e408';
+}
+
+.uni-icon-plus:before {
+ content: '\e409';
+}
+
+.uni-icon-minus:before {
+ content: '\e410';
+}
+
+.uni-icon-circle:before,
+.uni-icon-checkbox:before {
+ content: '\e411';
+}
+
+.uni-icon-close-filled:before,
+.uni-icon-clear:before {
+ content: '\e434';
+}
+
+.uni-icon-refresh-filled:before {
+ content: '\e437';
+}
+
+.uni-icon-star-filled:before {
+ content: '\e438';
+}
+
+.uni-icon-plus-filled:before {
+ content: '\e439';
+}
+
+.uni-icon-minus-filled:before {
+ content: '\e440';
+}
+
+.uni-icon-circle-filled:before {
+ content: '\e441';
+}
+
+.uni-icon-checkbox-filled:before {
+ content: '\e442';
+}
+
+.uni-icon-closeempty:before {
+ content: '\e460';
+}
+
+.uni-icon-refreshempty:before {
+ content: '\e461';
+}
+
+.uni-icon-reload:before {
+ content: '\e462';
+}
+
+.uni-icon-starhalf:before {
+ content: '\e463';
+}
+
+.uni-icon-spinner:before {
+ content: '\e464';
+}
+
+.uni-icon-spinner-cycle:before {
+ content: '\e465';
+}
+
+.uni-icon-search:before {
+ content: '\e466';
+}
+
+.uni-icon-plusempty:before {
+ content: '\e468';
+}
+
+.uni-icon-forward:before {
+ content: '\e470';
+}
+
+.uni-icon-back:before,
+.uni-icon-left-nav:before {
+ content: '\e471';
+}
+
+.uni-icon-checkmarkempty:before {
+ content: '\e472';
+}
+
+.uni-icon-home:before {
+ content: '\e500';
+}
+
+.uni-icon-navigate:before {
+ content: '\e501';
+}
+
+.uni-icon-gear:before {
+ content: '\e502';
+}
+
+.uni-icon-paperplane:before {
+ content: '\e503';
+}
+
+.uni-icon-info:before {
+ content: '\e504';
+}
+
+.uni-icon-help:before {
+ content: '\e505';
+}
+
+.uni-icon-locked:before {
+ content: '\e506';
+}
+
+.uni-icon-more:before {
+ content: '\e507';
+}
+
+.uni-icon-flag:before {
+ content: '\e508';
+}
+
+.uni-icon-home-filled:before {
+ content: '\e530';
+}
+
+.uni-icon-gear-filled:before {
+ content: '\e532';
+}
+
+.uni-icon-info-filled:before {
+ content: '\e534';
+}
+
+.uni-icon-help-filled:before {
+ content: '\e535';
+}
+
+.uni-icon-more-filled:before {
+ content: '\e537';
+}
+
+.uni-icon-settings:before {
+ content: '\e560';
+}
+
+.uni-icon-list:before {
+ content: '\e562';
+}
+
+.uni-icon-bars:before {
+ content: '\e563';
+}
+
+.uni-icon-loop:before {
+ content: '\e565';
+}
+
+.uni-icon-paperclip:before {
+ content: '\e567';
+}
+
+.uni-icon-eye:before {
+ content: '\e568';
+}
+
+.uni-icon-arrowup:before {
+ content: '\e580';
+}
+
+.uni-icon-arrowdown:before {
+ content: '\e581';
+}
+
+.uni-icon-arrowleft:before {
+ content: '\e582';
+}
+
+.uni-icon-arrowright:before {
+ content: '\e583';
+}
+
+.uni-icon-arrowthinup:before {
+ content: '\e584';
+}
+
+.uni-icon-arrowthindown:before {
+ content: '\e585';
+}
+
+.uni-icon-arrowthinleft:before {
+ content: '\e586';
+}
+
+.uni-icon-arrowthinright:before {
+ content: '\e587';
+}
+
+.uni-icon-pulldown:before {
+ content: '\e588';
+}
+
+.uni-icon-scan:before {
+ content: "\e612";
+}
+
+/* 分界线 */
+.uni-divider {
+ height: 110upx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ position: relative;
+}
+
+.uni-divider__content {
+ font-size: 28upx;
+ color: #999;
+ padding: 0 20upx;
+ position: relative;
+ z-index: 101;
+ background: #F4F5F6;
+}
+
+.uni-divider__line {
+ background-color: #CCCCCC;
+ height: 1px;
+ width: 100%;
+ position: absolute;
+ z-index: 100;
+ top: 50%;
+ left: 0;
+ transform: translateY(50%);
+}
+
+.navigator-hover {
+ background: none;
+}
+
+.button-sp-area {
+ margin: 0 auto;
+ width: 60%;
+}
diff --git a/common/util.js b/common/util.js
new file mode 100644
index 0000000..a622a0c
--- /dev/null
+++ b/common/util.js
@@ -0,0 +1,73 @@
+function formatTime(time) {
+ if (typeof time !== 'number' || time < 0) {
+ return time
+ }
+
+ var hour = parseInt(time / 3600)
+ time = time % 3600
+ var minute = parseInt(time / 60)
+ time = time % 60
+ var second = time
+
+ return ([hour, minute, second]).map(function (n) {
+ n = n.toString()
+ return n[1] ? n : '0' + n
+ }).join(':')
+}
+
+function formatLocation(longitude, latitude) {
+ if (typeof longitude === 'string' && typeof latitude === 'string') {
+ longitude = parseFloat(longitude)
+ latitude = parseFloat(latitude)
+ }
+
+ longitude = longitude.toFixed(2)
+ latitude = latitude.toFixed(2)
+
+ return {
+ longitude: longitude.toString().split('.'),
+ latitude: latitude.toString().split('.')
+ }
+}
+var dateUtils = {
+ UNITS: {
+ '年': 31557600000,
+ '月': 2629800000,
+ '天': 86400000,
+ '小时': 3600000,
+ '分钟': 60000,
+ '秒': 1000
+ },
+ humanize: function (milliseconds) {
+ var humanize = '';
+ for (var key in this.UNITS) {
+ if (milliseconds >= this.UNITS[key]) {
+ humanize = Math.floor(milliseconds / this.UNITS[key]) + key + '前';
+ break;
+ }
+ }
+ return humanize || '刚刚';
+ },
+ format: function (dateStr) {
+ var date = this.parse(dateStr)
+ var diff = Date.now() - date.getTime();
+ if (diff < this.UNITS['天']) {
+ return this.humanize(diff);
+ }
+ var _format = function (number) {
+ return (number < 10 ? ('0' + number) : number);
+ };
+ return date.getFullYear() + '/' + _format(date.getMonth() + 1) + '/' + _format(date.getDay()) + '-' +
+ _format(date.getHours()) + ':' + _format(date.getMinutes());
+ },
+ parse: function (str) { //将"yyyy-mm-dd HH:MM:ss"格式的字符串,转化为一个Date对象
+ var a = str.split(/[^0-9]/);
+ return new Date(a[0], a[1] - 1, a[2], a[3], a[4], a[5]);
+ }
+};
+
+module.exports = {
+ formatTime: formatTime,
+ formatLocation: formatLocation,
+ dateUtils: dateUtils
+}
diff --git a/main.js b/main.js
new file mode 100644
index 0000000..0656173
--- /dev/null
+++ b/main.js
@@ -0,0 +1,11 @@
+import Vue from 'vue'
+import App from './App'
+
+Vue.config.productionTip = false
+
+App.mpType = 'app'
+
+const app = new Vue({
+ ...App
+})
+app.$mount()
diff --git a/manifest.json b/manifest.json
new file mode 100644
index 0000000..efc18c5
--- /dev/null
+++ b/manifest.json
@@ -0,0 +1,146 @@
+{
+ "name" : "wifiDemo",
+ "appid" : "__UNI__1EAAC96",
+ "description" : "wifiDemo",
+ "versionName" : "1.0.0",
+ "versionCode" : "100",
+ "transformPx" : false,
+ /* 5+App特有相关 */
+ "app-plus" : {
+ "usingComponents" : true,
+ "nvueCompiler" : "uni-app",
+ "compilerVersion" : 3,
+ "splashscreen" : {
+ "alwaysShowBeforeRender" : true,
+ "waiting" : true,
+ "autoclose" : true,
+ "delay" : 0
+ },
+ /* 模块配置 */
+ "modules" : {},
+ /* 应用发布信息 */
+ "distribute" : {
+ /* 应用发布信息 */
+ "android" : {
+ /* android打包配置 */
+ "permissions" : [
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ]
+ },
+ /* ios打包配置 */
+ "ios" : {},
+ /* SDK配置 */
+ "sdkConfigs" : {
+ "ad" : {
+ "360" : {},
+ "csj" : {},
+ "gdt" : {}
+ }
+ },
+ "icons" : {
+ "android" : {
+ "hdpi" : "unpackage/res/icons/72x72.png",
+ "xhdpi" : "unpackage/res/icons/96x96.png",
+ "xxhdpi" : "unpackage/res/icons/144x144.png",
+ "xxxhdpi" : "unpackage/res/icons/192x192.png"
+ },
+ "ios" : {
+ "appstore" : "unpackage/res/icons/1024x1024.png",
+ "ipad" : {
+ "app" : "unpackage/res/icons/76x76.png",
+ "app@2x" : "unpackage/res/icons/152x152.png",
+ "notification" : "unpackage/res/icons/20x20.png",
+ "notification@2x" : "unpackage/res/icons/40x40.png",
+ "proapp@2x" : "unpackage/res/icons/167x167.png",
+ "settings" : "unpackage/res/icons/29x29.png",
+ "settings@2x" : "unpackage/res/icons/58x58.png",
+ "spotlight" : "unpackage/res/icons/40x40.png",
+ "spotlight@2x" : "unpackage/res/icons/80x80.png"
+ },
+ "iphone" : {
+ "app@2x" : "unpackage/res/icons/120x120.png",
+ "app@3x" : "unpackage/res/icons/180x180.png",
+ "notification@2x" : "unpackage/res/icons/40x40.png",
+ "notification@3x" : "unpackage/res/icons/60x60.png",
+ "settings@2x" : "unpackage/res/icons/58x58.png",
+ "settings@3x" : "unpackage/res/icons/87x87.png",
+ "spotlight@2x" : "unpackage/res/icons/80x80.png",
+ "spotlight@3x" : "unpackage/res/icons/120x120.png"
+ }
+ }
+ }
+ },
+ "nativePlugins" : {
+ "Googbuild-WIFI" : {
+ "__plugin_info__" : {
+ "name" : "WIFI 智能配网 支持 ESPTouch、AirKiss - [试用版,仅用于自定义调试基座]",
+ "description" : "集成 ESPTouch 和 AirKiss 配网协议,帮助物联网设备连接Wi-Fi网络,快捷。",
+ "platforms" : "Android,iOS",
+ "url" : "https://ext.dcloud.net.cn/plugin?id=430",
+ "android_package_name" : "",
+ "ios_bundle_id" : "",
+ "isCloud" : true,
+ "bought" : 0,
+ "pid" : "430",
+ "parameters" : {}
+ }
+ }
+ }
+ },
+ /* 快应用特有相关 */
+ "quickapp" : {},
+ /* 小程序特有相关 */
+ "mp-weixin" : {
+ "appid" : "",
+ "setting" : {
+ "urlCheck" : false
+ },
+ "usingComponents" : true
+ },
+ "mp-alipay" : {
+ "usingComponents" : true
+ },
+ "mp-baidu" : {
+ "usingComponents" : true
+ },
+ "mp-toutiao" : {
+ "usingComponents" : true
+ }
+}
diff --git a/pages.json b/pages.json
new file mode 100644
index 0000000..9c9448c
--- /dev/null
+++ b/pages.json
@@ -0,0 +1,16 @@
+{
+ "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+ {
+ "path": "pages/index/index",
+ "style": {
+ "navigationBarTitleText": "WIFI 智能配网"
+ }
+ }
+ ],
+ "globalStyle": {
+ "navigationBarTextStyle": "black",
+ "navigationBarTitleText": "uni-app",
+ "navigationBarBackgroundColor": "#F8F8F8",
+ "backgroundColor": "#F8F8F8"
+ }
+}
diff --git a/pages/index/index.vue b/pages/index/index.vue
new file mode 100644
index 0000000..6c094fd
--- /dev/null
+++ b/pages/index/index.vue
@@ -0,0 +1,151 @@
+
+
+ 支持 ESPTouch、AirKiss
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{result}}
+
+
+
+
+
+
+
diff --git a/static/logo.png b/static/logo.png
new file mode 100644
index 0000000..b5771e2
Binary files /dev/null and b/static/logo.png differ
diff --git a/uni.scss b/uni.scss
new file mode 100644
index 0000000..09ffb46
--- /dev/null
+++ b/uni.scss
@@ -0,0 +1,76 @@
+/**
+ * 这里是uni-app内置的常用样式变量
+ *
+ * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
+ * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
+ *
+ */
+
+/**
+ * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
+ *
+ * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
+ */
+
+/* 颜色变量 */
+
+/* 行为相关颜色 */
+$uni-color-primary: #007aff;
+$uni-color-success: #4cd964;
+$uni-color-warning: #f0ad4e;
+$uni-color-error: #dd524d;
+
+/* 文字基本颜色 */
+$uni-text-color:#333;//基本色
+$uni-text-color-inverse:#fff;//反色
+$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
+$uni-text-color-placeholder: #808080;
+$uni-text-color-disable:#c0c0c0;
+
+/* 背景颜色 */
+$uni-bg-color:#ffffff;
+$uni-bg-color-grey:#f8f8f8;
+$uni-bg-color-hover:#f1f1f1;//点击状态颜色
+$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
+
+/* 边框颜色 */
+$uni-border-color:#c8c7cc;
+
+/* 尺寸变量 */
+
+/* 文字尺寸 */
+$uni-font-size-sm:24rpx;
+$uni-font-size-base:28rpx;
+$uni-font-size-lg:32rpx;
+
+/* 图片尺寸 */
+$uni-img-size-sm:40rpx;
+$uni-img-size-base:52rpx;
+$uni-img-size-lg:80rpx;
+
+/* Border Radius */
+$uni-border-radius-sm: 4rpx;
+$uni-border-radius-base: 6rpx;
+$uni-border-radius-lg: 12rpx;
+$uni-border-radius-circle: 50%;
+
+/* 水平间距 */
+$uni-spacing-row-sm: 10px;
+$uni-spacing-row-base: 20rpx;
+$uni-spacing-row-lg: 30rpx;
+
+/* 垂直间距 */
+$uni-spacing-col-sm: 8rpx;
+$uni-spacing-col-base: 16rpx;
+$uni-spacing-col-lg: 24rpx;
+
+/* 透明度 */
+$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
+
+/* 文章场景相关 */
+$uni-color-title: #2C405A; // 文章标题颜色
+$uni-font-size-title:40rpx;
+$uni-color-subtitle: #555555; // 二级标题颜色
+$uni-font-size-subtitle:36rpx;
+$uni-color-paragraph: #3F536E; // 文章段落颜色
+$uni-font-size-paragraph:30rpx;
\ No newline at end of file
diff --git a/unpackage/res/icons/1024x1024.png b/unpackage/res/icons/1024x1024.png
new file mode 100644
index 0000000..8816635
Binary files /dev/null and b/unpackage/res/icons/1024x1024.png differ
diff --git a/unpackage/res/icons/120x120.png b/unpackage/res/icons/120x120.png
new file mode 100644
index 0000000..6efc84e
Binary files /dev/null and b/unpackage/res/icons/120x120.png differ
diff --git a/unpackage/res/icons/144x144.png b/unpackage/res/icons/144x144.png
new file mode 100644
index 0000000..a8817d1
Binary files /dev/null and b/unpackage/res/icons/144x144.png differ
diff --git a/unpackage/res/icons/152x152.png b/unpackage/res/icons/152x152.png
new file mode 100644
index 0000000..7489481
Binary files /dev/null and b/unpackage/res/icons/152x152.png differ
diff --git a/unpackage/res/icons/167x167.png b/unpackage/res/icons/167x167.png
new file mode 100644
index 0000000..c30800b
Binary files /dev/null and b/unpackage/res/icons/167x167.png differ
diff --git a/unpackage/res/icons/180x180.png b/unpackage/res/icons/180x180.png
new file mode 100644
index 0000000..4c69bfd
Binary files /dev/null and b/unpackage/res/icons/180x180.png differ
diff --git a/unpackage/res/icons/192x192.png b/unpackage/res/icons/192x192.png
new file mode 100644
index 0000000..53f2663
Binary files /dev/null and b/unpackage/res/icons/192x192.png differ
diff --git a/unpackage/res/icons/20x20.png b/unpackage/res/icons/20x20.png
new file mode 100644
index 0000000..785bdf2
Binary files /dev/null and b/unpackage/res/icons/20x20.png differ
diff --git a/unpackage/res/icons/29x29.png b/unpackage/res/icons/29x29.png
new file mode 100644
index 0000000..7e87ff9
Binary files /dev/null and b/unpackage/res/icons/29x29.png differ
diff --git a/unpackage/res/icons/40x40.png b/unpackage/res/icons/40x40.png
new file mode 100644
index 0000000..4c32331
Binary files /dev/null and b/unpackage/res/icons/40x40.png differ
diff --git a/unpackage/res/icons/58x58.png b/unpackage/res/icons/58x58.png
new file mode 100644
index 0000000..7903c42
Binary files /dev/null and b/unpackage/res/icons/58x58.png differ
diff --git a/unpackage/res/icons/60x60.png b/unpackage/res/icons/60x60.png
new file mode 100644
index 0000000..4da861a
Binary files /dev/null and b/unpackage/res/icons/60x60.png differ
diff --git a/unpackage/res/icons/72x72.png b/unpackage/res/icons/72x72.png
new file mode 100644
index 0000000..460e7f9
Binary files /dev/null and b/unpackage/res/icons/72x72.png differ
diff --git a/unpackage/res/icons/76x76.png b/unpackage/res/icons/76x76.png
new file mode 100644
index 0000000..9de8fdc
Binary files /dev/null and b/unpackage/res/icons/76x76.png differ
diff --git a/unpackage/res/icons/80x80.png b/unpackage/res/icons/80x80.png
new file mode 100644
index 0000000..05ebadc
Binary files /dev/null and b/unpackage/res/icons/80x80.png differ
diff --git a/unpackage/res/icons/87x87.png b/unpackage/res/icons/87x87.png
new file mode 100644
index 0000000..9d3d675
Binary files /dev/null and b/unpackage/res/icons/87x87.png differ
diff --git a/unpackage/res/icons/96x96.png b/unpackage/res/icons/96x96.png
new file mode 100644
index 0000000..df55ce4
Binary files /dev/null and b/unpackage/res/icons/96x96.png differ