Compare commits

..

20 Commits
shop ... master

Author SHA1 Message Date
高健
1b020d8f04 提现页面优化 2021-09-22 09:29:16 +08:00
高健
992aae5583 名片分享标题与海报分享标题 2021-09-15 14:18:10 +08:00
高健
9b463236ef bug修复页面优化 2021-09-09 15:44:19 +08:00
高健
bf37c3e60e 海报分享方式替换、发布历史改为我的海报,会员开通页面协议优化展示优化、会员开通添加版本对比 2021-09-07 17:46:23 +08:00
高健
999412b220 名片模板,海报列表滑动bug修复 2021-09-06 16:28:51 +08:00
高健
8ac5111337 发布第一版 2021-09-06 09:18:46 +08:00
高健
b8cc34ad4b 名片个人版-0.01 2021-09-03 15:03:38 +08:00
高健
0b1a169901 微信支付、会员开通等 2021-09-01 16:55:20 +08:00
高健
2a6248fd37 页面布局优化 2021-08-12 09:22:40 +08:00
高健
720c3d3890 Merge branch 'master' of https://e.coding.net/tsteam/business-card/card-mini 2021-08-09 10:22:43 +08:00
高健
843a674f83 页面优化 2021-08-09 10:22:34 +08:00
dong_bo0602
a72399315d 0809 2021-08-09 10:22:25 +08:00
高健
97cb499755 页面布局 2021-08-09 09:19:56 +08:00
高健
eeb800e494 Merge branch 'master' of https://e.coding.net/tsteam/business-card/card-mini 2021-08-06 11:33:16 +08:00
高健
97a5e257c2 其他名片详情页面 2021-08-06 11:33:10 +08:00
dong_bo0602
e0955bafd3 0806 2021-08-06 11:22:40 +08:00
dong_bo0602
c694c70373 0806 2021-08-06 11:07:14 +08:00
高健
c2ed1e14f2 图片裁剪 2021-08-06 09:42:15 +08:00
高健
e64ce03615 我的页面栏目跳转方式 2021-08-05 14:41:29 +08:00
高健
65493c2e3e 名片新增页面输入框padding 2021-08-05 14:00:39 +08:00
219 changed files with 27110 additions and 4325 deletions

3
app.js
View File

@ -28,6 +28,7 @@ App({
globalData: { globalData: {
userInfo: {}, userInfo: {},
token: '', token: '',
userId: '' userId: '',
showUserId: '', //当前浏览的人的ID
}, },
}) })

View File

@ -35,49 +35,71 @@
"pages/mine/product/recycle/productrecycle", "pages/mine/product/recycle/productrecycle",
"pages/mine/product/coupon/couponlist", "pages/mine/product/coupon/couponlist",
"pages/mine/product/coupon/editcoupon", "pages/mine/product/coupon/editcoupon",
"pages/mine/product/coupon/choosegoods" "pages/mine/product/coupon/choosegoods",
"pages/mine/vip/vipcenter",
"pages/mine/income/incomelist"
],
"subPackages": [
{
"root": "packagecard",
"pages": [
"cardList/cardList",
"cardDetail/cardDetail",
"moments/publish/momentpublish",
"moments/edit/momentedit",
"moments/list/momentslist",
"moments/publish/momentpublishline",
"sharePage/sharePage",
"moments/list/momentsshowlist",
"moments/momentsdetail/momentsdetail",
"moments/showlist/showlist",
"shop/catalog/bannerlist/bannerlist",
"shop/catalog/column/column",
"shop/catalog/list/list",
"shop/shopingcart/cart",
"shop/product/product",
"shop/bespeak/bespeak",
"shop/product/goodsdetail",
"shop/product/affirmorder",
"shop/catalog/bannerlist/goodscataloglist",
"common/corpperimg/cropperimg",
"sharePage/cardcode",
"paypage/paypage",
"purse/takecash",
"marketing/marketinginfo",
"marketing/marketingposter",
"marketing/marketingpublish",
"marketing/posteredit",
"paypage/paystate",
"lucre/historylucre",
"purse/recordlist"
]
}
], ],
"subPackages": [{
"root": "packagecard",
"pages": [
"cardList/cardList",
"cardDetail/cardDetail",
"moments/publish/momentpublish",
"moments/edit/momentedit",
"moments/list/momentslist",
"moments/publish/momentpublishline",
"sharePage/sharePage",
"moments/list/momentsshowlist",
"moments/momentsdetail/momentsdetail",
"moments/showlist/showlist",
"shop/catalog/bannerlist/bannerlist",
"shop/catalog/column/column",
"shop/catalog/list/list",
"shop/shopingcart/cart",
"shop/product/product",
"shop/bespeak/bespeak",
"shop/product/goodsdetail",
"shop/product/affirmorder",
"shop/catalog/bannerlist/goodscataloglist"
]
}],
"window": { "window": {
"backgroundTextStyle": "dark", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff", "navigationBarBackgroundColor": "#E6B980",
"navigationBarTitleText": "名片", "navigationBarTitleText": "服务",
"navigationBarTextStyle": "black", "navigationBarTextStyle": "white",
"navigationStyle": "custom" "navigationStyle": "custom"
}, },
"tabBar": { "tabBar": {
"color": "#000000", "color": "#000000",
"selectedColor": "#000000", "selectedColor": "#000000",
"borderStyle": "black", "borderStyle": "black",
"list": [{ "list": [
{
"text": "首页", "text": "首页",
"pagePath": "pages/index/index", "pagePath": "pages/index/index",
"iconPath": "images/ic_card_normal.png", "iconPath": "images/ic_card_normal.png",
"selectedIconPath": "images/ic_card_sel.png" "selectedIconPath": "images/ic_card_sel.png"
}, },
{
"text": "服务",
"pagePath": "pages/serve/index/index",
"iconPath": "images/ic_serve_normal.png",
"selectedIconPath": "images/ic_serve_sel.png"
},
{ {
"text": "我的", "text": "我的",
"pagePath": "pages/mine/index/index", "pagePath": "pages/mine/index/index",
@ -105,7 +127,12 @@
"van-switch": "/vant/dist/switch/index", "van-switch": "/vant/dist/switch/index",
"van-tab": "/vant/dist/tab/index", "van-tab": "/vant/dist/tab/index",
"van-tabs": "/vant/dist/tabs/index", "van-tabs": "/vant/dist/tabs/index",
"van-picker": "/vant/dist/picker/index" "van-picker": "/vant/dist/picker/index",
"van-popup": "/vant/dist/popup/index",
"van-dropdown-menu": "/vant/dist/dropdown-menu/index",
"van-dropdown-item": "/vant/dist/dropdown-item/index",
"van-collapse": "/vant/dist/collapse/index",
"van-collapse-item": "/vant/dist/collapse-item/index"
}, },
"plugins": { "plugins": {
"chooseLocation": { "chooseLocation": {

View File

@ -4,9 +4,11 @@
page { page {
background-color: #FAFAFA; background-color: #f7f7f7;
/* background-color: #00eeff; */
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 0; width: 0;
height: 0; height: 0;
@ -23,6 +25,14 @@ scroll-view {
border-bottom-color: #dfdfdf; border-bottom-color: #dfdfdf;
} }
.line-so-gray {
border-bottom-style: solid;
border-bottom-width: 2rpx;
border-bottom-color: #dfdfdf;
width: 100%;
margin: 15rpx;
}
.nav-list { .nav-list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;

View File

@ -27,7 +27,7 @@ page {
--grey: #8799a3; --grey: #8799a3;
--black: #333333; --black: #333333;
--darkGray: #666666; --darkGray: #666666;
--gray: #aaaaaa; --gray: #999999;
--ghostWhite: #f1f1f1; --ghostWhite: #f1f1f1;
--white: #ffffff; --white: #ffffff;
--depBlack: #000000; --depBlack: #000000;
@ -54,6 +54,7 @@ page {
--gradualWhite: linear-gradient(45deg, #ffffff, #f8f8f8); --gradualWhite: linear-gradient(45deg, #ffffff, #f8f8f8);
--gradualGray: linear-gradient(85deg, #FAF9F9, #F5F2F2); --gradualGray: linear-gradient(85deg, #FAF9F9, #F5F2F2);
--gradualYellow: linear-gradient(85deg, #F4DBB8, #E6B980); --gradualYellow: linear-gradient(85deg, #F4DBB8, #E6B980);
--gradualYellow2: linear-gradient(0deg, #ffb957, #E6B980);
/* 阴影透明色 */ /* 阴影透明色 */
--ShadowSize: 6rpx 6rpx 8rpx; --ShadowSize: 6rpx 6rpx 8rpx;
--redShadow: rgba(204, 69, 59, 0.2); --redShadow: rgba(204, 69, 59, 0.2);
@ -801,6 +802,16 @@ button.icon.lg {
height: 80rpx; height: 80rpx;
} }
.image-32 {
width: 64rpx;
height: 64rpx;
}
.image-64 {
width: 128rpx;
height: 128rpx;
}
.cu-btn.shadow-blur::before { .cu-btn.shadow-blur::before {
top: 4rpx; top: 4rpx;
left: 4rpx; left: 4rpx;
@ -1288,9 +1299,9 @@ button.icon.lg {
filter: grayscale(1); filter: grayscale(1);
} }
.cu-list+.cu-list { /* .cu-list+.cu-list {
margin-top: 30rpx
} } */
.cu-list>.cu-item { .cu-list>.cu-item {
transition: all .6s ease-in-out 0s; transition: all .6s ease-in-out 0s;
@ -1587,9 +1598,9 @@ button.icon.lg {
.cu-list.card-menu { .cu-list.card-menu {
overflow: hidden; overflow: hidden;
margin-right: 30rpx; margin-right: 15rpx;
margin-left: 30rpx; margin-left: 15rpx;
border-radius: 20rpx border-radius: 5rpx
} }
@ -2414,10 +2425,10 @@ button.icon.lg {
==================== */ ==================== */
.cu-form-group { .cu-form-group {
width: 100%;
background-color: var(--white); background-color: var(--white);
display: flex; display: flex;
align-items: center; align-items: center;
min-height: 80rpx;
justify-content: space-between; justify-content: space-between;
} }
@ -2430,7 +2441,6 @@ button.icon.lg {
padding-right: 20rpx; padding-right: 20rpx;
font-size: 32rpx; font-size: 32rpx;
position: relative; position: relative;
line-height: 80rpx;
} }
.cu-form-group .title-right { .cu-form-group .title-right {
@ -2489,13 +2499,13 @@ button.icon.lg {
} }
.cu-form-group textarea { .cu-form-group textarea {
margin: 0 0 30rpx; margin: 0rpx;
height: 6em; height: 10em;
width: 100%; width: 100%;
line-height: 1.2em; line-height: 1.2em;
flex: 1; flex: 1;
font-size: 28rpx; font-size: 28rpx;
padding: 10rpx; padding: 15rpx;
} }
.cu-form-group.align-start .title { .cu-form-group.align-start .title {
@ -3080,8 +3090,7 @@ scroll-view.cu-steps .cu-item {
} }
.grid.grid-square>view { .grid.grid-square>view {
margin-right: 20rpx; margin-right: 15rpx;
margin-bottom: 20rpx;
border-radius: 6rpx; border-radius: 6rpx;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
@ -3106,9 +3115,9 @@ scroll-view.cu-steps .cu-item {
} }
.grid.col-3.grid-square>view { .grid.col-3.grid-square>view {
padding-bottom: calc((100% - 40rpx)/3); padding-bottom: calc((100% - 30rpx)/3);
height: 0; height: 0;
width: calc((100% - 40rpx)/3); width: calc((100% - 30rpx)/3);
} }
.grid.col-4.grid-square>view { .grid.col-4.grid-square>view {
@ -3580,6 +3589,15 @@ scroll-view.cu-steps .cu-item {
color: var(--white); color: var(--white);
} }
.bg-yellowlight {
background-color: var(--yellowLight);
color: var(--white);
}
.line-yellowlight2 {
color: var(--yellowLight);
}
.bg-orange { .bg-orange {
background-color: var(--orange); background-color: var(--orange);
color: var(--white); color: var(--white);
@ -3594,11 +3612,20 @@ scroll-view.cu-steps .cu-item {
color: var(--yellowLight); color: var(--yellowLight);
} }
.bg-yellow-light-2 {
background-image: var(--gradualYellow2);
color: var(--white);
}
.bg-yellow-light-1 { .bg-yellow-light-1 {
background-color: var(--yellowLight); background-color: var(--yellowLight);
color: var(--white); color: var(--white);
} }
.bg-yellow-light-3 {
color: var(--yellowLight);
}
.bg-olive { .bg-olive {
background-color: var(--olive); background-color: var(--olive);
color: var(--white); color: var(--white);
@ -3615,7 +3642,7 @@ scroll-view.cu-steps .cu-item {
} }
.bg-blue { .bg-blue {
background-color: var(--blue); background-color: var(--yellowLight);
color: var(--white); color: var(--white);
} }
@ -3903,6 +3930,7 @@ scroll-view.cu-steps .cu-item {
background-size: cover; background-size: cover;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
margin-bottom: 15rpx;
} }
.bg-mask { .bg-mask {
@ -4134,6 +4162,56 @@ l .text-depblack {
} }
/* 自定义 */ /* 自定义 */
.tab {
position: fixed;
display: flex;
left: 0;
right: 0;
background: #fff;
flex-direction: column;
z-index: 100;
width: 100%;
}
.tab-box {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
width: 100%;
}
.options-box {
display: flex;
flex-direction: column;
justify-content: flex-start;
width: 100%;
flex-wrap: wrap;
padding: 15rpx;
box-shadow: 0rpx 2rpx 2rpx rgba(4, 0, 0, .2);
}
.options-box .item {
font-size: 28rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
min-width: 20%;
border-radius: 20rpx;
padding: 7.5rpx 0rpx 7.5rpx 0rpx;
}
.options-box .item:nth-child(1) {
padding: 0rpx 0rpx 7.5rpx 0rpx;
}
.loading-box {
width: 100%;
display: flex;
justify-content: center;
}
.play-box { .play-box {
display: flex; display: flex;
margin-left: 20rpx; margin-left: 20rpx;
@ -4146,9 +4224,46 @@ l .text-depblack {
padding: 10rpx 0rpx; padding: 10rpx 0rpx;
} }
.play-box-shadow {
display: flex;
flex-direction: column;
width: 80%;
background-color: white;
border-radius: 15rpx;
align-items: center;
justify-content: center;
padding: 15rpx;
position: relative;
margin-bottom: 15rpx;
box-shadow: 0 4rpx 8rpx 0 rgba(0, 0, 0, 0.2), 0 6rpx 20rpx 0 rgba(0, 0, 0, 0.19);
}
.play-box-shadow-little {
display: flex;
flex-direction: column;
width: 100%;
background-color: white;
border-radius: 15rpx;
align-items: center;
justify-content: center;
padding: 15rpx;
position: relative;
margin-bottom: 15rpx;
box-shadow: 0 0 4rpx 0 rgba(0, 0, 0, 0.2), 0 0 10rpx 0 rgba(0, 0, 0, 0.04);
}
.page-box {
width: 100%;
padding: 15rpx;
background: #F7F7F7;
/* background: #64faff; */
display: flex;
flex-direction: column;
align-items: center;
}
.play-box-arrow-flex { .play-box-arrow-flex {
width: 100%; width: 100%;
height: 100%;
display: flex; display: flex;
position: absolute; position: absolute;
justify-content: center; justify-content: center;
@ -4192,6 +4307,26 @@ l .text-depblack {
border-radius: 50%; border-radius: 50%;
} }
.play-box-shadow image {
width: 60rpx;
height: 60rpx;
}
.play-box-shadow image:active {
background-color: rgb(204, 202, 202);
border-radius: 50%;
}
.play-box-shadow-little image {
width: 60rpx;
height: 60rpx;
}
.play-box-shadow-little image:active {
background-color: rgb(204, 202, 202);
border-radius: 50%;
}
.text-left input { .text-left input {
text-align: right; text-align: right;
} }

View File

@ -13,7 +13,11 @@ Component({
properties: { properties: {
bgColor: { bgColor: {
type: String, type: String,
default: 'title-bar-bg' default: '1'
},
isWhite: {
type: [Boolean, String],
default: false
}, },
isCustom: { isCustom: {
type: [Boolean, String], type: [Boolean, String],
@ -47,7 +51,7 @@ Component({
StatusBar: app.globalData.StatusBar, StatusBar: app.globalData.StatusBar,
CustomBar: app.globalData.CustomBar, CustomBar: app.globalData.CustomBar,
Custom: app.globalData.Custom, Custom: app.globalData.Custom,
userIcon: wx.getStorageSync('userIcon') || app.globalData.userIcon userIcon: wx.getStorageSync('userIcon') || '/images/ic_user_default.png'
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
@ -82,7 +86,6 @@ Component({
}, },
// 点击标题 // 点击标题
showIcre() { showIcre() {
console.log('点击了')
this.triggerEvent('show', {}, {}) this.triggerEvent('show', {}, {})
} }
} }

View File

@ -1,6 +1,7 @@
<view class="cu-custom" style="height:{{CustomBar}}px"> <view class="cu-custom" style="height:{{CustomBar}}px">
<view class="cu-bar fixed {{bgImage!=''?'none-bg text-white bg-img':''}} {{bgColor}} title-bar-bg" <view
style="height:{{CustomBar}}px;padding-top:{{StatusBar}}px;{{bgImage?'background-image:url(' + bgImage+')':''}}"> class="cu-bar fixed {{bgImage!=''?'none-bg text-white bg-img':''}} {{isWhite ? 'title-bar-bg-white':'title-bar-bg'}}"
style="height:{{CustomBar}}px;padding-top:{{StatusBar}}px;">
<view class="action" bindtap="BackPage" wx:if="{{isBack}}"> <view class="action" bindtap="BackPage" wx:if="{{isBack}}">
<text class="cuIcon-back"></text> <text class="cuIcon-back"></text>
<slot name="backText"></slot> <slot name="backText"></slot>

View File

@ -21,8 +21,18 @@
} }
.title-bar-bg { .title-bar-bg {
/* background-color: #0054bd; */ background-color: #E6B980;
/* background-color: #ffffff; */
color: #fff;
/* color: #000000; */
}
.title-bar-bg-white {
background-color: #ffffff; background-color: #ffffff;
/* color: #fff; */
color: #000000; color: #000000;
}
.title-bar-bg-dark {
background-color: #000000;
color: #ffffff;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 625 B

BIN
images/htm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 561 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 471 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
images/ic_cash.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 791 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 810 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 747 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 875 B

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 587 B

BIN
images/ic_hot_number_bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 985 B

After

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 575 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
images/ic_order_all.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 874 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 826 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 839 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 620 B

BIN
images/ic_poster_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B

BIN
images/ic_purse.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 681 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
images/ic_scan_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 829 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
images/ic_share_img.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
images/ic_share_moment.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1023 B

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 973 B

After

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 676 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 999 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 808 B

After

Width:  |  Height:  |  Size: 470 B

BIN
images/ic_vip_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 785 B

BIN
images/ic_wait_pay.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

BIN
images/ic_wait_receipt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 805 B

BIN
images/ic_wechat_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 B

BIN
images/ic_yellow_bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
images/jpg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
images/lib.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 925 B

BIN
images/map.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

BIN
images/mp3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
images/mp4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
images/txt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 913 B

View File

@ -28,17 +28,10 @@ Page({
token: '', token: '',
oldToken: '', oldToken: '',
fromMine: false, fromMine: false,
list: [{ imgTempSrc: '',
"text": "首页", currentIndex: 0,
"iconPath": "/images/ic_card_sel.png", windowWidth: app.globalData.windowWidth,
"selectedIconPath": "/images/ic_card_sel.png", scale: 1
},
{
"text": "我的",
"iconPath": "/images/ic_mine_normal.png",
"selectedIconPath": "/images/ic_mine_sel.png",
}
]
}, },
tabChange(e) { tabChange(e) {
this.setData({ this.setData({
@ -86,15 +79,6 @@ Page({
}) })
} }
}) })
// wx.showToast({
// title: '加载中',
// icon: 'loading',
// success: function () {
// self.setData({
// isLoading: true
// })
// }
// })
var content = { var content = {
pictureTemplateId: self.data.cardId, pictureTemplateId: self.data.cardId,
cardTemplateUseAreaList: [] cardTemplateUseAreaList: []
@ -121,18 +105,23 @@ Page({
success: (res) => { success: (res) => {
self.setData({ self.setData({
isLoading: false, isLoading: false,
showHide: true })
wx.showModal({
content: '恭喜您名片创建成功,如需查看请到(我的 → 我的卡包)',
cancelText: '继续创建',
confirmText: '返回列表',
cancelColor: '#333333',
confirmColor: '#333333',
success(res) {
if (res.confirm) {
self.backList()
} else {
self.continueCreate()
}
}
}) })
}, },
}) })
// wx.hideToast({
// success: (res) => {
// self.setData({
// isLoading: false,
// showHide: true
// })
// },
// })
} }
}).catch(res => { }).catch(res => {
self.setData({ self.setData({
@ -141,64 +130,83 @@ Page({
}) })
}) })
}, },
//输入框失去焦点
inputBlur(e) {
var _self = this
// templateAreaFontLength
var value = e.detail.value
var index = e.currentTarget.dataset.num
var item = e.currentTarget.dataset.item
//计算限制长度
//最大长度
var maxLength = item.templateAreaFontLength
if (value != '' && maxLength > 0) {
value = value.substr(0, maxLength)
//重新设置
_self.data.areaList[index].templateAreaFontValue = value
_self.data.areaList[index].focus = false
_self.setData({
areaList: _self.data.areaList
})
}
//生成二维码图片
if (item.templateAreaServerLink != '1') {
_self.getFileId(index)
}
},
// 选择图片 // 选择图片
choosePhoto: function (e) { choosePhoto: function (e) {
var self = this var self = this
var cur = e.currentTarget.dataset.cur var cur = e.currentTarget.dataset.cur
var item = e.currentTarget.dataset.item
console.log(cur)
self.setData({
currentIndex: cur
})
//宽高比
var scale = item.templateAreaWidth / item.templateAreaHeight
wx.chooseImage({ wx.chooseImage({
count: 1, count: 1,
sourceType: ['album', 'camera'], sourceType: ['album', 'camera'],
success: function (res) { success: function (res) {
wx.showLoading({ wx.navigateTo({
title: '上传中...', url: '/packagecard/common/corpperimg/cropperimg?imgSrc=' + res.tempFiles[0].path + '&scale=' + scale,
}) })
app.http.upload(app.urls.doUploadImg, {
path: res.tempFiles[0].path,
name: 'image',
header: {
token: app.globalData.token
}
}).then(res => {
wx.hideLoading({})
res = JSON.parse(res)
console.log(res)
var change = 'areaList[' + cur + '].templateAreaFile'
self.setData({
[change]: res.data
})
wx.showToast({
title: '上传成功',
duration: 1500
})
}).catch(res => {
})
// app.restAjax.file(app.restAjax.path('{cardUrl}app/file/uploadimage', [app.tradeUrl]), res.tempFiles[0].path, 'image', {
// headers: {
// token: app.globalData.token
// }
// }, function (code, data) {
// console.log(data)
// data = JSON.parse(data)
// wx.hideLoading({})
// var change = 'areaList[' + cur + '].templateAreaTitle'
// self.setData({
// [change]: data.data
// })
// wx.showToast({
// title: '上传成功',
// duration: 1500
// })
// }, function (code, data) {
// app.dialog.msg(data.msg);
// });
} }
}) })
}, },
getPhoneNumber: function (e) { doUploadImg(path) {
console.log(e.detail.errMsg) var _self = this
console.log(e.detail.iv) wx.showLoading({
console.log(e.detail.encryptedData) title: '上传中...',
})
app.http.upload(app.urls.doUploadImg, {
path: path,
name: 'image',
header: {
token: app.globalData.token
}
}).then(res => {
wx.hideLoading({})
res = JSON.parse(res)
var change = 'areaList[' + _self.data.currentIndex + '].templateAreaFile'
_self.setData({
[change]: res.data
})
wx.showToast({
title: '上传成功',
duration: 1500
})
_self.setData({
imgTempSrc: '',
currentIndex: 0
})
}).catch(res => {
_self.setData({
imgTempSrc: '',
currentIndex: 0
})
})
}, },
// 获取名片信息 // 获取名片信息
getNameCard: function () { getNameCard: function () {
@ -215,8 +223,10 @@ Page({
}, },
data: {} data: {}
}).then(res => { }).then(res => {
console.log(res.data)
var area = res.data.areaList var area = res.data.areaList
var scale = res.data.picturesTemplateWidth / self.data.windowWidth
res.data.picturesTemplateWidth = res.data.picturesTemplateWidth / scale
res.data.picturesTemplateHeight = res.data.picturesTemplateHeight / scale
for (let i = 0; i < area.length; i++) { for (let i = 0; i < area.length; i++) {
if (area[i].templateAreaFontCenter == '1') { if (area[i].templateAreaFontCenter == '1') {
area[i].templateAreaFontCenter = 'left' area[i].templateAreaFontCenter = 'left'
@ -232,12 +242,13 @@ Page({
} else { } else {
area[i]['templateAreaFontStyle'] = 'italic' area[i]['templateAreaFontStyle'] = 'italic'
} }
if (area[i].templateAreaServerLink == '1') { area[i].templateAreaFontSize = area[i].templateAreaFontSize / scale + 'px'
if (area[i].templateAreaFontValue.length > area[i].templateAreaFontLength) { area[i].templateAreaHeight = area[i].templateAreaHeight / scale
area[i].templateAreaFontValue = area[i].templateAreaFontValue.substring(area[i].templateAreaFontLength, -1) area[i].templateAreaWidth = area[i].templateAreaWidth / scale
} area[i].templateAreaDown = area[i].templateAreaDown / scale
} area[i].templateAreaTop = area[i].templateAreaTop / scale
area[i].templateAreaFontSize = Math.floor(area[i].templateAreaFontSize * 750 / wx.getSystemInfoSync().windowWidth) + 'rpx' area[i].templateAreaRight = area[i].templateAreaRight / scale
area[i].templateAreaLeft = area[i].templateAreaLeft / scale
} }
self.setData({ self.setData({
cardInfo: res.data, cardInfo: res.data,
@ -247,36 +258,7 @@ Page({
.catch(err => { .catch(err => {
}) })
// app.restAjax.get(app.restAjax.path('{cardUrl}app/cardtemplate/getcardtemplatebyid/' + self.data.cardId + queryInfo, [app.cardUrl]), {}, {
// headers: {
// token: app.globalData.token
// }
// }, function (code, data) {
// for (let i = 0; i < self.data.fontFamilyList.length; i++) {
// if (data.templateTypeface == self.data.fontFamilyList[i].id) {
// self.setData({
// useFontFamily: self.data.fontFamilyList[i].name
// })
// }
// }
// if (self.data.fromMine) {
// self.setData({
// areaList: JSON.parse(data.content)
// })
// }
// self.setData({
// cardInfo: data
// })
// var query = wx.createSelectorQuery()
// query.select('.card').boundingClientRect()
// query.exec(function (res) {
// self.setData({
// cardHeight: res[0].height
// })
// })
// }, function (code, data) {
// app.dialog.msg(data.msg);
// });
}, },
// 获取名片内容区域 // 获取名片内容区域
getNameCradArea: function () { getNameCradArea: function () {
@ -335,29 +317,6 @@ Page({
delta: 1, delta: 1,
}) })
}, },
// 登录
doLogin: function () {
var self = this;
wx.login({
success(res) {
app.restAjax.post(app.restAjax.path('{url}wechat/miniapp/sign/default', [app.personIntroUrl]), {
jsCode: res.code
}, null, function (code, data) {
var token = data.data.split('_')[0]
self.setData({
token: token,
bindPhone: data.data.split('_')[1]
})
wx.setStorageSync('token', token)
wx.setStorageSync('bindPhone', data.data.split('_')[1])
app.globalData.token = token
self.getUserInfo()
}, function (code, data) {
app.dialog.msg(data.msg);
});
}
})
},
// 获取用户信息 // 获取用户信息
getUserInfo: function () { getUserInfo: function () {
var self = this var self = this
@ -374,8 +333,7 @@ Page({
// 非文字、图片区域换取fileid // 非文字、图片区域换取fileid
getFileId: function (e) { getFileId: function (e) {
var self = this var self = this
var cur = e.currentTarget.dataset.num var cur = e
var content = self.data.areaList[cur].templateAreaFontValue var content = self.data.areaList[cur].templateAreaFontValue
console.log(content) console.log(content)
var areaId = self.data.areaList[cur].picturesTemplateAreaId var areaId = self.data.areaList[cur].picturesTemplateAreaId
@ -406,7 +364,7 @@ Page({
var self = this var self = this
this.setData({ this.setData({
cardId: options.id, cardId: options.id,
token: app.globalData.token token: app.globalData.token,
}) })
this.getNameCard() this.getNameCard()
}, },
@ -430,25 +388,16 @@ Page({
}, },
openPage() { openPage() {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
console.log(this.data.imgTempSrc)
if (this.data.imgTempSrc != '') {
this.doUploadImg(this.data.imgTempSrc)
}
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}) })

View File

@ -1,78 +1,94 @@
<cu-custom isCustom="{{false}}" isBack="{{true}}"> <cu-custom isCustom="{{false}}" isBack="{{true}}">
<view slot="content">名片</view> <view slot="content">创建名片</view>
</cu-custom> </cu-custom>
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" wx:if="{{bindPhone == '0'}}">获取手机号</button> <view style="margin:15rpx;">
<view class="card" <view class="card"
style="padding-bottom:{{(cardInfo.picturesTemplateHeight / cardInfo.picturesTemplateWidth) *100 +'%'}};"> style="padding-bottom:{{(cardInfo.picturesTemplateHeight / cardInfo.picturesTemplateWidth) *100 +'%'}};">
<!-- 背景图 --> <!-- 背景图 -->
<image src="{{cardUrl}}{{cardInfo.picturesTemplateBackgroundImage}}" alt="" class="card-bgImg" <image src="{{cardUrl}}{{cardInfo.picturesTemplateBackgroundImage}}" alt="" class="card-bgImg"
wx:if="{{cardInfo.picturesTemplateBackgroundImage}}"></image> wx:if="{{cardInfo.picturesTemplateBackgroundImage}}"></image>
<!-- 文字 --> <!-- 文字 -->
<view class="area-box" wx:for="{{areaList}}" data-cur="{{index}}" bindtap="giveFocus" wx:key="index" <view
style="position:absolute;top: {{(item.templateAreaTop / cardInfo.picturesTemplateHeight) * 100 + '%'}};left:{{(item.templateAreaLeft / cardInfo.picturesTemplateWidth) * 100 + '%'}};color:{{item.templateAreaFontColor}};;width:{{(item.templateAreaWidth / cardInfo.picturesTemplateWidth) * 100 + '%'}};height:{{(item.templateAreaHeight / cardInfo.picturesTemplateHeight) * 100 + '%'}};font-size:{{item.templateAreaFontSize}};font-style:{{item.templateAreaFontStyle}};font-weight:{{item.templateAreaFontBold}};text-align:{{item.templateAreaFontCenter}}" class="area-box {{item.templateAreaFontCenter == 'left' ? 'wrap-line' :''}} {{item.templateAreaFontCenter == 'center' ? 'wrap-center' :''}} {{item.templateAreaFontCenter == 'right' ? 'wrap-line' :''}} "
wx:if="{{item.templateAreaServerLink == '1'}}"> wx:for="{{areaList}}" data-cur="{{index}}" catchtap="giveFocus" wx:key="index"
{{item.templateAreaFontValue}} 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;"
</view> wx:if="{{item.templateAreaServerLink == '1' && item.templateAreaType != '1'}}">
{{item.templateAreaFontValue}}
</view>
<!-- 图片 --> <!-- 图片 -->
<view wx:for="{{areaList}}" data-cur="{{index}}" bindtap="choosePhoto" wx:key="index" <!-- catchtap="choosePhoto" -->
style="position:absolute;top: {{(item.templateAreaTop / cardInfo.picturesTemplateHeight) * 100 + '%'}};left:{{(item.templateAreaLeft / cardInfo.picturesTemplateWidth) * 100 + '%'}};color:{{item.templateAreaFontColor}};width:{{(item.templateAreaWidth / cardInfo.picturesTemplateWidth) * 100 + '%'}};height:{{(item.templateAreaHeight / cardInfo.picturesTemplateHeight) * 100 + '%'}}" <view wx:for="{{areaList}}" data-cur="{{index}}" wx:key="index" data-item="{{item}}"
wx:if="{{item.templateAreaServerLink == '2'}}"> style="position:absolute;top: {{(item.templateAreaTop / cardInfo.picturesTemplateHeight) * 100 + '%'}};left:{{(item.templateAreaLeft / cardInfo.picturesTemplateWidth) * 100 + '%'}};color:{{item.templateAreaFontColor}};width:{{(item.templateAreaWidth / cardInfo.picturesTemplateWidth) * 100 + '%'}};height:{{(item.templateAreaHeight / cardInfo.picturesTemplateHeight) * 100 + '%'}};"
<image src="{{cardUrl}}{{item.templateAreaFile}}" style="width: 100%;height:100%"></image> wx:if="{{item.templateAreaServerLink == '2'}}">
</view> <image src="{{cardUrl}}{{item.templateAreaFile}}" style="width: 100%;height:100%"></image>
</view>
<!-- 其他 --> <!-- 其他 -->
<view class="area-box" wx:for="{{areaList}}" data-cur="{{index}}" wx:key="index" bindtap="giveFocus" <view class="area-box" wx:for="{{areaList}}" data-cur="{{index}}" wx:key="index" catchtap="giveFocus"
style="position:absolute;top: {{(item.templateAreaTop / cardInfo.picturesTemplateHeight) * 100 + '%'}};left:{{(item.templateAreaLeft / cardInfo.picturesTemplateWidth) * 100 + '%'}};color:{{item.templateAreaFontColor}};width:{{(item.templateAreaWidth / cardInfo.picturesTemplateWidth) * 100 + '%'}};height:{{(item.templateAreaHeight / cardInfo.picturesTemplateHeight) * 100 + '%'}}" style="position:absolute;top: {{(item.templateAreaTop / cardInfo.picturesTemplateHeight) * 100 + '%'}};left:{{(item.templateAreaLeft / cardInfo.picturesTemplateWidth) * 100 + '%'}};color:{{item.templateAreaFontColor}};width:{{(item.templateAreaWidth / cardInfo.picturesTemplateWidth) * 100 + '%'}};height:{{(item.templateAreaHeight / cardInfo.picturesTemplateHeight) * 100 + '%'}}"
wx:if="{{item.templateAreaServerLink != '1' && item.templateAreaServerLink != '2'}}"> wx:if="{{item.templateAreaType == '1' && item.templateAreaServerLink == '1'}}">
<text wx:if="{{!item.templateAreaFile}}">{{item.templateAreaFontValue}}</text> <text wx:if="{{!item.templateAreaFile}}">{{item.templateAreaFontValue}}</text>
<image src="{{cardUrl}}{{item.templateAreaFile}}" wx:else></image> <image src="{{cardUrl}}{{item.templateAreaFile}}" wx:else></image>
<!-- <image src="{{cardUrl}}{{item.templateAreaFile}}" style="width: 100%;height:100%"></image> --> <!-- <image src="{{cardUrl}}{{item.templateAreaFile}}" style="width: 100%;height:100%"></image> -->
</view>
</view> </view>
</view> </view>
<!-- <view class="card-title">{{cardInfo.picturesTemplateTitle}}</view> --> <view class="content-box">
<view class="card-title">适用行业:{{cardInfo.templateIndustryName}}</view> <view class="card-title">适用行业:{{cardInfo.templateIndustryName}}</view>
<view class="card-info"> <view class="card-info">
<view class="edit-card"> <view class="edit-card">
<view class="row" wx:for="{{areaList}}" wx:key="index" <view wx:for="{{areaList}}" wx:key="index"
wx:if="{{item.templateAreaServerLink != '2' && item.templateAreaType != '1'}}"> wx:if="{{item.templateAreaServerLink != '2' && item.templateAreaType != '1'}}">
<view class="item-title">{{item.templateAreaName}}:</view> <view class="row-ver">
<view class="item-input"> <view class="item-title-box">
<input type="text" placeholder="请输入内容,最多{{item.templateAreaFontLength}}个字" bindinput="editInfo" <view class="item-title">{{item.templateAreaName}}</view>
data-num="{{index}}" bindblur="getFileId" value="{{item.templateAreaFontValue}}" focus="{{item.focus}}" <view class="hint-txt" wx:if="{{item.templateAreaFontLength>0}}">最多输入{{item.templateAreaFontLength}}个字符
wx:if="{{item.templateAreaServerLink != '1'}}" maxlength="{{item.templateAreaFontLength}}"></input> </view>
<input type="text" placeholder="请输入内容,最多{{item.templateAreaFontLength}}个字" bindinput="editInfo" </view>
data-num="{{index}}" value="{{item.templateAreaFontValue}}" focus="{{item.focus}}" <view class="item-input">
maxlength="{{item.templateAreaFontLength}}" wx:else></input> <input type="text" data-num="{{index}}" bindblur="inputBlur" data-item="{{item}}"
value="{{item.templateAreaFontValue}}" focus="{{item.focus}}"
wx:if="{{item.templateAreaServerLink != '1'}}"></input>
<input type="text" placeholder="请输入内容,最多{{item.templateAreaFontLength}}个字" data-item="{{item}}"
bindblur="inputBlur" data-num="{{index}}" value="{{item.templateAreaFontValue}}" focus="{{item.focus}}"
wx:else></input>
</view>
</view>
</view> </view>
</view>
<view class="row" wx:for="{{areaList}}" wx:key="index" <view class="row-ver" wx:for="{{areaList}}" wx:key="index"
wx:if="{{item.templateAreaServerLink == '2' && item.templateAreaType != '1'}}"> wx:if="{{item.templateAreaServerLink == '2' && item.templateAreaType != '1'}}">
<view class="item-title">{{item.templateAreaName}}:</view> <view class="item-title-box">
<view bindtap="choosePhoto" data-cur="{{index}}" class="card-img-box"> <view class="item-title">{{item.templateAreaName}}</view>
<image src="{{cardUrl}}{{item.templateAreaFile}}" mode="widthFix"></image> <view class="hint-txt" wx:if="{{item.templateAreaFontLength>0}}">最多输入1张图片</view>
<text class="cuIcon-cameraadd"></text> </view>
<view bindtap="choosePhoto" data-cur="{{index}}" data-item="{{item}}" class="card-img-box">
<image src="{{cardUrl}}{{item.templateAreaFile}}" mode="widthFix"></image>
<text class="cuIcon-cameraadd" style="font-size: 100rpx;"></text>
</view>
</view> </view>
</view> <!-- <view class="row" wx:for="{{areaList}}" wx:key="index" wx:if="{{item.templateAreaType == '9'}}">
<!-- <view class="row" wx:for="{{areaList}}" wx:key="index" wx:if="{{item.templateAreaType == '9'}}">
<view class="item-title">二维码:</view> <view class="item-title">二维码:</view>
<view class="item-input item-code-input" bindtap="choosePhoto" data-cur="{{index}}"> <view class="item-input item-code-input" bindtap="choosePhoto" data-cur="{{index}}">
<image src="{{cardUrl}}route/file/download/true/{{item.templateAreaTitle}}"></image> <image src="{{cardUrl}}route/file/download/true/{{item.templateAreaTitle}}"></image>
点击修改 点击修改
</view> </view>
</view> --> </view> -->
</view>
</view> </view>
</view> </view>
<view class="padding-xs foot bg-white" wx:if="{{!isLoading}}"> <view class="foot bg-white" style="padding: 15rpx;" wx:if="{{!isLoading}}">
<button class="cu-btn bg-blue" style="width:100%" bindtap="createMyCard">生成我的名片</button> <button class="cu-btn bg-blue" style="width:100%" bindtap="createMyCard">生成我的名片</button>
</view> </view>
<view class="hide-link" wx:if="{{showHide}}"> <view class="hide-link" wx:if="{{showHide}}">
<view class="hide"> <view class="hide">
<view class="hide-text">名片创建成功,如需查看请到"我的"-"我的卡包"</view> <view class="hide-title">创建成功</view>
<view class="hide-text">恭喜您名片创建成功,如需查看请到(我的 → 我的卡包)</view>
<view class="hide-btn-box"> <view class="hide-btn-box">
<view class="hide-btn" bindtap="continueCreate">继续创建</view> <view class="hide-btn" bindtap="continueCreate">继续创建</view>
<view class="hide-btn" bindtap="backList">返回模板列表</view> <view class="hide-btn" bindtap="backList">返回模板</view>
</view> </view>
</view> </view>
</view> </view>

View File

@ -1,13 +1,8 @@
page {
background: #f7f7f7;
}
.card { .card {
width: 100%; width: 100%;
height: 0; height: 0;
position: relative; position: relative;
box-sizing: border-box; box-sizing: border-box;
background: #fff;
z-index: 100; z-index: 100;
/* text-align: center; */ /* text-align: center; */
} }
@ -21,7 +16,6 @@ page {
} }
.area-box { .area-box {
white-space: nowrap;
background: none !important; background: none !important;
z-index: 111; z-index: 111;
} }
@ -32,23 +26,40 @@ page {
} }
.card-info { .card-info {
padding: 20rpx; padding-bottom: 100rpx;
background: #fff; width: 100%;
margin-bottom: 80rpx; margin-top: 15rpx;
} }
.card-title { .card-title {
font-size: 38rpx; font-size: 30rpx;
background: #f7f7f7; background: #ffffff;
line-height: 70rpx; width: 100%;
padding: 10 20rpx; padding: 15rpx;
} }
.row { .row {
display: flex; display: flex;
padding: 15rpx 0;
border-bottom: 1px solid #EEE; border-bottom: 1px solid #EEE;
/* margin-bottom: 15rpx; */ background: #ffffff;
border-bottom: 1rpx solid #f5f5f5;
}
.row-ver {
display: flex;
border-bottom: 1px solid #EEE;
border-bottom: 1rpx solid #f5f5f5;
flex-direction: column;
background-color: #ffffff;
padding: 15rpx;
}
.row-ver:nth-child(1) {
padding: 15rpx 15rpx 7.5rpx 15rpx;
}
.row-ver:last-child {
padding: 7.5rpx 15rpx 15rpx 15rpx;
} }
.item-title { .item-title {
@ -56,7 +67,14 @@ page {
font-size: 32rpx; font-size: 32rpx;
line-height: 50rpx; line-height: 50rpx;
color: #808080; color: #808080;
align-self: center; }
.item-title-box {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
margin-top: 7.5rpx;
} }
.item-input { .item-input {
@ -64,11 +82,12 @@ page {
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: 15rpx;
} }
.item-input input { .item-input input {
width: 100%; width: 100%;
text-align: right; text-align: left;
height: 50rpx; height: 50rpx;
font-size: 32rpx; font-size: 32rpx;
color: #333; color: #333;
@ -84,34 +103,8 @@ page {
max-height: 160rpx; max-height: 160rpx;
} }
.share {
padding: 20rpx 15rpx;
text-align: center;
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: #fff;
z-index: 1000;
}
.share .btn {
display: inline-block;
width: 100% !important;
background: #0054bd;
color: #fff;
margin-right: 2%;
font-size: 28rpx;
font-weight: normal;
height: 70rpx;
line-height: 70rpx;
text-align: center;
border-radius: 10rpx;
}
.share .btn:last-child {
margin-right: 0;
}
.hide-link { .hide-link {
position: fixed; position: fixed;
@ -119,7 +112,6 @@ page {
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
padding: 0 15rpx;
background: rgba(0, 0, 0, 0.6); background: rgba(0, 0, 0, 0.6);
z-index: 1000; z-index: 1000;
} }
@ -128,33 +120,55 @@ page {
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
width: 90%; width: 60%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
padding: 20rpx;
border-radius: 10rpx; border-radius: 10rpx;
background: #fff; background: #fff;
}
.hide-btn {
display: flex; display: flex;
width: 49%; flex-direction: column;
height: 60rpx;
background: #1296db;
color: #fff;
font-size: 30rpx;
border-radius: 10rpx;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.hide-text { .hide-btn {
display: flex;
width: 50%;
height: 60rpx;
background: #1d7ff0;
color: #fff;
font-size: 30rpx; font-size: 30rpx;
justify-content: center;
align-items: center;
border-bottom-left-radius: 10rpx;
border-bottom-right-radius: 10rpx;
}
.hide-btn:nth-child(1) {
background: #E6B980;
border-bottom-left-radius: 10rpx;
border-bottom-right-radius: 0rpx;
}
.hide-btn:last-child {
border-bottom-left-radius: 0rpx;
border-bottom-right-radius: 10rpx;
}
.hide-text {
font-size: 36rpx;
color: #000; color: #000;
margin-bottom: 20rpx; padding: 50rpx 30rpx;
}
.hide-title {
font-size: 43rpx;
color: #ffC107;
padding: 10rpx;
} }
.hide-btn-box { .hide-btn-box {
display: flex; display: flex;
width: 100%;
justify-content: space-between; justify-content: space-between;
} }
@ -162,8 +176,17 @@ page {
width: 100%; width: 100%;
} }
.content-box {
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 15rpx;
}
.cuIcon-cameraadd { .cuIcon-cameraadd {
font-size: 100rpx; font-size: 60rpx;
} }
.card-img-box { .card-img-box {
@ -171,9 +194,30 @@ page {
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
margin-right: 40rpx; margin-right: 40rpx;
justify-content: space-between;
} }
.card-img-box image { .card-img-box image {
width: 200rpx; width: 200rpx;
height: 200rpx; height: 200rpx;
}
.hint-txt {
text-align: right;
color: #fd9494;
font-size: 24rpx;
}
/* 换行 */
.wrap-line {
overflow-wrap: break-word;
}
/* 居中 */
.wrap-center {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
overflow-wrap: break-word;
} }

View File

@ -6,53 +6,182 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
cardUrl: app.cardUrl, imgUrl: app.urls.baseImgUrl,
cardList: [] cardList: [],
}, currentIndex: 0,
getList: function () { optionsList: [],
var self = this isNeedPay: false, //是否需要交费
wx.showNavigationBarLoading() needPayPrice: 0, //个人需要交费
app.http.get(app.urls.getCardList, { needPayTeamPrice: 0, //团体需要交费
header: { curTypeId: '',
token: app.globalData.token isRefreshing: false, //是否在刷新
} isRefresh: false,
}).then(res => { isShowCodeInput: false, //测试true
self.setData({ code: '', //邀请码
cardList: res.data conentHeight: 550, //滚动内容的高度
})
wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh() //停止下拉刷新
})
.catch(err => {
wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh() //停止下拉刷新
})
},
goDetail: function (e) {
var id = e.currentTarget.dataset.id
console.log(id)
wx.navigateTo({
url: '../cardDetail/cardDetail?id=' + id,
})
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
var self = this // this.getPayState()
wx.getStorage({ //屏幕高度-标题的高度
key: 'token', this.setData({
success: function (res) { conentHeight: app.globalData.windowHeight
self.setData({
token: res.data
})
app.globalData.token = res.data
self.getList()
}
}) })
}, },
onShow() {
this.dorefreshList()
},
//列表刷新
dorefreshList() {
var _self = this
_self.setData({
isRefresh: false,
isRefreshing: true,
cardList: []
})
_self.getPayState()
},
//获取类型
getOptionsList() {
var _self = this
wx.showLoading({
title: '加载中...',
})
app.http.get(app.urls.getDictionaryList.format({
dataParentId: '4bf68c60-eac5-480d-b5e1-15203d0282f9'
}), {
header: {
token: app.globalData.token
}
})
.then(res => {
wx.hideLoading({})
if (res.data.length > 0) {
_self.setData({
optionsList: res.data,
curTypeId: res.data[_self.data.currentIndex].dataId,
currentIndex: _self.data.currentIndex
})
//根据第一条获取数据
_self.getList()
}
})
.catch(err => {
console.log(err)
_self.setData({
isRefreshing: false
})
})
},
getList() {
var self = this
wx.showLoading({
title: '加载中...',
})
app.http.get(app.urls.getCardList, {
header: {
token: app.globalData.token
},
data: {
templateType: self.data.curTypeId
}
}).then(res => {
wx.hideLoading({})
res.data.forEach(it => {
if (it.picturesTemplateNumber > 1000 && it.picturesTemplateNumber < 10000) {
it.number = it.picturesTemplateNumber / 1000 + 'K+'
} else if (it.picturesTemplateNumber > 10000 && it.picturesTemplateNumber < 1000000) {
it.number = it.picturesTemplateNumber / 10000 + 'W+'
} else {
it.number = it.picturesTemplateNumber
}
})
self.setData({
cardList: res.data,
isRefreshing: false
})
})
.catch(err => {
wx.hideLoading({})
self.setData({
isRefreshing: false
})
})
},
goDetail: function (e) {
var _self = this
var id = e.currentTarget.dataset.id
var isPay = e.currentTarget.dataset.ispay //是否需要交费
var price = e.currentTarget.dataset.price //价格
var payState = e.currentTarget.dataset.paystate //交费转态
if (_self.data.isNeedPay) {
wx.navigateTo({
url: '/packagecard/paypage/paypage?price=' + _self.data.needPayPrice + '&teamprice=' + _self.data.needPayTeamPrice + '&displayTreaty=1&type=1',
})
} else {
//已经支付过
if (isPay == '1') {
//需要付款
//判断是否交过费
if (payState) {
wx.navigateTo({
url: '../cardDetail/cardDetail?id=' + id,
})
} else {
//交费
wx.navigateTo({
url: '/packagecard/paypage/paypage?price=' + price + '&type=2',
})
}
} else {
//免费
wx.navigateTo({
url: '../cardDetail/cardDetail?id=' + id,
})
}
}
},
onChange(e) {
var _self = this
_self.setData({
currentIndex: e.detail.index,
curTypeId: _self.data.optionsList[e.detail.index].dataId,
cardList: []
})
//重置所有数据重新加载
this.getList()
},
//获取支付状态
getPayState() {
var _self = this
wx.showLoading({
title: '加载中...',
})
app.http.get(app.urls.getPayState, {
header: {
token: app.globalData.token
}
})
.then(res => {
wx.hideLoading({})
//支付过跳转名片创建页面,没有支付跳转支付页面
_self.setData({
isNeedPay: res.data.cardCharge, //是否需要交费
needPayPrice: res.data.cardChargePrice, //个人
needPayTeamPrice: res.data.cardChargeDepartmentPrice, //团体
})
_self.getOptionsList()
})
.catch(err => {
_self.setData({
isRefreshing: false
})
})
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
@ -60,4 +189,35 @@ Page({
onPullDownRefresh: function () { onPullDownRefresh: function () {
this.getList() this.getList()
}, },
onClose(e) {
this.setData({
isShowCodeInput: false
})
},
inpuWatch(e) {
this.setData({
code: e.detail.value
})
},
//邀请码创建
codeCreate(e) {
var _self = this
if (_self.data.code == '') {
wx.showToast({
title: '请输入邀请码',
icon: 'none'
})
} else {
//未支付过跳转支付
wx.navigateTo({
url: '/packagecard/paypage/paypage?price=' + _self.data.needPayPrice + '&teamprice=' + _self.data.needPayTeamPrice + '&displayTreaty=1' + '&type=1&code=' + _self.data.code,
})
}
},
//无邀请码创建
noCodeCreate(e) {
wx.navigateTo({
url: '/packagecard/paypage/paypage?price=' + _self.data.needPayPrice + '&teamprice=' + _self.data.needPayTeamPrice + '&displayTreaty=1&type=1',
})
}
}) })

View File

@ -1,4 +1,3 @@
{ {
"usingComponents": {}, "usingComponents": {}
"enablePullDownRefresh": true
} }

Some files were not shown because too many files have changed in this diff Show More