Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-customer-new-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-customer-new-master
Commits
5d61c4ff
Commit
5d61c4ff
authored
Aug 26, 2024
by
chenwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature' into 'dev'
rewards list change hierarchy of data See merge request
!3
parents
351451c4
72c3329a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
104 additions
and
73 deletions
+104
-73
gift.vue
src/pages/integral/components/gift.vue
+104
-73
No files found.
src/pages/integral/components/gift.vue
View file @
5d61c4ff
...
@@ -5,7 +5,12 @@
...
@@ -5,7 +5,12 @@
<view
class=
"select-list"
>
<view
class=
"select-list"
>
<view
class=
"list-item"
v-for=
"(item, index) in netList"
:key=
"index"
<view
class=
"list-item"
v-for=
"(item, index) in netList"
:key=
"index"
>
{{
item
}}
>
{{
item
}}
<uni-icons
class=
"list-icon"
type=
"right"
color=
"#B3B3B3"
size=
"12"
></uni-icons>
<uni-icons
class=
"list-icon"
type=
"right"
color=
"#B3B3B3"
size=
"12"
></uni-icons>
</view>
</view>
</view>
</view>
<view
class=
"select-right"
>
<view
class=
"select-right"
>
...
@@ -18,12 +23,22 @@
...
@@ -18,12 +23,22 @@
@
columnchange=
"bindColumnChange"
@
columnchange=
"bindColumnChange"
>
>
{{
$lang
.
lang
.
integral
.
outlets
}}
{{
$lang
.
lang
.
integral
.
outlets
}}
<uni-icons
class=
"list-icon"
type=
"right"
color=
"#B3B3B3"
size=
"12"
></uni-icons>
<uni-icons
class=
"list-icon"
type=
"right"
color=
"#B3B3B3"
size=
"12"
></uni-icons>
</picker>
</picker>
</view>
</view>
</view>
</view>
<view
class=
"gift-content"
>
<view
class=
"gift-content"
>
<view
class=
"gift-item"
v-for=
"item in giftList"
:key=
"item.id"
@
click=
"toMail(item.id)"
>
<view
class=
"gift-item"
v-for=
"item in giftList"
:key=
"item.id"
@
click=
"toMail(item.id)"
>
<view
class=
"gift-image-box"
>
<view
class=
"gift-image-box"
>
<image
<image
class=
"gift-image"
class=
"gift-image"
...
@@ -32,17 +47,27 @@
...
@@ -32,17 +47,27 @@
></image>
></image>
<view
class=
"gift-tag"
>
<view
class=
"gift-tag"
>
<view
class=
"tags"
>
<view
class=
"tags"
>
<image
class=
"tag-image"
src=
"../../../static/img/score.png"
></image>
<image
class=
"tag-image"
src=
"../../../static/img/score.png"
></image>
<view
class=
"tag-text"
>
{{
item
.
pointsRequire
}}
</view>
<view
class=
"tag-text"
>
{{
item
.
pointsRequire
}}
</view>
</view>
</view>
</view>
</view>
<view
class=
"foot-tag"
>
{{
$lang
.
lang
.
integral
.
remainder
(
item
.
quantityRemain
)
}}
</view>
<view
class=
"foot-tag"
>
{{
$lang
.
lang
.
integral
.
remainder
(
item
.
quantityRemain
)
}}
</view>
</view>
</view>
<view
class=
"gift-name"
>
{{
locale
===
'
zh
'
?
item
.
titleZh
:
item
.
titleEn
}}
</view>
<view
class=
"gift-name"
>
{{
<view
class=
"gift-menu"
>
locale
===
"
zh
"
?
item
.
titleZh
:
item
.
titleEn
<view
class=
"gift-menu-text"
v-for=
"ele in item.pickMethodList"
:key=
"ele.id"
>
{{
locale
===
'
zh
'
?
ele
.
labelZh
:
ele
.
labelEn
}}
</view>
}}
</view>
<view
class=
"gift-menu"
>
<view
class=
"gift-menu-text"
v-for=
"ele in item.pickMethodList"
:key=
"ele.id"
>
{{
locale
===
"
zh
"
?
ele
.
labelZh
:
ele
.
labelEn
}}
</view
>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -54,8 +79,8 @@ export default {
...
@@ -54,8 +79,8 @@ export default {
props
:
{
props
:
{
userInfo
:
{
userInfo
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
{}
default
:
()
=>
{}
,
}
}
,
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -64,119 +89,125 @@ export default {
...
@@ -64,119 +89,125 @@ export default {
pickerData
:
[[],
[],
[]],
pickerData
:
[[],
[],
[]],
pickerValue
:
[
0
,
0
,
0
],
pickerValue
:
[
0
,
0
,
0
],
nodeId
:
null
,
nodeId
:
null
,
netList
:
[]
netList
:
[]
,
}
}
;
},
},
computed
:
{
computed
:
{
locale
()
{
locale
()
{
return
this
.
$lang
.
locale
return
this
.
$lang
.
locale
;
}
}
,
},
},
watch
:
{
watch
:
{
userInfo
:
{
userInfo
:
{
handler
(
val
)
{
handler
(
val
)
{
console
.
log
(
val
)
console
.
log
(
val
)
;
this
.
netList
=
this
.
netList
=
this
.
$lang
.
locale
===
'
zh
'
this
.
$lang
.
locale
===
"
zh
"
?
[
val
.
countryTitleZh
,
val
.
cityTitleZh
]
?
[
val
.
countryTitleZh
,
val
.
cityTitleZh
]
:
[
val
.
countryTitleEn
,
val
.
cityTitleEn
]
:
[
val
.
countryTitleEn
,
val
.
cityTitleEn
];
},
immediate
:
true
,
},
},
immediate
:
true
}
},
},
created
()
{
created
()
{
this
.
getGift
()
this
.
getGift
()
;
this
.
getNet
()
this
.
getNet
()
;
},
},
methods
:
{
methods
:
{
toMail
(
id
)
{
toMail
(
id
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'
/pages/order_mail/order_mail?id=
'
+
id
url
:
"
/pages/order_mail/order_mail?id=
"
+
id
,
})
})
;
},
},
// 获取礼品列表
// 获取礼品列表
async
getGift
()
{
async
getGift
()
{
try
{
try
{
const
memberId
=
this
.
$store
.
getters
.
id
const
memberId
=
this
.
$store
.
getters
.
id
;
const
{
code
,
data
}
=
await
this
.
$request
.
post
(
'
/app-api/ecw/reward/list
'
,
{
const
{
code
,
data
}
=
await
this
.
$request
.
post
(
"
/app-api/ecw/reward/list
"
,
{
memberId
,
memberId
,
nodeId
:
this
.
nodeId
nodeId
:
this
.
nodeId
,
})
}
);
if
(
code
===
0
)
{
if
(
code
===
0
)
{
this
.
giftList
=
data
this
.
giftList
=
data
.
list
;
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
)
;
}
}
},
},
// 获取网点列表
// 获取网点列表
async
getNet
()
{
async
getNet
()
{
try
{
try
{
const
{
code
,
data
}
=
await
this
.
$request
.
get
(
'
/admin-api/ecw/node/get-node-tree-region
'
)
const
{
code
,
data
}
=
await
this
.
$request
.
get
(
"
/admin-api/ecw/node/get-node-tree-region
"
);
if
(
code
===
0
)
{
if
(
code
===
0
)
{
this
.
data
=
data
this
.
data
=
data
;
this
.
initPickerData
()
this
.
initPickerData
()
;
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
)
;
}
}
},
},
// 初始化选择器数据
// 初始化选择器数据
initPickerData
()
{
initPickerData
()
{
if
(
this
.
data
.
length
===
0
)
return
if
(
this
.
data
.
length
===
0
)
return
;
const
countries
=
this
.
data
const
countries
=
this
.
data
;
const
cities
=
this
.
data
[
0
].
children
||
[]
const
cities
=
this
.
data
[
0
].
children
||
[];
const
areas
=
(
this
.
data
[
0
].
children
&&
this
.
data
[
0
].
children
[
0
].
children
)
||
[]
const
areas
=
this
.
pickerData
[
0
]
=
countries
(
this
.
data
[
0
].
children
&&
this
.
data
[
0
].
children
[
0
].
children
)
||
[];
this
.
pickerData
[
1
]
=
cities
this
.
pickerData
[
0
]
=
countries
;
this
.
pickerData
[
2
]
=
areas
this
.
pickerData
[
1
]
=
cities
;
this
.
pickerData
[
2
]
=
areas
;
},
},
// 选择改变
// 选择改变
bindPickerChange
(
e
)
{
bindPickerChange
(
e
)
{
const
val
=
e
.
detail
.
value
const
val
=
e
.
detail
.
value
;
this
.
pickerValue
=
val
this
.
pickerValue
=
val
;
this
.
nodeId
=
this
.
pickerData
[
2
][
val
[
2
]].
id
this
.
nodeId
=
this
.
pickerData
[
2
][
val
[
2
]].
id
;
this
.
getGift
()
this
.
getGift
()
;
this
.
getPickerValue
(
val
)
this
.
getPickerValue
(
val
)
;
},
},
// 列改变
// 列改变
bindColumnChange
(
e
)
{
bindColumnChange
(
e
)
{
const
{
column
,
value
}
=
e
.
detail
const
{
column
,
value
}
=
e
.
detail
;
const
data
=
{
const
data
=
{
pickerData
:
this
.
pickerData
,
pickerData
:
this
.
pickerData
,
pickerValue
:
this
.
pickerValue
pickerValue
:
this
.
pickerValue
,
}
}
;
data
.
pickerValue
[
column
]
=
value
data
.
pickerValue
[
column
]
=
value
;
if
(
column
===
0
)
{
if
(
column
===
0
)
{
const
selectedCountry
=
this
.
data
[
value
]
const
selectedCountry
=
this
.
data
[
value
]
;
const
cities
=
selectedCountry
.
children
||
[]
const
cities
=
selectedCountry
.
children
||
[]
;
const
areas
=
(
cities
[
0
]
&&
cities
[
0
].
children
)
||
[]
const
areas
=
(
cities
[
0
]
&&
cities
[
0
].
children
)
||
[]
;
data
.
pickerData
[
1
]
=
cities
data
.
pickerData
[
1
]
=
cities
;
data
.
pickerData
[
2
]
=
areas
data
.
pickerData
[
2
]
=
areas
;
data
.
pickerValue
[
1
]
=
0
data
.
pickerValue
[
1
]
=
0
;
data
.
pickerValue
[
2
]
=
0
data
.
pickerValue
[
2
]
=
0
;
}
else
if
(
column
===
1
)
{
}
else
if
(
column
===
1
)
{
const
selectedCountry
=
this
.
data
[
data
.
pickerValue
[
0
]]
const
selectedCountry
=
this
.
data
[
data
.
pickerValue
[
0
]]
;
const
selectedCity
=
selectedCountry
.
children
[
value
]
const
selectedCity
=
selectedCountry
.
children
[
value
]
;
const
areas
=
selectedCity
.
children
||
[]
const
areas
=
selectedCity
.
children
||
[]
;
data
.
pickerData
[
2
]
=
areas
data
.
pickerData
[
2
]
=
areas
;
data
.
pickerValue
[
2
]
=
0
data
.
pickerValue
[
2
]
=
0
;
}
}
this
.
pickerData
=
data
.
pickerData
this
.
pickerData
=
data
.
pickerData
;
this
.
pickerValue
=
data
.
pickerValue
this
.
pickerValue
=
data
.
pickerValue
;
},
},
// 选择数据显示
// 选择数据显示
getPickerValue
(
val
)
{
getPickerValue
(
val
)
{
const
countries
=
this
.
pickerData
[
0
][
val
[
0
]]
const
countries
=
this
.
pickerData
[
0
][
val
[
0
]]
;
const
cities
=
this
.
pickerData
[
1
][
val
[
1
]]
const
cities
=
this
.
pickerData
[
1
][
val
[
1
]]
;
const
areas
=
this
.
pickerData
[
2
][
val
[
2
]]
const
areas
=
this
.
pickerData
[
2
][
val
[
2
]]
;
this
.
netList
=
this
.
netList
=
this
.
locale
===
'
zh
'
this
.
locale
===
"
zh
"
?
[
countries
.
labelZh
,
cities
.
labelZh
,
areas
.
labelZh
]
?
[
countries
.
labelZh
,
cities
.
labelZh
,
areas
.
labelZh
]
:
[
countries
.
labelEn
,
cities
.
labelEn
,
areas
.
labelEn
]
:
[
countries
.
labelEn
,
cities
.
labelEn
,
areas
.
labelEn
]
;
}
}
,
}
}
,
}
}
;
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment