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 bc1d797e
authored
Feb 26, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix 修复BUG&增加area-data依赖
1 parent
be348b21
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
57 additions
and
25 deletions
package-lock.json
package.json
packageEquity/components/GLForm/GLForm.js
packageEquity/components/GLForm/GLForm.json
packageEquity/components/GLForm/GLForm.wxml
packageEquity/pages/carQuotation/components/FirstStep/FirstStep.js
packageEquity/pages/carQuotation/components/FirstStep/FirstStep.wxml
packageEquity/pages/carQuotation/components/constant/stepData.js
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
package-lock.json
View file @
bc1d797
...
...
@@ -2,6 +2,11 @@
"requires"
:
true
,
"lockfileVersion"
:
1
,
"dependencies"
:
{
"@vant/area-data"
:
{
"version"
:
"1.5.1"
,
"resolved"
:
"https://registry.npmjs.org/@vant/area-data/-/area-data-1.5.1.tgz"
,
"integrity"
:
"sha512-gR5TPEzTbxN1cTK1aDhCoyikSCLX7DAacxyXoKyI4SAsYYTZrDl/nLgQFIm9vLsvWzlPIda8xV8/U3x7M9k6ww=="
},
"@vant/weapp"
:
{
"version"
:
"1.10.24"
,
"resolved"
:
"https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.24.tgz"
,
...
...
package.json
View file @
bc1d797
{
"dependencies"
:
{
"@vant/area-data"
:
"^1.5.1"
,
"@vant/weapp"
:
"^1.10.24"
,
"glsx-applet-component"
:
"^1.1.25"
,
"glsx-common-sdk"
:
"^0.2.8"
,
"number-precision"
:
"^1.6.0"
,
"rfdc"
:
"^1.3.0"
,
"glsx-common-sdk"
:
"^0.2.8"
"rfdc"
:
"^1.3.0"
}
}
packageEquity/components/GLForm/GLForm.js
View file @
bc1d797
// packageEquity/pages/carEquity/components/GLForm/GLForm.js
import
{
areaList
}
from
'@vant/area-data'
;
Component
({
externalClasses
:
[
'custom-class'
],
options
:
{
...
...
@@ -50,7 +51,8 @@ Component({
* 组件的初始数据
*/
data
:
{
targetIdx
:
-
1
targetIdx
:
-
1
,
areaList
// 省市区数据
},
lifetimes
:
{
...
...
@@ -200,8 +202,14 @@ Component({
break
}
},
showAreaFun
(){
this
.
setData
({
showArea
:
!
this
.
data
.
showArea
})
},
bindRegionChange
(
e
)
{
this
.
triggerEvent
(
'RegionChange'
,
e
)
this
.
showAreaFun
()
}
}
})
\ No newline at end of file
packageEquity/components/GLForm/GLForm.json
View file @
bc1d797
{
"component"
:
true
,
"usingComponents"
:
{}
"usingComponents"
:
{
"van-area"
:
"@vant/weapp/area/index"
,
"van-popup"
:
"@vant/weapp/popup/index"
}
}
packageEquity/components/GLForm/GLForm.wxml
View file @
bc1d797
...
...
@@ -61,9 +61,25 @@
</view>
</picker>
<!-- 省市区 -->
<picker
<block wx:if="{{item.type == 'region'}}">
<view class="picker" bindtap="showAreaFun">
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.labelName]}}">
{{formData[item.labelName]}}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
<van-popup
show="{{ showArea }}"
position="bottom"
bind:close="showAreaFun"
>
<van-area area-list="{{ areaList }}" columns-num="{{ item.columnsNum }}" title="{{item.label}}" bind:confirm="bindRegionChange" bind:cancel="showAreaFun" />
</van-popup>
</block>
<!-- <picker
mode="region"
wx:if="{{item.type == 'region'}}"
bindchange="bindRegionChange"
data-target="{{item}}"
value="{{index}}"
...
...
@@ -76,7 +92,7 @@
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</picker>
</picker>
-->
<!-- 时间选择器 -->
<picker
wx:if="{{item.type == 'pickerTime'}}"
...
...
packageEquity/pages/carQuotation/components/FirstStep/FirstStep.js
View file @
bc1d797
...
...
@@ -248,10 +248,11 @@ Component({
bindRegionChange
(
e
)
{
const
thisPage
=
wx
.
$router
.
getPageInstance
(),
{
value
value
s
}
=
e
.
detail
.
detail
let
city
=
Array
.
from
(
new
Set
([...
values
.
map
(
e
=>
e
.
name
)]))
thisPage
.
setData
({
[
'owner.city'
]:
value
.
join
(
'-'
)
[
'owner.city'
]:
city
.
join
(
'-'
)
})
},
// 品牌车型
...
...
packageEquity/pages/carQuotation/components/FirstStep/FirstStep.wxml
View file @
bc1d797
...
...
@@ -30,9 +30,9 @@
</view>
<gl-form disable="{{disable}}" formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{first.customerFormList}}" bindRegionChange="bindRegionChange">
<view class="gender-box" slot="ownerGender">
<view class="block text-center {{ serviceInfo.ownerGender==
1
?'':'right' }}" />
<view class="male text-center {{ serviceInfo.ownerGender ==
1?'active':'' }}" bindtap="changeGender" data-gender="1
">男</view>
<view class="woman text-center {{ serviceInfo.ownerGender ==
2?'active':'' }}" bindtap="changeGender" data-gender="2
">女</view>
<view class="block text-center {{ serviceInfo.ownerGender==
'男'
?'':'right' }}" />
<view class="male text-center {{ serviceInfo.ownerGender ==
'男'?'active':'' }}" bindtap="changeGender" data-gender="男
">男</view>
<view class="woman text-center {{ serviceInfo.ownerGender ==
'女'?'active':'' }}" bindtap="changeGender" data-gender="女
">女</view>
</view>
</gl-form>
</view>
...
...
packageEquity/pages/carQuotation/components/constant/stepData.js
View file @
bc1d797
...
...
@@ -152,10 +152,7 @@ const firstObj = {
name
:
'city'
,
labelName
:
'city'
,
type
:
'region'
,
level
:
'city'
,
optionList
:
constantList
.
ageList
,
optionId
:
'optionId'
,
optionLabel
:
'optionLabel'
,
columnsNum
:
'2'
,
placeholder
:
'点击选择(非必填)'
,
configItem
:
true
},
...
...
@@ -172,7 +169,8 @@ const firstObj = {
type
:
'input'
,
maxlength
:
'200'
,
fieldType
:
'textarea'
,
configItem
:
true
configItem
:
true
,
noCellHeight
:
true
,
},
{
label
:
'陪伴人员'
,
...
...
@@ -180,7 +178,8 @@ const firstObj = {
type
:
'input'
,
maxlength
:
'200'
,
fieldType
:
'textarea'
,
configItem
:
true
configItem
:
true
,
noCellHeight
:
true
,
},
],
carFormList
:
[
...
...
@@ -271,10 +270,7 @@ const firstObjSimple = {
name
:
'city'
,
labelName
:
'city'
,
type
:
'region'
,
level
:
'city'
,
optionList
:
constantList
.
ageList
,
optionId
:
'optionId'
,
optionLabel
:
'optionLabel'
,
columnsNum
:
'2'
,
placeholder
:
'点击选择(非必填)'
,
configItem
:
true
},
...
...
@@ -291,7 +287,8 @@ const firstObjSimple = {
type
:
'input'
,
maxlength
:
'200'
,
fieldType
:
'textarea'
,
configItem
:
true
configItem
:
true
,
noCellHeight
:
true
,
},
{
label
:
'陪伴人员'
,
...
...
@@ -299,7 +296,8 @@ const firstObjSimple = {
type
:
'input'
,
maxlength
:
'200'
,
fieldType
:
'textarea'
,
configItem
:
true
configItem
:
true
,
noCellHeight
:
true
,
},
],
carFormList
:
[
...
...
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
View file @
bc1d797
...
...
@@ -29,7 +29,7 @@ Page({
price
:
''
,
confirmStatus
:
false
,
saveStatus
:
false
,
ownerGender
:
1
,
ownerGender
:
'男'
,
city
:
''
,
ageRange
:
''
,
hobby
:
''
,
...
...
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