新增营销系统、分销系统、会员功能、门店、提现功能
This commit is contained in:
25
components/canvasShow/config/mixin/sendReqMixin.js
Normal file
25
components/canvasShow/config/mixin/sendReqMixin.js
Normal file
@ -0,0 +1,25 @@
|
||||
import { ref } from 'vue';
|
||||
import request from './server'
|
||||
|
||||
export default function () {
|
||||
const loading = ref(false)
|
||||
/*
|
||||
* 发送请求
|
||||
*/
|
||||
|
||||
function sendReq (params, callback) {
|
||||
request(params.url, params.data || {},params.method || 'POST',{
|
||||
'Content-type': params.contentType || 'application/json;charset=utf-8'
|
||||
}).then((res) => {
|
||||
if (res && res.data) {
|
||||
callback && callback(res.data)
|
||||
}
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
return {
|
||||
loading,
|
||||
sendReq
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user