根据uniapp调整工程结构

This commit is contained in:
aixianling
2024-10-31 15:06:02 +08:00
parent 9b524f390c
commit b7d6c222e7
54 changed files with 1 additions and 2 deletions

31
components/AiOpenData.vue Normal file
View File

@@ -0,0 +1,31 @@
<template>
<ww-open-data class="AiOpenData" :type="type" :openid="oid"/>
</template>
<script>
import {mapActions} from "vuex";
export default {
name: "AiOpenData",
props: ['type', 'openid'],
computed: {
oid() {
/**
* 后端返回格式(cropId|userId)
*/
return this.openid?.split("|")?.[1] || this.openid || ""
}
},
methods: {
...mapActions(['initOpenData']),
},
watch: {
openid: {
handler(v) {
v && this.initOpenData()
},
immediate: true
}
}
}
</script>