2024-04-28 10:10:03 +08:00
|
|
|
|
<script>
|
2024-11-25 13:57:24 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
onLaunch: function () {
|
|
|
|
|
|
console.log("App Launch");
|
|
|
|
|
|
uni.showLoading({
|
|
|
|
|
|
title: "加载中...",
|
|
|
|
|
|
});
|
2025-01-21 17:36:10 +08:00
|
|
|
|
// #ifdef H5
|
|
|
|
|
|
window.addEventListener("message", (arg) => {
|
2025-03-25 14:52:27 +08:00
|
|
|
|
console.log(arg, "收到消息");
|
2025-01-21 17:36:10 +08:00
|
|
|
|
if (arg.data.token) {
|
|
|
|
|
|
uni.setStorageSync("wflow-token", arg.data.token);
|
|
|
|
|
|
localStorage.setItem("wflow-token", arg.data.token);
|
|
|
|
|
|
sessionStorage.setItem("wflow-token", arg.data.token);
|
|
|
|
|
|
uni.setStorageSync("loginUser", JSON.stringify(arg.data.loginUser));
|
|
|
|
|
|
sessionStorage.setItem("loginUser", JSON.stringify(arg.data.loginUser));
|
|
|
|
|
|
uni.setStorageSync("projectSn", arg.data.loginUser.sn);
|
|
|
|
|
|
localStorage.setItem("projectSn", arg.data.loginUser.sn);
|
|
|
|
|
|
sessionStorage.setItem("projectSn", arg.data.loginUser.sn);
|
|
|
|
|
|
|
|
|
|
|
|
// console.log(JSON.stringify(arg), "登录用户");
|
|
|
|
|
|
if (arg.data.page) {
|
|
|
|
|
|
uni.reLaunch({
|
|
|
|
|
|
url: arg.data.page + "?current=" + arg.data.current,
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
uni.reLaunch({
|
|
|
|
|
|
url: "/pages/submit/submit",
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
|
}, false);
|
|
|
|
|
|
// #endif
|
2025-03-25 14:52:27 +08:00
|
|
|
|
|
2024-11-25 13:57:24 +08:00
|
|
|
|
window.msgFromUniapp = function (arg) {
|
2025-01-21 17:36:10 +08:00
|
|
|
|
// console.log(arg.token);
|
2024-11-25 13:57:24 +08:00
|
|
|
|
// console.log(JSON.stringify(arg),666777);
|
|
|
|
|
|
if (arg.token) {
|
|
|
|
|
|
uni.setStorageSync("wflow-token", arg.token);
|
|
|
|
|
|
localStorage.setItem("wflow-token", arg.token);
|
2025-03-25 14:52:27 +08:00
|
|
|
|
sessionStorage.setItem("wflow-token", arg.token);
|
2024-11-25 13:57:24 +08:00
|
|
|
|
uni.setStorageSync("loginUser", JSON.stringify(arg.loginUser));
|
2025-03-25 14:52:27 +08:00
|
|
|
|
sessionStorage.setItem("loginUser", JSON.stringify(arg.loginUser));
|
2024-11-25 13:57:24 +08:00
|
|
|
|
uni.setStorageSync("projectSn", arg.loginUser.sn);
|
|
|
|
|
|
localStorage.setItem("projectSn", arg.loginUser.sn);
|
2025-03-25 14:52:27 +08:00
|
|
|
|
sessionStorage.setItem("projectSn", arg.loginUser.sn);
|
2025-01-21 17:36:10 +08:00
|
|
|
|
// console.log(JSON.stringify(arg), "登录用户");
|
2024-11-25 13:57:24 +08:00
|
|
|
|
if (arg.page) {
|
|
|
|
|
|
uni.reLaunch({
|
2024-12-21 16:57:51 +08:00
|
|
|
|
url: arg.page + "?current=" + arg.current,
|
2024-11-25 13:57:24 +08:00
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
uni.reLaunch({
|
|
|
|
|
|
url: "/pages/submit/submit",
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
|
};
|
2025-03-25 14:52:27 +08:00
|
|
|
|
|
2025-01-21 17:36:10 +08:00
|
|
|
|
window.onload = function () {
|
|
|
|
|
|
if(window.plus) {
|
|
|
|
|
|
document.getElementById('app').classList.add('havetop');
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-11-25 13:57:24 +08:00
|
|
|
|
},
|
|
|
|
|
|
onShow: function () {
|
|
|
|
|
|
console.log("App Show");
|
|
|
|
|
|
},
|
|
|
|
|
|
onHide: function () {
|
|
|
|
|
|
console.log("App Hide");
|
|
|
|
|
|
},
|
|
|
|
|
|
};
|
2024-04-28 10:10:03 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
2025-03-25 14:52:27 +08:00
|
|
|
|
*{
|
|
|
|
|
|
/* 清除默认边框 */
|
|
|
|
|
|
border:0;
|
|
|
|
|
|
outline:none;
|
|
|
|
|
|
/*清除默认背景 */
|
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
|
}
|
2025-01-21 17:36:10 +08:00
|
|
|
|
:deep() {
|
|
|
|
|
|
.uniui-personadd,
|
|
|
|
|
|
.uniui-calendar,
|
|
|
|
|
|
.uniui-map-pin-ellipse,
|
|
|
|
|
|
.uniui-home,
|
|
|
|
|
|
.uniui-search {
|
|
|
|
|
|
font-size: 44rpx !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
.uniui-redo {
|
|
|
|
|
|
font-size: 40rpx !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
.uni-radio-input {
|
|
|
|
|
|
width: 44rpx !important;
|
|
|
|
|
|
height: 44rpx !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.havetop {
|
|
|
|
|
|
uni-page-head {
|
|
|
|
|
|
padding-top: 44rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.uni-scroll-view ::-webkit-scrollbar {
|
|
|
|
|
|
display: none; /* Chrome Safari */
|
|
|
|
|
|
}
|
2024-11-25 13:57:24 +08:00
|
|
|
|
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
|
2024-12-21 16:57:51 +08:00
|
|
|
|
uni-page-head {
|
|
|
|
|
|
background-color: rgb(68, 120, 247);
|
|
|
|
|
|
}
|
2025-01-21 17:36:10 +08:00
|
|
|
|
uni-page-wrapper {
|
|
|
|
|
|
height: calc(100% - 88rpx - 44rpx - env(safe-area-inset-top)) !important;
|
|
|
|
|
|
}
|
2024-11-25 13:57:24 +08:00
|
|
|
|
.headerBox {
|
2025-01-21 17:36:10 +08:00
|
|
|
|
height: 88rpx;
|
2024-11-25 13:57:24 +08:00
|
|
|
|
align-items: center;
|
|
|
|
|
|
// background-color: white;
|
|
|
|
|
|
// color: rgba(42, 43, 91, 1);
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
z-index: 2;
|
|
|
|
|
|
// border-bottom: 1px solid rgba(194, 194, 194, 0.2);
|
2025-01-21 17:36:10 +08:00
|
|
|
|
font-size: 32rpx;
|
2024-11-25 13:57:24 +08:00
|
|
|
|
|
|
|
|
|
|
.backImg {
|
2025-01-21 17:36:10 +08:00
|
|
|
|
width: 48rpx;
|
|
|
|
|
|
height: 48rpx;
|
2024-11-25 13:57:24 +08:00
|
|
|
|
position: absolute;
|
2025-01-21 17:36:10 +08:00
|
|
|
|
top: 50%;
|
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
|
left: 20rpx;
|
2024-11-25 13:57:24 +08:00
|
|
|
|
// opacity: 0.8;
|
|
|
|
|
|
z-index: 999;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.headerName {
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
// font-size: 18px;
|
2025-01-21 17:36:10 +08:00
|
|
|
|
line-height: 88rpx;
|
2024-11-25 13:57:24 +08:00
|
|
|
|
z-index: 3;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
// font-weight: bold;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
page {
|
|
|
|
|
|
background-color: #f4f5f7;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.w-button {
|
|
|
|
|
|
border-radius: 48rpx;
|
|
|
|
|
|
font-size: 32rpx !important;
|
2025-01-21 17:36:10 +08:00
|
|
|
|
line-height: 64rpx;
|
2024-11-25 13:57:24 +08:00
|
|
|
|
border: none;
|
|
|
|
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.w-click-hover {
|
|
|
|
|
|
background-color: #f7f7f7;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//表单组件值只读样式
|
|
|
|
|
|
.w-form-input-rv {
|
|
|
|
|
|
font-size: 32rpx;
|
2025-01-21 17:36:10 +08:00
|
|
|
|
margin-left: 10rpx;
|
2024-11-25 13:57:24 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.over-tip {
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
/* 设置文本溢出时显示省略号 */
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
// :deep(.uni-picker-custom) {
|
|
|
|
|
|
// height: 480rpx !important;
|
|
|
|
|
|
// }
|
|
|
|
|
|
:deep(.uni-picker-content) {
|
|
|
|
|
|
height: 394rpx !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
//覆盖默认组件样式
|
|
|
|
|
|
:deep(.w-form-input) {
|
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
|
|
|
|
|
|
.is-input-border,
|
|
|
|
|
|
.input-value-border {
|
|
|
|
|
|
border: none !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.uni-input-placeholder,
|
|
|
|
|
|
.uni-input-wrapper,
|
|
|
|
|
|
.placeholder,
|
|
|
|
|
|
.input-value,
|
|
|
|
|
|
.uni-date__x-input,
|
|
|
|
|
|
.uni-textarea-placeholder,
|
|
|
|
|
|
.uni-textarea-wrapper {
|
|
|
|
|
|
font-size: 32rpx !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.is-disabled {
|
|
|
|
|
|
background-color: white !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* #ifdef MP */
|
|
|
|
|
|
.wflow-form .uni-forms-item {
|
|
|
|
|
|
padding: 0 16rpx 32rpx 16rpx;
|
|
|
|
|
|
background-color: white;
|
|
|
|
|
|
margin-bottom: 16rpx;
|
|
|
|
|
|
font-size: 32rpx !important;
|
|
|
|
|
|
|
|
|
|
|
|
.uni-forms-item__error {
|
|
|
|
|
|
padding-top: 0 !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.uni-easyinput__content-input {
|
|
|
|
|
|
height: 30px;
|
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.uni-easyinput__placeholder-class,
|
|
|
|
|
|
.uni-date__x-input {
|
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.w-form-title {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
padding: 13rpx 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* #endif */
|
|
|
|
|
|
</style>
|