作者 刘朕

代码更新

要显示太多修改。

为保证性能只显示 27 of 27+ 个文件。

{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
"version": "0.0",
"configurations": [{
"app-plus" :
{
"launchtype" : "local"
},
"default" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
"version": "0.0",
"configurations": [{
"app-plus" :
{
"launchtype" : "local"
},
"default" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}
... ...
<script>
export default {
onLaunch: function() {
// console.log('App Launch')
// uni.setTabBarBadge({
// text: '2',
// index: 1
// })
},
onShow: function() {
// console.log('App Show')
},
onHide: function() {
// console.log('App Hide')
}
}
</script>
<style lang="scss">
/*每个页面公共css */
@import "uview-ui/index.scss";
@import '@/style/uViewStyle.scss';
@import '@/style/init.scss'
</style>
<script>
export default {
onLaunch: function() {
// console.log('App Launch')
// uni.setTabBarBadge({
// text: '2',
// index: 1
// })
},
onShow: function() {
// console.log('App Show')
},
onHide: function() {
// console.log('App Hide')
}
}
</script>
<style lang="scss">
/*每个页面公共css */
@import "uview-ui/index.scss";
@import '@/style/uViewStyle.scss';
@import '@/style/init.scss'
</style>
... ...
const config = {
baseUrl: 'https://api.51zhengdao.cn',
// baseUrl: 'http://zhengdao.tvue.brofirst.cn/',
// #ifdef H5
// baseUrl: '/dpc' //H5下将地址修改为/dpc
// #endif
}
// 建议:打开下面注释,方便根据环境,自动设定服务地址
if (process.env.NODE_ENV === 'development') {
}
export default config;
const config = {
baseUrl: 'https://api.51zhengdao.cn',
// baseUrl: 'http://zhengdao.tvue.brofirst.cn/',
// #ifdef H5
// baseUrl: '/dpc' //H5下将地址修改为/dpc
// #endif
}
// 建议:打开下面注释,方便根据环境,自动设定服务地址
if (process.env.NODE_ENV === 'development') {
}
export default config;
... ...
export default {
'1001001': '1001001',
'1001002': '请重新登录',
'1001004': '未登录',
'1001017': '未注册',
'1001005': '登录账户不存在 ',
'1001006': '登录账户密码错误',
'1001007': 'code 为空',
'1001008': '手机号不能为空',
'1001011': '注册账户已经存在,请更换其他账户',
'1001015': '操作失败',
'1001016': '验证失败',
'1001018': 'token令牌失效',
'1001019': 'systemcode失效',
'1001020': 'platform失效',
'1001021': '身份证号验证失败,请输入正确的身份证号',
'1001022': '当前传递的组织代码编号,未找到任何数据',
'default': '系统未知错误,请反馈给管理员'
}
export default {
'1001001': '1001001',
'1001002': '请重新登录',
'1001004': '未登录',
'1001017': '未注册',
'1001005': '登录账户不存在 ',
'1001006': '登录账户密码错误',
'1001007': 'code 为空',
'1001008': '手机号不能为空',
'1001011': '注册账户已经存在,请更换其他账户',
'1001015': '操作失败',
'1001016': '验证失败',
'1001018': 'token令牌失效',
'1001019': 'systemcode失效',
'1001020': 'platform失效',
'1001021': '身份证号验证失败,请输入正确的身份证号',
'1001022': '当前传递的组织代码编号,未找到任何数据',
'default': '系统未知错误,请反馈给管理员'
}
... ...
const http = uni.$u.http
const platform = '162881648838805'
export const api = {
// 账户注册
register: (params = {}, header = {}) => http.post('/api/member/register', params, header = {
header: {
platform
},
params: {
...header
},
custom: {
auth: false
},
}),
// 账户忘记密码
forget: (params = {}, header = {}) => http.post('api/member/forget', params, header = {
header: {
platform
},
params: {
...header.params
},
custom: {
auth: false
},
}),
// 获取手机验证码
loginCd: (params = {}, header = {}) => http.post('/SMS', params, header = {
header: {
platform
},
params: {
...header
},
}),
// 登录
signIn: (params = {}, header = {}) => http.post('/api/member/login', params, header = {
header: {
platform
},
params: {
...header
},
custom: {
auth: false
},
}),
// 统计
satistics: (params = {}, header = {}) => http.post('/api/satistics/task', params, header = {
header: {
platform,
...header
},
custom: {
auth: true
},
}),
// 待接受任务列表
notAccept: (params = {}, header = {}) => http.post('/api/task/not/accept/list', params, header = {
header: {
systemcode: header.systemcode
},
params: {
...header.params
},
custom: {
auth: true
},
}),
// 点检工单列表
spotList: (params = {}, header = {}) => http.post('/api/spot/list', params, header = {
header: {
systemcode: header.systemcode
},
params: {
...header.params
},
custom: {
auth: true
},
}),
// 登录会员账户信息
account: (params = {}, header = {}) => http.post('/api/member/account', params, header = {
header: {},
custom: {
auth: true
},
}),
// 会员账户信息保存
accountSave: (params = {}, header = {}) => http.post('/api/member/account/save', params, header = {
params: {
...header
},
custom: {
auth: true
},
}),
// 当前绑定公司列表
bindCompany: (params = {}, header = {}) => http.post('/api/member/company/list', params, header = {
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
// 当前绑定公司岗位列表
bindDeptList: (params = {}, header = {}) => http.post('/api/member/company/dept/list', params, header = {
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
// 人员岗位解绑
unbind: (params = {}, header = {}) => http.post('/api/member/company/dept/unbind', params, header = {
params: {
...header.params
},
custom: {
auth: true
},
}),
// 工作台扫描二维码绑定岗位保存
deptDind: (params = {}, header = {}) => http.post('/api/member/dept/bind', params, header = {
params: {
...header.params
},
custom: {
auth: true
},
}),
// 接受任务列表(执行中的任务)(同时包含审核未成功的)
inExecution: (params = {}, header = {}) => http.post('/api/task/accept/list', params, header = {
params: {
...header.params
},
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
// 任务完毕列表
finishList: (params = {}, header = {}) => http.post('/api/task/finish/list', params, header = {
params: {
...header.params
},
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
// 消息列表
messageList: (params = {}, header = {}) => http.post('/api/member/message/list', params, header = {
params: {
...header.params
},
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
// 系统公告列表
memberNotice: (params = {}, header = {}) => http.post('/api/member/notice/list', params, header = {
params: {
...header.params
},
// header: {
// systemcode: header.systemcode
// },
custom: {
auth: true
},
}),
// 系统公告详细
noticeDetails: (params = {}, header = {}) => http.post('/api/member/notice/details', params, header = {
params: {
...header.params
},
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
// 消息详细
messageDetails: (params = {}, header = {}) => http.post('/api/member/message/details', params, header = {
params: {
...header
},
// header: {
// systemcode: header.systemcode
// },
custom: {
auth: true
},
}),
// 消息数量
messageCount: (params = {}, header = {}) => http.post('/api/member/message/count', params, header = {
params: {
...header.params
},
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
// 样品入库(返回url内嵌打开)
applyform_rk: (url, params = {}, header = {}) => http.post(url, params, header = {
params: {
...header.params
},
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
//切换系统
memberSystem: (params = {}, header = {}) => http.post('/api/member/system/current', params, header = {
// params: {
// ...header.params
// },
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
// 任务详细信息
taskdetails: (url, params = {}, header = {}) => http.post(url, params, header = {
params: {
...header.params
},
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
htime: (params = {}) => http.get('/date'),
//获取验证图片 以及token
reqGet: (params = {}) => http.get('/code'),
//滑动或者点选验证
reqCheck: (params = {}, header = {}) => http.post('/code/check', params),
// 登录认证相关接口
login: (params = {}, header = {}) => http.post('/auth/oauth/token', params, header),
vxLogin: (params = {}, header = {}) => http.post('/auth/oauth/token?grant_type=mobile&mobile=MINI@' +
params.code + '&code=' + params.code, {}, header),
bingUser: (params = {}, header = {}) => http.post('/admin/social/bind?state=MINI&code=' + params
.code, {}, header),
smsLogin: (params = {}, header = {}) => http.post('/auth/oauth/token?mobile=SMS@' + params.mobile +
'&code=' + params.code + '&grant_type=mobile', {}, header),
sendCode: (params = {}, header = {}) => http.get('/admin/mobile/' + params.mobile, {}, header),
logout: (params = {}) => http.delete('/auth/token/logout', params),
// 字典
dictData: (params = {}) => http.get('/admin/dict/type/' + params.dictType),
// 个人信息
user: {
getUserInfo: (params = {
custom: {
auth: true
}
}) => http.get('/admin/user/info', params),
updateUserInfo: (params = {}, config = {}) => http.put('/admin/user/edit', params, config = {
...config,
custom: {
auth: true
}
}),
infoSaveBase: (params = {}) => http.post('/admin/sys/user/infoSaveBase', params),
infoSavePwd: (params = {}) => http.post('/admin/sys/user/infoSavePwd', params),
},
// 字典
dict: {
type: (params = {}) => http.get('/admin/dict/type/' + params)
},
// pigx文件管理
pigxFile: {
upload: (params = {}) => http.post('/admin/sys-file/upload')
},
// pigx 部门管理
pigxDept: {
list: (params = {
custom: {
auth: true
}
}) => http.get('/admin/dept/list', params)
},
// pigx 岗位管理
pigxPost: {
// 列出所有
list: (params = {
custom: {
auth: true
}
}) => http.get('/admin/post/list', params),
// 分页
fetchList: (params = {}) => http.get('/admin/post/page', params),
// 新增
addObj: (obj = {}) => http.post('/admin/post', obj),
// 修改
putObj: (obj = {}, header = {
}) => http.put('/admin/post', obj, header = {
...obj,
custom: {
auth: true
}
}),
// 删除
delObj: (params) => http.delete('/admin/post/' + params.id, params),
// 查询
getObj: (params) => http.get('/admin/post/' + params.id, params = {
...params,
custom: {
auth: true
}
})
},
// pigx 角色管理
pigxRole: {
// 列出所有
list: (params = {
custom: {
auth: true
}
}) => http.get('/admin/role/list', params),
// 分页
fetchList: (params = {}) => http.get('/admin/role/page', params),
// 新增
addObj: (obj = {}, header = {}) => http.post('/admin/role', obj, header),
// 修改
putObj: (obj = {}, header = {}) => http.put('/admin/role', obj, header),
// 删除
delObj: (params = {}, header = {}) => http.delete('/admin/role', params, header),
// 查询
getObj: (params = {}) => http.get('/admin/role/' + params.id, params = {
...params,
custom: {
auth: true
}
})
},
// pigx 用户管理
pigxUser: {
page: (params = {}) => http.get('/admin/user/page', params),
delete: (params = {}) => http.delete('/admin/user/' + params.id),
getOne: (params = {
custom: {
auth: true
}
}) => http.get('/admin/user/' + params.id, params),
putObj: (params = {}, config = {}) => http.put('/admin/user', params, config = {
...config,
custom: {
auth: true
}
})
},
//pigx 令牌管理
pigxToken: {
page: (params = {}) => http.get('/admin/token/page', params),
delete: (params = {}) => http.delete('/admin/token/' + params.token),
},
//pigx 日志管理
pigxLog: {
page: (params = {}) => http.get('/admin/log/page', params),
delete: (params = {}) => http.delete('/admin/log/' + params.id),
},
// pigx 工作流
pigxOA: {
queryTodos: (params = {}) => http.get('/act/task/todo', params),
queryBill: (params = {}) => http.get('/act/leave-bill/' + params.leaveId, params = {
...params,
custom: {
auth: true
}
}),
delBill: (params = {}, config = {
custom: {
auth: true
}
}) => http.delete('/act/leave-bill/' + params.leaveId, params, config),
submitBill: (params = {}) => http.get('/act/leave-bill/submit/' + params.leaveId),
queryBillPage: (params = {}) => http.get('/act/leave-bill/page', params = {
...params,
custom: {
auth: true
}
}),
getTask: (params = {}) => http.get('/act/task/' + params.taskId),
addTask: (params = {}, config = {
custom: {
auth: true
}
}) => http.post('/act/leave-bill', params, config),
doTask: (params = {}) => http.post('/act/task', params),
},
// pigx 租户管理
pigxTenant: {
// 分页
fetchList: (params = {}) => http.get('/admin/tenant/page', params),
// 新增
addObj: (obj = {}) => http.post('/admin/tenant', obj),
// 修改
putObj: (obj = {}) => http.put('/admin/tenant', obj),
// 删除
delObj: (params = {}) => http.delete('/admin/tenant', params),
// 查询
getObj: (params) => http.get('/admin/tenant/', params)
},
// pigx 参数管理
pigxParam: {
// 分页
fetchList: (params = {}) => http.get('/admin/param/page', params),
// 新增
addObj: (obj = {}) => http.post('/admin/param', obj),
// 修改
putObj: (obj = {}) => http.put('/admin/param', obj),
// 删除
delObj: (params) => http.delete('/admin/param/' + params.id),
// 查询
getObj: (params) => http.get('/admin/param/' + params.id)
}
}
const http = uni.$u.http
const platform = '162881648838805'
export const api = {
// 账户注册
register: (params = {}, header = {}) => http.post('/api/member/register', params, header = {
header: {
platform
},
params: {
...header
},
custom: {
auth: false
},
}),
// 账户忘记密码
forget: (params = {}, header = {}) => http.post('api/member/forget', params, header = {
header: {
platform
},
params: {
...header.params
},
custom: {
auth: false
},
}),
// 获取手机验证码
loginCd: (params = {}, header = {}) => http.post('/SMS', params, header = {
header: {
platform
},
params: {
...header
},
}),
// 登录
signIn: (params = {}, header = {}) => http.post('/api/member/login', params, header = {
header: {
platform
},
params: {
...header
},
custom: {
auth: false
},
}),
// 统计
satistics: (params = {}, header = {}) => http.post('/api/satistics/task', params, header = {
header: {
platform,
...header
},
custom: {
auth: true
},
}),
// 待接受任务列表
notAccept: (params = {}, header = {}) => http.post('/api/task/not/accept/list', params, header = {
header: {
systemcode: header.systemcode
},
params: {
...header.params
},
custom: {
auth: true
},
}),
// 点检工单列表
spotList: (params = {}, header = {}) => http.post('/api/spot/list', params, header = {
header: {
systemcode: header.systemcode
},
params: {
...header.params
},
custom: {
auth: true
},
}),
// 登录会员账户信息
account: (params = {}, header = {}) => http.post('/api/member/account', params, header = {
header: {},
custom: {
auth: true
},
}),
// 会员账户信息保存
accountSave: (params = {}, header = {}) => http.post('/api/member/account/save', params, header = {
params: {
...header
},
custom: {
auth: true
},
}),
// 当前绑定公司列表
bindCompany: (params = {}, header = {}) => http.post('/api/member/company/list', params, header = {
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
// 当前绑定公司岗位列表
bindDeptList: (params = {}, header = {}) => http.post('/api/member/company/dept/list', params, header = {
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
// 人员岗位解绑
unbind: (params = {}, header = {}) => http.post('/api/member/company/dept/unbind', params, header = {
params: {
...header.params
},
custom: {
auth: true
},
}),
// 工作台扫描二维码绑定岗位保存
deptDind: (params = {}, header = {}) => http.post('/api/member/dept/bind', params, header = {
params: {
...header.params
},
custom: {
auth: true
},
}),
// 接受任务列表(执行中的任务)(同时包含审核未成功的)
inExecution: (params = {}, header = {}) => http.post('/api/task/accept/list', params, header = {
params: {
...header.params
},
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
// 接收任务
taskSubFun: (params = {}, header = {}) => http.post('/api/task/accept/list', params, header = {
params: {
...header.params
},
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
// 获取保养列表
getRepair: (params = {}, header = {}) => http.post('/api/maintain/list', params, header = {
header: {
systemcode: header.systemcode
},
params: {
...header.params
},
custom: {
auth: true
},
}),
// 任务完毕列表
finishList: (params = {}, header = {}) => http.post('/api/task/finish/list', params, header = {
params: {
...header.params
},
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
// 消息列表
messageList: (params = {}, header = {}) => http.post('/api/member/message/list', params, header = {
params: {
...header.params
},
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
// 系统公告列表
memberNotice: (params = {}, header = {}) => http.post('/api/member/notice/list', params, header = {
params: {
...header.params
},
// header: {
// systemcode: header.systemcode
// },
custom: {
auth: true
},
}),
// 系统公告详细
noticeDetails: (params = {}, header = {}) => http.post('/api/member/notice/details', params, header = {
params: {
...header.params
},
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
// 消息详细
messageDetails: (params = {}, header = {}) => http.post('/api/member/message/details', params, header = {
params: {
...header
},
// header: {
// systemcode: header.systemcode
// },
custom: {
auth: true
},
}),
// 消息数量
messageCount: (params = {}, header = {}) => http.post('/api/member/message/count', params, header = {
params: {
...header.params
},
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
// 样品入库(返回url内嵌打开)
applyform_rk: (url, params = {}, header = {}) => http.post(url, params, header = {
params: {
...header.params
},
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
//切换系统
memberSystem: (params = {}, header = {}) => http.post('/api/member/system/current', params, header = {
// params: {
// ...header.params
// },
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
// 任务详细信息
taskdetails: (url, params = {}, header = {}) => http.post(url, params, header = {
params: {
...header.params
},
header: {
systemcode: header.systemcode
},
custom: {
auth: true
},
}),
htime: (params = {}) => http.get('/date'),
//获取验证图片 以及token
reqGet: (params = {}) => http.get('/code'),
//滑动或者点选验证
reqCheck: (params = {}, header = {}) => http.post('/code/check', params),
// 登录认证相关接口
login: (params = {}, header = {}) => http.post('/auth/oauth/token', params, header),
vxLogin: (params = {}, header = {}) => http.post('/auth/oauth/token?grant_type=mobile&mobile=MINI@' +
params.code + '&code=' + params.code, {}, header),
bingUser: (params = {}, header = {}) => http.post('/admin/social/bind?state=MINI&code=' + params
.code, {}, header),
smsLogin: (params = {}, header = {}) => http.post('/auth/oauth/token?mobile=SMS@' + params.mobile +
'&code=' + params.code + '&grant_type=mobile', {}, header),
sendCode: (params = {}, header = {}) => http.get('/admin/mobile/' + params.mobile, {}, header),
logout: (params = {}) => http.delete('/auth/token/logout', params),
// 字典
dictData: (params = {}) => http.get('/admin/dict/type/' + params.dictType),
// 个人信息
user: {
getUserInfo: (params = {
custom: {
auth: true
}
}) => http.get('/admin/user/info', params),
updateUserInfo: (params = {}, config = {}) => http.put('/admin/user/edit', params, config = {
...config,
custom: {
auth: true
}
}),
infoSaveBase: (params = {}) => http.post('/admin/sys/user/infoSaveBase', params),
infoSavePwd: (params = {}) => http.post('/admin/sys/user/infoSavePwd', params),
},
// 字典
dict: {
type: (params = {}) => http.get('/admin/dict/type/' + params)
},
// pigx文件管理
pigxFile: {
upload: (params = {}) => http.post('/admin/sys-file/upload')
},
// pigx 部门管理
pigxDept: {
list: (params = {
custom: {
auth: true
}
}) => http.get('/admin/dept/list', params)
},
// pigx 岗位管理
pigxPost: {
// 列出所有
list: (params = {
custom: {
auth: true
}
}) => http.get('/admin/post/list', params),
// 分页
fetchList: (params = {}) => http.get('/admin/post/page', params),
// 新增
addObj: (obj = {}) => http.post('/admin/post', obj),
// 修改
putObj: (obj = {}, header = {
}) => http.put('/admin/post', obj, header = {
...obj,
custom: {
auth: true
}
}),
// 删除
delObj: (params) => http.delete('/admin/post/' + params.id, params),
// 查询
getObj: (params) => http.get('/admin/post/' + params.id, params = {
...params,
custom: {
auth: true
}
})
},
// pigx 角色管理
pigxRole: {
// 列出所有
list: (params = {
custom: {
auth: true
}
}) => http.get('/admin/role/list', params),
// 分页
fetchList: (params = {}) => http.get('/admin/role/page', params),
// 新增
addObj: (obj = {}, header = {}) => http.post('/admin/role', obj, header),
// 修改
putObj: (obj = {}, header = {}) => http.put('/admin/role', obj, header),
// 删除
delObj: (params = {}, header = {}) => http.delete('/admin/role', params, header),
// 查询
getObj: (params = {}) => http.get('/admin/role/' + params.id, params = {
...params,
custom: {
auth: true
}
})
},
// pigx 用户管理
pigxUser: {
page: (params = {}) => http.get('/admin/user/page', params),
delete: (params = {}) => http.delete('/admin/user/' + params.id),
getOne: (params = {
custom: {
auth: true
}
}) => http.get('/admin/user/' + params.id, params),
putObj: (params = {}, config = {}) => http.put('/admin/user', params, config = {
...config,
custom: {
auth: true
}
})
},
//pigx 令牌管理
pigxToken: {
page: (params = {}) => http.get('/admin/token/page', params),
delete: (params = {}) => http.delete('/admin/token/' + params.token),
},
//pigx 日志管理
pigxLog: {
page: (params = {}) => http.get('/admin/log/page', params),
delete: (params = {}) => http.delete('/admin/log/' + params.id),
},
// pigx 工作流
pigxOA: {
queryTodos: (params = {}) => http.get('/act/task/todo', params),
queryBill: (params = {}) => http.get('/act/leave-bill/' + params.leaveId, params = {
...params,
custom: {
auth: true
}
}),
delBill: (params = {}, config = {
custom: {
auth: true
}
}) => http.delete('/act/leave-bill/' + params.leaveId, params, config),
submitBill: (params = {}) => http.get('/act/leave-bill/submit/' + params.leaveId),
queryBillPage: (params = {}) => http.get('/act/leave-bill/page', params = {
...params,
custom: {
auth: true
}
}),
getTask: (params = {}) => http.get('/act/task/' + params.taskId),
addTask: (params = {}, config = {
custom: {
auth: true
}
}) => http.post('/act/leave-bill', params, config),
doTask: (params = {}) => http.post('/act/task', params),
},
// pigx 租户管理
pigxTenant: {
// 分页
fetchList: (params = {}) => http.get('/admin/tenant/page', params),
// 新增
addObj: (obj = {}) => http.post('/admin/tenant', obj),
// 修改
putObj: (obj = {}) => http.put('/admin/tenant', obj),
// 删除
delObj: (params = {}) => http.delete('/admin/tenant', params),
// 查询
getObj: (params) => http.get('/admin/tenant/', params)
},
// pigx 参数管理
pigxParam: {
// 分页
fetchList: (params = {}) => http.get('/admin/param/page', params),
// 新增
addObj: (obj = {}) => http.post('/admin/param', obj),
// 修改
putObj: (obj = {}) => http.put('/admin/param', obj),
// 删除
delObj: (params) => http.delete('/admin/param/' + params.id),
// 查询
getObj: (params) => http.get('/admin/param/' + params.id)
}
}
... ...
// 引入配置
import config from '@/common/config.js'
// 初始化请求配置
uni.$u.http.setConfig((defaultConfig) => {
/* defaultConfig 为默认全局配置 */
// console.log(config, "config");
defaultConfig.baseURL = config.baseUrl /* 根域名 */
return defaultConfig
})
module.exports = (vm) => {
require('./requestInterceptors')(vm)
require('./responseInterceptors')(vm)
}
// 引入配置
import config from '@/common/config.js'
// 初始化请求配置
uni.$u.http.setConfig((defaultConfig) => {
/* defaultConfig 为默认全局配置 */
// console.log(config, "config");
defaultConfig.baseURL = config.baseUrl /* 根域名 */
return defaultConfig
})
module.exports = (vm) => {
require('./requestInterceptors')(vm)
require('./responseInterceptors')(vm)
}
... ...
/**
* 请求拦截
* @param {Object} http
*/
module.exports = (vm) => {
uni.$u.http.interceptors.request.use((config) => { // 可使用async await 做异步操作
// 初始化请求拦截器时,会执行此方法,此时data为undefined,赋予默认{}
console.log('初始化config ', config);
config.data = config.data || {}
if (config.custom?.auth) {
// console.log(vm.$store.state, "vm.$store.state", vm.vuex_token);
// config.header['Authorization'] = 'Bearer ' + vm.$store.state.vuex_token;
// config.header['token'] = 'Bearer ' + vm.vuex_token;
config.header['token'] = vm.vuex_token;
}
// 可以在此通过vm引用vuex中的变量,具体值在vm.$store.state中
// console.log(vm.$store.state);
return config
}, (config) => // 可使用async await 做异步操作
Promise.reject(config))
}
/**
* 请求拦截
* @param {Object} http
*/
module.exports = (vm) => {
uni.$u.http.interceptors.request.use((config) => { // 可使用async await 做异步操作
// 初始化请求拦截器时,会执行此方法,此时data为undefined,赋予默认{}
console.log('初始化config ', config);
config.data = config.data || {}
if (config.custom?.auth) {
// console.log(vm.$store.state, "vm.$store.state", vm.vuex_token);
// config.header['Authorization'] = 'Bearer ' + vm.$store.state.vuex_token;
// config.header['token'] = 'Bearer ' + vm.vuex_token;
config.header['token'] = vm.vuex_token;
}
// 可以在此通过vm引用vuex中的变量,具体值在vm.$store.state中
// console.log(vm.$store.state);
return config
}, (config) => // 可使用async await 做异步操作
Promise.reject(config))
}
... ...
/**
* 响应拦截
* @param {Object} http
*/
import errorCode from "@/common/errorCode.js";
module.exports = (vm) => {
uni.$u.http.interceptors.response.use((response) => {
/* 对响应成功做点什么 可使用async await 做异步操作*/
// console.log(response, "response---------", );
const data = response.data
const status = Number(response.statusCode) || 200
const message = data.reson || errorCode[data.code] || errorCode['default']
// console.log(data, '相应');
if (status !== 200 || data.code != '1000') {
vm.$u.toast(message);
return Promise.reject(new Error(message))
}
return data;
}, (response) => {
/* 对响应错误做点什么 (statusCode !== 200)*/
console.log('相遇错误', response);
const data = response
const status = Number(response.statusCode) || 200
const message = data.reson || errorCode[status] || errorCode['default']
if (status === 424) {
vm.$u.toast('令牌过期,请重新登录');
//清空存储信息
vm.$u.vuex('vuex_token', '')
vm.$u.vuex('vuex_refresh_token', '')
vm.$u.vuex('vuex_username', '')
vm.$u.vuex('vuex_userId', '')
vm.$u.vuex('vuex_client_id', '')
vm.$u.vuex('vuex_user', {})
setTimeout(() => {
uni.reLaunch({
url: '/pages/login/index'
});
}, 500);
return data
}
return data;
// return Promise.reject(response)
})
}
/**
* 响应拦截
* @param {Object} http
*/
import errorCode from "@/common/errorCode.js";
module.exports = (vm) => {
uni.$u.http.interceptors.response.use((response) => {
/* 对响应成功做点什么 可使用async await 做异步操作*/
// console.log(response, "response---------", );
const data = response.data
const status = Number(response.statusCode) || 200
const message = data.reson || errorCode[data.code] || errorCode['default']
// console.log(data, '相应');
if (status !== 200 || data.code != '1000') {
vm.$u.toast(message);
return Promise.reject(new Error(message))
}
return data;
}, (response) => {
/* 对响应错误做点什么 (statusCode !== 200)*/
console.log('相遇错误', response);
const data = response
const status = Number(response.statusCode) || 200
const message = data.reson || errorCode[status] || errorCode['default']
if (status === 424) {
vm.$u.toast('令牌过期,请重新登录');
//清空存储信息
vm.$u.vuex('vuex_token', '')
vm.$u.vuex('vuex_refresh_token', '')
vm.$u.vuex('vuex_username', '')
vm.$u.vuex('vuex_userId', '')
vm.$u.vuex('vuex_client_id', '')
vm.$u.vuex('vuex_user', {})
setTimeout(() => {
uni.reLaunch({
url: '/pages/login/index'
});
}, 500);
return data
}
return data;
// return Promise.reject(response)
})
}
... ...
<template>
<view class="drop-down-list" v-if="isShow" :style="{ top: top + 'px' }">
<view class="san-jiao"></view>
<block v-for="(item,index) in selectList" :key="index">
<view class="city-items-names" @click="changeIm(item.deptname)" :class="item.isactive?'ac-tive':''">
{{item.deptname}}
</view>
</block>
</view>
</template>
<script>
export default {
props: {
show: {
type: Boolean,
default: false,
},
list: {
type: Array,
default () {
return []
}
},
active: {
type: String,
default: '',
},
top: {
type: String,
default: '40',
}
},
data() {
return {
isShow: this.show,
selectList: this.list,
isActive: this.active,
}
},
created() {
},
mounted() {
},
watch: {
list(val, oldval) {
this.selectList = val
},
show(val, oldval) {
this.isShow = val
},
active(val, oldval) {
this.isActive = val
},
},
computed: {
},
components: {
},
methods: {
changeIm(im) {
console.log(im, );
this.$emit('changedItem', im)
}
},
}
</script>
<style scoped lang="scss">
.drop-down-list {
width: 100%;
position: absolute;
top: 40px;
left: 0;
z-index: 2;
border-radius: 6px;
opacity: 1;
background: #fff;
box-shadow: -2px 3px 11px 0px rgba(58, 63, 71, 0.08);
.san-jiao {
border-width: 10px;
border-style: solid;
border-radius: 6px;
border-color: transparent transparent #fff transparent;
position: absolute;
top: -16px;
right: 30%;
z-index: 2;
}
.city-items-names {
width: 100%;
text-align: center;
line-height: 50px;
border-bottom: 1px solid #F2F5FA;
color: #000;
}
.ac-tive {
color: #5397FF;
}
}
</style>
<style>
</style>
<template>
<view class="drop-down-list" v-if="isShow" :style="{ top: top + 'px' }">
<view class="san-jiao"></view>
<block v-for="(item,index) in selectList" :key="index">
<view class="city-items-names" @click="changeIm(item.deptname)" :class="item.isactive?'ac-tive':''">
{{item.deptname}}
</view>
</block>
</view>
</template>
<script>
export default {
props: {
show: {
type: Boolean,
default: false,
},
list: {
type: Array,
default () {
return []
}
},
active: {
type: String,
default: '',
},
top: {
type: String,
default: '40',
}
},
data() {
return {
isShow: this.show,
selectList: this.list,
isActive: this.active,
}
},
created() {
},
mounted() {
},
watch: {
list(val, oldval) {
this.selectList = val
},
show(val, oldval) {
this.isShow = val
},
active(val, oldval) {
this.isActive = val
},
},
computed: {
},
components: {
},
methods: {
changeIm(im) {
console.log(im, );
this.$emit('changedItem', im)
}
},
}
</script>
<style scoped lang="scss">
.drop-down-list {
width: 100%;
position: absolute;
top: 40px;
left: 0;
z-index: 2;
border-radius: 6px;
opacity: 1;
background: #fff;
box-shadow: -2px 3px 11px 0px rgba(58, 63, 71, 0.08);
.san-jiao {
border-width: 10px;
border-style: solid;
border-radius: 6px;
border-color: transparent transparent #fff transparent;
position: absolute;
top: -16px;
right: 30%;
z-index: 2;
}
.city-items-names {
width: 100%;
text-align: center;
line-height: 50px;
border-bottom: 1px solid #F2F5FA;
color: #000;
}
.ac-tive {
color: #5397FF;
}
}
</style>
<style>
</style>
... ...
<template>
<view class="repair-title">
<span>{{headline}}</span>
<u-icon :name="isArrow ? 'arrow-up-fill' : 'arrow-down-fill'" color="#d6d7d9" size="12"
style="margin-left: 4px;">
</u-icon>
</view>
</template>
<script>
export default {
props: {
arrow: {
type: Boolean,
default: false
},
title: {
type: String,
default: ''
}
},
data() {
return {
isArrow: this.arrow,
headline: this.title
}
},
created() {
},
mounted() {
},
watch: {
arrow(val, oldval) {
this.isArrow = val
},
title(val, oldval) {
this.headline = val
}
},
computed: {
},
components: {
},
methods: {
},
}
</script>
<style scoped lang="scss">
</style>
<style>
</style>
<template>
<view class="repair-title">
<span>{{headline}}</span>
<u-icon :name="isArrow ? 'arrow-up-fill' : 'arrow-down-fill'" color="#d6d7d9" size="12"
style="margin-left: 4px;">
</u-icon>
</view>
</template>
<script>
export default {
props: {
arrow: {
type: Boolean,
default: false
},
title: {
type: String,
default: ''
}
},
data() {
return {
isArrow: this.arrow,
headline: this.title
}
},
created() {
},
mounted() {
},
watch: {
arrow(val, oldval) {
this.isArrow = val
},
title(val, oldval) {
this.headline = val
}
},
computed: {
},
components: {
},
methods: {
},
}
</script>
<style scoped lang="scss">
</style>
<style>
</style>
... ...
<template>
<view class="js-modal" v-if="isShow">
<view class="pop-up">
<view class="center-pop">
<view class="bm-d">
<view class="center-box">
<image src="../../static/images/ic_suss.png" v-if="lyerr" mode="" class="state-imgs"></image>
<image src="../../static/images/ic-error.png" v-else mode="" class="state-imgs"></image>
<view class="success-text">{{lytitle}}</view>
<view class="modal-text">{{lytext}}</view>
</view>
<view class="pop-tton">
<button class="left-button bn" @click="cancleClick">{{lycancle}}</button>
<button class="right-button bn" @click="confirmClick">{{lyconfirm}}</button>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
num: {
type: String,
default: '1',
},
error: {
type: Boolean,
default: false,
},
succ: {
type: Boolean,
default: false,
},
title: {
type: String,
default: '',
},
text: {
type: String,
default: '',
},
cancle: {
type: String,
default: '',
},
confirm: {
type: String,
default: '',
},
path: {
type: String,
default: '',
}
},
data() {
return {
isShow: this.succ,
lyerr: this.error,
lytitle: this.title,
lytext: this.text,
lycancle: this.cancle,
lyconfirm: this.confirm,
count: '',
modalRes: {
title: '提交完毕',
text: '绑定成功',
img: '@/static/images/ic_suss.png',
confirm: '确定',
cancle: '查看',
},
modalErr: {
title: '设备异常',
text: '点击跳转保修界面',
img: '@/static/images/ic-error.png',
confirm: '跳转',
cancle: '取消',
},
}
},
created() {
},
mounted() {
},
watch: {
succ(val, old) {
this.isShow = val
},
error(val, old) {
this.lyerr = val
},
title(val, old) {
this.lytitle = val
},
text(val, old) {
this.lytext = val
},
cancle(val, old) {
this.lycancle = val
},
confirm(val, old) {
this.lyconfirm = val
},
},
computed: {
// modal: function() {
// console.log('dslsdjlkj');
// }
},
components: {
},
methods: {
et() {
console.log('kjskd', this.count);
},
cancleClick() {
this.$emit('onCancle')
},
confirmClick() {
this.$emit('onConfirm')
},
},
}
</script>
<style scoped lang="scss">
.js-modal {
width: 100%;
height: 100%;
.pop-up {
width: 100%;
height: 100%;
opacity: 1;
background: rgba(0, 0, 0, 0.4);
position: absolute;
top: 0%;
left: 0;
z-index: 10;
// opacity: .5;
}
.center-pop {
width: 88%;
opacity: 1;
background: rgba(255, 255, 255, 1);
border-radius: 16px 16px;
position: absolute;
top: 45%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 13;
.bm-d {
position: relative;
padding: 16px;
box-sizing: border-box;
.center-box {
width: 100%;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
background-color: #fff;
.state-imgs {
width: 63px;
height: 63px;
}
.success-text {
width: 100%;
height: 24px;
opacity: 1;
color: rgba(0, 0, 0, 0.9);
font-size: 16px;
font-weight: 500;
font-family: "PingFang SC";
text-align: center;
margin: 8px 0;
}
.modal-text {
width: 100%;
height: 20px;
opacity: 1;
color: rgba(0, 0, 0, 0.9);
font-size: 14px;
font-weight: 400;
font-family: "PingFang SC";
text-align: center;
line-height: 20px;
letter-spacing: 0;
}
}
.pop-tton {
width: 100%;
display: flex;
align-items: center;
margin-top: 36px;
.bn {
flex: 1;
margin-right: 16px;
flex-shrink: 0;
height: 38px;
line-height: 38px;
text-align: center;
border-radius: 8px;
opacity: 1;
font-size: 14px;
font-weight: 500;
font-family: "PingFang SC";
&:last-child {
margin-right: 0;
}
}
.left-button {
color: rgba(0, 0, 0, 0.9);
background: rgba(245, 246, 250, 1);
}
.right-button {
color: rgba(255, 255, 255, 1);
background: linear-gradient(180deg, rgba(83, 151, 255, 1) 0%, rgba(16, 111, 255, 1) 100%);
}
}
}
}
}
</style>
<style>
</style>
<template>
<view class="js-modal" v-if="isShow">
<view class="pop-up">
<view class="center-pop">
<view class="bm-d">
<view class="center-box">
<image src="../../static/images/ic_suss.png" v-if="lyerr" mode="" class="state-imgs"></image>
<image src="../../static/images/ic-error.png" v-else mode="" class="state-imgs"></image>
<view class="success-text">{{lytitle}}</view>
<view class="modal-text">{{lytext}}</view>
</view>
<view class="pop-tton">
<button class="left-button bn" @click="cancleClick">{{lycancle}}</button>
<button class="right-button bn" @click="confirmClick">{{lyconfirm}}</button>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
num: {
type: String,
default: '1',
},
error: {
type: Boolean,
default: false,
},
succ: {
type: Boolean,
default: false,
},
title: {
type: String,
default: '',
},
text: {
type: String,
default: '',
},
cancle: {
type: String,
default: '',
},
confirm: {
type: String,
default: '',
},
path: {
type: String,
default: '',
}
},
data() {
return {
isShow: this.succ,
lyerr: this.error,
lytitle: this.title,
lytext: this.text,
lycancle: this.cancle,
lyconfirm: this.confirm,
count: '',
modalRes: {
title: '提交完毕',
text: '绑定成功',
img: '@/static/images/ic_suss.png',
confirm: '确定',
cancle: '查看',
},
modalErr: {
title: '设备异常',
text: '点击跳转保修界面',
img: '@/static/images/ic-error.png',
confirm: '跳转',
cancle: '取消',
},
}
},
created() {
},
mounted() {
},
watch: {
succ(val, old) {
this.isShow = val
},
error(val, old) {
this.lyerr = val
},
title(val, old) {
this.lytitle = val
},
text(val, old) {
this.lytext = val
},
cancle(val, old) {
this.lycancle = val
},
confirm(val, old) {
this.lyconfirm = val
},
},
computed: {
// modal: function() {
// console.log('dslsdjlkj');
// }
},
components: {
},
methods: {
et() {
console.log('kjskd', this.count);
},
cancleClick() {
this.$emit('onCancle')
},
confirmClick() {
this.$emit('onConfirm')
},
},
}
</script>
<style scoped lang="scss">
.js-modal {
width: 100%;
height: 100%;
.pop-up {
width: 100%;
height: 100%;
opacity: 1;
background: rgba(0, 0, 0, 0.4);
position: absolute;
top: 0%;
left: 0;
z-index: 10;
// opacity: .5;
}
.center-pop {
width: 88%;
opacity: 1;
background: rgba(255, 255, 255, 1);
border-radius: 16px 16px;
position: absolute;
top: 45%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 13;
.bm-d {
position: relative;
padding: 16px;
box-sizing: border-box;
.center-box {
width: 100%;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
background-color: #fff;
.state-imgs {
width: 63px;
height: 63px;
}
.success-text {
width: 100%;
height: 24px;
opacity: 1;
color: rgba(0, 0, 0, 0.9);
font-size: 16px;
font-weight: 500;
font-family: "PingFang SC";
text-align: center;
margin: 8px 0;
}
.modal-text {
width: 100%;
height: 20px;
opacity: 1;
color: rgba(0, 0, 0, 0.9);
font-size: 14px;
font-weight: 400;
font-family: "PingFang SC";
text-align: center;
line-height: 20px;
letter-spacing: 0;
}
}
.pop-tton {
width: 100%;
display: flex;
align-items: center;
margin-top: 36px;
.bn {
flex: 1;
margin-right: 16px;
flex-shrink: 0;
height: 38px;
line-height: 38px;
text-align: center;
border-radius: 8px;
opacity: 1;
font-size: 14px;
font-weight: 500;
font-family: "PingFang SC";
&:last-child {
margin-right: 0;
}
}
.left-button {
color: rgba(0, 0, 0, 0.9);
background: rgba(245, 246, 250, 1);
}
.right-button {
color: rgba(255, 255, 255, 1);
background: linear-gradient(180deg, rgba(83, 151, 255, 1) 0%, rgba(16, 111, 255, 1) 100%);
}
}
}
}
}
</style>
<style>
</style>
... ...
<template>
<view class="u-flex-1">
<u-radio-group v-model="radiovalue" :disabled="disabled" @change="groupChange" iconPlacement="right">
<u-radio :customStyle="{marginRight: '32px'}" v-for="(item, index) in radiolist" :key="index" iconSize="18"
:label="item[itemLabel]" :name="item[itemValue]">
</u-radio>
</u-radio-group>
</view>
</template>
<script>
export default {
props: {
value: {
type: String,
default: ''
},
disabled: {
type: Boolean,
default: false
},
dictType: {
type: String,
default: ''
},
items: {
type: Array,
default () {
return [];
}
},
itemLabel: {
type: String,
default: 'label'
},
itemValue: {
type: String,
default: 'value'
}
},
data() {
return {
radiovalue: '',
};
},
watch: {
// value(val, oldVal) {
// this.options.value = val;
// },
// items(val, oldVal) {
// this.options.items = val;
// console.log(this.options.items, "this.options.items");
// }
},
computed: {
radiolist: function() {
return this.items
}
},
created() {
// console.log(this.radiolist, "radiolist");
// this.loadData();
},
methods: {
loadData() {
if (this.dictType != '') {
this.$u.api.dictData({
dictType: this.dictType
}).then(res => {
if (typeof res === 'object' && res.result === 'login') {
return;
}
this.options.items = res.data;
});
} else {
this.options.items = this.items;
}
},
groupChange(val) {
console.log(val, "groupChange");
this.$emit('input', val);
}
}
}
</script>
<style lang="scss" scoped>
</style>
<template>
<view class="u-flex-1">
<u-radio-group v-model="radiovalue" :disabled="disabled" @change="groupChange" iconPlacement="right">
<u-radio :customStyle="{marginRight: '32px'}" v-for="(item, index) in radiolist" :key="index" iconSize="18"
:label="item[itemLabel]" :name="item[itemValue]">
</u-radio>
</u-radio-group>
</view>
</template>
<script>
export default {
props: {
value: {
type: String,
default: ''
},
disabled: {
type: Boolean,
default: false
},
dictType: {
type: String,
default: ''
},
items: {
type: Array,
default () {
return [];
}
},
itemLabel: {
type: String,
default: 'label'
},
itemValue: {
type: String,
default: 'value'
}
},
data() {
return {
radiovalue: '',
};
},
watch: {
// value(val, oldVal) {
// this.options.value = val;
// },
// items(val, oldVal) {
// this.options.items = val;
// console.log(this.options.items, "this.options.items");
// }
},
computed: {
radiolist: function() {
return this.items
}
},
created() {
// console.log(this.radiolist, "radiolist");
// this.loadData();
},
methods: {
loadData() {
if (this.dictType != '') {
this.$u.api.dictData({
dictType: this.dictType
}).then(res => {
if (typeof res === 'object' && res.result === 'login') {
return;
}
this.options.items = res.data;
});
} else {
this.options.items = this.items;
}
},
groupChange(val) {
console.log(val, "groupChange");
this.$emit('input', val);
}
}
}
</script>
<style lang="scss" scoped>
</style>
... ...
<template>
<view class="scan-icon">
<u-icon name="scan" color="#666" size="20" class="uni-icon" @click="scan"></u-icon>
</view>
</template>
<script>
import qrcode from '@/utils/reqrcode.js'
export default {
props: {},
data() {
return {}
},
created() {
},
mounted() {
},
watch: {
},
computed: {
},
components: {
},
methods: {
scan() {
let that = this
// 调用uni提供的调用相机api
uni.chooseImage({
sizeType: ['original'],
count: 1,
success: function(res) {
const tempFilePaths = res.tempFilePaths[0] // 获取到二维码图片的链接
qrcode.decode(tempFilePaths); // 解析二维码图片
qrcode.callback = function(res1) {
// 解析失败返回 error decoding QR Code
if (res1 == "error decoding QR Code") {
uni.showToast({
title: "识别二维码失败,请重新上传!",
duration: 2000,
icon: 'none'
})
} else {
// 解析成功返回二维码链接
console.log(res1)
}
}
}
});
// uni.navigateTo({
// url: '/pages/bind-company/index'
// })
},
},
}
</script>
<style scoped lang="scss">
</style>
<style>
</style>
<template>
<view class="scan-icon">
<u-icon name="scan" color="#666" size="20" class="uni-icon" @click="scan"></u-icon>
</view>
</template>
<script>
import qrcode from '@/utils/reqrcode.js'
export default {
props: {},
data() {
return {}
},
created() {
},
mounted() {
},
watch: {
},
computed: {
},
components: {
},
methods: {
scan() {
let that = this
// 调用uni提供的调用相机api
uni.chooseImage({
sizeType: ['original'],
count: 1,
success: function(res) {
const tempFilePaths = res.tempFilePaths[0] // 获取到二维码图片的链接
qrcode.decode(tempFilePaths); // 解析二维码图片
qrcode.callback = function(res1) {
// 解析失败返回 error decoding QR Code
if (res1 == "error decoding QR Code") {
uni.showToast({
title: "识别二维码失败,请重新上传!",
duration: 2000,
icon: 'none'
})
} else {
// 解析成功返回二维码链接
console.log(res1)
}
}
}
});
// uni.navigateTo({
// url: '/pages/bind-company/index'
// })
},
},
}
</script>
<style scoped lang="scss">
</style>
<style>
</style>
... ...
<template>
<view class="top-title">
<view class="icon--text">
<image src="../../static/images/t-icon.png" mode=""></image>
<text>{{txt}}</text>
</view>
<view class="rig-c">
<view class="ic-radio" @click="changeShow" v-if="isDisplay== '1'">
<image src="../../static/images/ic-radio.png" mode="" v-if="isShow"></image>
<image src="../../static/images/ic-radied.png" mode="" v-else></image>
</view>
<view class="right-title" :style="{color:chgColor}" v-if="isDisplay == '2'">
<text>{{rightTitle}}</text>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
title: {
type: String,
default: ''
},
show: {
type: Boolean,
default: false
},
display: {
type: String,
default: '0'
},
iscolor: {
type: String,
default: '#ccc'
},
text: {
type: String,
default: ''
}
},
data() {
return {
rightTitle: this.title,
isShow: this.show,
chgColor: this.iscolor,
txt: this.text,
isDisplay: this.display,
src: "../../static/images/t-icon.png"
}
},
created() {
},
mounted() {
},
watch: {
show(val, oldval) {
this.isShow = val
},
title(val, oldval) {
this.rightTitle = val
},
display(val, oldval) {
this.isDisplay = val
},
iscolor(val, oldval) {
this.chgColor = val
},
text(val, oldval) {
this.txt = val
}
},
computed: {
},
components: {
},
methods: {
changeShow() {
this.$emit('changedRadio')
}
},
}
</script>
<style scoped lang="scss">
.top-title {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 16px 0px;
box-sizing: border-box;
.icon--text {
flex: 1;
flex-shrink: 0;
display: flex;
align-items: center;
image {
width: 16px;
height: 16px;
margin-right: 4px;
}
}
.rig-c {
// width: 60px;
flex: 1;
display: flex;
align-items: center;
justify-content: flex-end;
.ic-radio {
width: 18px;
font-size: 0;
image {
width: 18px;
height: 18px;
}
}
.right-title {
opacity: 1;
font-size: 14px;
font-weight: 400;
font-family: "PingFang SC";
text-align: right;
}
}
}
</style>
<style>
</style>
<template>
<view class="top-title">
<view class="icon--text">
<image src="../../static/images/t-icon.png" mode=""></image>
<text>{{txt}}</text>
</view>
<view class="rig-c">
<view class="ic-radio" @click="changeShow" v-if="isDisplay== '1'">
<image src="../../static/images/ic-radio.png" mode="" v-if="isShow"></image>
<image src="../../static/images/ic-radied.png" mode="" v-else></image>
</view>
<view class="right-title" :style="{color:chgColor}" v-if="isDisplay == '2'">
<text>{{rightTitle}}</text>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
title: {
type: String,
default: ''
},
show: {
type: Boolean,
default: false
},
display: {
type: String,
default: '0'
},
iscolor: {
type: String,
default: '#ccc'
},
text: {
type: String,
default: ''
}
},
data() {
return {
rightTitle: this.title,
isShow: this.show,
chgColor: this.iscolor,
txt: this.text,
isDisplay: this.display,
src: "../../static/images/t-icon.png"
}
},
created() {
},
mounted() {
},
watch: {
show(val, oldval) {
this.isShow = val
},
title(val, oldval) {
this.rightTitle = val
},
display(val, oldval) {
this.isDisplay = val
},
iscolor(val, oldval) {
this.chgColor = val
},
text(val, oldval) {
this.txt = val
}
},
computed: {
},
components: {
},
methods: {
changeShow() {
this.$emit('changedRadio')
}
},
}
</script>
<style scoped lang="scss">
.top-title {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 16px 0px;
box-sizing: border-box;
.icon--text {
flex: 1;
flex-shrink: 0;
display: flex;
align-items: center;
image {
width: 16px;
height: 16px;
margin-right: 4px;
}
}
.rig-c {
// width: 60px;
flex: 1;
display: flex;
align-items: center;
justify-content: flex-end;
.ic-radio {
width: 18px;
font-size: 0;
image {
width: 18px;
height: 18px;
}
}
.right-title {
opacity: 1;
font-size: 14px;
font-weight: 400;
font-family: "PingFang SC";
text-align: right;
}
}
}
</style>
<style>
</style>
... ...
<template>
<view class="js-upload">
<u-upload :fileList="fileList6" @afterRead="afterRead" @delete="deletePic" name="6" multiple :maxCount="1"
width="168" height="106">
<image src="../../../static/images/img_id_card1.png" mode="widthFix" style="width: 168px;height: 106px;">
</image>
</u-upload>
</view>
</template>
<script>
export default {
props: {},
data() {
return {
fileList6: []
}
},
created() {
},
mounted() {
},
watch: {
},
computed: {
},
components: {
},
methods: {
afterRead() {
},
deletePic() {
},
},
}
</script>
<style scoped lang="scss">
</style>
<style>
</style>
<template>
<view class="js-upload">
<u-upload :fileList="fileList6" @afterRead="afterRead" @delete="deletePic" name="6" multiple :maxCount="1"
width="168" height="106">
<image src="../../../static/images/img_id_card1.png" mode="widthFix" style="width: 168px;height: 106px;">
</image>
</u-upload>
</view>
</template>
<script>
export default {
props: {},
data() {
return {
fileList6: []
}
},
created() {
},
mounted() {
},
watch: {
},
computed: {
},
components: {
},
methods: {
afterRead() {
},
deletePic() {
},
},
}
</script>
<style scoped lang="scss">
</style>
<style>
</style>
... ...
<template>
<view class="uni-section" :style="{ '--background-color': backgroundColor,}">
{{sections}}
</view>
</template>
<script>
export default {
props: {
section: {
type: String,
default: ''
},
},
data() {
return {
sections: this.section,
backgroundColor: ''
}
},
created() {
this.backgroundColor = this.$store.state.txtcor || '#106FFF';
},
mounted() {
},
watch: {
section(val, oldval) {
this.sections = val
},
},
computed: {
},
components: {
},
methods: {
},
}
</script>
<style scoped lang="scss">
.uni-section {
// width: 100%;
opacity: 1;
color: rgba(0, 0, 0, 0.9);
font-size: 16px;
font-weight: 600;
font-family: "PingFang SC";
text-align: left;
line-height: 22px;
letter-spacing: 0;
padding-left: 10px;
box-sizing: border-box;
position: relative;
&:before {
content: '';
position: absolute;
top: 50%;
left: 0;
width: 4px;
height: 15px;
border-radius: 5px;
// background-color: #116FFE;
background-color: var(--background-color);
transform: translateY(-50%);
}
}
</style>
<style>
</style>
<template>
<view class="uni-section" :style="{ '--background-color': backgroundColor,}">
{{sections}}
</view>
</template>
<script>
export default {
props: {
section: {
type: String,
default: ''
},
},
data() {
return {
sections: this.section,
backgroundColor: ''
}
},
created() {
this.backgroundColor = this.$store.state.txtcor || '#106FFF';
},
mounted() {
},
watch: {
section(val, oldval) {
this.sections = val
},
},
computed: {
},
components: {
},
methods: {
},
}
</script>
<style scoped lang="scss">
.uni-section {
// width: 100%;
opacity: 1;
color: rgba(0, 0, 0, 0.9);
font-size: 16px;
font-weight: 600;
font-family: "PingFang SC";
text-align: left;
line-height: 22px;
letter-spacing: 0;
padding-left: 10px;
box-sizing: border-box;
position: relative;
&:before {
content: '';
position: absolute;
top: 50%;
left: 0;
width: 4px;
height: 15px;
border-radius: 5px;
// background-color: #116FFE;
background-color: var(--background-color);
transform: translateY(-50%);
}
}
</style>
<style>
</style>
... ...
<template>
<view class="platform-center">
<block v-for="(item, index) in platform" :key="index">
<view class="plat-item">
<view class="title-ter">{{item.systemname}}</view>
<view class="box-ter">
<view class="left-arrow ">
<image src="../../static/images/arrow-right.png" mode="" class="small-arrow"></image>
</view>
<view class="right-icon">
<image src="../../static/images/mask_1.png" mode="" class="state-img"></image>
</view>
</view>
</view>
</block>
</view>
</template>
<script>
export default {
props: {
list: Array,
default () {
return []
}
},
data() {
return {
orange: '../../static/images/Frame3081.png', // 橙色
green: '../../static/images/Frame3082.png',
red: '../../static/images/Frame3083.png',
blue: '../../static/images/Frame3084.png',
// platform:this.list
platform: [],
};
},
created() {},
mounted() {
this.platform = this.vuex_system
},
watch: {
// list(val,oldval){
// this.platform = val
// }
},
computed: {
platform() {
return this.list
},
},
methods: {}
};
</script>
<style lang="scss" scoped>
.platform-center {
width: 100%;
padding: 50px 16px 0;
box-sizing: border-box;
display: flex;
align-items: center;
.plat-item {
flex: 1;
flex-shrink: 0;
margin-right: 11px;
box-sizing: border-box;
border-radius: 6px;
opacity: 1;
background: linear-gradient(180deg, rgba(255, 170, 55, 1) 0%, rgba(252, 145, 0, 1) 100%);
&:last-child {
margin-right: 0;
}
.title-ter {
width: 100%;
padding: 26px 8px 0 16px;
box-sizing: border-box;
opacity: 1;
color: rgba(255, 255, 255, 1);
font-size: 17px;
font-weight: 400;
font-family: 'PingFang SC';
text-align: left;
line-height: 24px;
letter-spacing: 0;
}
.box-ter {
width: 100%;
display: flex;
.left-arrow {
width: 30px;
flex-shrink: 0;
padding-left: 16px;
box-sizing: border-box;
.small-arrow {
width: 12px;
height: 12px;
}
}
.right-icon {
flex: 1;
flex-shrink: 0;
font-size: 0;
.state-img {
width: 100%;
height: 127px;
}
}
}
}
}
</style>
<template>
<view class="platform-center">
<block v-for="(item, index) in platform" :key="index">
<view class="plat-item">
<view class="title-ter">{{item.systemname}}</view>
<view class="box-ter">
<view class="left-arrow ">
<image src="../../static/images/arrow-right.png" mode="" class="small-arrow"></image>
</view>
<view class="right-icon">
<image src="../../static/images/mask_1.png" mode="" class="state-img"></image>
</view>
</view>
</view>
</block>
</view>
</template>
<script>
export default {
props: {
list: Array,
default () {
return []
}
},
data() {
return {
orange: '../../static/images/Frame3081.png', // 橙色
green: '../../static/images/Frame3082.png',
red: '../../static/images/Frame3083.png',
blue: '../../static/images/Frame3084.png',
// platform:this.list
platform: [],
};
},
created() {},
mounted() {
this.platform = this.vuex_system
},
watch: {
// list(val,oldval){
// this.platform = val
// }
},
computed: {
platform() {
return this.list
},
},
methods: {}
};
</script>
<style lang="scss" scoped>
.platform-center {
width: 100%;
padding: 50px 16px 0;
box-sizing: border-box;
display: flex;
align-items: center;
.plat-item {
flex: 1;
flex-shrink: 0;
margin-right: 11px;
box-sizing: border-box;
border-radius: 6px;
opacity: 1;
background: linear-gradient(180deg, rgba(255, 170, 55, 1) 0%, rgba(252, 145, 0, 1) 100%);
&:last-child {
margin-right: 0;
}
.title-ter {
width: 100%;
padding: 26px 8px 0 16px;
box-sizing: border-box;
opacity: 1;
color: rgba(255, 255, 255, 1);
font-size: 17px;
font-weight: 400;
font-family: 'PingFang SC';
text-align: left;
line-height: 24px;
letter-spacing: 0;
}
.box-ter {
width: 100%;
display: flex;
.left-arrow {
width: 30px;
flex-shrink: 0;
padding-left: 16px;
box-sizing: border-box;
.small-arrow {
width: 12px;
height: 12px;
}
}
.right-icon {
flex: 1;
flex-shrink: 0;
font-size: 0;
.state-img {
width: 100%;
height: 127px;
}
}
}
}
}
</style>
... ...
<template>
<view class="platform-four">
</view>
</template>
<script>
export default {
props: {},
data() {
return {
orange:'../../static/images/Frame3081.png', // 橙色
green:'../../static/images/Frame3082.png',
red:'../../static/images/Frame3083.png',
blue:'../../static/images/Frame3084.png',
};
},
created() {},
mounted() {},
watch:{
},
computed: {},
methods: {}
};
</script>
<style lang="scss" scoped>
<template>
<view class="platform-four">
</view>
</template>
<script>
export default {
props: {},
data() {
return {
orange:'../../static/images/Frame3081.png', // 橙色
green:'../../static/images/Frame3082.png',
red:'../../static/images/Frame3083.png',
blue:'../../static/images/Frame3084.png',
};
},
created() {},
mounted() {},
watch:{
},
computed: {},
methods: {}
};
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
... ...
<template>
<view class="platform-head">
<view class="logo-image" @click="demonav">
<image src="../../static/images/Framelogo.png" class="logo-img" mode=""></image>
</view>
</view>
</template>
<script>
export default {
props: {},
data() {
return {
orange: '../../static/images/Frame3081.png', // 橙色
green: '../../static/images/Frame3082.png',
red: '../../static/images/Frame3083.png',
blue: '../../static/images/Frame3084.png',
};
},
created() {},
mounted() {},
computed: {},
methods: {
demonav() {
uni.navigateTo({
url: '/pages/change-platform/index'
})
}
}
};
</script>
<style lang="scss" scoped>
.platform-head {
width: 100%;
// background: '../../static/images/Frame3081.png' no-repeat;
background: url('@/static/images/Frame3081.png') no-repeat;
background-size: 100% 100%;
height: 238px;
// background-color: #cccfff;
opacity: 1;
.logo-image {
width: 100%;
padding-top: 60px;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
.logo-img {
width: 234px;
height: 64px;
opacity: 1;
}
}
}
</style>
<template>
<view class="platform-head">
<view class="logo-image" @click="demonav">
<image src="../../static/images/Framelogo.png" class="logo-img" mode=""></image>
</view>
</view>
</template>
<script>
export default {
props: {},
data() {
return {
orange: '../../static/images/Frame3081.png', // 橙色
green: '../../static/images/Frame3082.png',
red: '../../static/images/Frame3083.png',
blue: '../../static/images/Frame3084.png',
};
},
created() {},
mounted() {},
computed: {},
methods: {
demonav() {
uni.navigateTo({
url: '/pages/change-platform/index'
})
}
}
};
</script>
<style lang="scss" scoped>
.platform-head {
width: 100%;
// background: '../../static/images/Frame3081.png' no-repeat;
background: url('@/static/images/Frame3081.png') no-repeat;
background-size: 100% 100%;
height: 238px;
// background-color: #cccfff;
opacity: 1;
.logo-image {
width: 100%;
padding-top: 60px;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
.logo-img {
width: 234px;
height: 64px;
opacity: 1;
}
}
}
</style>
... ...
<template>
<view>
<block v-for="(item,index) in platform" :key="index">
<view class="plat-item" @click="changed(item.systemcode)">
<view class="left-boxs">
<view class="title-names">{{item.systemname}}</view>
<view class="arrow-left">
<image src="../../static/images/arrow-right.png" mode=""></image>
</view>
</view>
<view class="rgt-img">
<image src="../../static/images/mask_1.png" mode="" class="add-img"></image>
</view>
</view>
</block>
</view>
</template>
<script>
export default {
props: {
list: {
type: Array,
default () {
return []
}
}
},
data() {
return {
orange: '../../static/images/Frame3081.png', // 橙色
green: '../../static/images/Frame3082.png',
red: '../../static/images/Frame3083.png',
blue: '../../static/images/Frame3084.png',
// platform:this.list
platform: [],
};
},
created() {},
mounted() {
this.platform = this.vuex_system
},
watch: {
},
computed: {},
methods: {
changed(code) {
console.log(code, "选中的平台");
uni.switchTab({
url: '/pages/home/index'
})
},
}
};
</script>
<style lang="scss" scoped>
.plat-item {
width: 100%;
display: flex;
height: 147px;
border-radius: 6px;
opacity: 1;
background: linear-gradient(180deg, rgba(255, 170, 55, 1) 0%, rgba(252, 145, 0, 1) 100%);
margin-bottom: 20px;
&:last-child {
margin-bottom: 0;
}
.left-boxs {
flex: 1;
flex-shrink: 0;
padding: 22px 20px;
box-sizing: border-box;
.title-names {
width: 100%;
opacity: 1;
color: rgba(255, 255, 255, 1);
font-size: 20px;
font-weight: 500;
font-family: 'PingFang SC';
text-align: left;
line-height: 28px;
}
.arrow-left {
margin-top: 30px;
width: 100%;
image {
width: 12px;
height: 12px;
}
}
}
.rgt-img {
width: 160px;
height: 147px;
opacity: 1;
position: relative;
font-size: 0;
.add-img {
width: 160px;
height: 140px;
position: absolute;
bottom: 0;
right: 0;
}
}
}
</style>
<template>
<view>
<block v-for="(item,index) in platform" :key="index">
<view class="plat-item" @click="changed(item.systemcode)">
<view class="left-boxs">
<view class="title-names">{{item.systemname}}</view>
<view class="arrow-left">
<image src="../../static/images/arrow-right.png" mode=""></image>
</view>
</view>
<view class="rgt-img">
<image src="../../static/images/mask_1.png" mode="" class="add-img"></image>
</view>
</view>
</block>
</view>
</template>
<script>
export default {
props: {
list: {
type: Array,
default () {
return []
}
}
},
data() {
return {
orange: '../../static/images/Frame3081.png', // 橙色
green: '../../static/images/Frame3082.png',
red: '../../static/images/Frame3083.png',
blue: '../../static/images/Frame3084.png',
// platform:this.list
platform: [],
};
},
created() {},
mounted() {
this.platform = this.vuex_system
},
watch: {
},
computed: {},
methods: {
changed(code) {
console.log(code, "选中的平台");
uni.switchTab({
url: '/pages/home/index'
})
},
}
};
</script>
<style lang="scss" scoped>
.plat-item {
width: 100%;
display: flex;
height: 147px;
border-radius: 6px;
opacity: 1;
background: linear-gradient(180deg, rgba(255, 170, 55, 1) 0%, rgba(252, 145, 0, 1) 100%);
margin-bottom: 20px;
&:last-child {
margin-bottom: 0;
}
.left-boxs {
flex: 1;
flex-shrink: 0;
padding: 22px 20px;
box-sizing: border-box;
.title-names {
width: 100%;
opacity: 1;
color: rgba(255, 255, 255, 1);
font-size: 20px;
font-weight: 500;
font-family: 'PingFang SC';
text-align: left;
line-height: 28px;
}
.arrow-left {
margin-top: 30px;
width: 100%;
image {
width: 12px;
height: 12px;
}
}
}
.rgt-img {
width: 160px;
height: 147px;
opacity: 1;
position: relative;
font-size: 0;
.add-img {
width: 160px;
height: 140px;
position: absolute;
bottom: 0;
right: 0;
}
}
}
</style>
... ...
<template>
<view class="">
<block v-for="(it,i) in taskList" :key="i">
<view class="receive-task" :style="{background:activebg }" :class="{ active: nycolor,f_a :actv }">
<view class="left-task">
<text class="task-tit title_content1">{{it.taskname}}</text>
<text class="task-label title_content1">{{it.applydata[0].enterprisename}}</text>
</view>
<u-icon name="arrow-right" size="14" :color="nycolor?'#fff':'#666'"></u-icon>
</view>
</block>
</view>
</template>
<script>
export default {
props: {
iscolor: {
type: Boolean,
default: false,
},
actived: {
type: Boolean,
default: false,
},
list: {
type: Array,
default () {
return []
}
}
},
data() {
return {
nycolor: this.iscolor,
actv: this.actived,
activebg: '',
}
},
created() {
this.activebg = this.$store.state.txtcor || '#106FFF'
},
mounted() {
},
watch: {
iscolor(val, old) {
console.log(val);
this.nycolor = val
},
actived(val, old) {
this.actv = val
}
},
computed: {
taskList() {
return this.list
}
},
components: {
},
methods: {
},
}
</script>
<style scoped lang="scss">
.receive-task {
width: 100%;
display: flex;
align-items: center;
padding: 16px 0;
box-sizing: border-box;
border-top: 0.1px solid #EBEDF0;
.left-task {
flex: 1;
display: flex;
flex-direction: column;
.task-tit {
opacity: 1;
color: #000000;
font-size: 14px;
font-weight: 400;
font-family: "PingFang SC";
text-align: left;
line-height: 20px;
letter-spacing: 0;
}
.task-label {
opacity: 1;
color: rgba(0, 0, 0, 0.4);
font-size: 10px;
font-weight: 400;
font-family: "PingFang SC";
text-align: left;
line-height: 14px;
}
}
}
.active {
// background-color: #428DFF;
padding: 16px;
// border-radius: 6p
&:first-child {
border-radius: 6px 6px 0 0;
}
.left-task {
.task-tit,
.task-label {
color: #fff;
}
}
}
.f_a {
background-color: #fff !important;
}
</style>
<style>
</style>
<template>
<view class="">
<block v-for="(it,i) in taskList" :key="i">
<view class="receive-task" :style="{background:activebg }" :class="{ active: nycolor,f_a :actv }">
<view class="left-task">
<text class="task-tit title_content1">{{it.taskname}}</text>
<text class="task-label title_content1">{{it.applydata[0].enterprisename}}</text>
</view>
<u-icon name="arrow-right" size="14" :color="nycolor?'#fff':'#666'"></u-icon>
</view>
</block>
</view>
</template>
<script>
export default {
props: {
iscolor: {
type: Boolean,
default: false,
},
actived: {
type: Boolean,
default: false,
},
list: {
type: Array,
default () {
return []
}
}
},
data() {
return {
nycolor: this.iscolor,
actv: this.actived,
activebg: '',
}
},
created() {
this.activebg = this.$store.state.txtcor || '#106FFF'
},
mounted() {
},
watch: {
iscolor(val, old) {
console.log(val);
this.nycolor = val
},
actived(val, old) {
this.actv = val
}
},
computed: {
taskList() {
return this.list
}
},
components: {
},
methods: {
},
}
</script>
<style scoped lang="scss">
.receive-task {
width: 100%;
display: flex;
align-items: center;
padding: 16px 0;
box-sizing: border-box;
border-top: 0.1px solid #EBEDF0;
.left-task {
flex: 1;
display: flex;
flex-direction: column;
.task-tit {
opacity: 1;
color: #000000;
font-size: 14px;
font-weight: 400;
font-family: "PingFang SC";
text-align: left;
line-height: 20px;
letter-spacing: 0;
}
.task-label {
opacity: 1;
color: rgba(0, 0, 0, 0.4);
font-size: 10px;
font-weight: 400;
font-family: "PingFang SC";
text-align: left;
line-height: 14px;
}
}
}
.active {
// background-color: #428DFF;
padding: 16px;
// border-radius: 6p
&:first-child {
border-radius: 6px 6px 0 0;
}
.left-task {
.task-tit,
.task-label {
color: #fff;
}
}
}
.f_a {
background-color: #fff !important;
}
</style>
<style>
</style>
... ...
<template>
<!-- <view class="list-box"> -->
<scroll-view scroll-y="true" class="scroll-list1" @scrolltolower="loadMore">
<view v-if="dataList.length !== 0">
<!-- <maintain-list :list="dataList"></maintain-list> -->
<slot></slot>
<view class="loadmore">
<u-loadmore :status="loadStatus" @loadMore="loadMore" />
</view>
</view>
<view class="empty-list" v-else>
<u-empty mode="data"></u-empty>
</view>
</scroll-view>
<!-- </view> -->
</template>
<script>
export default {
props: {
loadList: {
type: Array,
default () {
return []
}
},
status: {
type: String,
default: 'loadmore'
}
},
data() {
return {
query: {
current: 0,
size: 10
},
total: 0,
}
},
created() {
},
mounted() {
},
watch: {
},
computed: {
dataList() {
return this.loadList
},
loadStatus() {
return this.status
}
},
components: {
},
methods: {
},
}
</script>
<style scoped lang="scss">
</style>
<style>
</style>
<template>
<!-- <view class="list-box"> -->
<scroll-view scroll-y="true" class="scroll-list1" @scrolltolower="loadMore">
<view v-if="dataList.length !== 0">
<!-- <maintain-list :list="dataList"></maintain-list> -->
<slot></slot>
<view class="loadmore">
<u-loadmore :status="loadStatus" @loadMore="loadMore" />
</view>
</view>
<view class="empty-list" v-else>
<u-empty mode="data"></u-empty>
</view>
</scroll-view>
<!-- </view> -->
</template>
<script>
export default {
props: {
loadList: {
type: Array,
default () {
return []
}
},
status: {
type: String,
default: 'loadmore'
}
},
data() {
return {
query: {
current: 0,
size: 10
},
total: 0,
}
},
created() {
},
mounted() {
},
watch: {
},
computed: {
dataList() {
return this.loadList
},
loadStatus() {
return this.status
}
},
components: {
},
methods: {
},
}
</script>
<style scoped lang="scss">
</style>
<style>
</style>
... ...
<template>
<view class="search-tabs">
<view class="search-box">
<view class="search-input">
<u-input placeholder="搜索" placeholderStyle="font-size:13px;" v-model="keyword" prefixIcon="search"
border="none" prefixIconStyle="font-size: 22px;color: #909399">
<template slot="suffix">
<view class="sou-suo" @click="search">搜索</view>
</template>
</u-input>
</view>
<view class="scan-box" v-if="itScan">
<u-icon name="scan" color="#106FFF" size="24" class="uni-icon" @click="scan"></u-icon>
</view>
</view>
<view class="header-tabs" v-if="isShow" :class="{isflex: itflex}">
<u-tabs :list="navTabs" :activeStyle="activeStyle" :inactiveStyle="inactiveStyle" @click="clickTab">
</u-tabs>
</view>
</view>
</template>
<script>
import qrcode from '@/utils/reqrcode.js'
export default {
props: {
list: {
type: Array,
default () {
return []
}
},
show: {
type: Boolean,
default: true
},
isScan: {
type: Boolean,
default: false
},
isflex: {
type: Boolean,
default: false
}
},
data() {
return {
activeStyle: {
color: '#106FFF',
fontSize: '14px',
fontWeight: 500
},
inactiveStyle: {
color: '#606266',
fontSize: '14px',
fontWeight: 400
},
navTabs: this.list,
isShow: this.show,
itScan: this.isScan,
itflex: this.isflex,
keyword: ''
};
},
created() {
// 打印qrcode 查看是否引入成功
console.log(qrcode)
},
mounted() {},
watch: {
list(val, oval) {
this.navTabs = val
},
show(val, old) {
this.isShow = val
},
itScan(val, old) {
this.itScan = val
},
isflex(val, old) {
this.itflex = val
}
},
computed: {
},
methods: {
scan() {
let that = this
// 调用uni提供的调用相机api
uni.chooseImage({
sizeType: ['original'],
count: 1,
success: function(res) {
const tempFilePaths = res.tempFilePaths[0] // 获取到二维码图片的链接
qrcode.decode(tempFilePaths); // 解析二维码图片
qrcode.callback = function(res1) {
// 解析失败返回 error decoding QR Code
if (res1 == "error decoding QR Code") {
uni.showToast({
title: "识别二维码失败,请重新上传!",
duration: 2000,
icon: 'none'
})
} else {
// 解析成功返回二维码链接
console.log(res1)
}
this.$emit('onScan')
}
}
});
// uni.navigateTo({
// url: '/pages/bind-company/index'
// })
},
clickTab(ms) {
// console.log(ms, "ms");
this.$emit('changeTabs', ms)
},
search() {
let word = this.keyword
this.$emit('onSearch', word)
}
}
};
</script>
<style lang="scss" scoped>
.search-tabs {
width: 100%;
background-color: #fff;
margin-bottom: 10px;
.search-box {
width: 100%;
padding: 8px 16px;
box-sizing: border-box;
display: flex;
align-items: center;
.search-input {
width: 100%;
border-radius: 19px;
opacity: 1;
background: rgba(236, 242, 254, 1);
.sou-suo {
width: 48px;
height: 24px;
border-radius: 48px;
opacity: 1;
border: 0 solid rgba(0, 0.4588235318660736, 0.9764705896377563, 1);
background: linear-gradient(180deg, rgba(83, 151, 255, 1) 0%, rgba(16, 111, 255, 1) 100%);
opacity: 1;
color: rgba(245, 246, 250, 1);
font-size: 12px;
font-weight: 400;
font-family: "PingFang SC";
text-align: center;
line-height: 24px;
}
}
.scan-box {
width: 40px;
padding-left: 10px;
box-sizing: border-box;
}
}
.search-box {
width: 100%;
height: 48px;
}
}
</style>
<template>
<view class="search-tabs">
<view class="search-box">
<view class="search-input">
<u-input placeholder="搜索" placeholderStyle="font-size:13px;" v-model="keyword" prefixIcon="search"
border="none" prefixIconStyle="font-size: 22px;color: #909399">
<template slot="suffix">
<view class="sou-suo" @click="search">搜索</view>
</template>
</u-input>
</view>
<view class="scan-box" v-if="itScan">
<u-icon name="scan" color="#106FFF" size="24" class="uni-icon" @click="scan"></u-icon>
</view>
</view>
<view class="header-tabs" v-if="isShow" :class="{isflex: itflex}">
<u-tabs :list="navTabs" :activeStyle="activeStyle" :inactiveStyle="inactiveStyle" @click="clickTab">
</u-tabs>
</view>
</view>
</template>
<script>
import qrcode from '@/utils/reqrcode.js'
export default {
props: {
list: {
type: Array,
default () {
return []
}
},
show: {
type: Boolean,
default: true
},
isScan: {
type: Boolean,
default: false
},
isflex: {
type: Boolean,
default: false
}
},
data() {
return {
activeStyle: {
color: '#106FFF',
fontSize: '14px',
fontWeight: 500
},
inactiveStyle: {
color: '#606266',
fontSize: '14px',
fontWeight: 400
},
navTabs: this.list,
isShow: this.show,
itScan: this.isScan,
itflex: this.isflex,
keyword: ''
};
},
created() {
// 打印qrcode 查看是否引入成功
console.log(qrcode)
},
mounted() {},
watch: {
list(val, oval) {
this.navTabs = val
},
show(val, old) {
this.isShow = val
},
itScan(val, old) {
this.itScan = val
},
isflex(val, old) {
this.itflex = val
}
},
computed: {
},
methods: {
scan() {
let that = this
// 调用uni提供的调用相机api
uni.chooseImage({
sizeType: ['original'],
count: 1,
success: function(res) {
const tempFilePaths = res.tempFilePaths[0] // 获取到二维码图片的链接
qrcode.decode(tempFilePaths); // 解析二维码图片
qrcode.callback = function(res1) {
// 解析失败返回 error decoding QR Code
if (res1 == "error decoding QR Code") {
uni.showToast({
title: "识别二维码失败,请重新上传!",
duration: 2000,
icon: 'none'
})
} else {
// 解析成功返回二维码链接
console.log(res1)
}
this.$emit('onScan')
}
}
});
// uni.navigateTo({
// url: '/pages/bind-company/index'
// })
},
clickTab(ms) {
// console.log(ms, "ms");
this.$emit('changeTabs', ms)
},
search() {
let word = this.keyword
this.$emit('onSearch', word)
}
}
};
</script>
<style lang="scss" scoped>
.search-tabs {
width: 100%;
background-color: #fff;
margin-bottom: 10px;
.search-box {
width: 100%;
padding: 8px 16px;
box-sizing: border-box;
display: flex;
align-items: center;
.search-input {
width: 100%;
border-radius: 19px;
opacity: 1;
background: rgba(236, 242, 254, 1);
.sou-suo {
width: 48px;
height: 24px;
border-radius: 48px;
opacity: 1;
border: 0 solid rgba(0, 0.4588235318660736, 0.9764705896377563, 1);
background: linear-gradient(180deg, rgba(83, 151, 255, 1) 0%, rgba(16, 111, 255, 1) 100%);
opacity: 1;
color: rgba(245, 246, 250, 1);
font-size: 12px;
font-weight: 400;
font-family: "PingFang SC";
text-align: center;
line-height: 24px;
}
}
.scan-box {
width: 40px;
padding-left: 10px;
box-sizing: border-box;
}
}
.search-box {
width: 100%;
height: 48px;
}
}
</style>
... ...
import Vue from 'vue';
import LangEn from './lang/en.js';
import LangCn from './lang/zh.js';
import VueI18n from 'vue-i18n'
Vue.use(VueI18n);
// 去保存好的值
const system_key = uni.getStorageSync('system_key');
if (!system_key) {
// 获取设备信息
uni.getSystemInfo({
success: function(res) {
console.log(res)
uni.setStorageSync('system_key', res);
}
})
}
// 判断获取后的值是什么语言
const lang_cur = system_key.language == 'en' ? 'en' : 'zh';
// 实例化VueI18n对象
const i18n = new VueI18n({
// 默认语言
locale: lang_cur || 'en',
// 两种方式
messages: {
'en': require('./lang/en.js'),
'zh': require('./lang/zh.js')
},
messages: {
'en': LangEn,
'zh': LangCn
}
})
// 抛出去
export default i18n
import Vue from 'vue';
import LangEn from './lang/en.js';
import LangCn from './lang/zh.js';
import VueI18n from 'vue-i18n'
Vue.use(VueI18n);
// 去保存好的值
const system_key = uni.getStorageSync('system_key');
if (!system_key) {
// 获取设备信息
uni.getSystemInfo({
success: function(res) {
console.log(res)
uni.setStorageSync('system_key', res);
}
})
}
// 判断获取后的值是什么语言
const lang_cur = system_key.language == 'en' ? 'en' : 'zh';
// 实例化VueI18n对象
const i18n = new VueI18n({
// 默认语言
locale: lang_cur || 'en',
// 两种方式
messages: {
'en': require('./lang/en.js'),
'zh': require('./lang/zh.js')
},
messages: {
'en': LangEn,
'zh': LangCn
}
})
// 抛出去
export default i18n
... ...
export default {
placeholder: {
placeholderName: 'Enter Account',
placeholderPassword: 'Enter Password',
placeholderKeyword: 'Search keywords',
OldPassword: 'Enter OldPassword',
NewPassword: 'Enter NewPassword',
ConfirmPassword: 'Enter ConfirmPassword',
},
title: 'Submit',
close: 'Close',
empty_name: 'Data is empty',
security_verification: 'Sliding puzzle',
sliding_puzzle: 'Security verification',
basicInfation: 'Basic Infation',
detectionInfation: 'Detection Infation',
logout: 'logout',
collaborativeOffice: 'Collaborative office',
commonfunctions: 'Common functions',
user: {
personalInformation: 'Personal information',
changePassword: 'Change Password',
onlineService: 'Online Service',
noLogin: 'No login',
recommend: 'Recommend to friends',
personalCenter: 'Personal Center',
structure: 'structure',
mail_list: 'mail list',
system_management: 'system management',
logout: 'logout',
version_update: 'Version update',
clear_cache: 'Clear cache',
Menu_entry_mode: 'Menu entry mode'
},
oldPassword: 'Old password',
newPassword: 'New password',
confirmPassword: 'Confirm password ',
confirm: 'confirm',
cancel: 'cancel',
todoTasks: 'To do tasks',
search: 'search',
informationStatistics: 'Information Statistics',
position: 'position',
stateName: 'state',
rainStation: 'Rainwater station'
}
export default {
placeholder: {
placeholderName: 'Enter Account',
placeholderPassword: 'Enter Password',
placeholderKeyword: 'Search keywords',
OldPassword: 'Enter OldPassword',
NewPassword: 'Enter NewPassword',
ConfirmPassword: 'Enter ConfirmPassword',
},
title: 'Submit',
close: 'Close',
empty_name: 'Data is empty',
security_verification: 'Sliding puzzle',
sliding_puzzle: 'Security verification',
basicInfation: 'Basic Infation',
detectionInfation: 'Detection Infation',
logout: 'logout',
collaborativeOffice: 'Collaborative office',
commonfunctions: 'Common functions',
user: {
personalInformation: 'Personal information',
changePassword: 'Change Password',
onlineService: 'Online Service',
noLogin: 'No login',
recommend: 'Recommend to friends',
personalCenter: 'Personal Center',
structure: 'structure',
mail_list: 'mail list',
system_management: 'system management',
logout: 'logout',
version_update: 'Version update',
clear_cache: 'Clear cache',
Menu_entry_mode: 'Menu entry mode'
},
oldPassword: 'Old password',
newPassword: 'New password',
confirmPassword: 'Confirm password ',
confirm: 'confirm',
cancel: 'cancel',
todoTasks: 'To do tasks',
search: 'search',
informationStatistics: 'Information Statistics',
position: 'position',
stateName: 'state',
rainStation: 'Rainwater station'
}
... ...
export default {
placeholder: {
placeholderName: '请输入手机号',
placeholderPassword: '请输入密码',
placeholderMemberName: '请输入会员名',
placeholderCode: '请输入验证码',
placeholderKeyword: '请输入您要搜索的关键词',
OldPassword: '请输入旧密码',
NewPassword: '请输入新密码',
ConfirmPassword: '请确认新密码',
},
btn: {
login: '登录',
register: '注册',
forget:'重置密码'
},
confirm: '确认',
cancel: '取消',
submit: '提 交',
close: '关 闭',
todotask: '待领取任务',
// 设备
equipment: {
equipmentWarehouse: '设备入库',
equipmentRepair: '设备维修',
equipmentMaintain: '设备保养',
equipmentSpotcheck: '设备点检',
info: '设备信息',
},
empty_name: '数据为空',
security_verification: '请完成安全验证',
sliding_puzzle: '拖动左边滑块完成上方拼图',
basicInfation: '基本信息',
detectionInfation: '检测信息',
logout: '退出登录',
collaborativeOffice: '协同办公',
commonfunctions: '常用功能',
user: {
personalInformation: '个人资料',
changePassword: '修改密码',
onlineService: '在线客服',
noLogin: '未登录',
personalCenter: '个人中心',
recommend: '推荐给好友',
structure: '组织架构',
mail_list: '通讯录',
system_management: '系统管理',
logout: '退出登录',
version_update: '版本更新',
clear_cache: '清除缓存',
Menu_entry_mode: '菜单进入模式'
},
oldPassword: '旧密码',
newPassword: '新密码',
confirmPassword: '确认密码',
todoTasks: '待办任务',
search: '搜索',
informationStatistics: '信息统计',
position: '部位',
stateName: '状态',
rainStation: '雨水站'
}
export default {
placeholder: {
placeholderName: '请输入手机号',
placeholderPassword: '请输入密码',
placeholderMemberName: '请输入会员名',
placeholderCode: '请输入验证码',
placeholderKeyword: '请输入您要搜索的关键词',
OldPassword: '请输入旧密码',
NewPassword: '请输入新密码',
ConfirmPassword: '请确认新密码',
},
btn: {
login: '登录',
register: '注册',
forget:'重置密码'
},
confirm: '确认',
cancel: '取消',
submit: '提 交',
close: '关 闭',
todotask: '待领取任务',
// 设备
equipment: {
equipmentWarehouse: '设备入库',
equipmentRepair: '设备维修',
equipmentMaintain: '设备保养',
equipmentSpotcheck: '设备点检',
info: '设备信息',
},
empty_name: '数据为空',
security_verification: '请完成安全验证',
sliding_puzzle: '拖动左边滑块完成上方拼图',
basicInfation: '基本信息',
detectionInfation: '检测信息',
logout: '退出登录',
collaborativeOffice: '协同办公',
commonfunctions: '常用功能',
user: {
personalInformation: '个人资料',
changePassword: '修改密码',
onlineService: '在线客服',
noLogin: '未登录',
personalCenter: '个人中心',
recommend: '推荐给好友',
structure: '组织架构',
mail_list: '通讯录',
system_management: '系统管理',
logout: '退出登录',
version_update: '版本更新',
clear_cache: '清除缓存',
Menu_entry_mode: '菜单进入模式'
},
oldPassword: '旧密码',
newPassword: '新密码',
confirmPassword: '确认密码',
todoTasks: '待办任务',
search: '搜索',
informationStatistics: '信息统计',
position: '部位',
stateName: '状态',
rainStation: '雨水站'
}
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<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>
<title></title>
<!--preload-links-->
<!--app-context-->
</head>
<body>
<div id="app"><!--app-html--></div>
<script type="module" src="/main.js"></script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<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>
<title></title>
<!--preload-links-->
<!--app-context-->
</head>
<body>
<div id="app"><!--app-html--></div>
<script type="module" src="/main.js"></script>
</body>
</html>
... ...