Commit 04f6725f by 李伟康

提交

1 parent aa699573

2.44 MB | W: | H:

2.49 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
<template>
<uni-popup
ref="learnPopup"
type="center"
:is-mask-click="false"
>
<view class="learn-box">
<view class="sprite-icon icon-learn-bg"></view>
<view class="learn-content">
<view class="learn-title">退出提醒</view>
<text class="learn-text">{{content}}</text>
</view>
<view class="learn-footer flex">
<view
class="learn-btn learn-confirm"
@click="confirm"
>确认退出</view>
<view
class="learn-btn learn-cancel"
@click="cancel"
>继续学习</view>
</view>
</view>
</uni-popup>
</template>
<script type='text/ecmascript-6'>
export default {
props: {
content: {
type: String,
default: ''
}
},
name: '',
data () {
return {
}
},
computed: {
learnRef () {
return this.$refs.learnPopup
}
},
mounted () {
},
methods: {
open () {
this.learnRef.open()
},
cancel () {
this.close()
this.$emit('cancel')
},
close () {
this.learnRef.close()
},
confirm () {
this.close()
this.$emit('confirm')
}
}
}
</script>
<style scoped lang='scss'>
.learn-box {
width: 848rpx;
height: 648rpx;
border-radius: 48rpx;
background: #ffffff;
position: relative;
overflow: hidden;
.sprite-icon{
position: absolute;
top: 0;
left: 0;
zoom: 2;
}
.learn-content {
padding: 296rpx 64rpx 32rpx;
text-align: center;
.learn-title {
color: #333333;
font-size: 40rpx;
font-weight: 500;
margin-bottom: 16rpx;
}
.learn-text {
color: #666666;
font-size: 32rpx;
}
}
.learn-footer {
height: 160rpx;
padding: 0 64rpx;
justify-content: space-between;
.learn-btn {
width: 344rpx;
height: 80rpx;
border-radius: 64rpx;
background: #f0f1f5;
display: flex;
align-items: center;
justify-content: center;
color: #1a1a1a;
font-size: 28rpx;
}
.learn-cancel {
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
color: #fff;
}
}
}
</style>
\ No newline at end of file
......@@ -24,6 +24,10 @@
:src="item.imgUrl"
@load="item.hide = true"
/>
<view
class="bg"
v-if="item.hide"
></view>
<view :class="['error-block',{hide:item.hide}]">
<uni-icons
:type="icon"
......@@ -317,6 +321,15 @@ export default {
background-size: 100% 100%;
z-index: 5;
}
.bg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: linear-gradient(180deg, #e6edff 0%, #f0f4ff 100%);
z-index: 4;
}
.error-block {
position: absolute;
left: 0;
......
......@@ -8,70 +8,120 @@
-->
<template>
<view>
<view class="header" @click="back">
<view
class="header"
@click="back"
>
<view class="nav-bar">
<view class="back">
<uni-icons type="left" :size="20" color="#000000"></uni-icons>
<uni-icons
type="left"
:size="20"
color="#000000"
></uni-icons>
</view>
<view class="title">{{ title }}</view>
</view>
</view>
<web-view :src="url" v-if="url"></web-view>
<view
class="ai-window"
v-if="url"
>
<web-view :src="url"></web-view>
</view>
<learn-popup
ref="learn"
content="您有新的学习任务待完成,请及时处理。\n坚持学习助您能力提升!"
@cancel="cancel"
@confirm="confirm"
/>
</view>
</template>
<script type="text/ecmascript-6">
import LearnPopup from '@/components/LearnPopup.vue'
export default {
components: {
LearnPopup
},
name: '',
data () {
return {
url: '',
title:'广联AI集市'
title: '广联AI集市',
wv: null
}
},
computed: {
learnRef () {
return this.$refs.learn
},
},
onLoad (options) {
const { sceneType, uuid,phone, channelType=1 } = uni.$storage.get('userInfo')
const bussinessType = sceneType == 0 ? 1 : 2 // sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
const brand = {
const { sceneType, uuid, phone, channelType = 1 } = uni.$storage.get('userInfo')
const bussinessType = sceneType == 0 ? 1 : 2 // sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
const brand = {
1: '问界',
2:'比亚迪',
3:'其他'
2: '比亚迪',
3: '其他'
}[channelType]
this.url = `${options.url}?no_header=1&business_type=${ bussinessType}&phone=${phone}&brand=${brand}&one_id=${uuid}&platformType=1&domain=${options.domain}&presuppositionProblem=${options.presuppositionProblem}`
if(options.practice_status) {
this.url += `&practice_status=${options.practice_status}`
}
if(options.date) {
this.url += `&date=${options.date}`
}
console.log(this.url,999)
// this.url='http://assistant.test.glsx.com.cn/chat/jHpvpOmuMWPxYxKo?business_type=12&brand=%E9%97%AE%E7%95%8C&one_id=266&platformType=2&no_header=1&domain=http://aiassistant.test.glsx.com.cn'
setTimeout(() => {
const currentWebview = this.$scope.$getAppWebview()
const wv = currentWebview.children()[0]
if (wv) {
wv.setStyle({ top: '10%',height:'90%'})
}
}, 1000)
this.url = `${options.url}?no_header=1&business_type=${bussinessType}&phone=${phone}&brand=${brand}&one_id=${uuid}&platformType=1&domain=${options.domain}&presuppositionProblem=${options.presuppositionProblem}`
if (options.practice_status) {
this.url += `&practice_status=${options.practice_status}`
}
if (options.date) {
this.url += `&date=${options.date}`
}
console.log(this.url, 999)
// this.url='http://assistant.test.glsx.com.cn/chat/jHpvpOmuMWPxYxKo?business_type=12&brand=%E9%97%AE%E7%95%8C&one_id=266&platformType=2&no_header=1&domain=http://aiassistant.test.glsx.com.cn'
setTimeout(() => {
const currentWebview = this.$scope.$getAppWebview()
const wv = currentWebview.children()[0]
if (wv) {
this.wv = wv
wv.setStyle({ top: '10%', height: '90%' })
}
}, 1000)
},
onBackPress (options) {
if (options.from === 'backbutton') {
// 物理返回按钮触发
// 阻止默认行为,即不执行页面返回
this.back()
return true
}
// 其他情况允许正常返回
return false
},
mounted () {
},
methods: {
back() {
back () {
this.learnRef.open()
this.wv.setVisible(false)
// uni.$api.commonApi.getStudyCompleteStatus()
console.log('back')
// uni.navigateBack()
// uni.$emit('aiBack')
// uni.$emit('pageBack')
},
cancel () {
this.wv.setVisible(true)
},
confirm(){
uni.navigateBack()
uni.$emit('aiBack')
uni.$emit('pageBack')
}
}
}
</script>
<style scoped lang="scss">
.header {
background: url('https://img02.glsx.com.cn/weapp/resource/saas/ai/ai-app-bg.jpg');
// background: url('https://img02.glsx.com.cn/weapp/resource/saas/ai/ai-app-bg.jpg');
padding-top: 30px;
z-index: 9999;
background-color: #f5f9ff;
z-index: 9;
background-size: 100% 100%;
position: fixed;
height: 10%;
......@@ -97,4 +147,13 @@ export default {
}
}
}
.ai-window {
background-color: #f5f9ff;
position: absolute;
top: 10%;
left: 0;
width: 100%;
height: 90vh;
z-index: 1;
}
</style>
......@@ -370,11 +370,10 @@ export default {
let title = ''
if (item.sumScore > item.score) title = item.tagGroupName
let { agentUrl, domainName, checkDate, taskStatus } = data,
url = `${agentUrl}?no_header=1&business_type=${bussinessType}&phone=${phone}&brand=${brand}&one_id=${uuid}&platformType=1&domain=${domainName}&presuppositionProblem=${title}`
if (checkDate) url += `&date=${checkDate}`
url = `${agentUrl}?no_header=1&businessType=${bussinessType}&phone=${phone}&brand=${brand}&one_id=${uuid}&platformType=1&domain=${domainName}&presuppositionProblem=${title}&brandType=1001`
url += `&date=${dayjs().format('YYYY-MM-DD')}`
if (taskStatus) url += `&practice_status=${taskStatus}`
this.AIUrl = url
// this.AIUrl = 'http://192.168.1.237:3000/chat/fpC9ZzKASEEtzjjD?business_type=12&brand=2444&one_id=266&platformType=1&date=2025-06-25&position=1&businessType=1&brandType=1001&phone=13823254919&no_header=1&practice_status=3&presuppositionProblem=&domain=https%3A%2F%2Faiassistant.glsx.com.cn'
this.setWebviewStyle()
} else uni.showToast({
title: '获取智能体失败',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!