|
|
hai 1 ano | |
|---|---|---|
| .hbuilderx | %!s(int64=3) %!d(string=hai) anos | |
| api | %!s(int64=2) %!d(string=hai) anos | |
| components | %!s(int64=3) %!d(string=hai) anos | |
| config | %!s(int64=2) %!d(string=hai) anos | |
| filters | %!s(int64=3) %!d(string=hai) anos | |
| pages | hai 1 ano | |
| static | %!s(int64=3) %!d(string=hai) anos | |
| styles | %!s(int64=3) %!d(string=hai) anos | |
| uni_modules | %!s(int64=3) %!d(string=hai) anos | |
| unpackage | hai 1 ano | |
| utils | %!s(int64=3) %!d(string=hai) anos | |
| .gitignore | %!s(int64=3) %!d(string=hai) anos | |
| App.vue | %!s(int64=2) %!d(string=hai) anos | |
| README.md | %!s(int64=3) %!d(string=hai) anos | |
| index.html | %!s(int64=3) %!d(string=hai) anos | |
| main.js | %!s(int64=2) %!d(string=hai) anos | |
| manifest.json | %!s(int64=2) %!d(string=hai) anos | |
| package-lock.json | %!s(int64=3) %!d(string=hai) anos | |
| package.json | %!s(int64=3) %!d(string=hai) anos | |
| pages.json | %!s(int64=2) %!d(string=hai) anos | |
| uni.scss | %!s(int64=3) %!d(string=hai) anos |
|-- agriculture
|-- api // 数据接口,请求逻辑(数据二次处理)
|-- camera.js // 可视监控模块
|-- aftersale.js // 预警上报模块
|-- pest.js // 病害监测模块
|-- weather .js // 气象墒情模块
|-- worm.js // 虫情监测模块
--|
|-- components // 全局组件
|-- ui-back-top // 返回顶部
|-- ui-empty // 数据为空时 提示组件
|-- ui-state // 监测设备状态组件
|-- ui-tabs // 全局tab选项组件
--|
|-- pages //主包
|-- aftersale // 故障上报
|-- index.vue // 上报故障提交
|-- list.vue // 设备列表
|-- aftersale // 文章列表
|-- index.vue // 专家分析
|-- camera // 可视监控模块
|-- index.vue // 可视监控列表
|-- details.vue // 可视监控详情
--|
|-- pest // 病虫害百科模块
|-- details.vue // 病虫害百科详情
|-- index.vue // 病虫害百科列表
|-- discern.vue // 病虫害识别技术
|-- discern-result.vue // 病虫害识别结果
--|
|-- warn // 预警消息模块(消息列表)
|-- weather // 气象环境,墒情检测模块
|-- details.vue // 气象环境详情
|-- history.vue // 气象环境历史记录
|-- index.vue // 气象环境检测列表
|-- style.scss // 气象环境模块样式
|-- warn // 预警消息
--|
|-- worm // 虫情监测模块
|-- components // 虫情监测模块组件
|-- analyse.vue // 虫害分析
|-- details.vue // 虫情监测详情
|-- history.vue // 虫情历史数据
|-- image.vue // 查看图片
|-- index.vue // 虫情监测列表
|-- warn // 预警消息
--|
--|
|-- config // 全局配置模块
|-- config.js // 全局配置文件
|-- cache.js // 全局公共缓存名
--|
|-- static // 静态资源
|-- mark // 标识 图标文件列表
--|
|-- styles // 全局样式
|-- utils
|-- request // ajax请求
|-- cache.js // 设置缓存
|-- tool.js // uni api请求二次封装 调用方式 this.$api
|-- utils.js // 全局工具类文件 调用方式 this.$util
--|
--|
npm install
url格式 ${url}?token=xxxx&clientId=customer, 在全局文件 App.vue onLaunch()中接收参数 并储存到缓存中,每次请求接口时会携带上
onLaunch(option) {
// 如果有token 就储存token与 clientId到缓存中
if(option.query.token){
cache.set(LOGIN_TOKEN,option.query.token);
cache.set(LOGIN_TOKEN,option.query.clientId);
}
},