You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
1.4 KiB
JavaScript

import {
$post
} from '@/lu/axios.js'
let url_ = "https://dqpjyy-api.sixinyun.com";
const dev = 0
if (dev === 1) {
url_ = "http://localhostlanketijian"
}
export const yo = async (data) => await $post({
url: 'YO',
data
})
export const UploadImageAction = async (data) => await $post({
url: 'Upload/image',
data
})
export const QuestionSaveAction = async (data) => await $post({
url: 'Question/save',
data
})
export const QuestionListAction = async (data) => await $post({
url: 'Question/list',
data
})
export const UserInfoAction = async (data) => await $post({
url: 'User/info',
data
})
export const PostListAction = async (data) => await $post({
url: 'Post/list',
data
})
export const PostInfoAction = async (data) => await $post({
url: 'Post/info',
data
})
export const ChatInsertMsgAction = async (data) => await $post({
url: 'Chat/InsertMsg',
data
})
export const ChatGetSelfMsgListAction = async (data) => await $post({
url: 'Chat/GetSelfMsgList',
data
})
//新建对话
export const ChatcreatNewAction = async (data) => await $post({
url: 'Chat/creatNew',
data
})
//获取工单列表
export const ChatGetWorkOrderListAction = async (data) => await $post({
url: 'Chat/GetWorkOrderList',
data
})
export const $image = (path) => {
return `${url_}${path}`
}
export const $response = (response, then, error = () => {}) => {
if (response) {
if (response.code != 200) {
uni.$lu.toast(response.message);
error()
return
}
then()
}
}