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 0b185588
authored
Nov 29, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
28号bug修复
1 parent
bfac1e9d
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
58 additions
and
52 deletions
components/CrowdfundPoster/CrowdfundPoster.js
components/CrowdfundPoster/CrowdfundPoster.scss
components/CrowdfundPoster/CrowdfundPoster.wxml
packagesList/mineDetail/pages/messageBox.js
packagesList/mineDetail/pages/messageBox.wxml
pages/tab/index/index.wxml
pages/tab/output/components/client/client.js
project.config.json
utils/format.js
utils/request/environment.js
components/CrowdfundPoster/CrowdfundPoster.js
View file @
0b18558
...
...
@@ -10,19 +10,27 @@ Component({
item
:
{
type
:
Object
,
observer
(
n
)
{
// 如果是喜报和战报就跳过图片生成
if
(
n
.
type
==
'warReport'
)
{
// n.posterUrl
return
this
.
setData
({
poster
:
n
.
posterUrl
,
show
:
true
})
}
n
.
posterUrl
&&
this
.
checkUrl
()
.
then
(
result
=>
{
result
&&
this
.
setData
({
poster
:
result
,
show
:
true
})
})
.
catch
(
err
=>
{
console
.
log
(
err
)
this
.
begin
()
})
.
then
(
result
=>
{
result
&&
this
.
setData
({
poster
:
result
,
show
:
true
})
})
.
catch
(
err
=>
{
console
.
log
(
err
)
this
.
begin
()
})
}
},
scrollImg
:
{
...
...
@@ -46,23 +54,18 @@ Component({
methods
:
{
// 图片缓存 有取小程序缓存图片
checkUrl
()
{
let
{
item
:
postObj
}
=
this
.
data
console
.
log
(
'checkUrl'
)
let
{
item
:
postObj
}
=
this
.
data
const
fileList
=
wx
.
$storage
.
get
(
'fileList'
)
||
[],
fn
=
wx
.
getFileSystemManager
(),
{
findKey
}
=
this
.
data
{
findKey
}
=
this
.
data
return
new
Promise
((
resolve
,
reject
)
=>
{
// return reject()
if
(
fileList
.
length
)
{
fn
.
readdir
({
dirPath
:
wx
.
env
.
USER_DATA_PATH
,
success
({
files
})
{
success
({
files
})
{
let
obj
=
fileList
.
find
(
e
=>
e
[
findKey
]
===
postObj
[
findKey
])
const
poster
=
files
.
find
(
s
=>
obj
?.
path
.
includes
(
s
))
wx
.
hideLoading
()
...
...
@@ -96,9 +99,7 @@ Component({
})
},
begin
()
{
let
{
item
}
=
this
.
data
let
{
item
}
=
this
.
data
item
.
posterUrl
&&
this
.
getImageInfo
(
item
)
},
check
(
n
)
{
...
...
@@ -125,9 +126,7 @@ Component({
})
},
async
init
(
n
,
ImgWidth
,
ImgHeight
)
{
const
{
findKey
}
=
this
.
data
const
{
findKey
}
=
this
.
data
// debugger
// const {pixelRatio} = wx.getWindowInfo()
let
actualWidth
=
247
//默认宽度
...
...
@@ -159,9 +158,7 @@ Component({
},
this
),
{
userInfo
}
=
wx
.
$storage
.
get
(),
{
userInfo
}
=
wx
.
$storage
.
get
(),
merchantName
=
userInfo
.
merchantName
.
length
>
12
?
`
${
userInfo
.
merchantName
.
substring
(
0
,
12
)}
...`
:
userInfo
.
merchantName
console
.
log
(
merchantName
)
// console.log(n.activityName)
...
...
@@ -169,19 +166,21 @@ Component({
textList
=
[]
// debugger
if
(
n
.
type
==
'warReport'
)
{
imageList
=
[{
x
:
0
,
y
:
0
,
width
:
actualWidth
+
32
,
height
:
actualHeight
+
82
,
url
:
n
.
posterUrl
}]
imageList
=
[
{
x
:
0
,
y
:
0
,
width
:
actualWidth
+
32
,
height
:
actualHeight
+
82
,
url
:
n
.
posterUrl
}
]
textList
=
[]
}
else
{
n
.
activityName
=
n
.
activityName
.
length
>
12
?
`
${
n
.
activityName
.
substring
(
0
,
12
)}
...`
:
n
.
activityName
imageList
=
[{
imageList
=
[
{
x
:
0
,
y
:
0
,
width
:
279
,
...
...
@@ -196,7 +195,8 @@ Component({
url
:
n
.
posterUrl
}
]
textList
=
[{
textList
=
[
{
x
:
12
,
y
:
14
,
fontSize
:
14
,
...
...
@@ -304,10 +304,8 @@ Component({
})
},
longpress
()
{
let
{
_item_
}
=
this
.
data
this
.
triggerEvent
(
'longtouch'
,
_item_
)
let
{
item
}
=
this
.
data
this
.
triggerEvent
(
'longtouch'
,
item
)
}
}
})
\ No newline at end of file
})
components/CrowdfundPoster/CrowdfundPoster.scss
View file @
0b18558
...
...
@@ -25,6 +25,7 @@
box-sizing
:
border-box
;
width
:
500rpx
;
max-height
:
68%
;
// height: 68%;
// height: 1108rpx;
overflow
:
scroll
;
border-radius
:
8rpx
8rpx
0
0
;
...
...
components/CrowdfundPoster/CrowdfundPoster.wxml
View file @
0b18558
...
...
@@ -8,6 +8,7 @@
<scroll-view scroll-y scroll-x="false" style="height: 100%">
<!-- mode="widthFix" -->
<image
onload
src="{{poster}}"
mode="widthFix"
show-menu-by-longpress
...
...
@@ -26,6 +27,7 @@
bindlongpress="longpress" />
</scroll-view>
<!-- </view> -->
`
</block>
</view>
<view class="btn">
...
...
packagesList/mineDetail/pages/messageBox.js
View file @
0b18558
...
...
@@ -89,7 +89,8 @@ Component({
},
showPoster
(
e
)
{
const
{
item
}
=
e
.
currentTarget
.
dataset
let
updatedTime
=
deleteSecond
(
item
.
updatedTime
)
let
updatedTime
=
deleteSecond
(
item
.
createdTime
)
this
.
setData
({
// findKey: 'crowdFundActivityId',
posterItem
:
{
...
...
packagesList/mineDetail/pages/messageBox.wxml
View file @
0b18558
...
...
@@ -34,7 +34,7 @@
wx:key='index'
merchantName="{{item.merchantName}}"
messageType="{{item.messageType}}"
time="{{item.
upd
atedTime}}">
time="{{item.
cre
atedTime}}">
<view class="warReportBox" wx:if="{{item.messageType == 2}}">
<view class="item">
<view class="label">当前产值</view>
...
...
@@ -83,7 +83,7 @@
wx:key='index'
merchantName="{{item.merchantName}}"
messageType="{{item.messageType}}"
time="{{item.
upd
atedTime}}">
time="{{item.
cre
atedTime}}">
<view wx:if="{{item.messageType == 1}}">
<view class="cell">
<view class="label">活动名称:</view>
...
...
@@ -108,11 +108,11 @@
</view>
<view class="cell" wx:if="{{item.messageType == 5}}">
<view class="label">新车交付场景:</view>
<view class="value">{{item.productName}}</view>
<view class="value">{{item.
activityName||item.
productName}}</view>
</view>
<view class="cell" wx:if="{{item.messageType == 6}}">
<view class="label">0~12个月场景:</view>
<view class="value">{{item.activityName}}</view>
<view class="value">{{item.activityName
||item.productName
}}</view>
</view>
</msg-box>
</scroll-view>
...
...
pages/tab/index/index.wxml
View file @
0b18558
...
...
@@ -101,7 +101,7 @@
</view>
</view>
<!-- -->
<crowdfund-poster wx:
show
="{{!guideShow}}" item="{{posterItem}}" />
<crowdfund-poster wx:
if
="{{!guideShow}}" item="{{posterItem}}" />
<!-- 全屏视频组件 -->
<FullscreenVideo id="videocomp" src="{{videoSrc}}" title="{{videoTitle}}" />
pages/tab/output/components/client/client.js
View file @
0b18558
...
...
@@ -50,10 +50,12 @@ Component({
})
},
onBindRefresh
()
{
this
.
clientRefresh
(
true
)
},
clientRefresh
(
isPull
=
false
)
{
this
.
getPMerchantInfo
()
console
.
log
(
'clientRefresh'
);
this
.
setData
({
[
'pageObj.currentPage'
]:
1
,
list
:
[]
...
...
project.config.json
View file @
0b18558
{
"appid"
:
"wx2
4ebae5768e74138
"
,
"appid"
:
"wx2
c28337db96364d2
"
,
"projectname"
:
"business-assistant"
,
"compileType"
:
"miniprogram"
,
"packOptions"
:
{
...
...
utils/format.js
View file @
0b18558
...
...
@@ -153,6 +153,8 @@ export function setPrice(price) {
}
export
function
deleteSecond
(
time
)
{
console
.
log
(
time
)
if
(
!
time
.
length
)
return
''
time
=
time
.
split
(
' '
)
let
moth
=
time
[
0
].
split
(
'-'
)
let
hour
=
time
[
1
].
split
(
':'
)
...
...
utils/request/environment.js
View file @
0b18558
...
...
@@ -17,7 +17,7 @@ const systemInfo = wx.getSystemInfoSync()
const
manual
=
false
const
release
=
false
let
index
=
2
let
index
=
3
// 判断小程序环境
// 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