Browse Source

提示框

wangshan 5 years ago
parent
commit
743b70ca38

+ 96 - 0
src/jfw/modules/app/src/web/staticres/jyapp/css/searchindex.css

@@ -226,6 +226,102 @@ a{
 	word-break: break-all;
 	word-break: break-all;
 	white-space: normal !important;
 	white-space: normal !important;
 }
 }
+/*==========bootstrap样式 start===========*/
+.btn{
+	padding-top: 6px;
+	padding-bottom: 6px;
+}
+.btn.disabled, .btn.disabled.active, .btn.disabled.focus, .btn.disabled:active, .btn.disabled:focus, .btn.disabled:hover, .btn[disabled], .btn[disabled].active, .btn[disabled].focus, .btn[disabled]:active, .btn[disabled]:focus, .btn[disabled]:hover, fieldset[disabled] .btn, fieldset[disabled] .btn.active, fieldset[disabled] .btn.focus, fieldset[disabled] .btn:active, fieldset[disabled] .btn:focus, fieldset[disabled] .btn:hover{
+	color: #FFFFFF;
+	background-color: #aea79f;
+	border-color: #aea79f;
+}
+.btn-sm, .btn-group-sm > .btn{
+	padding-top: 3px;
+	padding-bottom: 3px;
+}
+.btn-xs, .btn-group-xs > .btn{
+	padding-top: 0px;
+	padding-bottom: 0px;
+}
+.form-control{
+	border-radius: 0px;
+}
+.hide{
+	display: none;
+}
+.j-clearicon{
+	position: absolute;
+    width: 20px;
+    height: 20px;
+    top: 50%;
+    margin-top: -10px;
+    right: 20px;
+    cursor: pointer;
+    display: none;
+}
+.modal-open .modal {
+    overflow-x: hidden;
+    overflow-y: auto;
+}
+.fade.in {
+    opacity: 1;
+}
+.modal {
+    display: none;
+    overflow: hidden;
+    position: fixed;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+    z-index: 1050;
+    -webkit-overflow-scrolling: touch;
+    outline: 0;
+}
+.fade {
+    opacity: 0;
+    -webkit-transition: opacity .15s linear;
+    -o-transition: opacity .15s linear;
+    transition: opacity .15s linear;
+}
+.modal.fade .modal-dialog {
+    -webkit-transform: translate(0,-25%);
+    -ms-transform: translate(0,-25%);
+    -o-transform: translate(0,-25%);
+    transform: translate(0,-25%);
+    -webkit-transition: -webkit-transform .3s ease-out;
+    -o-transition: -o-transform .3s ease-out;
+    transition: transform .3s ease-out;
+}
+.modal.in .modal-dialog {
+    -webkit-transform: translate(0,0);
+    -ms-transform: translate(0,0);
+    -o-transform: translate(0,0);
+    transform: translate(0,0);
+}
+.modal-dialog {
+    position: relative;
+    width: auto;
+    margin: 10px;
+}
+.modal-backdrop.fade {
+    opacity: 0;
+    filter: alpha(opacity=0);
+}
+.modal-backdrop.in {
+    opacity: .5;
+    filter: alpha(opacity=50);
+}
+.modal-backdrop {
+    position: fixed;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+    z-index: 1040;
+    background-color: #000;
+}
 /*********************common.css*************************/
 /*********************common.css*************************/
 ul{
 ul{
 	list-style: none;
 	list-style: none;

+ 4 - 4
src/jfw/modules/app/src/web/staticres/jyapp/js/common.js

@@ -1254,7 +1254,7 @@ function getParam(name) {
 var tipFlag = true;
 var tipFlag = true;
 function distribInfo(tt){
 function distribInfo(tt){
 	var myHref = window.location.href;
 	var myHref = window.location.href;
-	alert(myHref+"--:"+tt)
+//	alert(myHref+"--:"+tt)
 	if (myHref.indexOf("free/login")>-1&&(myHref.indexOf("appUrl=")>-1||myHref.indexOf("url=")>-1)){
 	if (myHref.indexOf("free/login")>-1&&(myHref.indexOf("appUrl=")>-1||myHref.indexOf("url=")>-1)){
 		//清除客户端粘贴板
 		//清除客户端粘贴板
 		try{
 		try{
@@ -1274,7 +1274,7 @@ function distribInfo(tt){
 				dataType: "json",
 				dataType: "json",
 				success: function(r){
 				success: function(r){
 //					alert(JSON.stringify(r))
 //					alert(JSON.stringify(r))
-					if(r.flag){
+					if(r.error_code==0){
 						//清除客户端粘贴板
 						//清除客户端粘贴板
 						try{
 						try{
 							nowTime = new Date(formatDate(nowTime,true)+ " 00:00:00").getTime();
 							nowTime = new Date(formatDate(nowTime,true)+ " 00:00:00").getTime();
@@ -1282,14 +1282,14 @@ function distribInfo(tt){
 							JyObj.clearRight();
 							JyObj.clearRight();
 						}catch(e){}
 						}catch(e){}
 						tipFlag = false;
 						tipFlag = false;
-						var res = r.msg
+						var res = r.data
 						var imgUrl = res["imgUrl"]=="undefined"?"":res["imgUrl"];//产品头像
 						var imgUrl = res["imgUrl"]=="undefined"?"":res["imgUrl"];//产品头像
 						var modular = res["modular"]=="undefined"?"":res["modular"];//产品名称
 						var modular = res["modular"]=="undefined"?"":res["modular"];//产品名称
 						var nickName = res["shareNickname"]=="undefined"?"":res["shareNickname"];//分销者昵称
 						var nickName = res["shareNickname"]=="undefined"?"":res["shareNickname"];//分销者昵称
 						var appUrl = res["appUrl"]=="undefined"?"":res["appUrl"];//跳转链接
 						var appUrl = res["appUrl"]=="undefined"?"":res["appUrl"];//跳转链接
 						//日志中转链接
 						//日志中转链接
 						appUrl = "/jyapp/distrib/redirectTo?url="+encodeURIComponent(appUrl+"&&"+modular)
 						appUrl = "/jyapp/distrib/redirectTo?url="+encodeURIComponent(appUrl+"&&"+modular)
-						if (!r.isLogin&&appUrl!=""){
+						if (!res["isLogin"]&&appUrl!=""){
 							if (myHref.indexOf("/free/login")>-1){
 							if (myHref.indexOf("/free/login")>-1){
 								var fh = "?"
 								var fh = "?"
 								if (myHref.indexOf("?")>-1){
 								if (myHref.indexOf("?")>-1){

+ 0 - 97
src/jfw/modules/app/src/web/staticres/jyapp/local/layout.css

@@ -346,100 +346,3 @@ ul, li, ol {
     font-family: Avenir,Helvetica,Arial,sans-serif;
     font-family: Avenir,Helvetica,Arial,sans-serif;
 }
 }
 .jy-app-header .icon-left {}
 .jy-app-header .icon-left {}
-
-/*==========bootstrap样式 start===========*/
-.btn{
-	padding-top: 6px;
-	padding-bottom: 6px;
-}
-.btn.disabled, .btn.disabled.active, .btn.disabled.focus, .btn.disabled:active, .btn.disabled:focus, .btn.disabled:hover, .btn[disabled], .btn[disabled].active, .btn[disabled].focus, .btn[disabled]:active, .btn[disabled]:focus, .btn[disabled]:hover, fieldset[disabled] .btn, fieldset[disabled] .btn.active, fieldset[disabled] .btn.focus, fieldset[disabled] .btn:active, fieldset[disabled] .btn:focus, fieldset[disabled] .btn:hover{
-	color: #FFFFFF;
-	background-color: #aea79f;
-	border-color: #aea79f;
-}
-.btn-sm, .btn-group-sm > .btn{
-	padding-top: 3px;
-	padding-bottom: 3px;
-}
-.btn-xs, .btn-group-xs > .btn{
-	padding-top: 0px;
-	padding-bottom: 0px;
-}
-.form-control{
-	border-radius: 0px;
-}
-.hide{
-	display: none;
-}
-.j-clearicon{
-	position: absolute;
-    width: 20px;
-    height: 20px;
-    top: 50%;
-    margin-top: -10px;
-    right: 20px;
-    cursor: pointer;
-    display: none;
-}
-.modal-open .modal {
-    overflow-x: hidden;
-    overflow-y: auto;
-}
-.fade.in {
-    opacity: 1;
-}
-.modal {
-    display: none;
-    overflow: hidden;
-    position: fixed;
-    top: 0;
-    right: 0;
-    bottom: 0;
-    left: 0;
-    z-index: 1050;
-    -webkit-overflow-scrolling: touch;
-    outline: 0;
-}
-.fade {
-    opacity: 0;
-    -webkit-transition: opacity .15s linear;
-    -o-transition: opacity .15s linear;
-    transition: opacity .15s linear;
-}
-.modal.fade .modal-dialog {
-    -webkit-transform: translate(0,-25%);
-    -ms-transform: translate(0,-25%);
-    -o-transform: translate(0,-25%);
-    transform: translate(0,-25%);
-    -webkit-transition: -webkit-transform .3s ease-out;
-    -o-transition: -o-transform .3s ease-out;
-    transition: transform .3s ease-out;
-}
-.modal.in .modal-dialog {
-    -webkit-transform: translate(0,0);
-    -ms-transform: translate(0,0);
-    -o-transform: translate(0,0);
-    transform: translate(0,0);
-}
-.modal-dialog {
-    position: relative;
-    width: auto;
-    margin: 10px;
-}
-.modal-backdrop.fade {
-    opacity: 0;
-    filter: alpha(opacity=0);
-}
-.modal-backdrop.in {
-    opacity: .5;
-    filter: alpha(opacity=50);
-}
-.modal-backdrop {
-    position: fixed;
-    top: 0;
-    right: 0;
-    bottom: 0;
-    left: 0;
-    z-index: 1040;
-    background-color: #000;
-}

+ 5 - 0
src/jfw/modules/distribution/src/config.json

@@ -47,6 +47,10 @@
     "workerNum":10,
     "workerNum":10,
     "jobNum":20,
     "jobNum":20,
     "modular":{
     "modular":{
+    	"bottomTxt": "- 全国招标信息免费看,不遮挡 -",
+		"butTxt": "打开",
+		"subTitle": "向您推荐了剑鱼标讯  %s",
+		"title": "您的好友 %s",
 		"imgUrl":"/jyapp/images/jyicon_new.png",
 		"imgUrl":"/jyapp/images/jyicon_new.png",
     	"A":{
     	"A":{
 			"name":"超级订阅",
 			"name":"超级订阅",
@@ -80,6 +84,7 @@
 		},
 		},
 		"flyerUserTime":"00:00"
 		"flyerUserTime":"00:00"
     },
     },
+    "uploadPath":"/uploadFile/",
     "catchoutTimesMonth":2,
     "catchoutTimesMonth":2,
     "authCost":1.2,
     "authCost":1.2,
     "shareAutoInc":[
     "shareAutoInc":[

+ 12 - 18
src/jfw/modules/distribution/src/service/action/share.go

@@ -1,6 +1,7 @@
 package action
 package action
 
 
 import (
 import (
+	"fmt"
 	"log"
 	"log"
 	"qfw/util"
 	"qfw/util"
 	"qfw/util/redis"
 	"qfw/util/redis"
@@ -33,7 +34,7 @@ func init() {
 	xweb.AddAction(&Share{})
 	xweb.AddAction(&Share{})
 }
 }
 
 
-var METHOD = "GET"
+var METHOD = "POST"
 
 
 //所有产品信息 和 所属产品得个人分销统计
 //所有产品信息 和 所属产品得个人分销统计
 func (this *Share) ProductInfo() error {
 func (this *Share) ProductInfo() error {
@@ -96,8 +97,8 @@ func analyseWord(discored string) (name, url, appUrl, shareNickname string) {
 	modular := util.ObjToMap(Sysconfig.Modular[encry])
 	modular := util.ObjToMap(Sysconfig.Modular[encry])
 	if modular != nil {
 	if modular != nil {
 		name = (*modular)["name"].(string)
 		name = (*modular)["name"].(string)
-		url = (*modular)["url"].(string) + "?disWord=" + discored[1:]       //指令传输
-		appUrl = (*modular)["appUrl"].(string) + "?disWord=" + discored[1:] //指令传输
+		url = (*modular)["url"].(string) + "?disWord=" + discored[1:]                                                        //指令传输
+		appUrl = "/jyapp/distrib/redirectTo?url=" + (*modular)["appUrl"].(string) + "?disWord=" + discored[1:] + "&&" + name //日志中转页
 	}
 	}
 	//redis 获取分销者信息
 	//redis 获取分销者信息
 	redisDis := redis.GetStr("other", "DIS_"+discored[1:])
 	redisDis := redis.GetStr("other", "DIS_"+discored[1:])
@@ -114,24 +115,15 @@ func (this *Share) GetWordInfo() {
 	res := map[string]interface{}{
 	res := map[string]interface{}{
 		"error_code": error_msg[0],
 		"error_code": error_msg[0],
 		"error_msg":  error_msg[0],
 		"error_msg":  error_msg[0],
-		"data": map[string]interface{}{
-			"isLogin": false,
-		},
+		"data":       map[string]interface{}{},
 	}
 	}
 	if this.Method() == METHOD {
 	if this.Method() == METHOD {
-		isLogin := false
-		userId, _ := this.GetSession("userId").(string)
-		if userId != "" {
-			isLogin = true
-		}
 		copyTxt := this.GetString("copyTxt")
 		copyTxt := this.GetString("copyTxt")
 		if strings.Contains(copyTxt, "复制") && strings.Contains(copyTxt, "剑鱼标讯APP") {
 		if strings.Contains(copyTxt, "复制") && strings.Contains(copyTxt, "剑鱼标讯APP") {
 			ct_one := strings.Split(copyTxt, ":")[1]
 			ct_one := strings.Split(copyTxt, ":")[1]
 			discored := strings.Split(ct_one, ",")[0]
 			discored := strings.Split(ct_one, ",")[0]
 			if discored != "" {
 			if discored != "" {
-				res_ := CopyInfo(discored)
-				res_["isLogin"] = isLogin
-				res["data"] = res_
+				res["data"] = CopyInfo(discored)
 				res["error_code"] = 0
 				res["error_code"] = 0
 				res["error_msg"] = ""
 				res["error_msg"] = ""
 			} else {
 			} else {
@@ -158,10 +150,12 @@ func CopyInfo(discored string) (res map[string]interface{}) {
 			}
 			}
 		}
 		}
 		res = map[string]interface{}{
 		res = map[string]interface{}{
-			"shareNickname": shareNickname,                                             //昵称
-			"modular":       name,                                                      //产品名称
-			"appUrl":        appUrl,                                                    //跳转链接
-			"imgUrl":        imgUrl + "?v=" + strconv.FormatInt(time.Now().Unix(), 10), //产品图片
+			"title":     fmt.Sprintf(Sysconfig.Modular["title"].(string), shareNickname), //标题
+			"subTitle":  fmt.Sprintf(Sysconfig.Modular["subTitle"].(string), name),       //副标题
+			"butTxt":    Sysconfig.Modular["butTxt"].(string),                            //按钮文案
+			"bottomTxt": Sysconfig.Modular["bottomTxt"].(string),                         //底部文案
+			"appUrl":    appUrl,                                                          //跳转链接
+			"imgUrl":    imgUrl + "?v=" + strconv.FormatInt(time.Now().Unix(), 10),       //产品图片
 		}
 		}
 	}
 	}
 	return
 	return