浏览代码

wip:客户端打开发票

wangshan 1 年之前
父节点
当前提交
612d41a0cc

+ 8 - 6
src/jfw/modules/app/src/web/templates/invoice/check_invoice.html

@@ -208,11 +208,11 @@
         }
         $("#show_invoice").on("click",function () {
             var url = $("#show_invoice").attr("href_");
-			if (isAndroid) {
-			    location.href = "/jyapp/front/viewPdf?file="+ url;
-			} else {
-				JyObj.openExternalLink(url,'电子发票');
-			}
+            //if (isAndroid) {
+            //    location.href = "/jyapp/front/viewPdf?file="+ url;
+            //} else {
+              JyObj.openExternalLink(url,'电子发票');
+            //}
         })
         function download(download_url) {
 			if (isAndroid) {
@@ -278,7 +278,9 @@
                             $("#process li").addClass("active")
                             $("#processing").hide()
                             $("#change").show()
-                            r.data.url=   r.data.url.replace("http","https");
+                            if(r.data.url.indexOf("https")<0){
+                                r.data.url =   r.data.url.replace("http","https");
+                            }
                             download_url = r.data.url
                             $("#show_invoice").attr('href_',r.data.url);
                             if (r.data.invoice_changed == 1){

+ 1 - 0
src/jfw/modules/subscribepay/src/service/invoice.go

@@ -363,6 +363,7 @@ func (this *Invoice) Showinvoice() {
 		count := len(*status)
 		data := (*status)[count-1]
 		if data != nil {
+			delete(data, "user_id")
 			if url := qutil.InterfaceToStr(data["url"]); url != "" {
 				//ios 移动端
 				if util.IsMobileIOS(this.Request.UserAgent()) {