Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
高淑倩
7-Eleven
Commits
4c9df078
Commit
4c9df078
authored
Aug 22, 2019
by
赵雅纹
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-zyw-sc' into 'dev_7.1.0'
Feature zyw sc See merge request
!81
parents
2331e964
950a961f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
6 deletions
+19
-6
sharePoster.js
src/component/sharePoster/sharePoster.js
+1
-0
addAddress.js
src/pages/addAddress/addAddress.js
+4
-0
myAddress.js
src/pages/myAddress/myAddress.js
+13
-5
myAddress.wxml
src/pages/myAddress/myAddress.wxml
+1
-1
No files found.
src/component/sharePoster/sharePoster.js
View file @
4c9df078
...
...
@@ -40,6 +40,7 @@ Component({
* 组件的方法列表
*/
methods
:
{
//下载产品图片
getAvaterInfo
:
function
()
{
wx
.
showLoading
({
...
...
src/pages/addAddress/addAddress.js
View file @
4c9df078
...
...
@@ -64,6 +64,7 @@ wxService.page({
wxService
.
getC1
().
then
((
c1
)
=>
{
return
wxService
.
Promise
.
all
([
wxService
.
Promise
.
resolve
(
c1
),
wxService
.
getC2ByC1
(
'北京'
),
wxService
.
getC3ByC2
(
'北京北京市'
)])
}).
then
(
res
=>
{
console
.
log
(
res
)
const
citys
=
res
.
map
(
item
=>
{
return
[...
item
]
})
...
...
@@ -93,6 +94,7 @@ wxService.page({
wxService
.
getC1
().
then
((
c1
)
=>
{
return
wxService
.
Promise
.
all
([
wxService
.
Promise
.
resolve
(
c1
),
wxService
.
getC2ByC1
(
'北京'
),
wxService
.
getC3ByC2
(
'北京北京市'
)])
}).
then
(
res
=>
{
const
citys
=
res
.
map
(
item
=>
{
return
[...
item
]
})
...
...
@@ -108,6 +110,7 @@ wxService.page({
bindMultiPickerChange
(
e
)
{
const
citys
=
this
.
data
.
citys
const
multiIndex
=
e
.
detail
.
value
console
.
log
(
citys
)
if
(
citys
)
{
const
cityView
=
[
citys
[
0
][
multiIndex
[
0
]],
citys
[
1
][
multiIndex
[
1
]],
citys
[
2
][
multiIndex
[
2
]]].
join
(
' '
)
this
.
setData
({
...
...
@@ -118,6 +121,7 @@ wxService.page({
},
bindMultiPickerColumnChange
(
e
)
{
console
.
log
(
e
)
const
detail
=
e
.
detail
const
index
=
detail
.
value
let
cityName
=
''
...
...
src/pages/myAddress/myAddress.js
View file @
4c9df078
...
...
@@ -3,6 +3,7 @@ const app = getApp()
const
wxService
=
require
(
'../../utils/wxService'
)
const
utils
=
require
(
'../../utils/util'
)
const
envInfo
=
require
(
'../../config/index'
).
envInfo
const
{
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
wxService
.
page
({
...
...
@@ -33,9 +34,10 @@ wxService.page({
},
// 获取地址列表
getAddressList
(){
const
{
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
wxService
.
post
(
`/member/addressManage/getall?userId=
${
memberId
}
`
).
then
(
res
=>
{
getAddressList
(){
wxService
.
post
(
`/member/addressManage/getall`
,{
userId
:
memberId
}).
then
(
res
=>
{
if
(
!
res
)
return
false
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
...
...
@@ -67,8 +69,12 @@ wxService.page({
//设置默认地址
settingDefalutAddress
(
e
){
console
.
log
(
e
)
let
params
=
{
userId
:
memberId
,
id
:
e
.
currentTarget
.
dataset
.
id
}
if
(
!
e
.
currentTarget
.
dataset
.
type
){
wxService
.
post
(
`/member/addressManage/
getall?userId=
${
memberId
}
`
).
then
(
res
=>
{
wxService
.
post
(
`/member/addressManage/
setTolerant`
,
params
).
then
(
res
=>
{
if
(
!
res
)
return
false
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
...
...
@@ -142,7 +148,9 @@ wxService.page({
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
console
.
log
(
'用户点击确定'
)
wxService
.
post
(
`/member/addressManage/delete?id=
${
id
}
`
).
then
(
res
=>
{
wxService
.
post
(
`/member/addressManage/delete`
,{
id
:
id
}).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
showToast
({
...
...
src/pages/myAddress/myAddress.wxml
View file @
4c9df078
...
...
@@ -12,7 +12,7 @@
{{item.name}} {{item.phone}}
</view>
<view class="address-detail">{{item.fullArea}} {{item.address}}</view>
<view class="default-address" bindtap="settingDefalutAddress" data-type="{{item.type}}">
<view class="default-address" bindtap="settingDefalutAddress" data-type="{{item.type}}"
data-id="{{item.id}}"
>
<view class="{{item.type == 1 ? 'theme-color' : ''}} circle-radio" >
<image wx:if="{{item.type == 1}}" class="tick-success" src="/assets/imgs/7_1_0/tick-success.png" mode="widthFix"></image>
</view>
...
...
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