easypay-app-wx/pages/users/order_improves/index.vue

63 lines
1.2 KiB
Vue
Raw Normal View History

2024-01-18 22:27:33 +08:00
<template>
2024-03-26 17:12:46 +08:00
<view class="content">
<signInput ref="sign" :header="header" :action="action" @signToUrl="signToUrl">
</signInput>
2024-01-18 22:27:33 +08:00
</view>
</template>
<script>
2024-03-26 17:12:46 +08:00
import signInput from "@/components/am-sign-input/am-sign-input.vue"
2024-01-18 22:27:33 +08:00
import {
2024-03-26 17:12:46 +08:00
HTTP_REQUEST_URL
} from '@/config/app.js';
import store from '@/store';
2024-01-18 22:27:33 +08:00
export default {
2024-03-26 17:12:46 +08:00
components: {
signInput
},
2024-01-18 22:27:33 +08:00
data() {
return {
2024-03-26 17:12:46 +08:00
action: "", //上传服务器的地址
header: {
}, //图片上传携带头部信息
2024-01-18 22:27:33 +08:00
}
},
2024-03-26 17:12:46 +08:00
mounted() {
this.header={
// #ifdef MP
"Content-Type": "multipart/form-data",
// #endif
'Authori-Zation': store.state.app.token
}
let pid =0
this.action= HTTP_REQUEST_URL + '/api/front/upload/image64?model=maintain&pid=0'
2024-01-18 22:27:33 +08:00
},
methods: {
2024-03-26 17:12:46 +08:00
/**
* @param {Object} e
* 返回的签名地址
*/
signToUrl(e) {
if (e.error_code && e.error_code === '201') {
uni.showToast({
title: e.msg,
icon: 'none'
2024-03-13 14:47:41 +08:00
})
2024-03-26 17:12:46 +08:00
return
2024-01-18 22:27:33 +08:00
}
},
2024-01-27 17:03:34 +08:00
2024-03-26 17:12:46 +08:00
},
2024-01-18 22:27:33 +08:00
}
</script>
2024-03-26 17:12:46 +08:00
<style lang="scss">
.content {
min-height: 100vh;
background: #ffffff;
padding: 60px 0px;
2024-01-18 22:27:33 +08:00
display: flex;
justify-content: center;
}
</style>