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