main
杜函宇 2 years ago
commit d4cd50b659

16
.gitignore vendored

@ -0,0 +1,16 @@
######################################################################
# Build Tools
/unpackage/*
/node_modules/*
######################################################################
# Development Tools
/.idea/*
/.vscode/*
/.hbuilderx/*
package-lock.json
yarn.lock

@ -0,0 +1,55 @@
<!--
* @Author: 张涛
* @Date: 2023-02-17 10:24:05
* @LastEditors: 张涛
* @LastEditTime: 2023-02-20 09:12:49
* @FilePath: \liaoning-uniapp\App.vue
-->
<script>
import config from "./config";
import store from "@/store";
import {
getToken
} from "@/utils/auth";
export default {
onLaunch: function() {
this.initApp();
},
methods: {
//
initApp() {
//
this.initConfig();
//
//#ifdef H5
this.checkLogin();
//#endif
},
initConfig() {
this.globalData.config = config;
},
checkLogin() {
// if (!getToken()) {
// this.$tab.reLaunch("/pages/login");
// }
},
},
};
</script>
<style lang="scss">
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */
@import "uview-ui/index.scss";
@import "@/static/scss/index.scss";
@import "@/style/font.css";
@import "@/utils/quill.core.scss";
/deep/.uni-system-preview-image {
z-index: 99999 !important;
}
page {
height: 100%;
background: #F5F7FA;
}
</style>

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 若依
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

@ -0,0 +1,52 @@
<p align="center">
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-43e3941654fa3054c9684bf53d1b1d356a1.png">
</p>
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v1.0.0</h1>
<h4 align="center">基于UniApp开发的轻量级移动端框架</h4>
<p align="center">
<a href="https://gitee.com/y_project/RuoYi-App/stargazers"><img src="https://gitee.com/y_project/RuoYi-App/badge/star.svg?theme=dark"></a>
<a href="https://gitee.com/y_project/RuoYi-App"><img src="https://img.shields.io/badge/RuoYi-v1.0.0-brightgreen.svg"></a>
<a href="https://gitee.com/y_project/RuoYi-App/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
</p>
## 平台简介
RuoYi App 移动解决方案采用uniapp框架一份代码多终端适配同时支持APP、小程序、H5实现了与[RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue)、[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud)完美对接的移动解决方案!目前已经实现登录、我的、工作台、编辑资料、头像修改、密码修改、常见问题、关于我们等基础功能。
* 配套后端代码仓库地址[RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue) 或 [RuoYi-Cloud](https://github.com/yangzongzhuan/RuoYi-Cloud) 版本。
* 应用框架基于[uniapp](https://uniapp.dcloud.net.cn/)支持小程序、H5、Android和IOS。
* 前端组件采用[uni-ui](https://github.com/dcloudio/uni-ui)全端兼容的高性能UI框架。
* 阿里云折扣场:[点我进入](http://aly.ruoyi.vip),腾讯云秒杀场:[点我进入](http://txy.ruoyi.vip)&nbsp;&nbsp;
* 阿里云优惠券:[点我领取](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)&nbsp;&nbsp;
## 技术文档
- 官网网站:[http://ruoyi.vip](http://ruoyi.vip)
- 文档地址:[http://doc.ruoyi.vip](http://doc.ruoyi.vip)
- H5页体验[http://h5.ruoyi.vip](http://h5.ruoyi.vip)
- QQ交流群 ①133713780
- 小程序体验
<img src="https://oscimg.oschina.net/oscnet/up-26c76dc90b92acdbd9ac8cd5252f07c8ad9.jpg" alt="小程序演示"/>
## 演示图
<table>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-3ea20e447ac621a161e395fb53ccc683d84.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-a6f23cf9a371a30165e135eff6d9ae89a9d.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-ff5f62016bf6624c1ff27eee57499dccd44.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-b9a582fdb26ec69d407fabd044d2c8494df.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-96427ee08fca29d77934cfc8d1b1a637cef.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-5fdadc582d24cccd7727030d397b63185a3.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-0a36797b6bcc50c36d40c3c782665b89efc.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-d77995cc00687cedd00d5ac7d68a07ea276.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-fa8f5ab20becf59b4b38c1b92a9989e7109.png"/></td>
</tr>
</table>

@ -0,0 +1,9 @@
import request from '@/utils/request'
// 根据字典类型查询字典数据信息
export function getDicts(dictType) {
return request({
url: '/system/dict/data/type/' + dictType,
method: 'get'
})
}

@ -0,0 +1,79 @@
import request from '@/utils/request'
// 登录方法
export function login(username, password, code, uuid) {
const data = {
username,
password,
code,
uuid
}
return request({
'url': '/login',
headers: {
isToken: false
},
'method': 'post',
'data': data
})
}
// 获取用户详细信息
export function getInfo() {
return request({
'url': '/getInfo',
'method': 'get'
})
}
// 退出方法
export function logout() {
return request({
'url': '/logout',
'method': 'post'
})
}
// 获取验证码
export function getCodeImg() {
return request({
'url': '/captchaImage',
headers: {
isToken: false
},
method: 'get',
timeout: 20000
})
}
// 远程登录
export function ControllerLogin(data) {
return request({
url: '/shian/remote/login',
headers: {
isToken: false
},
method: 'post',
data: data
})
}
// 外部登录
export function remoteLogin(data) {
return request({
url: '/shian/remoteLogin/login',
method: 'post',
data
})
}
export function loginRemote(data) {
return request({
url: '/sso/user/login',
method: 'post',
headers: {
isToken: false
},
data
})
}

@ -0,0 +1,19 @@
import request from '@/utils/request'
// list
export function getCList(query) {
return request({
url: `/shian/product/list`,
method: 'get',
params: query
})
}
//get
export function getMessage(query) {
return request({
url: `/shian/product/`+query,
method: 'get',
})
}

@ -0,0 +1,70 @@
import request from "@/utils/request";
// 查询示范创建城市列表
export function listRECOMMEND(query) {
return request({
url: "/shian/RECOMMEND/list",
method: "get",
params: query,
});
}
// ?areaType=1
// 查询示范创建城市树状
export function treeList(query) {
return request({
url: "/shian/CONFIGURE/Demonstrationtreelist",
method: "get",
params: query,
});
}
// 查询示范创建城市详细
export function getRECOMMEND(id) {
return request({
url: "/shian/RECOMMEND/" + id,
method: "get",
});
}
// 新增示范创建城市
export function addRECOMMEND(data) {
return request({
url: "/shian/RECOMMEND",
method: "post",
data: data,
});
}
// 修改示范创建城市
export function updateRECOMMEND(data) {
return request({
url: "/shian/RECOMMEND",
method: "put",
data: data,
});
}
// 删除示范创建城市
export function delRECOMMEND(id) {
return request({
url: "/shian/RECOMMEND/" + id,
method: "delete",
});
}
// 导出示范创建城市
export function exportRECOMMEND(query) {
return request({
url: "/shian/RECOMMEND/export",
method: "get",
params: query,
});
}
//获取五个示范的评分
export function demoGrade(query){
return request({
url: "/shian/evaluation/getgradebyId",
method: "get",
params: query,
});
}

@ -0,0 +1,29 @@
import request from '@/utils/request'
//红榜
export function getList(data) {
return request({
url: '/shianliaoning/remote/findRedList',
method: 'post',
data
})
}
export function getRedInfo(id) {
return request({
url: `/shianliaoning/remote/redDetail/${id}`,
method: 'get'
})
}
//黑榜
export function getblackList(data) {
return request({
url: '/shianliaoning/remote/findBlackList',
method: 'post',
data
})
}
export function getBlackInfo(id) {
return request({
url: `/shianliaoning/remote/blackDetail/${id}`,
method: 'get'
})
}

@ -0,0 +1,59 @@
import request from '@/utils/request'
// list
export function getEssayList(query) {
return request({
url: '/shian/check/list',
method: 'get',
params:query
})
}
// export
export function exportEssay(query) {
return request({
url: '/shian/check/export',
method: 'get',
params:query
})
}
// DELETE
export function deleteEssay(ids) {
return request({
url: `/shian/check/${ids}`,
method:'DELETE'
})
}
// info
export function getinfo(id) {
return request({
url: `/shian/check/${id}`,
method:'get'
})
}
// add
export function addEssay(data) {
return request({
url: '/shian/check',
method: 'post',
data
})
}
// update
export function updataEssay(data) {
return request({
url: '/shian/check',
method:'put',
data
})
}
export function downloadCheck() {
return request({
url: '/shian/check/importTemplate',
method:'get',
})
}

@ -0,0 +1,69 @@
import request from '@/utils/request'
// list
export function getRecordList(query) {
return request({
url: '/shian/record/list',
method: 'get',
params: query
})
}
export function getCompanyList(query) {
return request({
url: '/shian/company/list',
method: 'get',
params: query
})
}
// export
export function exportRecord(query) {
return request({
url: '/shian/record/export',
method: 'get',
params: query
})
}
// DELETE
export function deleteRecord(ids) {
return request({
url: `/shian/record/${ids}`,
method: 'DELETE'
})
}
// info
export function getinfo(id) {
return request({
url: `/shian/record/${id}`,
method: 'get'
})
}
// add
export function addRecord(data) {
return request({
url: '/shian/record',
method: 'post',
data
})
}
// update
export function updataRecord(data) {
return request({
url: '/shian/record',
method: 'put',
data
})
}
export function enterpriseList(query) {
return request({
url: '/shian/information/list',
method: 'get',
params: query
})
}

@ -0,0 +1,13 @@
import request from '@/utils/request'
// list
export function getCompanyList(query) {
return request({
url: `/shian/company/list`,
method: 'get',
params: query
})
}

@ -0,0 +1,53 @@
import request from '@/utils/request'
// list
export function getEnterpriseList(query) {
return request({
url: '/shian/enterprise/list',
method: 'get',
params: query
})
}
// export
export function exportEnterprise(query) {
return request({
url: '/shian/enterprise/export',
method: 'get',
params: query
})
}
// DELETE
export function deleteEnterprise(ids) {
return request({
url: `/shian/enterprise/${ids}`,
method: 'DELETE'
})
}
// info
export function getinfo(id) {
return request({
url: `/shian/enterprise/${id}`,
method: 'get'
})
}
// add
export function addEnterprise(data) {
return request({
url: '/shian/enterprise',
method: 'post',
data
})
}
// update
export function updataEnterprise(data) {
return request({
url: '/shian/enterprise',
method: 'put',
data
})
}

@ -0,0 +1,102 @@
import request from '@/utils/request'
import {
exportEssay
} from './essay'
// 根据关键字分页搜索主体列表
export function getStreetList(data) {
return request({
url: `/shianliaoning/remote/getSocialList`,
method: 'post',
data
})
}
// 根据主体id查询详情
export function getInfo(id) {
return request({
url: `/shianliaoning/remote/detail?id=${id}`,
method: 'get',
})
}
//查询行政许可
export function getAdministrative(id) {
return request({
url: `/shianliaoning/remote/getLicense?id=${id}`,
method: 'get',
})
}
//查询失信行为
export function getPromise(id) {
return request({
url: `/shianliaoning/remote/behavior?id=${id}`,
method: 'get',
})
}
//查询违法处罚
export function getPunish(id) {
return request({
url: `/shianliaoning/remote/punishment?id=${id}`,
method: 'get',
})
}
//通过企业社会信用代码获取评分
export function enterpriseGrade(uniscid) {
return request({
url: `/shian/evaluation/findByUniscid?uniscid=${uniscid}`,
method: 'get',
})
}
//获取评价
export function getAppraise(data) {
return request({
url: `/shian/evaluation/list`,
method: 'get',
params: data
})
}
//新增社会评价
export function addAppraise(data) {
return request({
url: `/shian/evaluation`,
method: 'post',
data
})
}
//根据主体id查询监管信息
export function getSupervise(id) {
return request({
url: `/shianliaoning/remote/getSupervision?id=${id}`,
method: 'get',
})
}
//根据主体id查询所有食品信息
export function getAllFoodList(data) {
return request({
url: `/shianliaoning/remote/getMainFood`,
method: 'post',
data
})
}
//查询产品评价
export function foodAllPJ(query) {
return request({
url: '/shian/evaluation/getproduct',
method: 'get',
params: query
})
}
// 对接外部系统(解决跨域别人拿不到传入的数据问题)
export function insureSystem(data) {
return request({
url: '/shian/bus',
method: 'post',
data
})
}

@ -0,0 +1,53 @@
import request from '@/utils/request'
// list
export function getEssayList(query) {
return request({
url: '/shian/essay/list',
method: 'get',
params:query
})
}
// export
export function exportEssay(query) {
return request({
url: '/shian/essay/export',
method: 'get',
params:query
})
}
// DELETE
export function deleteEssay(ids) {
return request({
url: `/shian/essay/${ids}`,
method:'DELETE'
})
}
// info
export function getinfo(id) {
return request({
url: `/shian/essay/${id}`,
method:'get'
})
}
// add
export function addEssay(data) {
return request({
url: '/shian/essay',
method: 'post',
data
})
}
// update
export function updataEssay(data) {
return request({
url: '/shian/essay',
method:'put',
data
})
}

@ -0,0 +1,28 @@
import request from '@/utils/request'
// list
export function getEvaluationList(query) {
return request({
url: '/shian/evaluation/list',
method: 'get',
params: query
})
}
// info
export function getinfo(id) {
return request({
url: `/shian/evaluation/${id}`,
method: 'get'
})
}
// add
export function addEvaluation(data) {
return request({
url: '/shian/evaluation',
method: 'post',
data
})
}

@ -0,0 +1,8 @@
import request from '@/utils/request'
export function getFamousList(data) {
return request({
url: '/shianliaoning/remote/superInfoList',
method: 'post',
data
})
}

@ -0,0 +1,77 @@
import request from '@/utils/request'
// list
export function getList(query) {
return request({
url: `/shian/cpxx/list`,
method: 'get',
params: query
})
}
// info
export function getinfo(id) {
return request({
url: `/shian/cpxx/${id}`,
method: 'get'
})
}
//根据产品id获得评分
export function gardeFood(data){
return request({
url:`/shian/evaluation/findByProductId?productId=${data}`,
method:'get',
})
}
//根据食品生产产品的社会信用代码关联社会评价表
export function prejectData(e){
return request({
url:`/shian/cpxx/getgrade?code=${e}`,
method:'get',
})
}
//获取食品列表
export function foodList(data){
return request({
url:'/shianliaoning/remote/getSourceInfo',
method:'post',
data
})
}
//获取食品详情
export function foodListDetails(data){
return request({
url:'/shianliaoning/remote/getFoodList',
method:'post',
data
})
}
//获取食品检测信息
export function foodDetectionMsg(data){
return request({
url:'/shianliaoning/remote/getFoodDetection',
method:'post',
data
})
}
//根据溯源码获取生产网点列表
export function productionList(id){
return request({
url:`/shianliaoning/remote/getProductionPoint?sourceCode=${id}`,
method:'get',
})
}
//根据溯源码获取销售网点列表
export function marketList(id){
return request({
url:`/shianliaoning/remote/getSalePoint?sourceCode=${id}`,
method:'get',
})
}
//根据溯源码查询合格证
export function queryCertificate(data){
return request({
url:`/shianliaoning/remote/findCertification`,
method:'post',
data
})
}

@ -0,0 +1,32 @@
import request from '@/utils/request'
// list
export function getInsureList(query) {
return request({
url: `/shian/insurerecord/list`,
method: 'get',
params: query
})
}
export function getInsure(id){
return request({
url: `/shian/insurerecord/`+id,
method: 'get',
})
}
//add
export function addInsure(data){
return request({
url: `/shian/insurerecord`,
method: 'post',
data:data
})
}
//获取城市列表接口
export function cityList(date){
return request({
url: `/shian/city/list`,
method: 'get',
date
})
}

@ -0,0 +1,41 @@
import request from '@/utils/request'
// 新增提问
export function addQuestions(data) {
return request({
url: `/shian/questions`,
method: 'post',
data
})
}
// 分页获取提问列表
export function getList(query){
return request({
url: `/shian/questions/page`,
method: 'get',
params:query
})
}
//回复留言
export function requestText(data){
return request({
url: `/shian/questions/reply`,
method: 'put',
data
})
}
//修改回复
export function updataReply(data){
return request({
url: `/shian/questions`,
method: 'put',
data
})
}
//删除回复
export function deleteReply(ids){
return request({
url: `/shian/questions/delReplyById/${ids}`,
method: 'delete',
})
}

@ -0,0 +1,28 @@
import request from '@/utils/request'
export function getList(query) {
return request({
url: '/shian/standard/list',
method: 'get',
params: query
})
}
export function getInfo(id) {
return request({
url: `/shian/standard/${id}`,
method: 'get',
})
}
export function addList(data) {
return request({
url: '/shian/standard',
method: 'post',
data
})
}
export function removeList(ids) {
return request({
url: `/shian/standard/${ids}`,
method: 'DELETE'
})
}

@ -0,0 +1,53 @@
import request from '@/utils/request'
// list
export function getEnterpriseList(query) {
return request({
url: `/shian/store/list`,
method: 'get',
params: query
})
}
// export
export function exportEnterprise(query) {
return request({
url: '/shian/store/export',
method: 'get',
params: query
})
}
// DELETE
export function deleteEnterprise(ids) {
return request({
url: `/shian/store/${ids}`,
method: 'DELETE'
})
}
// info
export function getinfo(id) {
return request({
url: `/shian/store/${id}`,
method: 'get'
})
}
// add
export function addEnterprise(data) {
return request({
url: '/shian/store',
method: 'post',
data
})
}
// update
export function updataEnterprise(data) {
return request({
url: '/shian/store',
method: 'put',
data
})
}

@ -0,0 +1,53 @@
import request from '@/utils/request'
// list
export function getStreetList(query) {
return request({
url: '/shian/street/list',
method: 'get',
params:query
})
}
// export
export function exportStreet(query) {
return request({
url: '/shian/street/export',
method: 'get',
params:query
})
}
// DELETE
export function deleteStreet(ids) {
return request({
url: `/shian/street/${ids}`,
method:'DELETE'
})
}
// info
export function getinfo(id) {
return request({
url: `/shian/street/${id}`,
method:'get'
})
}
// add
export function addStreet(data) {
return request({
url: '/shian/street',
method: 'post',
data
})
}
// update
export function updataStreet(data) {
return request({
url: '/shian/street',
method:'put',
data
})
}

@ -0,0 +1,97 @@
import request from '@/utils/request'
// list
export function getSurveyList(query) {
return request({
url: '/shian/survey/list',
method: 'get',
params: query
})
}
// export
export function exportSurvey(query) {
return request({
url: '/shian/survey/export',
method: 'get',
params: query
})
}
// DELETE
export function deleteSurvey(ids) {
return request({
url: `/shian/survey/${ids}`,
method: 'DELETE'
})
}
// info
export function getinfo(id) {
return request({
url: `/shian/survey/${id}`,
method: 'get'
})
}
// add
export function addSurvey(data) {
return request({
url: '/shian/survey',
method: 'post',
data
})
}
// update
export function updataSurvey(data) {
return request({
url: '/shian/survey',
method: 'put',
data
})
}
// 新增评分题
export function addDirectory(data) {
return request({
url: '/shian/directory/add',
method: 'post',
data
})
}
//获取问卷详情
export function getDirectoryInfo(id) {
return request({
url: `/shian/directory/findBySurveyId/${id}`,
method: 'get'
})
}
// 修改问卷
export function updataDirectory(data) {
return request({
url: '/shian/directory/edit',
method: 'put',
data
})
}
//新增用户评分
export function addAnswer(data) {
return request({
url: '/shian/answer/add',
method: 'post',
data
})
}
// 调查单list
export function getSurverListData(query) {
return request({
url: '/dwsurvey/app/survey/list.do',
method: 'get',
params: query
})
}

@ -0,0 +1,9 @@
import request from '@/utils/request'
//红榜
export function getList(query) {
return request({
url: '/shian/videos/page',
method: 'get',
params: query
})
}

@ -0,0 +1,58 @@
import upload from '@/utils/upload'
import request from '@/utils/request'
// 用户密码重置
export function updateUserPwd(oldPassword, newPassword) {
const data = {
oldPassword,
newPassword
}
return request({
url: '/system/user/profile/updatePwd',
method: 'put',
params: data
})
}
// 查询用户个人信息
export function getUserProfile() {
return request({
url: '/system/user/profile',
method: 'get'
})
}
// 修改用户个人信息
export function updateUserProfile(data) {
return request({
url: '/system/user/profile',
method: 'put',
data: data
})
}
// 用户头像上传
export function uploadAvatar(data) {
return upload({
url: '/system/user/profile/avatar',
name: data.name,
filePath: data.filePath
})
}
export function uploadFile(data) {
return upload({
url: '/common/uploadMinioonfile',
name: data.name,
filePath: data.filePath
})
}
// 获取用户信息
export function getSelfInfo() {
return request({
url: '/shianliaoning/demo_info/getSelfInfo',
method: 'get'
})
}

@ -0,0 +1,9 @@
import request from '@/utils/request'
export function getWxConfig(query) {
return request({
url: '/shian/wechat/findSignature',
method: 'get',
params: query
})
}

@ -0,0 +1,64 @@
<template>
<view class="button-conatiner">
<button class="button-text" :disabled="flag" :style="buttonStyle" @click="clickSubmit()">{{
title
}}</button>
</view>
</template>
<script>
export default {
name: "fixedButton",
props: {
flag:{
type: Boolean,
default:false,
},
title: {
type: String,
default: "提交",
},
buttonStyle: {
type: Object,
default: () => {},
},
},
data() {
return {};
},
methods: {
clickSubmit() {
this.$emit("click");
},
},
};
</script>
<style lang="scss" scoped>
.button-conatiner {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background: #fff;
display: flex;
justify-content: center;
box-sizing: border-box;
padding: 20rpx 0;
z-index: 99;
.button-text {
width: 508rpx;
height: 88rpx;
border-radius: 90rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 36rpx;
font-weight: 400;
background: linear-gradient(90deg, #3976f1 0%, #3ca0f6 100%);
color: #ffffff;
font-weight: 400;
}
}
</style>

@ -0,0 +1,242 @@
<style lang="scss">
.hqs-popup {
.qs-con {
background-color: rgb(245,247,251);;
}
.qs-header {
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
}
.qs-title {
font-size: 16px;
font-weight: bold;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.hidden { visibility: hidden; }
.qs-side {
min-width: 60px;
padding: 15px 20px;
color: #888;
flex-shrink: 0;
&:active { opacity: .8; }
}
.qs-h-scroll {
height: 100vh;
// #ifdef H5
margin-top: 44px;
height: calc(100vh - 44px);
// #endif
}
.ta-r { text-align: right; }
}
</style>
<template>
<uni-popup ref="popup"
:mask-click="maskClick" @change="onChange"
:type="from" class="hqs-popup">
<view class="qs-con"
:style="conStyle"
@mousedown="onTouch" @mousemove="onTouch" @mouseup="onTouch"
@touchstart="onTouch" @touchmove="onTouch" @touchend="onTouch">
<block v-if="isVertical">
<view class="qs-header" v-if="from == 'bottom' && showHeader">
<view class="qs-side" :class="{'hidden': !showBack && !$slots.back}"
@click="onBack">
<slot name="back">
<text>返回</text>
</slot>
</view>
<slot name="title">
<text class="qs-title">{{ title }}</text>
</slot>
<view class="qs-side ta-r" :class="{'hidden': !showClose}"
@click="close">
<slot name="close">
<u-icon :name="closeIcon" :size="32" v-if="closeIcon"></u-icon>
<text v-else></text>
</slot>
</view>
</view>
<slot name="sub-header"></slot>
<scroll-view scroll-y :style="{ height }"
@scroll="onScroll">
<view>
<slot></slot>
</view>
</scroll-view>
<slot name="bottom"></slot>
</block>
<block v-else-if="!isVertical">
<scroll-view scroll-y class="qs-h-scroll" :style="{ width }">
<slot></slot>
</scroll-view>
</block>
</view>
</uni-popup>
</template>
<script>
import UniPopup from './uni-popup.vue'
export default {
components: {
UniPopup,
},
props: {
// v-model
value: Boolean,
//
from: {
type: String,
default: 'bottom',
},
//
round: {
type: Number,
default: 10,
},
// (from=leftright)
width: {
type: String,
default: '60vw',
},
// (from=topbottom)
height: {
type: String,
default: '50vh',
},
//
showHeader: {
type: Boolean,
default: true,
},
//
title: String,
// v-slot:back
showBack: Boolean,
// uviewu-iconnameshowClose="close"close
showClose: {
type: [Boolean, String],
default: true,
},
//
maskClick: {
type: Boolean,
default: true,
},
},
data() {
return {
scrollTop: 0,
panStyle: '',
showPopup: false,
}
},
computed: {
closeIcon() {
if(typeof this.showClose == 'string') return this.showClose
return false
},
isVertical() {
return ['bottom', 'top'].includes(this.from)
},
conStyle() {
let style = this.panStyle || ''
let r = this.round
if(r > 0) {
r += 'px'
if(this.from == 'bottom') r = [r, r, 0, 0]
else if(this.from == 'left') r = [0, r, r, 0]
else if(this.from == 'right') r = [r, 0, 0, r]
else r = [0, 0, r, r]
style += `border-radius: ${r.join(' ')};`
}
return style
},
},
watch: {
value(val) {
if(val == this.showPopup) return
if(val) this.open()
else this.close()
},
showPopup(val) {
this.$emit('input', val)
},
},
mounted() {
if(this.value) this.open()
},
methods: {
onScroll(e) {
this.scrollTop = e.detail.scrollTop
},
onTouch(ev) {
// if(!this.maskClick) return
const { pageX, pageY } = ev.changedTouches[0] || ev
if(['touchstart', 'mousedown'].includes(ev.type)) {
this.startX = pageX
this.startY = pageY
this.startTime = ev.timeStamp
} else {
if(!this.startTime) return
const orien = this.isVertical ? 'Y' : 'X'
let moveDis = pageY - this.startY
if(this.from == 'left') moveDis = this.startX - pageX
else if(this.from == 'right') moveDis = pageX - this.startX
else if(this.from == 'top') moveDis = -moveDis
if(!this.maskClick) moveDis /= 3
const duration = (ev.timeStamp - this.startTime)
const speed = moveDis/duration
if(['touchend', 'mouseup'].includes(ev.type)) {
if(this.panStyle) {
if(this.maskClick && (moveDis > 120 || speed > 0.25)) {
this.close()
}
else {
this.panStyle = `transform: translate${orien}(0); transition: all ease 200ms;`
}
setTimeout(() => {
this.panStyle = ''
}, 300)
}
// conScrollTop = 0
this.startTime = 0
return
}
// if(this.scrollTop > 0) return
if(moveDis > 0) {
if(this.from == 'left' || this.from == 'top') moveDis *= -1
this.panStyle = `transform: translate${orien}(${moveDis}px); transition: none;`
}
}
},
onChange({ show }) {
this.showPopup = show
},
open() {
this.$refs.popup.open()
this.showPopup = true
},
close() {
this.$refs.popup.close()
this.showPopup = false
},
onBack() {
this.$emit('back')
},
}
}
</script>

@ -0,0 +1,284 @@
<template>
<view v-if="showPopup" class="uni-popup" @touchmove.stop.prevent="clear">
<uni-transition :mode-class="['fade']" :styles="maskClass"
:duration="duration" :show="showTrans" @click="onTap" />
<uni-transition :mode-class="ani" :styles="transClass"
:duration="duration" :show="showTrans">
<view class="uni-popup__wrapper-box">
<slot />
</view>
</uni-transition>
</view>
</template>
<script>
import uniTransition from './uni-transition.vue'
/**
* PopUp 弹出层
* @description 弹出层组件为了解决遮罩弹层的问题
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
* @property {String} type = [top|center|bottom] 弹出方式
* @value top 顶部弹出
* @value left 左边弹出
* @value center 中间弹出
* @value bottom 底部弹出
* @property {Boolean} animation = [ture|false] 是否开启动画
* @property {Boolean} maskClick = [ture|false] 蒙版点击是否关闭弹窗
* @event {Function} change 打开关闭弹窗触发e={show: false}
*/
export default {
name: 'UniPopup',
components: {
uniTransition
},
props: {
//
animation: {
type: Boolean,
default: true
},
// top: bottomcenter
type: {
type: String,
default: 'center'
},
// maskClick
maskClick: {
type: Boolean,
default: true
}
},
data() {
return {
duration: 300,
ani: [],
showPopup: false,
showTrans: false,
maskClass: {
'position': 'fixed',
'bottom': 0,
'top': 0,
'left': 0,
'right': 0,
'backgroundColor': 'rgba(0, 0, 0, 0.4)'
},
transClass: {
'position': 'fixed',
'left': 0,
'right': 0,
}
}
},
watch: {
type: {
handler: function(newVal) {
switch (this.type) {
case 'top':
this.ani = ['slide-top']
this.transClass = {
'position': 'fixed',
'left': 0,
'right': 0,
}
break
case 'left':
this.ani = ['slide-left']
this.transClass = {
'position': 'fixed',
'top': 0,
'left': 0,
'bottom': 0,
}
break
case 'right':
this.ani = ['slide-right']
this.transClass = {
'position': 'fixed',
'top': 0,
'right': 0,
'bottom': 0,
}
break
case 'bottom':
this.ani = ['slide-bottom']
this.transClass = {
'position': 'fixed',
'left': 0,
'right': 0,
'bottom': 0
}
break
case 'center':
this.ani = ['zoom-out', 'fade']
this.transClass = {
'position': 'fixed',
/* #ifndef APP-NVUE */
'display': 'flex',
'flexDirection': 'column',
/* #endif */
'bottom': 0,
'left': 0,
'right': 0,
'top': 0,
'justifyContent': 'center',
'alignItems': 'center'
}
break
}
},
immediate: true
}
},
created() {
if (this.animation) {
this.duration = 300
} else {
this.duration = 0
}
},
methods: {
clear(e) {
// TODO nvue
e.stopPropagation()
},
open() {
this.showPopup = true
this.$nextTick(() => {
clearTimeout(this.timer)
this.timer = setTimeout(() => {
this.showTrans = true
}, 50);
})
this.$emit('change', {
show: true
})
},
close(type) {
this.showTrans = false
this.$nextTick(() => {
clearTimeout(this.timer)
this.timer = setTimeout(() => {
this.$emit('change', {
show: false
})
this.showPopup = false
}, 300)
})
},
onTap() {
if (!this.maskClick) return
this.close()
}
}
}
</script>
<style lang="scss" scoped>
.uni-popup {
position: fixed;
/* #ifdef H5 */
top: var(--window-top);
/* #endif */
/* #ifndef H5 */
top: 0;
/* #endif */
bottom: 0;
left: 0;
right: 0;
/* #ifndef APP-NVUE */
z-index: 900;
/* #endif */
}
.uni-popup__mask {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: $uni-bg-color-mask;
opacity: 0;
}
.mask-ani {
transition-property: opacity;
transition-duration: 0.2s;
}
.uni-top-mask {
opacity: 1;
}
.uni-bottom-mask {
opacity: 1;
}
.uni-center-mask {
opacity: 1;
}
.uni-popup__wrapper {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
position: absolute;
}
.top {
top: 0;
left: 0;
right: 0;
transform: translateY(-500px);
}
.bottom {
bottom: 0;
left: 0;
right: 0;
transform: translateY(500px);
}
.center {
/* #ifndef APP-NVUE */
display: flex;
flex-direction: column;
/* #endif */
bottom: 0;
left: 0;
right: 0;
top: 0;
justify-content: center;
align-items: center;
transform: scale(1.2);
opacity: 0;
}
.uni-popup__wrapper-box {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
position: relative;
}
.content-ani {
// transition: transform 0.3s;
transition-property: transform, opacity;
transition-duration: 0.2s;
}
.uni-top-content {
transform: translateY(0);
}
.uni-bottom-content {
transform: translateY(0);
}
.uni-center-content {
transform: scale(1);
opacity: 1;
}
</style>

@ -0,0 +1,279 @@
<template>
<view v-if="isShow" ref="ani" class="uni-transition" :class="[ani.in]" :style="'transform:' +transform+';'+stylesObject"
@click="change">
<slot></slot>
</view>
</template>
<script>
// #ifdef APP-NVUE
const animation = uni.requireNativePlugin('animation');
// #endif
/**
* Transition 过渡动画
* @description 简单过渡动画组件
* @tutorial https://ext.dcloud.net.cn/plugin?id=985
* @property {Boolean} show = [false|true] 控制组件显示或隐藏
* @property {Array} modeClass = [fade|slide-top|slide-right|slide-bottom|slide-left|zoom-in|zoom-out] 过渡动画类型
* @value fade 渐隐渐出过渡
* @value slide-top 由上至下过渡
* @value slide-right 由右至左过渡
* @value slide-bottom 由下至上过渡
* @value slide-left 由左至右过渡
* @value zoom-in 由小到大过渡
* @value zoom-out 由大到小过渡
* @property {Number} duration 过渡动画持续时间
* @property {Object} styles 组件样式 css 样式注意带-连接符的属性需要使用小驼峰写法如`backgroundColor:red`
*/
export default {
name: 'uniTransition',
props: {
show: {
type: Boolean,
default: false
},
modeClass: {
type: Array,
default () {
return []
}
},
duration: {
type: Number,
default: 300
},
styles: {
type: Object,
default () {
return {}
}
}
},
data() {
return {
isShow: false,
transform: '',
ani: { in: '',
active: ''
}
};
},
watch: {
show: {
handler(newVal) {
if (newVal) {
this.open()
} else {
this.close()
}
},
immediate: true
}
},
computed: {
stylesObject() {
let styles = {
...this.styles,
'transition-duration': this.duration / 1000 + 's'
}
let transfrom = ''
for (let i in styles) {
let line = this.toLine(i)
transfrom += line + ':' + styles[i] + ';'
}
return transfrom
}
},
created() {
// this.timer = null
// this.nextTick = (time = 50) => new Promise(resolve => {
// clearTimeout(this.timer)
// this.timer = setTimeout(resolve, time)
// return this.timer
// });
},
methods: {
change() {
this.$emit('click', {
detail: this.isShow
})
},
open() {
clearTimeout(this.timer)
this.isShow = true
this.transform = ''
this.ani.in = ''
for (let i in this.getTranfrom(false)) {
if (i === 'opacity') {
this.ani.in = 'fade-in'
} else {
this.transform += `${this.getTranfrom(false)[i]} `
}
}
this.$nextTick(() => {
setTimeout(() => {
this._animation(true)
}, 50)
})
},
close(type) {
clearTimeout(this.timer)
this._animation(false)
},
_animation(type) {
let styles = this.getTranfrom(type)
// #ifdef APP-NVUE
if(!this.$refs['ani']) return
animation.transition(this.$refs['ani'].ref, {
styles,
duration: this.duration, //ms
timingFunction: 'ease',
needLayout: false,
delay: 0 //ms
}, () => {
if (!type) {
this.isShow = false
}
this.$emit('change', {
detail: this.isShow
})
})
// #endif
// #ifndef APP-NVUE
this.transform = ''
for (let i in styles) {
if (i === 'opacity') {
this.ani.in = `fade-${type?'out':'in'}`
} else {
this.transform += `${styles[i]} `
}
}
this.timer = setTimeout(() => {
if (!type) {
this.isShow = false
}
this.$emit('change', {
detail: this.isShow
})
}, this.duration)
// #endif
},
getTranfrom(type) {
let styles = {
transform: ''
}
this.modeClass.forEach((mode) => {
switch (mode) {
case 'fade':
styles.opacity = type ? 1 : 0
break;
case 'slide-top':
styles.transform += `translateY(${type?'0':'-100%'}) `
break;
case 'slide-right':
styles.transform += `translateX(${type?'0':'100%'}) `
break;
case 'slide-bottom':
styles.transform += `translateY(${type?'0':'100%'}) `
break;
case 'slide-left':
styles.transform += `translateX(${type?'0':'-100%'}) `
break;
case 'zoom-in':
styles.transform += `scale(${type?1:0.8}) `
break;
case 'zoom-out':
styles.transform += `scale(${type?1:1.2}) `
break;
}
})
return styles
},
_modeClassArr(type) {
let mode = this.modeClass
if (typeof(mode) !== "string") {
let modestr = ''
mode.forEach((item) => {
modestr += (item + '-' + type + ',')
})
return modestr.substr(0, modestr.length - 1)
} else {
return mode + '-' + type
}
},
// getEl(el) {
// console.log(el || el.ref || null);
// return el || el.ref || null
// },
toLine(name) {
return name.replace(/([A-Z])/g, "-$1").toLowerCase();
}
}
}
</script>
<style>
.uni-transition {
transition-timing-function: ease;
transition-duration: 0.3s;
transition-property: transform, opacity;
}
.fade-in {
opacity: 0;
}
.fade-active {
opacity: 1;
}
.slide-top-in {
/* transition-property: transform, opacity; */
transform: translateY(-100%);
}
.slide-top-active {
transform: translateY(0);
/* opacity: 1; */
}
.slide-right-in {
transform: translateX(100%);
}
.slide-right-active {
transform: translateX(0);
}
.slide-bottom-in {
transform: translateY(100%);
}
.slide-bottom-active {
transform: translateY(0);
}
.slide-left-in {
transform: translateX(-100%);
}
.slide-left-active {
transform: translateX(0);
opacity: 1;
}
.zoom-in-in {
transform: scale(0.8);
}
.zoom-out-active {
transform: scale(1);
}
.zoom-out-in {
transform: scale(1.2);
}
</style>

@ -0,0 +1,361 @@
<template>
<view>
<view class="imgs">
<!-- images -->
<view class="single" v-for="(item, key) in list" :key="key" v-if="item.type == 'image'">
<image :src="item.url" mode="aspectFit" @click="previewImg(item.url)" />
<progress :percent="item.process" activeColor="#67C23A" :backgroundColor="item.process == 100 || item.process == undefined ? '#67C23A' : '#F56C6C'"
stroke-width="3" v-if="mode == 'create' && showProcess" />
<view class="del" @click="deleteItem(key)">×</view>
</view>
<!-- file -->
<view class="file" v-for="(item, key) in list" :key="key" v-if="item.type == 'file'">
<view class="noImg" @click="downLoad(item.url)" @longpress="deleteItem(key)">{{ item.fileName }}</view>
<progress :percent="item.process" activeColor="#67C23A" :backgroundColor="item.process == 100 || item.process == undefined ? '#67C23A' : '#F56C6C'"
stroke-width="3" v-if="mode == 'create' && showProcess" />
<view class="del" @tap="deleteItem(key)">×</view>
</view>
<!-- add button -->
<view v-if="mode == 'create'" class="single addNew" @click="chooseFile"><text class="cuIcon-add">+</text></view>
</view>
</view>
</template>
<script>
export default {
props: {
attachmentList: {
type: Array //
},
mode: {
type: String // create => =>
},
uploadFileUrl: {
type: String,
dafault: '#' // url
},
showProcess: {
type: Boolean,
default: true //
},
header: {
type: Object //HTTP Header
},
limit: {
type: Number, //
default: null
},
fileKeyName: {
type: String,
default: 'file' //key
},
canUploadFile: {
type: Boolean,
default: false
}
},
computed: {
list() {
return this.attachmentList;
}
},
data() {
return {};
},
methods: {
previewImg(url) {
uni.previewImage({
current: 0,
urls: [url]
});
},
downLoad(url) {
uni.showModal({
title: '确定要下载此附件吗',
content: ' ',
success: res => {
if (res.confirm) {
uni.showLoading({
title: '下载中,请稍后'
});
console.log(url);
uni.downloadFile({
url: url,
success: res => {
var tempFile = res.tempFilePath;
uni.saveFile({
tempFilePath: res.tempFilePath,
success: res => {
var savedFilePath = res.savedFilePath;
uni.hideLoading();
uni.showToast({
title: '保存成功,路径为' + savedFilePath
});
uni.openDocument({
filePath: savedFilePath,
success: function(res) {
console.log(res);
}
});
}
});
},
fail: res => {
console.log(res);
uni.hideLoading();
uni.showToast({
title: '下载失败',
icon: 'none'
});
}
});
setTimeout(function() {
uni.hideLoading();
}, 20000);
// downloadTask.onProgressUpdate((res) => {
// console.log(',' + res.progress)
// });
}
}
});
},
deleteItem(index) {
uni.showModal({
title: '提示',
content: '确定要删除此项吗?',
success: res => {
if (res.confirm) {
if (this.list[index].process != 100) {
typeof this.list[index].uploadTask != 'undefined' && this.list[index].uploadTask.abort();
}
this.list.splice(index, 1);
this.$forceUpdate();
this.$emit('update:attachmentList', this.list);
}
}
});
},
async chooseFile() {
if (this.limit != null && !isNaN(this.limit)) {
if (this.list.length >= this.limit) {
uni.showToast({
title: '已达到最大上传数量',
icon: 'none'
});
return;
}
}
var canUploadFile = this.canUploadFile;
// APP
// #ifndef APP-PLUS || MP-WEIXIN
canUploadFile = false;
// #endif
// #ifdef APP-PLUS
// APP uniappchuck-filemanagermainfest.json
// chuck-filemanager https://ext.dcloud.net.cn/plugin?id=680
if (canUploadFile) {
const open = uni.requireNativePlugin('chuck-filemanager');
var temp = await new Promise(resoleve => {
open.onIntent('996', path => {
resoleve(path);
});
})
var tempFiles = ['file:///' + temp];
}
// #endif
if (!canUploadFile) {
var temps = await uni.chooseImage({
count: this.limit == null || this.limit - this.list.length > 9 ? 9 : 9 - limit,
sizeType: ['original', 'compressed'], //
sourceType: ['album'] //
});
if (typeof temps[1] == 'undefined') {
return;
}
var tempFiles = temps[1].tempFilePaths;
} else {
// #ifdef MP-WEIXIN
var res = await uni.showActionSheet({
itemList: ['选择图片', '选择文件']
})
if (res[1].tapIndex == 0) {
var temps = await uni.chooseImage({
count: this.limit == null || this.limit - this.list.length > 9 ? 9 : 9 - limit,
sizeType: ['original', 'compressed'], //
sourceType: ['album'] //
});
if (typeof temps[1] == 'undefined') {
return;
}
var tempFiles = temps[1].tempFilePaths;
} else {
//
var temps = await new Promise((resolve, reject) => {
wx.chooseMessageFile({
count: this.limit == null || this.limit - this.list.length > 9 ? 9 : 9 - limit,
type: 'file',
success(res) {
// tempFilePathimgsrc
const tempFilePaths = res.tempFiles;
resolve(tempFilePaths);
}
})
})
var tempFiles = temps.map((ele, index) => {
return ele.path;
})
var fileNames = temps.map((ele, index) => {
return ele.name;
})
}
// #endif
}
for (let i in tempFiles) {
let path = tempFiles[i];
if(typeof fileNames != 'undefined' && typeof fileNames[i] != 'undefined') {
var fileName = fileNames[i];
}else{
var fileName = path.split('/');
fileName = fileName[fileName.length - 1];
}
let index = this.list.length;
//
this.list.push({
fileName: fileName,
url: path,
type: this.isImg(path) ? 'image' : 'file',
index: index,
uploadTask: uploadTask,
process: 0
});
this.$forceUpdate();
var uploadTask = await uni.uploadFile({
url: this.uploadFileUrl,
filePath: path,
name: this.fileKeyName,
headers: this.header,
success: res => {
//
this.$emit('uploadSuccess', res);
if (res.statusCode == 200) {
this.$set(this.list[index], 'process', 100);
this.$emit('update:attachmentList', this.list);
this.$forceUpdate();
} else {
}
}
});
uploadTask.onProgressUpdate(res => {
//
if (res.progress < 90) {
this.$set(this.list[index], 'process', res.progress);
this.$forceUpdate();
}
});
}
},
//
isImg(filePath) {
let index = filePath.lastIndexOf('.');
let ext = filePath.substr(index + 1);
var temp = ['png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'svg', 'tiff'].indexOf(ext.toLowerCase()) !== -1;
return temp;
}
}
};
</script>
<style lang="less" scoped>
.imgs {
display: flex;
flex-wrap: wrap;
width: calc(100% + 15rpx);
& .file {
min-width: calc(100% - 15rpx);
border: 1px solid #ccc;
// border-radius: 10upx;
box-sizing: border-box;
margin-top: 20upx;
position: relative;
& .noImg {
padding: 20rpx;
display: flex;
justify-content: center;
text-align: left;
width: 100%;
font-size: 26upx;
// flex-wrap: wrap;
color: #999;
word-break: break-all;
box-sizing: border-box;
}
}
progress {
margin-top: -6rpx;
border-radius: 20rpx;
}
.del {
position: absolute;
width: 35rpx;
height: 35rpx;
background: #f56c6c;
color: #fff;
top: 0;
text-align: center;
right: 0;
line-height: 35rpx;
font-size: 30rpx;
z-index: 100;
}
& .single {
width: 125upx;
height: 150upx;
border: 1px solid #ccc;
// border-radius: 10upx;
margin-top: 20upx;
margin-right: 12rpx;
position: relative;
// &:nth-of-type(5n) {
// margin-right: 0;
// }
&.addNew {
display: flex;
justify-content: center;
align-items: center;
text {
font-size: 50rpx;
color: #999;
}
}
& image {
width: 100%;
height: 100%;
display: block;
}
}
}
</style>

@ -0,0 +1,148 @@
# 附件上传组件 jin-attachment
> 该组件依赖less, 如果项目没有安装less,请先安装
### 组件功能说明
1. 可选择多张图片
2. 选择图片后自动添加到后面
3. 图片上自带删除图标,点击可删除
4. 图片可点击预览
5. 可获取当前的图片地址数组
6. 可上传图片到服务器
7. 可设置上传的图片数量
8. APP端可以上传文件
9. 可配置是否显示上传进度条
10. 微信端可以选择文件利用接口wx.chooseMessageFile
`已测试安卓端、微信小程序端、H5端`
### 使用说明
拷贝该组件到`components`目录下之后
`script` 中引用组件
``` javascript
import Attachment from '../../components/jin-attachment/jin-attachment.vue';
export default {
components: {Attachment}
}
```
在 template 中使用组件:
``` javascript
<Attachment mode="create" :canUploadFile="true" :uploadFileUrl="uploadFileUrl" :heaer="header" :showProcess="true" :attachmentList.sync="attachmentList"></Attachment>
```
### 重要说明
APP端可以上传文件但是需要引入uni-app插件市场的`chuck-filemanager`插件可以选择试用然后在mainfest.json中勾选该插件既可在自定义基座中运行
chuck-filemanager插件地址 https://ext.dcloud.net.cn/plugin?id=680
### 组件参数说明
属性名 | 类型| 默认值 | 说明|
--------- | --------|--------- | --------|
attachmentList | `Array<Object>` | [] | 初始化的图片数据,可用于单向数据初始化,需要双向绑定可直接用 :attachmentList.sync="attachmentList" |
mode | `String` | null | 组件模式create => 可新增或编辑附件 不填或其他 => 只能查看附件 |
uploadFileUrl | `String` | null | 上传文件的服务器url |
showProcess | `Boolean` | true | 是否显示进度,默认显示 |
header | `Object` | null | 上传图片到服务器时HTTP 请求 Header |
limit | `Number` | null | 限制可上传的图片数量,图片最大上传数量 |
fileKeyName | `String` | 'file' | 用于在服务端通过自定义key值获取该文件数据|
canUploadFile | `Boolean` | false | 是否能上传文件只有微信端和安卓版设置为true时有效
### `attachmentList`参数的 `Object`说明
属性名 | 类型| 默认值 | 说明|
--------- | --------|--------- | --------|
type | `String` | 'image' | 文件类型 image => 图片file => 文件
url | `String` | null | 文件或者图片的url地址
fileName | `String` | null | 文件名
process | `Number` | null | 文件或图片的上传进度
### 自定义事件说明
事件名称 | 说明| 返回参数 |
--------- | --------|--------- |
uploadSuccess | 图片上传成功回调函数,每选择一个或者多个附件后会立即上传至后端服务器| 返回的参数与 uni.uploadFile接口参数一致 |
### demo示例
``` javascript
<template>
<view style="padding: 30rpx;">
<Attachment mode="create" :canUploadFile="true" :uploadFileUrl="uploadFileUrl" :heaer="header" :showProcess="true" :attachmentList.sync="attachmentList" @uploadSuccess="uploadSuccess"></Attachment>
</view>
</template>
<script>
import Attachment from '../../components/jin-attachment/jin-attachment.vue';
export default {
data() {
return {
uploadFileUrl: 'http://localhost:8080', //替换成你的后端接收文件地址
header: {
// 如果需要header请上传
},
attachmentList: [
{
url: 'https://avatar-static.segmentfault.com/151/147/1511478734-593e62d4d3076_big64',
type: 'image',
fileName: 'xxx.png'
},
{
url: 'https://avatar-static.segmentfault.com/820/689/820689728-59e9b54a71fdc_huge256',
type: 'image',
fileName: 'xxx.png'
},
{
url: 'https://avatar-static.segmentfault.com/820/689/820689728-59e9b54a71fdc_huge256',
type: 'image',
fileName: 'xxx.png'
},
{
url: 'https://avatar-static.segmentfault.com/820/689/820689728-59e9b54a71fdc_huge256',
type: 'image',
fileName: 'xxx.png'
},
{
url: 'https://avatar-static.segmentfault.com/820/689/820689728-59e9b54a71fdc_huge256',
type: 'image',
fileName: 'xxx.png'
},
{
type: 'file',
fileName: '这个组件真棒.doc',
url: 'https://avatar-static.segmentfault.com/820/689/820689728-59e9b54a71fdc_huge256'
}
]
}
},
components: {
Attachment
},
methods:{
uploadSuccess(result) {
if(result.statusCode == 200) {
//上传成功的回调处理
uni.showToast({
title: '上传成功',
icon: 'none'
});
}else{
uni.showToast({
title: '上传失败',
icon: 'none'
});
}
}
}
}
</script>
<style>
</style>
```
<br>
> 如遇问题,欢迎评论指出,作者微信 wangjinxin613添加好友时请备注 jin-attachment

@ -0,0 +1,218 @@
<template>
<view>
<view class="score-main">
<view class="score-lable">
<text>评分</text>
</view>
<view class="score-value-text">
<uni-rate allow-half readonly v-model="concreteNum" :size="20" color="#C4CCD8" activeColor="#ED7043" />
<text style="margin-left: 20rpx;" v-if="concreteNum>0">123</text>
<text style="margin-left: 20rpx;" v-else></text>
</view>
</view>
<scroll-view :scroll-y='true' class="pingjia-list" @scrolltolower="reachBottom()">
<view class="list-title"> 123 </view>
<view class="list-item" >
<view class="item-title">
<view class="item-user">21312</view>
<view class="item-pf">
<text style="
color: #34373b;
font-size: 28rpx;
font-weight: 400;
margin-right: 10rpx;
">打分</text>
<uni-rate allow-half :value="2" :size="15" color="#C4CCD8" activeColor="#ED7043"
readonly />
</view>
</view>
<view class="item-article">
123
</view>
<view class="item-time">
发布于121
</view>
</view>
<u-loadmore :status="status" :load-text="loadText" color="#C4CCD8" font-size="24" />
</scroll-view>
<fixedButton @click="submit" :title="'我要评价'"></fixedButton>
</view>
</template>
<script>
export default {
name: "modelScore",
data() {
return {
loadText: {
nomore: "已经到底了~",
loading: "努力加载中",
},
status: "nomore",
statusFlag: false,
query: {
demonstration_id: 0, //id
type: 0,
pageSize: 10,
pageNum: 1,
},
//
concreteNum: 0,
list: [],
//
total: 0,
//
timer: null,
};
},
mounted() {
this.getList()
this.gradeNum()
},
methods: {
//
gradeNum() {
this.concreteNum = 0
},
//
reachStart() {
this.statusFlag = true
this.status = 'loading'
},
//
reachEnd() {
this.statusFlag = false
this.status = 'nomore'
},
//
getList() {
this.reachStart()
this.list = [];
this.total = 0;
this.reachEnd()
},
//
reachBottom() {
if (this.total > this.list.length) {
if (this.statusFlag) {
return
}
this.query.pageNum++;
this.getList(this.query);
}
},
//
resetList() {
this.query.pageSize = 10
this.query.pageNum = 1
this.list = []
this.gradeNum()
this.getList()
},
submit() {
uni.navigateTo({
url: `/sub-public/allPingJia/allPingJia`,
});
},
},
}
</script>
<style lang="scss" scoped>
.score-main {
margin: 20rpx 0;
box-sizing: border-box;
padding: 30rpx;
min-height: 100rpx;
background-color: #fff;
border-radius: 16rpx;
display: flex;
align-items: center;
.score-lable {
width: 190rpx;
}
.score-value-text {
display: flex;
font-size: 30rpx;
align-items: center;
color: rgb(237, 112, 67);
;
}
}
.pingjia-list {
margin-top: 20rpx;
height: 800rpx;
background-color: #ffffff;
border-radius: 16rpx;
box-sizing: border-box;
padding: 30rpx;
.list-title {
font-size: 36rpx;
font-weight: 520;
color: #34373b;
margin-bottom: 20rpx;
}
.list-item {
box-sizing: border-box;
padding: 30rpx 0;
border-bottom: 1rpx solid #dce3ec;
.item-title {
display: flex;
align-items: center;
justify-content: space-between;
.item-user {
font-size: 30rpx;
color: #3976f1;
font-weight: 400;
}
.item-pf {
display: flex;
align-items: center;
}
}
.item-article {
margin: 20rpx 0;
font-size: 28rpx;
font-weight: 400;
color: #34373b;
}
.item-time {
font-size: 26rpx;
font-weight: 400;
color: #9da2ab;
}
}
.lastItem {
border: 0;
padding-bottom: 0;
}
}
// .score-content {
// box-sizing: border-box;
// padding: 30rpx;
// min-height: 300rpx;
// background-color: #fff;
// border-radius: 16rpx;
// .score-value {
// margin-top: 6rpx;
// }
// }
</style>

@ -0,0 +1,167 @@
<template>
<view class="uni-section">
<view class="uni-section-header" @click="onClick">
<view class="uni-section-header__decoration" v-if="type" :class="type" />
<slot v-else name="decoration"></slot>
<view class="uni-section-header__content">
<text :style="{'font-size':titleFontSize,'color':titleColor}" class="uni-section__content-title" :class="{'distraction':!subTitle}">{{ title }}</text>
<text v-if="subTitle" :style="{'font-size':subTitleFontSize,'color':subTitleColor}" class="uni-section-header__content-sub">{{ subTitle }}</text>
</view>
<view class="uni-section-header__slot-right">
<slot name="right"></slot>
</view>
</view>
<view class="uni-section-content" :style="{padding: _padding}">
<slot />
</view>
</view>
</template>
<script>
/**
* Section 标题栏
* @description 标题栏
* @property {String} type = [line|circle|square] 标题装饰类型
* @value line 竖线
* @value circle 圆形
* @value square 正方形
* @property {String} title 主标题
* @property {String} titleFontSize 主标题字体大小
* @property {String} titleColor 主标题字体颜色
* @property {String} subTitle 副标题
* @property {String} subTitleFontSize 副标题字体大小
* @property {String} subTitleColor 副标题字体颜色
* @property {String} padding 默认插槽 padding
*/
export default {
name: 'UniSection',
emits:['click'],
props: {
type: {
type: String,
default: ''
},
title: {
type: String,
required: true,
default: ''
},
titleFontSize: {
type: String,
default: '14px'
},
titleColor:{
type: String,
default: '#333'
},
subTitle: {
type: String,
default: ''
},
subTitleFontSize: {
type: String,
default: '12px'
},
subTitleColor: {
type: String,
default: '#999'
},
padding: {
type: [Boolean, String],
default: false
}
},
computed:{
_padding(){
if(typeof this.padding === 'string'){
return this.padding
}
return this.padding?'10px':''
}
},
watch: {
title(newVal) {
if (uni.report && newVal !== '') {
uni.report('title', newVal)
}
}
},
methods: {
onClick() {
this.$emit('click')
}
}
}
</script>
<style lang="scss" >
$uni-primary: #2979ff !default;
.uni-section {
background-color: #fff;
.uni-section-header {
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
padding: 12px 10px;
font-weight: normal;
&__decoration{
margin-right: 6px;
background-color: $uni-primary;
&.line {
width: 4px;
height: 12px;
border-radius: 10px;
}
&.circle {
width: 8px;
height: 8px;
border-top-right-radius: 50px;
border-top-left-radius: 50px;
border-bottom-left-radius: 50px;
border-bottom-right-radius: 50px;
}
&.square {
width: 8px;
height: 8px;
}
}
&__content {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
flex: 1;
color: #333;
.distraction {
flex-direction: row;
align-items: center;
}
&-sub {
margin-top: 2px;
}
}
&__slot-right{
font-size: 14px;
}
}
.uni-section-content{
font-size: 14px;
}
}
</style>

@ -0,0 +1,30 @@
// 应用全局配置
module.exports = {
// baseUrl: "/baseApi", //跨域(企业端、本地测试)
baseUrl: "https://yth.scjg.ln.gov.cn/api/shianliaoning/lnapi", //外网服务器(上线)
// baseUrl: "https://www.jichuanglanhai.com:88/lnapi", //自己服务器(公众端,本地测试)
// iamgeBaseUrl: 'https://www.jichuanglanhai.com/demo/liaoning-app-file/', //图片域名
iamgeBaseUrl: 'https://yth.scjg.ln.gov.cn/sgfs-enterprise/liaoning-app-file/file/', //图片域名
// 应用信息
appInfo: {
// 应用名称
name: "LiaoNingApp",
// 应用版本
version: "1.0.0",
// 应用logo
logo: "/static/logo.png",
// 官方网站
site_url: "http://ruoyi.vip",
// 政策协议
agreements: [{
title: "隐私政策",
url: "https://ruoyi.vip/protocol.html",
},
{
title: "用户服务协议",
url: "https://ruoyi.vip/protocol.html",
},
],
},
};

@ -0,0 +1,42 @@
import Vue from "vue";
import App from "./App";
import store from "./store"; // store
import plugins from "./plugins"; // plugins
import "./permission"; // permission
import iftabbar from "./utils/iftabbar"; //引入底边导航判断
import fixedButton from '@/components/fixedButton/fixedButton.vue'
import modelScore from '@/components/modelScore/modelScore.vue'
Vue.use(plugins);
import {
fileType,
deletelDNS
} from './utils/tool.js'
import {
getDicts
} from "@/api/dict.js";
Vue.prototype.fileType = fileType
Vue.prototype.deletelDNS = deletelDNS
Vue.prototype.getDicts = getDicts;
Vue.component("fixedButton", fixedButton);
Vue.component("modelScore", modelScore);
import uView from "uview-ui";
Vue.use(uView);
if (process.env.NODE_ENV === 'production') { //生产环境禁用console.log
console.log = function() {};
}
Vue.config.productionTip = false;
Vue.prototype.$store = store;
Vue.prototype.$iftabbar = iftabbar;
App.mpType = "app";
const app = new Vue({
...App,
});
app.$mount();

@ -0,0 +1,110 @@
{
"name" : "食安辽宁移动端",
"appid" : "__UNI__10B1AE1",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
"app-plus" : {
"usingComponents" : true,
"nvueCompiler" : "uni-app",
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
"modules" : {
"Maps" : {}
},
"distribute" : {
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
"ios" : {},
"sdkConfigs" : {
"maps" : {
"amap" : {
"appkey_ios" : "cb45e55a9ef7b5e450d0ce255bfb5798",
"appkey_android" : "cb45e55a9ef7b5e450d0ce255bfb5798"
}
}
}
}
},
"quickapp" : {},
"mp-weixin" : {
"appid" : "wxceab52cfb9a87f72",
"setting" : {
"urlCheck" : false,
"es6" : false,
"minified" : true,
"postcss" : true
},
"optimization" : {
"subPackages" : true
},
"usingComponents" : true,
"permission" : {},
"unipush" : {
"enable" : false
}
},
"vueVersion" : "2",
"h5" : {
"template" : "static/index.html",
"devServer" : {
"port" : 9090,
"https" : true,
"proxy" : {
"/lnapi" : {
"target" : "https://yth.scjg.ln.gov.cn",
"changeOrigin" : true,
"secure" : false,
"pathRewrite" : {
"^/lnapi" : ""
}
},
"/baseApi" : {
"target" : "https://yth.scjg.ln.gov.cn/api/shianliaoning/lnapi/",
"changeOrigin" : true,
"secure" : false,
"pathRewrite" : {
"^/baseApi" : ""
}
}
}
},
"title" : "食安辽宁社会共治",
"router" : {
"mode" : "hash",
"base" : "./"
},
"sdkConfigs" : {
"maps" : {
"qqmap" : {
"key" : "TYBBZ-A2AKV-MLZPW-UFNQI-HKNVE-BEFZH"
}
}
},
"unipush" : {
"enable" : false
}
}
}

@ -0,0 +1,15 @@
{
"id": "hqs-popup",
"name": "hqs-popup弹窗组件支持手势滑动关闭",
"version": "1.3.2",
"description": "基于uni-popup实现增加了手势滑动关闭弹窗功能体验和抖音评论下滑关闭类似",
"keywords": [
"仿抖音评论弹窗",
"自带scrollview支持列表内容",
"求好评~"
],
"dependencies": {
"jweixin-module": "^1.6.0",
"save": "^2.9.0"
}
}

@ -0,0 +1,554 @@
{
"easycom": {
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "食安辽宁",
"navigationBarBackgroundColor": "#FFFFFF"
},
"pages": [{
"path": "pages/login",
"style": {
"navigationStyle": "custom",
"app-plus": {
"titleNView": {
"buttons": [{
"text": ""
}]
}
}
}
},
// {
// "path": "pages/company-home/index",
// "style": {
// "navigationBarTitleText": "企业首页",
// "navigationStyle": "custom",
// "app-plus": {
// "titleNView": {
// "buttons": [{
// "text": ""
// }]
// }
// }
// }
// },
{
"path": "pages/public-home/index",
"style": {
"navigationBarTitleText": "公众首页",
"navigationStyle": "custom",
"app-plus": {
"titleNView": {
"buttons": [{
"text": ""
}]
}
}
}
},
{
"path": "pages/scanCodes/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom",
"app-plus": {
"titleNView": {
"buttons": [{
"text": ""
}]
}
}
}
},
{
"path": "pages/company-mine/index",
"style": {
"navigationBarTitleText": "企业我的",
"navigationStyle": "custom",
"app-plus": {
"titleNView": {
"buttons": [{
"text": ""
}]
}
}
}
},
{
"path": "pages/public-mine/index",
"style": {
"navigationBarTitleText": "公众我的",
"navigationStyle": "custom",
"app-plus": {
"titleNView": {
"buttons": [{
"text": ""
}]
}
}
}
},
{
"path": "pages/index",
"style": {
"navigationBarTitleText": "食安辽宁",
"navigationStyle": "custom"
}
},
{
"path": "pages/work/index",
"style": {
"navigationBarTitleText": "工作台"
}
},
{
"path": "pages/mine/index",
"style": {
"navigationBarTitleText": "我的"
}
},
{
"path": "pages/mine/avatar/index",
"style": {
"navigationBarTitleText": "修改头像"
}
},
{
"path": "pages/mine/info/index",
"style": {
"navigationBarTitleText": "个人信息"
}
},
{
"path": "pages/mine/info/edit",
"style": {
"navigationBarTitleText": "编辑资料"
}
},
{
"path": "pages/mine/pwd/index",
"style": {
"navigationBarTitleText": "修改密码"
}
},
{
"path": "pages/mine/setting/index",
"style": {
"navigationBarTitleText": "应用设置"
}
},
{
"path": "pages/mine/help/index",
"style": {
"navigationBarTitleText": "常见问题"
}
},
{
"path": "pages/common/webview/index",
"style": {
"navigationBarTitleText": "浏览网页"
}
},
{
"path": "pages/common/textview/index",
"style": {
"navigationBarTitleText": "浏览文本"
}
}
],
"subPackages": [{
"root": "sub-interaction",
"pages": [{
"path": "publicity/publicity",
"style": {
"navigationBarTitleText": "企业标准公示",
"enablePullDownRefresh": false
}
},
{
"path": "publicity/form",
"style": {
"navigationBarTitleText": "新增企业标准公示",
"enablePullDownRefresh": false
}
},
{
"path": "publicity/info",
"style": {
"navigationBarTitleText": "企业标准公示详情",
"enablePullDownRefresh": false
}
},
{
"path": "bang-dan/bang-dan",
"style": {
"navigationBarTitleText": "食品安全红黑榜",
"enablePullDownRefresh": false
}
},
{
"path": "bang-dan/info",
"style": {
"navigationBarTitleText": "榜单详情",
"enablePullDownRefresh": false
}
}, {
"path": "online-video/online-video",
"style": {
"navigationBarTitleText": "食安辽宁线上播放",
"enablePullDownRefresh": false
}
},
{
"path": "online-video/info",
"style": {
"navigationBarTitleText": "视频",
"enablePullDownRefresh": false
}
},
{
"path": "excellent/excellent",
"style": {
"navigationBarTitleText": "名优展示",
"enablePullDownRefresh": false
}
}, {
"path": "consumer-consult/consumer-consult",
"style": {
"navigationBarTitleText": "消费者咨询",
"enablePullDownRefresh": false
}
}
, {
"path": "selfInfo/selfInfo",
"style": {
"navigationBarTitleText": "个人信息",
"enablePullDownRefresh": false
}
}, {
"path": "system/system",
"style": {
"navigationBarTitleText": "关于系统",
"enablePullDownRefresh": false
}
}
]
},
{
"root": "sub-public",
"pages": [{
"path": "survey/survey",
"style": {
"navigationBarTitleText": "满意度调查"
}
},
{
"path": "enterprise-query/enterprise-query",
"style": {
"navigationBarTitleText": "企业综合查询",
"enablePullDownRefresh": false
}
},
{
"path": "shifan-chuangjian/shifan-chuangjian",
"style": {
"navigationBarTitleText": "示范创建",
"enablePullDownRefresh": false
}
},
{
"path": "society-teach/society-teach",
"style": {
"navigationBarTitleText": "社会教育",
"enablePullDownRefresh": false
}
},
{
"path": "oldman-teach/oldman-teach",
"style": {
"navigationBarTitleText": "老年人防骗教育",
"enablePullDownRefresh": false
}
},
{
"path": "oldman-teach/info",
"style": {
"navigationBarTitleText": "详情",
"enablePullDownRefresh": false
}
},
{
"path": "food-lipei/food-lipei",
"style": {
"navigationBarTitleText": "理赔记录",
"enablePullDownRefresh": false
}
},
{
"path": "shenqing-lipei/shenqing-lipei",
"style": {
"navigationBarTitleText": "申请理赔",
"enablePullDownRefresh": false
}
},
{
"path": "shenqing-lipei/form",
"style": {
"navigationBarTitleText": "申请理赔记录",
"enablePullDownRefresh": false
}
}, {
"path": "lipei-info/lipei-info",
"style": {
"navigationBarTitleText": "理赔记录详情",
"enablePullDownRefresh": false
}
},
{
"path": "shifan-chuangjian/city-county-info/index",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "详情"
}
},
{
"path": "shifan-chuangjian/enterprise-info/index",
"style": {
"navigationBarTitleText": "企业详情",
"enablePullDownRefresh": false
}
}, {
"path": "enterprise-new-info/enterprise-new-info",
"style": {
"navigationBarTitleText": "企业详情",
"enablePullDownRefresh": false
// "mp-weixin": {
// "subNVues": [{
// "id": "nav", //
// "path": "sub-public/enterprise-new-info/enterpriseMap", //
// "style": {
// "position": "absolute",
// "width": "100%",
// "height": "100%"
// }
// }]
// }
}
}, {
"path": "allPingJia/allPingJia",
"style": {
"navigationBarTitleText": "新增评价",
"enablePullDownRefresh": true,
"onReachBottomDistance": 70
}
}, {
"path": "addMessage/addMessage",
"style": {
"navigationBarTitleText": "我要提问",
"enablePullDownRefresh": false
}
}, {
"path": "newAddPJ/newAddPJ",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
]
},
{
"root": "sub-enterprise",
"pages": [{
"path": "company-eval/company-eval",
"style": {
"navigationBarTitleText": "主体评价情况",
"enablePullDownRefresh": false
}
},
{
"path": "company-surver/company-surver",
"style": {
"navigationBarTitleText": "企业调查单",
"enablePullDownRefresh": false
}
},
{
"path": "firm-form/firm-form",
"style": {
"navigationBarTitleText": "填写企业调查单",
"enablePullDownRefresh": false
}
},
{
"path": "testing-organizations/testing-organizations",
"style": {
"navigationBarTitleText": "检测机构",
"enablePullDownRefresh": false
}
},
{
"path": "organ-info/organ-info",
"style": {
"navigationBarTitleText": "检测机构详情",
"enablePullDownRefresh": false
}
},
{
"path": "apply-claims/apply-claims",
"style": {
"navigationBarTitleText": "申请理赔",
"enablePullDownRefresh": false
}
},
{
"path": "product-Appraise/product-Appraise",
"style": {
"navigationBarTitleText": "产品评价",
"enablePullDownRefresh": false
}
},
{
"path": "food-toubao/food-toubao",
"style": {
"navigationBarTitleText": "食品责任投保",
"enablePullDownRefresh": true
}
},
{
"path": "food-lipei/food-lipei",
"style": {
"navigationBarTitleText": "食责险理赔",
"enablePullDownRefresh": false
}
},
{
"path": "will-insure/will-insure",
"style": {
"navigationBarTitleText": "我要投保",
"enablePullDownRefresh": false
}
},
{
"path": "policy-guide/policy-guide",
"style": {
"navigationBarTitleText": "政策指南",
"enablePullDownRefresh": false
}
},
{
"path": "policy-business/policy-business",
"style": {
"navigationBarTitleText": "连锁经营指南",
"enablePullDownRefresh": false
}
},
{
"path": "policy-details/policy-details",
"style": {
"navigationBarTitleText": "政策指南详情",
"enablePullDownRefresh": false
}
},
{
"path": "toubao-xiangqing/toubao-xiangqing",
"style": {
"navigationBarTitleText": "投保详情",
"enablePullDownRefresh": false
}
},
{
"path": "toubao-xiangqing/toubao-file",
"style": {
"navigationBarTitleText": "附件预览",
"enablePullDownRefresh": false
}
},
{
"path": "product-Info/product-Info",
"style": {
"navigationBarTitleText": "产品信息",
"enablePullDownRefresh": false
}
}, {
"path": "startInsuring/startInsuring",
"style": {
"navigationBarTitleText": "食品责任投保",
"enablePullDownRefresh": false
}
}, {
"path": "modelRequest/modelRequest",
"style": {
"navigationBarTitleText": "示范企业申请",
"enablePullDownRefresh": false
}
}
]
}
],
"tabBar": {
"color": "#9DA2AB",
"selectedColor": "#3976F1",
"borderStyle": "white",
"backgroundColor": "#ffffff",
"list": [
// {
// "pagePath": "pages/company-home/index",
// "iconPath": "static/images/liao-ning/tab-home-n.png",
// "selectedIconPath": "static/images/liao-ning/tab-home-s.png",
// "text": "首页"
// },
// {
// "pagePath": "pages/company-mine/index",
// "iconPath": "static/images/liao-ning/tab-mine-n.png",
// "selectedIconPath": "static/images/liao-ning/tab-mine-s.png",
// "text": "我的"
// }
{
"pagePath": "pages/public-home/index",
"iconPath": "static/images/liao-ning/tab-home-n.png",
"selectedIconPath": "static/images/liao-ning/tab-home-s.png",
"text": "首页"
},
{
"pagePath": "pages/public-mine/index",
"iconPath": "static/images/liao-ning/tab-mine-n.png",
"selectedIconPath": "static/images/liao-ning/tab-mine-s.png",
"text": "我的"
}
]
}
}

@ -0,0 +1,43 @@
<template>
<view>
<uni-card class="view-title" :title="title">
<text class="uni-body view-content">你好</text>
</uni-card>
</view>
</template>
<script>
export default {
data() {
return {
title: '',
content: ''
}
},
onLoad(options) {
this.title = options.title
this.content = options.content
uni.setNavigationBarTitle({
title: options.title
})
}
}
</script>
<style scoped>
page {
background-color: #ffffff;
}
.view-title {
font-weight: bold;
}
.view-content {
font-size: 26rpx;
padding: 12px 5px 0;
color: #333;
line-height: 24px;
font-weight: normal;
}
</style>

@ -0,0 +1,34 @@
<template>
<view v-if="params.url">
<web-view :webview-styles="webviewStyles" :src="`${params.url}`"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
params: {},
webviewStyles: {
progress: {
color: "#FF3333"
}
}
}
},
props: {
src: {
type: [String],
default: null
}
},
onLoad(event) {
this.params = event
if (event.title) {
uni.setNavigationBarTitle({
title: event.title
})
}
}
}
</script>

@ -0,0 +1,350 @@
<!--
* @Author: 张涛
* @Date: 2023-02-17 14:35:18
* @LastEditors: 张涛
* @LastEditTime: 2023-03-03 17:01:27
* @FilePath: \liaoning-uniapp\pages\company-home\index.vue
-->
<template>
<view class="container-main">
<view class="header-bg">
<view class="header-logo"></view>
<view class="user-data">
<text>{{ userName }}</text>
<!--<text>{{ code }}</text> -->
</view>
</view>
<view class="main">
<view class="grid">
<view class="grid-item" v-for="(item, index) in gridList" :key="index">
<view class="item-child" :style="{ background: item.bg }" @click="goPath(item)">
<image :src="baseImgUrl + item.icon" mode=""></image>
<text>{{ item.name }}</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
getSelfInfo
} from "@/api/system/user.js";
import {
setToken
} from "@/utils/auth";
import {
ControllerLogin,
loginRemote
} from "@/api/login.js";
export default {
data() {
return {
baseImgUrl: getApp().globalData.config.iamgeBaseUrl,
gridList: [{
name: "产品评价",
icon: "liao-ning/icon_cppj.png",
path: "/sub-enterprise/product-Appraise/product-Appraise",
bg: "#F2F6FF",
},
{
name: "主体评价",
icon: "liao-ning/icon_ztpj.png",
path: "/sub-enterprise/company-eval/company-eval",
bg: "#FCF7F1",
},
{
name: "政策指南",
icon: "liao-ning/icon_zczn.png",
path: "/sub-enterprise/policy-guide/policy-guide",
bg: "#FCF7F1",
},
{
name: "检测机构",
icon: "liao-ning/icon_jcjg.png",
path: "/sub-enterprise/testing-organizations/testing-organizations",
bg: "#EFF9ED",
},
{
name: "食责险投保",
icon: "liao-ning/icon_szxtb.png",
path: "/sub-enterprise/food-toubao/food-toubao",
bg: "#F9F7FF",
},
{
name: "食责险理赔",
icon: "liao-ning/icon_szxlp.png",
path: "/sub-public/food-lipei/food-lipei",
bg: "#F2F6FF",
},
{
name: "企业调查单",
icon: "liao-ning/icon_qydcd@2x.png",
path: "/sub-public/survey/survey",
bg: "#EFF9ED",
},
{
name: "示范企业申请",
icon: "liao-ning/icon_sfqysq@2x.png",
path: "/sub-enterprise/modelRequest/modelRequest",
bg: "#FCF7F1",
},
{
name: "企业标准公示",
icon: "liao-ning/icon_qybzgs@2x.png",
path: "/sub-interaction/publicity/publicity",
bg: "#F9F7FF",
},
{
name: "食品安全红黑榜",
icon: "liao-ning/icon_spaqhhb@2x.png",
path: "/sub-interaction/bang-dan/bang-dan",
bg: "#F2F6FF",
},
{
name: "食安辽宁线上播放",
icon: "liao-ning/icon_xsbf@2x.png",
path: "/sub-interaction/online-video/online-video",
bg: "#FCF7F1",
},
{
name: "名优展示",
icon: "liao-ning/icon_myzs@2x.png",
path: "/sub-interaction/excellent/excellent",
bg: "#EFF9ED",
},
{
name: "消费者咨询",
icon: "liao-ning/icon_xfzzx@2x.png",
path: "/sub-interaction/consumer-consult/consumer-consult",
bg: "#F2F6FF",
},
],
code: "",
userName: "",
loginForm: {
pdma: "UEBzc3dvcjY=",
urne: "2100002310090",
},
};
},
onLoad(option) {
/**企业端不需要登录页 嵌入到外部系统内取本地信息企业名称企业统一社会代码写死登录获取token */
this.getenterpriseInfo();
},
methods: {
// + token
getenterpriseInfo() {
let enterpriseData = uni.getStorageSync("subjectUser");
if (enterpriseData) {
enterpriseData = JSON.parse(enterpriseData);
} else {
enterpriseData = {
fEntname: "沈阳市辽中区嘉毅白酒坊",
fUniscid: "91210122MA0TWNGB2G",
};
}
ControllerLogin({
pdma: "UEBzc3dvcjY=",
// pdma: "MTExMTEx",
urne: "2100002310090",
})
.then((res) => {
setToken(res.data.result.userToken);
//selfInfo便
getSelfInfo();
//
this.userName = enterpriseData.fEntname;
this.code = enterpriseData.fUniscid;
uni.setStorage({
key: "USER_DATA",
data: {
userDto: {
enterpriseName: this.userName,
code: this.code,
},
},
});
})
.catch(() => {
uni.showToast({
title: "获取信息失败",
icon: "error",
});
});
},
//
goPath(item) {
if (item.name == "食责险理赔") {
uni.navigateTo({
url: item.path + `?showBtn=${2}`,
});
return;
}
if (item.name == "食品安全红黑榜" || item.name == "企业标准公示") {
uni.navigateTo({
url: item.path + `?code=${this.code}`,
});
return;
}
uni.navigateTo({
url: item.name == "企业调查单" ?
item.path + `?name=${item.name}&code=${this.code}` : item.path,
});
},
},
};
</script>
<style lang="scss" scoped>
uni-page-body,
page {
// height: 100%;
background: #e4ecff;
}
.container-main {
position: relative;
padding-bottom: 100rpx;
}
.header-bg {
position: relative;
z-index: 10;
width: 100%;
height: 416rpx;
background: url("https://yth.scjg.ln.gov.cn/sgfs-enterprise/liaoning-app-file/file/liao-ning/home-header.png");
background-size: 100% 100%;
.header-logo {
position: absolute;
left: 25rpx;
top: 114rpx;
width: 370rpx;
height: 63rpx;
background: url("https://yth.scjg.ln.gov.cn/sgfs-enterprise/liaoning-app-file/file/liao-ning/home-bg.png");
background-size: 100% 100%;
}
.user-data {
position: absolute;
left: 25rpx;
top: 220rpx;
font-size: 34rpx;
font-weight: 500;
color: #ffffff;
letter-spacing: 2rpx;
font-family: "PingFang SC-中黑体";
}
}
.main {
position: absolute;
left: 0;
z-index: 20;
top: 300rpx;
min-height: 100rpx;
width: 100%;
box-sizing: border-box;
padding: 0 20rpx;
padding-bottom: 150rpx;
.grid {
box-sizing: border-box;
padding: 30rpx;
margin-top: 20rpx;
background: #ffffff;
box-shadow: 0px 0px 20rpx 0px rgba(57, 118, 241, 0.102);
border-radius: 16rpx;
border: 2rpx solid #dce3ec;
display: flex;
flex-wrap: wrap;
&>view {
width: 50%;
height: 180rpx;
display: flex;
align-items: center;
margin-bottom: 20rpx;
.item-child {
width: 315rpx;
height: 180rpx;
border-radius: 16rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
image {
height: 85rpx;
width: 85rpx;
}
text {
font-size: 28rpx;
font-weight: 550;
font-family: "PingFang SC-中黑体";
color: #34373b;
}
}
}
&>view:nth-child(even) {
justify-content: flex-end;
}
&>view:last-child,
&>view:nth-last-child(2) {
margin-bottom: 0;
}
}
}
.firm-survey {
margin-top: 20rpx;
.survey-main {
background: #ffffff;
box-shadow: 0px 0px 20px 0px rgba(57, 118, 241, 0.102);
border-radius: 32rpx;
border: 4rpx solid #dce3ec;
display: flex;
padding: 6rpx 90rpx 6rpx 53rpx;
box-sizing: border-box;
align-items: center;
justify-content: space-between;
&>image {
width: 152rpx;
height: 168rpx;
}
.survey-left {
margin-right: 127rpx;
display: flex;
flex-direction: column;
&>text:nth-child(1) {
font-family: PingFang SC-中黑体, PingFang SC;
width: 200rpx;
font-weight: 600;
color: #34373b;
line-height: 46rpx;
font-size: 40rpx;
}
&>text:nth-child(2) {
font-family: PingFang SC-常规体, PingFang SC;
width: 288rpx;
margin-top: 10rpx;
font-weight: 400;
color: #616367;
line-height: 46rpx;
font-size: 32rpx;
}
}
}
}
</style>

@ -0,0 +1,234 @@
<!--
* @Author: 张涛
* @Date: 2023-02-17 14:35:18
* @LastEditors: 张涛
* @LastEditTime: 2023-03-03 17:12:18
* @FilePath: \liaoning-uniapp\pages\company-mine\index.vue
-->
<template>
<view class="container-main">
<view class="nav-title">
<text>我的</text>
</view>
<view class="header-bg">
<view class="header-logo"></view>
<view class="user-data">
<text class="user-company">{{userName}}</text>
</view>
</view>
<view class="main">
<view class="list">
<view class="items" v-for="(item, index) in list" :key="index" @click="clickMineCell(item)">
<view class="item">
<view class="item-left">
<image class="item-icon" :src="baseImgUrl + item.icon" alt="" />
<text class="item-title">{{ item.title }}</text>
</view>
<uni-icons type="right" size="20" color="#D5D5D5"></uni-icons>
</view>
<view :style="
index != list.length - 1
? 'width:86%; height:0.5px; background:#dce3ec;margin: 0 auto;'
: ''
" />
</view>
</view>
</view>
<!-- <view class="change-role" @click="handleLogout">
<text>退出登录</text>
</view> -->
</view>
</template>
<script>
export default {
data() {
return {
userName: '',
baseImgUrl: getApp().globalData.config.iamgeBaseUrl,
list: [{
id: 1,
title: "企业信息",
icon: "liao-ning/icon_xxsz.png",
path: '/selfInfo/selfInfo'
},
{
id: 2,
title: "关于系统",
icon: "liao-ning/icon_sysc.png",
path: '/system/system'
},
],
};
},
onShow() {
// // tabbar
// this.$iftabbar.reTabbar();
// //
// this.$iftabbar.ifTabbar();
uni.getStorage({
key: 'USER_DATA',
success: (res) => {
this.userName = res.data.userDto.enterpriseName
}
})
},
methods: {
clickMineCell(item) {
uni.navigateTo({
url: `/sub-interaction${item.path}?code=true`
})
},
handleLogout() {
this.$modal.confirm("确定注销并退出系统吗?").then(() => {
this.$store.dispatch("LogOut").then(() => {
uni.removeStorageSync("USER_DATA");
uni.removeStorageSync("App-Token");
uni.removeStorageSync("roleId");
this.$tab.reLaunch("/pages/index");
});
});
},
},
};
</script>
<style lang="scss" scoped>
.container-main {
position: relative;
height: 100%;
}
.nav-title {
position: absolute;
z-index: 11;
top: 116rpx;
width: 100%;
text-align: center;
text {
color: #ffffff;
font-size: 40rpx;
font-family: "PingFang SC-中粗体, PingFang SC";
}
}
.header-bg {
position: relative;
z-index: 10;
width: 100vw;
height: 416rpx;
background: url("https://www.jichuanglanhai.com/demo/liaoning-app-file/liao-ning/home-header.png");
background-size: 100% 100%;
background-repeat: no-repeat;
.header-logo {
position: absolute;
left: 25rpx;
top: 114rpx;
width: 370rpx;
height: 63rpx;
// background: url("static/images/liao-ning/home-bg.png");
background-size: 100% 100%;
background-repeat: no-repeat;
}
.user-data {
position: absolute;
left: 25rpx;
top: 200rpx;
.user-company {
letter-spacing: 2rpx;
font-size: 34rpx;
font-family: "PingFang SC-中黑体, PingFang SC";
font-weight: 500;
color: #ffffff;
}
.user-name {
font-size: 28rpx;
font-family: "PingFang SC-常规体, PingFang SC";
color: #ffffff;
}
.user-tag {
margin-left: 17rpx;
padding: 3rpx 17rpx;
background-color: #ffffff;
font-size: 20rpx;
font-family: "PingFang SC-常规体, PingFang SC";
color: #3976f1;
border-radius: 90rpx 90rpx 90rpx 90rpx;
}
}
}
.main {
position: absolute;
left: 0;
z-index: 20;
top: 326rpx;
min-height: 100rpx;
width: 100%;
box-sizing: border-box;
padding: 0 20rpx;
.list {
border-radius: 10rpx;
box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(57, 118, 241, 0.102);
background: #ffffff;
border: 2px solid #dce3ec;
.item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 34rpx 46rpx;
.item-left {
display: flex;
align-items: center;
.item-icon {
width: 36rpx;
height: 36rpx;
}
.item-title {
margin-left: 15rpx;
font-size: 34rpx;
font-family: "PingFang SC-常规体, PingFang SC";
font-weight: 400;
color: #34373b;
}
}
}
}
}
.change-role {
position: absolute;
left: 50%;
bottom: 15%;
transform: translateX(-50%);
width: 90%;
background: #ffffff;
box-shadow: 0 0 20rpx 0 rgba(57, 118, 241, 0.102);
border-radius: 10rpx;
border: 2rpx solid #dce3ec;
padding: 39rpx 0;
text-align: center;
text {
font-size: 30rpx;
font-family: "PingFang SC-中黑体, PingFang SC";
font-weight: 500;
color: #eb5b47;
}
}
</style>

@ -0,0 +1,43 @@
<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">Hello RuoYi</text>
</view>
</view>
</template>
<script>
export default {
onLoad: function() {
}
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>

@ -0,0 +1,179 @@
<template>
<view>
<view class="containerBox">
<view class="img">
<image :src="baseImgUrl + 'liao-ning/title.png'" mode="widthFix"></image>
</view>
<view class="formUser">
<view class="userIcon">
<image :src="baseImgUrl + 'liao-ning/yonghhu-nor.png'" mode="widthFix"></image>
</view>
<view class="inputBox">
<!-- 企业端 -->
<!-- <input v-model="loginForm.urne" type="text" placeholder="请输入账号" maxlength="20" /> -->
<!-- 公众端 -->
<input v-model="form.username" type="text" placeholder="请输入辽事通手机号" maxlength="20" />
</view>
</view>
<view class="formUser">
<view class="userIcon">
<image :src="baseImgUrl + 'liao-ning/mima-nor.png'" mode="widthFix"></image>
</view>
<view class="inputBox">
<!-- 企业端 -->
<!-- <input v-model="loginForm.pdma" type="password" placeholder="请输入密码" maxlength="20" /> -->
<!-- 公众端 -->
<input v-model="form.password" type="password" placeholder="请输入密码" maxlength="20" />
</view>
</view>
<!-- 企业端 -->
<!-- <view class="formUser" id="btn" @click="handleLogin(0)"><text style="margin-right: 20rpx;"></text></view> -->
<!-- 公众端 -->
<view class="formUser" id="btn" @click="handleLogin(1)"><text style="margin-right: 20rpx"></text></view>
</view>
</view>
</template>
<script>
import {
getCodeImg,
ControllerLogin,
remoteLogin
} from "@/api/login";
import {
getSelfInfo
} from "@/api/system/user.js";
import {
setToken
} from "@/utils/auth";
export default {
data() {
return {
baseImgUrl: getApp().globalData.config.iamgeBaseUrl,
codeUrl: "",
captchaEnabled: false,
globalConfig: getApp().globalData.config,
//
// pdma: "MTExMTEx",
// urne: "2100002310090",
//
// pdma: "UEBzc3dvcjY=",
// urne: "2100002310090",
loginForm: {
pdma: "UEBzc3dvcjY=",
urne: "2100002310090",
},
form: {
password: "",
score: "1",
username: "",
},
usertype: 0,
};
},
created() {
// this.getCode();
},
methods: {
//
handleLogin(type) {
console.log(type);
// this.usertype = type;
// uni.setStorageSync("roleId", type);
// if (this.loginForm.urne === "") {
// this.$modal.msgError("");
// } else if (this.loginForm.pdma === "") {
// this.$modal.msgError("");
// } else {
// uni.showLoading({
// title: "",
// });
// }
// this.$tab.reLaunch("/pages/company-home/index");
this.$tab.reLaunch("/pages/public-home/index");
},
//
async pwdLogin() {
//
this.loginSuccess()
},
//
loginSuccess(result) {
},
},
};
</script>
<style lang="scss" scoped>
.containerBox {
height: 100vh;
width: 100%;
background: url("https://yth.scjg.ln.gov.cn/sgfs-enterprise/liaoning-app-file/file/liao-ning/img_bg.png");
background-size: cover;
box-sizing: border-box;
.img {
text-align: center;
padding-top: 80rpx;
width: 100%;
margin-bottom: 40rpx;
image {
width: 300rpx;
height: 400rpx;
}
}
.formUser {
margin: 0 auto;
margin-bottom: 40rpx;
border-radius: 12rpx;
width: 85%;
background-color: #f2f4f9;
height: 100rpx;
display: flex;
justify-content: space-between;
.userIcon {
width: 15%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
position: relative;
&::before {
content: "";
position: absolute;
top: 32rpx;
right: 12rpx;
width: 3rpx;
height: 40rpx;
background-color: #b9c3ce;
}
image {
width: 40rpx;
}
}
.inputBox {
width: 83%;
input {
height: 100%;
}
}
}
#btn {
background: linear-gradient(-90deg, #1969fc, #46b5fd);
justify-content: center;
align-items: center;
font-size: 34rpx;
color: #ffffff;
font-weight: 600;
}
}
</style>

@ -0,0 +1,631 @@
<template>
<view class="container">
<view class="page-body uni-content-info">
<view class='cropper-content'>
<view v-if="isShowImg" class="uni-corpper" :style="'width:'+cropperInitW+'px;height:'+cropperInitH+'px;background:#000'">
<view class="uni-corpper-content" :style="'width:'+cropperW+'px;height:'+cropperH+'px;left:'+cropperL+'px;top:'+cropperT+'px'">
<image :src="imageSrc" :style="'width:'+cropperW+'px;height:'+cropperH+'px'"></image>
<view class="uni-corpper-crop-box" @touchstart.stop="contentStartMove" @touchmove.stop="contentMoveing" @touchend.stop="contentTouchEnd"
:style="'left:'+cutL+'px;top:'+cutT+'px;right:'+cutR+'px;bottom:'+cutB+'px'">
<view class="uni-cropper-view-box">
<view class="uni-cropper-dashed-h"></view>
<view class="uni-cropper-dashed-v"></view>
<view class="uni-cropper-line-t" data-drag="top" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-line-r" data-drag="right" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-line-b" data-drag="bottom" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-line-l" data-drag="left" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-t" data-drag="top" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-tr" data-drag="topTight"></view>
<view class="uni-cropper-point point-r" data-drag="right" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-rb" data-drag="rightBottom" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-b" data-drag="bottom" @touchstart.stop="dragStart" @touchmove.stop="dragMove" @touchend.stop="dragEnd"></view>
<view class="uni-cropper-point point-bl" data-drag="bottomLeft"></view>
<view class="uni-cropper-point point-l" data-drag="left" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-lt" data-drag="leftTop"></view>
</view>
</view>
</view>
</view>
</view>
<view class='cropper-config'>
<button type="primary reverse" @click="getImage" style='margin-top: 30rpx;'> 选择头像 </button>
<button type="warn" @click="getImageInfo" style='margin-top: 30rpx;'> 提交 </button>
</view>
<canvas canvas-id="myCanvas" :style="'position:absolute;border: 1px solid red; width:'+imageW+'px;height:'+imageH+'px;top:-9999px;left:-9999px;'"></canvas>
</view>
</view>
</template>
<script>
import config from '@/config'
import store from "@/store"
import { uploadAvatar } from "@/api/system/user"
const baseUrl = config.baseUrl
let sysInfo = uni.getSystemInfoSync()
let SCREEN_WIDTH = sysInfo.screenWidth
let PAGE_X, // x
PAGE_Y, // y
PR = sysInfo.pixelRatio, // dpi
T_PAGE_X, // x
T_PAGE_Y, // Y
CUT_L, // left
CUT_T, // top
CUT_R, //
CUT_B, //
CUT_W, //
CUT_H, //
IMG_RATIO, //
IMG_REAL_W, //
IMG_REAL_H, //
DRAFG_MOVE_RATIO = 1, //,
INIT_DRAG_POSITION = 100, //
DRAW_IMAGE_W = sysInfo.screenWidth //
export default {
/**
* 页面的初始数据
*/
data() {
return {
imageSrc: store.getters.avatar,
isShowImg: false,
//
cropperInitW: SCREEN_WIDTH,
cropperInitH: SCREEN_WIDTH,
//
cropperW: SCREEN_WIDTH,
cropperH: SCREEN_WIDTH,
// left top
cropperL: 0,
cropperT: 0,
transL: 0,
transT: 0,
//
scaleP: 0,
imageW: 0,
imageH: 0,
//
cutL: 0,
cutT: 0,
cutB: SCREEN_WIDTH,
cutR: '100%',
qualityWidth: DRAW_IMAGE_W,
innerAspectRadio: DRAFG_MOVE_RATIO
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
this.loadImage()
},
methods: {
setData: function (obj) {
let that = this
Object.keys(obj).forEach(function (key) {
that.$set(that.$data, key, obj[key])
})
},
getImage: function () {
var _this = this
uni.chooseImage({
success: function (res) {
_this.setData({
imageSrc: res.tempFilePaths[0],
})
_this.loadImage()
},
})
},
loadImage: function () {
var _this = this
uni.getImageInfo({
src: _this.imageSrc,
success: function success(res) {
IMG_RATIO = 1 / 1
if (IMG_RATIO >= 1) {
IMG_REAL_W = SCREEN_WIDTH
IMG_REAL_H = SCREEN_WIDTH / IMG_RATIO
} else {
IMG_REAL_W = SCREEN_WIDTH * IMG_RATIO
IMG_REAL_H = SCREEN_WIDTH
}
let minRange = IMG_REAL_W > IMG_REAL_H ? IMG_REAL_W : IMG_REAL_H
INIT_DRAG_POSITION = minRange > INIT_DRAG_POSITION ? INIT_DRAG_POSITION : minRange
//
if (IMG_RATIO >= 1) {
let cutT = Math.ceil((SCREEN_WIDTH / IMG_RATIO - (SCREEN_WIDTH / IMG_RATIO - INIT_DRAG_POSITION)) / 2)
let cutB = cutT
let cutL = Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH + INIT_DRAG_POSITION) / 2)
let cutR = cutL
_this.setData({
cropperW: SCREEN_WIDTH,
cropperH: SCREEN_WIDTH / IMG_RATIO,
// left right
cropperL: Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH) / 2),
cropperT: Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH / IMG_RATIO) / 2),
cutL: cutL,
cutT: cutT,
cutR: cutR,
cutB: cutB,
//
imageW: IMG_REAL_W,
imageH: IMG_REAL_H,
scaleP: IMG_REAL_W / SCREEN_WIDTH,
qualityWidth: DRAW_IMAGE_W,
innerAspectRadio: IMG_RATIO
})
} else {
let cutL = Math.ceil((SCREEN_WIDTH * IMG_RATIO - (SCREEN_WIDTH * IMG_RATIO)) / 2)
let cutR = cutL
let cutT = Math.ceil((SCREEN_WIDTH - INIT_DRAG_POSITION) / 2)
let cutB = cutT
_this.setData({
cropperW: SCREEN_WIDTH * IMG_RATIO,
cropperH: SCREEN_WIDTH,
// left right
cropperL: Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH * IMG_RATIO) / 2),
cropperT: Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH) / 2),
cutL: cutL,
cutT: cutT,
cutR: cutR,
cutB: cutB,
//
imageW: IMG_REAL_W,
imageH: IMG_REAL_H,
scaleP: IMG_REAL_W / SCREEN_WIDTH,
qualityWidth: DRAW_IMAGE_W,
innerAspectRadio: IMG_RATIO
})
}
_this.setData({
isShowImg: true
})
uni.hideLoading()
}
})
},
// touchStart
contentStartMove(e) {
PAGE_X = e.touches[0].pageX
PAGE_Y = e.touches[0].pageY
},
// touchMove
contentMoveing(e) {
var _this = this
var dragLengthX = (PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO
var dragLengthY = (PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO
//
if (dragLengthX > 0) {
if (this.cutL - dragLengthX < 0) dragLengthX = this.cutL
} else {
if (this.cutR + dragLengthX < 0) dragLengthX = -this.cutR
}
if (dragLengthY > 0) {
if (this.cutT - dragLengthY < 0) dragLengthY = this.cutT
} else {
if (this.cutB + dragLengthY < 0) dragLengthY = -this.cutB
}
this.setData({
cutL: this.cutL - dragLengthX,
cutT: this.cutT - dragLengthY,
cutR: this.cutR + dragLengthX,
cutB: this.cutB + dragLengthY
})
PAGE_X = e.touches[0].pageX
PAGE_Y = e.touches[0].pageY
},
contentTouchEnd() {
},
//
getImageInfo() {
var _this = this
uni.showLoading({
title: '图片生成中...',
})
//
const ctx = uni.createCanvasContext('myCanvas')
ctx.drawImage(_this.imageSrc, 0, 0, IMG_REAL_W, IMG_REAL_H)
ctx.draw(true, () => {
// * canvasT = (_this.cutT / _this.cropperH) * (_this.imageH / pixelRatio)
var canvasW = ((_this.cropperW - _this.cutL - _this.cutR) / _this.cropperW) * IMG_REAL_W
var canvasH = ((_this.cropperH - _this.cutT - _this.cutB) / _this.cropperH) * IMG_REAL_H
var canvasL = (_this.cutL / _this.cropperW) * IMG_REAL_W
var canvasT = (_this.cutT / _this.cropperH) * IMG_REAL_H
uni.canvasToTempFilePath({
x: canvasL,
y: canvasT,
width: canvasW,
height: canvasH,
destWidth: canvasW,
destHeight: canvasH,
quality: 0.5,
canvasId: 'myCanvas',
success: function (res) {
uni.hideLoading()
let data = {name: 'avatarfile', filePath: res.tempFilePath}
uploadAvatar(data).then(response => {
store.commit('SET_AVATAR', baseUrl + response.imgUrl)
uni.showToast({ title: "修改成功", icon: 'success' })
uni.navigateBack()
})
}
})
})
},
// touchStart
dragStart(e) {
T_PAGE_X = e.touches[0].pageX
T_PAGE_Y = e.touches[0].pageY
CUT_L = this.cutL
CUT_R = this.cutR
CUT_B = this.cutB
CUT_T = this.cutT
},
// touchMove
dragMove(e) {
var _this = this
var dragType = e.target.dataset.drag
switch (dragType) {
case 'right':
var dragLength = (T_PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO
if (CUT_R + dragLength < 0) dragLength = -CUT_R
this.setData({
cutR: CUT_R + dragLength
})
break
case 'left':
var dragLength = (T_PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO
if (CUT_L - dragLength < 0) dragLength = CUT_L
if ((CUT_L - dragLength) > (this.cropperW - this.cutR)) dragLength = CUT_L - (this.cropperW - this.cutR)
this.setData({
cutL: CUT_L - dragLength
})
break
case 'top':
var dragLength = (T_PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO
if (CUT_T - dragLength < 0) dragLength = CUT_T
if ((CUT_T - dragLength) > (this.cropperH - this.cutB)) dragLength = CUT_T - (this.cropperH - this.cutB)
this.setData({
cutT: CUT_T - dragLength
})
break
case 'bottom':
var dragLength = (T_PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO
if (CUT_B + dragLength < 0) dragLength = -CUT_B
this.setData({
cutB: CUT_B + dragLength
})
break
case 'rightBottom':
var dragLengthX = (T_PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO
var dragLengthY = (T_PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO
if (CUT_B + dragLengthY < 0) dragLengthY = -CUT_B
if (CUT_R + dragLengthX < 0) dragLengthX = -CUT_R
let cutB = CUT_B + dragLengthY
let cutR = CUT_R + dragLengthX
this.setData({
cutB: cutB,
cutR: cutR
})
break
default:
break
}
}
}
}
</script>
<style>
/* pages/uni-cropper/index.wxss */
.uni-content-info {
/* position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: block;
align-items: center;
flex-direction: column; */
}
.cropper-config {
padding: 20rpx 40rpx;
}
.cropper-content {
min-height: 750rpx;
width: 100%;
}
.uni-corpper {
position: relative;
overflow: hidden;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
box-sizing: border-box;
}
.uni-corpper-content {
position: relative;
}
.uni-corpper-content image {
display: block;
width: 100%;
min-width: 0 !important;
max-width: none !important;
height: 100%;
min-height: 0 !important;
max-height: none !important;
image-orientation: 0deg !important;
margin: 0 auto;
}
/* 移动图片效果 */
.uni-cropper-drag-box {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
cursor: move;
background: rgba(0, 0, 0, 0.6);
z-index: 1;
}
/* 内部的信息 */
.uni-corpper-crop-box {
position: absolute;
background: rgba(255, 255, 255, 0.3);
z-index: 2;
}
.uni-corpper-crop-box .uni-cropper-view-box {
position: relative;
display: block;
width: 100%;
height: 100%;
overflow: visible;
outline: 1rpx solid #69f;
outline-color: rgba(102, 153, 255, .75)
}
/* 横向虚线 */
.uni-cropper-dashed-h {
position: absolute;
top: 33.33333333%;
left: 0;
width: 100%;
height: 33.33333333%;
border-top: 1rpx dashed rgba(255, 255, 255, 0.5);
border-bottom: 1rpx dashed rgba(255, 255, 255, 0.5);
}
/* 纵向虚线 */
.uni-cropper-dashed-v {
position: absolute;
left: 33.33333333%;
top: 0;
width: 33.33333333%;
height: 100%;
border-left: 1rpx dashed rgba(255, 255, 255, 0.5);
border-right: 1rpx dashed rgba(255, 255, 255, 0.5);
}
/* 四个方向的线 为了之后的拖动事件*/
.uni-cropper-line-t {
position: absolute;
display: block;
width: 100%;
background-color: #69f;
top: 0;
left: 0;
height: 1rpx;
opacity: 0.1;
cursor: n-resize;
}
.uni-cropper-line-t::before {
content: '';
position: absolute;
top: 50%;
right: 0rpx;
width: 100%;
-webkit-transform: translate3d(0, -50%, 0);
transform: translate3d(0, -50%, 0);
bottom: 0;
height: 41rpx;
background: transparent;
z-index: 11;
}
.uni-cropper-line-r {
position: absolute;
display: block;
background-color: #69f;
top: 0;
right: 0rpx;
width: 1rpx;
opacity: 0.1;
height: 100%;
cursor: e-resize;
}
.uni-cropper-line-r::before {
content: '';
position: absolute;
top: 0;
left: 50%;
width: 41rpx;
-webkit-transform: translate3d(-50%, 0, 0);
transform: translate3d(-50%, 0, 0);
bottom: 0;
height: 100%;
background: transparent;
z-index: 11;
}
.uni-cropper-line-b {
position: absolute;
display: block;
width: 100%;
background-color: #69f;
bottom: 0;
left: 0;
height: 1rpx;
opacity: 0.1;
cursor: s-resize;
}
.uni-cropper-line-b::before {
content: '';
position: absolute;
top: 50%;
right: 0rpx;
width: 100%;
-webkit-transform: translate3d(0, -50%, 0);
transform: translate3d(0, -50%, 0);
bottom: 0;
height: 41rpx;
background: transparent;
z-index: 11;
}
.uni-cropper-line-l {
position: absolute;
display: block;
background-color: #69f;
top: 0;
left: 0;
width: 1rpx;
opacity: 0.1;
height: 100%;
cursor: w-resize;
}
.uni-cropper-line-l::before {
content: '';
position: absolute;
top: 0;
left: 50%;
width: 41rpx;
-webkit-transform: translate3d(-50%, 0, 0);
transform: translate3d(-50%, 0, 0);
bottom: 0;
height: 100%;
background: transparent;
z-index: 11;
}
.uni-cropper-point {
width: 5rpx;
height: 5rpx;
background-color: #69f;
opacity: .75;
position: absolute;
z-index: 3;
}
.point-t {
top: -3rpx;
left: 50%;
margin-left: -3rpx;
cursor: n-resize;
}
.point-tr {
top: -3rpx;
left: 100%;
margin-left: -3rpx;
cursor: n-resize;
}
.point-r {
top: 50%;
left: 100%;
margin-left: -3rpx;
margin-top: -3rpx;
cursor: n-resize;
}
.point-rb {
left: 100%;
top: 100%;
-webkit-transform: translate3d(-50%, -50%, 0);
transform: translate3d(-50%, -50%, 0);
cursor: n-resize;
width: 36rpx;
height: 36rpx;
background-color: #69f;
position: absolute;
z-index: 1112;
opacity: 1;
}
.point-b {
left: 50%;
top: 100%;
margin-left: -3rpx;
margin-top: -3rpx;
cursor: n-resize;
}
.point-bl {
left: 0%;
top: 100%;
margin-left: -3rpx;
margin-top: -3rpx;
cursor: n-resize;
}
.point-l {
left: 0%;
top: 50%;
margin-left: -3rpx;
margin-top: -3rpx;
cursor: n-resize;
}
.point-lt {
left: 0%;
top: 0%;
margin-left: -3rpx;
margin-top: -3rpx;
cursor: n-resize;
}
/* 裁剪框预览内容 */
.uni-cropper-viewer {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
}
.uni-cropper-viewer image {
position: absolute;
z-index: 2;
}
</style>

@ -0,0 +1,112 @@
<template>
<view class="help-container">
<view v-for="(item, findex) in list" :key="findex" :title="item.title" class="list-title">
<view class="text-title">
<view :class="item.icon"></view>{{ item.title }}
</view>
<view class="childList">
<view v-for="(child, zindex) in item.childList" :key="zindex" class="question" hover-class="hover"
@click="handleText(child)">
<view class="text-item">{{ child.title }}</view>
<view class="line" v-if="zindex !== item.childList.length - 1"></view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [{
icon: 'iconfont icon-github',
title: '若依问题',
childList: [{
title: '若依开源吗?',
content: '开源'
}, {
title: '若依可以商用吗?',
content: '可以'
}, {
title: '若依官网地址多少?',
content: 'http://ruoyi.vip'
}, {
title: '若依文档地址多少?',
content: 'http://doc.ruoyi.vip'
}]
},
{
icon: 'iconfont icon-help',
title: '其他问题',
childList: [{
title: '如何退出登录?',
content: '请点击[我的] - [应用设置] - [退出登录]即可退出登录',
}, {
title: '如何修改用户头像?',
content: '请点击[我的] - [选择头像] - [点击提交]即可更换用户头像',
}, {
title: '如何修改登录密码?',
content: '请点击[我的] - [应用设置] - [修改密码]即可修改登录密码',
}]
}
]
}
},
methods: {
handleText(item) {
this.$tab.navigateTo(`/pages/common/textview/index?title=${item.title}&content=${item.content}`)
}
}
}
</script>
<style lang="scss" scoped>
page {
background-color: #f8f8f8;
}
.help-container {
margin-bottom: 100rpx;
padding: 30rpx;
}
.list-title {
margin-bottom: 30rpx;
}
.childList {
background: #ffffff;
box-shadow: 0px 0px 10rpx rgba(193, 193, 193, 0.2);
border-radius: 16rpx;
margin-top: 10rpx;
}
.line {
width: 100%;
height: 1rpx;
background-color: #F5F5F5;
}
.text-title {
color: #303133;
font-size: 32rpx;
font-weight: bold;
margin-left: 10rpx;
.iconfont {
font-size: 16px;
margin-right: 10rpx;
}
}
.text-item {
font-size: 28rpx;
padding: 24rpx;
}
.question {
color: #606266;
font-size: 28rpx;
}
</style>

@ -0,0 +1,198 @@
<template>
<view class="mine-container" :style="{height: `${windowHeight}px`}">
<!--顶部个人信息栏-->
<view class="header-section">
<view class="flex padding justify-between">
<view class="flex align-center">
<view v-if="!avatar" class="cu-avatar xl round bg-white">
<view class="iconfont icon-people text-gray icon"></view>
</view>
<image v-if="avatar" @click="handleToAvatar" :src="avatar" class="cu-avatar xl round" mode="widthFix">
</image>
<view v-if="!name" @click="handleToLogin" class="login-tip">
点击登录
</view>
<view v-if="name" @click="handleToInfo" class="user-info">
<view class="u_title">
用户名{{ name }}
</view>
</view>
</view>
<view @click="handleToInfo" class="flex align-center">
<text>个人信息</text>
<view class="iconfont icon-right"></view>
</view>
</view>
</view>
<view class="content-section">
<view class="mine-actions grid col-4 text-center">
<view class="action-item" @click="handleJiaoLiuQun">
<view class="iconfont icon-friendfill text-pink icon"></view>
<text class="text">交流群</text>
</view>
<view class="action-item" @click="handleBuilding">
<view class="iconfont icon-service text-blue icon"></view>
<text class="text">在线客服</text>
</view>
<view class="action-item" @click="handleBuilding">
<view class="iconfont icon-community text-mauve icon"></view>
<text class="text">反馈社区</text>
</view>
<view class="action-item" @click="handleBuilding">
<view class="iconfont icon-dianzan text-green icon"></view>
<text class="text">点赞我们</text>
</view>
</view>
<view class="menu-list">
<view class="list-cell list-cell-arrow" @click="handleToEditInfo">
<view class="menu-item-box">
<view class="iconfont icon-user menu-icon"></view>
<view>编辑资料</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleHelp">
<view class="menu-item-box">
<view class="iconfont icon-help menu-icon"></view>
<view>常见问题</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleAbout">
<view class="menu-item-box">
<view class="iconfont icon-aixin menu-icon"></view>
<view>关于我们</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleToSetting">
<view class="menu-item-box">
<view class="iconfont icon-setting menu-icon"></view>
<view>应用设置</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import storage from '@/utils/storage'
export default {
data() {
return {
name: this.$store.state.user.name,
version: getApp().globalData.config.appInfo.version
}
},
computed: {
avatar() {
return this.$store.state.user.avatar
},
windowHeight() {
return uni.getSystemInfoSync().windowHeight - 50
}
},
methods: {
handleToInfo() {
this.$tab.navigateTo('/pages/mine/info/index')
},
handleToEditInfo() {
this.$tab.navigateTo('/pages/mine/info/edit')
},
handleToSetting() {
this.$tab.navigateTo('/pages/mine/setting/index')
},
handleToLogin() {
this.$tab.reLaunch('/pages/login')
},
handleToAvatar() {
this.$tab.navigateTo('/pages/mine/avatar/index')
},
handleLogout() {
this.$modal.confirm('确定注销并退出系统吗?').then(() => {
this.$store.dispatch('LogOut').then(() => {
this.$tab.reLaunch('/pages/index')
})
})
},
handleHelp() {
this.$tab.navigateTo('/pages/mine/help/index')
},
handleAbout() {
this.$tab.navigateTo('/pages/mine/about/index')
},
handleJiaoLiuQun() {
this.$modal.showToast('QQ群133713780')
},
handleBuilding() {
this.$modal.showToast('模块建设中~')
}
}
}
</script>
<style lang="scss">
page {
background-color: #f5f6f7;
}
.mine-container {
width: 100%;
height: 100%;
.header-section {
padding: 15px 15px 45px 15px;
background-color: #3c96f3;
color: white;
.login-tip {
font-size: 18px;
margin-left: 10px;
}
.cu-avatar {
border: 2px solid #eaeaea;
.icon {
font-size: 40px;
}
}
.user-info {
margin-left: 15px;
.u_title {
font-size: 18px;
line-height: 30px;
}
}
}
.content-section {
position: relative;
top: -50px;
.mine-actions {
margin: 15px 15px;
padding: 20px 0px;
border-radius: 8px;
background-color: white;
.action-item {
.icon {
font-size: 28px;
}
.text {
display: block;
font-size: 13px;
margin: 8px 0px;
}
}
}
}
}
</style>

@ -0,0 +1,127 @@
<template>
<view class="container">
<view class="example">
<uni-forms ref="form" :model="user" labelWidth="80px">
<uni-forms-item label="用户昵称" name="nickName">
<uni-easyinput v-model="user.nickName" placeholder="请输入昵称" />
</uni-forms-item>
<uni-forms-item label="手机号码" name="phonenumber">
<uni-easyinput v-model="user.phonenumber" placeholder="请输入手机号码" />
</uni-forms-item>
<uni-forms-item label="邮箱" name="email">
<uni-easyinput v-model="user.email" placeholder="请输入邮箱" />
</uni-forms-item>
<uni-forms-item label="性别" name="sex" required>
<uni-data-checkbox v-model="user.sex" :localdata="sexs" />
</uni-forms-item>
</uni-forms>
<button type="primary" @click="submit"></button>
</view>
</view>
</template>
<script>
import { getUserProfile } from "@/api/system/user"
import { updateUserProfile } from "@/api/system/user"
export default {
data() {
return {
user: {
nickName: "",
phonenumber: "",
email: "",
sex: ""
},
sexs: [{
text: '男',
value: "0"
}, {
text: '女',
value: "1"
}],
rules: {
nickName: {
rules: [{
required: true,
errorMessage: '用户昵称不能为空'
}]
},
phonenumber: {
rules: [{
required: true,
errorMessage: '手机号码不能为空'
}, {
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
errorMessage: '请输入正确的手机号码'
}]
},
email: {
rules: [{
required: true,
errorMessage: '邮箱地址不能为空'
}, {
format: 'email',
errorMessage: '请输入正确的邮箱地址'
}]
}
}
}
},
onLoad() {
this.getUser()
},
onReady() {
this.$refs.form.setRules(this.rules)
},
methods: {
getUser() {
getUserProfile().then(response => {
this.user = response.data
})
},
submit(ref) {
this.$refs.form.validate().then(res => {
updateUserProfile(this.user).then(response => {
this.$modal.msgSuccess("修改成功")
})
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #ffffff;
}
.example {
padding: 15px;
background-color: #fff;
}
.segmented-control {
margin-bottom: 15px;
}
.button-group {
margin-top: 15px;
display: flex;
justify-content: space-around;
}
.form-item {
display: flex;
align-items: center;
flex: 1;
}
.button {
display: flex;
align-items: center;
height: 35px;
line-height: 35px;
margin-left: 10px;
}
</style>

@ -0,0 +1,44 @@
<template>
<view class="container">
<uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" title="昵称" :rightText="user.nickName" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" title="手机号码" :rightText="user.phonenumber" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'email-filled'}" title="邮箱" :rightText="user.email" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" title="岗位" :rightText="postGroup" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'staff-filled'}" title="角色" :rightText="roleGroup" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" title="创建日期" :rightText="user.createTime" />
</uni-list>
</view>
</template>
<script>
import { getUserProfile } from "@/api/system/user"
export default {
data() {
return {
user: {},
roleGroup: "",
postGroup: ""
}
},
onLoad() {
this.getUser()
},
methods: {
getUser() {
getUserProfile().then(response => {
this.user = response.data
this.roleGroup = response.roleGroup
this.postGroup = response.postGroup
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #ffffff;
}
</style>

@ -0,0 +1,85 @@
<template>
<view class="pwd-retrieve-container">
<uni-forms ref="form" :value="user" labelWidth="80px">
<uni-forms-item name="oldPassword" label="旧密码">
<uni-easyinput type="password" v-model="user.oldPassword" placeholder="请输入旧密码" />
</uni-forms-item>
<uni-forms-item name="newPassword" label="新密码">
<uni-easyinput type="password" v-model="user.newPassword" placeholder="请输入新密码" />
</uni-forms-item>
<uni-forms-item name="confirmPassword" label="确认密码">
<uni-easyinput type="password" v-model="user.confirmPassword" placeholder="请确认新密码" />
</uni-forms-item>
<button type="primary" @click="submit"></button>
</uni-forms>
</view>
</template>
<script>
import { updateUserPwd } from "@/api/system/user"
export default {
data() {
return {
user: {
oldPassword: undefined,
newPassword: undefined,
confirmPassword: undefined
},
rules: {
oldPassword: {
rules: [{
required: true,
errorMessage: '旧密码不能为空'
}]
},
newPassword: {
rules: [{
required: true,
errorMessage: '新密码不能为空',
},
{
minLength: 6,
maxLength: 20,
errorMessage: '长度在 6 到 20 个字符'
}
]
},
confirmPassword: {
rules: [{
required: true,
errorMessage: '确认密码不能为空'
}, {
validateFunction: (rule, value, data) => data.newPassword === value,
errorMessage: '两次输入的密码不一致'
}
]
}
}
}
},
onReady() {
this.$refs.form.setRules(this.rules)
},
methods: {
submit() {
this.$refs.form.validate().then(res => {
updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
this.$modal.msgSuccess("修改成功")
})
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #ffffff;
}
.pwd-retrieve-container {
padding-top: 36rpx;
padding: 15px;
}
</style>

@ -0,0 +1,78 @@
<template>
<view class="setting-container" :style="{height: `${windowHeight}px`}">
<view class="menu-list">
<view class="list-cell list-cell-arrow" @click="handleToPwd">
<view class="menu-item-box">
<view class="iconfont icon-password menu-icon"></view>
<view>修改密码</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleToUpgrade">
<view class="menu-item-box">
<view class="iconfont icon-refresh menu-icon"></view>
<view>检查更新</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleCleanTmp">
<view class="menu-item-box">
<view class="iconfont icon-clean menu-icon"></view>
<view>清理缓存</view>
</view>
</view>
</view>
<view class="cu-list menu">
<view class="cu-item item-box">
<view class="content text-center" @click="handleLogout">
<text class="text-black">退出登录</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
windowHeight: uni.getSystemInfoSync().windowHeight
}
},
methods: {
handleToPwd() {
this.$tab.navigateTo('/pages/mine/pwd/index')
},
handleToUpgrade() {
this.$modal.showToast('模块建设中~')
},
handleCleanTmp() {
this.$modal.showToast('模块建设中~')
},
handleLogout() {
this.$modal.confirm('确定注销并退出系统吗?').then(() => {
this.$store.dispatch('LogOut').then(() => {
this.$tab.reLaunch('/pages/index')
})
})
}
}
}
</script>
<style lang="scss" scoped>
.page {
background-color: #f8f8f8;
}
.item-box {
background-color: #FFFFFF;
margin: 30rpx;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding: 10rpx;
border-radius: 8rpx;
color: #303133;
font-size: 32rpx;
}
</style>

@ -0,0 +1,312 @@
<!--
* @Author: 张涛
* @Date: 2023-02-17 14:35:18
* @LastEditors: 张涛
* @LastEditTime: 2023-02-21 09:24:48
* @FilePath: \liaoning-uniapp\pages\public-home\index.vue
-->
<template>
<view class="container-main">
<view class="header-bg">
<view class="header-logo"></view>
<view class="user-data">
<text>张三 , 欢迎您!</text>
</view>
</view>
<view class="main">
<view class="ewm" @click="clickEwm()">
<view class="ewm-logo"></view>
<view class="ewn-text">
<text>扫一扫</text>
<text>产品溯源码 商家营业执照二维码</text>
</view>
</view>
<view class="grid">
<view class="grid-item" v-for="(item, index) in gridList" :key="index">
<view
class="item-child"
:style="{ background: item.bg }"
@click="goPath(item)"
>
<image :src="baseImgUrl + item.icon" mode=""></image>
<text>{{ item.name }}</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { setToken } from "@/utils/auth";
import { ControllerLogin } from "@/api/login";
import { getSelfInfo } from "@/api/system/user.js";
export default {
data() {
return {
userName: "",
baseImgUrl: getApp().globalData.config.iamgeBaseUrl,
gridList: [
{
name: "企业综合查询",
icon: "liao-ning/icon_qyzhcx.png",
path: "/sub-public/enterprise-query/enterprise-query",
bg: "#F2F6FF",
},
{
name: "食品综合查询",
icon: "liao-ning/icon_spzhcx.png",
path: "/sub-public/food-query/food-query",
bg: "#FCF7F1",
},
{
name: "满意度调查",
icon: "liao-ning/icon_myddc.png",
path: "/sub-public/survey/survey",
bg: "#FCF7F1",
},
{
name: "示范创建",
icon: "liao-ning/icon_sfcj.png",
path: "/sub-public/shifan-chuangjian/shifan-chuangjian",
bg: "#EFF9ED",
},
{
name: "社会教育",
icon: "liao-ning/icon_shjy.png",
path: "/sub-public/society-teach/society-teach",
bg: "#F9F7FF",
},
{
name: "食责险理赔",
icon: "liao-ning/icon_szxlp.png",
path: "/sub-public/food-lipei/food-lipei",
bg: "#F2F6FF",
},
{
name: "企业标准公示",
icon: "liao-ning/icon_qybzgs@2x.png",
path: "/sub-interaction/publicity/publicity",
bg: "#F2F6FF",
},
{
name: "食品安全红黑榜",
icon: "liao-ning/icon_spaqhhb@2x.png",
path: "/sub-interaction/bang-dan/bang-dan",
bg: "#F9F7FF",
},
{
name: "食安辽宁线上播放",
icon: "liao-ning/icon_xsbf@2x.png",
path: "/sub-interaction/online-video/online-video",
bg: "#FCF7F1",
},
{
name: "名优展示",
icon: "liao-ning/icon_myzs@2x.png",
path: "/sub-interaction/excellent/excellent",
bg: "#EFF9ED",
},
{
name: "消费者咨询",
icon: "liao-ning/icon_xfzzx@2x.png",
path: "/sub-interaction/consumer-consult/consumer-consult",
bg: "#F2F6FF",
},
],
};
},
onLoad(option) {
// this.userName = uni.getStorageSync("USER_DATA").userDto.realName;
// this.getSystemData(option.TRUENAME, option.CREDITID);
},
methods: {
//
//
clickEwm() {
// #ifdef H5
uni.navigateTo({
url: "/pages/scanCodes/index",
});
// #endif
// #ifdef MP-WEIXIN || APP-PLUS
// uni.scanCode({
// scanType: ["qrCode"],
// success: (res) => {
// let type = res.result
// .substr(res.result.lastIndexOf("?"))
// .substr(1, 7);
// let query = res.result.substr(res.result.lastIndexOf("=")).substr(1);
// if (type == "uniscid") {
// //
// uni.navigateTo({
// url: `/sub-public/enterprise-new-info/enterprise-new-info?uniscid=${query}`,
// });
// } else if (type == "certifi") {
// //
// uni.navigateTo({
// url: `/sub-public/food-query/food-query?certificationld=${query}`,
// });
// } else {
// uni.showToast({
// title: "",
// icon: "none",
// });
// }
// },
// });
// #endif
},
goPath(item) {
uni.navigateTo({
url:
item.name == "满意度调查"
? item.path + `?name=${item.name}`
: item.path,
});
},
},
};
</script>
<style lang="scss" scoped>
.container-main {
position: relative;
}
.header-bg {
position: relative;
z-index: 10;
width: 100%;
height: 416rpx;
background: url("https://yth.scjg.ln.gov.cn/sgfs-enterprise/liaoning-app-file/file/liao-ning/home-header.png");
background-size: 100% 100%;
.header-logo {
position: absolute;
left: 25rpx;
top: 114rpx;
width: 370rpx;
height: 63rpx;
background: url("https://yth.scjg.ln.gov.cn/sgfs-enterprise/liaoning-app-file/file/liao-ning/home-bg.png");
background-size: 100% 100%;
}
.user-data {
position: absolute;
left: 25rpx;
top: 220rpx;
font-size: 34rpx;
font-weight: 500;
color: #ffffff;
letter-spacing: 2rpx;
font-family: "PingFang SC-中黑体";
}
}
.main {
position: absolute;
left: 0;
z-index: 20;
top: 300rpx;
min-height: 100rpx;
width: 100%;
box-sizing: border-box;
padding: 0 20rpx;
padding-bottom: 150rpx;
.ewm {
height: 180rpx;
background: #ffffff;
box-shadow: 0px 0px 20rpx 0px rgba(57, 118, 241, 0.102);
border-radius: 16rpx;
opacity: 1;
border: 2rpx solid #dce3ec;
display: flex;
justify-content: space-between;
box-sizing: border-box;
padding: 0 36rpx;
overflow: hidden;
.ewm-logo {
width: 170rpx;
height: 100%;
background: url("https://yth.scjg.ln.gov.cn/sgfs-enterprise/liaoning-app-file/file/liao-ning/img_sys.png");
background-size: 100% 100%;
}
.ewn-text {
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: center;
& > text:nth-child(1) {
font-size: 38rpx;
font-weight: 550;
color: #34373b;
}
& > text:nth-child(2) {
margin-top: 10rpx;
font-size: 30rpx;
font-weight: 400;
color: #616367;
}
}
}
.grid {
box-sizing: border-box;
padding: 30rpx;
margin-top: 20rpx;
background: #ffffff;
box-shadow: 0px 0px 20rpx 0px rgba(57, 118, 241, 0.102);
border-radius: 16rpx;
border: 2rpx solid #dce3ec;
display: flex;
flex-wrap: wrap;
& > view {
width: 50%;
height: 180rpx;
display: flex;
align-items: center;
margin-bottom: 20rpx;
.item-child {
width: 315rpx;
height: 180rpx;
border-radius: 16rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
image {
height: 85rpx;
width: 85rpx;
}
text {
font-size: 28rpx;
font-weight: 550;
font-family: "PingFang SC-中黑体";
color: #34373b;
}
}
}
& > view:nth-child(even) {
justify-content: flex-end;
}
& > view:last-child,
& > view:nth-last-child(2) {
margin-bottom: 0;
}
}
}
</style>

@ -0,0 +1,234 @@
<!--
* @Author: 张涛
* @Date: 2023-02-17 14:35:18
* @LastEditors: 张涛
* @LastEditTime: 2023-03-03 17:12:18
* @FilePath: \liaoning-uniapp\pages\company-mine\index.vue
-->
<template>
<view class="container-main">
<view class="nav-title">
<text>我的</text>
</view>
<view class="header-bg">
<view class="header-logo"></view>
<view class="user-data">
<text class="user-company">张三</text>
</view>
</view>
<view class="main">
<view class="list">
<view
class="items"
v-for="(item, index) in list"
:key="index"
@click="clickMineCell(item)"
>
<view class="item">
<view class="item-left">
<!-- <image class="item-icon" :src="baseImgUrl + item.icon" alt="" /> -->
<text class="item-title">{{ item.title }}</text>
</view>
<uni-icons type="right" size="20" color="#D5D5D5"></uni-icons>
</view>
<view
:style="
index != list.length - 1
? 'width:86%; height:0.5px; background:#dce3ec;margin: 0 auto;'
: ''
"
/>
</view>
</view>
</view>
<view class="change-role" @click="handleLogout">
<text>退出登录</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
userName: "",
baseImgUrl: getApp().globalData.config.iamgeBaseUrl,
list: [
{
id: 1,
title: "个人信息",
icon: "liao-ning/icon_xxsz.png",
path: "/selfInfo/selfInfo",
},
{
id: 2,
title: "关于系统",
icon: "liao-ning/icon_sysc.png",
path: "/system/system",
},
],
};
},
onShow() {
uni.getStorage({
key: "USER_DATA",
success: (res) => {
this.userName = res.data.userDto.realName;
},
});
},
methods: {
clickMineCell(item) {
uni.navigateTo({
url: `/sub-interaction${item.path}`,
});
},
handleLogout() {
this.$modal.confirm("确定注销并退出系统吗?").then(() => {
this.$store.dispatch("LogOut").then(() => {
uni.removeStorageSync("USER_DATA");
uni.removeStorageSync("App-Token");
uni.removeStorageSync("roleId");
this.$tab.reLaunch("/pages/index");
});
});
},
},
};
</script>
<style lang="scss" scoped>
.container-main {
position: relative;
height: 100%;
}
.nav-title {
position: absolute;
z-index: 11;
top: 116rpx;
width: 100%;
text-align: center;
text {
color: #ffffff;
font-size: 40rpx;
font-family: "PingFang SC-中粗体, PingFang SC";
}
}
.header-bg {
position: relative;
z-index: 10;
width: 100vw;
height: 416rpx;
background: url("https://yth.scjg.ln.gov.cn/sgfs-enterprise/liaoning-app-file/file/liao-ning/home-header.png");
background-size: 100% 100%;
background-repeat: no-repeat;
.header-logo {
position: absolute;
left: 25rpx;
top: 114rpx;
width: 370rpx;
height: 63rpx;
// background: url("static/images/liao-ning/home-bg.png");
background-size: 100% 100%;
background-repeat: no-repeat;
}
.user-data {
position: absolute;
left: 25rpx;
top: 200rpx;
.user-company {
letter-spacing: 2rpx;
font-size: 34rpx;
font-family: "PingFang SC-中黑体, PingFang SC";
font-weight: 500;
color: #ffffff;
}
.user-name {
font-size: 28rpx;
font-family: "PingFang SC-常规体, PingFang SC";
color: #ffffff;
}
.user-tag {
margin-left: 17rpx;
padding: 3rpx 17rpx;
background-color: #ffffff;
font-size: 20rpx;
font-family: "PingFang SC-常规体, PingFang SC";
color: #3976f1;
border-radius: 90rpx 90rpx 90rpx 90rpx;
}
}
}
.main {
position: absolute;
left: 0;
z-index: 20;
top: 326rpx;
min-height: 100rpx;
width: 100%;
box-sizing: border-box;
padding: 0 20rpx;
.list {
border-radius: 10rpx;
box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(57, 118, 241, 0.102);
background: #ffffff;
border: 2px solid #dce3ec;
.item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 34rpx 46rpx;
.item-left {
display: flex;
align-items: center;
.item-icon {
width: 36rpx;
height: 36rpx;
}
.item-title {
margin-left: 15rpx;
font-size: 34rpx;
font-family: "PingFang SC-常规体, PingFang SC";
font-weight: 400;
color: #34373b;
}
}
}
}
}
.change-role {
position: absolute;
left: 50%;
bottom: 15%;
transform: translateX(-50%);
width: 90%;
background: #ffffff;
box-shadow: 0 0 20rpx 0 rgba(57, 118, 241, 0.102);
border-radius: 10rpx;
border: 2rpx solid #dce3ec;
padding: 39rpx 0;
text-align: center;
text {
font-size: 30rpx;
font-family: "PingFang SC-中黑体, PingFang SC";
font-weight: 500;
color: #eb5b47;
}
}
</style>

@ -0,0 +1,54 @@
<template>
<mumu-get-qrcode @success='qrcodeSucess' @error="qrcodeError"></mumu-get-qrcode>
</template>
<script>
import mumuGetQrcode from '@/uni_modules/mumu-getQrcode/components/mumu-getQrcode/mumu-getQrcode.vue'
export default {
components: {
mumuGetQrcode
},
methods: {
//
qrcodeSucess(data) {
setTimeout(function() {
let type = data.substr(data.lastIndexOf("?")).substr(1, 7);
let query = data.substr(data.lastIndexOf("=")).substr(1)
if (type == 'uniscid') { //
uni.showToast({
title: '扫码成功',
})
uni.redirectTo({
url: `/sub-public/enterprise-new-info/enterprise-new-info?uniscid=${query}`
})
} else if (type == 'certifi') { //
uni.showToast({
title: '扫码成功',
})
uni.redirectTo({
url: `/sub-public/food-query/food-query?certificationld=${query}`,
})
} else {
uni.showToast({
title: '未查到相关数据',
icon: 'none'
})
}
}, 1000)
},
//
qrcodeError(err) {
console.log(err)
uni.showModal({
title: '摄像头授权失败',
content: '摄像头授权失败,请检测当前浏览器是否有摄像头权限。',
success: () => {
uni.navigateBack({})
}
})
}
}
}
</script>
<style>
</style>

@ -0,0 +1,28 @@
<template>
<view class="drag-container">
<popup ref="panelref">
</popup>
</view>
</template>
<script>
import popup from '@/uni_modules/danH-threeDrawer/components/danH-threeDrawer/danH-threeDrawer.vue'
export default {
components: {
popup
},
data() {
return {
}
},
methods: {
}
}
</script>
<style>
page {
height: 100%;
}
</style>

@ -0,0 +1,39 @@
import { getToken } from '@/utils/auth'
// 登录页面
const loginPage = "/pages/login"
// 页面白名单
const whiteList = [
'/pages/login', '/pages/common/webview/index'
]
// 检查地址白名单
function checkWhite(url) {
const path = url.split('?')[0]
return whiteList.indexOf(path) !== -1
}
// 页面跳转验证拦截器
let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"]
list.forEach(item => {
uni.addInterceptor(item, {
// invoke(to) {
// if (getToken()) {
// if (to.path === loginPage) {
// uni.reLaunch({ url: "/" })
// }
// return true
// } else {
// if (checkWhite(to.url)) {
// return true
// }
// uni.reLaunch({ url: loginPage })
// return false
// }
// },
// fail(err) {
// console.log(err)
// }
})
})

@ -0,0 +1,60 @@
import store from '@/store'
function authPermission(permission) {
const all_permission = "*:*:*"
const permissions = store.getters && store.getters.permissions
if (permission && permission.length > 0) {
return permissions.some(v => {
return all_permission === v || v === permission
})
} else {
return false
}
}
function authRole(role) {
const super_admin = "admin"
const roles = store.getters && store.getters.roles
if (role && role.length > 0) {
return roles.some(v => {
return super_admin === v || v === role
})
} else {
return false
}
}
export default {
// 验证用户是否具备某权限
hasPermi(permission) {
return authPermission(permission)
},
// 验证用户是否含有指定权限,只需包含其中一个
hasPermiOr(permissions) {
return permissions.some(item => {
return authPermission(item)
})
},
// 验证用户是否含有指定权限,必须全部拥有
hasPermiAnd(permissions) {
return permissions.every(item => {
return authPermission(item)
})
},
// 验证用户是否具备某角色
hasRole(role) {
return authRole(role)
},
// 验证用户是否含有指定角色,只需包含其中一个
hasRoleOr(roles) {
return roles.some(item => {
return authRole(item)
})
},
// 验证用户是否含有指定角色,必须全部拥有
hasRoleAnd(roles) {
return roles.every(item => {
return authRole(item)
})
}
}

@ -0,0 +1,14 @@
import tab from './tab'
import auth from './auth'
import modal from './modal'
export default {
install(Vue) {
// 页签操作
Vue.prototype.$tab = tab
// 认证对象
Vue.prototype.$auth = auth
// 模态框对象
Vue.prototype.$modal = modal
}
}

@ -0,0 +1,74 @@
export default {
// 消息提示
msg(content) {
uni.showToast({
title: content,
icon: 'none'
})
},
// 错误消息
msgError(content) {
uni.showToast({
title: content,
icon: 'error'
})
},
// 成功消息
msgSuccess(content) {
uni.showToast({
title: content,
icon: 'success'
})
},
// 隐藏消息
hideMsg(content) {
uni.hideToast()
},
// 弹出提示
alert(content) {
uni.showModal({
title: '提示',
content: content,
showCancel: false
})
},
// 确认窗体
confirm(content) {
return new Promise((resolve, reject) => {
uni.showModal({
title: '系统提示',
content: content,
cancelText: '取消',
confirmText: '确定',
success: function(res) {
if (res.confirm) {
resolve(res.confirm)
}
}
})
})
},
// 提示信息
showToast(option) {
if (typeof option === "object") {
uni.showToast(option)
} else {
uni.showToast({
title: option,
icon: "none",
duration: 2500
})
}
},
// 打开遮罩层
loading(content) {
uni.showLoading({
title: content,
icon: 'none'
})
},
// 关闭遮罩层
closeLoading() {
uni.hideLoading()
}
}

@ -0,0 +1,30 @@
export default {
// 关闭所有页面,打开到应用内的某个页面
reLaunch(url) {
return uni.reLaunch({
url: url
})
},
// 跳转到tabBar页面并关闭其他所有非tabBar页面
switchTab(url) {
return uni.switchTab({
url: url
})
},
// 关闭当前页面,跳转到应用内的某个页面
redirectTo(url) {
return uni.redirectTo({
url: url
})
},
// 保留当前页面,跳转到应用内的某个页面
navigateTo(url) {
return uni.navigateTo({
url: url
})
},
// 关闭当前页面,返回上一页面或多级页面
navigateBack() {
return uni.navigateBack()
}
}

@ -0,0 +1,28 @@
{
"appid": "wxe6cc36156de976cf",
"compileType": "miniprogram",
"libVersion": "2.26.0",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"coverView": true,
"es6": true,
"postcss": true,
"minified": true,
"enhance": true,
"showShadowRootInWxmlPanel": true,
"packNpmRelationList": [],
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}
},
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
}

@ -0,0 +1,7 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "WujiangTaishiApp",
"setting": {
"compileHotReLoad": true
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

@ -0,0 +1,90 @@
@font-face {
font-family: "iconfont";
src: url('/static/font/iconfont.ttf') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
display: inline-block;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-user:before {
content: "\e7ae";
}
.icon-password:before {
content: "\e8b2";
}
.icon-code:before {
content: "\e699";
}
.icon-setting:before {
content: "\e6cc";
}
.icon-share:before {
content: "\e739";
}
.icon-edit:before {
content: "\e60c";
}
.icon-version:before {
content: "\e63f";
}
.icon-service:before {
content: "\e6ff";
}
.icon-friendfill:before {
content: "\e726";
}
.icon-community:before {
content: "\e741";
}
.icon-people:before {
content: "\e736";
}
.icon-dianzan:before {
content: "\ec7f";
}
.icon-right:before {
content: "\e7eb";
}
.icon-logout:before {
content: "\e61d";
}
.icon-help:before {
content: "\e616";
}
.icon-github:before {
content: "\e628";
}
.icon-aixin:before {
content: "\e601";
}
.icon-clean:before {
content: "\e607";
}
.icon-refresh:before {
content: "\e604";
}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<title><%= htmlWebpackPlugin.options.title %></title>
<link rel="shortcut icon" type="image/x-icon" href="<%= BASE_URL %>static/favicon.ico">
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
</head>
<body>
<noscript>
<strong>本站点必须要开启JavaScript才能运行.</strong>
</noscript>
<div id="app"></div>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

File diff suppressed because it is too large Load Diff

@ -0,0 +1,90 @@
.text-center {
text-align: center;
}
.font-13 {
font-size: 13px;
}
.font-12 {
font-size: 12px;
}
.font-11 {
font-size: 11px;
}
.text-grey1 {
color: #888;
}
.text-grey2 {
color: #aaa;
}
.list-cell-arrow::before {
content: ' ';
height: 10px;
width: 10px;
border-width: 2px 2px 0 0;
border-color: #c0c0c0;
border-style: solid;
-webkit-transform: matrix(0.5, 0.5, -0.5, 0.5, 0, 0);
transform: matrix(0.5, 0.5, -0.5, 0.5, 0, 0);
position: absolute;
top: 50%;
margin-top: -6px;
right: 30rpx;
}
.list-cell {
position: relative;
width: 100%;
box-sizing: border-box;
background-color: #fff;
color: #333;
padding: 26rpx 30rpx;
}
.list-cell:first-child {
border-radius: 8rpx 8rpx 0 0;
}
.list-cell:last-child {
border-radius: 0 0 8rpx 8rpx;
}
.list-cell::after {
content: '';
position: absolute;
border-bottom: 1px solid #eaeef1;
-webkit-transform: scaleY(0.5) translateZ(0);
transform: scaleY(0.5) translateZ(0);
transform-origin: 0 100%;
bottom: 0;
right: 0;
left: 0;
pointer-events: none;
}
.menu-list {
margin: 15px 15px;
.menu-item-box {
width: 100%;
display: flex;
align-items: center;
.menu-icon {
color: #007AFF;
font-size: 16px;
margin-right: 5px;
}
.text-right {
margin-left: auto;
margin-right: 34rpx;
color: #999;
}
}
}

@ -0,0 +1,6 @@
// global
@import "./global.scss";
// color-ui
@import "@/static/scss/colorui.css";
// iconfont
@import "@/static/font/iconfont.css";

@ -0,0 +1,9 @@
const getters = {
token: state => state.user.token,
avatar: state => state.user.avatar,
name: state => state.user.name,
roles: state => state.user.roles,
permissions: state => state.user.permissions,
selfInfo: state => state.user.selfInfo
}
export default getters

@ -0,0 +1,15 @@
import Vue from "vue";
import Vuex from "vuex";
import user from "@/store/modules/user";
import getters from "./getters";
Vue.use(Vuex);
const store = new Vuex.Store({
modules: {
user,
},
getters,
});
export default store;

@ -0,0 +1,123 @@
import config from '@/config'
import storage from '@/utils/storage'
import constant from '@/utils/constant'
import {
login,
logout,
getInfo
} from '@/api/login'
import {
getToken,
setToken,
removeToken
} from '@/utils/auth'
const baseUrl = config.baseUrl
const user = {
state: {
token: getToken(),
name: storage.get(constant.name),
avatar: storage.get(constant.avatar),
roles: storage.get(constant.roles),
permissions: storage.get(constant.permissions),
selfInfo: null,
},
mutations: {
SET_SELFINFO: (state, data) => {
return state.selfInfo = data
},
SET_TOKEN: (state, token) => {
state.token = token
},
SET_NAME: (state, name) => {
state.name = name
storage.set(constant.name, name)
},
SET_AVATAR: (state, avatar) => {
state.avatar = avatar
storage.set(constant.avatar, avatar)
},
SET_ROLES: (state, roles) => {
state.roles = roles
storage.set(constant.roles, roles)
},
SET_PERMISSIONS: (state, permissions) => {
state.permissions = permissions
storage.set(constant.permissions, permissions)
}
},
actions: {
// 登录
Login({
commit
}, userInfo) {
const username = userInfo.username.trim()
const password = userInfo.password
const code = userInfo.code
const uuid = userInfo.uuid
return new Promise((resolve, reject) => {
login(username, password, code, uuid).then(res => {
setToken(res.token)
commit('SET_TOKEN', res.token)
resolve()
}).catch(error => {
reject(error)
})
})
},
// 获取用户信息
GetInfo({
commit,
state
}) {
return new Promise((resolve, reject) => {
getInfo().then(res => {
const user = res.user
const avatar = (user == null || user.avatar == "" || user.avatar == null) ?
'' : baseUrl + user.avatar
// const avatar = (user == null || user.avatar == "" || user.avatar == null) ?
// require("@/static/images/profile.jpg") : baseUrl + user.avatar
const username = (user == null || user.userName == "" || user.userName ==
null) ? "" : user.userName
if (res.roles && res.roles.length > 0) {
commit('SET_ROLES', res.roles)
commit('SET_PERMISSIONS', res.permissions)
} else {
commit('SET_ROLES', ['ROLE_DEFAULT'])
}
commit('SET_NAME', username)
commit('SET_AVATAR', avatar)
resolve(res)
}).catch(error => {
reject(error)
})
})
},
// 退出系统
LogOut({
commit,
state
}) {
return new Promise((resolve, reject) => {
logout(state.token).then(() => {
commit('SET_TOKEN', '')
commit('SET_ROLES', [])
commit('SET_PERMISSIONS', [])
removeToken()
storage.clean()
resolve()
}).catch(error => {
reject(error)
})
})
}
}
}
export default user

@ -0,0 +1,4 @@
@font-face {
font-family: 'PingFang SC-中黑体';
/* src: url('http://39.101.188.84:9999/demo/font-file/PingFang Bold'); */
}

@ -0,0 +1,105 @@
<template>
<view class="container-main">
<view class="search-input">
<view class="input-icon">
<image :src="baseImgUrl + 'liao-ning/icon_search.png'" mode=""></image>
</view>
<view class="input-middle">
<u-input
v-model="value"
type="text"
placeholder-style="color:#C4CCD8;font-size:30rpx"
:border="false"
placeholder="请输入关键字搜索"
/>
</view>
<view class="input-btn">搜索</view>
</view>
<view class="result-list">
<view class="list-item" v-for="item in 2" :key="item">
<view class="enterprise-type">投保公司</view>
<view class="enterprise-name">调兵山市食厨烤骨头饭店</view>
</view>
</view>
<fixedButton title="开始理赔" />
</view>
</template>
<script>
import fixedButton from "@/components/fixedButton/fixedButton.vue";
export default {
components: {
fixedButton,
},
data() {
return {
baseImgUrl: getApp().globalData.config.iamgeBaseUrl,
value: "",
};
},
};
</script>
<style lang="scss" scoped>
.container-main {
box-sizing: border-box;
padding: 20rpx;
}
.search-input {
display: flex;
align-items: center;
background: #fff;
box-shadow: 0px 0px 10rpx 0px rgba(57, 118, 241, 0.0588);
border-radius: 16rpx;
box-sizing: border-box;
padding: 10rpx 25rpx;
.input-icon {
height: 30rpx;
width: 30rpx;
margin-right: 20rpx;
image {
height: 100%;
width: 100%;
}
}
.input-middle {
flex: 1;
}
.input-btn {
font-size: 32rpx;
font-weight: 500;
color: #3976f1;
}
}
.result-list {
margin-top: 20rpx;
}
.list-item {
border-radius: 16rpx;
background-color: #fff;
box-sizing: border-box;
padding: 40rpx 30rpx;
margin-bottom: 20rpx;
.enterprise-type {
font-size: 30rpx;
font-family: PingFang SC-中黑体, PingFang SC;
font-weight: 520;
color: #34373b;
margin-bottom: 20rpx;
}
.enterprise-name {
font-size: 30rpx;
font-weight: 400;
color: #616367;
}
}
</style>

@ -0,0 +1,268 @@
<template>
<view class="container-main">
<view class="header-box">
<view class="enterprise-header">
<view class="enterprise-img">
<image :src="baseImgUrl+'/liao-ning/icon_qyzhcx.png'" mode=""></image>
</view>
<view class="enterprise-name">
<view class="name-text">{{query.productName || params.enterpriseName}}</view>
<view class="score">
<uni-rate allow-half :value="gradeNum" :size="18" color="#C4CCD8" activeColor="#ED7043"
readonly />
<text v-if="gradeNum == 0"></text>
<text v-else>{{gradeNum}}</text>
</view>
</view>
</view>
<scroll-view scroll-y class="pingjia-list" @scrolltolower='reachBottom()'>
<view class="list-title">
评价({{total}})
</view>
<view class="list-item" v-for="(item,index) in list" :key="index">
<view class="item-title">
<view class="item-user">{{item.writer}}</view>
<view class="item-pf">
<text
style="color: #34373B;font-size: 28rpx;font-weight: 400;margin-right: 10rpx;">打分</text>
<uni-rate allow-half :value="item.grade" :size="15" color="#C4CCD8" activeColor="#ED7043"
readonly />
</view>
</view>
<view class="item-article">
{{item.content}}
</view>
<view class="item-time">
发布于 {{item.createTime.slice(0,10)}}
</view>
</view>
<u-loadmore :status="status" :load-text="loadText" color="#C4CCD8" font-size="24" />
</scroll-view>
</view>
</view>
</template>
<script>
import {
getAppraise
} from "@/api/shianliaoning/enterpriseSEARCH.js"
//
import {
enterpriseGrade,
} from '@/api/shianliaoning/enterpriseSEARCH.js'
export default {
components: {},
data() {
return {
baseImgUrl: getApp().globalData.config.iamgeBaseUrl,
list: [],
total: 0,
//
query: {
productId: '',
productName: '',
pageSize: 10,
pageNum: 1,
type: 1,
},
//
params: {
code: '',
enterpriseName: '',
pageSize: 10,
pageNum: 1,
type: 2,
},
flag: true,
loadText: {
nomore: '已经到底了~',
loading: '努力加载中'
},
status: 'nomore',
statusFlag: false,
//
gradeNum: 0
};
},
onLoad(e) {
if (e.gradeNum) {
this.query.productName = e.productName
this.query.productId = e.productId
this.gradeNum = e.gradeNum
this.getList(this.query)
uni.setNavigationBarTitle({
title: '产品评价详情'
});
} else {
this.params.code = uni.getStorageSync('USER_DATA').userDto.code
this.params.enterpriseName = uni.getStorageSync('USER_DATA').userDto.enterpriseName
enterpriseGrade(this.params.code).then(res => {
this.gradeNum = res.data
})
console.log(this.params);
this.getList(this.params)
uni.setNavigationBarTitle({
title: '主体评价详情'
});
}
},
methods: {
//
reachBottom() {
if (this.query.productName != '') {
if (this.total > this.list.length) {
if (this.statusFlag) {
return
}
this.query.pageNum++
this.getList(this.query)
}
}else{
if (this.total > this.list.length) {
if (this.statusFlag) {
return
}
this.params.pageNum++
this.getList(this.params)
}
}
},
//
reachStart() {
this.statusFlag = true
this.status = 'loading'
},
//
reachEnd() {
this.statusFlag = false
this.status = 'nomore'
},
getList(e) {
this.reachStart()
console.log(e);
getAppraise(e).then((res) => {
this.flag = false
console.log(res);
this.list = [...this.list, ...res.rows]
this.total = res.total
this.reachEnd()
})
},
},
}
</script>
<style lang="scss" scoped>
.container-main {
box-sizing: border-box;
padding: 20rpx;
// padding-bottom: 130rpx;
.enterprise-header {
background: #FFFFFF;
border-radius: 16rpx;
display: flex;
align-items: center;
box-sizing: border-box;
padding: 20rpx;
.enterprise-img {
height: 100rpx;
width: 100rpx;
image {
height: 100%;
width: 100%;
display: block;
}
}
.enterprise-name {
flex: 1;
box-sizing: border-box;
padding-left: 20rpx;
.name-text {
font-size: 36rpx;
font-weight: 550;
color: #34373B;
margin-bottom: 15rpx;
}
.score {
display: flex;
align-items: center;
text {
margin-left: 20rpx;
font-size: 26rpx;
font-weight: 600;
color: #ED7043;
}
}
}
}
.pingjia-list {
margin-top: 20rpx;
height: 80vh;
background-color: #FFFFFF;
border-radius: 16rpx;
box-sizing: border-box;
padding: 30rpx;
.list-title {
font-size: 36rpx;
font-weight: 520;
color: #34373B;
margin-bottom: 20rpx;
}
.list-item {
box-sizing: border-box;
padding: 30rpx 0;
border-bottom: 1rpx solid #DCE3EC;
.item-title {
display: flex;
align-items: center;
justify-content: space-between;
.item-user {
font-size: 30rpx;
color: #3976F1;
font-weight: 400;
}
.item-pf {
display: flex;
align-items: center;
}
}
.item-article {
margin: 20rpx 0;
font-size: 28rpx;
font-weight: 400;
color: #34373B;
}
.item-time {
font-size: 26rpx;
font-weight: 400;
color: #9DA2AB;
}
}
.lastItem {
border: 0;
padding-bottom: 0;
}
}
}
</style>

@ -0,0 +1,223 @@
<template>
<view class="container-main">
<view class="list">
<view class="list-item" v-for="(item, index) in list" :key="index">
<view class="item-state" :class="'state' + item.state">
{{ item.state == 0 ? "进行中" : "已结束" }}
</view>
<view class="item-data">
<view class="data-main">
<view class="data-title">{{ item.title }}</view>
<view class="data-lable-value">
<view class="row-item">
<view class="item-lable">
<view class="lable-icon">
<image
:src="baseImgUrl + 'liao-ning/icon_shijian.png'"
mode=""
></image>
</view>
<view class="lable-text">发布时间:</view>
</view>
<view class="item-value">{{ item.time }}</view>
</view>
<view class="row-item">
<view class="item-lable">
<view class="lable-icon">
<image
:src="baseImgUrl + 'liao-ning/icon_faburen.png'"
mode=""
></image>
</view>
<view class="lable-text">发布人:</view>
</view>
<view class="item-value">{{ item.userName }}</view>
</view>
<view class="row-item">
<view class="item-lable">
<view class="lable-icon">
<image
:src="baseImgUrl + 'liao-ning/icon_danwei.png'"
mode=""
></image>
</view>
<view class="lable-text">发布单位:</view>
</view>
<view class="item-value">{{ item.Units }}</view>
</view>
</view>
</view>
<view class="data-btn" v-if="item.state == 0" @click="goForm()">
我要填写
</view>
</view>
</view>
<u-divider
color="#C4CCD8"
half-width="0"
bg-color="#F5F7FA"
margin-top="60"
>已经到底啦~</u-divider
>
</view>
</view>
</template>
<script>
export default {
data() {
return {
baseImgUrl: getApp().globalData.config.iamgeBaseUrl,
list: [
{
title: "企业调查单1",
time: "2022-12-29",
userName: "张晓娟",
Units: "辽宁市场监督管理局",
state: 0,
},
{
title: "问卷调查表数据 2",
time: "2022-12-29",
userName: "张晓娟",
Units: "辽宁市场监督管理局",
state: 1,
},
],
};
},
methods: {
goForm() {
uni.navigateTo({
url: "/sub-enterprise/firm-form/firm-form",
});
},
},
};
</script>
<style lang="scss" scoped>
uni-page-body,
page {
background: rgba(245, 247, 250, 1);
}
.list {
padding: 30rpx 20rpx;
.list-item {
margin-bottom: 100rpx;
position: relative;
}
.item-state {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 66rpx;
line-height: 66rpx;
box-sizing: border-box;
padding-left: 30rpx;
border-radius: 16rpx 16rpx 0 0;
font-size: 28rpx;
font-family: "PingFang SC-中黑体";
font-weight: 500;
}
.state0 {
background: linear-gradient(
180deg,
#bcd2ff 0%,
rgba(206, 222, 255, 0) 100%
);
color: #3976f1;
}
.state1 {
background: linear-gradient(
180deg,
#dce3ec 0%,
rgba(206, 222, 255, 0) 100%
);
color: #9da2ab;
}
.item-data {
position: relative;
left: 0;
top: 60rpx;
z-index: 10;
width: 100%;
min-height: 100rpx;
background: #fff;
border-radius: 16rpx;
.data-main {
box-sizing: border-box;
padding: 30rpx 37rpx;
.data-title {
font-size: 34rpx;
font-weight: 600;
color: #34373b;
margin-bottom: 30rpx;
}
}
.row-item {
margin-bottom: 20rpx;
display: flex;
align-items: center;
.item-lable {
display: flex;
align-items: center;
min-width: 170rpx;
.lable-icon {
height: 26rpx;
width: 26rpx;
image {
height: 100%;
width: 100%;
display: block;
}
}
.lable-text {
margin-left: 10rpx;
font-size: 28rpx;
font-weight: 400;
color: #9da2ab;
}
}
.item-value {
flex: 1;
font-size: 28rpx;
font-weight: 400;
color: #34373b;
}
}
.data-lable-value {
& > view:last-child {
margin: 0;
}
}
}
.data-btn {
border-top: 1px solid rgba(220, 227, 236, 1);
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
font-weight: 500;
color: #3976f1;
}
}
</style>

@ -0,0 +1,131 @@
<template>
<view class="container-main">
<view class="form">
<view class="form-item firm-name">
<view class="form-lable">
<text style="margin-right: 10rpx; font-size: 34rpx; color: #eb5b47"
>*</text
>
<text class="lable-text">公司名称</text>
</view>
<view class="form-value">
<u-input
v-model="value"
type="text"
:border="false"
placeholder-style="color:#C4CCD8;font-size:30rpx"
:custom-style="customStyle"
placeholder="请输入公司名称"
/>
</view>
</view>
<view class="form-item">
<view class="form-lable">
<text style="margin-right: 10rpx; font-size: 34rpx; color: #eb5b47"
>*</text
>
<text class="lable-text">填报人</text>
</view>
<view class="form-value">
<u-input
v-model="value"
type="text"
:border="false"
placeholder-style="color:#C4CCD8;font-size:30rpx"
placeholder="请输入填报人姓名"
/>
</view>
</view>
<view class="form-item">
<view class="form-lable">
<text style="margin-right: 10rpx; font-size: 34rpx; color: #eb5b47"
>*</text
>
<text class="lable-text">联系电话</text>
</view>
<view class="form-value">
<u-input
v-model="value"
type="text"
:border="false"
placeholder-style="color:#C4CCD8;font-size:30rpx"
placeholder="请输入联系电话"
/>
</view>
</view>
<view class="form-item item-textarea">
<view class="form-lable">
<text class="lable-text">建议意见</text>
</view>
<view class="form-value">
<u-input
v-model="value"
type="textarea"
height="150"
placeholder-style="color:#C4CCD8;font-size:30rpx"
:custom-style="customStyle"
:border="false"
placeholder="请输入建议意见"
/>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
customStyle: {
paddingLeft: "20rpx",
paddingTop: "20rpx",
},
};
},
};
</script>
<style lang="scss" scoped>
uni-page-body,
page {
background: rgba(245, 247, 250, 1);
}
.form {
box-sizing: border-box;
padding: 20rpx;
}
.form-item {
display: flex;
align-items: center;
box-sizing: border-box;
padding: 25rpx;
background-color: #fff;
border-radius: 16rpx;
margin-bottom: 20rpx;
.form-lable {
min-width: 180rpx;
}
.lable-text {
font-size: 32rpx;
font-weight: 400;
color: #34373b;
}
.form-value {
flex: 1;
}
}
.item-textarea,
.firm-name {
align-items: flex-start;
flex-direction: column;
.form-value {
width: 100%;
}
}
</style>

@ -0,0 +1,262 @@
<template>
<view class="container-main">
<view class="list">
<view
class="list-item"
v-for="(item, index) in list"
:key="index"
@click="getInfo()"
>
<view class="item-state" :class="'state' + item.state">
{{ item.state == 0 ? "已赔付" : "" }}
{{ item.state == 1 ? "处理中" : "" }}
{{ item.state == 2 ? "已拒绝" : "" }}
</view>
<view class="item-data">
<view class="data-main">
<view class="data-title">{{ item.title }}</view>
<view class="data-lable-value">
<view class="row-item">
<view class="item-lable">
<view class="lable-icon">
<image
:src="baseImgUrl + 'liao-ning/icon_shijian.png'"
mode=""
></image>
</view>
<view class="lable-text">申请时间:</view>
</view>
<view class="item-value">{{ item.time }}</view>
</view>
<view class="row-item">
<view class="item-lable">
<view class="lable-icon">
<image
:src="baseImgUrl + 'liao-ning/icon_faburen.png'"
mode=""
></image>
</view>
<view class="lable-text">申请人:</view>
</view>
<view class="item-value">{{ item.userName }}</view>
</view>
<view class="row-item" v-if="item.state == 0">
<view class="item-lable">
<view class="lable-icon">
<image
:src="baseImgUrl + 'liao-ning/icon_danwei.png'"
mode=""
></image>
</view>
<view class="lable-text">理赔金额:</view>
</view>
<view
class="item-value"
style="color: #3976f1; font-weight: 520"
>{{ item.Units }}
</view>
</view>
</view>
</view>
<!-- <view class="data-btn" v-if="item.state == 0" @click="goForm()">
我要填写
</view> -->
</view>
</view>
</view>
<u-divider bg-color="#F5F7FA" color="#C4CCD8" half-width="0"
>已经到底啦~</u-divider
>
<fixedButton title="申请理赔" @click="clickSub" />
</view>
</template>
<script>
import fixedButton from "@/components/fixedButton/fixedButton.vue";
export default {
components: {
fixedButton,
},
data() {
return {
baseImgUrl: getApp().globalData.config.iamgeBaseUrl,
list: [
{
title: "食物中毒",
time: "2022-12-29",
userName: "徐立峰",
Units: "150,000元",
state: 0,
},
{
title: "食源性肠道疾病",
time: "2022-12-29",
userName: "姜家湖",
Units: "150,000元",
state: 1,
},
{
title: "食源性肠道疾病",
time: "2022-12-29",
userName: "谢丽华",
Units: "150,000元",
state: 2,
},
],
};
},
methods: {
getInfo() {
uni.navigateTo({
url: "/sub-public/lipei-info/lipei-info",
});
},
goForm() {
uni.navigateTo({
url: "/sub-public/survey-form/survey-form",
});
},
clickSub() {
uni.navigateTo({
url: "/sub-public/shenqing-lipei/shenqing-lipei",
});
},
},
};
</script>
<style lang="scss" scoped>
uni-page-body,
page {
background: rgba(245, 247, 250, 1);
}
.list {
padding: 30rpx 20rpx;
.list-item {
margin-bottom: 100rpx;
position: relative;
}
.item-state {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 66rpx;
line-height: 66rpx;
box-sizing: border-box;
padding-left: 30rpx;
border-radius: 16rpx 16rpx 0 0;
font-size: 28rpx;
font-family: "PingFang SC-中黑体";
font-weight: 500;
}
.state0 {
background: linear-gradient(
180deg,
#bcd2ff 0%,
rgba(206, 222, 255, 0) 100%
);
color: #3976f1;
}
.state1 {
background: linear-gradient(
180deg,
#ffe7ac 0%,
rgba(255, 231, 173, 0) 100%
);
color: #f5b923;
}
.state2 {
background: linear-gradient(
180deg,
rgba(255, 168, 162, 0.4) 0%,
rgba(247, 99, 89, 0) 100%
);
color: #f76359;
}
.item-data {
position: relative;
left: 0;
top: 60rpx;
z-index: 10;
width: 100%;
min-height: 100rpx;
background: #fff;
border-radius: 16rpx;
.data-main {
box-sizing: border-box;
padding: 30rpx 37rpx;
.data-title {
font-size: 34rpx;
font-weight: 600;
color: #34373b;
margin-bottom: 30rpx;
}
}
.row-item {
margin-bottom: 20rpx;
display: flex;
align-items: center;
.item-lable {
display: flex;
align-items: center;
min-width: 170rpx;
.lable-icon {
height: 26rpx;
width: 26rpx;
image {
height: 100%;
width: 100%;
display: block;
}
}
.lable-text {
margin-left: 10rpx;
font-size: 28rpx;
font-weight: 400;
color: #9da2ab;
}
}
.item-value {
flex: 1;
font-size: 28rpx;
font-weight: 400;
color: #34373b;
}
}
.data-lable-value {
& > view:last-child {
margin: 0;
}
}
}
.data-btn {
border-top: 1px solid rgba(220, 227, 236, 1);
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
font-weight: 500;
color: #3976f1;
}
}
</style>

@ -0,0 +1,342 @@
<template>
<view class="container-main">
<view class="list">
<view class="list-item" v-for="(item, index) in list" :key="index" @click="getInfo(item.id)">
<view class="item-state" :class="
item.status == '未生效'
? 'state0'
: item.status == '生效中'
? 'state1'
: 'state2'
">
{{ item.status }}
</view>
<view class="item-data">
<view class="data-main">
<view class="data-title">{{ item.productName }}</view>
<view class="data-lable-value">
<view class="row-item">
<view class="item-lable">
<view class="lable-icon">
<image :src="baseImgUrl + 'liao-ning/icon_shijian.png'" mode=""></image>
</view>
<view class="lable-text">保险公司:</view>
</view>
<view class="item-value">{{ item.companyName }}</view>
</view>
<view class="row-item">
<view class="item-lable">
<view class="lable-icon">
<image :src="baseImgUrl + 'liao-ning/icon_faburen.png'" mode=""></image>
</view>
<view class="lable-text">保险期间:</view>
</view>
<view class="item-value">{{ item.insurancePeriod }}{{
item.insurancePeriodEnd
}}</view>
</view>
<view class="row-item">
<view class="item-lable">
<view class="lable-icon">
<image :src="baseImgUrl + 'liao-ning/icon_danwei.png'" mode=""></image>
</view>
<view class="lable-text">保费合计:</view>
</view>
<view class="item-value" style="color: #3976f1; font-weight: 520">
{{ item.totalPremium }}
</view>
</view>
</view>
</view>
</view>
</view>
<u-loadmore :status="status" :load-text="loadText" color="#C4CCD8" font-size="24" />
</view>
<fixedButton title="我要投保" @click="clickSub" />
</view>
</template>
<script>
//
//
//
import {
getInfo,
getAdministrative,
getAllFoodList,
insureSystem,
} from "@/api/shianliaoning/enterpriseSEARCH.js";
import fixedButton from "@/components/fixedButton/fixedButton.vue";
import {
getInsureList
} from "@/api/shianliaoning/insure.js";
import {
ReactiveFlags
} from "vue";
import {
getToken
} from "@/utils/auth";
export default {
components: {
fixedButton,
},
data() {
return {
data: {},
baseImgUrl: getApp().globalData.config.iamgeBaseUrl,
list: [],
queryParms: {
pageNum: 1,
pageSize: 10,
//
code: "",
//
enterpriseName: "",
},
total: 0, //
flag: true,
loadText: {
nomore: "已经到底了~",
loading: "努力加载中",
},
status: "nomore",
statusFlag: false,
one: null,
two: null,
three: null,
};
},
onLoad() {
this.queryParms.code = uni.getStorageSync("USER_DATA").userDto.code;
this.queryParms.enterpriseName =
uni.getStorageSync("USER_DATA").userDto.enterpriseName;
this.getList();
//
this.httpThreeGet();
},
onReachBottom() {
if (this.total > this.list.length) {
if (this.statusFlag) {
return;
}
this.queryParms.pageNum++;
this.getList();
}
},
methods: {
//
httpThreeGet() {
let _this = this;
this.one = new Promise((resolve, rejects) => {
getInfo(this.queryParms.code).then((res) => {
resolve(res.data.result);
});
});
this.two = new Promise((resolve, rejects) => {
getAdministrative(this.queryParms.code).then((res) => {
resolve(res.data.result[0]);
});
});
this.three = new Promise((resolve, rejects) => {
getAllFoodList({
uniscid: this.queryParms.code,
pageNum: 1,
pageSize: 1,
}).then((res) => {
resolve(res.data.result.list[0]);
});
});
Promise.all([this.one, this.two, this.three]).then((res) => {
_this.data = {
address: res[0].address,
appliName: res[0].mainName,
busDesc: res[1].licContent,
busEdate: res[1].valTo,
//
busLicenseNo: res[1].licNo,
//
// busSLicenseNo: res[1].licAuthCode,
busSLicenseNo: null,
//
province: null,
//
busSdate: null,
busType: res[0].entType,
identifyNumber: res[0].uniscid,
};
});
},
//
reachStart() {
this.statusFlag = true;
this.status = "loading";
},
//
reachEnd() {
this.statusFlag = false;
this.status = "nomore";
},
//
getList() {
this.reachStart();
getInsureList(this.queryParms).then((res) => {
this.flag = false;
this.list = [...this.list, ...res.rows];
this.total = res.total;
this.reachEnd();
});
},
getInfo(e) {
uni.navigateTo({
url: `/sub-enterprise/toubao-xiangqing/toubao-xiangqing?id=${e}`,
});
},
clickSub() {
insureSystem(this.data).then((res) => {
let token = getToken();
window.location.href =
`https://pay.tpi.cntaiping.com/weshop/dfs/lnsz/SN05/index#/?insureId=${res.data}&token=${token}`
// window.location.href = `
// `
// https
// : //testiapp.etaiping.com:7443/weshop/dfs/lnsz/SN05/index#/?insureId=${res.data}&token=${token}`;
});
},
},
};
</script>
<style lang="scss" scoped>
uni-page-body,
page {
background: rgba(245, 247, 250, 1);
}
.list {
padding: 30rpx 20rpx;
// padding-bottom: 128rpx;
.list-item {
margin-bottom: 100rpx;
position: relative;
}
.item-state {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 66rpx;
line-height: 66rpx;
box-sizing: border-box;
padding-left: 30rpx;
border-radius: 16rpx 16rpx 0 0;
font-size: 28rpx;
font-family: "PingFang SC-中黑体";
font-weight: 500;
}
.state0 {
background: linear-gradient(180deg,
#bcd2ff 0%,
rgba(206, 222, 255, 0) 100%);
color: #3976f1;
}
.state1 {
background: linear-gradient(180deg,
#ffe7ac 0%,
rgba(255, 231, 173, 0) 100%);
color: #f5b923;
}
.state2 {
background: linear-gradient(180deg,
rgba(255, 168, 162, 0.4) 0%,
rgba(247, 99, 89, 0) 100%);
color: #f76359;
}
.item-data {
position: relative;
left: 0;
top: 60rpx;
z-index: 10;
width: 100%;
min-height: 100rpx;
background: #fff;
border-radius: 16rpx;
.data-main {
box-sizing: border-box;
padding: 30rpx 37rpx;
.data-title {
font-size: 34rpx;
font-weight: 600;
color: #34373b;
margin-bottom: 30rpx;
}
}
.row-item {
margin-bottom: 20rpx;
display: flex;
align-items: center;
.item-lable {
display: flex;
align-items: center;
min-width: 170rpx;
.lable-icon {
height: 26rpx;
width: 26rpx;
image {
height: 100%;
width: 100%;
display: block;
}
}
.lable-text {
margin-left: 10rpx;
font-size: 28rpx;
font-weight: 400;
color: #9da2ab;
}
}
.item-value {
flex: 1;
font-size: 28rpx;
font-weight: 400;
color: #34373b;
}
}
.data-lable-value {
&>view:last-child {
margin: 0;
}
}
}
.data-btn {
border-top: 1px solid rgba(220, 227, 236, 1);
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
font-weight: 500;
color: #3976f1;
}
}
</style>

@ -0,0 +1,321 @@
<template>
<view class="content">
<uni-forms :model="form" ref="uForm" :rules="rules" label-width="130">
<uni-forms-item label="申请年份" name="year">
<u-input v-model="form.year" placeholder="请输入年份" type="number" />
</uni-forms-item>
<uni-forms-item label="所在地区" name="city">
<u-input v-model="form.city" type="select" @click="showCity=true" />
</uni-forms-item>
<uni-forms-item label="详细地址" name="address">
<u-input v-model="form.address" />
</uni-forms-item>
<uni-forms-item label="企业类型" name="enterprise_type">
<u-input v-model="form.enterprise_type" type="select" @click="show=true" />
</uni-forms-item>
<uni-forms-item label="申请等级" name="applicate_level">
<u-input v-model="form.applicate_level" type="select" @click="look=true" />
</uni-forms-item>
<uni-forms-item label="附件信息">
<view class="file-upload">
<u-button type="primary" size="mini" @click="getFilesSys"></u-button>
<view class="file-item" v-for="(item,index) in fileList" :key="index">
<text class="file-name">{{item.name}}</text>
<u-icon name="close-circle-fill" color="#2979ff" size="25" @click="closeFile(index)">
</u-icon>
</view>
</view>
<!-- #ifdef H5 -->
<uni-file-picker limit="5" file-mediatype="all" title="最多选择5个文件" ref="files" @select="selectOut"
v-show="false">
</uni-file-picker>
<!-- #endif -->
</uni-forms-item>
</uni-forms>
<fixedButton title="提交" @click="toBack()"></fixedButton>
<u-select v-model="show" mode="mutil-column-auto" :list="option" @confirm="getOp">
</u-select>
<u-select v-model="look" mode="mutil-column-auto" :list="list" @confirm="getList"></u-select>
<u-select v-model="showCity" :list="cityList" label-name="dictLabel" value-name="dictLabel"
@confirm="ckickConfirm"></u-select>
</view>
</template>
<script>
import {
pickFile
} from "@/utils/pickFile";
import fixedButton from "@/components/fixedButton/fixedButton.vue";
import {
uploadFile
} from '@/api/system/user.js'
import {
addEnterprise
} from "@/api/shianliaoning/enterprise.js"
export default {
components: {
fixedButton
},
data() {
return {
show: false,
look: false,
showCity: false,
cityList: [],
list: [{
value: '0',
label: '诚信店A级'
},
{
value: '1',
label: '诚信店B级'
},
{
value: '2',
label: '诚信店C级'
},
{
value: '3',
label: '争创诚信店'
}
],
option: [{
value: '0',
label: '保健食品经营'
},
{
value: '1',
label: '婴配食品经营'
},
{
value: '2',
label: '特医食品经营'
},
{
value: '3',
label: '保健食品生产'
},
{
value: '4',
label: '婴配食品生产'
}
],
form: {
year: '',
//
enterpriseName: '',
//
code: '',
city: '',
address: '',
enterprise_type: '',
applicate_level: '',
//
files: '',
//
files_originalfilename: ''
},
rules: {
//
year: {
rules: [{
required: true,
errorMessage: '请输入申请年份',
// blurchange
trigger: ['blur'],
},
{
pattern: '^[1-3]([0-9]{3})$',
errorMessage: '请输入正确的年份',
}
],
},
city: {
rules: [{
required: true,
errorMessage: '请选择地区',
// blurchange
trigger: ['blur'],
}, ],
},
address: {
rules: [{
required: true,
errorMessage: '请输入地址',
// blurchange
trigger: ['blur'],
}, ],
},
enterprise_type: {
rules: [{
required: true,
errorMessage: '请选择企业类型',
// blurchange
trigger: ['blur'],
}, ],
},
applicate_level: {
rules: [{
required: true,
errorMessage: '请选择申请等级',
// blurchange
trigger: ['blur'],
}, ],
},
},
//
fileList: [],
}
},
onLoad() {
this.getDicts("city_name").then((response) => {
this.cityList = response.data;
});
this.form.code = uni.getStorageSync('USER_DATA').userDto.code
this.form.enterpriseName = uni.getStorageSync('USER_DATA').userDto.enterpriseName
},
onReady() {
// onReady
this.$refs.uForm.setRules(this.rules)
},
methods: {
ckickConfirm(e) {
this.form.city = e[0].label
},
getOp(e) {
this.form.enterprise_type = e[0].label
},
getList(e) {
this.form.applicate_level = e[0].label
},
// =========================
//
closeFile(index) {
this.fileList.splice(index, 1)
uni.showToast({
title: '删除成功'
})
},
//
getFilesSys: function() {
let _this = this;
//
// pickFile.PickFile((path) => {
// let fileLocalPath = "file:///" + path;
// _this.fileUpload(fileLocalPath)
// })
// return
// // #ifdef APP-PLUS
// pickFile.PickFile((path) => {
// let fileLocalPath = "file:///" + path;
// _this.fileUpload(fileLocalPath)
// })
// // #endif
// #ifdef H5
this.$refs.files.choose()
// #endif
},
//
selectOut(e) {
// if (e.tempFiles[0].extname != "pdf") {
// uni.showToast({
// title: 'pdf!',
// icon: 'none'
// })
// return
// }
let file = e.tempFiles[0].path
this.fileUpload(file)
},
//
fileUpload(e) {
console.log(e)
let data = {
filePath: e
}
uni.showLoading({
title: '上传中'
})
uploadFile(data).then(res => {
uni.showToast({
title: '上传成功'
})
this.fileList.push({
name: res.originalFilename,
url: this.deletelDNS(res.url)
})
})
},
// =========================
toBack() {
this.$refs.uForm.validate().then((res) => {
if (this.fileList.length > 0) {
this.form.files = [];
this.form.files_originalfilename = [];
this.fileList.forEach((item) => {
this.form.files.push(item.url);
this.form.files_originalfilename.push(item.name);
});
this.form.files = this.form.files.toString();
this.form.files_originalfilename =
this.form.files_originalfilename.toString();
}
console.log(this.form);
addEnterprise(this.form).then((msg) => {
console.log(msg);
uni.showToast({
title: '提交成功',
// success icon
icon: 'success',
// 2
duration: 1000
})
setTimeout(() => {
uni.switchTab({
url: '/pages/company-home/index'
});
}, 1500)
})
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
padding: 40rpx;
background-color: white;
}
::v-deep .button-conatiner {
z-index: 10;
}
.file-upload {
margin-top: 20rpx;
}
.file-item {
margin-top: 20rpx;
box-sizing: border-box;
border: 1px solid #f7f7f7;
padding: 20rpx 10rpx;
display: flex;
align-items: center;
justify-content: space-between;
border-radius: 10rpx;
.file-name {
font-size: 28rpx;
letter-spacing: 2rpx;
}
}
</style>

@ -0,0 +1,327 @@
<template>
<view class="content">
<uni-forms :model="form" ref="uForm" :rules="rules" label-width="130">
<uni-forms-item label="申请年份" name="year">
<u-input v-model="form.year" placeholder="请输入年份" type="number" />
</uni-forms-item>
<uni-forms-item label="所在地区" name="city">
<u-input v-model="form.city" type="select" @click="showCity=true" />
</uni-forms-item>
<uni-forms-item label="详细地址" name="address">
<u-input v-model="form.address" />
</uni-forms-item>
<uni-forms-item label="企业类型" name="enterprise_type">
<u-input v-model="form.enterprise_type" type="select" @click="show=true" />
</uni-forms-item>
<uni-forms-item label="申请等级" name="applicate_level">
<u-input v-model="form.applicate_level" type="select" @click="look=true" />
</uni-forms-item>
<uni-forms-item label="附件信息">
<u-upload :action="action+'/common/uploadMinioonfile'" :header="actionHeader" @on-success="fileSuccess"
@on-remove="fileRemove" width="150rpx" height="150rpx" max-count="3"></u-upload>
</uni-forms-item>
</uni-forms>
<fixedButton title="提交" @click="toBack()"></fixedButton>
<u-select v-model="show" mode="mutil-column-auto" :list="option" @confirm="getOp">
</u-select>
<u-select v-model="look" mode="mutil-column-auto" :list="list" @confirm="getList"></u-select>
<u-select v-model="showCity" :list="cityList" label-name="dictLabel" value-name="dictLabel"
@confirm="ckickConfirm"></u-select>
</view>
</template>
<script>
import {
getToken
} from '@/utils/auth'
import {
pickFile
} from "@/utils/pickFile";
import fixedButton from "@/components/fixedButton/fixedButton.vue";
import {
uploadFile
} from '@/api/system/user.js'
import {
addEnterprise
} from "@/api/shianliaoning/enterprise.js"
export default {
components: {
fixedButton
},
data() {
return {
actionHeader: {
'Authentication': getToken()
},
action: getApp().globalData.config.baseUrl,
show: false,
look: false,
showCity: false,
cityList: [],
list: [{
value: '0',
label: '诚信店A级'
},
{
value: '1',
label: '诚信店B级'
},
{
value: '2',
label: '诚信店C级'
},
{
value: '3',
label: '争创诚信店'
}
],
option: [{
value: '0',
label: '保健食品经营'
},
{
value: '1',
label: '婴配食品经营'
},
{
value: '2',
label: '特医食品经营'
},
{
value: '3',
label: '保健食品生产'
},
{
value: '4',
label: '婴配食品生产'
}
],
form: {
year: '',
//
enterpriseName: '',
//
code: '',
city: '',
address: '',
enterprise_type: '',
applicate_level: '',
//
files: '',
//
files_originalfilename: ''
},
rules: {
//
year: {
rules: [{
required: true,
errorMessage: '请输入申请年份',
// blurchange
trigger: ['blur'],
},
{
pattern: '^[1-3]([0-9]{3})$',
errorMessage: '请输入正确的年份',
}
],
},
city: {
rules: [{
required: true,
errorMessage: '请选择地区',
// blurchange
trigger: ['blur'],
}, ],
},
address: {
rules: [{
required: true,
errorMessage: '请输入地址',
// blurchange
trigger: ['blur'],
}, ],
},
enterprise_type: {
rules: [{
required: true,
errorMessage: '请选择企业类型',
// blurchange
trigger: ['blur'],
}, ],
},
applicate_level: {
rules: [{
required: true,
errorMessage: '请选择申请等级',
// blurchange
trigger: ['blur'],
}, ],
},
},
//
fileList: [],
}
},
onLoad() {
this.getDicts("city_name").then((response) => {
this.cityList = response.data;
});
this.form.code = uni.getStorageSync('USER_DATA').userDto.code
this.form.enterpriseName = uni.getStorageSync('USER_DATA').userDto.enterpriseName
},
onReady() {
// onReady
this.$refs.uForm.setRules(this.rules)
},
methods: {
ckickConfirm(e) {
this.form.city = e[0].label
},
getOp(e) {
this.form.enterprise_type = e[0].label
},
getList(e) {
this.form.applicate_level = e[0].label
},
// =========================
//
closeFile(index) {
this.fileList.splice(index, 1)
uni.showToast({
title: '删除成功'
})
},
//
getFilesSys: function() {
let _this = this;
//
// pickFile.PickFile((path) => {
// let fileLocalPath = "file:///" + path;
// _this.fileUpload(fileLocalPath)
// })
// return
// // #ifdef APP-PLUS
// pickFile.PickFile((path) => {
// let fileLocalPath = "file:///" + path;
// _this.fileUpload(fileLocalPath)
// })
// // #endif
// #ifdef H5
this.$refs.files.choose()
// #endif
},
//
selectOut(e) {
// if (e.tempFiles[0].extname != "pdf") {
// uni.showToast({
// title: 'pdf!',
// icon: 'none'
// })
// return
// }
let file = e.tempFiles[0].path
this.fileUpload(file)
},
//
fileUpload(e) {
console.log(e)
let data = {
filePath: e
}
uni.showLoading({
title: '上传中'
})
uploadFile(data).then(res => {
uni.showToast({
title: '上传成功'
})
this.fileList.push({
name: res.originalFilename,
url: this.deletelDNS(res.url)
})
})
},
//
fileSuccess(data, index, lists, name) {
this.fileList.push({
name: data.originalFilename,
url: this.deletelDNS(data.url)
})
},
//
fileRemove(index, lists, name) {
this.fileList.splice(index, 1)
},
// ============ =============
toBack() {
this.$refs.uForm.validate().then((res) => {
if (this.fileList.length > 0) {
this.form.files = [];
this.form.files_originalfilename = [];
this.fileList.forEach((item) => {
this.form.files.push(item.url);
this.form.files_originalfilename.push(item.name);
});
this.form.files = this.form.files.toString();
this.form.files_originalfilename =
this.form.files_originalfilename.toString();
}
addEnterprise(this.form).then((msg) => {
console.log(msg);
uni.showToast({
title: '提交成功',
// success icon
icon: 'success',
// 2
duration: 1000
})
setTimeout(() => {
uni.switchTab({
url: '/pages/company-home/index'
});
}, 1500)
})
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
padding: 40rpx;
background-color: white;
}
::v-deep .button-conatiner {
z-index: 10;
}
.file-upload {
margin-top: 20rpx;
}
.file-item {
margin-top: 20rpx;
box-sizing: border-box;
border: 1px solid #f7f7f7;
padding: 20rpx 10rpx;
display: flex;
align-items: center;
justify-content: space-between;
border-radius: 10rpx;
.file-name {
font-size: 28rpx;
letter-spacing: 2rpx;
}
}
</style>

@ -0,0 +1,320 @@
<template>
<view class="container-main">
<view class="tabList">
<view class="" v-for="(item, index) in tabList" :key="index"
:class="currentIndex == index ? 'activeTab' : ''" @click="clickTab(index)">{{ item.name }}</view>
</view>
<view class="data-main" v-show="currentIndex == 0">
<view class="data-rows" style="padding-top: 0">
<view class="data-lable">机构名称</view>
<view class="data-value">{{ form.checkName }}</view>
</view>
<view class="data-rows">
<view class="data-lable">所在城市</view>
<view class="data-value">{{ form.code }}</view>
</view>
<view class="data-rows">
<view class="data-lable">所在县区</view>
<view class="data-value">{{ form.quCode }}</view>
</view>
<view class="data-rows">
<view class="data-lable">机构地址</view>
<view class="data-value">{{ form.address }}</view>
</view>
<view class="data-rows">
<view class="data-lable">联系人</view>
<view class="data-value">{{ form.contact }}</view>
</view>
<view class="data-rows">
<view class="data-lable">联系电话</view>
<view class="data-value">{{ form.tel }}</view>
</view>
<view class="data-rows">
<view class="data-lable">服务类别</view>
<view class="data-value">{{ form.service }}</view>
</view>
<view class="data-rows phone-row" style="flex-direction: column; align-items: flex-start"
v-show="form.checkImg">
<view class="data-lable" style="margin-bottom: 20rpx">机构照片</view>
<view class="data-value data-img">
<image :src="baseUrl + '/common/download/downloadmino?filename=' + item" mode=""
v-for="(item, index) in form.checkImg" :key="index" @click="
viewIamge(
baseUrl + '/common/download/downloadmino?filename=' + item,
index
)
"></image>
</view>
</view>
<view class="map">
<map style="height: 100%; width: 100%" :show-compass="true" :scale="scale" :longitude="longitude"
:latitude="latitude" :markers="markers"></map>
<view class="navigation-btn" @click="clickCell()"></view>
</view>
</view>
<view class="data-main" v-show="currentIndex == 1" style="min-height: 100rpx">
<view class="data-rows" style="padding-top: 0">
<!-- <view class="data-lable">
证书信息
</view> -->
<view class="data-value">{{ form.certificate }}</view>
</view>
</view>
<view class="data-main" v-show="currentIndex == 2" style="min-height: 100rpx">
<view class="data-rows" style="padding-top: 0">
<!-- <view class="data-lable">服务内容</view> -->
<view class="data-value">{{ form.serviceContent }}</view>
</view>
</view>
<!-- 选择导航 -->
<u-action-sheet :list="list" v-model="show" @click="clickSheet"></u-action-sheet>
</view>
</template>
<script>
import config from "@/config";
import {
getinfo
} from "@/api/shianliaoning/check";
import wexinLoction from '@/utils/wxjsApi.js'
import {
getWxConfig
} from '@/api/wx.js'
export default {
data() {
return {
baseImgUrl: getApp().globalData.config.iamgeBaseUrl,
markers: [],
latitude: 31.299758,
longitude: 120.585294,
longitude2: null,
latitude2: null,
baseUrl: config.baseUrl,
scale: 10,
currentIndex: 0,
form: {},
tabList: [{
name: "基本资料",
},
{
name: "证书信息",
},
{
name: "服务项目",
},
],
list: [{
text: '高德地图',
},
{
text: '百度地图',
},
{
text: '腾讯地图',
}
],
show: false
};
},
onLoad(option) {
this.getInfo(option.id);
console.log(new Date().getTime() / 1000 * 1000, '微信凭证')
},
methods: {
clickSheet(e) {
uni.getLocation({
type: 'gcj02',
success: (res) => {
if (e == 0) {
//
window.android.openOtherApplication(
`amapuri://route/plan?sourceApplication=maxuslife&sname=我的位置&slat=${res.latitude}&slon=${res.longitude}&dlat=${this.form.latitude}&dlon=${this.form.longitude}&dname=${this.form.checkName}&dev=0&t=0`,
'com.autonavi.minimap')
} else if (e == 1) {
//
window.android.openOtherApplication(
`baidumap://map/direction?mode=driving&origin=latlng:${res.latitude},${res.longitude}|name:我的位置&destination=latlng:${this.form.latitude},${this.form.longitude}|name:${this.form.checkName}`,
'com.baidu.BaiduMap')
} else {
//
window.android.openOtherApplication(
`qqmap://map/routeplan?type=drive&policy=0&referer=zhongshuo&from=我的位置&fromcoord=${res.latitude},${res.longitude}&to=${this.form.checkName}&tocoord=${this.form.latitude},${this.form.longitude}`,
'com.tencent.map')
}
}
})
},
//
clickCell() {
this.show = true
return
// let query = {
// noncestr: this.$u.guid(20), //
// url: location.href.split('#')[0], //
// timestamp: Math.round(new Date().getTime() / 1000) //
// }
// let item = {
// lat: this.form.latitude,
// lon: this.form.longitude,
// name: this.form.checkName,
// address: this.form.address
// }
// getWxConfig(query).then(res => {
// let resData = {
// appid: 'wxb87922d910215826',
// timestamp: query.timestamp,
// noncestr: query.noncestr,
// signature: res.msg
// }
// let data = {
// ...resData,
// ...item
// }
// wexinLoction(data)
// })
},
//
viewIamge(url, index) {
uni.previewImage({
current: index,
urls: url.split(","),
});
},
getInfo(id) {
getinfo(id).then((res) => {
this.form = res.data;
this.scale = 16;
this.latitude = this.form.latitude;
this.longitude = this.form.longitude;
this.markers.push({
id: this.form.id,
title: this.form.checkName,
latitude: Number(this.form.latitude),
longitude: Number(this.form.longitude),
iconPath: this.baseImgUrl + "liao-ning/pointActive.png",
width: 20,
height: 30,
});
if (this.form.checkImg) {
this.form.checkImg = this.form.checkImg.split(",");
}
});
},
clickTab(index) {
this.currentIndex = index;
},
},
};
</script>
<style lang="scss" scoped>
.container-main {
box-sizing: border-box;
padding: 20rpx;
.tabList {
height: 88rpx;
border-radius: 16rpx;
background: #fff;
display: flex;
align-items: center;
&>view {
flex: 1;
text-align: center;
font-size: 30rpx;
font-weight: 400;
color: #34373b;
}
&>view:nth-child(1) {
border-right: 1px solid #dce3ec;
}
&>view:nth-child(2) {
border-right: 1px solid #dce3ec;
}
.activeTab {
font-weight: 600;
color: #3976f1;
}
}
.data-main {
min-height: 900rpx;
border-radius: 16rpx;
background: #fff;
box-sizing: border-box;
padding: 30rpx;
margin-top: 20rpx;
}
.data-rows {
display: flex;
align-items: center;
border-bottom: 1rpx solid #ecf1f7;
box-sizing: border-box;
padding: 30rpx 0;
.data-lable {
width: 150rpx;
font-size: 30rpx;
font-weight: 400;
color: #34373b;
}
.data-value {
flex: 1;
font-size: 30rpx;
font-weight: 400;
color: #616367;
}
.data-img {
width: 100%;
display: flex;
align-items: center;
gap: 35rpx;
justify-content: flex-start;
image {
width: 30%;
height: 188rpx;
border-radius: 16rpx;
}
}
}
.phone-row {
border-bottom: none;
}
.map {
width: 100%;
height: 500rpx;
border-radius: 20rpx;
position: relative;
.navigation-btn {
position: absolute;
left: 50%;
bottom: 10%;
transform: translateX(-50%);
width: 180rpx;
height: 68rpx;
text-align: center;
line-height: 68rpx;
background: #3976f1;
box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.102);
border-radius: 90rpx;
font-size: 30rpx;
font-weight: 400;
color: #ffffff;
}
}
}
</style>

@ -0,0 +1,168 @@
<template>
<view class="container-main">
<view class="search-main">
<view class="search-input">
<view class="input-icon">
<image
:src="baseImgUrl + 'liao-ning/icon_search.png'"
mode=""
></image>
</view>
<view class="input-middle">
<u-input
v-model="value"
type="text"
placeholder-style="color:#C4CCD8;font-size:30rpx"
:border="false"
placeholder="请输入关键字搜索"
/>
</view>
<view class="input-btn">搜索</view>
</view>
<view class="search-result">
<view class="result-list">
<view
class="result-item"
v-for="item in 5"
:key="item"
@click="getInfo()"
>
<view class="item-icon">
<image
:src="baseImgUrl + 'liao-ning/icon_qyzhcx.png'"
mode=""
></image>
</view>
<view class="item-data">
<view class="data-title"
>国务院关于促进连锁经营发展的若干意见</view
>
<view class="data-subtitle">沈阳市皇姑区长江街188号</view>
</view>
<view class="item-arrow">
<u-icon name="arrow-right" color="#D5D5D5"></u-icon>
</view>
</view>
<u-loadmore
status="nomore"
:load-text="loadText"
color="#C4CCD8"
font-size="24"
/>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
baseImgUrl: getApp().globalData.config.iamgeBaseUrl,
value: "",
loadText: {
nomore: "已经到底啦~",
},
};
},
methods: {
clickMultiple(item, index) {
if (this.multipleList[index].active == true) {
this.multipleList[index].active = false;
return;
}
this.multipleList[index].active = true;
},
getInfo() {
uni.navigateTo({
url: "/sub-enterprise/policy-details/policy-details",
});
},
},
};
</script>
<style lang="scss" scoped>
.search-main {
box-sizing: border-box;
padding: 20rpx;
.search-input {
display: flex;
align-items: center;
background: #fff;
box-shadow: 0px 0px 10rpx 0px rgba(57, 118, 241, 0.0588);
border-radius: 16rpx;
box-sizing: border-box;
padding: 10rpx 25rpx;
.input-icon {
height: 30rpx;
width: 30rpx;
margin-right: 20rpx;
image {
height: 100%;
width: 100%;
}
}
.input-middle {
flex: 1;
}
.input-btn {
font-size: 32rpx;
font-weight: 500;
color: #3976f1;
}
}
.search-result {
margin-top: 30rpx;
.result-list {
.result-item {
display: flex;
align-items: center;
background: #fff;
border-radius: 16rpx;
box-sizing: border-box;
padding: 25rpx 20rpx;
margin-bottom: 20rpx;
.item-icon {
height: 82rpx;
width: 82rpx;
image {
height: 100%;
width: 100%;
}
}
.item-data {
flex: 1;
box-sizing: border-box;
padding-left: 20rpx;
.data-title {
font-size: 36rpx;
font-weight: 550;
color: #34373b;
}
.data-subtitle {
margin-top: 10rpx;
font-size: 28rpx;
font-weight: 400;
color: #b0b4bb;
}
}
}
}
}
}
</style>

@ -0,0 +1,109 @@
<template>
<view class="container-main">
<view class="text-top"
>辽宁省商业厅辽宁省财政厅关于印发推进全省早餐工程建设的实施意见的通知</view
>
<view class="text-middle">
<text class="text-middle-top">辽宁省商业厅辽宁省财务厅</text>
<text class="text-middle-bottom">辽商联发[2008]27 2008-09-24</text>
</view>
<view class="text-bottom">
<view class="text-headline"> 各市商业局()财政局: </view>
<view class="text-details">
为推进全省早餐工程建设, 更好地满足城市居民的早餐消费需求,
现将推进全省早餐工程建设的实施意见 印发给你们,请结合当地实际情况,
认真贯彻落实
</view>
<view class="text-base">
<view>辽宁省商业厅</view>
<view> 辽宁省财务厅</view>
<view>二OO八年十二月二十四日</view>
</view>
</view>
</view>
</template>
<script>
import fixedButton from "@/components/fixedButton/fixedButton.vue";
export default {
components: {
fixedButton,
},
data() {
return {};
},
methods: {},
};
</script>
<style lang="scss" scoped>
uni-page-body,
page {
background: rgba(245, 247, 250, 1);
}
.container-main {
margin: 20rpx 0 0 0;
padding: 49rpx 64rpx 0 64rpx;
background-color: #ffffff;
.text-top {
margin: 0 0 30rpx 0;
font-size: 40rpx;
font-family: PingFang SC-中粗体, PingFang SC;
font-weight: bold;
color: #34373b;
text-align: center;
line-height: 54rpx;
}
.text-middle {
width: 622rpx;
height: 96rpx;
margin: 0 0 40rpx 0;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
.text-middle-top,
.text-middle-bottom {
font-size: 28rpx;
font-family: PingFang SC-常规体, PingFang SC;
font-weight: 400;
color: #b0b4bb;
}
}
.text-bottom {
padding: 40rpx 0 0 0;
border-top: 1rpx solid #dce3ec;
.text-headline {
margin: 0 0 21rpx 0;
font-size: 32rpx;
font-family: PingFang SC-常规体, PingFang SC;
font-weight: 400;
color: #34373b;
}
.text-details {
margin: 0 0 121rpx 0;
font-size: 32rpx;
font-family: PingFang SC-常规体, PingFang SC;
font-weight: 400;
color: #34373b;
line-height: 60rpx;
text-indent: 2em;
}
.text-base {
font-size: 28rpx;
font-family: PingFang SC-常规体, PingFang SC;
font-weight: 400;
color: #34373b;
line-height: 54rpx;
text-align: right;
}
}
}
</style>

@ -0,0 +1,110 @@
<template>
<view class="container-main">
<view
class="row-item"
@click="clickbusi(item)"
v-for="item in pathData"
:key="item.name"
>
<view class="row-icon">
<image :src="baseImgUrl + 'liao-ning/icon_qyzhcx.png'" mode=""></image>
</view>
<view class="row-name">{{ item.name }}</view>
<view class="row-arrow">
<u-icon name="arrow-right" color="#D5D5D5"></u-icon>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
baseImgUrl: getApp().globalData.config.iamgeBaseUrl,
pathData: [
{
name: "连锁经营政策指南",
type: "2",
litiletype: "8",
},
{
name: "中央厨房政策指南",
type: "2",
litiletype: "9",
},
{
name: "企业变更政策指南",
type: "2",
litiletype: "10",
},
{
name: "企业扶持政策指南",
type: "2",
litiletype: "11",
},
{
name: "知识产权申请指南",
type: "2",
litiletype: "12",
},
{
name: "食品安全责任险申请指南",
type: "2",
litiletype: "13",
},
{
name: "生产经营许可申请指南",
type: "2",
litiletype: "14",
},
],
};
},
methods: {
clickbusi(e) {
console.log(e);
uni.navigateTo({
url: `/sub-public/oldman-teach/oldman-teach?type=${e.type}&litiletype=${e.litiletype}&title=${e.name}`,
});
},
},
};
</script>
<style lang="scss" scoped>
.container-main {
box-sizing: border-box;
padding: 20rpx;
.row-item {
border-radius: 16rpx;
background-color: #fff;
box-sizing: border-box;
padding: 20rpx;
margin-bottom: 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
.row-icon {
width: 82rpx;
height: 82rpx;
image {
height: 100%;
width: 100%;
}
}
.row-name {
flex: 1;
box-sizing: border-box;
padding-left: 20rpx;
font-size: 38rpx;
font-weight: normal;
color: #34373b;
}
}
}
</style>

@ -0,0 +1,248 @@
<template>
<view class="container-main">
<view class="type-tree">
<view class="tree-item" v-for="(item,index) in treeList" :key="index"
:class="currenIndex == index ? 'activeTree' : '' " @click="clickTree(index)">
{{item.name}}
</view>
</view>
<view class="data-rows">
<u-sticky>
<view class="header-search">
<u-icon name="search" size="35" color="#9DA2AB"></u-icon>
<u-input v-model="keyword" placeholder="请输入关键字"
:custom-style="{marginLeft:'20rpx',fontSize:'30rpx'}" :height="40" :clearable="false" />
<view class="search-submit" @click="searchData()"></view>
</view>
</u-sticky>
<scroll-view scroll-y class="scrollView" @scrolltolower="onreachBottom">
<view class="list-item" v-for="item in list" :key="item.id" @click="getInfo(item)">
<view class="item-data">
<view class="data-title">{{ item.title}}</view>
<view class="data-subtitle">{{item.department}}</view>
</view>
<view class="item-icon">
<u-icon name="arrow-right" size="35" color="#DCE3EC"></u-icon>
</view>
</view>
<u-loadmore :status="status" :load-text="loadText" margin-top="20" />
</scroll-view>
</view>
</view>
</template>
<script>
import {
getEssayList,
getinfo
} from "@/api/shianliaoning/essay.js";
export default {
data() {
return {
keyword: '',
status: 'nomore',
loadText: {
loading: '努力加载中',
nomore: '已经到底了~'
},
list: [],
total: 0,
queryParams: {
type: 2,
pageNum: 1,
pageSize: 10,
},
currenIndex: null,
treeList: [{
name: '连锁经营政策指南',
litiletype: 8
},
{
name: '中央厨房政策指南',
litiletype: 9
},
{
name: '企业变更政策指南',
litiletype: 10
},
{
name: '企业扶持政策指南',
litiletype: 11
},
{
name: '知识产权申请指南',
litiletype: 12
},
{
name: '食品安全责任险申请指南',
litiletype: 13
},
{
name: '生产经营许可申请指南',
litiletype: 14
}
],
};
},
onLoad() {
//
this.clickTree(0)
},
methods: {
//
getInfo(item) {
uni.navigateTo({
url: `/sub-public/oldman-teach/info?id=${item.id}`,
});
},
//
searchData() {
this.reset()
this.queryParams.litiletype = this.treeList[this.currenIndex].litiletype
this.queryParams.title = this.keyword
this.getList()
},
//
onreachBottom() {
if (this.queryParams.pageNum < this.total) {
if (this.status == 'loading') return
this.queryParams.pageNum = this.queryParams.pageNum + 1;
this.getList()
}
},
//
clickTree(index) {
if (this.currenIndex == index) return
this.keyword = ''
this.reset()
this.queryParams.litiletype = this.treeList[index].litiletype
this.getList()
this.currenIndex = index
},
// /
getList() {
this.status = 'loading'
getEssayList(this.queryParams).then((res) => {
this.filerList(res)
});
},
filerList(res) {
this.list = [...this.list, ...res.rows];
this.total = Math.ceil(res.total / this.queryParams.pageSize) || 1;
console.log(this.total, '可以多少页')
this.status = 'nomore'
},
//
reset() {
this.list = []
this.total = 0
this.queryParams = {
type: 2,
pageNum: 1,
pageSize: 10,
}
},
},
}
</script>
<style lang="scss" scoped>
page {
height: 100%;
}
.container-main {
height: 100%;
display: flex;
align-items: center;
&>view {
height: 100%;
}
.type-tree {
background: #F5F7FA;
.tree-item {
width: 180rpx;
box-sizing: border-box;
padding: 20rpx;
font-size: 28rpx;
font-weight: 400;
color: #34373B;
}
.activeTree {
background: #fff;
color: #3976F1;
}
}
.data-rows {
box-sizing: border-box;
padding: 20rpx;
flex: 1;
background: #fff;
.header-search {
box-sizing: border-box;
padding: 20rpx;
border-radius: 16rpx;
border: 1px solid #DCE3EC;
display: flex;
align-items: center;
justify-content: space-between;
.search-submit {
font-size: 32rpx;
font-weight: 500;
color: #3976F1;
}
}
.scrollView {
height: 94.5%;
.list-item {
display: flex;
align-items: center;
justify-content: space-between;
min-height: 160rpx;
border-bottom: 1px solid #DCE3EC;
box-sizing: border-box;
padding: 20rpx 0;
.item-data {
flex: 1;
.data-title {
font-size: 34rpx;
font-weight: normal;
color: #34373B;
}
.data-subtitle {
width: 500rpx;
margin-top: 20rpx;
font-size: 32rpx;
font-weight: 400;
color: #B0B4BB;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.item-icon {
width: 40rpx;
}
}
}
}
}
</style>

@ -0,0 +1,130 @@
<template>
<u-loadmore v-if="flag" status="loading" :load-text="loadText" color="#C4CCD8" font-size="24" />
<view v-else class="container-main">
<view class="food-list" v-for="(item,index) in foodList" :key="index" @click="goPath(item)">
<view class="food-left">
<view class="image">
<!-- <image :src="item.image" mode=""></image> -->
<image :src="baseImgUrl + 'liao-ning/hot3.png'" mode=""></image>
</view>
<view class="text">
<text class="title">{{item.productName}}</text>
<uni-rate allow-half :value="item.grade" :size="18" color="#C4CCD8" activeColor="#ED7043"
readonly />
<text class="rate" :class="item.grade< 4 ? 'rad':''">总评分{{item.grade}}</text>
</view>
</view>
<u-icon name="arrow-right" color="#D5D5D5"></u-icon>
</view>
<u-loadmore :status="status" :load-text="loadText" color="#C4CCD8" font-size="24" />
</view>
</template>
<script>
import {
gardeFood
} from "@/api/shianliaoning/foodMsg.js";
//
// import {
// getAllFoodList
// } from "@/api/shianliaoning/enterpriseSEARCH.js";
//
import {foodAllPJ} from "@/api/shianliaoning/enterpriseSEARCH.js"
export default {
data() {
return {
baseImgUrl: getApp().globalData.config.iamgeBaseUrl,
foodList: [],
loadText: {
nomore: "已经到底了~",
loading: "努力加载中",
},
status: "",
flag: true,
from: {
// pageNum: 1,
// pageSize: 10,
// uniscid: "",
},
};
},
onLoad() {
this.productList();
},
methods: {
//
productList() {
foodAllPJ(this.from).then((res) => {
console.log(res);
this.foodList = res.rows
this.flag = false
// console.log(this.foodList);
});
},
goPath(item) {
console.log(item);
uni.navigateTo({
url: `/sub-enterprise/company-eval/company-eval?productName=${item.productName}&productId=${item.productId}&gradeNum=${item.grade}`,
});
},
},
};
</script>
<style lang="scss" scoped>
.container-main {
padding: 20rpx;
box-sizing: border-box;
display: grid;
grid-template-columns: 1fr;
grid-row-gap: 30rpx;
.food-list {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
box-sizing: border-box;
background-color: #fff;
border-radius: 30rpx;
.food-left {
display: flex;
.image {
margin-right: 30rpx;
image {
width: 200rpx;
height: 150rpx;
border-radius: 20rpx;
}
}
.text {
display: flex;
flex-direction: column;
justify-content: space-between;
.title {
font-size: 34rpx;
font-weight: 600;
color: #34373b;
line-height: 40rpx;
}
.rate {
font-size: 28rpx;
font-weight: 400;
color: #02d1a6;
}
.rad {
color: #f76359;
}
}
}
}
}
</style>

@ -0,0 +1,146 @@
<template>
<view class="container-main">
<view class="data-main">
<view class="data-rows" style="padding-top: 0">
<view class="data-lable">保险公司:</view>
<view class="data-value">{{list.company_name}}</view>
</view>
<view class="data-rows">
<view class="data-lable">产品名称:</view>
<view class="data-value">{{list.productName}}</view>
</view>
<view class="data-rows">
<view class="data-lable">适用类别:</view>
<view class="data-value">{{list.appliacateType}}</view>
</view>
<view class="data-rows">
<view class="data-lable">发布时间</view>
<view class="data-value">{{list.releasetime}}</view>
</view>
<view class="data-rows">
<view class="data-lable">产品简介:</view>
<view class="data-value">{{list.introtuction}}</view>
</view>
<view class="data-rows">
<view class="data-lable">年保险费</view>
<view class="data-value data-value-color">{{list.premium}}</view>
</view>
<view class="data-rows">
<view class="data-lable">保险责任</view>
<view class="data-value">{{list.insuranceLiability}}</view>
</view>
<view class="data-rows" style="align-items: flex-start">
<view class="data-lable">责任限额</view>
<view class="data-value">
{{list.norm}}</view>
</view>
<view class="data-rows">
<view class="data-lable">免赔额</view>
<view class="data-value">{{list.deductibleExcess}}</view>
</view>
<view class="data-rows">
<view class="data-lable">附加条款</view>
<view class="data-value">{{list.additionalTerms}}</view>
</view>
<view class="data-rows" style="align-items: flex-start">
<view class="data-lable">投保所需资料 </view>
<view class="data-value">
{{list.information}}
</view>
</view>
<view class="data-rows">
<view class="data-lable" style="margin-bottom: 20rpx">产品网址</view>
<view class="data-value data-img">
{{list.productWebsite}}
</view>
</view>
</view>
</view>
</template>
<script>
import {
getMessage
} from '@/api/shianliaoning/PRODUCT.js'
export default {
data() {
return {
list: {
company_name: ''
}
};
},
onLoad(option) {
getMessage(option.id).then((res) => {
console.log(res);
this.list = res.data
})
},
};
</script>
<style lang="scss" scoped>
.container-main {
box-sizing: border-box;
padding: 20rpx;
.data-main {
min-height: 900rpx;
border-radius: 16rpx;
background: #fff;
box-sizing: border-box;
}
.data-rows {
display: flex;
border-bottom: 1rpx solid #ecf1f7;
box-sizing: border-box;
padding: 30rpx 0;
.data-lable {
width: 180rpx;
margin: 0 40rpx 0 0;
text-align: right;
font-size: 30rpx;
font-weight: 400;
color: #34373b;
}
.data-lable-tow {
width: 250rpx;
// text-align: right;
}
.data-value {
flex: 1;
font-size: 30rpx;
font-weight: 400;
color: #616367;
}
.data-font {
padding: 0 0 0 100rpx;
.data-font-top,
.data-font-cont,
.data-font-bottom {
margin: 0 0 20rpx 0;
}
}
.data-value-color {
color: #86cd78;
}
.data-img {
width: 100%;
image {
width: 50%;
height: 388rpx;
border-radius: 16rpx;
}
}
}
}
</style>

@ -0,0 +1,290 @@
<template>
<view class="container-main">
<uni-forms :model="form" ref="uForm" :rules="rules" label-width="150rpx">
<uni-forms-item label="主体名称" name="enterpriseName">
<u-input v-model="form.enterpriseName" />
</uni-forms-item>
<uni-forms-item label="统一信用代码" name="code">
<u-input v-model="form.code" />
</uni-forms-item>
<uni-forms-item label="经营性质" name="manageproperty">
<u-input v-model="form.manageproperty" />
</uni-forms-item>
<uni-forms-item label="经营类型" name="manageType">
<u-input v-model="form.manageType" />
</uni-forms-item>
<uni-forms-item label="投保区域范围" name="coverageArea">
<u-input v-model="form.coverageArea" @click="show=true" placeholder="请选择区域" disabled />
</uni-forms-item>
<uni-forms-item label="年销售额" name="annualSales">
<u-input v-model="form.annualSales" />
</uni-forms-item>
<uni-forms-item label="所选保险公司" >
<u-input disabled v-model="form.companyName" disabled />
</uni-forms-item>
<uni-forms-item label="所选保险产品" >
<u-input disabled v-model="form.productName" disabled />
</uni-forms-item>
<uni-forms-item label="保险期间" name="insurancePeriod">
<view>
<uni-datetime-picker type="date" v-model="form.effectuateTime" placeholder="开始日期" />
</view>
<view>-</view>
<view>
<uni-datetime-picker type="date" v-model="form.insurancePeriod" placeholder="结束日期" />
</view>
</uni-forms-item>
<uni-forms-item label="保费合计" name="totalPremium">
<u-input v-model="form.totalPremium" />
</uni-forms-item>
<uni-forms-item label="投保时间">
<uni-datetime-picker type="date" v-model="form.insureTime" disabled />
</uni-forms-item>
<uni-forms-item label="投保状态" name="status">
<u-input v-model="form.status" @click="statusFlag = true" placeholder="请选择投保状态" disabled />
</uni-forms-item>
<uni-forms-item label="生效时间" name="effectuateTime">
<uni-datetime-picker type="date" v-model="form.effectuateTime" />
</uni-forms-item>
<uni-forms-item label="投保单附件">
<u-upload :action="action" max-count="3" @on-success="uploadSuccess" width="160" height="170">
</u-upload>
</uni-forms-item>
</uni-forms>
<u-select v-model="show" :list="citylist" @confirm="clickConfirm" value-name="id" label-name="cityName">
</u-select>
<u-select v-model="statusFlag" :list="statusList" @confirm="clickStatus">
</u-select>
<view class="button-text" @click="submit"></view>
</view>
</template>
<script>
import moment from "@/utils/moment.min.js";
//
import {
addInsure,
cityList
} from "@/api/shianliaoning/insure.js";
import config from '@/config.js'
import {
from
} from "form-data";
export default {
components: {},
data() {
return {
//
statusFlag: false,
statusList: [{
label: '生效中',
value: 1,
},
{
label: '未生效',
value: 2,
},
{
label: '已过期',
value: 3,
}
],
//
action: config.baseUrl + "/common/uploadMinioonfile", //
//
fileList: [],
show: false,
form: {
enterpriseName: '', //
code: '', //
manageproperty: '', //
manageType: '', //
coverageArea: '', //
annualSales: '', //
companyName: '', //
productName: '', //
insurancePeriod: '', //
totalPremium: '', //
insureTime: '', //
status: '', //
effectuateTime: '', //
//
appendix: '',
},
//3.10 10:30
//
transmit: {},
//
startFlag: false,
//
citylist: [],
//
rules: {
//
enterpriseName: {
rules: [{
required: true,
errorMessage: '主体名称不能为空',
// blurchange
trigger: ['blur'],
}, ],
},
code: {
rules: [{
required: true,
errorMessage: '统一社会信用代码不能为空',
// blurchange
trigger: ['blur'],
}, ],
},
manageproperty: {
rules: [{
required: true,
errorMessage: '经营性质不能为空',
// blurchange
trigger: ['blur'],
}, ],
},
manageType: {
rules: [{
required: true,
errorMessage: '经营类型不能为空',
// blurchange
trigger: ['blur'],
}, ],
},
coverageArea: {
rules: [{
required: true,
errorMessage: '请选择投保区域范围',
// blurchange
trigger: ['blur'],
}, ],
},
annualSales: {
rules: [{
required: true,
errorMessage: '年销售额不能为空',
// blurchange
trigger: ['blur'],
}, ],
},
insurancePeriod: {
rules: [{
required: true,
errorMessage: '请选择保险期间',
// blurchange
trigger: ['blur'],
}, ],
},
totalPremium: {
rules: [{
required: true,
errorMessage: '保费合计不能为空',
// blurchange
trigger: ['blur'],
}, ],
},
status: {
rules: [{
required: true,
errorMessage: '请选择投保状态',
// blurchange
trigger: ['blur'],
}, ],
},
effectuateTime: {
rules: [{
required: true,
errorMessage: '请选择生效时间',
// blurchange
trigger: ['blur'],
}, ],
},
}
};
},
onLoad(option) {
this.transmit = option
this.form.companyName = option.result
this.form.productName = option.msg
this.form.insureTime = new Date()
cityList().then((res) => {
this.citylist = res.rows
})
},
onReady() {
// onReady
this.$refs.uForm.setRules(this.rules)
},
methods: {
//
clickStatus(e) {
this.form.status = e[0].label
},
//
clickConfirm(e) {
console.log(e);
this.form.coverageArea = e[0].label
},
//
uploadSuccess(e) {
url = e.url.split("/");
let url =
url[url.length - 4] +
"/" +
url[url.length - 3] +
"/" +
url[url.length - 2] +
"/" +
url[url.length - 1];
this.fileList.push(
url
)
},
//
submit() {
console.log(this.form);
this.$refs.uForm.validate().then(msg => {
this.form.appendix = this.fileList.toString()
this.form.effectuateTime = new Date(this.form.effectuateTime)
this.form.insurancePeriod = new Date(this.form.insurancePeriod)
addInsure(this.form).then(res => {
uni.showToast({
title: '提交成功'
})
setTimeout(() => {
uni.reLaunch({
url: '/sub-enterprise/food-toubao/food-toubao'
})
}, 500)
})
})
},
},
}
</script>
<style lang="scss" scoped>
.container-main {
background-color: #fff;
box-sizing: border-box;
padding: 20rpx 40rpx;
}
.button-text {
margin: 0 auto;
width: 508rpx;
height: 88rpx;
border-radius: 90rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 36rpx;
font-weight: 400;
background: linear-gradient(90deg, #3976f1 0%, #3ca0f6 100%);
color: #ffffff;
font-weight: 400;
}
</style>

@ -0,0 +1,290 @@
<template>
<view class="container-main">
<!-- <u-sticky :offset-top="0">
<view class="search-multiple">
<view class="multiple-item" v-for="(item,index) in multipleList" :key="index">
<view class="item-child" @click="clickMultiple(item,index)"
:class="item.active == true ? 'multipleActive' : '' ">
<text>{{item.name}}</text>
</view>
</view>
</view>
</u-sticky> -->
<view class="search-main">
<view class="search-input">
<view class="input-icon">
<image :src="baseImgUrl + 'liao-ning/icon_search.png'" mode=""></image>
</view>
<view class="input-middle">
<u-input v-model="queryParams.checkName" type="text"
placeholder-style="color:#C4CCD8;font-size:30rpx" :border="false" placeholder="请输入关键字搜索" />
</view>
<view class="input-btn" @click="searchList()"></view>
</view>
<view class="search-result">
<view class="result-total">为您搜索到{{ allNum }}条结果</view>
<view class="result-list">
<view class="result-item" v-for="item in list" :key="item.id" @click="getInfo(item.id)">
<view class="item-icon">
<image :src="baseImgUrl + 'liao-ning/icon_qyzhcx.png'" mode=""></image>
</view>
<view class="item-data">
<view class="data-title">{{ item.checkName }}</view>
<view class="data-subtitle">{{ item.address }}</view>
</view>
<view class="item-arrow">
<u-icon name="arrow-right" color="#D5D5D5"></u-icon>
</view>
</view>
<u-loadmore :status="status" :load-text="loadText" />
</view>
</view>
</view>
</view>
</template>
<script>
import {
getEssayList
} from "@/api/shianliaoning/check";
export default {
data() {
return {
baseImgUrl: getApp().globalData.config.iamgeBaseUrl,
keyWord: "",
status: "nomore",
loadText: {
loading: "努力加载中",
nomore: "已经到底了~",
},
activeList: [],
list: [],
//
allNum:0,
//
total: 0,
loading: false,
queryParams: {
service: "",
checkName: "",
pageNum: 1,
pageSize: 10,
},
multipleList: [{
name: "乳制品",
active: false,
},
{
name: "冷冻饮品",
active: false,
},
{
name: "焙烤食品",
active: false,
},
{
name: "肉制品",
active: false,
},
{
name: "饮料类",
active: false,
},
],
};
},
onLoad() {
this.getList();
},
onReachBottom(e) {
if (this.queryParams.pageNum < this.total) {
if (this.loading == true) {
this.status = "nomore";
return;
}
this.queryParams.pageNum = this.queryParams.pageNum + 1;
this.getList();
}
},
methods: {
//
reset() {
this.list = [];
this.total = 0;
this.queryParams.pageNum = 1;
this.queryParams.pageSize = 10;
},
searchList() {
this.reset();
this.getList();
},
//list
getList() {
this.loading = true;
this.status = "loading";
getEssayList(this.queryParams).then((res) => {
console.log(res);
this.list = [...this.list, ...res.rows];
this.total = Math.ceil(res.total / this.queryParams.pageSize) || 1;
this.status = "nomore";
this.loading = false;
this.allNum = res.total
});
},
clickMultiple(item, index) {
this.reset();
if (this.multipleList[index].active == true) {
this.activeList.splice(index, 1);
this.queryParams.queryParams = this.activeList.toString();
this.getList();
this.multipleList[index].active = false;
return;
}
this.activeList.push(item.name);
this.queryParams.queryParams = this.activeList.toString();
this.getList();
this.multipleList[index].active = true;
},
getInfo(id) {
uni.navigateTo({
url: `/sub-enterprise/organ-info/organ-info?id=${id}`,
});
},
},
};
</script>
<style lang="scss" scoped>
.container-main {
// background-color: #fff;
}
.search-multiple {
height: 220rpx;
background: #ffffff;
box-sizing: border-box;
padding: 30rpx 20rpx;
display: flex;
flex-wrap: wrap;
.multiple-item {
width: 25%;
height: 68rpx;
display: flex;
align-items: center;
justify-content: center;
.item-child {
width: 160rpx;
height: 68rpx;
background: #ffffff;
border-radius: 64rpx;
border: 1rpx solid #dce3ec;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
font-weight: 520;
color: #616367;
}
.multipleActive {
background: #3976f1;
color: #fff;
border: 0;
}
}
}
.search-main {
box-sizing: border-box;
padding: 20rpx;
.search-input {
display: flex;
align-items: center;
background: #fff;
box-shadow: 0px 0px 10rpx 0px rgba(57, 118, 241, 0.0588);
border-radius: 16rpx;
box-sizing: border-box;
padding: 10rpx 25rpx;
.input-icon {
height: 30rpx;
width: 30rpx;
margin-right: 20rpx;
image {
height: 100%;
width: 100%;
}
}
.input-middle {
flex: 1;
}
.input-btn {
font-size: 32rpx;
font-weight: 500;
color: #3976f1;
}
}
.search-result {
margin-top: 30rpx;
.result-total {
margin-bottom: 20rpx;
font-size: 24rpx;
font-weight: 500;
color: #c4ccd8;
}
.result-list {
.result-item {
display: flex;
align-items: center;
background: #fff;
border-radius: 16rpx;
box-sizing: border-box;
padding: 25rpx 20rpx;
margin-bottom: 20rpx;
.item-icon {
height: 82rpx;
width: 82rpx;
image {
height: 100%;
width: 100%;
}
}
.item-data {
flex: 1;
box-sizing: border-box;
padding-left: 20rpx;
.data-title {
font-size: 34rpx;
font-weight: 550;
color: #34373b;
}
.data-subtitle {
margin-top: 10rpx;
font-size: 28rpx;
font-weight: 400;
color: #b0b4bb;
overflow: hidden;
white-space: normal;
text-overflow: ellipsis;
}
}
}
}
}
}
</style>

@ -0,0 +1,21 @@
<template>
<!-- <web-view :src="url"></web-view> -->
<iframe :src="url" width="100%" height="100%" frameborder="0"></iframe>
</template>
<script>
export default {
data() {
return {
url: '',
}
},
onLoad(option) {
this.url = option.url
}
}
</script>
<style>
</style>

@ -0,0 +1,157 @@
<template>
<u-loadmore v-if="flag" status="loading" :load-text="loadText" color="#C4CCD8" font-size="24" />
<view v-else class="container-main">
<view class="data-main">
<view class="data-rows" style="padding-top: 0">
<view class="data-lable">主体名称:</view>
<view class="data-value">{{list.enterpriseName}}</view>
</view>
<view class="data-rows">
<view class="data-lable">信用代码:</view>
<view class="data-value">{{list.code}}</view>
</view>
<view class="data-rows">
<view class="data-lable">经营性质:</view>
<view class="data-value">{{list.manageproperty}}</view>
</view>
<view class="data-rows">
<view class="data-lable">经营类型:</view>
<view class="data-value">{{list.manageType}}</view>
</view>
<view class="data-rows">
<view class="data-lable">产品名称:</view>
<view class="data-value">{{list.productName}}</view>
</view>
<view class="data-rows">
<view class="data-lable">保费合计</view>
<view class="data-value data-value-color">{{list.totalPremium}}</view>
</view>
<view class="data-rows">
<view class="data-lable">投保状态</view>
<view class="data-value">{{list.status}}</view>
</view>
<view class="data-rows" style="align-items: flex-start">
<view class="data-lable">保险期间</view>
<view class="data-value">
{{ list.insurancePeriod}}{{ list.insurancePeriodEnd}}
</view>
</view>
<view class="data-rows"
style="flex-direction: column; align-items: flex-start;border: 0; padding-bottom: 0;">
<view class="data-lable" style="margin-bottom: 20rpx">投保附件</view>
<view class="data-value data-img">
<view class="u-line-1" style="color: rgb(41, 121, 255);font-size: 24rpx" @click="showFile(item)"
v-for="(item,index) in list.appendix" :key="index">
{{item}}
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
getInsure
} from '@/api/shianliaoning/insure.js'
import config from '@/config.js'
export default {
data() {
return {
list: {
enterpriseName: null
},
baseUrl: config.baseUrl,
form: {},
flag: true,
loadText: {
nomore: '已经到底了~',
loading: '努力加载中'
},
};
},
//
onLoad(option) {
this.getInfo(option.id)
},
methods: {
showFile(url) {
uni.setClipboardData({
data: url,
showToast: false,
success: () => {
uni.showToast({
title: '已复制,请前往浏览器打开。',
icon: 'none'
})
}
})
// uni.navigateTo({
// url: `/sub-enterprise/toubao-xiangqing/toubao-file?url=${url}`
// })
},
//
viewIamge(url, index) {
uni.previewImage({
current: index,
urls: url.split(','),
})
},
//
getInfo(id) {
getInsure(id).then(res => {
this.list = res.data
this.list.appendix = this.list.appendix.split(',')
this.flag = false
})
},
}
};
</script>
<style lang="scss" scoped>
.container-main {
box-sizing: border-box;
padding: 20rpx;
.data-main {
min-height: 900rpx;
border-radius: 16rpx;
background: #fff;
box-sizing: border-box;
padding: 30rpx;
}
.data-rows {
display: flex;
align-items: center;
border-bottom: 1rpx solid #ecf1f7;
box-sizing: border-box;
padding: 30rpx 0;
.data-lable {
width: 150rpx;
font-size: 30rpx;
font-weight: 400;
color: #34373B;
}
.data-value {
flex: 1;
font-size: 30rpx;
font-weight: 400;
color: #616367;
}
.data-value-color {
color: #86cd78;
}
.data-img {
width: 100%;
}
}
}
</style>

@ -0,0 +1,29 @@
<template>
<view class="container-main">
<!-- <web-view src="https://testiapp.etaiping.com:7443/weshop/dfs/lnsz/SN05/index#/"></web-view> -->
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
baseImgUrl: getApp().globalData.config.iamgeBaseUrl,
};
},
onLoad() {
console.log(uni.getStorageSync("insure_enterinfo"));
},
methods: {
},
};
</script>
<style lang="scss" scoped>
.main{
height: calc(100vh - 100rpx);
width: 99%;
}
</style>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save