12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <template>
- <mobile-frame>
- <view class="main">
- <view class="one">
- <image class="logo" :src="logoUrl" mode=""></image>
- </view>
- <view class="two">
- <button @tap="toPopup('1')">打开弹框1</button>
- <button @tap="toPopup('2')">打开弹框2</button>
- <uni-popup ref="popup" background-color="#fff" type="bottom">
- <view class="popup">
- <view class="popup_1" v-if="popup.type=='1'">
- 弹框一
- </view>
- <view class="popup_1" v-else-if="popup.type=='2'">
- 弹框二
- </view>
- </view>
- </uni-popup>
- </view>
- </view>
- </mobile-frame>
- </template>
- <script>
- export default {
- components: {},
- data() {
- return {
- logoUrl: '',
- popup: {
- type: '1'
- }
- };
- },
- onLoad: function() {},
- onShow: function() {
- const that = this;
- that.search();
- },
- methods: {
- toPopup(e) {
- const that = this;
- that.$set(that.popup, `type`, e);
- that.$refs.popup.open();
- },
- search() {
- const that = this;
- that.$set(that, `logoUrl`, that.$config.logoUrl);
- // 查询当前所在平台
- uni.getSystemInfo({
- success: async function(res) {
- uni.setStorage({
- key: 'system',
- data: res,
- success: function() {
- // uni.redirectTo({
- // 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>
|