Explorar el Código

'代理商小程序'

周杰伦 hace 4 años
padre
commit
f40ce45719

+ 111 - 0
package-lock.json

@@ -5187,6 +5187,14 @@
         "timsort": "^0.3.0"
       }
     },
+    "css-line-break": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npm.taobao.org/css-line-break/download/css-line-break-1.1.1.tgz",
+      "integrity": "sha1-1em90peEAJnrBQPHMQ/TSSegJu8=",
+      "requires": {
+        "base64-arraybuffer": "^0.2.0"
+      }
+    },
     "css-loader": {
       "version": "3.6.0",
       "resolved": "https://registry.npm.taobao.org/css-loader/download/css-loader-3.6.0.tgz?cache=0&sync_timestamp=1596208718762&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-loader%2Fdownload%2Fcss-loader-3.6.0.tgz",
@@ -7233,6 +7241,14 @@
         }
       }
     },
+    "html2canvas": {
+      "version": "1.0.0-rc.7",
+      "resolved": "https://registry.npm.taobao.org/html2canvas/download/html2canvas-1.0.0-rc.7.tgz",
+      "integrity": "sha1-cMFZzg5jlUqRFpUxiU0IrVYnrJg=",
+      "requires": {
+        "css-line-break": "1.1.1"
+      }
+    },
     "htmlparser2": {
       "version": "3.10.1",
       "resolved": "https://registry.npm.taobao.org/htmlparser2/download/htmlparser2-3.10.1.tgz",
@@ -7388,6 +7404,13 @@
       "integrity": "sha1-Cpf7h2mG6AgcYxFg+PnziRV/AEM=",
       "dev": true
     },
+    "image-size": {
+      "version": "0.5.5",
+      "resolved": "https://registry.npm.taobao.org/image-size/download/image-size-0.5.5.tgz?cache=0&sync_timestamp=1569841076205&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fimage-size%2Fdownload%2Fimage-size-0.5.5.tgz",
+      "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=",
+      "dev": true,
+      "optional": true
+    },
     "immediate": {
       "version": "3.0.6",
       "resolved": "https://registry.npm.taobao.org/immediate/download/immediate-3.0.6.tgz?cache=0&sync_timestamp=1591712419612&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fimmediate%2Fdownload%2Fimmediate-3.0.6.tgz",
@@ -9903,6 +9926,82 @@
         "launch-editor": "^2.2.1"
       }
     },
+    "less": {
+      "version": "3.12.2",
+      "resolved": "https://registry.npm.taobao.org/less/download/less-3.12.2.tgz",
+      "integrity": "sha1-FX5t0ypohp34hZMUrTjnAhGvOrQ=",
+      "dev": true,
+      "requires": {
+        "errno": "^0.1.1",
+        "graceful-fs": "^4.1.2",
+        "image-size": "~0.5.0",
+        "make-dir": "^2.1.0",
+        "mime": "^1.4.1",
+        "native-request": "^1.0.5",
+        "source-map": "~0.6.0",
+        "tslib": "^1.10.0"
+      },
+      "dependencies": {
+        "mime": {
+          "version": "1.6.0",
+          "resolved": "https://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz?cache=0&sync_timestamp=1590596706367&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime%2Fdownload%2Fmime-1.6.0.tgz",
+          "integrity": "sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=",
+          "dev": true,
+          "optional": true
+        }
+      }
+    },
+    "less-loader": {
+      "version": "6.2.0",
+      "resolved": "https://registry.npm.taobao.org/less-loader/download/less-loader-6.2.0.tgz?cache=0&sync_timestamp=1593788012269&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fless-loader%2Fdownload%2Fless-loader-6.2.0.tgz",
+      "integrity": "sha1-iyb2IcFVs0Lu/CT1vW6dxAxCpxk=",
+      "dev": true,
+      "requires": {
+        "clone": "^2.1.2",
+        "less": "^3.11.3",
+        "loader-utils": "^2.0.0",
+        "schema-utils": "^2.7.0"
+      },
+      "dependencies": {
+        "clone": {
+          "version": "2.1.2",
+          "resolved": "https://registry.npm.taobao.org/clone/download/clone-2.1.2.tgz",
+          "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=",
+          "dev": true
+        },
+        "json5": {
+          "version": "2.1.3",
+          "resolved": "https://registry.npm.taobao.org/json5/download/json5-2.1.3.tgz?cache=0&sync_timestamp=1586045666090&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjson5%2Fdownload%2Fjson5-2.1.3.tgz",
+          "integrity": "sha1-ybD3+pIzv+WAf+ZvzzpWF+1ZfUM=",
+          "dev": true,
+          "requires": {
+            "minimist": "^1.2.5"
+          }
+        },
+        "loader-utils": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-2.0.0.tgz?cache=0&sync_timestamp=1584445172927&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Floader-utils%2Fdownload%2Floader-utils-2.0.0.tgz",
+          "integrity": "sha1-5MrOW4FtQloWa18JfhDNErNgZLA=",
+          "dev": true,
+          "requires": {
+            "big.js": "^5.2.2",
+            "emojis-list": "^3.0.0",
+            "json5": "^2.1.2"
+          }
+        },
+        "schema-utils": {
+          "version": "2.7.0",
+          "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-2.7.0.tgz?cache=0&sync_timestamp=1590761195120&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fschema-utils%2Fdownload%2Fschema-utils-2.7.0.tgz",
+          "integrity": "sha1-FxUfdtjq5n+793lgwzxnatn078c=",
+          "dev": true,
+          "requires": {
+            "@types/json-schema": "^7.0.4",
+            "ajv": "^6.12.2",
+            "ajv-keywords": "^3.4.1"
+          }
+        }
+      }
+    },
     "leven": {
       "version": "3.1.0",
       "resolved": "https://registry.npm.taobao.org/leven/download/leven-3.1.0.tgz",
@@ -10472,6 +10571,13 @@
         "to-regex": "^3.0.1"
       }
     },
+    "native-request": {
+      "version": "1.0.7",
+      "resolved": "https://registry.npm.taobao.org/native-request/download/native-request-1.0.7.tgz?cache=0&sync_timestamp=1594999820584&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnative-request%2Fdownload%2Fnative-request-1.0.7.tgz",
+      "integrity": "sha1-/3QtxVW0yPLxwUtUhjm6F05XOFY=",
+      "dev": true,
+      "optional": true
+    },
     "natural-compare": {
       "version": "1.4.0",
       "resolved": "https://registry.npm.taobao.org/natural-compare/download/natural-compare-1.4.0.tgz",
@@ -11941,6 +12047,11 @@
       "resolved": "https://registry.npm.taobao.org/qrcode-terminal/download/qrcode-terminal-0.12.0.tgz",
       "integrity": "sha1-u1tpnvf58FBQkqN0i+RGT+cbWBk="
     },
+    "qrcodejs2": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npm.taobao.org/qrcodejs2/download/qrcodejs2-0.0.2.tgz",
+      "integrity": "sha1-Rlr+Xjnxn6zsuTLBH3oYYQkUauE="
+    },
     "qs": {
       "version": "6.5.2",
       "resolved": "https://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz",

+ 3 - 0
package.json

@@ -54,6 +54,8 @@
     "@dcloudio/uni-stat": "^2.0.0-28320200727001",
     "core-js": "^3.6.5",
     "flyio": "^0.6.2",
+    "html2canvas": "^1.0.0-rc.5",
+    "qrcodejs2": "0.0.2",
     "regenerator-runtime": "^0.12.1",
     "vue": "^2.6.11",
     "vuex": "^3.2.0"
@@ -74,6 +76,7 @@
     "babel-plugin-import": "^1.11.0",
     "cross-env": "^7.0.2",
     "jest": "^25.4.0",
+    "less-loader": "^6.2.0",
     "mini-types": "*",
     "miniprogram-api-typings": "*",
     "postcss-comment": "^2.0.0",

+ 33 - 1
src/App.vue

@@ -1,17 +1,49 @@
 <script>
+import { getSystemInfo } from '@/utils/wxTool.js'
+import Tip from '@/utils/tip.js'
 	export default {
 		onLaunch: function() {
 			console.log('App Launch')
 		},
 		onShow: function() {
+
 			console.log('App Show')
+			this.getBoundingInfo()
+			this.getSystemInfo()
+
+			if (!uni.getStorageSync('token')) {
+				Tip.loading('加载中')
+				setTimeout( () => {
+					uni.redirectTo({
+						url: '/pages/index/index'
+					})
+					Tip.loaded()
+				}, 1000)
+				
+			}
 		},
 		onHide: function() {
 			console.log('App Hide')
+		},
+		methods: {
+			// 获取胶囊信息
+			getBoundingInfo () {
+				let bounding =	wx.getMenuButtonBoundingClientRect()
+		
+				this.$store.commit('set_bounding', bounding)
+			},
+			// 系统信息
+			async getSystemInfo () {
+				const data = await getSystemInfo()
+		
+				if (data.errMsg === 'getSystemInfo:ok') {
+					this.$store.commit('set_systemInfo', data)
+				}
+			},
 		}
 	}
 </script>
 
 <style>
 	/*每个页面公共css */
-</style>
+</style>

+ 32 - 0
src/api/audit.js

@@ -0,0 +1,32 @@
+import { request } from '../utils/request'
+
+// 待审核列表
+export function getNeedAudit (parmas) {
+    return request({
+        url: `/agent/miniprogram/school/waitCheck`,
+        method: 'GET',
+        query: parmas
+    })
+}
+// 已审核列表
+export function getalreadyAudit (parmas) {
+    return request({
+        url: `/agent/miniprogram/school/hasCheck`,
+        method: 'GET',
+        query: parmas
+    })
+}
+// 确认or不通过审核
+export function passOrRefuseAudit (id, state) {
+    return request({
+        url: `/agent/miniprogram/school/${id}/${state}`,
+        method: 'PUT'
+    })
+}
+// 确认or不通过审核
+export function waitCheckCount () {
+    return request({
+        url: `/agent/miniprogram/school/waitCheck/count`,
+        method: 'GET'
+    })
+}

+ 18 - 0
src/api/districtGarden.js

@@ -0,0 +1,18 @@
+import { request } from '../utils/request'
+
+// districtGarden列表
+export function getDistrictGarden (parmas) {
+    return request({
+        url: `/agent/miniprogram/school`,
+        method: 'GET',
+        query: parmas
+    })
+}
+// 模糊搜索
+export function dimSearch (parmas) {
+    return request({
+        url: `/agent/miniprogram/school/name`,
+        method: 'GET',
+        query: parmas
+    })
+}

+ 10 - 0
src/api/home.js

@@ -0,0 +1,10 @@
+import { request } from '../utils/request'
+
+
+// 每日一赛开始前对是否玩过做一下判断
+export function getGarden ( ) {
+    return request({
+        url: `/agent`,
+        method: 'GET'
+    })
+}

+ 11 - 0
src/api/user.js

@@ -0,0 +1,11 @@
+import { request } from '../utils/request'
+
+
+// 每日一赛开始前对是否玩过做一下判断
+export function Login (data) {
+    return request({
+        url: `/agent/miniprogram/agent/login`,
+        method: 'POST',
+        query: data
+    })
+}

+ 64 - 0
src/components/CustomNavbar/index.vue

@@ -0,0 +1,64 @@
+<template>
+    <view class="CustomNavbar" >
+        <view class="empty" :style="{height: statusBarHeight + 2 +'px'}"></view>
+        <view class="Navbar" :style="{height: ( bounding.top - statusBarHeight ) * 2 + bounding.height + 'px'}">
+            <van-icon name="arrow-left" size="40rpx" class="arrow-left"  @click="jumpPage"/>
+            <view class="title">{{title}}</view>
+        </view>
+    </view>
+</template>
+
+<script>
+export default {
+    name: 'CustomNavbar',
+    props: {
+        title: {
+            type: String,
+            default: '这是一个标题'
+        }
+    },
+    computed: {
+        statusBarHeight () {
+     
+            return this.$store.state.systemInfo.statusBarHeight
+        },
+        bounding () {
+            return this.$store.state.bounding
+        }
+    },
+    methods: {
+        jumpPage () {
+          
+            uni.navigateBack({
+                delta: 1
+            })
+        }
+    }
+}
+</script>
+<style scoped lang="less">
+.CustomNavbar {
+    background-color: #fff;
+    width: 100%;
+    z-index: 10;
+    .empty {
+        width: 100%;
+    }
+    .Navbar {
+        display: flex;
+        align-items: center;
+        position: relative;
+        .arrow-left {
+            position: absolute;
+            left: 40rpx;
+        }
+        .title {
+            font-size: 36rpx;
+            font-weight:500;
+            position: absolute;
+            left: 50%;
+            transform: translateX(-50%);
+        }
+    }
+}
+</style>

+ 184 - 0
src/components/inviteCode/index.vue

@@ -0,0 +1,184 @@
+<template>
+    <view class="InviteCode">
+        <view class='poste_box' id='canvas-container'>
+             <canvas type="2d"  id="canvass" :style="{ width: '100vw', height:  667 * (systemInfo.windowWidth / 375) + 'px' }"></canvas>
+        </view>
+    </view>
+</template>
+
+<script>
+import {staticPicture } from '@/utils/global.js'
+import banner from '../../static/image/poster.jpg'
+import Tip from '@/utils/tip.js'
+export default {
+  name: 'InviteCode',
+  props: {
+      name: {
+          type: String,
+          default: '逻辑狗'
+      },
+      codeUrl: {
+          type: String,
+          required: true
+      }
+  },
+  computed: {
+      mulName () {
+          return this.name.length > 3 ? this.name.substr(0,3) + '...' : this.name
+      },
+      systemInfo () {
+          return this.$store.state.systemInfo
+      }
+  },
+   onReady () {
+       Tip.loading('生成邀请码中')
+      this.createPoster()
+  },
+  data () {
+      return {
+          staticPicture,
+          bgImg: '',
+          InviteCode: '',
+          imgUrl: '',
+          banner
+      }
+  },
+  methods: {
+    createPoster() {
+    
+    this.createSelectorQuery().select("#canvass").fields({
+            node: true,
+            size: true,
+    }).exec( (res => {
+
+        const { windowHeight, windowWidth }  = this.systemInfo
+         let rpx = windowWidth / 375
+      
+        const width = res[0].width;
+        const height = res[0].height;
+
+        const inviteCodeSite = {
+            x: windowWidth  / 2 - 90.5 * rpx,
+            y: height * 0.41
+        }
+
+        const nameSite = {
+            x: windowWidth * 0.3413,
+            y: height * 0.3088
+        }
+
+        const tipSite = {
+            x: windowWidth  / 2 - 90.5 * rpx ,
+            y: height * 0.92
+        }
+
+
+        const canvas = res[0].node;
+            const ctx = canvas.getContext("2d");
+            // 开始绘制        
+            const dpr = wx.getSystemInfoSync().pixelRatio;
+            canvas.width = width * dpr;
+            canvas.height = height * dpr;
+            ctx.scale(dpr, dpr);
+            
+            const bgImg = canvas.createImage()
+            const InviteCode = canvas.createImage()
+         
+            bgImg.onload = () => {
+                this.bgImg = bgImg
+              
+                ctx.drawImage( this.bgImg, 0, 0,  width ,  height);
+            }
+
+            InviteCode.onload = () => {
+                this.InviteCode = InviteCode
+                ctx.drawImage( this.InviteCode, inviteCodeSite.x, inviteCodeSite.y, 181 * rpx, 180 * rpx);
+            }
+           
+            bgImg.src = '/static/image/poster.jpg'
+                 // 画布背景
+            InviteCode.src = this.codeUrl
+            setTimeout( async () => {
+                // 邀请人
+                ctx.font = " 600 " + rpx  * 16 + "px" + " PingFangSC-Semibold, PingFang SC";
+                ctx.fillStyle = "#666";
+                
+                ctx.fillText(this.mulName + '邀请您开园', nameSite.x, nameSite.y);
+                // 提示
+
+                ctx.font = rpx * 12 + "px" + 'PingFangSC-Semibold, PingFang SC'
+                ctx.fillStyle = "#fff";
+        
+                ctx.fillText( '长按上图保存图片或发给好友', tipSite.x, tipSite.y);
+
+           
+                // 邀请码
+                const imgUrl = canvas.toDataURL()
+                this.imgUrl = imgUrl
+                Tip.loaded()
+
+                await Tip.success('生成成功')
+                
+                 wx.previewImage({
+                    current: imgUrl, // 当前显示图片的http链接
+                    urls: [imgUrl] // 需要预览的图片http链接列表
+                })
+                setTimeout(() => {
+                         this.$emit('inviteCodeOverlay')
+                }, 0)
+           
+            }, 1000)
+    }).bind(this))
+  }
+  }
+}
+</script>
+<style scoped lang="less">
+.InviteCode {
+    width: 100vw;
+    height: 100vh;
+    position: relative;
+    .bg-img {
+        width: 100%;
+        height: 100%;
+    }
+    .name {
+        position: absolute;
+        left: 35%;
+        top: 33.8%;
+        font-size: 36rpx;
+        font-family: PingFangSC-Semibold, PingFang SC;
+        font-weight: 600;
+        color: #666666;
+    }
+    .code-url {
+        width: 362rpx;
+        height: 360rpx;
+        image {
+            width: 100%;
+            height: 100%;
+        }
+    }
+    .code-url {
+        position: absolute;
+        z-index: 1;
+        left: 50%;
+        top: 55%;
+        transform: translate(-50%, -50%);
+    }
+}
+
+.poste_box {
+  width: 100%;
+  margin: auto;
+  position: fixed;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  overflow: hidden;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  opacity: 0;
+}
+</style>

+ 1 - 0
src/main.js

@@ -2,6 +2,7 @@ import Vue from 'vue'
 import App from './App'
 
 import store from './store/index.js'
+import filters from '@/filters'
 Vue.config.productionTip = false
 Vue.prototype.$store = store
 

+ 3 - 3
src/manifest.json

@@ -1,6 +1,6 @@
 {
-	"name": "",
-	"appid": "",
+	"name": "uni-template-wx",
+	"appid": "wxe57e116e4fe55532",
 	"description": "",
 	"versionName": "1.0.0",
 	"versionCode": "100",
@@ -54,7 +54,7 @@
 
 	},
 	"mp-weixin": { /* 微信小程序特有相关 */
-		"appid": "",
+		"appid": "wxe57e116e4fe55532",
 		"setting": {
 			"urlCheck": false
 		},

+ 60 - 4
src/pages.json

@@ -1,18 +1,74 @@
 {
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+		{
+			"path": "pages/user/index",
+			"style": {
+				"navigationBarTitleText": "代理商",
+				"disableScroll": true, // 禁止苹果手机滑动
+				"usingComponents":{
+					"van-button": "/wxcomponents/vant/dist/button/index",
+					"van-overlay": "/wxcomponents/vant/dist/overlay/index"
+				}
+			}
+		},
 		{
 			"path": "pages/index/index",
 			"style": {
-				"navigationBarTitleText": "uni-app"
+				"navigationBarTitleText": "代理商",
+				"disableScroll": true, // 禁止苹果手机滑动
+				"usingComponents":{
+					"van-button": "/wxcomponents/vant/dist/button/index"
+				}
+			}
+		},
+		{
+			"path": "pages/districtGarden/index",
+			"style": {
+				"navigationBarTitleText": "我的地区园所",
+				"disableScroll": true, // 禁止苹果手机滑动
+				"usingComponents":{
+					"van-button": "/wxcomponents/vant/dist/button/index",
+					"van-overlay": "/wxcomponents/vant/dist/overlay/index",
+					"van-grid": "/wxcomponents/vant/dist/grid/index",
+					"van-grid-item": "/wxcomponents/vant/dist/grid-item/index"
+				}
+			}
+		},
+		{
+			"path": "pages/audit/index",
+			"style": {
+				"navigationBarTitleText": "开园审核",
+				"disableScroll": true, // 禁止苹果手机滑动
+				"usingComponents":{
+					"van-button": "/wxcomponents/vant/dist/button/index",
+					"van-overlay": "/wxcomponents/vant/dist/overlay/index",
+					"van-grid": "/wxcomponents/vant/dist/grid/index",
+					"van-grid-item": "/wxcomponents/vant/dist/grid-item/index",
+					"van-tab": "/wxcomponents/vant/dist/tab/index",
+  					"van-tabs": "/wxcomponents/vant/dist/tabs/index"
+				}
+			}
+		},
+		{
+			"path": "pages/search/index",
+			"style": {
+				"navigationBarTitleText": "搜索园所",
+				"disableScroll": true, // 禁止苹果手机滑动
+				"usingComponents":{
+					"van-search": "/wxcomponents/vant/dist/search/index"
+				}
 			}
 		}
 	],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
-		"navigationBarTitleText": "uni-app",
+		"navigationBarTitleText": "代理商",
 		"navigationBarBackgroundColor": "#F8F8F8",
-		"backgroundColor": "#F8F8F8"
+		"backgroundColor": "#F8F8F8",
 		// 自定义导航栏
-		// "navigationStyle": "custom" 
+		"navigationStyle": "custom",
+		"usingComponents": {
+			"van-icon": "/wxcomponents/vant/dist/icon/index"
+		}
 	}
 }

+ 139 - 0
src/pages/audit/alreadyAudit.vue

@@ -0,0 +1,139 @@
+<template>
+    <view class="AlreadyAudit">
+        <scroll-view 
+     
+        class="scroll-view"
+        :style="{height: scrollViewHeight}"
+        :scroll-y="true" 
+        enhanced
+        paging-enabled
+        enable-back-to-top
+        refresher-enabled
+        :refresher-threshold="100"
+        :refresher-triggered="refresherStatus"
+        @scrolltolower="scrolltolower"
+        @refresherrefresh="onRefresh"
+        >
+        <!-- :style="{height: aa}" -->
+            <view class="AlreadyAudit-list" >
+                <view   
+                :style="{paddingBottom: index === total - 1  ? '200rpx' : '0rpx'}"
+                class="a" 
+                v-for="(item,index) in alreadyAuditData" 
+                :key="item.id" >
+                <a-card  :item="item">
+                    <view class="show-status">
+                        {{item.state === 1 ? '已通过' : '未通过'}} 
+                    </view>
+                </a-card>
+                </view>
+            </view>
+        </scroll-view>
+    </view>
+</template>
+
+<script>
+import Card from './card.vue'
+import { getalreadyAudit  } from '@/api/audit.js'
+import Tip from '@/utils/tip.js'
+export default {
+  name: 'AlreadyAudit',
+  components: {
+    ACard:  Card
+  },
+  props: {
+      height: Number
+  },
+  computed: {
+      scrollViewHeight  () {
+        return  this.$store.state.systemInfo.windowHeight - this.height - 44 + 'px'
+      }
+  },
+  onReady () {
+      this.getalreadyAudit()
+  },
+  data () {
+      return {
+          alreadyAuditData: [],
+          pegation: {
+              page: 1
+          },
+          total: 0,
+          refresherStatus: false,
+          _freshing: false
+      } 
+  },
+  methods: {
+
+    //   下拉刷新
+     onRefresh (item) {
+        // if (item.detail.dy < 45) return
+        if (this.__freshing) return
+        this._freshing = true
+        this.refresherStatus = true
+        this.pegation.page = 1
+        
+        setTimeout( async () => {
+             this.alreadyAuditData = []
+             await this.getalreadyAudit() 
+        }, 1000)
+    
+    },
+    //   上拉加载
+    scrolltolower () {
+        this.pegation.page ++ 
+        this.getalreadyAudit()
+   
+    },
+    //   获取已经审核的园所
+      async getalreadyAudit () {
+        const { data ,status}  = await getalreadyAudit({...this.pegation})
+        if (status === 200) {
+            this.refresherStatus = false
+            this.__freshing = false
+       
+            const {total, entityList} = data
+            if (entityList.length === 0) {
+              Tip.error('暂无内容')
+              return
+            }
+            this.total = total
+            this.alreadyAuditData.push(...Object.freeze(entityList))
+        }
+      }
+  }
+}
+</script>
+<style scoped lang="less">
+.AlreadyAudit {
+    height: 100%;
+    background-color: #F5F6FA;
+    .AlreadyAudit-list {
+        width: 100%;
+        // height: 1122rpx;
+        // padding-bottom: 400px;
+        // box-sizing: border-box;
+        .a {
+            background-color: #F5F6FA;
+            .show-status {
+                width: 120rpx;
+                height: 52rpx;
+                border-radius: 200rpx;
+                opacity: 0.5;
+                border: 2rpx solid #1677FF;
+                display: flex;
+                justify-content: center;
+                align-items: center;
+                font-size: 24rpx;
+                font-family: PingFangSC-Regular, PingFang SC;
+                font-weight: 400;
+                color: #1677FF;
+            }
+        }
+    }
+}
+
+.scroll-view {
+    height: 100vh;
+}
+</style>

+ 140 - 0
src/pages/audit/card.vue

@@ -0,0 +1,140 @@
+<template>
+    <view class="Card">
+        <view class="Card-item">
+            <view class="Card-item-time">
+                {{item.createTime}}
+            </view>
+            <view class="Card-item-card">
+                <view class="Card-item-card-top">
+                    <view class="Card-item-card-top-school">
+                        {{item.schoolName}}-园长
+                    </view>
+                    <!-- refuse or pass -->
+                    <view class="Card-item-card-top-audit">
+                        <view class="Card-item-card-top-audit-left">
+                            <image :src="item.schoolImg" />
+                            <text >{{item.principalName}}</text>
+                        </view>
+                        <view class="Card-item-card-top-audit-right">
+                            <slot>
+
+                            </slot>
+
+                        </view>
+                    </view>
+               
+                </view>
+                 <!-- line -->
+                <view class="line" />
+                <!-- 详细信息 -->
+                <view class="detail-message">
+                    <view class="school-adress">
+                        园所地址:{{item.address.address}}
+                    </view>
+                    <view class="phone">
+                        手机:{{item.phone}}
+                    </view>
+                    <view class="school-count">
+                        班级数量: {{item.classCount}}
+                    </view>
+                </view>
+            </view>
+        </view>
+    </view>
+</template>
+
+<script>
+export default {
+  name: 'Card',
+  computed: {
+      item1  () {
+          return 1
+      }
+  },
+  props: {
+      item: {
+          type: Object,
+          required: true
+      }
+  }
+}
+</script>
+<style scoped lang="less">
+.Card {
+    background: #F5F6FA;
+    &-item {
+        &-time {
+            height: 92rpx;
+            font-size: 24rpx;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #9C9AAB;
+            text-align: center;
+            line-height: 92rpx;
+        }
+        &-card {
+            width: 686rpx;
+            height: 362rpx;
+            background: #FFFFFF;
+            box-shadow: 0rpx 6rpx 20rpx 0rpx rgba(235, 235, 235, 0.5);
+            border-radius: 20rpx;
+            box-sizing: border-box;
+            margin: 0 auto;
+            &-top {
+                padding: 30rpx 28rpx 26rpx 26rpx;
+                box-sizing: border-box;
+                &-school {
+                    font-size: 24rpx;
+                    font-family: PingFangSC-Regular, PingFang SC;
+                    font-weight: 400;
+                    color: #9C9AAB;
+                    margin-bottom: 24rpx;
+                }
+                &-audit {
+                    display: flex;
+                    justify-content: space-between;
+                    align-items: center;
+                    &-left {
+                        display: flex;
+                        align-items: center;
+                        image {
+                            width: 40rpx;
+                            height: 40rpx;
+                            border-radius: 50%;
+                            margin-right: 16rpx;
+                            display: block;
+                            object-fit: cover;
+                        }
+                        text {
+                            font-size: 36rpx;
+                            font-family: PingFangSC-Medium, PingFang SC;
+                            font-weight: 500;
+                            color: #42516C;
+                        }
+                    }
+             
+                }
+
+            }
+            .line {
+                width: 100%;
+                height: 2rpx;
+                background: #F6F6F6;
+                margin-bottom: 26rpx;
+            }
+            .detail-message {
+                font-size: 28rpx;
+                font-family: PingFangSC-Regular, PingFang SC;
+                font-weight: 400;
+                color: #9C9AAB;
+                padding-left: 24rpx;
+                box-sizing: border-box;
+                .phone {
+                    margin-top: 18rpx;
+                    margin-bottom: 18rpx;
+                }
+            }
+        }
+    }
+}
+</style>

+ 115 - 0
src/pages/audit/index.vue

@@ -0,0 +1,115 @@
+<template>
+    <view class="Audit">
+        <custom-navbar title="开园审核" id="custom-navbar"/>
+        <view class="tabs">
+            <van-tabs 
+                swipeable 
+                animated 
+                :active="active" 
+                @change="onChange"
+                :border="false"
+                :lazy-render="false"
+                class="tabs-element"
+                >
+                <van-tab  title="待审核" :name="0"><NeedAudit v-if="active === 0" :height="height" /></van-tab>
+                <van-tab  title="已审核" :name="1"><AlreadyAudit v-if="active === 1"/></van-tab>
+            </van-tabs>
+            <view class="tabs-line">
+                <view class="tabs-line-item" :style="{left: mulTabsLineSite }">
+               
+                </view>
+            </view>
+
+            
+        </view>
+    </view>
+</template>
+
+<script>
+import CustomNavbar from '@/components/CustomNavbar'
+import NeedAudit from './needAudit'
+import AlreadyAudit from './alreadyAudit'
+import { getNodeInfo } from '@/utils/wxTool.js'
+export default {
+  name: 'Audit',
+  components: {
+      CustomNavbar,
+      NeedAudit,
+      AlreadyAudit
+  },
+  computed: {
+      activeTitle () {
+          return `color:  ${String(this.active)} == ${0} ? '#666666' : '#1677FF'`
+      },
+      mulTabsLineSite () {
+          const width = this.$store.state.systemInfo.windowWidth
+          const result = width / 2 / 2 - 10
+          return  this.active !== 0 ?  result * 3 + 20 + 'px' : result + 'px'
+      }
+  },
+  onLoad () {
+      this.getNodeInfo()
+  },
+  data () {
+      return {
+          active: 0,
+          height: ''
+      }
+  },
+  methods: {
+      onChange (item) {
+          this.active = item.target.name
+      },
+      async getNodeInfo () {
+        const res =  await getNodeInfo('#custom-navbar', 'single')
+    
+        this.height = res.height
+      }
+  }
+}
+</script>
+<style scoped lang="less">
+.Audit {
+    height: 100vh;
+    .tabs {
+        width: 100%;
+        height: 102rpx;
+        position: relative;
+        .tabs-line {
+            position: absolute;
+            bottom: 16rpx;
+            width: 100%;
+            height: 6px;
+            z-index: 1;
+            &-item {
+                width: 40rpx;
+                height: 6rpx;
+                background: #1677FF;
+                box-shadow: 0px 2px 12px 0px rgba(22, 119, 255, 0.43);
+                border-radius: 200px;
+                position: absolute;
+                transition: left .5s;
+            }
+        }
+
+    }
+}
+/deep/ .van-tabs__line {
+    display: none !important;
+}
+
+/deep/ .van-tabs__wrap {
+    height: 102rpx !important;
+}
+
+
+/deep/ .van-ellipsis {
+    font-size: 32rpx;
+    font-family: PingFangSC-Medium, PingFang SC;
+    font-weight: 500;
+}
+
+/deep/ .tabs-element .van-tab--active .van-ellipsis {
+  color: #1677FF;
+}
+</style>

+ 186 - 0
src/pages/audit/needAudit.vue

@@ -0,0 +1,186 @@
+<template>
+    <view class="NeedAudit">
+        <scroll-view
+          class="scroll-view"
+            :style="{height: scrollViewHeight}"
+            :scroll-y="true" 
+            enhanced
+            paging-enabled
+            enable-back-to-top
+            refresher-enabled
+            :refresher-threshold="100"
+            :refresher-triggered="refresherStatus"
+            @scrolltolower="scrolltolower"
+            @refresherrefresh="onPulling"
+          >
+            <view class="NeedAudit-list" >
+                <view   
+                :style="{paddingBottom: index === total - 1  ? '200rpx' : '0rpx'}"
+                class="a" 
+                v-for="(item,index) in needAuditData" 
+                :key="item.id" >
+                <a-card  :item="item">
+                    <view class="opration-btn">
+                        <view class="refuse" @click="passOrRefuseAudit(item.id,index, 2)">
+                            拒绝
+                        </view>
+                        <view class="pass"  @click="passOrRefuseAudit(item.id,index, 1)">
+                            通过
+                        </view> 
+                    </view>
+                </a-card>
+                </view>
+            
+            </view>
+         </scroll-view>
+    </view>
+</template>
+
+<script>
+import Card from './card.vue'
+import { getNeedAudit, passOrRefuseAudit } from '@/api/audit.js'
+import Tip from '@/utils/tip.js'
+import { setLocalStorage } from '@/utils/wxTool.js'
+export default {
+  name: 'NeedAudit',
+  components: {
+    ACard:  Card
+  },
+  props: {
+      height: Number
+  },
+  computed: {
+      scrollViewHeight () {
+        return  this.$store.state.systemInfo.windowHeight - this.height - 44 + 'px'
+      }
+  },
+  onReady () {
+      
+      this.getNeedAudit()
+  },
+  data () {
+      return {
+          needAuditData: [],
+          pegation: {
+              page: 1
+          },
+          total: 0,
+          refresherStatus: false,
+          _freshing: false
+      }
+  },
+  methods: {
+    //   确认or不通过审核
+    async passOrRefuseAudit (id, index, state) {
+      const result = await Tip.confirm(`确认${state === 1 ? '通过' : '拒绝'}?`)
+  
+      if (result) {
+          const { data, status } = await passOrRefuseAudit(id, state)
+            if (status === 200) {
+                this.passOrRefuseAuditList(index)
+                Tip.success(`已${state === 1 ? '通过' : '拒绝'}`)
+            }
+      } else {
+          Tip.success('已取消')
+      }
+      
+    },
+    // 通操作后的园所做数组操作
+    passOrRefuseAuditList (index) {
+        const { needAuditData } = this
+        this.needAuditData.splice(index, 1)
+        this.total = this.total - 1
+        this.mulResidueData()
+    },
+    // 操作本地储存的数据
+    mulResidueData () {
+      let userInfo = JSON.parse(this.$store.state.userInfo)
+   
+      userInfo.waitCheckSchoolCount = this.total
+      
+      setLocalStorage('userInfo', userInfo)
+    },
+    //   下拉刷新
+    onPulling (item) {
+        if (this._freshing) return
+        this.refresherStatus = true
+        this._freshing = true
+        this.pegation.page = 1
+        setTimeout( async () => {
+            this.needAuditData = []
+            await this.getNeedAudit()
+        }, 1000)
+    },
+        //   上拉加载
+    scrolltolower () {
+        this.pegation.page ++ 
+        this.getNeedAudit()
+    },
+    //   需要审核的列表
+    async getNeedAudit () {
+      const { data, status } = await getNeedAudit({...this.pegation})
+ 
+      if (status === 200) {
+          this.refresherStatus = false
+          this._freshing = false
+          const { total, entityList } = data
+            console.log(entityList, 'entityList');
+          if (entityList.length === 0) {
+              Tip.error('暂无内容')
+              return
+          }
+
+          this.total = total
+         
+          this.needAuditData.push(...Object.freeze(entityList))
+      }
+    }
+  }
+}
+</script>
+<style scoped lang="less">
+.NeedAudit {
+    height: 100%;
+    background-color: #F5F6FA;
+    .NeedAudit-list {
+        width: 100%;
+        // height: 1122rpx;
+        // padding-bottom: 400px;
+        // box-sizing: border-box;
+        .a {
+            background-color: #F5F6FA;
+        }
+    }
+}
+
+.opration-btn {
+    font-size: 24rpx;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    .refuse {
+        width: 120rpx;
+        height: 52rpx;
+        border-radius: 200rpx;
+        border: 2rpx solid #1677FF;
+        color: #1677FF;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+    }
+    .pass {
+        width: 120rpx;
+        height: 52rpx;
+        background: #1677FF;
+        box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(22, 119, 255, 0.63);
+        border-radius: 200rpx;
+        color: #FFFFFF;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        margin-left: 40rpx;
+    }
+}
+</style>

+ 279 - 0
src/pages/districtGarden/index.vue

@@ -0,0 +1,279 @@
+<template>
+    <view class="DistrictGarden">
+        <custom-navbar title="我的地区园所" id="custom-navbar"/>
+        <!-- search -->
+        <view class="search">
+            <view class="search-btn" @click="jumpSearchPage">
+                搜索园所名称/园长姓名
+            </view>
+        </view>
+        <!-- 园所列表 -->
+          <!-- refresher-enabled -->
+        <scroll-view 
+            :scroll-y="true" 
+            class="scroll-view"
+            :style="{height: scrollViewHeight}"
+            enhanced
+            paging-enabled
+            enable-back-to-top
+            @scrolltolower="scrolltolower"
+            >
+            <view class="garden-list">
+                <view class="garden-list-item" v-for="item in districtGardenData" :key="item.id">
+                    <view class="garden-list-item-time">
+                        开园时间: {{item.createTime}}
+                    </view>
+                    <view class="garden-list-item-card">
+                        <view class="garden-list-item-card-top">
+                            <view class="garden-list-item-card-top-label">
+                                <text>{{item.schoolName.length > 7 ? item.schoolName.substr(0, 7) + '...': item.schoolName}}</text>
+                                <view class="rect">
+                                    {{item.principalName.length > 5 ? item.principalName.substr(0, 5)+ '...' : item.principalName }}
+                                </view>
+                            </view>
+                            <view class="garden-list-item-card-top-city">
+                                {{item.address.address}}
+                            </view>
+                        </view>
+                        <view class="line" />
+                        <van-grid column-num="2" :border="false" class="grid"  :center="false">
+                            <van-grid-item use-slot >
+                               班级数量: {{item.classCount}}
+                            </van-grid-item>
+                            <van-grid-item use-slot >
+                                教职工数量:{{item.teachUserCount}}
+                            </van-grid-item>
+                            <van-grid-item use-slot >
+                                学生数量:{{item.studentCount}}
+                            </van-grid-item>
+                            <van-grid-item use-slot >
+                                手机:{{item.phone}}
+                            </van-grid-item>
+                        </van-grid>
+                    </view>
+                </view>
+            </view>
+        </scroll-view>
+    </view>
+</template>
+
+<script>
+import CustomNavbar from '@/components/CustomNavbar'
+import { getNodeInfo } from '@/utils/wxTool.js'
+import { getDistrictGarden } from '@/api/districtGarden.js'
+import Tip from '@/utils/tip.js'
+const districtGardenData = Object.freeze([
+    {
+        id: 1,
+        createTime: '2020-09-09',
+        name: '流程帅哥21321',
+        label: '中德智慧幼儿圆',
+        city: '河北省唐山市朝阳区似的县',
+        classCount: 10,
+        staffCount: 20,
+        studentCount: 30,
+        phone: 18811361102
+    },
+    {
+        id: 2,
+        createTime: '2020-09-09',
+        name: '流程帅哥',
+        label: '中德智慧幼儿圆',
+        city: '河北省唐山市朝阳区似的县',
+        classCount: 10,
+        staffCount: 20,
+        studentCount: 30,
+        phone: 18811361102
+    },
+    {
+        id: 3,
+        createTime: '2020-09-09',
+        name: '流程帅哥',
+        label: '中德智慧幼儿圆',
+        city: '河北省唐山市朝阳区似的县',
+        classCount: 10,
+        staffCount: 20,
+        studentCount: 30,
+        phone: 18811361102
+    },
+])
+export default {
+  name: 'DistrictGarden',
+  components: {
+      CustomNavbar
+  },
+  computed: {
+    scrollViewHeight  () {
+      return  this.$store.state.systemInfo.windowHeight - this.height - 44 + 'px'
+    }
+  },
+  onLoad (options) {
+      this.getNodeInfo()
+    
+      const { name } = options
+     
+        if (name) {
+          this.pegation.name = name
+        }
+          this.getDistrictGarden()
+  },
+  data () {
+      return {
+          districtGardenData: [],
+          height: '',
+          pegation: {
+              page: 1,
+              name: ''
+          }
+      }
+  },
+  methods: {
+      scrolltolower (item) {
+          this.pegation.page ++
+          this.getDistrictGarden()
+      },
+    //   getDistrictGarden数据
+    async getDistrictGarden () {
+        const {data, status} = await getDistrictGarden({...this.pegation})
+        if (status === 200) {
+            const { entityList} = data
+            if (entityList.length === 0) {
+                Tip.error('没有更多啦!!!')
+                return
+            }
+            this.districtGardenData.push(...Object.freeze(entityList))
+        }
+    },
+    // 跳转到search页面
+    jumpSearchPage () {
+        uni.redirectTo({
+            url: '/pages/search/index'
+        })
+    },
+    //  获取节点高度
+    async getNodeInfo () {
+      const res =  await getNodeInfo('#custom-navbar', 'single')
+    
+      this.height = res.height
+    }
+  }
+}
+</script>
+<style scoped lang="less">
+.DistrictGarden {
+    height: 100vh;
+    background: #F5F6FA;
+    .search {
+        width: 100%;
+        height: 102rpx;
+        background-color: #fff;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        &-btn {
+            width: 670rpx;
+            height: 70rpx;
+            background: #F7F7F7;
+            border-radius: 35rpx;
+            margin: 0 auto;
+            padding-left: 36rpx;
+            box-sizing: border-box;
+            font-size: 28rpx;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #999999;
+            line-height: 70rpx;
+        }
+    }
+    // 园所列表
+    .garden-list {
+         width: 686rpx;
+         margin: 0 auto;
+        &-item {
+      
+            &-time {
+                font-size: 24rpx;
+                font-family: PingFangSC-Regular, PingFang SC;
+                font-weight: 400;
+                color: #9C9AAB;
+                height: 92rpx;
+                width: 100%;
+                text-align: center;
+                line-height: 92rpx;
+            }
+            &-card {
+                width: 686rpx;
+                background: #FFFFFF;
+                box-shadow: 0rpx 6rpx 20rpx 0rpx rgba(235, 235, 235, 0.5);
+                border-radius: 20rpx;
+                position: relative;
+                &-top {
+                    padding: 32rpx 0rpx 32rpx 24rpx;
+                    &-label {
+                        display: flex;
+                        align-items: center;
+                        text {
+                            font-size: 36rpx;
+                            font-family: PingFangSC-Medium, PingFang SC;
+                            font-weight: 500;
+                            color: #42516C;
+                            margin-right: 34rpx;
+                        }
+                        .rect {
+                            // width: 122rpx;
+                            height: 38rpx;
+                            background-color: #1677FF;
+                            text-align:center;
+                            transform: skewX(-15deg);
+                            -webkit-transform:skewX(-15deg);  /*兼容-webkit-引擎浏览器*/
+                            -moz-transform:skewX(-15deg);/*兼容-moz-引擎浏览器*/
+                            font-size: 28rpx;
+                            font-family: PingFangSC-Regular, PingFang SC;
+                            font-weight: 400;
+                            color: #FFFFFF;
+                            border-radius: 10rpx;
+                            padding: 0rpx 18rpx;
+                            box-sizing: border-box;
+                        }
+                    }
+                    &-city {
+                        margin-top: 14rpx;
+                        font-size: 24rpx;
+                        font-family: PingFangSC-Regular, PingFang SC;
+                        font-weight: 400;
+                        color: #9C9AAB;
+                    }
+                }
+                .line {
+                    width: 100%;
+                    height: 2rpx;
+                    background: #F6F6F6;
+                    // position: absolute;
+                    // top: 50%;
+                    // transform: translateY(-50%);
+                }
+                .grid {
+                    font-size: 28rpx;
+                    font-family: PingFangSC-Regular, PingFang SC;
+                    font-weight: 400;
+                    color: #42516C;
+                    box-sizing: border-box;
+                    /deep/ .van-grid-item__content {
+                        padding-left: 24rpx;
+                    }
+                }
+            }
+        }
+        &-item:last-child {
+            padding-bottom: 200rpx;
+        }
+    }
+}
+
+.scroll-view {
+    
+    // -webkit-overflow-scrolling: touch;
+}
+
+
+</style>

+ 199 - 41
src/pages/index/index.vue

@@ -1,49 +1,207 @@
 <template>
-	<view class="content">
-		<image class="logo" src="/static/logo.png"></image>
-		<view>
-			<text class="title">{{title}}</text>
-		</view>
-	</view>
+    <view class="Home">
+        <div class="Home-overlay"> </div> 
+        <div class="home-content">
+            <view class="empty" :style="{height: statusBarHeight + 2 +'px'}"/>
+            <view class="title">
+                中德智慧教育 <br/> 
+                全球儿童思维教育专家
+            </view>
+            <view class="line"/>
+            <view class="clause">
+                <view class="clause-first">
+                    内部系统,我们需要您授权以下信息
+                </view>
+                <view class="clause-seconed">
+                    <view class="dot" />
+                    获取您的公开信息(昵称、头像等)
+                </view>
+            </view>
+            <button class="auth-btn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
+                授权登录
+            </button>
+
+            <view class="rule">
+                仅限中德智慧内部代理商使用
+            </view>
+ 
+        </div>
+        <view class="logo">
+            <image :src="staticPicture.logo" mode="aspectFit"/>
+        </view>
+           
+    </view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				title: 'Hello'
-			}
-		},
-		onLoad() {
-
+import { Login } from '@/api/user.js'
+import { setLocalStorage } from '@/utils/wxTool.js'
+import { staticPicture }  from '@/utils/global.js'
+export default {
+    name: 'Home',
+    computed: {
+        statusBarHeight () {
+            return this.$store.state.systemInfo.statusBarHeight
 		},
-		methods: {
+    },
+    onReady () {
 
-		}
-	}
+        this.wxLogin()
+    },
+    data () {
+        return {
+            code: '',
+            staticPicture
+        }
+    },
+    methods: {
+        //  wx.login 
+        async wxLogin () {
+         
+            const res = await wx.login()
+            console.log(res);
+            const { code } = res
+            if (code) {
+                this.code = code
+            }
+            
+        },
+        //获取手机号 
+        getPhoneNumber (e) {
+            console.log(e);
+            const { encryptedData, iv} = e.detail
+           
+            this.Login(encryptedData, iv)
+        },
+        // 用户登录
+        async Login (encryptedData, iv) {
+           
+          const {data, status} =  await Login({encryptedData, iv, code: this.code})
+          console.log(data, '用户登录');
+          if (status === 200) {
+              console.log(  this.code, '  this.code');
+             
+                setLocalStorage('token', data.token)
+                this.$store.commit('set_userInfo', data)
+            
+                uni.redirectTo({
+                    url: '/pages/user/index'
+                })
+          } else {
+            this.code = ''
+            this.wxLogin()
+          }
+        }
+    }
+}
 </script>
+<style scoped lang="less">
+
+.Home {
+    width: 100vw;
+    height: 100vh;
+    background-color: #CFD0DE;
+    // background: rgba(38, 38, 58, 0.8);
+    padding: 12% 6% 34%;
+    box-sizing: border-box;
+    position: relative;
+    .Home-overlay {
+        position: absolute;
+        top: 0;
+        left: 0;
+        right: 0;
+        bottom: 0;
+        background: rgba(38, 38, 58, 0.8);
+        z-index: 3;
+    }
+
+    .home-content {
+        position: absolute;
+        z-index: 4;
+    }
+    .title {
+        width: 600rpx;
+        height: 160rpx;
+        font-size: 60rpx;
+        font-family: PingFangSC-Medium, PingFang SC;
+        font-weight: 500;
+        color: #FFFFFF;
+        line-height: 80rpx;
+        margin-bottom: 48rpx;
+    }
+    .line {
+        width: 100rpx;
+        height: 8rpx;
+        background-color: #44CEB6;
+        margin-bottom: 186rpx;
+    }
+    .clause {
+        margin-bottom: 84rpx;
+        .clause-first {
+            font-size: 32rpx;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #FFFFFF;
+        }
+        .clause-seconed {
+            margin-top: 16rpx;
+            font-size: 32rpx;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: rgba(255, 255, 255, 0.8);
+            display: flex;
+            align-items: center;
+            .dot {
+                width: 8rpx;
+                height: 8rpx;
+                border-radius: 50%;
+                background-color: #fff;
+                margin-right: 20rpx;
+            }
+        }
+    }
+
+    .auth-btn {
+        width: 656rpx;
+        height: 96rpx;
+        background: #1677FF;
+        border-radius: 200rpx;
+        font-size: 32rpx;
+        font-family: PingFangSC-Medium, PingFang SC;
+        font-weight: 500;
+        color: #FFFFFF;
+        margin-left: -0%;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+    }
+
+    .rule {
+        width: 100%;
+        text-align: center;
+        font-size: 24rpx;
+        font-family: PingFangSC-Regular, PingFang SC;
+        font-weight: 400;
+        color: rgba(255, 255, 255, 0.8);
+        text-align: center;
+        margin-top: 20rpx;
+        margin-bottom: 98rpx;
+    }
 
-<style>
-	.content {
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.logo {
-		height: 200rpx;
-		width: 200rpx;
-		margin: 200rpx auto 50rpx auto;
-	}
-
-	.text-area {
-		display: flex;
-		justify-content: center;
-	}
-
-	.title {
-		font-size: 36rpx;
-		color: #8f8f94;
-	}
-</style>
+    .logo {
+        width: 100%;
+        height: 266rpx;
+        margin-left: -53rpx;
+        position: fixed;
+        bottom: 12%;
+        z-index: 1;
+        image {
+            width: 42.96%;
+            height: 100%;
+            object-fit: cover;
+            display: block;
+            margin: 0 auto;
+        }
+    }
+}
+</style>

+ 137 - 0
src/pages/search/index.vue

@@ -0,0 +1,137 @@
+<template>
+    <view class="Search">
+          <custom-navbar title="搜索园所" id="custom-navbar"/>
+          <view class="search-btn">
+             <van-search
+                show-action
+                shape="round"
+                :value="value"
+                :focus="true"
+                placeholder="请输入园所关键词"
+                @search="search"
+                @change="changeValue"
+                @cancel="cancelSearch"
+            />
+          </view>
+         
+          <view class="search-list">
+              <view class="search-list-item" @click="searchSchool(item)" v-for="item in searchList" :key="item.id">
+                <text 
+                    v-for="(ele,index) in item.labelList" 
+                    :key="index"
+                    :style="{color: value.includes(ele) ? '#42516C' : ''}"
+                    >
+                        {{ele}}
+                </text>
+              </view>
+          </view>
+    </view>
+</template>
+
+<script>
+import CustomNavbar from '@/components/CustomNavbar'
+import { dimSearch } from '@/api/districtGarden.js'
+import Tip from '@/utils/tip.js'
+
+export default {
+  name: 'Search',
+  components: {
+      CustomNavbar
+  },
+  computed: {
+      searchList () {
+          if (this.value === '') return []
+          const result = this.searchResult.filter( item => {
+           
+              item.labelList = item.schoolName.split('')
+            return item.schoolName.includes(this.value)
+          })
+          return result
+      }
+  },
+  
+  data () {
+      return {
+          value: '',
+          searchResult: []
+      }
+  },
+  methods: {
+    //   查询对应搜索结果
+    searchSchool (item) {
+      
+        uni.redirectTo({
+            url: `/pages/districtGarden/index?name=${item}`
+        })
+    },
+    //  搜索
+      async dimSearch (schoolName) {
+        const { data, status } = await dimSearch({schoolName})
+        if (status === 200) {
+            if (data.length === 0) {
+                Tip.error('没有搜索到园所')
+                return 
+            }
+            this.searchResult = Object.freeze(data)
+        }
+      },
+      search (e) {
+        this.searchSchool(e.detail)
+      },
+      cancelSearch () {
+          uni.navigateBack({
+            delta: 1
+          })
+      },
+      changeValue(e) {
+        if (e.detail.length === 0) {
+            return
+        }
+        this.dimSearch(e.detail) 
+          this.value = e.detail
+      }
+  }
+}
+</script>
+<style scoped lang="less">
+.Search {
+    height: 100vh;
+    background: #F5F6FA;
+}
+.search-list {
+    margin-top: 10rpx;
+    background-color: #fff;
+    padding: 0 32rpx;
+    &-item {
+        height: 92rpx;
+        display: flex;
+        justify-content: flex-start;
+        align-items: center;
+        border-bottom: 2rpx solid #F6F6F6;
+        font-size: 28rpx;
+        font-family: PingFangSC-Medium, PingFang SC;
+        font-weight: 500;
+        color: #9C9AAB;
+        box-sizing: border-box;
+    }
+}
+
+.search-btn {
+    width: 100%;
+    height: 102rpx;
+    box-shadow: 0rpx 6rpx 88rpx 0rpx rgba(0, 0, 0, 0.04);
+   
+}
+
+/deep/ .van-icon-search {
+    display: none;
+}
+/deep/ .van-search__action {
+    font-size: 28rpx;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #999999;
+}
+
+
+</style>

+ 474 - 0
src/pages/user/index.vue

@@ -0,0 +1,474 @@
+<template>
+	<!-- <Login v-if="" /> -->
+	<view class="Content" >
+		<!-- 个人信息 -->
+		<view class="user">
+			<view class="empty" :style="{height: statusBarHeight + 2 +'px'}"/>
+			<image class="rect" :src="staticPicture.rect" mode="aspectFill" />
+			<view class="user-info">
+				<view class="user-left">
+					<!-- <img :src="userInfo.headImg" alt=""> -->
+					<view class="user-left-userAvatarUrl">
+						<open-data type="userAvatarUrl"></open-data>
+					</view>
+					
+				</view>
+				<view class="user-right">
+					<view class="user-name">
+						{{userInfo.name || '代理商'}}
+					</view>
+					<view class="user-identity">
+						代理商
+					</view>
+				</view>
+			</view>
+			<!-- 园所信息 -->
+			<view class="school">
+				<view class="school-new">
+					<view class="school-new-count">{{userInfo.increaseSchoolCount || 0}}</view>
+					<view>今日新增开园(个)</view>
+				</view>
+				<view class="line">
+					
+				</view>
+				<view class="school-all">
+					<view class="school-all-count">{{userInfo.totalSchoolCount || 0}}</view>
+					<view>全部园所(个)</view>
+				</view>
+			</view>
+		</view>
+		<!-- 开园审核 -->
+		<view class="audit">
+			<!-- 开园审核数目 -->
+			<view class="audit-count" @click="jumpStartSchoolAudit">
+				<view class="audit-count-left">
+					开园审核
+				</view>
+				<view class="audit-count-right">
+					<view class="audit-count-right-count" v-if="waitCheckSchoolCount !== 0"> 
+						{{userInfo.waitCheckSchoolCount > 99 ? '99+' :  waitCheckSchoolCount  }}
+					</view>
+					<van-icon name="arrow" color="#1677FF"/>
+				</view>
+			</view>
+			<!-- 邀请码与地区园所 -->
+			<view class="inviteCode-school">
+				<view class="inviteCode-school-list">
+					<view class="inviteCode-school-list-item" @click="hanlderInviteCodeWithSchool(item)" v-for="item in inviteCodeWithSchool" :key="item.id">
+						<view class="inviteCode-school-list-item-left">
+							<view class="inviteCode-school-list-item-left-label">
+								<image 
+									:style="{width: item.id === 1 ? '220rpx' : '266rpx'}" 
+									class="invite-code" 
+									:src="item.label" 
+									mode="aspectFit" 
+								/>
+								<van-icon name="arrow"  custom-style="color: #B0B9C0; font-weight: bold; opacity: .4;" />
+							</view>
+							<text class="inviteCode-school-list-item-left-desc">
+							
+								<text>{{item.desc}}</text>
+							</text>
+						</view>
+						<view class="inviteCode-school-list-item-right">
+							<image :src="item.imgUrl" mode="aspectFit" />
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 邀请码弹出层 -->
+		<!-- class="overlay" -->
+		<view  class="overlay" v-show="inviteCodeOverlay" @click="inviteCodeOverlay = false" >
+			<invite-code  @inviteCodeOverlay="inviteCodeOverlay = false" v-if="inviteCodeOverlay"  :name="userInfo.name" :codeUrl="userInfo.inviteQRCode"/>
+		</view >
+	</view>
+</template>
+
+<script>
+import { getGarden } from '@/api/home.js'
+import { CustomNavbar } from '@/components/CustomNavbar'
+import { staticPicture } from '@/utils/global.js'
+import { setLocalStorage, getLocalStorage } from '@/utils/wxTool.js'
+import { waitCheckCount } from '@/api/audit'
+import InviteCode from '@/components/inviteCode'
+import Tip from '@/utils/tip.js'
+import Login from '@/pages/index/index'
+const inviteCodeWithSchool = Object.freeze([
+	{
+		id: 1,
+		label: staticPicture.inviteCode,
+		desc: 'MY INVITATION CODE',
+		imgUrl: staticPicture.codeBg
+	},
+	{
+		id: 2,
+		label: staticPicture.school,
+		desc: 'MY REGIONAL GARDEN OFFICE',
+		imgUrl:  staticPicture.schoolBg
+	}
+])
+export default {
+	name: 'Content',
+	components: {
+		CustomNavbar,
+		InviteCode,
+		Login
+	},
+	computed: {
+		statusBarHeight () {
+            return this.$store.state.systemInfo.statusBarHeight
+		},
+	},
+	onLoad () {
+
+	},
+	onReady() {
+	
+	},
+	onShow () {
+		this.waitCheckCount()
+		if (uni.getStorageSync('userInfo')) {
+			this.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
+		}
+	
+	},
+	data() {
+		return {
+			staticPicture,
+			inviteCodeWithSchool, // 邀请码与地区园所
+			inviteCodeOverlay: false,
+			userInfo: {},	
+			waitCheckSchoolCount: 0
+		}
+	},
+	methods: {
+		// 获取园所审核数量
+		async waitCheckCount () {
+			const {data, status} = await waitCheckCount()
+			console.log(data, status);
+			if (status === 200) {
+				this.waitCheckSchoolCount = data
+			}
+		},
+		// 跳转开园审核
+		jumpStartSchoolAudit () {
+			uni.navigateTo({
+				url: '/pages/audit/index'
+			})
+		},
+		// 点击邀请码与地区园所
+		hanlderInviteCodeWithSchool (item) {
+		
+			const { id } = item
+			if (id === 1) {
+				this.idIsOne()
+			} else {
+				this.idNoOne()
+			}
+		},
+		// 点击邀请码与地区园所 如果id === 1
+		idIsOne () {
+			
+				this.inviteCodeOverlay = true
+			setTimeout( () => {
+				
+			
+			}, 1000)
+			
+		},
+		// 点击邀请码与地区园所 id !== 1
+		idNoOne () {
+			uni.navigateTo({
+				url: '/pages/districtGarden/index'
+			})
+		},
+	}
+}
+</script>
+
+<style lang="less" scoped>
+.Content {
+	.user {
+		width: 100%;
+		height: 625rpx;
+		padding: 72rpx 32rpx;
+		box-sizing: border-box;
+
+		position: relative;
+		.rect {
+			width: 100%;
+			height: 625rpx;
+			position: absolute;
+			top: 0;
+			left: 0;
+			right: 0;
+			bottom: 0;
+			z-index: -1;
+		}
+		.user-info {
+		
+			display: flex;
+
+			.user-left {
+				width: 140rpx;
+				height: 140rpx;
+				border-radius: 50%;
+				overflow: hidden;
+				border: 2rpx solid rgba(255, 255, 255, .5);
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				.user-left-userAvatarUrl {
+					width: 120rpx;
+					height: 120rpx;
+					border-radius: 50%;
+					overflow: hidden;
+				}
+			}
+			.user-right {
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+			
+				padding: 14rpx 0px 22rpx;
+				margin-left: 9px;
+				box-sizing: border-box;
+				.user-name {
+					font-size: 40rpx;
+					font-family: PingFangSC-Semibold, PingFang SC;
+					font-weight: 600;
+					color: #FFFFFF;
+				}
+				.user-identity {
+					width: 132rpx;
+					height: 40rpx;
+					background: rgba(255, 255, 255, 0.6);
+					border-radius: 20rpx;
+					font-size: 28rpx;
+					font-family: PingFangSC-Light, PingFang SC;
+					font-weight: 300;
+					color: #FFFFFF;
+					display: flex;
+					justify-content: center;
+					align-items: center;
+				}
+			}
+		}
+		.school {
+			color: rgba(255, 255, 255, 0.8);
+			font-size: 24rpx;
+			font-family: PingFangSC-Medium, PingFang SC;
+			font-weight: 400;
+			display: flex;
+			align-items: center;
+			margin-top: 34rpx;
+			
+			.line {
+				width: 2rpx;
+				height: 60rpx;
+				background-color: #fff;
+				margin-left: 144rpx;
+				margin-right: 42rpx;
+				opacity: .1;
+			}
+			&-new {
+				
+				&-count {
+					font-size: 52rpx;
+					// font-weight: 600;
+					margin-bottom: 10rpx;
+					color: #FFFFFF;
+					line-height: 60rpx;
+					text-shadow: 0rpx 4rpx 8rpx #0028F0;
+				}
+			}
+			&-all {
+			
+				&-count {
+					font-size: 52rpx;
+					// font-weight: 600;
+					color: #FFFFFF;
+					line-height: 60rpx;
+					text-shadow: 0rpx 4rpx 8rpx #0028F0;
+				}
+			}
+		}
+	}
+	.audit {
+		width: 100%;
+		height: 1142rpx;
+		
+		background: linear-gradient(180deg, #FFFFFF 0%, #F2F4FF 100%);
+		border-radius: 88rpx 88rpx 0px 0px;
+		margin-top: -120rpx;
+		padding: 52rpx 28rpx 0rpx;
+		box-sizing: border-box;
+		position: relative;
+		z-index: 1;
+		.audit-count {
+			width: 694rpx;
+			height: 100rpx;
+			background: #F2F4FF;
+			border-radius: 200rpx;
+			padding: 30rpx 44rpx 30rpx 46rpx;
+			box-sizing: border-box;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			&-left {
+				font-size: 28rpx;
+				font-family: PingFangSC-Medium, PingFang SC;
+				font-weight: 500;
+				color: #1677FF;
+			}
+			&-right {
+				display: flex;
+			
+				justify-content: space-between;
+				align-items: center;
+				&-count {
+					display: flex;
+					justify-content: center;
+					align-items: center;
+					width: 60rpx;
+					height: 36rpx;
+					background: #FF1226;
+					border-radius: 20rpx;
+					font-size: 24rpx;
+					font-family: PingFangSC-Regular, PingFang SC;
+					font-weight: 400;
+					color: #FFFFFF;
+					/deep/ .van-icon-arrow {
+						display: block;
+					}
+				}
+			}
+		}
+		// 邀请码与地区园所
+		.inviteCode-school {
+			margin-top: 58rpx;
+			&-list {
+				&-item {
+					width: 694rpx;
+					height: 200rpx;
+					background: #FFFFFF;
+					box-shadow: 0rpx 6rpx 16rpx 0rpx rgba(184, 184, 184, 0.27);
+					border-radius: 60rpx;
+					margin-bottom: 28rpx;
+					padding: 44rpx 34rpx 30rpx 46rpx;
+					box-sizing: border-box;
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					&-left {
+						&-label {
+							text {
+								font-size: 48rpx;
+								font-family: "Helvetica Neue",Helvetica,Arial,"Microsoft Yahei","Hiragino Sans GB","Heiti SC","WenQuanYi Micro Hei",sans-serif;;
+								color: #3B4C6E;
+								margin-right: 32rpx;
+							}
+						}
+						&-desc {
+							width: 210rpx;
+							height: 28rpx;
+							font-size: 20rpx;
+							font-family: PingFangSC-Regular, PingFang SC;
+							font-weight: 400;
+							color: rgba(59, 76, 110, 0.5);
+						}
+						
+					}
+					&-right {
+						height: 183rpx;
+						width: 180rpx;
+						image {
+							width: 100%;
+							height: 100%;
+						}
+					}
+				}
+			}
+		}
+
+	}
+}
+
+
+// 邀请码弹出层
+.inviteCode-wrapper {
+	width: 652rpx;
+	height: 890rpx;
+	background: #FFFFFF;
+	border-radius: 40rpx;
+	position: fixed;
+	top: 50%;
+	left: 50%;
+	transform: translate(-50%, -50%);
+	z-index: 2;
+	&-header {
+		width: 652rpx;
+		height: 246rpx;
+		background: url('../../static/image/invitePop.png')  no-repeat;
+		background-size: 100% 100%;
+		padding-top: 34rpx;
+		box-sizing: border-box;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		&-teacher {
+			font-size: 28rpx;
+			font-family: PingFangSC-Medium, PingFang SC;
+			font-weight: 500;
+			color: #9C9AAB;
+			margin-bottom: 12rpx;
+		}
+		&-company {
+			font-size: 52rpx;
+			font-family: PingFangSC-Semibold, PingFang SC;
+			font-weight: 600;
+			color: #666666;
+		}
+	}
+	&-qrcode {
+		width: 362rpx;
+		height: 360rpx;
+		margin: 0 auto;
+		text-align: center;
+		image {
+			width: 100%;
+			height: 100%;
+			margin-bottom: 40rpx;
+		}
+		&-tip {
+			font-size: 28rpx;
+			font-family: PingFangSC-Regular, PingFang SC;
+			font-weight: 400;
+			color: #9C9AAB;
+		}
+	}
+	/deep/ .van-icon-close {
+		position: absolute;
+		bottom: -88rpx;
+		left: 50%;
+		transform: translateX(-50%);
+		opacity: .9;
+	}
+}
+.overlay {
+	position: absolute;
+	top: 0;
+	left: 0;
+	right: 0;
+	bottom: 0;
+	background-color: rgba(73, 73, 76, .9);
+	z-index: 2;
+}
+
+.invite-code {
+	width: 220rpx;
+	height: 38rpx;
+	margin-right: 44rpx;
+}
+</style>

BIN
src/static/image/codeBg.png


BIN
src/static/image/inviteCode.png


BIN
src/static/image/invitePop.png


BIN
src/static/image/logo.png


BIN
src/static/image/poster.jpg


BIN
src/static/image/rect.png


BIN
src/static/image/school.png


BIN
src/static/image/schoolBg.png


BIN
src/static/logo.png


+ 38 - 0
src/store/index.js

@@ -0,0 +1,38 @@
+import Vue from 'vue'
+import Vuex from 'vuex'
+
+import { setLocalStorage, getLocalStorage } from '@/utils/wxTool.js'
+// const userInfo = uni.getStorageSync('userInfo')
+// const userInfoJson = JSON.parse(userInfo)
+
+
+
+Vue.use(Vuex)
+
+const store = new Vuex.Store({
+    state: {
+        // 屏幕信息
+        systemInfo: {},
+        // 胶囊信息
+        bounding: {},
+        // 用户信息
+        // userInfo: JSON.parse(uni.getStorageSync('userInfo')) || {}
+        userInfo:  uni.getStorageSync('userInfo') || {}
+    },
+    mutations: {
+        set_systemInfo (state, data) {
+            state.systemInfo = data
+            setLocalStorage('systemInfo', state.systemInfo)
+        },
+        set_bounding(state, data) {
+            state.bounding = data
+            setLocalStorage('bounding', state.bounding)
+        },
+        set_userInfo(state, data) {
+            state.userInfo = data
+            setLocalStorage('userInfo', state.userInfo)
+        }
+    }
+})
+
+export default store

+ 1 - 1
src/utils/config.js

@@ -3,7 +3,7 @@ let BASEURL = ""
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
 
-    // BASEURL = 'http://127.0.0.1:38092'
+    BASEURL = 'https://api.zaojiao.net'
 }else{
     // 生产环境
     // BASEURL = 'http://127.0.0.1:38092'

+ 10 - 0
src/utils/global.js

@@ -0,0 +1,10 @@
+export const staticPicture = Object.freeze({
+    invitePop: require('@/static/image/invitePop.png'),   
+    poster: require('@/static/image/poster.jpg'),   
+    codeBg: require('@/static/image/codeBg.png'),  
+    inviteCode: require('@/static/image/inviteCode.png'),  
+    rect: require('@/static/image/rect.png'),  
+    school: require('@/static/image/school.png'),  
+    schoolBg: require('@/static/image/schoolBg.png'),
+    logo: require('@/static/image/logo.png'),
+})

+ 15 - 2
src/utils/request.js

@@ -20,10 +20,23 @@ const request = async(params = {}) => {
         }
     })
     Tip.loaded();
-    console.log(res);
 
 
-  return res[1];
+    const response = res[1]
+
+  
+
+    const result = response.data
+    if (result.status === 401) {
+      Tip.error(result.msg)
+      uni.redirectTo({
+          url: '/pages/index/index'
+      })
+    }
+    if (result.status === 500) {
+      Tip.error(result.msg)
+    }
+  return result;
 
 
 }

+ 3 - 4
src/utils/tip.js

@@ -38,16 +38,15 @@ export default class Tips {
           showCancel: true,
           success: res => {
             if (res.confirm) {
-              console.log(res.confirm);
-              
               resolve(res.confirm);
             } else if (res.cancel) {
-              reject(res.confirm);
+              resolve(res.confirm);
             }
           },
           fail: res => {
+           
             reject(res.confirm);
-            console.log(res);
+            
           }
         });
       });

+ 16 - 0
src/utils/wxBusiness.js

@@ -39,3 +39,19 @@ export  const  wxPay =  ( appId, nonceStr, prepayId, timeStamp, sign) =>  {
     }).catch( e => e)
 }
 
+
+
+
+ // 获取用户地理位置
+ export const getUserLocaltion = () => {
+    return new Promise((resolve, reject) => {
+        uni.getLocation({
+            type: 'wgs84',
+            success: function (res) {
+                resolve({result: res, code: 200})
+            },fail: ( err => reject({result: err, code: '未授权'}) )
+        });
+        
+    }).catch( e => e)
+}
+ 

+ 82 - 0
src/utils/wxTool.js

@@ -0,0 +1,82 @@
+/**
+ * @resolve { object } phone screen info
+*/
+export const getSystemInfo = () => {
+    return new Promise((resolve, reject) => {
+         wx.getSystemInfo({
+             success: (res) => {
+              resolve(res)
+             }, fail: _ =>  reject('无法获取显示器信息,请检查')
+         })
+     }).catch(e => e)
+ }
+
+ /** 
+  * @param {string} node id
+  * @param {string} way single node or all node
+  * @resolve { object }
+ */
+ 
+ // 获取节点信息
+ export const getNodeInfo = (node, way) => {
+     return new Promise((resolve, reject) => {
+         setTimeout( () => {
+            let query =  wx.createSelectorQuery()
+            let queryWay;
+             if (way === 'single') {
+                 queryWay =  query.select(node)
+             } else {    
+                 queryWay = query.selectAll(node)
+             }
+             queryWay.boundingClientRect( function (res)  {
+           
+               if (res) {
+                 resolve(res)
+               } else {
+                 reject('获取节点信息失败')
+               }
+             }).exec()
+         },500)
+     }).catch( e => e)
+ }
+ 
+ /**
+  * @param {string } key LocalStorage data name
+  * @param { object} data LocalStorage data value
+ */
+ export const setLocalStorage = (key, value)  => {
+     return new Promise(  (resolve, reject) => {
+         
+         let data = typeof value === 'object' ? JSON.stringify(value) : value
+ 
+          uni.setStorage({key, data, success: () => {
+              resolve('存储成功')
+          }, fail: () => reject('存储失败,请检查存储值类型')})
+     }).catch(e => e)
+ } 
+ 
+ /**
+  * @param {string} key getlocalStorage value
+  * @resolve { object } localStorage result
+ */
+ export const getLocalStorage =  (key) => {
+        return  uni.getStorage({key, success: res => {
+       
+            return res.data
+        }})
+ }
+ 
+ /**
+  * @param {string} key remove localStorage value
+  * 
+ */
+ export const removeLocalStorage = (key) => {
+     return new Promise( (resolve, reject) => {
+         uni.removeStorage({key, success: res => {
+             resolve({res, code: '200'})
+         },fail : res =>res})
+     }).catch( e => e)
+ }
+
+
+