Feat(云灵AI):界面初始化
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<view v-if="showImg" class="ai-entrance">
|
||||
<image
|
||||
:src="settingInfo.mainImage"
|
||||
mode="widthFix"
|
||||
class="img"
|
||||
@click="enterAiChat()"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getAiSystemInfoSetting
|
||||
} from '@/api/public'
|
||||
export default {
|
||||
name: 'AiEntrance',
|
||||
data() {
|
||||
return {
|
||||
showImg: false,
|
||||
settingInfo: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
getAiSystemInfoSetting().then(res => {
|
||||
const { success, data } = res
|
||||
if (success) {
|
||||
this.settingInfo = data
|
||||
this.showImg = data.showOnAppIndex === 1
|
||||
}
|
||||
})
|
||||
},
|
||||
enterAiChat() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/aiChat/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.ai-entrance {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
z-index: 5;
|
||||
transform: translateY(-50%);
|
||||
.img {
|
||||
width: 88rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user