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 12f9acd3
authored
Nov 09, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
样式修改
1 parent
9c39825b
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
284 additions
and
173 deletions
login/loading/loading.js
packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.scss
pages/tab/output/components/SceneBox/SceneBox.wxml
pages/tab/output/components/merchant/merchant.wxss
pages/tab/output/components/merchant/mrechant.js
pages/tab/output/components/merchant/mrechant.scss
pages/tab/output/components/merchant/mrechant.wxml
pages/tab/output/index.wxs
pages/tab/output/output.js
pages/tab/output/output.scss
utils/format.js
utils/request/environment.js
login/loading/loading.js
View file @
12f9acd
import
{
import
{
checkLoginUserInfo
,
setRouteData
,
setLoginInfo
,
loginModal
}
from
'../lib/index'
checkLoginUserInfo
,
import
{
getSessionId
}
from
'~/utils/cache/storageApi'
setRouteData
,
setLoginInfo
,
loginModal
}
from
'../lib/index'
import
{
getSessionId
,
}
from
'~/utils/cache/storageApi'
import
USERAPI
from
'~/api/usersApi/index'
import
USERAPI
from
'~/api/usersApi/index'
import
{
IMG_URL
}
from
'~/utils/constantData'
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
IMG_URL
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{},
},
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
onReady
()
{
onReady
()
{},
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
...
@@ -39,9 +27,7 @@ Page({
...
@@ -39,9 +27,7 @@ Page({
const
appEnter
=
wx
.
getEnterOptionsSync
()
const
appEnter
=
wx
.
getEnterOptionsSync
()
if
(
appEnter
.
scene
==
1037
)
{
if
(
appEnter
.
scene
==
1037
)
{
if
(
Object
.
keys
(
appEnter
.
referrerInfo
).
length
)
{
if
(
Object
.
keys
(
appEnter
.
referrerInfo
).
length
)
{
const
{
const
{
extraData
}
=
appEnter
.
referrerInfo
extraData
}
=
appEnter
.
referrerInfo
if
(
extraData
&&
Object
.
keys
(
extraData
).
length
)
this
.
phoneSmsLogin
(
extraData
)
if
(
extraData
&&
Object
.
keys
(
extraData
).
length
)
this
.
phoneSmsLogin
(
extraData
)
else
this
.
init
()
else
this
.
init
()
}
else
this
.
init
()
}
else
this
.
init
()
...
@@ -51,44 +37,31 @@ Page({
...
@@ -51,44 +37,31 @@ Page({
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
onHide
()
{
onHide
()
{},
},
/**
/**
* 生命周期函数--监听页面卸载
* 生命周期函数--监听页面卸载
*/
*/
onUnload
()
{
onUnload
()
{},
},
/**
/**
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh
()
{
onPullDownRefresh
()
{},
},
/**
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom
()
{
onReachBottom
()
{},
},
init
()
{
init
()
{
wx
.
nextTick
(()
=>
{
wx
.
nextTick
(()
=>
{
const
sessionId
=
getSessionId
(),
const
sessionId
=
getSessionId
(),
{
{
url
,
targetPath
=
url
?
decodeURIComponent
(
url
)
:
''
}
=
this
.
options
url
,
targetPath
=
url
?
decodeURIComponent
(
url
)
:
''
}
=
this
.
options
let
path
=
'pages.index'
,
let
path
=
'pages.index'
,
obj
=
{}
obj
=
{}
if
(
targetPath
)
obj
.
targetPath
=
targetPath
if
(
targetPath
)
obj
.
targetPath
=
targetPath
if
(
sessionId
)
{
if
(
sessionId
)
{
USERAPI
.
checkSession
().
then
(({
USERAPI
.
checkSession
().
then
(({
code
})
=>
{
code
})
=>
{
if
(
code
==
'0'
)
{
if
(
code
==
'0'
)
{
if
(
targetPath
)
{
if
(
targetPath
)
{
path
=
setRouteData
(
targetPath
).
url
path
=
setRouteData
(
targetPath
).
url
...
@@ -103,25 +76,14 @@ Page({
...
@@ -103,25 +76,14 @@ Page({
autoLogin
(
obj
)
{
autoLogin
(
obj
)
{
const
autoLoginObject
=
wx
.
$storage
.
get
(
'auto_login_object'
)
const
autoLoginObject
=
wx
.
$storage
.
get
(
'auto_login_object'
)
if
(
autoLoginObject
)
{
if
(
autoLoginObject
)
{
const
{
const
{
failureTime
,
userName
,
password
}
=
autoLoginObject
failureTime
,
userName
,
password
}
=
autoLoginObject
if
(
Date
.
now
()
<
failureTime
)
{
if
(
Date
.
now
()
<
failureTime
)
{
USERAPI
.
accountLogin
({
USERAPI
.
accountLogin
({
userName
,
userName
,
password
password
}).
then
(
async
({
}).
then
(
async
({
data
,
code
,
message
})
=>
{
data
,
code
,
message
})
=>
{
if
(
code
==
'0'
&&
data
.
loginUserInfoList
.
length
)
{
if
(
code
==
'0'
&&
data
.
loginUserInfoList
.
length
)
{
const
{
const
{
sessionId
,
loginUserInfoList
}
=
data
sessionId
,
loginUserInfoList
}
=
data
setLoginInfo
(
loginUserInfoList
[
0
],
sessionId
)
setLoginInfo
(
loginUserInfoList
[
0
],
sessionId
)
}
else
{
}
else
{
try
{
try
{
...
@@ -144,11 +106,8 @@ Page({
...
@@ -144,11 +106,8 @@ Page({
USERAPI
.
phoneSmsLogin
({
USERAPI
.
phoneSmsLogin
({
mobile
:
extraData
.
phone
,
mobile
:
extraData
.
phone
,
code
:
extraData
.
smscode
code
:
extraData
.
smscode
}).
then
(({
})
code
,
.
then
(({
code
,
data
,
message
})
=>
{
data
,
message
})
=>
{
if
(
code
==
'0'
)
checkLoginUserInfo
(
data
)
if
(
code
==
'0'
)
checkLoginUserInfo
(
data
)
else
{
else
{
wx
.
$api
.
showToast
(
message
||
'系统异常'
)
wx
.
$api
.
showToast
(
message
||
'系统异常'
)
...
...
packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
View file @
12f9acd
// packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
// packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
import
wxqrcode
from
'~/utils/lib/wxqrcode'
import
wxqrcode
from
'~/utils/lib/wxqrcode'
import
{
import
{
IMG_URL
}
from
'~/utils/constantData'
IMG_URL
}
from
'~/utils/constantData'
import
outputApi
from
'~/api/outputApi/index'
import
outputApi
from
'~/api/outputApi/index'
const
IMAGES
=
Object
.
freeze
({
const
IMAGES
=
Object
.
freeze
({
download
:
`
${
IMG_URL
}
/output/download.webp`
download
:
`
${
IMG_URL
}
/output/download.webp`
...
@@ -32,7 +30,8 @@ Component({
...
@@ -32,7 +30,8 @@ Component({
IMGURL
:
IMG_URL
,
IMGURL
:
IMG_URL
,
IMAGES
,
IMAGES
,
isShowTip
:
true
,
isShowTip
:
true
,
orderFormList
:
[{
orderFormList
:
[
{
label
:
'总场次'
,
label
:
'总场次'
,
name
:
'totalNum'
name
:
'totalNum'
},
},
...
@@ -46,7 +45,8 @@ Component({
...
@@ -46,7 +45,8 @@ Component({
prefix
:
'¥'
prefix
:
'¥'
}
}
],
],
merchantFormList
:
[{
merchantFormList
:
[
{
label
:
'活动时间'
,
label
:
'活动时间'
,
name
:
'time'
name
:
'time'
},
},
...
@@ -66,7 +66,8 @@ Component({
...
@@ -66,7 +66,8 @@ Component({
prefix
:
'¥'
prefix
:
'¥'
}
}
],
],
tableHeadList
:
[{
tableHeadList
:
[
{
label
:
''
,
label
:
''
,
width
:
''
,
width
:
''
,
width
:
'28rpx'
width
:
'28rpx'
...
@@ -75,12 +76,12 @@ Component({
...
@@ -75,12 +76,12 @@ Component({
label
:
'业务员'
,
label
:
'业务员'
,
name
:
'shareName'
name
:
'shareName'
},
},
// {
// label: '转发',
// name: 'shareCount'
// },
{
{
label
:
'转发'
,
label
:
'访客'
,
name
:
'shareCount'
},
{
label
:
'浏览'
,
name
:
'browseCount'
name
:
'browseCount'
},
},
{
{
...
@@ -114,9 +115,7 @@ Component({
...
@@ -114,9 +115,7 @@ Component({
})
})
},
},
handleMore
(
e
)
{
handleMore
(
e
)
{
var
{
var
{
idx
}
=
e
.
currentTarget
.
dataset
idx
}
=
e
.
currentTarget
.
dataset
var
list
=
this
.
data
.
orderObj
var
list
=
this
.
data
.
orderObj
var
item
=
list
.
activityList
[
idx
]
var
item
=
list
.
activityList
[
idx
]
list
.
activityList
[
idx
].
showStaffList
=
list
.
activityList
[
idx
].
showStaffList
.
concat
(
item
.
staffList
.
length
>
10
?
item
.
staffList
.
slice
(
0
,
10
)
:
item
.
staffList
)
list
.
activityList
[
idx
].
showStaffList
=
list
.
activityList
[
idx
].
showStaffList
.
concat
(
item
.
staffList
.
length
>
10
?
item
.
staffList
.
slice
(
0
,
10
)
:
item
.
staffList
)
...
@@ -126,9 +125,7 @@ Component({
...
@@ -126,9 +125,7 @@ Component({
})
})
},
},
handleCopy
(
e
)
{
handleCopy
(
e
)
{
var
{
var
{
idx
}
=
e
.
currentTarget
.
dataset
idx
}
=
e
.
currentTarget
.
dataset
var
currentItem
=
this
.
data
.
orderObj
.
activityList
[
idx
]
var
currentItem
=
this
.
data
.
orderObj
.
activityList
[
idx
]
var
qr
=
wxqrcode
.
createQrCodeImg
(
currentItem
.
activityUrl
)
var
qr
=
wxqrcode
.
createQrCodeImg
(
currentItem
.
activityUrl
)
const
base64src
=
function
(
base64data
)
{
const
base64src
=
function
(
base64data
)
{
...
@@ -167,9 +164,7 @@ Component({
...
@@ -167,9 +164,7 @@ Component({
// wx.$router.jumpH5(item.activityUrl)
// wx.$router.jumpH5(item.activityUrl)
},
},
async
download
(
e
)
{
async
download
(
e
)
{
const
{
const
{
item
}
=
e
.
currentTarget
.
dataset
,
item
}
=
e
.
currentTarget
.
dataset
,
posterObj
=
this
.
selectComponent
(
'#poster'
)
posterObj
=
this
.
selectComponent
(
'#poster'
)
try
{
try
{
let
flag
=
await
posterObj
.
check
(
item
)
let
flag
=
await
posterObj
.
check
(
item
)
...
@@ -179,15 +174,18 @@ Component({
...
@@ -179,15 +174,18 @@ Component({
})
})
}
catch
(
error
)
{
}
catch
(
error
)
{
wx
.
$api
.
showLoading
(
'加载中...'
)
wx
.
$api
.
showLoading
(
'加载中...'
)
outputApi
.
getPosterUrl
({
outputApi
.
getPosterUrl
({
id
:
item
.
activityId
id
:
item
.
activityId
}).
then
(
res
=>
{
})
.
then
(
res
=>
{
item
.
posterUrl
=
res
item
.
posterUrl
=
res
this
.
setData
({
this
.
setData
({
posterItem
:
item
,
posterItem
:
item
,
isShowTip
:
false
isShowTip
:
false
})
})
}).
catch
(()
=>
{
})
.
catch
(()
=>
{
wx
.
$api
.
showToast
(
'下载海报失败'
)
wx
.
$api
.
showToast
(
'下载海报失败'
)
})
})
}
}
...
...
packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.scss
View file @
12f9acd
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
align-items
:
center
;
align-items
:
center
;
&
-block
{
&
-block
{
width
:
33
.3%
;
// width: 33.3%;
width
:
50%
;
text-align
:
center
;
text-align
:
center
;
font-weight
:
500
;
font-weight
:
500
;
font-size
:
26rpx
;
font-size
:
26rpx
;
...
...
pages/tab/output/components/SceneBox/SceneBox.wxml
View file @
12f9acd
<!-- pages/tab/output/components/sceneBox/sceneBox.wxml -->
<!-- pages/tab/output/components/sceneBox/sceneBox.wxml -->
<wxs src="../../index.wxs" module="filter" />
<view class="flex scene">
<view class="flex scene">
<view
<view
class="scene-item {{ formData['scene' + (index + 1)] ? 'open' : ''}} {{ (sceneActive != -1 && sceneActive == index + 1) ? 'active' : ''}}"
class="scene-item {{ formData['scene' + (index + 1)] ? 'open' : ''}} {{ (sceneActive != -1 && sceneActive == index + 1) ? 'active' : ''}}"
...
@@ -14,7 +15,9 @@
...
@@ -14,7 +15,9 @@
<view class="scene-title {{formData['showList'][index]?'':'notOpened'}}">{{item.title}}</view>
<view class="scene-title {{formData['showList'][index]?'':'notOpened'}}">{{item.title}}</view>
<view>{{item.subTitle}}</view>
<view>{{item.subTitle}}</view>
<!-- wx:if="{{scenePriceList.length}}" -->
<!-- wx:if="{{scenePriceList.length}}" -->
<view class="total-price">¥ {{formData['showList'][index].totalMoney||0}}</view>
<view class="total-price">
¥ {{filter.money_three_for_two_thousands(formData['showList'][index].totalMoney||0)}}
</view>
</view>
</view>
</view>
</view>
pages/tab/output/components/merchant/merchant.wxss
deleted
100644 → 0
View file @
9c39825
.swiper {
/* test */
color: aquamarine;
}
\ No newline at end of file
\ No newline at end of file
pages/tab/output/components/merchant/mrechant.js
View file @
12f9acd
// pages/tab/output/components/merchant/mrechant.js
// pages/tab/output/components/merchant/mrechant.js
import
outputApi
from
'~/api/outputApi/index'
import
outputApi
from
'~/api/outputApi/index'
import
{
IMG_URL
}
from
'~/utils/constantData'
import
{
IMG_URL
}
from
'~/utils/constantData'
import
{
setPrice
}
from
'~/utils/format'
import
{
getNowMonth
}
from
'~/utils/format'
import
{
getNowMonth
}
from
'~/utils/format'
const
IMAGES
=
{
const
IMAGES
=
{
arrow
:
`
${
IMG_URL
}
/output/arrow.png`
,
arrow
:
`
${
IMG_URL
}
/output/arrow.png`
,
...
@@ -8,7 +9,10 @@ const IMAGES = {
...
@@ -8,7 +9,10 @@ const IMAGES = {
money
:
`
${
IMG_URL
}
/output/money.png`
,
money
:
`
${
IMG_URL
}
/output/money.png`
,
paper
:
`
${
IMG_URL
}
/output/paper.png`
,
paper
:
`
${
IMG_URL
}
/output/paper.png`
,
link
:
`
${
IMG_URL
}
/output/link.webp`
,
link
:
`
${
IMG_URL
}
/output/link.webp`
,
empty
:
`
${
IMG_URL
}
/output/empty.png`
empty
:
`
${
IMG_URL
}
/output/empty.png`
,
funnelNew
:
`
${
IMG_URL
}
/output/funnelNew.webp`
,
funnelNewSm
:
`
${
IMG_URL
}
/output/funnelNewSm.webp`
,
totalIcon
:
`
${
IMG_URL
}
/output/totalIcon.webp`
}
}
Component
({
Component
({
/**
/**
...
@@ -47,15 +51,15 @@ Component({
...
@@ -47,15 +51,15 @@ Component({
funnelList
:
{
funnelList
:
{
start
:
[
start
:
[
{
label
:
'到店量'
,
key
:
'toShopCount'
},
{
label
:
'到店量'
,
key
:
'toShopCount'
},
{
label
:
'核销数'
,
key
:
'couponUsedCount'
},
//
{ label: '核销数', key: 'couponUsedCount' },
{
label
:
'体验数'
,
key
:
'experienceCount'
},
{
label
:
'体验数'
,
key
:
'experienceCount'
},
{
label
:
'
订单成交
'
,
key
:
'upgradeCount'
}
{
label
:
'
成交量
'
,
key
:
'upgradeCount'
}
],
],
end
:
[
end
:
[
{
label
:
'转发量'
,
key
:
'shareCount'
},
//
{ label: '转发量', key: 'shareCount' },
{
label
:
'访客数'
,
key
:
'visitCount'
},
{
label
:
'访客数'
,
key
:
'visitCount'
},
{
label
:
'成交数'
,
key
:
'dealCount'
}
,
{
label
:
'成交数'
,
key
:
'dealCount'
}
{
label
:
'产值'
,
key
:
'totalMoney'
}
//
{ label: '产值', key: 'totalMoney' }
]
]
}
}
// showNothingSceneCon: false
// showNothingSceneCon: false
...
@@ -207,7 +211,7 @@ Component({
...
@@ -207,7 +211,7 @@ Component({
let
{
dataList
,
yqMerchantIds
}
=
data
let
{
dataList
,
yqMerchantIds
}
=
data
const
list
=
yqMerchantIds
.
reduce
((
list
,
item
,
index
)
=>
{
const
list
=
yqMerchantIds
.
reduce
((
list
,
item
,
index
)
=>
{
let
obj
=
{}
let
obj
=
{}
obj
.
totalMoney
=
dataList
[
index
]?.
totalMoney
||
0
obj
.
totalMoney
=
setPrice
(
dataList
[
index
]?.
totalMoney
||
0
)
obj
.
totalOrder
=
dataList
[
index
]?.
totalOrder
||
0
obj
.
totalOrder
=
dataList
[
index
]?.
totalOrder
||
0
obj
.
merchantName
=
dataList
[
index
]?.
merchantName
obj
.
merchantName
=
dataList
[
index
]?.
merchantName
obj
.
merchantId
=
item
obj
.
merchantId
=
item
...
@@ -237,12 +241,12 @@ Component({
...
@@ -237,12 +241,12 @@ Component({
}
else
if
([
1
,
2
].
includes
(
index
))
{
}
else
if
([
1
,
2
].
includes
(
index
))
{
console
.
log
(
list
[
current
])
console
.
log
(
list
[
current
])
if
(
list
[
current
][
'showList'
][
index
][
'diagnoseList'
])
{
if
(
list
[
current
][
'showList'
][
index
][
'diagnoseList'
])
{
swiperHeight
=
735
swiperHeight
=
600
}
else
{
}
else
{
swiperHeight
=
686
swiperHeight
=
555
}
}
}
else
{
}
else
{
swiperHeight
=
590
swiperHeight
=
485
}
}
// console.log('swiperHeight', swiperHeight)
// console.log('swiperHeight', swiperHeight)
this
.
setData
({
this
.
setData
({
...
@@ -280,12 +284,12 @@ Component({
...
@@ -280,12 +284,12 @@ Component({
// console.log(item['diagnoseList'])
// console.log(item['diagnoseList'])
// item['showList'][index]['diagnoseList']
// item['showList'][index]['diagnoseList']
if
(
item
[
'showList'
][
sceneIdx
]?.
diagnoseList
)
{
if
(
item
[
'showList'
][
sceneIdx
]?.
diagnoseList
)
{
swiperHeight
=
735
swiperHeight
=
600
}
else
{
}
else
{
swiperHeight
=
686
swiperHeight
=
555
}
}
}
else
{
}
else
{
swiperHeight
=
590
swiperHeight
=
485
}
}
// let value = list[index][sceneIdx]
// let value = list[index][sceneIdx]
// console.log(list[index]['showList'][sceneIdx - 1])
// console.log(list[index]['showList'][sceneIdx - 1])
...
@@ -319,7 +323,7 @@ Component({
...
@@ -319,7 +323,7 @@ Component({
item
=
item
[
0
]
item
=
item
[
0
]
let
obj
=
{}
let
obj
=
{}
obj
.
selectName
=
selectName
||
oldItem
.
selectName
obj
.
selectName
=
selectName
||
oldItem
.
selectName
obj
.
totalMoney
=
item
?.
totalMoney
||
0
obj
.
totalMoney
=
setPrice
(
item
?.
totalMoney
||
0
)
obj
.
totalOrder
=
item
?.
totalOrder
||
0
obj
.
totalOrder
=
item
?.
totalOrder
||
0
obj
.
merchantName
=
item
?.
merchantName
obj
.
merchantName
=
item
?.
merchantName
// obj.merchantId = item
// obj.merchantId = item
...
@@ -357,12 +361,12 @@ Component({
...
@@ -357,12 +361,12 @@ Component({
let
subscript
=
list
[
current
][
'startInd'
]
let
subscript
=
list
[
current
][
'startInd'
]
let
item
=
list
[
current
][
'showList'
]
let
item
=
list
[
current
][
'showList'
]
if
(
item
[
subscript
]?.
diagnoseList
)
{
if
(
item
[
subscript
]?.
diagnoseList
)
{
swiperHeight
=
735
swiperHeight
=
600
}
else
{
}
else
{
swiperHeight
=
686
swiperHeight
=
555
}
}
}
else
{
}
else
{
swiperHeight
=
590
swiperHeight
=
485
}
}
// console.log(swiperHeight)
// console.log(swiperHeight)
this
.
setData
({
this
.
setData
({
...
...
pages/tab/output/components/merchant/mrechant.scss
View file @
12f9acd
...
@@ -108,9 +108,12 @@
...
@@ -108,9 +108,12 @@
}
}
.bg-image
{
.bg-image
{
width
:
100%
;
// width: 100%;
height
:
100%
;
width
:
440rpx
;
// height: 100%;
position
:
absolute
;
position
:
absolute
;
left
:
50%
;
transform
:
translateX
(
-50%
);
// width: 670rpx;
// width: 670rpx;
// height: 550rpx;
// height: 550rpx;
// z-index: -0;
// z-index: -0;
...
@@ -118,18 +121,35 @@
...
@@ -118,18 +121,35 @@
}
}
.longHeight
{
height
:
284rpx
;
}
.shortHeight
{
height
:
200rpx
;
}
.funneItem
{
.funneItem
{
box-sizing
:
border-box
;
position
:
relative
;
position
:
relative
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
margin-top
:
36rpx
;
z-index
:
999
;
z-index
:
999
;
width
:
100%
;
width
:
100%
;
height
:
40
0
rpx
;
height
:
40rpx
;
font-size
:
24rpx
;
font-size
:
24rpx
;
color
:
#323436
;
color
:
#323436
;
padding-left
:
20rpx
;
.label
{
background
:
#F0F7FF
;
border-radius
:
4rpx
;
width
:
112rpx
;
height
:
40rpx
;
text-align
:
center
;
line-height
:
40rpx
;
}
.num
{
.num
{
position
:
absolute
;
position
:
absolute
;
...
@@ -149,9 +169,13 @@
...
@@ -149,9 +169,13 @@
box-sizing
:
border-box
;
box-sizing
:
border-box
;
width
:
100%
;
width
:
100%
;
padding
:
20rpx
;
padding
:
20rpx
;
border
:
2rpx
dashed
#CCCED1
;
//
border: 2rpx dashed #CCCED1;
border-radius
:
8rpx
;
border-radius
:
8rpx
;
display
:
flex
;
display
:
flex
;
// width: 670rpx;
// height: 104rpx;
background
:
#F7F8FC
;
border-radius
:
8rpx
;
.tipsIcon
{
.tipsIcon
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
@@ -177,6 +201,12 @@
...
@@ -177,6 +201,12 @@
}
}
}
}
.statisticsCon
{
width
:
100%
;
}
.swiper-item
{
.swiper-item
{
padding
:
32rpx
20rpx
24rpx
;
padding
:
32rpx
20rpx
24rpx
;
display
:
flex
;
display
:
flex
;
...
@@ -184,31 +214,36 @@
...
@@ -184,31 +214,36 @@
align-items
:
center
;
align-items
:
center
;
.merchantCount
{
.merchantCount
{
position
:
relative
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
display
:
flex
;
display
:
flex
;
margin
:
32rpx
0
;
margin-top
:
32rpx
;
// width: 670rpx;
width
:
100%
;
height
:
126rpx
;
padding
:
22rpx
;
background
:
#FFFFFF
;
box-shadow
:
0
0
8rpx
0
rgba
(
180
,
186
,
204
,
0
.32
)
,
0
8rpx
32rpx
0
rgba
(
180
,
186
,
204
,
0
.40
);
border-radius
:
8rpx
;
z-index
:
2
;
.turnover
,
.turnover
,
.customerUnitPrice
{
.customerUnitPrice
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
position
:
relative
;
position
:
relative
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-wrap
:
wrap
;
align-items
:
start
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
width
:
328rpx
;
align-content
:
space-between
;
height
:
128rpx
;
width
:
50%
;
padding-left
:
110rpx
;
height
:
100%
;
background-image
:
linear-gradient
(
90deg
,
#FFFFFF
3%
,
#F7F8FC
100%
);
text-align-last
:
left
;
text-align-last
:
left
;
.img
{
.img
{
position
:
absolute
;
width
:
32rpx
;
top
:
24rpx
;
height
:
32rpx
;
left
:
36rpx
;
margin-right
:
5rpx
;
width
:
60rpx
;
height
:
60rpx
;
}
}
.num
{
.num
{
...
@@ -216,18 +251,35 @@
...
@@ -216,18 +251,35 @@
font-weight
:
600
;
font-weight
:
600
;
font-size
:
32rpx
;
font-size
:
32rpx
;
color
:
#323436
;
color
:
#323436
;
margin-bottom
:
14rpx
;
// margin-bottom: 14rpx;
// text-align: right;
// text-align: center;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
width
:
100%
;
}
}
.label
{
.label
{
font-weight
:
400
;
font-weight
:
400
;
font-size
:
24rpx
;
font-size
:
24rpx
;
color
:
#323436
;
color
:
#323436
;
height
:
34rpx
;
}
}
}
}
.customerUnitPrice
{
.customerUnitPrice
{
margin-left
:
6rpx
;
// margin-left: 6rpx;
border-left
:
1rpx
solid
#D8D8D8
;
}
}
.crowdFundingTotal
{
width
:
50%
;
margin
:
32rpx
auto
0
;
.turnover
{
width
:
100%
;
}
}
}
}
}
}
...
@@ -242,22 +294,25 @@
...
@@ -242,22 +294,25 @@
.funneItem
:nth-of-type
(
1
)
{
.funneItem
:nth-of-type
(
1
)
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding-top
:
30rpx
;
//
padding-top: 30rpx;
margin-top
:
25
rpx
;
margin-top
:
64
rpx
;
}
}
.funneItem
:nth-of-type
(
1
)
.num
{
transform
:
translate
(
-50%
,
calc
(
-50%
-
-15rpx
));
}
.navOhterApp
{
.navOhterApp
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
flex-end
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
font-size
:
24rpx
;
font-size
:
24rpx
;
color
:
#5C7097
;
color
:
#5C7097
;
margin-top
:
28rpx
;
width
:
100%
;
// margin-left: auto;
// text-align: right;
// margin: 50rpx 20rpx 0;
// margin: 50rpx 20rpx 0;
margin-bottom
:
100rpx
;
//
margin-bottom: 100rpx;
.linkImg
{
.linkImg
{
width
:
20rpx
;
width
:
20rpx
;
...
@@ -279,20 +334,3 @@
...
@@ -279,20 +334,3 @@
height
:
500rpx
;
height
:
500rpx
;
}
}
}
}
\ No newline at end of file
\ No newline at end of file
// .swiper .wx-swiper-dot {
// width: 40rpx !important;
// height: 10rpx !important;
// background-color: aqua;
// // margin-left: 0 10rpx;
// // display: inline-flex;
// // justify-content: space-between;
// }
// swiper .wx-swiper-dot {
// width: 35rpx;
// height: 7rpx;
// border-radius: 50%;
// display: inline-flex;
// margin-left: 19rpx;
// justify-content: space-between;
//
}
\ No newline at end of file
\ No newline at end of file
pages/tab/output/components/merchant/mrechant.wxml
View file @
12f9acd
<!-- pages/tab/output/components/merchant/mrechant.wxml -->
<!-- pages/tab/output/components/merchant/mrechant.wxml -->
<!-- hidden="{{true}}" -->
<!-- hidden="{{true}}" -->
<wxs src="../../index.wxs" module="filter" />
<!-- <scroll-view
<!-- <scroll-view
scroll-y="true"
scroll-y="true"
class="list-wrap"
class="list-wrap"
...
@@ -8,7 +9,7 @@
...
@@ -8,7 +9,7 @@
bindrefresherrefresh="refreshList"
bindrefresherrefresh="refreshList"
refresher-threshold="104"
refresher-threshold="104"
refresher-triggered="{{triggered}}"> -->
refresher-triggered="{{triggered}}"> -->
<view class="con" wx:if="{{list.length }}">
<view class="con" wx:if="{{list.length }}">
<view class="statistics">
<view class="statistics">
<view class="totalOutputValue box">
<view class="totalOutputValue box">
<view class="num">¥{{totalMoney}}</view>
<view class="num">¥{{totalMoney}}</view>
...
@@ -64,8 +65,8 @@
...
@@ -64,8 +65,8 @@
<view class="title">产值图</view>
<view class="title">产值图</view>
<view class="swiperCon" wx:if="{{item['showList']}}">
<view class="swiperCon" wx:if="{{item['showList']}}">
<view class="swiper-item ">
<view class="swiper-item ">
<view class="fluuelCon
">
<view class="fluuelCon {{item.startInd!=3?'longHeight':'shortHeight'}}
">
<image class="bg-image" src="{{IMAGES.funnel
}}" />
<image class="bg-image " src="{{item.startInd!=3?IMAGES.funnelNew :IMAGES.funnelNewSm
}}" />
<block
<block
wx:for="{{item.startInd!=3? funnelList['start']: funnelList['end']}}"
wx:for="{{item.startInd!=3? funnelList['start']: funnelList['end']}}"
wx:key="*this"
wx:key="*this"
...
@@ -73,27 +74,27 @@
...
@@ -73,27 +74,27 @@
wx:for-item="funneItem">
wx:for-item="funneItem">
<view class="funneItem">
<view class="funneItem">
<view class="label">{{funneItem['label']}}</view>
<view class="label">{{funneItem['label']}}</view>
<view class="num">
<view class="num">{{item.showList[item.startInd][funneItem['key']]||0}}</view>
{{item.showList[item.startInd][funneItem['key']]||0}}
</view>
</view>
</view>
</block>
</block>
</view>
</view>
<!-- <block wx:for="{{items}}"></block> hidden="{{item.startInd ==3}}" -->
<!-- <block wx:for="{{items}}"></block> hidden="{{item.startInd ==3}}" -->
<view
hidden="{{item.startInd ==3}}">
<view class="statisticsCon"
hidden="{{item.startInd ==3}}">
<!-- 统计 -->
<!-- 统计 -->
<view class="merchantCount">
<view class="merchantCount">
<view class="turnover">
<view class="turnover">
<view class="num">
¥ {{item.showList[item.startInd]['custUnitPrice']||0}}
</view>
<image class="img " webp src="{{IMAGES.money}}" />
<image class="img " webp src="{{IMAGES.money}}" />
<view class="num">{{item.showList[item.startInd]['totalMoney']||0}}</view>
<view class="label">客单价</view>
<view class="label">营业额/¥</view>
</view>
</view>
<view class="customerUnitPrice">
<view class="customerUnitPrice">
<image class="img " webp src="{{IMAGES.paper}}" />
<view class="num">
<view class="num">
{{item.showList[item.startInd]['custUnitPrice']||0
}}
¥ {{filter.money_three_for_two_thousands(item.showList[item.startInd]['totalMoney']||0)
}}
</view>
</view>
<view class="label">客单价/¥</view>
<image class="img " webp src="{{IMAGES.paper}}" />
<view class="label">营业额</view>
</view>
</view>
</view>
</view>
<!-- 指标诊断 -->
<!-- 指标诊断 -->
...
@@ -117,6 +118,28 @@
...
@@ -117,6 +118,28 @@
<!-- 日均升级客单价低于1000/低于上2个月平均日升级客单价的10%,建议梳理驻店销售的技能,以及加强与流量方的互动。 -->
<!-- 日均升级客单价低于1000/低于上2个月平均日升级客单价的10%,建议梳理驻店销售的技能,以及加强与流量方的互动。 -->
</view>
</view>
</view>
</view>
<!-- wx:if="{{swiperHeight>590}}" -->
<navigator
class="navOhterApp"
target="miniProgram"
open-type="navigate"
app-id="wx570d9331f9ace0bd"
version="release">
<image src="{{IMAGES.link}}" webp class="linkImg" />
查看订单详情
</navigator>
</view>
<view class="statisticsCon" hidden="{{item.startInd !=3}}">
<!-- 统计 -->
<view class="merchantCount crowdFundingTotal">
<view class="turnover">
<view class="num">
¥ {{filter.money_three_for_two_thousands(item.showList[item.startInd]['totalMoney']||0)}}
</view>
<image class="img " webp src="{{IMAGES.money}}" />
<view class="label">营业额</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -129,17 +152,7 @@
...
@@ -129,17 +152,7 @@
</swiper-item>
</swiper-item>
</block>
</block>
</swiper>
</swiper>
<navigator
</view>
wx:if="{{swiperHeight>590}}"
class="navOhterApp"
target="miniProgram"
open-type="navigate"
app-id="wx570d9331f9ace0bd"
version="release">
<image src="{{IMAGES.link}}" webp class="linkImg" />
查看订单详情
</navigator>
</view>
<!-- </scroll-view> -->
<!-- </scroll-view> -->
<nothingTipsCon wx:if="{{!list.length }}" />
<nothingTipsCon wx:if="{{!list.length }}" />
pages/tab/output/index.wxs
0 → 100644
View file @
12f9acd
/**设置千分位 */
var setPrice = function (n = 0.0) {
if ((typeof n == 'string' || typeof n == 'number') && !isNaN(n)) {
n = parseFloat(n).toFixed(2)
var r = getRegExp('(d{1,3})(?=(d{3})+(?:.))', 'g')
var p = n.replace(r, ',')
return p
// var r = getRegExp('/./', 'g')
// var p = n.replace(r, 'test')
// return n
} else {
console.log(n, '不是一个数字', !isNaN(n))
}
}
var threeNumForTwo = {
money_three_for_two_thousands: function (num) {
//num = parseInt(num);
// return num
var num = num + ''
var d = ''
if (num.slice(0, 1) == '-') {
d = num.slice(0, 1)
num = num.slice(1)
}
var len = num.length
var index = num.indexOf('.')
if (index == -1) {
num = num + '.00'
} else if (index + 2 == len) {
num = num + '0'
}
var index = num.indexOf('.') // 字符出现的位置
var num2 = num.slice(-3)
num = num.slice(0, index)
var result = ''
while (num.length > 3) {
result = ',' + num.slice(-3) + result
num = num.slice(0, num.length - 3)
}
if (num) {
result = num + result
}
// return result
return d + (result + num2)
}
}
/*
* 导出
*/
module.exports = {
setPrice: setPrice,
money_three_for_two_thousands: threeNumForTwo.money_three_for_two_thousands //暴露接口调用
}
pages/tab/output/output.js
View file @
12f9acd
...
@@ -9,7 +9,7 @@ Page({
...
@@ -9,7 +9,7 @@ Page({
navStyle
:
'background-color: rgba(0,0,0,0);'
,
navStyle
:
'background-color: rgba(0,0,0,0);'
,
loginType
:
0
,
loginType
:
0
,
agree
:
true
,
agree
:
true
,
tabIndx
:
0
,
tabIndx
:
1
,
tabList
:
[
'我的客户'
,
'我的门店'
,
'我的员工'
],
tabList
:
[
'我的客户'
,
'我的门店'
,
'我的员工'
],
popupShow
:
false
,
popupShow
:
false
,
subIndex
:
-
1
,
subIndex
:
-
1
,
...
...
pages/tab/output/output.scss
View file @
12f9acd
...
@@ -80,3 +80,15 @@
...
@@ -80,3 +80,15 @@
.navigation-title
.move
{
.navigation-title
.move
{
transform
:
rotate
(
-180deg
)
translateY
(
0
);
transform
:
rotate
(
-180deg
)
translateY
(
0
);
}
}
// 圆点样式
.wx-swiper-dots
.wx-swiper-dot
{
width
:
8rpx
;
height
:
8rpx
;
background
:
#CCCED1
;
}
// 当前选中圆点样式
.wx-swiper-dots
.wx-swiper-dot.wx-swiper-dot-active
{
background
:
#8A8C90
;
}
\ No newline at end of file
\ No newline at end of file
utils/format.js
View file @
12f9acd
...
@@ -151,3 +151,34 @@ export function setPrice(price) {
...
@@ -151,3 +151,34 @@ export function setPrice(price) {
if
(
!
decimal
)
decimal
=
'00'
if
(
!
decimal
)
decimal
=
'00'
return
(
num
||
0
).
toString
().
replace
(
/
(\d)(?=(?:\d{3})
+$
)
/g
,
'$1,'
)
+
`.
${
decimal
}
`
return
(
num
||
0
).
toString
().
replace
(
/
(\d)(?=(?:\d{3})
+$
)
/g
,
'$1,'
)
+
`.
${
decimal
}
`
}
}
export
function
formatNum
(
str
)
{
var
newStr
=
''
var
count
=
0
// 当数字是整数
if
(
str
.
indexOf
(
'.'
)
==
-
1
)
{
for
(
var
i
=
str
.
length
-
1
;
i
>=
0
;
i
--
)
{
if
(
count
%
3
==
0
&&
count
!=
0
)
{
newStr
=
str
.
charAt
(
i
)
+
','
+
newStr
}
else
{
newStr
=
str
.
charAt
(
i
)
+
newStr
}
count
++
}
str
=
newStr
+
'.00'
//自动补小数点后两位
return
str
}
// 当数字带有小数
else
{
for
(
var
i
=
str
.
indexOf
(
'.'
)
-
1
;
i
>=
0
;
i
--
)
{
if
(
count
%
3
==
0
&&
count
!=
0
)
{
newStr
=
str
.
charAt
(
i
)
+
','
+
newStr
}
else
{
newStr
=
str
.
charAt
(
i
)
+
newStr
//逐个字符相接起来
}
count
++
}
str
=
newStr
+
(
str
+
'00'
).
substr
((
str
+
'00'
).
indexOf
(
'.'
),
3
)
return
str
}
}
utils/request/environment.js
View file @
12f9acd
...
@@ -17,7 +17,7 @@ const systemInfo = wx.getSystemInfoSync()
...
@@ -17,7 +17,7 @@ const systemInfo = wx.getSystemInfoSync()
const
manual
=
false
const
manual
=
false
const
release
=
false
const
release
=
false
let
index
=
3
let
index
=
2
// 判断小程序环境
// 判断小程序环境
// develop:开发版(正常开发工具,测试时)
// develop:开发版(正常开发工具,测试时)
...
...
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