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 4eb0d246
authored
Oct 28, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bug修复
1 parent
5398db2f
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
272 additions
and
32 deletions
components/CrowdfundPoster/CrowdfundPoster.js
components/CrowdfundPoster/CrowdfundPoster.scss
components/CrowdfundPoster/CrowdfundPoster.wxml
components/SceneBox/SceneBox.wxml
pages/tab/index/components/CrowdfundPoster/CrowdfundPoster.js
pages/tab/index/components/CrowdfundPoster/CrowdfundPoster.json
pages/tab/index/components/CrowdfundPoster/CrowdfundPoster.scss
pages/tab/index/components/CrowdfundPoster/CrowdfundPoster.wxml
pages/tab/index/index.js
pages/tab/index/index.json
pages/tab/output/components/SceneBox/SceneBox.js
pages/tab/output/components/SceneBox/SceneBox.wxml
pages/tab/output/components/SceneBox/SceneBox.wxss
utils/request/environment.js
components/CrowdfundPoster/CrowdfundPoster.js
View file @
4eb0d24
...
@@ -37,12 +37,16 @@ Component({
...
@@ -37,12 +37,16 @@ Component({
})
})
},
},
async
init
(
n
,
ImgWidth
,
ImgHeight
)
{
async
init
(
n
,
ImgWidth
,
ImgHeight
)
{
let
proportion
=
ImgWidth
/
247
let
actualHeight
=
ImgHeight
/
proportion
console
.
log
(
actualHeight
)
wx
.
$api
.
showLoading
()
wx
.
$api
.
showLoading
()
const
drawfun
=
new
Draw
(
const
drawfun
=
new
Draw
(
{
{
width
:
279
,
width
:
279
,
height
:
554
// height: 554
height
:
82
+
actualHeight
},
},
this
this
),
),
...
@@ -61,7 +65,7 @@ Component({
...
@@ -61,7 +65,7 @@ Component({
x
:
16
,
x
:
16
,
y
:
70
,
y
:
70
,
width
:
247
,
width
:
247
,
height
:
472
,
height
:
actualHeight
,
url
:
n
.
posterUrl
url
:
n
.
posterUrl
}
}
],
],
...
...
components/CrowdfundPoster/CrowdfundPoster.scss
View file @
4eb0d24
...
@@ -21,7 +21,9 @@
...
@@ -21,7 +21,9 @@
.poster
{
.poster
{
width
:
558rpx
;
width
:
558rpx
;
height
:
60%
;
// height: 60%;
height
:
1108rpx
;
overflow
:
scroll
;
border-radius
:
8rpx
;
border-radius
:
8rpx
;
}
}
...
...
components/CrowdfundPoster/CrowdfundPoster.wxml
View file @
4eb0d24
<block wx:if="{{show}}">
<block wx:if="{{show}}">
<view class="layout" catchtouchmove="noScroll">
<!-- catchtouchmove="noScroll" -->
<view class="bg" bindtap="hide"></view>
<view class="layout">
<image src="{{poster}}" class="poster" mode="aspectFit"></image>
<view class="bg" bindtap="hide" />
<view class="btn" bindtap="download">保存至相册</view>
<view class="poster">
<view class="tips">
<!-- <scroll-view scroll-x="false" scroll-y="true" style="height: 100%"> -->
提示:这是您的专属活动海报,请下载转发给门店员工注册并参与活动分享。请不要将此海报转发给非相关活动参与者,避免活动数据泄漏。
<image src="{{poster}}" mode="widthFix" />
<!-- </scroll-view> -->
</view>
</view>
<view class="btn" bindtap="download">保存至相册</view>
<view class="tips">提示:这是您的专属活动海报,请下载转发给门店员工注册并参与活动分享。请不要将此海报转发给非相关活动参与者,避免活动数据泄漏。</view>
</view>
</view>
</block>
</block>
<authorize scopeType="writePhotosAlbum" bindfail="authFail" show="{{showAuth}}" isShowCheck="{{false}}" id="auth"></authorize>
\ No newline at end of file
\ No newline at end of file
<authorize
scopeType="writePhotosAlbum"
bindfail="authFail"
show="{{showAuth}}"
isShowCheck="{{false}}"
id="auth" />
components/SceneBox/SceneBox.wxml
View file @
4eb0d24
...
@@ -6,7 +6,8 @@
...
@@ -6,7 +6,8 @@
wx:key="index"
wx:key="index"
bindtap="handleClick"
bindtap="handleClick"
data-idx="{{index + 1}}">
data-idx="{{index + 1}}">
<view wx:if="{{hasOpenIcon && formData['scene' + (index + 1)] && sceneActive != (index + 1)}}" class="open-icon">
<!-- && sceneActive != (index + 1) -->
<view wx:if="{{hasOpenIcon && formData['scene' + (index + 1)]}}" class="open-icon">
<image src="{{openedIcon}}" webp></image>
<image src="{{openedIcon}}" webp></image>
</view>
</view>
<image wx:if="{{formData['scene' + (index + 1)]}}" class="scene-img" src="{{IMGURL}}output/caract0{{index + 1}}.png?v={{img_version}}" />
<image wx:if="{{formData['scene' + (index + 1)]}}" class="scene-img" src="{{IMGURL}}output/caract0{{index + 1}}.png?v={{img_version}}" />
...
...
pages/tab/index/components/CrowdfundPoster/CrowdfundPoster.js
0 → 100644
View file @
4eb0d24
// packageOutput/pages/summary/components/CrowdfundPoster/CrowdfundPoster.js
import
Draw
from
'~/utils/Draw'
Component
({
/**
* 组件的属性列表
*/
properties
:
{
item
:
{
type
:
Object
,
observer
(
n
)
{
console
.
log
(
n
,
'================='
)
this
.
getImageInfo
(
n
)
}
}
},
/**
* 组件的初始数据
*/
data
:
{},
/**
* 组件的方法列表
*/
methods
:
{
getImageInfo
(
n
)
{
let
that
=
this
wx
.
getImageInfo
({
src
:
n
.
posterUrl
,
success
:
function
(
res
)
{
console
.
log
(
res
)
// w = res.width
// h = res.height
that
.
init
(
n
,
res
.
width
,
res
.
height
)
}
})
},
async
init
(
n
,
ImgWidth
,
ImgHeight
)
{
let
proportion
=
ImgWidth
/
247
let
actualHeight
=
ImgHeight
/
proportion
console
.
log
(
actualHeight
)
wx
.
$api
.
showLoading
()
const
drawfun
=
new
Draw
(
{
width
:
279
,
// height: 554
height
:
82
+
actualHeight
},
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
:
actualHeight
,
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
,
_this
=
this
wx
.
saveImageToPhotosAlbum
({
filePath
,
success
()
{
wx
.
$api
.
showToast
(
'保存成功'
)
},
fail
(
err
)
{
const
auth
=
_this
.
selectComponent
(
'#auth'
)
auth
.
check
()
}
})
},
hide
()
{
this
.
setData
({
show
:
false
,
poster
:
''
})
},
noScroll
()
{},
authFail
(
e
)
{
this
.
setData
({
showAuth
:
true
})
}
}
})
pages/tab/index/components/CrowdfundPoster/CrowdfundPoster.json
0 → 100644
View file @
4eb0d24
{
"component"
:
true
,
"usingComponents"
:
{
"authorize"
:
"../../../../../components/Authorize/Authorize"
}
}
pages/tab/index/components/CrowdfundPoster/CrowdfundPoster.scss
0 → 100644
View file @
4eb0d24
/* 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%;
height
:
1108rpx
;
overflow
:
scroll
;
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
\ No newline at end of file
pages/tab/index/components/CrowdfundPoster/CrowdfundPoster.wxml
0 → 100644
View file @
4eb0d24
<block wx:if="{{show}}">
<view class="layout">
<!-- catchtouchmove="noScroll" -->
<view class="bg" bindtap="hide" />
<view class="poster">
<image src="{{poster}}" mode="widthFix" />
</view>
<view class="btn" bindtap="download">下载图片并转发</view>
<!-- <view class="tips">提示:这是您的专属活动海报,请下载转发给门店员工注册并参与活动分享。请不要将此海报转发给非相关活动参与者,避免活动数据泄漏。</view> -->
</view>
</block>
<authorize
scopeType="writePhotosAlbum"
bindfail="authFail"
show="{{showAuth}}"
isShowCheck="{{false}}"
id="auth" />
pages/tab/index/index.js
View file @
4eb0d24
...
@@ -434,7 +434,7 @@ Page({
...
@@ -434,7 +434,7 @@ Page({
})
})
wx
.
$storage
.
set
(
'firstLogin'
,
'firstLogin'
)
wx
.
$storage
.
set
(
'firstLogin'
,
'firstLogin'
)
}
}
if
(
this
.
data
.
guideShow
)
{
if
(
this
.
data
.
guideShow
)
{
wx
.
$storage
.
set
(
'disLikeRecordFlag'
,
true
)
wx
.
$storage
.
set
(
'disLikeRecordFlag'
,
true
)
let
disLikeRecordFlag
=
wx
.
$storage
.
get
(
'disLikeRecordFlag'
)
let
disLikeRecordFlag
=
wx
.
$storage
.
get
(
'disLikeRecordFlag'
)
this
.
setData
({
this
.
setData
({
...
...
pages/tab/index/index.json
View file @
4eb0d24
...
@@ -2,8 +2,9 @@
...
@@ -2,8 +2,9 @@
"usingComponents"
:
{
"usingComponents"
:
{
"product"
:
"./components/product/product"
,
"product"
:
"./components/product/product"
,
"vas-toast"
:
"./components/likeToast/likeToast"
,
"vas-toast"
:
"./components/likeToast/likeToast"
,
"shareModel"
:
"./components/shareModel/shareModel"
"shareModel"
:
"./components/shareModel/shareModel"
,
"crowdfund-poster"
:
"./components/CrowdfundPoster/CrowdfundPoster"
},
},
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"onReachBottomDistance"
:
50
"onReachBottomDistance"
:
50
}
}
pages/tab/output/components/SceneBox/SceneBox.js
View file @
4eb0d24
...
@@ -15,7 +15,7 @@ Component({
...
@@ -15,7 +15,7 @@ Component({
},
},
formData
:
{
formData
:
{
type
:
Object
,
type
:
Object
,
value
:
()
=>
{
}
value
:
()
=>
{}
},
},
scenePriceList
:
{
scenePriceList
:
{
type
:
Array
,
type
:
Array
,
...
@@ -28,19 +28,25 @@ Component({
...
@@ -28,19 +28,25 @@ Component({
*/
*/
data
:
{
data
:
{
IMGURL
:
IMG_URL
,
IMGURL
:
IMG_URL
,
custSceneList
:
[{
openedIcon
:
`
${
IMG_URL
}
/output/openedIcon.png`
,
custSceneList
:
[
{
title
:
'新车洽谈场景'
,
title
:
'新车洽谈场景'
,
subTitle
:
'1.0新车权益销售'
subTitle
:
'1.0新车权益销售'
},
{
},
{
title
:
'新车交付场景'
,
title
:
'新车交付场景'
,
subTitle
:
'1.1新车精品升级'
subTitle
:
'1.1新车精品升级'
},
{
},
{
title
:
'0-12个月'
,
title
:
'0-12个月'
,
subTitle
:
'1.2新车线上转化'
subTitle
:
'1.2新车线上转化'
},
{
},
{
title
:
'12个月以上'
,
title
:
'12个月以上'
,
subTitle
:
'1.3存量用户众筹'
subTitle
:
'1.3存量用户众筹'
}]
}
]
},
},
/**
/**
...
...
pages/tab/output/components/SceneBox/SceneBox.wxml
View file @
4eb0d24
...
@@ -6,9 +6,11 @@
...
@@ -6,9 +6,11 @@
wx:key="index"
wx:key="index"
bindtap="handleClick"
bindtap="handleClick"
data-idx="{{index + 1}}">
data-idx="{{index + 1}}">
<view wx:if="{{formData['showList'][index]}}" class="open-icon">已开通</view>
<view wx:if="{{formData['showList'][index]}}" class="open-icon">
<image src="{{openedIcon}}" webp></image>
</view>
<image wx:if="{{formData['showList'][index]}}" class="scene-img" src="{{IMGURL}}output/caract0{{index + 1}}.png?v={{img_version}}" />
<image wx:if="{{formData['showList'][index]}}" class="scene-img" src="{{IMGURL}}output/caract0{{index + 1}}.png?v={{img_version}}" />
<image wx:else class="
scene-img" src="{{IMGURL}}output/car
0{{index + 1}}.png?v={{img_version}}" />
<image wx:else class="
lock-img " src="{{IMGURL}}output/carlock
0{{index + 1}}.png?v={{img_version}}" />
<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}}" -->
...
...
pages/tab/output/components/SceneBox/SceneBox.wxss
View file @
4eb0d24
...
@@ -41,16 +41,11 @@
...
@@ -41,16 +41,11 @@
.open-icon {
.open-icon {
box-sizing: border-box;
box-sizing: border-box;
position: absolute;
position: absolute;
left: 0.5rpx;
position: absolute;
top: 0.5rpx;
top: 0;
width: 56rpx;
right: 0;
height: 32rpx;
width: 78rpx;
line-height: 24rpx;
height: 78rpx;
background: #FEEBD6;
border-radius: 6rpx 0 8rpx 0;
font-size: 16rpx;
color: #EF971E;
padding: 4rpx;
}
}
/* 已开通 - end */
/* 已开通 - end */
...
@@ -102,3 +97,8 @@
...
@@ -102,3 +97,8 @@
color: #3666FE;
color: #3666FE;
font-weight: 600;
font-weight: 600;
}
}
.lock-img {
width: 92rpx;
height: 64rpx;
}
\ No newline at end of file
\ No newline at end of file
utils/request/environment.js
View file @
4eb0d24
...
@@ -70,6 +70,7 @@ const domain = {
...
@@ -70,6 +70,7 @@ const domain = {
商城: 192.168.2.3:8558 */
商城: 192.168.2.3:8558 */
dev
:
'https://scrm.dev.glsx.com.cn'
,
dev
:
'https://scrm.dev.glsx.com.cn'
,
uat
:
'https://scrm.test.glsx.com.cn'
,
uat
:
'https://scrm.test.glsx.com.cn'
,
// uat: 'https://scrm.beta.glsx.com.cn',
prod
:
'https://scrm.cgacar.com'
prod
:
'https://scrm.cgacar.com'
}[
target
[
index
]]
}[
target
[
index
]]
...
...
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