Commit 8b20b540 by 杨明

配置

1 parent 57eb488e
......@@ -2,10 +2,10 @@ import http from '../request/http'
import { env } from '../../env'
const serverConfig = {
mockRequestCount: null,
mockTimer: {},
mockCache: null
},
mockRequestCount: null,
mockTimer: {},
mockCache: null
},
boutiqueServerConfig = {
mockRequestCount: null,
mockTimer: {},
......@@ -132,15 +132,16 @@ const getSoureData = async (shopMerchantId, sceneType) => {
})
if (id) {
let data = await getEquityMaterialConfig({
id
}),
id
}),
{ toolList, materialInfoList } = data,
storageName = `source_${sceneType}_${shopMerchantId}`
data.moduleList = materialInfoList
data.moduleList = await imgTransformBase64(materialInfoList, ['thumbnail', 'receptionSourceDetailList', 'screenList'])
data.toolList = await imgTransformBase64(toolList, ['shortTitleUrl'])
// data.moduleList = await imgTransformBase64(materialInfoList, ['thumbnail', 'receptionSourceDetailList', 'screenList'])
// data.toolList = await imgTransformBase64(toolList, ['shortTitleUrl'])
uni.setStorageSync(storageName, {
moduleList, toolList
moduleList,
toolList
})
return Promise.resolve(data)
}
......@@ -156,8 +157,7 @@ const getSoureData = async (shopMerchantId, sceneType) => {
if (merchantIds.hasOwnProperty(shopMerchantId)) {
targetUrl = merchantIds[shopMerchantId]
storageName += `merchantId_${shopMerchantId}`
}
else {
} else {
targetUrl = brandIds[channelType]
storageName += `channelType_${channelType}`
}
......@@ -196,7 +196,8 @@ const getSoureData = async (shopMerchantId, sceneType) => {
data.moduleList = await imgTransformBase64(moduleList, ['thumbnail', 'receptionSourceDetailList', 'screenList'])
data.toolList = await imgTransformBase64(toolList, ['shortTitleUrl'])
uni.setStorageSync(storageName, {
moduleList, toolList
moduleList,
toolList
})
return Promise.resolve(data)
}
......@@ -241,7 +242,7 @@ const imgTransformBase64 = async (imgList = [], keyList = []) => {
)
}
/**转base64 */
const getBase64 = async (url) => {
const getBase64 = async url => {
return new Promise((resolve, reject) => {
uni.request({
url,
......
......@@ -138,7 +138,7 @@ export default {
},
startTrack() {
this.trackInterval = setInterval(()=>{
this.addTrack()
this.leaveTrack()
}, 5000)
},
changeIndex(index,item) {
......
......@@ -152,6 +152,8 @@ export default {
console.log(wv, 1111)
if (wv) {
wv.setStyle({ left: '8%', height: '100%', top: '3%', height: '97%', width: '92%' })
} else {
this.jumpUrl = ''
}
}, 100)
} else {
......
......@@ -109,7 +109,8 @@ const pathEnum = {
busassistant: '/rop-scrm-busassistant/',
boutique: '/rop-dj-car-boutique/',
merchants: '/rop-merchants/',
pad: '/rop-dj-pad/'
pad: '/rop-dj-pad/',
clue: '/rop-scrm-clue/'
}
const CONFIG_ENV_MAP = {
1: 'develop',
......
{
"name": "展业助手",
"appid": "__UNI__D3BD3DF",
"description": "",
"versionName": "2.9.0",
"versionCode": "290",
"transformPx": false,
"sassImplementationName": "node-sass",
"name" : "展业助手",
"appid" : "__UNI__D3BD3DF",
"description" : "",
"versionName" : "2.9.0",
"versionCode" : "290",
"transformPx" : false,
"sassImplementationName" : "node-sass",
/* 5+App特有相关 */
"app-plus": {
"cache": false,
"bounce": "none",
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"compatible": {
"ignoreVersion": true
"app-plus" : {
"cache" : false,
"bounce" : "none",
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"compatible" : {
"ignoreVersion" : true
},
"screenOrientation": "landscape",
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
"screenOrientation" : "landscape",
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* 模块配置 */
"modules": {
"Camera": {},
"Record": {},
"VideoPlayer": {},
"AudioPlayer": {},
"SQLite": {},
"Maps": {},
"Geolocation": {}
"modules" : {
"Camera" : {},
"Record" : {},
"VideoPlayer" : {},
"AudioPlayer" : {},
"SQLite" : {},
"Maps" : {},
"Geolocation" : {}
},
/* 应用发布信息 */
"distribute": {
"distribute" : {
/* android打包配置 */
"android": {
"permissions": [
"android" : {
"permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
......@@ -54,83 +54,76 @@
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>"
],
"abiFilters": [
"armeabi-v7a",
"arm64-v8a",
"x86"
],
"targetSdkVersion": 30
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"targetSdkVersion" : 30
},
/* ios打包配置 */
"ios": {
"dSYMs": false,
"UIBackgroundModes": "audio"
"ios" : {
"dSYMs" : false,
"UIBackgroundModes" : "audio"
},
/* SDK配置 */
"sdkConfigs": {
"ad": {},
"speech": {},
"geolocation": {
"system": {
"__platform__": [
"ios",
"android"
]
"sdkConfigs" : {
"ad" : {},
"speech" : {},
"geolocation" : {
"system" : {
"__platform__" : [ "ios", "android" ]
}
}
},
"icons": {
"android": {
"hdpi": "static/72.png",
"xhdpi": "static/96.png",
"xxhdpi": "static/144.png"
"icons" : {
"android" : {
"hdpi" : "static/72.png",
"xhdpi" : "static/96.png",
"xxhdpi" : "static/144.png"
}
}
},
"nativePlugins": {
"Ba-KeepAliveSuit": {
"__plugin_info__": {
"name": "安卓保活套装(通用、常驻通知、电池优化、自启管理、后台运行等)",
"description": "在Ba-KeepAlive的基础上,新增了忽略电池优化、自启管理、常驻通知。为定位、推送、websocket、定时任务、蓝牙、聊天等保驾护航(**注意:**不保证支持所有机型和场景,建议先试用再购买)",
"platforms": "Android",
"url": "https://ext.dcloud.net.cn/plugin?id=11765",
"android_package_name": "uni.gltap",
"ios_bundle_id": "",
"isCloud": true,
"bought": 1,
"pid": "11765",
"parameters": {}
"nativePlugins" : {
"Ba-KeepAliveSuit" : {
"__plugin_info__" : {
"name" : "安卓保活套装(通用、常驻通知、电池优化、自启管理、后台运行等)",
"description" : "在Ba-KeepAlive的基础上,新增了忽略电池优化、自启管理、常驻通知。为定位、推送、websocket、定时任务、蓝牙、聊天等保驾护航(**注意:**不保证支持所有机型和场景,建议先试用再购买)",
"platforms" : "Android",
"url" : "https://ext.dcloud.net.cn/plugin?id=11765",
"android_package_name" : "uni.gltap",
"ios_bundle_id" : "",
"isCloud" : true,
"bought" : 1,
"pid" : "11765",
"parameters" : {}
}
}
}
},
/* 快应用特有相关 */
"quickapp": {},
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin": {
"appid": "wx79d1ff39bee3d047",
"setting": {
"urlCheck": false
"mp-weixin" : {
"appid" : "wx79d1ff39bee3d047",
"setting" : {
"urlCheck" : false
},
"usingComponents": true
"usingComponents" : true
},
"mp-alipay": {
"usingComponents": true
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu": {
"usingComponents": true
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao": {
"usingComponents": true
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics": {
"enable": false
"uniStatistics" : {
"enable" : false
},
"vueVersion": "2",
"h5": {
"devServer": {
"port": 8080,
"https": false
"vueVersion" : "2",
"h5" : {
"devServer" : {
"port" : 8080,
"https" : false
}
}
}
\ No newline at end of file
}
<!--
* @Author: yangming@didihu.com.cn yangming@didihu.com.cn
* @Date: 2024-11-22 20:45:03
* @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn
* @LastEditTime: 2025-05-19 15:15:22
* @FilePath: \gl-tape\pages\equity\detail\components\MediaComponent.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<view class="layout">
<wnCanvas
:drawStatus="penSwitch"
:canvasId="`c-${madiaId}`"
custom
@scale="$emit('scale',$event)"
ref="canvasRef"
>
<wnCanvas :drawStatus="penSwitch" :canvasId="`c-${madiaId}`" custom @scale="$emit('scale', $event)" ref="canvasRef">
<template slot="customContent">
<view class="layout-content">
<page-title
:title="title"
:hasCarBrand="hasCarBrand"
:show="show"
/>
<page-title :title="title" :hasCarBrand="hasCarBrand" :show="show" />
<template v-if="hasCarBrand">
<image
:key="viewKey"
class="content"
:src="views[customerInfo.carModelId] || require('@/assets/images/media/nothing.webp')"
/>
<image :key="viewKey" class="content" :src="views[customerInfo.carModelId] || require('@/assets/images/media/nothing.webp')" />
</template>
<template v-else>
<template v-if="views[0]">
<image
v-if="views[0].detailUrl"
class="content"
:src="views[0].detailUrl"
/>
<image
v-if="views[0].bgUrl"
class="bg"
:src="views[0].bgUrl"
/>
<template v-if="views">
<image v-if="views.detailUrl" class="content" :src="views.detailUrl" />
<image v-if="views.bgUrl" class="bg" :src="views.bgUrl" />
</template>
</template>
</view>
</template>
</wnCanvas>
</view>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
import PageTitle from './PageTitle.vue'
export default {
props: {
......@@ -80,7 +64,7 @@ export default {
}
</script>
<style scoped lang='scss'>
<style scoped lang="scss">
.layout {
width: 100%;
height: 100%;
......@@ -103,4 +87,4 @@ export default {
top: 0;
}
}
</style>
\ No newline at end of file
</style>
<template>
<view>
<home-frame
@preview="preview"
@start="start"
ref="home"
:id="id"
@openStep="openStep"
@backHome="backHome"
@changeTab="changeTab"
>
<view
class="module-box"
slot="module"
>
<home-frame @preview="preview" @start="start" ref="home" :id="id" @openStep="openStep" @backHome="backHome" @changeTab="changeTab">
<view class="module-box" slot="module">
<template v-for="(i, index) in moduleList">
<view
:key="index"
:class="['item', i.class]"
:style="i.style"
@click="toDetail(i)"
v-if="!i.hide"
>
<view :key="index" :class="['item landscape', i.class]" :style="i.style" @click="toDetail(i)" v-if="i.thumbnail">
<template v-if="i.showAlt">
<view class="item-text flex">{{ i.title }}</view>
</template>
<template v-else>
<image
class="item-img"
:src="i.thumbnail"
mode="scaleToFill"
@error="errorImg(index)"
/>
<image class="item-img" :src="i.thumbnail" mode="scaleToFill" @error="errorImg(index)" />
</template>
</view>
</template>
</view>
<template slot="detail">
<detail
:id.sync="id"
:media="moduleList"
:type.sync="type"
:toolList="toolList"
:aitoCarModelIds="aitoCarModelIds"
@back="back"
@done="done"
ref="detail"
/>
<detail :id.sync="id" :media="moduleList" :type.sync="type" :toolList="toolList" :aitoCarModelIds="aitoCarModelIds" @back="back" @done="done" ref="detail" />
</template>
<template slot="content">
<!-- <novice-guide
......@@ -73,7 +42,7 @@ import HomeFrame from '@/components/HomeFrame/index.vue'
export default {
// mixins: [storge],
components: { HomeFrame, detail, NoviceGuide },
data () {
data() {
return {
moduleList: [],
toolList: [],
......@@ -86,20 +55,20 @@ export default {
}
},
computed: {
channelType () {
channelType() {
const { channelType } = uni.$storage.get('userInfo')
return channelType || 1 //默认问界
},
shopMerchantId () {
shopMerchantId() {
const { shopMerchantId } = uni.$storage.get('userInfo')
return shopMerchantId
},
sceneType () {
sceneType() {
const { sceneType } = uni.$storage.get('userInfo')
return sceneType
}
},
onBackPress (options) {
onBackPress(options) {
if (options.from === 'backbutton') {
// 物理返回按钮触发
// 阻止默认行为,即不执行页面返回
......@@ -109,12 +78,12 @@ export default {
// 其他情况允许正常返回
return false
},
onLoad () {
onLoad() {
uni.$api.systemApi.getMockData(true) //获取APP配置信息
this.getSoure()
this.get_Vehicle_Sales_Data()
},
onShow () {
onShow() {
const userInfo = uni.$storage.get('userInfo')
if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) {
uni.$storage.rm('userInfo')
......@@ -128,11 +97,11 @@ export default {
},
methods: {
...mapMutations('audio', ['setReceptionStatus']),
init () {
init() {
this.findPayInfo()
},
/**获取车型&销售数据 */
get_Vehicle_Sales_Data () {
get_Vehicle_Sales_Data() {
const userInfo = uni.$storage.get('userInfo'),
storageCarBrandList = uni.$storage.get('carBrandList'),
storageEmployeeList = uni.$storage.get('employeeList'),
......@@ -167,7 +136,7 @@ export default {
})
},
// 查询素材
async getSoure (loadStorage = true) {
async getSoure(loadStorage = true) {
const { channelType, shopMerchantId, sceneType } = this
if (loadStorage) {
// let data = uni.getStorageSync(`source_${sceneType}_data_merchantId_${shopMerchantId}`)
......@@ -181,11 +150,11 @@ export default {
// let requestData = await uni.$api.systemApi.getSoureData(channelType, shopMerchantId, sceneType)
this.setViewInfo(requestData)
},
errorImg (index) {
errorImg(index) {
this.moduleList[index].showAlt = true
},
async start () {
async start() {
if (this.recording) return
uni.showLoading({
mask: true
......@@ -200,14 +169,14 @@ export default {
uni.hideLoading()
}, 1e3)
},
toDetail (item) {
toDetail(item) {
this.chooseItem = item
this.$refs.home.previewRef.open()
},
cancel () {
cancel() {
this.$refs.home.previewRef.close()
},
preview () {
preview() {
let { id, title } = this.chooseItem
this.type = 'preview'
this.id = id
......@@ -215,7 +184,7 @@ export default {
this.cancel()
},
// 完成接待
done (e) {
done(e) {
this.$refs.home.finishRef.close()
if (this.recording) this.$refs.home.stopAudio()
this.recording = false
......@@ -227,14 +196,14 @@ export default {
this.$store.dispatch('clearReceptionTrack')
}, 1500)
},
back () {
back() {
const detailRef = this.$refs.detail
if (detailRef.showPayPage) return (detailRef.showPayPage = false)
if (!this.id) return uni.navigateBack()
if (this.type != 'preview') return this.$refs.home.finishRef.open()
this.backHome()
},
backHome () {
backHome() {
if (this.recording) this.$refs.home.stopAudio(true)
this.$refs.home.finishRef.close()
this.id = ''
......@@ -244,23 +213,23 @@ export default {
this.recording = false
this.$refs.home.$refs.leftBox.getMessageInfo()
},
nextStep () {
nextStep() {
let { id } = this.moduleList[0]
this.type = 'preview'
this.id = id
},
clearHistory () {
clearHistory() {
this.$store.dispatch('clearCustomerInfo')
this.$store.dispatch('clearHistory')
this.$refs.home.setBooks([])
this.$store.dispatch('clearReceptionTrack')
},
openStep () {
openStep() {
this.$refs.home.finishRef.close()
this.$refs.detail.open()
},
// 查询门店支付配置
async findPayInfo () {
async findPayInfo() {
const { shopMerchantId } = uni.$storage.get('userInfo')
const data = await uni.$api.commonApi.findPayInfo({
merchantId: shopMerchantId
......@@ -284,13 +253,13 @@ export default {
})
this.$store.dispatch('setPaymentType', paymentType)
},
changeTab (index) {
changeTab(index) {
this.tabIndex = index
if (index == 0) this.init()
},
/**按序加载车型 */
async getCarBrandsList (carBrandList, index) {
async getCarBrandsList(carBrandList, index) {
const item = carBrandList[index]
if (!item) return
const carList = uni.getStorageSync(`${item.id}_${item.brandId}_carlist`)
......@@ -307,16 +276,36 @@ export default {
}
},
/**素材内容 */
setViewInfo (data) {
setViewInfo(data) {
let { moduleList, toolList, aitoCarModelIds } = data
if (this.channelType == 1) this.aitoCarModelIds = aitoCarModelIds || []
this.moduleList = moduleList
// if (this.moduleList) {
// this.moduleList.push({
// id: 333,
// thumbnail: 'https://img02.glsx.com.cn/weapp/resource/app-tape/home/byd-home-3.webp',
// title: '汽车保险告知书',
// class: 'vertical',
// style: 'width: calc(100vw * (712 / 2346));height: calc(100vmin * (1173 / 768) * (624 / 2346));',
// showAlt: false,
// componentName: 'insurance',
// detailTitle: '汽车保险告知书'
// })
// }
this.toolList = toolList
// if (this.toolList) {
// this.toolList.push({
// id: 333,
// shortTitle: '车险告知书',
// shortTitleUrl: 'https://img02.glsx.com.cn/weapp/resource/app-tape/tool/default/5.png',
// title: '汽车保险告知书'
// })
// }
this.$store.state.user = {
...this.$store.state.user,
...data
}
},
}
}
}
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!