Эх сурвалжийг харах

Merge branch 'dev3.6' of http://192.168.3.207:10080/qmx/jy into dev3.6

zhangxinlei1996 4 жил өмнө
parent
commit
124dd0b4bb

+ 5 - 1
src/jfw/front/frontRouter.go

@@ -49,5 +49,9 @@ func (this *CommonRouter) IntegralPage(htmlPage string) error {
 
 //文库
 func (this *CommonRouter) DocsPage(htmlPage string) error {
-	return this.Render(fmt.Sprintf("/frontRouter/pc/docs/free/index.html"))
+	userid, _ := this.GetSession("userId").(string)
+	if userid == "" {
+		return this.Redirect("/notin/page")
+	}
+	return this.Render(fmt.Sprintf("/frontRouter/pc/docs/sess/index.html"))
 }

+ 0 - 17
src/jfw/modules/app/src/app/front/frontRouter.go

@@ -10,9 +10,6 @@ import (
 type CommonRouter struct {
 	*xweb.Action
 	appCommonPage xweb.Mapper `xweb:"/jyapp/frontPage/(.*)/(sess|free)/(.*)"` //新的历时推送记录
-
-	integralPage xweb.Mapper `xweb:"/jyapp/integral/(.*)"` //积分页面路由
-	docsPage     xweb.Mapper `xweb:"/jyapp/docs/(.*)"`     //文库页面路由
 }
 
 func init() {
@@ -27,17 +24,3 @@ func (this *CommonRouter) AppCommonPage(folder, loginSign, htmlPage string) erro
 	}
 	return this.Render(fmt.Sprintf("/frontRouter/%s/%s/%s.html", folder, loginSign, htmlPage))
 }
-
-//积分
-func (this *CommonRouter) IntegralPage(htmlPage string) error {
-	userid, _ := this.GetSession("userId").(string)
-	if userid == "" {
-		return this.Redirect("/jyapp/swordfish/about")
-	}
-	return this.Render(fmt.Sprintf("/frontRouter/integral/sess/%s.html", htmlPage))
-}
-
-//文库
-func (this *CommonRouter) DocsPage(htmlPage string) error {
-	return this.Render(fmt.Sprintf("/frontRouter/docs/free/%s.html", htmlPage))
-}

+ 8 - 3
src/web/staticres/js/login.js

@@ -389,9 +389,14 @@ var logic = function(data,num){
 
 //登录后处理页面逻辑
 var processpage = function(shareid,num){
-	if($("#bidLogin").attr("data-rec")=="sjdc"){
-		window.location.href = "/front/dataExport/toSieve";
-		return;
+	var toHref=$("#bidLogin").attr("data-rec")
+	switch (toHref) {
+		case "sjdc":
+			window.location.href = "/front/dataExport/toSieve";
+			return;
+		case "jydocs":
+			window.location.href = "/swordfish/docs/index";
+			return;
 	}
 	clearInterval(loginfg);
 	switch(num){

+ 12 - 1
src/web/templates/common/pchead.html

@@ -522,7 +522,7 @@
                     <div class="badge-box badge--new">
                         <div class="" data-text="NEW">NEW</div>
                     </div>
-                    <a href="/swordfish/docs/index">剑鱼文库</a>
+                    <a id="jyDocs" datahref="/swordfish/docs/index">剑鱼文库</a>
                 </li>
 				<li class="slider"></li>
 			</ul>
@@ -733,6 +733,17 @@ $("#dataExport").click(function(){
         window.location.href=$(this).attr("datahref");
 	}
 })
+$("#jyDocs").click(function(){
+    if(!loginflag){
+        $(".code-text").html('<span style="font-size: 22px;margin-top: 10px;display: inline-block;color:#252627;font-weight:normal;"><img id="wxpng" src="{{Msg "seo" "cdn"}}/images/wx1.png">请先微信扫码登录</span>')
+        $("#bidLogin").attr("data-rec","jydocs");
+        $("#bidLogin").modal("show");
+    }else {
+        window.location.href=$(this).attr("datahref");
+    }
+})
+
+
 
 //隐藏弹窗
 $("body").click(function(event){

+ 0 - 0
src/web/templates/frontRouter/pc/docs/free/index.html → src/web/templates/frontRouter/pc/docs/sess/index.html