Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e6ef74ff
authored
Mar 28, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 2.1权益需求
1 parent
2f54ef0a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
94 additions
and
25 deletions
components/TabBar/TabBar.js
components/TabBar/TabBar.wxml
components/TabBar/TabBar.wxss
packageEquity/pages/carQuotation/components/FirstStep/FirstStep.sass
packageEquity/pages/carQuotation/components/FirstStep/FirstStep.wxml
packageEquity/pages/carQuotation/index/index.wxml
packageEquity/pages/carQuotation/index/index.wxss
components/TabBar/TabBar.js
View file @
e6ef74f
...
...
@@ -8,17 +8,18 @@ Component({
activeIndex
:
{
type
:
Number
,
observer
:
function
(
n
)
{
console
.
log
(
this
.
data
.
tabIndex
,
'activeIndex'
,
n
);
console
.
log
(
this
.
data
.
tabIndex
!=
n
);
if
(
this
.
data
.
tabIndex
!=
n
)
{
console
.
log
(
this
.
data
.
tabIndex
,
'activeIndex'
,
n
);
console
.
log
(
this
.
data
.
tabIndex
!=
n
);
if
(
this
.
data
.
tabIndex
!=
n
)
{
this
.
setData
({
tabIndex
:
this
.
data
.
activeIndex
tabIndex
:
this
.
data
.
activeIndex
})
this
.
setTab
(
this
.
data
.
tabIndex
)
}
}
}
},
scroll
:
Boolean
},
/**
* 组件的初始数据
...
...
@@ -33,7 +34,7 @@ Component({
this
.
setTab
(
this
.
data
.
tabIndex
)
let
that
=
this
wx
.
$eventbus
.
on
(
'page_show'
,
n
=>
{
!
that
.
data
.
width
&&
that
.
setTab
(
that
.
data
.
tabIndex
)
!
that
.
data
.
width
&&
that
.
setTab
(
that
.
data
.
tabIndex
)
})
}
},
...
...
@@ -41,7 +42,7 @@ Component({
* 组件的方法列表
*/
methods
:
{
change
(
e
)
{
let
{
index
...
...
@@ -71,6 +72,7 @@ Component({
this
.
setData
({
activeStyle
:
`width: var(--fontSize64);left:
${
left
+
(
width
-
32
)
/
2
}
px;background-color:#347BFF;`
,
tabIndex
:
index
,
to
:
`to-
${
index
}
`
,
width
})
this
.
triggerEvent
(
'click'
,
index
)
...
...
components/TabBar/TabBar.wxml
View file @
e6ef74f
<view class="tab" style="grid-template-columns: repeat({{tabList.length}}, 1fr);font-size:{{tabList.length>5?'var(--fontSize24)':''}} ;">
<block wx:for="{{tabList}}" wx:key="index">
<!-- style="color:{{tabIndex==index?'#347BFF':''}};" -->
<view class="tab-item {{tabIndex==index?'active':''}}" bindtap="change" data-index="{{index}}">
<text id="tab-{{index}}"><text class="tab-item-text">{{item.text || item }}</text><text wx:if="{{item.count >= 0}}" style="font-size: var(--fontSize20);">({{item.count}})</text></text>
</view>
</block>
<view class="active-doc" style="{{activeStyle}}" />
</view>
\ No newline at end of file
<block wx:if="{{scroll}}">
<scroll-view class=" scroll" scroll-x enable-flex scroll-with-animation scroll-into-view="{{to}}">
<block wx:for="{{tabList}}" wx:key="index">
<view class="tab-item {{tabIndex==index?'active':''}}" bindtap="change" data-index="{{index}}" id="to-{{index}}">
<text id="tab-{{index}}" class="tab-text">
<text class="tab-item-text">{{item.text || item }}</text><text wx:if="{{item.count >= 0}}" style="font-size: var(--fontSize20);">({{item.count}})</text>
</text>
</view>
</block>
<!-- <view class="active-doc" style="{{activeStyle}}" /> -->
</scroll-view>
</block>
<block wx:else>
<view class="tab" style="grid-template-columns: repeat({{tabList.length}}, 1fr);font-size:{{tabList.length>5?'var(--fontSize24)':''}} ;">
<block wx:for="{{tabList}}" wx:key="index">
<!-- style="color:{{tabIndex==index?'#347BFF':''}};" -->
<view class="tab-item {{tabIndex==index?'active':''}}" bindtap="change" data-index="{{index}}">
<text id="tab-{{index}}"><text class="tab-item-text">{{item.text || item }}</text><text wx:if="{{item.count >= 0}}" style="font-size: var(--fontSize20);">({{item.count}})</text></text>
</view>
</block>
<view class="active-doc" style="{{activeStyle}}" />
</view>
</block>
\ No newline at end of file
components/TabBar/TabBar.wxss
View file @
e6ef74f
...
...
@@ -10,6 +10,18 @@
border-bottom: var(--fontSize1) solid #F2F3F5;
}
.scroll {
background-color: #fff;
height: var(--fontSize72);
box-sizing: border-box;
color: #999999;
border-bottom: var(--fontSize1) solid #F2F3F5;
width: 100%;
display: flex;
line-height: var(--fontSize72);
font-size: 0;
}
.active {
/* font-size: var(--fontSize32); */
font-weight: 600;
...
...
@@ -26,4 +38,29 @@
.tab .tab-item {
text-align: center;
}
.scroll .tab-item {
width: fit-content;
min-width: var(--fontSize144);
height: 100%;
flex-shrink: 0;
font-size: var(--fontSize28);
text-align: center;
position: relative;
}
.scroll .active .tab-text {
position: relative;
}
.scroll .active .tab-text::after {
position: absolute;
bottom: calc(-1 * var(--fontSize16));
left: 50%;
transform: translateX(-50%);
width: 100%;
height: var(--fontSize4);
background-color: #347BFF;
content: '';
}
\ No newline at end of file
packageEquity/pages/carQuotation/components/FirstStep/FirstStep.sass
View file @
e6ef74f
...
...
@@ -55,7 +55,7 @@
width
:
var
(
--
fontSize180
)
;
height
:
var
(
--
fontSize48
)
;
background
:
#FFFFFF
;
border
:
var
(
--
fontSize2
)
solid
#347BFF
;
//
border: var(--fontSize2) solid #347BFF;
border-radius
:
var
(
--
fontSize32
)
;
display
:
flex
;
align-items
:
center
;
...
...
@@ -85,7 +85,6 @@
.pictureIcon
{
width
:
var
(
--
fontSize28
)
;
height
:
var
(
--
fontSize28
)
;
margin-right
:
var
(
--
fontSize10
)
;
}
.text
{
...
...
packageEquity/pages/carQuotation/components/FirstStep/FirstStep.wxml
View file @
e6ef74f
...
...
@@ -27,7 +27,6 @@
</block>
<view class="ocrBtn" data-type="idCard" bind:tap="navOcr">
<image data-type="idCard" data-ocrType="idCard" class="pictureIcon" src="/packageEquity/images/pictureIcon.png" binderror="" bindload="" />
<view class="text" data-type="idCard">拍照识别</view>
</view>
</view>
<gl-form disable="{{disable}}" formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{first.customerFormList}}" bindRegionChange="bindRegionChange">
...
...
@@ -45,7 +44,6 @@
<view>车辆信息</view>
<view class="ocrBtn" data-type="vehicleCertificate" bind:tap="navOcr">
<image data-type="vehicleCertificate" data-ocrType="car" class="pictureIcon" src="/packageEquity/images/pictureIcon.png" binderror="" bindload="" />
<view class="text" data-type="vehicleCertificate">拍照识别</view>
</view>
</view>
<gl-form disable="{{disable}}" formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" bind:inputEvent="inputEvent" formDataList="{{first.carFormList}}">
...
...
packageEquity/pages/carQuotation/index/index.wxml
View file @
e6ef74f
...
...
@@ -52,8 +52,16 @@
</view>
</block>
</view>
<view class="search text-center" bindtap="showConfirm">
<view class="text-center">
筛选
<image class="search-filter" src="/images/filter.png" />
</view>
</view>
</view>
<view>
<tab-bar tabList="{{tabList}}" bindclick="tabClick" scroll />
</view>
<tab-bar tabList="{{tabList}}" bindclick="tabClick" />
</view>
<!-- <view class="total-box">
{{tabIndex == 0 ? '总订单' : tabList[tabIndex]}} · {{total}}
...
...
packageEquity/pages/carQuotation/index/index.wxss
View file @
e6ef74f
...
...
@@ -104,6 +104,7 @@
width: 100%;
padding: var(--fontSize16) var(--fontSize32) 0;
display: flex;
align-items: center;
background-color: #fff;
position: sticky;
top: 0;
...
...
@@ -115,11 +116,17 @@
.search-box .search-input {
background: #F7F8FA;
border-radius: var(--fontSize38);
width:
100%
;
width:
calc(568 / 750 * 100%)
;
height: var(--fontSize64);
display: flex;
align-items: center;
}
.search-box .filter{
margin-left: auto;
display: flex;
align-items: center;
}
.search-box .search-input .search-icon {
width: var(--fontSize28);
...
...
@@ -154,11 +161,12 @@
}
.search-box .search {
width:
var(--fontSize144
);
width:
calc(144 / 750 * 100%
);
height: 100%;
color: #666;
box-sizing: border-box;
padding: 0 var(--fontSize24);
margin-left: auto;
}
.search-box .search .text-center {
...
...
@@ -168,6 +176,9 @@
width: 100%;
height: var(--fontSize50);
color: #888;
display: flex;
align-items: center;
justify-content: center;
}
.search-box .search .text-center .search-filter {
...
...
@@ -198,7 +209,7 @@
.list {
box-sizing: border-box;
width: 100%;
padding: 0 var(--fontSize20) var(--fontSize20);
/* padding: 0 var(--fontSize20) var(--fontSize20); */
padding-bottom: 0;
/* height: calc(100% - var(--fontSize20)); */
/* height: calc(100% - var(--fontSize30)); */
...
...
@@ -210,7 +221,7 @@
background: #FFFFFF;
box-shadow: 0 var(--fontSize6) var(--fontSize16) 0 rgba(205, 205, 209, 0.5);
border-radius: var(--fontSize16);
margin: 0 var(--fontSize6) var(--fontSize20);
margin: 0 var(--fontSize
2
6) var(--fontSize20);
padding-bottom: var(--fontSize20);
display: flex;
justify-content: space-between;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment