d1f8bfaf by simon

版本提交

1 parent 806d3c4a
Showing 35 changed files with 187 additions and 41 deletions
......@@ -8,13 +8,6 @@
*
*/
// 居中按钮样式
@mixin btn-center($width, $height) {
width: $width;
height: $height;
line-height: $height;
text-align: center;
}
// 超过多少行自动省略 默认一行
@mixin ellipsis($line:1) {
......@@ -100,3 +93,25 @@
background-color: transparent;
border: 0;
}
// 居中按钮样式
@mixin btn-center($width, $height) {
width: $width;
height: $height;
line-height: $height;
text-align: center;
}
// 通用按钮
@mixin cb($width:320px, $height:80px, $fontSize:32px) {
position: relative;
width: $width;
height: $height;
line-height: $height;
text-align: center;
color: #ffffff;
font-size: $fontSize;
border-radius: $height / 2;
background-image: linear-gradient(to right, #b83138, #f2234a 51%, #b83138);
}
......
......@@ -202,3 +202,4 @@
}
}
......
Component({
properties: {
// 这里定义了innerText属性,属性值可以在组件使用时指定
innerText: {
type: String,
value: 'default value',
}
},
data: {
// 这里是一些组件内部数据
someData: {}
},
methods: {
// 这里是一个自定义方法
customMethod() {
this.triggerEvent('evtcomp', {
name: "_evt_custom"
})
},
// 隐藏蒙层
hideMask() {
this.triggerEvent('evtcomp', {
name: "_evt_hide_rule_tips"
});
}
}
})
@import '../../assets/scss/mixins';
@import '../../assets/scss/utils';
.comp-item {
position: relative;
width: 654px;
height: 911px;
// background-color: wheat;
.bg {
position: absolute;
width: 654px;
height: 911px;
}
.space1 {
height: 730px;
}
.btn {
position: relative;
margin: 0 auto;
@include cb(300px, 80px);
}
}
......
<view class="comp-item">
<image class="bg" src="../../image/rule/rule_c1.png" mode="widthFix" />
<image class="bg" src="../../image/oss/rule/rule-c1.png" mode="widthFix" />
<view class="space1"></view>
<view bindtap="hideMask" class="btn">我知道了</view>
</view>
......
<view class="comp-item">comp-item</view>
module.exports = {
login: '/warubiEyeCreamApi/app/login', // 通过wxcode换取sessionId
index: '/warubiEyeCreamApi/app/index', // Index 接口
register: '/warubiEyeCreamApi/app/register', // 注册(用户授权)
login: '/warubiEyeCreamApi/app/login', // post 通过wxcode换取sessionId
register: '/warubiEyeCreamApi/app/register', // post 注册(用户授权)
index: '/warubiEyeCreamApi/app/index', // post Index 接口
picVerifyCode: '/warubiEyeCreamApi/app/crm/pic/verifyCode', // get Crm获取图形验证码
mobileVerifyCode: '/warubiEyeCreamApi/app/crm/mobile/verifyCode', // post Crm获取短信验证码
crmLogin: '/warubiEyeCreamApi/app/crm/login', // post Crm账户登录
crmRegister: '/warubiEyeCreamApi/app/crm/register', // post Crm账户登录
questionList: '/warubiEyeCreamApi/app/question/list', // post 新用户题目候选列表
answerSubmit: '/warubiEyeCreamApi/app/answer/submit', // post 新用户提交候选题目
wishbillPrizeCandidate: '/warubiEyeCreamApi/app/wishbill/prize/candidate', // post 心愿单产品候选列表
wishbillCreate: '/warubiEyeCreamApi/app/wishbill/create', // post 创建心愿单
selfAssist: '/warubiEyeCreamApi/app/wishbill/selfAssist', // post 自我助力
wishbillDetail: '/warubiEyeCreamApi/app/wishbill/detail', // post 读取心愿单信息
wishbillHelpers: '/warubiEyeCreamApi/app/wishbill/helpers', // post 读取心愿单助力列表
wishbillAssist: '/warubiEyeCreamApi/app/wishbill/assist', // post 分享-心愿单摇一摇助力
fishPrize: '/warubiEyeCreamApi/app/fish/prize', // post 查看新人福利
rank: '/warubiEyeCreamApi/app/rank', // post 查看弹力排行
wishbillGiftQuery: '/warubiEyeCreamApi/app/wishbill/gift/query', // post 读取心愿单礼品信息
storeQuery: '/warubiEyeCreamApi/app/store/query', // post 查询附近门店
wishbillGiftAccept: '/warubiEyeCreamApi/app/wishbill/gift/accept', // post 领取心愿礼品
wishbillAcceptTypeSubmit: '/warubiEyeCreamApi/app/wishbill/accept/type/submit', // post 提交礼品领取方式
wishbillAddressSubmit: '/warubiEyeCreamApi/app/wishbill/address/submit', // post 提交邮寄地址
wishbillStoreAppoint: '/warubiEyeCreamApi/app/wishbill/store/appoint', // post 预约自提门店
}
......
let app = getApp();
Page({
data: {
ruleVisible: true,
// ruleTipsVisible: true,
},
onShareAppMessage() {},
onLoad(options) {}
onLoad(options) {},
// 子组件事件
evtcomp(evt) {
let {
name,
data
} = evt.detail;
switch (name) {
case "_evt_hide_rule_tips":
this.setData({
ruleTipsVisible: false
})
break;
default:
break;
}
},
// 提交心愿单
onWishHandler() {
}
})
......
{
"navigationBarTitleText": "丸美心愿单",
"usingComponents": {
"rule-comp": "../../component/rule-comp/rule-comp",
"rule-tips-comp": "../../component/rule-tips-comp/rule-tips-comp",
"van-popup": "../../ui/vant-weapp/popup/index"
}
}
......
......@@ -2,17 +2,23 @@
@import '../../assets/scss/utils';
.page {
.bgc {}
.bgc {
background-color: wheat;
}
.bg {}
.bg {}
.main {
.top-space {
height: 0px;
}
.main {
.top-space {
height: 0px;
}
.content {
position: relative;
.content {
position: relative;
}
.btn {
@include cb;
}
}
}
}
......
......@@ -3,9 +3,11 @@
<view class="app__bg bg"></view>
<view class="app__content main">
<view class="top-space"></view>
<view class="content">create-wish</view>
<view class="content">
<view class="btn" bindtap="onWishHandler" >提交心愿单</view>
</view>
</view>
</view>
<van-popup show="{{ ruleVisible }}">
<rule-comp bind:evtcomp="evtcomp"></rule-comp>
<van-popup show="{{ ruleTipsVisible }}">
<rule-tips-comp bind:evtcomp="evtcomp"></rule-tips-comp>
</van-popup>
......
......@@ -2,7 +2,8 @@ let app = getApp();
Page({
data: {
authorized: true,
canIUse: wx.canIUse('button.open-type.getUserInfo')
canIUse: wx.canIUse('button.open-type.getUserInfo'),
ruleTipsVisible: false,
},
onShareAppMessage() {},
onLoad(options) {},
......@@ -14,7 +15,10 @@ Page({
} = evt.detail;
switch (name) {
case "_evt_hide":
case "_evt_hide_rule_tips":
this.setData({
ruleTipsVisible: false
})
break;
default:
......@@ -27,5 +31,11 @@ Page({
app.router.push({
path: "createWish"
})
},
// 显示规则页面
onShowRuleHandler() {
this.setData({
ruleTipsVisible: true
})
}
})
......
......@@ -2,6 +2,7 @@
"navigationBarTitleText": "我的心愿单",
"usingComponents": {
"authorize-comp": "../../component/authorize-comp/authorize-comp",
"rule-tips-comp": "../../component/rule-tips-comp/rule-tips-comp",
"van-popup": "../../ui/vant-weapp/popup/index"
}
}
......
......@@ -45,14 +45,27 @@
.content {
.btn {
@include cb(336px, 88px);
position: relative;
margin: 0 auto;
@include btn-center(336px, 88px);
border-radius: 44px;
background-image: linear-gradient(to right, #b83138, #f2234a 51%, #b83138);
font-weight: 300;
font-size: 32px;
color: #fff;
}
}
.rule-btn {
position: absolute;
top: 24px;
right: 0;
@include border-left-radius(30px);
@include btn-center(162px, 60px);
font-size: 30px;
color: #bf0221;
// border-radius: 30px;
box-shadow: 7.4px 8.2px 27px 0 rgba(228, 78, 96, 0.86);
background-image: linear-gradient(to right, #fbddd5, #f9efed 51%, #ffded9 99%), linear-gradient(to bottom, #000000, #000000);
.c1{
padding-left: 12px;
// @extend .bb;
}
}
}
......
<view class="page">
<view class="app__bgc bgc">
<image src="../../image/index/index_c1.png" mode="scaleToFill" />
<image src="../../image/oss/index/index-c1.png" mode="scaleToFill" />
</view>
<view class="app__bg bg">
<image src="../../image/index/index_c2.png" mode="scaleToFill" />
<image src="../../image/oss/index/index-c2.png" mode="scaleToFill" />
</view>
<view class="decoration">
<image class="d1" src="../../image/index/index_c4.png" mode="widthFix" />
<image class="d2" src="../../image/index/index_c3.png" mode="widthFix" />
<image class="d1" src="../../image/oss/index/index-c4.png" mode="widthFix" />
<image class="d2" src="../../image/oss/index/index-c3.png" mode="widthFix" />
</view>
<view class="app__content main">
<view class="top-space"></view>
......@@ -17,9 +17,14 @@
<!-- 未授权 拉起授权弹窗 -->
<!-- <button class="btn" wx:else open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">马上测弹力值2</button> -->
</view>
<view class="rule-btn" bindtap="onShowRuleHandler">
<span class="c1">活动详情</span>
</view>
</view>
</view>
<!-- <van-popup show="{{ authorizeVisible }}" >
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup> -->
<van-popup show="{{ ruleTipsVisible }}">
<rule-tips-comp bind:evtcomp="evtcomp"></rule-tips-comp>
</van-popup>
......
<view class="page">
<view class="app__bgc bgc"></view>
<view class="app__bg bg"></view>
<!-- <view class="app__top-shadow"></view> -->
<view class="app__content main">
<view class="top-space"></view>
<view class="content"></view>
......
const routerPath = {
index: '/pages/index/index', // 首页
wish: '/pages/wish/wish', // 心愿单
wish: '/pages/wish/wish', // 我的心愿单
createWish: '/pages/create-wish/create-wish', // 创建心愿单
newWelfare: '/pages/new-welfare/new-welfare', // 新人福利
userTable: '/pages/user-table/user-table', // 用户表单
......