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;}
.icon-arrow-right { width: 32rpx; height: 32rpx; background-position: -1392rpx -480rpx;}
.icon-back { width: 128rpx; height: 50rpx; background-position: -1146rpx -480rpx;}
.icon-change-account { width: 32rpx; height: 32rpx; background-position: -1146rpx -540rpx;}
.sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 1434rpx 928rpx;}
.icon-arrow-right { width: 32rpx; height: 32rpx; background-position: -472rpx -726rpx;}
.icon-back { width: 128rpx; height: 50rpx; background-position: -334rpx -726rpx;}
.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 { width: 96rpx; height: 96rpx; background-position: -828rpx -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-feedback { width: 32rpx; height: 32rpx; background-position: -1188rpx -540rpx;}
.icon-home-active { width: 80rpx; height: 80rpx; background-position: -1010rpx -588rpx;}
.icon-home { width: 80rpx; height: 80rpx; background-position: -1100rpx -588rpx;}
.icon-icon-addr { width: 32rpx; height: 32rpx; background-position: -1230rpx -540rpx;}
.icon-feedback { width: 32rpx; height: 32rpx; background-position: -556rpx -726rpx;}
.icon-home-active { width: 80rpx; height: 80rpx; background-position: 0rpx -848rpx;}
.icon-home { width: 80rpx; height: 80rpx; background-position: -90rpx -848rpx;}
.icon-icon-addr { width: 32rpx; height: 32rpx; background-position: -598rpx -726rpx;}
.icon-icon-avatar { width: 112rpx; height: 112rpx; background-position: -888rpx -588rpx;}
.icon-icon-female { width: 32rpx; height: 32rpx; background-position: -1272rpx -540rpx;}
.icon-icon-handshake { width: 72rpx; height: 72rpx; background-position: 0rpx -726rpx;}
.icon-icon-male { width: 32rpx; height: 32rpx; background-position: -1314rpx -540rpx;}
.icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -1356rpx -540rpx;}
.icon-icon-female { width: 32rpx; height: 32rpx; background-position: -640rpx -726rpx;}
.icon-icon-handshake { width: 72rpx; height: 72rpx; background-position: -1358rpx -480rpx;}
.icon-icon-male { width: 32rpx; height: 32rpx; background-position: -682rpx -726rpx;}
.icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -724rpx -726rpx;}
.icon-icon-upload { width: 128rpx; height: 128rpx; background-position: -490rpx -588rpx;}
.icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -1398rpx -540rpx;}
.icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -82rpx -726rpx;}
.icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -124rpx -726rpx;}
.icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -166rpx -726rpx;}
.icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -208rpx -726rpx;}
.icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -766rpx -726rpx;}
.icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -808rpx -726rpx;}
.icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -850rpx -726rpx;}
.icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -892rpx -726rpx;}
.icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -934rpx -726rpx;}
.icon-logo { width: 160rpx; height: 160rpx; background-position: -1196rpx -294rpx;}
.icon-pen-active { width: 120rpx; height: 120rpx; background-position: -628rpx -588rpx;}
.icon-pen { width: 120rpx; height: 120rpx; background-position: -758rpx -588rpx;}
.icon-qw { width: 48rpx; height: 48rpx; background-position: -1284rpx -480rpx;}
.icon-record-active { width: 80rpx; height: 80rpx; background-position: -1190rpx -588rpx;}
.icon-qw { width: 48rpx; height: 48rpx; background-position: -1376rpx -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-month { width: 712rpx; height: 284rpx; background-position: 0rpx -294rpx;}
.icon-record-week { width: 712rpx; height: 284rpx; background-position: -722rpx 0rpx;}
.icon-record { width: 80rpx; height: 80rpx; background-position: -1280rpx -588rpx;}
.icon-setting { width: 32rpx; height: 32rpx; background-position: -250rpx -726rpx;}
.icon-tool-file { width: 60rpx; height: 60rpx; background-position: -1366rpx -294rpx;}
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -1366rpx -364rpx;}
.icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -1370rpx -588rpx;}
.icon-search { width: 40rpx; height: 40rpx; background-position: -1342rpx -480rpx;}
.icon-record { width: 80rpx; height: 80rpx; background-position: -270rpx -848rpx;}
.icon-setting { width: 32rpx; height: 32rpx; background-position: -976rpx -726rpx;}
.icon-tool-file { width: 60rpx; height: 60rpx; background-position: -360rpx -848rpx;}
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -430rpx -848rpx;}
.icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -500rpx -848rpx;}
.icon-search { width: 40rpx; height: 40rpx; background-position: -1376rpx -646rpx;}
.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
.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 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 @@
</view>
</view>
<view class="btn-box">
<!-- v-if="accountLength" -->
<view
v-if="accountLength > 1"
class="btn flex"
@click="changeAccount"
>
......@@ -88,7 +88,8 @@ export default {
_this.stopAudio();
try {
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)
if (code == 0) {
uni.$storage.rm("userInfo");
......@@ -97,7 +98,7 @@ export default {
setTimeout(() => {
uni.hideLoading()
uni.reLaunch({
url: "/pages/common/login",
url: `/pages/common/login?mobile=${userInfo.phone}`,
});
}, 500)
} else throw message
......@@ -149,7 +150,7 @@ export default {
color: #333333;
.sprite-icon {
margin-bottom: 12rpx;
box-shadow:0 0 24rpx 0 #3682ef33;
box-shadow: 0 0 24rpx 0 #3682ef33;
border-radius: 40rpx;
}
.version {
......
......@@ -6,11 +6,8 @@ export default {
try {
let { merchantId, isSuper, uuid } = loginUserObj
if (isSuper) {
uni.$storage.set('userInfo', loginUserObj)
// uni.navigateTo({
// url: '/pages/common/merchantList'
// })
this.$emit('chooseAccount')
uni.$storage.set('accountLength', Date.now())
this.$emit('chooseAccount', loginUserObj)
return
}
uni.$api.userApi.getSceneMerchantRefStoreList({
......@@ -20,7 +17,7 @@ export default {
// 仅一家4s店
if (result?.length == 1) {
let { merchantName, merchantId } = result[0]
uni.$storage.set('userInfo', {
this.$emit('chooseAccount', {
...loginUserObj,
shopMerchantName: merchantName,
shopMerchantId: merchantId,
......@@ -37,17 +34,15 @@ export default {
merchantName: merchantName
}
})
uni.redirectTo({
url: '/pages/home/home'
})
uni.$storage.set('accountLength', null)
} else if (!result?.length) {
return uni.showToast({
title: '园区店关联的4s店商户账号无效,请联系总部管理员',
icon: 'none',
})
} else {
uni.$storage.set('userInfo', loginUserObj)
this.$emit('chooseAccount')
uni.$storage.set('accountLength', Date.now())
this.$emit('chooseAccount', loginUserObj)
}
})
} catch (error) {
......
<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>
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
return {
}
},
mounted () {
},
methods: {
import myClick from "@/mixin/click";
import HomeFrame from '../../components/HomeFrame/index.vue'
import RecordList from '../home/components/RecordList.vue';
const caseImgUrl = require('@/assets/images/boutique/case.webp')
export default {
mixins: [myClick],
components: { HomeFrame, RecordList },
name: 'boutique',
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>
<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>
\ No newline at end of file
......@@ -15,8 +15,9 @@
<view class="step-box">
<template v-for="(i,index) in stepList">
<view
:class="['step-item',{'active-item':stepIndex == index}]"
:class="['step-item',{'active-item':stepIndex >= index}]"
:key="index"
@click="setStep(index)"
>
<view class="num">
<view class="border"></view>
......@@ -26,35 +27,37 @@
</template>
</view>
<view class="content-box">
<view class="search-box">
<view class="search-input">
<template v-if="!edit">
<view
:class="['input', `${searchValue ? '' : 'placeholder'}`]"
@click="open"
>
<template v-if="searchValue">
{{searchValue}}
</template>
<template v-else>
请输入门店名称/商户号搜索
<view class="sprite-icon icon-search"></view>
</template>
</view>
</template>
<template v-else>
<input
type="text"
class="input"
v-model="searchValue"
:focus='inputFocus'
confirm-type="search"
@blur="search"
@confirm="search"
/>
</template>
<template v-if="stepIndex != 2">
<view class="search-box">
<view class="search-input">
<template v-if="!edit">
<view
:class="['input', `${searchValue ? '' : 'placeholder'}`]"
@click="open"
>
<template v-if="searchValue">
{{searchValue}}
</template>
<template v-else>
请输入门店名称/商户号搜索
<view class="sprite-icon icon-search"></view>
</template>
</view>
</template>
<template v-else>
<input
type="text"
class="input"
v-model="searchValue"
:focus='inputFocus'
confirm-type="search"
@blur="search"
@confirm="search"
/>
</template>
</view>
</view>
</view>
</template>
<scroll-view
class="list"
scroll-y
......@@ -63,14 +66,17 @@
<account-list
v-show="stepIndex == 0"
ref="account"
@chooseAccount="stepIndex = 1"
@chooseAccount="chooseAccount"
/>
<merchant-list
v-show="stepIndex == 1"
ref="merchant"
@chooseMerchant="stepIndex = 2"
@chooseMerchant="chooseMerchant"
/>
<scene
v-show="stepIndex == 2"
ref="scene"
/>
<view class="scrollSpase"></view>
</scroll-view>
</view>
</view>
......@@ -79,9 +85,10 @@
<script type='text/ecmascript-6'>
import AccountList from './components/AccountList.vue'
import MerchantList from './components/MerchantList.vue'
import Scene from './components/Scene.vue'
export default {
name: 'accountItem',
components: { AccountList, MerchantList },
components: { AccountList, MerchantList, Scene },
data () {
return {
stepList: ['选择帐号', '选择4S店', '选择场景'],
......@@ -102,6 +109,7 @@ export default {
const { stepIndex } = this
this.$refs[{
0: 'account',
1: 'merchant'
}[stepIndex]]?.searchEvent(this.searchValue)
},
open () {
......@@ -111,6 +119,22 @@ export default {
back () {
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>
......@@ -264,9 +288,6 @@ export default {
position: relative;
z-index: 2;
height: calc(100% - 176rpx);
.scrollSpase {
height: 70rpx;
}
}
}
</style>
\ No newline at end of file
......@@ -65,16 +65,21 @@ export default {
uni.$api.userApi.getListSelectAccount().then(res => {
uni.hideLoading()
let { code, data, message } = res
if (code == 0) {
let { loginUserInfoList, sessionId } = data
uni.$storage.set('sessionId', sessionId);
this.loginUserInfoList = loginUserInfoList
this.copyLoginUserInfoList = loginUserInfoList
} else uni.showToast({
title: message,
icon: 'none',
});
this.flag = true
if (code == 21) uni.reLaunch({
url: "/pages/common/login",
})
else {
if (code == 0) {
let { loginUserInfoList, sessionId } = data
uni.$storage.set('sessionId', sessionId);
this.loginUserInfoList = loginUserInfoList
this.copyLoginUserInfoList = loginUserInfoList
} else uni.showToast({
title: message,
icon: 'none',
});
this.flag = true
}
})
},
chooseAccount (item) {
......@@ -117,14 +122,10 @@ export default {
let { data, message } = res,
[userInfo] = data.loginUserInfoList
if (data && userInfo) this.get4SStoreList(userInfo)
// {
// uni.$storage.set('userInfo', userInfo);
//
// }
else uni.showToast({
title: message,
icon: 'none',
});
})
})
},
// 搜索过滤
......@@ -153,88 +154,90 @@ export default {
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 {
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;
.items {
width: calc(50% - 24rpx);
height: 160rpx;
background: #ffffff;
border-radius: 16rpx;
padding: 32rpx;
display: flex;
align-items: center;
.midle {
font-size: 28rpx;
font-weight: 700;
width: 96rpx;
height: 96rpx;
border-radius: 8rpx;
margin-right: 28rpx;
box-sizing: border-box;
border: 4rpx solid transparent;
.left {
width: 65%;
display: flex;
align-items: center;
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;
}
}
.midle_1 {
color: #f24724;
background-color: #f247241a;
}
.midle_2 {
color: #ff9d0a;
/* border: var(--fontSize2) solid #FF9D0A; */
background-color: #ff9d0a1a;
}
.midle_3 {
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;
.right {
flex-shrink: 0;
display: flex;
align-items: center;
.midle {
font-size: 28rpx;
font-weight: 700;
width: 96rpx;
height: 96rpx;
border-radius: 8rpx;
margin-right: 28rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.midle_1 {
color: #f24724;
background-color: #f247241a;
}
.midle_2 {
color: #ff9d0a;
/* border: var(--fontSize2) solid #FF9D0A; */
background-color: #ff9d0a1a;
}
.midle_3 {
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 {
border: 4rpx solid #347bff;
}
.list-not {
font-size: 28rpx;
color: #999999;
margin: auto;
.active {
border: 4rpx solid #347bff;
}
.list-not {
font-size: 28rpx;
color: #999999;
margin: auto;
}
}
</style>
\ No newline at end of file
<template>
<view class="box">
<view
class="box"
:key="selectMerchantId"
>
<template v-if="flag">
<template v-for="(item,index) in loginUserInfoList">
<view
:key="index"
:class="['items' ,{active:item.active}]"
@click="chooseAccount(item)"
>
<view class="left">
<view class="text_box">
<view class="name"></view>{{item.merchantName}}
<view class="text_no">商户号:{{item.merchantId}}</view>
<template v-if="loginUserInfoList.length">
<template v-for="(item,index) in loginUserInfoList">
<view
:key="index"
:class="['items' ,{active:item.active}]"
@click="chooseAccount(item)"
>
<view class="right">
<view class="sprite-icon icon-store"></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>
</template>
</template>
<template v-else>
<view class="list-not">
暂无内容
</view>
</template>
</template>
......@@ -21,23 +35,29 @@
<script type='text/ecmascript-6'>
export default {
name: '',
name: 'MerchantList',
data () {
return {
loginUserInfoList: [],
copyLoginUserInfoList: [],
showSelect: false,
jumpPageFlag: false,
openSceneArr: []
openSceneArr: [],
flag: false,
userInfo: {},
selectMerchantId:''
}
},
onLoad () {
// this.getMerchantList()
// this.getSceneArr()
},
methods: {
init (userInfo) {
this.userInfo = userInfo
this.getMerchantList()
this.getSceneArr()
},
getSceneArr () {
let userInfo = uni.$storage.get('userInfo')
let { userInfo } = this
// 超管开通全部场景
if (userInfo?.isSuper) return
// 获取4s店关联场景数据
......@@ -51,7 +71,7 @@ export default {
},
getMerchantList () {
uni.showLoading()
let userInfo = uni.$storage.get('userInfo')
let { userInfo } = this
let params = {
merchantId: userInfo?.isSuper ? '' : userInfo?.merchantId,
staffUUID: userInfo?.isSuper ? '' : userInfo?.uuid
......@@ -67,8 +87,7 @@ export default {
})
},
chooseAccount (item) {
if (this.jumpPageFlag) return
this.jumpPageFlag = true
uni.showLoading()
let { loginUserInfoList } = this
let listArr = loginUserInfoList
listArr.map(i => {
......@@ -79,18 +98,18 @@ export default {
return i
})
this.loginUserInfoList = listArr
this.selectMerchantId = item.merchantId
this.jumpPage(item)
},
async jumpPage (item) {
console.log(item)
let { openSceneArr } = this,
{ merchantName: shopMerchantName, merchantId: shopMerchantId } = item,
userInfo = uni.$storage.get('userInfo')
{ userInfo } = this
if (!openSceneArr?.length && !userInfo?.isSuper) return uni.showToast({
title: '暂无开通业务,请联系总部管理员',
icon: 'none'
})
uni.$storage.set('userInfo', {
this.$emit('chooseMerchant',{
...userInfo,
shopMerchantName,
shopMerchantId,
......@@ -107,194 +126,66 @@ export default {
merchantName: shopMerchantName
}
})
this.jumpPageFlag = false
const res = await uni.$api.userApi.selectMerchantScene({
merchantId: shopMerchantId,
merchantName: shopMerchantName,
sceneType: 0
})
uni.reLaunch({
url: '/pages/home/home'
uni.hideLoading()
},
searchEvent (searchValue) {
let { copyLoginUserInfoList, selectMerchantId } = this
copyLoginUserInfoList.map(val => {
val.active = false
if (val.merchantId == selectMerchantId) val.active = true
return val
})
let filterArr = copyLoginUserInfoList.filter(val => val.merchantName.includes(searchValue) || val.merchantId == searchValue) || []
this.loginUserInfoList = filterArr
if (!searchValue) this.loginUserInfoList = copyLoginUserInfoList
},
}
}
</script>
<style scoped lang='scss'>
.layout {
padding: 32rpx 24rpx 0;
font-size: 28rpx;
color: #333;
letter-spacing: 0;
background: #f7f8fa;
box-sizing: border-box;
height: 100vh;
.search-box {
width: 100%;
height: 72rpx;
padding-left: 24rpx;
box-sizing: border-box;
margin-bottom: 32rpx;
color: #333;
.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;
position: sticky;
top: 0;
left: 0;
z-index: 1009;
align-items: center;
box-sizing: border-box;
.select_box {
width: 200rpx;
display: flex;
flex-flow: column;
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);
}
}
border: 4rpx solid transparent;
.right {
margin-right: 28rpx;
flex-shrink: 0;
}
.search-input {
width: 100%;
height: 72rpx;
display: flex;
align-items: center;
background: #ffffff;
border-radius: var(--fontSize38);
.search-icon {
width: 28rpx;
height: 28rpx;
margin: 0 var(--fontSize10) 0 var(--fontSize26);
.left {
flex: 1;
.name {
font-weight: 500;
font-size: 32rpx;
color: #181a1f;
margin-bottom: 12rpx;
}
.search-clear {
width: var(--fontSize36);
height: var(--fontSize36);
padding: var(--fontSize10);
margin: 0 var(--fontSize26) 0 var(--fontSize10);
}
.input {
.text_no {
font-size: 28rpx;
width: calc(100% - var(--fontSize136));
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;
}
color: #999ea8;
}
}
}
.list {
.scrollSpase {
height: 70rpx;
}
.items {
width: 100%;
background: #ffffff;
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;
}
}
.active {
border: 4rpx solid #347bff;
}
.list-not {
font-size: 28rpx;
color: #999999;
margin: auto;
}
}
</style>
\ 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
......@@ -14,9 +14,15 @@ export default {
uni.$api.userApi.getListSelectAccount().then(res => {
uni.hideLoading()
setTimeout(() => {
if (res.code == 0 && userInfo) uni.reLaunch({
url: '/pages/home/home'
})
if (res.code == 0 && userInfo) {
let url = {
1: '/pages/boutique/index',
0: '/pages/home/home'
}[userInfo.sceneType]
uni.reLaunch({
url
})
}
else uni.reLaunch({
url: '/pages/common/login'
})
......
<template>
<view class="layout">
<view class="bg"></view>
<view class="login" :key="dateKey">
<view
class="login"
:key="dateKey"
>
<view class="title">登录</view>
<view class="sub-title">手机号码登录</view>
<view class="input">
......@@ -13,8 +16,15 @@
@blur="input($event, 'mobile')"
/>
<template v-if="mobile">
<view class="icon" @click="mobile = ''">
<icon type="clear" size="16" color="#000"> </icon>
<view
class="icon"
@click="mobile = ''"
>
<icon
type="clear"
size="16"
color="#000"
> </icon>
</view>
</template>
</view>
......@@ -27,19 +37,31 @@
@blur="input($event, 'code')"
/>
<template v-if="code">
<view class="icon" @click="code = ''">
<icon type="clear" size="16" color="#000"> </icon>
<view
class="icon"
@click="code = ''"
>
<icon
type="clear"
size="16"
color="#000"
> </icon>
</view>
</template>
<view
:class="['code-btn', `${count ? 'code-disabled' : ''}`]"
@click="getSmsCode"
>{{ count ? `重新发送(${count}s)` : "获取验证码" }}</view
>
>{{ count ? `重新发送(${count}s)` : "获取验证码" }}</view>
</view>
<button class="btn" @click="login">登录</button>
<button
class="btn"
@click="login"
>登录</button>
<view class="form-footer">
<view class="autoLogin" @click="readingStatus = !readingStatus">
<view
class="autoLogin"
@click="readingStatus = !readingStatus"
>
<uni-icons
:type="`${readingStatus ? 'checkbox-filled' : 'circle'}`"
:size="18"
......@@ -47,7 +69,10 @@
></uni-icons>
我已阅读并同意<text @click.stop="jumpUrl()">《用户隐私协议》</text>
</view>
<view class="autoLogin" @click="noSignIn = !noSignIn">
<view
class="autoLogin"
@click="noSignIn = !noSignIn"
>
<uni-icons
:type="`${noSignIn ? 'checkbox-filled' : 'circle'}`"
:size="18"
......@@ -66,15 +91,16 @@ const phoneRex = /^[1]([3-9])[0-9]{9}$/;
export default {
data () {
return {
mobile: '18372203315',
code: '1',
mobile: '',
code: '',
count: '',
noSignIn: true,
readingStatus:false,
dateKey:null
readingStatus: true,
dateKey: null
};
},
onLoad (options) {
if (options.mobile) this.mobile = options.mobile
uni.$storage.rm('accountLength')
const noSignInUuid = uni.$storage.get('noSignInUuid')
if (noSignInUuid) this.autoLogin(noSignInUuid)
......@@ -122,12 +148,13 @@ export default {
}, 1e3);
},
async login () {
const { mobile, code: smsCode, noSignIn,readingStatus } = this;
const { mobile, code: smsCode, noSignIn, readingStatus } = this;
try {
if(!mobile) throw '请输入手机号'
if(!smsCode) throw '请输入验证码'
if(!readingStatus) throw '请阅读用户隐私协议'
if (!mobile) throw '请输入手机号'
if (!phoneRex.test(mobile)) throw '请输入正确的手机号';
if (!smsCode) throw '请输入验证码'
if (!readingStatus) throw '请阅读用户隐私协议'
let params = {
mobile,
code: smsCode
......@@ -156,14 +183,13 @@ export default {
},
// 获取登录账号下园区店列表
getAccountLoginList (loginUserInfoList) {
uni.$storage.set('accountLength', loginUserInfoList?.length)
let stepIndex = loginUserInfoList?.length == 1 ? 1 : 0
uni.navigateTo({
url: `/pages/common/accountItems?stepIndex=${stepIndex}`
})
},
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({
url: `/pages/common/webview?url=${url}`
})
......@@ -275,9 +301,11 @@ export default {
}
.form-footer {
display: flex;
align-items: center;
justify-content: center;
margin-top: 40rpx;
flex-direction: column;
gap: 38rpx 0;
padding-left: 142rpx;
.autoLogin {
display: flex;
align-items: center;
......
......@@ -9,10 +9,14 @@
<view class="data-box">
<template v-for="(i, index) in dataList">
<view
:class="['data-item', i.icon]"
:class="['data-item', i.type]"
: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="total">
<view class="label">{{ i.label }}</view>
......@@ -89,7 +93,7 @@
</template>
</view>
<template v-if="nothing">
<view class="end-text">我是一个有底线的人</view>
<view class="end-text">到底了!</view>
</template>
</view>
<view class="bottom-mask"></view>
......@@ -98,6 +102,10 @@
<script type="text/ecmascript-6">
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 {
name: '',
data () {
......@@ -108,16 +116,19 @@ export default {
},
dataList: [
{
label: '今日客户接待数',
icon: 'day'
label: '客户接待数',
type: 'day',
icon: dayImgUrl
},
{
label: '本周客户接待数',
icon: 'week'
label: '客户接待数',
type: 'week',
icon: weekImgUrl
},
{
label: '本月客户接待数',
icon: 'month'
label: '客户接待数',
type: 'month',
icon: monthImgUrl
}
],
dateList: [
......@@ -218,7 +229,6 @@ export default {
let minutes = Math.floor(num / 60) || '0',
seconds = num % 60 || '0'
seconds = seconds < 10 ? `0${seconds}` : seconds
minutes = minutes < 10 ? `0${minutes}` : minutes
return {
minutes,
seconds
......@@ -264,7 +274,7 @@ export default {
endTime = new Date(now.getFullYear(), now.getMonth(), now.getDate());
} else if (type === 'week') {
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);
endTime = new Date(now.getFullYear(), now.getMonth(), now.getDate() + (7 - dayOfWeek));
} else if (type === 'month') {
......@@ -292,15 +302,15 @@ export default {
box-sizing: border-box;
height: 100%;
.record-content {
padding: 96rpx 60rpx;
padding: 96rpx 0;
}
.list {
display: flex;
flex-wrap: wrap;
gap: 32rpx 60rpx;
padding-top: 50rpx;
gap: 48rpx 60rpx;
padding-top: 48rpx;
.item {
width: 628rpx;
width: 640rpx;
background: #ffffff;
border-radius: 16rpx;
box-sizing: border-box;
......@@ -354,19 +364,40 @@ export default {
display: flex;
gap: 0 60rpx;
// justify-content: space-between;
.data-item {
width: 628rpx;
width: 640rpx;
height: 200rpx;
position: relative;
font-weight: 500;
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;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: -1;
width: 100%;
height: 100%;
vertical-align: top;
}
.content {
width: 100%;
......@@ -375,6 +406,7 @@ export default {
align-items: center;
.total,
.duration {
padding-top: 10rpx;
flex: 1;
.label {
margin-bottom: 16rpx;
......@@ -392,7 +424,7 @@ export default {
}
}
.total {
padding-left: 80rpx;
padding-left: 96rpx;
}
.duration {
......@@ -405,12 +437,21 @@ export default {
}
.day {
color: #3b73ff;
&::after {
box-shadow: 0 12rpx 24rpx 0 #3b73ff26;
}
}
.week {
color: #fd775a;
color: #7c5afd;
&::after {
box-shadow: 0 12rpx 24rpx 0 #8258ff26;
}
}
.month {
color: #ff8e43;
&::after {
box-shadow: 0 12rpx 24rpx 0 #ff8e4326;
}
}
}
.data-tabs-box {
......
......@@ -57,7 +57,7 @@
</view>
</view>
</view>
<view class="right-side">
<view :class="['right-side',{'pl-20':tabIndex == 1}]">
<template v-if="tabIndex == 0">
<view class="right-content">
<!-- 右侧内容 -->
......@@ -169,11 +169,11 @@
<script>
import myClick from "@/mixin/click";
import detail from "../detail/detail";
import KfBox from "./components/KfBox";
import KfBox from "@/components/HomeFrame/components/KfBox";
import { mapMutations } from "vuex";
import NoviceGuide from "@/components/NoviceGuide.vue";
import RecordList from "./components/RecordList.vue";
import SettingBox from "./components/SettingBox";
import SettingBox from "@/components/HomeFrame/components/SettingBox";
export default {
mixins: [myClick],
components: { detail, KfBox, NoviceGuide, RecordList, SettingBox },
......@@ -381,17 +381,6 @@ export default {
<style scoped lang="scss">
.container {
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 {
position: absolute;
z-index: -2;
......@@ -779,6 +768,10 @@ export default {
}
}
}
.pl-20{
padding-left: 40rpx;
box-sizing: border-box;
}
.skeleton-box {
position: absolute;
left: 0;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!