Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
e84c1f69b1 | ||
|
740b45d2a3 | ||
|
91149f4224 |
3
app.js
@ -28,7 +28,6 @@ App({
|
||||
globalData: {
|
||||
userInfo: {},
|
||||
token: '',
|
||||
userId: '',
|
||||
showUserId: '', //当前浏览的人的ID
|
||||
userId: ''
|
||||
},
|
||||
})
|
89
app.json
@ -35,71 +35,49 @@
|
||||
"pages/mine/product/recycle/productrecycle",
|
||||
"pages/mine/product/coupon/couponlist",
|
||||
"pages/mine/product/coupon/editcoupon",
|
||||
"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"
|
||||
]
|
||||
}
|
||||
"pages/mine/product/coupon/choosegoods"
|
||||
],
|
||||
"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": {
|
||||
"backgroundTextStyle": "light",
|
||||
"navigationBarBackgroundColor": "#E6B980",
|
||||
"navigationBarTitleText": "服务",
|
||||
"navigationBarTextStyle": "white",
|
||||
"backgroundTextStyle": "dark",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationBarTitleText": "名片",
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationStyle": "custom"
|
||||
},
|
||||
"tabBar": {
|
||||
"color": "#000000",
|
||||
"selectedColor": "#000000",
|
||||
"borderStyle": "black",
|
||||
"list": [
|
||||
{
|
||||
"list": [{
|
||||
"text": "首页",
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "images/ic_card_normal.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": "我的",
|
||||
"pagePath": "pages/mine/index/index",
|
||||
@ -127,12 +105,7 @@
|
||||
"van-switch": "/vant/dist/switch/index",
|
||||
"van-tab": "/vant/dist/tab/index",
|
||||
"van-tabs": "/vant/dist/tabs/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"
|
||||
"van-picker": "/vant/dist/picker/index"
|
||||
},
|
||||
"plugins": {
|
||||
"chooseLocation": {
|
||||
|
12
app.wxss
@ -4,11 +4,9 @@
|
||||
|
||||
|
||||
page {
|
||||
background-color: #f7f7f7;
|
||||
/* background-color: #00eeff; */
|
||||
background-color: #FAFAFA;
|
||||
}
|
||||
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 0;
|
||||
height: 0;
|
||||
@ -25,14 +23,6 @@ scroll-view {
|
||||
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 {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
171
class/main.wxss
@ -27,7 +27,7 @@ page {
|
||||
--grey: #8799a3;
|
||||
--black: #333333;
|
||||
--darkGray: #666666;
|
||||
--gray: #999999;
|
||||
--gray: #aaaaaa;
|
||||
--ghostWhite: #f1f1f1;
|
||||
--white: #ffffff;
|
||||
--depBlack: #000000;
|
||||
@ -54,7 +54,6 @@ page {
|
||||
--gradualWhite: linear-gradient(45deg, #ffffff, #f8f8f8);
|
||||
--gradualGray: linear-gradient(85deg, #FAF9F9, #F5F2F2);
|
||||
--gradualYellow: linear-gradient(85deg, #F4DBB8, #E6B980);
|
||||
--gradualYellow2: linear-gradient(0deg, #ffb957, #E6B980);
|
||||
/* 阴影透明色 */
|
||||
--ShadowSize: 6rpx 6rpx 8rpx;
|
||||
--redShadow: rgba(204, 69, 59, 0.2);
|
||||
@ -802,16 +801,6 @@ button.icon.lg {
|
||||
height: 80rpx;
|
||||
}
|
||||
|
||||
.image-32 {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
}
|
||||
|
||||
.image-64 {
|
||||
width: 128rpx;
|
||||
height: 128rpx;
|
||||
}
|
||||
|
||||
.cu-btn.shadow-blur::before {
|
||||
top: 4rpx;
|
||||
left: 4rpx;
|
||||
@ -1299,9 +1288,9 @@ button.icon.lg {
|
||||
filter: grayscale(1);
|
||||
}
|
||||
|
||||
/* .cu-list+.cu-list {
|
||||
|
||||
} */
|
||||
.cu-list+.cu-list {
|
||||
margin-top: 30rpx
|
||||
}
|
||||
|
||||
.cu-list>.cu-item {
|
||||
transition: all .6s ease-in-out 0s;
|
||||
@ -1598,9 +1587,9 @@ button.icon.lg {
|
||||
|
||||
.cu-list.card-menu {
|
||||
overflow: hidden;
|
||||
margin-right: 15rpx;
|
||||
margin-left: 15rpx;
|
||||
border-radius: 5rpx
|
||||
margin-right: 30rpx;
|
||||
margin-left: 30rpx;
|
||||
border-radius: 20rpx
|
||||
}
|
||||
|
||||
|
||||
@ -2425,10 +2414,10 @@ button.icon.lg {
|
||||
==================== */
|
||||
|
||||
.cu-form-group {
|
||||
width: 100%;
|
||||
background-color: var(--white);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 80rpx;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
@ -2441,6 +2430,7 @@ button.icon.lg {
|
||||
padding-right: 20rpx;
|
||||
font-size: 32rpx;
|
||||
position: relative;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
|
||||
.cu-form-group .title-right {
|
||||
@ -2499,13 +2489,13 @@ button.icon.lg {
|
||||
}
|
||||
|
||||
.cu-form-group textarea {
|
||||
margin: 0rpx;
|
||||
height: 10em;
|
||||
margin: 0 0 30rpx;
|
||||
height: 6em;
|
||||
width: 100%;
|
||||
line-height: 1.2em;
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
padding: 15rpx;
|
||||
padding: 10rpx;
|
||||
}
|
||||
|
||||
.cu-form-group.align-start .title {
|
||||
@ -3090,7 +3080,8 @@ scroll-view.cu-steps .cu-item {
|
||||
}
|
||||
|
||||
.grid.grid-square>view {
|
||||
margin-right: 15rpx;
|
||||
margin-right: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 6rpx;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
@ -3115,9 +3106,9 @@ scroll-view.cu-steps .cu-item {
|
||||
}
|
||||
|
||||
.grid.col-3.grid-square>view {
|
||||
padding-bottom: calc((100% - 30rpx)/3);
|
||||
padding-bottom: calc((100% - 40rpx)/3);
|
||||
height: 0;
|
||||
width: calc((100% - 30rpx)/3);
|
||||
width: calc((100% - 40rpx)/3);
|
||||
}
|
||||
|
||||
.grid.col-4.grid-square>view {
|
||||
@ -3589,15 +3580,6 @@ scroll-view.cu-steps .cu-item {
|
||||
color: var(--white);
|
||||
}
|
||||
|
||||
.bg-yellowlight {
|
||||
background-color: var(--yellowLight);
|
||||
color: var(--white);
|
||||
}
|
||||
|
||||
.line-yellowlight2 {
|
||||
color: var(--yellowLight);
|
||||
}
|
||||
|
||||
.bg-orange {
|
||||
background-color: var(--orange);
|
||||
color: var(--white);
|
||||
@ -3612,20 +3594,11 @@ scroll-view.cu-steps .cu-item {
|
||||
color: var(--yellowLight);
|
||||
}
|
||||
|
||||
.bg-yellow-light-2 {
|
||||
background-image: var(--gradualYellow2);
|
||||
color: var(--white);
|
||||
}
|
||||
|
||||
.bg-yellow-light-1 {
|
||||
background-color: var(--yellowLight);
|
||||
color: var(--white);
|
||||
}
|
||||
|
||||
.bg-yellow-light-3 {
|
||||
color: var(--yellowLight);
|
||||
}
|
||||
|
||||
.bg-olive {
|
||||
background-color: var(--olive);
|
||||
color: var(--white);
|
||||
@ -3642,7 +3615,7 @@ scroll-view.cu-steps .cu-item {
|
||||
}
|
||||
|
||||
.bg-blue {
|
||||
background-color: var(--yellowLight);
|
||||
background-color: var(--blue);
|
||||
color: var(--white);
|
||||
}
|
||||
|
||||
@ -3930,7 +3903,6 @@ scroll-view.cu-steps .cu-item {
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.bg-mask {
|
||||
@ -4162,56 +4134,6 @@ 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 {
|
||||
display: flex;
|
||||
margin-left: 20rpx;
|
||||
@ -4224,46 +4146,9 @@ l .text-depblack {
|
||||
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 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
justify-content: center;
|
||||
@ -4307,26 +4192,6 @@ l .text-depblack {
|
||||
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-align: right;
|
||||
}
|
||||
|
@ -13,11 +13,7 @@ Component({
|
||||
properties: {
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: '1'
|
||||
},
|
||||
isWhite: {
|
||||
type: [Boolean, String],
|
||||
default: false
|
||||
default: 'title-bar-bg'
|
||||
},
|
||||
isCustom: {
|
||||
type: [Boolean, String],
|
||||
@ -51,7 +47,7 @@ Component({
|
||||
StatusBar: app.globalData.StatusBar,
|
||||
CustomBar: app.globalData.CustomBar,
|
||||
Custom: app.globalData.Custom,
|
||||
userIcon: wx.getStorageSync('userIcon') || '/images/ic_user_default.png'
|
||||
userIcon: wx.getStorageSync('userIcon') || app.globalData.userIcon
|
||||
},
|
||||
/**
|
||||
* 组件的方法列表
|
||||
@ -86,6 +82,7 @@ Component({
|
||||
},
|
||||
// 点击标题
|
||||
showIcre() {
|
||||
console.log('点击了')
|
||||
this.triggerEvent('show', {}, {})
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
<view class="cu-custom" style="height:{{CustomBar}}px">
|
||||
<view
|
||||
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="cu-bar fixed {{bgImage!=''?'none-bg text-white bg-img':''}} {{bgColor}} title-bar-bg"
|
||||
style="height:{{CustomBar}}px;padding-top:{{StatusBar}}px;{{bgImage?'background-image:url(' + bgImage+')':''}}">
|
||||
<view class="action" bindtap="BackPage" wx:if="{{isBack}}">
|
||||
<text class="cuIcon-back"></text>
|
||||
<slot name="backText"></slot>
|
||||
|
@ -21,18 +21,8 @@
|
||||
}
|
||||
|
||||
.title-bar-bg {
|
||||
background-color: #E6B980;
|
||||
/* background-color: #ffffff; */
|
||||
color: #fff;
|
||||
/* color: #000000; */
|
||||
}
|
||||
|
||||
.title-bar-bg-white {
|
||||
/* background-color: #0054bd; */
|
||||
background-color: #ffffff;
|
||||
/* color: #fff; */
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.title-bar-bg-dark {
|
||||
background-color: #000000;
|
||||
color: #ffffff;
|
||||
}
|
Before Width: | Height: | Size: 885 B After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 625 B After Width: | Height: | Size: 1.7 KiB |
BIN
images/htm.png
Before Width: | Height: | Size: 683 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 561 B After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 478 B After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 223 B After Width: | Height: | Size: 223 B |
Before Width: | Height: | Size: 471 B After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 524 B After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 301 B After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 587 B After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 598 B After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 885 B After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 791 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 810 B After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 747 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 524 B After Width: | Height: | Size: 875 B |
Before Width: | Height: | Size: 533 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 699 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 554 B After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 587 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 647 B |
Before Width: | Height: | Size: 603 B |
Before Width: | Height: | Size: 538 B After Width: | Height: | Size: 985 B |
Before Width: | Height: | Size: 575 B After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 498 B |
Before Width: | Height: | Size: 842 B After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 862 B After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 897 B After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 874 B After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 826 B After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 909 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 839 B After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 620 B After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 692 B |
Before Width: | Height: | Size: 681 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 829 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 499 B After Width: | Height: | Size: 1023 B |
Before Width: | Height: | Size: 547 B After Width: | Height: | Size: 973 B |
Before Width: | Height: | Size: 553 B After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 951 B |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 676 B After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 999 B After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 470 B After Width: | Height: | Size: 808 B |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 785 B |
Before Width: | Height: | Size: 945 B |
Before Width: | Height: | Size: 805 B |
Before Width: | Height: | Size: 713 B |
Before Width: | Height: | Size: 1.4 KiB |
BIN
images/jpg.png
Before Width: | Height: | Size: 1.3 KiB |
BIN
images/lib.png
Before Width: | Height: | Size: 925 B |
BIN
images/map.png
Before Width: | Height: | Size: 1.3 KiB |
BIN
images/mid-btn-1.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
images/mid-btn-2.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
images/mid-btn-3.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
images/mid-btn-4.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
images/mp3.png
Before Width: | Height: | Size: 1.2 KiB |
BIN
images/mp4.png
Before Width: | Height: | Size: 1.5 KiB |
BIN
images/txt.png
Before Width: | Height: | Size: 913 B |
@ -28,10 +28,17 @@ Page({
|
||||
token: '',
|
||||
oldToken: '',
|
||||
fromMine: false,
|
||||
imgTempSrc: '',
|
||||
currentIndex: 0,
|
||||
windowWidth: app.globalData.windowWidth,
|
||||
scale: 1
|
||||
list: [{
|
||||
"text": "首页",
|
||||
"iconPath": "/images/ic_card_sel.png",
|
||||
"selectedIconPath": "/images/ic_card_sel.png",
|
||||
},
|
||||
{
|
||||
"text": "我的",
|
||||
"iconPath": "/images/ic_mine_normal.png",
|
||||
"selectedIconPath": "/images/ic_mine_sel.png",
|
||||
}
|
||||
]
|
||||
},
|
||||
tabChange(e) {
|
||||
this.setData({
|
||||
@ -79,6 +86,15 @@ Page({
|
||||
})
|
||||
}
|
||||
})
|
||||
// wx.showToast({
|
||||
// title: '加载中',
|
||||
// icon: 'loading',
|
||||
// success: function () {
|
||||
// self.setData({
|
||||
// isLoading: true
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
var content = {
|
||||
pictureTemplateId: self.data.cardId,
|
||||
cardTemplateUseAreaList: []
|
||||
@ -105,23 +121,18 @@ Page({
|
||||
success: (res) => {
|
||||
self.setData({
|
||||
isLoading: false,
|
||||
})
|
||||
wx.showModal({
|
||||
content: '恭喜您名片创建成功,如需查看请到(我的 → 我的卡包)',
|
||||
cancelText: '继续创建',
|
||||
confirmText: '返回列表',
|
||||
cancelColor: '#333333',
|
||||
confirmColor: '#333333',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
self.backList()
|
||||
} else {
|
||||
self.continueCreate()
|
||||
}
|
||||
}
|
||||
showHide: true
|
||||
})
|
||||
},
|
||||
})
|
||||
// wx.hideToast({
|
||||
// success: (res) => {
|
||||
// self.setData({
|
||||
// isLoading: false,
|
||||
// showHide: true
|
||||
// })
|
||||
// },
|
||||
// })
|
||||
}
|
||||
}).catch(res => {
|
||||
self.setData({
|
||||
@ -130,83 +141,64 @@ 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) {
|
||||
var self = this
|
||||
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({
|
||||
count: 1,
|
||||
sourceType: ['album', 'camera'],
|
||||
success: function (res) {
|
||||
wx.navigateTo({
|
||||
url: '/packagecard/common/corpperimg/cropperimg?imgSrc=' + res.tempFiles[0].path + '&scale=' + scale,
|
||||
wx.showLoading({
|
||||
title: '上传中...',
|
||||
})
|
||||
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);
|
||||
// });
|
||||
}
|
||||
})
|
||||
},
|
||||
doUploadImg(path) {
|
||||
var _self = this
|
||||
wx.showLoading({
|
||||
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
|
||||
})
|
||||
})
|
||||
getPhoneNumber: function (e) {
|
||||
console.log(e.detail.errMsg)
|
||||
console.log(e.detail.iv)
|
||||
console.log(e.detail.encryptedData)
|
||||
},
|
||||
// 获取名片信息
|
||||
getNameCard: function () {
|
||||
@ -223,10 +215,8 @@ Page({
|
||||
},
|
||||
data: {}
|
||||
}).then(res => {
|
||||
console.log(res.data)
|
||||
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++) {
|
||||
if (area[i].templateAreaFontCenter == '1') {
|
||||
area[i].templateAreaFontCenter = 'left'
|
||||
@ -242,13 +232,12 @@ Page({
|
||||
} else {
|
||||
area[i]['templateAreaFontStyle'] = 'italic'
|
||||
}
|
||||
area[i].templateAreaFontSize = area[i].templateAreaFontSize / scale + 'px'
|
||||
area[i].templateAreaHeight = area[i].templateAreaHeight / scale
|
||||
area[i].templateAreaWidth = area[i].templateAreaWidth / scale
|
||||
area[i].templateAreaDown = area[i].templateAreaDown / scale
|
||||
area[i].templateAreaTop = area[i].templateAreaTop / scale
|
||||
area[i].templateAreaRight = area[i].templateAreaRight / scale
|
||||
area[i].templateAreaLeft = area[i].templateAreaLeft / scale
|
||||
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(area[i].templateAreaFontSize * 750 / wx.getSystemInfoSync().windowWidth) + 'rpx'
|
||||
}
|
||||
self.setData({
|
||||
cardInfo: res.data,
|
||||
@ -258,7 +247,36 @@ Page({
|
||||
.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 () {
|
||||
@ -317,6 +335,29 @@ Page({
|
||||
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 () {
|
||||
var self = this
|
||||
@ -333,7 +374,8 @@ Page({
|
||||
// 非文字、图片区域换取fileid
|
||||
getFileId: function (e) {
|
||||
var self = this
|
||||
var cur = e
|
||||
var cur = e.currentTarget.dataset.num
|
||||
|
||||
var content = self.data.areaList[cur].templateAreaFontValue
|
||||
console.log(content)
|
||||
var areaId = self.data.areaList[cur].picturesTemplateAreaId
|
||||
@ -364,7 +406,7 @@ Page({
|
||||
var self = this
|
||||
this.setData({
|
||||
cardId: options.id,
|
||||
token: app.globalData.token,
|
||||
token: app.globalData.token
|
||||
})
|
||||
this.getNameCard()
|
||||
},
|
||||
@ -388,16 +430,25 @@ Page({
|
||||
},
|
||||
openPage() {
|
||||
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
console.log(this.data.imgTempSrc)
|
||||
if (this.data.imgTempSrc != '') {
|
||||
this.doUploadImg(this.data.imgTempSrc)
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
@ -1,94 +1,78 @@
|
||||
<cu-custom isCustom="{{false}}" isBack="{{true}}">
|
||||
<view slot="content">创建名片</view>
|
||||
<view slot="content">名片</view>
|
||||
</cu-custom>
|
||||
<view style="margin:15rpx;">
|
||||
<view class="card"
|
||||
style="padding-bottom:{{(cardInfo.picturesTemplateHeight / cardInfo.picturesTemplateWidth) *100 +'%'}};">
|
||||
<!-- 背景图 -->
|
||||
<image src="{{cardUrl}}{{cardInfo.picturesTemplateBackgroundImage}}" alt="" class="card-bgImg"
|
||||
wx:if="{{cardInfo.picturesTemplateBackgroundImage}}"></image>
|
||||
<!-- 文字 -->
|
||||
<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}}" 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}};line-height:{{item.templateAreaHeight}}px;"
|
||||
wx:if="{{item.templateAreaServerLink == '1' && item.templateAreaType != '1'}}">
|
||||
{{item.templateAreaFontValue}}
|
||||
</view>
|
||||
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" wx:if="{{bindPhone == '0'}}">获取手机号</button>
|
||||
<view class="card"
|
||||
style="padding-bottom:{{(cardInfo.picturesTemplateHeight / cardInfo.picturesTemplateWidth) *100 +'%'}};">
|
||||
<!-- 背景图 -->
|
||||
<image src="{{cardUrl}}{{cardInfo.picturesTemplateBackgroundImage}}" alt="" class="card-bgImg"
|
||||
wx:if="{{cardInfo.picturesTemplateBackgroundImage}}"></image>
|
||||
<!-- 文字 -->
|
||||
<view class="area-box" wx:for="{{areaList}}" data-cur="{{index}}" bindtap="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 / 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}}"
|
||||
wx:if="{{item.templateAreaServerLink == '1'}}">
|
||||
{{item.templateAreaFontValue}}
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 图片 -->
|
||||
<!-- catchtap="choosePhoto" -->
|
||||
<view wx:for="{{areaList}}" data-cur="{{index}}" wx:key="index" data-item="{{item}}"
|
||||
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 == '2'}}">
|
||||
<image src="{{cardUrl}}{{item.templateAreaFile}}" style="width: 100%;height:100%"></image>
|
||||
</view>
|
||||
<!-- 图片 -->
|
||||
<view wx:for="{{areaList}}" data-cur="{{index}}" bindtap="choosePhoto" wx:key="index"
|
||||
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 == '2'}}">
|
||||
<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" 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 + '%'}}"
|
||||
wx:if="{{item.templateAreaType == '1' && item.templateAreaServerLink == '1'}}">
|
||||
<text wx:if="{{!item.templateAreaFile}}">{{item.templateAreaFontValue}}</text>
|
||||
<image src="{{cardUrl}}{{item.templateAreaFile}}" wx:else></image>
|
||||
<!-- <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"
|
||||
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'}}">
|
||||
<text wx:if="{{!item.templateAreaFile}}">{{item.templateAreaFontValue}}</text>
|
||||
<image src="{{cardUrl}}{{item.templateAreaFile}}" wx:else></image>
|
||||
<!-- <image src="{{cardUrl}}{{item.templateAreaFile}}" style="width: 100%;height:100%"></image> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-box">
|
||||
<view class="card-title">适用行业:{{cardInfo.templateIndustryName}}</view>
|
||||
<view class="card-info">
|
||||
<view class="edit-card">
|
||||
<view wx:for="{{areaList}}" wx:key="index"
|
||||
wx:if="{{item.templateAreaServerLink != '2' && item.templateAreaType != '1'}}">
|
||||
<view class="row-ver">
|
||||
<view class="item-title-box">
|
||||
<view class="item-title">{{item.templateAreaName}}</view>
|
||||
<view class="hint-txt" wx:if="{{item.templateAreaFontLength>0}}">最多输入{{item.templateAreaFontLength}}个字符
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-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 class="card-title">{{cardInfo.picturesTemplateTitle}}</view> -->
|
||||
<view class="card-title">适用行业:{{cardInfo.templateIndustryName}}</view>
|
||||
<view class="card-info">
|
||||
<view class="edit-card">
|
||||
<view class="row" wx:for="{{areaList}}" wx:key="index"
|
||||
wx:if="{{item.templateAreaServerLink != '2' && item.templateAreaType != '1'}}">
|
||||
<view class="item-title">{{item.templateAreaName}}:</view>
|
||||
<view class="item-input">
|
||||
<input type="text" placeholder="请输入内容,最多{{item.templateAreaFontLength}}个字" bindinput="editInfo"
|
||||
data-num="{{index}}" bindblur="getFileId" value="{{item.templateAreaFontValue}}" focus="{{item.focus}}"
|
||||
wx:if="{{item.templateAreaServerLink != '1'}}" maxlength="{{item.templateAreaFontLength}}"></input>
|
||||
<input type="text" placeholder="请输入内容,最多{{item.templateAreaFontLength}}个字" bindinput="editInfo"
|
||||
data-num="{{index}}" value="{{item.templateAreaFontValue}}" focus="{{item.focus}}"
|
||||
maxlength="{{item.templateAreaFontLength}}" wx:else></input>
|
||||
</view>
|
||||
|
||||
<view class="row-ver" wx:for="{{areaList}}" wx:key="index"
|
||||
wx:if="{{item.templateAreaServerLink == '2' && item.templateAreaType != '1'}}">
|
||||
<view class="item-title-box">
|
||||
<view class="item-title">{{item.templateAreaName}}</view>
|
||||
<view class="hint-txt" wx:if="{{item.templateAreaFontLength>0}}">最多输入1张图片</view>
|
||||
</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 class="row" wx:for="{{areaList}}" wx:key="index"
|
||||
wx:if="{{item.templateAreaServerLink == '2' && item.templateAreaType != '1'}}">
|
||||
<view class="item-title">{{item.templateAreaName}}:</view>
|
||||
<view bindtap="choosePhoto" data-cur="{{index}}" class="card-img-box">
|
||||
<image src="{{cardUrl}}{{item.templateAreaFile}}" mode="widthFix"></image>
|
||||
<text class="cuIcon-cameraadd"></text>
|
||||
</view>
|
||||
<!-- <view class="row" wx:for="{{areaList}}" wx:key="index" wx:if="{{item.templateAreaType == '9'}}">
|
||||
</view>
|
||||
<!-- <view class="row" wx:for="{{areaList}}" wx:key="index" wx:if="{{item.templateAreaType == '9'}}">
|
||||
<view class="item-title">二维码:</view>
|
||||
<view class="item-input item-code-input" bindtap="choosePhoto" data-cur="{{index}}">
|
||||
<image src="{{cardUrl}}route/file/download/true/{{item.templateAreaTitle}}"></image>
|
||||
点击修改
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="foot bg-white" style="padding: 15rpx;" wx:if="{{!isLoading}}">
|
||||
<view class="padding-xs foot bg-white" wx:if="{{!isLoading}}">
|
||||
<button class="cu-btn bg-blue" style="width:100%" bindtap="createMyCard">生成我的名片</button>
|
||||
</view>
|
||||
<view class="hide-link" wx:if="{{showHide}}">
|
||||
<view class="hide">
|
||||
<view class="hide-title">创建成功</view>
|
||||
<view class="hide-text">恭喜您名片创建成功,如需查看请到(我的 → 我的卡包)</view>
|
||||
<view class="hide-text">名片创建成功,如需查看请到"我的"-"我的卡包"</view>
|
||||
<view class="hide-btn-box">
|
||||
<view class="hide-btn" bindtap="continueCreate">继续创建</view>
|
||||
<view class="hide-btn" bindtap="backList">返回模板</view>
|
||||
<view class="hide-btn" bindtap="backList">返回模板列表</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
@ -1,8 +1,13 @@
|
||||
page {
|
||||
background: #f7f7f7;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: 100%;
|
||||
height: 0;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
background: #fff;
|
||||
z-index: 100;
|
||||
/* text-align: center; */
|
||||
}
|
||||
@ -16,6 +21,7 @@
|
||||
}
|
||||
|
||||
.area-box {
|
||||
white-space: nowrap;
|
||||
background: none !important;
|
||||
z-index: 111;
|
||||
}
|
||||
@ -26,40 +32,23 @@
|
||||
}
|
||||
|
||||
.card-info {
|
||||
padding-bottom: 100rpx;
|
||||
width: 100%;
|
||||
margin-top: 15rpx;
|
||||
padding: 20rpx;
|
||||
background: #fff;
|
||||
margin-bottom: 80rpx;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
font-size: 30rpx;
|
||||
background: #ffffff;
|
||||
width: 100%;
|
||||
padding: 15rpx;
|
||||
font-size: 38rpx;
|
||||
background: #f7f7f7;
|
||||
line-height: 70rpx;
|
||||
padding: 10 20rpx;
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
padding: 15rpx 0;
|
||||
border-bottom: 1px solid #EEE;
|
||||
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;
|
||||
/* margin-bottom: 15rpx; */
|
||||
}
|
||||
|
||||
.item-title {
|
||||
@ -67,14 +56,7 @@
|
||||
font-size: 32rpx;
|
||||
line-height: 50rpx;
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
.item-title-box {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 7.5rpx;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.item-input {
|
||||
@ -82,12 +64,11 @@
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
|
||||
.item-input input {
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
text-align: right;
|
||||
height: 50rpx;
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
@ -103,8 +84,34 @@
|
||||
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 {
|
||||
position: fixed;
|
||||
@ -112,6 +119,7 @@
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 0 15rpx;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
z-index: 1000;
|
||||
}
|
||||
@ -120,55 +128,33 @@
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 60%;
|
||||
width: 90%;
|
||||
transform: translate(-50%, -50%);
|
||||
padding: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.hide-btn {
|
||||
display: flex;
|
||||
width: 50%;
|
||||
width: 49%;
|
||||
height: 60rpx;
|
||||
background: #1d7ff0;
|
||||
background: #1296db;
|
||||
color: #fff;
|
||||
font-size: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
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;
|
||||
font-size: 30rpx;
|
||||
color: #000;
|
||||
padding: 50rpx 30rpx;
|
||||
}
|
||||
|
||||
.hide-title {
|
||||
font-size: 43rpx;
|
||||
color: #ffC107;
|
||||
padding: 10rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.hide-btn-box {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
@ -176,17 +162,8 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.content-box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 15rpx;
|
||||
}
|
||||
|
||||
.cuIcon-cameraadd {
|
||||
font-size: 60rpx;
|
||||
font-size: 100rpx;
|
||||
}
|
||||
|
||||
.card-img-box {
|
||||
@ -194,30 +171,9 @@
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-right: 40rpx;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.card-img-box image {
|
||||
width: 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;
|
||||
}
|
@ -6,182 +6,53 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
imgUrl: app.urls.baseImgUrl,
|
||||
cardList: [],
|
||||
currentIndex: 0,
|
||||
optionsList: [],
|
||||
isNeedPay: false, //是否需要交费
|
||||
needPayPrice: 0, //个人需要交费
|
||||
needPayTeamPrice: 0, //团体需要交费
|
||||
curTypeId: '',
|
||||
isRefreshing: false, //是否在刷新
|
||||
isRefresh: false,
|
||||
isShowCodeInput: false, //测试true
|
||||
code: '', //邀请码
|
||||
conentHeight: 550, //滚动内容的高度
|
||||
cardUrl: app.cardUrl,
|
||||
cardList: []
|
||||
},
|
||||
getList: function () {
|
||||
var self = this
|
||||
wx.showNavigationBarLoading()
|
||||
app.http.get(app.urls.getCardList, {
|
||||
header: {
|
||||
token: app.globalData.token
|
||||
}
|
||||
}).then(res => {
|
||||
self.setData({
|
||||
cardList: res.data
|
||||
})
|
||||
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) {
|
||||
// this.getPayState()
|
||||
//屏幕高度-标题的高度
|
||||
this.setData({
|
||||
conentHeight: app.globalData.windowHeight
|
||||
})
|
||||
},
|
||||
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
|
||||
}
|
||||
})
|
||||
wx.getStorage({
|
||||
key: 'token',
|
||||
success: function (res) {
|
||||
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,
|
||||
token: res.data
|
||||
})
|
||||
app.globalData.token = res.data
|
||||
self.getList()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
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
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
@ -189,35 +60,4 @@ Page({
|
||||
onPullDownRefresh: function () {
|
||||
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',
|
||||
})
|
||||
}
|
||||
})
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"enablePullDownRefresh": true
|
||||
}
|