Commit bb53d099 by 胡悦

Merge branch 'SAAS+V5.6.1' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V5.6.1

2 parents 2d731edd e239b5f2
Showing 59 changed files with 991 additions and 543 deletions
......@@ -57,6 +57,7 @@ export default {
onShow: async function () {
this.$store.dispatch('setBackgroundState', false)
this.$store.dispatch('setActivityWindowPopCount', 1) //冷启动重置活动弹框次数
// const systemInfo = await uni.$api.systemApi.getMockData();
// if (systemInfo.isCheckedUpdate) {
// checkUpdate();
......
import http from '../request/http'
module.exports = {
/**活动列表 */
activityPage(data) {
return http.post({
method: 'risk.manage.api.activity.pad.page',
projectName: 'pad',
...data
})
},
/**荣誉墙 */
activityReward(data) {
return http.post({
method: 'risk.manage.api.activity.reward',
projectName: 'pad',
...data
})
}
}
import http from '../request/http'
module.exports = {
/**活动列表 */
activityPage(data) {
return http.post({
method: 'risk.manage.api.activity.pad.page',
projectName: 'pad',
...data
})
},
/**荣誉墙 */
activityReward(data) {
return http.post({
method: 'risk.manage.api.activity.reward',
projectName: 'pad',
...data
})
},
/**
* 获取活动弹框
*/
getActivityMessagePopUpWindow(data) {
return http.post({
method: 'dj.pad.api.activity.message.pop.up.window',
projectName: 'pad',
...data
})
},
/**
* 更新活动弹框状态
*/
updateActivityMessagePopUpWindow(data) {
return http.post({
method: 'dj.pad.api.activity.pop.up.window.update',
projectName: 'pad',
...data
})
},
/**
* 获取活动详情
*/
getActivityDetail(data) {
return http.post({
method: 'dj.pad.api.activity.assign.activity.find',
projectName: 'pad',
...data
})
},
}
......@@ -523,7 +523,7 @@ module.exports = {
})
},
// 新学习中心 - 员工学习中心剩余时间
getStudyCenterResidueTime(data={}) {
getStudyCenterResidueTime(data = {}) {
return http.post({
method: 'dj.api.pad.learning.center.residue.time',
projectName: 'pad',
......@@ -531,7 +531,7 @@ module.exports = {
})
},
// 新学习中心 - 查询我的课程页签数量
getMyCourseTabCount(data={}) {
getMyCourseTabCount(data = {}) {
return http.post({
method: 'dj.api.pad.learning.center.myself.course.count',
projectName: 'pad',
......@@ -539,7 +539,7 @@ module.exports = {
})
},
// 新学习中心 - 考试结果
getExamResult(data={}) {
getExamResult(data = {}) {
return http.post({
method: 'dj.api.pad.learning.center.beisen.exam.result',
projectName: 'pad',
......@@ -547,60 +547,59 @@ module.exports = {
})
},
// 限制录单
getLimitRecord(data={}) {
getLimitRecord(data = {}) {
return http.post({
method: 'dj.api.pad.learning.center.study.permission',
projectName: 'pad',
...data
})
},
// VIN车架号校验
checkVinValidate(data={}) {
console.log("调用接口checkVinValidate",data);
return http.post({
method: 'dj.pad.api.vin.validate',
projectName: 'pad',
...data,
})
},
// 工资新增申诉
addWageAppeal(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.pad.create',
projectName: 'staffMiniprogram',
...data,
})
},
// 工资申诉概览信息(包含申诉状态、申诉类型、申诉时间等)
getWageAppealOverview(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.summary',
projectName: 'staffMiniprogram',
...data,
})
},
// 工资申诉订单统计查询
getWageAppealStatistics(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.order.statistics',
projectName: 'staffMiniprogram',
...data,
})
},
// 工资申诉复议记录
replyList(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.reply.list',
projectName: 'staffMiniprogram',
...data,
})
},
// 工资申诉最新记录查询
getWageAppealLatestRecord(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.latest',
projectName: 'staffMiniprogram',
...data,
})
},
// VIN车架号校验
checkVinValidate(data = {}) {
return http.post({
method: 'dj.pad.api.vin.validate',
projectName: 'pad',
...data
})
},
// 工资新增申诉
addWageAppeal(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.pad.create',
projectName: 'staffMiniprogram',
...data,
})
},
// 工资申诉概览信息(包含申诉状态、申诉类型、申诉时间等)
getWageAppealOverview(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.summary',
projectName: 'staffMiniprogram',
...data,
})
},
// 工资申诉订单统计查询
getWageAppealStatistics(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.order.statistics',
projectName: 'staffMiniprogram',
...data,
})
},
// 工资申诉复议记录
replyList(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.reply.list',
projectName: 'staffMiniprogram',
...data,
})
},
// 工资申诉最新记录查询
getWageAppealLatestRecord(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.latest',
projectName: 'staffMiniprogram',
...data,
})
},
}
......@@ -248,5 +248,11 @@ module.exports = {
},
{ returnAll: true }
)
},
/**
* 根据VIN查询查博士数据
*/
queryByVin(data) {
return gscPost('/chaboshi/queryByVin', data, { returnAll: true })
}
}
import { gscPost } from '../request/signHttp'
module.exports = {
/** 二手车驻店日报列表 */
getCarDailyReportList (data) {
getCarDailyReportList(data) {
return gscPost('/carDailyReport/list', {
...data
})
......@@ -10,7 +9,7 @@ module.exports = {
/**
* 新增二手车驻店日报
*/
addCarDailyReport (data) {
addCarDailyReport(data) {
return gscPost('/carDailyReport/add', {
...data
})
......@@ -18,7 +17,7 @@ module.exports = {
/**
* 二手车驻店日报详情
*/
getCarDailyReportDetail (data) {
getCarDailyReportDetail(data) {
return gscPost('/carDailyReport/detail', {
...data
})
......@@ -26,7 +25,7 @@ module.exports = {
/**
* 修改二手车驻店日报
*/
editCarDailyReport (data) {
editCarDailyReport(data) {
return gscPost('/carDailyReport/edit', {
...data
})
......@@ -34,39 +33,63 @@ module.exports = {
/**
* 交付单列表
*/
getDeliveryOrderPageList (data) {
return gscPost('/deliveryOrderManage/getDeliveryOrderPageList', data ,{
getDeliveryOrderPageList(data) {
return gscPost('/deliveryOrderManage/getDeliveryOrderPageList', data, {
returnAll: true
})
},
/**
* 交付单列表按照支付状态统计数量
*/
getDeliveryOrderListCount (data) {
getDeliveryOrderListCount(data) {
return gscPost('/deliveryOrderManage/getDeliveryOrderListCount', data)
},
/**
* 交付单详情
*/
getDeliveryOrderDetail (data) {
getDeliveryOrderDetail(data) {
return gscPost('/deliveryOrderManage/getDeliveryOrderDetail', data)
},
/**
* 交付单操作日志
*/
getDeliveryOrderOpLog (data) {
getDeliveryOrderOpLog(data) {
return gscPost('/deliveryOrderManage/getDeliveryOrderOpLog', data)
},
/**
* 客户确认到店
*/
confirmArrive (data) {
* 客户确认到店
*/
confirmArrive(data) {
return gscPost('/deliveryOrderManage/confirmArrive', data, { returnAll: true })
},
/**
* 客户确认提车
*/
confirmDelivery (data) {
confirmDelivery(data) {
return gscPost('/deliveryOrderManage/confirmDelivery', data, { returnAll: true })
},
/**
* 车辆检测报告管理列表
*/
getCheckReportPageList(data) {
return gscPost('/checkReport/pageList', data, { returnAll: true })
},
/**
* 新增查询任务
*/
checkReportCreate(data) {
return gscPost('/checkReport/create', data, { returnAll: true })
},
/**
* 数量统计
*/
checkReportNumCount(data) {
return gscPost('/checkReport/numCount', data, { returnAll: true })
},
/**
* 检查是否具备访问按钮的权限
*/
checkVisitButton(data) {
return gscPost('/permissionAccess/checkVisitButton', data, { returnAll: true })
}
}
No preview for this file type
......@@ -180,6 +180,9 @@
.mb-24 {
margin-bottom: toRpx(24);
}
.mb-28 {
margin-bottom: toRpx(28);
}
.mb-30 {
margin-bottom: toRpx(30);
}
......

2.95 MB | W: | H:

2.99 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -84,6 +84,13 @@ export default {
name: 'DeliveryManagement',
page: '/pages/usedCar/deliveryManagement/index',
sceneType: [7]
},
{
icon: 'report-management',
label: '报告管理',
name: 'ReportManagement',
page: '/pages/usedCar/reportManagement/index',
sceneType: [7]
}
]
return entranceList.filter(e => e.sceneType.includes(sceneType))
......
<template>
<uni-popup
ref="popup"
border-radius="20px"
@maskClick="updateActivity"
>
<view class="activity-box">
<view
class="close flex"
@click="clickClose"
>
<uni-icons
type="closeempty"
:size="18"
color="#1A1A1A"
></uni-icons>
</view>
<image
:src="bgUrl"
class="bg"
/>
<view class="content">
<view class="title">{{ title }}</view>
<view class="description">{{ description }}</view>
</view>
<view
class="btn"
@click="jump"
></view>
</view>
</uni-popup>
</template>
<script type="text/ecmascript-6">
export default {
name: 'ActivityPopup',
data () {
return {
data: {}
}
},
computed: {
bgUrl () {
let { type } = this.data
return `https://img02.glsx.com.cn/weapp/resource/app-tape/common/activity-${type}.webp`
},
title () {
return this.data.activityName || ''
},
description () {
return {
0: '新的销售竞赛活动已发布!请尽快查阅评选规则与奖励方案,力争上游!',
1: '获奖名单已出炉!快来看看是谁斩获大奖,围观本期“销售之星”。'
}[this.data.type]
},
},
mounted () {
},
methods: {
open (data) {
this.data = data
this.$refs.popup.open("center");
},
close () {
this.$refs.popup.close()
},
clickClose () {
this.close()
this.updateActivity()
},
jump () {
this.clickClose()
this.$emit('JumpActivityCenter', this.data)
},
async updateActivity () {
const { msgId } = this.data
await uni.$api.activityApi.updateActivityMessagePopUpWindow({
msgId
})
}
}
}
</script>
<style scoped lang="scss">
.activity-box {
position: relative;
width: toRpx(1400);
height: toRpx(928);
// background: #ffffff;
border-radius: toRpx(64);
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.close {
position: absolute;
width: toRpx(160);
height: toRpx(160);
top: 0;
right: 0;
justify-content: center;
}
.bg {
position: absolute;
width: 100%;
height: 100%;
z-index: -1;
}
.content {
position: absolute;
top: toRpx(284);
right: toRpx(100);
width: toRpx(650);
.title {
color: #333333;
font-size: toRpx(56);
font-weight: 700;
margin-bottom: toRpx(24);
line-height: toRpx(80);
display: -webkit-box;
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.description {
color: #999999;
font-size: toRpx(34);
line-height: toRpx(52);
}
}
.btn {
position: absolute;
width: toRpx(516);
height: toRpx(120);
right: toRpx(266);
bottom: toRpx(116);
}
}
</style>
<template>
<view class="left-side">
<view class="user-box">
<view class="user-info flex" @click="jumpPersonCenter">
<view
class="user-info flex"
@click="jumpPersonCenter"
>
<view :class="['user-avatar', 'sprite-icon', 'icon-avatar', tabIndex == 99 ? 'user-active' : '']"></view>
<view class="user-name">
<view class="user-name-text">{{ userInfo.name }}</view>
<view v-if="hasPerson" class="sprite-icon icon-arrow-next"></view>
<view
v-if="hasPerson"
class="sprite-icon icon-arrow-next"
></view>
</view>
</view>
</view>
<view :class="['left-tabs', { three: tabs.length == 3 }]">
<template v-for="(i, index) in tabs">
<view :class="['tab-item', { tabActive: tabIndex == index }]" :key="index" @click="changeIndex(index, i)" v-if="!i.hidden && (i.name !== 'ActivityCenter' || activityTabVisible)">
<view
:class="['tab-item', { tabActive: tabIndex == index }]"
:key="index"
@click="changeIndex(index, i)"
v-if="!i.hidden && (i.name !== 'ActivityCenter' || activityTabVisible)"
>
<view class="icon-box">
<view :class="['sprite-icon', `icon-${i.icon}${tabIndex == index ? '-active' : ''}`]"></view>
</view>
{{ i.label }}
<view class="dot" v-if="i.icon == 'record' && perRecordNumber"></view>
<view class="tip-box" v-if="i.icon == 'study' && readCount">待办事项:{{ readCount }}</view>
<view
class="dot"
v-if="i.icon == 'record' && perRecordNumber"
></view>
<view
class="tip-box"
v-if="i.icon == 'study' && readCount"
>待办事项:{{ readCount }}</view>
</view>
</template>
</view>
......@@ -32,19 +49,40 @@
v-if="messageTotal > 0"
></view>
</view> -->
<view class="btn" @click="openScenePopup">
<view
class="btn"
@click="openScenePopup"
>
<view class="sprite-icon icon-scene-change"></view>
</view>
<view class="btn" @click="handleSetting">
<view
class="btn"
@click="handleSetting"
>
<view class="sprite-icon icon-setting"></view>
</view>
</view>
<!-- 客服弹框 -->
<!-- <kf-box ref="kfRef" /> -->
<message-pop ref="kfRef" :type="messageType" :messageData="messageData"></message-pop>
<message-pop
ref="kfRef"
:type="messageType"
:messageData="messageData"
></message-pop>
<!-- 设置弹框 -->
<setting-box ref="settingRef" @stopAudio="$emit('stopAudio')" />
<center-popup :list="sceneTypeList" ref="sceneTypeRef" @choose="chooseSceneType" title="选择场景" tag="当前场景" :id="userInfo.sceneType" isLine />
<setting-box
ref="settingRef"
@stopAudio="$emit('stopAudio')"
/>
<center-popup
:list="sceneTypeList"
ref="sceneTypeRef"
@choose="chooseSceneType"
title="选择场景"
tag="当前场景"
:id="userInfo.sceneType"
isLine
/>
</view>
</template>
......@@ -61,7 +99,7 @@ export default {
userInfo: Object
},
name: '',
data() {
data () {
return {
messageData: {
classCountList: [],
......@@ -80,11 +118,17 @@ export default {
}
},
watch: {
userInfo(n) {
userInfo (n) {
console.log('userInfo', n)
if (n.shopMerchantId) this.haveCustomerAccess(n)
},
activityWindowPopStatus:{
handler (n) {
if(n == 1) this.getMessageInfo()
},
immediate: true,
deep: true
}
// trackId (n) {
// if (!n) {
// clearInterval(this.trackInterval)
......@@ -92,10 +136,10 @@ export default {
// }
},
computed: {
perRecordNumber() {
perRecordNumber () {
return this.$store.state.audio.perRecordNumber
},
sceneTypeList() {
sceneTypeList () {
const sceneTypeObject = {
1: {
title: '轻改',
......@@ -132,7 +176,7 @@ export default {
return result
},
// 这个tabs进来的值更新触发顺序是 getStudyCenterPermission的方法变更 => 计算属性的变更 => userInfo的监听变更 => haveCustomerAccess的变更。 计算属性的变更后的更新值是不会重新触发渲染的
tabs() {
tabs () {
const tabs = [
{
label: "首页",
......@@ -171,7 +215,10 @@ export default {
if (sceneType == 7) tabs[1].hidden = true
console.log('tabs', tabs)
return tabs
}
},
activityWindowPopStatus () {
return this.$store.state.sys.activityWindowPopStatus
},
},
created () {
// 监听自定义事件
......@@ -200,7 +247,7 @@ export default {
},
inject: ['showPage'],
methods: {
getUnreadCount() {
getUnreadCount () {
let _this = this
uni.$api.commonApi.getUnreadCount({}).then(res => {
this.readCount = res.data
......@@ -236,15 +283,15 @@ export default {
// this.leaveTrack()
// }, 5000)
// },
clickHome() {
clickHome () {
if (this.tabs[this.tabIndex].isTrack)
this.changeIndex(0, this.tabs[0])
},
handleSetting() {
handleSetting () {
this.$refs.settingRef.open()
this.clickHome()
},
findBeiSenSSOToken() {
findBeiSenSSOToken () {
return new Promise(resolve => {
const url = 'https%3A%2F%2Fcloud.italent.cn%2FPageHome%2FIndex%3Fproduct%3DLearning%26keyName%3DNusion%26pageCode%3DLearningNewHomepage%26appCode%3DLearning%26_qsrcapp%3DLearning%26_qrt%3Dhtml%26quark_s%3D5102bff371c00da5b19968ee53a8c3f1499ecd2447a19f72f3e3ba2390cc9617%23%2FviewDynamic%3Fshadow_context%3D%257BappModel%253A%2522italent%2522%252Cuppid%253A%25221%2522%257D%26quark_s%3D028930f1066f8ef8d28790940d53ae64337f44bde3a44cf89a290e4a3611e3e2'
uni.$api.commonApi.findBeiSenSSOToken({}).then(res => {
......@@ -254,7 +301,7 @@ export default {
})
})
},
handleActivityCenter() {
handleActivityCenter () {
console.log('ActivityCenter triggered'); // 添加日志查看触发次数
let { tabs } = this;
let index = tabs.findIndex(e => e.name == 'ActivityCenter');
......@@ -262,7 +309,7 @@ export default {
this.changeIndex(index, this.tabs[index]);
}
},
async changeIndex(index, item) {
async changeIndex (index, item) {
if (item.eventCode) uni.$track.add({
eventCode: item.eventCode
})
......@@ -283,13 +330,13 @@ export default {
this.findBeiSenSSOToken()
}
},
async haveCustomerAccess(val) {
async haveCustomerAccess (val) {
const { shopMerchantId, sceneType: scene } = val
uni.$api.customerApi.saleOpen({
merchantId: shopMerchantId,
scene
}).then(result => {
console.log('有客户权限',result)
console.log('有客户权限', result)
if (result) {
this.hasPerson = true
// this.activityTabVisible = scene !== 7
......@@ -325,7 +372,7 @@ export default {
})
},
// 获取话术未读列表
async getMessage() {
async getMessage () {
const { sceneType, uuid } = uni.$storage.get("userInfo")
let businessTypeList = []
if (sceneType == 0) {
......@@ -341,8 +388,9 @@ export default {
if (res.total) {
this.messageData = res
this.messageType = 'attendance'
this.$refs.kfRef.open()
this.openStudyPopup()
}
return Promise.resolve(res.total)
},
// 消息中心未读总数
// async getMessageCount () {
......@@ -354,7 +402,7 @@ export default {
// this.messageTotal = res
// },
// 学习中心消息弹窗,优先级高于有修改话术弹窗
async getMessagePop() {
async getMessagePop () {
const res = await uni.$api.commonApi.getMessagePop({})
if (res.ids && res.ids.length > 0) {
if (Array.isArray(res.moduleTypeList) && (res.moduleTypeList.includes(3) || res.moduleTypeList.includes(4))
......@@ -362,7 +410,7 @@ export default {
// 3, 4学习任务弹窗
this.messageType = 'study'
this.messageData = res
this.$refs.kfRef.open()
this.openStudyPopup()
// 确认消息
if (res.ids.length) {
uni.$api.commonApi.getStudyTaskConfirm({
......@@ -372,21 +420,27 @@ export default {
} else {
this.messageType = 'system'
this.messageData = res
this.$refs.kfRef.open()
this.openStudyPopup()
}
} else {
await this.getMessage()
const data = await this.getMessage()
if (!data && this.activityWindowPopStatus == 1) this.$store.dispatch('setActivityWindowPopCount', 2)
}
},
openPop() {
openStudyPopup () {
this.$refs.kfRef.open()
this.$store.dispatch('setActivityWindowPopCount', 0)
this.$emit('closeActivityCenter')
},
openPop () {
uni.navigateTo({
url: `/pages/common/messageList`
})
},
getMessageInfo() {
getMessageInfo () {
this.getMessagePop()
},
jumpPersonCenter() {
jumpPersonCenter () {
if (this.hasPerson) {
uni.$track.add({
eventCode: 'app_personal_center'
......@@ -395,7 +449,7 @@ export default {
this.$emit('update:tabIndex', 99)
}
},
chooseSceneType(index) {
chooseSceneType (index) {
let { userInfo, sceneTypeList } = this,
sceneType = sceneTypeList[index].id
if (sceneType == userInfo.sceneType) return
......@@ -414,7 +468,7 @@ export default {
url
})
},
openScenePopup() {
openScenePopup () {
this.$refs.sceneTypeRef.open()
uni.$track.add({
eventCode: 'app_scene_change'
......@@ -424,12 +478,12 @@ export default {
getStudyCenterPermission () {
const userInfo = uni.$storage.get('userInfo')
const res = uni.$storage.get('studyCenterPermission')
if(!res){
uni.$api.commonApi.getStudyCenterPermission({}).then(res => {
uni.$storage.set('studyCenterPermission', res)
console.log(res,'res')
})
}
if (!res) {
uni.$api.commonApi.getStudyCenterPermission({}).then(res => {
uni.$storage.set('studyCenterPermission', res)
console.log(res, 'res')
})
}
if (userInfo.sceneType == 7) {
this.tabs[2].hidden = true
}
......@@ -440,11 +494,11 @@ export default {
}
}
},
beforeCreate() {
beforeCreate () {
// clearInterval(this.trackInterval)
// this.trackInterval = null
},
beforeDestroy() {
beforeDestroy () {
// uni.$off('pageBack')
// uni.$off('studyCenter')
uni.$off('ActivityCenter', this.handleActivityCenter);
......
<template>
<view class="merchant-list">
<template v-for="(i, index) in list">
<view :key="index" @click="choose(i)" :class="['item flex', { active: currentId ? i.value == currentId : i.value == data[params.idKey] }]">
<view :key="index" @click="choose(i)" :class="['item flex', { active: currentId ? i.value == currentId : i.value == data.orderTypeCode }]">
<view class="sprite-icon icon-tag-checked"></view>
{{ i.name }}
</view>
......@@ -27,11 +27,14 @@ export default {
this.updateParams(params, data || [])
},
initData (list) {
const { params: { idKey }, data } = this
if (data[idKey]) {
this.currentId = data[idKey]
const { data } = this
// 使用 orderTypeCode 而不是 djOrderType,因为 orderTypeCode 存储的是代码(如 "1"),而 djOrderType 存储的是名称(如 "正常订单")
if (data.orderTypeCode) {
this.currentId = data.orderTypeCode
let item = list.find(i => i.value == this.currentId)
this.$emit('choose', item)
if (item) {
this.$emit('choose', item)
}
}
this.list = list
this.$emit('onComplete')
......
......@@ -383,10 +383,13 @@ const componentConfig = {
name: 'OrderTypePopup',
title: '订单类型',
hideSearch: true,
hideFooter: false,
// 绑定 CreateOrder 中的字段名
idKey: 'orderType',
idKey: 'djOrderType',
cacheData: [],
loadComplete: false
loadComplete: false,
searchValue: '',
noData: false
}
}
export default { componentConfig }
<template>
<view class="order-popup">
<popup
:position="position"
:animation="animation"
ref="popup"
@onConfirm="confirm"
@onCancel="cancel"
@onReset="reset"
:showReset="popupType === 15"
:hideFooter="componentObject[popupType].hideFooter"
:popupStyle="componentObject[popupType].popupStyle || ''"
>
<popup :position="position" :animation="animation" ref="popup" @onConfirm="confirm" @onCancel="cancel" @onReset="reset" :showReset="popupType === 15" :hideFooter="componentObject[popupType] && componentObject[popupType].hideFooter" :popupStyle="(componentObject[popupType] && componentObject[popupType].popupStyle) || ''">
<view class="popup-title flex">
{{ title }}
<view
class="popup-close flex"
@click="close"
>
<uni-icons
type="closeempty"
size="16"
></uni-icons>
<view class="popup-close flex" @click="close">
<uni-icons type="closeempty" size="16"></uni-icons>
</view>
</view>
<template v-if="!componentObject[popupType].hideSearch">
<template v-if="componentObject[popupType] && !componentObject[popupType].hideSearch">
<view class="popup-search">
<input
class="input"
type="text"
:placeholder="componentObject[popupType].placeholder || '请输入'"
placeholder-class="placeholder"
v-model="componentObject[popupType].searchValue"
confirm-type="search"
@confirm="handleSearch"
/>
<view
class="clear flex"
@click="clear"
>
<uni-icons
type="closeempty"
size="16"
v-if="componentObject[popupType].searchValue"
></uni-icons>
<input class="input" type="text" :placeholder="(componentObject[popupType] && componentObject[popupType].placeholder) || '请输入'" placeholder-class="placeholder" v-model="componentObject[popupType].searchValue" confirm-type="search" @confirm="handleSearch" />
<view class="clear flex" @click="clear">
<uni-icons type="closeempty" size="16" v-if="componentObject[popupType] && componentObject[popupType].searchValue"></uni-icons>
</view>
</view>
</template>
<view :class="['popup-body',
{'hide-footer': componentObject[popupType].hideFooter },
{'hide-search': componentObject[popupType].hideSearch },
{'hide-footer-search':componentObject[popupType].hideFooter && componentObject[popupType].hideSearch }
]">
<scroll-view
scroll-y
:class="['popup-scroll-view', { show: componentObject[popupType].loadComplete }]"
>
<component
:is="componentObject[popupType].name"
:params.sync="componentObject[popupType]"
:data="data"
:dataKey="dataKey"
:isDefeatOrder="isDefeatOrder"
:defaultTime="defaultTime"
:positionTypeList="positionTypeList"
ref="componentRef"
@choose="chooseContent = $event"
@openSkuPopup="openSkuPopup"
@onComplete="componentObject[popupType].loadComplete = true"
@confirm="confirm"
></component>
<view v-if="componentObject[popupType]" :class="['popup-body', { 'hide-footer': componentObject[popupType].hideFooter }, { 'hide-search': componentObject[popupType].hideSearch }, { 'hide-footer-search': componentObject[popupType].hideFooter && componentObject[popupType].hideSearch }]">
<scroll-view scroll-y :class="['popup-scroll-view', { show: componentObject[popupType].loadComplete }]">
<component :is="componentObject[popupType].name" :params.sync="componentObject[popupType]" :data="data" :dataKey="dataKey" :isDefeatOrder="isDefeatOrder" :defaultTime="defaultTime" :positionTypeList="positionTypeList" ref="componentRef" @choose="chooseContent = $event" @openSkuPopup="openSkuPopup" @onComplete="componentObject[popupType].loadComplete = true" @confirm="confirm"></component>
<template v-if="componentObject[popupType].noData">
<view class="nothing flex">暂无数据</view>
</template>
</scroll-view>
<image
v-if="!componentObject[popupType].loadComplete"
class="loading"
src="../../assets/images/common/loadding.gif"
/>
<image v-if="!componentObject[popupType].loadComplete" class="loading" src="../../assets/images/common/loadding.gif" />
</view>
</popup>
<sku-popup
ref="skuPopupRef"
@onConfirm="skuConfirm"
></sku-popup>
<sku-popup ref="skuPopupRef" @onConfirm="skuConfirm"></sku-popup>
</view>
</template>
......@@ -239,17 +181,25 @@ export default {
},
initPopupData () {
this.chooseContent = null
if (!this.componentObject[this.popupType]) {
console.error(`Popup type ${this.popupType} not found in config`)
return
}
let componentRef = this.componentRef()
if (!componentRef) setTimeout(this.initPopupData, .1e3)
else componentRef.getList && componentRef.getList(this.componentObject[this.popupType].searchValue)
else componentRef.getList && componentRef.getList(this.componentObject[this.popupType].searchValue || '')
},
handleSearch () {
if (!this.componentObject[this.popupType]) {
console.error(`Popup type ${this.popupType} not found in config`)
return
}
let componentRef = this.componentRef()
if (!componentRef) uni.showToast({
title: '请稍后再试',
icon: 'none'
})
else componentRef.handleSearch(this.componentObject[this.popupType].searchValue)
else componentRef.handleSearch(this.componentObject[this.popupType].searchValue || '')
},
confirm (autoClose) {
try {
......
<template>
<view class="list">
<view
@click="currentId = ''"
:class="['item flex',{active:!currentId}]"
>
<view @click="currentId = ''" :class="['item flex', { active: !currentId }]">
<view class="sprite-icon icon-tag-checked"></view>
全部
</view>
<template v-for="(i, index) in list">
<view
:key="index"
@click="currentId = i.id"
:class="['item flex',{active:currentId == i.id}]"
>
<view :key="index" @click="currentId = i.id" :class="['item flex', { active: currentId == i.id }]">
<view class="sprite-icon icon-tag-checked"></view>
{{i.name}}
{{ i.name }}
</view>
</template>
</view>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
export default {
name: 'OrderStatusList',
inject: ['userInfo'],
......@@ -81,7 +74,12 @@ export default {
name: '已退款',
value: [5, 12],
id: 11
}
},
{
name: '审批中',
value: [14],
id: 12
},
]),
currentId: '',
}
......@@ -120,7 +118,7 @@ export default {
}
</script>
<style scoped lang='scss'>
<style scoped lang="scss">
.list {
display: grid;
grid-template-columns: repeat(6, 1fr);
......@@ -156,4 +154,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
const screenList = [
{
title: '转化人员',
......@@ -27,18 +26,16 @@ const screenList = [
componentName: 'TimeList',
params: {
idKey: ['placeOrderStartDateStr', 'placeOrderEndDateStr'],
currentIdKey: 'orderTimeId',
},
currentIdKey: 'orderTimeId'
}
},
{
title: '支付时间',
componentName: 'TimeList',
params: {
idKey: ['installUpgradeBeginTimeStr', 'installUpgradeEndTimeStr'],
currentIdKey: 'payTimeId',
},
currentIdKey: 'payTimeId'
}
},
{
title: '订单状态',
......@@ -48,13 +45,19 @@ const screenList = [
}
},
{
title: '异常标记',
componentName: 'OrderStatusList',
params: {
idKey: 'statusList'
}
},
{
title: '支付方式',
componentName: 'PayList',
params: {
idKey: 'payType'
}
},
}
]
export default { screenList }
\ No newline at end of file
export default { screenList }
const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 2
const index = 1
/**
*
0本地
......
......@@ -8,7 +8,7 @@ isIos = (plus.os.name == "iOS")
// #endif
// 判断推送权限是否开启
function judgeIosPermissionPush() {
function judgeIosPermissionPush () {
var result = false;
var UIApplication = plus.ios.import("UIApplication");
var app = UIApplication.sharedApplication();
......@@ -40,7 +40,7 @@ function judgeIosPermissionPush() {
}
// 判断定位权限是否开启
function judgeIosPermissionLocation() {
function judgeIosPermissionLocation () {
var result = false;
var cllocationManger = plus.ios.import("CLLocationManager");
var status = cllocationManger.authorizationStatus();
......@@ -62,7 +62,7 @@ function judgeIosPermissionLocation() {
}
// 判断麦克风权限是否开启
function judgeIosPermissionRecord() {
function judgeIosPermissionRecord () {
var result = false;
var avaudiosession = plus.ios.import("AVAudioSession");
var avaudio = avaudiosession.sharedInstance();
......@@ -79,7 +79,7 @@ function judgeIosPermissionRecord() {
}
// 判断相机权限是否开启
function judgeIosPermissionCamera() {
function judgeIosPermissionCamera () {
var result = false;
var AVCaptureDevice = plus.ios.import("AVCaptureDevice");
var authStatus = AVCaptureDevice.authorizationStatusForMediaType('vide');
......@@ -95,7 +95,7 @@ function judgeIosPermissionCamera() {
}
// 判断相册权限是否开启
function judgeIosPermissionPhotoLibrary() {
function judgeIosPermissionPhotoLibrary () {
var result = false;
var PHPhotoLibrary = plus.ios.import("PHPhotoLibrary");
var authStatus = PHPhotoLibrary.authorizationStatus();
......@@ -111,7 +111,7 @@ function judgeIosPermissionPhotoLibrary() {
}
// 判断通讯录权限是否开启
function judgeIosPermissionContact() {
function judgeIosPermissionContact () {
var result = false;
var CNContactStore = plus.ios.import("CNContactStore");
var cnAuthStatus = CNContactStore.authorizationStatusForEntityType(0);
......@@ -126,7 +126,7 @@ function judgeIosPermissionContact() {
}
// 判断日历权限是否开启
function judgeIosPermissionCalendar() {
function judgeIosPermissionCalendar () {
var result = false;
var EKEventStore = plus.ios.import("EKEventStore");
var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(0);
......@@ -141,7 +141,7 @@ function judgeIosPermissionCalendar() {
}
// 判断备忘录权限是否开启
function judgeIosPermissionMemo() {
function judgeIosPermissionMemo () {
var result = false;
var EKEventStore = plus.ios.import("EKEventStore");
var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(1);
......@@ -156,46 +156,75 @@ function judgeIosPermissionMemo() {
}
// Android权限查询
function requestAndroidPermission(permissionID) {
function requestAndroidPermission (permissionID) {
const PermissionTips = {
['android.permission.RECORD_AUDIO']: {
title: '麦克风(录音)',
content: '为了记录接待过程以保障服务质量及订单纠纷处理,展业助手需要申请您的麦克风(录音)权限。'
},
['android.permission.CAMERA']: {
title: '相机',
content: '为了拍摄活动现场照片及客户购车凭证,展业助手需要申请您的相机权限。'
},
['android.permission.READ_EXTERNAL_STORAGE']: {
title: '相册',
content: '为了上传活动现场照片及客户购车凭证,展业助手需要申请您的相册权限。'
}
}[permissionID] || {
title: permissionID,
content: '请在permission。js中配置此权限。'
}
return new Promise((resolve, reject) => {
plus.android.requestPermissions(
[permissionID], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
function(resultObj) {
var result = 0;
for (var i = 0; i < resultObj.granted.length; i++) {
var grantedPermission = resultObj.granted[i];
console.log('已获取的权限:' + grantedPermission);
result = 1
plus.android.checkPermission(permissionID, ({ checkResult }) => {
if(checkResult == -1) uni.showModal({
...PermissionTips,
showCancel: true,
success: res => {
if (res.confirm) {
plus.android.requestPermissions(
[permissionID], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
function (resultObj) {
var result = 0;
for (var i = 0; i < resultObj.granted.length; i++) {
var grantedPermission = resultObj.granted[i];
console.log('已获取的权限:' + grantedPermission);
result = 1
}
for (var i = 0; i < resultObj.deniedPresent.length; i++) {
var deniedPresentPermission = resultObj.deniedPresent[i];
console.log('拒绝本次申请的权限:' + deniedPresentPermission);
result = 0
}
for (var i = 0; i < resultObj.deniedAlways.length; i++) {
var deniedAlwaysPermission = resultObj.deniedAlways[i];
console.log('永久拒绝申请的权限:' + deniedAlwaysPermission);
result = -1
}
resolve(result);
// 若所需权限被拒绝,则打开APP设置界面,可以在APP设置界面打开相应权限
// if (result != 1) {
// gotoAppPermissionSetting()
// }
},
function (error) {
console.log('申请权限错误:' + error.code + " = " + error.message);
resolve({
code: error.code,
message: error.message
});
}
);
}
}
for (var i = 0; i < resultObj.deniedPresent.length; i++) {
var deniedPresentPermission = resultObj.deniedPresent[i];
console.log('拒绝本次申请的权限:' + deniedPresentPermission);
result = 0
}
for (var i = 0; i < resultObj.deniedAlways.length; i++) {
var deniedAlwaysPermission = resultObj.deniedAlways[i];
console.log('永久拒绝申请的权限:' + deniedAlwaysPermission);
result = -1
}
resolve(result);
// 若所需权限被拒绝,则打开APP设置界面,可以在APP设置界面打开相应权限
// if (result != 1) {
// gotoAppPermissionSetting()
// }
},
function(error) {
console.log('申请权限错误:' + error.code + " = " + error.message);
resolve({
code: error.code,
message: error.message
});
}
);
})
else resolve(1)
})
});
}
// 使用一个方法,根据参数判断权限
function judgeIosPermission(permissionID) {
function judgeIosPermission (permissionID) {
if (permissionID == "location") {
return judgeIosPermissionLocation()
} else if (permissionID == "camera") {
......@@ -217,7 +246,7 @@ function judgeIosPermission(permissionID) {
}
// 跳转到**应用**的权限页面
function gotoAppPermissionSetting() {
function gotoAppPermissionSetting () {
if (isIos) {
var UIApplication = plus.ios.import("UIApplication");
var application2 = UIApplication.sharedApplication();
......@@ -245,7 +274,7 @@ function gotoAppPermissionSetting() {
// 检查系统的设备服务是否开启
// var checkSystemEnableLocation = async function () {
function checkSystemEnableLocation() {
function checkSystemEnableLocation () {
if (isIos) {
var result = false;
var cllocationManger = plus.ios.import("CLLocationManager");
......@@ -269,4 +298,4 @@ module.exports = {
requestAndroidPermission: requestAndroidPermission,
checkSystemEnableLocation: checkSystemEnableLocation,
gotoAppPermissionSetting: gotoAppPermissionSetting
}
}
{
"name" : "展业助手",
"appid" : "__UNI__D3BD3DF",
"description" : "",
"versionName" : "2.20.0",
"versionCode" : 2200,
"transformPx" : false,
"sassImplementationName" : "node-sass",
/* 5+App特有相关 */
"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
},
/* 模块配置 */
"modules" : {
"Camera" : {},
"Record" : {},
"VideoPlayer" : {},
"AudioPlayer" : {},
"SQLite" : {},
"Maps" : {},
"Geolocation" : {}
},
/* 应用发布信息 */
"distribute" : {
/* android打包配置 */
"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\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<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,
"minSdkVersion" : 21
},
/* ios打包配置 */
"ios" : {
"dSYMs" : false,
"UIBackgroundModes" : "audio"
},
/* SDK配置 */
"sdkConfigs" : {
"ad" : {},
"speech" : {},
"geolocation" : {
"baidu" : {
"__platform__" : [ "android" ],
"appkey_ios" : "",
"appkey_android" : "rfN7u5gCi0KyCGIWWBYGXlmKrVQsKH8z"
}
}
},
"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" : {}
}
}
}
},
/* 快应用特有相关 */
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "wx79d1ff39bee3d047",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
"name": "展业助手",
"appid": "__UNI__D3BD3DF",
"description": "",
"versionName": "2.20.2",
"versionCode": 2202,
"transformPx": false,
"sassImplementationName": "node-sass",
/* 5+App特有相关 */
"app-plus": {
"cache": false,
"bounce": "none",
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"compatible": {
"ignoreVersion": true
},
"mp-baidu" : {
"usingComponents" : true
"screenOrientation": "landscape",
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
"mp-toutiao" : {
"usingComponents" : true
/* 模块配置 */
"modules": {
"Camera": {},
"Record": {},
"VideoPlayer": {},
"AudioPlayer": {},
"SQLite": {},
"Maps": {},
"Geolocation": {}
},
"uniStatistics" : {
"enable" : false
/* 应用发布信息 */
"distribute": {
/* android打包配置 */
"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\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<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,
"minSdkVersion": 21,
"excludePermissions": ["<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>"]
},
/* ios打包配置 */
"ios": {
"dSYMs": false,
"UIBackgroundModes": "audio"
},
/* SDK配置 */
"sdkConfigs": {
"ad": {},
"speech": {},
"geolocation": {
"baidu": {
"__platform__": ["android"],
"appkey_ios": "",
"appkey_android": "rfN7u5gCi0KyCGIWWBYGXlmKrVQsKH8z"
}
},
"maps": {}
},
"icons": {
"android": {
"hdpi": "static/72.png",
"xhdpi": "static/96.png",
"xxhdpi": "static/144.png"
}
}
},
"vueVersion" : "2",
"h5" : {
"devServer" : {
"port" : 8080,
"https" : false
"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": {},
/* 小程序特有相关 */
"mp-weixin": {
"appid": "wx79d1ff39bee3d047",
"setting": {
"urlCheck": false
},
"usingComponents": true
},
"mp-alipay": {
"usingComponents": true
},
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao": {
"usingComponents": true
},
"uniStatistics": {
"enable": false
},
"vueVersion": "2",
"h5": {
"devServer": {
"port": 8080,
"https": false
}
}
}
......@@ -139,7 +139,7 @@
"navigationStyle": "custom"
}
},
{
{
"path": "pages/common/studyCenter/courseDetail",
"style": {
"navigationStyle": "custom"
......@@ -294,6 +294,12 @@
}
},
{
"path": "pages/usedCar/reportManagement/index",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/filePreview",
"style": {
"navigationStyle": "custom",
......
......@@ -39,6 +39,23 @@
</view>
</view>
</view>
<!-- 支付方式 -->
<view class="order-payType flex">
<view class="payType flex align-center">
<view class="payType-label">订单类型</view>
<view class="payType-value flex align-center">
{{ payType[orderCardDetail['selectPayType']] }}
</view>
</view>
<view class="order-price flex align-center">
<view class="order-price-label">审批状态</view>
<view class="price">
<text class="unit">¥</text>
{{ orderCardDetail.totalPrice }}
</view>
</view>
</view>
<view class="info-box">
<view class="order-list align-center" v-for="(item, sindex) in orderCardDetail.deliveryUserId ? pointsMultiObj : orderObj" :key="sindex">
<view class="order flex align-center">
......
......@@ -106,14 +106,12 @@ export default {
}
return null
},
// 计算基础价格(单价 * 数量)
// 计算基础价格(单价,不乘以数量)
getBasePrice(item) {
if (!item || !item.goods) return 0
const sellPrice = parseFloat(item.goods.sellPrice || 0)
const number = parseInt(item.goods.number || 1)
const basePrice = sellPrice * number
// 四舍五入保留两位小数
return Math.round(basePrice * 100) / 100
return Math.round(sellPrice * 100) / 100
},
// 计算最终显示价格
getDisplayPrice(item) {
......@@ -126,16 +124,16 @@ export default {
// '2' 打折策略
if (orderType === '2') {
if (strategyConfig.mode === 'ratio' && strategyConfig.discountRatio) {
// 折扣比例:1-10,表示 1 折到 10 折(即 0.1 到 1.0)
// 折扣比例:0.1-10,表示 0.1 折到 10 折(即 0.01 到 1.0)
const ratio = parseFloat(strategyConfig.discountRatio)
if (ratio >= 1 && ratio <= 10) {
if (ratio >= 0.1 && ratio <= 10) {
const finalPrice = basePrice * (ratio / 10)
return '¥' + (Math.round(finalPrice * 100) / 100).toFixed(2)
}
} else if (strategyConfig.mode === 'amount' && strategyConfig.discountAmount) {
// 折扣金额:0 到不能大于基础价格
// 折扣金额:0.01 到不能大于基础价格
const discountAmount = parseFloat(strategyConfig.discountAmount)
if (discountAmount >= 0 && discountAmount <= basePrice) {
if (discountAmount >= 0.01 && discountAmount <= basePrice) {
const finalPrice = basePrice - discountAmount
return '¥' + (Math.round(finalPrice * 100) / 100).toFixed(2)
}
......@@ -154,9 +152,9 @@ export default {
// '5' 组合付款
if (orderType === '5') {
if (strategyConfig.mode === 'deduct' && strategyConfig.deductAmount) {
// 抵扣金额:0 到不能大于基础价格
// 抵扣金额:0.01 到不能大于基础价格
const deductAmount = parseFloat(strategyConfig.deductAmount)
if (deductAmount >= 0 && deductAmount <= basePrice) {
if (deductAmount >= 0.01 && deductAmount <= basePrice) {
const finalPrice = basePrice - deductAmount
return '¥' + (Math.round(finalPrice * 100) / 100).toFixed(2)
}
......@@ -166,38 +164,62 @@ export default {
return '¥' + basePrice.toFixed(2)
},
// 价格变化回调
onPriceChange(item, finalPrice) {
// 可以在这里更新商品的其他价格相关字段
this.$set(item.goods, 'finalPrice', finalPrice)
// 价格变化回调(finalPrice 是单件商品优惠后的价格,需要乘以数量得到总价)
onPriceChange(item, finalPricePerUnit) {
// 计算总价:单件优惠价 * 数量
const number = parseInt(item.goods.number || 1)
const totalFinalPrice = Math.round(finalPricePerUnit * number * 100) / 100
// 存储总价
this.$set(item.goods, 'finalPrice', totalFinalPrice)
// 同时存储单价优惠后的价格,用于数量改变时重新计算
this.$set(item.goods, 'finalPricePerUnit', finalPricePerUnit)
this.$emit('changeTotalPrice')
},
// 重新计算 finalPrice(当数量改变时调用)
recalculateFinalPrice(item) {
// 如果有优惠策略配置
if (item.goods.strategyConfig && item.goods.finalPricePerUnit !== undefined) {
const number = parseInt(item.goods.number || 1)
const totalFinalPrice = Math.round(item.goods.finalPricePerUnit * number * 100) / 100
this.$set(item.goods, 'finalPrice', totalFinalPrice)
}
},
// 初始化策略配置
initStrategyConfig() {
if (!this.list || this.list.length === 0) return
const strategyType = this.getStrategyType({})
if (!strategyType) return
if (!strategyType) {
// 订单类型切换时,重置所有商品的策略配置
this.list.forEach(item => {
if (!item.goods) return
if (item.goods.strategyConfig) {
item.goods.strategyConfig = {}
}
item.goods.discountType = null
item.goods.discountValue = null
item.goods.finalPrice = null
})
return
}
this.list.forEach(item => {
if (!item.goods) return
// 如果还没有 strategyConfig,初始化一个默认值
if (!item.goods.strategyConfig) {
if (strategyType === 'discount') {
this.$set(item.goods, 'strategyConfig', {
mode: 'none',
discountRatio: '',
discountAmount: ''
})
} else if (strategyType === 'gift') {
this.$set(item.goods, 'strategyConfig', {
isGift: '0'
})
} else if (strategyType === 'combined') {
this.$set(item.goods, 'strategyConfig', {
mode: 'none',
deductAmount: ''
})
}
// 无论 strategyConfig 是否存在,都根据新的策略类型重新初始化
if (strategyType === 'discount') {
this.$set(item.goods, 'strategyConfig', {
mode: 'none',
discountRatio: '',
discountAmount: ''
})
} else if (strategyType === 'gift') {
this.$set(item.goods, 'strategyConfig', {
isGift: '0'
})
} else if (strategyType === 'combined') {
this.$set(item.goods, 'strategyConfig', {
mode: 'none',
deductAmount: ''
})
}
})
},
......@@ -281,6 +303,8 @@ export default {
}
// 更新值
this.$set(item.goods, 'number', value)
// 数量改变时,需要重新计算 finalPrice
this.recalculateFinalPrice(item)
// 数量变化时,如果已选择订单类型,触发策略组件重新计算价格
this.$forceUpdate()
this.$emit('changeTotalPrice')
......@@ -295,6 +319,8 @@ export default {
const newValue = currentValue >= 999 ? 999 : currentValue + 1
this.$set(item.goods, 'number', newValue.toString())
}
// 数量改变时,需要重新计算 finalPrice
this.recalculateFinalPrice(item)
this.$emit('changeTotalPrice')
},
// 减少数量
......@@ -308,6 +334,8 @@ export default {
// 确保减少后的值不小于1
const newValue = Math.max(1, currentValue - 1)
this.$set(item.goods, 'number', newValue.toString())
// 数量改变时,需要重新计算 finalPrice
this.recalculateFinalPrice(item)
this.$emit('changeTotalPrice')
},
// 删除商品
......
......@@ -128,7 +128,7 @@ const FORM_LIST = [
},
{
label: '订单类型',
value: 'orderType',
value: 'djOrderType',
type: 'select',
key: 'name',
required: true
......@@ -621,7 +621,7 @@ const popupTypeEnum = {
},
28: {
// 订单类型弹窗(OrderTypePopup)
key: 'orderType',
key: 'djOrderType',
list: ''
}
}
......
......@@ -135,6 +135,13 @@ const FORM_LIST = [
],
[
{
label: '订单类型',
value: 'djOrderType',
type: 'select',
key: 'name',
required: true
},
{
label: '购买商品',
value: 'skuGoods',
type: 'select',
......@@ -395,6 +402,11 @@ const popupTypeEnum = {
key: 'defeatEmployeeName',
targetIdKey: 'referrerId',
targetNameKey: 'referrer'
},
28: {
// 订单类型弹窗(OrderTypePopup)
key: 'djOrderType',
list: ''
}
}
const titleList = [null, { addHtml: 'customer' }, { name: '车辆信息' }, { name: '增值车损险' }, { name: '其他信息' }]
......@@ -647,6 +659,11 @@ const EQUITY_POPUP_ENUM = {
},
25: {
key: 'carBrand'
},
28: {
// 订单类型弹窗(OrderTypePopup)
key: 'djOrderType',
list: ''
}
}
......@@ -731,7 +748,7 @@ const EQUITY_FORM_RULE = {
{ required: true, message: '联系电话不能为空' },
{
validator: (rule, value) => {
const phoneRex = /^[1]([3-9])[0-9]{9}$/;
const phoneRex = /^[1]([3-9])[0-9]{9}$/
return !phoneRex.test(value) ? { message: '请输入正确的手机号' } : null
}
}
......
......@@ -83,7 +83,7 @@
<!-- 弹窗 -->
<OrderPopup ref="orderPopup" :data="displayData" :isDefeatOrder="true" :externalData="[]" @onConfirm="onConfirm" :popupType="0" />
<SelectCar ref="selectCar" title="选择车型" :car-brand-data="carBrandData" @car-selected="handleCarSelected" :on-load-year-data="loadYearDataForModel" />
<SelectCar ref="selectCar" title="选择车型" :car-brand-data="carBrandData" @car-selected="handleCarSelected" :on-load-year-data="loadYearDataForModel" :car-tips="carTips" />
<SelectCity
ref="selectCity"
title="选择城市"
......@@ -557,7 +557,8 @@ export default {
uploadOtherFields: [{ key: 41, label: '其他图片', required: false, accept: 'image', maxCount: 30, fullwidth: true }],
currentField: null,
query: {},
validateState: true
validateState: true,
carTips: ''
}
},
onLoad(options) {
......@@ -1327,17 +1328,32 @@ export default {
if (res.data.code == 0) {
if (res.data.data.status == 1) {
this.formData.carBaseReqDTO.vin = res.data.data.vin
validateVin(this.formData.carBaseReqDTO.vin)
.then(result => {
console.log('validateVin', result)
let { valid } = result.data
this.validateState = valid
// 校验成功,所有提示已在公共方法中处理
console.log('车架号校验成功:', result)
})
.catch(err => {
console.log('validateVinErr', result)
})
// 只有有 VIN 时才做后续校验和 queryByVin
if (this.formData.carBaseReqDTO.vin) {
validateVin(this.formData.carBaseReqDTO.vin)
.then(result => {
console.log('validateVin', result)
let { valid } = result.data
this.validateState = valid
// 校验成功,所有提示已在公共方法中处理
console.log('车架号校验成功:', result)
})
.catch(err => {
console.log('validateVinErr', err)
})
uni.$api.evaluationApi
.queryByVin({
vin: this.formData.carBaseReqDTO.vin
})
.then(res => {
console.log('res:queryByVin', res)
if (res.data.code == 0) {
this.carTips = res.data.data.base.commonName || ''
} else {
this.carTips = ''
}
})
}
uni.showToast({ title: '车架号识别完成并已自动填写到表单中', icon: 'none' })
uni.hideLoading()
} else {
......@@ -1473,6 +1489,21 @@ export default {
this.formData.carLicenseReqDTO.previousOwnerName = res.data.data.previousOwnerName
this.formData.carLicenseReqDTO.carSeriesName = res.data.data.carSeriesName
this.formData.carLicenseReqDTO.carTypeName = res.data.data.carTypeName
// 行驶证识别到 VIN 后,再调用 queryByVin
if (this.formData.carBaseReqDTO.vin) {
uni.$api.evaluationApi
.queryByVin({
vin: this.formData.carBaseReqDTO.vin
})
.then(res => {
console.log('res:', res)
if (res.data.code == 0) {
this.carTips = res.data.data.base.commonName || ''
} else {
this.carTips = ''
}
})
}
} else {
uni.hideLoading()
uni.showToast({ title: res.data.data.errorMessage, icon: 'none' })
......
......@@ -13,6 +13,7 @@
@step-change="onStepChange"
:isShowStepNumber="false"
></StepTab>
<view v-if="carTips" class="carTips">{{ carTips }}</view>
<view class="list-component">
<!-- 修复activeValue绑定,统一使用currentSelectedId -->
<SortByNameList :items="currentStepData" :activeValue="currentSelectedId" :activeField="'id'" :itemNameField="'name'" :groupKeyField="'letter'" :itemsPerRow="3" :itemSpacing="32" @item-click="handleItemClick" :enableFastScroll="false" />
......@@ -47,6 +48,10 @@ export default {
onLoadYearData: {
type: Function,
default: () => Promise.resolve([])
},
carTips: {
type: String,
default: ''
}
},
data() {
......@@ -448,4 +453,14 @@ export default {
}
}
}
.carTips {
border-radius: toRpx(16);
background: #fef4e8;
padding: toRpx(16) 0;
color: #f59619;
font-size: toRpx(26);
font-weight: 400;
text-align: center;
margin: 0 toRpx(48) toRpx(16);
}
</style>
<template>
<view class="type-tab">
<scroll-view class="type-box" scroll-x="true" show-scrollbar="false" scroll-with-animation>
<scroll-view class="type-box" scroll-x="true" show-scrollbar="false" scroll-with-animation @scroll="onScroll" ref="scrollView">
<view class="type-scroll-content">
<view class="tab-item" :class="[tabClass(index)]" v-for="(i, index) in typeList" :key="index" @click.stop="tabClick(index, i)">
<view v-if="tabIndex == index && index == 0" class="sprite-icon tab-first-left icon-first-left"></view>
<view v-if="tabIndex == index && index == 0" class="sprite-icon tab-first-right icon-first-right"></view>
<view v-if="tabIndex == index && index != 0 && index != typeList.length - 1" class="sprite-icon tab-second-right icon-second-right"></view>
<view v-if="tabIndex == index && index != 0 && index == typeList.length - 1" class="sprite-icon tab-end-right icon-end-right"></view>
<view v-if="tabIndex == index && index != 0 && (index != typeList.length - 1 || (index == typeList.length - 1 && !isOverflow))" class="sprite-icon tab-second-right icon-second-right"></view>
<view v-if="tabIndex == index && index != 0 && index == typeList.length - 1 && isOverflow" class="sprite-icon tab-end-right icon-end-right"></view>
<view v-if="tabIndex == index && index != 0" class="sprite-icon tab-second-left icon-second-left"></view>
<view class="text flex justify-center align-center" :class="[tabIndex == index ? `active` : '']">
<view>{{ i[nameKey] }}</view>
......@@ -39,6 +39,7 @@ export default {
data () {
return {
firstClass: Object.freeze(['first-nav', 'second-nav']),
isOverflow: false
}
},
computed: {
......@@ -48,8 +49,67 @@ export default {
},
},
mounted () {
// 延迟检测,确保 DOM 完全渲染
setTimeout(() => {
this.checkOverflow()
}, 300)
},
updated () {
// 延迟检测,确保 DOM 完全渲染
setTimeout(() => {
this.checkOverflow()
}, 300)
},
watch: {
typeList: {
handler () {
this.$nextTick(() => {
this.checkOverflow()
})
},
deep: true
}
},
methods: {
onScroll (e) {
// 通过滚动事件检测是否可以滚动
// 如果能滚动(scrollLeft > 0 或可以滚动到最右边),说明内容超出
const scrollLeft = e.detail.scrollLeft
const scrollWidth = e.detail.scrollWidth
// 如果 scrollLeft > 0,说明可以滚动,内容超出
// 或者如果 scrollWidth 存在且明显大于 0,也可能说明可以滚动
// 但为了更准确,我们还是使用 checkOverflow 方法
// 这里可以作为一个辅助检测
if (scrollLeft > 0 && !this.isOverflow) {
this.isOverflow = true
}
},
checkOverflow () {
this.$nextTick(() => {
// 增加延迟,确保 DOM 完全渲染
setTimeout(() => {
const query = uni.createSelectorQuery().in(this)
query.select('.type-box').boundingClientRect()
query.select('.type-scroll-content').boundingClientRect()
query.exec((res) => {
if (res && res[0] && res[1]) {
const boxRect = res[0]
const contentRect = res[1]
// 如果内容宽度大于容器宽度,说明可以滚动
// 添加一个小的容差值,避免因为像素精度问题导致判断错误
const overflow = contentRect.width > boxRect.width + 1
this.isOverflow = overflow
console.log('检测溢出状态:', {
boxWidth: boxRect.width,
contentWidth: contentRect.width,
isOverflow: this.isOverflow,
typeListLength: this.typeList.length
})
}
})
}, 300)
})
},
tabClass (index) {
let className = ''
if (this.tabIndex == index) {
......
......@@ -173,7 +173,20 @@
<view class="tab-panel-title">二手车转让协议</view>
<view class="gridBoxNoPadding">
<template v-for="(item, index) in vehicleItems">
<view v-if="(!detailsInfo.signingInfo.saleContract.depositPrice ? item.key !== 'signingInfo.saleContract.depositPrice' && item.key !== 'signingInfo.saleContract.finalPrice' : item.key !== 'signingInfo.saleContract.fullPrice') && (item.key !== 'signingInfo.saleContract.thirdPartyTransactionVoucher' || formatValue(item, detailsInfo))" :key="index" :class="['flex align-start', { 'full-width': item.fullWidth }, { 'align-center': item.type == 'link' }]">
<view
v-if="
(!detailsInfo.signingInfo.saleContract.depositPrice ? item.key !== 'signingInfo.saleContract.depositPrice' && item.key !== 'signingInfo.saleContract.finalPrice' : item.key !== 'signingInfo.saleContract.fullPrice') &&
(item.key !== 'signingInfo.saleContract.thirdPartyTransactionVoucher' || formatValue(item, detailsInfo)) &&
(item.key !== 'signingInfo.saleContract.handler' || detailsInfo.signingInfo.saleContract.signerType === 2) &&
(item.key !== 'signingInfo.saleContract.idCard' || detailsInfo.signingInfo.saleContract.signerType === 0 || detailsInfo.signingInfo.saleContract.signerType === 1) &&
(item.key !== 'signingInfo.saleContract.orgLicenseNumber' || detailsInfo.signingInfo.saleContract.signerType === 1 || detailsInfo.signingInfo.saleContract.signerType === 2) &&
(item.key !== 'signingInfo.saleContract.idCardFrontUrl' || (formatValue(item, detailsInfo) && (detailsInfo.signingInfo.saleContract.signerType === 0 || detailsInfo.signingInfo.saleContract.signerType === 1))) &&
(item.key !== 'signingInfo.saleContract.idCardBackUrl' || (formatValue(item, detailsInfo) && (detailsInfo.signingInfo.saleContract.signerType === 0 || detailsInfo.signingInfo.saleContract.signerType === 1))) &&
(item.key !== 'signingInfo.saleContract.orgLicenseUrl' || (formatValue(item, detailsInfo) && (detailsInfo.signingInfo.saleContract.signerType === 1 || detailsInfo.signingInfo.saleContract.signerType === 2)))
"
:key="index"
:class="['flex align-start', { 'full-width': item.fullWidth }, { 'align-center': item.type == 'link' }]"
>
<view class="title-label-see mr-16">{{ item.label }}</view>
<view v-if="item.type == 'image'">
<!-- 三方/委托交易凭证可能是视频 -->
......@@ -563,13 +576,26 @@ export default {
{ label: '尾款金额', key: 'signingInfo.saleContract.finalPrice', cell: '元' },
{ label: '全款金额', key: 'signingInfo.saleContract.fullPrice', cell: '元' },
{ label: '签约车主', key: 'signingInfo.saleContract.partAName' },
{
label: '签署人类型',
key: 'signingInfo.saleContract.signerType',
formatter: value => {
if (value === 1) return '企业委托'
if (value === 0) return '个人'
if (value === 2) return '企业'
return value || '-'
}
},
{ label: '经办人', key: 'signingInfo.saleContract.handler' },
{ label: '手机号码', key: 'signingInfo.saleContract.phone' },
{ label: '身份证号', key: 'signingInfo.saleContract.idCard' },
{ label: '营业执照号', key: 'signingInfo.saleContract.orgLicenseNumber' },
{ label: '合同模版名称', key: 'signingInfo.saleContract.docTemplateName' },
{ label: '交车时间', key: 'signingInfo.saleContract.handoverTime' },
{ label: '交车地点', key: 'signingInfo.saleContract.handoverAddress' },
{ label: '身份证国徽面', key: 'signingInfo.saleContract.idCardFrontUrl', type: 'image' },
{ label: '身份证人像面', key: 'signingInfo.saleContract.idCardBackUrl', type: 'image' },
{ label: '营业执照图片', key: 'signingInfo.saleContract.orgLicenseUrl', type: 'image' },
{ label: '三方/委托交易凭证', key: 'signingInfo.saleContract.thirdPartyTransactionVoucher', type: 'image' },
{ label: '查阅合同', key: 'signingInfo.saleContract.contractUrl', type: 'link' }
],
......
const ORDER_STATUS = {
0: '生成中',
1: '生成成功',
2: '生成失败'
}
const PAYMENT_STATUS = {
0: '待支付',
1: '已结清'
}
const OP_TYPE = {
1: '创建交付工单',
2: '确认客户到店',
3: '确认客户提车'
}
module.exports = {
ORDER_STATUS,
PAYMENT_STATUS,
OP_TYPE
}
<template>
<view class="detail-box">
<view class="nav-bar">
<view
class="back"
@click="backPage"
>
<uni-icons
type="left"
:size="20"
color="#000"
></uni-icons>
<view class="back" @click="backPage">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view class="title">展业工具</view>
</view>
......@@ -17,49 +10,20 @@
<view class="detail-left">
<view class="common-title">展业</view>
<view class="content">
<image
class="banner"
src="../../../assets/images/common/tool_banner.png"
mode="scaleToFill"
/>
<image class="banner" src="../../../assets/images/common/tool_banner.png" mode="scaleToFill" />
<template v-if="toolComponentName !== 'DailyReport'">
<Entrance @entranceClick="entranceClick"></Entrance>
</template>
<template v-else>
<uni-calendar
ref="calendar"
:clearDate="false"
:endDate="endDate"
:showMonth="false"
@monthSwitch="currentMonth = `${$event.year}-${$event.month}`"
openBeforeChange
@beforeChange="changeDate"
@change="currentDate = $event.fulldate"
backgroundColor="transparent"
:selected="selectedDays"
:date="currentDate"
/>
<uni-calendar ref="calendar" :clearDate="false" :endDate="endDate" :showMonth="false" @monthSwitch="currentMonth = `${$event.year}-${$event.month}`" openBeforeChange @beforeChange="changeDate" @change="currentDate = $event.fulldate" backgroundColor="transparent" :selected="selectedDays" :date="currentDate" />
</template>
</view>
</view>
<view class="detail-right">
<component
:ref="`detail-${toolComponentName}-Ref`"
:is="toolComponentName"
@jump="jump"
:transmission-of-data="transmissionOfData"
:currentDate="currentDate"
:currentMonth="currentMonth"
@setCalendarSelected="selectedDays = $event"
/>
<component :ref="`detail-${toolComponentName}-Ref`" :is="toolComponentName" @jump="jump" :transmission-of-data="transmissionOfData" :currentDate="currentDate" :currentMonth="currentMonth" @setCalendarSelected="selectedDays = $event" />
</view>
</view>
<NoticePopup
ref="notice"
title="重要提示"
text="内容尚未提交,是否退出编辑?"
type="warning"
></NoticePopup>
<NoticePopup ref="notice" title="重要提示" text="内容尚未提交,是否退出编辑?" type="warning"></NoticePopup>
</view>
</template>
......@@ -77,7 +41,7 @@ export default {
DailyReport,
NoticePopup
},
data () {
data() {
return {
toolComponentName: '',
transmissionOfData: null,
......@@ -87,7 +51,7 @@ export default {
selectedDays: []
}
},
onLoad (options) {
onLoad(options) {
if (options.componentName) this.toolComponentName = options.componentName
if (options.currentDate) this.setCurrentDate(options.currentDate)
uni.$on('jumpToDailyReport', currentDate => {
......@@ -95,7 +59,7 @@ export default {
if (currentDate) this.setCurrentDate(currentDate)
})
},
onBackPress (options) {
onBackPress(options) {
if (options.from === 'backbutton') {
// 物理返回按钮触发
// 阻止默认行为,即不执行页面返回
......@@ -106,14 +70,14 @@ export default {
return false
},
methods: {
setCurrentDate (currentDate) {
setCurrentDate(currentDate) {
this.currentDate = currentDate
this.currentMonth = dayjs(currentDate).format('YYYY-MM')
},
async entranceClick (item) {
if(this.toolComponentName == item.name) return
async entranceClick(item) {
if (this.toolComponentName == item.name) return
const noInterceptPage = ['DailyReport']
if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()))) return
if (!noInterceptPage.includes(item.name) && (await this.checkDailyReport())) return
// 保存当前选择的组件信息,但不立即切换
const selectedItem = item
if (this.toolComponentName === selectedItem.name && (!this.transmissionOfData || this.transmissionOfData.type !== 'supplementOrder')) return
......@@ -127,7 +91,7 @@ export default {
this.openNotice(selectedItem)
},
openNotice (selectedItem, back = true, callBack) {
openNotice(selectedItem, back = true, callBack) {
// 配置弹窗按钮
this.$refs.notice.buttonsList = [
{
......@@ -156,19 +120,19 @@ export default {
// 打开弹窗
this.$refs.notice.open()
},
async backPage () {
async backPage() {
const openNotice = await this.checkReport()
if (openNotice) this.openNotice()
else uni.navigateBack()
},
// name:跳转组件名,val:跳转参数
jump (name, val) {
jump(name, val) {
this.toolComponentName = name
if (val) {
this.transmissionOfData = val
}
},
async checkReport () {
async checkReport() {
let dailyReportRef = this.$refs['detail-DailyReport-Ref']
if (dailyReportRef) {
let { isDateWithin7Days, isFilled } = dailyReportRef
......@@ -176,7 +140,7 @@ export default {
}
return true
},
async changeDate (e) {
async changeDate(e) {
if (e.fullDate == this.currentDate) return
const openNotice = await this.checkReport()
if (!openNotice) return this.$refs.calendar.manualChangeDate(e)
......
export default {
token: (state) => state.user.token,
siteData: (state) => state.site.siteData,
userData: (state) => state.user.userData,
userId: (state) => state.user.userData.id,
isInBackgound: (state) => state.sys.isInBackgound,
customerInfo: (state) => state.user.customerInfo,
receptionTrack: (state) => state.user.receptionTrack,
receptionStatus: (state) => state.audio.receptionStatus,
booksList: (state) => state.audio.booksList,
receptionKey: (state) => state.user.receptionKey,
customerKey: (state) => state.user.customerKey
};
export default {
token: (state) => state.user.token,
siteData: (state) => state.site.siteData,
userData: (state) => state.user.userData,
userId: (state) => state.user.userData.id,
isInBackgound: (state) => state.sys.isInBackgound,
customerInfo: (state) => state.user.customerInfo,
receptionTrack: (state) => state.user.receptionTrack,
receptionStatus: (state) => state.audio.receptionStatus,
booksList: (state) => state.audio.booksList,
receptionKey: (state) => state.user.receptionKey,
customerKey: (state) => state.user.customerKey,
activityWindowPopStatus: (state) => state.sys.activityWindowPopStatus
};
export default {
state() {
return {
isInBackgound: false
}
},
mutations: {
SET_BACKGROUND_STATE(state, value) {
state.isInBackgound = value
}
},
actions: {
setBackgroundState({ commit }, value) {
uni.$logger.local.info(`【==== ${['切回', '切出'][+value]} ====】 APP`)
commit('SET_BACKGROUND_STATE', value)
}
}
}
export default {
state() {
return {
isInBackgound: false,
activityWindowPopStatus: 0 , //0 无次数 1 有次数 2打开弹框
}
},
mutations: {
SET_BACKGROUND_STATE(state, value) {
state.isInBackgound = value
},
SET_ACTIVITY_WINDOW_POP_COUNT(state, value){
state.activityWindowPopStatus = value
}
},
actions: {
setBackgroundState({ commit }, value) {
uni.$logger.local.info(`【==== ${['切回', '切出'][+value]} ====】 APP`)
commit('SET_BACKGROUND_STATE', value)
},
setActivityWindowPopCount({ commit }, value){
commit('SET_ACTIVITY_WINDOW_POP_COUNT', value)
}
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!