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