Compare commits

...

5 Commits

25 changed files with 346 additions and 133 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
images/ic_wechat_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 B

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

@ -18,12 +18,17 @@ Page({
isRefresh: false, isRefresh: false,
isShowCodeInput: false, //测试true isShowCodeInput: false, //测试true
code: '', //邀请码 code: '', //邀请码
conentHeight: 550, //滚动内容的高度
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
// this.getPayState() // this.getPayState()
//屏幕高度-标题的高度
this.setData({
conentHeight: app.globalData.windowHeight
})
}, },
onShow() { onShow() {
this.dorefreshList() this.dorefreshList()
@ -56,8 +61,8 @@ Page({
if (res.data.length > 0) { if (res.data.length > 0) {
_self.setData({ _self.setData({
optionsList: res.data, optionsList: res.data,
curTypeId: res.data[0].dataId, curTypeId: res.data[_self.data.currentIndex].dataId,
currentIndex: 0 currentIndex: _self.data.currentIndex
}) })
//根据第一条获取数据 //根据第一条获取数据
_self.getList() _self.getList()

View File

@ -11,9 +11,9 @@
</block> </block>
</van-tabs> </van-tabs>
</view> </view>
<scroll-view style="margin-top: 70rpx;" refresher-enabled="true" refresher-threshold="{{50}}" <scroll-view style="margin-top: 70rpx;height: {{conentHeight}}px;" refresher-enabled="true"
refresher-background="#fff" enhanced="{{true}}" scroll-y bindrefresherrefresh="dorefreshList" refresher-threshold="{{50}}" refresher-background="#fff" enhanced="{{true}}" scroll-y
refresher-triggered="{{isRefreshing}}"> bindrefresherrefresh="dorefreshList" refresher-triggered="{{isRefreshing}}">
<block wx:if="{{cardList.length>0}}"> <block wx:if="{{cardList.length>0}}">
<view class="page-box"> <view class="page-box">
<block wx:for="{{cardList}}" wx:key="index"> <block wx:for="{{cardList}}" wx:key="index">

View File

@ -15,7 +15,7 @@ Page({
tabList: [{ tabList: [{
name: '营销模板', name: '营销模板',
}, { }, {
name: '发布历史' name: '我的海报'
}], }],
isRefreshing: false, //是否刷新中 isRefreshing: false, //是否刷新中
isLoadMore: false, //是否在加载中 isLoadMore: false, //是否在加载中
@ -27,7 +27,9 @@ Page({
curTypeId: '', curTypeId: '',
isShowOptions: false, //是否显示选项 isShowOptions: false, //是否显示选项
curItemIndex: -1, //点击分享按钮弹出的 curItemIndex: -1, //点击分享按钮弹出的
curTypeName: '全部' curTypeName: '全部',
contentHeight: 550, //内容区域的高度
shareTitle: '活动'
}, },
/** /**
@ -37,6 +39,19 @@ Page({
var _self = this var _self = this
//获取类型 //获取类型
_self.getOptionsList() _self.getOptionsList()
this.setData({
contentHeight: app.globalData.windowHeight
})
try {
var title = wx.getStorageSync('postertitle')
if (title) {
_self.setData({
shareTitle: title
})
}
} catch (error) {
}
}, },
//获取类型 //获取类型
getOptionsList() { getOptionsList() {
@ -95,7 +110,7 @@ Page({
_self.setData({ _self.setData({
currentTypeIndex: idx, currentTypeIndex: idx,
curTypeId: id, curTypeId: id,
curTypeName:name , curTypeName: name,
posterHistoryList: [], posterHistoryList: [],
posterTempleteList: [], posterTempleteList: [],
isShowOptions: false isShowOptions: false
@ -172,14 +187,15 @@ 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 userId = _self.data.posterHistoryList[_self.data.curItemIndex].creator
if (type && type == '2') { if (type && type == '2') {
//转发个人动态 //转发个人动态
} else { } else {
var param = '/pages/index/index?posterId=' + img; var param = '/pages/index/index?cardTemplateUseId=' + id + '&userId=' + userId;
return { return {
title: '活动', title: _self.data.shareTitle,
path: param, path: param,
imageUrl: img imageUrl: img
} }
@ -467,11 +483,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

@ -29,8 +29,8 @@
</view> </view>
<!-- 模板 --> <!-- 模板 -->
<scroll-view style="margin-top: 70rpx;" refresher-enabled="true" refresher-threshold="{{50}}" <scroll-view style="margin-top: 70rpx;height: {{contentHeight}}px;" refresher-enabled="true"
wx:if="{{currentIndex == 0}}" refresher-background="#fff" enhanced="{{true}}" scroll-y refresher-threshold="{{50}}" wx:if="{{currentIndex == 0}}" refresher-background="#fff" enhanced="{{true}}" scroll-y
bindrefresherrefresh="dorefreshList" refresher-triggered="{{isRefreshing}}"> bindrefresherrefresh="dorefreshList" refresher-triggered="{{isRefreshing}}">
<block wx:if="{{posterTempleteList.length>0}}"> <block wx:if="{{posterTempleteList.length>0}}">
<view class="img-box"> <view class="img-box">
@ -63,9 +63,9 @@
</view> </view>
</scroll-view> </scroll-view>
<!-- 发布历史 --> <!-- 发布历史 -->
<scroll-view style="margin-top: 70rpx;" refresher-enabled="true" refresher-threshold="{{50}}" <scroll-view style="margin-top: 70rpx;height: {{contentHeight}}px;" refresher-enabled="true"
refresher-background="#fff" enhanced="{{true}}" scroll-y bindrefresherrefresh="dorefreshList" refresher-threshold="{{50}}" refresher-background="#fff" enhanced="{{true}}" scroll-y
refresher-triggered="{{isRefreshing}}" wx:else> bindrefresherrefresh="dorefreshList" refresher-triggered="{{isRefreshing}}" wx:else>
<block wx:if="{{posterHistoryList.length>0}}"> <block wx:if="{{posterHistoryList.length>0}}">
<view class="img-box"> <view class="img-box">
<block wx:for="{{posterHistoryList}}" wx:key="index"> <block wx:for="{{posterHistoryList}}" wx:key="index">

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

@ -36,6 +36,8 @@ Page({
selTypeIndex: 0, //当前选中的类型列表 selTypeIndex: 0, //当前选中的类型列表
selTypeId: '', //当前选中的类型id selTypeId: '', //当前选中的类型id
selType: '', //选中的类型type selType: '', //选中的类型type
isShowContrast: false, //是否显示版本对比
contrastId: '', //版本对比图片ID
}, },
/** /**
@ -122,7 +124,8 @@ Page({
this.setData({ this.setData({
isShowUseDeal: false, //使用协议 isShowUseDeal: false, //使用协议
isShowServiceTreaty: false, //会员服务协议 isShowServiceTreaty: false, //会员服务协议
isShowIntimacyTreaty: false //隐私政策 isShowIntimacyTreaty: false, //隐私政策
isShowContrast: false //版本对比
}) })
}, },
//提交支付 //提交支付
@ -223,10 +226,10 @@ Page({
} }
}) })
.catch(err => { .catch(err => {
wx.showToast({ // wx.showToast({
title: '获取订单失败', // title: '获取订单失败',
icon: 'err' // icon: 'err'
}) // })
}) })
}, },
//用户协议 //用户协议
@ -294,5 +297,25 @@ Page({
.catch(err => { .catch(err => {
}) })
},
//显示版本对比
showContrast() {
var _self = this
wx.showLoading({
title: '加载中...',
})
app.http.get(app.urls.getVersionContrast, {
header: {
token: app.globalData.token
}
})
.then(res => {
wx.hideLoading({})
_self.setData({
contrastId: app.urls.baseImgUrl + res.data.data,
isShowContrast: true,
})
})
.catch(err => {})
} }
}) })

View File

@ -22,6 +22,7 @@
<view class="code-box"> <view class="code-box">
<view class="title">邀请码 (选填)</view> <view class="title">邀请码 (选填)</view>
<input placeholder="请输入邀请码" type="text" class="code-input" bindinput="inputWatch" maxlength="6" /> <input placeholder="请输入邀请码" type="text" class="code-input" bindinput="inputWatch" maxlength="6" />
<image src="/images/ic_version_contrast.png" bindtap="showContrast" mode="scaleToFill"></image>
</view> </view>
<view class="type-box"> <view class="type-box">
<block wx:for="{{typeList}}" wx:key="index"> <block wx:for="{{typeList}}" wx:key="index">
@ -40,8 +41,7 @@
</block> </block>
</view> </view>
</view> </view>
<view class="foot" style="padding: 15rpx;background-color: #ffffff;">
<view class="foot" style="padding: 15rpx;">
<view class="treaty-box"> <view class="treaty-box">
<text class="{{isChecked ? 'cuIcon-squarecheck':'cuIcon-square'}} text-gray" style="font-size: 34rpx;" <text class="{{isChecked ? 'cuIcon-squarecheck':'cuIcon-square'}} text-gray" style="font-size: 34rpx;"
bindtap="changeCheck"></text> bindtap="changeCheck"></text>
@ -53,21 +53,50 @@
</view> </view>
<button class="cu-btn bg-blue" style="width:100%" bindtap="doPay">立即支付</button> <button class="cu-btn bg-blue" style="width:100%" bindtap="doPay">立即支付</button>
</view> </view>
<!-- 使用协议 --> <!-- 使用协议 -->
<van-popup show="{{ isShowUseDeal }}" bind:close="onClose" custom-style="width:90%;height:75%;" round> <van-popup show="{{ isShowUseDeal }}" bind:close="onClose"
<view class="treaty-content-box"> custom-style="width:90%;height:80%;background-color:transparent;">
<rich-text class="content" nodes="{{treatyStr}}"></rich-text> <view style="display: flex;flex-direction: column;justify-content: center;align-items: center;height: 100%;"
catchtap="onClose">
<scroll-view class="treaty-content-box" scroll-y>
<rich-text nodes="{{treatyStr}}"></rich-text>
</scroll-view>
<text class="cuIcon-roundclose" catchtap="onClose"
style="font-size: 50rpx;color: #fff;margin-top: 15rpx;"></text>
</view> </view>
</van-popup> </van-popup>
<!-- 会员服务协议 --> <!-- 会员服务协议 -->
<van-popup show="{{ isShowServiceTreaty }}" bind:close="onClose" custom-style="width:90%;height:75%;" round> <van-popup show="{{ isShowServiceTreaty }}" bind:close="onClose"
<view class="treaty-content-box"> custom-style="width:90%;height:80%;background-color:transparent;">
<rich-text class="content" nodes="{{treatyStr}}"></rich-text> <view style="display: flex;flex-direction: column;justify-content: center;align-items: center;height: 100%;"
catchtap="onClose">
<scroll-view class="treaty-content-box" scroll-y>
<rich-text nodes="{{treatyStr}}"></rich-text>
</scroll-view>
<text class="cuIcon-roundclose" catchtap="onClose"
style="font-size: 50rpx;color: #fff;margin-top: 15rpx;"></text>
</view> </view>
</van-popup> </van-popup>
<!-- 隐私政策 --> <!-- 隐私政策 -->
<van-popup show="{{ isShowIntimacyTreaty }}" bind:close="onClose" custom-style="width:90%;height:75%;" round> <van-popup show="{{ isShowIntimacyTreaty }}" bind:close="onClose"
<view class="treaty-content-box"> custom-style="width:90%;height:80%;background-color:transparent;">
<rich-text class="content" nodes="{{treatyStr}}"></rich-text> <view style="display: flex;flex-direction: column;justify-content: center;align-items: center;height: 100%;"
catchtap="onClose">
<scroll-view class="treaty-content-box" scroll-y>
<rich-text nodes="{{treatyStr}}"></rich-text>
</scroll-view>
<text class="cuIcon-roundclose" catchtap="onClose"
style="font-size: 50rpx;color: #fff;margin-top: 15rpx;"></text>
</view>
</van-popup>
<van-popup show="{{ isShowContrast }}" bind:close="onClose"
custom-style="background-color:transparent;height:100%;width:100%;" round>
<view bindtap="onClose"
style="width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;margin-top: 80rpx;">
<image src="{{contrastId}}" mode="widthFix" style="width: 80%;max-height: 70%;border-radius: 10rpx;"></image>
<view style="margin-top: 15rpx;">
<text class="cuIcon-roundclose" style="font-size: 40rpx;color: #FFFFFF;"></text>
</view>
</view> </view>
</van-popup> </van-popup>

View File

@ -107,14 +107,19 @@
font-weight: normal; font-weight: normal;
} }
.code-box image {
width: 96rpx;
height: 96rpx;
}
.code-input { .code-input {
text-align: right; text-align: left;
align-self: center; align-self: center;
padding: 15rpx; padding: 15rpx;
margin-left: 15rpx; margin-left: 15rpx;
height: 70rpx; height: 70rpx;
border-radius: 10rpx; border-radius: 10rpx;
width: 70%; width: 60%;
} }
.treaty-box { .treaty-box {
@ -125,6 +130,9 @@
margin-bottom: 40rpx; margin-bottom: 40rpx;
font-size: 28rpx; font-size: 28rpx;
margin-top: 15rpx; margin-top: 15rpx;
background-color: #ffffff;
height: 50%;
width: 90%;
} }
.treaty-content-box { .treaty-content-box {
@ -133,6 +141,9 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding: 15rpx; padding: 15rpx;
height: 90%;
background-color: #ffffff;
border-radius: 5rpx;
} }
.treaty-content-box .title { .treaty-content-box .title {

View File

@ -1,7 +1,47 @@
<cu-custom isBack="{{true}}"> <cu-custom isBack="{{true}}">
<view slot="content">立即提现</view> <view slot="content">立即提现</view>
</cu-custom> </cu-custom>
<view class="page-box" style="padding: 0rpx;"> <view class="page-box">
<view class="content-box">
<view style="font-size: 32rpx;padding: 20rpx;">可提现金额(元)</view>
<view style="margin-left: 23rpx;">
<text style="font-size: 40rpx;line-height: 80rpx;">¥</text>
<text
style="font-size: 80rpx;line-height: 80rpx;margin-left: 15rpx;">{{accountInfo.accountMoney/100}}</text>
</view>
<view class="content-bottom-box">
<view>
<view>最低提现金额(元)</view>
<view style="height: 40rpx;text-align: left;line-height: 40rpx;">¥1.00</view>
</view>
<view bindtap="toRecord">
<view>查看提现记录</view>
<image src="/images/ic_take_cash_record.png" style="width: 40rpx;height: 40rpx;" mode="scaleToFill">
</image>
</view>
</view>
</view>
<view class="cash-box">
<view class="title-box">
<view class="title">提现金额</view>
</view>
<view class="input-box">
<text style="text-align: left;font-size: 40rpx;line-height: 40rpx;">¥</text>
<input type="digit" value="{{takeValue}}" bindinput="inputWatch" />
<view catchtap="takeAll" style="font-size: 28rpx;color: #E6B980;">全部提现</view>
</view>
<view class="cash-bottom-box">
<view>提现至微信零钱</view>
<image src="/images/ic_wechat_icon.png" style="width: 40rpx;height: 40rpx;" mode="scaleToFill"></image>
</view>
</view>
<view style="width: 100%;margin-top: 70rpx;">
<button class="cu-btn bg-blue" style="width:100%" bindtap="doCash">申请提现</button>
</view>
</view>
<!-- <view class="page-box" style="padding: 0rpx;">
<view class="content-box"> <view class="content-box">
<view> <view>
<view class="money"> <view class="money">
@ -27,4 +67,4 @@
</view> </view>
<view class="foot" style="padding: 15rpx;"> <view class="foot" style="padding: 15rpx;">
<button class="cu-btn bg-blue" style="width:100%" bindtap="doCash">申请提现</button> <button class="cu-btn bg-blue" style="width:100%" bindtap="doCash">申请提现</button>
</view> </view> -->

View File

@ -3,21 +3,25 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: flex-start;
width: 100%; width: 100%;
background-color: #E6B980; background-color: #E6B980;
text-align: center; border-radius: 10rpx;
min-height: 400rpx; color: #ffffff;
} }
.content-box .money { .content-bottom-box {
color: #fff; display: flex;
} flex-direction: row;
align-items: center;
.content-box .hint { justify-content: space-between;
width: 100%;
background-color: #D6A970;
border-bottom-left-radius: 10rpx;
border-bottom-right-radius: 10rpx;
padding: 25rpx;
font-size: 28rpx; font-size: 28rpx;
margin-top: 15rpx; margin-top: 25rpx;
color: #fff;
} }
.cash-box { .cash-box {
@ -26,32 +30,45 @@
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
align-items: flex-start; align-items: flex-start;
width: 90%; width: 100%;
background-color: #fff; background-color: #fff;
border-radius: 15rpx; border-radius: 5rpx;
position: absolute;
top: 450rpx;
box-shadow: 0 4rpx 8rpx 0 #DFDBDB, 0 6rpx 20rpx 0 #DFDBDB; box-shadow: 0 4rpx 8rpx 0 #DFDBDB, 0 6rpx 20rpx 0 #DFDBDB;
margin-top: 15rpx;
} }
.cash-box .title { .cash-box .title {
font-size: 32rpx; font-size: 32rpx;
} }
.cash-bottom-box {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width: 100%;
border-top: 1rpx solid #f3f3f3;
padding: 20rpx 20rpx 0rpx 20rpx;
}
.input-box { .input-box {
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: flex-end;
justify-content: space-between; justify-content: flex-start;
font-size: 80rpx; font-size: 80rpx;
padding: 20rpx;
line-height: 80rpx;
} }
.input-box input { .input-box input {
width: 100%; width: 80%;
text-align: center; text-align: left;
line-height: 80rpx; line-height: 80rpx;
height: 80rpx; height: 80rpx;
font-size: 80rpx;
padding-left: 15rpx;
} }
.title-box { .title-box {
@ -61,4 +78,5 @@
align-items: center; align-items: center;
width: 100%; width: 100%;
font-size: 32rpx; font-size: 32rpx;
padding: 0rpx 20rpx 20rpx 20rpx;
} }

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,
@ -42,9 +43,11 @@ Page({
isBindPhone: false, isBindPhone: false,
isNeedRefresh: true, isNeedRefresh: true,
isShowComment: false, //是否显示评论弹框 isShowComment: false, //是否显示评论弹框
posterId: '', //分享过来的海报图片 posterId: '', //分享过来的海报ID
posterImg: '', //分享过来的海报图片
isShowPoster: false, isShowPoster: false,
defaultBtnIcon: '/images/ic_share_img.png' defaultBtnIcon: '/images/ic_share_img.png',
shareTitle: '您好,这是我的电子名片,请查看.'
}, },
onLoad(options) { onLoad(options) {
var self = this var self = this
@ -55,15 +58,15 @@ Page({
isMine: 2 isMine: 2
}) })
} }
self.buildId() if (options.cardTemplateUseId) {
self.doLogin()
if (options.posterId) {
//展示图片 //展示图片
self.setData({ self.setData({
posterId: options.posterId, posterId: options.cardTemplateUseId,
isShowPoster: true uId: options.userId
}) })
} }
self.buildId()
self.doLogin()
}, },
// 登录 // 登录
doLogin() { doLogin() {
@ -100,6 +103,9 @@ Page({
} }
self.getOtherCard(2) self.getOtherCard(2)
self.getBtnIcon() //获取首页按钮图片 self.getBtnIcon() //获取首页按钮图片
if (self.data.posterId != '') {
self.getPosterImg()
}
}) })
.catch(err => { .catch(err => {
wx.hideLoading({}) wx.hideLoading({})
@ -107,6 +113,28 @@ Page({
} }
}) })
}, },
//获取分享的海报
getPosterImg() {
var _self = this
app.http.get(app.urls.getMyCardDetail.format({
cardTemplateUseId: _self.data.posterId
}), {
header: {
token: app.globalData.token
}
})
.then(res => {
var img = _self.data.imgUrl + res.data.cardTemplateUsePhotoUrl
console.log(img)
_self.setData({
posterImg: img,
isShowPoster: true
})
})
.catch(err => {
})
},
//首页按钮图片 //首页按钮图片
getBtnIcon() { getBtnIcon() {
var _self = this var _self = this
@ -215,6 +243,15 @@ Page({
addressTxt: it.value addressTxt: it.value
}) })
break break
case 'cardtitle':
wx.setStorageSync('cardtitle', it.value)
_self.setData({
shareTitle: it.value.length > 0 ? it.value : '您好,这是我的电子名片,请查看.'
})
break
case 'postertitle':
wx.setStorageSync('postertitle', it.value)
break
} }
}) })
} else { } else {
@ -400,13 +437,13 @@ Page({
}, },
//显示更多栏目数据 //显示更多栏目数据
showMore(e) { showMore(e) {
this.setData({
isNeedRefresh: false
})
var item = e.currentTarget.dataset.item var item = e.currentTarget.dataset.item
if (item.mode == '2') { if (item.mode == '2') {
var userid = e.currentTarget.dataset.userid var userid = e.currentTarget.dataset.userid
var idx = e.currentTarget.dataset.idx var idx = e.currentTarget.dataset.idx
this.setData({
isNeedRefresh: false
})
wx.navigateTo({ wx.navigateTo({
url: '/packagecard/moments/showlist/showlist?id=' + item.cId + '&userId=' + userid + '&index=' + idx, url: '/packagecard/moments/showlist/showlist?id=' + item.cId + '&userId=' + userid + '&index=' + idx,
}) })
@ -614,6 +651,7 @@ Page({
}) })
.then(res => { .then(res => {
wx.setStorageSync('usercode', res.data.userCode) wx.setStorageSync('usercode', res.data.userCode)
wx.setStorageSync('userId', res.data.userId)
}) })
.catch(err => { .catch(err => {
console.log(err) console.log(err)
@ -627,11 +665,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 => {
@ -930,8 +969,10 @@ Page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function (res) { onShareAppMessage: function (res) {
console.log(res)
var self = this var self = this
self.setData({
isNeedRefresh: false
})
wx.showShareMenu({ wx.showShareMenu({
withShareTicket: true, withShareTicket: true,
success: function (res) { success: function (res) {
@ -947,7 +988,7 @@ Page({
self.shareRecord(postId) self.shareRecord(postId)
var param = '/pages/index/index?cardTemplateDispatchId=' + postId; var param = '/pages/index/index?cardTemplateDispatchId=' + postId;
return { return {
title: '您好,这是我的电子名片,请查看.', title: self.data.shareTitle,
path: param, path: param,
imageUrl: self.data.shareImgUrl imageUrl: self.data.shareImgUrl
} }
@ -967,6 +1008,9 @@ Page({
}, },
//显示详情 //显示详情
showDetail(e) { showDetail(e) {
this.setData({
isNeedRefresh: false
})
var type = e.currentTarget.dataset.ctype //需要跳详情 var type = e.currentTarget.dataset.ctype //需要跳详情
if (type.indexOf('dda5007c-5fb7-48f2-8537-3cb8ea298242') != -1) { if (type.indexOf('dda5007c-5fb7-48f2-8537-3cb8ea298242') != -1) {
//需要跳详情 //需要跳详情
@ -1114,7 +1158,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

@ -442,7 +442,7 @@
custom-style="background-color:transparent;height:100%;width:100%;" round> custom-style="background-color:transparent;height:100%;width:100%;" round>
<view bindtap="onClose" <view bindtap="onClose"
style="width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;margin-top: 80rpx;"> style="width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;margin-top: 80rpx;">
<image src="{{posterId}}" mode="widthFix" style="width: 80%;max-height: 70%;border-radius: 10rpx;"></image> <image src="{{posterImg}}" mode="widthFix" style="width: 80%;max-height: 70%;border-radius: 10rpx;"></image>
<view style="margin-top: 15rpx;"> <view style="margin-top: 15rpx;">
<text class="cuIcon-close" style="font-size: 40rpx;color: #FFFFFF;"></text> <text class="cuIcon-close" style="font-size: 40rpx;color: #FFFFFF;"></text>
</view> </view>

View File

@ -18,7 +18,8 @@ Page({
code: '', code: '',
isOpen: true, isOpen: true,
payState: {}, payState: {},
accountInfo: undefined accountInfo: undefined,
userId: ''
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
@ -32,9 +33,11 @@ Page({
try { try {
var isBind = wx.getStorageSync('bindPhone') var isBind = wx.getStorageSync('bindPhone')
var code = wx.getStorageSync('usercode') var code = wx.getStorageSync('usercode')
var userId = wx.getStorageSync('userId')
if (code && code.length > 0) { if (code && code.length > 0) {
_self.setData({ _self.setData({
code: code code: code,
userId: userId
}) })
} }
_self.setData({ _self.setData({
@ -88,14 +91,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() {
@ -260,6 +260,35 @@ Page({
this.getItemList() this.getItemList()
this.getPayState() this.getPayState()
this.getAccountInfo() this.getAccountInfo()
this.getBaseInfo()
},
getBaseInfo() {
var _self = this
app.http.get(app.urls.getMainMoment.format({
configColumnId: 'de7b5e22-64f9-4c60-a1f9-6ac004dfb9a8'
}), {
header: {
token: app.globalData.token
},
data: {
userId: _self.data.userId
}
})
.then(res => {
if (res.data.length > 0) {
res.data[0].list.forEach(it => {
switch (it.name) {
case 'cardtitle':
wx.setStorageSync('cardtitle', it.value)
break
case 'postertitle':
wx.setStorageSync('postertitle', it.value)
break
}
})
} else {}
})
.catch(err => {})
}, },
//跳转到二级栏目页面 //跳转到二级栏目页面
goColumnList(e) { goColumnList(e) {

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

@ -21,9 +21,9 @@
"checkSiteMap": true, "checkSiteMap": true,
"uploadWithSourceMap": true, "uploadWithSourceMap": true,
"compileHotReLoad": false, "compileHotReLoad": false,
"useMultiFrameRuntime": false, "useMultiFrameRuntime": true,
"useApiHook": false, "useApiHook": true,
"useApiHostProcess": false, "useApiHostProcess": true,
"babelSetting": { "babelSetting": {
"ignore": [], "ignore": [],
"disablePlugins": [], "disablePlugins": [],

View File

@ -16,7 +16,7 @@ var apis = {
// baseImgUrl: 'http://192.168.0.111:8091/systemcard/route/file/download/true/', // baseImgUrl: 'http://192.168.0.111:8091/systemcard/route/file/download/true/',
// url: 'http://192.168.0.103:7008/study/', // url: 'http://192.168.0.103:7008/study/',
// userCenter: 'http://192.168.0.103:7008/study/', // userCenter: 'http://192.168.0.103:7008/study/',
// baseImgUrl: 'http://192.168.0.103:7008/study/route/file/download/true/', // baseImgUrl: 'http://192.168.0.103:7008/study/route/file/download/true/',
@ -46,6 +46,7 @@ var apis = {
getCardPayState: `app/cardcharge/savecharge/{mode}`, //获取开通名片的订单信息 getCardPayState: `app/cardcharge/savecharge/{mode}`, //获取开通名片的订单信息
doSaveOrderPayState: `app/cardcharge/checkorder/{cardChargeOrderNumber}`, //保存订单支付状态 doSaveOrderPayState: `app/cardcharge/checkorder/{cardChargeOrderNumber}`, //保存订单支付状态
getPayHistoryList: `app/cardcharge/listpage`, //获取 getPayHistoryList: `app/cardcharge/listpage`, //获取
getVersionContrast: `app/projectconfigrelease/file/versionContrastPhoto`, //版本对比图
/*用户 */ /*用户 */
/**店铺相关 **/ /**店铺相关 **/
doSaveShop: `app/shop/save`, //保存商店 doSaveShop: `app/shop/save`, //保存商店
@ -118,7 +119,7 @@ var apis = {
getMainColumn: `app/cardconfigcolumn/listhome`, //获取首页显示栏目 getMainColumn: `app/cardconfigcolumn/listhome`, //获取首页显示栏目
getColumnListByGroupId: `app/cardconfigcolumn/list`, //根据栏目组id获取栏目? configColumnGroupId getColumnListByGroupId: `app/cardconfigcolumn/list`, //根据栏目组id获取栏目? configColumnGroupId
getMainMoment: `app/configcolumndata/list/{configColumnId}`, //获取首页栏目数据 通过栏目ID获取栏目下的数据列表(包含每条数据的字段集合) 传入userId参数则查询指定人的 , 没传入userId参数则查询当前token的 getMainMoment: `app/configcolumndata/list/{configColumnId}`, //获取首页栏目数据 通过栏目ID获取栏目下的数据列表(包含每条数据的字段集合) 传入userId参数则查询指定人的 , 没传入userId参数则查询当前token的
getMineColumnList: `app/configcolumnset/list`, //获取我的栏目配置列表 getMineColumnList: `app/cardconfigcolumngroup/setlist`, //获取我的栏目配置列表
doSaveColumnDisplay: `app/configcolumnset/savedisplay`, //保存我的栏目隐藏显示 doSaveColumnDisplay: `app/configcolumnset/savedisplay`, //保存我的栏目隐藏显示
doSaveColumnName: `app/configcolumnset/savename`, //保存我的栏目名称 doSaveColumnName: `app/configcolumnset/savename`, //保存我的栏目名称
doOrderColumn: `app/configcolumnset/saveorder`, //保存栏目排序, post {configColumnId, configColumnOrder} doOrderColumn: `app/configcolumnset/saveorder`, //保存栏目排序, post {configColumnId, configColumnOrder}
@ -136,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}`, //查看分享名片