Commit a981c743 by 胡悦

Merge branch 'SAAS+V4.54.0' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V4.54.0

2 parents 720284c0 22876443
......@@ -5,13 +5,29 @@
<view class="welcome-title">欢迎使用广联AI集市</view>
</view>
<view class="ai-content">
<view class="list-box" v-for="item in list">
<view
class="list-box"
v-for="item in list"
:key="item.id"
>
<view class="list-title">{{ item.preEntryName }}</view>
<view class="item-box">
<view class="item" @click="jump(i)" v-for="i in item.agentList">
<image class="item-img" :src="i.entryLogoUrl" mode="scaleToFill" />
<view
class="item"
@click="jump(i)"
v-for="i in item.agentList"
:key="i.id"
>
<image
class="item-img"
:src="i.entryLogoUrl"
mode="scaleToFill"
/>
<view class="text">{{ i.entryName }}</view>
<view v-if="i.tipShowFlag == 1" class="red-dot"></view>
<view
v-if="i.tipShowFlag == 1"
class="red-dot"
></view>
</view>
</view>
</view>
......@@ -21,22 +37,25 @@
<script type="text/ecmascript-6">
export default {
name: 'AIBazaar',
props: {
isPermissionFunction: null
},
data () {
return {
list: []
}
},
created() {
created () {
uni.$on('pageBack', () => {
this.getAiagentList()
})
},
mounted() {
mounted () {
this.getAiagentList()
},
methods: {
async getAiagentList() {
const {phone} = uni.$storage.get("userInfo")
async getAiagentList () {
const { phone } = uni.$storage.get("userInfo")
const params = {
ownerShipType: 1, // 驻店
accountPhone: phone
......@@ -45,16 +64,20 @@ export default {
console.log(res)
this.list = res
},
async jump(data) {
let {agentUrl,domainName,presuppositionProblem, taskStatus, checkDate} = data
if(!agentUrl) {
async jump (data) {
let { agentUrl, domainName, presuppositionProblem, taskStatus, checkDate, agentCode } = data
if (agentCode == 'AI7') {
const isPermision = await this.isPermissionFunction('请打开麦克风权限')
if (!isPermision) return
}
if (!agentUrl) {
return uni.showToast({
title: '待开放',
icon: 'none'
})
}
let url = `/pages/common/aiWebview?url=${agentUrl}&domain=${domainName}&presuppositionProblem=${presuppositionProblem}`
const {phone} = uni.$storage.get("userInfo")
const { phone } = uni.$storage.get("userInfo")
url += `&practice_status=${taskStatus}&date=${checkDate}`
const res = await uni.$api.commonApi.updateSopAiAgentMessageStatus({
staffPhone: phone
......@@ -146,7 +169,7 @@ export default {
// margin-left: toRpx(20);
}
.red-dot {
background-color: #F24724;
background-color: #f24724;
width: toRpx(16);
height: toRpx(16);
border-radius: 50%;
......
......@@ -55,6 +55,7 @@
ref="pointRef"
:userInfo="userInfo"
@showPage="handleShowPage"
:isPermissionFunction="isPermission"
/>
</template>
<view
......@@ -218,6 +219,7 @@ export default {
},
methods: {
async changeTab($event, jumpUrl) {
console.log(this.isPermission)
console.log($event, 'event')
this.$emit('changeTab', $event)
this.showBeisen = false
......
......@@ -195,12 +195,12 @@ export default {
const _records = await this.record.getRecords()
this.setPerRecordNumber(_records.length)
},
async isPermission() {
async isPermission(hintText = '为了记录语音通话,请打开录音权限') {
const result = await permision.requestAndroidPermission('android.permission.RECORD_AUDIO')
await helpler.sleep(0)
if (result !== 1) {
uni.showToast({
title: '为了记录语音通话,请打开录音权限',
title: hintText,
icon: 'none'
})
}
......
......@@ -15,6 +15,7 @@ export default {
methods: {
addRecord () {
const { shopMerchantId: merchantId, shopMerchantName: merchantName } = uni.$storage.get('userInfo')
if(!merchantId) return
const params = {
goodsId: this.goodsId,
goodsType: 0,
......@@ -29,6 +30,7 @@ export default {
}
},
onUnload () {
if(!this.addId) return
const params = {
id: this.addId
}
......
......@@ -353,7 +353,7 @@ export default {
this.$refs.home.$refs.leftBox.getMessageInfo()
},
async start (before = true) {
const isPermision = this.$refs.home.isPermission()
const isPermision = await this.$refs.home.isPermission()
if (!isPermision) return false
uni.$logger.local.info('〖接待管理Recorder〗 == 开始接待 ')
if (before) this.clearHistory();
......
......@@ -153,7 +153,7 @@ export default {
})
brandIdList.push(e.id)
})
this.getSoure(brandIdList , subBrandIdList)
this.getSoure(brandIdList, subBrandIdList)
this.$store.dispatch('setCarBrandsList', carBrandList)
uni.$storage.set('carBrandList', carBrandList)
if (carBrandList.length) {
......@@ -190,7 +190,8 @@ export default {
title: '该场景尚未配置素材,请联系总部人员',
icon: 'none'
})
if (this.recording) return
const isPermision = await this.$refs.home.isPermission()
if (this.recording || !isPermision) return
uni.showLoading({
mask: true
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!