zpj 2 роки тому
батько
коміт
f8e39efe40
11 змінених файлів з 205 додано та 184 видалено
  1. 0 6
      api/login.js
  2. 0 58
      api/task.js
  3. 8 0
      api/user.js
  4. 0 6
      api/weChat.js
  5. 10 0
      main.js
  6. 29 1
      package-lock.json
  7. 3 1
      package.json
  8. 82 48
      pages/index/index.vue
  9. 3 3
      service/ajax.js
  10. 58 61
      service/router.js
  11. 12 0
      yarn.lock

+ 0 - 6
api/login.js

@@ -1,6 +0,0 @@
-import {request} from '../service/ajax.js'
-
-const newsUrl = '/api/user/'
-// 登陆
-export const login = (data) => request(newsUrl + 'login', 'post', { ...data },false)
-export const resetPwd = (data) => request(newsUrl + 'resetpwd', 'post', { ...data },false)

+ 0 - 58
api/task.js

@@ -1,58 +0,0 @@
-import {request} from '@/service/ajax.js'
-
-const newsUrl = '/api/task/'
-// 获取基本信息
-export const getTaskType = (data) => request(newsUrl + 'type', 'post', { ...data },false)
-export const getTaskTypeInfo = (data) => request(newsUrl + 'type-info', 'post', { ...data },true)
-//获取任务基本选项信息
-export const getTaskOptions = (data) => request(newsUrl + 'options', 'post', { ...data },true)
-//获取联系人关系
-export const getTaskRelations = (data) => request(newsUrl + 'relations', 'post', { ...data },true)
-export const getClientInfo = (data) => request(newsUrl + 'client', 'post', { ...data },true)
-export const addTask = (data) => request(newsUrl + 'add', 'post', { ...data },true)
-// 任务详情
-export const getTaskDetail = (data) => request(newsUrl + 'detail', 'post', { ...data },true)
-//任务接单
-export const takeTask = (data) => request(newsUrl + 'take', 'post', { ...data },true)
-//审核
-export const auditTask = (data) => request(newsUrl + 'audit', 'post', { ...data },true)
-export const setMsg = (data) => request(newsUrl + 'add-msg', 'post', { ...data },true)
-export const getMsgList = (data) => request(newsUrl + 'msg-list', 'post', { ...data },false)
-export const getExecuteList = (data) => request(newsUrl + 'execute-list', 'post', { ...data },false)
-export const setExecute = (data) => request(newsUrl + 'set-execute', 'post', { ...data },false)
-export const getTaskStage = (data) => request(newsUrl + 'stage', 'post', { ...data },false)
-export const setExecuteTask = (data) => request(newsUrl + 'execute', 'post', { ...data },true)
-//获取可接单列表
-export const getTaskReceiving = (data) => request(newsUrl + 'receiving', 'post', { ...data },false)
-export const getTaskList = (data) => request(newsUrl + 'task-list', 'post', { ...data },false)
-export const endTask = (data) => request(newsUrl + 'end', 'post', { ...data },false)
-export const cancellation = (data) => request(newsUrl + 'cancellation', 'post', { ...data },false)
-export const delTask = (data) => request(newsUrl + 'del', 'post', { ...data },false)
-export const getStageList = (data) => request(newsUrl + 'stage-list', 'post', { ...data },false)
-export const getStageUser = (data) => request(newsUrl + 'stage-user', 'post', { ...data },false)
-export const getBusinessStageList = (data) => request(newsUrl + 'business-stage', 'post', { ...data },false)
-export const getBusinessCache = (data) => request(newsUrl + 'get-cache', 'post', { ...data },false)
-export const setBusinessCache = (data) => request(newsUrl + 'set-cache', 'post', { ...data },false)
-export const delBusinessCache = (data) => request(newsUrl + 'del-cache', 'post', { ...data },true)
-
-// 草稿Api
-export const addDraft = (data) => request(newsUrl + 'draft-add', 'post', { ...data },true)
-export const getDraftList = (data) => request(newsUrl + 'draft-list', 'post', { ...data },true)
-export const getDraftItem = (data) => request(newsUrl + 'draft-item', 'post', { ...data },true)
-export const delDraft = (data) => request(newsUrl + 'draft-del', 'post', { ...data },true)
-//阶段操作
-export const setStageOperate = (data) => request(newsUrl + 'operate', 'post', { ...data },true)
-export const getReturnedBankList = (data) => request(newsUrl + 'banks', 'post', { ...data },true)
-//录入数据校验
-export const verifyBusinessModuleKey = (data) => request(newsUrl + 'verify', 'post', { ...data },true)
-
-export const getWeekList = (data) => request(newsUrl + 'week', 'post', { ...data },true)
-export const getDayBacklogList = (data) => request(newsUrl + 'backlog', 'post', { ...data },true)
-export const setDayBacklog = (data) => request(newsUrl + 'status', 'post', { ...data },true)
-export const getProductData = (data) => request(newsUrl + 'product-data', 'post', { ...data },true)
-export const setPostLoan = (data) => request(newsUrl + 'set-loan', 'post', { ...data },true)
-
-
-// 贷后管理列表
-export const getLoanList = (data) => request(newsUrl + 'loan-list', 'post', { ...data },true)
-export const getAdjust = (data) => request(newsUrl + 'adjust', 'post', { ...data },true)

+ 8 - 0
api/user.js

@@ -0,0 +1,8 @@
+import {request} from '../service/ajax.js'
+
+const newsUrl = '/api/user/'
+
+// 授权登录
+export const userWxAppletLogin = (data) => request(newsUrl + 'applet_login', 'post', { ...data },false)
+// 报名
+export const userParticipation = (data) => request(newsUrl + 'participation', 'post', { ...data },false)

+ 0 - 6
api/weChat.js

@@ -1,6 +0,0 @@
-import { request } from '@/service/ajax'
-// 商品模块路由
-const url = '/api/weChat/'
-// 猜你喜欢
-export const getWxJsSign = (data) => request(url + 'js-config', 'post', { ...data })
-

+ 10 - 0
main.js

@@ -11,6 +11,16 @@ import Vue from 'vue'
 import store from './store'
 import Nav from './components/en-utils/en-nav/en-nav.vue'
 
+import 'animate.css'
+import { WOW } from 'wowjs'
+Vue.prototype.$wow = new WOW({
+  boxClass: 'wow',
+  animateClass: 'animate__animated',
+  offset: 0,
+  mobile: true,
+  live: true,
+})
+
 Vue.component('Nav', Nav)
 Vue.config.productionTip = false
 App.mpType = 'app'

+ 29 - 1
package-lock.json

@@ -5,12 +5,14 @@
   "packages": {
     "": {
       "dependencies": {
+        "animate.css": "^4.1.1",
         "js-base64": "^3.7.2",
         "jweixin-module": "^1.2.0",
         "uni-read-pages": "^1.0.5",
         "uni-simple-router": "^2.0.7",
         "uploading-oss": "^1.0.3",
-        "wecomjsdk": "^1.0.2"
+        "wecomjsdk": "^1.0.2",
+        "wowjs": "^1.1.3"
       },
       "devDependencies": {
         "@types/html5plus": "^1.0.2",
@@ -56,6 +58,11 @@
         "source-map": "^0.6.1"
       }
     },
+    "node_modules/animate.css": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/animate.css/-/animate.css-4.1.1.tgz",
+      "integrity": "sha512-+mRmCTv6SbCmtYJCN4faJMNFVNN5EuCTTprDTAo7YzIGji2KADmakjVA3+8mVDkZ2Bf09vayB35lSQIex2+QaQ=="
+    },
     "node_modules/crypto-js": {
       "version": "4.1.1",
       "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz",
@@ -176,6 +183,14 @@
       "version": "1.0.2",
       "resolved": "https://registry.npmmirror.com/wecomjsdk/-/wecomjsdk-1.0.2.tgz",
       "integrity": "sha512-nPbrTcA5P8IOY/gQJJ3/AtXE2zSqJIQB156RUAQ2+RvwvJmcR66p7hpZtCjbtKefvyDO0LJBdEFqfjRR72zjIw=="
+    },
+    "node_modules/wowjs": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/wowjs/-/wowjs-1.1.3.tgz",
+      "integrity": "sha512-HQp1gi56wYmjOYYOMZ08TnDGpT+AO21RJVa0t1NJ3jU8l3dMyP+sY7TO/lilzVp4JFjW88bBY87RnpxdpSKofA==",
+      "dependencies": {
+        "animate.css": "latest"
+      }
     }
   },
   "dependencies": {
@@ -211,6 +226,11 @@
         "source-map": "^0.6.1"
       }
     },
+    "animate.css": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/animate.css/-/animate.css-4.1.1.tgz",
+      "integrity": "sha512-+mRmCTv6SbCmtYJCN4faJMNFVNN5EuCTTprDTAo7YzIGji2KADmakjVA3+8mVDkZ2Bf09vayB35lSQIex2+QaQ=="
+    },
     "crypto-js": {
       "version": "4.1.1",
       "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz",
@@ -313,6 +333,14 @@
       "version": "1.0.2",
       "resolved": "https://registry.npmmirror.com/wecomjsdk/-/wecomjsdk-1.0.2.tgz",
       "integrity": "sha512-nPbrTcA5P8IOY/gQJJ3/AtXE2zSqJIQB156RUAQ2+RvwvJmcR66p7hpZtCjbtKefvyDO0LJBdEFqfjRR72zjIw=="
+    },
+    "wowjs": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/wowjs/-/wowjs-1.1.3.tgz",
+      "integrity": "sha512-HQp1gi56wYmjOYYOMZ08TnDGpT+AO21RJVa0t1NJ3jU8l3dMyP+sY7TO/lilzVp4JFjW88bBY87RnpxdpSKofA==",
+      "requires": {
+        "animate.css": "latest"
+      }
     }
   }
 }

+ 3 - 1
package.json

@@ -5,7 +5,9 @@
     "uni-read-pages": "^1.0.5",
     "uni-simple-router": "^2.0.7",
     "uploading-oss": "^1.0.3",
-    "wecomjsdk": "^1.0.2"
+    "wecomjsdk": "^1.0.2",
+	"animate.css": "^4.1.1",
+	"wowjs": "^1.1.3"
   },
   "devDependencies": {
     "@types/html5plus": "^1.0.2",

+ 82 - 48
pages/index/index.vue

@@ -4,26 +4,26 @@
 			<image class="logo-img" src="@/static/img/c-logo.png" mode="scaleToFill"></image>
 			<!-- <image class="music-img" src="@/static/img/c-music.png" mode="scaleToFill"></image> -->
 		</view>
-		<swiper class="swiper" :vertical='true'>
+		<swiper class="swiper" :vertical='true' @change="swiperChange">
 			<!-- 邀请函 -->
 			<swiper-item>
-				<view class="swiper-item index-1">
-					<image class="img-text" src="@/static/img/yqh-text.png" mode="scaleToFill"></image>
-					<view class="fs-48 fc-f text-align-center mb-16">振合网科技集团实体联盟</view>
-					<view class="fs-32 fc-f text-align-center mb-72">未来已来   一触即发</view>
-					<image class="img-xian" src="@/static/img/xian.png" mode="scaleToFill"></image>
-					<image class="name-text" src="@/static/img/name-text.png" mode="scaleToFill"></image>
-					<image class="time-text" src="@/static/img/time-text.png" mode="scaleToFill"></image>
-					<image class="up-icon" src="@/static/img/c-up-icon.png" mode="scaleToFill"></image>
+				<view class="swiper-item index-1" v-if="index == 0">
+					<image class="img-text wow animate__animated animate__bounceInUp" src="@/static/img/yqh-text.png" mode="scaleToFill"></image>
+					<view class="fs-48 fc-f text-align-center mb-16 wow animate__animated animate__bounceInLeft">振合网科技集团实体联盟</view>
+					<view class="fs-32 fc-f text-align-center mb-72 wow animate__animated animate__bounceInRight">未来已来   一触即发</view>
+					<image class="img-xian wow animate__animated animate__bounceInUp" src="@/static/img/xian.png" mode="scaleToFill"></image>
+					<image class="name-text wow animate__animated animate__bounceInLeft" src="@/static/img/name-text.png" mode="scaleToFill"></image>
+					<image class="time-text wow animate__animated animate__bounceInRight" src="@/static/img/time-text.png" mode="scaleToFill"></image>
+					<image class="up-icon wow animate__animated animate__bounceInUp" src="@/static/img/c-up-icon.png" mode="scaleToFill"></image>
 				</view>
 			</swiper-item>
 			<!-- 诚挚邀请 -->
 			<swiper-item>
 				<view class="swiper-item">
-					<view class="index-2">
-						<image class="text-img" src="@/static/img/czyq-text.png" mode="scaleToFill"></image>
-						<view class="fs-32 fc-F2D4A9 fw-b mb-24">尊敬的用户</view>
-						<view class="fs-32 fc-F2D4A9 text-box">
+					<view class="index-2" v-if="index == 1">
+						<image class="text-img wow animate__animated animate__bounceInUp" src="@/static/img/czyq-text.png" mode="scaleToFill"></image>
+						<view class="fs-32 fc-F2D4A9 fw-b mb-24 wow animate__animated animate__bounceInUp">尊敬的用户</view>
+						<view class="fs-32 fc-F2D4A9 text-box wow animate__animated animate__bounceInUp">
 							您好!感谢百忙之中阅读此邀请函。
 							我们诚挚的邀请您参加于10月20日振合
 							科技集团举办的2024年度招商说明会。
@@ -34,72 +34,76 @@
 							您共话友情、 展望末来、共创属于我们
 							新的商业传奇。
 						</view>
-						<view class="fc-F2D4A9 fw-b fs-32 text-align-right mt-32">振合网科技集团</view>
-						<view class="fs-28 fc-F2D4A9 text-align-right">2024年10月20日</view>
+						<view class="fc-F2D4A9 fw-b fs-32 text-align-right mt-32 wow animate__animated animate__bounceInUp">振合网科技集团</view>
+						<view class="fs-28 fc-F2D4A9 text-align-right wow animate__animated animate__bounceInUp">2024年10月20日</view>
 					</view>
-					<image class="up-icon" src="@/static/img/c-up-icon.png" mode="scaleToFill"></image>
+					<image class="up-icon wow animate__animated animate__bounceInUp" src="@/static/img/c-up-icon.png" mode="scaleToFill"></image>
 				</view>
 			</swiper-item>
 			<!-- 活动地址 -->
 			<swiper-item>
 				<view class="swiper-item">
-					<view class="index-2">
-						<image class="text-img-1" src="@/static/img/hdtd-text.png" mode="scaleToFill"></image>
-						<image class="img-1" src="@/static/img/h-1.png" mode="scaleToFill"></image>
+					<view class="index-2" v-if="index == 2">
+						<image class="text-img-1 wow animate__animated animate__bounceInUp" src="@/static/img/hdtd-text.png" mode="scaleToFill"></image>
+						<image class="img-1 wow animate__animated animate__bounceInUp" src="@/static/img/h-1.png" mode="scaleToFill"></image>
 						
 						<view class="flex-justify-space">
-							<image class="img-2" src="@/static/img/h-2.png" mode="scaleToFill"></image>
-							<image class="img-2" src="@/static/img/h-3.png" mode="scaleToFill"></image>
+							<image class="img-2 wow animate__animated animate__bounceInLeft" src="@/static/img/h-2.png" mode="scaleToFill"></image>
+							<image class="img-2 wow animate__animated animate__bounceInRight" src="@/static/img/h-3.png" mode="scaleToFill"></image>
 						</view>
 						
-						<view class="fc-F2D4A9 fs-40 text-align-center mb-16">重庆丽星君顿酒店</view>
-						<view class="fs-28 fc-F2D4A9 text-align-center">地址:重庆市渝北区服装城大道48号</view>
+						<view class="fc-F2D4A9 fs-40 text-align-center mb-16 wow animate__animated animate__bounceInUp">重庆丽星君顿酒店</view>
+						<view class="fs-28 fc-F2D4A9 text-align-center wow animate__animated animate__bounceInUp">地址:重庆市渝北区服装城大道48号</view>
 					</view>
-					<image class="up-icon" src="@/static/img/c-up-icon.png" mode="scaleToFill"></image>
+					<image class="up-icon wow animate__animated animate__bounceInUp" src="@/static/img/c-up-icon.png" mode="scaleToFill"></image>
 				</view>
 			</swiper-item>
 			<!-- 地址导航 -->
 			<swiper-item>
-				<view class="swiper-item">
+				<view class="swiper-item" v-if="index == 3">
 					<view class="index-2">
-						<image class="text-img" src="@/static/img/dzdh-text.png" mode="scaleToFill"></image>
-						<view class="b-f" @click="toMap()">
+						<image class="text-img wow animate__animated animate__bounceInUp" src="@/static/img/dzdh-text.png" mode="scaleToFill"></image>
+						<view class="b-f wow animate__animated animate__bounceInUp" @click="toMap()">
 							<image class="img-3" src="@/static/img/map.png" mode="scaleToFill"></image>
 							<view class="b-c">开始导航</view>
 						</view>
-						<view class="fc-F2D4A9 fs-36 text-align-center mb-16">会议地址</view>
-						<view class="fc-F2D4A9 fs-28 text-align-center mb-32">重庆丽星君顿酒店</view>
-						<view class="fc-F2D4A9 fs-36 text-align-center mb-16">会议时间</view>
-						<view class="fc-F2D4A9 fs-28 text-align-center mb-32">10月20日早 上08:30</view>
-						<view class="fc-F2D4A9 fs-36 text-align-center mb-16">联系方式</view>
-						<view class="fc-F2D4A9 fs-28 text-align-center mb-32">023-67491176</view>
+						<view class="fc-F2D4A9 fs-36 text-align-center mb-16 wow animate__animated animate__bounceInLeft">会议地址</view>
+						<view class="fc-F2D4A9 fs-28 text-align-center mb-32 wow animate__animated animate__bounceInRight">重庆丽星君顿酒店</view>
+						<view class="fc-F2D4A9 fs-36 text-align-center mb-16 wow animate__animated animate__bounceInLeft">会议时间</view>
+						<view class="fc-F2D4A9 fs-28 text-align-center mb-32 wow animate__animated animate__bounceInRight">10月20日早 上08:30</view>
+						<view class="fc-F2D4A9 fs-36 text-align-center mb-16 wow animate__animated animate__bounceInLeft">联系方式</view>
+						<view class="fc-F2D4A9 fs-28 text-align-center mb-32 wow animate__animated animate__bounceInRight">023-67491176</view>
 					</view>
-					<image class="up-icon" src="@/static/img/c-up-icon.png" mode="scaleToFill"></image>
+					<image class="up-icon wow animate__animated animate__bounceInUp" src="@/static/img/c-up-icon.png" mode="scaleToFill"></image>
 				</view>
 			</swiper-item>
 			<!-- 参与预约 -->
 			<swiper-item>
-				<view class="swiper-item">
+				<view class="swiper-item" v-if="index == 4">
 					<view class="index-2">
-						<image class="text-img-2" src="@/static/img/cyyy-text.png" mode="scaleToFill"></image>
+						<image class="text-img-2 wow animate__animated animate__bounceInUp" src="@/static/img/cyyy-text.png" mode="scaleToFill"></image>
 						<view class="mb-32">
-							<view class="fc-F2D4A9 fs-32 mb-16">您的姓名<span class="fc-ED301D fs-32">*</span></view>
-							<input type="text" placeholder="请输入您的姓名">
+							<view class="fc-F2D4A9 fs-32 mb-16 wow animate__animated animate__bounceInLeft">您的姓名<span class="fc-ED301D fs-32">*</span></view>
+							<input class="wow animate__animated animate__bounceInRight" v-model="fromData.name" type="text" placeholder="请输入您的姓名">
 						</view>
 						<view class="mb-32">
-							<view class="fc-F2D4A9 fs-32 mb-16">您的手机号<span class="fc-ED301D fs-32">*</span></view>
-							<input type="number" placeholder="请输入您的手机号">
+							<view class="fc-F2D4A9 fs-32 mb-16 wow animate__animated animate__bounceInLeft">您的手机号<span class="fc-ED301D fs-32">*</span></view>
+							<input class="wow animate__animated animate__bounceInRight" v-model="fromData.phone" type="number" placeholder="请输入您的手机号">
 						</view>
 						<view class="mb-32">
-							<view class="fc-F2D4A9 fs-32 mb-16">您的公司名称</view>
-							<input type="text" placeholder="请输入您的公司名称">
+							<view class="fc-F2D4A9 fs-32 mb-16 wow animate__animated animate__bounceInLeft">您的公司名称</view>
+							<input class="wow animate__animated animate__bounceInRight" v-model="fromData.corporate" type="text" placeholder="请输入您的公司名称">
+						</view>
+						<view class="mb-32">
+							<view class="fc-F2D4A9 fs-32 mb-16 wow animate__animated animate__bounceInLeft">邀请人</view>
+							<input class="wow animate__animated animate__bounceInRight" v-model="fromData.inviter" type="text" placeholder="请输入您的邀请人">
 						</view>
 						<view class="mb-72">
-							<view class="fc-F2D4A9 fs-32 mb-16">邀请人</view>
-							<input type="text" placeholder="请输入您的邀请人">
+							<view class="fc-F2D4A9 fs-32 mb-16 wow animate__animated animate__bounceInLeft">邀请人手机号<span class="fc-ED301D fs-32">*</span></view>
+							<input class="wow animate__animated animate__bounceInRight" v-model="fromData.inviter_phone" type="number" placeholder="请输入邀请人的手机号">
 						</view>
 						
-						<view class="save-box">提交</view>
+						<view class="save-box wow animate__animated animate__bounceInUp" @click="save()">提交</view>
 					</view>
 				</view>
 			</swiper-item>
@@ -108,18 +112,33 @@
 
 </template>
 <script>
+	import {userParticipation} from '@/api/user.js';
 	import tools from "@/service/tools";
 	export default {
 		components: {},
 		data() {
 			return {
-
+				fromData:{
+					m_id:'',
+					name:'',
+					phone:'',
+					corporate:'',
+					inviter:'',//邀请人
+					inviter_phone:'',
+				},
+				isAJAX:false,
+				index:0,
 			}
 		},
-		mounted() {
-			
+		onshow() {
+			this.$wow.init();
 		},
 		methods: {
+			swiperChange(e){
+				if(e.detail.current!=this.index){
+					this.index = e.detail.current;
+				}
+			},
 			toMap(){
 				uni.openLocation({
 				  latitude: 29.665085,
@@ -131,6 +150,21 @@
 				  fail(error) {}
 				});
 			},
+			save(){
+				if(this.isAJAX){
+					return
+				}
+				this.isAJAX = true;
+				this.fromData.m_id = uni.getStorageSync('m_id');
+				userParticipation(this.fromData).then((res)=>{
+					if(res.code === 1){
+						tools.success('预约成功')
+					}else{
+						tools.error(res.msg)
+					}
+					this.isAJAX = false;
+				})
+			}
 		},
 	}
 </script>

+ 3 - 3
service/ajax.js

@@ -1,9 +1,9 @@
 import tools from "@/service/tools";
 
 let BASE_URL =''
-//#ifndef H5
-BASE_URL ='https://' + process.uniEnv.baseUrl;
-//#endif
+// //#ifndef H5
+// BASE_URL ='https://' + process.uniEnv.baseUrl;
+// //#endif
 
 
 /**

+ 58 - 61
service/router.js

@@ -1,6 +1,8 @@
 // router.js
 import { RouterMount, createRouter, runtimeQuit } from '@/js_sdk/hhyang-uni-simple-router/uni-simple-router';
 import tools from "@/service/tools";
+import {userWxAppletLogin} from '@/api/user.js'
+
 const router = createRouter({
     platform: process.env.VUE_APP_PLATFORM,
     routerErrorEach:({type,level,...args})=>{
@@ -15,70 +17,65 @@ const router = createRouter({
     routes: [...ROUTES]
 });
 //全局路由前置守卫
-const whiteList = ['/pages/login/index']
 
 router.beforeEach((to, from, next) => { 
-		next();
+	if(to.query.shopCode){
+		uni.setStorageSync("invite_code", to.query.shopCode);
+	}
+	if(to.query.memberCode){
+		uni.setStorageSync("memberCode", to.query.memberCode);
+	}
+	
+	let isWeiXin = tools.isWx();
+	
+	if(isWeiXin){
+		let userToken = uni.getStorageSync('token')
+		if(userToken){
+			next();
+		}else{
+			const href = window.location.href;
+			if (href.indexOf('?code=') > -1 || href.indexOf('&code=') > -1){
+				const urlArr = href.split('?')
+				const rightUrlArr = urlArr[1].split('#/')
+				const queryObj = {}
+				rightUrlArr[0].split('&').map((item) => {
+					const splitStr = item.split('=')
+					return {
+						key: splitStr[0],
+						value: splitStr[1],
+					}
+				}).forEach((item) => {
+					queryObj[item.key] = item.value
+				})
+				if(urlArr.length>=3){
+					rightUrlArr[1]= "?"+urlArr[2]
+				}
+				let from = {
+					code: queryObj.code,
+					wx_type:1,
+					invite_code:uni.getStorageSync("invite_code"),
+					memberCode:uni.getStorageSync("memberCode"),
+				}
+				userWxAppletLogin(from).then((res)=>{
+					if (res.code === 1) {
+						uni.setStorageSync('token',res.data.token)
+						uni.setStorageSync('m_id',res.data.m_id)
+						next(to.path)
+					} else {
+						tools.error(res.msg);
+					}
+				})
+			}else{
+				uni.removeStorageSync('token')
+				uni.removeStorageSync('m_id')
+				tools.wxLogin();
+			}
+		}
+	}else{
+		next()
+	}
 	
-    // let userToken = uni.getStorageSync('token')  
-    // if(userToken){
-    // 	next();
-    // }else{
-    // 	let isWeiXin = tools.isWx();
-    // 	if(isWeiXin && to.path!=='/pages/login/index'){
-    // 		let wx_key = uni.getStorageSync('wx_key')
-    // 		if(wx_key && to.path==='/pages/login/register'){
-    // 			next()
-    // 		}else{
-    // 			const href = window.location.href;
-    // 			if (href.indexOf('?code=') > -1 || href.indexOf('&code=') > -1){
-    // 				const urlArr = href.split('?')
-    // 				const rightUrlArr = urlArr[1].split('#/')
-    // 				const queryObj = {}
-    // 				rightUrlArr[0].split('&').map((item) => {
-    // 					const splitStr = item.split('=')
-    // 					return {
-    // 						key: splitStr[0],
-    // 						value: splitStr[1],
-    // 					}
-    // 				}).forEach((item) => {
-    // 					queryObj[item.key] = item.value
-    // 				})
-    // 				if(urlArr.length>=3){
-    // 					rightUrlArr[1]= "?"+urlArr[2]
-    // 				}
-    // 				let from = {
-    // 					code: queryObj.code,
-    // 					wx_type:1,
-    // 					invite_code:uni.getStorageSync("invite_code"),
-    // 					memberCode:uni.getStorageSync("memberCode"),
-    // 				}
-    // 				// await userWxAppletLogin(from).then((res)=>{
-    // 				// 	if (res.code === 1) {
-    // 				// 		if(res.data.wx_key){
-    // 				// 			uni.setStorageSync('wx_key',res.data.wx_key)
-    // 				// 			next('/pages/login/register')
-    // 				// 		}else{
-    // 				// 			uni.setStorageSync('token',res.data.token)
-    // 				// 			uni.setStorageSync('m_id',res.data.m_id)
-    // 				// 			next(to.path)
-    // 				// 		}
-    // 				// 	} else {
-    // 				// 		tools.error(res.msg);
-    // 				// 	}
-    // 				// })
-    // 			}else{
-    // 				uni.removeStorageSync('token')
-    // 				uni.removeStorageSync('m_id')
-    // 				tools.wxLogin();
-    // 			}
-    // 		}
-    // 	}else if(whiteList.indexOf(to.path)>-1){
-    // 		next()
-    // 	}else {
-    // 		next('/pages/login/index')
-    // 	}
-    // }
+    
 
 });
 // 全局路由后置守卫

+ 12 - 0
yarn.lock

@@ -28,6 +28,11 @@
     "postcss" "^8.4.14"
     "source-map" "^0.6.1"
 
+"animate.css@^4.1.1", "animate.css@latest":
+  "integrity" "sha512-+mRmCTv6SbCmtYJCN4faJMNFVNN5EuCTTprDTAo7YzIGji2KADmakjVA3+8mVDkZ2Bf09vayB35lSQIex2+QaQ=="
+  "resolved" "https://registry.npmjs.org/animate.css/-/animate.css-4.1.1.tgz"
+  "version" "4.1.1"
+
 "crypto-js@^4.1.1":
   "integrity" "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw=="
   "resolved" "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz"
@@ -117,3 +122,10 @@
   "integrity" "sha512-nPbrTcA5P8IOY/gQJJ3/AtXE2zSqJIQB156RUAQ2+RvwvJmcR66p7hpZtCjbtKefvyDO0LJBdEFqfjRR72zjIw=="
   "resolved" "https://registry.npmmirror.com/wecomjsdk/-/wecomjsdk-1.0.2.tgz"
   "version" "1.0.2"
+
+"wowjs@^1.1.3":
+  "integrity" "sha512-HQp1gi56wYmjOYYOMZ08TnDGpT+AO21RJVa0t1NJ3jU8l3dMyP+sY7TO/lilzVp4JFjW88bBY87RnpxdpSKofA=="
+  "resolved" "https://registry.npmjs.org/wowjs/-/wowjs-1.1.3.tgz"
+  "version" "1.1.3"
+  dependencies:
+    "animate.css" "latest"