Commit 48a1e15b authored by 黄奎's avatar 黄奎

11

parent 837effd9
...@@ -9,12 +9,13 @@ ...@@ -9,12 +9,13 @@
</div> </div>
</div> </div>
</div> </div>
<iframe id="myTemplateUrl" name="myTemplateUrl" :src="Url" class="TemplateIframe"> <iframe id="myTemplateUrl" v-if="Url!=''" name="myTemplateUrl" :src="Url" class="TemplateIframe">
</iframe> </iframe>
</div> </div>
</template> </template>
<script> <script>
import { compressToBase64 } from '@/utils/compression';
export default { export default {
// props: ['Url'], // props: ['Url'],
data() { data() {
...@@ -25,7 +26,7 @@ ...@@ -25,7 +26,7 @@
TemplateUrlImg: '', TemplateUrlImg: '',
isPostMessage: false, isPostMessage: false,
isPostMessageImg: false, isPostMessageImg: false,
Url: 'http://dify.oytour.com/chatbot/RrfZrrXKACVg4HpB', Url: '',
} }
}, },
watch: { watch: {
...@@ -42,11 +43,17 @@ ...@@ -42,11 +43,17 @@
// }, // },
}, },
mounted() { mounted() {
this.createInitDifyAsync()
}, },
methods: { methods: {
close() { close() {
this.$emit('close') this.$emit('close')
},
async createInitDifyAsync(){
const userInfo = this.getLocalStorage();
const difyUserId = `${userInfo.EmployeeId}-${userInfo.emName}`;
const compressedUserId = await compressToBase64(difyUserId);
this.Url=`http://dify.oytour.com/chatbot/RrfZrrXKACVg4HpB??sys.user_id=${encodeURIComponent(compressedUserId)}`
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment