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

11

parent 837effd9
......@@ -9,12 +9,13 @@
</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>
</div>
</template>
<script>
import { compressToBase64 } from '@/utils/compression';
export default {
// props: ['Url'],
data() {
......@@ -25,7 +26,7 @@
TemplateUrlImg: '',
isPostMessage: false,
isPostMessageImg: false,
Url: 'http://dify.oytour.com/chatbot/RrfZrrXKACVg4HpB',
Url: '',
}
},
watch: {
......@@ -42,11 +43,17 @@
// },
},
mounted() {
this.createInitDifyAsync()
},
methods: {
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