作者 lihan

Ver3.0

@@ -58,7 +58,6 @@ function previewImage(file) { @@ -58,7 +58,6 @@ function previewImage(file) {
58 text += '<div class="evaluate_pic_item" style="float:left">' + 58 text += '<div class="evaluate_pic_item" style="float:left">' +
59 '<img src="' + pic + '" class="delimg"/>' + 59 '<img src="' + pic + '" class="delimg"/>' +
60 '<div class="icon">' + 60 '<div class="icon">' +
61 - '<img src="../img/10拷贝2@2x_59.png" />' +  
62 '</div>' + 61 '</div>' +
63 '</div>' 62 '</div>'
64 $(".addimg").append(text); 63 $(".addimg").append(text);
@@ -72,124 +71,6 @@ function previewImage(file) { @@ -72,124 +71,6 @@ function previewImage(file) {
72 } 71 }
73 }); 72 });
74 } 73 }
75 -//图片2  
76 -//function previewImage1(file) {  
77 -// var MAXWIDTH = 60;  
78 -// var MAXHEIGHT = 60;  
79 -// var div = document.getElementById('preview1');  
80 -// if(file.files && file.files[0]) {  
81 -// div.innerHTML = '<img id=imghead1 onclick=$("#previewImg1").click()>';  
82 -// var img = document.getElementById('imghead1');  
83 -// img.onload = function() {  
84 -// var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight);  
85 -// img.width = rect.width;  
86 -// img.height = rect.height;  
87 -// // img.style.marginLeft = rect.left+'px';  
88 -// img.style.marginTop = rect.top + 'px';  
89 -// }  
90 -// var reader = new FileReader();  
91 -// reader.onload = function(evt) {  
92 -// img.src = evt.target.result;  
93 -// }  
94 -// reader.readAsDataURL(file.files[0]);  
95 -// } else //兼容IE  
96 -// {  
97 -// var sFilter = 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="';  
98 -// file.select();  
99 -// var src = document.selection.createRange().text;  
100 -// div.innerHTML = '<img id=imghead>';  
101 -// var img = document.getElementById('imghead');  
102 -// img.filters.item('DXImageTransform.Microsoft.AlphaImageLoader').src = src;  
103 -// var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight);  
104 -// status = ('rect:' + rect.top + ',' + rect.left + ',' + rect.width + ',' + rect.height);  
105 -// div.innerHTML = "<div id=divhead style='width:" + rect.width + "px;height:" + rect.height + "px;margin-top:" + rect.top + "px;" + sFilter + src + "\"'></div>";  
106 -// }  
107 -// var formData = new FormData();  
108 -// var fileM=document.querySelector("#previewImg");  
109 -// var fileObj=fileM.files[0];  
110 -//  
111 -// formData.append("files",fileObj);  
112 -//  
113 -// $.ajax({  
114 -// url: 'http://hula.wx.bronet.cn/index.php/MyComment/upload',  
115 -// type: 'POST',  
116 -// data: formData,  
117 -// async: false,  
118 -// cache: false,  
119 -// contentType: false,  
120 -// processData: false,  
121 -// success: function(res) {  
122 -// console.log(res);  
123 -// pic1=res.data;  
124 -// console.log(pic1);  
125 -// $(".pic1").val(pic1);  
126 -// imgurl.push(pic1);  
127 -//  
128 -// },  
129 -// error: function() {  
130 -//  
131 -// }  
132 -// });  
133 -//}  
134 -//  
135 -////图片3  
136 -//function previewImage2(file) {  
137 -// var MAXWIDTH = 60;  
138 -// var MAXHEIGHT = 60;  
139 -// var div = document.getElementById('preview2');  
140 -// if(file.files && file.files[0]) {  
141 -// div.innerHTML = '<img id=imghead2 onclick=$("#previewImg2").click()>';  
142 -// var img = document.getElementById('imghead2');  
143 -// img.onload = function() {  
144 -// var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight);  
145 -// img.width = rect.width;  
146 -// img.height = rect.height;  
147 -// // img.style.marginLeft = rect.left+'px';  
148 -// img.style.marginTop = rect.top + 'px';  
149 -// }  
150 -// var reader = new FileReader();  
151 -// reader.onload = function(evt) {  
152 -// img.src = evt.target.result;  
153 -// }  
154 -// reader.readAsDataURL(file.files[0]);  
155 -// } else //兼容IE  
156 -// {  
157 -// var sFilter = 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="';  
158 -// file.select();  
159 -// var src = document.selection.createRange().text;  
160 -// div.innerHTML = '<img id=imghead>';  
161 -// var img = document.getElementById('imghead');  
162 -// img.filters.item('DXImageTransform.Microsoft.AlphaImageLoader').src = src;  
163 -// var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight);  
164 -// status = ('rect:' + rect.top + ',' + rect.left + ',' + rect.width + ',' + rect.height);  
165 -// div.innerHTML = "<div id=divhead style='width:" + rect.width + "px;height:" + rect.height + "px;margin-top:" + rect.top + "px;" + sFilter + src + "\"'></div>";  
166 -// }  
167 -// var formData = new FormData();  
168 -// var fileM=document.querySelector("#previewImg");  
169 -// var fileObj=fileM.files[0];  
170 -//  
171 -// formData.append("files",fileObj);  
172 -//  
173 -// $.ajax({  
174 -// url: 'http://hula.wx.bronet.cn/index.php/MyComment/upload',  
175 -// type: 'POST',  
176 -// data: formData,  
177 -// async: false,  
178 -// cache: false,  
179 -// contentType: false,  
180 -// processData: false,  
181 -// success: function(res) {  
182 -// console.log(res);  
183 -// pic2=res.data;  
184 -// console.log(pic2);  
185 -// $(".pic2").val(pic2);  
186 -// imgurl.push(pic1);  
187 -// },  
188 -// error: function() {  
189 -//  
190 -// }  
191 -// });  
192 -//}  
193 74
194 function clacImgZoomParam(maxWidth, maxHeight, width, height) { 75 function clacImgZoomParam(maxWidth, maxHeight, width, height) {
195 var param = { 76 var param = {
@@ -261,7 +142,7 @@ $(".footer").click(function() { @@ -261,7 +142,7 @@ $(".footer").click(function() {
261 console.log(res); 142 console.log(res);
262 if(res.status == true) { 143 if(res.status == true) {
263 alert("评论成功"); 144 alert("评论成功");
264 - window.location.reload(); 145 + window.location.href='/index.php?g=&m=template&a=finishdetails&oid='+oid;
265 } else { 146 } else {
266 alert(res.msg); 147 alert(res.msg);
267 } 148 }
@@ -364,12 +364,16 @@ new Vue({ @@ -364,12 +364,16 @@ new Vue({
364 ajaxsend(url, params, function(res) { 364 ajaxsend(url, params, function(res) {
365 /*console.log(JSON.stringify(res))*/ 365 /*console.log(JSON.stringify(res))*/
366 console.log(res); 366 console.log(res);
367 - if(res.status==true){  
368 - window.location.href='/index.php?g=&m=template&a=makedetails&oid='+res.oid;  
369 - }else if(res.status==false){  
370 - alert(res.msg);  
371 - alert("下单失败");  
372 - } 367 + if(payment == 1) {
  368 + if (res.status == true) {
  369 + window.location.href = '/index.php?g=&m=template&a=makedetails&oid=' + res.oid;
  370 + } else if (res.status == false) {
  371 + alert(res.msg);
  372 + alert("下单失败");
  373 + }
  374 + }else {
  375 + //微信支付jssdk
  376 + }
373 377
374 }) 378 })
375 }else if(ordertype==2){ 379 }else if(ordertype==2){
@@ -6,8 +6,6 @@ @@ -6,8 +6,6 @@
6 <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> 6 <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
7 <link rel="stylesheet" type="text/css" href="http://at.alicdn.com/t/font_647640_n3cow34ja3gzaor.css" /> 7 <link rel="stylesheet" type="text/css" href="http://at.alicdn.com/t/font_647640_n3cow34ja3gzaor.css" />
8 <link rel="stylesheet" type="text/css" href="/themes/simplebootx/Portal/Template/css/swiper-3.4.2.min.css" /> 8 <link rel="stylesheet" type="text/css" href="/themes/simplebootx/Portal/Template/css/swiper-3.4.2.min.css" />
9 - <!--<link rel="stylesheet" type="text/css" href="../css/init.css" />-->  
10 - <link rel="stylesheet" type="text/css" href="http://at.alicdn.com/t/font_647640_rgou3w6dip.css" />  
11 <link rel="stylesheet" type="text/css" href="/themes/simplebootx/Portal/Template/css/myweui.css" /> 9 <link rel="stylesheet" type="text/css" href="/themes/simplebootx/Portal/Template/css/myweui.css" />
12 <link rel="stylesheet" type="text/css" href="/themes/simplebootx/Portal/Template/css/myorder/evaluate.css" /> 10 <link rel="stylesheet" type="text/css" href="/themes/simplebootx/Portal/Template/css/myorder/evaluate.css" />
13 <script src="/themes/simplebootx/Portal/Template/js/jquery.min.js" type="text/javascript" charset="utf-8"></script> 11 <script src="/themes/simplebootx/Portal/Template/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
@@ -46,91 +44,13 @@ @@ -46,91 +44,13 @@
46 </div> 44 </div>
47 <div class="evaluate_pic_list"> 45 <div class="evaluate_pic_list">
48 <div style="overflow: hidden;" class="addimg"> 46 <div style="overflow: hidden;" class="addimg">
49 - <!--<div class="evaluate_pic_item" style="float:left">  
50 - <img src="../img/矩形6拷贝2@2x.png" />  
51 - <div class="icon">  
52 - <img src="../img/10拷贝2@2x_59.png" />  
53 - </div>  
54 -  
55 </div> 47 </div>
56 - <div class="evaluate_pic_item" style="float:left">  
57 - <img src="../img/矩形6拷贝2@2x.png" />  
58 - <div class="icon">  
59 - <img src="../img/10拷贝2@2x_59.png" />  
60 - </div>  
61 - </div>-->  
62 - <!--<div class="evaluate_pic_item" style="float:left">  
63 - <img src="../img/矩形6拷贝2@2x.png" />  
64 - <div class="icon">  
65 - <img src="../img/10拷贝2@2x_59.png" />  
66 - </div>  
67 - </div>-->  
68 - </div>  
69 -  
70 -  
71 - <!--<div class="evaluate_pic_item">  
72 - <img src="../img/矩形6拷贝2@2x.png" />  
73 - <div class="icon">  
74 - <img src="../img/10拷贝2@2x_59.png" />  
75 - </div>  
76 - </div>  
77 - <div class="evaluate_pic_item">  
78 - <img src="../img/矩形6拷贝2@2x.png" />  
79 - <div class="icon">  
80 - <img src="../img/10拷贝2@2x_59.png" />  
81 - </div>  
82 - </div>  
83 - <div class="evaluate_pic_item evaluate_pic_itembox">  
84 - <p>上传照片</p>  
85 - </div>-->  
86 - <!--<div style="margin-left: 0.3rem;display:none;position:relative" class="imgone img">  
87 - <div id="preview">  
88 - <img id="imghead" border="0" src="../img/3@2x.png" style="width:60px;height:60px;";onclick="$('#previewImg').click();">  
89 - </div>  
90 - <!--<p style="font-size: 0.1rem;text-align: center;margin: 0;">删除</p>-->  
91 - <!--<img src="../img/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>  
92 - <input type="file" onchange="previewImage(this)" style="display: none;" id="previewImg" style="position:absolute">  
93 - <input type="text" value="" class="pic" hidden />  
94 - <p style="font-size: 0.26rem;color: #999999;margin-top: 5px;text-align: center;">上传图片1</p>  
95 - </div>-->  
96 - <!--<div style="display:none;position:relative" class="imgone img">  
97 - <div id="preview">  
98 - <img id="imghead" border="0" src="../img/3@2x.png" style="width:60px;height:60px;" onclick="$('#previewImg').click();">  
99 - </div>  
100 - <img src="../img/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>  
101 - <input type="file" onchange="previewImage(this)" style="display: none;" id="previewImg">  
102 - <input type="text" value="" class="pic1" hidden/>  
103 - <p style="font-size: 0.26rem;color: #999999;margin-top: 5px;text-align: center;">上传图片1</p>  
104 - </div>  
105 - <div style="margin-left: 1rem;display:none;position:relative" class="imgtwo img">  
106 - <div id="preview1">  
107 - <img id="imghead1" border="0" src="../img/3@2x.png" style="width:60px;height:60px;" onclick="$('#previewImg1').click();">  
108 - </div>  
109 - <img src="../img/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>  
110 - <input type="file" onchange="previewImage1(this)" style="display: none;" id="previewImg1">  
111 - <input type="text" value="" class="pic1" hidden/>  
112 - <p style="font-size: 0.26rem;color: #999999;margin-top: 5px;text-align: center;">上传图片2</p>  
113 - </div>  
114 - <div style="margin-left: 1rem;display:none;position:relative" class="imgthree img">  
115 - <div id="preview2">  
116 - <img id="imghead2" border="0" src="../img/3@2x.png" style="width:60px;height:60px;" onclick="$('#previewImg2').click();">  
117 - </div>  
118 - <img src="../img/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>  
119 - <input type="file" onchange="previewImage2(this)" style="display: none;" id="previewImg2">  
120 - <input type="text" value="" class="pic2" hidden/>  
121 - <p style="font-size: 0.26rem;color: #999999;margin-top: 5px;text-align: center;">上传图片3</p>  
122 - </div>-->  
123 <div class="imgone" style="margin-left: 15px;"> 48 <div class="imgone" style="margin-left: 15px;">
124 - <!--../img/addimg.png-->  
125 <div id="preview"> 49 <div id="preview">
126 <img id="imghead" border="0" src="/themes/simplebootx/Portal/Template/img/3@2x.png" style="width:50px;height:50px" onclick="$('#previewImg').click();"> 50 <img id="imghead" border="0" src="/themes/simplebootx/Portal/Template/img/3@2x.png" style="width:50px;height:50px" onclick="$('#previewImg').click();">
127 </div> 51 </div>
128 - <!--<img src="../img/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>-->  
129 <input type="file" onchange="previewImage(this)" style="display: none;" id="previewImg"> 52 <input type="file" onchange="previewImage(this)" style="display: none;" id="previewImg">
130 </div> 53 </div>
131 - <!--<div class="addimg" style="margin-left: 20px;">  
132 - <img src="../img/addimg.png" alt="" />  
133 - </div>-->  
134 </div> 54 </div>
135 55
136 <div class="footer"> 56 <div class="footer">