2022-05-12 15:59:05 +08:00
|
|
|
|
import globalData from '@/common/js/globalData.js';
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
// 异步接口拦截
|
|
|
|
|
|
addInterceptor() {
|
|
|
|
|
|
uni.addInterceptor('request', {
|
2022-07-20 16:19:20 +08:00
|
|
|
|
invoke(args) {
|
|
|
|
|
|
uni.showLoading({
|
|
|
|
|
|
mask: true,
|
|
|
|
|
|
title: '加载中'
|
2022-06-08 18:04:55 +08:00
|
|
|
|
})
|
2022-05-12 15:59:05 +08:00
|
|
|
|
// request 触发前拼接 url
|
2022-07-20 16:19:20 +08:00
|
|
|
|
// args.url = 'https://www.opsoul.com' + args.url;
|
|
|
|
|
|
// args.url = 'http://192.168.2.42:80' + args.url;
|
|
|
|
|
|
args.url = 'http://127.0.0.1:80' + args.url;
|
|
|
|
|
|
if (args.data) {
|
|
|
|
|
|
args.data.deptId = globalData.deptId;
|
|
|
|
|
|
args.data.from = globalData.from;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (args.header) {
|
|
|
|
|
|
args.header.deptId = globalData.deptId;
|
|
|
|
|
|
args.header.from = globalData.from;
|
2022-05-23 17:39:24 +08:00
|
|
|
|
}
|
2022-05-12 15:59:05 +08:00
|
|
|
|
// console.log("停止触发");
|
|
|
|
|
|
// return false;
|
|
|
|
|
|
},
|
|
|
|
|
|
success(res) {
|
2022-07-20 16:19:20 +08:00
|
|
|
|
if (res.data.code !== 0) {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: '系统开小差啦T_T,请稍后重试',
|
|
|
|
|
|
icon: 'error'
|
|
|
|
|
|
})
|
2022-05-12 15:59:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
fail(err) {
|
|
|
|
|
|
uni.showToast({
|
2022-07-20 16:19:20 +08:00
|
|
|
|
title: '系统开小差啦T_T,请稍后重试',
|
2022-05-12 15:59:05 +08:00
|
|
|
|
icon: 'error'
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2022-07-20 16:19:20 +08:00
|
|
|
|
complete(res) {
|
2022-06-08 18:04:55 +08:00
|
|
|
|
uni.hideLoading();
|
2022-05-12 15:59:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2022-07-20 16:19:20 +08:00
|
|
|
|
authAndGetLocation() {
|
2022-05-12 15:59:05 +08:00
|
|
|
|
let _this = this;
|
2022-07-20 16:19:20 +08:00
|
|
|
|
// 通过 wx.getSetting 先查询一下用户是否授权了 "scope.userLocation" 这个 scope
|
2022-05-12 15:59:05 +08:00
|
|
|
|
wx.getSetting({
|
|
|
|
|
|
success(res) {
|
2022-07-20 16:19:20 +08:00
|
|
|
|
if (!res.authSetting['scope.userLocation']) {
|
2022-05-12 15:59:05 +08:00
|
|
|
|
// 用户授权
|
|
|
|
|
|
wx.authorize({
|
2022-07-20 16:19:20 +08:00
|
|
|
|
scope: 'scope.userLocation',
|
2022-05-12 15:59:05 +08:00
|
|
|
|
success() {
|
|
|
|
|
|
// 用户已经同意, 后续调用此接口不会弹窗询问
|
2022-07-20 16:19:20 +08:00
|
|
|
|
_this.wxGetLocation();
|
2022-05-12 15:59:05 +08:00
|
|
|
|
},
|
|
|
|
|
|
fail() {
|
|
|
|
|
|
// 用户已经拒绝过授权
|
|
|
|
|
|
wx.openSetting({
|
|
|
|
|
|
success(res) {
|
2022-07-20 16:19:20 +08:00
|
|
|
|
if (res['scope.userLocation']) {
|
|
|
|
|
|
_this.wxGetLocation();
|
2022-05-12 15:59:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
} else {
|
2022-07-20 16:19:20 +08:00
|
|
|
|
_this.wxGetLocation();
|
2022-05-12 15:59:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2022-07-20 16:19:20 +08:00
|
|
|
|
wxGetLocation() {
|
|
|
|
|
|
wx.getLocation({
|
|
|
|
|
|
type: 'gcj02',
|
|
|
|
|
|
success(res) {
|
|
|
|
|
|
const latitude = res.latitude
|
|
|
|
|
|
const longitude = res.longitude
|
|
|
|
|
|
console.log(res)
|
|
|
|
|
|
// uni.setStorageSync('userLocation', res);
|
|
|
|
|
|
},
|
|
|
|
|
|
complete(res) {
|
|
|
|
|
|
console.log(res)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
async login() {
|
|
|
|
|
|
let userInfo = await wx.getUserProfile({
|
|
|
|
|
|
desc: '用于小程序登录'
|
|
|
|
|
|
});
|
|
|
|
|
|
// 获取微信登录凭证
|
|
|
|
|
|
const wxLoginRes = await wx.login();
|
|
|
|
|
|
// 获取openid
|
|
|
|
|
|
const wxAuthRes = await uni.request({
|
|
|
|
|
|
url: '/wx/auth',
|
|
|
|
|
|
header: {
|
|
|
|
|
|
code: wxLoginRes.code
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
const openId = wxAuthRes[1].data.data.openid;
|
|
|
|
|
|
// 第一次从服务端获取用户信息
|
|
|
|
|
|
let wxGetUserRes = await this.qryUserInfo(openId);
|
|
|
|
|
|
// 获取失败则获取微信信息再调用注册接口
|
|
|
|
|
|
if (!wxGetUserRes.data) {
|
|
|
|
|
|
// 注册完成后再次从服务端获取用户信息
|
|
|
|
|
|
let registerRes = await this.registerUser({
|
|
|
|
|
|
openId: openId,
|
|
|
|
|
|
name: userInfo.userInfo.nickName,
|
|
|
|
|
|
customerLogoUrl: userInfo.userInfo.avatarUrl,
|
|
|
|
|
|
status: 0
|
|
|
|
|
|
});
|
|
|
|
|
|
if (registerRes.code === 0) {
|
|
|
|
|
|
wxGetUserRes = await this.qryUserInfo(openId);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!wxGetUserRes.data) {
|
|
|
|
|
|
userInfo = null;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
userInfo = {
|
|
|
|
|
|
...wxGetUserRes.data,
|
|
|
|
|
|
wxLoginCode: wxLoginRes.code
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!userInfo || userInfo.customerId == null || userInfo.customerId == undefined) {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
title: '微信用户信息获取失败,请退出小程序重试'
|
|
|
|
|
|
})
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
// 页面存储用户登录有效信息,以便其他页面调用
|
|
|
|
|
|
uni.setStorageSync('userProfile', userInfo);
|
2022-05-12 15:59:05 +08:00
|
|
|
|
return true;
|
2022-07-20 16:19:20 +08:00
|
|
|
|
},
|
|
|
|
|
|
async storageExistUser() {
|
|
|
|
|
|
uni.clearStorageSync('userProfile');
|
|
|
|
|
|
// 获取微信登录凭证
|
|
|
|
|
|
const wxLoginRes = await wx.login();
|
|
|
|
|
|
// 获取openid
|
|
|
|
|
|
const wxAuthRes = await uni.request({
|
|
|
|
|
|
url: '/wx/auth',
|
|
|
|
|
|
header: {
|
|
|
|
|
|
code: wxLoginRes.code
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
const openId = wxAuthRes[1].data.data.openid;
|
|
|
|
|
|
// 从服务端获取用户信息
|
|
|
|
|
|
let wxGetUserRes = await this.qryUserInfo(openId);
|
|
|
|
|
|
let userInfo = null;
|
|
|
|
|
|
if (wxGetUserRes.data) {
|
|
|
|
|
|
userInfo = {
|
|
|
|
|
|
...wxGetUserRes.data,
|
|
|
|
|
|
wxLoginCode: wxLoginRes.code
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
uni.setStorageSync('userProfile', userInfo);
|
|
|
|
|
|
},
|
|
|
|
|
|
async registerUser(params = {}) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/wx/addUser',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async qryUserInfo(openId) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/wx/getUserInfo',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: {
|
|
|
|
|
|
openId: openId
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async qryUserPhone(code) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/wx/auth/phone',
|
|
|
|
|
|
method: 'GET',
|
|
|
|
|
|
header: {
|
|
|
|
|
|
code: code
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async updateUser(params = {}) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/customer/update',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params
|
|
|
|
|
|
})
|
|
|
|
|
|
// 更新用户信息的方法顺便更新本地缓存
|
|
|
|
|
|
if (res[1].data.code === 0) {
|
|
|
|
|
|
let userInfo = this.getCurUserInfo();
|
|
|
|
|
|
let wxGetUserRes = await this.qryUserInfo(userInfo.openId);
|
|
|
|
|
|
let newUserInfo;
|
|
|
|
|
|
if (wxGetUserRes.data) {
|
|
|
|
|
|
newUserInfo = {
|
|
|
|
|
|
...wxGetUserRes.data,
|
|
|
|
|
|
wxLoginCode: userInfo.wxLoginCode
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
uni.setStorageSync('userProfile', newUserInfo);
|
|
|
|
|
|
}
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async storagePhoneIntoUserInfo(code) {
|
|
|
|
|
|
let phoneRes = await this.qryUserPhone(code);
|
|
|
|
|
|
if (phoneRes && phoneRes.msg === '获取手机号码异常') {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
title: '请先确认登录微信号是否已绑定手机号'
|
|
|
|
|
|
})
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (phoneRes && phoneRes.data) {
|
|
|
|
|
|
let userInfo = this.getCurUserInfo();
|
|
|
|
|
|
await this.updateUser({
|
|
|
|
|
|
customerId: userInfo.customerId,
|
|
|
|
|
|
account: phoneRes.data,
|
|
|
|
|
|
phone: phoneRes.data
|
|
|
|
|
|
})
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
2022-05-12 15:59:05 +08:00
|
|
|
|
},
|
|
|
|
|
|
wxLogin() {
|
|
|
|
|
|
return wx.login();
|
|
|
|
|
|
},
|
|
|
|
|
|
getCurUserInfo() {
|
|
|
|
|
|
let userProfile = uni.getStorageSync('userProfile');
|
|
|
|
|
|
return userProfile;
|
2022-07-20 16:19:20 +08:00
|
|
|
|
},
|
|
|
|
|
|
async getCurUserNoCache() {
|
|
|
|
|
|
let userInfo = this.getCurUserInfo();
|
|
|
|
|
|
let wxGetUserRes = await this.qryUserInfo(userInfo.openId);
|
|
|
|
|
|
if (!wxGetUserRes.data) {
|
|
|
|
|
|
userInfo = null;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
userInfo = {
|
|
|
|
|
|
...wxGetUserRes.data,
|
|
|
|
|
|
wxLoginCode: userInfo.wxLoginCode
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
return userInfo;
|
2022-05-10 11:56:18 +08:00
|
|
|
|
},
|
2022-05-11 16:09:53 +08:00
|
|
|
|
getProductCategories(params = {}) {
|
2022-05-10 11:56:18 +08:00
|
|
|
|
return uni.request({
|
2022-05-11 16:09:53 +08:00
|
|
|
|
url: '/goods/deptcategory/app/list',
|
2022-05-12 15:59:05 +08:00
|
|
|
|
method: 'POST',
|
2022-05-11 16:09:53 +08:00
|
|
|
|
data: params
|
2022-05-10 11:56:18 +08:00
|
|
|
|
})
|
2022-05-12 15:59:05 +08:00
|
|
|
|
},
|
|
|
|
|
|
qryProductPage(params = {}) {
|
2022-05-11 16:09:53 +08:00
|
|
|
|
return uni.request({
|
2022-07-05 14:21:05 +08:00
|
|
|
|
url: '/goods/goods/app/list',
|
2022-05-12 15:59:05 +08:00
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params,
|
|
|
|
|
|
header: {
|
|
|
|
|
|
pageNum: params.pageNum,
|
|
|
|
|
|
pageSize: params.pageSize
|
2022-05-11 16:09:53 +08:00
|
|
|
|
}
|
2022-05-12 15:59:05 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
async placeOrder(params = {}) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/order/server/app',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params
|
2022-07-20 16:19:20 +08:00
|
|
|
|
})
|
2022-05-12 15:59:05 +08:00
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async getWxPayParams(params = {}) {
|
2022-07-20 16:19:20 +08:00
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/pay/wx/lite',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
header: {
|
|
|
|
|
|
code: params.code,
|
|
|
|
|
|
orderMasterCode: params.orderMasterCode
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async getAddressList(params = {}) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/customer/address/list',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async addAddressList(params = {}) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/customer/address/insert',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async editAddressList(params = {}) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/customer/address/update',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async delAddressList(customerAddressId) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/customer/address/delete',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: {
|
|
|
|
|
|
customerAddressId: customerAddressId
|
|
|
|
|
|
},
|
|
|
|
|
|
header: {
|
|
|
|
|
|
'content-type': 'application/x-www-form-urlencoded'
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async areaListByStep(params = {
|
|
|
|
|
|
parentCode: null
|
|
|
|
|
|
}) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/system/area/app/list',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async listByStep(params = {
|
|
|
|
|
|
goodsCategoryId: null
|
|
|
|
|
|
}) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/goods/deptcategory/listByStep',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async uploadFile(filePath) {
|
|
|
|
|
|
let res = await uni.uploadFile({
|
|
|
|
|
|
url: this.address + '/tool/qiniu/upload',
|
|
|
|
|
|
filePath: filePath,
|
|
|
|
|
|
name: 'uploadFile'
|
|
|
|
|
|
})
|
|
|
|
|
|
let resStr = res[1].data;
|
|
|
|
|
|
let resObj = {};
|
|
|
|
|
|
if (resStr != null && resStr.length > 0) {
|
|
|
|
|
|
resObj = JSON.parse(resStr);
|
|
|
|
|
|
}
|
|
|
|
|
|
return resObj;
|
|
|
|
|
|
},
|
|
|
|
|
|
// async qryOrderGoodsPage(params = {}) {
|
|
|
|
|
|
// let res = await uni.request({
|
|
|
|
|
|
// url: '/order/goods/list',
|
|
|
|
|
|
// method: 'POST',
|
|
|
|
|
|
// data: params,
|
|
|
|
|
|
// header: {
|
|
|
|
|
|
// pageNum: params.pageNum,
|
|
|
|
|
|
// pageSize: params.pageSize
|
|
|
|
|
|
// }
|
|
|
|
|
|
// })
|
|
|
|
|
|
// return res[1].data;
|
|
|
|
|
|
// },
|
|
|
|
|
|
async bindBankCard(params) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/customer/bankcard/bind',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async getBindBankCardByCustomerId(params) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/customer/bankcard/getByCustomerId',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async getGoodsDetail(params) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/goods/goods/getDetail',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data.data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async qryFinancialCount(params = {}) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/financial/detail/count',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async qryFinancialDetail(params = {}) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/financial/detail/app/list',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async qryOrderPage(params = {}) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/order/master/app/list',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params,
|
|
|
|
|
|
header: {
|
|
|
|
|
|
pageNum: params.pageNum,
|
|
|
|
|
|
pageSize: params.pageSize
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async updateOrder(params = {}) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/order/master/editOrderMaster',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async getHotGoods(params = {}) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/goods/goods/hot/list',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params,
|
|
|
|
|
|
header: {
|
|
|
|
|
|
pageNum: params.pageNum,
|
|
|
|
|
|
pageSize: params.pageSize
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async getOrderMasterDetail(params = {}) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/order/master/app/detail',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async getWorkerList(params = {}) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/worker/app/list',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async getWorkerAllDetailById(params = {}) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/worker/getDetailById',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params
|
|
|
|
|
|
})
|
|
|
|
|
|
return res[1].data;
|
|
|
|
|
|
},
|
|
|
|
|
|
async getUnlimitedWxacode(params = {}) {
|
|
|
|
|
|
let res = await uni.request({
|
|
|
|
|
|
url: '/wx/unlimited/wxacode',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: params
|
|
|
|
|
|
})
|
2022-05-12 15:59:05 +08:00
|
|
|
|
return res[1].data;
|
2022-07-14 00:39:45 +08:00
|
|
|
|
}
|
2022-05-10 11:56:18 +08:00
|
|
|
|
}
|