1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
| <template>
| <view>
| <uni-data-select collection="opendb-app-list" field="appid as value, name as text" orderby="text asc"
| :defItem="1" label="应用选择" v-model="appId" :clear="false" />
| <iframe :src="url"></iframe>
| </view>
| </template>
|
| <script>
| export default {
| data() {
| return {
| url:"",
| appId:""
| }
| },
| watch: {
| appId:{
| async handler(appId){
| if(appId){
| const UniPush = uniCloud.importObject("uni-push-co")
| let res = await UniPush.getAdminUrl(appId)
| this.url = res.data
| }else{
| uni.showToast({
| title: '请先选择一个应用',
| icon: 'none'
| });
| }
|
| },
| immediate:true
| }
| }
| }
| </script>
|
| <style>
| iframe{
| height: 99vh;
| width: 100%;
| border: none;
| }
| </style>
|
|