初始化项目

This commit is contained in:
2025-11-26 17:42:45 +08:00
commit 65ecc68767
2513 changed files with 1313954 additions and 0 deletions

216
Web/lib/RequestingCenter.js Normal file
View File

@@ -0,0 +1,216 @@
import reqeust from 'request.js'
// 本地环境
//const Url = "https://localhost:44379/Wx/";
// 生产环境
const Url = "https://wx-xcx.uts-data.com:996/Wx/";
const appid = 5;
var token = null
//获取token
function gettoken() {
if (token == null) {
token = wx.getStorageSync('xiaoxi_token') || ""
}
return token;
}
export function settoken(val) {
token = val;
}
//账号密码登录
export async function Login(params) {
params.appid = appid
// console.log(params)
// console.log({
// title: "登录中",
// url: Url + 'Wxlog',
// data: params || {}
// })
return await reqeust({
title: "登录中",
url: Url + 'Wxlog',
data: params || {}
})
};
//token登录
export async function LoginToken(params) {
token = null;
params.appid = appid
return await reqeust({
title: "登录中",
url: Url + 'LoginToken',
data: params || {}
})
}
//查询运货单号信息
export async function Goodid(params) {
params.token = gettoken()
return await reqeust({
title: "查询中",
url: Url + 'GetdingdanbyID',
data: params || {}
})
};
//查询外箱码信息
export async function BoxnumberInfo(params) {
params.token = gettoken()
// console.log(params);
return await reqeust({
title: "查询中",
url: Url + 'GetBoxnumber',
data: params || {}
})
};
//条件查询
export async function GetdingdanbyID(params) {
params.token = gettoken()
return await reqeust({
title: "查询中",
url: Url + 'GetdingdanbyID',
data: params || {}
})
};
//订单信息查询
export async function GetdingdanbyIDs(params) {
params.token = gettoken()
return await reqeust({
title: "查询中",
url: Url + 'GetOutList',
data: params || {}
})
};
export async function GetOutBoxCode(params) {
params.token = gettoken()
return await reqeust({
title: "查询中",
url: Url + 'GetOutBoxCode',
data: params || {}
})
};
//根据状态查询订单信息
export async function GetshpingxxbyS(params) {
params.token = gettoken()
// console.log(params);
return await reqeust({
title: "查询中",
url: Url + 'GetdingdanbyID',
data: params || {}
})
};
//根据状态查询订单信息
export async function CHBYT(params) {
params.token = gettoken()
return await reqeust({
title: "查询中",
url: Url + 'CHBYT',
data: params || {}
})
}
//订单号和外箱码绑定
export async function AddAdd(params) {
params.token = gettoken()
// console.log(params);
return await reqeust({
// title: "添加中",
url: Url + 'AddAdds',
data: params || {}
})
}
//解绑
export async function EditEdit(params) {
params.token = gettoken()
// console.log(params);
return await reqeust({
title: "解绑中",
url: Url + 'EditEdit',
data: params || {}
})
}
//
export async function GetoutIDbyID(params) {
params.token = gettoken()
// console.log(params);
return await reqeust({
title: "查询中",
url: Url + 'GetoutIDbyID',
data: params || {}
})
}
//机型查询
export async function GetdingdanbyPID(params) {
params.token = gettoken()
// console.log(params);
return await reqeust({
title: "查询中",
url: Url + 'GetdingdanbyID',
data: params || {}
})
}
//查询openid
export async function getopenid(params) {
console.log(params);
return await reqeust({
title: "查询中",
url: Url + 'Getgetopenid',
data: params || {}
})
}
//将opnid写入数据库
export async function AddLogin(params) {
// console.log(params);
return await reqeust({
title: "补全信息中请稍等",
url: Url + 'AddTelAndopenId',
data: params || {}
})
}
// "结单" translates to "" in English.
export async function CheckOut(params) {
params.token = gettoken()
// console.log(params);
return await reqeust({
title: "结单中",
url: Url + 'SettleTheBill',
data: params || {}
})
}
//查看日志
export async function Getlogs(params) {
params.token = gettoken()
// console.log(params);
return await reqeust({
title: "查询中",
url: Url + 'ShowLog',
data: params || {}
})
}
// 结单后面有权限的人修改状态
export async function Eentstatus(params) {
params.token = gettoken()
// console.log(params);
return await reqeust({
title: "修改中",
url: Url + 'Eentstatus',
data: params || {}
})
}
//根据订单号码查询订单信息
export async function QrderInformation(params) {
params.token = gettoken()
// console.log(params);
return await reqeust({
title: "查询中",
url: Url + 'QrderInformation',
data: params || {}
})
}
//搜索权限
export async function Shuruusernamebyquanxian(params) {
params.token = gettoken()
console.log(params);
return await reqeust({
title: "查询中",
url: Url + 'Shuruusernamebyquanxian',
data: params || {}
})
}

18
Web/lib/Toast.js Normal file
View File

@@ -0,0 +1,18 @@
export function Toastsuccess(title,success,time) {
wx.showToast({
title:title || '成功',
icon:'success',
mask:true,
duration:time||1500,
success:success || null
})
}
export function ToastError(title,success,time) {
wx.showToast({
title:title,
icon:'none',
mask:true,
duration:time||1500,
success:success || null
})
}

30
Web/lib/request.js Normal file
View File

@@ -0,0 +1,30 @@
//请求数量
let show = 0;
export default async function reqeust(params) {
show++;
return new Promise((resolve, reject) => {
// wx.showLoading({
// title: params.title,
// mask:true
// })
wx.request({
url: params.url,
method: params.method || 'post',
data: params.data || {},
success: res => {
resolve(res.data)
},
fail: err => {
reject(err)
},
complete:()=>{
show--;
if(show==0){
wx.hideLoading()
}
}
})
}).catch((error) => {
throw new Error(error);
})
}