Commit 36bc6298 by 张立顺

代码提交

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