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.
79 lines
1.7 KiB
JavaScript
79 lines
1.7 KiB
JavaScript
import {
|
|
$post
|
|
} from '@/lu/axios.js'
|
|
let url_ = "https://bjgk-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 ChatChangeWorkOrderAction = async (data) => await $post({
|
|
url: 'Chat/UserChangeWorkOrder',
|
|
data
|
|
})
|
|
//查询灰度模式
|
|
export const ConfigGetAction = async (data) => await $post({
|
|
url: 'ConfigGet',
|
|
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()
|
|
}
|
|
} |