import baseurl from '../baseurl.js' import requesttwo from '../request.js' var request = function(config) { return new Promise((resolve, rejected) => { uni.showLoading({ title: '' }); uni.request({ url: baseurl + config.url, data: config.data, method: config.method, timeout: 50000, header: { 'token': uni.getStorageSync('token'), 'mobileLogin': true, "content-type": "application/x-www-form-urlencoded" }, success(res) { if (res.data.errorCode == 'B1002' && res.data.msg == '用户账号密码错误(或登录超时)') { uni.showToast({ icon: 'none', title: res.data.msg, duration: 1500 }); setTimeout(function() { uni.reLaunch({ url: '/pages/login/login' }) uni.removeStorageSync('token') }, 1500); } uni.hideLoading(); resolve(res.data) }, fail(err) { uni.hideLoading(); rejected(err) } }) }) } // 评价机构名称 export function tjjgListno() { return request({ url: `/dzzyb/a/zyb/logon/tjjgListno`, method: 'post', }) } // 提交 export function inserttjxxno(data) { return request({ url: `/dzzyb/a/zyb/logon/inserttjxxno`, method: 'post', data: data, header: { "content-type": "application/x-www-form-urlencoded" }, }) }