|
@@ -3,12 +3,16 @@
|
|
<button class="btn btn-primary" @click="handle('pc')">
|
|
<button class="btn btn-primary" @click="handle('pc')">
|
|
pc弹框
|
|
pc弹框
|
|
</button>
|
|
</button>
|
|
- <button class="btn btn-primary" @click="handle('mobile')">
|
|
|
|
- mobile弹框
|
|
|
|
|
|
+ <button class="btn btn-primary" @click="handle('app')">
|
|
|
|
+ app弹框
|
|
</button>
|
|
</button>
|
|
-
|
|
|
|
- <PCLeaveDialog :visible.sync="pcVisible" />
|
|
|
|
- <MobileLeavePopup :visible.sync="mobileVisible" />
|
|
|
|
|
|
+ <button class="btn btn-primary" @click="handle('wx')">
|
|
|
|
+ wx弹框
|
|
|
|
+ </button>
|
|
|
|
+ <p> source: <input v-model="source" type="source"> </p>
|
|
|
|
+ <p> source_desc: <input v-model="source_desc" type="source_desc"> </p>
|
|
|
|
+ <!-- <PCLeaveDialog :visible.sync="pcVisible" /> -->
|
|
|
|
+ <!-- <MobileLeavePopup :visible.sync="mobileVisible" /> -->
|
|
<!-- <PCContentCard /> -->
|
|
<!-- <PCContentCard /> -->
|
|
<!-- <MobileContentCard /> -->
|
|
<!-- <MobileContentCard /> -->
|
|
</div>
|
|
</div>
|
|
@@ -19,6 +23,7 @@ import PCContentCard from '@/lib/pc/content-card.vue'
|
|
import MobileContentCard from '@/lib/mobile/content-card.vue'
|
|
import MobileContentCard from '@/lib/mobile/content-card.vue'
|
|
import PCLeaveDialog from '@/lib/pc/content-dialog.vue'
|
|
import PCLeaveDialog from '@/lib/pc/content-dialog.vue'
|
|
import MobileLeavePopup from '@/lib/mobile/content-popup.vue'
|
|
import MobileLeavePopup from '@/lib/mobile/content-popup.vue'
|
|
|
|
+import { doLeave } from '@/utils/leave'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'App',
|
|
name: 'App',
|
|
@@ -32,19 +37,28 @@ export default {
|
|
return {
|
|
return {
|
|
pcVisible: false,
|
|
pcVisible: false,
|
|
mobileVisible: false,
|
|
mobileVisible: false,
|
|
|
|
+ source: 'test',
|
|
|
|
+ source_desc: '测试desc',
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
created() {},
|
|
created() {},
|
|
mounted() {},
|
|
mounted() {},
|
|
methods: {
|
|
methods: {
|
|
- handle(type) {
|
|
|
|
- if (type === 'pc') {
|
|
|
|
- this.pcVisible = true
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- this.mobileVisible = true
|
|
|
|
- }
|
|
|
|
|
|
+ // handle(type) {
|
|
|
|
+ // if (type === 'pc') {
|
|
|
|
+ // this.pcVisible = true
|
|
|
|
+ // }
|
|
|
|
+ // else {
|
|
|
|
+ // this.mobileVisible = true
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
|
|
+ async handle(platform) {
|
|
|
|
+ await doLeave({
|
|
|
|
+ source: this.source,
|
|
|
|
+ source_desc: this.source_desc,
|
|
|
|
+ platform
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|