提交 bbe0a36d 作者: wk

Merge branch 'feature-wk-jobSwitch' into dev

......@@ -3,7 +3,8 @@
globalData: {
userInfo: {},
isReject: false,
authMenus: []
authMenus: [],
isInit: false
},
onLaunch: function() {
console.log('App Launch')
......
......@@ -156,6 +156,10 @@ const params = {
url: "/ydt/aArticleLibrary/getAArticleLibraryForm",
method: "get"
},
getCompanyNews: {
url: "/ydt/aArticleLibrary/getWithCompany",
method: "get"
},
getHomeComp: {
url: "/ydt/api/v1/pageTemplate/getByTemplateKey",
method: "get"
......@@ -292,6 +296,22 @@ const params = {
getAuthMenu: {
url: "/api/v1/user/user/get_auths",
method: "get"
},
getCompanyJobList: {
url: "/api/v1/org/o_comp_user/user_comp_job_list",
method: "get"
},
switchCompany: {
url: "/api/v1/user/user/switch_company",
method: "put"
},
switchJob: {
url: "/api/v2/user/user_v2/switch_job",
method: "put"
},
getAppOperateAuth: {
url: "/proxy/adminc/v1/system_manage/p_operation/queryAppOperations",
method: "get"
}
}
......
let configEnv = {}
const ENV = 'dev'; // dev:开发环境 | test:测试环境
if (ENV == "dev") {
//本地环境
console.log('本地环境')
configEnv = {
baseUrl: 'https://dev-console-api.hzdingmao.com',
gtrBase: "",
jyxyBase: "",
webUrl: "https://dev-console.hzdingmao.com", //开发
authCode: "477A0661-EF04-11F7-9D69-0BDD73F06500",
labourAppNo: "appletlabourboard",
jzgrAppNo: "", //建筑工人沟通日
jyxyAppNo: "", //教育学院
jfscAppNo: "63f05e5dc9d53f743030fa92"
}
} else {
if (ENV == 'test') {
//测试环境
console.log('测试环境')
configEnv = {
baseUrl: 'https://test-console-api.hzdingmao.com',
gtrBase: "https://cwcd-h5.huizhucloud.com",
jyxyBase: "https://edu.huizhucloud.com",
webUrl: "",
authCode: "07EC0FDA-0249-6DB3-7422-0AFFF34E0E90", //测试
labourAppNo: "",
jzgrAppNo: "", //建筑工人沟通日
jyxyAppNo: "", //教育学院
jfscAppNo: ""
}
} else {
//生产环境
console.log('生产环境')
configEnv = {
baseUrl: 'https://console-api.hibuilding.cn',
gtrBase: "https://gdt-front-mobile.hibuilding.cn",
jyxyBase: "https://wlxy.cnzgc.com",
webUrl: "https://console.hibuilding.cn", //生产
authCode: "D0539533-E169-5338-8ED7-3FAD554F4F62", //正式
labourAppNo: "20230207002", //劳务看板
jzgrAppNo: "63e1e639e7025e13c471a9d2", //建筑工人沟通日
jyxyAppNo: "63e1f98420836820ca5e3c02", //教育学院
jfscAppNo: "" //积分商城
}
}
}
export default configEnv
import configEnv from "../api/env.js"
const $config = {
pwdTemplateNo: "industry-0001",
loginTemplateNo: "industry-0001",
systemCode: "buildingSite",
/* 授权码 */
// authCode: "477A0661-EF04-11F7-9D69-0BDD73F06500",
// authCode: "07EC0FDA-0249-6DB3-7422-0AFFF34E0E90", //测试
authCode: "D0539533-E169-5338-8ED7-3FAD554F4F62", //正式
authCode: configEnv.authCode,
pageSize: 20,
isPage: 1,
smsCfg: "industry",
/* api域名 */
// base: "https://dev-console-api.hzdingmao.com",
// base: "https://test-console-api.hzdingmao.com",
base: "https://console-api.hibuilding.cn",
base: configEnv.baseUrl,
/* 工地沟通日 */
// gtrBase:"https://cwcd-h5.huizhucloud.com",//测试
gtrBase: "https://gdt-front-mobile.hibuilding.cn", //生产
gtrBase: configEnv.gtrBase, //生产
/* 教育培训 */
// jyxyBase: "https://edu.huizhucloud.com", //测试
jyxyBase: "https://wlxy.cnzgc.com", //生产
jyxyBase: configEnv.jyxyBase, //生产
/* 劳务看板 */
// webUrl: "https://dev-console.hzdingmao.com", //开发
webUrl: "https://console.hibuilding.cn" //生产
webUrl: configEnv.webUrl //生产
}
export default $config
<template>
<view style="padding: 10rpx 20rpx;background-color: #FFFFFF;">
<gi-title title="签到二维码"></gi-title>
<image src="../../static/qrcode-ic.png" style="width: 96rpx;height: 96rpx;margin-top: 10px;"
<view style="padding: 10rpx 0;background-color: #FFFFFF;">
<view class="gi-title" style="margin-left: 20rpx;">
<text class="star" v-if="isMust">*</text>
<text class="text-black-normal" style="margin-left: 10rpx;flex: 1;">签到二维码</text>
</view>
<image src="../../static/qrcode-ic.png" style="width: 96rpx;height: 96rpx;margin-top: 10px;margin-left: 20rpx;"
@click="showQrcode">
</image>
<view style="display: flex;flex-direction: column;" v-if="record_id!=''">
<view style="margin-top: 10px;">签到人员</view>
<view style="display: flex;flex-direction: row;flex-wrap: wrap;">
<view style="margin-top: 10px;margin-left: 20rpx">签到人员</view>
<view style="display: flex;flex-direction: row;flex-wrap: wrap;margin-left: 20rpx">
<view v-for="(item,index) in users" :key="index">
<view class="sign-user-style">
{{item.value}}
......
......@@ -321,8 +321,8 @@
}
.ly-tree-node__icon {
width: 30rpx;
height: 30rpx;
width: 40rpx;
height: 40rpx;
overflow: hidden;
margin-right: 16rpx;
}
......@@ -334,8 +334,8 @@
}
.ly-tree-node__label {
font-size: 32rpx;
color: #333333;
font-size: 28rpx;
color: #606266;
width: 750rpx;
}
......
......@@ -70,6 +70,7 @@
<style lang="scss">
.navbar-home {
.navbar-content {
position: relative;
top: 0;
......
......@@ -73,6 +73,7 @@
margin-bottom: 16px;
width: 100%;
background: linear-gradient(138.42deg, #59a3fe 0%, #1757ff 100%);
z-index: 999;
.navbar-v-navbar {
display: flex;
......
<template>
<view class="uni-calendar-item__weeks-box" :class="{
'uni-calendar-item--disable':weeks.disable,
'uni-calendar-item--before-checked-x':weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked-x':weeks.afterMultiple,
}" @click="choiceDate(weeks)" @mouseenter="handleMousemove(weeks)">
<view class="uni-calendar-item__weeks-box-item" :class="{
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && (calendar.userChecked || !checkHover),
'uni-calendar-item--checked-range-text': checkHover,
'uni-calendar-item--before-checked':weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
'uni-calendar-item--disable':weeks.disable,
}">
<text v-if="selected&&weeks.extraInfo" class="uni-calendar-item__weeks-box-circle"></text>
<text class="uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text">{{weeks.date}}</text>
</view>
<view :class="{'uni-calendar-item--isDay': weeks.isDay}"></view>
</view>
</template>
<script>
export default {
props: {
weeks: {
type: Object,
default () {
return {}
}
},
calendar: {
type: Object,
default: () => {
return {}
}
},
selected: {
type: Array,
default: () => {
return []
}
},
lunar: {
type: Boolean,
default: false
},
checkHover: {
type: Boolean,
default: false
}
},
methods: {
choiceDate(weeks) {
this.$emit('change', weeks)
},
handleMousemove(weeks) {
this.$emit('handleMouse', weeks)
}
}
}
</script>
<style lang="scss" >
$uni-primary: #007aff !default;
.uni-calendar-item__weeks-box {
flex: 1;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
margin: 1px 0;
position: relative;
}
.uni-calendar-item__weeks-box-text {
font-size: 14px;
// font-family: Lato-Bold, Lato;
font-weight: bold;
color: darken($color: $uni-primary, $amount: 40%);
}
.uni-calendar-item__weeks-lunar-text {
font-size: 12px;
color: #333;
}
.uni-calendar-item__weeks-box-item {
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
width: 40px;
height: 40px;
/* #ifdef H5 */
cursor: pointer;
/* #endif */
}
.uni-calendar-item__weeks-box-circle {
position: absolute;
top: 5px;
right: 5px;
width: 8px;
height: 8px;
border-radius: 8px;
background-color: #dd524d;
}
.uni-calendar-item__weeks-box .uni-calendar-item--disable {
cursor: default;
}
.uni-calendar-item--disable .uni-calendar-item__weeks-box-text-disable {
color: #D1D1D1;
}
.uni-calendar-item--isDay {
position: absolute;
top: 10px;
right: 17%;
background-color: #dd524d;
width:6px;
height: 6px;
border-radius: 50%;
}
.uni-calendar-item--extra {
color: #dd524d;
opacity: 0.8;
}
.uni-calendar-item__weeks-box .uni-calendar-item--checked {
background-color: $uni-primary;
border-radius: 50%;
box-sizing: border-box;
border: 3px solid #fff;
}
.uni-calendar-item--checked .uni-calendar-item--checked-text {
color: #fff;
}
.uni-calendar-item--multiple .uni-calendar-item--checked-range-text {
color: #333;
}
.uni-calendar-item--multiple {
background-color: #F6F7FC;
// color: #fff;
}
.uni-calendar-item--multiple .uni-calendar-item--before-checked,
.uni-calendar-item--multiple .uni-calendar-item--after-checked {
background-color: $uni-primary;
border-radius: 50%;
box-sizing: border-box;
border: 3px solid #F6F7FC;
}
.uni-calendar-item--before-checked .uni-calendar-item--checked-text,
.uni-calendar-item--after-checked .uni-calendar-item--checked-text {
color: #fff;
}
.uni-calendar-item--before-checked-x {
border-top-left-radius: 50px;
border-bottom-left-radius: 50px;
box-sizing: border-box;
background-color: #F6F7FC;
}
.uni-calendar-item--after-checked-x {
border-top-right-radius: 50px;
border-bottom-right-radius: 50px;
background-color: #F6F7FC;
}
</style>
{
"uni-datetime-picker.selectDate": "select date",
"uni-datetime-picker.selectTime": "select time",
"uni-datetime-picker.selectDateTime": "select datetime",
"uni-datetime-picker.startDate": "start date",
"uni-datetime-picker.endDate": "end date",
"uni-datetime-picker.startTime": "start time",
"uni-datetime-picker.endTime": "end time",
"uni-datetime-picker.ok": "ok",
"uni-datetime-picker.clear": "clear",
"uni-datetime-picker.cancel": "cancel",
"uni-datetime-picker.year": "-",
"uni-datetime-picker.month": "",
"uni-calender.MON": "MON",
"uni-calender.TUE": "TUE",
"uni-calender.WED": "WED",
"uni-calender.THU": "THU",
"uni-calender.FRI": "FRI",
"uni-calender.SAT": "SAT",
"uni-calender.SUN": "SUN",
"uni-calender.confirm": "confirm"
}
import en from './en.json'
import zhHans from './zh-Hans.json'
import zhHant from './zh-Hant.json'
export default {
en,
'zh-Hans': zhHans,
'zh-Hant': zhHant
}
{
"uni-datetime-picker.selectDate": "选择日期",
"uni-datetime-picker.selectTime": "选择时间",
"uni-datetime-picker.selectDateTime": "选择日期时间",
"uni-datetime-picker.startDate": "开始日期",
"uni-datetime-picker.endDate": "结束日期",
"uni-datetime-picker.startTime": "开始时间",
"uni-datetime-picker.endTime": "结束时间",
"uni-datetime-picker.ok": "确定",
"uni-datetime-picker.clear": "清除",
"uni-datetime-picker.cancel": "取消",
"uni-datetime-picker.year": "年",
"uni-datetime-picker.month": "月",
"uni-calender.SUN": "日",
"uni-calender.MON": "一",
"uni-calender.TUE": "二",
"uni-calender.WED": "三",
"uni-calender.THU": "四",
"uni-calender.FRI": "五",
"uni-calender.SAT": "六",
"uni-calender.confirm": "确认"
}
\ No newline at end of file
{
"uni-datetime-picker.selectDate": "選擇日期",
"uni-datetime-picker.selectTime": "選擇時間",
"uni-datetime-picker.selectDateTime": "選擇日期時間",
"uni-datetime-picker.startDate": "開始日期",
"uni-datetime-picker.endDate": "結束日期",
"uni-datetime-picker.startTime": "開始时间",
"uni-datetime-picker.endTime": "結束时间",
"uni-datetime-picker.ok": "確定",
"uni-datetime-picker.clear": "清除",
"uni-datetime-picker.cancel": "取消",
"uni-datetime-picker.year": "年",
"uni-datetime-picker.month": "月",
"uni-calender.SUN": "日",
"uni-calender.MON": "一",
"uni-calender.TUE": "二",
"uni-calender.WED": "三",
"uni-calender.THU": "四",
"uni-calender.FRI": "五",
"uni-calender.SAT": "六",
"uni-calender.confirm": "確認"
}
\ No newline at end of file
......@@ -109,7 +109,7 @@
uni.scanCode({
success(res) {
let result = res.result
if (result.indexOf("?") != -1) {
if (result.indexOf("?") != -1) { //一物一码
let param = result.split("?")[1]
let params = param.replace(/&/g, '","').replace(/=/g, '":"')
let paramJson = `{"${params}"}`
......@@ -129,7 +129,8 @@
})
}
} else {
that.$toast.showToast("二维码格式不正确")
that.orgCode(res)
// that.$toast.showToast("二维码格式不正确")
}
},
fail() {
......@@ -137,6 +138,44 @@
}
})
},
orgCode(res) {
try {
var role = getApp().globalData.userInfo.identity.code
let result = JSON.parse(res.result)
if (result && typeof result == 'object') {
let type = result.type
if (type == "company") {
this.code = result.text
uni.navigateTo({
url: `/pages/login/joinDepartment/joinDepartment?code=${this.code}&type=company`
})
} else if (type == "project") {
this.code = result.text
if (role == 'VISITOR') {
uni.navigateTo({
url: `/pages/login/joinDepartment/joinDepartment?code=${this.code}&type=project&projectId=${result.ext.id}`
})
} else {
uni.navigateTo({
url: `/pagesSub/mine/projectInfo/projectInfo?projectId=${result.ext.id}&from=qrcode`
})
}
} else if (type == "department") {
this.code = result.text
uni.navigateTo({
url: `/pages/login/joinDepartment/joinDepartment?code=${this.code}&type=department`
})
} else {
this.$toast.showToast("二维码格式不正确")
}
} else {
this.$toast.showToast("二维码格式不正确")
}
} catch (e) {
this.$toast.showToast("二维码格式不正确")
}
}
}
}
</script>
......
......@@ -3,7 +3,7 @@ import App from './App'
// #ifndef VUE3
import Vue from 'vue'
import tabBar from 'components/uni-tabbar/uni-tabbar.vue'
import tabBar from './components/uni-tabbar/uni-tabbar.vue'
import $toast from './common/toast.js'
import $config from './common/config.js'
import $mta from "api/mta.js"
......
......@@ -95,14 +95,6 @@
}
}, {
"path": "pages/score/score",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/login/joinOrg/joinOrg",
"style": {
"navigationBarTitleText": "",
......@@ -111,14 +103,6 @@
}
}, {
"path": "pages/login/bindLogin/bindLogin",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/login/userInfo/userInfo",
"style": {
"navigationBarTitleText": "授权信息",
......@@ -135,14 +119,6 @@
}
}, {
"path": "pages/mine/myScore/myScore",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/login/createProject/createProject",
"style": {
"navigationBarTitleText": "创建项目",
......@@ -151,14 +127,6 @@
}
}, {
"path": "pages/mine/historyScore/historyScore",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/index/siteNewList/siteNewList",
"style": {
"navigationBarTitleText": "",
......@@ -183,14 +151,6 @@
}
}, {
"path": "pages/mine/myApproval/myApproval",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
}, {
"path": "pages/gallery/message/message",
"style": {
"navigationBarTitleText": "",
......@@ -306,22 +266,6 @@
}
}, {
"path": "pages/mine/projectInfo/projectInfo",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/mine/projectHistory/projectHistory",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/index/bussConfig/bussConfig",
"style": {
"navigationBarTitleText": "",
......@@ -439,14 +383,6 @@
}
}, {
"path": "pages/mine/changeOrg/changeOrg",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/gallery/app/editAloneForm/editAloneForm",
"style": {
"navigationBarTitleText": "",
......@@ -468,14 +404,6 @@
}
}, {
"path": "pages/mine/changeCompany/changeCompany",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/gallery/messageDetail/messageDetail",
"style": {
"navigationBarTitleText": "",
......@@ -518,49 +446,37 @@
"enablePullDownRefresh": false
}
}, {
"path": "pages/user/accountLogin/accountLogin",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/user/phoneLogin/phoneLogin",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/gallery/outPage/gdtPage/gdtPage",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/user/accountLogin/accountLogin",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/user/phoneLogin/phoneLogin",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/gallery/outPage/gdtPage/gdtPage",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/questionAdd/questionAdd",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
],
"globalStyle": {
"navigationBarTextStyle": "white",
"navigationBarTitleText": "智慧工地一点通",
"navigationBarBackgroundColor": "#3B73FE",
"backgroundColor": "#3B73FE"
"backgroundColor": "#3B73FE",
"usingComponents": {
"ly-tree-node": "/components/ly-tree/ly-tree-node"
}
},
"uniIdRouter": {},
"tabBar": {
......@@ -579,5 +495,82 @@
"pagePath": "pages/mine/mine"
}
]
}
},
"subPackages": [{
"root": "pagesSub",
"pages": [{
"path": "mine/historyScoreDetail/historyScoreDetail",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "mine/myScore/myScore",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "mine/scoreDetail/scoreDetail",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "mine/historyScore/historyScore",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "mine/changeCompany/changeCompany",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "mine/changeOrg/changeOrg",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "mine/myApproval/myApproval",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
}, {
"path": "mine/projectHistory/projectHistory",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "mine/projectInfo/projectInfo",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}]
}
]
}
......@@ -37,7 +37,9 @@
projectId: "",
checkItemId: "",
inputValue: "",
check_tpl_id: ""
check_tpl_id: "",
appId: "",
auths: ['1', '2', '3', '4'] //操作权限对应增改查删
}
},
onShow() {
......@@ -51,6 +53,7 @@
this.check_tpl_id = option.check_tpl_id
this.checkItemId = option.check_item_id
this.projectId = option.project_id
this.appId = option.appId
},
onPullDownRefresh() {
......@@ -67,6 +70,18 @@
this.loadMore()
},
methods: {
getOperateAuth() {
Api.getAppOperateAuth({
data: {
appId: this.appId
}
}).then((result) => {
console.log("按钮权限", result);
if (result.code == 0) {
this.auths = result.data
}
})
},
initData() {
this.loadData(true)
},
......@@ -80,6 +95,20 @@
this.getCheckList(refresh, 1)
},
add() {
var isAuth = this.auths.find(item => item == '1')
if (!isAuth) {
uni.showModal({
title: '提示',
content: '您没有新增权限,如需要请联系管理人员',
showCancel: false,
confirmText: "知道了",
confirmColor: '#3B73FE',
success: res => {
}
})
return
}
uni.navigateTo({
url: `/pages/gallery/app/createCheck/createCheck?check_item_id=${this.checkItemId}&title=${this.title}&check_tpl_id=${this.check_tpl_id}`,
})
......@@ -93,6 +122,20 @@
this.getCheckList(true, 0)
},
itemClick(index) {
var isAuth = this.auths.find(item => item == '3')
if (!isAuth) {
uni.showModal({
title: '提示',
content: '您没有查看权限,如需要请联系管理人员',
showCancel: false,
confirmText: "知道了",
confirmColor: '#3B73FE',
success: res => {
}
})
return
}
let obj_no = this.objList[index].obj_no
let check_obj_id = this.objList[index].check_obj_id
uni.navigateTo({
......
......@@ -331,6 +331,7 @@
</template>
<script>
import Api from "../../../../api/api.js"
export default {
data() {
return {
......@@ -374,7 +375,8 @@
"align_type": "left" //对齐方式,可选参数:【'left','middle','right'】=》【'左对齐', '居中对齐', '右对齐'】
},
isSelectState: false, //是否选择状态
selectItems: [] //选中记录的recordId
selectItems: [], //选中记录的recordId
auths: ['1', '2', '3', '4'] //操作权限对应增改查删
}
},
onLoad: function(option) {
......@@ -383,6 +385,8 @@
this.businessType = option.business_type
this.checkModuleId = option.check_module_id
this.appId = option.check_tpl_id
//真正的appId
var appId1 = option.appId
this.isModelEdit = option.is_edit
this.loadProject()
if (this.businessType == 3) {
......@@ -392,6 +396,7 @@
uni.setNavigationBarTitle({
title: option.title
})
this.getOperateAuth(appId1)
},
onShow: function() {
uni.$once("refresh", res => {
......@@ -418,7 +423,33 @@
}
},
methods: {
getOperateAuth(appId) {
Api.getAppOperateAuth({
data: {
appId: appId
}
}).then((result) => {
console.log("按钮权限", result);
if (result.code == 0) {
this.auths = result.data
}
})
},
onDelete() {
var isAuth = this.auths.find(item => item == '4')
if (!isAuth) {
uni.showModal({
title: '提示',
content: '您没有删除权限,如需要请联系管理员',
showCancel: false,
confirmText: "知道了",
confirmColor: '#3B73FE',
success: res => {
}
})
return
}
if (this.selectItems.length == 0) {
this.$toast.showToast("请选择需删除的记录")
return
......@@ -511,6 +542,20 @@
this.getFormList()
},
add: function() {
var isAuth = this.auths.find(item => item == '1')
if (!isAuth) {
uni.showModal({
title: '提示',
content: '您没有新增权限,如需要请联系管理员',
showCancel: false,
confirmText: "知道了",
confirmColor: '#3B73FE',
success: res => {
}
})
return
}
if (this.businessType == 4) {
uni.navigateTo({
url: `/pages/gallery/app/addBusinessData/addBusinessData?check_tpl_id=${this.appId}&check_module_id=${this.checkModuleId}&bussness_type=${this.businessType}&project_id=${this.projectId}&title=${this.title}`
......@@ -542,6 +587,20 @@
this.getFormList()
},
toEdit: function(type, index) {
var isAuth = this.auths.find(item => item == '2')
if (!isAuth) {
uni.showModal({
title: '提示',
content: '您没有编辑权限,如需要请联系管理员',
showCancel: false,
confirmText: "知道了",
confirmColor: '#3B73FE',
success: res => {
}
})
return
}
let form = {}
if (type == "left") {
form = this.leftList[index]
......@@ -561,6 +620,20 @@
}
},
toEditDetail: function(type, index) {
var isAuth = this.auths.find(item => item == '3')
if (!isAuth) {
uni.showModal({
title: '提示',
content: '您没有查看权限,如需要请联系管理员',
showCancel: false,
confirmText: "知道了",
confirmColor: '#3B73FE',
success: res => {
}
})
return
}
let form = {}
if (type == "left") {
form = this.leftList[index]
......@@ -574,6 +647,20 @@
})
},
toDelete: function(type, index) {
var isAuth = this.auths.find(item => item == '4')
if (!isAuth) {
uni.showModal({
title: '提示',
content: '您没有删除权限,如需要请联系管理员',
showCancel: false,
confirmText: "知道了",
confirmColor: '#3B73FE',
success: res => {
}
})
return
}
uni.showModal({
title: '提示',
content: '确定删除该内容?',
......@@ -613,6 +700,20 @@
})
},
toDetail: function(type, index) {
var isAuth = this.auths.find(item => item == '3')
if (!isAuth) {
uni.showModal({
title: '提示',
content: '您没有查看权限,如需要请联系管理员',
showCancel: false,
confirmText: "知道了",
confirmColor: '#3B73FE',
success: res => {
}
})
return
}
let form = {}
if (type == "left") {
form = this.leftList[index]
......
......@@ -15,11 +15,13 @@
return {
appId: "",
models: [],
appInfo: {}
appInfo: {},
appId1: ""
}
},
onLoad(option) {
this.appId = option.check_tpl_id
this.appId1 = option.appId
uni.setNavigationBarTitle({
title: option.title
})
......@@ -43,7 +45,7 @@
},
itemClick(index) {
uni.navigateTo({
url: `/pages/gallery/app/modeFormList/modeFormList?business_type=${this.appInfo.business_type}&check_tpl_id=${this.appId}&check_module_id=${this.models[index].check_module_id}&title=${this.models[index].module_name}&is_edit=${this.models[index].is_edit}&showCfg=${JSON.stringify(this.models[index].show_cfg)}`
url: `/pages/gallery/app/modeFormList/modeFormList?business_type=${this.appInfo.business_type}&check_tpl_id=${this.appId}&check_module_id=${this.models[index].check_module_id}&title=${this.models[index].module_name}&is_edit=${this.models[index].is_edit}&showCfg=${JSON.stringify(this.models[index].show_cfg)}&appId=${this.appId1}`
})
}
}
......
......@@ -45,12 +45,14 @@
},
menu: [],
appId: "",
projectName: ""
projectName: "",
appId1: ""
}
},
onLoad(option) {
this.appId = option.check_tpl_id
this.title = option.title
this.appId1 = option.appId
uni.setNavigationBarTitle({
title: this.title
})
......@@ -78,26 +80,6 @@
} else {
this.projectSelect = this.projectList[0]
}
// for (var i = 0; i < this.projectList.length; i++) {
// this.projectNames[i] = this.projectList[i].project_name
// }
// if (this.projectList.length > 0) {
// console.log("项目ID:", );
// let curId = uni.getStorageSync("project_id")
// if (curId.length == 0) {
// this.projectSelect = this.projectList[0].project_name
// uni.setStorageSync("project_id", this.projectList[0].project_id)
// uni.setStorageSync("project_name", this.projectList[0].project_name)
// } else {
// let project = this.projectList.find(item => item.project_id == curId)
// if (project) {
// this.projectSelect = uni.getStorageSync("project_name")
// } else {
// this.projectSelect = this.projectList[0].project_name
// }
// }
// }
} else {
if (result.code === -1) {
uni.showToast({
......@@ -155,7 +137,7 @@
} = e.detail
let item = this.list[index]
uni.navigateTo({
url: `/pages/gallery/app/checkObjList/checkObjList?check_item_name=${item.check_item_name}&check_item_id=${item.check_item_id}&check_tpl_id=${this.appId}&project_id=${this.projectSelect.project_id}`,
url: `/pages/gallery/app/checkObjList/checkObjList?check_item_name=${item.check_item_name}&check_item_id=${item.check_item_id}&check_tpl_id=${this.appId}&project_id=${this.projectSelect.project_id}&appId=${this.appId1}`,
})
},
itemSelect(e) {
......
......@@ -35,10 +35,11 @@
<text class="text">本周人气最佳:{{mostUsed.app_name||"暂无"}}</text>
</view>
</view>
<view class="app-content" :style="{'top':statusBarHeight+250+'px'}">
<view class="menu-content">
<v-tabs :tabs="tabs" :scroll="true" :value="current" @change="tabChange"></v-tabs>
</view>
<titleBar title="欢迎您访问一点通" v-if="isTitleFix"></titleBar>
<view :class="isFix?'sticky-fixed':'menu-content'" :style="{'top':topValue()+'px'}">
<v-tabs :tabs="tabs" :scroll="true" :value="current" @change="tabChange"></v-tabs>
</view>
<view class="app-content" :style="{'top':statusBarHeight+280+'px'}">
<view class="app-group-content">
<view class="app-group-item" v-for="(item,index) in getMenuApps()" :key="index">
<view class="title">{{item.group_name||"其他"}}</view>
......@@ -62,6 +63,7 @@
<script>
import Api from "../../api/api.js"
import StringUtils from "../../common/stringUtils.js"
import configEnv from "../../api/env.js"
export default {
data() {
return {
......@@ -94,19 +96,22 @@
},
orgName: "",
mostUsed: {},
role: "PM"
role: "PM",
isFix: false,
isTitleFix: false,
scrollTop: 0
}
},
onLoad() {
const info = uni.getSystemInfoSync()
this.statusBarHeight = info.statusBarHeight
this.role = getApp().globalData.userInfo.identity.code
this.getAppGroup()
},
onShow() {
this.getMessages()
this.getNeedDo()
uni.$once("refreshOrg", res => {
this.getAppGroup()
uni.$on("refreshOrg", res => {
this.orgName = uni.getStorageSync("org_name")
})
if (!uni.getStorageSync("org_name")) {
......@@ -117,8 +122,33 @@
}
this.getMostUsed()
},
onUnload() {
uni.$off("refreshOrg")
},
onPageScroll(e) {
//#ifdef H5
this.isFix = true
// #endif
// #ifndef H5
if (e.scrollTop > 50) {
this.isTitleFix = true
} else {
this.isTitleFix = false
}
if (this.statusBarHeight + 200 > e.scrollTop) {
this.isFix = false
} else {
this.scrollTop = e.scrollTop
this.isFix = true
}
// #endif
},
methods: {
topValue() {
return this.isFix ? (this.statusBarHeight + 40) : (this.statusBarHeight + 240)
},
getMenuApps() {
console.log("是否吸顶", this.isFix);
var menuApps = this.apps.find(item => item.app_menu == this.current + 1)
if (menuApps) {
return menuApps.list
......@@ -163,7 +193,7 @@
return
}
uni.navigateTo({
url: "/pages/mine/changeOrg/changeOrg"
url: "/pagesSub/mine/changeOrg/changeOrg"
})
},
toIndex(model) {
......@@ -181,14 +211,14 @@
if (result.code == 0) {
if (!result.data.business_type) {
uni.navigateTo({
url: `/pages/gallery/app/originalIndex/originalIndex?check_tpl_id=${model.source_id}&title=${result.data.tpl_name}`
url: `/pages/gallery/app/originalIndex/originalIndex?check_tpl_id=${model.source_id}&title=${result.data.tpl_name}&appId=${model.app_id}`
})
} else if (result.data.business_type == 2) { //独立模式 需要获取模块数量 如果只有一个模块 自动跳转表单页面 "体验嘛 呵呵"
this.toAlone(model, result.data)
} else if (result.data.business_type == 3 || result.data.business_type == 4) { //流程模式
this.models = result.data.tpl_config
uni.navigateTo({
url: `/pages/gallery/app/modeFormList/modeFormList?check_tpl_id=${model.source_id}&business_type=${result.data.business_type}&title=${result.data.tpl_name}&showCfg=${JSON.stringify(this.models[0].show_cfg)}`
url: `/pages/gallery/app/modeFormList/modeFormList?check_tpl_id=${model.source_id}&business_type=${result.data.business_type}&title=${result.data.tpl_name}&showCfg=${JSON.stringify(this.models[0].show_cfg)}&appId=${model.app_id}`
})
} else if (result.data.business_type == 5) {
var source = "1"
......@@ -197,17 +227,21 @@
} else if (this.role == 'WORKER') {
source = 9
}
if ("63e1e639e7025e13c471a9d2" == result.data.check_tpl_id) { //建筑工人沟通日
if (configEnv.jzgrAppNo == result.data.check_tpl_id) { //建筑工人沟通日
this.project_id = uni.getStorageSync("project_id")
uni.navigateTo({
url: "/pages/gallery/outPage/gdtPage/gdtPage?url=" +
`${this.$config.gtrBase}/#/loginByToken&projectId=${this.project_id}&source=${source}&token=${uni.getStorageSync("token")}&to=jzgrgtr`
})
} else if ("63e1f98420836820ca5e3c02" == result.data.check_tpl_id) {
} else if (configEnv.jyxyAppNo == result.data.check_tpl_id) {
uni.navigateTo({
url: "/pages/gallery/outPage/gdtPage/gdtPage?url=" +
`${this.$config.jyxyBase}/dologin/workSite&workSiteToken=${uni.getStorageSync("token")}&to=jypx`
})
} else if (configEnv.jfscAppNo == result.data.check_tpl_id) {
uni.navigateTo({
url: "/pagesSub/mine/myScore/myScore"
})
} else {
this.toOutPage(result.data.tpl_config[0])
}
......@@ -264,11 +298,11 @@
if (this.models.length == 1) {
let is_model_edit = this.models[0].is_edit
uni.navigateTo({
url: `/pages/gallery/app/modeFormList/modeFormList?business_type=2&check_tpl_id=${model.source_id}&check_module_id=${this.models[0].check_module_id}&title=${this.models[0].module_name}&is_edit=${is_model_edit}&showCfg=${JSON.stringify(this.models[0].show_cfg)}`
url: `/pages/gallery/app/modeFormList/modeFormList?business_type=2&check_tpl_id=${model.source_id}&check_module_id=${this.models[0].check_module_id}&title=${this.models[0].module_name}&is_edit=${is_model_edit}&showCfg=${JSON.stringify(this.models[0].show_cfg)}&appId=${model.app_id}`
})
} else {
uni.navigateTo({
url: `/pages/gallery/app/modeList/modeList?check_tpl_id=${model.source_id}&title=${info.tpl_name}`
url: `/pages/gallery/app/modeList/modeList?check_tpl_id=${model.source_id}&title=${info.tpl_name}&appId=${model.app_id}`
})
}
},
......@@ -615,16 +649,24 @@
}
.menu-content {
position: absolute;
width: 100%;
}
.sticky-fixed {
width: 100%;
position: fixed;
top: 0;
z-index: 999;
}
.app-content {
position: absolute;
display: flex;
padding-bottom: 85px;
flex-direction: column;
.menu-content {
display: flex;
}
.app-group-content {
display: flex;
flex-direction: column;
......@@ -652,6 +694,7 @@
.item {
display: flex;
margin-top: 20rpx;
flex-direction: column;
align-items: center;
justify-content: center;
......
<template>
<view class="content">
<titleBar title="消息中心"></titleBar>
<v-tabs :tabs="tabs" :scroll="true" :value="current" @change="tabChange"></v-tabs>
<view class="tab-content">
<v-tabs :tabs="tabs" :scroll="true" :value="current" @change="tabChange"></v-tabs>
<view class="t-allRead" @click="clickAllRead">
<image src="../../../static/brush-ic.png" class="image"></image>
<text class="text">一键已读</text>
</view>
</view>
<view class="list-content" v-if="list.length>0">
<view v-for="(item,index) in list" :key="index" class="list-item" @click="itemClick(index,item)">
<view class="red-dot" v-if="!item.readStatus"></view>
......@@ -56,14 +63,25 @@
// })
},
setRead(item) {
var list = []
list.push(item)
Api.setMessageRead({
data: item
data: list
}).then((result) => {
uni.navigateTo({
url: "/pages/gallery/messageDetail/messageDetail?message=" + JSON.stringify(item)
})
})
},
clickAllRead() {
var array = this.list.filter(item => !item.readStatus).map(item => item.readStatus = true)
console.log("处理完数组", array);
Api.setMessageRead({
data: array
}).then((result) => {
this.getMessages()
})
},
tabChange(e) {
console.log("tab切换", e);
this.current = e
......@@ -100,6 +118,37 @@
display: flex;
flex-direction: column;
.tab-content {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
.t-allRead {
display: flex;
background-color: #FFFFFF;
flex-direction: row;
padding: 10rpx 20rpx;
margin-right: 30rpx;
border-radius: 24rpx;
align-items: center;
image {
width: 26rpx;
height: 26rpx;
}
text {
font-family: "PingFang SC";
font-weight: 400;
font-size: 12px;
margin-left: 10rpx;
text-align: center;
color: #666;
}
}
}
.list-content {
display: flex;
flex-direction: column;
......
......@@ -32,7 +32,7 @@
<image src="../../../static/add-ic.png" class="del" @click="toAdd(app,index,appIndex)">
</image>
</view>
<view class="text">{{nameLengthDeal(app.app_name)}}</view>
<view class="text">{{app.app_name}}</view>
</view>
</view>
</view>
......@@ -365,6 +365,7 @@
.app-list {
display: flex;
margin-top: 30rpx;
flex-wrap: wrap;
flex-direction: row;
.menu-item {
......@@ -398,9 +399,19 @@
}
.text {
width: 120rpx;
margin-top: 20rpx;
text-align: center;
font-weight: 400;
font-size: 24rpx;
color: #333;
margin-top: 10rpx;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
word-wrap: break-word;
white-space: normal !important;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
}
}
......
......@@ -44,12 +44,14 @@
},
id: "",
text: "",
clientId: ""
clientId: "",
isComp: 0
}
},
onLoad(options) {
this.id = options.id
this.clientId = options.clientId
this.isComp = options.isComp
this.getNewDetail()
},
methods: {
......@@ -64,7 +66,7 @@
toLinkDetail(item) {
uni.navigateTo({
url: "/pages/index/newDetail/newDetail?id=" + item.articleLibraryId + "&clientId=" + this
.clientId
.clientId + "&isComp=" + this.isComp
})
},
onEditorReady(content) {
......@@ -95,12 +97,20 @@
return text
},
getNewDetail() {
Api.getNewDetail({
data: {
var data = {
articleLibraryId: this.id,
projectId: uni.getStorageSync("project_id") || "",
clientId: this.clientId
}
if (this.isComp == 1) {
data = {
articleLibraryId: this.id,
projectId: uni.getStorageSync("project_id") || "",
orgId: uni.getStorageSync("org_id") || "",
clientId: this.clientId
}
}
Api.getNewDetail({
data: data
}).then((result) => {
if (result.code == 0) {
this.list = []
......
......@@ -33,12 +33,15 @@
clientId: 2,
key: "",
projectId: "",
title: "工地头条"
title: "工地头条",
isComp: 0
}
},
onLoad(option) {
this.clientId = option.clientId
this.projectId = option.projectId
this.isComp = option.isComp
console.log("是否企业级", this.isComp);
this.getNews()
if (this.clientId == 1) {
this.title = "新闻公告"
......@@ -84,7 +87,7 @@
toLinkDetail(item) {
uni.navigateTo({
url: "/pages/index/newDetail/newDetail?id=" + item.articleLibraryId + "&clientId=" + this
.clientId
.clientId + "&isComp=" + this.isComp
})
},
search(e) {
......@@ -93,31 +96,59 @@
this.getNews()
},
getNews() {
Api.getNews({
data: {
pageNum: this.page,
pageSize: this.pageSize,
clientId: this.clientId,
title: this.key,
projectId: this.projectId
}
}).then((result) => {
uni.stopPullDownRefresh()
if (result.code == 0) {
let list = result.data.list
if (list.length == this.pageSize) {
this.isHasMore = true
if (this.isComp == 1) {
Api.getCompanyNews({
data: {
pageNum: this.page,
pageSize: this.pageSize,
clientId: this.clientId,
title: this.key,
orgId: uni.getStorageSync("org_id")
}
}).then((result) => {
uni.stopPullDownRefresh()
if (result.code == 0) {
let list = result.data.list
if (list.length == this.pageSize) {
this.isHasMore = true
} else {
this.isHasMore = false
}
if (this.page == 1) {
this.list = []
}
this.list = this.list.concat(list)
} else {
this.isHasMore = false
this.$toast.showToast(result.msg)
}
if (this.page == 1) {
this.list = []
})
} else {
Api.getNews({
data: {
pageNum: this.page,
pageSize: this.pageSize,
clientId: this.clientId,
title: this.key,
projectId: this.projectId
}
this.list = this.list.concat(list)
} else {
this.$toast.showToast(result.msg)
}
})
}).then((result) => {
uni.stopPullDownRefresh()
if (result.code == 0) {
let list = result.data.list
if (list.length == this.pageSize) {
this.isHasMore = true
} else {
this.isHasMore = false
}
if (this.page == 1) {
this.list = []
}
this.list = this.list.concat(list)
} else {
this.$toast.showToast(result.msg)
}
})
}
}
}
}
......
<template>
<view class="login-parent">
<titleBar title="微信绑定"></titleBar>
<view class="login-content">
<view class="login-logo" v-if="false">
<image src="../../static/logo.png"></image>
</view>
<view class="login-app-name" v-if="false">
<text>{{appName}}</text>
</view>
<view class="login-layout">
<view class="login-account">
<text>账号</text>
<input placeholder="输入账号" type="text" v-model="account" />
</view>
<view class="login-password">
<text>密码</text>
<input placeholder="输入密码" password="true" v-model="password" />
</view>
</view>
<button @click="bindLogin">绑定</button>
<button @click="register">注册</button>
</view>
</view>
</template>
<script>
import Api from "../../../api/api.js"
export default {
data() {
return {
password: "",
account: "",
unique_token: "",
appName: uni.getStorageSync("application_name") === "" ? "" : uni.getStorageSync("application_name"),
appLogo: uni.getStorageSync("application_name") === "" ? "" : uni.getStorageSync("version_pic")
}
},
onLoad: function(option) {
this.unique_token = option.unique_token
},
methods: {
register: function() {
uni.navigateTo({
url: `/pages/login/register/register?unique_token=${this.unique_token}&type=bind`
})
},
bindLogin() {
if (this.account == "") {
uni.showToast({
title: "请输入账号",
duration: 1000,
icon: 'none',
})
return
}
if (this.password == "") {
uni.showToast({
title: "请输入密码",
duration: 1000,
icon: 'none',
})
return
}
Api.authLogin({
data: {
"unique_token": this.unique_token,
"user_no": this.isQuick ? this.phone : this.account,
"third_type": 1
},
}).then((result) => {
console.log("登录用户信息:", result);
if (result.code === 0) {
uni.setStorageSync('isCanUse', false); //记录是否第一次授权 false:表示不是第一次授权
uni.setStorageSync("short_token", result.data.short_token)
uni.setStorageSync("token", result.data.access_token)
uni.setStorageSync("user_info", result.data)
uni.showToast({
title: "授权登录成功",
icon: 'none'
})
uni.switchTab({
url: "/pages/index/index"
})
} else {
uni.showToast({
title: result.msg,
icon: 'none'
})
}
})
},
}
}
</script>
<style lang="scss">
.login-parent {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.login-content {
width: 100%;
display: flex;
margin-top: 100px;
flex-direction: column;
align-items: center;
justify-content: center;
button {
background-color: #007AFF;
width: 70%;
color: #FFFFFF;
margin-top: 30px;
}
.login-logo {
image {
width: 80px;
height: 80px;
}
}
.login-app-name {
margin-top: 10px;
text {
font-size: 16px;
color: #333333;
}
}
.login-type {
display: flex;
height: 50px;
flex-direction: row;
padding: 20px;
align-items: center;
justify-content: center;
margin-top: 80px;
.line {
width: 20px;
display: flex;
align-items: center;
justify-content: center;
color: #E5E5E5;
}
.login-type-select {
font-size: 16px;
color: #1890FF;
}
.login-type-unselect {
font-size: 16px;
color: #333333;
}
}
.login-layout {
margin-top: 30px;
display: flex;
width: 70%;
flex-direction: column;
.login-account {
display: flex;
width: 100%;
align-items: center;
flex-direction: row;
flex-wrap: nowrap;
text {
font-size: 14px;
color: #333333;
}
input {
flex: 1;
padding: 5px;
margin-left: 10px;
font-size: 14px;
border-bottom: 1px solid #555555;
color: #333333;
}
}
.login-password {
margin-top: 20px;
display: flex;
align-items: center;
width: 100%;
flex-direction: row;
flex-wrap: nowrap;
input {
padding: 5px;
flex: 1;
margin-left: 10px;
font-size: 14px;
border-bottom: 1px solid #555555;
color: #333333;
}
text {
font-size: 14px;
color: #333333;
}
.login-code {
font-size: 12px;
color: #1890FF;
padding: 5px 10px;
border-radius: 2px;
}
}
}
}
}
</style>
<template>
<view class="content">
<titleBar title="切换组织"></titleBar>
<view class="org-content">
<view class="org-list">
<view class="org-item" v-for="(item,index) in list" :key="index">
<view class="org">
<view class="name">{{item.org_name}}</view>
<view class=" enter" @click="itemClick(item)">{{isCurrent(item)?"当前组织":"进入"}}</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import Api from "../../../api/api.js"
export default {
data() {
return {
list: []
}
},
onLoad() {
this.getCompany()
},
methods: {
getCompany() {
Api.getCompany({
data: {
is_page: 0,
}
}).then((result) => {
console.log("单位列表", result);
if (result.code == 0) {
this.list = result.data.list
}
})
},
isCurrent(item) {
return item.company_id == uni.getStorageSync("company_id")
},
itemClick: function(item) {
if (this.isCurrent()) {
return
}
let that = this
uni.showModal({
title: '提示',
content: '确定切换到该单位?',
showCancel: true,
confirmText: "切换",
confirmColor: '#1890FF',
success: res => {
if (res.confirm) {
that.switchCompany(item)
}
}
})
},
switchCompany: function(company) {
this.$http.consolePut({
url: "/api/v1/user/user/switch_company",
data: {
company_id: company.company_id
},
header: {
access_token: this.getToken()
}
}).then((res) => {
let result = res.data
if (result.code == 0) {
uni.setStorageSync("token", result.data.access_token)
uni.setStorageSync("refresh_token", result.data.refresh_token)
uni.setStorageSync("company_id", company.company_id)
this.currentCompany = company
uni.setStorageSync("user_info", result.data)
this.getUserInfo()
} else {
this.$toast.showToast(result.msg)
}
})
},
getUserInfo() {
Api.getUserInfo().then((result) => {
if (result.code == 0) {
getApp().globalData.userInfo = result.data
uni.navigateBack({
delta: 1
})
} else {
this.$toast.showToast(result.msg)
}
})
},
}
}
</script>
<style lang="scss">
.content {
display: flex;
flex-direction: column;
.org-content {
display: flex;
flex-direction: column;
margin: 30rpx;
}
.org-item {
padding: 30rpx 0 30rpx 30rpx;
display: flex;
flex-direction: column;
border-radius: 30rpx;
background-color: #fff;
}
.org {
display: flex;
flex-direction: row;
align-items: center;
image {
width: 48rpx;
height: 24rpx;
}
.name {
font-size: 28rpx;
color: #333;
margin-left: 20rpx;
flex: 1;
font-weight: 500;
}
.enter {
font-size: 28rpx;
margin-right: 30rpx;
color: #3B73FE;
font-weight: 600;
}
}
}
</style>
......@@ -6,34 +6,35 @@
<view class="info-content" :style="{top:statusBarHeight+45+'px'}">
<image src="../../static/mine-bg.png" class="image"></image>
<view class="company">{{currentJob.org_name||""}}</view>
<view class="name">{{userInfo.user.user_name||""}} {{currentJob.job_name||""}}</view>
<view class="name">{{userInfo.user.user_name||""}}</view>
<view class="job">{{currentJob.job_name||""}}</view>
<view class="project">{{currentJob.dept_name||""}}</view>
<image src="../../static/avatar-def.png" class="avatar"></image>
</view>
</view>
<view class="func-content" :style="{top:statusBarHeight+230+'px'}">
<view class="item" v-if="isShow('项目信息')" @click="linkTo('/pages/mine/projectInfo/projectInfo')">
<view class="func-content" :style="{top:statusBarHeight+250+'px'}">
<view class="item" v-if="isShow('项目信息')" @click="linkTo('/pagesSub/mine/projectInfo/projectInfo')">
<view class="name">项目信息</view>
<image src="../../static/right-arrow.png" class="image"></image>
</view>
<view class="line" v-if="isShow('项目信息')"></view>
<view class="item" v-if="false" @click="linkTo('/pages/mine/projectHistory/projectHistory')">
<view class="item" v-if="false" @click="linkTo('/pagesSub/mine/projectHistory/projectHistory')">
<view class="name">项目过往</view>
<image src="../../static/right-arrow.png" class="image"></image>
</view>
<view class="line" v-if="false"></view>
<view class="item" @click="linkTo('/pages/mine/myApproval/myApproval')" v-if="isShow('我的审批')">
<view class="item" @click="linkTo('/pagesSub/mine/myApproval/myApproval')" v-if="isShow('我的审批')">
<view class="name">我的审批</view>
<view class="red-dot" v-if="count>0"></view>
<image src="../../static/right-arrow.png" class="image"></image>
</view>
<view class="line" v-if="isShow('我的审批')"></view>
<view class="item" @click="linkTo('/pages/mine/myScore/myScore')" v-if="isShow('我的积分')">
<view class="item" @click="linkTo('/pagesSub/mine/myScore/myScore')" v-if="isShow('我的积分')">
<view class="name">我的积分</view>
<image src="../../static/right-arrow.png" class="image"></image>
</view>
<view class="line" v-if="isShow('我的积分')"></view>
<view class="item" @click="linkTo('/pages/login/joinOrg/joinOrg')" v-if="isShow('加入组织')">
<view class="item" @click="linkTo('/pagesSub/login/joinOrg/joinOrg')" v-if="isShow('加入组织')">
<view class="name">加入组织</view>
<image src="../../static/right-arrow.png" class="image"></image>
</view>
......@@ -41,7 +42,7 @@
<view class="version-content">
<text class="text">当前版本:v1.0.0</text>
</view>
<view class="btn-org" @click="linkTo('/pages/mine/changeCompany/changeCompany')" v-if="role!='VISITOR'">
<view class="btn-org" @click="linkTo('/pagesSub/mine/changeCompany/changeCompany')" v-if="role!='VISITOR'">
<text class="text">切换组织</text>
</view>
<view class="btn-logout" @click="toLinkLogin">
......@@ -96,6 +97,9 @@
return this.role == 'VISITOR'
}
if (name == '项目信息') {
if (this.userInfo.user.dept_type != 2) { //企业级不显示项目
return false
}
if (this.role == 'PM') {
return true
} else if (this.role == 'WORKER') {
......@@ -250,17 +254,27 @@
font-weight: 500;
font-size: 28rpx;
left: 72rpx;
top: 100rpx;
top: 80rpx;
text-align: center;
color: #333;
}
.name {
position: absolute;
font-weight: 600;
font-size: 28rpx;
left: 72rpx;
top: 140rpx;
text-align: center;
color: #333;
}
.job {
position: absolute;
font-weight: 400;
font-size: 28rpx;
left: 72rpx;
top: 200rpx;
top: 180rpx;
text-align: center;
color: #333;
}
......@@ -271,7 +285,7 @@
font-size: 28rpx;
width: 630rpx;
left: 72rpx;
top: 245rpx;
top: 235rpx;
text-align: left;
color: #333;
display: -webkit-box;
......
......@@ -25,6 +25,7 @@
</template>
<script>
import configEnv from "../../api/env.js"
export default {
data() {
return {
......@@ -96,7 +97,7 @@
if (res.data.code === 0) {
let list = res.data.data.list
list.forEach((item) => {
if (item.app_no == "20230207002") {
if (item.app_no == configEnv.labourAppNo) {
this.apps.push(item)
}
})
......@@ -112,7 +113,7 @@
uni.navigateTo({
url: `/pages/monitor/zhgdMonitor/zhgdMonitor?type=${this.type}&project_id=${this.project_id}&project_name=${this.orgName}`
})
} else if (app.app_no == "20230207002") {
} else if (app.app_no == configEnv.labourAppNo) {
uni.navigateTo({
url: `/pages/monitor/labourMonitor/labourMonitor?type=${this.type}&project_id=${this.project_id}&project_name=${this.orgName}`
})
......
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>
<template>
<view class="content">
<titleBar title="切换组织"></titleBar>
<view class="org-content">
<view class="org-list">
<view class="org-item" v-for="(item,index) in list" :key="index">
<view class="org" @click="imgClici(item,index)">
<image :src="setImageSrc(item.isOpen)" :class="item.isOpen?'o-image':'c-image'"></image>
<view class="name">{{item.org_name}}</view>
<view class="enter">{{isCurrent(item)?"当前组织":""}}</view>
</view>
<view class="job-content" v-if="item.isOpen">
<view class="j-item" v-for="(job,jIndex) in item.job_list" :key="jIndex"
@click="jobSel(item,job)">
<view class="j-name">
{{job.dept_name}}-{{job.job_name}}
</view>
<image :src="setSelImage(job)" class="image"></image>
</view>
</view>
</view>
</view>
</view>
<view class="uni-group-button">
<view class="uni-blue-button" @click="toSwitch">确认切换该组织/岗位</view>
</view>
</view>
</template>
<script>
import Api from "../../../api/api.js"
export default {
data() {
return {
list: [],
currentJob: 0,
currentCompany: {}
}
},
onLoad() {
this.getCompany()
var userInfo = getApp().globalData.userInfo
this.currentCompany = {
company_id: userInfo.user.comp_id
}
var jobs = userInfo.user.job_list
this.currentJob = jobs[0]
},
methods: {
imgClici(item, index) {
item.isOpen = !item.isOpen
this.$set(this.list, index, item)
},
jobSel(item, job) {
this.currentCompany = item
this.currentJob = job
},
setSelImage(job) {
return this.isCurrentJob(job) ? '../../../static/sel-ic.png' : '../../../static/unselected-ic.png'
},
setImageSrc(isOpen) {
return isOpen ? '../../../static/icon_drop_arrow.png' : '../../../static/right-arrow.png'
},
getCompany() {
Api.getCompanyJobList({
data: {
is_page: 0,
}
}).then((result) => {
console.log("单位列表", result);
if (result.code == 0) {
var list = result.data.list
if (list) {
list.forEach((item) => {
if (this.isCurrent(item)) {
item.isOpen = true
} else {
item.isOpen = false
}
this.list.push(item)
})
}
}
})
},
isCurrent(item) {
var orgId = uni.getStorageSync("org_id")
console.log("当前org_id:" + orgId, "条目的org_id:" + item.org_id);
return item.org_id == orgId && item.company_id == this.currentCompany.company_id
},
isCurrentJob(job) {
return job.job_id == this.currentJob.job_id
},
toSwitch() {
var userInfo = getApp().globalData.userInfo
var jobs = userInfo.user.job_list
if (this.currentJob.job_id == jobs[0].job_id) { //没有任何变化 直接返回
uni.navigateBack({
delta: 1
})
} else {
let that = this
uni.showModal({
title: '提示',
content: '确定切换到该岗位',
showCancel: true,
confirmText: "切换",
confirmColor: '#3B73FE',
success: res => {
if (res.confirm) {
that.switchCompany()
}
}
})
}
},
switchCompany() {
this.$http.consolePut({
url: "/api/v1/user/user/switch_company",
data: {
company_id: this.currentCompany.company_id
},
header: {
access_token: this.getToken()
}
}).then((res) => {
let result = res.data
if (result.code == 0) {
// this.getUserInfo()
uni.setStorageSync("token", result.data.access_token)
uni.setStorageSync("short_token", result.data.short_token)
uni.setStorageSync("user_info", result.data)
uni.setStorageSync("company_id", result.data.comp_id)
uni.setStorageSync("org_no", result.data.org_no)
uni.setStorageSync("org_id", result.data.org_id)
if (this.currentJob.job_id != result.data.job_id) {
this.switchJob()
} else {
getApp().globalData.isInit = true
uni.switchTab({
url: "/pages/index/index"
})
}
} else {
this.$toast.showToast(result.msg)
}
})
},
switchJob() {
Api.switchJob({
data: {
job_id: this.currentJob.job_id
}
}).then((result) => {
console.log("切换岗位", result);
if (result.code == 0) {
uni.setStorageSync("token", result.data.access_token)
uni.setStorageSync("short_token", result.data.short_token)
uni.setStorageSync("user_info", result.data)
uni.setStorageSync("company_id", result.data.comp_id)
uni.setStorageSync("org_no", result.data.org_no)
uni.setStorageSync("org_id", result.data.org_id)
console.log("当前组织id", uni.getStorageSync("org_id"));
getApp().globalData.isInit = true
uni.switchTab({
url: "/pages/index/index"
})
} else {
this.$toast.showToast(result.msg)
}
})
},
getUserInfo() {
Api.getUserInfo().then((result) => {
if (result.code == 0) {
getApp().globalData.userInfo = result.data
uni.navigateBack({
delta: 1
})
} else {
this.$toast.showToast(result.msg)
}
})
},
}
}
</script>
<style lang="scss">
.content {
display: flex;
flex-direction: column;
.org-content {
display: flex;
flex-direction: column;
margin: 30rpx;
}
.org-item {
margin-bottom: 30rpx;
padding: 30rpx 0 30rpx 30rpx;
display: flex;
flex-direction: column;
border-radius: 30rpx;
background-color: #fff;
.org {
display: flex;
flex-direction: row;
align-items: center;
.c-image {
width: 15rpx;
height: 24rpx;
}
.o-image {
width: 48rpx;
height: 24rpx;
}
.name {
font-size: 28rpx;
color: #333;
margin-left: 20rpx;
flex: 1;
font-weight: 500;
}
.enter {
font-size: 28rpx;
margin-right: 30rpx;
color: #3B73FE;
font-weight: 600;
}
}
.job-content {
display: flex;
flex-direction: column;
margin-left: 40rpx;
.j-item {
padding: 30rpx 30rpx 0 30rpx;
display: flex;
align-items: center;
flex-direction: row;
.j-name {
width: 500rpx;
display: -webkit-box;
font-weight: 400;
font-size: 14px;
color: #333;
// overflow: hidden;
// white-space: nowrap;
// word-wrap: break-word;
// text-overflow: ellipsis;
// white-space: normal !important;
// -webkit-line-clamp: 1;
// -webkit-box-orient: vertical;
}
image {
margin-left: 30rpx;
width: 40rpx;
height: 40rpx;
}
}
}
}
}
</style>
......@@ -4,16 +4,25 @@
<view class="search">
<view class="search-content">
<image src="../../../static/ic-search.png" class="image"></image>
<input placeholder="搜索" placeholder-class="placeholderStyle" @input="search" class="inputStyle" />
<input placeholder="搜索" placeholder-class="placeholderStyle" @input="search" class="inputStyle"
v-model="key" />
</view>
</view>
<view class="org-content">
<ly-tree :tree-data="trees" :props="treeProps" node-key="id" @node-expand="handleNodeExpand"
@node-click="handleNodeClick" :showRadio="true" ref="tree" :defaultCheckedKeys="currentKeys"
:defaultExpandedKeys="currentKeys" childVisibleForFilterNode="true" :filter-node-method="filterNode"
:checkOnClickNode="true" :childVisibleForFilterNode="true">
</ly-tree>
<view class="uni-group-button">
<view class="uni-blue-button" @click="toSwitch">确认切换该组织</view>
</view>
<!-- 暂时处理 -->
<view class="org-content" v-if="false">
<view class="org-list">
<view class="org-item" v-for="(tree,index) in trees" :key="index">
<view class="org">
<image
:src="tree.isOpen?'../../../static/icon_up_arrow.png':'../../../static/icon_drop_arrow.png'"
class="image" @click="toNextLevel(tree,index)">
<image v-if="isImgShow(tree)" :src="setImgSrc(tree)" class="image"
@click="toNextLevel(tree,index)">
</image>
<view class="name" @click="toNextLevel(tree,index)">{{tree.name}}</view>
<view class=" enter" @click="itemClick(tree)">进入</view>
......@@ -21,10 +30,8 @@
<view v-if="tree.isOpen" style="margin-top: 20rpx;">
<view class="org-item" v-for="(oneLevel,oneIndex) in tree.children_list" :key="oneIndex">
<view class="org">
<image
v-if="!oneLevel.project_id&&oneLevel.children_list&&oneLevel.children_list.length>0"
:src="oneLevel.isOpen?'../../../static/icon_up_arrow.png':'../../../static/icon_drop_arrow.png'"
class="image" @click="toNextChild(index,oneLevel,oneIndex)"></image>
<image v-if="isImgShow(oneLevel)" :src="setImgSrc(oneLevel)" class="image"
@click="toNextChild(index,oneLevel,oneIndex)"></image>
<view class="name" @click="toNextChild(index,oneLevel,oneIndex)">{{oneLevel.name}}
</view>
<view class="enter" @click="itemClick(oneLevel)">进入</view>
......@@ -51,14 +58,74 @@
export default {
data() {
return {
key: "",
trees: [],
temp: []
temp: [],
treeProps: function() {
return {
label: 'name', // 指把数据中的‘personName’当做label也就是节点名称
children: 'children_list' // 指
}
},
currentKeys: []
}
},
onLoad() {
var currentId = uni.getStorageSync("org_id")
if (currentId) {
this.currentKeys.push(currentId)
}
console.log("当前选中", this.currentKey);
this.getOrgTree()
},
watch: {
key(val) {
this.$refs.tree.filter(val);
}
},
methods: {
handleNodeClick(obj) {
// console.log('handleNodeClick', obj);
},
handleNodeExpand(obj) {
},
filterNode(value, data) {
if (!value) return true;
return data.name.indexOf(value) != -1;
},
toSwitch() {
var node = this.$refs.tree.getCheckedNodes()
if (node.length < 0) {
this.$toast.showToast("请选择切换的组织")
return
}
let that = this
uni.showModal({
title: '提示',
content: '确定切换到该组织?',
showCancel: true,
confirmText: "切换",
confirmColor: '#3B73FE',
success: res => {
if (res.confirm) {
that.switchOrg(node[0])
}
}
})
},
setImgSrc(item) {
return item.isOpen ? '../../../static/icon_up_arrow.png' : '../../../static/icon_drop_arrow.png'
},
isImgShow(level) {
if (level.project_id) {
return false
}
if (level.children_list && level.children_list.length > 0) {
return true
}
return false
},
dealProject(list) {
var projects = []
list.forEach((item) => {
......@@ -73,7 +140,8 @@
Api.getOrgTree({
data: {
company_id: uni.getStorageSync("company_id"),
org_no: getApp().globalData.userInfo.user.org_no
org_no: getApp().globalData.userInfo.user.org_no,
show_current_level: 1
}
}).then((result) => {
console.log("组织树", result);
......@@ -85,11 +153,11 @@
item.dept_no == getApp().globalData.userInfo.user.dept_no
)
} else {
if (list[0].no == '001') {
this.trees = list[0].children_list
} else {
this.trees = list
}
// if (list[0].no == '001') {
// this.trees = list[0].children_list
// } else {
this.trees = list
// }
}
this.temp = list[0].children_list
}
......@@ -155,65 +223,6 @@
delta: 1
})
},
search(e) {
var key = e.detail.value
if (key) {
var list = []
var sourceData = this.temp
console.log("数据源", sourceData);
sourceData.forEach((item) => {
if (item.name.indexOf(key) != -1) {
item.isOpen = true
list.push(item)
} else {
var children = item.children_list
var childrens = []
if (children) {
children.forEach((child) => {
if (child.name.indexOf(key) != -1) {
child.isOpen = true
var childs = child.children_list
var childList = []
if (childs) {
childs.forEach((childItem) => {
if (childItem.name.indexOf(key) != -1) {
childList.push(childItem)
}
})
}
child.children_list = childList
childrens.push(child)
} else {
var childs = child.children_list
var childList = []
if (childs) {
childs.forEach((childItem) => {
if (childItem.name.indexOf(key) != -1) {
childList.push(childItem)
}
})
}
if (childList.length > 0) {
child.children_list = childList
child.isOpen = true
childrens.push(child)
}
}
})
}
if (childrens.length > 0) {
item.isOpen = true
item.children_list = childrens
list.push(item)
}
}
})
this.trees = list
} else {
this.getOrgTree()
}
}
}
}
</script>
......@@ -227,7 +236,7 @@
display: flex;
flex-direction: row;
align-items: center;
margin: 30rpx 30rpx 0 30rpx;
margin: 30rpx;
.search-content {
display: flex;
......
......@@ -69,6 +69,7 @@
uni.showModal({
title: '提示',
content: '是否取消兑换',
confirmColor: '#3B73FE',
success: (res) => {
if (res.confirm) {
Api.cancelExchange({
......@@ -94,6 +95,7 @@
uni.showModal({
title: '提示',
content: '是否确认领取',
confirmColor: '#3B73FE',
success: (res) => {
if (res.confirm) {
Api.confirmReceive({
......
<template>
<view class="history-score">
<titleBar title="历史积分明细"></titleBar>
<view class="choose-date">
<uni-datetime-picker @change="toggleDate" returnType="string" v-model="requestParam.time" type="date">
</uni-datetime-picker>
</view>
<view class="current-score">
<view class="score">
<view class="date">
{{requestParam.time}}当日积分
</view>
<view class="value">
+{{scoreDetail.current_integral||'0'}}
</view>
</view>
<view class="date">
</view>
</view>
<view class="score-list">
<view class="score-list-item" v-for="(item,index) in scoreDetail.listData" :key="index">
<text class="time">{{item.time}}</text>
<text class="desc">{{item.item_name}}</text>
<text class="score">+{{item.integral}}</text>
</view>
</view>
</view>
</template>
<script>
import Api from "../../../api/api.js"
export default {
data() {
return {
userInfo: {},
project: {},
requestParam: {
project_id: '',
time: '',
worker_id: ''
},
scoreDetail: {
listData: []
}
}
},
onShow() { //监听页面显示
this.userInfo = getApp().globalData.userInfo
this.project_id = this.userInfo.currentProject.projectId
let date = new Date()
let year = date.getFullYear()
let month = date.getMonth() + 1
let day = date.getDate()
this.requestParam.time = year + '-' + month + '-' + day
this.requestParam.worker_id = this.userInfo.worker.workerId || ''
this.requestParam.project_id = this.project_id || ''
this.getScoreDetail() //暂时先注释掉02.16
},
methods: {
// 切换时间
toggleDate(date) {
this.requestParam.time = date
this.getScoreDetail()
},
// 获取积分数据
getScoreDetail() {
Api.getUserScore({
data: this.requestParam
}).then(res => {
if (res.code === 0) {
this.scoreDetail = res.data
}
}, (err) => {
this.$toast.showToast(err.msg)
})
},
}
}
</script>
<style lang="scss">
.history-score {
.current-score {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
margin: 0 32rpx;
background-color: #FAFAFA;
margin-top: 32rpx;
.score {
color: #666;
font-size: 24rpx;
}
.value {
color: #333;
font-size: 48rpx;
font-weight: bold;
}
.date {}
}
.choose-date {
padding: 0 30rpx;
margin: 30rpx 0 0 0;
}
.score-list {
display: flex;
flex-direction: column;
margin: 30rpx;
background-color: #FAFAFA;
.score-list-item {
display: flex;
justify-content: space-between;
align-items: center;
height: 104rpx;
padding: 0 30rpx;
position: relative;
border-bottom: 1px solid rgba($color: #999, $alpha: 0.5);
&:last-child {
.line {
display: none;
}
}
// .circle{
// border:1px solid #1890ff;
// border-radius: 50%;
// background-color: #FFFFFF;
// width: 20rpx;
// height: 20rpx;
// }
// .line{
// position: absolute;
// width: 2rpx;
// height:100rpx;
// background-color: #000;
// left: 10rpx;
// opacity: 0.5;
// bottom: -90rpx;
// }
.time {
font-size: 28rpx;
color: #666;
}
.desc {
font-size: 28rpx;
color: #666;
width: 250rpx;
}
.score {
font-size: 28rpx;
color: #333;
width: 60rpx;
text-align: right;
}
}
}
}
</style>
......@@ -7,7 +7,9 @@
<image src="../../../static/ic-coin.png" class="image"></image>
<view class="score-count-content">
<view class="count">{{scoreDetail.integral||0}}</view>
<view class="unit">积分</view>
<view class="s-detail" @click="toDetail">
<view class="unit">积分详情</view>
</view>
</view>
<view class="history-content" @click="toHistory">
<text class="text">兑换历史</text>
......@@ -89,6 +91,11 @@
this.getScoreDetail()
},
methods: {
toDetail() {
uni.navigateTo({
url: "/pagesSub/mine/scoreDetail/scoreDetail"
})
},
getScoreDetail() {
var date = new Date()
Api.getUserScore({
......@@ -129,7 +136,7 @@
},
toHistory() {
uni.navigateTo({
url: "/pages/mine/historyScore/historyScore"
url: "/pagesSub/mine/historyScore/historyScore"
})
},
leftList() {
......@@ -244,12 +251,24 @@
font-weight: bold;
}
.unit {
font-size: 28rpx;
color: #fff;
.s-detail {
width: 136rpx;
height: 48rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 24rpx;
margin-left: 20rpx;
font-weight: 400;
background: #fff;
.unit {
font-size: 24rpx;
color: #3b73fe;
font-family: "PingFang SC";
font-weight: 400;
}
}
}
.history-content {
......
......@@ -33,7 +33,7 @@
<view class="line"></view>
<view class="item">
<view class="item-name">详细地址:</view>
<view class="item-value" style="width: 488rpx;">{{project.address||""}}</view>
<text class="item-value" style="width: 488rpx;">{{project.address||""}}</text>
</view>
<view class="line"></view>
<view class="item">
......@@ -79,12 +79,17 @@
markers: []
}
},
onLoad() {
this.role = getApp().globalData.userInfo.identity.code
if (this.role == 'WORKER') {
this.projectId = getApp().globalData.userInfo.worker.projectId
onLoad(options) {
var from = options.from
if (from && from == 'qrcode') {
this.projectId = options.projectId
} else {
this.projectId = uni.getStorageSync("project_id")
this.role = getApp().globalData.userInfo.identity.code
if (this.role == 'WORKER') {
this.projectId = getApp().globalData.userInfo.worker.projectId
} else {
this.projectId = uni.getStorageSync("project_id")
}
}
this.getProjectInfo()
},
......@@ -242,6 +247,7 @@
.item-value {
font-weight: 400;
font-size: 28rpx;
text-align: right;
color: #333;
}
......
<template>
<view class="my-score-container">
<titleBar title="积分详情"></titleBar>
<view class="score-info">
<view class="my-score">
<view class="left">
<image src="../../../static/jf-s-ic.png"></image>
<view class="detail">
<view class="text">
当前积分
</view>
<text class="score">{{scoreDetail.integral || 0}}</text>
</view>
</view>
<view class="right">
<button @click="toScoreMall" type="primary" size="mini">我要兑换</button>
</view>
</view>
<view class="score-detail">
<view class="score-item" @click="toHistoryDetail">
<view class="s-left">
<text class="name">历史积分</text>
<text class="score">{{scoreDetail.his_integral || 0}}</text>
</view>
<image src="../../../static/s-arrow-left-ic.png" class="image"></image>
</view>
<view class="score-item" @click="toExcahngeDetail">
<view class="s-left">
<text class="name">已兑换积分</text>
<text class="score">{{scoreDetail.ex_integral || 0}}</text>
</view>
<image src="../../../static/s-arrow-left-ic.png" class="image"></image>
</view>
</view>
<view class="score-btn">
<view class="b-add-score" @click="toAddScore">
<image src="../../../static/jjf-ic.png" class="image"></image>
<text class="name">我要加积分</text>
</view>
<view class="b-add-score" @click="toShare">
<image src="../../../static/s-wechat-ic.png" class="image"></image>
<button open-type="share" class="button">微信分享</button>
</view>
</view>
</view>
<view class="choose-date">
<uni-datetime-picker @change="toggleDate" returnType="string" v-model="requestParam.time" type="date">
</uni-datetime-picker>
</view>
<view class="current-score">
<view class="score">
<view class="date">
{{requestParam.time}}当日积分
</view>
<view class="value">
+{{scoreDetail.current_integral||'0'}}
</view>
</view>
<view class="date">
明细
<!-- {{requestParam.time}} -->
</view>
</view>
<view class="score-list">
<view class="score-list-item" v-for="(item,index) in scoreDetail.listData" :key="index">
<text class="time">{{item.time}}</text>
<text class="desc">{{item.item_name}}</text>
<text class="score">+{{item.integral}}</text>
</view>
</view>
</view>
</template>
<script>
import Api from "../../../api/api.js"
export default {
data() {
return {
userInfo: {},
project: {},
requestParam: {
project_id: '',
time: '',
worker_id: ''
},
scoreDetail: {
listData: [{
time: '18:00',
item_name: '签到',
integral: '10'
},
{
time: '18:00',
item_name: '签到',
integral: '10'
},
{
time: '18:00',
item_name: '签到',
integral: '10'
},
{
time: '18:00',
item_name: '签到',
integral: '10'
},
{
time: '18:00',
item_name: '签到',
integral: '10'
},
]
},
projectList: []
}
},
onShow() {
this.userInfo = getApp().globalData.userInfo
this.project_id = this.userInfo.currentProject.projectId
let date = new Date()
let year = date.getFullYear()
let month = date.getMonth() + 1
let day = date.getDate()
this.requestParam.time = year + '-' + month + '-' + day
this.requestParam.worker_id = this.userInfo.worker.workerId || ''
this.requestParam.project_id = this.project_id || ''
this.getScoreDetail()
},
methods: {
toShare() {},
toHistoryDetail() {
uni.navigateTo({
url: "/pagesSub/mine/historyScoreDetail/historyScoreDetail"
})
},
toExcahngeDetail() {
uni.navigateTo({
url: "/pagesSub/mine/historyScore/historyScore"
})
},
toAddScore() {
uni.showToast({
title: '功能开发中',
icon: 'none'
})
},
// 切换时间
toggleDate(date) {
this.requestParam.time = date
this.getScoreDetail()
},
// 获取积分数据
getScoreDetail() {
Api.getUserScore({
data: this.requestParam
}).then(res => {
if (res.code === 0) {
this.scoreDetail = res.data
}
}, (err) => {
this.$toast.showToast(err.msg)
})
},
toScoreMall() {
uni.navigateTo({
url: `/pages/ScoreMall/ScoreMall`
})
},
}
}
</script>
<style lang="scss">
.my-score-container {
.score-info {
margin: 30rpx;
padding: 30rpx;
background-color: #FFF7E6;
background-image: url(../../../static/score-bg.png);
background-size: cover;
border-radius: 30rpx;
.my-score {
display: flex;
justify-content: space-between;
.left {
display: flex;
justify-content: space-between;
align-items: center;
image {
width: 80rpx;
height: 80rpx;
}
.detail {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-start;
margin-left: 16rpx;
.text {
font-size: 24rpx;
color: #FA2616;
}
.score {
font-size: 48rpx;
color: #FA2616;
font-weight: bold;
}
}
}
.right {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
button {
background: linear-gradient(230.81deg, #fa8c16 0%, #fa2616 100%);
width: 160rpx;
height: 64rpx;
border-radius: 32rpx;
color: #fff;
font-size: 28rpx;
padding: 0;
}
}
}
.score-detail {
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: row;
margin-top: 32rpx;
.score-item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
width: 300rpx;
border-radius: 16rpx;
background-color: #FFEDC2;
height: 108rpx;
.s-left {
display: flex;
align-items: center;
margin-left: 30rpx;
flex-direction: column;
.score {
font-size: 34rpx;
color: #FF7700;
font-weight: bold;
text-align: center;
}
.name {
text-align: center;
font-size: 24rpx;
color: #FA8C16;
}
}
image {
width: 36rpx;
margin-right: 30rpx;
height: 72rpx;
}
&.add-score-container {
align-items: center;
image {
width: 40rpx;
height: 40rpx;
}
}
.add-score {
color: #FA8C16;
font-size: 24rpx;
text-align: center;
}
}
}
.score-btn {
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: row;
margin-top: 30rpx;
.b-add-score {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
width: 300rpx;
border-radius: 16rpx;
background-color: #FFF6E0;
height: 72rpx;
image {
width: 30rpx;
height: 30rpx;
}
.name {
text-align: center;
margin-left: 20rpx;
font-size: 28rpx;
color: #FF8800;
}
//js代码
.button {
background: rgba(0, 0, 0, 0); //设置背景色
text-align: center;
margin: 0rpx;
font-size: 28rpx;
color: #FF8800;
}
button::after {
border: none; //去除边框
}
}
}
}
.choose-date {
padding: 0 30rpx;
}
.current-score {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx;
margin: 0 32rpx;
background-color: #FAFAFA;
margin-top: 32rpx;
.score {
color: #666;
font-size: 24rpx;
}
.value {
color: #333;
font-size: 48rpx;
font-weight: bold;
}
.date {}
}
.current-project {
padding: 32rpx;
display: flex;
justify-content: space-between;
align-items: center;
.name {
font-size: 34rpx;
width: 80%;
color: #333;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.choose-project {
width: 40rpx;
height: 40rpx;
}
}
.score-list {
display: flex;
flex-direction: column;
margin: 0 32rpx;
background-color: #FAFAFA;
.score-list-item {
display: flex;
justify-content: space-between;
align-items: center;
height: 104rpx;
padding: 0 30rpx;
position: relative;
border-bottom: 1px solid rgba($color: #999, $alpha: 0.5);
&:last-child {
.line {
display: none;
}
}
// .circle{
// border:1px solid #1890ff;
// border-radius: 50%;
// background-color: #FFFFFF;
// width: 20rpx;
// height: 20rpx;
// }
// .line{
// position: absolute;
// width: 2rpx;
// height:100rpx;
// background-color: #000;
// left: 10rpx;
// opacity: 0.5;
// bottom: -90rpx;
// }
.time {
font-size: 28rpx;
color: #666;
}
.desc {
font-size: 28rpx;
color: #666;
width: 250rpx;
}
.score {
font-size: 28rpx;
color: #333;
width: 60rpx;
text-align: right;
}
}
}
}
</style>
## 1.2.3(2022-12-14)
修复外部不跳转页面修改current,组件不响应bug
## 1.2.2(2022-12-14)
新增click事件,click事件会优先于任何事件
## 1.2.1(2022-12-09)
修改文档使用说明,路由拦截有平台兼容性,暂时无法解决,平台原生不支持
## 1.2.0(2022-12-09)
新增插槽,可以自定义凸起导航,优化文档使用说明
## 1.1.9(2022-12-06)
修复iconPath图片路径为网络路径判断错误问题
## 1.1.7(2022-12-01)
优化部分机器计算错误问题
## 1.1.6(2022-12-01)
修改高度计算错误问题
## 1.1.5(2022-12-01)
修复各别设备上高度计算有误问题
## 1.1.4(2022-11-25)
修复vue2版本在微信小程序上不支持:style传入参数bug,优化参数错误逻辑
## 1.1.3(2022-11-24)
修复native模式borderStyle样式丢失问题
## 1.1.2(2022-11-24)
修改描述文档说明,修改插件描述信息
## 1.1.1(2022-11-24)
优化使用说明文档
## 1.1.0(2022-11-24)
极度简化native模式,页面只需要引入组件即可,任何操作都不需要
## 1.0.9(2022-11-24)
修复native模式下,fill忘记计算高度.
## 1.0.8(2022-11-24)
优化native模式,简化参数数量,使用更简单
## 1.0.7(2022-11-24)
新增native配置,可以兼容原生tabbar,新增beforeChange,可自行根据要求自己兼容路由守卫
## 1.0.6(2022-11-23)
修改文档描述错误
## 1.0.5(2022-11-23)
修复fill高度遗漏安全距离问题,文档使用说明优化更新
## 1.0.4(2022-11-23)
优化配置选项,提取当前选中项,新增fixed配置
## 1.0.3(2022-11-14)
添加上阴影效果,修复由于去除了上线条,造成如果内容如果是白色,tabbar会和内容高度重合的问题
## 1.0.2(2022-11-14)
修改说明文档,更加详细备注说明
## 1.0.1(2022-11-14)
新增当前选中项class名,方便用户直接样式覆盖
## 1.0.0(2022-11-14)
第一个自定义tabbar版本
<template>
<view class="m-tabbar-box" :style="tabbarBoxStyle">
<view v-if="fill || native" :style="tabbarFillStyle"></view>
<view id="m-tabbar" class="m-tabbar" :class="{'fixed': fixed || native}" :style="tabbarStyle">
<view class="m-tabbar__border" v-if="borderStyle === 'black' "></view>
<view class="m-tabbar__flex">
<view @click="tabChange(index)" v-for="(item, index) in tabbarList" :key="index" class="m-tabbar__item"
:class="{
'm-tabbar__item__active': index === currentIndex,
}">
<slot :name="`tabbar_index_${index}`">
<image :src="currentIndex === index ? item.selectedIconPath : item.iconPath"
class="m-tabbar__icon" />
<view class="m-tabbar__label"
:style="{'color': index === currentIndex ? tabbarConfig.selectedColor : tabbarConfig.color }">
{{ item.text }}
</view>
</slot>
</view>
</view>
</view>
</view>
</template>
<script>
const obj2strStyle = (obj) => {
let style = ''
for (let key in obj) {
style += `${key}:${obj[key]};`
}
return style
}
const padFirstSymbol = (str, smb) => {
if (str.startsWith(smb) || str.startsWith('http')) {
return str
}
return `/${str}`
}
const replaceTabbarList = (list) => {
if (!list.length > 0) {
return []
}
return list.map(item => {
if(item.iconPath){
item.iconPath = padFirstSymbol(item.iconPath, '/')
}
if(item.pagePath){
item.pagePath = padFirstSymbol(item.pagePath, '/')
}
if(item.selectedIconPath){
item.selectedIconPath = padFirstSymbol(item.selectedIconPath, '/')
}
return item
})
}
import PageConfig from '@/pages.json'
export default {
emits: ['change', 'click'],
props: {
current: {
type: [Number, String],
default: 0
},
tabbar: {
type: Object,
default () {
return {}
}
},
fixed: {
type: Boolean,
default: false
},
fill: {
type: Boolean,
default: false
},
zIndex: {
type: [Number, String],
default: 9999
},
native: {
type: Boolean,
default: false
},
safeBottom: {
type: Boolean,
default: true
},
beforeChange: {
type: Function,
default: null
}
},
data() {
return {
safeAreaInsetsBottom: 0,
currentIndex: 0,
tabbarHeight: 0,
beforeData: {},
}
},
watch: {
current(val) {
this.currentIndex = val * 1
}
},
computed: {
tabbarConfig() {
const {
native
} = this
if (native) {
const {
tabBar
} = PageConfig
if (!tabBar) {
console.error('Native mode, Pages.json no tabbar config')
return {
borderStyle: 'black',
list: []
}
}
return tabBar
}
return this.tabbar
},
tabbarList() {
const {
list
} = this.tabbarConfig
if(list){
return replaceTabbarList(list)
}
console.error('No tabbar config')
return []
},
borderStyle() {
const {
borderStyle
} = this.tabbarConfig
return borderStyle
},
tabbarBoxStyle() {
const {
zIndex
} = this
return obj2strStyle({
'z-index': zIndex,
})
},
tabbarFillStyle() {
const {
tabbarHeight,
safeAreaInsetsBottom
} = this
return obj2strStyle({
'height': `${tabbarHeight}rpx`,
'padding-bottom': `${safeAreaInsetsBottom}rpx`,
'opacity': 0
})
},
tabbarStyle() {
const {
safeAreaInsetsBottom
} = this
const {
backgroundColor
} = this.tabbarConfig
return obj2strStyle({
'background-color': backgroundColor || '#fff',
'padding-bottom': `${safeAreaInsetsBottom}rpx`
})
},
tabbarItemStyle() {
const {
currentIndex
} = this
const {
color,
selectedColor
} = this.tabbarConfig
return obj2strStyle({
'color': currentIndex ? selectedColor : color
})
}
},
mounted() {
const {
current,
safeBottom,
fill,
native,
tabbarList
} = this
this.currentIndex = current * 1
if (fill || native) {
this.getTabbarHeight()
}
if (native) {
const currentPage = getCurrentPages()[0].$page.fullPath
const currentIndex = tabbarList.findIndex(item => item.pagePath === currentPage)
this.currentIndex = currentIndex
if (tabbarList.length > 0) {
uni.hideTabBar()
}
}
},
methods: {
getTabbarHeight() {
const { safeBottom, native } = this
const {windowWidth, safeAreaInsets} = uni.getSystemInfoSync()
const ratio = 750 / windowWidth
if(safeBottom || native){
this.safeAreaInsetsBottom = safeAreaInsets.bottom * ratio
}
let query = wx.createSelectorQuery().in(this)
query.select('#m-tabbar').boundingClientRect(rect => {
if (rect) {
this.tabbarHeight = rect.height * ratio
}
}).exec()
},
tabChange(index) {
const {
currentIndex
} = this
this.$emit('click', index)
if (index === currentIndex) {
return
}
this.beforeData = {
newIndex: index,
oldIndex: currentIndex,
next: this.jumpPage
}
if (this.beforeChange) {
this.beforeChange(this.jumpPage)
} else {
this.jumpPage()
}
},
jumpPage() {
const {
native,
beforeData,
tabbarList: list
} = this
const {
newIndex: index
} = beforeData
if (list[index].pagePath) {
if (native) {
uni.switchTab({
url: list[index].pagePath
})
} else {
this.currentIndex = index
uni.reLaunch({
url: list[index].pagePath
})
}
}
this.$emit('change', index)
}
}
};
</script>
<style lang="scss" scoped>
.m-tabbar-box {
position: relative;
z-index: 9999;
}
.m-tabbar {
position: relative;
}
.m-tabbar.fixed {
position: fixed;
bottom: 0;
left: 0;
width: 100vw;
}
.m-tabbar__flex {
display: flex;
flex-direction: row;
}
.m-tabbar__border {
background-color: rgba(0, 0, 0, 0.33);
width: 100%;
height: 1rpx;
transform: scaleY(0.5);
}
.m-tabbar__item {
display: flex;
flex-direction: column;
align-items: center;
flex: 1;
padding: 4px 0 2px;
}
.m-tabbar__icon {
display: block;
width: 48rpx;
height: 48rpx;
margin-bottom: 6rpx;
}
.m-tabbar__label {
font-size: 24rpx;
}
</style>
{
"id": "m-tabbar",
"displayName": "自定义tabbar、tabbar路由守卫、零配置tabbar、凸起导航",
"version": "1.2.3",
"description": "自定义tabbar,超高还原原生配置模式,一行代码自定义导航,自带tabbar路由守卫功能",
"keywords": [
"自定义tabbar,tabbar,自定义标签栏,tabbar路由守卫,零配置tabbar,路由守卫、凸起导航"
],
"repository": "",
"engines": {
"HBuilderX": "^3.3.1"
},
"dcloudext": {
"type": "component-vue",
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": ""
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"Vue": {
"vue2": "y",
"vue3": "y"
},
"App": {
"app-vue": "y",
"app-nvue": "y"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y",
"钉钉": "y",
"快手": "y",
"飞书": "y",
"京东": "y"
},
"快应用": {
"华为": "y",
"联盟": "y"
}
}
}
}
}
\ No newline at end of file
# m-tabbar自定义
## 使用说明,注意事项(必看)
> 我配套上传了一个案例包,如果不会使用的,建议下载阅读使用
自定义tabbar的情况下,不建议在一个页面内通过几个组件,用v-if切换去模拟各个页面,会存在各种不可控bug
> 如果是`if切换组件`的话,就是一个页面控制多个组件显示隐藏来实现。 如果组件封装的有问题,会出现组件之间的协调问题,请看情况使用。 还有一些原生的交互没有办法达到预期,会影响到原生体验。 比如下拉刷新,滚动加载更多,切换tabbar后滚动位置不能固定等
推荐使用自带的tabbar系统,同时隐藏原生的tabbar, 再引入自定导航栏,这样可以保证原有性能,同时又能自定义tabbar
在pages.json中正常定义tabbar配置和字段,使用`native`模式,组件会自动加载pages.json配置项,并自动判断当前选中项
> native模式,你不需要传入任何配置,直接页面引入即结束
# 快速使用
## 方式一、Native模式使用(推荐)
```
// native模式,无需配置其他项
<m-tabbar native></m-tabbar>
```
在各个tabbar页面引入tabbar组件,传入属性`native``native`模式下无需任何配置
组件会默认自动通过`uni.hideTabBar()`隐藏系统tabbar
## 方式二、普通页面使用(current默认从0开始)
```
// 普通页面模式
<m-tabbar fixed fill current="1" :tabbar="tabbar"></m-tabbar>
```
配置选项和`uniapp`的配置完全相同,直接复制过来, 默认传入`pagePath`后,直接使用`reLaunch`跳转
如果不想使用自带跳转模式,可以不传入`pagePath`,自行接管事件`change`来达到当前页面tab任意切换
### 1、提取tabbar配置
新建文件config/tabbar.js(默认你有config目录,根据自己情况而定)
```
export default {
color: "#161616",
selectedColor: "#161616",
borderStyle: "black",
backgroundColor: "#ffffff",
list: [{
pagePath: "/pages/index/index",
iconPath: "/static/tabbar/index.png",
selectedIconPath: "/static/tabbar/index_active.png",
text: "首页"
}, {
pagePath: "/pages/shop/index",
iconPath: "/static/tabbar/shop.png",
selectedIconPath: "/static/tabbar/shop_active.png",
text: "门店"
}, {
pagePath: "/pages/my/index",
iconPath: "/static/tabbar/my.png",
selectedIconPath: "/static/tabbar/my_active.png",
text: "我的"
}]
}
```
### 2、引入tabbar
#### VUE2引入
```
import TabbarConfig from '@/config/tabbar.js'
export default {
data(){
return {
tabbar: TabbarConfig
}
},
onLoad(){
// 没有开启native模式下,使用reLaunch跳转,会存在首页标志,需要隐藏
#ifdef MP-JD || MP-WEIXIN
uni.hideHomeButton()
#endif
}
}
```
#### VUE3 setup引入
```
import TabbarConfig from '@/config/tabbar.js'
import { reactive } from 'vue'
// 没有开启native模式下,使用reLaunch跳转,会存在首页标志,需要隐藏
#ifdef MP-JD || MP-WEIXIN
uni.hideHomeButton()
#endif
const tabbar = reactive(TabbarConfig)
```
### 3、页面使用
```
<m-tabbar fixed fill current="1" :tabbar="tabbar"></m-tabbar>
```
## 高级用法(beforeChange)(路由守卫)
有些特殊需求,我们在点击一个tabbar其他一项的时候,可能需要判断权限是否可以进入,那么我们在切换前做一下路由拦截`beforeChange`,如果达到自己的预期,就进行跳转
> uniapp 微信小程序不支持$listeners,只能使用prop方式传入, 部分平台不支持prop传入方法,有平台限制,详细请看(问题解答)[https://ask.dcloud.net.cn/question/70659]
### 页面使用传入beforeChange
```
// native模式,无需传入 fixed fill
<m-tabbar native :beforeChange="onBeforeChange"></m-tabbar>
// 普通页面模式
<m-tabbar fixed fill current="1" :tabbar="tabbar" :beforeChange="onBeforeChange"></m-tabbar>
```
### 进行事件判断监听
函数必选参数 next,当判断逻辑执行完毕后,满足条件的情况下执行 `next()`
```
methods: {
onBeforeChange(next){
console.log('before page2 switch')
setTimeout(()=>{
console.log('switch page2 end')
next()
}, 1000)
}
}
```
## 自定义凸起导航(插槽使用)
```
<m-tabbar native>
<template v-slot:tabbar_index_1> //插槽详细看文档,样式你自己写
<view class="custom_style">
<view class="custom_style_icon">+</view>
</view>
</template>
</m-tabbar>
<style lang="scss">
.custom_style{
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 24rpx;
&_icon{
background-color: #15357A;
font-size: 80rpx;
width: 120rpx;
height: 120rpx;
border-radius: 100%;
display: flex;
justify-content: center;
align-items: center;
margin-top: -40rpx;
}
}
</style>
```
### 属性说明
| 属性名 | 类型 | 默认值 | 必填 | 说明 |
| ------- | ------- | ------- | ------- | ------- |
| current | Number,String | 0 | true | 默认选中第几项,0开始(普通模式) |
| tabbar | Object | {} | true | tabbar配置项 (普通模式) |
| fixed | Boolean | false | false | 是否定位在底部(普通模式) |
| fill | Boolean | false | false | 是否填充底部高度(如果开启fixed后,会出现tabbar遮盖内容问题,开启此属性,会自动填充高度,可单独使用)(普通模式) |
| safeBottom | Boolean | true | false | 是否自动规避iphoneX\XR等底部安全距离(普通模式) |
| zIndex | Number,String | 999 | false | 当前处于z-index层级 |
| native | Boolean | false | false | native模式,当前页面是系统原生tabbar页面(pages.json里面配置了tabBar) |
| beforeChange | Function | null | false | 导航切换前事件hooks,用于判断点击tabbar的时候,可以先执行自己定义的事件,达到预期后在跳转(类似router的路由守卫),方法需要调用next参数回调,部分平台不支持,存在兼容性 |
### 方法说明
| 方法名 | 返回值说明 |
| ------- | ------- |
| click | 当前选中index,无论什么请看下都会先触发click事件,方便自由定制更多方法 |
| change | 当前选中index(beforeChange会在change之前执行,只有执行next才会返回) |
### 插槽
| 插槽名 | 返回值说明 |
| ------- | ------- |
| tabbar_index_{index} | 插槽名字为tabbar_index_你要变化的index, 可以做到任意控制自己的导航,比如中心凸起,比如你想让第一个变化,index就是0,比如你tabbarList里面有5个item,你想让中间的凸起,那么index就是2,取下标 |
### 插件写的时候,没办法照顾到所有平台,欢迎点评指正,如有问题欢迎给我留言
#### 例如:
```
设备:iphone13
系统: ios13
使用环境平台: 微信小程序、app
使用vue版本 :vue3
问题描述: 提示什么什么错误
```
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
Please register or to comment