Commit 12c0f6cb by 胡悦

Merge branch 'v1.0.5' of http://192.168.3.233:8090/glsx/gl_tape into v1.0.5

2 parents 09b15219 cb9d1183
Showing 45 changed files with 765 additions and 432 deletions
.sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 1434rpx 798rpx;} .sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 1434rpx 928rpx;}
.icon-arrow-right { width: 32rpx; height: 32rpx; background-position: -1392rpx -480rpx;} .icon-arrow-right { width: 32rpx; height: 32rpx; background-position: -472rpx -726rpx;}
.icon-back { width: 128rpx; height: 50rpx; background-position: -1146rpx -480rpx;} .icon-back { width: 128rpx; height: 50rpx; background-position: -334rpx -726rpx;}
.icon-change-account { width: 32rpx; height: 32rpx; background-position: -1146rpx -540rpx;} .icon-change-account { width: 32rpx; height: 32rpx; background-position: -514rpx -726rpx;}
.icon-face-error-active { width: 96rpx; height: 96rpx; background-position: -722rpx -480rpx;} .icon-face-error-active { width: 96rpx; height: 96rpx; background-position: -722rpx -480rpx;}
.icon-face-error { width: 96rpx; height: 96rpx; background-position: -828rpx -480rpx;} .icon-face-error { width: 96rpx; height: 96rpx; background-position: -828rpx -480rpx;}
.icon-face-success-active { width: 96rpx; height: 96rpx; background-position: -934rpx -480rpx;} .icon-face-success-active { width: 96rpx; height: 96rpx; background-position: -934rpx -480rpx;}
.icon-face-success { width: 96rpx; height: 96rpx; background-position: -1040rpx -480rpx;} .icon-face-success { width: 96rpx; height: 96rpx; background-position: -1040rpx -480rpx;}
.icon-feedback { width: 32rpx; height: 32rpx; background-position: -1188rpx -540rpx;} .icon-feedback { width: 32rpx; height: 32rpx; background-position: -556rpx -726rpx;}
.icon-home-active { width: 80rpx; height: 80rpx; background-position: -1010rpx -588rpx;} .icon-home-active { width: 80rpx; height: 80rpx; background-position: 0rpx -848rpx;}
.icon-home { width: 80rpx; height: 80rpx; background-position: -1100rpx -588rpx;} .icon-home { width: 80rpx; height: 80rpx; background-position: -90rpx -848rpx;}
.icon-icon-addr { width: 32rpx; height: 32rpx; background-position: -1230rpx -540rpx;} .icon-icon-addr { width: 32rpx; height: 32rpx; background-position: -598rpx -726rpx;}
.icon-icon-avatar { width: 112rpx; height: 112rpx; background-position: -888rpx -588rpx;} .icon-icon-avatar { width: 112rpx; height: 112rpx; background-position: -888rpx -588rpx;}
.icon-icon-female { width: 32rpx; height: 32rpx; background-position: -1272rpx -540rpx;} .icon-icon-female { width: 32rpx; height: 32rpx; background-position: -640rpx -726rpx;}
.icon-icon-handshake { width: 72rpx; height: 72rpx; background-position: 0rpx -726rpx;} .icon-icon-handshake { width: 72rpx; height: 72rpx; background-position: -1358rpx -480rpx;}
.icon-icon-male { width: 32rpx; height: 32rpx; background-position: -1314rpx -540rpx;} .icon-icon-male { width: 32rpx; height: 32rpx; background-position: -682rpx -726rpx;}
.icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -1356rpx -540rpx;} .icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -724rpx -726rpx;}
.icon-icon-upload { width: 128rpx; height: 128rpx; background-position: -490rpx -588rpx;} .icon-icon-upload { width: 128rpx; height: 128rpx; background-position: -490rpx -588rpx;}
.icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -1398rpx -540rpx;} .icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -766rpx -726rpx;}
.icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -82rpx -726rpx;} .icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -808rpx -726rpx;}
.icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -124rpx -726rpx;} .icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -850rpx -726rpx;}
.icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -166rpx -726rpx;} .icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -892rpx -726rpx;}
.icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -208rpx -726rpx;} .icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -934rpx -726rpx;}
.icon-logo { width: 160rpx; height: 160rpx; background-position: -1196rpx -294rpx;} .icon-logo { width: 160rpx; height: 160rpx; background-position: -1196rpx -294rpx;}
.icon-pen-active { width: 120rpx; height: 120rpx; background-position: -628rpx -588rpx;} .icon-pen-active { width: 120rpx; height: 120rpx; background-position: -628rpx -588rpx;}
.icon-pen { width: 120rpx; height: 120rpx; background-position: -758rpx -588rpx;} .icon-pen { width: 120rpx; height: 120rpx; background-position: -758rpx -588rpx;}
.icon-qw { width: 48rpx; height: 48rpx; background-position: -1284rpx -480rpx;} .icon-qw { width: 48rpx; height: 48rpx; background-position: -1376rpx -588rpx;}
.icon-record-active { width: 80rpx; height: 80rpx; background-position: -1190rpx -588rpx;} .icon-record-active { width: 80rpx; height: 80rpx; background-position: -180rpx -848rpx;}
.icon-record-day { width: 712rpx; height: 284rpx; background-position: 0rpx 0rpx;} .icon-record-day { width: 712rpx; height: 284rpx; background-position: 0rpx 0rpx;}
.icon-record-month { width: 712rpx; height: 284rpx; background-position: 0rpx -294rpx;} .icon-record-month { width: 712rpx; height: 284rpx; background-position: 0rpx -294rpx;}
.icon-record-week { width: 712rpx; height: 284rpx; background-position: -722rpx 0rpx;} .icon-record-week { width: 712rpx; height: 284rpx; background-position: -722rpx 0rpx;}
.icon-record { width: 80rpx; height: 80rpx; background-position: -1280rpx -588rpx;} .icon-record { width: 80rpx; height: 80rpx; background-position: -270rpx -848rpx;}
.icon-setting { width: 32rpx; height: 32rpx; background-position: -250rpx -726rpx;} .icon-setting { width: 32rpx; height: 32rpx; background-position: -976rpx -726rpx;}
.icon-tool-file { width: 60rpx; height: 60rpx; background-position: -1366rpx -294rpx;} .icon-tool-file { width: 60rpx; height: 60rpx; background-position: -360rpx -848rpx;}
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -1366rpx -364rpx;} .icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -430rpx -848rpx;}
.icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -1370rpx -588rpx;} .icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -500rpx -848rpx;}
.icon-search { width: 40rpx; height: 40rpx; background-position: -1342rpx -480rpx;} .icon-search { width: 40rpx; height: 40rpx; background-position: -1376rpx -646rpx;}
.icon-second-nav { width: 480rpx; height: 128rpx; background-position: 0rpx -588rpx;} .icon-second-nav { width: 480rpx; height: 128rpx; background-position: 0rpx -588rpx;}
.icon-first-nav { width: 464rpx; height: 176rpx; background-position: -722rpx -294rpx;}
\ No newline at end of file \ No newline at end of file
.icon-first-nav { width: 464rpx; height: 176rpx; background-position: -722rpx -294rpx;}
.icon-new-addr { width: 32rpx; height: 32rpx; background-position: -1018rpx -726rpx;}
.icon-new-avatar { width: 96rpx; height: 96rpx; background-position: -1146rpx -480rpx;}
.icon-new-feedback { width: 64rpx; height: 64rpx; background-position: -1366rpx -294rpx;}
.icon-new-home-active { width: 112rpx; height: 112rpx; background-position: -1010rpx -588rpx;}
.icon-new-home { width: 112rpx; height: 112rpx; background-position: -1132rpx -588rpx;}
.icon-new-record-active { width: 112rpx; height: 112rpx; background-position: -1254rpx -588rpx;}
.icon-new-record { width: 112rpx; height: 112rpx; background-position: 0rpx -726rpx;}
.icon-new-setting { width: 64rpx; height: 64rpx; background-position: -1366rpx -368rpx;}
.icon-scene-0 { width: 96rpx; height: 96rpx; background-position: -1252rpx -480rpx;}
.icon-scene-1 { width: 96rpx; height: 96rpx; background-position: -122rpx -726rpx;}
.icon-store { width: 96rpx; height: 96rpx; background-position: -228rpx -726rpx;}
\ No newline at end of file \ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type

1.05 MB | W: | H:

1.28 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
</view> </view>
</view> </view>
<view class="btn-box"> <view class="btn-box">
<!-- v-if="accountLength" -->
<view <view
v-if="accountLength > 1"
class="btn flex" class="btn flex"
@click="changeAccount" @click="changeAccount"
> >
...@@ -88,7 +88,8 @@ export default { ...@@ -88,7 +88,8 @@ export default {
_this.stopAudio(); _this.stopAudio();
try { try {
uni.showLoading() uni.showLoading()
const { code, message } = await uni.$api.userApi.logout() const { code, message } = await uni.$api.userApi.logout(),
userInfo = uni.$storage.get("userInfo")
console.log(code) console.log(code)
if (code == 0) { if (code == 0) {
uni.$storage.rm("userInfo"); uni.$storage.rm("userInfo");
...@@ -97,7 +98,7 @@ export default { ...@@ -97,7 +98,7 @@ export default {
setTimeout(() => { setTimeout(() => {
uni.hideLoading() uni.hideLoading()
uni.reLaunch({ uni.reLaunch({
url: "/pages/common/login", url: `/pages/common/login?mobile=${userInfo.phone}`,
}); });
}, 500) }, 500)
} else throw message } else throw message
...@@ -149,7 +150,7 @@ export default { ...@@ -149,7 +150,7 @@ export default {
color: #333333; color: #333333;
.sprite-icon { .sprite-icon {
margin-bottom: 12rpx; margin-bottom: 12rpx;
box-shadow:0 0 24rpx 0 #3682ef33; box-shadow: 0 0 24rpx 0 #3682ef33;
border-radius: 40rpx; border-radius: 40rpx;
} }
.version { .version {
......
...@@ -6,11 +6,8 @@ export default { ...@@ -6,11 +6,8 @@ export default {
try { try {
let { merchantId, isSuper, uuid } = loginUserObj let { merchantId, isSuper, uuid } = loginUserObj
if (isSuper) { if (isSuper) {
uni.$storage.set('userInfo', loginUserObj) uni.$storage.set('accountLength', Date.now())
// uni.navigateTo({ this.$emit('chooseAccount', loginUserObj)
// url: '/pages/common/merchantList'
// })
this.$emit('chooseAccount')
return return
} }
uni.$api.userApi.getSceneMerchantRefStoreList({ uni.$api.userApi.getSceneMerchantRefStoreList({
...@@ -20,7 +17,7 @@ export default { ...@@ -20,7 +17,7 @@ export default {
// 仅一家4s店 // 仅一家4s店
if (result?.length == 1) { if (result?.length == 1) {
let { merchantName, merchantId } = result[0] let { merchantName, merchantId } = result[0]
uni.$storage.set('userInfo', { this.$emit('chooseAccount', {
...loginUserObj, ...loginUserObj,
shopMerchantName: merchantName, shopMerchantName: merchantName,
shopMerchantId: merchantId, shopMerchantId: merchantId,
...@@ -37,17 +34,15 @@ export default { ...@@ -37,17 +34,15 @@ export default {
merchantName: merchantName merchantName: merchantName
} }
}) })
uni.redirectTo({ uni.$storage.set('accountLength', null)
url: '/pages/home/home'
})
} else if (!result?.length) { } else if (!result?.length) {
return uni.showToast({ return uni.showToast({
title: '园区店关联的4s店商户账号无效,请联系总部管理员', title: '园区店关联的4s店商户账号无效,请联系总部管理员',
icon: 'none', icon: 'none',
}) })
} else { } else {
uni.$storage.set('userInfo', loginUserObj) uni.$storage.set('accountLength', Date.now())
this.$emit('chooseAccount') this.$emit('chooseAccount', loginUserObj)
} }
}) })
} catch (error) { } catch (error) {
......
<template> <template>
<view></view> <home-frame @handleTouchStart="handleTouchStart">
<view
class="module-box"
slot="module"
:key="moduleKey"
>
<template v-for="(i,index) in moduleList">
<view
:key="index"
:class="['item',i.type]"
:style="i.style"
>
<template v-if="i.icon">
<image
:src="i.icon"
class="icon"
/>
</template>
<template v-if="i.title">
<view class="title">{{i.title}}</view>
</template>
<template v-if="i.description">
<template v-for="item in i.description">
<view
class="description"
:key="item"
>{{item}}</view>
</template>
</template>
<template v-if="i.bg">
<image
:src="i.bg"
class="bg"
/>
</template>
<template v-if="i.previewImg">
<img
class="preview-img"
:src="i.previewImg.url"
:style="i.previewImg.style"
>
</template>
</view>
</template>
</view>
<template slot="record">
<record-list ref="recordRef" />
</template>
</home-frame>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
export default { import myClick from "@/mixin/click";
name: '', import HomeFrame from '../../components/HomeFrame/index.vue'
data () { import RecordList from '../home/components/RecordList.vue';
return { const caseImgUrl = require('@/assets/images/boutique/case.webp')
} export default {
}, mixins: [myClick],
mounted () { components: { HomeFrame, RecordList },
}, name: 'boutique',
methods: { data () {
return {
moduleList: [
{
type: 'landscape',
style: 'width:936rpx;background-image: linear-gradient(270deg, #E8F2FF 0%, #E3E9FF 100%);',
previewImg: {
url: require('@/assets/images/boutique/preview-1.webp'),
style: 'width: 516rpx;height: 312rpx;'
},
title: '问界·精品加装服务说明',
description: ['精品礼券|汽车贴膜|汽车精品']
},
{
type: 'landscape',
style: 'width:690rpx;',
previewImg: {
url: require('@/assets/images/boutique/preview-2.webp'),
style: 'width: 400rpx;height: 312rpx;'
},
title: '问界·套餐专区',
description: ['车窗膜|改色膜', '车衣|天窗冰甲']
},
{
type: 'square',
bg: caseImgUrl,
style: 'background:transparent;',
title: '客户案例'
},
{
type: 'vertical',
previewImg: {
url: require('@/assets/images/boutique/preview-4.webp'),
style: 'width: 474rpx;height: 360rpx;'
},
title: '问界·膜类专区',
description: ['侧踏板|底盘护板|座椅腿托', '二排小桌板']
},
{
type: 'vertical',
previewImg: {
url: require('@/assets/images/boutique/preview-5.webp'),
style: 'width: 474rpx;height: 396rpx;'
},
title: '问界·专属精品',
description: ['侧踏板|底盘护板|座椅腿托', '二排小桌板']
},
{
type: 'vertical',
previewImg: {
url: require('@/assets/images/boutique/preview-6.webp'),
style: 'width: 474rpx;height: 396rpx;'
},
style: 'background-image: linear-gradient(-37deg, #E8F2FF 0%, #E3E9FF 100%);',
title: '历史成交记录',
description: ['问界M5|问界M7|问界M9']
},
{
type: 'vertical',
style: 'background-image: linear-gradient(-37deg, #E8F2FF 0%, #E3E9FF 100%);',
title: '客户邀约记录',
description: ['问界M5|问界M7|问界M9']
}
],
moduleKey: Date.now()
} }
},
mounted () {
this.moduleList.map((e, index) => {
e.icon = require(`@/assets/images/boutique/${index + 1}.png`)
e.id = index + 1
})
this.moduleKey = Date.now()
},
methods: {
} }
}
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.module-box {
display: flex;
flex-wrap: wrap;
gap: 48rpx;
padding-top: 44rpx;
.item {
display: flex;
flex-direction: column;
border-radius: 48rpx;
position: relative;
background: #edf4ff;
box-sizing: border-box;
padding: 40rpx 64rpx;
border: 4rpx solid #fff;
.bg {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
vertical-align: top;
z-index: -1;
}
.icon {
width: 64rpx;
height: 64rpx;
}
.title {
font-weight: 500;
font-size: 36rpx;
color: #1a1a1a;
margin: 20rpx 0 8rpx;
}
.description {
font-size: 24rpx;
color: #808291;
line-height: 34rpx;
}
}
.landscape {
height: 312rpx;
.preview-img {
position: absolute;
right: 0;
top: 0;
}
}
.square {
width: 318rpx;
height: 312rpx;
.title {
color: #fff;
}
}
.vertical {
width: 474rpx;
height: 624rpx;
.preview-img {
position: absolute;
left: 0;
bottom: 0;
}
}
}
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -15,8 +15,9 @@ ...@@ -15,8 +15,9 @@
<view class="step-box"> <view class="step-box">
<template v-for="(i,index) in stepList"> <template v-for="(i,index) in stepList">
<view <view
:class="['step-item',{'active-item':stepIndex == index}]" :class="['step-item',{'active-item':stepIndex >= index}]"
:key="index" :key="index"
@click="setStep(index)"
> >
<view class="num"> <view class="num">
<view class="border"></view> <view class="border"></view>
...@@ -26,35 +27,37 @@ ...@@ -26,35 +27,37 @@
</template> </template>
</view> </view>
<view class="content-box"> <view class="content-box">
<view class="search-box"> <template v-if="stepIndex != 2">
<view class="search-input"> <view class="search-box">
<template v-if="!edit"> <view class="search-input">
<view <template v-if="!edit">
:class="['input', `${searchValue ? '' : 'placeholder'}`]" <view
@click="open" :class="['input', `${searchValue ? '' : 'placeholder'}`]"
> @click="open"
<template v-if="searchValue"> >
{{searchValue}} <template v-if="searchValue">
</template> {{searchValue}}
<template v-else> </template>
请输入门店名称/商户号搜索 <template v-else>
<view class="sprite-icon icon-search"></view> 请输入门店名称/商户号搜索
</template> <view class="sprite-icon icon-search"></view>
</view> </template>
</template> </view>
<template v-else> </template>
<input <template v-else>
type="text" <input
class="input" type="text"
v-model="searchValue" class="input"
:focus='inputFocus' v-model="searchValue"
confirm-type="search" :focus='inputFocus'
@blur="search" confirm-type="search"
@confirm="search" @blur="search"
/> @confirm="search"
</template> />
</template>
</view>
</view> </view>
</view> </template>
<scroll-view <scroll-view
class="list" class="list"
scroll-y scroll-y
...@@ -63,14 +66,17 @@ ...@@ -63,14 +66,17 @@
<account-list <account-list
v-show="stepIndex == 0" v-show="stepIndex == 0"
ref="account" ref="account"
@chooseAccount="stepIndex = 1" @chooseAccount="chooseAccount"
/> />
<merchant-list <merchant-list
v-show="stepIndex == 1" v-show="stepIndex == 1"
ref="merchant" ref="merchant"
@chooseMerchant="stepIndex = 2" @chooseMerchant="chooseMerchant"
/>
<scene
v-show="stepIndex == 2"
ref="scene"
/> />
<view class="scrollSpase"></view>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
...@@ -79,9 +85,10 @@ ...@@ -79,9 +85,10 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import AccountList from './components/AccountList.vue' import AccountList from './components/AccountList.vue'
import MerchantList from './components/MerchantList.vue' import MerchantList from './components/MerchantList.vue'
import Scene from './components/Scene.vue'
export default { export default {
name: 'accountItem', name: 'accountItem',
components: { AccountList, MerchantList }, components: { AccountList, MerchantList, Scene },
data () { data () {
return { return {
stepList: ['选择帐号', '选择4S店', '选择场景'], stepList: ['选择帐号', '选择4S店', '选择场景'],
...@@ -102,6 +109,7 @@ export default { ...@@ -102,6 +109,7 @@ export default {
const { stepIndex } = this const { stepIndex } = this
this.$refs[{ this.$refs[{
0: 'account', 0: 'account',
1: 'merchant'
}[stepIndex]]?.searchEvent(this.searchValue) }[stepIndex]]?.searchEvent(this.searchValue)
}, },
open () { open () {
...@@ -111,6 +119,22 @@ export default { ...@@ -111,6 +119,22 @@ export default {
back () { back () {
uni.navigateBack() uni.navigateBack()
}, },
chooseAccount (userInfo) {
this.stepIndex = 1
this.$nextTick(() => {
this.$refs.merchant.init(userInfo)
})
},
chooseMerchant (userInfo) {
this.stepIndex = 2
this.$refs.scene.init(userInfo)
},
setStep(index){
let {stepIndex} = this
if(index == 2) return
if(stepIndex > index) this.stepIndex = index
}
} }
} }
</script> </script>
...@@ -264,9 +288,6 @@ export default { ...@@ -264,9 +288,6 @@ export default {
position: relative; position: relative;
z-index: 2; z-index: 2;
height: calc(100% - 176rpx); height: calc(100% - 176rpx);
.scrollSpase {
height: 70rpx;
}
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -65,16 +65,21 @@ export default { ...@@ -65,16 +65,21 @@ export default {
uni.$api.userApi.getListSelectAccount().then(res => { uni.$api.userApi.getListSelectAccount().then(res => {
uni.hideLoading() uni.hideLoading()
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 21) uni.reLaunch({
let { loginUserInfoList, sessionId } = data url: "/pages/common/login",
uni.$storage.set('sessionId', sessionId); })
this.loginUserInfoList = loginUserInfoList else {
this.copyLoginUserInfoList = loginUserInfoList if (code == 0) {
} else uni.showToast({ let { loginUserInfoList, sessionId } = data
title: message, uni.$storage.set('sessionId', sessionId);
icon: 'none', this.loginUserInfoList = loginUserInfoList
}); this.copyLoginUserInfoList = loginUserInfoList
this.flag = true } else uni.showToast({
title: message,
icon: 'none',
});
this.flag = true
}
}) })
}, },
chooseAccount (item) { chooseAccount (item) {
...@@ -117,14 +122,10 @@ export default { ...@@ -117,14 +122,10 @@ export default {
let { data, message } = res, let { data, message } = res,
[userInfo] = data.loginUserInfoList [userInfo] = data.loginUserInfoList
if (data && userInfo) this.get4SStoreList(userInfo) if (data && userInfo) this.get4SStoreList(userInfo)
// {
// uni.$storage.set('userInfo', userInfo);
//
// }
else uni.showToast({ else uni.showToast({
title: message, title: message,
icon: 'none', icon: 'none',
}); })
}) })
}, },
// 搜索过滤 // 搜索过滤
...@@ -153,88 +154,90 @@ export default { ...@@ -153,88 +154,90 @@ export default {
flex-wrap: wrap; flex-wrap: wrap;
padding: 0 48rpx; padding: 0 48rpx;
gap: 48rpx; gap: 48rpx;
}
.items { .items {
width: calc(50% - 24rpx); width: calc(50% - 24rpx);
height: 160rpx; height: 160rpx;
background: #ffffff; background: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
padding: 32rpx; padding: 32rpx;
display: flex;
align-items: center;
box-sizing: border-box;
border: 4rpx solid transparent;
.left {
width: 65%;
display: flex;
flex-flow: column;
justify-content: center;
.name {
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 32rpx;
color: #181a1f;
}
.shop_no {
font-weight: 400;
font-size: 28rpx;
margin-top: 12rpx;
color: #999ea8;
}
}
.right {
flex-shrink: 0;
display: flex; display: flex;
align-items: center; align-items: center;
.midle { box-sizing: border-box;
font-size: 28rpx; border: 4rpx solid transparent;
font-weight: 700; .left {
width: 96rpx; width: 65%;
height: 96rpx;
border-radius: 8rpx;
margin-right: 28rpx;
display: flex; display: flex;
align-items: center; flex-flow: column;
justify-content: center; justify-content: center;
.name {
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 32rpx;
color: #181a1f;
}
.shop_no {
font-weight: 400;
font-size: 28rpx;
margin-top: 12rpx;
color: #999ea8;
}
} }
.midle_1 { .right {
color: #f24724; flex-shrink: 0;
background-color: #f247241a; display: flex;
} align-items: center;
.midle_2 { .midle {
color: #ff9d0a; font-size: 28rpx;
/* border: var(--fontSize2) solid #FF9D0A; */ font-weight: 700;
background-color: #ff9d0a1a; width: 96rpx;
} height: 96rpx;
.midle_3 { border-radius: 8rpx;
color: #347bff; margin-right: 28rpx;
/* border: var(--fontSize2) solid #347BFF; */ display: flex;
background-color: #347bff1a; align-items: center;
} justify-content: center;
.midle_4 { flex-shrink: 0;
color: #35c376; }
/* border: var(--fontSize2) solid #35C376; */ .midle_1 {
background-color: #35c3761a; color: #f24724;
} background-color: #f247241a;
.midle_5 { }
color: #35c376; .midle_2 {
/* border: var(--fontSize2) solid #35C376; */ color: #ff9d0a;
background-color: #35c3761a; /* border: var(--fontSize2) solid #FF9D0A; */
} background-color: #ff9d0a1a;
.icon { }
width: 40rpx; .midle_3 {
height: 40rpx; color: #347bff;
/* border: var(--fontSize2) solid #347BFF; */
background-color: #347bff1a;
}
.midle_4 {
color: #35c376;
/* border: var(--fontSize2) solid #35C376; */
background-color: #35c3761a;
}
.midle_5 {
color: #35c376;
/* border: var(--fontSize2) solid #35C376; */
background-color: #35c3761a;
}
.icon {
width: 40rpx;
height: 40rpx;
}
} }
} }
} .active {
.active { border: 4rpx solid #347bff;
border: 4rpx solid #347bff; }
} .list-not {
.list-not { font-size: 28rpx;
font-size: 28rpx; color: #999999;
color: #999999; margin: auto;
margin: auto; }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<view class="box"> <view
class="box"
:key="selectMerchantId"
>
<template v-if="flag"> <template v-if="flag">
<template v-for="(item,index) in loginUserInfoList"> <template v-if="loginUserInfoList.length">
<view <template v-for="(item,index) in loginUserInfoList">
:key="index" <view
:class="['items' ,{active:item.active}]" :key="index"
@click="chooseAccount(item)" :class="['items' ,{active:item.active}]"
> @click="chooseAccount(item)"
<view class="left"> >
<view class="text_box"> <view class="right">
<view class="name"></view>{{item.merchantName}} <view class="sprite-icon icon-store"></view>
<view class="text_no">商户号:{{item.merchantId}}</view>
</view> </view>
<view class="left">
<view class="text_box">
<view class="name">{{item.merchantName}}</view>
<view class="text_no">商户号:{{item.merchantId}}</view>
</view>
</view>
</view> </view>
</template>
</template>
<template v-else>
<view class="list-not">
暂无内容
</view> </view>
</template> </template>
</template> </template>
...@@ -21,23 +35,29 @@ ...@@ -21,23 +35,29 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
export default { export default {
name: '', name: 'MerchantList',
data () { data () {
return { return {
loginUserInfoList: [], loginUserInfoList: [],
copyLoginUserInfoList: [], copyLoginUserInfoList: [],
showSelect: false, showSelect: false,
jumpPageFlag: false, openSceneArr: [],
openSceneArr: [] flag: false,
userInfo: {},
selectMerchantId:''
} }
}, },
onLoad () { onLoad () {
// this.getMerchantList()
// this.getSceneArr()
}, },
methods: { methods: {
init (userInfo) {
this.userInfo = userInfo
this.getMerchantList()
this.getSceneArr()
},
getSceneArr () { getSceneArr () {
let userInfo = uni.$storage.get('userInfo') let { userInfo } = this
// 超管开通全部场景 // 超管开通全部场景
if (userInfo?.isSuper) return if (userInfo?.isSuper) return
// 获取4s店关联场景数据 // 获取4s店关联场景数据
...@@ -51,7 +71,7 @@ export default { ...@@ -51,7 +71,7 @@ export default {
}, },
getMerchantList () { getMerchantList () {
uni.showLoading() uni.showLoading()
let userInfo = uni.$storage.get('userInfo') let { userInfo } = this
let params = { let params = {
merchantId: userInfo?.isSuper ? '' : userInfo?.merchantId, merchantId: userInfo?.isSuper ? '' : userInfo?.merchantId,
staffUUID: userInfo?.isSuper ? '' : userInfo?.uuid staffUUID: userInfo?.isSuper ? '' : userInfo?.uuid
...@@ -67,8 +87,7 @@ export default { ...@@ -67,8 +87,7 @@ export default {
}) })
}, },
chooseAccount (item) { chooseAccount (item) {
if (this.jumpPageFlag) return uni.showLoading()
this.jumpPageFlag = true
let { loginUserInfoList } = this let { loginUserInfoList } = this
let listArr = loginUserInfoList let listArr = loginUserInfoList
listArr.map(i => { listArr.map(i => {
...@@ -79,18 +98,18 @@ export default { ...@@ -79,18 +98,18 @@ export default {
return i return i
}) })
this.loginUserInfoList = listArr this.loginUserInfoList = listArr
this.selectMerchantId = item.merchantId
this.jumpPage(item) this.jumpPage(item)
}, },
async jumpPage (item) { async jumpPage (item) {
console.log(item)
let { openSceneArr } = this, let { openSceneArr } = this,
{ merchantName: shopMerchantName, merchantId: shopMerchantId } = item, { merchantName: shopMerchantName, merchantId: shopMerchantId } = item,
userInfo = uni.$storage.get('userInfo') { userInfo } = this
if (!openSceneArr?.length && !userInfo?.isSuper) return uni.showToast({ if (!openSceneArr?.length && !userInfo?.isSuper) return uni.showToast({
title: '暂无开通业务,请联系总部管理员', title: '暂无开通业务,请联系总部管理员',
icon: 'none' icon: 'none'
}) })
uni.$storage.set('userInfo', { this.$emit('chooseMerchant',{
...userInfo, ...userInfo,
shopMerchantName, shopMerchantName,
shopMerchantId, shopMerchantId,
...@@ -107,194 +126,66 @@ export default { ...@@ -107,194 +126,66 @@ export default {
merchantName: shopMerchantName merchantName: shopMerchantName
} }
}) })
this.jumpPageFlag = false uni.hideLoading()
},
searchEvent (searchValue) {
let { copyLoginUserInfoList, selectMerchantId } = this
const res = await uni.$api.userApi.selectMerchantScene({ copyLoginUserInfoList.map(val => {
merchantId: shopMerchantId, val.active = false
merchantName: shopMerchantName, if (val.merchantId == selectMerchantId) val.active = true
sceneType: 0 return val
})
uni.reLaunch({
url: '/pages/home/home'
}) })
let filterArr = copyLoginUserInfoList.filter(val => val.merchantName.includes(searchValue) || val.merchantId == searchValue) || []
this.loginUserInfoList = filterArr
if (!searchValue) this.loginUserInfoList = copyLoginUserInfoList
}, },
} }
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.layout { .box {
padding: 32rpx 24rpx 0; display: flex;
font-size: 28rpx; align-items: center;
color: #333; flex-wrap: wrap;
letter-spacing: 0; padding: 0 48rpx;
background: #f7f8fa; gap: 48rpx;
box-sizing: border-box; .items {
height: 100vh; width: calc(50% - 24rpx);
.search-box { height: 160rpx;
width: 100%; background: #ffffff;
height: 72rpx; border-radius: 16rpx;
padding-left: 24rpx; padding: 32rpx;
box-sizing: border-box;
margin-bottom: 32rpx;
color: #333;
display: flex; display: flex;
position: sticky; align-items: center;
top: 0;
left: 0;
z-index: 1009;
box-sizing: border-box; box-sizing: border-box;
.select_box { border: 4rpx solid transparent;
width: 200rpx; .right {
display: flex; margin-right: 28rpx;
flex-flow: column; flex-shrink: 0;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: #999999;
.select {
width: 140rpx;
display: flex;
align-items: center;
.select_text {
font-size: 28rpx;
color: #181a1f;
}
.select_img {
transform: rotate(-90deg);
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
margin-left: 6rpx;
}
.select_img_rotate {
transform: rotate(90deg);
}
}
.option_box {
position: absolute;
z-index: 200;
top: 100rpx;
left: 32rpx;
width: 194rpx;
box-sizing: border-box;
background: #ffffff;
box-shadow: 0 6rpx 12rpx 0 #0000000d;
height: 176rpx;
border-radius: 16rpx;
.option {
display: block;
height: 88rpx;
line-height: 88rpx;
text-align: center;
color: #333333;
overflow: hidden;
&:first-child {
border-radius: 16rpx 16rpx 0 0;
}
&:last-child {
border-radius: 0 0 16rpx 16rpx;
}
}
.active {
background: #347bff1a;
color: #347bff;
}
&::after {
height: 0;
width: 0;
content: "";
position: absolute;
border: 14rpx solid transparent;
border-right: 14rpx solid #ffffff;
top: calc(-1 * 24rpx);
left: 88rpx;
z-index: -1;
transform: rotate(90deg);
}
&::before {
height: 0;
width: 0;
content: "";
position: absolute;
border: 14rpx solid transparent;
border-right: 14rpx solid #ffffff;
top: calc(-1 * 24rpx);
left: 88rpx;
z-index: -1;
transform: rotate(90deg);
}
}
} }
.search-input { .left {
width: 100%; flex: 1;
height: 72rpx; .name {
display: flex; font-weight: 500;
align-items: center; font-size: 32rpx;
background: #ffffff; color: #181a1f;
border-radius: var(--fontSize38); margin-bottom: 12rpx;
.search-icon {
width: 28rpx;
height: 28rpx;
margin: 0 var(--fontSize10) 0 var(--fontSize26);
} }
.search-clear { .text_no {
width: var(--fontSize36);
height: var(--fontSize36);
padding: var(--fontSize10);
margin: 0 var(--fontSize26) 0 var(--fontSize10);
}
.input {
font-size: 28rpx; font-size: 28rpx;
width: calc(100% - var(--fontSize136)); color: #999ea8;
height: 28rpx;
}
.input-placeholder {
color: rgba(200, 201, 204, 0.89);
}
}
.search {
width: var(--fontSize144);
height: 100%;
color: #666;
box-sizing: border-box;
padding: 0 24rpx;
.text-center {
font-size: 24rpx;
/* background-color: #f7f7f7; */
border-radius: 12rpx;
width: 100%;
height: 50rpx;
color: #888;
.search-filter {
margin-left: 6rpx;
width: 24rpx;
height: 24rpx;
}
} }
} }
} }
.list { .active {
.scrollSpase { border: 4rpx solid #347bff;
height: 70rpx; }
} .list-not {
.items { font-size: 28rpx;
width: 100%; color: #999999;
background: #ffffff; margin: auto;
border-radius: 16rpx;
margin-top: 32rpx;
padding: 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
&:first-child {
margin-top: 0;
}
}
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<template>
<view class="box">
<template v-for="(item,index) in sceneList">
<view
:key="index"
:class="['items', `${item.actived ? 'active' : ''}` ]"
@click="selectScene(item,index)"
>
<view class="left">
<view :class="['sprite-icon', `icon-scene-${item.sceneType}`]"></view>
</view>
<view class="right">
<view class="name">
{{item.sceneName}}
</view>
<view class="shop_no">
商户号:{{item.sceneDesc}}
</view>
</view>
</view>
</template>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
return {
sceneList: [
{
sceneName: '轻改',
sceneDesc: '太阳膜升级转化下单',
sceneType: 1,
actived: false
},
{
sceneName: '延保',
sceneDesc: '延保升级下单',
sceneType: 0,
actived: false
},
],
userInfo: {},
openSceneArr: []
}
},
mounted () {
},
methods: {
init (userInfo) {
this.userInfo = userInfo
this.getSceneArr()
},
getSceneArr () {
uni.showLoading()
// 超管默认开通全部场景
let { userInfo } = this
if (userInfo?.isSuper) return
// 获取4s店关联场景数据
uni.$api.userApi.getYqMerchantSceneConfigAPI({
yqMerchantId: userInfo?.subLoginUser?.merchantId,
merchantId: userInfo?.shopMerchantId
}).then(result => {
uni.hideLoading()
this.openSceneArr = result.map(val => { if (val.sceneOpenFlag == 0) return val.scene }) || []
})
},
// 选择场景
async selectScene ({ sceneType }, index) {
let { sceneList, openSceneArr, userInfo } = this
if (!openSceneArr.includes(sceneType) && !userInfo?.isSuper) return uni.showToast({
title: '暂未开通此场景',
icon: 'none'
})
sceneList.map(i => (i.actived = false))
sceneList[index].actived = true
this.sceneList = sceneList
userInfo.sceneType = sceneType
if (userInfo?.isSuper) this.jump(userInfo)
else {
try {
const { message, data, code } = await uni.$api.userApi.selectMerchantScene({
merchantId: userInfo.shopMerchantId,
merchantName: userInfo.shopMerchantName,
sceneType
})
if (code == 0) this.jump(userInfo, data)
else throw message
} catch (error) {
uni.showToast({
title: error,
icon: 'none'
})
}
}
},
jump (userInfo, data) {
if (data) userInfo.loginRoleOnSelectMerchant = data?.loginRoleOnSelectMerchant
uni.$storage.set('userInfo', userInfo)
let url = {
1: '/pages/boutique/index',
0: '/pages/home/home'
}[userInfo.sceneType]
uni.reLaunch({
url
})
}
}
}
</script>
<style scoped lang='scss'>
.box {
display: flex;
align-items: center;
flex-wrap: wrap;
padding: 0 48rpx;
gap: 48rpx;
.items {
width: calc(50% - 24rpx);
height: 160rpx;
background: #ffffff;
border-radius: 16rpx;
padding: 32rpx;
display: flex;
align-items: center;
box-sizing: border-box;
border: 4rpx solid transparent;
.left {
margin-right: 28rpx;
flex-shrink: 0;
}
.right {
flex: 1;
.name {
font-weight: 500;
font-size: 32rpx;
color: #181a1f;
margin-bottom: 12rpx;
}
.shop_no {
font-size: 28rpx;
color: #999ea8;
}
}
}
.active {
border: 4rpx solid #347bff;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -14,9 +14,15 @@ export default { ...@@ -14,9 +14,15 @@ export default {
uni.$api.userApi.getListSelectAccount().then(res => { uni.$api.userApi.getListSelectAccount().then(res => {
uni.hideLoading() uni.hideLoading()
setTimeout(() => { setTimeout(() => {
if (res.code == 0 && userInfo) uni.reLaunch({ if (res.code == 0 && userInfo) {
url: '/pages/home/home' let url = {
}) 1: '/pages/boutique/index',
0: '/pages/home/home'
}[userInfo.sceneType]
uni.reLaunch({
url
})
}
else uni.reLaunch({ else uni.reLaunch({
url: '/pages/common/login' url: '/pages/common/login'
}) })
......
<template> <template>
<view class="layout"> <view class="layout">
<view class="bg"></view> <view class="bg"></view>
<view class="login" :key="dateKey"> <view
class="login"
:key="dateKey"
>
<view class="title">登录</view> <view class="title">登录</view>
<view class="sub-title">手机号码登录</view> <view class="sub-title">手机号码登录</view>
<view class="input"> <view class="input">
...@@ -13,8 +16,15 @@ ...@@ -13,8 +16,15 @@
@blur="input($event, 'mobile')" @blur="input($event, 'mobile')"
/> />
<template v-if="mobile"> <template v-if="mobile">
<view class="icon" @click="mobile = ''"> <view
<icon type="clear" size="16" color="#000"> </icon> class="icon"
@click="mobile = ''"
>
<icon
type="clear"
size="16"
color="#000"
> </icon>
</view> </view>
</template> </template>
</view> </view>
...@@ -27,19 +37,31 @@ ...@@ -27,19 +37,31 @@
@blur="input($event, 'code')" @blur="input($event, 'code')"
/> />
<template v-if="code"> <template v-if="code">
<view class="icon" @click="code = ''"> <view
<icon type="clear" size="16" color="#000"> </icon> class="icon"
@click="code = ''"
>
<icon
type="clear"
size="16"
color="#000"
> </icon>
</view> </view>
</template> </template>
<view <view
:class="['code-btn', `${count ? 'code-disabled' : ''}`]" :class="['code-btn', `${count ? 'code-disabled' : ''}`]"
@click="getSmsCode" @click="getSmsCode"
>{{ count ? `重新发送(${count}s)` : "获取验证码" }}</view >{{ count ? `重新发送(${count}s)` : "获取验证码" }}</view>
>
</view> </view>
<button class="btn" @click="login">登录</button> <button
class="btn"
@click="login"
>登录</button>
<view class="form-footer"> <view class="form-footer">
<view class="autoLogin" @click="readingStatus = !readingStatus"> <view
class="autoLogin"
@click="readingStatus = !readingStatus"
>
<uni-icons <uni-icons
:type="`${readingStatus ? 'checkbox-filled' : 'circle'}`" :type="`${readingStatus ? 'checkbox-filled' : 'circle'}`"
:size="18" :size="18"
...@@ -47,7 +69,10 @@ ...@@ -47,7 +69,10 @@
></uni-icons> ></uni-icons>
我已阅读并同意<text @click.stop="jumpUrl()">《用户隐私协议》</text> 我已阅读并同意<text @click.stop="jumpUrl()">《用户隐私协议》</text>
</view> </view>
<view class="autoLogin" @click="noSignIn = !noSignIn"> <view
class="autoLogin"
@click="noSignIn = !noSignIn"
>
<uni-icons <uni-icons
:type="`${noSignIn ? 'checkbox-filled' : 'circle'}`" :type="`${noSignIn ? 'checkbox-filled' : 'circle'}`"
:size="18" :size="18"
...@@ -66,15 +91,16 @@ const phoneRex = /^[1]([3-9])[0-9]{9}$/; ...@@ -66,15 +91,16 @@ const phoneRex = /^[1]([3-9])[0-9]{9}$/;
export default { export default {
data () { data () {
return { return {
mobile: '18372203315', mobile: '',
code: '1', code: '',
count: '', count: '',
noSignIn: true, noSignIn: true,
readingStatus:false, readingStatus: true,
dateKey:null dateKey: null
}; };
}, },
onLoad (options) { onLoad (options) {
if (options.mobile) this.mobile = options.mobile
uni.$storage.rm('accountLength') uni.$storage.rm('accountLength')
const noSignInUuid = uni.$storage.get('noSignInUuid') const noSignInUuid = uni.$storage.get('noSignInUuid')
if (noSignInUuid) this.autoLogin(noSignInUuid) if (noSignInUuid) this.autoLogin(noSignInUuid)
...@@ -122,12 +148,13 @@ export default { ...@@ -122,12 +148,13 @@ export default {
}, 1e3); }, 1e3);
}, },
async login () { async login () {
const { mobile, code: smsCode, noSignIn,readingStatus } = this; const { mobile, code: smsCode, noSignIn, readingStatus } = this;
try { try {
if(!mobile) throw '请输入手机号' if (!mobile) throw '请输入手机号'
if(!smsCode) throw '请输入验证码' if (!phoneRex.test(mobile)) throw '请输入正确的手机号';
if(!readingStatus) throw '请阅读用户隐私协议' if (!smsCode) throw '请输入验证码'
if (!readingStatus) throw '请阅读用户隐私协议'
let params = { let params = {
mobile, mobile,
code: smsCode code: smsCode
...@@ -156,14 +183,13 @@ export default { ...@@ -156,14 +183,13 @@ export default {
}, },
// 获取登录账号下园区店列表 // 获取登录账号下园区店列表
getAccountLoginList (loginUserInfoList) { getAccountLoginList (loginUserInfoList) {
uni.$storage.set('accountLength', loginUserInfoList?.length)
let stepIndex = loginUserInfoList?.length == 1 ? 1 : 0 let stepIndex = loginUserInfoList?.length == 1 ? 1 : 0
uni.navigateTo({ uni.navigateTo({
url: `/pages/common/accountItems?stepIndex=${stepIndex}` url: `/pages/common/accountItems?stepIndex=${stepIndex}`
}) })
}, },
jumpUrl () { jumpUrl () {
let url = 'https://img01.glsx.com.cn/weapp/resource/saas/app/privacy.html' let url = 'https://img01.glsx.com.cn/weapp/resource/saas/app/privacy.html'
uni.navigateTo({ uni.navigateTo({
url: `/pages/common/webview?url=${url}` url: `/pages/common/webview?url=${url}`
}) })
...@@ -275,9 +301,11 @@ export default { ...@@ -275,9 +301,11 @@ export default {
} }
.form-footer { .form-footer {
display: flex; display: flex;
align-items: center;
justify-content: center; justify-content: center;
margin-top: 40rpx; margin-top: 40rpx;
flex-direction: column;
gap: 38rpx 0;
padding-left: 142rpx;
.autoLogin { .autoLogin {
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -9,10 +9,14 @@ ...@@ -9,10 +9,14 @@
<view class="data-box"> <view class="data-box">
<template v-for="(i, index) in dataList"> <template v-for="(i, index) in dataList">
<view <view
:class="['data-item', i.icon]" :class="['data-item', i.type]"
:key="index" :key="index"
> >
<view :class="['sprite-icon', `icon-record-${i.icon}`]"></view> <image
:src="i.icon"
class="data-item-bg"
/>
<view class="title">{{dateList[index].text}}</view>
<view class="content"> <view class="content">
<view class="total"> <view class="total">
<view class="label">{{ i.label }}</view> <view class="label">{{ i.label }}</view>
...@@ -89,7 +93,7 @@ ...@@ -89,7 +93,7 @@
</template> </template>
</view> </view>
<template v-if="nothing"> <template v-if="nothing">
<view class="end-text">我是一个有底线的人</view> <view class="end-text">到底了!</view>
</template> </template>
</view> </view>
<view class="bottom-mask"></view> <view class="bottom-mask"></view>
...@@ -98,6 +102,10 @@ ...@@ -98,6 +102,10 @@
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import dayjs from 'dayjs' import dayjs from 'dayjs'
const dayImgUrl = require('@/assets/images/common/day.webp')
const weekImgUrl = require('@/assets/images/common/week.webp')
const monthImgUrl = require('@/assets/images/common/month.webp')
export default { export default {
name: '', name: '',
data () { data () {
...@@ -108,16 +116,19 @@ export default { ...@@ -108,16 +116,19 @@ export default {
}, },
dataList: [ dataList: [
{ {
label: '今日客户接待数', label: '客户接待数',
icon: 'day' type: 'day',
icon: dayImgUrl
}, },
{ {
label: '本周客户接待数', label: '客户接待数',
icon: 'week' type: 'week',
icon: weekImgUrl
}, },
{ {
label: '本月客户接待数', label: '客户接待数',
icon: 'month' type: 'month',
icon: monthImgUrl
} }
], ],
dateList: [ dateList: [
...@@ -218,7 +229,6 @@ export default { ...@@ -218,7 +229,6 @@ export default {
let minutes = Math.floor(num / 60) || '0', let minutes = Math.floor(num / 60) || '0',
seconds = num % 60 || '0' seconds = num % 60 || '0'
seconds = seconds < 10 ? `0${seconds}` : seconds seconds = seconds < 10 ? `0${seconds}` : seconds
minutes = minutes < 10 ? `0${minutes}` : minutes
return { return {
minutes, minutes,
seconds seconds
...@@ -264,7 +274,7 @@ export default { ...@@ -264,7 +274,7 @@ export default {
endTime = new Date(now.getFullYear(), now.getMonth(), now.getDate()); endTime = new Date(now.getFullYear(), now.getMonth(), now.getDate());
} else if (type === 'week') { } else if (type === 'week') {
let dayOfWeek = now.getDay(); let dayOfWeek = now.getDay();
if(dayOfWeek == 0) dayOfWeek = 7 if (dayOfWeek == 0) dayOfWeek = 7
startTime = new Date(now.getFullYear(), now.getMonth(), now.getDate() - dayOfWeek + 1); startTime = new Date(now.getFullYear(), now.getMonth(), now.getDate() - dayOfWeek + 1);
endTime = new Date(now.getFullYear(), now.getMonth(), now.getDate() + (7 - dayOfWeek)); endTime = new Date(now.getFullYear(), now.getMonth(), now.getDate() + (7 - dayOfWeek));
} else if (type === 'month') { } else if (type === 'month') {
...@@ -292,15 +302,15 @@ export default { ...@@ -292,15 +302,15 @@ export default {
box-sizing: border-box; box-sizing: border-box;
height: 100%; height: 100%;
.record-content { .record-content {
padding: 96rpx 60rpx; padding: 96rpx 0;
} }
.list { .list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 32rpx 60rpx; gap: 48rpx 60rpx;
padding-top: 50rpx; padding-top: 48rpx;
.item { .item {
width: 628rpx; width: 640rpx;
background: #ffffff; background: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
box-sizing: border-box; box-sizing: border-box;
...@@ -354,19 +364,40 @@ export default { ...@@ -354,19 +364,40 @@ export default {
display: flex; display: flex;
gap: 0 60rpx; gap: 0 60rpx;
// justify-content: space-between; // justify-content: space-between;
.data-item { .data-item {
width: 628rpx; width: 640rpx;
height: 200rpx; height: 200rpx;
position: relative; position: relative;
font-weight: 500; font-weight: 500;
font-size: 28rpx; font-size: 28rpx;
.sprite-icon { .title {
position: absolute;
left: 28rpx;
top: 8rpx;
z-index: 5;
font-weight: 500;
font-size: 24rpx;
color: #ffffff;
}
&::after {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 32rpx;
content: "";
z-index: -1;
}
.data-item-bg {
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
z-index: -1; z-index: -1;
width: 100%;
height: 100%;
vertical-align: top;
} }
.content { .content {
width: 100%; width: 100%;
...@@ -375,6 +406,7 @@ export default { ...@@ -375,6 +406,7 @@ export default {
align-items: center; align-items: center;
.total, .total,
.duration { .duration {
padding-top: 10rpx;
flex: 1; flex: 1;
.label { .label {
margin-bottom: 16rpx; margin-bottom: 16rpx;
...@@ -392,7 +424,7 @@ export default { ...@@ -392,7 +424,7 @@ export default {
} }
} }
.total { .total {
padding-left: 80rpx; padding-left: 96rpx;
} }
.duration { .duration {
...@@ -405,12 +437,21 @@ export default { ...@@ -405,12 +437,21 @@ export default {
} }
.day { .day {
color: #3b73ff; color: #3b73ff;
&::after {
box-shadow: 0 12rpx 24rpx 0 #3b73ff26;
}
} }
.week { .week {
color: #fd775a; color: #7c5afd;
&::after {
box-shadow: 0 12rpx 24rpx 0 #8258ff26;
}
} }
.month { .month {
color: #ff8e43; color: #ff8e43;
&::after {
box-shadow: 0 12rpx 24rpx 0 #ff8e4326;
}
} }
} }
.data-tabs-box { .data-tabs-box {
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="right-side"> <view :class="['right-side',{'pl-20':tabIndex == 1}]">
<template v-if="tabIndex == 0"> <template v-if="tabIndex == 0">
<view class="right-content"> <view class="right-content">
<!-- 右侧内容 --> <!-- 右侧内容 -->
...@@ -169,11 +169,11 @@ ...@@ -169,11 +169,11 @@
<script> <script>
import myClick from "@/mixin/click"; import myClick from "@/mixin/click";
import detail from "../detail/detail"; import detail from "../detail/detail";
import KfBox from "./components/KfBox"; import KfBox from "@/components/HomeFrame/components/KfBox";
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
import NoviceGuide from "@/components/NoviceGuide.vue"; import NoviceGuide from "@/components/NoviceGuide.vue";
import RecordList from "./components/RecordList.vue"; import RecordList from "./components/RecordList.vue";
import SettingBox from "./components/SettingBox"; import SettingBox from "@/components/HomeFrame/components/SettingBox";
export default { export default {
mixins: [myClick], mixins: [myClick],
components: { detail, KfBox, NoviceGuide, RecordList, SettingBox }, components: { detail, KfBox, NoviceGuide, RecordList, SettingBox },
...@@ -381,17 +381,6 @@ export default { ...@@ -381,17 +381,6 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
position: relative; position: relative;
// &::after {
// position: absolute;
// z-index: -2;
// left: 0;
// top: 0;
// width: 100vw;
// height: 100vh;
// background-image: url("../../assets/images/home/bg.webp");
// background-size: 100% 100%;
// content: "";
// }
.bg { .bg {
position: absolute; position: absolute;
z-index: -2; z-index: -2;
...@@ -779,6 +768,10 @@ export default { ...@@ -779,6 +768,10 @@ export default {
} }
} }
} }
.pl-20{
padding-left: 40rpx;
box-sizing: border-box;
}
.skeleton-box { .skeleton-box {
position: absolute; position: absolute;
left: 0; left: 0;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!