Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
hmd
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 89999e80
authored
Aug 31, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
3.16.0
1 parent
9f7c565d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
25 deletions
api/env/index.js
packageMine/pages/address/detail/detail.js
pages/tab/equity/index.js
pages/tab/index/components/goods/goods.wxss
api/env/index.js
View file @
89999e8
import
{
preReleaseAppId
}
from
'~/config'
import
{
preReleaseAppId
}
from
'~/config'
const
target
=
[
'ip'
,
'dev'
,
'uat'
,
'prod'
,
'preRelease'
]
const
target
=
[
'ip'
,
'dev'
,
'uat'
,
'prod'
,
'preRelease'
]
let
index
=
2
let
index
=
3
/**
/**
*
*
...
...
packageMine/pages/address/detail/detail.js
View file @
89999e8
...
@@ -12,7 +12,7 @@ Page({
...
@@ -12,7 +12,7 @@ Page({
region
:
[],
region
:
[],
address
:
''
,
address
:
''
,
isDefault
:
0
,
isDefault
:
0
,
platformObj
:{}
platformObj
:
{}
}
}
},
},
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
...
@@ -41,7 +41,11 @@ Page({
...
@@ -41,7 +41,11 @@ Page({
},
},
useLocation
()
{
useLocation
()
{
let
{
let
{
currentAddress
:
{
formatted_addresses
,
address_component
,
ad_info
}
currentAddress
:
{
formatted_addresses
,
address_component
,
ad_info
}
}
=
this
.
data
}
=
this
.
data
this
.
setData
({
this
.
setData
({
'userObj.address'
:
formatted_addresses
.
recommend
,
'userObj.address'
:
formatted_addresses
.
recommend
,
...
@@ -51,15 +55,20 @@ Page({
...
@@ -51,15 +55,20 @@ Page({
},
},
/**获取当前位置 */
/**获取当前位置 */
getLocation
()
{
getLocation
()
{
let
{
currentAddress
}
=
this
.
data
let
{
currentAddress
}
=
this
.
data
if
(
currentAddress
)
return
if
(
currentAddress
)
return
this
.
setData
({
this
.
setData
({
unauthorized
:
false
unauthorized
:
false
})
})
wx
.
getLocation
({
wx
.
getLocation
({
type
:
'gcj02'
type
:
'gcj02'
})
}).
then
(({
.
then
(({
latitude
,
longitude
})
=>
{
latitude
,
longitude
})
=>
{
console
.
log
(
this
)
this
.
setData
({
this
.
setData
({
current
:
true
current
:
true
})
})
...
@@ -90,20 +99,29 @@ Page({
...
@@ -90,20 +99,29 @@ Page({
this
.
getLocation
()
this
.
getLocation
()
},
},
input
(
e
)
{
input
(
e
)
{
let
{
target
}
=
e
.
currentTarget
.
dataset
let
{
let
{
value
}
=
e
.
detail
target
}
=
e
.
currentTarget
.
dataset
let
{
value
}
=
e
.
detail
this
.
setData
({
this
.
setData
({
[
`userObj.
${
target
}
`
]:
value
[
`userObj.
${
target
}
`
]:
value
})
})
},
},
blur
(
e
)
{
blur
(
e
)
{
let
{
value
}
=
e
.
detail
let
{
value
}
=
e
.
detail
this
.
setData
({
this
.
setData
({
'userObj.address'
:
value
'userObj.address'
:
value
})
})
},
},
save
()
{
save
()
{
let
{
userObj
,
isChooseAddress
}
=
this
.
data
let
{
userObj
,
isChooseAddress
}
=
this
.
data
try
{
try
{
Object
.
keys
(
userObj
).
map
(
key
=>
{
Object
.
keys
(
userObj
).
map
(
key
=>
{
if
(
key
==
'receiveName'
&&
!
userObj
[
key
])
throw
'请输入姓名'
if
(
key
==
'receiveName'
&&
!
userObj
[
key
])
throw
'请输入姓名'
...
@@ -155,8 +173,13 @@ Page({
...
@@ -155,8 +173,13 @@ Page({
},
},
/**选择地区 */
/**选择地区 */
chooseArea
(
e
)
{
chooseArea
(
e
)
{
let
{
value
,
code
}
=
e
.
detail
let
{
let
{
userObj
}
=
this
.
data
value
,
code
}
=
e
.
detail
let
{
userObj
}
=
this
.
data
userObj
.
region
=
[
value
[
0
],
value
[
1
],
value
[
2
]]
userObj
.
region
=
[
value
[
0
],
value
[
1
],
value
[
2
]]
userObj
.
provinceId
=
code
[
0
]
userObj
.
provinceId
=
code
[
0
]
userObj
.
cityId
=
code
[
1
]
userObj
.
cityId
=
code
[
1
]
...
@@ -170,43 +193,43 @@ Page({
...
@@ -170,43 +193,43 @@ Page({
'userObj.isDefault'
:
this
.
data
.
userObj
.
isDefault
==
0
?
1
:
0
'userObj.isDefault'
:
this
.
data
.
userObj
.
isDefault
==
0
?
1
:
0
})
})
},
},
showSelect
(){
showSelect
()
{
this
.
setData
({
this
.
setData
({
showAreaSelect
:
true
showAreaSelect
:
true
})
})
},
},
cancelProvince
(){
cancelProvince
()
{
this
.
setData
({
this
.
setData
({
showAreaSelect
:
false
showAreaSelect
:
false
})
})
},
},
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
onReady
:
function
()
{
},
onReady
:
function
()
{},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{
},
onShow
:
function
()
{},
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
onHide
:
function
()
{
},
onHide
:
function
()
{},
/**
/**
* 生命周期函数--监听页面卸载
* 生命周期函数--监听页面卸载
*/
*/
onUnload
:
function
()
{
},
onUnload
:
function
()
{},
/**
/**
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh
:
function
()
{
},
onPullDownRefresh
:
function
()
{},
/**
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom
:
function
()
{
}
onReachBottom
:
function
()
{}
})
})
\ No newline at end of file
\ No newline at end of file
pages/tab/equity/index.js
View file @
89999e8
...
@@ -104,6 +104,7 @@ Page({
...
@@ -104,6 +104,7 @@ Page({
app
.
globalData
.
goodsPageParam
.
pageSize
=
0
app
.
globalData
.
goodsPageParam
.
pageSize
=
0
app
.
globalData
.
goodsLoaded
=
false
app
.
globalData
.
goodsLoaded
=
false
let
{
currentAddress
}
=
this
.
data
let
{
currentAddress
}
=
this
.
data
if
(
!
currentAddress
)
return
const
{
lat
,
lng
}
=
currentAddress
.
location
const
{
lat
,
lng
}
=
currentAddress
.
location
this
.
toGetCommodity
(
lat
,
lng
,
false
,
1
)
this
.
toGetCommodity
(
lat
,
lng
,
false
,
1
)
},
},
...
@@ -117,6 +118,7 @@ Page({
...
@@ -117,6 +118,7 @@ Page({
let
{
let
{
currentAddress
currentAddress
}
=
this
.
data
}
=
this
.
data
if
(
!
currentAddress
)
return
const
{
const
{
lat
,
lat
,
lng
lng
...
...
pages/tab/index/components/goods/goods.wxss
View file @
89999e8
/* components/Goods/Goods.wxss */
/* components/Goods/Goods.wxss */
.text-hide{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.Goods{
.Goods{
display: flex;
display: flex;
flex-direction: row;
flex-direction: row;
...
@@ -73,7 +78,10 @@
...
@@ -73,7 +78,10 @@
margin-top: 12rpx;
margin-top: 12rpx;
vertical-align: middle;
vertical-align: middle;
}
}
.item-box-time .text{
display: flex;
align-items: center;
}
.item-box-price{
.item-box-price{
margin-top: 12rpx;
margin-top: 12rpx;
display: flex;
display: flex;
...
...
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