bug修复页面优化

This commit is contained in:
高健 2021-09-09 15:44:19 +08:00
parent bf37c3e60e
commit 9b463236ef
12 changed files with 65 additions and 67 deletions

View File

@ -242,12 +242,6 @@ Page({
} else { } else {
area[i]['templateAreaFontStyle'] = 'italic' area[i]['templateAreaFontStyle'] = 'italic'
} }
// if (area[i].templateAreaServerLink == '1') {
// if (area[i].templateAreaFontValue.length > area[i].templateAreaFontLength) {
// area[i].templateAreaFontValue = area[i].templateAreaFontValue.substring(area[i].templateAreaFontLength, -1)
// }
// }
// area[i].templateAreaFontSize = Math.floor(() + 'rpx'
area[i].templateAreaFontSize = area[i].templateAreaFontSize / scale + 'px' area[i].templateAreaFontSize = area[i].templateAreaFontSize / scale + 'px'
area[i].templateAreaHeight = area[i].templateAreaHeight / scale area[i].templateAreaHeight = area[i].templateAreaHeight / scale
area[i].templateAreaWidth = area[i].templateAreaWidth / scale area[i].templateAreaWidth = area[i].templateAreaWidth / scale

View File

@ -11,7 +11,7 @@
<view <view
class="area-box {{item.templateAreaFontCenter == 'left' ? 'wrap-line' :''}} {{item.templateAreaFontCenter == 'center' ? 'wrap-center' :''}} {{item.templateAreaFontCenter == 'right' ? 'wrap-line' :''}} " class="area-box {{item.templateAreaFontCenter == 'left' ? 'wrap-line' :''}} {{item.templateAreaFontCenter == 'center' ? 'wrap-center' :''}} {{item.templateAreaFontCenter == 'right' ? 'wrap-line' :''}} "
wx:for="{{areaList}}" data-cur="{{index}}" catchtap="giveFocus" wx:key="index" wx:for="{{areaList}}" data-cur="{{index}}" catchtap="giveFocus" wx:key="index"
style="position:absolute;top: {{(item.templateAreaTop / cardInfo.picturesTemplateHeight) * 100 + '%'}};left:{{(item.templateAreaLeft / cardInfo.picturesTemplateWidth) * 100 + '%'}};color:{{item.templateAreaFontColor}};;width:{{item.templateAreaWidth }}px;height:{{item.templateAreaHeight}}px;font-size:{{item.templateAreaFontSize}};font-style:{{item.templateAreaFontStyle}};font-weight:{{item.templateAreaFontBold}};text-align:{{item.templateAreaFontCenter}};" style="position:absolute;top: {{(item.templateAreaTop / cardInfo.picturesTemplateHeight) * 100 + '%'}};left:{{(item.templateAreaLeft / cardInfo.picturesTemplateWidth) * 100 + '%'}};color:{{item.templateAreaFontColor}};;width:{{item.templateAreaWidth }}px;height:{{item.templateAreaHeight}}px;font-size:{{item.templateAreaFontSize}};font-style:{{item.templateAreaFontStyle}};font-weight:{{item.templateAreaFontBold}};text-align:{{item.templateAreaFontCenter}};line-height:{{item.templateAreaHeight}}px;"
wx:if="{{item.templateAreaServerLink == '1' && item.templateAreaType != '1'}}"> wx:if="{{item.templateAreaServerLink == '1' && item.templateAreaType != '1'}}">
{{item.templateAreaFontValue}} {{item.templateAreaFontValue}}
</view> </view>

View File

@ -16,7 +16,6 @@
} }
.area-box { .area-box {
white-space: nowrap;
background: none !important; background: none !important;
z-index: 111; z-index: 111;
} }
@ -212,7 +211,7 @@
/* 换行 */ /* 换行 */
.wrap-line { .wrap-line {
white-space: pre-line; overflow-wrap: break-word;
} }
/* 居中 */ /* 居中 */
@ -220,4 +219,5 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow-wrap: break-word;
} }

View File

@ -177,11 +177,12 @@ Page({
var type = res.target.dataset.sharetype var type = res.target.dataset.sharetype
var img = _self.data.imgUrl + _self.data.posterHistoryList[_self.data.curItemIndex].cardTemplateUsePhotoUrl var img = _self.data.imgUrl + _self.data.posterHistoryList[_self.data.curItemIndex].cardTemplateUsePhotoUrl
var id = _self.data.posterHistoryList[_self.data.curItemIndex].cardTemplateUseId var id = _self.data.posterHistoryList[_self.data.curItemIndex].cardTemplateUseId
var userId = _self.data.posterHistoryList[_self.data.curItemIndex].creator
if (type && type == '2') { if (type && type == '2') {
//转发个人动态 //转发个人动态
} else { } else {
var param = '/pages/index/index?cardTemplateUseId=' + id; var param = '/pages/index/index?cardTemplateUseId=' + id + '&userId=' + userId;
return { return {
title: '活动', title: '活动',
path: param, path: param,
@ -471,11 +472,4 @@ Page({
isShowSel: false isShowSel: false
}) })
} }
//分享到朋友圈
// onShareTimeline(options) {
// var params = {}
// params['title'] = '分享朋友圈'
// params['imageUrl'] = 'https://img2.baidu.com/it/u=2645096297,1507428582&fm=26&fmt=auto&gp=0.jpg'
// return params
// }
}) })

View File

@ -16,7 +16,6 @@
} }
.area-box { .area-box {
white-space: nowrap;
background: none !important; background: none !important;
z-index: 111; z-index: 111;
} }
@ -211,7 +210,7 @@
/* 换行 */ /* 换行 */
.wrap-line { .wrap-line {
white-space: pre-line; overflow-wrap: break-word;
} }
/* 居中 */ /* 居中 */
@ -219,4 +218,5 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow-wrap: break-word;
} }

View File

@ -33,6 +33,7 @@ Page({
otherCardList: [], //卡包名片 otherCardList: [], //卡包名片
isPlayAudio: false, //标识当前是否在播放音乐 isPlayAudio: false, //标识当前是否在播放音乐
audioId: '', audioId: '',
uId: '', //海报过来的UserId
count: 3, count: 3,
isMine: 1, //1 自己 2 其他 isMine: 1, //1 自己 2 其他
isDefault: true, isDefault: true,
@ -59,7 +60,8 @@ Page({
if (options.cardTemplateUseId) { if (options.cardTemplateUseId) {
//展示图片 //展示图片
self.setData({ self.setData({
posterId: options.cardTemplateUseId posterId: options.cardTemplateUseId,
uId: options.userId
}) })
} }
self.buildId() self.buildId()
@ -652,11 +654,12 @@ Page({
cardInfo: {}, cardInfo: {},
areaList: [] areaList: []
}) })
app.http.get(app.urls.getDefaultCard, { app.http.get(app.urls.getDefaultCard.format({
userId: self.data.uId
}), {
header: { header: {
token: app.globalData.token token: app.globalData.token
}, }
data: {}
}).then(res => { }).then(res => {
var area = res.data.areaList var area = res.data.areaList
area.forEach(it => { area.forEach(it => {
@ -1139,7 +1142,8 @@ Page({
cardTemplateUseId: '', cardTemplateUseId: '',
isShowCard: false, isShowCard: false,
isMine: 1, isMine: 1,
isDefault: false isDefault: false,
uId: ''
}) })
this.getDefault() this.getDefault()
} else if (type == 2) { } else if (type == 2) {

View File

@ -88,14 +88,11 @@ Page({
}) })
}, },
formatDate(date) { formatDate(date) {
var d = new Date(date), if (date.length > 0) {
month = '' + (d.getMonth() + 1), return date.slice(0, 11)
day = '' + d.getDate(), } else {
year = d.getFullYear(); return ''
}
if (month.length < 2) month = '0' + month;
if (day.length < 2) day = '0' + day;
return [year, month, day].join('-');
}, },
//获取菜单状态 //获取菜单状态
getMenuState() { getMenuState() {

View File

@ -8,7 +8,7 @@
<image src="{{cardUrl}}{{cardInfo.cardTemplateUseBackgroundImage}}" alt="" class="card-bgImg" <image src="{{cardUrl}}{{cardInfo.cardTemplateUseBackgroundImage}}" alt="" class="card-bgImg"
wx:if="{{cardInfo.cardTemplateUseBackgroundImage}}"></image> wx:if="{{cardInfo.cardTemplateUseBackgroundImage}}"></image>
<!-- 文字 --> <!-- 文字 -->
<view class="area-box" wx:for="{{areaList}}" data-cur="{{index}}" bindtap="giveFocus" wx:key="index" <view class="area-box {{item.templateAreaFontCenter == 'left' ? 'wrap-line' :''}} {{item.templateAreaFontCenter == 'center' ? 'wrap-center' :''}} {{item.templateAreaFontCenter == 'right' ? 'wrap-line' :''}} " wx:for="{{areaList}}" data-cur="{{index}}" bindtap="giveFocus" wx:key="index"
style="position:absolute;top: {{(item.templateAreaTop / cardInfo.cardTemplateUseHeight) * 100 + '%'}};left:{{(item.templateAreaLeft / cardInfo.cardTemplateUseWidth) * 100 + '%'}};color:{{item.templateAreaFontColor}};width:{{item.templateAreaWidth}}px;height:{{item.templateAreaHeight}}px;font-size:{{item.templateAreaFontSize}};font-style:{{item.templateAreaFontStyle}};font-weight:{{item.templateAreaFontBold}};text-align:{{item.templateAreaFontCenter}};line-height:{{item.templateAreaHeight}}px;" style="position:absolute;top: {{(item.templateAreaTop / cardInfo.cardTemplateUseHeight) * 100 + '%'}};left:{{(item.templateAreaLeft / cardInfo.cardTemplateUseWidth) * 100 + '%'}};color:{{item.templateAreaFontColor}};width:{{item.templateAreaWidth}}px;height:{{item.templateAreaHeight}}px;font-size:{{item.templateAreaFontSize}};font-style:{{item.templateAreaFontStyle}};font-weight:{{item.templateAreaFontBold}};text-align:{{item.templateAreaFontCenter}};line-height:{{item.templateAreaHeight}}px;"
wx:if="{{item.templateAreaServerLink == '1'}}"> wx:if="{{item.templateAreaServerLink == '1'}}">
{{item.templateAreaFontValue}} {{item.templateAreaFontValue}}

View File

@ -16,7 +16,6 @@
} }
.area-box { .area-box {
white-space: nowrap;
background: none !important; background: none !important;
z-index: 111; z-index: 111;
} }
@ -217,4 +216,17 @@
.share .btn:last-child { .share .btn:last-child {
margin-right: 0; margin-right: 0;
background: #ff2525; background: #ff2525;
}
/* 换行 */
.wrap-line {
overflow-wrap: break-word;
}
/* 居中 */
.wrap-center {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
overflow-wrap: break-word;
} }

View File

@ -62,14 +62,11 @@ Page({
}) })
}, },
formatDate(date) { formatDate(date) {
var d = new Date(date), if (date.length > 0) {
month = '' + (d.getMonth() + 1), return date.slice(0, 11)
day = '' + d.getDate(), } else {
year = d.getFullYear(); return ''
}
if (month.length < 2) month = '0' + month;
if (day.length < 2) day = '0' + day;
return [year, month, day].join('-');
}, },
//获取支付历史列表 //获取支付历史列表
getPayHistoryList() { getPayHistoryList() {

View File

@ -2,26 +2,26 @@
<view slot="content">会员中心</view> <view slot="content">会员中心</view>
</cu-custom> </cu-custom>
<view class="page-box" wx:if="{{!isDredge}}"> <view class="page-box" wx:if="{{!isDredge}}">
<block wx:if="{{recordList.length > 0}}"> <!-- 会员信息卡片显示 -->
<!-- 会员信息卡片显示 --> <view class="info-box bg-yellow-yellow">
<view class="info-box bg-yellow-yellow"> <view class="base-info">
<view class="base-info"> <image class="user-icon" src="{{userIcon}}" mode="scaleToFill"></image>
<image class="user-icon" src="{{userIcon}}" mode="scaleToFill"></image> <view class="base-info-text-box">
<view class="base-info-text-box"> <view class="name-box">
<view class="name-box"> <view class="name">{{name}}</view>
<view class="name">{{name}}</view> <image src="/images/ic_vip_icon.png" mode="scaleToFill"></image>
<image src="/images/ic_vip_icon.png" mode="scaleToFill"></image>
</view>
<view wx:if="{{!payState.cardCharge}}">
会员将于{{payState.cardChargeEnd}}到期
</view>
<view wx:else>会员已于{{payState.cardChargeEnd}}到期</view>
</view> </view>
<view wx:if="{{!payState.cardCharge}}">
会员将于{{payState.cardChargeEnd}}到期
</view>
<view wx:else>会员已于{{payState.cardChargeEnd}}到期</view>
</view> </view>
<view bindtap="doRenew"
style="align-self: flex-end;margin-right: 15rpx;padding: 10rpx 15rpx;border-radius: 15rpx;border: 1rpx solid #ffffff;">
立即续费</view>
</view> </view>
<view bindtap="doRenew"
style="align-self: flex-end;margin-right: 15rpx;padding: 10rpx 15rpx;border-radius: 15rpx;border: 1rpx solid #ffffff;">
立即续费</view>
</view>
<block wx:if="{{recordList.length > 0}}">
<block wx:for="{{recordList}}" wx:key="index"> <block wx:for="{{recordList}}" wx:key="index">
<view class="item"> <view class="item">
<image class="icon" src="{{item.cardChargeUserAvatarUrl}}" mode="scaleToFill"></image> <image class="icon" src="{{item.cardChargeUserAvatarUrl}}" mode="scaleToFill"></image>
@ -46,7 +46,7 @@
<van-loading wx:if="{{isLoadMore}}" size="24px">加载中...</van-loading> <van-loading wx:if="{{isLoadMore}}" size="24px">加载中...</van-loading>
</block> </block>
<view wx:else style="margin-top:200rpx;width:100%;"> <view wx:else style="margin-top:200rpx;width:100%;">
<van-empty description="暂无数据" /> <van-empty description="暂无缴费记录" />
</view> </view>
</view> </view>
<view class="page-box" wx:else> <view class="page-box" wx:else>

View File

@ -1,15 +1,15 @@
var apis = { var apis = {
url: 'http://192.168.0.115:8091/systemcard/', // url: 'http://192.168.0.115:8091/systemcard/',
userCenter: 'http://192.168.0.115:8091/systemcard/', // userCenter: 'http://192.168.0.115:8091/systemcard/',
baseImgUrl: 'http://192.168.0.115:8091/systemcard/route/file/download/true/', // baseImgUrl: 'http://192.168.0.115:8091/systemcard/route/file/download/true/',
// url: 'https://cbc.wgink.ink/systemcard/', // url: 'https://cbc.wgink.ink/systemcard/',
// userCenter: 'https://cbc.wgink.ink/systemcard/', // userCenter: 'https://cbc.wgink.ink/systemcard/',
// baseImgUrl: 'https://cbc.wgink.ink/systemcard/route/file/download/true/', // baseImgUrl: 'https://cbc.wgink.ink/systemcard/route/file/download/true/',
// url: 'https://www.tenlion.com.cn/systemcard/', url: 'https://www.tenlion.com.cn/systemcard/',
// userCenter: 'https://www.tenlion.com.cn/systemcard/', userCenter: 'https://www.tenlion.com.cn/systemcard/',
// baseImgUrl: 'https://www.tenlion.com.cn/systemcard/route/file/download/true/', baseImgUrl: 'https://www.tenlion.com.cn/systemcard/route/file/download/true/',
// url: 'http://192.168.0.111:8091/systemcard/', // url: 'http://192.168.0.111:8091/systemcard/',
// userCenter: 'http://192.168.0.111:8091/systemcard/', // userCenter: 'http://192.168.0.111:8091/systemcard/',
@ -137,7 +137,7 @@ var apis = {
updateMyCard: `app/cardtemplateuse/update/{cardTemplateUseId}`, //更新名片内容 updateMyCard: `app/cardtemplateuse/update/{cardTemplateUseId}`, //更新名片内容
setDefaultCard: `app/cardtemplateuse/default/{cardTemplateUseId}`, //制定名片 setDefaultCard: `app/cardtemplateuse/default/{cardTemplateUseId}`, //制定名片
deleteCard: `app/cardtemplateuse/remove/{ids}`, //删除名片 deleteCard: `app/cardtemplateuse/remove/{ids}`, //删除名片
getDefaultCard: `app/cardtemplateuse/getdefault`, //首页默认名片 getDefaultCard: `app/cardtemplateuse/getdefault/{userId}`, //首页默认名片
shareRecord: `app/cardtemplatedispatch/save`, //转发记录 shareRecord: `app/cardtemplatedispatch/save`, //转发记录
checkRecord: `app/cardtemplatescans/save`, //保存查看记录 checkRecord: `app/cardtemplatescans/save`, //保存查看记录
shareCard: `app/cardtemplateuse/getdispatch/{cardTemplateUseId}`, //查看分享名片 shareCard: `app/cardtemplateuse/getdispatch/{cardTemplateUseId}`, //查看分享名片