Commit 9ae07511 by 杨明

webview

1 parent bc334eb9
...@@ -6,15 +6,11 @@ ...@@ -6,15 +6,11 @@
</view> </view>
<view class="ai-content"> <view class="ai-content">
<view class="list-box" v-for="item in list"> <view class="list-box" v-for="item in list">
<view class="list-title">{{item.preEntryName}}</view> <view class="list-title">{{ item.preEntryName }}</view>
<view class="item-box"> <view class="item-box">
<view class="item" @click="jump(i)" v-for="i in item.agentList"> <view class="item" @click="jump(i)" v-for="i in item.agentList">
<view class="text">{{ i.entryName }}</view> <view class="text">{{ i.entryName }}</view>
<image <image class="item-img" :src="i.entryLogoUrl" mode="scaleToFill" />
class="item-img"
:src="i.entryLogoUrl"
mode="scaleToFill"
/>
</view> </view>
</view> </view>
</view> </view>
...@@ -40,10 +36,15 @@ export default { ...@@ -40,10 +36,15 @@ export default {
accountPhone: phone accountPhone: phone
} }
const res = await uni.$api.commonApi.getAiagentList(params) const res = await uni.$api.commonApi.getAiagentList(params)
console.log(res)
this.list = res this.list = res
}, },
jump(data) { jump(data) {
console.log(data) let url = data.agentUrl
if(!url) return
uni.navigateTo({
url: `/pages/common/aiWebview?url=${url}`
})
} }
} }
} }
...@@ -67,7 +68,7 @@ export default { ...@@ -67,7 +68,7 @@ export default {
margin-top: toRpx(48); margin-top: toRpx(48);
font-size: toRpx(48); font-size: toRpx(48);
font-weight: 500; font-weight: 500;
background: linear-gradient(90deg, #369EFF, #2C66F7); background: linear-gradient(90deg, #369eff, #2c66f7);
-webkit-background-clip: text; -webkit-background-clip: text;
background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent; -webkit-text-fill-color: transparent;
...@@ -96,7 +97,7 @@ export default { ...@@ -96,7 +97,7 @@ export default {
transform: translateY(-50%); transform: translateY(-50%);
width: toRpx(8); width: toRpx(8);
height: toRpx(36); height: toRpx(36);
background: linear-gradient(158deg, #4FACFE, #00F2FE); background: linear-gradient(158deg, #4facfe, #00f2fe);
border-radius: 0 toRpx(8) toRpx(8) 0; border-radius: 0 toRpx(8) toRpx(8) 0;
} }
} }
......
const target = ['ip', 'dev', 'uat', 'prod', 'beta'] const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 2 const index = 1
/** /**
* *
0本地 0本地
......
...@@ -104,6 +104,12 @@ ...@@ -104,6 +104,12 @@
"path": "pages/common/webview" "path": "pages/common/webview"
}, },
{ {
"path": "pages/common/aiWebview",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/msgwebview" "path": "pages/common/msgwebview"
}, },
{ {
......
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-28 18:19:19
* @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn
* @LastEditTime: 2025-04-27 15:28:57
* @FilePath: \gl-tape\pages\common\webview.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<view>
<view class="header" @click="back">
<view class="nav-bar">
<view class="back">
<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>
</template>
<script type="text/ecmascript-6">
export default {
name: '',
data () {
return {
url: '',
title:'广联AI集市'
}
},
onLoad (options) {
const { sceneType, uuid, channelType=1 } = uni.$storage.get('userInfo')
const bussinessType = sceneType == 0 ? 1 : 2 // sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
const brand = {
1: '问界',
2:'比亚迪',
3:'其他'
}[channelType]
this.url = `${options.url}?business_type=${ bussinessType}&brand=${brand}&one_id=${uuid}&platformType=1`
setTimeout(() => {
const currentWebview = this.$scope.$getAppWebview()
const wv = currentWebview.children()[0]
if (wv) {
wv.setStyle({ top: '10%',height:'90%'})
}
}, 1000)
},
mounted () {
},
methods: {
back() {
console.log('back')
uni.navigateBack()
}
}
}
</script>
<style scoped lang="scss">
.header {
background: url('https://img02.glsx.com.cn/weapp/resource/saas/ai/ai-app-bg.jpg');
padding-top: 30px;
z-index: 9999;
position: fixed;
height: 10%;
width: 100%;
.nav-bar {
width: 100%;
height: 48px;
display: flex;
align-items: center;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
}
.title {
color: #333333;
flex: 1;
font-size: 16px;
font-weight: 700;
text-align: center;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!