Commit 286c0ae7 authored by Junling Bu's avatar Junling Bu
Browse files

chore[renard-wx]: 基于微信开发者工具的格式化代码

parent 20b97ec8
page{ page {
height: 100%; height: 100%;
background: #f4f4f4; background: #f4f4f4;
} }
.address-box{ .address-box {
width: 100%; width: 100%;
height: 166.55rpx; height: 166.55rpx;
background: url('http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/address-bg-bd30f2bfeb.png') 0 0 repeat-x; background: url('http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/address-bg-bd30f2bfeb.png') 0 0 repeat-x;
...@@ -12,24 +12,24 @@ page{ ...@@ -12,24 +12,24 @@ page{
padding-top: 10.5rpx; padding-top: 10.5rpx;
} }
.address-item{ .address-item {
display: flex; display: flex;
height: 155.55rpx; height: 155.55rpx;
background: #fff; background: #fff;
padding: 41.6rpx 0 41.6rpx 31.25rpx; padding: 41.6rpx 0 41.6rpx 31.25rpx;
} }
.address-item.address-empty{ .address-item.address-empty {
line-height: 75rpx; line-height: 75rpx;
text-align: center; text-align: center;
} }
.address-box .l{ .address-box .l {
width: 125rpx; width: 125rpx;
height: 100%; height: 100%;
} }
.address-box .l .name{ .address-box .l .name {
margin-left: 6.25rpx; margin-left: 6.25rpx;
margin-top: -7.25rpx; margin-top: -7.25rpx;
display: block; display: block;
...@@ -39,10 +39,9 @@ page{ ...@@ -39,10 +39,9 @@ page{
font-size: 30rpx; font-size: 30rpx;
color: #333; color: #333;
margin-bottom: 5rpx; margin-bottom: 5rpx;
} }
.address-box .l .default{ .address-box .l .default {
margin-left: 6.25rpx; margin-left: 6.25rpx;
display: block; display: block;
width: 62rpx; width: 62rpx;
...@@ -55,30 +54,30 @@ page{ ...@@ -55,30 +54,30 @@ page{
color: #b4282d; color: #b4282d;
} }
.address-box .m{ .address-box .m {
flex: 1; flex: 1;
height: 72.25rpx; height: 72.25rpx;
color: #999; color: #999;
} }
.address-box .mobile{ .address-box .mobile {
display: block; display: block;
height: 29rpx; height: 29rpx;
line-height: 29rpx; line-height: 29rpx;
margin-bottom: 6.25rpx; margin-bottom: 6.25rpx;
font-size: 30rpx; font-size: 30rpx;
color:#333; color: #333;
} }
.address-box .address{ .address-box .address {
display: block; display: block;
height: 37.5rpx; height: 37.5rpx;
line-height: 37.5rpx; line-height: 37.5rpx;
font-size: 25rpx; font-size: 25rpx;
color:#666; color: #666;
} }
.address-box .r{ .address-box .r {
width: 77rpx; width: 77rpx;
height: 77rpx; height: 77rpx;
display: flex; display: flex;
...@@ -86,19 +85,19 @@ page{ ...@@ -86,19 +85,19 @@ page{
align-items: center; align-items: center;
} }
.address-box .r image{ .address-box .r image {
width: 52.078rpx; width: 52.078rpx;
height: 52.078rpx; height: 52.078rpx;
} }
.coupon-box{ .coupon-box {
width: 100%; width: 100%;
height: auto; height: auto;
overflow: hidden; overflow: hidden;
background: #fff; background: #fff;
} }
.coupon-box .coupon-item{ .coupon-box .coupon-item {
width: 100%; width: 100%;
height: 108.3rpx; height: 108.3rpx;
overflow: hidden; overflow: hidden;
...@@ -107,26 +106,26 @@ page{ ...@@ -107,26 +106,26 @@ page{
padding-left: 31.25rpx; padding-left: 31.25rpx;
} }
.coupon-box .l{ .coupon-box .l {
flex: 1; flex: 1;
height: 43rpx; height: 43rpx;
line-height: 43rpx; line-height: 43rpx;
padding-top: 35rpx; padding-top: 35rpx;
} }
.coupon-box .l .name{ .coupon-box .l .name {
float: left; float: left;
font-size: 30rpx; font-size: 30rpx;
color: #666; color: #666;
} }
.coupon-box .l .txt{ .coupon-box .l .txt {
float: right; float: right;
font-size: 30rpx; font-size: 30rpx;
color: #666; color: #666;
} }
.coupon-box .r{ .coupon-box .r {
margin-top: 15.5rpx; margin-top: 15.5rpx;
width: 77rpx; width: 77rpx;
height: 77rpx; height: 77rpx;
...@@ -135,12 +134,12 @@ page{ ...@@ -135,12 +134,12 @@ page{
align-items: center; align-items: center;
} }
.coupon-box .r image{ .coupon-box .r image {
width: 52.078rpx; width: 52.078rpx;
height: 52.078rpx; height: 52.078rpx;
} }
.order-box{ .order-box {
margin-top: 20rpx; margin-top: 20rpx;
width: 100%; width: 100%;
height: auto; height: auto;
...@@ -148,7 +147,7 @@ page{ ...@@ -148,7 +147,7 @@ page{
background: #fff; background: #fff;
} }
.order-box .order-item{ .order-box .order-item {
height: 104.3rpx; height: 104.3rpx;
overflow: hidden; overflow: hidden;
background: #fff; background: #fff;
...@@ -159,7 +158,7 @@ page{ ...@@ -159,7 +158,7 @@ page{
border-bottom: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9;
} }
.order-box .order-item .l{ .order-box .order-item .l {
float: left; float: left;
height: 52rpx; height: 52rpx;
width: 50%; width: 50%;
...@@ -167,7 +166,7 @@ page{ ...@@ -167,7 +166,7 @@ page{
overflow: hidden; overflow: hidden;
} }
.order-box .order-item .r{ .order-box .order-item .r {
float: right; float: right;
text-align: right; text-align: right;
width: 50%; width: 50%;
...@@ -176,11 +175,11 @@ page{ ...@@ -176,11 +175,11 @@ page{
overflow: hidden; overflow: hidden;
} }
.order-box .order-item.no-border{ .order-box .order-item.no-border {
border-bottom: none; border-bottom: none;
} }
.goods-items{ .goods-items {
margin-top: 20rpx; margin-top: 20rpx;
width: 100%; width: 100%;
height: auto; height: auto;
...@@ -190,42 +189,41 @@ page{ ...@@ -190,42 +189,41 @@ page{
margin-bottom: 120rpx; margin-bottom: 120rpx;
} }
.goods-items .item{ .goods-items .item {
height: 192rpx; height: 192rpx;
padding-right: 31.25rpx; padding-right: 31.25rpx;
display: flex; display: flex;
align-items: center; align-items: center;
border-bottom: 1px solid rgba(0,0,0,0.15); border-bottom: 1px solid rgba(0, 0, 0, 0.15);
} }
.goods-items .item.no-border{ .goods-items .item.no-border {
border-bottom: none; border-bottom: none;
} }
.goods-items .item:last-child {
.goods-items .item:last-child{
border-bottom: none; border-bottom: none;
} }
.goods-items .img{ .goods-items .img {
height: 145.83rpx; height: 145.83rpx;
width: 145.83rpx; width: 145.83rpx;
background-color: #f4f4f4; background-color: #f4f4f4;
margin-right: 20rpx; margin-right: 20rpx;
} }
.goods-items .img image{ .goods-items .img image {
height: 145.83rpx; height: 145.83rpx;
width: 145.83rpx; width: 145.83rpx;
} }
.goods-items .info{ .goods-items .info {
flex: 1; flex: 1;
height: 145.83rpx; height: 145.83rpx;
padding-top: 5rpx; padding-top: 5rpx;
} }
.goods-items .t{ .goods-items .t {
height: 33rpx; height: 33rpx;
line-height: 33rpx; line-height: 33rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
...@@ -234,12 +232,12 @@ page{ ...@@ -234,12 +232,12 @@ page{
color: #333; color: #333;
} }
.goods-items .t .name{ .goods-items .t .name {
display: block; display: block;
float: left; float: left;
} }
.goods-items .t .number{ .goods-items .t .number {
display: block; display: block;
float: right; float: right;
text-align: right; text-align: right;
...@@ -262,16 +260,16 @@ page{ ...@@ -262,16 +260,16 @@ page{
color: #333; color: #333;
} }
.order-total{ .order-total {
position: fixed; position: fixed;
left:0; left: 0;
bottom: 0; bottom: 0;
height: 100rpx; height: 100rpx;
width: 100%; width: 100%;
display: flex; display: flex;
} }
.order-total .l{ .order-total .l {
flex: 1; flex: 1;
height: 100rpx; height: 100rpx;
line-height: 100rpx; line-height: 100rpx;
...@@ -279,11 +277,11 @@ page{ ...@@ -279,11 +277,11 @@ page{
background: #fff; background: #fff;
font-size: 33rpx; font-size: 33rpx;
padding-left: 31.25rpx; padding-left: 31.25rpx;
border-top: 1rpx solid rgba(0,0,0,0.2); border-top: 1rpx solid rgba(0, 0, 0, 0.2);
border-bottom: 1rpx solid rgba(0,0,0,0.2); border-bottom: 1rpx solid rgba(0, 0, 0, 0.2);
} }
.order-total .r{ .order-total .r {
width: 233rpx; width: 233rpx;
height: 100rpx; height: 100rpx;
background: #a78845; background: #a78845;
......
page ,.container{ page, .container {
width: 750rpx; width: 750rpx;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
background: #f4f4f4; background: #f4f4f4;
} }
.topic-list{
.topic-list {
width: 750rpx; width: 750rpx;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
background: #f4f4f4; background: #f4f4f4;
} }
.topic-list .item{ .topic-list .item {
width: 100%; width: 100%;
height: 625rpx; height: 625rpx;
overflow: hidden; overflow: hidden;
...@@ -19,18 +20,18 @@ page ,.container{ ...@@ -19,18 +20,18 @@ page ,.container{
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.topic-list .img{ .topic-list .img {
width: 100%; width: 100%;
height: 415rpx; height: 415rpx;
} }
.topic-list .info{ .topic-list .info {
width: 100%; width: 100%;
height: 210rpx; height: 210rpx;
overflow: hidden; overflow: hidden;
} }
.topic-list .title{ .topic-list .title {
display: block; display: block;
text-align: center; text-align: center;
width: 100%; width: 100%;
...@@ -42,7 +43,7 @@ page ,.container{ ...@@ -42,7 +43,7 @@ page ,.container{
margin-top: 30rpx; margin-top: 30rpx;
} }
.topic-list .desc{ .topic-list .desc {
display: block; display: block;
text-align: center; text-align: center;
position: relative; position: relative;
...@@ -56,7 +57,7 @@ page ,.container{ ...@@ -56,7 +57,7 @@ page ,.container{
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.topic-list .price{ .topic-list .price {
display: block; display: block;
text-align: center; text-align: center;
width: 100%; width: 100%;
...@@ -67,15 +68,14 @@ page ,.container{ ...@@ -67,15 +68,14 @@ page ,.container{
font-size: 27rpx; font-size: 27rpx;
} }
.page {
.page{
width: 750rpx; width: 750rpx;
height: 108rpx; height: 108rpx;
background: #fff; background: #fff;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.page view{ .page view {
height: 108rpx; height: 108rpx;
width: 50%; width: 50%;
float: left; float: left;
...@@ -85,10 +85,10 @@ page ,.container{ ...@@ -85,10 +85,10 @@ page ,.container{
line-height: 108rpx; line-height: 108rpx;
} }
.page .prev{ .page .prev {
border-right: 1px solid #D9D9D9; border-right: 1px solid #d9d9d9;
} }
.page .disabled{ .page .disabled {
color: #ccc; color: #ccc;
} }
<scroll-view class="container"> <scroll-view class="container">
<scroll-view class="content"> <scroll-view class="content">
<import src="../../lib/wxParse/wxParse.wxml"/> <import src="../../lib/wxParse/wxParse.wxml" />
<template is="wxParse" data="{{wxParseData:topicDetail.nodes}}"/> <template is="wxParse" data="{{wxParseData:topicDetail.nodes}}" />
</scroll-view> </scroll-view>
<view class="topic-goods"> <view class="topic-goods">
</view> </view>
......
.content {
.content{
width: 100%; width: 100%;
height: auto; height: auto;
font-size: 0; font-size: 0;
} }
.content image{ .content image {
display: inline-block; display: inline-block;
width: 100%; width: 100%;
} }
.comments{ .comments {
width: 100%; width: 100%;
height: auto; height: auto;
padding-left:30rpx; padding-left: 30rpx;
background: #fff; background: #fff;
margin-top: 20rpx; margin-top: 20rpx;
} }
.comments .h{ .comments .h {
height: 93rpx; height: 93rpx;
line-height: 93rpx; line-height: 93rpx;
width: 720rpx; width: 720rpx;
...@@ -28,7 +25,7 @@ ...@@ -28,7 +25,7 @@
border-bottom: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9;
} }
.comments .h .t{ .comments .h .t {
display: block; display: block;
float: left; float: left;
width: 50%; width: 50%;
...@@ -36,7 +33,7 @@ ...@@ -36,7 +33,7 @@
color: #333; color: #333;
} }
.comments .h .i{ .comments .h .i {
display: block; display: block;
float: right; float: right;
margin-top: 30rpx; margin-top: 30rpx;
...@@ -44,25 +41,25 @@ ...@@ -44,25 +41,25 @@
height: 33rpx; height: 33rpx;
} }
.comments .b{ .comments .b {
height: auto; height: auto;
width: 720rpx; width: 720rpx;
} }
.comments .item{ .comments .item {
height: auto; height: auto;
width: 720rpx; width: 720rpx;
overflow: hidden; overflow: hidden;
border-bottom: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9;
} }
.comments .info{ .comments .info {
height: 127rpx; height: 127rpx;
width: 100%; width: 100%;
padding: 33rpx 0 27rpx 0; padding: 33rpx 0 27rpx 0;
} }
.comments .user{ .comments .user {
float: left; float: left;
width: auto; width: auto;
height: 67rpx; height: 67rpx;
...@@ -70,7 +67,7 @@ ...@@ -70,7 +67,7 @@
font-size: 0; font-size: 0;
} }
.comments .user .avatar{ .comments .user .avatar {
display: block; display: block;
float: left; float: left;
width: 67rpx; width: 67rpx;
...@@ -79,7 +76,7 @@ ...@@ -79,7 +76,7 @@
border-radius: 50%; border-radius: 50%;
} }
.comments .user .nickname{ .comments .user .nickname {
display: block; display: block;
width: auto; width: auto;
float: left; float: left;
...@@ -89,7 +86,7 @@ ...@@ -89,7 +86,7 @@
line-height: 66rpx; line-height: 66rpx;
} }
.comments .time{ .comments .time {
display: block; display: block;
float: right; float: right;
width: auto; width: auto;
...@@ -100,7 +97,7 @@ ...@@ -100,7 +97,7 @@
margin-right: 30rpx; margin-right: 30rpx;
} }
.comments .comment{ .comments .comment {
width: 720rpx; width: 720rpx;
padding-right: 30rpx; padding-right: 30rpx;
line-height: 45.8rpx; line-height: 45.8rpx;
...@@ -109,7 +106,7 @@ ...@@ -109,7 +106,7 @@
color: #333; color: #333;
} }
.comments .load{ .comments .load {
width: 720rpx; width: 720rpx;
height: 108rpx; height: 108rpx;
line-height: 108rpx; line-height: 108rpx;
...@@ -117,11 +114,11 @@ ...@@ -117,11 +114,11 @@
font-size: 38.5rpx; font-size: 38.5rpx;
} }
.no-comments{ .no-comments {
height: 297rpx; height: 297rpx;
} }
.no-comments .txt{ .no-comments .txt {
height: 43rpx; height: 43rpx;
line-height: 43rpx; line-height: 43rpx;
display: block; display: block;
...@@ -131,21 +128,20 @@ ...@@ -131,21 +128,20 @@
color: #7f7f7f; color: #7f7f7f;
} }
.no-comments .icon{ .no-comments .icon {
margin: 48rpx auto 18rpx auto; margin: 48rpx auto 18rpx auto;
height: 130rpx; height: 130rpx;
display: block; display: block;
width: 115rpx; width: 115rpx;
} }
.rec-box {
.rec-box{
width: 690rpx; width: 690rpx;
height: auto; height: auto;
margin: 0 30rpx; margin: 0 30rpx;
} }
.rec-box .h{ .rec-box .h {
position: relative; position: relative;
width: 690rpx; width: 690rpx;
height: 110rpx; height: 110rpx;
...@@ -153,7 +149,7 @@ ...@@ -153,7 +149,7 @@
margin-bottom: 32rpx; margin-bottom: 32rpx;
} }
.rec-box .h .txt{ .rec-box .h .txt {
display: inline-block; display: inline-block;
position: absolute; position: absolute;
background: #f4f4f4; background: #f4f4f4;
...@@ -167,7 +163,7 @@ ...@@ -167,7 +163,7 @@
text-align: center; text-align: center;
} }
.rec-box .b .item{ .rec-box .b .item {
width: 690rpx; width: 690rpx;
height: auto; height: auto;
padding: 24rpx 24rpx 30rpx 24rpx; padding: 24rpx 24rpx 30rpx 24rpx;
...@@ -175,12 +171,12 @@ ...@@ -175,12 +171,12 @@
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.rec-box .b .item .img{ .rec-box .b .item .img {
height: 355rpx; height: 355rpx;
width: 642rpx; width: 642rpx;
} }
.rec-box .b .item .title{ .rec-box .b .item .title {
display: block; display: block;
margin-top: 30rpx; margin-top: 30rpx;
height: 30rpx; height: 30rpx;
......
page{ page {
height: 100%; height: 100%;
width: 100%; width: 100%;
background: #f4f4f4; background: #f4f4f4;
} }
.container{ .container {
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
.address-list{ .address-list {
padding-left: 31.25rpx; padding-left: 31.25rpx;
background: #fff url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/address-bg-bd30f2bfeb.png) 0 0 repeat-x; background: #fff url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/address-bg-bd30f2bfeb.png) 0 0 repeat-x;
background-size: auto 10.5rpx; background-size: auto 10.5rpx;
margin-bottom: 90rpx; margin-bottom: 90rpx;
} }
.address-list .item{ .address-list .item {
height: 156.55rpx; height: 156.55rpx;
align-items: center; align-items: center;
display: flex; display: flex;
border-bottom: 1rpx solid #DCD9D9; border-bottom: 1rpx solid #dcd9d9;
} }
.address-list .l{ .address-list .l {
width: 125rpx; width: 125rpx;
height: 80rpx; height: 80rpx;
overflow: hidden; overflow: hidden;
} }
.address-list .name{ .address-list .name {
width: 125rpx; width: 125rpx;
height: 43rpx; height: 43rpx;
font-size: 29rpx; font-size: 29rpx;
...@@ -39,7 +39,7 @@ page{ ...@@ -39,7 +39,7 @@ page{
overflow: hidden; overflow: hidden;
} }
.address-list .default{ .address-list .default {
width: 62.5rpx; width: 62.5rpx;
height: 33rpx; height: 33rpx;
line-height: 28rpx; line-height: 28rpx;
...@@ -50,45 +50,41 @@ page{ ...@@ -50,45 +50,41 @@ page{
visibility: visible; visibility: visible;
} }
.address-list .c {
.address-list .c{
flex: 1; flex: 1;
height: auto; height: auto;
overflow: hidden; overflow: hidden;
} }
.address-list .mobile{ .address-list .mobile {
height: 29rpx; height: 29rpx;
font-size: 29rpx; font-size: 29rpx;
line-height: 29rpx; line-height: 29rpx;
overflow: hidden; overflow: hidden;
margin-bottom: 6.25rpx; margin-bottom: 6.25rpx;
} }
.address-list .address{ .address-list .address {
height: 37rpx; height: 37rpx;
font-size: 25rpx; font-size: 25rpx;
line-height: 37rpx; line-height: 37rpx;
overflow: hidden; overflow: hidden;
} }
.address-list .r{ .address-list .r {
width: 52rpx; width: 52rpx;
height: auto; height: auto;
overflow: hidden; overflow: hidden;
margin-right: 16.5rpx; margin-right: 16.5rpx;
} }
.address-list .del{ .address-list .del {
display: block; display: block;
width: 52rpx; width: 52rpx;
height: 52rpx; height: 52rpx;
} }
.add-address{ .add-address {
background: #a78845; background: #a78845;
text-align: center; text-align: center;
width: 100%; width: 100%;
...@@ -100,10 +96,10 @@ page{ ...@@ -100,10 +96,10 @@ page{
color: #fff; color: #fff;
font-size: 29rpx; font-size: 29rpx;
bottom: 0; bottom: 0;
left:0; left: 0;
} }
.empty-view{ .empty-view {
height: 100%; height: 100%;
width: 100%; width: 100%;
display: flex; display: flex;
...@@ -112,13 +108,13 @@ page{ ...@@ -112,13 +108,13 @@ page{
justify-content: center; justify-content: center;
} }
.empty-view .icon{ .empty-view .icon {
height: 248rpx; height: 248rpx;
width: 258rpx; width: 258rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.empty-view .text{ .empty-view .text {
width: auto; width: auto;
font-size: 28rpx; font-size: 28rpx;
line-height: 35rpx; line-height: 35rpx;
......
...@@ -20,10 +20,24 @@ Page({ ...@@ -20,10 +20,24 @@ Page({
}, },
addressId: 0, addressId: 0,
openSelectRegion: false, openSelectRegion: false,
selectRegionList: [ selectRegionList: [{
{ id: 0, name: '省份', pid: 1, type: 1 }, id: 0,
{ id: 0, name: '城市', pid: 1, type: 2 }, name: '省份',
{ id: 0, name: '区县', pid: 1, type: 3 } pid: 1,
type: 1
},
{
id: 0,
name: '城市',
pid: 1,
type: 2
},
{
id: 0,
name: '区县',
pid: 1,
type: 3
}
], ],
regionType: 1, regionType: 1,
regionList: [], regionList: [],
...@@ -59,7 +73,9 @@ Page({ ...@@ -59,7 +73,9 @@ Page({
}, },
getAddressDetail() { getAddressDetail() {
let that = this; let that = this;
util.request(api.AddressDetail, { id: that.data.addressId }).then(function (res) { util.request(api.AddressDetail, {
id: that.data.addressId
}).then(function(res) {
if (res.errno === 0) { if (res.errno === 0) {
if (res.data) { if (res.data) {
that.setData({ that.setData({
...@@ -110,10 +126,24 @@ Page({ ...@@ -110,10 +126,24 @@ Page({
this.getRegionList(address.cityId); this.getRegionList(address.cityId);
} else { } else {
this.setData({ this.setData({
selectRegionList: [ selectRegionList: [{
{ id: 0, name: '省份', pid: 0, type: 1 }, id: 0,
{ id: 0, name: '城市', pid: 0, type: 2 }, name: '省份',
{ id: 0, name: '区县', pid: 0, type: 3 } pid: 0,
type: 1
},
{
id: 0,
name: '城市',
pid: 0,
type: 2
},
{
id: 0,
name: '区县',
pid: 0,
type: 3
}
], ],
regionType: 1 regionType: 1
}) })
...@@ -123,7 +153,7 @@ Page({ ...@@ -123,7 +153,7 @@ Page({
this.setRegionDoneStatus(); this.setRegionDoneStatus();
}, },
onLoad: function (options) { onLoad: function(options) {
// 页面初始化 options为页面跳转所带来的参数 // 页面初始化 options为页面跳转所带来的参数
console.log(options) console.log(options)
if (options.id && options.id != 0) { if (options.id && options.id != 0) {
...@@ -133,7 +163,7 @@ Page({ ...@@ -133,7 +163,7 @@ Page({
this.getAddressDetail(); this.getAddressDetail();
} }
}, },
onReady: function () { onReady: function() {
}, },
selectRegionType(event) { selectRegionType(event) {
...@@ -240,7 +270,9 @@ Page({ ...@@ -240,7 +270,9 @@ Page({
getRegionList(regionId) { getRegionList(regionId) {
let that = this; let that = this;
let regionType = that.data.regionType; let regionType = that.data.regionType;
util.request(api.RegionList, { pid: regionId }).then(function (res) { util.request(api.RegionList, {
pid: regionId
}).then(function(res) {
if (res.errno === 0) { if (res.errno === 0) {
that.setData({ that.setData({
regionList: res.data.map(item => { regionList: res.data.map(item => {
...@@ -302,7 +334,7 @@ Page({ ...@@ -302,7 +334,7 @@ Page({
areaId: address.areaId, areaId: address.areaId,
address: address.address, address: address.address,
isDefault: address.isDefault isDefault: address.isDefault
}, 'POST').then(function (res) { }, 'POST').then(function(res) {
if (res.errno === 0) { if (res.errno === 0) {
//返回之前,先取出上一页对象,并设置addressId //返回之前,先取出上一页对象,并设置addressId
var pages = getCurrentPages(); var pages = getCurrentPages();
...@@ -325,15 +357,15 @@ Page({ ...@@ -325,15 +357,15 @@ Page({
}); });
}, },
onShow: function () { onShow: function() {
// 页面显示 // 页面显示
}, },
onHide: function () { onHide: function() {
// 页面隐藏 // 页面隐藏
}, },
onUnload: function () { onUnload: function() {
// 页面关闭 // 页面关闭
} }
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
<input class="input" bindinput="bindinputName" placeholder="姓名" value="{{address.name}}" auto-focus/> <input class="input" bindinput="bindinputName" placeholder="姓名" value="{{address.name}}" auto-focus/>
</view> </view>
<view class="form-item"> <view class="form-item">
<input class="input" bindinput="bindinputMobile" value="{{address.mobile}}" placeholder="手机号码"/> <input class="input" bindinput="bindinputMobile" value="{{address.mobile}}" placeholder="手机号码" />
</view> </view>
<view class="form-item"> <view class="form-item">
<input class="input" value="{{address.provinceName + address.cityName + address.areaName}}" disabled="true" bindtap="chooseRegion" placeholder="省份、城市、区县"/> <input class="input" value="{{address.provinceName + address.cityName + address.areaName}}" disabled="true" bindtap="chooseRegion" placeholder="省份、城市、区县" />
</view> </view>
<view class="form-item"> <view class="form-item">
<input class="input" bindinput="bindinputAddress" value="{{address.address}}" placeholder="详细地址, 如街道、楼盘号等"/> <input class="input" bindinput="bindinputAddress" value="{{address.address}}" placeholder="详细地址, 如街道、楼盘号等" />
</view> </view>
<view class="form-default"> <view class="form-default">
<text bindtap="bindIsDefault" class="default-input {{address.isDefault == 1 ? 'selected' : ''}}">设为默认地址</text> <text bindtap="bindIsDefault" class="default-input {{address.isDefault == 1 ? 'selected' : ''}}">设为默认地址</text>
......
page{ page {
height: 100%; height: 100%;
background: #f4f4f4; background: #f4f4f4;
} }
.add-address .add-form{
.add-address .add-form {
background: #fff; background: #fff;
width: 100%; width: 100%;
height: auto; height: auto;
overflow: hidden; overflow: hidden;
} }
.add-address .form-item{ .add-address .form-item {
height: 116rpx; height: 116rpx;
padding-left: 31.25rpx; padding-left: 31.25rpx;
border-bottom: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9;
...@@ -18,14 +19,14 @@ page{ ...@@ -18,14 +19,14 @@ page{
padding-right: 31.25rpx; padding-right: 31.25rpx;
} }
.add-address .input{ .add-address .input {
flex: 1; flex: 1;
height: 44rpx; height: 44rpx;
line-height: 44rpx; line-height: 44rpx;
overflow: hidden; overflow: hidden;
} }
.add-address .form-default{ .add-address .form-default {
border-bottom: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9;
height: 96rpx; height: 96rpx;
background: #fafafa; background: #fafafa;
...@@ -33,7 +34,7 @@ page{ ...@@ -33,7 +34,7 @@ page{
font-size: 28rpx; font-size: 28rpx;
} }
.default-input{ .default-input {
margin: 0 auto; margin: 0 auto;
display: block; display: block;
width: 240rpx; width: 240rpx;
...@@ -45,12 +46,12 @@ page{ ...@@ -45,12 +46,12 @@ page{
font-size: 28rpx; font-size: 28rpx;
} }
.default-input.selected{ .default-input.selected {
background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/sprites/checkbox-sed825af9d3-a6b8540d42.png) 0 -192rpx no-repeat; background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/sprites/checkbox-sed825af9d3-a6b8540d42.png) 0 -192rpx no-repeat;
background-size: 38rpx 486rpx; background-size: 38rpx 486rpx;
} }
.add-address .btns{ .add-address .btns {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
...@@ -60,50 +61,49 @@ page{ ...@@ -60,50 +61,49 @@ page{
width: 100%; width: 100%;
} }
.add-address .cannel,.add-address .save{ .add-address .cannel, .add-address .save {
flex: 1; flex: 1;
height: 100rpx; height: 100rpx;
text-align: center; text-align: center;
line-height: 100rpx; line-height: 100rpx;
font-size: 28rpx; font-size: 28rpx;
color: #fff; color: #fff;
border:none; border: none;
border-radius: 0; border-radius: 0;
} }
.add-address .cannel{ .add-address .cannel {
background: #3F3F3F; background: #3f3f3f;
} }
.add-address .save{ .add-address .save {
background: #a78845; background: #a78845;
} }
.region-select {
.region-select{
width: 100%; width: 100%;
height: 600rpx; height: 600rpx;
background: #fff; background: #fff;
position: fixed; position: fixed;
z-index: 10; z-index: 10;
left:0; left: 0;
bottom: 0; bottom: 0;
} }
.region-select .hd{ .region-select .hd {
height: 108rpx; height: 108rpx;
width: 100%; width: 100%;
border-bottom: 1px solid #f4f4f4; border-bottom: 1px solid #f4f4f4;
padding: 46rpx 30rpx 0 30rpx; padding: 46rpx 30rpx 0 30rpx;
} }
.region-select .region-selected{ .region-select .region-selected {
float: left; float: left;
height: 60rpx; height: 60rpx;
display: flex; display: flex;
} }
.region-select .region-selected .item{ .region-select .region-selected .item {
max-width: 140rpx; max-width: 140rpx;
margin-right: 30rpx; margin-right: 30rpx;
text-align: left; text-align: left;
...@@ -116,15 +116,15 @@ page{ ...@@ -116,15 +116,15 @@ page{
white-space: nowrap; white-space: nowrap;
} }
.region-select .region-selected .item.disabled{ .region-select .region-selected .item.disabled {
color: #999; color: #999;
} }
.region-select .region-selected .item.selected{ .region-select .region-selected .item.selected {
color: #a78845; color: #a78845;
} }
.region-select .done{ .region-select .done {
float: right; float: right;
height: 60rpx; height: 60rpx;
width: 60rpx; width: 60rpx;
...@@ -136,21 +136,21 @@ page{ ...@@ -136,21 +136,21 @@ page{
font-size: 28rpx; font-size: 28rpx;
} }
.region-select .done.disabled{ .region-select .done.disabled {
color: #999; color: #999;
} }
.region-select .bd{ .region-select .bd {
height: 492rpx; height: 492rpx;
width: 100%; width: 100%;
padding: 0 30rpx; padding: 0 30rpx;
} }
.region-select .region-list{ .region-select .region-list {
height: 492rpx; height: 492rpx;
} }
.region-select .region-list .item{ .region-select .region-list .item {
width: 100%; width: 100%;
height: 104rpx; height: 104rpx;
line-height: 104rpx; line-height: 104rpx;
...@@ -159,17 +159,16 @@ page{ ...@@ -159,17 +159,16 @@ page{
font-size: 28rpx; font-size: 28rpx;
} }
.region-select .region-list .item.selected{ .region-select .region-list .item.selected {
color: #b4282d; color: #b4282d;
} }
.bg-mask {
.bg-mask{
height: 100%; height: 100%;
width: 100%; width: 100%;
background: rgba(0, 0, 0, 0.4); background: rgba(0, 0, 0, 0.4);
position: fixed; position: fixed;
top:0; top: 0;
left:0; left: 0;
z-index: 8; z-index: 8;
} }
page{ page {
background: #f4f4f4; background: #f4f4f4;
min-height: 100%; min-height: 100%;
} }
.container{ .container {
background: #f4f4f4; background: #f4f4f4;
min-height: 100%; min-height: 100%;
width: 100%; width: 100%;
...@@ -11,20 +11,19 @@ page{ ...@@ -11,20 +11,19 @@ page{
overflow: hidden; overflow: hidden;
} }
.no-collect {
.no-collect{
width: 100%; width: 100%;
height: auto; height: auto;
margin: 0 auto; margin: 0 auto;
} }
.no-collect .c{ .no-collect .c {
width: 100%; width: 100%;
height: auto; height: auto;
margin-top: 200rpx; margin-top: 200rpx;
} }
.no-collect .c image{ .no-collect .c image {
margin: 0 auto; margin: 0 auto;
display: block; display: block;
text-align: center; text-align: center;
...@@ -32,7 +31,7 @@ page{ ...@@ -32,7 +31,7 @@ page{
height: 258rpx; height: 258rpx;
} }
.no-collect .c text{ .no-collect .c text {
margin: 0 auto; margin: 0 auto;
display: block; display: block;
width: 258rpx; width: 258rpx;
...@@ -43,7 +42,7 @@ page{ ...@@ -43,7 +42,7 @@ page{
color: #999; color: #999;
} }
.collect-list{ .collect-list {
width: 100%; width: 100%;
height: auto; height: auto;
overflow: hidden; overflow: hidden;
...@@ -52,7 +51,7 @@ page{ ...@@ -52,7 +51,7 @@ page{
border-top: 1px solid #e1e1e1; border-top: 1px solid #e1e1e1;
} }
.item{ .item {
height: 212rpx; height: 212rpx;
width: 720rpx; width: 720rpx;
background: #fff; background: #fff;
...@@ -60,17 +59,17 @@ page{ ...@@ -60,17 +59,17 @@ page{
border-bottom: 1px solid #e1e1e1; border-bottom: 1px solid #e1e1e1;
} }
.item:last-child{ .item:last-child {
border-bottom: 1px solid #fff; border-bottom: 1px solid #fff;
} }
.item .img{ .item .img {
float: left; float: left;
width: 150rpx; width: 150rpx;
height: 150rpx; height: 150rpx;
} }
.item .info{ .item .info {
float: right; float: right;
width: 540rpx; width: 540rpx;
height: 150rpx; height: 150rpx;
...@@ -80,21 +79,20 @@ page{ ...@@ -80,21 +79,20 @@ page{
padding-left: 20rpx; padding-left: 20rpx;
} }
.item .info .name{ .item .info .name {
font-size: 28rpx; font-size: 28rpx;
color: #333; color: #333;
line-height: 40rpx; line-height: 40rpx;
} }
.item .info .subtitle {
.item .info .subtitle{
margin-top: 8rpx; margin-top: 8rpx;
font-size: 24rpx; font-size: 24rpx;
color: #888; color: #888;
line-height: 40rpx; line-height: 40rpx;
} }
.item .info .price{ .item .info .price {
margin-top: 8rpx; margin-top: 8rpx;
font-size: 28rpx; font-size: 28rpx;
color: #333; color: #333;
......
var util = require('../../../utils/util.js'); var util = require('../../../utils/util.js');
var api = require('../../../config/api.js'); var api = require('../../../config/api.js');
var app = getApp(); var app = getApp();
Page({ Page({
data: { data: {
}, },
onLoad: function (options) { onLoad: function(options) {},
}, onReady: function() {
onReady: function () {
}, },
onShow: function () { onShow: function() {
}, },
onHide: function () { onHide: function() {
// 页面隐藏 // 页面隐藏
}, },
onUnload: function () { onUnload: function() {
// 页面关闭 // 页面关闭
} }
}) })
\ No newline at end of file
page{ page {
background: #f4f4f4; background: #f4f4f4;
min-height: 100%; min-height: 100%;
} }
.container{ .container {
background: #f4f4f4; background: #f4f4f4;
min-height: 100%; min-height: 100%;
padding-top: 30rpx; padding-top: 30rpx;
} }
.coupon-form{ .coupon-form {
height: 110rpx; height: 110rpx;
width: 100%; width: 100%;
background: #fff; background: #fff;
...@@ -19,7 +19,7 @@ page{ ...@@ -19,7 +19,7 @@ page{
display: flex; display: flex;
} }
.input-box{ .input-box {
flex: 1; flex: 1;
height: 70rpx; height: 70rpx;
color: #333; color: #333;
...@@ -31,7 +31,7 @@ page{ ...@@ -31,7 +31,7 @@ page{
margin-right: 30rpx; margin-right: 30rpx;
} }
.input-box .coupon-sn{ .input-box .coupon-sn {
position: absolute; position: absolute;
top: 10rpx; top: 10rpx;
left: 30rpx; left: 30rpx;
...@@ -42,7 +42,7 @@ page{ ...@@ -42,7 +42,7 @@ page{
font-size: 24rpx; font-size: 24rpx;
} }
.clear-icon{ .clear-icon {
position: absolute; position: absolute;
top: 21rpx; top: 21rpx;
right: 30rpx; right: 30rpx;
...@@ -50,9 +50,9 @@ page{ ...@@ -50,9 +50,9 @@ page{
height: 28rpx; height: 28rpx;
} }
.add-btn{ .add-btn {
height: 70rpx; height: 70rpx;
border:none; border: none;
width: 168rpx; width: 168rpx;
background: #b4282d; background: #b4282d;
border-radius: 0; border-radius: 0;
...@@ -61,11 +61,11 @@ page{ ...@@ -61,11 +61,11 @@ page{
font-size: 28rpx; font-size: 28rpx;
} }
.add-btn.disabled{ .add-btn.disabled {
background: #ccc; background: #ccc;
} }
.help{ .help {
height: 72rpx; height: 72rpx;
line-height: 72rpx; line-height: 72rpx;
text-align: right; text-align: right;
...@@ -76,7 +76,7 @@ page{ ...@@ -76,7 +76,7 @@ page{
font-size: 24rpx; font-size: 24rpx;
} }
.coupon-list{ .coupon-list {
width: 100%; width: 100%;
height: auto; height: auto;
overflow: hidden; overflow: hidden;
...@@ -84,18 +84,18 @@ page{ ...@@ -84,18 +84,18 @@ page{
padding-right: 30rpx; padding-right: 30rpx;
} }
.item{ .item {
position: relative; position: relative;
height: 290rpx; height: 290rpx;
width: 100%; width: 100%;
background: linear-gradient(to right,#cfa568,#e3bf79); background: linear-gradient(to right, #cfa568, #e3bf79);
margin-bottom: 30rpx; margin-bottom: 30rpx;
padding-top: 52rpx; padding-top: 52rpx;
} }
.tag{ .tag {
height: 32rpx; height: 32rpx;
background: #A48143; background: #a48143;
padding-left: 16rpx; padding-left: 16rpx;
padding-right: 16rpx; padding-right: 16rpx;
position: absolute; position: absolute;
...@@ -107,8 +107,7 @@ page{ ...@@ -107,8 +107,7 @@ page{
line-height: 32rpx; line-height: 32rpx;
} }
.content {
.content{
margin-top: 24rpx; margin-top: 24rpx;
margin-left: 40rpx; margin-left: 40rpx;
display: flex; display: flex;
...@@ -117,50 +116,50 @@ page{ ...@@ -117,50 +116,50 @@ page{
align-items: center; align-items: center;
} }
.content .left{ .content .left {
flex: 1; flex: 1;
} }
.name{ .name {
font-size: 44rpx; font-size: 44rpx;
color: #fff; color: #fff;
margin-bottom: 14rpx; margin-bottom: 14rpx;
} }
.time{ .time {
font-size: 24rpx; font-size: 24rpx;
color: rgba(255,255,255, 0.8); color: rgba(255, 255, 255, 0.8);
line-height: 30rpx; line-height: 30rpx;
} }
.content .right{ .content .right {
width: 162rpx; width: 162rpx;
} }
.go{ .go {
height: 48rpx; height: 48rpx;
border:none; border: none;
width: 162rpx; width: 162rpx;
background: rgba(255,255,255, 0.8); background: rgba(255, 255, 255, 0.8);
border-radius: 4rpx; border-radius: 4rpx;
line-height: 48rpx; line-height: 48rpx;
color: #b69150; color: #b69150;
font-size: 24rpx; font-size: 24rpx;
} }
.condition{ .condition {
position: absolute; position: absolute;
width: 100%; width: 100%;
bottom: 0; bottom: 0;
left:0; left: 0;
height: 78rpx; height: 78rpx;
background: rgba(0,0,0,.08); background: rgba(0, 0, 0, 0.08);
padding: 24rpx 40rpx; padding: 24rpx 40rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
.condition .txt{ .condition .txt {
display: block; display: block;
height: 30rpx; height: 30rpx;
flex: 1; flex: 1;
...@@ -170,8 +169,7 @@ page{ ...@@ -170,8 +169,7 @@ page{
color: #fff; color: #fff;
} }
.condition .icon {
.condition .icon{
margin-left: 30rpx; margin-left: 30rpx;
width: 24rpx; width: 24rpx;
height: 24rpx; height: 24rpx;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment