shuishen
2025-12-19 32febb140d320b35d580c8d4e78a80ef846e75fc
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
<template>
    <view>
        <WebViewPlus @webMessage="onPostMessage" ref="sWebViewRef" :src="`${viewUrl}`" />
 
    </view>
 
</template>
 
<script setup>
    import {
        getWebViewUrl
    } from "@/utils/index.js";
    import WebViewPlus from "@/components/WebViewPlus.vue";
    const sWebViewRef = ref(null);
    const viewUrl = getWebViewUrl('/addWork')
 
    function onPostMessage(data) {
        if (data.type === 'submitSuccess') {
            uni.setStorageSync('joinParams', {
                type: 'add'
            });
            // uni.switchTab({
            //   url: '/pages/work/index'
            // });
            uni.switchTab({
                url: `/pages/work/index?addLog=111`
            });
        }
    }
</script>
 
<style scoped lang="scss">
 
</style>