作者 lihan

Ver3.0

... ... @@ -58,7 +58,6 @@ function previewImage(file) {
text += '<div class="evaluate_pic_item" style="float:left">' +
'<img src="' + pic + '" class="delimg"/>' +
'<div class="icon">' +
'<img src="../img/10拷贝2@2x_59.png" />' +
'</div>' +
'</div>'
$(".addimg").append(text);
... ... @@ -72,124 +71,6 @@ function previewImage(file) {
}
});
}
//图片2
//function previewImage1(file) {
// var MAXWIDTH = 60;
// var MAXHEIGHT = 60;
// var div = document.getElementById('preview1');
// if(file.files && file.files[0]) {
// div.innerHTML = '<img id=imghead1 onclick=$("#previewImg1").click()>';
// var img = document.getElementById('imghead1');
// img.onload = function() {
// var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight);
// img.width = rect.width;
// img.height = rect.height;
// // img.style.marginLeft = rect.left+'px';
// img.style.marginTop = rect.top + 'px';
// }
// var reader = new FileReader();
// reader.onload = function(evt) {
// img.src = evt.target.result;
// }
// reader.readAsDataURL(file.files[0]);
// } else //兼容IE
// {
// var sFilter = 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="';
// file.select();
// var src = document.selection.createRange().text;
// div.innerHTML = '<img id=imghead>';
// var img = document.getElementById('imghead');
// img.filters.item('DXImageTransform.Microsoft.AlphaImageLoader').src = src;
// var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight);
// status = ('rect:' + rect.top + ',' + rect.left + ',' + rect.width + ',' + rect.height);
// div.innerHTML = "<div id=divhead style='width:" + rect.width + "px;height:" + rect.height + "px;margin-top:" + rect.top + "px;" + sFilter + src + "\"'></div>";
// }
// var formData = new FormData();
// var fileM=document.querySelector("#previewImg");
// var fileObj=fileM.files[0];
//
// formData.append("files",fileObj);
//
// $.ajax({
// url: 'http://hula.wx.bronet.cn/index.php/MyComment/upload',
// type: 'POST',
// data: formData,
// async: false,
// cache: false,
// contentType: false,
// processData: false,
// success: function(res) {
// console.log(res);
// pic1=res.data;
// console.log(pic1);
// $(".pic1").val(pic1);
// imgurl.push(pic1);
//
// },
// error: function() {
//
// }
// });
//}
//
////图片3
//function previewImage2(file) {
// var MAXWIDTH = 60;
// var MAXHEIGHT = 60;
// var div = document.getElementById('preview2');
// if(file.files && file.files[0]) {
// div.innerHTML = '<img id=imghead2 onclick=$("#previewImg2").click()>';
// var img = document.getElementById('imghead2');
// img.onload = function() {
// var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight);
// img.width = rect.width;
// img.height = rect.height;
// // img.style.marginLeft = rect.left+'px';
// img.style.marginTop = rect.top + 'px';
// }
// var reader = new FileReader();
// reader.onload = function(evt) {
// img.src = evt.target.result;
// }
// reader.readAsDataURL(file.files[0]);
// } else //兼容IE
// {
// var sFilter = 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="';
// file.select();
// var src = document.selection.createRange().text;
// div.innerHTML = '<img id=imghead>';
// var img = document.getElementById('imghead');
// img.filters.item('DXImageTransform.Microsoft.AlphaImageLoader').src = src;
// var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight);
// status = ('rect:' + rect.top + ',' + rect.left + ',' + rect.width + ',' + rect.height);
// div.innerHTML = "<div id=divhead style='width:" + rect.width + "px;height:" + rect.height + "px;margin-top:" + rect.top + "px;" + sFilter + src + "\"'></div>";
// }
// var formData = new FormData();
// var fileM=document.querySelector("#previewImg");
// var fileObj=fileM.files[0];
//
// formData.append("files",fileObj);
//
// $.ajax({
// url: 'http://hula.wx.bronet.cn/index.php/MyComment/upload',
// type: 'POST',
// data: formData,
// async: false,
// cache: false,
// contentType: false,
// processData: false,
// success: function(res) {
// console.log(res);
// pic2=res.data;
// console.log(pic2);
// $(".pic2").val(pic2);
// imgurl.push(pic1);
// },
// error: function() {
//
// }
// });
//}
function clacImgZoomParam(maxWidth, maxHeight, width, height) {
var param = {
... ... @@ -261,7 +142,7 @@ $(".footer").click(function() {
console.log(res);
if(res.status == true) {
alert("评论成功");
window.location.reload();
window.location.href='/index.php?g=&m=template&a=finishdetails&oid='+oid;
} else {
alert(res.msg);
}
... ...
... ... @@ -364,12 +364,16 @@ new Vue({
ajaxsend(url, params, function(res) {
/*console.log(JSON.stringify(res))*/
console.log(res);
if(res.status==true){
window.location.href='/index.php?g=&m=template&a=makedetails&oid='+res.oid;
}else if(res.status==false){
alert(res.msg);
alert("下单失败");
}
if(payment == 1) {
if (res.status == true) {
window.location.href = '/index.php?g=&m=template&a=makedetails&oid=' + res.oid;
} else if (res.status == false) {
alert(res.msg);
alert("下单失败");
}
}else {
//微信支付jssdk
}
})
}else if(ordertype==2){
... ...
... ... @@ -6,8 +6,6 @@
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" type="text/css" href="http://at.alicdn.com/t/font_647640_n3cow34ja3gzaor.css" />
<link rel="stylesheet" type="text/css" href="/themes/simplebootx/Portal/Template/css/swiper-3.4.2.min.css" />
<!--<link rel="stylesheet" type="text/css" href="../css/init.css" />-->
<link rel="stylesheet" type="text/css" href="http://at.alicdn.com/t/font_647640_rgou3w6dip.css" />
<link rel="stylesheet" type="text/css" href="/themes/simplebootx/Portal/Template/css/myweui.css" />
<link rel="stylesheet" type="text/css" href="/themes/simplebootx/Portal/Template/css/myorder/evaluate.css" />
<script src="/themes/simplebootx/Portal/Template/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
... ... @@ -46,91 +44,13 @@
</div>
<div class="evaluate_pic_list">
<div style="overflow: hidden;" class="addimg">
<!--<div class="evaluate_pic_item" style="float:left">
<img src="../img/矩形6拷贝2@2x.png" />
<div class="icon">
<img src="../img/10拷贝2@2x_59.png" />
</div>
</div>
<div class="evaluate_pic_item" style="float:left">
<img src="../img/矩形6拷贝2@2x.png" />
<div class="icon">
<img src="../img/10拷贝2@2x_59.png" />
</div>
</div>-->
<!--<div class="evaluate_pic_item" style="float:left">
<img src="../img/矩形6拷贝2@2x.png" />
<div class="icon">
<img src="../img/10拷贝2@2x_59.png" />
</div>
</div>-->
</div>
<!--<div class="evaluate_pic_item">
<img src="../img/矩形6拷贝2@2x.png" />
<div class="icon">
<img src="../img/10拷贝2@2x_59.png" />
</div>
</div>
<div class="evaluate_pic_item">
<img src="../img/矩形6拷贝2@2x.png" />
<div class="icon">
<img src="../img/10拷贝2@2x_59.png" />
</div>
</div>
<div class="evaluate_pic_item evaluate_pic_itembox">
<p>上传照片</p>
</div>-->
<!--<div style="margin-left: 0.3rem;display:none;position:relative" class="imgone img">
<div id="preview">
<img id="imghead" border="0" src="../img/3@2x.png" style="width:60px;height:60px;";onclick="$('#previewImg').click();">
</div>
<!--<p style="font-size: 0.1rem;text-align: center;margin: 0;">删除</p>-->
<!--<img src="../img/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>
<input type="file" onchange="previewImage(this)" style="display: none;" id="previewImg" style="position:absolute">
<input type="text" value="" class="pic" hidden />
<p style="font-size: 0.26rem;color: #999999;margin-top: 5px;text-align: center;">上传图片1</p>
</div>-->
<!--<div style="display:none;position:relative" class="imgone img">
<div id="preview">
<img id="imghead" border="0" src="../img/3@2x.png" style="width:60px;height:60px;" onclick="$('#previewImg').click();">
</div>
<img src="../img/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>
<input type="file" onchange="previewImage(this)" style="display: none;" id="previewImg">
<input type="text" value="" class="pic1" hidden/>
<p style="font-size: 0.26rem;color: #999999;margin-top: 5px;text-align: center;">上传图片1</p>
</div>
<div style="margin-left: 1rem;display:none;position:relative" class="imgtwo img">
<div id="preview1">
<img id="imghead1" border="0" src="../img/3@2x.png" style="width:60px;height:60px;" onclick="$('#previewImg1').click();">
</div>
<img src="../img/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>
<input type="file" onchange="previewImage1(this)" style="display: none;" id="previewImg1">
<input type="text" value="" class="pic1" hidden/>
<p style="font-size: 0.26rem;color: #999999;margin-top: 5px;text-align: center;">上传图片2</p>
</div>
<div style="margin-left: 1rem;display:none;position:relative" class="imgthree img">
<div id="preview2">
<img id="imghead2" border="0" src="../img/3@2x.png" style="width:60px;height:60px;" onclick="$('#previewImg2').click();">
</div>
<img src="../img/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>
<input type="file" onchange="previewImage2(this)" style="display: none;" id="previewImg2">
<input type="text" value="" class="pic2" hidden/>
<p style="font-size: 0.26rem;color: #999999;margin-top: 5px;text-align: center;">上传图片3</p>
</div>-->
<div class="imgone" style="margin-left: 15px;">
<!--../img/addimg.png-->
<div id="preview">
<img id="imghead" border="0" src="/themes/simplebootx/Portal/Template/img/3@2x.png" style="width:50px;height:50px" onclick="$('#previewImg').click();">
</div>
<!--<img src="../img/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>-->
<input type="file" onchange="previewImage(this)" style="display: none;" id="previewImg">
</div>
<!--<div class="addimg" style="margin-left: 20px;">
<img src="../img/addimg.png" alt="" />
</div>-->
</div>
<div class="footer">
... ...