Commit 637d8fa9 by 李伟康

Merge branch 'SAAS+V4.53.0' into dev

2 parents 9d701c14 5d70dfb5
Showing 229 changed files with 660 additions and 285 deletions
...@@ -4,20 +4,16 @@ ...@@ -4,20 +4,16 @@
"version" : "0.0", "version" : "0.0",
"configurations" : [ "configurations" : [
{ {
"app-plus" : "app-plus" : {
{
"launchtype" : "local" "launchtype" : "local"
}, },
"default" : "default" : {
{
"launchtype" : "local" "launchtype" : "local"
}, },
"h5" : "h5" : {
{
"launchtype" : "local" "launchtype" : "local"
}, },
"mp-weixin" : "mp-weixin" : {
{
"launchtype" : "local" "launchtype" : "local"
}, },
"provider" : "aliyun", "provider" : "aliyun",
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-07 17:09:53 * @Date: 2024-04-07 17:09:53
* @LastEditors: 前端 qianduan01@didihu.com.cn * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-31 10:50:50 * @LastEditTime: 2025-01-14 11:27:04
* @FilePath: \gl_tape\App.vue * @FilePath: \gl_tape\App.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -15,10 +15,8 @@ export default { ...@@ -15,10 +15,8 @@ export default {
computed: { computed: {
...mapState('audio', ['isEnd', 'isStart']) ...mapState('audio', ['isEnd', 'isStart'])
}, },
onLoad() {},
onLaunch: async function () { onLaunch: async function () {
this.onKeep() this.onKeep()
// this.init()
this.setAPPVersion() this.setAPPVersion()
setTimeout(() => { setTimeout(() => {
plus.screen.unlockOrientation() //解除锁定屏幕方向 plus.screen.unlockOrientation() //解除锁定屏幕方向
...@@ -31,6 +29,7 @@ export default { ...@@ -31,6 +29,7 @@ export default {
}, },
methods: { methods: {
onKeep() { onKeep() {
keepAlive &&
keepAlive.onKeep( keepAlive.onKeep(
{ {
title: '接待', title: '接待',
...@@ -41,50 +40,10 @@ export default { ...@@ -41,50 +40,10 @@ export default {
} }
) )
}, },
init() {
uni.addInterceptor('navigateTo', {
//监听跳转
invoke(e) {
console.log('******** invoke-navigateTo ********', e.url.split('?').shift())
if (PATH.includes(e.url.split('?').shift())) {
console.log(888)
}
}
})
//2
uni.addInterceptor('redirectTo', {
//监听关闭本页面跳转
invoke(e) {
console.log('******** redirectTo ********', e.url)
}
})
uni.addInterceptor('switchTab', {
//监听tabBar跳转
invoke(e) {
console.log('******** switchTab ********', e.url)
}
})
//4
uni.addInterceptor('navigateBack', {
//监听返回
invoke(e) {
console.log('******** navigateBack ********', e)
}
})
},
setAPPVersion() { setAPPVersion() {
let version = plus.runtime.version let version = plus.runtime.version
let storageVersion = uni.$storage.get('storageVersion') let storageVersion = uni.$storage.get('storageVersion')
console.log(storageVersion, version) uni.$logger.local.info(`storageVersion ->${storageVersion}, version ->${version}`)
if (storageVersion != version) { if (storageVersion != version) {
uni.$storage.rm('userInfo') uni.$storage.rm('userInfo')
uni.$storage.rm('noSignInUuid') uni.$storage.rm('noSignInUuid')
...@@ -94,7 +53,7 @@ export default { ...@@ -94,7 +53,7 @@ export default {
}, },
onShow: async function () { onShow: async function () {
uni.$logger.local.info('切回app') this.$store.dispatch('setBackgroundState', false)
// const systemInfo = await uni.$api.systemApi.getMockData(); // const systemInfo = await uni.$api.systemApi.getMockData();
// if (systemInfo.isCheckedUpdate) { // if (systemInfo.isCheckedUpdate) {
// checkUpdate(); // checkUpdate();
...@@ -106,7 +65,7 @@ export default { ...@@ -106,7 +65,7 @@ export default {
// }); // });
}, },
onHide: function () { onHide: function () {
uni.$logger.local.info('切出app') this.$store.dispatch('setBackgroundState', true)
}, },
onError: function (e) { onError: function (e) {
try { try {
...@@ -119,12 +78,8 @@ export default { ...@@ -119,12 +78,8 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
body {
// overflow: hidden;
}
page { page {
font-size: toRpx(28); font-size: 28rpx;
height: 100%; height: 100%;
min-height: 100%; min-height: 100%;
} }
...@@ -170,7 +125,7 @@ button { ...@@ -170,7 +125,7 @@ button {
margin: 0; margin: 0;
padding: 0; padding: 0;
line-height: 1.5; line-height: 1.5;
font-size: toRpx(28); font-size: 28rpx;
background-color: transparent; background-color: transparent;
border-radius: 0; border-radius: 0;
position: relative; position: relative;
...@@ -182,14 +137,14 @@ button::after { ...@@ -182,14 +137,14 @@ button::after {
// 指定按钮按下去的样式类 // 指定按钮按下去的样式类
.button-hover { .button-hover {
transform: translate(toRpx(1), toRpx(1)); transform: translate(1rpx, 1rpx);
} }
.webview-container { .webview-container {
position: absolute; position: absolute;
width: toRpx(100); width: 100rpx;
height: toRpx(100); height: 100rpx;
top: 0; top: 0rpx;
left: 0; left: 0rpx;
} }
</style> </style>
...@@ -5,88 +5,106 @@ ...@@ -5,88 +5,106 @@
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-09-13 11:08:55 * @LastEditTime: 2024-09-13 11:08:55
*/ */
import http from "../request/http"; import http from '../request/http'
module.exports = { module.exports = {
/**获取APP更新 */ /**获取APP更新 */
findSoureList (data) { findSoureList(data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.recepiton.soure.findSoureList", method: 'dj.api.smartcarlife.recepiton.soure.findSoureList',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
}, },
/** 查询可发放礼券-分页查询商户券列表 */ /** 查询可发放礼券-分页查询商户券列表 */
findCouponList (data) { findCouponList(data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.merchantCoupon.pageForZYApp", method: 'dj.api.smartcarlife.merchantCoupon.pageForZYApp',
projectName: "boutique", projectName: 'boutique',
onlyUsable: true, onlyUsable: true,
currentPage: 1, currentPage: 1,
pageSize: 99999, pageSize: 99999,
...data, ...data
}); })
}, },
/**查询用户是否领券 */ /**查询用户是否领券 */
findCustomerReceivedStatus (data) { findCustomerReceivedStatus(data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.customerCoupon.pageForZYApp", method: 'dj.api.smartcarlife.customerCoupon.pageForZYApp',
projectName: "boutique", projectName: 'boutique',
...data, ...data,
currentPage: 1, currentPage: 1,
pageSize: 99999, pageSize: 99999,
statusList: [0, 1] statusList: [0, 1]
}); })
}, },
/**历史成交客户 */ /**历史成交客户 */
historyDealOrderPage (data) { historyDealOrderPage(data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.order.historyDealOrder.page", method: 'dj.api.smartcarlife.order.historyDealOrder.page',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
}, },
// 历史订单列表 // 历史订单列表
getQuotationList (data) { getQuotationList(data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page", method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
}, },
// 历史订单列表
getOrderList(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.for.pad.page',
projectName: 'boutique',
...data
})
},
/**客户邀约记录 */ /**客户邀约记录 */
customerInviteRecordPage (data) { customerInviteRecordPage(data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.customerInviteRecord.page", method: 'dj.api.smartcarlife.customerInviteRecord.page',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
}, },
/**轻改素材配置 */ /**轻改素材配置 */
getBoutiqueMaterialConfig (data) { getBoutiqueMaterialConfig(data) {
return http.post({ return http.post({
method: "dj.api.boutique.recepiton.material.merchant.detail", method: 'dj.api.boutique.recepiton.material.merchant.detail',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
}, },
/** 案例视频 */ /** 案例视频 */
getCaseList(data) { getCaseList(data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.recepiton.material.case.find", method: 'dj.api.smartcarlife.recepiton.material.case.find',
projectName: "boutique", projectName: 'boutique',
...data ...data
}) })
}, },
/** 获取类目 */ /** 获取类目 */
getCategory(data) { getCategory(data) {
return http.post({ return http.post({
method: "dj.api.boutique.recepiton.material.merchant.category", method: 'dj.api.boutique.recepiton.material.merchant.category',
projectName: "boutique", projectName: 'boutique',
...data
})
},
/**
* 客户邀约记录-邀约类型数目统计
*/
getInviteRecordCount(data) {
return http.post({
method: 'dj.api.smartcarlife.customerInviteRecord.inviteStatus.count',
projectName: 'boutique',
...data ...data
}) })
} }
}; }
...@@ -164,5 +164,152 @@ module.exports = { ...@@ -164,5 +164,152 @@ module.exports = {
projectName: 'boutique', projectName: 'boutique',
...data ...data
}) })
},
/** 系统消息埋点接口 */
addSystemInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.contentManagerTask.view.add',
projectName: 'mindworkplate',
...data
})
},
leaveSystemInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.contentManagerTask.view.leave',
projectName: 'mindworkplate',
...data
})
},
/** 消息盒子 */
// 获取客户标签分类信息
getClassConfig(data = {}) {
return http.post({
method: 'dj.pad.api.list.script.config.class',
projectName: 'pad',
...data
})
},
// 查阅未阅读的优秀话术
getUnreadRecord(data) {
return http.post({
method: 'dj.pad.api.list.unread.script.message.box.record',
projectName: 'pad',
...data
})
},
// 分页查询的优秀话术接口
getPageRecord(data) {
return http.post({
method: 'dj.pad.api.page.script.message.box.record',
projectName: 'pad',
...data
})
},
// 更新话术状态
updateMessageStatus(data) {
return http.post({
method: 'dj.pad.api.update.script.message.status',
projectName: 'pad',
...data
})
},
// 埋点
extractExcellent(data) {
return http.post({
method: 'dj.pad.api.burying.point.script.extract.excellent.browse',
projectName: 'pad',
...data
})
},
/** 系统消息接口 */
// 分页查询系统消息
getTaskInfo(data) {
return http.post({
method: 'dj.pad.api.contentManagerTask.page',
projectName: 'pad',
...data
})
},
// 查询系统详细信息
getTaskById(data) {
return http.post({
method: 'dj.pad.api.contentManagerTask.getById',
projectName: 'pad',
...data
})
},
// 根据状态查询消息数量
getMessageCount(data) {
return http.post({
method: 'dj.pad.api.message.box.count.by.status',
projectName: 'pad',
...data
})
},
// 获取ai智能体入口
getAiagentList(data) {
return http.post({
method: 'dj.pad.api.aiagent.get.entry.list',
projectName: 'pad',
...data
})
},
// 预警消息
getWarningPage(data) {
return http.post({
method: 'dj.pad.api.message.box.findWarningNotificationPage',
projectName: 'pad',
...data
})
},
recordInsert(data) {
return http.post(
{
method: 'clue.api.burial.point.record.batch.insert',
projectName: 'clue',
...data
},
false,
'scrm'
)
},
//获取北森代办数量
getUnreadCount(data) {
return http.post(
{
method: 'dj.pad.api.beisen.getUnreadCount',
projectName: 'pad',
...data
},
true
)
},
//获取北森SSO鉴权
findBeiSenSSOToken(data) {
return http.post(
{
method: 'dj.pad.api.beisen.findBeiSenSSOToken',
projectName: 'pad',
...data
},
true
)
},
//北森埋点进入
dynamicrecordAdd(data) {
return http.post({
method: 'dj.pad.api.beisen.dynamicrecord.add',
projectName: 'pad',
...data
})
},
//更新埋点离开信息
dynamicrecordLeave(data) {
return http.post({
method: 'dj.pad.api.beisen.dynamicrecord.leave',
projectName: 'pad',
...data
})
} }
} }
import http from "../request/http"; import http from '../request/http'
import environment from "@/env"; import environment from '@/env'
module.exports = { module.exports = {
/**查询当前门店是否有客户档案权限 */ /**查询当前门店是否有客户档案权限 */
haveCustomerAccess (data) { haveCustomerAccess(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.customervisits.findPermissionsMerchantList', method: 'dj.api.smartcarlife.customervisits.findPermissionsMerchantList',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
}, },
/**查询当前门店客户档案列表 */ /**查询当前门店客户档案列表 */
getCustomerFileList (data) { getCustomerFileList(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.customervisits.customerInfoPage', method: 'dj.api.smartcarlife.customervisits.customerInfoPage',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
}, },
/* 删除客户档案*/ /* 删除客户档案*/
delCustomerFile (data) { delCustomerFile(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.customervisits.deleteVisitsInfo', method: 'dj.api.smartcarlife.customervisits.deleteVisitsInfo',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
}, },
/** 根据业务查询接待场景 */ /** 根据业务查询接待场景 */
findAllSence (data) { findAllSence(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.customervisits.findAllSence', method: 'dj.api.smartcarlife.customervisits.findAllSence',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
}, },
/**根据业务查询客户标签 */ /**根据业务查询客户标签 */
findCustomerTags (data) { findCustomerTags(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.customervisits.findSenceTag', method: 'dj.api.smartcarlife.customervisits.findSenceTag',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
}, },
/** /**
* 查询客户档案详情 * 查询客户档案详情
*/ */
findVisitsInfo (data) { findVisitsInfo(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.customervisits.findVisitsInfo', method: 'dj.api.smartcarlife.customervisits.findVisitsInfo',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
}, },
/* /*
* 保存客户档案 * 保存客户档案
*/ */
saveVisitsInfo (data) { saveVisitsInfo(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.customervisits.saveVisitsInfo', method: 'dj.api.smartcarlife.customervisits.saveVisitsInfo',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
}, },
/** /**
* 更新客户档案 * 更新客户档案
*/ */
updateVisitsInfo (data) { updateVisitsInfo(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.customervisits.updateVisitsInfo', method: 'dj.api.smartcarlife.customervisits.updateVisitsInfo',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
}, },
/**查询客户档案列表 */ /**查询客户档案列表 */
getCustomerInfoList (data) { getCustomerInfoList(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.customervisits.customerInfoList', method: 'dj.api.smartcarlife.customervisits.customerInfoList',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
}, },
/**接待客户素材 /**接待客户素材
* *
*/ */
getMaterialResponsePage (data) { getMaterialResponsePage(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.customervisits.getMaterialResponsePage', method: 'dj.api.smartcarlife.customervisits.getMaterialResponsePage',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
}, },
/**素材详情 查询素材详情 */ /**素材详情 查询素材详情 */
getMaterialDetail (data) { getMaterialDetail(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.customervisits.getMaterialById', method: 'dj.api.smartcarlife.customervisits.getMaterialById',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
}, },
/**直营驻店人员 */
saleOpen(data) {
return http.post({
method: 'dj.api.car.boutique.resident.direct.sale.merchant',
projectName: 'boutique',
...data
})
}
} }
/* /*
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-12-19 11:02:01 * @Date: 2024-12-19 11:02:01
* @LastEditors: 前端 qianduan01@didihu.com.cn * @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn
* @LastEditTime: 2024-12-19 11:02:25 * @LastEditTime: 2025-04-23 17:19:15
* @FilePath: \gl-tape\api\module\point.js * @FilePath: \gl-tape\api\module\point.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -44,12 +44,190 @@ module.exports = { ...@@ -44,12 +44,190 @@ module.exports = {
projectName: 'boutique', projectName: 'boutique',
...data ...data
}) })
} /**积分首页 */, },
/**积分首页 */
getPoint(data) { getPoint(data) {
return http.post({ return http.post({
method: 'dj.api.car.boutique.resident.point.home.page', method: 'dj.api.car.boutique.resident.point.home.page',
projectName: 'boutique', projectName: 'boutique',
...data ...data
}) })
},
/**积分奖励规则 */
rewardRule(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.reward.rule',
projectName: 'boutique',
...data
})
},
badgeList(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.month.badge.list',
projectName: 'boutique',
...data
})
},
incomeMeasurementConfig(data) {
return http.post({
method: 'dj.smartcarlife.api.incomeMeasurement.switch.config.search',
projectName: 'boutique',
...data
})
},
/**员工收入测算获取员工信息 */
incomeCalculation(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.incomeCalculation.staffInfo',
projectName: 'boutique',
...data
})
},
/**获取员工绩效测算详情 */
incomeCalculationDetail(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.incomeCalculation.detail',
projectName: 'boutique',
...data
})
},
/**分页查询员工月度工资统计列表 */
pageStat(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.monthSalary.pageStat',
projectName: 'boutique',
...data
})
},
/**获取员工(测算/历史)月度工资明细 */
monthSalaryDetail(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.monthSalary.detail',
projectName: 'boutique',
...data
})
},
/**获取试算门店工资绩效配置详细 */
getLatestConfigDetail(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.incomeCalculation.getLatestConfigDetail',
projectName: 'boutique',
...data
})
},
/**员工工资试算*/
monthSalaryCalculation(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.incomeCalculation.monthSalaryCalculation',
projectName: 'boutique',
...data
})
},
/**员工考勤日历 */
calendarDetail(data) {
return http.post({
method: 'dj.api.smartcarlife.clock.in.staff.calendar',
projectName: 'boutique',
...data
})
},
/**查询员工提示信息 */
getTipsMessage(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.tipsMessage.list',
projectName: 'boutique',
...data
})
},
/**直级介绍配置查询 */
getJobConfig(data) {
return http.post({
method: 'dj.smartcarlife.api.job.rank.config.search',
projectName: 'boutique',
...data
})
},
/** 优惠券二级列表 */
getGrantRecord(data) {
return http.post({
method: 'dj.api.car.boutique.resident.coupon.grant.record',
projectName: 'boutique',
...data
})
},
/** 优惠券领取 */
receiveCoupon(data) {
return http.post({
method: 'dj.api.car.boutique.resident.coupon.receive',
projectName: 'boutique',
...data
})
},
/** 统计 优惠券 类型总数 */
statisticsCount(data) {
return http.post({
method: 'dj.api.smartcarlife.resident.coupon.statistics.count',
projectName: 'boutique',
...data
})
},
/** 查询附近地址 */
searchStoreAddress(data) {
return http.post({
method: 'dj.api.car.boutique.resident.coupon.address.search',
projectName: 'boutique',
...data
})
},
/** 查询勋章列表 */
searchLevelConfig(data) {
return http.post({
method: 'dj.api.car.boutique.resident.level.config.page',
projectName: 'boutique',
...data
})
},
/** 我的考勤相关接口 */
/** 员工考勤日历 */
newCalendar(data) {
return http.post({
method: 'dj.api.car.boutique.clock.in.staff.calendar.new',
projectName: 'boutique',
...data
})
},
/** 打卡申诉列表 */
getAppealList(data) {
return http.post({
method: 'dj.api.car.boutique.clock.in.staff.appeal.list',
projectName: 'boutique',
...data
})
},
/** 提交打卡申诉 */
appealCommit(data) {
return http.post({
method: 'dj.api.car.boutique.clock.in.staff.appeal.commit',
projectName: 'boutique',
...data
})
},
/** 考勤出勤明细 */
attendanceDetail(data) {
return http.post({
method: 'dj.api.car.boutique.clock.in.staff.attendance.detail',
projectName: 'boutique',
...data
})
},
appealExist(data) {
return http.post({
method: 'dj.api.car.boutique.clock.in.staff.appeal.exist',
projectName: 'boutique',
...data
})
} }
} }
...@@ -5,25 +5,19 @@ const serverConfig = { ...@@ -5,25 +5,19 @@ const serverConfig = {
mockRequestCount: null, mockRequestCount: null,
mockTimer: {}, mockTimer: {},
mockCache: null mockCache: null
}, },
bydServerConfig = {
mockRequestCount: null,
mockTimer: {},
mockCache: null
},
boutiqueServerConfig = { boutiqueServerConfig = {
mockRequestCount: null, mockRequestCount: null,
mockTimer: {}, mockTimer: {},
mockCache: null mockCache: null
}, },
configModule = 'app-tape', configModule = 'app-tape',
bydConfigModule = 'byd-pad-config', appConfigModule = 'app-config-url',
boutiqueConfigModule = 'boutique-pad-config', boutiqueConfigModule = 'boutique-pad-config',
appConfigUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${appConfigModule}&env=${env}`,
configUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${configModule}&env=${env}`, configUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${configModule}&env=${env}`,
bydConfigUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${bydConfigModule}&env=${env}`,
boutiqueConfigUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${boutiqueConfigModule}&env=${env}` boutiqueConfigUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${boutiqueConfigModule}&env=${env}`
/**获取APP配置 */
/**获取mock数据 */
const getMockData = async (immediate = false) => { const getMockData = async (immediate = false) => {
const MOCKDATA = uni.$storage.get('mock_data') const MOCKDATA = uni.$storage.get('mock_data')
try { try {
...@@ -35,8 +29,6 @@ const getMockData = async (immediate = false) => { ...@@ -35,8 +29,6 @@ const getMockData = async (immediate = false) => {
serverConfig.mockRequestCount = Date.now() serverConfig.mockRequestCount = Date.now()
const data = await http.uni_request({ url: configUrl }) const data = await http.uni_request({ url: configUrl })
data.createTime = Date.now() data.createTime = Date.now()
data.moduleList = await imgToBase64(data.moduleList, 'thumbnail')
data.default_moduleList = await imgToBase64(data.default_moduleList, 'thumbnail')
serverConfig.mockCache = data serverConfig.mockCache = data
uni.$storage.set('mock_data', data) uni.$storage.set('mock_data', data)
return Promise.resolve(data) return Promise.resolve(data)
...@@ -60,84 +52,32 @@ const getMockData = async (immediate = false) => { ...@@ -60,84 +52,32 @@ const getMockData = async (immediate = false) => {
return Promise.reject(error) return Promise.reject(error)
} }
} }
const imgToBase64 = (list, urlKey) => { /**
return new Promise((resolve, reject) => { *权益配置
let arr = [], */
newList = JSON.parse(JSON.stringify(list)) const findReceptionpriproConfigList = data => {
list.map((e, index) => { return http.post({
if (!e[urlKey]) return resolve(list) method: 'dj.api.smartcarlife.recepiton.customer.findReceptionpriproConfigList',
if (!e[urlKey].startsWith('https')) return resolve(list) projectName: 'boutique',
uni.request({ ...data
url: urlKey ? e[urlKey] : e,
method: 'GET',
responseType: 'arraybuffer',
success: res => {
const base64 = `data:image/png;base64,${uni.arrayBufferToBase64(res.data)}`
newList[index][urlKey] = base64
newList[index][`original_${urlKey}`] = e[urlKey]
arr.push(e)
if (arr.length === list.length) resolve(newList)
},
fail: err => {
reject(err)
}
})
})
})
}
const updateMockData = (dataList, keyList, storageName = 'mock_data') => {
const mockData = uni.$storage.get(storageName)
keyList.map(key => {
mockData[key] = dataList[key]
}) })
setTimeout(() => {
uni.$storage.set(storageName, mockData)
}, 1e3)
} }
/** /**
*获取比亚迪配置 *获取后台延保素材ID
*/ */
const getBydMockData = async (immediate = false) => { const getEquityMaterialId = data => {
const MOCKDATA = uni.$storage.get('byd_mock_data') return http.post({
try { method: 'dj.api.smartcarlife.reception.home.page.material.view',
if (!immediate && MOCKDATA && Date.now() - MOCKDATA.createTime < 5 * 60e3) { projectName: 'boutique',
return Promise.resolve(MOCKDATA) ...data
} else {
if (!bydServerConfig.mockRequestCount || immediate) {
bydServerConfig.mockCache = null
bydServerConfig.mockRequestCount = Date.now()
const data = await http.uni_request({ url: bydConfigUrl })
data.createTime = Date.now()
data.moduleList = await imgToBase64(data.moduleList, 'thumbnail')
bydServerConfig.mockCache = data
uni.$storage.set('byd_mock_data', data)
return Promise.resolve(data)
} else {
const key = Date.now()
return new Promise(resolve => {
bydServerConfig.mockTimer[key] = setInterval(() => {
if (bydServerConfig.mockCache) {
clearInterval(bydServerConfig.mockTimer[key])
bydServerConfig.mockRequestCount = null
resolve(bydServerConfig.mockCache)
}
}, 1e3)
}) })
}
}
} catch (error) {
console.log(error)
if (bydServerConfig.mockTimer[key]) clearInterval(bydServerConfig.mockTimer[key])
bydServerConfig.mockRequestCount = null
return Promise.reject(error)
}
} }
/** /**
*获取后台素材配置 *获取后台延保素材配置
*/ */
const findReceptionpriproConfigList = data => { const getEquityMaterialConfig = data => {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.recepiton.customer.findReceptionpriproConfigList', method: 'dj.api.car.boutique.reception.home.page.entrance.material.detail',
projectName: 'boutique', projectName: 'boutique',
...data ...data
}) })
...@@ -184,13 +124,135 @@ const getImageVersion = async () => { ...@@ -184,13 +124,135 @@ const getImageVersion = async () => {
const accountInfo = await getMockData() const accountInfo = await getMockData()
return accountInfo?.version || Date.now() return accountInfo?.version || Date.now()
} }
/**获取素材配置 */
const getSoureData = async (shopMerchantId, sceneType, params = {}) => {
try {
const res = await getEquityMaterialId({
merchantId: shopMerchantId,
...params
})
if (res && res.id) {
let data = await getEquityMaterialConfig({
id: res.id
})
if (data) {
let { toolList, materialInfoList } = data,
storageName = `source_${sceneType}_${shopMerchantId}`
if (params.brandId && params.subBrandId) storageName += `_${params.brandId}_${params.subBrandId}`
let hasEquity = materialInfoList.find(e => e.componentName == 'insurance')
if (hasEquity) {
let configList
try {
configList = await findReceptionpriproConfigList({})
uni.$storage.set('findReceptionpriproConfigList', configList)
} catch (error) {
configList = uni.$storage.get('findReceptionpriproConfigList')
}
const toolOtherList = configList.map(i => {
return {
id: hasEquity.id + 100 + i.id,
shortTitle: i.productName,
shortTitleUrl: i.procuctLog
}
})
toolList = toolList.concat(toolOtherList)
const moduleOtherList = configList.map(i => {
return {
id: hasEquity.id + 100 + i.id,
title: i.productName,
shortTitleUrl: i.procuctLog,
productPoster: i.productPoster,
showAlt: false,
componentName: 'CaseCenter',
receptionpriproCusCaseList: i.receptionpriproCusCaseList,
hide: true
}
})
materialInfoList = materialInfoList.concat(moduleOtherList)
}
data.toolList = await imgTransformBase64(toolList, ['shortTitleUrl'])
data.moduleList = await imgTransformBase64(materialInfoList, ['thumbnail', 'receptionSourceDetailList', 'screenList'])
uni.setStorageSync(storageName, {
moduleList: data.moduleList,
toolList: data.toolList,
id: res.id
})
return Promise.resolve(data)
}
}
} catch (error) {
console.log(error)
uni.showToast({
title: error,
icon: 'none',
duration: 2000
})
}
}
/**批量图片转base64 */
const imgTransformBase64 = async (imgList = [], keyList = []) => {
return await Promise.all(
imgList?.map(async e => {
await Promise.all(
Object.keys(e).map(async key => {
if (keyList.includes(key)) {
let isArray = Array.isArray(e[key])
if (isArray) {
await Promise.all(
e[key].map(async i => {
await Promise.all(
Object.keys(i).map(async k => {
// i[`original_${k}`] = JSON.parse(JSON.stringify(i[k]))
if (k == 'detailUrl' && i[k]) i[k] = await getBase64(i[k])
})
)
})
)
} else {
if (typeof e[key] === 'string' && e[key]) {
// e[`original_${key}`] = JSON.parse(JSON.stringify(e[key]))
e[key] = await getBase64(e[key])
}
if (e[key] && typeof e[key] === 'object') {
await Promise.all(
Object.keys(e[key]).map(async k => {
// e[key][`original_${k}`] = JSON.parse(JSON.stringify(e[key][k]))
if (e[key][k]) e[key][k] = await getBase64(e[key][k])
})
)
}
}
}
})
)
return e
})
)
}
/**转base64 */
const getBase64 = async url => {
return new Promise((resolve, reject) => {
uni.request({
url,
method: 'GET',
responseType: 'arraybuffer',
success: res => {
const base64 = `data:image/png;base64,${uni.arrayBufferToBase64(res.data)}`
resolve(base64)
},
fail: err => {
resolve(url)
// reject(err)
}
})
})
}
module.exports = { module.exports = {
getImageVersion, getImageVersion,
getMockData, getMockData,
imgToBase64,
updateMockData,
getBydMockData,
getBoutiqueMockData, getBoutiqueMockData,
findReceptionpriproConfigList findReceptionpriproConfigList,
getSoureData,
getEquityMaterialId,
getEquityMaterialConfig
} }
import http from "../request/http"; import http from '../request/http'
module.exports = { module.exports = {
/**获取短信 */ /**获取短信 */
getSmsCode (data = {}) { getSmsCode(data = {}) {
data.projectName = "boutique"; data.projectName = 'boutique'
return http.fetch("dj.api.smartcarlife.sms.get.code", data); return http.fetch('dj.api.smartcarlife.sms.get.code', data)
}, },
/**手机验证码登录 */ /**手机验证码登录 */
smsLogin (data = {}) { smsLogin(data = {}) {
data.projectName = 'boutique' data.projectName = 'boutique'
data.source = 'MINIAPP' data.source = 'MINIAPP'
data.productCode = 'PC00c2' data.productCode = 'PC00c2'
return http.fetch('dj.api.smartcarlife.sms.applogin', data) return http.fetch('dj.api.smartcarlife.sms.applogin', data)
}, },
/**免登 */ /**免登 */
autoLogin (data = {}) { autoLogin(data = {}) {
data.projectName = "boutique"; data.projectName = 'boutique'
return http.fetch("dj.api.smartcarlife.sms.noSignIn.login", data); return http.fetch('dj.api.smartcarlife.sms.noSignIn.login', data)
}, },
// 获取园区店下的4s店 // 获取园区店下的4s店
getSceneMerchantRefStoreList (data) { getSceneMerchantRefStoreList(data) {
data.projectName = "boutique"; data.projectName = 'boutique'
return http.post({ return http.post({
method: "dj.api.scenemerchantref.query4SRefByYqShopByLogin", method: 'dj.api.scenemerchantref.query4SRefByYqShopByLogin',
...data, ...data
}); })
}, },
/**获取帐号列表 */ /**获取帐号列表 */
getListSelectAccount (data = {}) { getListSelectAccount(data = {}) {
data.projectName = "boutique"; data.projectName = 'boutique'
return http.fetch("dj.api.smartcarlife.workWechat.listSelectAccount", data); return http.fetch('dj.api.smartcarlife.workWechat.listSelectAccount', data)
}, },
/**选择帐号登陆 */ /**选择帐号登陆 */
selectAccountLogin (data) { selectAccountLogin(data) {
data.projectName = "boutique"; data.projectName = 'boutique'
return http.post({ return http.post({
method: "dj.api.smartcarlife.workWechat.selectAccountLogin", method: 'dj.api.smartcarlife.workWechat.selectAccountLogin',
...data, ...data
}); })
}, },
// 选择4s店和场景 // 选择4s店和场景
selectMerchantScene (data) { selectMerchantScene(data) {
data.projectName = "boutique"; data.projectName = 'boutique'
return http.post({ return http.post({
method: "dj.api.smartcarlife.selectMerchantScene", method: 'dj.api.smartcarlife.selectMerchantScene',
...data, ...data
}); })
}, },
// 获取园区店开通的场景入口 // 获取园区店开通的场景入口
getYqMerchantSceneConfigAPI (data) { getYqMerchantSceneConfigAPI(data) {
data.projectName = "boutique"; data.projectName = 'boutique'
return http.post({ return http.post({
method: "dj.api.smartcarlife.select.openScene.info", method: 'dj.api.smartcarlife.select.openScene.info',
...data, ...data
}); })
}, },
/**退出*/ /**退出*/
logout (data = {}) { logout(data = {}) {
data.projectName = 'boutique' data.projectName = 'boutique'
return http.fetch('dj.api.smartcarlife.logout', data); return http.fetch('dj.api.smartcarlife.logout', data)
}, },
/** /**
* 查询门店品牌 "渠道标识channelType 1.问界 2.比亚迪 3.其他" * 查询门店品牌 "渠道标识channelType 1.问界 2.比亚迪 3.其他"
*/ */
getMerchantBrand (data = {}) { getMerchantBrand(data = {}) {
data.projectName = "boutique"; data.projectName = 'boutique'
return http.post({ return http.post({
method: "dj.api.smartcarlife.recepiton.findMerchantBrand", method: 'dj.api.smartcarlife.recepiton.findMerchantBrand',
...data, ...data
}); })
}, },
/** /**
* 查询门店保险权益 * 查询门店保险权益
*/ */
getMerchantInsuranceList (data = {}) { getMerchantInsuranceList(data = {}) {
data.projectName = "boutique"; data.projectName = 'boutique'
return http.post({ return http.post({
method: "dj.api.smartcarlife.recepiton.findMerchantItem", method: 'dj.api.smartcarlife.recepiton.findMerchantItem',
...data, ...data
}); })
}, },
};
/**
* 员工隐私密码验证
*/
verifyStaffPassword(data = {}) {
data.projectName = 'boutique'
return http.post({
method: 'dj.api.smartcarlife.staff.private.password.verify',
...data
})
}
}

131 KB | W: | H:

189 KB | W: | H:

assets/images/boutique/nothing.png
assets/images/boutique/nothing.png
assets/images/boutique/nothing.png
assets/images/boutique/nothing.png
  • 2-up
  • Swipe
  • Onion skin
No preview for this file type
No preview for this file type
No preview for this file type

26.9 KB | W: | H:

89.7 KB | W: | H:

assets/images/point/coupon_bg.png
assets/images/point/coupon_bg.png
assets/images/point/coupon_bg.png
assets/images/point/coupon_bg.png
  • 2-up
  • Swipe
  • Onion skin

958 Bytes | W: | H:

6.14 KB | W: | H:

assets/images/point/coupon_grey.png
assets/images/point/coupon_grey.png
assets/images/point/coupon_grey.png
assets/images/point/coupon_grey.png
  • 2-up
  • Swipe
  • Onion skin

1.27 MB | W: | H:

2.43 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin

6.42 KB | W: | H:

6.89 KB | W: | H:

assets/spritesmith/certificate.png
assets/spritesmith/certificate.png
assets/spritesmith/certificate.png
assets/spritesmith/certificate.png
  • 2-up
  • Swipe
  • Onion skin

30.6 KB | W: | H:

5.53 KB | W: | H:

assets/spritesmith/customer-file-active.png
assets/spritesmith/customer-file-active.png
assets/spritesmith/customer-file-active.png
assets/spritesmith/customer-file-active.png
  • 2-up
  • Swipe
  • Onion skin

6.06 KB | W: | H:

948 Bytes | W: | H:

assets/spritesmith/customer-file.png
assets/spritesmith/customer-file.png
assets/spritesmith/customer-file.png
assets/spritesmith/customer-file.png
  • 2-up
  • Swipe
  • Onion skin

28.1 KB | W: | H:

5.01 KB | W: | H:

assets/spritesmith/home-active.png
assets/spritesmith/home-active.png
assets/spritesmith/home-active.png
assets/spritesmith/home-active.png
  • 2-up
  • Swipe
  • Onion skin

28.9 KB | W: | H:

30.6 KB | W: | H:

assets/spritesmith/point-active.png
assets/spritesmith/point-active.png
assets/spritesmith/point-active.png
assets/spritesmith/point-active.png
  • 2-up
  • Swipe
  • Onion skin

6.17 KB | W: | H:

6.84 KB | W: | H:

assets/spritesmith/point.png
assets/spritesmith/point.png
assets/spritesmith/point.png
assets/spritesmith/point.png
  • 2-up
  • Swipe
  • Onion skin

6.95 KB | W: | H:

1.22 KB | W: | H:

assets/spritesmith/record.png
assets/spritesmith/record.png
assets/spritesmith/record.png
assets/spritesmith/record.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed. Click to expand it.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!