Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
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 1f4d9e20
authored
Jul 17, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' into 'master'
Saas+v4.24.0 0713上线后,代码合并。 See merge request
!33
2 parents
52aa83e9
1397b57a
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
54 additions
and
140 deletions
package-lock.json
package.json
packageMine/pages/customerManagement/editCustomer/editCustomer.js
packageMine/pages/serviceManage/editService/editService.js
pages/tab/index/index.scss
pages/tab/output/components/BusiCard/BusiCard.js
pages/tab/output/components/BusiCard/BusiCard.wxml
pages/tab/output/components/client/client.js
pages/tab/output/components/client/client.wxml
utils/mapapi/mapapi.js
package-lock.json
View file @
1f4d9e2
...
@@ -10,9 +10,14 @@
...
@@ -10,9 +10,14 @@
"integrity"
:
"sha512-R2FyCk0mK2xvUX2dMgVZjVG512RKBj7ELMDxjRJjhQWtw4495WBgbl5Yb4v2A6d4vWJe6z9toKgDJTciN0Bo9A=="
"integrity"
:
"sha512-R2FyCk0mK2xvUX2dMgVZjVG512RKBj7ELMDxjRJjhQWtw4495WBgbl5Yb4v2A6d4vWJe6z9toKgDJTciN0Bo9A=="
},
},
"glsx-applet-component"
:
{
"glsx-applet-component"
:
{
"version"
:
"1.1.16"
,
"version"
:
"1.1.18"
,
"resolved"
:
"https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.1.16.tgz"
,
"resolved"
:
"https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.1.18.tgz"
,
"integrity"
:
"sha512-XlBqP5ja4TqGB0nTW4dW6fdSQ9m/hAspbBKTJZ9CNUGVCKorkyjv/RfY85ta4OU5PiQCKTFZBbTELtz5MoxaVQ=="
"integrity"
:
"sha512-oNJMLkKh/BOFyiGUDlm5r+5dvqBlZx7T9U+UQ2BkqL8R9i713sCHs+1AOsFMA1GOjsgRM2ShgzoXaQef6RQ/ew=="
},
"glsx-map-sdk"
:
{
"version"
:
"0.1.5"
,
"resolved"
:
"https://registry.npmjs.org/glsx-map-sdk/-/glsx-map-sdk-0.1.5.tgz"
,
"integrity"
:
"sha512-hvAEOZnc4b1bVDlG0PPWRJCNZbAry6FMu/eGdP2LiRyujuNJHL4cHmqwdtqgwXmeTkglomtIJdGoJtU8jwHPNQ=="
}
}
}
}
}
}
package.json
View file @
1f4d9e2
...
@@ -5,7 +5,8 @@
...
@@ -5,7 +5,8 @@
"main"
:
"app.js"
,
"main"
:
"app.js"
,
"dependencies"
:
{
"dependencies"
:
{
"@vant/weapp"
:
"^1.10.7"
,
"@vant/weapp"
:
"^1.10.7"
,
"glsx-applet-component"
:
"^1.1.16"
"glsx-applet-component"
:
"^1.1.18"
,
"glsx-map-sdk"
:
"^0.1.5"
},
},
"devDependencies"
:
{},
"devDependencies"
:
{},
"scripts"
:
{
"scripts"
:
{
...
...
packageMine/pages/customerManagement/editCustomer/editCustomer.js
View file @
1f4d9e2
...
@@ -43,9 +43,10 @@ Page({
...
@@ -43,9 +43,10 @@ Page({
// let address = formData.provinceName || '' + formData.cityName || '' + formData.merchantAddress || ''
// let address = formData.provinceName || '' + formData.cityName || '' + formData.merchantAddress || ''
let
address
=
(
formData
.
provinceName
||
''
)
+
(
formData
.
cityName
||
''
)
let
address
=
(
formData
.
provinceName
||
''
)
+
(
formData
.
cityName
||
''
)
mapApi
.
geocoder
(
address
).
then
(
res
=>
{
mapApi
.
geocoder
(
address
).
then
(
res
=>
{
let
location
=
res
?.
geocodes
[
0
]?.
location
.
split
(
','
)
this
.
setData
({
this
.
setData
({
[
'formData.longitude'
]:
res
?.
location
?.
lng
,
[
'formData.longitude'
]:
location
[
0
]
,
[
'formData.latitude'
]:
res
?.
location
?.
lat
,
[
'formData.latitude'
]:
location
[
1
]
,
})
})
})
})
},
},
...
@@ -103,11 +104,12 @@ Page({
...
@@ -103,11 +104,12 @@ Page({
if
(
obj
.
longitude
&&
obj
.
latitude
)
{
if
(
obj
.
longitude
&&
obj
.
latitude
)
{
resolve
(
obj
)
resolve
(
obj
)
}
}
mapApi
.
getLocationByIp
().
then
(
res
=>
{
wx
.
getLocation
({
let
{
location
}
=
res
type
:
'gcj02'
}).
then
(({
latitude
,
longitude
})
=>
{
resolve
({
resolve
({
longitude
:
lo
cation
.
lng
,
longitude
:
lo
ngitude
,
latitude
:
l
ocation
.
lat
latitude
:
l
atitude
})
})
})
})
})
})
...
...
packageMine/pages/serviceManage/editService/editService.js
View file @
1f4d9e2
...
@@ -30,9 +30,10 @@ Page({
...
@@ -30,9 +30,10 @@ Page({
// let address = formData.provinceName || '' + formData.cityName || '' + formData.merchantAddress || ''
// let address = formData.provinceName || '' + formData.cityName || '' + formData.merchantAddress || ''
let
address
=
(
formData
.
provinceName
||
''
)
+
(
formData
.
cityName
||
''
)
let
address
=
(
formData
.
provinceName
||
''
)
+
(
formData
.
cityName
||
''
)
mapApi
.
geocoder
(
address
).
then
(
res
=>
{
mapApi
.
geocoder
(
address
).
then
(
res
=>
{
let
location
=
res
?.
geocodes
[
0
]?.
location
.
split
(
','
)
this
.
setData
({
this
.
setData
({
[
'formData.longitude'
]:
res
?.
location
?.
lng
,
[
'formData.longitude'
]:
location
[
0
]
,
[
'formData.latitude'
]:
res
?.
location
?.
lat
,
[
'formData.latitude'
]:
location
[
1
]
,
})
})
})
})
},
},
...
@@ -105,11 +106,12 @@ Page({
...
@@ -105,11 +106,12 @@ Page({
if
(
obj
.
longitude
&&
obj
.
latitude
)
{
if
(
obj
.
longitude
&&
obj
.
latitude
)
{
resolve
(
obj
)
resolve
(
obj
)
}
}
mapApi
.
getLocationByIp
().
then
(
res
=>
{
wx
.
getLocation
({
let
{
location
}
=
res
type
:
'gcj02'
}).
then
(({
latitude
,
longitude
})
=>
{
resolve
({
resolve
({
longitude
:
lo
cation
.
lng
,
longitude
:
lo
ngitude
,
latitude
:
l
ocation
.
lat
latitude
:
l
atitude
})
})
})
})
})
})
...
@@ -186,7 +188,7 @@ Page({
...
@@ -186,7 +188,7 @@ Page({
wx
.
$api
.
showToast
(
validObj
.
message
)
wx
.
$api
.
showToast
(
validObj
.
message
)
return
return
}
}
if
(
!
selectedBrandList
.
length
)
{
if
(
!
selectedBrandList
.
length
)
{
wx
.
$api
.
showToast
(
'至少选择一个主营品牌'
)
wx
.
$api
.
showToast
(
'至少选择一个主营品牌'
)
return
return
}
}
...
...
pages/tab/index/index.scss
View file @
1f4d9e2
page
{
page
{
height
:
100vh
;
height
:
100vh
;
width
:
100vw
;
width
:
100vw
;
background-color
:
#F
2F3F7
!
important
;
background-color
:
#F
FFFFF
!
important
;
}
}
::-webkit-scrollbar
{
::-webkit-scrollbar
{
...
@@ -11,12 +11,15 @@ page {
...
@@ -11,12 +11,15 @@ page {
}
}
.sub-menu-active-custom
{
.sub-menu-active-custom
{
background
:
#
F0F4FF
!
important
;
background
:
#
3666FE
!
important
;
color
:
#3666FE
!
important
;
/* color: #3666FE !important; */
}
}
.
sidebar-active-custom
:
:
after
{
.
sidebar-active-custom
:
:
after
{
background
:
#3666FE
!
important
;
background
:
#3666FE
!
important
;
}
}
.sidebar-active-custom
{
color
:
#3666FE
!
important
;
}
.reclaim
{
.reclaim
{
background
:
#fff
;
background
:
#fff
;
...
...
pages/tab/output/components/BusiCard/BusiCard.js
View file @
1f4d9e2
...
@@ -55,6 +55,9 @@ Component({
...
@@ -55,6 +55,9 @@ Component({
* 组件的方法列表
* 组件的方法列表
*/
*/
methods
:
{
methods
:
{
handleItemTap
(
e
)
{
const
{
item
}
=
e
.
currentTarget
.
dataset
this
.
triggerEvent
(
'handleItemTap'
,
item
)
}
}
}
})
})
pages/tab/output/components/BusiCard/BusiCard.wxml
View file @
1f4d9e2
...
@@ -13,9 +13,9 @@
...
@@ -13,9 +13,9 @@
<view class="title">{{info.merchantName || info.merchantName4s || ''}}</view>
<view class="title">{{info.merchantName || info.merchantName4s || ''}}</view>
</view>
</view>
<view class="content">
<view class="content">
<view wx:for="{{formObj[sceneCode]}}" wx:key="index" class="content-item {{sceneCode == -1 ? 'row-two' : ''}}">
<view wx:for="{{formObj[sceneCode]}}" wx:key="index" class="content-item {{sceneCode == -1 ? 'row-two' : ''}}"
bindtap="handleItemTap" data-item="{{item}}"
>
<view wx:if="{{info[item.name] == '未开通'}}" class="price">{{info[item.name]}}</view>
<view wx:if="{{info[item.name] == '未开通'}}" class="price">{{info[item.name]}}</view>
<view wx:else
=""
class="price">
<view wx:else class="price">
{{item.prefix || ''}}
{{item.prefix || ''}}
{{item.isNum ? filter.money_three_for_two_thousands(info[item.name] || 0.00) : (info[item.name] || 0)}}
{{item.isNum ? filter.money_three_for_two_thousands(info[item.name] || 0.00) : (info[item.name] || 0)}}
{{item.suffix || ''}}
{{item.suffix || ''}}
...
...
pages/tab/output/components/client/client.js
View file @
1f4d9e2
...
@@ -296,6 +296,18 @@ Component({
...
@@ -296,6 +296,18 @@ Component({
})
})
},
},
// 业务经营汇总-全部-点击跳转h5
handleBusiCardTap
(
e
)
{
const
{
detail
}
=
e
if
(
detail
.
label
!=
'精品升级'
)
{
return
true
}
const
{
idx
}
=
e
.
currentTarget
.
dataset
let
obj
=
this
.
data
.
busiTotalList
[
idx
]
let
url
=
'https://dj.glsx.com.cn/dj-car-revenue-analysis/#/?merchantId='
+
obj
?.
merchantId4s
+
'&merchantName='
+
obj
?.
merchantName4s
wx
.
$router
.
jumpH5
(
url
)
},
// 门店经营汇总-start
// 门店经营汇总-start
getPMerchantInfo
()
{
getPMerchantInfo
()
{
let
{
userInfo
}
=
wx
.
$storage
.
get
()
let
{
userInfo
}
=
wx
.
$storage
.
get
()
...
...
pages/tab/output/components/client/client.wxml
View file @
1f4d9e2
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
<!-- 0:全部;1:精品升级;3:会员权益/升级 -->
<!-- 0:全部;1:精品升级;3:会员权益/升级 -->
<view wx:else>
<view wx:else>
<view wx:for="{{busiTotalList}}" wx:key="index">
<view wx:for="{{busiTotalList}}" wx:key="index">
<busi-card info="{{item}}" sceneCode="{{formData.sceneCode}}"></busi-card>
<busi-card info="{{item}}" sceneCode="{{formData.sceneCode}}"
bindhandleItemTap="handleBusiCardTap" data-idx="{{index}}"
></busi-card>
</view>
</view>
<view class="end-txt">
<view class="end-txt">
{{busiTotalList.length ? '到底啦!' : '暂无数据'}}
{{busiTotalList.length ? '到底啦!' : '暂无数据'}}
...
...
utils/mapapi/mapapi.js
View file @
1f4d9e2
import
md5
from
'../lib/md5'
import
GlMap
from
'glsx-map-sdk'
import
qs
from
'../lib/qs'
export
default
new
GlMap
()
const
key
=
'F2HBZ-KH73F-7A2J2-JC4UR-WOHCO-UVFGZ'
const
secret
=
'YBmrM98E5pM4gYeknWiBPaWpFR4AISUl'
const
domain
=
'https://apis.map.qq.com'
class
QQMap
{
setLocaleCompare
(
params
)
{
params
.
key
=
key
let
keys
=
[]
let
obj
=
{}
Object
.
keys
(
params
).
map
(
e
=>
keys
.
push
(
e
))
keys
.
sort
((
a
,
b
)
=>
a
.
localeCompare
(
b
)).
map
(
e
=>
(
obj
[
e
]
=
params
[
e
]))
return
obj
}
getSign
(
params
,
methods
)
{
let
obj
=
this
.
setLocaleCompare
(
params
)
let
sign
=
`
${
methods
}
?
${
decodeURIComponent
(
qs
.
stringify
(
obj
))}${
secret
}
`
return
md5
(
sign
)
}
get
(
method
,
data
)
{
return
this
.
request
(
'GET'
,
method
,
data
)
}
request
(
RequestMethods
,
method
,
data
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
wx
.
showNavigationBarLoading
()
if
(
!
data
)
data
=
{}
let
header
=
RequestMethods
===
'POST'
?
{
'content-type'
:
'application/json'
}
:
{}
const
sig
=
this
.
getSign
(
data
,
method
)
let
params
=
{
...
this
.
setLocaleCompare
(
data
),
sig
}
wx
.
request
({
url
:
`
${
domain
}${
method
}
`
,
data
:
params
,
method
:
RequestMethods
,
header
,
dataType
:
'json'
,
responseType
:
'text'
,
success
({
statusCode
,
data
})
{
if
(
statusCode
==
'200'
)
{
if
(
data
.
status
==
'0'
)
{
resolve
(
data
.
result
||
data
)
}
}
else
{
reject
(
data
.
result
||
data
)
}
},
fail
(
error
)
{
wx
.
hideLoading
()
console
.
error
(
`接口异常:`
,
error
)
wx
.
showToast
({
title
:
'系统异常'
,
icon
:
'error'
})
reject
(
error
)
},
complete
()
{
wx
.
stopPullDownRefresh
()
wx
.
hideNavigationBarLoading
()
}
})
})
}
/**计算距离 */
calculateDistance
(
from
,
to
)
{
from
=
from
.
join
(
','
)
to
=
to
.
join
(
','
)
return
this
.
get
(
'/ws/distance/v1/'
,
{
from
,
to
,
mode
:
'driving'
})
}
/** 批量距离计算(矩阵) */
calculateDistanceMatrix
(
from
,
toList
)
{
from
=
from
.
join
(
','
)
let
to
=
toList
.
join
(
';'
)
return
this
.
get
(
'/ws/distance/v1/matrix/'
,
{
from
,
to
,
mode
:
'driving'
})
}
/**地址解析(地址转坐标) */
geocoder
(
address
)
{
return
this
.
get
(
'/ws/geocoder/v1/'
,
{
address
})
}
/**逆地址解析(坐标位置描述) location=lat<纬度>,lng<经度> */
detailedAdrress
(
location
)
{
location
=
location
.
join
(
','
)
return
this
.
get
(
'/ws/geocoder/v1/'
,
{
location
})
}
/**IP定位 */
getLocationByIp
()
{
return
this
.
get
(
'/ws/location/v1/ip'
)
}
/**坐标转换 */
translate
(
locations
,
type
=
5
)
{
locations
=
locations
.
join
(
';'
)
//格式:纬度前,经度后
return
this
.
get
(
'/ws/coord/v1/translate'
,
{
locations
,
type
})
}
}
export
default
new
QQMap
()
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