Commit 9d701c14 by 前端

Merge branch 'SAAS+V4.47.6' into 'master'

上线合并

See merge request !19
2 parents 81ea7e63 399f4fd6
Showing 156 changed files with 2323 additions and 886 deletions
......@@ -2,12 +2,13 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-07 17:09:53
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-10-31 11:01:19
* @LastEditTime: 2024-12-31 10:50:50
* @FilePath: \gl_tape\App.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<script>
const PATH = ['/pages/common/caseDetail']
const keepAlive = uni.requireNativePlugin('Ba-KeepAliveSuit')
import { mapState } from 'vuex'
import { Ws } from '@/ws/Ws.js'
export default {
......@@ -16,6 +17,7 @@ export default {
},
onLoad() {},
onLaunch: async function () {
this.onKeep()
// this.init()
this.setAPPVersion()
setTimeout(() => {
......@@ -28,6 +30,17 @@ export default {
new Ws().connect()
},
methods: {
onKeep() {
keepAlive.onKeep(
{
title: '接待',
content: '接待通知'
},
res => {
console.log(res)
}
)
},
init() {
uni.addInterceptor('navigateTo', {
//监听跳转
......@@ -111,7 +124,7 @@ body {
}
page {
font-size: 28rpx;
font-size: toRpx(28);
height: 100%;
min-height: 100%;
}
......@@ -157,7 +170,7 @@ button {
margin: 0;
padding: 0;
line-height: 1.5;
font-size: 28rpx;
font-size: toRpx(28);
background-color: transparent;
border-radius: 0;
position: relative;
......@@ -169,14 +182,14 @@ button::after {
// 指定按钮按下去的样式类
.button-hover {
transform: translate(1rpx, 1rpx);
transform: translate(toRpx(1), toRpx(1));
}
.webview-container {
position: absolute;
width: 100rpx;
height: 100rpx;
top: 0rpx;
left: 0rpx;
width: toRpx(100);
height: toRpx(100);
top: 0;
left: 0;
}
</style>
......@@ -149,5 +149,20 @@ module.exports = {
true,
'scrm'
)
},
/** 保存平板安装包信息 */
saveOrUpdateEmployeeAppUsage(data) {
return http.post({
method: 'dj.api.smartcarlife.recepiton.customer.saveOrUpdateEmployeeAppUsage',
projectName: 'boutique',
...data
})
},
checkAppUpload(data) {
return http.post({
method: 'dj.api.smartcarlife.recepiton.customer.checkAppUpload',
projectName: 'boutique',
...data
})
}
}
import commonApi from "./common";
import systemApi from "./systemApi";
import userApi from "./userApi";
import boutiqueApi from "./boutique";
import customerApi from "./customerApi";
import commonApi from './common'
import systemApi from './systemApi'
import userApi from './userApi'
import boutiqueApi from './boutique'
import customerApi from './customerApi'
import pointApi from './point'
module.exports = {
commonApi,
systemApi,
userApi,
boutiqueApi,
customerApi
};
customerApi,
pointApi
}
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-12-19 11:02:01
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-19 11:02:25
* @FilePath: \gl-tape\api\module\point.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import http from '../request/http'
module.exports = {
/**驻店规则列表 */
pointRuleList(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.rule.list',
projectName: 'boutique',
...data
})
} /**驻店规则详情列表 */,
pointRuleDetail(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.rule.detail.list',
projectName: 'boutique',
...data
})
} /**积分记录 */,
pointRecordList(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.record.list',
projectName: 'boutique',
...data
})
} /**驻店月份排名 */,
pointMonthRanking(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.month.ranking',
projectName: 'boutique',
...data
})
} /**每日积分-项目完成情况 */,
pointDayTask(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.every.day.task',
projectName: 'boutique',
...data
})
} /**积分首页 */,
getPoint(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.home.page',
projectName: 'boutique',
...data
})
}
}
......@@ -2,19 +2,19 @@ import http from '../request/http'
import { env } from '../../env'
const serverConfig = {
mockRequestCount: null,
mockTimer: {},
mockCache: null,
},
mockRequestCount: null,
mockTimer: {},
mockCache: null
},
bydServerConfig = {
mockRequestCount: null,
mockTimer: {},
mockCache: null,
mockCache: null
},
boutiqueServerConfig = {
mockRequestCount: null,
mockTimer: {},
mockCache: null,
mockCache: null
},
configModule = 'app-tape',
bydConfigModule = 'byd-pad-config',
......@@ -28,38 +28,38 @@ const getMockData = async (immediate = false) => {
const MOCKDATA = uni.$storage.get('mock_data')
try {
if (!immediate && MOCKDATA && Date.now() - MOCKDATA.createTime < 5 * 60e3) {
return Promise.resolve(MOCKDATA);
return Promise.resolve(MOCKDATA)
} else {
if (!serverConfig.mockRequestCount || immediate) {
serverConfig.mockCache = null;
serverConfig.mockRequestCount = Date.now();
const data = await http.uni_request({ url: configUrl });
data.createTime = Date.now();
serverConfig.mockCache = null
serverConfig.mockRequestCount = Date.now()
const data = await http.uni_request({ url: configUrl })
data.createTime = Date.now()
data.moduleList = await imgToBase64(data.moduleList, 'thumbnail')
data.default_moduleList = await imgToBase64(data.default_moduleList, 'thumbnail')
serverConfig.mockCache = data;
uni.$storage.set('mock_data', data);
return Promise.resolve(data);
serverConfig.mockCache = data
uni.$storage.set('mock_data', data)
return Promise.resolve(data)
} else {
const key = Date.now();
return new Promise((resolve) => {
const key = Date.now()
return new Promise(resolve => {
serverConfig.mockTimer[key] = setInterval(() => {
if (serverConfig.mockCache) {
clearInterval(serverConfig.mockTimer[key]);
serverConfig.mockRequestCount = null;
resolve(serverConfig.mockCache);
clearInterval(serverConfig.mockTimer[key])
serverConfig.mockRequestCount = null
resolve(serverConfig.mockCache)
}
}, 1e3);
});
}, 1e3)
})
}
}
} catch (error) {
console.log(error)
if (serverConfig.mockTimer[key]) clearInterval(serverConfig.mockTimer[key]);
serverConfig.mockRequestCount = null;
return Promise.reject(error);
if (serverConfig.mockTimer[key]) clearInterval(serverConfig.mockTimer[key])
serverConfig.mockRequestCount = null
return Promise.reject(error)
}
};
}
const imgToBase64 = (list, urlKey) => {
return new Promise((resolve, reject) => {
let arr = [],
......@@ -71,20 +71,20 @@ const imgToBase64 = (list, urlKey) => {
url: urlKey ? e[urlKey] : e,
method: 'GET',
responseType: 'arraybuffer',
success: (res) => {
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) => {
fail: err => {
reject(err)
}
})
})
})
};
}
const updateMockData = (dataList, keyList, storageName = 'mock_data') => {
const mockData = uni.$storage.get(storageName)
keyList.map(key => {
......@@ -101,72 +101,82 @@ const getBydMockData = async (immediate = false) => {
const MOCKDATA = uni.$storage.get('byd_mock_data')
try {
if (!immediate && MOCKDATA && Date.now() - MOCKDATA.createTime < 5 * 60e3) {
return Promise.resolve(MOCKDATA);
return Promise.resolve(MOCKDATA)
} else {
if (!bydServerConfig.mockRequestCount || immediate) {
bydServerConfig.mockCache = null;
bydServerConfig.mockRequestCount = Date.now();
const data = await http.uni_request({ url: bydConfigUrl });
data.createTime = Date.now();
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);
bydServerConfig.mockCache = data
uni.$storage.set('byd_mock_data', data)
return Promise.resolve(data)
} else {
const key = Date.now();
return new Promise((resolve) => {
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);
clearInterval(bydServerConfig.mockTimer[key])
bydServerConfig.mockRequestCount = null
resolve(bydServerConfig.mockCache)
}
}, 1e3);
});
}, 1e3)
})
}
}
} catch (error) {
console.log(error)
if (bydServerConfig.mockTimer[key]) clearInterval(bydServerConfig.mockTimer[key]);
bydServerConfig.mockRequestCount = null;
return Promise.reject(error);
if (bydServerConfig.mockTimer[key]) clearInterval(bydServerConfig.mockTimer[key])
bydServerConfig.mockRequestCount = null
return Promise.reject(error)
}
}
/**
*获取后台素材配置
*/
const findReceptionpriproConfigList = data => {
return http.post({
method: 'dj.api.smartcarlife.recepiton.customer.findReceptionpriproConfigList',
projectName: 'boutique',
...data
})
}
/**
*获取轻改配置
*/
const getBoutiqueMockData = async (immediate = false) => {
const MOCKDATA = uni.$storage.get('boutique_mock_data')
try {
if (!immediate && MOCKDATA && Date.now() - MOCKDATA.createTime < 5 * 60e3) {
return Promise.resolve(MOCKDATA);
return Promise.resolve(MOCKDATA)
} else {
if (!boutiqueServerConfig.mockRequestCount || immediate) {
boutiqueServerConfig.mockCache = null;
boutiqueServerConfig.mockRequestCount = Date.now();
const data = await http.uni_request({ url: boutiqueConfigUrl });
data.createTime = Date.now();
boutiqueServerConfig.mockCache = data;
uni.$storage.set('boutique_mock_data', data);
return Promise.resolve(data);
boutiqueServerConfig.mockCache = null
boutiqueServerConfig.mockRequestCount = Date.now()
const data = await http.uni_request({ url: boutiqueConfigUrl })
data.createTime = Date.now()
boutiqueServerConfig.mockCache = data
uni.$storage.set('boutique_mock_data', data)
return Promise.resolve(data)
} else {
const key = Date.now();
return new Promise((resolve) => {
const key = Date.now()
return new Promise(resolve => {
boutiqueServerConfig.mockTimer[key] = setInterval(() => {
if (boutiqueServerConfig.mockCache) {
clearInterval(boutiqueServerConfig.mockTimer[key]);
boutiqueServerConfig.mockRequestCount = null;
resolve(boutiqueServerConfig.mockCache);
clearInterval(boutiqueServerConfig.mockTimer[key])
boutiqueServerConfig.mockRequestCount = null
resolve(boutiqueServerConfig.mockCache)
}
}, 1e3);
});
}, 1e3)
})
}
}
} catch (error) {
console.log(error)
if (boutiqueServerConfig.mockTimer[key]) clearInterval(boutiqueServerConfig.mockTimer[key]);
boutiqueServerConfig.mockRequestCount = null;
return Promise.reject(error);
if (boutiqueServerConfig.mockTimer[key]) clearInterval(boutiqueServerConfig.mockTimer[key])
boutiqueServerConfig.mockRequestCount = null
return Promise.reject(error)
}
}
// 图片版本号
......@@ -181,5 +191,6 @@ module.exports = {
imgToBase64,
updateMockData,
getBydMockData,
getBoutiqueMockData
}
\ No newline at end of file
getBoutiqueMockData,
findReceptionpriproConfigList
}

1.2 MB | W: | H:

1.27 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -215,24 +215,24 @@ export default {
<style scoped lang='scss'>
.select-box {
margin: 40rpx 0;
margin: toRpx(40) 0;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 32rpx;
gap: toRpx(32);
overflow-y: scroll;
max-height: 50vh;
padding-bottom: 60rpx;
padding-bottom: toRpx(60);
.select-item {
text-align: center;
height: 68rpx;
line-height: 44rpx;
height: toRpx(68);
line-height: toRpx(44);
opacity: 1;
border: 2rpx solid #dce0e6;
border: toRpx(2) solid #dce0e6;
color: #333;
font-size: 32rpx;
border-radius: 8rpx;
font-size: toRpx(32);
border-radius: toRpx(8);
&.checked {
border: 2rpx solid #292d33;
border: toRpx(2) solid #292d33;
}
}
}
......
......@@ -97,21 +97,21 @@ export default {
.customer-box {
position: absolute;
left: 0;
top: 88rpx;
top: toRpx(88);
width: 100%;
height: 352rpx;
height: toRpx(352);
background: #ffffff;
border-radius: 16rpx;
border-radius: toRpx(16);
z-index: -1;
opacity: 0;
.customer-title {
font-size: 24rpx;
font-size: toRpx(24);
color: #999999;
line-height: 40rpx;
padding: 16rpx 24rpx 8rpx;
line-height: toRpx(40);
padding: toRpx(16) toRpx(24) toRpx(8);
}
.scroll-box {
height: calc(100% - 64rpx);
height: calc(100% - #{toRpx(64)});
.loading {
width: 100%;
height: 100%;
......@@ -123,26 +123,26 @@ export default {
.nothing {
width: 100%;
height: 100%;
font-size: 24rpx;
font-size: toRpx(24);
color: #c7ccd7;
flex-direction: column;
.icon {
margin-top: 52rpx;
width: 96rpx;
height: 96rpx;
margin-top: toRpx(52);
width: toRpx(96);
height: toRpx(96);
background-image: url('@/assets/images/common/nothing.webp');
background-size: 100%;
}
}
.item {
width: 100%;
height: 48rpx;
font-size: 28rpx;
height: toRpx(48);
font-size: toRpx(28);
color: #333333;
line-height: 40rpx;
padding-left: 24rpx;
margin-bottom: 8rpx;
line-height: toRpx(40);
padding-left: toRpx(24);
margin-bottom: toRpx(8);
}
.active {
background: #ecf1ff;
......
......@@ -146,41 +146,41 @@ export default {
overflow-y: scroll;
max-height: 60vh;
position: relative;
padding-bottom: 128rpx;
padding-bottom: toRpx(128);
.select-group {
margin: 32rpx 0;
margin: toRpx(32) 0;
.select-title {
font-size: 28rpx;
font-size: toRpx(28);
color: #999999;
margin-bottom: 10rpx;
margin-bottom: toRpx(10);
}
.select-box {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 32rpx;
gap: toRpx(32);
.select-item {
text-align: center;
justify-content: center;
opacity: 1;
border: 2rpx solid #dce0e6;
border: toRpx(2) solid #dce0e6;
color: #333;
font-size: 32rpx;
border-radius: 8rpx;
font-size: toRpx(32);
border-radius: toRpx(8);
position: relative;
box-sizing: border-box;
padding: 13rpx 40rpx;
padding: toRpx(13) toRpx(40);
word-break: break-all;
line-height: 44rpx;
line-height: toRpx(44);
.sprite-icon {
display: none;
position: absolute;
right: -2rpx;
top: -2rpx;
right: toMinusRpx(2);
top: toMinusRpx(2);
}
}
.checked {
border: 2rpx solid #2c66f7;
border: toRpx(2) solid #2c66f7;
background: #ecf1ff;
color: #2c66f7;
.sprite-icon {
......@@ -195,23 +195,23 @@ export default {
left: 0;
bottom: 0;
width: 100%;
height: 176rpx;
height: toRpx(176);
background: #ffffff;
box-sizing: border-box;
padding-top: 32rpx;
padding-top: toRpx(32);
display: flex;
justify-content: center;
gap: 0 34rpx;
gap: 0 toRpx(34);
.btn {
width: 718rpx;
height: 80rpx;
width: toRpx(718);
height: toRpx(80);
background-image: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
border-radius: 48rpx;
border-radius: toRpx(48);
display: flex;
justify-content: center;
align-items: center;
font-weight: 500;
font-size: 32rpx;
font-size: toRpx(32);
color: #ffffff;
}
.cancel {
......
......@@ -74,24 +74,24 @@ export default {
<style scoped lang="scss">
.select-box {
margin: 40rpx 0;
margin: toRpx(40) 0;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 32rpx;
gap: toRpx(32);
overflow-y: scroll;
max-height: 50vh;
padding-bottom: 60rpx;
padding-bottom: toRpx(60);
.select-item {
text-align: center;
height: 68rpx;
line-height: 44rpx;
height: toRpx(68);
line-height: toRpx(44);
opacity: 1;
border: 2rpx solid #dce0e6;
border: toRpx(2) solid #dce0e6;
color: #333;
font-size: 32rpx;
border-radius: 8rpx;
font-size: toRpx(32);
border-radius: toRpx(8);
&.checked {
border: 2rpx solid #292d33;
border: toRpx(2) solid #292d33;
}
}
}
......
......@@ -303,15 +303,15 @@ export default {
.pop-tips {
background: rgba(44, 102, 247, 0.1);
color: #2c66f7;
font-size: 28rpx;
padding: 24rpx 80rpx 24rpx;
margin-top: 30rpx;
font-size: toRpx(28);
padding: toRpx(24) toRpx(80) toRpx(24);
margin-top: toRpx(30);
text-align: center;
}
.error-tip {
font-size: 28rpx;
padding: 32rpx 60rpx 24rpx;
margin-top: 30rpx;
font-size: toRpx(28);
padding: toRpx(32) toRpx(60) toRpx(24);
margin-top: toRpx(30);
text-align: center;
background-color: rgb(254, 237, 234);
color: #f45c3d;
......@@ -319,44 +319,44 @@ export default {
.form {
display: flex;
flex-wrap: wrap;
gap: 24rpx 0;
padding-top: 30rpx;
gap: toRpx(24) 0;
padding-top: toRpx(30);
&-item {
// flex: 50%;
display: flex;
align-items: center;
color: #6c6c70;
font-size: 30rpx;
font-size: toRpx(30);
box-sizing: border-box;
margin: 0 auto;
.label {
position: relative;
margin-left: auto;
flex-shrink: 0;
width: 124rpx;
width: toRpx(124);
}
.required {
&::before {
content: '*';
color: #ff0000;
position: absolute;
left: -20rpx;
left: toMinusRpx(20);
top: 50%;
transform: translate(0, -50%);
}
}
.value {
width: 520rpx;
height: 80rpx;
border: 2rpx solid #e8e8ea;
width: toRpx(520);
height: toRpx(80);
border: toRpx(2) solid #e8e8ea;
background: #ffffff;
margin-left: 32rpx;
margin-left: toRpx(32);
box-sizing: border-box;
padding: 0 40rpx;
border-radius: 8rpx;
padding: 0 toRpx(40);
border-radius: toRpx(8);
&.error {
border: 2rpx solid #f24724;
border-radius: 8rpx;
border: toRpx(2) solid #f24724;
border-radius: toRpx(8);
}
.input,
.select {
......@@ -365,7 +365,7 @@ export default {
border: none !important;
outline: none;
padding: 0 !important;
font-size: 30rpx;
font-size: toRpx(30);
&::placeholder {
color: #c9c9c9;
}
......@@ -378,7 +378,7 @@ export default {
}
}
/deep/ .placeholder {
font-size: 30rpx;
font-size: toRpx(30);
color: #c9c9c9;
}
}
......@@ -398,15 +398,15 @@ export default {
align-items: center;
.choose-item {
width: 100%;
height: 128rpx;
border: 2rpx solid #e8e8e8;
border-radius: 16rpx;
height: toRpx(128);
border: toRpx(2) solid #e8e8e8;
border-radius: toRpx(16);
display: flex;
align-items: center;
justify-content: center;
margin-top: 24rpx;
margin-top: toRpx(24);
.sprite-icon {
margin-right: 16rpx;
margin-right: toRpx(16);
}
}
.success {
......
<template>
<view
class="case-item"
class="case-item-component"
@click="jumpDetail(item)"
>
<image
......@@ -96,36 +96,36 @@ export default {
</script>
<style scoped lang='scss'>
.case-item {
.case-item-component {
width: 100%;
height: 100%;
background: #ffffff;
box-shadow: 0 8rpx 24rpx 0 #2c66f71a;
border-radius: 16rpx;
box-shadow: 0 toRpx(8) toRpx(24) 0 #2c66f71a;
border-radius: toRpx(16);
display: flex;
flex-direction: column;
overflow: hidden;
.img {
width: 100%;
height: 324rpx;
height: toRpx(324);
}
.case-name {
font-weight: 500;
font-size: 28rpx;
font-size: toRpx(28);
color: #333333;
line-height: 48rpx;
padding: 16rpx 32rpx 8rpx;
line-height: toRpx(48);
padding: toRpx(16) toRpx(32) toRpx(8);
}
.case-text {
align-items: flex-start;
font-size: 24rpx;
font-size: toRpx(24);
color: #666666;
line-height: 40rpx;
padding: 0 32rpx;
margin-bottom: 4rpx;
line-height: toRpx(40);
padding: 0 toRpx(32);
margin-bottom: toRpx(4);
}
.case-label {
width: 120rpx;
width: toRpx(120);
flex-shrink: 0;
}
}
......
......@@ -366,27 +366,27 @@ export default {
z-index: 9;
.customer-info-box {
position: absolute;
top: 80rpx;
left: 240rpx;
width: 2042rpx;
height: 1376rpx;
top: toRpx(80);
left: toRpx(240);
width: 87.04%;
height: toRpx(1376);
background: #ffffff59;
box-shadow: inset 0 0 16rpx 0 #ffffff;
border-radius: 48rpx;
backdrop-filter: blur(8rpx);
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
border-radius: toRpx(48);
backdrop-filter: blur(toRpx(8));
pointer-events: auto;
animation: show-info-box 0.25s forwards;
.nav-bar {
width: 100%;
height: 96rpx;
height: toRpx(96);
z-index: 9;
text-align: center;
font-weight: 700;
font-size: 32rpx;
font-size: toRpx(32);
color: #1a1a1a;
line-height: 96rpx;
line-height: toRpx(96);
position: relative;
margin-top: 16rpx;
margin-top: toRpx(16);
.back {
position: absolute;
left: 0;
......@@ -400,44 +400,44 @@ export default {
}
.form-box {
flex-wrap: wrap;
padding: 32rpx 40rpx;
padding: toRpx(32) toRpx(40);
justify-content: space-between;
.form-item {
width: 934rpx;
height: 80rpx;
margin-bottom: 48rpx;
width: toRpx(934);
height: toRpx(80);
margin-bottom: toRpx(48);
font-size: 28rpx;
font-size: toRpx(28);
}
.label {
width: 192rpx;
width: toRpx(192);
color: #292d33;
justify-content: center;
.required {
color: #f24724;
font-size: 28rpx;
font-size: toRpx(28);
}
}
.input,
.select {
width: 738rpx;
height: 76rpx;
width: toRpx(738);
height: toRpx(76);
background: #ffffff;
border-radius: 16rpx;
border: 2rpx solid transparent !important;
border-radius: toRpx(16);
border: toRpx(2) solid transparent !important;
outline: none;
color: #333333;
border-radius: 16rpx;
border-radius: toRpx(16);
box-sizing: border-box;
line-height: 76rpx;
padding: 0 32rpx !important;
line-height: toRpx(76);
padding: 0 toRpx(32) !important;
box-sizing: border-box;
font-size: 28rpx;
font-size: toRpx(28);
&::placeholder {
color: #33333333;
}
.value {
max-width: 598rpx;
max-width: toRpx(598);
}
}
.placeholderStyle {
......@@ -449,22 +449,22 @@ export default {
flex-shrink: 0;
}
.error {
border: 2rpx solid #f24724 !important;
border: toRpx(2) solid #f24724 !important;
}
}
.btns {
justify-content: center;
gap: 0 34rpx;
gap: 0 toRpx(34);
.btn {
width: 718rpx;
height: 80rpx;
width: toRpx(718);
height: toRpx(80);
background-image: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
border-radius: 48rpx;
border-radius: toRpx(48);
display: flex;
justify-content: center;
align-items: center;
font-weight: 500;
font-size: 32rpx;
font-size: toRpx(32);
color: #ffffff;
}
.cancel {
......@@ -487,12 +487,12 @@ export default {
left: 100%;
}
100% {
left: 240rpx;
left: toRpx(240);
}
}
@keyframes back {
0% {
left: 240rpx;
left: toRpx(240);
}
100% {
left: 100%;
......
......@@ -76,82 +76,82 @@ export default {
<style scoped lang='scss'>
.kf-box {
position: relative;
width: 864rpx;
height: 478rpx;
width: toRpx(864);
height: toRpx(478);
background: #ffffff;
border-radius: 32rpx;
padding: 0 48rpx;
border-radius: toRpx(32);
padding: 0 toRpx(48);
box-sizing: border-box;
.close {
position: absolute;
width: 120rpx;
height: 120rpx;
width: toRpx(120);
height: toRpx(120);
top: 0;
right: 0;
justify-content: center;
}
.title {
font-weight: 500;
font-size: 32rpx;
padding: 46rpx 0;
font-size: toRpx(32);
padding: toRpx(46) 0;
.sprite-icon {
margin-right: 16rpx;
margin-right: toRpx(16);
}
}
.info {
.name {
position: relative;
width: 480rpx;
width: toRpx(480);
font-weight: 600;
font-size: 48rpx;
font-size: toRpx(48);
align-items: baseline;
padding-bottom: 24rpx;
border-bottom: 2rpx solid #e6e6e6;
padding-bottom: toRpx(24);
border-bottom: toRpx(2) solid #e6e6e6;
.duty {
font-weight: 400;
font-size: 28rpx;
margin-left: 16rpx;
font-size: toRpx(28);
margin-left: toRpx(16);
}
&::after {
position: absolute;
left: 0;
bottom: -2rpx;
width: 280rpx;
height: 4rpx;
bottom: toMinusRpx(2);
width: toRpx(280);
height: toRpx(4);
background: #2c66f7;
content: "";
}
}
.content {
padding: 28rpx 0;
padding: toRpx(28) 0;
font-weight: 500;
font-size: 28rpx;
font-size: toRpx(28);
}
.tool {
display: flex;
flex-wrap: wrap;
&-item {
flex: 50%;
font-size: 28rpx;
font-size: toRpx(28);
color: #666666;
margin-bottom: 20rpx;
margin-bottom: toRpx(20);
.sprite-icon {
margin-right: 8rpx;
margin-right: toRpx(8);
}
}
}
}
.qr-box {
margin-left: 48rpx;
margin-left: toRpx(48);
flex-shrink: 0;
flex-direction: column;
font-weight: 500;
font-size: 28rpx;
font-size: toRpx(28);
.qr {
width: 240rpx;
height: 240rpx;
margin-bottom: 8rpx;
width: toRpx(240);
height: toRpx(240);
margin-bottom: toRpx(8);
}
}
}
......
......@@ -36,14 +36,14 @@ import SettingBox from "./SettingBox";
import { STORAGE_OBJECTkEY } from '@/utils/cache/constantData'
export default {
components: { KfBox, SettingBox },
props:{
tabIndex:Number,
userInfo:Object
props: {
tabIndex: Number,
userInfo: Object
},
name: '',
data () {
return {
tabs: [
tabs: [
{
label: "首页",
icon: "home",
......@@ -52,32 +52,36 @@ export default {
label: "接待记录",
icon: "record",
},
// {
// label: "积分权益",
// icon: "point",
// },
],
}
},
watch:{
watch: {
userInfo (n) {
if(n.shopMerchantId) this.haveCustomerAccess(n.shopMerchantId)
if (n.shopMerchantId) this.haveCustomerAccess(n.shopMerchantId)
}
},
computed: {
perRecordNumber() {
perRecordNumber () {
return this.$store.state.audio.perRecordNumber
}
},
mounted () {
},
methods: {
changeIndex (index) {
changeIndex (index) {
if (this.tabIndex == index) return;
this.$emit('update:tabIndex',index)
this.$emit('update:tabIndex', index)
this.$emit("changeTab", index)
},
async haveCustomerAccess (merchantId) {
const res = await uni.$api.customerApi.haveCustomerAccess({
merchantId
})
if (res && this.tabs.length == 2) this.tabs.push({
if (res) this.tabs.splice(2,0,{
label: "客户档案",
icon: "customer-file",
})
......@@ -92,22 +96,24 @@ export default {
display: flex;
flex-direction: column;
position: relative;
width: toRpx(240);
flex-shrink: 0;
.left-tabs {
width: 240rpx;
height: 1080rpx;
width: 100%;
height: toRpx(1080);
display: flex;
flex-direction: column;
justify-content: center;
// align-items: center;
box-sizing: border-box;
padding: 16rpx 0;
padding: toRpx(16) 0;
position: absolute;
top: 50%;
left: 0;
transform: translateY(-50%);
margin: auto;
box-sizing: border-box;
padding-left: 32rpx;
padding-left: toRpx(32);
&::after {
position: absolute;
left: 0;
......@@ -120,24 +126,24 @@ export default {
z-index: -1;
}
.tab-item {
width: 112rpx;
font-size: 28rpx;
width: toRpx(112);
font-size: toRpx(28);
color: #8a98b5;
text-align: center;
padding-bottom: 96rpx;
padding-bottom: toRpx(46);
position: relative;
.dot {
width: 16rpx;
height: 16rpx;
width: toRpx(16);
height: toRpx(16);
background: #f24724;
border-radius: 50%;
position: absolute;
right: 20rpx;
top: 20rpx;
right: toRpx(20);
top: toRpx(20);
}
.icon-box {
width: 112rpx;
height: 112rpx;
width: toRpx(112);
height: toRpx(112);
display: flex;
justify-content: center;
align-items: center;
......@@ -161,57 +167,57 @@ export default {
}
.three {
.tab-item {
padding-bottom: 64rpx;
padding-bottom: toRpx(64);
}
}
.user-info {
width: 240rpx;
width: toRpx(184);
box-sizing: border-box;
padding-top: 92rpx;
padding-top: toRpx(92);
flex-direction: column;
text-align: center;
position: relative;
z-index: 2;
text-align: center;
.account-change {
width: 136rpx;
height: 32rpx;
width: toRpx(136);
height: toRpx(32);
background: #ffffff66;
border-radius: 16rpx;
font-size: 20rpx;
border-radius: toRpx(16);
font-size: toRpx(20);
color: #9e9e9e;
justify-content: center;
margin-top: 10rpx;
margin-top: toRpx(10);
}
}
.user-avatar {
width: 100rpx;
height: 100rpx;
border: 2rpx solid #ffffff;
box-shadow: 0 4rpx 8rpx 0 #0000001a;
width: toRpx(100);
height: toRpx(100);
border: toRpx(2) solid #ffffff;
box-shadow: 0 toRpx(4) toRpx(8) 0 #0000001a;
border-radius: 100%;
}
.user-name {
font-weight: 500;
font-size: 28rpx;
font-size: toRpx(28);
color: #292d33;
margin-top: 16rpx;
padding: 0 24rpx;
margin-top: toRpx(16);
padding: 0 toRpx(24);
}
.user-position {
font-size: 20rpx;
font-size: toRpx(20);
color: #9b9b9e;
margin-top: 8rpx;
margin-top: toRpx(8);
}
.left-footer {
margin-top: auto;
padding: 0 0 80rpx 0;
padding: 0 0 toRpx(80) 0;
}
.btn {
display: flex;
align-items: center;
margin: 48rpx auto 0;
margin: toRpx(48) auto 0;
box-sizing: border-box;
padding-left: 60rpx;
padding-left: toRpx(60);
}
}
</style>
<!--
* @Description:
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-25 21:08:27
-->
<template>
<view class="point-box">
<view class="nav-bar">
<view class="back" @click="back">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view class="month-box">
<view class="month-tabs">
<view class="tab-prev" v-if="month <= currentMonth && month > 1" @click="prevTab">
<view class="tab-icon">
<uni-icons type="left" size="16"></uni-icons>
</view>
</view>
<view class="tab-mid">{{ month == currentMonth ? '本' : (month + '').padStart(2, '0') }}月</view>
<view class="tab-next" v-if="month != currentMonth" @click="nextTab">
<view class="tab-icon">
<uni-icons type="right" size="16"></uni-icons>
</view>
</view>
</view>
</view>
</view>
<view class="point-body">
<view class="body-top">
<image v-if="statistics.levelCode" :src="levelImg[statistics.levelCode - 1]" class="level-image" />
<view class="sprite-icon icon-day-points" v-else></view>
<view class="level-desc">
<view class="level-name">{{ month == currentMonth ? '本' : (month + '').padStart(2, '0') }}月积分{{ statistics.levelName ? `:${statistics.levelName}` : '' }}</view>
<view class="level-num">第 {{ statistics.ranking }} 名</view>
</view>
<view class="level-score">{{ statistics.pointValue }}</view>
</view>
<view class="point-detail">
<view class="point-item" v-for="(item, index) in pointList" :key="index">
<view class="item-header" v-if="item">
<view class="point-class" v-if="item.pointClassificationName">{{ item.pointClassificationName }}</view>
<view class="class-score">{{ item.score }}积分</view>
</view>
<view class="desc-wrap" v-if="item && item.list && item.list.length">
<view class="item-body" v-for="(l, i) in item.list" :key="i">
<view class="item-left">
<view class="item-title">{{ l.pointTypeName }}</view>
<view class="item-time">{{ l.createdDate }}</view>
</view>
<view class="item-num">{{ l.pointValue > 0 ? '+' + l.pointValue : l.pointValue }}</view>
</view>
</view>
<view class="empty-box" v-else>
<image :src="require('@/assets/images/boutique/nothing.png')" mode="heightFix" />
<view class="empty-text">暂无积分记录</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import point from '@/mixin/point'
export default {
mixins: [point],
data() {
return {
pointClassification: ['C001', 'C002', 'C003'],
pointClassName: ['课程学习类', '日常行为类', '分享授课类'],
statistics: {},
levelImg: [require('@/assets/images/point/bronze.png'), require('@/assets/images/point/silver.png'), require('@/assets/images/point/gold.png'), require('@/assets/images/point/masonry.png')],
detail: [],
currentIndex: 0,
pointList: []
}
},
mounted() {},
methods: {
getDetail(countDate) {
uni.$api.pointApi.getPoint({ countDate }).then(res => {
this.statistics = res || {}
})
for (let i = 0; i < this.pointClassification.length; i++) {
this.getList(countDate, i)
}
},
getList(countDate, i) {
uni.$api.pointApi.pointRecordList({ countDate, pointClassification: this.pointClassification[i] }).then(res => {
const pointClassificationName = this.pointClassName[i]
const score = res.reduce((a, b) => a + b.pointValue, 0)
this.$set(this.pointList, i, { list: res, pointClassificationName, score })
})
},
updateDetail(countDate) {
this.getDetail(countDate)
}
}
}
</script>
<style scoped lang="scss">
.point-box {
position: relative;
}
.nav-bar {
width: 100%;
height: 96rpx;
margin-top: 48rpx;
margin-bottom: 12rpx;
display: flex;
align-items: center;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
pointer-events: auto;
}
.month-box {
flex: 1;
.month-tabs {
display: flex;
justify-content: center;
align-items: center;
.tab-mid {
font-size: 32rpx;
color: #1a1a1a;
margin: 0 120rpx;
}
}
.tab-prev,
.tab-next {
display: flex;
align-items: center;
justify-content: center;
width: 48rpx;
border-radius: 50%;
height: 48rpx;
background: #ffffff;
.tab-icon {
margin-left: -4rpx;
margin-top: 4rpx;
}
}
.tab-next {
.tab-icon {
margin-left: 2rpx;
}
}
}
}
.point-body {
background-image: linear-gradient(180deg, #ffffff59 0%, #ffffff00 100%);
border-radius: 32rpx;
width: calc(100vw - 128rpx);
margin: 0 64rpx;
height: calc(100vh - 100rpx);
.body-top {
display: flex;
align-items: center;
margin-left: 80rpx;
height: 162rpx;
.level-image {
width: 136rpx;
height: 162.6rpx;
}
.level-desc {
margin-left: 40rpx;
.level-name {
font-size: 36rpx;
color: #1a1a1a;
line-height: 60rpx;
font-weight: 700;
}
.level-num {
font-size: 24rpx;
color: #808291;
}
}
.level-score {
font-weight: 700;
font-size: 80rpx;
color: #4673ff;
margin-left: 64rpx;
}
}
.point-detail {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 68rpx;
margin: 32rpx;
.point-item {
background: #ffffff73;
box-shadow: inset 0 0 16rpx 0 #ffffff;
border-radius: 32rpx;
height: calc(100vh - 420rpx);
overflow: hidden;
.item-header {
display: flex;
justify-content: space-between;
align-items: center;
line-height: 56rpx;
margin-bottom: 26rpx;
background: rgba($color: #fff, $alpha: 0.6);
padding: 24rpx 48rpx;
.point-class {
font-size: 36rpx;
color: #1a1a1a;
}
.class-score {
font-size: 32rpx;
color: #181a1f;
}
}
.desc-wrap {
height: calc(100% - 152rpx);
overflow-y: auto;
padding: 0 48rpx;
}
.empty-box {
text-align: center;
margin-top: 160rpx;
image {
height: 224rpx;
}
.empty-text {
font-size: 28rpx;
color: #808291;
line-height: 40rpx;
text-align: center;
}
}
.item-body {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 2rpx solid #edf3ff;
padding: 20rpx 0;
.item-left {
.item-title {
font-size: 26rpx;
line-height: 40rpx;
color: #181a1f;
}
.item-time {
font-size: 24rpx;
color: #808291;
line-height: 40rpx;
}
}
.item-num {
font-size: 32rpx;
color: #181a1f;
}
}
}
}
}
</style>
<!--
* @Description:
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-25 17:00:42
-->
<template>
<view class="point-box">
<view class="nav-bar">
<view class="back" @click="back">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view class="title"><text>每日积分</text></view>
</view>
<view class="finish-title">
已完成
<text>{{ completed }}/{{ dayList.length }}</text>
</view>
<view class="day-list">
<view class="day-item" v-for="(i, index) in dayList" :key="index">
<view class="day-logo"><image :src="i.logo"></image></view>
<view class="day-desc">
<view class="day-title">{{ i.typeName }}</view>
<view class="day-content">{{ i.content }}</view>
</view>
<uni-icons type="checkmarkempty" v-if="i.completed" size="20"></uni-icons>
<view class="day-go" @click="handleGo(i)" v-else>去完成</view>
</view>
</view>
<view class="dailog-panel" v-if="show">
<view class="dailog-box">
<view class="dailog-close" @click="show = false"><uni-icons type="closeempty" size="20"></uni-icons></view>
<view class="dailog-logo"><image :src="selectItem.logo"></image></view>
<view class="dailog-title">{{ selectItem.typeName }}</view>
<view class="dailog-content">{{ selectItem.rules }}</view>
<view class="dailog-footer">
<template v-if="selectItem.jump">
<view class="dailog-btn disabled" @click="show = false">关闭</view>
<view class="dailog-btn" @click="$emit('jump')">跳转({{ second }}s)</view>
</template>
<view class="dailog-btn" v-else @click="show = false">好的</view>
</view>
</view>
</view>
</view>
</template>
<script>
import point from '@/mixin/point'
import { rules } from 'eslint-config-prettier'
export default {
mixins: [point],
data() {
return {
second: 3,
timer: null,
selectItem: {},
list: [
{ title: '考勤打卡', typeCode: 'T005', content: '完成日常打卡', rules: '请打开嘀加智慧云企业微信进行上下班打卡', logo: require('@/assets/images/point/day-time.png') },
{ title: '日报填写', typeCode: 'T004', content: '完成日报填写', rules: '请打开嘀加智慧云企业微信生意助手员工版填写日报', logo: require('@/assets/images/point/day-report.png') },
{ title: '平板接待', typeCode: 'T006', content: '完成平板接待', rules: '即将跳转至展业助手开始接待', logo: require('@/assets/images/point/day-ipad.png'), jump: true },
{ title: '参与培训', typeCode: 'T003', content: '参与培训', rules: '请联系督导了解最近培训计划并参与培训', logo: require('@/assets/images/point/day-training.png') },
{ title: 'AI话术对练', typeCode: 'T002', content: '完成AI对练', rules: '请打开嘀加智慧云企业微信生意助手员工版,进行AI趣练学习', logo: require('@/assets/images/point/day-ai.png') },
{ title: '开课程授课', typeCode: 'T007', content: '分享培训', rules: '请联系运营同事,将您的优秀的经验进行开课分享', logo: require('@/assets/images/point/day-course.png') },
{ title: '预学习', typeCode: 'T001', content: '录入客户档案 / 营销方案学习 / 客户案例学习', rules: '即将跳转至客户档案通过录入预交车客户学习推荐套餐方案话术或客户案例广场学习更多套餐方案话术', logo: require('@/assets/images/point/day-study.png') }
],
dayList: [],
completed: 0,
show: false
}
},
watch: {
show(val) {
if (!val) {
clearInterval(this.timer)
this.second = 3
}
}
},
methods: {
getDetail(countDate, day) {
uni.$api.pointApi.pointDayTask({ countDate: `${countDate}-${day}` }).then(res => {
res.forEach(item => {
const index = this.list.findIndex(i => i.typeCode === item.typeCode)
item.logo = this.list[index].logo
item.jump = this.list[index].jump
item.content = this.list[index].content
item.rules = this.list[index].rules
})
this.dayList = res
this.completed = res.filter(i => i.completed).length
})
},
handleGo(val) {
this.selectItem = val
if (val.jump) {
this.timer = setInterval(() => {
this.second--
if (this.second == 1) {
clearInterval(this.timer)
this.$emit('jump')
}
}, 1000)
}
this.show = true
}
},
beforeDestroy() {
clearInterval(this.timer)
}
}
</script>
<style scoped lang="scss">
.point-box {
position: relative;
}
.dailog-panel {
position: fixed;
width: 100vw;
height: 100vh;
inset: 0;
background-color: rgba(0, 0, 0, 0.5);
.dailog-box {
position: fixed;
left: 50%;
top: 50%;
width: 50%;
transform: translate(-50%, -50%);
background: #fff;
background-image: linear-gradient(179deg, #d6e9ff 12%, #ffffff 100%); /* 顶部渐变和底部白色 */
background-size:
100% 110rpx,
100% calc(100% - 110rpx); /* 分别设置渐变和白色的背景大小 */
background-repeat: no-repeat, no-repeat; /* 确保背景不重复 */
background-position: top, bottom; /* 分别设置渐变和白色的位置 */
border-radius: 48rpx;
.dailog-close {
text-align: right;
margin-right: 48rpx;
margin-top: 48rpx;
.uni-icons {
color: #808291 !important;
font-size: 40rpx;
}
}
.dailog-logo {
text-align: center;
image {
width: 228rpx;
height: 228rpx;
}
}
.dailog-title {
font-size: 40rpx;
color: #1a1a1a;
text-align: center;
margin-top: 40rpx;
}
.dailog-content {
font-size: 32rpx;
color: #808291;
text-align: center;
line-height: 46rpx;
margin-top: 16rpx;
padding: 0 64rpx;
}
.dailog-footer {
display: flex;
justify-content: center;
margin: 80rpx 0 70rpx;
}
.dailog-btn {
width: 400rpx;
height: 96rpx;
background-image: linear-gradient(180deg, #61c0ff 0%, #2c66f7 100%);
box-shadow: inset 0 0 32rpx 0 #ffffff80;
border-radius: 16rpx;
text-align: center;
font-size: 36rpx;
color: #ffffff;
line-height: 96rpx;
&.disabled {
background-color: #f0f1f5;
background-image: none;
color: #1a1a1a;
margin-right: 48rpx;
}
}
}
}
.nav-bar {
width: 100%;
height: 96rpx;
margin-top: 48rpx;
display: flex;
align-items: center;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
pointer-events: auto;
}
.title {
font-weight: 700;
font-size: 32rpx;
color: #1a1a1a;
flex: 1;
text-align: center;
text {
margin-left: -96rpx;
}
}
}
.finish-title {
font-size: 36rpx;
color: #1a1a1a;
margin-left: 160rpx;
font-weight: 700;
text {
font-size: 64rpx;
color: #4673ff;
margin-left: 24rpx;
}
}
.day-list {
margin-top: 40rpx;
padding: 0rpx 128rpx;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 48rpx;
.day-item {
background: #ffffff;
border-radius: 20rpx;
padding: 40rpx 40rpx;
display: flex;
align-items: center;
.day-logo {
image {
width: 80rpx;
height: 80rpx;
margin-right: 20rpx;
}
}
.day-desc {
.day-title {
font-size: 32rpx;
color: #292d33;
line-height: 48rpx;
}
.day-content {
font-size: 26rpx;
color: #808291;
width: 282rpx;
line-height: 48rpx;
}
}
.uni-icons {
margin-left: auto;
color: #14cc68 !important;
font-size: 30rpx;
font-weight: 700;
}
.day-go {
width: 148rpx;
height: 64rpx;
background: #f0f1f5;
border-radius: 32rpx;
text-align: center;
font-size: 28rpx;
color: #4673ff;
line-height: 64rpx;
margin-left: auto;
}
}
}
</style>
<!--
* @Description:
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-26 15:55:10
-->
<template>
<view class="point-box">
<view class="nav-bar">
<view class="back" @click="back">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view class="month-box">
<view class="month-tabs">
<view class="tab-prev" v-if="month <= currentMonth && month > 1" @click="prevTab">
<view class="tab-icon">
<uni-icons type="left" size="16"></uni-icons>
</view>
</view>
<view class="tab-mid">{{ month == currentMonth ? '本' : (month + '').padStart(2, '0') }}月</view>
<view class="tab-next" v-if="month != currentMonth" @click="nextTab">
<view class="tab-icon">
<uni-icons type="right" size="16"></uni-icons>
</view>
</view>
</view>
</view>
</view>
<view class="point-body">
<view class="point-detail">
<view class="point-item" v-for="(item, index) in pointList" :key="index">
<view class="item-header"><image :src="item.src" /></view>
<view class="item-body" :style="item.style">
<view class="item-logo" v-if="item.ranking > 3">{{ item.ranking }}</view>
<view class="item-image" v-else><image :src="require(`@/assets/images/point/${index == 0 ? 'crown_' : 'prize_'}${item.ranking || 1}.png`)" /></view>
<view class="item-name">{{ item.staffName }}</view>
<view v-if="item.badgeList && item.badgeList.length" :class="{ 'item-prize': index == 0, 'item-medal': index != 0 }"><image :src="index == 0 ? pointImg[item.badgeList[0].growthType - 1] : starImg[index - 1]" /></view>
<view class="item-num">{{ item.pointValue }}</view>
</view>
<view class="desc-wrap">
<view class="item-body" v-for="(l, i) in item.list" :key="i">
<view class="item-logo" v-if="l.ranking > 3">{{ l.ranking }}</view>
<view class="item-image" v-else><image :src="require(`@/assets/images/point/${index == 0 ? 'crown_' : 'prize_'}${l.ranking || 0}.png`)" /></view>
<view class="item-name">{{ l.staffName }}</view>
<view v-if="l.badgeList && l.badgeList.length" :class="{ 'item-prize': index == 0, 'item-medal': index != 0 }"><image :src="index == 0 ? pointImg[l.badgeList[0].growthType - 1] : starImg[index - 1]" /></view>
<view class="item-num">{{ l.pointValue }}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import point from '@/mixin/point'
import { get } from 'lodash'
export default {
mixins: [point],
data() {
return {
selectItem: {},
detail: [],
currentIndex: 0,
pointImg: [require('@/assets/images/point/bronze_ranking.png'), require('@/assets/images/point/silver_ranking.png'), require('@/assets/images/point/gold_ranking.png'), require('@/assets/images/point/masonry_ranking.png')],
starImg: [require('@/assets/images/point/study_star.png'), require('@/assets/images/point/time_star.png'), require('@/assets/images/point/teacher_star.png'), require('@/assets/images/point/elite_star.png')],
pointList: [
{
src: require('@/assets/images/point/point_bg.png'),
style: 'background: #fef2cb99;',
isCrown: true
},
{
src: require('@/assets/images/point/study_bg.png'),
style: 'background-image: linear-gradient(270deg, #c2d8fc59 0%, #d1e9ff59 100%);'
},
{
src: require('@/assets/images/point/diligent_bg.png'),
style: 'background-image: linear-gradient(270deg, #c2d8fc59 0%, #d1e9ff59 100%);'
},
{
src: require('@/assets/images/point/teacher_bg.png'),
style: 'background-image: linear-gradient(270deg, #c2d8fc59 0%, #d1e9ff59 100%);'
},
{
src: require('@/assets/images/point/ipad_bg.png'),
style: 'background-image: linear-gradient(270deg, #c2d8fc59 0%, #d1e9ff59 100%);'
}
]
}
},
mounted() {},
methods: {
getDetail(countDate) {
for (let i = 0; i < 4; i++) {
this.getList(countDate, i + 1)
}
this.getList(countDate)
},
updateDetail(countDate) {
this.getDetail(countDate)
},
getList(countDate, rankingType) {
uni.$api.pointApi.pointMonthRanking({ countDate, rankingType }).then(res => {
const i = rankingType ? rankingType : 0
const userInfo = uni.$storage.get('userInfo')
let myInfo = res.find(i => i.staffPhone == userInfo.phone)
this.$set(this.pointList, i, { ...this.pointList[i], list: res, ...myInfo })
})
}
}
}
</script>
<style scoped lang="scss">
.point-box {
position: relative;
}
.nav-bar {
width: 100%;
height: 96rpx;
margin-top: 48rpx;
margin-bottom: 12rpx;
display: flex;
align-items: center;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
pointer-events: auto;
}
.month-box {
flex: 1;
.month-tabs {
display: flex;
justify-content: center;
align-items: center;
.tab-mid {
font-size: 32rpx;
color: #1a1a1a;
margin: 0 120rpx;
}
}
.tab-prev,
.tab-next {
display: flex;
align-items: center;
justify-content: center;
width: 48rpx;
border-radius: 50%;
height: 48rpx;
background: #ffffff;
.tab-icon {
margin-left: -4rpx;
margin-top: 4rpx;
}
}
.tab-next {
.tab-icon {
margin-left: 2rpx;
}
}
}
}
.point-body {
border-radius: 32rpx;
width: calc(100vw - 128rpx);
margin: 0 64rpx;
height: calc(100vh - 100rpx);
.body-top {
display: flex;
align-items: center;
margin-left: 80rpx;
.level-image {
width: 120rpx;
height: 120rpx;
}
.level-desc {
margin-left: 40rpx;
.level-name {
font-size: 36rpx;
color: #1a1a1a;
line-height: 60rpx;
font-weight: 700;
}
.level-num {
font-size: 24rpx;
color: #808291;
}
}
.level-score {
font-weight: 700;
font-size: 80rpx;
color: #4673ff;
margin-left: 64rpx;
}
}
.point-detail {
display: flex;
flex-wrap: nowrap;
width: 100%;
overflow-x: auto;
gap: 48rpx;
.point-item {
width: 688rpx;
background: #ffffff73;
box-shadow: inset 0 0 16rpx 0 #ffffff;
border-radius: 32rpx;
height: calc(100vh - 200rpx);
.item-header {
image {
width: 688rpx;
height: 128rpx;
}
}
.item-body {
height: 128rpx;
border-radius: 24rpx;
margin: 0 24rpx;
display: flex;
align-items: center;
padding: 0 32rpx;
.item-logo {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: #ffffff;
border: 2rpx solid #ffffff;
line-height: 76rpx;
font-size: 34rpx;
color: #a0a1ad;
text-align: center;
box-sizing: border-box;
}
.item-image {
width: 80rpx;
box-sizing: border-box;
height: 80rpx;
border-radius: 50%;
background: #ffffff;
border: 2rpx solid #ffffff;
display: flex;
align-items: center;
justify-content: center;
image {
width: 56rpx;
height: 56rpx;
}
}
.item-name {
font-size: 30rpx;
color: #181a1f;
margin-left: 20rpx;
}
.item-prize {
flex: 1;
text-align: right;
margin-right: 48rpx;
image {
width: 148rpx;
height: 56rpx;
}
}
.item-medal {
margin-left: 16rpx;
image {
width: 48rpx;
height: 48rpx;
}
}
.item-num {
font-size: 32rpx;
color: #181a1f;
margin-left: auto;
}
}
.desc-wrap {
height: calc(100% - 292rpx);
overflow-y: auto;
}
}
}
}
</style>
<template>
<view class="point-box">
<view class="nav-bar">
<view class="back" @click="back">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view class="title"><text>积分规则</text></view>
</view>
<view class="rule-table">
<view class="table-box">
<table class="score-table">
<tr class="th">
<th v-for="(item, index) in tabelTh" :key="index" :style="{ width: item.width + 'vw' }">{{ item.title }}</th>
</tr>
<tr v-for="(item, index) in tabelTr" :key="index" :class="{ line: item.row1Span }">
<td class="row_1" :rowspan="item.row1Span" v-if="item.showRow1">{{ item.categoryName }}</td>
<td :rowspan="item.row2Span" v-if="item.showRow2">{{ item.typeName }}</td>
<td>{{ item.description }}</td>
<td>
<template v-if="item.pointValue">{{ item.pointValue }}</template>
<text v-else>自动</text>
</td>
<td>{{ item.detail }}</td>
</tr>
</table>
</view>
</view>
</view>
</template>
<script>
import point from '@/mixin/point'
export default {
mixins: [point],
data() {
return {
selectItem: {},
tabelTh: [
{ title: '分类', width: 7 },
{ title: '积分类型', width: 8 },
{ title: '积分描述', width: 14 },
{ title: '积分值', width: 6 },
{ title: '说明', width: 50 }
],
tabelTr: [],
processedData: [],
result: [],
show: false
}
},
methods: {
getDetail() {
uni.$api.pointApi.pointRuleDetail().then(res => {
let result = []
let row1Span = 0
let row2Span = 0
const obj = res || []
obj.forEach((item, index) => {
if (index === 0 || obj[index - 1].categoryName !== item.categoryName) {
row1Span = obj.filter((el, idx) => idx >= index && el.categoryName === item.categoryName).length
result.push({ ...item, row1Span, showRow1: true })
} else {
result.push({ ...item, showRow1: false })
}
if (index === 0 || obj[index - 1].typeName !== item.typeName || obj[index - 1].categoryName !== item.categoryName) {
row2Span = obj.filter((el, idx) => idx >= index && el.categoryName === item.categoryName && el.typeName === item.typeName).length
result[index].row2Span = row2Span
result[index].showRow2 = true
} else {
result[index].showRow2 = false
}
})
this.tabelTr = result
})
},
handleGo(val) {
this.selectItem = val
this.show = true
}
}
}
</script>
<style scoped lang="scss">
.point-box {
position: relative;
}
.nav-bar {
width: 100%;
height: 96rpx;
margin-top: 48rpx;
display: flex;
align-items: center;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
pointer-events: auto;
}
.title {
font-weight: 700;
font-size: 32rpx;
color: #1a1a1a;
flex: 1;
text-align: center;
text {
margin-left: -96rpx;
}
}
}
.rule-table {
background: #ffffff;
border-radius: 48rpx;
padding: 32rpx 64rpx;
margin: 20rpx 64rpx;
height: calc(100vh - 196rpx);
.table-box {
height: calc(100%);
overflow-y: auto;
}
.score-table {
border-collapse: separate;
/* 防止边框合并 */
border-spacing: 0;
border: none;
.th {
position: sticky;
top: 0;
}
/* 单元格之间没有间距 */
tr {
border: none;
text-align: center;
&.line {
td {
border-top: 16rpx solid rgba($color: #fff, $alpha: 0.9);
}
}
th {
border: 4rpx solid #fff;
/* 所有单元格都有边框 */
padding: 8px;
border-top: none;
/* 除了首行外,所有行的上方无边框 */
background: #edf2ff;
height: 88rpx;
font-size: 26rpx;
color: #333333;
&:first-child {
border-left: none;
border-radius: 16rpx 0 0 16rpx;
}
&:last-child {
border-radius: 0 16rpx 16rpx 0;
}
}
td {
border: 4rpx solid #fff;
/* 所有单元格都有边框 */
padding: 8px;
border-top: none;
/* 除了首行外,所有行的上方无边框 */
background: #f7f8fa;
height: 88rpx;
font-size: 26rpx;
color: #333333;
text {
color: #c8c8cc;
}
&.line {
border-bottom: 16rpx solid #fff;
}
&:first-child {
border-left: none;
}
&:last-child {
border-right: none;
}
}
}
}
}
</style>
......@@ -156,10 +156,10 @@ export default {
<style scoped lang="scss">
.setting-box {
position: relative;
width: 720rpx;
height: 880rpx;
width: toRpx(720);
height: toRpx(880);
background: #ffffff;
border-radius: 40rpx;
border-radius: toRpx(40);
box-sizing: border-box;
display: flex;
align-items: center;
......@@ -168,8 +168,8 @@ export default {
.close {
position: absolute;
width: 120rpx;
height: 120rpx;
width: toRpx(120);
height: toRpx(120);
top: 0;
right: 0;
justify-content: center;
......@@ -177,75 +177,75 @@ export default {
.app-info {
flex-direction: column;
font-size: 32rpx;
font-size: toRpx(32);
color: #333333;
.sprite-icon {
margin-bottom: 12rpx;
box-shadow: 0 0 24rpx 0 #3682ef33;
border-radius: 40rpx;
margin-bottom: toRpx(12);
box-shadow: 0 0 toRpx(24) 0 #3682ef33;
border-radius: toRpx(40);
}
.version {
margin-top: 8rpx;
font-size: 24rpx;
margin-top: toRpx(8);
font-size: toRpx(24);
color: #999999;
}
.check-box {
width: 120rpx;
padding: 10rpx 0rpx 4rpx;
width: toRpx(120);
padding: toRpx(10) 0 toRpx(4);
background: #f2f2f2;
border-radius: 6rpx;
font-size: 22rpx;
border-radius: toRpx(6);
font-size: toRpx(22);
color: #999999;
text-align: center;
margin-top: 16rpx;
margin-top: toRpx(16);
box-sizing: border-box;
}
}
.btn-box {
margin-top: 120rpx;
margin-top: toRpx(120);
.btn {
width: 384rpx;
height: 64rpx;
width: toRpx(384);
height: toRpx(64);
background: #3b73ff1a;
border: 2rpx solid transparent;
border-radius: 32rpx;
border: toRpx(2) solid transparent;
border-radius: toRpx(32);
justify-content: center;
font-size: 28rpx;
font-size: toRpx(28);
color: #3b73ff;
margin-bottom: 16rpx;
margin-bottom: toRpx(16);
}
.logout {
background: #ffffff;
color: #333333;
border: 2rpx solid #e8e8e8;
border: toRpx(2) solid #e8e8e8;
}
}
.a {
font-size: 24rpx;
font-size: toRpx(24);
color: #2c66f7;
margin: 48rpx 0 16rpx;
margin: toRpx(48) 0 toRpx(16);
}
.icp {
font-size: 24rpx;
font-size: toRpx(24);
color: #999999;
}
.app-code {
font-size: 24rpx;
font-size: toRpx(24);
color: #999999;
line-height: 40rpx;
line-height: toRpx(40);
.icon-clone {
width: 24rpx;
height: 24rpx;
width: toRpx(24);
height: toRpx(24);
}
}
}
......
......@@ -182,36 +182,36 @@ export default {
<style scoped lang="scss">
.error-tip {
font-size: 28rpx;
padding: 32rpx 60rpx 24rpx;
margin-top: 100rpx;
margin-bottom: -80rpx;
font-size: toRpx(28);
padding: toRpx(32) toRpx(60) toRpx(24);
margin-top: toRpx(100);
margin-bottom: toMinusRpx(80);
text-align: center;
background-color: rgb(254, 237, 234);
color: #f45c3d;
}
.data-container {
background: #ffffff59;
border-radius: 48rpx;
margin: 80rpx 66rpx 80rpx 0;
height: calc(100% - 160rpx);
box-shadow: inset 0 0 16rpx 0 #ffffff;
border: 2rpx solid #fff;
border-radius: toRpx(48);
margin: toRpx(80) toRpx(66) toRpx(80) 0;
height: calc(100% - #{toRpx(160)});
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
border: toRpx(2) solid #fff;
box-sizing: border-box;
position: relative;
.nav-bar {
position: absolute;
width: 100%;
height: 96rpx;
height: toRpx(96);
left: 0;
top: 28rpx;
top: toRpx(28);
z-index: 9;
text-align: center;
font-weight: 700;
font-size: 32rpx;
font-size: toRpx(32);
color: #1a1a1a;
line-height: 96rpx;
line-height: toRpx(96);
.back {
position: absolute;
......@@ -228,25 +228,25 @@ export default {
.form {
display: flex;
flex-wrap: wrap;
gap: 80rpx 160rpx;
padding: 80rpx;
margin-top: 60rpx;
gap: toRpx(80) toRpx(160);
padding: toRpx(80);
margin-top: toRpx(60);
&-item {
width: calc(50% - 80rpx);
width: calc(50% - #{toRpx(80)});
display: flex;
align-items: center;
color: #6c6c70;
font-size: 30rpx;
height: 80rpx;
font-size: toRpx(30);
height: toRpx(80);
box-sizing: border-box;
.label {
position: relative;
margin-left: auto;
flex-shrink: 0;
width: 124rpx;
margin-right: 30rpx;
width: toRpx(124);
margin-right: toRpx(30);
}
.required {
......@@ -254,25 +254,25 @@ export default {
content: '*';
color: #ff0000;
position: absolute;
left: -20rpx;
left: toMinusRpx(20);
top: 50%;
transform: translate(0, -50%);
}
}
.value {
height: 80rpx;
height: toRpx(80);
flex: 1;
border: 2rpx solid #e8e8ea;
border: toRpx(2) solid #e8e8ea;
background: #ffffff;
margin-left: 32rpx;
margin-left: toRpx(32);
box-sizing: border-box;
padding: 0 40rpx;
border-radius: 8rpx;
padding: 0 toRpx(40);
border-radius: toRpx(8);
&.error {
border: 2rpx solid #f24724;
border-radius: 8rpx;
border: toRpx(2) solid #f24724;
border-radius: toRpx(8);
}
.input,
......@@ -282,7 +282,7 @@ export default {
border: none !important;
outline: none;
padding: 0 !important;
font-size: 30rpx;
font-size: toRpx(30);
color: #333;
&::placeholder {
......@@ -301,44 +301,30 @@ export default {
}
}
}
// .active {
// &::after {
// position: absolute;
// left: -2rpx;
// top: -2rpx;
// width: calc(100% + 4rpx);
// height: calc(100% + 4rpx);
// content: '';
// background-image: linear-gradient(#2f6af7, #75bcff);
// box-shadow: 0 0 0 8rpx #2c66f71a;
// border-radius: 16rpx;
// }
// }
}
.footer-box {
display: flex;
align-items: center;
justify-content: center;
gap: 34rpx;
padding: 0 280rpx;
gap: toRpx(34);
padding: 0 toRpx(280);
.cancel-btn {
height: 80rpx;
height: toRpx(80);
background: #dae9ff;
border-radius: 48rpx;
line-height: 80rpx;
border-radius: toRpx(48);
line-height: toRpx(80);
text-align: center;
color: #2c66f7;
flex: 1;
}
.submit-btn {
height: 80rpx;
height: toRpx(80);
background-image: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
border-radius: 48rpx;
line-height: 80rpx;
border-radius: toRpx(48);
line-height: toRpx(80);
text-align: center;
flex: 1;
color: #ffffff;
......@@ -347,26 +333,26 @@ export default {
}
.select-box {
margin: 40rpx 0;
margin: toRpx(40) 0;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20rpx;
gap: toRpx(20);
overflow-y: scroll;
max-height: 50vh;
padding-bottom: 60rpx;
padding-bottom: toRpx(60);
.select-item {
text-align: center;
height: 68rpx;
line-height: 68rpx;
height: toRpx(68);
line-height: toRpx(68);
opacity: 1;
border: 2rpx solid #dce0e6;
border: toRpx(2) solid #dce0e6;
color: #292d33;
font-size: 28rpx;
border-radius: 8rpx;
font-size: toRpx(28);
border-radius: toRpx(8);
&.checked {
border: 2rpx solid #292d33;
border: toRpx(2) solid #292d33;
}
}
}
......
<template>
<view class="container" @click="handleTouchStart">
<view :class="['home', { show: !id }]">
<left-side :userInfo="userInfo" :tabIndex.sync="tabIndex" @changeTab="$emit('changeTab', $event)" @stopAudio="stopAudio" />
<view :class="['home', { show: !id && showHome }]">
<left-side :userInfo="userInfo" :tabIndex.sync="tabIndex" ref="leftBox" @changeTab="$emit('changeTab', $event)" @stopAudio="stopAudio" />
<view class="right-side">
<template v-if="tabIndex == 0">
<view class="right-content">
......@@ -15,7 +15,7 @@
</view>
</template>
<template v-else>
<component :is="componentName" :userInfo="userInfo" />
<component :is="componentName" :userInfo="userInfo" @showPage="handleShowPage" />
</template>
<view class="store-addr">
<view class="icon-addr sprite-icon icon-addr"></view>
......@@ -26,6 +26,9 @@
<view :class="['detail', { show: id }]">
<slot name="detail" />
</view>
<view class="point-page" v-if="!showHome">
<component :is="pointComponentName" @backHome="backHome" @jump="jump" :transfer="transfer" />
</view>
<!-- 未点击开始接待,弹窗 -->
<MessageBox ref="previewRef" @confirm="$emit('preview')" :popupW="704" content="直接点击素材可进行预览,若面向车主展示,请点击「开始接待」" confirmBtnText="预览素材" @cancel="$emit('previewCancel')" @close="$emit('previewClose')"></MessageBox>
<!-- 停留弹框 -->
......@@ -60,9 +63,15 @@ import myClick from '@/mixin/click'
import uploader from '@/mixin/uploader.js'
import CustomerFile from './components/CustomerFile.vue'
import LeftSide from './components/LeftSide.vue'
import Point from './components/Point.vue'
import dayPoint from './components/Point/DayPoint.vue'
import rulePoint from './components/Point/RulePoint.vue'
import LevelPoint from './components/Point/LevelPoint.vue'
import Course from './components/Point/Course.vue'
import Ranking from './components/Point/Ranking.vue'
export default {
mixins: [myClick, uploader],
components: { RecordList, CustomerFile, LeftSide },
components: { RecordList, CustomerFile, LeftSide, Point, dayPoint, rulePoint, Course, Ranking, LevelPoint },
props: {
id: [String, Number],
finishDoneText: String,
......@@ -73,6 +82,9 @@ export default {
},
data() {
return {
transfer: '',
showHome: true,
pointComponentName: 'dayPoint',
userInfo: {},
tabIndex: 0
}
......@@ -90,12 +102,28 @@ export default {
return this.$refs.finish
},
componentName() {
const len = this.$refs.leftBox.tabs.length
if (this.tabIndex == 0) return 'HomeSlot'
else if (this.tabIndex == 1) return 'RecordList'
else return 'CustomerFile'
}
},
methods: {}
methods: {
backHome() {
this.showHome = true
},
jump() {
console.log(888)
this.showHome = true
this.$emit('start')
},
handleShowPage(name, transfer) {
console.log(transfer, 'transfer')
this.transfer = transfer
this.showHome = false
this.pointComponentName = name
}
}
}
</script>
<style scoped lang="scss">
......@@ -121,6 +149,14 @@ export default {
left: 0;
visibility: hidden;
}
.point-page {
position: fixed;
width: 100%;
height: 100%;
z-index: 1;
top: 0;
left: 0;
}
.home {
display: flex;
height: 100vh;
......@@ -144,12 +180,14 @@ export default {
.right-side {
flex: 1;
position: relative;
width: calc(100vw - #{toRpx(240)});
.right-content {
padding-top: 92rpx;
padding-top: toRpx(92);
height: 100vh;
box-sizing: border-box;
position: relative;
animation: show-box 0.15s forwards;
overflow: hidden;
}
@keyframes show-box {
0% {
......@@ -161,13 +199,8 @@ export default {
}
.start {
&-btn {
position: absolute;
width: calc(100% - 64rpx);
height: calc(100% - 64rpx);
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
vertical-align: top;
width: 100%;
height: 100%;
}
&-border {
position: absolute;
......@@ -177,43 +210,44 @@ export default {
top: 0;
vertical-align: top;
}
width: calc(100% - 64rpx);
height: 336rpx;
height: toRpx(336);
box-sizing: border-box;
margin-right: toRpx(64);
position: relative;
padding: toRpx(32);
}
.module-list {
height: calc(100% - 336rpx);
height: calc(100% - #{toRpx(336)});
}
.store-addr {
position: absolute;
left: 50%;
bottom: 24rpx;
bottom: toRpx(24);
transform: translateX(-50%);
display: flex;
align-items: center;
margin-top: 38rpx;
margin-top: toRpx(38);
.icon-addr {
width: 32rpx;
height: 32rpx;
width: toRpx(32);
height: toRpx(32);
flex-shrink: 0;
}
.addr-text {
font-size: 24rpx;
font-size: toRpx(24);
color: #999999;
word-wrap: break-word;
white-space: normal;
line-height: 32rpx;
margin-left: 4rpx;
line-height: toRpx(32);
margin-left: toRpx(4);
flex-shrink: 0;
}
&::before,
&::after {
content: '';
width: 600rpx;
height: 2rpx;
width: toRpx(600);
height: toRpx(2);
margin: 0 40rpx;
margin: 0 toRpx(40);
}
&::before {
background-image: linear-gradient(270deg, #eeeeee 0%, #d8d8d800 100%);
......@@ -224,30 +258,30 @@ export default {
}
}
.footer {
border-top: 2rpx solid #eff0f2;
border-top: toRpx(2) solid #eff0f2;
font-weight: 600;
font-size: 32rpx;
margin-top: 48rpx;
font-size: toRpx(32);
margin-top: toRpx(48);
.footer-btn {
justify-content: center;
margin-top: 16rpx;
margin: toRpx(16) auto 0;
}
.confirm {
width: 608rpx;
height: 80rpx;
width: toRpx(608);
height: toRpx(80);
background: #2c66f7;
border-radius: 40rpx;
border-radius: toRpx(40);
color: #fff;
}
.cancel {
width: 608rpx;
height: 80rpx;
width: toRpx(608);
height: toRpx(80);
background: #ffffff00;
border-radius: 40rpx;
border-radius: toRpx(40);
color: #2c66f7;
}
text {
font-size: 24rpx;
font-size: toRpx(24);
}
}
</style>
......@@ -8,66 +8,68 @@
:scaleSwitch="false"
>
<template slot="customContent">
<view class="title">
<view class="text">{{title}}</view>
</view>
<view class="content">
<view
class="form-box"
:key="watchStatus"
>
<view class="form">
<template v-for="(i, index) in formObject">
<view
:class="['form-item' ,{active:focusIndex == index}]"
:key="index"
>
<view class="form-item-box">
<template v-if="i.type == 'input'">
<input
:type="i.inputType"
:maxlength="i.maxlength"
v-model="customerInfo[i.key]"
class="input"
@input="inputCustomer"
:placeholder="i.placeholder"
@focus="focusIndex = index"
@blur="resetFocusIndex"
:data-key="i.key"
/>
<customer-autocomplete
:showType="i.inputType"
:searchValue="customerInfo[i.key]"
:show="focusIndex == index"
@choose="chooseCustomer"
/>
<template v-if="i.unit">
<view class="unit">{{i.unit}}</view>
<view class="layout-content">
<view class="title">
<view class="text">{{title}}</view>
</view>
<view class="content">
<view
class="form-box"
:key="watchStatus"
>
<view class="form">
<template v-for="(i, index) in formObject">
<view
:class="['form-item' ,{active:focusIndex == index}]"
:key="index"
>
<view class="form-item-box">
<template v-if="i.type == 'input'">
<input
:type="i.inputType"
:maxlength="i.maxlength"
v-model="customerInfo[i.key]"
class="input"
@input="inputCustomer"
:placeholder="i.placeholder"
@focus="focusIndex = index"
@blur="resetFocusIndex"
:data-key="i.key"
/>
<customer-autocomplete
:showType="i.inputType"
:searchValue="customerInfo[i.key]"
:show="focusIndex == index"
@choose="chooseCustomer"
/>
<template v-if="i.unit">
<view class="unit">{{i.unit}}</view>
</template>
</template>
</template>
<template v-else>
<view
:class="['select flex',{placeholderStyle:!customerInfo[i.key]}]"
@click="showPopup(i.popKey,index)"
>
<view class="value text-hide">{{customerInfo[i.key] ||i.placeholder}}</view>
<uni-icons
class="arrow"
type="right"
:size="16"
></uni-icons>
</view>
</template>
<template v-else>
<view
:class="['select flex',{placeholderStyle:!customerInfo[i.key]}]"
@click="showPopup(i.popKey,index)"
>
<view class="value text-hide">{{customerInfo[i.key] ||i.placeholder}}</view>
<uni-icons
class="arrow"
type="right"
:size="16"
></uni-icons>
</view>
</template>
</view>
</view>
</view>
</template>
</template>
</view>
</view>
</view>
<insurance-table
:isPreview="isPreview"
:show="show"
/>
</view>
<insurance-table
:isPreview="isPreview"
:show="show"
/>
</template>
</wnCanvas>
<car-brands
......@@ -205,25 +207,30 @@ export default {
height: 100vh;
background-image: url('@/assets/images/media/insurance-bg.webp');
background-size: 100%;
&-content{
height: 100%;
margin: $margin;
position: relative;
}
.title {
padding: 120rpx 0 48rpx 128rpx;
padding: toRpx(120) 0 toRpx(48) toRpx(128);
.text {
line-height: 80rpx;
line-height: toRpx(80);
font-weight: 500;
font-size: 56rpx;
font-size: toRpx(56);
color: #333333;
}
}
.content {
.form-box {
height: 80rpx;
padding: 0 128rpx;
height: toRpx(80);
padding: 0 toRpx(128);
.form {
display: flex;
gap: 0 28rpx;
gap: 0 toRpx(28);
height: 100%;
&-item {
width: 368rpx;
width: toRpx(368);
height: 100%;
position: relative;
......@@ -232,10 +239,10 @@ export default {
width: 100%;
height: 100%;
background: #ffffff;
border: 3rpx solid #a8c1ff;
border-radius: 16rpx;
border: toRpx(3) solid #a8c1ff;
border-radius: toRpx(16);
box-sizing: border-box;
padding: 0 24rpx;
padding: 0 toRpx(24);
z-index: 2;
display: flex;
align-items: center;
......@@ -243,22 +250,22 @@ export default {
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 24rpx;
right: toRpx(24);
font-weight: 300;
font-size: 28rpx;
font-size: toRpx(28);
color: #292d33;
line-height: 36rpx;
line-height: toRpx(36);
}
}
.input,
.select {
width: 100%;
height: 60rpx;
height: toRpx(60);
border: none !important;
outline: none;
font-size: 28rpx;
font-size: toRpx(28);
color: #333333;
border-radius: 16rpx;
border-radius: toRpx(16);
box-sizing: border-box;
padding: 0 !important;
display: flex;
......@@ -269,7 +276,7 @@ export default {
}
.placeholderStyle {
color: #999999;
line-height: 80rpx;
line-height: toRpx(80);
}
.arrow {
color: #999 !important;
......@@ -280,14 +287,14 @@ export default {
.active {
&::after {
position: absolute;
left: -2rpx;
top: -2rpx;
width: calc(100% + 4rpx);
height: calc(100% + 4rpx);
left: toMinusRpx(2);
top: toMinusRpx(2);
width: calc(100% + #{toRpx(4)});
height: calc(100% + #{toRpx(4)});
content: '';
background-image: linear-gradient(#2f6af7, #75bcff);
box-shadow: 0 0 0 8rpx #2c66f71a;
border-radius: 16rpx;
box-shadow: 0 0 0 toRpx(8) #2c66f71a;
border-radius: toRpx(16);
}
}
}
......@@ -297,7 +304,7 @@ export default {
.byd-layout {
background-image: url('@/assets/images/media/byd-insurance-bg.webp') !important;
.title {
padding: 120rpx 128rpx 48rpx;
padding: toRpx(120) toRpx(128) toRpx(48);
.text {
text-align: center;
}
......
......@@ -54,10 +54,10 @@ export default {
<style scoped lang='scss'>
.detail-box {
position: relative;
width: 720rpx;
max-height: 640rpx;
border-radius: 40rpx;
padding: 48rpx 64rpx 88rpx;
width: toRpx(720);
max-height: toRpx(640);
border-radius: toRpx(40);
padding: toRpx(48) toRpx(64) toRpx(88);
box-sizing: border-box;
overflow: hidden;
&::before {
......@@ -65,7 +65,7 @@ export default {
top: 0;
left: 0;
width: 100%;
height: 240rpx;
height: toRpx(240);
background-image: linear-gradient(180deg, #e5edfe 0%, #ffffff 100%);
content: '';
z-index: -1;
......@@ -82,13 +82,13 @@ export default {
}
.icon-bao {
position: absolute;
top: 48rpx;
right: 68rpx;
top: toRpx(48);
right: toRpx(68);
}
.close-box {
position: absolute;
width: 136rpx;
height: 136rpx;
width: toRpx(136);
height: toRpx(136);
top: 0;
right: 0;
justify-content: center;
......@@ -96,26 +96,26 @@ export default {
}
.title {
font-weight: 500;
font-size: 40rpx;
font-size: toRpx(40);
color: #292d33;
line-height: 64rpx;
padding: 48rpx 0 24rpx;
line-height: toRpx(64);
padding: toRpx(48) 0 toRpx(24);
}
.type {
background: #f2f2f2;
border-radius: 6rpx;
padding: 2rpx 16rpx;
font-size: 26rpx;
border-radius: toRpx(6);
padding: toRpx(2) toRpx(16);
font-size: toRpx(26);
color: #666666;
line-height: 40rpx;
line-height: toRpx(40);
width: fit-content;
}
.content {
margin-top: 48rpx;
max-height: 276rpx;
font-size: 30rpx;
margin-top: toRpx(48);
max-height: toRpx(276);
font-size: toRpx(30);
color: #292d33;
line-height: 48rpx;
line-height: toRpx(48);
overflow-y: auto;
word-break: break-all;
}
......
......@@ -269,74 +269,74 @@ export default {
<style scoped lang='scss'>
.views-box {
width: 2090rpx;
height: 1080rpx;
width: toRpx(2090);
height: toRpx(1080);
box-sizing: border-box;
border: 4rpx solid #ffffff;
border-radius: 40rpx;
margin: 56rpx auto 0;
border: toRpx(4) solid #ffffff;
border-radius: toRpx(40);
margin: toRpx(56) auto 0;
.views-title-box {
height: 96rpx;
height: toRpx(96);
background-image: linear-gradient(92deg, #d0e6fecc 0%, #c2dbffcc 33%, #d1e4ffcc 77%, #bdd6ffcc 100%);
backdrop-filter: blur(6rpx);
border-radius: 40rpx 40rpx 0 0;
backdrop-filter: blur(toRpx(6));
border-radius: toRpx(40) toRpx(40) 0 0;
font-weight: 500;
font-size: 26rpx;
font-size: toRpx(26);
color: #292d33;
line-height: 40rpx;
line-height: toRpx(40);
.title-item {
height: 96rpx;
height: toRpx(96);
justify-content: center;
box-sizing: border-box;
flex-shrink: 0;
}
}
.row-1 {
width: 470rpx;
width: toRpx(470);
}
.row-2 {
width: 1092rpx;
border-right: 4rpx solid #fff;
border-left: 4rpx solid #fff;
width: toRpx(1092);
border-right: toRpx(4) solid #fff;
border-left: toRpx(4) solid #fff;
}
.row-3 {
width: 528rpx;
width: toRpx(528);
}
.views-content {
height: calc(100% - 192rpx);
height: calc(100% - #{toRpx(192)});
display: flex;
box-sizing: border-box;
border-top: 4rpx solid #ffffff;
border-bottom: 4rpx solid #ffffff;
border-top: toRpx(4) solid #ffffff;
border-bottom: toRpx(4) solid #ffffff;
position: relative;
.main {
position: absolute;
top: 120rpx;
top: toRpx(120);
left: 0;
width: 108rpx;
height: 748rpx;
width: toRpx(108);
height: toRpx(748);
font-weight: 500;
font-size: 26rpx;
font-size: toRpx(26);
color: #292d33;
display: flex;
align-items: center;
justify-content: center;
writing-mode: vertical-lr;
text-orientation: upright;
letter-spacing: 32rpx;
letter-spacing: toRpx(32);
z-index: 2;
}
.table {
height: 100%;
.insurance-item {
background-color: #f7f9ff;
border-bottom: 4rpx solid #ffffff;
border-bottom: toRpx(4) solid #ffffff;
position: relative;
.name,
.range,
.cost,
.show {
min-height: 120rpx;
min-height: toRpx(120);
display: flex;
align-items: center;
justify-content: center;
......@@ -345,31 +345,31 @@ export default {
}
.name,
.range {
font-size: 26rpx;
font-size: toRpx(26);
color: #292d33;
padding: 40rpx 0;
padding: toRpx(40) 0;
}
.block {
position: absolute;
width: 104rpx;
height: calc(100% + 4rpx);
width: toRpx(104);
height: calc(100% + #{toRpx(4)});
background: #cfe3fe;
top: 0;
left: 0;
}
.name {
width: 366rpx;
margin-left: 108rpx;
width: toRpx(366);
margin-left: toRpx(108);
justify-content: flex-start;
padding: 0 40rpx;
padding: 0 toRpx(40);
.check-box {
width: 32rpx;
height: 32rpx;
width: toRpx(32);
height: toRpx(32);
background: #ffffff;
border: 3rpx solid #a8c1ff;
border-radius: 4rpx;
border: toRpx(3) solid #a8c1ff;
border-radius: toRpx(4);
box-sizing: border-box;
margin-right: 32rpx;
margin-right: toRpx(32);
justify-content: center;
overflow: hidden;
font-weight: 700;
......@@ -382,28 +382,28 @@ export default {
}
}
.range {
padding: 40rpx 64rpx;
padding: toRpx(40) toRpx(64);
box-sizing: border-box;
text-align: center;
}
.cost {
&-input {
position: relative;
width: 368rpx;
height: 72rpx;
width: toRpx(368);
height: toRpx(72);
background: #ffffff;
border: 3rpx solid #a8c1ff;
border-radius: 12rpx;
border: toRpx(3) solid #a8c1ff;
border-radius: toRpx(12);
box-sizing: border-box;
padding: 0 24rpx;
padding: 0 toRpx(24);
.input {
width: 100%;
height: 100%;
font-size: 28rpx;
font-size: toRpx(28);
border: none !important;
outline: none;
color: #292d33;
line-height: 72rpx;
line-height: toRpx(72);
&::placeholder {
padding: 0 !important;
}
......@@ -412,11 +412,11 @@ export default {
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 24rpx;
right: toRpx(24);
font-weight: 300;
font-size: 28rpx;
font-size: toRpx(28);
color: #292d33;
line-height: 36rpx;
line-height: toRpx(36);
}
}
}
......@@ -431,7 +431,7 @@ export default {
}
.has-default {
box-sizing: border-box;
border-bottom: 4rpx solid #ffffff;
border-bottom: toRpx(4) solid #ffffff;
}
}
.disabled {
......@@ -463,9 +463,9 @@ export default {
}
&::before {
position: absolute;
left: 100rpx;
left: toRpx(100);
top: 0;
width: 4rpx;
width: toRpx(4);
height: 100%;
background: #fff;
content: '';
......@@ -476,7 +476,7 @@ export default {
top: 0;
left: 0;
height: 100%;
width: 104rpx;
width: toRpx(104);
background: #cfe3fe;
content: '';
z-index: -1;
......@@ -490,33 +490,33 @@ export default {
height: 100%;
justify-content: center;
flex-direction: column;
font-size: 26rpx;
font-size: toRpx(26);
color: #808291;
.sprite-icon {
margin-bottom: 24rpx;
margin-bottom: toRpx(24);
}
}
}
.views-footer {
height: 96rpx;
height: toRpx(96);
background-image: linear-gradient(92deg, #d1e7ffcc 0%, #c2dbffcc 33%, #d1e4ffcc 77%, #bdd6ffcc 100%);
backdrop-filter: blur(6rpx);
border-radius: 0 0 40rpx 40rpx;
backdrop-filter: blur(toRpx(6));
border-radius: 0 0 toRpx(40) toRpx(40);
justify-content: flex-end;
box-sizing: border-box;
padding-right: 104rpx;
padding-right: toRpx(104);
font-weight: 500;
font-size: 28rpx;
font-size: toRpx(28);
color: #292d33;
line-height: 40rpx;
line-height: toRpx(40);
.sprite-icon {
margin-right: 14rpx;
margin-right: toRpx(14);
}
.total {
color: #2c66f7;
font-size: 48rpx;
margin: 0 16rpx 0 32rpx;
line-height: 64rpx;
font-size: toRpx(48);
margin: 0 toRpx(16) 0 toRpx(32);
line-height: toRpx(64);
}
.util {
color: #2c66f7;
......@@ -532,23 +532,23 @@ export default {
flex-shrink: 0;
}
.row-1 {
width: 404rpx;
width: toRpx(404);
}
.row-2 {
width: 1052rpx;
width: toRpx(1052);
}
.row-3 {
width: 465rpx;
width: toRpx(465);
}
.row-4 {
border-left: 4rpx solid #fff;
width: 158rpx;
border-left: toRpx(4) solid #fff;
width: toRpx(158);
}
.insurance-item {
position: relative;
.name {
width: 296rpx !important;
padding: 0 24rpx !important;
width: toRpx(296) !important;
padding: 0 toRpx(24) !important;
}
.show {
border-left: none;
......@@ -556,8 +556,8 @@ export default {
&::after {
position: absolute;
top: 0;
right: 158rpx;
width: 4rpx;
right: toRpx(158);
width: toRpx(4);
height: 100%;
background: #fff;
content: '';
......
......@@ -135,19 +135,19 @@ export default {
<style scoped lang="scss">
.tips-wrapper {
background: #ffffff;
border-radius: 20rpx;
border-radius: toRpx(20);
height: 100%;
.tips-content {
padding: 48rpx;
padding: toRpx(48);
box-sizing: border-box;
height: calc(100% - 100rpx);
height: calc(100% - #{toRpx(100)});
position: relative;
.icon-close-box {
position: absolute;
right: 0;
top: 0;
width: 120rpx;
height: 120rpx;
width: toRpx(120);
height: toRpx(120);
justify-content: center;
z-index: 2;
}
......@@ -155,7 +155,7 @@ export default {
position: relative;
width: 100%;
font-weight: 500;
font-size: 36rpx;
font-size: toRpx(36);
color: #292d33;
text-align: center;
.icon-back {
......@@ -168,18 +168,18 @@ export default {
}
.tips-text {
display: block;
font-size: 30rpx;
font-size: toRpx(30);
color: #5a5e66;
letter-spacing: 1rpx;
letter-spacing: toRpx(1);
text-align: center;
line-height: 40rpx;
margin-top: 48rpx;
line-height: toRpx(40);
margin-top: toRpx(48);
}
.tips-footer {
display: flex;
align-items: center;
justify-content: center;
height: 100rpx;
height: toRpx(100);
border-top: 1px solid #e8e8e8;
.close {
......@@ -192,9 +192,9 @@ export default {
.tips-btn {
width: 50%;
text-align: center;
font-size: 32rpx;
font-size: toRpx(32);
text-align: center;
line-height: 44rpx;
line-height: toRpx(44);
font-weight: 500;
}
}
......
......@@ -88,24 +88,24 @@ export default {
<style scoped lang='scss'>
.select-box {
margin: 40rpx 0;
margin: toRpx(40) 0;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 32rpx;
gap: toRpx(32);
overflow-y: scroll;
max-height: 50vh;
padding-bottom: 60rpx;
padding-bottom: toRpx(60);
.select-item {
text-align: center;
height: 68rpx;
line-height: 44rpx;
height: toRpx(68);
line-height: toRpx(44);
opacity: 1;
border: 2rpx solid #dce0e6;
border: toRpx(2) solid #dce0e6;
color: #292d33;
font-size: 28rpx;
border-radius: 8rpx;
font-size: toRpx(28);
border-radius: toRpx(8);
&.checked {
border: 2rpx solid #292d33;
border: toRpx(2) solid #292d33;
}
}
}
......
<template>
<view class="tool-box" :style="toolStyle">
<view
:class="['btn', {hideIcon:!show}]"
@click="show = false"
>
<view class="icon sprite-icon icon-tool-file">
</view>
<view :class="['btn', { hideIcon: !show }]" @click="show = false">
<view class="icon sprite-icon icon-tool-file"></view>
文件夹
</view>
<view :class="['list',{showList:!show}]">
<view
class="title"
@click="show = true"
>文件夹</view>
<template v-for="(i,index) in data">
<view
:class="['item', {active: i[idKey] == id} ]"
:key="index"
@click="jump(i)"
>
<image
class="icon"
:src="i.shortTitleUrl"
mode="scaleToFill"
/>
{{i.shortTitle}}
</view>
</template>
<view :class="['list', { showList: !show }]">
<view class="title" @click="show = true">文件夹</view>
<view class="list-body">
<template v-for="(i, index) in data">
<view :class="['item', { active: i[idKey] == id }]" :key="index" @click="jump(i)">
<image class="icon" :src="i.shortTitleUrl" mode="scaleToFill" />
{{ i.shortTitle }}
</view>
</template>
</view>
<template v-if="showPayBtn">
<view
class="item"
@click="toPay"
>
<view class="item" @click="toPay">
<view class="icon">
<view class="sprite-icon icon-tool-pay"></view>
</view>
......@@ -39,10 +23,7 @@
</view>
</template>
<template v-if="type != 'preview'">
<view
class="item"
@click="finish"
>
<view class="item" @click="finish">
<view class="icon">
<view class="sprite-icon icon-tool-finish"></view>
</view>
......@@ -53,7 +34,7 @@
</view>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
export default {
name: 'ToolBox',
props: {
......@@ -105,30 +86,30 @@ export default {
}
</script>
<style scoped lang='scss'>
<style scoped lang="scss">
.tool-box {
position: fixed;
right: 40rpx;
top: calc(5% + 140rpx);
right: toRpx(40);
top: calc(5% + #{toRpx(140)});
z-index: 998;
width: 120rpx;
width: toRpx(120);
.btn {
width: 100%;
height: 120rpx;
height: toRpx(120);
background-image: linear-gradient(180deg, #ffffff 0%, #f8f9fb 100%);
border: 2.08rpx solid #ffffff;
box-shadow: 0 8rpx 24rpx 0 #00000033;
border-radius: 16rpx;
font-size: 24rpx;
border: toRpx(2) solid #ffffff;
box-shadow: 0 toRpx(8) toRpx(24) 0 #00000033;
border-radius: toRpx(16);
font-size: toRpx(24);
color: #292d33;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.icon {
width: 60rpx;
height: 60rpx;
margin-bottom: 8rpx;
width: toRpx(60);
height: toRpx(60);
margin-bottom: toRpx(8);
transition: all 0.05s;
}
}
......@@ -143,9 +124,9 @@ export default {
}
.list {
width: 100%;
border: 2rpx solid #ffffff;
box-shadow: 0 8rpx 22rpx 0 #0000001a;
border-radius: 16rpx;
border: toRpx(2) solid #ffffff;
box-shadow: 0 toRpx(8) toRpx(22) 0 #0000001a;
border-radius: toRpx(16);
flex-direction: column;
align-items: center;
transition: all 0.05s;
......@@ -157,39 +138,43 @@ export default {
height: 0;
&::after {
position: absolute;
content: "";
content: '';
background: inherit;
top: 0;
left: 0;
right: 0;
bottom: 0;
filter: blur(8rpx);
filter: blur(toRpx(8));
z-index: -1;
}
.title {
width: 120rpx;
height: 56rpx;
width: toRpx(120);
height: toRpx(56);
background: #f4f4f5;
border: 2rpx solid #ffffff;
border-radius: 16rpx 16rpx 0 0;
border: toRpx(2) solid #ffffff;
border-radius: toRpx(16) toRpx(16) 0 0;
display: flex;
align-items: center;
justify-content: center;
}
.list-body {
max-height: 60vh;
overflow-y: auto;
}
.item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 20rpx;
font-size: toRpx(20);
color: #666666;
// height: 120rpx;
// height: toRpx(120);
width: 100%;
padding-top: 16rpx;
padding-top: toRpx(16);
.icon {
width: 60rpx;
height: 60rpx;
margin-bottom: 8rpx;
width: toRpx(60);
height: toRpx(60);
margin-bottom: toRpx(8);
}
}
.active {
......@@ -199,7 +184,7 @@ export default {
.showList {
display: flex;
opacity: 1;
padding-bottom: 16rpx;
padding-bottom: toRpx(16);
animation: scale-up-top-right 0.4s;
visibility: visible;
height: auto;
......@@ -215,4 +200,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
......@@ -80,46 +80,46 @@ export default {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 800rpx;
height: 752rpx;
width: toRpx(800);
height: toRpx(752);
background: #ffffff;
border-radius: 32rpx;
border-radius: toRpx(32);
box-sizing: border-box;
padding-top: 288rpx;
padding-top: toRpx(288);
.bg {
width: 800rpx;
height: 400rpx;
width: toRpx(800);
height: toRpx(400);
position: absolute;
left: 0;
top: -84rpx;
top: toMinusRpx(84);
}
.content {
position: relative;
z-index: 2;
width: 640rpx;
height: 288rpx;
width: toRpx(640);
height: toRpx(288);
overflow-y: scroll;
margin: 0 auto 32rpx;
margin: 0 auto toRpx(32);
.title {
text-align: center;
font-weight: 500;
font-size: 32rpx;
margin-bottom: 24rpx;
font-size: toRpx(32);
margin-bottom: toRpx(24);
}
&-item {
color: #5a5e66;
font-size: 28rpx;
font-size: toRpx(28);
}
}
.btn {
width: 608rpx;
height: 80rpx;
width: toRpx(608);
height: toRpx(80);
background-image: linear-gradient(270deg, #2c66f7 0%, #48a6ff 100%);
border-radius: 98rpx;
border-radius: toRpx(98);
text-align: center;
line-height: 80rpx;
line-height: toRpx(80);
font-weight: 500;
font-size: 32rpx;
font-size: toRpx(32);
color: #ffffff;
margin: 0 auto;
}
......
const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 2
const index = 3
/**
*
0本地
......
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-16 09:55:40
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-30 17:30:24
* @FilePath: \gl-tape\lib\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import sha1 from './sha1.js'
import qs from './qs'
module.exports ={ sha1,qs }
\ No newline at end of file
import SQLite from './sqlite.js'
module.exports = { sha1, qs, SQLite }
class SQLite {
constructor(name, version, description, size) {
this.name = name
this.version = version || '1.0'
this.description = description || 'SQLite DB'
this.size = size || 50 * 1024 * 1024 // 50MB
this.db = null
}
init() {
return new Promise((resolve, reject) => {
plus.sqlite.openDatabase({
name: this.name, // 数据库名称
path: `_doc/${this.name}.db`, // 数据库地址
success: resolve, // 直接使用 resolve
fail: reject // 直接使用 reject
})
})
}
selectSql(sql) {
return new Promise((resolve, reject) => {
uni.$logger.local.info(`执行SQL语句: ${sql}`)
plus.sqlite.selectSql({
name: this.name,
sql,
success: result => {
// 处理查询结果,尝试还原数组或对象字符串
const processedRows = result.map(row =>
Object.fromEntries(
Object.entries(row).map(([key, value]) => {
try {
// 尝试将字符串解析为对象或数组
return [key, JSON.parse(value)]
} catch {
// 如果解析失败,保留原始值
return [key, value]
}
})
)
)
resolve(processedRows)
},
fail: reject
})
})
}
executeSql(sql) {
return new Promise((resolve, reject) => {
uni.$logger.local.info(`执行SQL语句: ${sql}`)
plus.sqlite.executeSql({
name: this.name,
sql,
success: resolve,
fail: reject
})
})
}
async isTableExists(tableName) {
const sql = `SELECT COUNT(*) as isTable FROM sqlite_master WHERE type='table' and name='${tableName}'`
try {
const result = await this.selectSql(sql)
return result[0].isTable ? true : false
} catch (error) {
console.error('检查表是否存在出错: ', error)
throw error
}
}
// 创建新表示例
createTable(tableName, columns) {
const sql = `CREATE TABLE IF NOT EXISTS ${tableName} (${columns.join(', ')})`
return this.executeSql(sql)
}
// 查询示例
select(tabName, where, order) {
let sql = `SELECT * FROM ${tabName}`
if (where) {
const dataKeys = Object.keys(where)
const conditions = dataKeys.map(key => `${key}=${JSON.stringify(where[key])}`).join(' AND ')
sql += ` WHERE ${conditions}`
}
if (order) {
const orderKey = Object.keys(order)[0] // 获取排序字段
const orderType = order[orderKey] // 获取排序类型
sql += ` ORDER BY ${orderKey} ${orderType}`
}
return this.selectSql(sql)
}
// 插入示例
insert(tabName, keyValues) {
const keys = Object.keys(keyValues)
const keyStr = keys.join(', ')
const valStr = keys
.map(key => {
const value = keyValues[key]
// 使用公共方法进行格式化
return `${this.formatValue(value)}`
})
.join(', ')
const sql = `INSERT INTO ${tabName} (${keyStr}) VALUES (${valStr})`
return this.executeSql(sql)
}
// 更新示例
update(tabName, setData, where) {
const dataKeys = Object.keys(setData)
const setStr = dataKeys
.map(key => {
const value = setData[key]
return `${key} = ${this.formatValue(value)}`
})
.join(', ')
const whereKeys = Object.keys(where)
const whereStr = whereKeys
.map(key => {
const value = where[key]
return `${key} = ${this.formatValue(value)}`
})
.join(' AND ')
const sql = `UPDATE ${tabName} SET ${setStr} WHERE ${whereStr}`
return this.executeSql(sql)
}
// 删除示例
delete(tabName, where) {
const whereKeys = Object.keys(where)
const whereStr = whereKeys
.map(key => {
const value = where[key]
return `${key} = ${this.formatValue(value)}`
})
.join(' AND ')
const sql = `DELETE FROM ${tabName} WHERE ${whereStr}`
return this.executeSql(sql)
}
isOpen() {
let isopen = plus.sqlite.isOpenDatabase({
name: this.name,
path: `_doc/${this.name}.db`
})
return isopen
}
close() {
if (this.db) {
this.db.close()
this.db = null
console.log('数据库连接已关闭')
}
}
drop(tabName) {
const sql = `DROP TABLE ${tabName}`
return this.executeSql(sql)
}
formatValue(value) {
return typeof value === 'object' && value !== null ? `'${JSON.stringify(value)}'` : `'${value}'`
}
}
export default SQLite
// 使用示例
/* const db = new SQLite('mydb', '1.0', 'Test DB', 1 * 1024 * 1024);
db.init().then(() => {
// 进行数据库操作
}).catch(error => {
console.error('数据库初始化失败: ', error);
});*/
......@@ -25,9 +25,13 @@ Vue.component('MessageBox', MessageBox)
Vue.component('wnCanvas', wnCanvas)
Vue.component('UpdateBox', UpdateBox)
import RecordManager from '@/utils/RecordManager'
import DBManager from '@/utils/DBManager'
const dbManager = new DBManager()
dbManager.init()
const recordManager = RecordManager.getInstance()
recordManager.compatible()
uni.$recordManager = recordManager
uni.$dbManager = dbManager
uni.$api = api
uni.$lock = false
uni.$storage = new Storage()
......
{
"name": "展业助手",
"appid": "__UNI__D3BD3DF",
"description": "",
"versionName": "2.1.0",
"versionCode": "100",
"transformPx": false,
"name" : "展业助手",
"appid" : "__UNI__D3BD3DF",
"description" : "",
"versionName" : "2.3.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App特有相关 */
"app-plus": {
"bounce": "none",
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"screenOrientation": "landscape",
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
"app-plus" : {
"bounce" : "none",
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"screenOrientation" : "landscape",
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* 模块配置 */
"modules": {
"Camera": {},
"Record": {},
"VideoPlayer": {},
"AudioPlayer": {}
"modules" : {
"Camera" : {},
"Record" : {},
"VideoPlayer" : {},
"AudioPlayer" : {},
"SQLite" : {}
},
/* 应用发布信息 */
"distribute": {
"distribute" : {
/* android打包配置 */
"android": {
"permissions": [
"android" : {
"permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
......@@ -44,59 +45,76 @@
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters": [
"armeabi-v7a",
"arm64-v8a",
"x86"
],
"targetSdkVersion": 30
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"targetSdkVersion" : 30
},
/* ios打包配置 */
"ios": {
"dSYMs": false,
"UIBackgroundModes": "audio"
"ios" : {
"dSYMs" : false,
"UIBackgroundModes" : "audio"
},
/* SDK配置 */
"sdkConfigs": {
"ad": {},
"speech": {}
"sdkConfigs" : {
"ad" : {},
"speech" : {},
"geolocation" : {
"system" : {
"__platform__" : [ "ios", "android" ]
}
}
},
"icons": {
"android": {
"hdpi": "static/72.png",
"xhdpi": "static/96.png",
"xxhdpi": "static/144.png"
"icons" : {
"android" : {
"hdpi" : "static/72.png",
"xhdpi" : "static/96.png",
"xxhdpi" : "static/144.png"
}
}
},
"nativePlugins" : {
"Ba-KeepAliveSuit" : {
"__plugin_info__" : {
"name" : "安卓保活套装(通用、常驻通知、电池优化、自启管理、后台运行等)",
"description" : "在Ba-KeepAlive的基础上,新增了忽略电池优化、自启管理、常驻通知。为定位、推送、websocket、定时任务、蓝牙、聊天等保驾护航(**注意:**不保证支持所有机型和场景,建议先试用再购买)",
"platforms" : "Android",
"url" : "https://ext.dcloud.net.cn/plugin?id=11765",
"android_package_name" : "uni.gltap",
"ios_bundle_id" : "",
"isCloud" : true,
"bought" : 1,
"pid" : "11765",
"parameters" : {}
}
}
}
},
/* 快应用特有相关 */
"quickapp": {},
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin": {
"appid": "wx79d1ff39bee3d047",
"setting": {
"urlCheck": false
"mp-weixin" : {
"appid" : "wx79d1ff39bee3d047",
"setting" : {
"urlCheck" : false
},
"usingComponents": true
"usingComponents" : true
},
"mp-alipay": {
"usingComponents": true
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu": {
"usingComponents": true
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao": {
"usingComponents": true
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics": {
"enable": false
"uniStatistics" : {
"enable" : false
},
"vueVersion": "2",
"h5": {
"devServer": {
"port": 8080,
"https": false
"vueVersion" : "2",
"h5" : {
"devServer" : {
"port" : 8080,
"https" : false
}
}
}
\ No newline at end of file
}
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 11:28:48
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-11-25 16:33:13
* @LastEditTime: 2025-01-02 17:50:40
* @FilePath: \gl_tape\mixin\click.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -35,6 +35,8 @@ export default {
},
async mounted() {
uni.$logger.local.info(`进入接待首页!`)
this.throttledUpdatePreRecords = utils.throttle(this.updatePreRecords.bind(this), 300)
this.checkPackage() //检查安装包
this.handleCheck() // 检查更新
this.handleSave(false)
// 获取当前页面栈数组
......@@ -52,11 +54,7 @@ export default {
*/
changeData: {
handler(val) {
console.log(val, 'val', this.audioInfo.audioStatus)
if (this.audioInfo.audioStatus != AUDIO_STATUS.START) return
const { customerInfo, booksList, receptionStatus } = val
const params = this.getParams(customerInfo, booksList, receptionStatus)
interruptRecord.updatePreRecords(params)
this.throttledUpdatePreRecords(val)
},
deep: true
}
......@@ -73,7 +71,75 @@ export default {
},
methods: {
...mapMutations('audio', ['setReceptionStatus', 'setBooks', 'setAudioInfo']),
updatePreRecords(val) {
if (this.audioInfo.audioStatus != AUDIO_STATUS.START) return
const { customerInfo, booksList, receptionStatus } = val
const params = this.getParams(customerInfo, booksList, receptionStatus)
interruptRecord.updatePreRecords(params)
},
checkPackage() {
const { deviceId: tabletSerialNumber } = uni.getDeviceInfo()
uni.$api.commonApi.checkAppUpload({ tabletSerialNumber }).then(res => {
if (res) {
this.getAllApply()
}
})
// this.getAllApply()
},
getAllApply() {
// #ifdef APP-PLUS
const main = plus.android.runtimeMainActivity()
const pManager = plus.android.invoke(main, 'getPackageManager')
const ApplicationInfo = plus.android.importClass('android.content.pm.ApplicationInfo')
const packages = plus.android.invoke(pManager, 'getInstalledPackages', 0)
const total = plus.android.invoke(packages, 'size')
let appInfoList = []
if (!total) {
appInfoList = uni.$storage.get('appInfoList')
}
for (let i = 0; i < total; i++) {
try {
const packageInfo = plus.android.invoke(packages, 'get', i)
// 获取包名
const packName = plus.android.getAttribute(packageInfo, 'packageName')
const versionName = plus.android.getAttribute(packageInfo, 'versionName')
const versionCode = plus.android.getAttribute(packageInfo, 'versionCode')
const appInfo = plus.android.invoke(pManager, 'getApplicationInfo', packName, 0)
const appName = plus.android.invoke(pManager, 'getApplicationLabel', appInfo)
// 是否是系统软件
const isSystem = packageInfo.plusGetAttribute('applicationInfo').plusGetAttribute('flags') & (ApplicationInfo.FLAG_SYSTEM != 0) ? true : false
// 判断是否是系统文件
if (!isSystem) {
appInfoList.push({
packName,
versionName,
versionCode,
appName
})
}
} catch (e) {
appInfoList = []
}
}
plus.android.autoCollection(main)
const { deviceId: tabletSerialNumber } = uni.getDeviceInfo()
if (appInfoList.length < 2) {
appInfoList = []
}
uni.$storage.set('appInfoList', appInfoList)
console.log(appInfoList, 'appInfoList')
uni.$api.commonApi
.saveOrUpdateEmployeeAppUsage({ tabletSerialNumber, appVersion: plus.runtime.version, gameAppList: JSON.stringify(appInfoList) })
.then(res => {
console.log(res)
})
.catch(err => {
console.log(err)
})
// #endif
},
handleCheck() {
const { textList, tempFileURL, version } = uni.$storage.get('mock_data')
const res = utils.compareVersions(plus?.runtime?.version, version)
......@@ -141,7 +207,9 @@ export default {
staffName: name
})
})
let version = plus.runtime.version
let params = {
// appVersion: version,
staffUuid: uuid,
staffName: name,
serviceMerchantId: merchantId,
......@@ -324,7 +392,7 @@ export default {
uni.$logger.local.info(`添加记录${JSON.stringify(record)}`)
const unlock = await uni.$recordManager.lock()
console.log('record', record)
uni.$recordManager.addRecord(record)
await uni.$dbManager.addRecord(record)
interruptRecord.removePreRecord(record.id)
unlock()
},
......
export default {
data() {
return {
year: '',
month: '',
currentMonth: ''
}
},
mounted() {
const year = new Date().getFullYear()
const month = new Date().getMonth() + 1
const day = new Date().getDate()
this.year = year
this.month = month
this.currentMonth = month
this.getDetail && this.getDetail(`${this.year}-${this.month}`, day)
},
methods: {
back() {
console.log(88)
this.$emit('backHome')
},
prevTab() {
this.month = this.month - 1
if (this.month < 1) {
this.month = 12
this.year = this.year - 1
}
this.updateDetail && this.updateDetail(`${this.year}-${this.month}`)
},
nextTab() {
this.month = this.month + 1
// if (this.month < 1) {
// this.month = 12
// this.year = this.year - 1
// }
this.updateDetail && this.updateDetail(`${this.year}-${this.month}`)
}
}
}
......@@ -511,34 +511,34 @@ export default {
z-index: 99 !important;
}
.footer-btn {
width: 518rpx;
height: 96rpx;
width: toRpx(518);
height: toRpx(96);
background-image: linear-gradient(180deg, #61c0ff 0%, #2c66f7 100%);
box-shadow: inset 0 0 32rpx 0 #ffffff80;
border-radius: 16rpx;
box-shadow: inset 0 0 toRpx(32) 0 #ffffff80;
border-radius: toRpx(16);
font-weight: 500;
font-size: 36rpx;
font-size: toRpx(36);
color: #ffffff;
line-height: 96rpx;
line-height: toRpx(96);
text-align: center;
margin: 0 auto;
margin-top: 70rpx;
margin-top: toRpx(70);
}
.content {
display: inline-flex;
margin-top: 18rpx;
margin-top: toRpx(18);
.qr-code {
margin-top: 62rpx;
width: 400rpx;
margin-left: 64rpx;
margin-top: toRpx(62);
width: toRpx(400);
margin-left: toRpx(64);
&-box {
height: 400rpx;
border-radius: 22.86rpx;
height: toRpx(400);
border-radius: toRpx(23);
background-color: #f9f9f9;
}
&-img {
width: 400rpx;
height: 400rpx;
width: toRpx(400);
height: toRpx(400);
}
}
}
......@@ -546,46 +546,46 @@ export default {
flex: 1;
display: flex;
flex-wrap: wrap;
gap: 32rpx 0;
padding-top: 30rpx;
gap: toRpx(32) 0;
padding-top: toRpx(30);
&-item {
display: flex;
align-items: center;
color: #6c6c70;
font-size: 30rpx;
font-size: toRpx(30);
box-sizing: border-box;
margin: 0 auto;
.label {
position: relative;
margin-left: auto;
flex-shrink: 0;
width: 124rpx;
width: toRpx(124);
}
.required {
&::before {
content: '*';
color: #ff0000;
position: absolute;
left: -20rpx;
left: toMinusRpx(20);
top: 50%;
transform: translate(0, -50%);
}
}
.value {
width: 468rpx;
height: 80rpx;
border: 2rpx solid #e8e8ea;
width: toRpx(468);
height: toRpx(80);
border: toRpx(2) solid #e8e8ea;
background: #ffffff;
margin-left: 32rpx;
margin-left: toRpx(32);
box-sizing: border-box;
padding: 0 40rpx;
border-radius: 8rpx;
padding: 0 toRpx(40);
border-radius: toRpx(8);
.text {
line-height: 80rpx;
line-height: toRpx(80);
}
&.error {
border: 2rpx solid #f24724;
border-radius: 8rpx;
border: toRpx(2) solid #f24724;
border-radius: toRpx(8);
}
.input,
.select {
......@@ -594,7 +594,7 @@ export default {
border: none !important;
outline: none;
padding: 0 !important;
font-size: 30rpx;
font-size: toRpx(30);
&::placeholder {
color: #c9c9c9;
}
......@@ -607,7 +607,7 @@ export default {
}
}
/deep/ .placeholder {
font-size: 30rpx;
font-size: toRpx(30);
color: #c9c9c9;
}
}
......@@ -622,40 +622,40 @@ export default {
}
}
.select-box {
margin: 40rpx 0;
margin: toRpx(40) 0;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 32rpx;
gap: toRpx(32);
overflow-y: scroll;
max-height: 50vh;
padding-bottom: 60rpx;
padding-bottom: toRpx(60);
.select-item {
text-align: center;
height: 68rpx;
line-height: 68rpx;
height: toRpx(68);
line-height: toRpx(68);
opacity: 1;
border: 2rpx solid #dce0e6;
border: toRpx(2) solid #dce0e6;
color: #292d33;
font-size: 28rpx;
border-radius: 8rpx;
font-size: toRpx(28);
border-radius: toRpx(8);
&.checked {
border: 2rpx solid #292d33;
border: toRpx(2) solid #292d33;
}
}
}
.no-data {
width: 100%;
height: 100%;
font-size: 24rpx;
font-size: toRpx(24);
color: #999999;
line-height: 36rpx;
line-height: toRpx(36);
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
&-img {
width: 100%;
height: 138rpx;
height: toRpx(138);
background-image: url('@/assets/images/boutique/no-data.webp');
background-size: 100%;
}
......@@ -669,68 +669,68 @@ export default {
justify-content: center;
flex-direction: column;
font-weight: 500;
font-size: 28rpx;
font-size: toRpx(28);
color: #333333;
width: 100%;
height: 100%;
&-status {
width: 96rpx;
height: 96rpx;
margin-bottom: 16rpx;
width: toRpx(96);
height: toRpx(96);
margin-bottom: toRpx(16);
background-image: url('@/assets/images/boutique/ok-status.webp');
background-size: 100%;
}
}
.ok-tips {
font-size: 28rpx;
font-size: toRpx(28);
color: #999999;
text-align: center;
line-height: 36rpx;
margin-top: 32rpx;
line-height: toRpx(36);
margin-top: toRpx(32);
}
.customer-info {
flex: 1;
padding-top: 30rpx;
padding-top: toRpx(30);
background-color: #f9f9f9;
border-radius: 16rpx;
padding: 48rpx;
margin-top: 30rpx;
margin-bottom: 56rpx;
border-radius: toRpx(16);
padding: toRpx(48);
margin-top: toRpx(30);
margin-bottom: toRpx(56);
.customer-title {
font-size: 30rpx;
font-size: toRpx(30);
color: #333333;
letter-spacing: 0;
line-height: 44rpx;
height: 44rpx;
line-height: toRpx(44);
height: toRpx(44);
}
.line {
width: 100%;
height: 1px;
height: toRpx(2);
background-color: #e0e0e0;
margin: 32rpx 0;
margin: toRpx(32) 0;
}
.customer-list {
display: flex;
flex-wrap: wrap;
gap: 32rpx 0;
gap: toRpx(32) 0;
}
.customer-item {
width: 100%;
display: flex;
align-items: center;
.label {
width: 185rpx;
width: toRpx(185);
text-align: right;
margin-right: 32rpx;
font-size: 28rpx;
margin-right: toRpx(32);
font-size: toRpx(28);
color: #6c6c70;
line-height: 44rpx;
line-height: toRpx(44);
}
.value-text {
flex: 1;
font-size: 30rpx;
font-size: toRpx(30);
color: #333333;
line-height: 44rpx;
line-height: toRpx(44);
}
}
}
......
......@@ -81,19 +81,19 @@ export default {
z-index: 99 !important;
}
.box {
width: 1920rpx;
height: 1120rpx;
width: toRpx(1920);
height: toRpx(1120);
background: #ffffff;
border-radius: 48rpx;
border-radius: toRpx(48);
.title {
width: 100%;
height: 160rpx;
height: toRpx(160);
background-image: url("@/assets/images/boutique/customer-type-bg.webp");
background-size: 100%;
position: relative;
.text {
font-weight: 500;
font-size: 40rpx;
font-size: toRpx(40);
color: #1a1a1a;
position: absolute;
left: 50%;
......@@ -103,23 +103,23 @@ export default {
.icon-close-box {
height: 100%;
margin-left: auto;
padding: 0 48rpx;
padding: 0 toRpx(48);
}
}
.content {
padding: 16rpx 80rpx 72rpx;
padding: toRpx(16) toRpx(80) toRpx(72);
width: 100%;
height: calc(100% - 160rpx);
gap: 0 64rpx;
height: calc(100% - #{toRpx(160)});
gap: 0 toRpx(64);
.item {
width: calc(50% - 32rpx);
width: calc(50% - #{toRpx(32)});
height: 100%;
background: #ffffff;
box-shadow: 0 12rpx 24rpx 0 #2c66f726;
border-radius: 48rpx;
box-shadow: 0 toRpx(12) toRpx(24) 0 #2c66f726;
border-radius: toRpx(48);
flex-direction: column;
box-sizing: border-box;
padding-top: 112rpx;
padding-top: toRpx(112);
position: relative;
&::before,
&::after {
......@@ -128,24 +128,24 @@ export default {
left: 0;
width: 100%;
background: #edf5ff;
filter: blur(40rpx);
filter: blur(toRpx(40));
}
&::before {
top: 0;
height: 62rpx;
height: toRpx(62);
}
&::after {
bottom: 0;
height: 126rpx;
height: toRpx(126);
}
&-title {
font-weight: 500;
font-size: 40rpx;
font-size: toRpx(40);
color: #1a1a1a;
padding: 32rpx 0 16rpx;
padding: toRpx(32) 0 toRpx(16);
}
&-describe {
font-size: 32rpx;
font-size: toRpx(32);
color: #808291;
text-align: center;
}
......
......@@ -167,30 +167,31 @@ export default {
<style scoped lang='scss'>
.views-box {
width: 2186rpx;
height: calc(100vh - 236rpx);
width: toRpx(2186);
height: 100%;
box-sizing: border-box;
margin: 236rpx auto 0;
margin: 0 auto;
padding-top: toRpx(236);
animation: show-view-opacity 0.15s forwards;
.views-title-box {
height: 96rpx;
height: toRpx(96);
background: #edf2ff;
border-radius: 16rpx;
margin-bottom: 16rpx;
border-radius: toRpx(16);
margin-bottom: toRpx(16);
.title-item {
height: 96rpx;
height: toRpx(96);
box-sizing: border-box;
flex-shrink: 0;
font-size: 26rpx;
font-size: toRpx(26);
color: #666666;
}
}
.check-box {
width: 32rpx;
height: 32rpx;
width: toRpx(32);
height: toRpx(32);
background: transparent;
border: 1.5px solid #999;
border-radius: 6rpx;
border: toRpx(3) solid #999;
border-radius: toRpx(6);
box-sizing: border-box;
justify-content: center;
overflow: hidden;
......@@ -202,41 +203,41 @@ export default {
border-color: #2c66f7;
}
.row {
padding: 26rpx 32rpx;
padding: toRpx(26) toRpx(32);
display: flex;
align-items: center;
}
.row-1 {
width: 96rpx;
width: toRpx(96);
justify-content: center;
padding: 26rpx 0;
padding: toRpx(26) 0;
}
.row-2 {
width: 1380rpx;
border-right: 2rpx solid #fff;
border-left: 2rpx solid #fff;
width: toRpx(1380);
border-right: toRpx(2) solid #fff;
border-left: toRpx(2) solid #fff;
}
.row-3 {
width: 400rpx;
width: toRpx(400);
}
.row-4 {
border-left: 2rpx solid #fff;
width: 304rpx;
border-left: toRpx(2) solid #fff;
width: toRpx(304);
}
.views-content {
height: calc(100% - 292rpx);
height: calc(100% - #{toRpx(292)});
display: flex;
box-sizing: border-box;
position: relative;
background: #f7f7f7;
border-radius: 16rpx;
border-radius: toRpx(16);
.table {
height: 100%;
.optional-item {
border-bottom: 2rpx solid #ffffff;
border-bottom: toRpx(2) solid #ffffff;
position: relative;
display: flex;
font-size: 28rpx;
font-size: toRpx(28);
color: #333333;
// &:last-child {
// border: none;
......@@ -278,44 +279,44 @@ export default {
height: 100%;
justify-content: center;
flex-direction: column;
font-size: 26rpx;
font-size: toRpx(26);
color: #808291;
.sprite-icon {
margin-bottom: 24rpx;
margin-bottom: toRpx(24);
}
}
}
.views-footer {
height: 180rpx;
height: toRpx(180);
background: #ffffff;
box-sizing: border-box;
font-weight: 500;
font-size: 32rpx;
font-size: toRpx(32);
color: #333333;
line-height: 44rpx;
line-height: toRpx(44);
display: flex;
align-items: flex-start;
.price {
margin-top: 44rpx;
margin-top: toRpx(44);
align-items: baseline;
}
.total {
font-weight: 700;
font-size: 48rpx;
line-height: 64rpx;
margin-left: 8rpx;
font-size: toRpx(48);
line-height: toRpx(64);
margin-left: toRpx(8);
}
.total-btn {
margin: 16rpx 0 0 auto;
width: 480rpx;
height: 96rpx;
margin: toRpx(16) 0 0 auto;
width: toRpx(480);
height: toRpx(96);
background-image: linear-gradient(180deg, #61c0ff 0%, #2c66f7 100%);
box-shadow: inset 0 0 32rpx 0 #ffffff;
border-radius: 16rpx;
box-shadow: inset 0 0 toRpx(32) 0 #ffffff;
border-radius: toRpx(16);
font-weight: 500;
font-size: 36rpx;
font-size: toRpx(36);
color: #ffffff;
line-height: 44rpx;
line-height: toRpx(44);
justify-content: center;
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!