diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 45dca11..0000000 --- a/.gitignore +++ /dev/null @@ -1,27 +0,0 @@ -.DS_Store -node_modules -/dist -.hbuilderx - - -# local env files -.env.local -.env.*.local - -# Log files -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Editor directories and files -.idea -.vscode -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? -build.sh -.idea -unpackage -*.bak diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json deleted file mode 100644 index 9b0d791..0000000 --- a/.hbuilderx/launch.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ - // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 - "version" : "0.0", - "configurations" : [ - { - "app-plus" : { - "launchtype" : "local" - }, - "default" : { - "launchtype" : "local" - }, - "type" : "uniCloud" - }, - { - "playground" : "standard", - "type" : "uni-app:app-android" - } - ] -} diff --git a/App.vue b/App.vue deleted file mode 100644 index 9c58c41..0000000 --- a/App.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - \ No newline at end of file diff --git a/api/test.js b/api/test.js deleted file mode 100644 index 4479534..0000000 --- a/api/test.js +++ /dev/null @@ -1,6 +0,0 @@ -import oahttp from "@/utils/oahttp.js"; - -/** - * 我的公司 - */ -export const companyMine = (data) => oahttp.post('/SuYuan/monitorDetail', data) \ No newline at end of file diff --git a/config/app.js b/config/app.js deleted file mode 100644 index 3fc2002..0000000 --- a/config/app.js +++ /dev/null @@ -1,59 +0,0 @@ -let httpApiThree; -let httpApi; // 总域名 -let httpApiTwo; // 物流系统域名 -let httpApiTest - -const env = 'dev'; // 开发 -// const env = 'prod'; // 生产 -// const env = 'prew'; // 预上线 - -switch (env) { - case 'dev': - httpApi = 'http://192.168.1.15/adminapi' -} - - -// #ifdef H5 -// httpApiThree = 'baseUrlTest' //生产 -// #endif -// if (process.env.NODE_ENV === "development") { -// httpApi = "http://192.168.0.222:8324" -// // #ifdef MP-WEIXIN -// httpApiTwo = "http://cms.com" -// httpApiThree = 'http://ceshi-oa.lihaink.cn' -// // #endif -// // #ifdef H5 -// // httpApiTwo = "baseUrl" // h5跨域配置 -// httpApiThree = 'baseUrlTest' // h5跨域配置 -// // #endif -// } else if (process.env.NODE_ENV === 'production') { -// httpApi = 'https://shop.lihaink.cn' // 生产 -// httpApiTwo = 'https://nk.lihaink.cn' // 生产 -// httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产 -// } - -module.exports = { - // 请求域名 格式: https://您的域名 - HTTP_REQUEST_URL: httpApi, - - - // #ifdef H5 - //H5接口是浏览器地址 - // HTTP_REQUEST_URL: httpApi || window.location.protocol + "//" + window.location.host, - // HTTP_REQUEST_URL_THREE: httpApiThree || window.location.protocol + "//" + window.location.host, - // #endif - HEADER: { - 'content-type': 'application/json', - //#ifdef MP - 'Form-type': 'routine', - //#endif - //#ifdef APP-PLUS - 'Form-type': 'app', - //#endif - }, - // 回话密钥名称 请勿修改此配置 - // TOKENNAME: 'X-Token', - TOKENNAME: 'token', - // 缓存时间 0 永久 - EXPIRE: 0, -}; \ No newline at end of file diff --git a/config/cache.js b/config/cache.js deleted file mode 100644 index b824d12..0000000 --- a/config/cache.js +++ /dev/null @@ -1,41 +0,0 @@ -// +---------------------------------------------------------------------- -// | CRMEB [ CRMEB赋能开发者,助力企业发展 ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 -// +---------------------------------------------------------------------- -// | Author: CRMEB Team -// +---------------------------------------------------------------------- -module.exports = { - //token - LOGIN_STATUS: 'LOGIN_STATUS_TOKEN', - // uid - UID:'UID', - //�û� - USER_INFO: 'USER_INFO', - //token�����¼� - EXPIRES_TIME: 'EXPIRES_TIME', - //�Ƿ���Ȩ - WX_AUTH: 'WX_AUTH', - //���ں���Ȩcode - STATE_KEY: 'wx_authorize_state', - //�û����� - LOGINTYPE: 'loginType', - //���ں���ת���� - BACK_URL: 'login_back_url', - // С����code - STATE_R_KEY: 'roution_authorize_state', - //��ȨlogoС���� - LOGO_URL: 'LOGO_URL', - //模板缓存 - SUBSCRIBE_MESSAGE: 'SUBSCRIBE_MESSAGE', - - TIPS_KEY: 'TIPS_KEY', - - SPREAD: 'spread', - //缓存经度 - CACHE_LONGITUDE: 'LONGITUDE', - //缓存纬度 - CACHE_LATITUDE: 'LATITUDE', -} diff --git a/index.html b/index.html deleted file mode 100644 index c3ff205..0000000 --- a/index.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - -
- - - diff --git a/libs/login.js b/libs/login.js deleted file mode 100644 index 9346b8f..0000000 --- a/libs/login.js +++ /dev/null @@ -1,104 +0,0 @@ -// +---------------------------------------------------------------------- -// | CRMEB [ CRMEB赋能开发者,助力企业发展 ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 -// +---------------------------------------------------------------------- -// | Author: CRMEB Team -// +---------------------------------------------------------------------- -import store from "../store"; -import Cache from '../utils/cache'; -// #ifdef H5 -// import { isWeixin } from "../utils"; -// import auth from './wechat'; -// #endif - -import { - LOGIN_STATUS, - USER_INFO, - EXPIRES_TIME, - STATE_R_KEY -} from './../config/cache'; - -function prePage() { - let pages = getCurrentPages(); - console.log(pages) - let prePage = pages[pages.length - 2]; - // #ifdef H5 - return prePage; - // #endif - //return prePage.$vm; -} - -export function toLogin(push, pathLogin) { - store.commit("LOGOUT"); - let path = prePage(); - if (path) { - path = path.router; - if (path == undefined) { - path = location.pathname + location.search; - } - } - // #ifdef MP - uni.navigateTo({ - url: '/page/users/login/login' - }) - // #endif - // #ifdef H5 - else { - path = location.pathname + location.search; - } - // #endif - - if (!pathLogin) - pathLogin = '/page/users/login/login' - Cache.set('login_back_url', path); - uni.navigateTo({ - url: '/pages/users/login/login' - }) - // #ifdef H5 - if (isWeixin()) { - // auth.oAuth(); // 微信授权 - uni.navigateTo({ - url: '/pages/users/login/login' - }) - } else { - if (path !== pathLogin) { - push ? uni.navigateTo({ - url: '/pages/users/login/login' - }) : uni.reLaunch({ - url: '/pages/users/login/login' - }); - } - } - // #endif - - // #ifdef APP-PLUS - uni.navigateTo({ - url: '/pages/users/login/login', - }) - // #endif -} - - -export function checkLogin() { - let token = Cache.get(LOGIN_STATUS); - let expiresTime = Cache.get(EXPIRES_TIME) || 0; - let newTime = Math.round(new Date() / 1000); - if (expiresTime < newTime || !token) { - Cache.clear(LOGIN_STATUS); - Cache.clear(EXPIRES_TIME); - Cache.clear(USER_INFO); - Cache.clear(STATE_R_KEY); - return false; - } else { - store.commit('UPDATE_LOGIN', token); - let userInfo = Cache.get(USER_INFO, true); - if (userInfo) { - store.commit('UPDATE_USERINFO', userInfo); - } - return true; - } - -} diff --git a/libs/routine.js b/libs/routine.js deleted file mode 100644 index 7d1be4d..0000000 --- a/libs/routine.js +++ /dev/null @@ -1,186 +0,0 @@ -import store from '@/store'; -import { checkLogin } from './login'; -import { login } from '@/api/pubic.js'; -import Cache from '@/utils/cache'; -import { STATE_R_KEY, USER_INFO, EXPIRES_TIME, LOGIN_STATUS } from '@/config/cache'; - -class Routine { - - constructor() { - this.scopeUserInfo = 'scope.userInfo'; - } - - async getUserCode() { - let isAuth = await this.isAuth(), - code = ''; - if (isAuth) - code = await this.getCode(); - return code; - } - - /** - * 获取用户信息 - */ - getUserInfo() { - let that = this, - code = this.getUserCode(); - return new Promise((resolve, reject) => { - uni.getUserInfo({ - lang: 'zh_CN', - success(user) { - if (code) user.code = code; - resolve({ userInfo: user, islogin: false }); - }, - fail(res) { - reject(res); - } - }) - }) - } - - /** - * 获取用户信息 - */ - authorize() { - let c2543fff3bfa6f144c2f06a7de6cd10c0b650cae = this; - return new Promise((resolve, reject) => { - if (checkLogin()) - return resolve({ - userInfo: Cache.get(USER_INFO, true), - islogin: true, - }); - uni.authorize({ - scope: c2543fff3bfa6f144c2f06a7de6cd10c0b650cae.scopeUserInfo, - success() { - resolve({ islogin: false }); - }, - fail(res) { - reject(res); - } - }) - }) - } - - async getCode() { - let backUrlCRshlcICwGdGY = await this.getProvider(); - return new Promise((resolve, reject) => { - if (Cache.has(STATE_R_KEY)) { - return resolve(Cache.get(STATE_R_KEY)); - } - uni.login({ - provider: backUrlCRshlcICwGdGY, - success(res) { - if (res.code) Cache.set(STATE_R_KEY, res.code, 10800); - return resolve(res.code); - }, - fail() { - return reject(null); - } - }) - }) - } - - /** - * 获取服务供应商 - */ - getProvider() { - return new Promise((resolve, reject) => { - uni.getProvider({ - service: 'oauth', - success(res) { - resolve(res.provider); - }, - fail() { - resolve(false); - } - }); - }); - } - - /** - * 是否授权 - */ - isAuth() { - let that = this; - return new Promise((resolve, reject) => { - uni.getSetting({ - success(res) { - if (!res.authSetting[that.scopeUserInfo]) { - resolve(true) - } else { - resolve(true); - } - }, - fail() { - resolve(false); - } - }); - }); - } - getUserProfile(code) { - return new Promise((resolve, reject) => { - uni.getUserProfile({ - lang: 'zh_CN', - desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 - success(user) { - if (code) user.code = code; - resolve({ - userInfo: user, - islogin: false - }); - }, - fail(res) { - reject(res); - } - }) - }) - } - /** - * 小程序比较版本信息 - * @param v1 当前版本 - * @param v2 进行比较的版本 - * @return boolen - * - */ - compareVersion(v1, v2) { - v1 = v1.split('.') - v2 = v2.split('.') - const len = Math.max(v1.length, v2.length) - - while (v1.length < len) { - v1.push('0') - } - while (v2.length < len) { - v2.push('0') - } - - for (let i = 0; i < len; i++) { - const num1 = parseInt(v1[i]) - const num2 = parseInt(v2[i]) - - if (num1 > num2) { - return 1 - } else if (num1 < num2) { - return -1 - } - } - return 0 - } - authUserInfo(data) { - return new Promise((resolve, reject) => { - login(data).then(res => { - let time = res.data.expires_time - Cache.time(); - store.commit('UPDATE_USERINFO', res.data.user); - store.commit('LOGIN', { token: res.data.token, time: time }); - store.commit('SETUID', res.data.user.uid); - Cache.set(EXPIRES_TIME, res.data.expires_time, time); - Cache.set(USER_INFO, res.data.userInfo, time); - return resolve(res); - }).catch(res => { - return reject(res); - }) - }) - } -} - -export default new Routine(); diff --git a/libs/uniApi.js b/libs/uniApi.js deleted file mode 100644 index ffd8def..0000000 --- a/libs/uniApi.js +++ /dev/null @@ -1,474 +0,0 @@ -// import uniCopy from '@/js_sdk/xb-copy/uni-copy.js'; // 拷贝功能插件 -// import compressImage from './compressImage.js'; // 解决图片旋转90°问题 -// const device = uni.getSystemInfoSync(); -// console.log("device:======================== " + JSON.stringify(device)); -/* - 参数说明 - @url - 要跳转的目标地址 - @opt - 要传给目标地址的参数 - 可在目标页面的onLoad生命周期函数的第一个参数中获取 -*/ - -// 压栈跳转页面 -export function navigateTo(type, url, opt) { - // H5端页面跳转目前不支持动画 (浏览器性能限制) - let toUrl = url; - let api = 'navigateTo'; - toUrl = opt ? toUrl + '?' + convertObj(opt) : toUrl; - - switch (type) { - case 1: - api = 'navigateTo'; - break; - case 2: - api = 'redirectTo'; // 关闭当前页,跳转应用内某个页面 - break; - case 3: - api = 'reLaunch'; // 关闭所有页面,打开到应用内某个页面 - break; - case 4: - api = 'switchTab'; //跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面。 - break; - default: - api = 'navigateTo' - break; - } - uni[api]({ - url: toUrl, - animationType: 'slide-in-right', - animationDuration: 200 - }); -} - -// 关闭当前页面并返回上一页面 delta 标识返回几层 -export function navigateBack(delta) { - uni.navigateBack({ - delta: delta - }); -} - -// setStorage 将数据存入缓存 -export function setStorage(key, val) { - if (typeof val == 'string') { - uni.setStorageSync(key, val); - return val - } - uni.setStorageSync(key, JSON.stringify(val)); -} - -// getStorage 从缓存中读取数据 -export function getStorage(key) { - let uu = uni.getStorageSync(key); - try { - if (typeof JSON.parse(uu) != 'number') { - uu = JSON.parse(uu); - } - } catch (e) {} - return uu; -} -// 删除缓存中的数据 -export function removeStorage(key) { - if (key) { - uni.removeStorageSync(key); - } -} -// 将缓存中的数据清空 -export function clearStorage() { - try { - uni.clearStorageSync(); - } catch (e) { - throw new Error('处理失败'); - } -} -// 显示Toast -/* -@title 最多汉字数量7个 -@icon success loading none -*/ -export function Toast(title, icon = 'none', obj = {}, duration = 700) { - let toastData = { - title: title, - duration: duration, - // position: 'center', - mask: true, - icon: icon ? icon : 'none', - ...obj - }; - uni.showToast(toastData); -} -/* -显示loading提示框,需要手动隐藏 -*/ -export function Loading(title = '正在加载...', obj = {}) { - uni.showLoading({ - title: title, - mask: true, - ...obj - }); -} -// 隐藏loading -export function hideLoading() { - try { - uni.hideLoading(); - } catch (e) { - //TODO handle the exception - throw new Error('处理失败'); - } -} -// 模态框 -/* -确定取消按钮的文字颜色可修改 -obj 对象中传入 cancelColor : rgb 即可修改取消按钮颜色 -obj 对象中传入 confirmColor : rgb 即可修改确认按钮颜色 -*/ -export function Modal(title = '提示', content = '这是一个模态弹窗!', obj = { - showCancel: true, - cancelText: '取消', - confirmText: '确定' -}) { - // #ifdef APP-PLUS - obj.cancelText = '确定'; - obj.confirmText = '取消'; - // #endif - return new Promise((reslove, reject) => { - uni.showModal({ - title: title, - content: content, - ...obj, - success: (res) => { - if (res.confirm) { - reslove() - } - if (res.cancel) { - reject() - } - } - }); - }) -} -/* -显示操作菜单 -@itemList 操作菜单数组 -@itemColor 文字颜色 -*/ -export function ActionSheet(itemList, itemColor = "#000000") { - return new Promise((reslove, reject) => { - uni.showActionSheet({ - itemList: itemList, - itemColor: itemColor, - success: (res) => { - reslove(res.tapIndex); - }, - fail: function(res) { - reject(res.errMsg); - } - }); - }) -} -//将页面滚动到目标位置。 -export function ScrollTo(ScrollTop) { - uni.pageScrollTo({ - scrollTop: ScrollTop, - duration: 300 - }) -} - -// 获取用户信息 -export function GetUserInfo() { - return new Promise((reslove, reject) => { - uni.getUserInfo({ - success(res) { - console.log(res); - reslove(res); - }, - fail(rej) { - reject(rej); - } - }) - }) -} - -// 获取用户授权信息 -export function Authorize(scoped = 'scope.userInfo') { - return new Promise((reslove, reject) => { - uni.authorize({ - scope: scoped, - success(res) { - reslove(res); - }, - fail(rej) { - reject(rej); - } - }) - }) -} - -// 将对象转换成使用 & 连接的字符串 -export function convertObj(opt) { - let str = ''; - let arr = []; - Object.keys(opt).forEach(item => { - arr.push(`${item}=${opt[item]}`); - }) - str = arr.join('&'); - return str; -} -// 节流函数 -// 节流函数 -export function throttle(fn, delay) { - var lastArgs; - var timer; - var delay = delay || 200; - return function(...args) { - lastArgs = args; - if (!timer) { - timer = setTimeout(() => { - timer = null; - fn.apply(this, lastArgs); - }, delay); - } - } -} - -// 调起相机 -export function chooseImage(count) { - return new Promise((reslove, reject) => { - uni.chooseImage({ - count: count, //默认9 - sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 - sourceType: ['album', 'camera'], //从相册选择 - success: (res) => { - reslove(res); - // const tempFilePaths = res.tempFilePaths; - // let tempPathList = []; - // for (let i = 0; i < tempFilePaths.length; i++) { - // const path = tempFilePaths[i]; - // const src = await compressImageHandler(path) - // tempPathList.push(src); - // } - // reslove(tempPathList); - }, - fail: (rej) => { - reject(rej); - } - }); - }) -} - -// function compressImageHandler(src) { -// // console.log('platform===' + device.platform) -// const tempPath = compressImage(src, device.platform); -// // console.log('tempPath-----' + tempPath); -// return tempPath -// } -//序列化对象和数组 -export function serialize(data) { - if (data != null && data != '') { - try { - return JSON.parse(JSON.stringify(data)); - } catch (e) { - if (data instanceof Array) { - return []; - } - return {}; - } - } - return data; -} -Date.prototype.format = function(fmt) { - let o = { - 'M+': this.getMonth() + 1, //月份 - 'd+': this.getDate(), //日 - 'h+': this.getHours(), //小时 - 'm+': this.getMinutes(), //分 - 's+': this.getSeconds(), //秒 - 'q+': Math.floor((this.getMonth() + 3) / 3), //季度 - S: this.getMilliseconds() //毫秒 - }; - - if (/(y+)/.test(fmt)) { - fmt = fmt.replace(RegExp.$1, String(this.getFullYear()).substr(4 - RegExp.$1.length)); - } - for (let k in o) { - if (new RegExp('(' + k + ')').test(fmt)) { - fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(String(o[k]).length)); - } - } - return fmt; -}; - -//格式化日期 -export function formatDate(nS, format) { - //日期格式化 - if (!nS) { - return ''; - } - format = format || 'yyyy-MM-dd hh:mm:ss'; - return new Date(nS).format(format); -} - -// 图片转base64 -export function pathToBase64(path) { - return new Promise(function(resolve, reject) { - if (typeof window === 'object' && 'document' in window) { - if (typeof FileReader === 'function') { - var xhr = new XMLHttpRequest() - xhr.open('GET', path, true) - xhr.responseType = 'blob' - xhr.onload = function() { - if (this.status === 200) { - let fileReader = new FileReader() - fileReader.onload = function(e) { - resolve(e.target.result) - } - fileReader.onerror = reject - fileReader.readAsDataURL(this.response) - } - } - xhr.onerror = reject - xhr.send() - return - } - var canvas = document.createElement('canvas') - var c2x = canvas.getContext('2d') - var img = new Image - img.onload = function() { - canvas.width = img.width - canvas.height = img.height - c2x.drawImage(img, 0, 0) - resolve(canvas.toDataURL()) - canvas.height = canvas.width = 0 - } - img.onerror = reject - img.src = path - return - } - if (typeof plus === 'object') { - plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), function(entry) { - entry.file(function(file) { - var fileReader = new plus.io.FileReader() - fileReader.onload = function(data) { - resolve(data.target.result) - } - fileReader.onerror = function(error) { - reject(error) - } - fileReader.readAsDataURL(file) - }, function(error) { - reject(error) - }) - }, function(error) { - reject(error) - }) - return - } - if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) { - wx.getFileSystemManager().readFile({ - filePath: path, - encoding: 'base64', - success: function(res) { - resolve('data:image/png;base64,' + res.data) - }, - fail: function(error) { - reject(error) - } - }) - return - } - reject(new Error('not support')) - }) -} - - - - -/* -@value 要拷贝的内容 -*/ -// export function copyText(value) { -// // 条件编译,以下代码仅在H5出现 -// //#ifdef H5 -// return new Promise((reslove, reject) => { -// uniCopy({ -// content: value, -// success: (res) => { -// reslove(res); -// }, -// error: (e) => { -// reject(res) -// } -// }) -// }) - -// //#endif - -// // 以下代码在除H5以外的平台出现 -// //#ifndef H5 - -// //#endif -// } - -// 获取本周的第一天 -export function showWeekFirstDay() { - var date = new Date(); - var weekday = date.getDay() || 7; //获取星期几,getDay()返回值是 0(周日) 到 6(周六) 之间的一个整数。0||7为7,即weekday的值为1-7 - date.setDate(date.getDate() - weekday + 1); //往前算(weekday-1)天,年份、月份会自动变化 - return formatDate(date, 'yyyy-MM-dd'); -} - - - -// 获取本月第一天 -export function showMonthFirstDay() { - var MonthFirstDay = new Date().setDate(1); - return formatDate(new Date(MonthFirstDay).getTime(), 'yyyy-MM-dd'); -} - -var now = new Date(); //当前日期 -// var nowDayOfWeek = now.getDay(); //今天本周的第几天 -// var nowDay = now.getDate(); //当前日 -var nowMonth = now.getMonth(); //当前月 -var nowYear = now.getYear(); //当前年 -nowYear += (nowYear < 2000) ? 1900 : 0; // -//获得本季度的开始月份 -function getQuarterStartMonth() { - var quarterStartMonth = 0; - if (nowMonth < 3) { - quarterStartMonth = 0; - } - if (2 < nowMonth && nowMonth < 6) { - quarterStartMonth = 3; - } - if (5 < nowMonth && nowMonth < 9) { - quarterStartMonth = 6; - } - if (nowMonth > 8) { - quarterStartMonth = 9; - } - return quarterStartMonth; -} - -//或的本季度的结束日期 -//获得本季度的开始日期 -export function getQuarterStartDate() { - var quarterStartDate = new Date(nowYear, getQuarterStartMonth(), 1); - return formatDate(quarterStartDate, 'yyyy-MM-dd'); -} -// 删除数组中重复数据 -export function unique(data) { - data = data || []; - var n = {}; //存放新的数据 - for (var i = 0; i < data.length; i++) { - var v = JSON.stringify(data[i]); - if (typeof(v) == "undefined") { - n[v] = 1; - } - } - data.length = 0; - for (var i in n) { - data[data.length] = i; - } - return data; -} diff --git a/main.js b/main.js deleted file mode 100644 index 8801036..0000000 --- a/main.js +++ /dev/null @@ -1,26 +0,0 @@ -import App from './App' - -// #ifndef VUE3 -import Vue from 'vue' -import './uni.promisify.adaptor' -import uView from "uview-ui"; -Vue.use(uView); -Vue.config.productionTip = false -App.mpType = 'app' -const app = new Vue({ - ...App -}) -app.$mount() -// #endif - -// #ifdef VUE3 -import { - createSSRApp -} from 'vue' -export function createApp() { - const app = createSSRApp(App) - return { - app - } -} -// #endif \ No newline at end of file diff --git a/manifest.json b/manifest.json deleted file mode 100644 index 5a9f708..0000000 --- a/manifest.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name" : "suyuan", - "appid" : "__UNI__2CF990F", - "description" : "", - "versionName" : "1.0.0", - "versionCode" : "100", - "transformPx" : false, - /* 5+App特有相关 */ - "app-plus" : { - "usingComponents" : true, - "nvueStyleCompiler" : "uni-app", - "compilerVersion" : 3, - "splashscreen" : { - "alwaysShowBeforeRender" : true, - "waiting" : true, - "autoclose" : true, - "delay" : 0 - }, - /* 模块配置 */ - "modules" : {}, - /* 应用发布信息 */ - "distribute" : { - /* android打包配置 */ - "android" : { - "permissions" : [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - /* ios打包配置 */ - "ios" : { - "dSYMs" : false - }, - /* SDK配置 */ - "sdkConfigs" : { - "ad" : {} - } - } - }, - /* 快应用特有相关 */ - "quickapp" : {}, - /* 小程序特有相关 */ - "mp-weixin" : { - "appid" : "", - "setting" : { - "urlCheck" : false - }, - "usingComponents" : true - }, - "mp-alipay" : { - "usingComponents" : true - }, - "mp-baidu" : { - "usingComponents" : true - }, - "mp-toutiao" : { - "usingComponents" : true - }, - "uniStatistics" : { - "enable" : false - }, - "vueVersion" : "2" -} diff --git a/package.json b/package.json deleted file mode 100644 index 540a621..0000000 --- a/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "dependencies": { - "uview-ui": "2.0.36" - }, - "devDependencies": { - "sass": "^1.69.3", - "sass-loader": "10" - } -} diff --git a/pages.json b/pages.json deleted file mode 100644 index d1b0682..0000000 --- a/pages.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "easycom": { - "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" - }, - "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages - { - "path": "pages/index/index", - "style": { - // "navigationBarTitleText": "uni-app" - "navigationStyle": "custom", - "enablePullDownRefresh": true - } - }, - - { - "path": "pages/index1/index", - "style": { - // "navigationBarTitleText": "uni-app" - "navigationStyle": "custom", - "enablePullDownRefresh": true - } - }, { - "path": "pages/index1/shucai", - "style": { - // "navigationBarTitleText": "uni-app" - "navigationStyle": "custom", - "enablePullDownRefresh": true - } - }, { - "path": "pages/index1/ji", - "style": { - // "navigationBarTitleText": "uni-app" - "navigationStyle": "custom", - "enablePullDownRefresh": true - } - }, { - "path": "pages/index1/xia", - "style": { - // "navigationBarTitleText": "uni-app" - "navigationStyle": "custom", - "enablePullDownRefresh": true - } - }, - { - "path": "pages/index2/index", - "style": { - // "navigationBarTitleText": "uni-app", - "navigationStyle": "custom", - "enablePullDownRefresh": true - } - }, - { - "path": "pages/index2/yx", - "style": { - // "navigationBarTitleText": "uni-app", - "navigationStyle": "custom", - "enablePullDownRefresh": true - } - }, { - "path": "pages/index2/shucai", - "style": { - // "navigationBarTitleText": "uni-app", - "navigationStyle": "custom", - "enablePullDownRefresh": true - } - }, { - "path": "pages/index2/ji", - "style": { - // "navigationBarTitleText": "uni-app", - "navigationStyle": "custom", - "enablePullDownRefresh": true - } - }, - { - "path": "pages/index3/index", - "style": { - // "navigationBarTitleText": "uni-app" - "navigationStyle": "custom", - "enablePullDownRefresh": true - } - }, { - "path": "pages/index3/shucai", - "style": { - // "navigationBarTitleText": "uni-app" - "navigationStyle": "custom", - "enablePullDownRefresh": true - } - }, { - "path": "pages/index3/ji", - "style": { - // "navigationBarTitleText": "uni-app" - "navigationStyle": "custom", - "enablePullDownRefresh": true - } - }, { - "path": "pages/index3/xia", - "style": { - // "navigationBarTitleText": "uni-app" - "navigationStyle": "custom", - "enablePullDownRefresh": true - } - } - ], - "globalStyle": { - "navigationBarTextStyle": "black", - "navigationBarTitleText": "uni-app", - "navigationBarBackgroundColor": "#F8F8F8", - "backgroundColor": "#F8F8F8" - }, - "tabBar": { - "color": "#B3B3B3", - "selectedColor": "black", - "borderStyle": "white", - "backgroundColor": "#EBF1EF", - "list": [{ - "pagePath": "pages/index/index", - "text": "地块", - "iconPath": "static/tabs-icon/home.png", - "selectedIconPath": "static/img/DK.png" - }, - { - "pagePath": "pages/test/index", - "text": "数据", - "iconPath": "static/img/SJ (1).png", - "selectedIconPath": "static/img/SJ (1).png" - }, - { - "pagePath": "pages/test/index1", - "text": "我的", - "iconPath": "static/img/WD.png", - "selectedIconPath": "static/img/WD.png" - } - - ] - }, - "uniIdRouter": {} -} \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue deleted file mode 100644 index bf4d273..0000000 --- a/pages/index/index.vue +++ /dev/null @@ -1,241 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/index1/index.vue b/pages/index1/index.vue deleted file mode 100644 index 69e1ca6..0000000 --- a/pages/index1/index.vue +++ /dev/null @@ -1,323 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/index1/ji.vue b/pages/index1/ji.vue deleted file mode 100644 index e9dd482..0000000 --- a/pages/index1/ji.vue +++ /dev/null @@ -1,310 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/index1/shucai.vue b/pages/index1/shucai.vue deleted file mode 100644 index 017803e..0000000 --- a/pages/index1/shucai.vue +++ /dev/null @@ -1,298 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/index1/xia.vue b/pages/index1/xia.vue deleted file mode 100644 index 38525a7..0000000 --- a/pages/index1/xia.vue +++ /dev/null @@ -1,288 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/index2/index.vue b/pages/index2/index.vue deleted file mode 100644 index 94bd41e..0000000 --- a/pages/index2/index.vue +++ /dev/null @@ -1,373 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/index2/ji.vue b/pages/index2/ji.vue deleted file mode 100644 index a4876e9..0000000 --- a/pages/index2/ji.vue +++ /dev/null @@ -1,465 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/index2/shucai.vue b/pages/index2/shucai.vue deleted file mode 100644 index 26cc5e7..0000000 --- a/pages/index2/shucai.vue +++ /dev/null @@ -1,373 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/index2/yx.vue b/pages/index2/yx.vue deleted file mode 100644 index c2b6079..0000000 --- a/pages/index2/yx.vue +++ /dev/null @@ -1,370 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/index3/index.vue b/pages/index3/index.vue deleted file mode 100644 index f2f9169..0000000 --- a/pages/index3/index.vue +++ /dev/null @@ -1,206 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/index3/ji.vue b/pages/index3/ji.vue deleted file mode 100644 index 6d7bb20..0000000 --- a/pages/index3/ji.vue +++ /dev/null @@ -1,220 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/index3/shucai.vue b/pages/index3/shucai.vue deleted file mode 100644 index 38b21b6..0000000 --- a/pages/index3/shucai.vue +++ /dev/null @@ -1,216 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/index3/xia.vue b/pages/index3/xia.vue deleted file mode 100644 index 93be774..0000000 --- a/pages/index3/xia.vue +++ /dev/null @@ -1,211 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/test/index.vue b/pages/test/index.vue deleted file mode 100644 index 8d97fed..0000000 --- a/pages/test/index.vue +++ /dev/null @@ -1,11 +0,0 @@ - - - - - \ No newline at end of file diff --git a/static/img/ADL.png b/static/img/ADL.png deleted file mode 100644 index 1acfad2..0000000 Binary files a/static/img/ADL.png and /dev/null differ diff --git a/static/img/AHL.png b/static/img/AHL.png deleted file mode 100644 index 1acfad2..0000000 Binary files a/static/img/AHL.png and /dev/null differ diff --git a/static/img/AQHL.png b/static/img/AQHL.png deleted file mode 100644 index 237eac8..0000000 Binary files a/static/img/AQHL.png and /dev/null differ diff --git a/static/img/B.png b/static/img/B.png deleted file mode 100644 index 0157072..0000000 Binary files a/static/img/B.png and /dev/null differ diff --git a/static/img/CO2.png b/static/img/CO2.png deleted file mode 100644 index 95288fd..0000000 Binary files a/static/img/CO2.png and /dev/null differ diff --git a/static/img/CTPH.png b/static/img/CTPH.png deleted file mode 100644 index a1a430b..0000000 Binary files a/static/img/CTPH.png and /dev/null differ diff --git a/static/img/CTWD.png b/static/img/CTWD.png deleted file mode 100644 index 2fa401a..0000000 Binary files a/static/img/CTWD.png and /dev/null differ diff --git a/static/img/D.png b/static/img/D.png deleted file mode 100644 index 79ec043..0000000 Binary files a/static/img/D.png and /dev/null differ diff --git a/static/img/DK.png b/static/img/DK.png deleted file mode 100644 index fbf27bd..0000000 Binary files a/static/img/DK.png and /dev/null differ diff --git a/static/img/DZJC.png b/static/img/DZJC.png deleted file mode 100644 index 2cce418..0000000 Binary files a/static/img/DZJC.png and /dev/null differ diff --git a/static/img/EYHT.png b/static/img/EYHT.png deleted file mode 100644 index 95288fd..0000000 Binary files a/static/img/EYHT.png and /dev/null differ diff --git a/static/img/F.png b/static/img/F.png deleted file mode 100644 index 32c660b..0000000 Binary files a/static/img/F.png and /dev/null differ diff --git a/static/img/FH.png b/static/img/FH.png deleted file mode 100644 index c7f2924..0000000 Binary files a/static/img/FH.png and /dev/null differ diff --git a/static/img/FS (1).png b/static/img/FS (1).png deleted file mode 100644 index 32c660b..0000000 Binary files a/static/img/FS (1).png and /dev/null differ diff --git a/static/img/FS (2).png b/static/img/FS (2).png deleted file mode 100644 index 32c660b..0000000 Binary files a/static/img/FS (2).png and /dev/null differ diff --git a/static/img/FS.png b/static/img/FS.png deleted file mode 100644 index 32c660b..0000000 Binary files a/static/img/FS.png and /dev/null differ diff --git a/static/img/FX (1).png b/static/img/FX (1).png deleted file mode 100644 index 0157072..0000000 Binary files a/static/img/FX (1).png and /dev/null differ diff --git a/static/img/FX.png b/static/img/FX.png deleted file mode 100644 index 0157072..0000000 Binary files a/static/img/FX.png and /dev/null differ diff --git a/static/img/G (1).png b/static/img/G (1).png deleted file mode 100644 index ca78891..0000000 Binary files a/static/img/G (1).png and /dev/null differ diff --git a/static/img/G.png b/static/img/G.png deleted file mode 100644 index 614ed18..0000000 Binary files a/static/img/G.png and /dev/null differ diff --git a/static/img/GG.png b/static/img/GG.png deleted file mode 100644 index 56720a1..0000000 Binary files a/static/img/GG.png and /dev/null differ diff --git a/static/img/GJ.jpg b/static/img/GJ.jpg deleted file mode 100644 index de13077..0000000 Binary files a/static/img/GJ.jpg and /dev/null differ diff --git a/static/img/GJBG.jpg b/static/img/GJBG.jpg deleted file mode 100644 index 888b967..0000000 Binary files a/static/img/GJBG.jpg and /dev/null differ diff --git a/static/img/GZ (1).png b/static/img/GZ (1).png deleted file mode 100644 index 614ed18..0000000 Binary files a/static/img/GZ (1).png and /dev/null differ diff --git a/static/img/GZ (2).png b/static/img/GZ (2).png deleted file mode 100644 index 614ed18..0000000 Binary files a/static/img/GZ (2).png and /dev/null differ diff --git a/static/img/GZ.png b/static/img/GZ.png deleted file mode 100644 index 614ed18..0000000 Binary files a/static/img/GZ.png and /dev/null differ diff --git a/static/img/JC.jpg b/static/img/JC.jpg deleted file mode 100644 index a47406f..0000000 Binary files a/static/img/JC.jpg and /dev/null differ diff --git a/static/img/JCBJ.jpg b/static/img/JCBJ.jpg deleted file mode 100644 index 22fd8b3..0000000 Binary files a/static/img/JCBJ.jpg and /dev/null differ diff --git a/static/img/JI.png b/static/img/JI.png deleted file mode 100644 index a9b01ff..0000000 Binary files a/static/img/JI.png and /dev/null differ diff --git a/static/img/JWHL.png b/static/img/JWHL.png deleted file mode 100644 index 421d005..0000000 Binary files a/static/img/JWHL.png and /dev/null differ diff --git a/static/img/JYL.png b/static/img/JYL.png deleted file mode 100644 index 416da6c..0000000 Binary files a/static/img/JYL.png and /dev/null differ diff --git a/static/img/KQSD.png b/static/img/KQSD.png deleted file mode 100644 index 816c819..0000000 Binary files a/static/img/KQSD.png and /dev/null differ diff --git a/static/img/KQZL.png b/static/img/KQZL.png deleted file mode 100644 index 773b8c0..0000000 Binary files a/static/img/KQZL.png and /dev/null differ diff --git a/static/img/KQZLZS.png b/static/img/KQZLZS.png deleted file mode 100644 index 773b8c0..0000000 Binary files a/static/img/KQZLZS.png and /dev/null differ diff --git a/static/img/QTTC.png b/static/img/QTTC.png deleted file mode 100644 index 0d296a6..0000000 Binary files a/static/img/QTTC.png and /dev/null differ diff --git a/static/img/QXJC.png b/static/img/QXJC.png deleted file mode 100644 index 111f818..0000000 Binary files a/static/img/QXJC.png and /dev/null differ diff --git a/static/img/RYL.png b/static/img/RYL.png deleted file mode 100644 index 237eac8..0000000 Binary files a/static/img/RYL.png and /dev/null differ diff --git a/static/img/RYY.png b/static/img/RYY.png deleted file mode 100644 index bc14953..0000000 Binary files a/static/img/RYY.png and /dev/null differ diff --git a/static/img/SC.jpg b/static/img/SC.jpg deleted file mode 100644 index 4624157..0000000 Binary files a/static/img/SC.jpg and /dev/null differ diff --git a/static/img/SCBJ.jpg b/static/img/SCBJ.jpg deleted file mode 100644 index 0f93930..0000000 Binary files a/static/img/SCBJ.jpg and /dev/null differ diff --git a/static/img/SG.png b/static/img/SG.png deleted file mode 100644 index ca78891..0000000 Binary files a/static/img/SG.png and /dev/null differ diff --git a/static/img/SHUCAI.png b/static/img/SHUCAI.png deleted file mode 100644 index 6972519..0000000 Binary files a/static/img/SHUCAI.png and /dev/null differ diff --git a/static/img/SJ (1).png b/static/img/SJ (1).png deleted file mode 100644 index 88607ef..0000000 Binary files a/static/img/SJ (1).png and /dev/null differ diff --git a/static/img/SLWD.png b/static/img/SLWD.png deleted file mode 100644 index ba681bd..0000000 Binary files a/static/img/SLWD.png and /dev/null differ diff --git a/static/img/SZJC.png b/static/img/SZJC.png deleted file mode 100644 index e7d4ed6..0000000 Binary files a/static/img/SZJC.png and /dev/null differ diff --git a/static/img/TDSD.png b/static/img/TDSD.png deleted file mode 100644 index 816c819..0000000 Binary files a/static/img/TDSD.png and /dev/null differ diff --git a/static/img/TDWD.png b/static/img/TDWD.png deleted file mode 100644 index ba681bd..0000000 Binary files a/static/img/TDWD.png and /dev/null differ diff --git a/static/img/TRSD.png b/static/img/TRSD.png deleted file mode 100644 index 816c819..0000000 Binary files a/static/img/TRSD.png and /dev/null differ diff --git a/static/img/TRWD.png b/static/img/TRWD.png deleted file mode 100644 index ba681bd..0000000 Binary files a/static/img/TRWD.png and /dev/null differ diff --git a/static/img/WD.png b/static/img/WD.png deleted file mode 100644 index ad7c2e9..0000000 Binary files a/static/img/WD.png and /dev/null differ diff --git a/static/img/WDGG.png b/static/img/WDGG.png deleted file mode 100644 index 56720a1..0000000 Binary files a/static/img/WDGG.png and /dev/null differ diff --git a/static/img/XIA.png b/static/img/XIA.png deleted file mode 100644 index bf4ede8..0000000 Binary files a/static/img/XIA.png and /dev/null differ diff --git a/static/img/YX.jpg b/static/img/YX.jpg deleted file mode 100644 index 9fbdcfe..0000000 Binary files a/static/img/YX.jpg and /dev/null differ diff --git a/static/img/YXBJ.jpg b/static/img/YXBJ.jpg deleted file mode 100644 index 80ec3f1..0000000 Binary files a/static/img/YXBJ.jpg and /dev/null differ diff --git a/static/img/YXSY.png b/static/img/YXSY.png deleted file mode 100644 index 2839e35..0000000 Binary files a/static/img/YXSY.png and /dev/null differ diff --git a/static/img/ZWXBSQ.png b/static/img/ZWXBSQ.png deleted file mode 100644 index fe10a6d..0000000 Binary files a/static/img/ZWXBSQ.png and /dev/null differ diff --git a/static/img/badinfo.png b/static/img/badinfo.png deleted file mode 100644 index 4710748..0000000 Binary files a/static/img/badinfo.png and /dev/null differ diff --git a/static/img/bg1.png b/static/img/bg1.png deleted file mode 100644 index 123a3f7..0000000 Binary files a/static/img/bg1.png and /dev/null differ diff --git a/static/img/bgc.png b/static/img/bgc.png deleted file mode 100644 index 593c376..0000000 Binary files a/static/img/bgc.png and /dev/null differ diff --git a/static/img/dw.png b/static/img/dw.png deleted file mode 100644 index eee1d5f..0000000 Binary files a/static/img/dw.png and /dev/null differ diff --git a/static/img/sj.png b/static/img/sj.png deleted file mode 100644 index 59a0baf..0000000 Binary files a/static/img/sj.png and /dev/null differ diff --git a/static/img/sjfx.png b/static/img/sjfx.png deleted file mode 100644 index a143026..0000000 Binary files a/static/img/sjfx.png and /dev/null differ diff --git a/static/logo.png b/static/logo.png deleted file mode 100644 index b5771e2..0000000 Binary files a/static/logo.png and /dev/null differ diff --git a/tet.txt b/tet.txt deleted file mode 100644 index ee37750..0000000 --- a/tet.txt +++ /dev/null @@ -1 +0,0 @@ -safsd \ No newline at end of file diff --git a/uni.promisify.adaptor.js b/uni.promisify.adaptor.js deleted file mode 100644 index 47fbce1..0000000 --- a/uni.promisify.adaptor.js +++ /dev/null @@ -1,10 +0,0 @@ -uni.addInterceptor({ - returnValue (res) { - if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) { - return res; - } - return new Promise((resolve, reject) => { - res.then((res) => res[0] ? reject(res[0]) : resolve(res[1])); - }); - }, -}); \ No newline at end of file diff --git a/uni.scss b/uni.scss deleted file mode 100644 index a98bd1b..0000000 --- a/uni.scss +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 这里是uni-app内置的常用样式变量 - * - * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 - * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App - * - */ - -/** - * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 - * - * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 - */ - -/* 颜色变量 */ - -/* 行为相关颜色 */ -@import 'uview-ui/theme.scss'; -$uni-color-primary: #007aff; -$uni-color-success: #4cd964; -$uni-color-warning: #f0ad4e; -$uni-color-error: #dd524d; - -/* 文字基本颜色 */ -$uni-text-color:#333;//基本色 -$uni-text-color-inverse:#fff;//反色 -$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 -$uni-text-color-placeholder: #808080; -$uni-text-color-disable:#c0c0c0; - -/* 背景颜色 */ -$uni-bg-color:#ffffff; -$uni-bg-color-grey:#f8f8f8; -$uni-bg-color-hover:#f1f1f1;//点击状态颜色 -$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 - -/* 边框颜色 */ -$uni-border-color:#c8c7cc; - -/* 尺寸变量 */ - -/* 文字尺寸 */ -$uni-font-size-sm:12px; -$uni-font-size-base:14px; -$uni-font-size-lg:16; - -/* 图片尺寸 */ -$uni-img-size-sm:20px; -$uni-img-size-base:26px; -$uni-img-size-lg:40px; - -/* Border Radius */ -$uni-border-radius-sm: 2px; -$uni-border-radius-base: 3px; -$uni-border-radius-lg: 6px; -$uni-border-radius-circle: 50%; - -/* 水平间距 */ -$uni-spacing-row-sm: 5px; -$uni-spacing-row-base: 10px; -$uni-spacing-row-lg: 15px; - -/* 垂直间距 */ -$uni-spacing-col-sm: 4px; -$uni-spacing-col-base: 8px; -$uni-spacing-col-lg: 12px; - -/* 透明度 */ -$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 - -/* 文章场景相关 */ -$uni-color-title: #2C405A; // 文章标题颜色 -$uni-font-size-title:20px; -$uni-color-subtitle: #555555; // 二级标题颜色 -$uni-font-size-subtitle:26px; -$uni-color-paragraph: #3F536E; // 文章段落颜色 -$uni-font-size-paragraph:15px; diff --git a/utils/oahttp.js b/utils/oahttp.js deleted file mode 100644 index 2be1078..0000000 --- a/utils/oahttp.js +++ /dev/null @@ -1,106 +0,0 @@ -import { - HTTP_REQUEST_URL_THREE, - HEADER, - TOKENNAME, -} from '@/config/app'; -import { - Toast -} from '../libs/uniApi'; -// import { checkLogin } from '../libs/login'; -// import store from '../store'; - - - -function baseRequestTwo(url, method, data, { - noAuth = false, - noVerify = false, - onReLogin = false -}) { - let Url = 'http://ceshi-suyuan.lihaink.cn/', - header = HEADER; - // if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token; - // if (store.state.app.token) header[TOKENNAME] = store.state.app.token; - - // header[TOKENNAME] = 'Bearer sdjflidshjgfkbdasgjmasbgvhauuiavhkesvndkaesbvkjsdbv'; - return new Promise((reslove, reject) => { - // uni.showLoading({ - // title: '加载中' - // }) - uni.request({ - // url: Url + '/api/v1' + url, - url: Url + 'adminapi' + url, - method: method || 'GET', - header: { - ...header - }, - data: method != 'GET' ? data || {} : {}, - params: method == 'GET' ? data : {}, - success: (res) => { - if (noVerify) - reslove(res.data); - else if (res.data.code == -1) { - if (onReLogin) { - // store.commit('LOGOUT'); - return reject(); - } - // 如果登录超时,自动重新登录并且继续发送请求 - // store.dispatch("RE_LOGIN", { - // url: url, - // method: method, - // data: data, - // opt: { - // noAuth, - // noVerify - // } - // }).then((e) => { - // reslove(e); - // }).catch((err) => { - // reject(res.data); - // }) - // store.commit("SET_REQUEST", false); - } else if (res.data.code == 0) { - if (res.data.msg != '无登录信息') { - uni.showToast({ - title: res.data.msg || '请检查网络', - icon: 'none', - }) - } - reject(res.data); - } else if (res.data.code == 1) { - // store.commit("SET_REQUEST"); - reslove(res.data); - } else if (res.data.code == 200) { - // store.commit("SET_REQUEST"); - reslove(res.data.data); - } else if ([410000, 410001, 410002, 40000].indexOf(res.data.code) !== -1) { - toLogin(); - reject(res.data); - } else if (res.data.code == 501) { - reject(res.data); - } else { - uni.showToast({ - title: res.data.msg || '请检查网络', - icon: 'none' - }) - reject(res.data.msg || '请检查网络'); - } - }, - fail: (message) => { - // uni.hideLoading() - uni.showToast({ - title: '网络错误', - icon: 'none' - }) - reject('请求失败'); - } - }) - }); -} - -const oahttp = {}; - -['options', 'get', 'post', 'put', 'head', 'delete', 'trace', 'connect'].forEach((method) => { - oahttp[method] = (api, data, opt) => baseRequestTwo(api, method, data, opt || {}) -}); - -export default oahttp; \ No newline at end of file diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index 3b23a42..0000000 --- a/yarn.lock +++ /dev/null @@ -1,249 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/json-schema@^7.0.8": - version "7.0.13" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.13.tgz#02c24f4363176d2d18fc8b70b9f3c54aba178a85" - integrity sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ== - -ajv-keywords@^3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" - integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== - -ajv@^6.12.5: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -anymatch@~3.1.2: - version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - -braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -"chokidar@>=3.0.0 <4.0.0": - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -emojis-list@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" - integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -fsevents@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" - integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - -glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -immutable@^4.0.0: - version "4.3.4" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.4.tgz#2e07b33837b4bb7662f288c244d1ced1ef65a78f" - integrity sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA== - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json5@^2.1.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - -klona@^2.0.4: - version "2.0.6" - resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.6.tgz#85bffbf819c03b2f53270412420a4555ef882e22" - integrity sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA== - -loader-utils@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.4.tgz#8b5cb38b5c34a9a018ee1fc0e6a066d1dfcc528c" - integrity sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^2.1.2" - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -neo-async@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -picomatch@^2.0.4, picomatch@^2.2.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -punycode@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" - integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -sass-loader@10: - version "10.4.1" - resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-10.4.1.tgz#bea4e173ddf512c9d7f53e9ec686186146807cbf" - integrity sha512-aX/iJZTTpNUNx/OSYzo2KsjIUQHqvWsAhhUijFjAPdZTEhstjZI9zTNvkTTwsx+uNUJqUwOw5gacxQMx4hJxGQ== - dependencies: - klona "^2.0.4" - loader-utils "^2.0.0" - neo-async "^2.6.2" - schema-utils "^3.0.0" - semver "^7.3.2" - -sass@^1.69.3: - version "1.69.3" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.69.3.tgz#f8a0c488697e6419519834a13335e7b65a609c11" - integrity sha512-X99+a2iGdXkdWn1akFPs0ZmelUzyAQfvqYc2P/MPTrJRuIRoTffGzT9W9nFqG00S+c8hXzVmgxhUuHFdrwxkhQ== - dependencies: - chokidar ">=3.0.0 <4.0.0" - immutable "^4.0.0" - source-map-js ">=0.6.2 <2.0.0" - -schema-utils@^3.0.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" - integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== - dependencies: - "@types/json-schema" "^7.0.8" - ajv "^6.12.5" - ajv-keywords "^3.5.2" - -semver@^7.3.2: - version "7.5.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" - integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== - dependencies: - lru-cache "^6.0.0" - -"source-map-js@>=0.6.2 <2.0.0": - version "1.0.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" - integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -uview-ui@2.0.36: - version "2.0.36" - resolved "https://registry.yarnpkg.com/uview-ui/-/uview-ui-2.0.36.tgz#c821e73aa79bf62b55bf40b769ac02a07a3a755e" - integrity sha512-ASSZT6M8w3GTO1eFPbsgEFV0U5UujK+8pTNr+MSUbRNcRMC1u63DDTLJVeArV91kWM0bfAexK3SK9pnTqF9TtA== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==