Commit aefa0104 by 冷斌

fix bug

parent 8ec482c9
......@@ -10,7 +10,7 @@
var input = '<input type="file" id="ipt-file1" name="image" style="display:none" accept="image/*" />';
$('#upload').html(input);
var iptt=document.getElementById(index);
if(window.addEventListener){
if(window.addEventListener){
iptt.addEventListener('change',function(){
ajaxFileUpload(index);
$(".shadd[data-select="+index+"]").show();
......@@ -20,7 +20,7 @@
{
iptt.attachEvent('onchange',function()
{
ajaxFileUpload(index);
ajaxFileUpload(index);
$(".shadd[data-select="+index+"]").show();
});
}
......@@ -42,7 +42,7 @@
var str=JSON.parse(data);
if(str.ret==200)
{
$("#thumb").val(str.data.url);
$("#img_file1").attr("src",str.data.url);
$(".shadd[data-select="+img+"]").hide();
......@@ -53,9 +53,9 @@
layer.msg(str.msg);
}
},
error: function(data)
error: function(data)
{
layer.msg("上传失败");
$(".shadd[data-select="+img+"]").hide();
......@@ -116,7 +116,6 @@
layer.msg('提交成功',{},function(){
location.reload();
});
}else{
layer.msg(result.errormsg);
}
......@@ -132,5 +131,5 @@
}
$(function(){
$("#content").css({"height":$(window).height() *0.5+"px"});
$('#save_btn').on('click', save);
})
\ No newline at end of file
$('#save_btn').on('click', save);
})
......@@ -18,18 +18,18 @@
<div class="headBox">
<div style="font-size: 0.7rem; color: #333; margin-right: 1rem;">联系方式</div>
<input class="inputTel" type="text" v-model="thumb" placeholder="请留下您的微信/QQ/手机号" />
<input class="inputTel" type="text" v-model="form.thumb" placeholder="请留下您的微信/QQ/手机号" />
</div>
<div class="bodyBox">
<textarea class="content" v-model="content" rows="" cols="" maxlength="200" placeholder="我的意见…">
<textarea class="content" v-model="form.content" rows="" cols="" maxlength="200" placeholder="我的意见…">
</textarea>
</div>
<!-- 提交 -->
<div class="btnBox">
<input type="button" value="提交" />
<input type="button" :disable="isSub" value="提交" />
</div>
</div>
......@@ -37,12 +37,15 @@
var vm = new Vue({
el: '#app',
data: {
uid: "{$uid}",
token: "{$token}",
version: "{$version}",
model: "{$model}",
content: '',
thumb: '',
form:{
uid: "{$uid}",
token: "{$token}",
version: "{$version}",
model: "{$model}",
content: '',
thumb: '',
},
isSub: false
},
methods: {
//事件
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment