初始化产品库
This commit is contained in:
164
src/App.vue
Normal file
164
src/App.vue
Normal file
@@ -0,0 +1,164 @@
|
||||
<script>
|
||||
import {mapMutations, mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
provide() {
|
||||
return {
|
||||
root: this,
|
||||
}
|
||||
},
|
||||
onLaunch: function () {
|
||||
this.initConfig()
|
||||
},
|
||||
onShow: function () {
|
||||
this.initWaterMarker()
|
||||
},
|
||||
onPageNotFound() {
|
||||
this.logout()
|
||||
},
|
||||
computed: {
|
||||
...mapState(['token', 'user']),
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['initWaterMarker', 'logout', 'getConfig']),
|
||||
initDev() {
|
||||
let baseURL = 'http://192.168.1.87:9000'
|
||||
this.getConfig({baseURL})
|
||||
|
||||
// this.$store.commit('login', 'bearer 88dd207a-dfe3-4f81-b9bd-e379de427d0b')
|
||||
},
|
||||
initConfig() {
|
||||
if (process.env.NODE_ENV == 'development') this.initDev()
|
||||
else {
|
||||
let baseURL = location.origin
|
||||
this.getConfig({baseURL})
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import 'uview/index.scss';
|
||||
@import './common/iconfont.css';
|
||||
|
||||
body {
|
||||
font-family: 'Microsoft YaHei', serif;
|
||||
}
|
||||
|
||||
uni-page-body {
|
||||
min-height: 100%;
|
||||
background: #f5f5f5;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
div[bottom] {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 128px;
|
||||
padding: 24px 32px;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
border-top: 1px solid #d4d4d4;
|
||||
display: flex;
|
||||
gap: 32px;
|
||||
|
||||
& > * {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
|
||||
& + * {
|
||||
margin-left: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
div[flex] {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&.spb {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
&.wrap {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
&.column {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
&.start {
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
div[shrink] {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
uni-button {
|
||||
border-radius: 4px;
|
||||
|
||||
&.u-btn--primary {
|
||||
background-color: $uni-color-primary !important;
|
||||
border-color: $uni-color-primary !important;
|
||||
}
|
||||
|
||||
&:after {
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.fill {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.u-form-item {
|
||||
width: 100%;
|
||||
min-height: 100px;
|
||||
background: #ffffff;
|
||||
padding: 0 32px !important;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
line-height: normal !important;
|
||||
|
||||
.u-form-item__body {
|
||||
height: inherit;
|
||||
flex: 1;
|
||||
|
||||
.u-form-item--left {
|
||||
min-height: 100px;
|
||||
}
|
||||
|
||||
.u-form-item--right__content__slot {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.u-form-item__message {
|
||||
margin: 15px 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes mapWarn {
|
||||
0% {
|
||||
transform: scale(.5);
|
||||
opacity: 1
|
||||
}
|
||||
|
||||
30% {
|
||||
opacity: .5
|
||||
}
|
||||
|
||||
to {
|
||||
transform: scale(1.4);
|
||||
opacity: 0
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user