123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- window.appType = {};
- document.addEventListener('UniAppJSBridgeReady', () => {
- uni.getEnv(res => {
- window.appType = res;
- });
-
- window.addEventListener('message', (event) => {
- if (event.data.source === 'web') {
- uni.postMessage({
- data: event.data
- });
- }
- });
- });
- function editTypeClick(type)
- {
- window?.postMessage({
- type: 'editTypeClick',
- source: 'app',
- data: type,
- })
- }
- function formSave()
- {
- window?.postMessage({
- type: 'formSave',
- source: 'app',
- data: {},
- })
- }
- function pageTap(index)
- {
- window?.postMessage({
- type: 'pageTap',
- source: 'app',
- data: index,
- })
- }
- function addFormTap()
- {
- window?.postMessage({
- type: 'addForm',
- source: 'app',
- data: {},
- })
- }
- function delFormTap()
- {
- window?.postMessage({
- type: 'delForm',
- source: 'app',
- data: {},
- })
- }
- function linkIdsTap(data)
- {
- window?.postMessage({
- type: 'linkIds',
- source: 'app',
- data: data,
- })
- }
- function copyFormData()
- {
- window?.postMessage({
- type: 'copyFormData',
- source: 'app',
- data: {},
- })
- }
- function getPdfUrl()
- {
- window?.postMessage({
- type: 'getPdfUrl',
- source: 'app',
- data: {},
- })
- }
|