dever 3 سال پیش
والد
کامیت
35ca97d4f4
4فایلهای تغییر یافته به همراه18 افزوده شده و 12 حذف شده
  1. 1 1
      lib/dever/config.js
  2. 12 7
      lib/dever/index.js
  3. 4 3
      pages/dream/view/vodShort.vue
  4. 1 1
      pages/index/my.vue

+ 1 - 1
lib/dever/config.js

@@ -15,7 +15,7 @@ const share = {
 const request = {
 	//	服务器接口地址
 	host: "https://he.shemic.com/",
-	host: "http://dev.shemic.com/dreamland/",
+	//host: "http://dev.shemic.com/dreamland/",
 	
 	//	请求的参数	
 	data: {},

+ 12 - 7
lib/dever/index.js

@@ -1375,16 +1375,21 @@ var dever = {
 	//验证登录
 	checkLogin : function(refer) {
 		if (!this.getToken()) {
-			this.data('login_refer', this.getRefer(refer));
-			//this.hideLoading();
-			if (this.source == 'h5') {
-				this.location(this.login, 'go');
-			} else {
-				this.location(this.login, 'go');
-			}
+			this.goLogin(refer);
 		}
 	},
 	
+	//去登录
+	goLogin : function(refer) {
+		this.data('login_refer', this.getRefer(refer));
+		//this.hideLoading();
+		if (this.source == 'h5') {
+			this.location(this.login, 'go');
+		} else {
+			this.location(this.login, 'go');
+		}
+	},
+	
 	//获取refer
 	getRefer : function(refer) {
 		if (!refer) {

+ 4 - 3
pages/dream/view/vodShort.vue

@@ -46,15 +46,16 @@ export default {
 		
 	},
 	mounted() {
-		this.control[this.index] = this;
+		this.control[this.index] = this;
+		for(var i in this.$refs.video) {
+			this.$refs.video[i].autoStart();
+		}
 	},
 	methods:{
 		start : function() {
 			for(var i in this.$refs.video) {
 				if (this.current_index == i) {
 					this.$refs.video[this.current_index].start();
-				} else {
-					this.$refs.video[i].autoStart();
 				}
 			}
 		},

+ 1 - 1
pages/index/my.vue

@@ -181,7 +181,7 @@ export default {
 			this.Dever.get(this, 'app/collection/?l=api.my', {id:-1});
 		},
 		login : function() {
-			this.Dever.checkLogin();
+			this.Dever.goLogin();
 		},
 		
 		user : function() {