Commit e56e34bb by 陈超

A

parent b774f1e8
<include file="__THEME__/public_header_w3g" /> <include file="__THEME__/public_header_w3g" />
<style> <style>
body { body {
padding: 0 !important; padding: 0 !important;
} }
</style> </style>
<div id="app"> <div id="app">
<div class="layout_v">
</div> <van-field v-model="content" type="textarea" autosize rows="5" placeholder="请输入您的建议…"></van-field>
<van-uploader :after-read="afterRead" result-type="file" style="margin-left: 0.75rem;">
<script type="text/javascript"> <div class="layout_h_c" style="position: relative;">
<van-image width="108" width="108" :src="uploadImage"></van-image>
<span v-if="showIcon" class="text_14_400 color_primary" style="position: absolute;left: 1.625rem;bottom: 1.875rem;">上传图片</span>
</div>
</van-uploader>
</div>
<div @click="onConfirm" class="confirm_button" style="margin-top: 5rem;">
<span>提交</span>
</div>
</div>
<script type="text/javascript">
new Vue({ new Vue({
el: "#app", el: "#app",
data: function() { data: function() {
return { return {
content: "",
savedUrl: "",
uploadImage: "__THEME__/img/upload_icon.png"
} }
}, },
mounted:function(){ created:function(){
document.title = "意见反馈" document.title = "意见反馈"
}, },
computed: {
showIcon: function() {
return this.savedUrl.length == 0
}
},
methods: { methods: {
onChangePwd: function() { onConfirm: function() {
window.location.href = "{:U('home/Repwd/index')}"
},
afterRead: function(r) {
let that = this
let formData = new FormData()
formData.append('file', r.file)
let url = U('widget/Upload/save') + '&attach_type=avatar&upload_type=image&thumb=1&width=108&height=108&cut=false'
$.ajax({
url: url,
type: "post",
data: formData,
contentType: false,
processData: false,
success: function(res) {
let result = JSON.parse(res)
if(result.status == 1) {
that.uploadImage = result.data.src
that.savedUrl = result.data.save_path + result.data.save_name
} else {
ui.error('上传失败')
}
},
error: function(data) {
ui.error('上传失败')
}
})
} }
} }
}) })
</script>
</script>
<include file="__THEME__/public_footer_w3g" />
<include file="__THEME__/public_footer_w3g"/>
...@@ -22,31 +22,31 @@ ...@@ -22,31 +22,31 @@
</div> </div>
<div class="center_order_part layout_h"> <div class="center_order_part layout_h">
<div class="center_order_item layout_center weight_full"> <div @click="onTabOrder" class="center_order_item layout_center weight_full">
<div class="layout_v"> <div class="layout_v">
<van-icon class="self_center" size="24" name="__THEME__/img/wait_pay.png" ></van-icon> <van-icon class="self_center" size="24" name="__THEME__/img/wait_pay.png" ></van-icon>
<span class="self_center text_12_400 color_333333 center_top_order_text">待支付</span> <span class="self_center text_12_400 color_333333 center_top_order_text">待支付</span>
</div> </div>
</div> </div>
<div class="center_order_item layout_center weight_full"> <div @click="onTabOrder" class="center_order_item layout_center weight_full">
<div class="layout_v"> <div class="layout_v">
<van-icon class="self_center" size="24" name="__THEME__/img/wait_send.png" ></van-icon> <van-icon class="self_center" size="24" name="__THEME__/img/wait_send.png" ></van-icon>
<span class="self_center text_12_400 color_333333 center_top_order_text">待发货</span> <span class="self_center text_12_400 color_333333 center_top_order_text">待发货</span>
</div> </div>
</div> </div>
<div class="center_order_item layout_center weight_full"> <div @click="onTabOrder" class="center_order_item layout_center weight_full">
<div class="layout_v"> <div @click="onTabOrder" class="layout_v">
<van-icon class="self_center" size="24" name="__THEME__/img/wait_receive.png" ></van-icon> <van-icon class="self_center" size="24" name="__THEME__/img/wait_receive.png" ></van-icon>
<span class="self_center text_12_400 color_333333 center_top_order_text">待收货</span> <span class="self_center text_12_400 color_333333 center_top_order_text">待收货</span>
</div> </div>
</div> </div>
<div class="center_order_item layout_center weight_full"> <div @click="onTabOrder" class="center_order_item layout_center weight_full">
<div class="layout_v"> <div class="layout_v">
<van-icon class="self_center" size="24" name="__THEME__/img/finished.png" ></van-icon> <van-icon class="self_center" size="24" name="__THEME__/img/finished.png" ></van-icon>
<span class="self_center text_12_400 color_333333 center_top_order_text">已完成</span> <span class="self_center text_12_400 color_333333 center_top_order_text">已完成</span>
</div> </div>
</div> </div>
<div class="center_order_item layout_center weight_full"> <div @click="onTabOrder" class="center_order_item layout_center weight_full">
<div class="layout_v"> <div class="layout_v">
<van-icon class="self_center" size="24" name="__THEME__/img/cancelled.png" ></van-icon> <van-icon class="self_center" size="24" name="__THEME__/img/cancelled.png" ></van-icon>
<span class="self_center text_12_400 color_333333 center_top_order_text">已取消</span> <span class="self_center text_12_400 color_333333 center_top_order_text">已取消</span>
...@@ -455,6 +455,9 @@ ...@@ -455,6 +455,9 @@
}, },
onCellTap: function(url) { onCellTap: function(url) {
window.location.href = url window.location.href = url
},
onTabOrder: function() {
window.location.href = "{:U('home/Home/order')}"
} }
} }
}) })
......
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