Commit 36bc6298 by 张立顺

代码提交

1 parent 083a4c9c
// app.js
import * as Sentry from './utils/lib/sentry-miniapp'
// accountInfo.miniProgram.envVersion == 'release' &&
Sentry.init({
const accountInfo = wx.getAccountInfoSync()
//测试和生产才开发sentry
const env = ['trial', 'release']
env.includes(accountInfo.miniProgram.envVersion) && Sentry.init({
// dsn: 'http://ebcf31c417cc4ce185782f046e4a87a2@sentry.glsx.com.cn/5'
dsn: 'https://59c3cfc3ffb84ed68fc0dda26fb09e12@sentry.glsx.com.cn/30'
})
......
......@@ -31,7 +31,8 @@
width: 320rpx;
height: 88rpx;
line-height: 88rpx;
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
background: #3666FE;
// background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
border-radius: 16rpx;
font-weight: 500;
font-size: 32rpx;
......
......@@ -37,7 +37,7 @@ Component({
})
},
async init(n, ImgWidth, ImgHeight) {
let proportion = ImgWidth / 247
let proportion = ImgWidth / 279
let actualHeight = ImgHeight / proportion
console.log(actualHeight)
wx.$api.showLoading()
......@@ -46,7 +46,7 @@ Component({
{
width: 279,
// height: 554
height: 82 + actualHeight
height: actualHeight
},
this
),
......@@ -54,55 +54,55 @@ Component({
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: 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
}
}
]
// 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()
......
......@@ -19,11 +19,32 @@
background: rgba(28, 27, 35, 0.60);
}
.titleTime {
height: 64rpx;
line-height: 64rpx;
width: 100%;
background-color: rgba(54, 102, 254, 0.08);
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 22rpx;
color: #3666FE;
text-align: center;
}
.imgCon {
height: calc(100% - 64rpx);
overflow: scroll;
}
.poster {
background-color: #fff;
box-sizing: border-box;
// padding-bottom: 10rpx;
width: 558rpx;
// height: 60%;
height: 1108rpx;
overflow: scroll;
// overflow: scroll;
border-radius: 8rpx;
}
......@@ -31,7 +52,8 @@
width: 320rpx;
height: 88rpx;
line-height: 88rpx;
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
background: #3666FE;
// background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
border-radius: 16rpx;
font-weight: 500;
font-size: 32rpx;
......
......@@ -3,7 +3,10 @@
<!-- catchtouchmove="noScroll" -->
<view class="bg" bindtap="hide" />
<view class="poster">
<image src="{{poster}}" mode="widthFix" />
<view class="titleTime">最近更新时间 {{item.updatedTime}}</view>
<view class="imgCon" catchtouchmove="noScroll">
<image src="{{poster}}" mode="widthFix" />
</view>
</view>
<view class="btn" bindtap="download">下载图片并转发</view>
<!-- <view class="tips">提示:这是您的专属活动海报,请下载转发给门店员工注册并参与活动分享。请不要将此海报转发给非相关活动参与者,避免活动数据泄漏。</view> -->
......
......@@ -98,7 +98,7 @@ Page({
cluePageSize: 1000,
clueCurrentPage: 1,
disLikeFlag: true,
clueParams:{} //看线索参数
clueParams: {} //看线索参数
},
//引导图
......@@ -527,14 +527,14 @@ Page({
this.getTagApi(params)
},
//看线索重置
resetCluelist(){
resetCluelist() {
let { typeList } = this.data
typeList.forEach(item => {
item.selectIndex = 2
})
this.setData({
typeList,
clueParams:{}
clueParams: {}
})
//重置数据
this.clearclueData()
......@@ -542,7 +542,6 @@ Page({
},
filterTypeFn(e) {
let { typeList } = this.data
let index = e.currentTarget.dataset.index
// 重置筛选
......@@ -556,8 +555,8 @@ Page({
wx.pro.showActionSheet({
itemList,
success(res) {
//重置数据
_this.clearclueData()
//重置数据
_this.clearclueData()
// 选中全部
let selectIndex = res.tapIndex
......@@ -579,7 +578,7 @@ Page({
}, {})
console.log(params)
// 清空数据
_this.setData({ typeList ,clueParams:params})
_this.setData({ typeList, clueParams: params })
_this.getPageApi(params)
},
fail(res) {
......@@ -588,10 +587,10 @@ Page({
})
},
//重置数据
clearclueData(){
clearclueData() {
this.setData({
clueList:[],
clueCurrentPage:1,
clueList: [],
clueCurrentPage: 1
// hasPhone: '',
// starTag: '',
// clueSource: '',
......@@ -624,17 +623,15 @@ Page({
},
//获取浏览线索数据列表
async getPageApi(param) {
let { cluePageSize, clueCurrentPage ,clueList} = this.data
let { cluePageSize, clueCurrentPage, clueList } = this.data
let params = {
pageSize: cluePageSize,
currentPage: clueCurrentPage,
...param,
...param
}
let { code, data } = await pageApi(params)
if (code == 0) {
let arr = data.list.map(item => {
if (item.visitList.length > 5) {
item.getMoreFlag = true
}
......@@ -645,9 +642,9 @@ Page({
// let concatArr = []
// if(arr.length > 0) {
// concatArr = clueList.concat(arr)
// }
this.setData({
clueList: arr
})
......@@ -659,19 +656,17 @@ Page({
},
//喜欢收藏功能
async getTagApi(param) {
let {clueParams} = this.data
let { clueParams } = this.data
let res = await tagApi(param)
console.log('res: ', res)
console.log('res: ', res)
if(res.code == 0){
if (res.code == 0) {
let clueListPamas = {
...param,
...clueParams
}
this.getPageApi(clueListPamas)
this.getPageApi(clueListPamas)
}
},
onReachBottom() {
console.log('滑到底部了')
......@@ -682,15 +677,26 @@ Page({
.then(result => {
// console.log(result)
// 为2是已经展示过了
// if (result.status && result.status != 2) {
if (result.status && result.status != 2) {
// debugger
let time = result.updatedTime.split(' ')
let moth = time[0].split('-')
let hour = time[1].split(':')
moth.shift()
hour = hour.slice(0, -1)
moth = moth.join('-')
hour = hour.join(':')
let updatedTime = `${moth} ${hour}`
console.log(updatedTime)
this.setData({
posterItem: {
activityName: result.activityName,
// posterUrl: 'https://wx.glsx.com.cn/upload/biz/587076735934271488.png'
posterUrl: result.valueUrl
posterUrl: result.valueUrl,
updatedTime
}
})
// }
}
})
.catch(err => {})
},
......@@ -708,7 +714,7 @@ Page({
gaptime = 200
}
let _lastTime = null
return function() {
return function () {
let _nowTime = +new Date()
if (_nowTime - _lastTime > gaptime || !_lastTime) {
fn.apply(this, arguments)
......@@ -729,16 +735,16 @@ Page({
}
})(),
// 上拉刷新
scrolltolowerFn(){
console.log('scrolltolowerFn: ');
scrolltolowerFn() {
console.log('scrolltolowerFn: ')
let {clueCurrentPage,clueParams} = this.data
console.log('clueCurrentPage: ', clueCurrentPage);
let { clueCurrentPage, clueParams } = this.data
console.log('clueCurrentPage: ', clueCurrentPage)
let params = {
...clueParams,
clueCurrentPage:clueCurrentPage++
clueCurrentPage: clueCurrentPage++
}
this.setData({
clueCurrentPage
})
......@@ -759,7 +765,7 @@ Page({
*/
onPullDownRefresh: function () {
// console.log('onPullDownRefresh: ');
let {clueParams} = this.data
let { clueParams } = this.data
this.getClueInit(clueParams)
// this.resetCluelist()
// this.onLoad()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!