Browse Source

学前和爱上幼儿园未登录状态下扫码进入

Rorschach 6 years ago
parent
commit
e0eb05dec7

+ 34 - 16
.idea/workspace.xml

@@ -3,11 +3,10 @@
   <component name="ChangeListManager">
     <list default="true" id="4f17d6f9-a5b0-4bb4-9071-d9334baf6515" name="Default" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/compontents/lesson_list/lessonList.js" beforeDir="false" afterPath="$PROJECT_DIR$/compontents/lesson_list/lessonList.js" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/compontents/preview/preview.js" beforeDir="false" afterPath="$PROJECT_DIR$/compontents/preview/preview.js" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/compontents/target/target.js" beforeDir="false" afterPath="$PROJECT_DIR$/compontents/target/target.js" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/pages/input_content/input_content.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/input_content/input_content.wxml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/pages/input_content/input_content.wxss" beforeDir="false" afterPath="$PROJECT_DIR$/pages/input_content/input_content.wxss" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pages/schedule/scheduleSubject/scheduleSubject.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/schedule/scheduleSubject/scheduleSubject.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pages/schedule/scheduleSubject/scheduleSubject.json" beforeDir="false" afterPath="$PROJECT_DIR$/pages/schedule/scheduleSubject/scheduleSubject.json" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pages/schedule/scheduleSubject/scheduleSubject.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/schedule/scheduleSubject/scheduleSubject.wxml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/project.config.json" beforeDir="false" afterPath="$PROJECT_DIR$/project.config.json" afterDir="false" />
     </list>
     <ignored path="$PROJECT_DIR$/.tmp/" />
     <ignored path="$PROJECT_DIR$/temp/" />
@@ -20,10 +19,14 @@
     <option name="LAST_RESOLUTION" value="IGNORE" />
   </component>
   <component name="FileEditorManager">
-    <leaf>
+    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
       <file leaf-file-name="lessonList.wxml" pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/compontents/lesson_list/lessonList.wxml">
-          <provider selected="true" editor-type-id="text-editor" />
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="100">
+              <caret line="5" column="34" selection-start-line="5" selection-start-column="34" selection-end-line="5" selection-end-column="34" />
+            </state>
+          </provider>
         </entry>
       </file>
     </leaf>
@@ -48,9 +51,9 @@
   <component name="NodePackageJsonFileManager">
     <packageJsonPaths />
   </component>
-  <component name="ProjectFrameBounds" fullScreen="true">
-    <option name="width" value="1440" />
-    <option name="height" value="900" />
+  <component name="ProjectFrameBounds">
+    <option name="width" value="1920" />
+    <option name="height" value="1080" />
   </component>
   <component name="ProjectView">
     <navigator proportions="" version="1">
@@ -89,7 +92,7 @@
   </component>
   <component name="PropertiesComponent">
     <property name="WebServerToolWindowFactoryState" value="false" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/.." />
     <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
     <property name="nodejs_npm_path_reset_for_default_project" value="true" />
   </component>
@@ -119,17 +122,18 @@
       <workItem from="1524663262852" duration="109000" />
       <workItem from="1524705659225" duration="247000" />
       <workItem from="1524792294462" duration="506000" />
+      <workItem from="1535342400968" duration="14000" />
+      <workItem from="1535355673275" duration="8000" />
     </task>
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="1478000" />
+    <option name="totallyTimeSpent" value="1500000" />
   </component>
   <component name="ToolWindowManager">
-    <frame x="0" y="0" width="1440" height="900" extended-state="0" />
-    <editor active="true" />
+    <frame x="0" y="0" width="1280" height="720" extended-state="0" />
     <layout>
-      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.19861111" />
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.20063192" />
       <window_info anchor="bottom" id="TODO" order="6" />
       <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
       <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
@@ -140,10 +144,10 @@
       <window_info id="Favorites" order="2" side_tool="true" />
       <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
       <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
-      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
       <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
       <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
       <window_info anchor="bottom" id="Message" order="0" />
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
       <window_info anchor="bottom" id="Find" order="1" />
     </layout>
@@ -156,7 +160,21 @@
   </component>
   <component name="editorHistoryManager">
     <entry file="file://$PROJECT_DIR$/compontents/lesson_list/lessonList.wxml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="100">
+          <caret line="5" column="34" lean-forward="true" selection-start-line="5" selection-start-column="34" selection-end-line="5" selection-end-column="34" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/compontents/lesson_list/lessonList.wxml">
       <provider selected="true" editor-type-id="text-editor" />
     </entry>
+    <entry file="file://$PROJECT_DIR$/compontents/lesson_list/lessonList.wxml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="100">
+          <caret line="5" column="34" selection-start-line="5" selection-start-column="34" selection-end-line="5" selection-end-column="34" />
+        </state>
+      </provider>
+    </entry>
   </component>
 </project>

+ 26 - 8
pages/index/index.js

@@ -7,25 +7,37 @@ const login = require('../../utils/loginSchedule.js');
 Page({
 	data: {
     scheduleList: [],
-    flag: true    
+		flag: true,
+		idvalue:"",
+		goto: false
 	},
   onLoad(options) {
     this.getClassSchedule();
-    let scene = decodeURIComponent(options.scene);
+		let scene = decodeURIComponent(options.scene);
+		console.log(scene);
     if (scene && scene !== 'undefined') {
-      let idParam = scene.split('&')[0];
+			let idParam = scene.split('&')[0];
       let showIdParam = scene.split('&')[1];
-
+			 
       let idKey = idParam.split('=')[0];
       let idvalue = idParam.split('=')[1];
-
+		 this.setData({
+			 goto:true,
+			 idvalue:idvalue
+		 })
       let showIdKey = showIdParam.split('=')[0];
       let showIdvalue = showIdParam.split('=')[1];
-
+			 
       if (idKey === 'id' && idvalue && idvalue !== 'undefined' && showIdKey === 'showId' && showIdvalue && showIdvalue !== 'undefined') {
         wx.navigateTo({
           url: `/pages/schedule/scheduleSubject/scheduleSubject?id=${idvalue}&showId=${showIdvalue}`
         })
+			}
+			if (idKey === 'id' && idvalue && idvalue !== 'undefined') {
+				console.log(idvalue);
+        wx.navigateTo({
+          url: `/pages/schedule/scheduleSubject/scheduleSubject?id=${idvalue}`
+        })
       }
     }
 	},
@@ -54,7 +66,8 @@ Page({
     login.getOpenidSessionKeyTwo(() => {}, () => {
       this.setData({
         flag: !this.data.flag
-      })
+			})
+	
     })
 		APIClient.getClassSchedule().success((res) => {
 			this.setData({
@@ -77,6 +90,11 @@ Page({
   jurisdiction: function () {
     this.setData({
       flag: !this.data.flag
-    })
+		})
+		if(this.data.goto){
+			wx.navigateTo({
+				url: `/pages/schedule/scheduleSubject/scheduleSubject?id=${this.data.idvalue}`
+			})
+		}
   } 
 })

+ 7 - 6
pages/schedule/scheduleSubject/scheduleSubject.js

@@ -11,12 +11,14 @@ Page({
 		title: ''
 	},
 	onLoad(options) {
-		console.log(wx.getStorageSync('userInfo'));
+
 		if(options.scene) {
-			let id = util.convertObject(decodeURIComponent(options.scene)).id;
+		
+			// let id = util.convertObject(decodeURIComponent(options.scene)).id;
 			this.setData({
 				userInfo: wx.getStorageSync('userInfo'),
-				id: id
+				// id: id
+				id: options.id
 			})
 		}else {
 			this.setData({
@@ -49,7 +51,6 @@ Page({
 		}
 	},
 	switchContent(e) {
-		console.log(e.detail.current);
 		this.setData({
 			currentIndex: e.detail.current
 		})
@@ -74,7 +75,7 @@ Page({
 	// 获取课程列表qr
 	getClassScheduleWeeklyQR(itemId, userId, showId) {
 		APIClient.getClassScheduleWeeklyQR(itemId, userId, showId).success(function (res) {
-			console.log('轮播图', res);
+		
       if (res.data.success) {
         this.setData({
           swiperList: res.data.data.items,
@@ -86,7 +87,7 @@ Page({
 	},
 	toScheduleSubjectInner(e) {
 		let id = e.currentTarget.dataset.id
-		console.log(id);
+	
 		wx.navigateTo({
 			url: `/pages/schedule/scheduleSubjectInner/scheduleSubjectInner?id=${id}`
 		})

+ 4 - 1
pages/schedule/scheduleSubject/scheduleSubject.json

@@ -1,3 +1,6 @@
 {
-
+    "component": true,
+    "usingComponents": {
+      "dialog": "/compontents/dialog/dialog"
+    }
 }

+ 1 - 1
pages/schedule/scheduleSubject/scheduleSubject.wxml

@@ -31,4 +31,4 @@
 		</view>
 		<view class="look-num">{{swiperList[currentIndex].memberCount}}</view>
 	</view>
-</view>
+</view>

+ 8 - 1
project.config.json

@@ -29,7 +29,7 @@
 			"list": []
 		},
 		"miniprogram": {
-			"current": -1,
+			"current": 9,
 			"list": [
 				{
 					"id": 0,
@@ -92,6 +92,13 @@
 					"pathName": "pages/schedule/scheduleSubject/scheduleSubject",
 					"query": "id=1522213858287640",
 					"scene": "1011"
+				},
+				{
+					"id": 9,
+					"name": "爱上幼儿园",
+					"pathName": "pages/schedule/scheduleSubject/scheduleSubject",
+					"query": "id=1522213859721074",
+					"scene": "1047"
 				}
 			]
 		}