123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <template>
- <mobile-frame>
- <view class="main">
- <view class="one">
- <image class="logo" :src="logoUrl" mode=""></image>
- </view>
- </view>
- </mobile-frame>
- </template>
- <script>
- export default {
- components: {},
- data() {
- return {
- logoUrl: '',
- };
- },
- onLoad: function() {},
- onShow: function() {
- const that = this;
- that.searchConfig();
- that.search();
- },
- methods: {
- // 查询基本设置
- async searchConfig() {
- const that = this;
- let res = await that.$api(`/config`, 'GET', {});
- if (res.errcode == '0') {
- let config = res.data;
- that.$set(that, `logoUrl`, config.config.logo[0].url)
- uni.setStorage({
- key: 'config',
- data: config,
- success: function() {}
- });
- // 赋值默认值
- that.$config.share = {
- title: config.title,
- path: '/pages/index/index',
- imageUrl: config.config.share[0].url
- }
- }
- },
- async search() {
- const that = this;
- // 查询当前所在平台
- uni.getSystemInfo({
- success: async function(res) {
- uni.setStorage({
- key: 'system',
- data: res,
- success: function() {
- uni.redirectTo({
- // url: `/pagesRest/activity/list`
- url: `/pages/home/index`
- })
- }
- });
- }
- });
- },
- }
- }
- </script>
- <style lang="scss">
- .main {
- display: flex;
- flex-direction: column;
- width: 100vw;
- height: 100vh;
- .one {
- text-align: center;
- margin: 40vw 0 0 0;
- .logo {
- width: 50vw;
- height: 50vw;
- border-radius: 90px;
- box-shadow: 0 0 5px #f1f1f1;
- }
- }
- }
- </style>
|