Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobaominiDemo
Project
Project
Details
Activity
Releases
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
wildfirecode13
taobaominiDemo
Commits
5bc36eea
Commit
5bc36eea
authored
Jun 26, 2020
by
lujinlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-a
parent
bad9828c
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1055 additions
and
272 deletions
+1055
-272
app.js
client/app.js
+1
-0
index.js
client/pages/index/index.js
+5
-5
output.js
client/pages/index/output.js
+1040
-265
utils.js
client/utils/utils.js
+9
-2
No files found.
client/app.js
View file @
5bc36eea
...
...
@@ -7,6 +7,7 @@ App({
cloud
,
cloudName
:
"filaStar"
,
//待修改
cloudName2
:
"filaStar"
,
cloudName3
:
"filaStar2"
,
onLaunch
(
options
)
{
// 第一次打开
// options.query == {number:1}///"enableSkia": "true"
...
...
client/pages/index/index.js
View file @
5bc36eea
...
...
@@ -108,6 +108,7 @@ Page({
})
if
(
userAddress
)
{
//格式需要修改具体
const
{
name
,
phone
,
provinceName
,
receiveName
,
cityName
,
countyName
,
streetName
,
detailInfo
,
cityCode
,
address
}
=
userAddress
.
duibaAddress
my
.
confirm
({
title
:
'提示'
,
content
:
'确认使用该收货地址:'
+
name
+
phone
+
address
,
...
...
@@ -117,12 +118,11 @@ Page({
const
{
confirm
}
=
result
if
(
confirm
)
{
//发接口提交地址
const
{
cloud
,
activityId
,
cloudName
}
=
app
cloud
.
function
.
invoke
(
cloudName
,
{
const
{
cloud
,
activityId
,
cloudName
3
}
=
app
cloud
.
function
.
invoke
(
cloudName
3
,
{
activityId
,
_id
:
prizeId
,
provinceName
,
name
,
phone
,
receiveName
,
cityName
,
...
...
@@ -131,7 +131,7 @@ Page({
detailInfo
,
cityCode
,
// address: JSON.stringify(userAddress.duibaAddress)
},
"
filaStar2.
receiveObjectPrize"
)
},
"receiveObjectPrize"
)
.
then
(
res
=>
{
if
(
res
&&
res
.
success
)
{
//确认发送成功信息
...
...
@@ -141,7 +141,7 @@ Page({
this
.
postMessage
(
'mine.getUserAddress'
,
{
success
:
false
})
}
})
.
catch
(()
=>
{
.
catch
(()
=>
{
//新增失败0514
this
.
postMessage
(
'mine.getUserAddress'
,
{
success
:
false
})
})
...
...
client/pages/index/output.js
View file @
5bc36eea
This diff is collapsed.
Click to expand it.
client/utils/utils.js
View file @
5bc36eea
...
...
@@ -200,7 +200,7 @@ export const getUserAddress = (opts = {}) => {
searchAddress
,
locateAddress
},
res
=>
{
const
{
error
,
provinceName
,
countyName
,
cityName
,
streetName
,
detailInfo
,
name
,
telNumber
}
=
res
;
const
{
error
,
provinceName
,
countyName
,
cityName
,
streetName
,
detailInfo
,
name
,
telNumber
,
receiveName
,
cityCode
}
=
res
;
// 如果有error为用户取消操作不做操作
if
(
error
)
{
resolve
(
false
);
...
...
@@ -210,7 +210,14 @@ export const getUserAddress = (opts = {}) => {
duibaAddress
:
{
name
,
phone
:
telNumber
,
address
:
[
provinceName
,
cityName
,
countyName
,
streetName
,
detailInfo
].
join
(
joinTag
)
provinceName
,
receiveName
:
name
,
cityName
,
countyName
,
streetName
,
detailInfo
,
cityCode
,
address
:
[
provinceName
,
cityName
,
countyName
,
streetName
,
detailInfo
,
receiveName
,
cityCode
].
join
(
joinTag
)
}
});
}
...
...
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