mobile-workflow/App.vue
2024-05-31 21:26:29 +08:00

128 lines
2.3 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<script>
export default {
onLaunch: function() {
console.log('App Launch')
uni.showLoading({
title: "加载中..."
})
window.msgFromUniapp = function(arg) {
console.log(arg.token);
// console.log(JSON.stringify(arg),666777);
if (arg.token) {
uni.setStorageSync('wflow-token', arg.token)
localStorage.setItem("wflow-token", arg.token);
uni.setStorageSync('loginUser', JSON.stringify(arg.loginUser))
uni.setStorageSync('projectSn', arg.loginUser.sn)
localStorage.setItem("projectSn", arg.loginUser.sn);
if (arg.page) {
uni.reLaunch({
url: arg.page
})
} else {
uni.reLaunch({
url: '/pages/submit/submit'
})
}
}
uni.hideLoading()
}
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style lang="scss">
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */
page {
background-color: #F4F5F7;
}
.w-button {
border-radius: 48rpx;
font-size: 32rpx !important;
border: none;
&::after {
border: none;
}
}
.w-click-hover {
background-color: #F7F7F7;
}
//表单组件值只读样式
.w-form-input-rv {
font-size: 32rpx;
margin-left: 5px;
}
.over-tip {
overflow: hidden;
text-overflow: ellipsis;
/* 设置文本溢出时显示省略号 */
white-space: nowrap;
}
//覆盖默认组件样式
: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>