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 728c8a60
authored
Oct 27, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bugfix
1 parent
9f0a0a1e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
308 additions
and
54 deletions
api/index.js
app.json
components/CrowdfundPoster/CrowdfundPoster.js
components/CrowdfundPoster/CrowdfundPoster.json
components/CrowdfundPoster/CrowdfundPoster.scss
components/CrowdfundPoster/CrowdfundPoster.wxml
packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.json
pages/checkProduct/checkProduct.js
pages/mineDetail/customerManagement/customerManagement.js
pages/mineDetail/messageBox/messageBox.js
pages/mineDetail/messageBox/messageBox.wxml
pages/tab/index/index.js
pages/tab/index/index.wxml
utils/constantData.js
utils/request/environment.js
api/index.js
View file @
728c8a6
/**
* 拓客户,看线索接口
*/
import
api
from
"~/utils/request/request"
;
import
api
from
'~/utils/request/request'
const
serverApi
=
{
// 拓客户
productByscene
:
"scrm.api.busassistant.activity.findSceneProductStatus"
,
productByscene
:
'scrm.api.busassistant.activity.findSceneProductStatus'
,
// 看线索
unread
:
"scrm.api.busassistant.clue.unread"
,
//获取未读线索数量
page
:
"scrm.api.busassistant.clue.page"
,
//分页查询线索列表
read
:
"scrm.api.busassistant.clue.read"
,
//标记线索已读
tag
:
"scrm.api.busassistant.clue.tag"
,
//线索标记意向客户
};
unread
:
'scrm.api.busassistant.clue.unread'
,
//获取未读线索数量
page
:
'scrm.api.busassistant.clue.page'
,
//分页查询线索列表
read
:
'scrm.api.busassistant.clue.read'
,
//标记线索已读
tag
:
'scrm.api.busassistant.clue.tag'
,
//线索标记意向客户
battleMessage
:
'scrm.api.busassistant.message.battleMessage'
//获取最新战报消息
}
// 拓客户
const
productBysceneApi
=
(
data
)
=>
{
const
productBysceneApi
=
data
=>
{
return
api
.
post
(
{
method
:
serverApi
.
productByscene
,
...
data
,
...
data
},
true
)
;
}
;
)
}
// 看线索
const
unreadApi
=
(
data
)
=>
{
const
unreadApi
=
data
=>
{
return
api
.
post
(
{
method
:
serverApi
.
unread
,
...
data
,
...
data
},
true
)
;
}
;
const
pageApi
=
(
data
)
=>
{
)
}
const
pageApi
=
data
=>
{
return
api
.
post
(
{
method
:
serverApi
.
page
,
...
data
,
...
data
},
true
)
;
}
;
const
readApi
=
(
data
)
=>
{
)
}
const
readApi
=
data
=>
{
return
api
.
post
(
{
method
:
serverApi
.
read
,
...
data
,
...
data
},
true
)
;
}
;
const
tagApi
=
(
data
)
=>
{
)
}
const
tagApi
=
data
=>
{
return
api
.
post
(
{
method
:
serverApi
.
tag
,
...
data
,
...
data
},
true
);
};
)
}
const
battleMessageApi
=
data
=>
{
return
api
.
post
({
method
:
serverApi
.
battleMessage
,
...
data
})
}
module
.
exports
=
{
/** 线索埋点数据上报
...
...
@@ -69,15 +76,16 @@ module.exports = {
*/
reportData
(
data
=
{},
operationType
=
0
)
{
return
api
.
post
({
method
:
"scrm.api.busassistant.clue.report"
,
method
:
'scrm.api.busassistant.clue.report'
,
...
data
,
operationType
,
operationDate
:
new
Date
().
format
(
"yyyy-MM-dd hh:mm:ss"
),
})
;
operationDate
:
new
Date
().
format
(
'yyyy-MM-dd hh:mm:ss'
)
})
},
productBysceneApi
,
unreadApi
,
pageApi
,
readApi
,
tagApi
,
};
battleMessageApi
}
app.json
View file @
728c8a6
...
...
@@ -52,7 +52,8 @@
"tab"
:
"/components/Tab/Tab"
,
"navigation-bar"
:
"/components/NavigationBar/NavigationBar"
,
"popup"
:
"/components/Popup/Popup"
,
"nothing-tips"
:
"/components/Nothing-tips/nothingTips"
"nothing-tips"
:
"/components/Nothing-tips/nothingTips"
,
"crowdfund-poster"
:
"/components/CrowdfundPoster/CrowdfundPoster"
},
"style"
:
"v2"
,
"resolveAlias"
:
{
...
...
components/CrowdfundPoster/CrowdfundPoster.js
0 → 100644
View file @
728c8a6
// packageOutput/pages/summary/components/CrowdfundPoster/CrowdfundPoster.js
import
Draw
from
'~/utils/Draw'
Component
({
/**
* 组件的属性列表
*/
properties
:
{
item
:
{
type
:
Object
,
observer
(
n
)
{
console
.
log
(
n
,
'================='
)
this
.
init
(
n
)
}
}
},
/**
* 组件的初始数据
*/
data
:
{
},
/**
* 组件的方法列表
*/
methods
:
{
async
init
(
n
)
{
wx
.
$api
.
showLoading
()
const
drawfun
=
new
Draw
({
width
:
279
,
height
:
554
},
this
),
{
userInfo
}
=
wx
.
$storage
.
get
(),
merchantName
=
userInfo
.
merchantName
.
length
>
12
?
`
${
userInfo
.
merchantName
.
substring
(
0
,
12
)}
...`
:
userInfo
.
merchantName
,
res
=
await
drawfun
.
begin
({
imageList
:
[{
x
:
0
,
y
:
0
,
width
:
279
,
height
:
66
,
url
:
'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/output/poster-bg.png'
},
{
x
:
16
,
y
:
70
,
width
:
247
,
height
:
472
,
url
:
n
.
posterUrl
}
],
textList
:
[{
x
:
12
,
y
:
14
,
fontSize
:
14
,
color
:
'#2D2D33'
,
text
:
merchantName
,
textBaseline
:
'top'
},
{
x
:
12
,
y
:
36
,
fontSize
:
14
,
color
:
'#1B233D'
,
text
:
n
.
activityName
,
textBaseline
:
'top'
,
fontWeight
:
500
},
{
x
:
14
+
drawfun
.
getTextWidth
(
n
.
activityName
,
14
)
+
9
,
y
:
37
,
fontSize
:
10
,
color
:
'#4466F0'
,
text
:
'众筹'
,
textBaseline
:
'top'
,
border
:
{
width
:
1
,
color
:
'#4466F0'
,
radius
:
2
,
padding
:
[
2
,
5
],
opacity
:
0.5
}
}
],
})
console
.
log
(
res
)
wx
.
hideLoading
()
this
.
setData
({
poster
:
res
.
path
,
show
:
true
})
},
download
()
{
const
filePath
=
this
.
data
.
poster
wx
.
saveImageToPhotosAlbum
({
filePath
})
},
hide
()
{
this
.
setData
({
show
:
false
,
poster
:
''
})
},
noScroll
()
{}
}
})
\ No newline at end of file
components/CrowdfundPoster/CrowdfundPoster.json
0 → 100644
View file @
728c8a6
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
components/CrowdfundPoster/CrowdfundPoster.scss
0 → 100644
View file @
728c8a6
/* packageOutput/pages/summary/components/CrowdfundPoster/CrowdfundPoster.wxss */
.layout
{
position
:
fixed
;
top
:
0
;
right
:
0
;
bottom
:
0
;
left
:
0
;
z-index
:
998
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
.bg
{
position
:
absolute
;
width
:
100%
;
height
:
100%
;
z-index
:
-1
;
background
:
rgba
(
28
,
27
,
35
,
0
.60
);
}
.poster
{
width
:
558rpx
;
height
:
60%
;
border-radius
:
8rpx
;
}
.btn
{
width
:
320rpx
;
height
:
88rpx
;
line-height
:
88rpx
;
background-image
:
linear-gradient
(
-60deg
,
#556AF5
0%
,
#7197FF
100%
);
border-radius
:
16rpx
;
font-weight
:
500
;
font-size
:
32rpx
;
color
:
#FFFFFF
;
text-align
:
center
;
margin-top
:
32rpx
;
}
.tips
{
margin
:
16rpx
80rpx
0
;
font-size
:
24rpx
;
color
:
#FFFFFF
;
line-height
:
36rpx
;
}
}
\ No newline at end of file
components/CrowdfundPoster/CrowdfundPoster.wxml
0 → 100644
View file @
728c8a6
<block wx:if="{{show}}">
<view class="layout" catchtouchmove="noScroll">
<view class="bg" bindtap="hide"></view>
<image src="{{poster}}" class="poster" mode="aspectFit"></image>
<view class="btn" bindtap="download">保存至相册</view>
<view class="tips">
提示:这是您的专属活动海报,请下载转发给门店员工注册并参与活动分享。请不要将此海报转发给非相关活动参与者,避免活动数据泄漏。
</view>
</view>
</block>
\ No newline at end of file
packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.json
View file @
728c8a6
{
"component"
:
true
,
"usingComponents"
:
{
"crowdfund-poster"
:
"../CrowdfundPoster/CrowdfundPoster"
}
}
\ No newline at end of file
"usingComponents"
:
{}
}
pages/checkProduct/checkProduct.js
View file @
728c8a6
This diff is collapsed.
Click to expand it.
pages/mineDetail/customerManagement/customerManagement.js
View file @
728c8a6
...
...
@@ -123,6 +123,10 @@ Component({
.
then
(
result
=>
{
console
.
log
(
result
)
let
{
pages
,
list
,
total
}
=
result
list
=
list
.
map
(
item
=>
{
item
.
merchantName
=
item
.
merchantName
||
item
.
actualMerchantName
return
item
})
this
.
setData
({
customerList
:
pageNum
==
1
?
list
:
[...
customerList
,
...
list
],
triggered
:
false
,
...
...
@@ -135,8 +139,15 @@ Component({
})
},
submit
(
data
)
{
let
obj
=
[
'merchantId'
,
'merchantName'
,
'contactName'
,
'phone'
,
'mainBrand'
,
'newCarSales'
,
'existUserNumber'
]
let
objList
=
{}
obj
.
forEach
(
item
=>
{
if
(
data
[
item
])
{
objList
[
item
]
=
data
[
item
]
}
})
mineApi
.
saveMerchantCustomInfo
(
data
)
.
saveMerchantCustomInfo
(
objList
)
.
then
(
result
=>
{
console
.
log
(
result
)
this
.
setData
({
...
...
@@ -157,6 +168,7 @@ Component({
// 提交客户信息更新
// this.checkout(customerList[index])
// console.log('customerList[index]', customerList[index])
// let {} =
!
isSuper
&&
this
.
submit
(
customerList
[
index
])
}
else
{
customerList
[
index
][
'isEdit'
]
=
true
...
...
pages/mineDetail/messageBox/messageBox.js
View file @
728c8a6
...
...
@@ -63,15 +63,20 @@ Component({
current
:
valueurl
})
},
downLoad
(
e
)
{
const
{
item
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
posterItem
:
{
activityName
:
item
.
activityName
,
posterUrl
:
item
.
valueUrl
}
})
},
copyLink
(
e
)
{
console
.
log
(
e
)
let
{
url
}
=
e
.
currentTarget
.
dataset
console
.
log
(
url
)
handleCopy
(
url
)
// console.log(e.current.)
// wx.$api.setCopyData(url, () => {
// // wx.$spi.showToast('复制成功')
// })
},
// handleCopy(e) {
// var { idx } = e.currentTarget.dataset
...
...
pages/mineDetail/messageBox/messageBox.wxml
View file @
728c8a6
...
...
@@ -52,11 +52,13 @@
</view>
<view class="warReportLink">
<view class="label">点击了解详情:</view>
<!-- bind:tap="preView" -->
<view
class="link"
wx:if="{{item.valueUrl}}"
data-valueurl="{{item.valueUrl}}"
bind:tap="preView">
data-item="{{item}}"
bind:tap="downLoad">
战报详情
</view>
</view>
...
...
@@ -123,4 +125,5 @@
</scroll-view>
</view>
</view>
<crowdfund-poster item="{{posterItem}}" />
pages/tab/index/index.js
View file @
728c8a6
...
...
@@ -8,7 +8,7 @@ const IMAGES = Object.freeze({
// `${IMG_URL}index/car2.png`,
//本地图片路径
let
IMG_URLLocal
=
'../../../images/'
import
{
productBysceneApi
,
unreadApi
,
pageApi
,
readApi
,
tagApi
}
from
'~/api/index.js'
import
{
productBysceneApi
,
unreadApi
,
pageApi
,
readApi
,
tagApi
,
battleMessageApi
}
from
'~/api/index.js'
Page
({
// behaviors: [kfMixin],
...
...
@@ -551,9 +551,12 @@ Page({
// console.log('itemIndx: ', itemIndx);
// key: 'clueSource'
if
(
item
[
'key'
]
==
'clueSource'
)
{
itemIndx
+=
1
// itemIndx += 1
obj
[
item
[
'key'
]]
=
itemIndx
==
2
?
''
:
itemIndx
+
1
}
else
{
obj
[
item
[
'key'
]]
=
itemIndx
==
2
?
''
:
itemIndx
}
obj
[
item
[
'key'
]]
=
itemIndx
==
2
||
itemIndx
==
3
?
''
:
itemIndx
// || itemIndx == 3
}
return
obj
},
{})
...
...
@@ -639,13 +642,30 @@ Page({
onReachBottom
()
{
console
.
log
(
'滑到底部了'
)
},
// 展示海报
getSharePost
(
merchantId
)
{
battleMessageApi
({
serviceMerchantId
:
merchantId
})
.
then
(
result
=>
{
// console.log(result)
// 为2是已经展示过了
result
.
status
!=
2
&&
this
.
setData
({
posterItem
:
{
activityName
:
result
.
activityName
,
// posterUrl: 'https://wx.glsx.com.cn/upload/biz/587076735934271488.png'
posterUrl
:
result
.
valueUrl
}
})
})
.
catch
(
err
=>
{})
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
// setTimeout(()=>{
//
console.log('this.data.tabBarStyle',this.data.tabBarStyle,this.data.headerHeight
)
// }
)
let
{
userInfo
}
=
wx
.
$storage
.
get
()
//
console.log(userInfo
)
!
userInfo
.
isSuper
&&
this
.
getSharePost
(
userInfo
.
subLoginUser
.
merchantId
)
},
onPageScroll
:
(
function
()
{
let
timer
=
null
...
...
pages/tab/index/index.wxml
View file @
728c8a6
...
...
@@ -141,7 +141,7 @@
hover-stop-propagation="false"
data-type="active"
data-item="{{item}}"
wx:if="{{item.applyStatus == 0}}"
wx:if="{{item.applyStatus == 0}}"
bindtap="gotoApply">
开通活动
</view>
...
...
@@ -309,4 +309,5 @@
</form>
</view>
</view>
<crowdfund-poster item="{{posterItem}}" />
utils/constantData.js
View file @
728c8a6
...
...
@@ -13,11 +13,12 @@ export const STORAGE_OBJECTkEY = {
auto_login_object
:
'auto_login_object'
,
wx_user_info
:
'wx_user_info'
,
userPhone
:
'userPhone'
,
firstLogin
:
'firstLogin'
,
authphone
:
'authphone'
firstLogin
:
'firstLogin'
,
authphone
:
'authphone'
,
posterTimer
:
'posterTimer'
}
export
const
IMG_VERSION
=
()
=>
{
export
const
IMG_VERSION
=
()
=>
{
const
accountInfo
=
wx
.
getAccountInfoSync
()
return
accountInfo
.
miniProgram
.
version
||
'1.0.0'
}
\ No newline at end of file
}
utils/request/environment.js
View file @
728c8a6
...
...
@@ -6,7 +6,41 @@ const target = ['ip', 'dev', 'uat', 'prod']
2测试
3生产
*/
const
index
=
2
// const index = 1
const
accountInfo
=
wx
.
getAccountInfoSync
()
const
systemInfo
=
wx
.
getSystemInfoSync
()
// console.log(systemInfo);
// console.log(accountInfo.miniProgram.envVersion)
//手动控制体验版环境的请求 true就依据下面index false就默认为2
const
manual
=
false
const
release
=
false
let
index
=
2
// 判断小程序环境
// develop:开发版(正常开发工具,测试时)
// trial:体验版
// release:正式版
// console.log( systemInfo.platform);
// console.log(accountInfo.miniProgram.envVersion);
if
(
systemInfo
.
platform
!=
'devtools'
)
{
switch
(
accountInfo
.
miniProgram
.
envVersion
)
{
case
'develop'
:
// this.globalData.url = 'http://192.168.0.252:3000/api'; //
break
case
'trial'
:
index
=
manual
?
index
:
2
break
case
'release'
:
index
=
release
?
index
:
3
break
default
:
index
=
3
break
}
}
const
secretKey
=
{
ip
:
{},
...
...
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