123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <script>
- window.SITE_CONFIG = {};
- window.SITE_CONFIG["dictList"] = [];
- import Api from "./@/http/Api.js";
- export default {
- data() {
- return {
- // globalData: {},
- }
- },
- methods:{
- getDictAll() {
- Api.getDictList().then((res) => {
- console.log(res.data)
- window.SITE_CONFIG["dictList"] = res.data.data;
- });
- },
- },
- onLaunch: function() {
- // 获取字典列表, 添加并全局变量保存
- },
- onShow: function() {
- console.log('App Show')
- this.getDictAll();
-
- },
- onHide: function() {
- console.log('App Hide')
- }
- }
- </script>
- <style lang="scss">
- /*每个页面公共css */
- @import "@/uni_modules/uview-ui/index.scss";
- uni-page-body,html,body{
- height: 100%;
- width: 750rpx;
- background: #F6F6F6;
- }
- </style>
|