Commit 20b97ec8 authored by Junling Bu's avatar Junling Bu
Browse files

chore[litemall-wx]: 使用微信开发者工具的格式化代码

parent 822d5075
page{
page {
background: #f4f4f4;
min-height: 100%;
}
.container{
.container {
background: #f4f4f4;
min-height: 100%;
width: 100%;
......@@ -11,20 +11,19 @@ page{
overflow: hidden;
}
.no-collect{
.no-collect {
width: 100%;
height: auto;
margin: 0 auto;
}
.no-collect .c{
.no-collect .c {
width: 100%;
height: auto;
margin-top: 200rpx;
}
.no-collect .c image{
.no-collect .c image {
margin: 0 auto;
display: block;
text-align: center;
......@@ -32,7 +31,7 @@ page{
height: 258rpx;
}
.no-collect .c text{
.no-collect .c text {
margin: 0 auto;
display: block;
width: 258rpx;
......@@ -43,7 +42,7 @@ page{
color: #999;
}
.collect-list{
.collect-list {
width: 100%;
height: auto;
overflow: hidden;
......@@ -52,7 +51,7 @@ page{
border-top: 1px solid #e1e1e1;
}
.item{
.item {
height: 212rpx;
width: 720rpx;
background: #fff;
......@@ -60,17 +59,17 @@ page{
border-bottom: 1px solid #e1e1e1;
}
.item:last-child{
.item:last-child {
border-bottom: 1px solid #fff;
}
.item .img{
.item .img {
float: left;
width: 150rpx;
height: 150rpx;
}
.item .info{
.item .info {
float: right;
width: 540rpx;
height: 150rpx;
......@@ -80,21 +79,20 @@ page{
padding-left: 20rpx;
}
.item .info .name{
.item .info .name {
font-size: 28rpx;
color: #333;
line-height: 40rpx;
}
.item .info .subtitle{
.item .info .subtitle {
margin-top: 8rpx;
font-size: 24rpx;
color: #888;
line-height: 40rpx;
}
.item .info .price{
.item .info .price {
margin-top: 8rpx;
font-size: 28rpx;
color: #333;
......
var util = require('../../../utils/util.js');
var api = require('../../../config/api.js');
var app = getApp();
Page({
data: {
},
onLoad: function (options) {
},
onReady: function () {
onLoad: function(options) {},
onReady: function() {
},
onShow: function () {
onShow: function() {
},
onHide: function () {
onHide: function() {
// 页面隐藏
},
onUnload: function () {
onUnload: function() {
// 页面关闭
}
})
\ No newline at end of file
page{
page {
background: #f4f4f4;
min-height: 100%;
}
.container{
.container {
background: #f4f4f4;
min-height: 100%;
padding-top: 30rpx;
}
.coupon-form{
.coupon-form {
height: 110rpx;
width: 100%;
background: #fff;
......@@ -19,7 +19,7 @@ page{
display: flex;
}
.input-box{
.input-box {
flex: 1;
height: 70rpx;
color: #333;
......@@ -31,7 +31,7 @@ page{
margin-right: 30rpx;
}
.input-box .coupon-sn{
.input-box .coupon-sn {
position: absolute;
top: 10rpx;
left: 30rpx;
......@@ -42,7 +42,7 @@ page{
font-size: 24rpx;
}
.clear-icon{
.clear-icon {
position: absolute;
top: 21rpx;
right: 30rpx;
......@@ -50,9 +50,9 @@ page{
height: 28rpx;
}
.add-btn{
.add-btn {
height: 70rpx;
border:none;
border: none;
width: 168rpx;
background: #b4282d;
border-radius: 0;
......@@ -61,11 +61,11 @@ page{
font-size: 28rpx;
}
.add-btn.disabled{
.add-btn.disabled {
background: #ccc;
}
.help{
.help {
height: 72rpx;
line-height: 72rpx;
text-align: right;
......@@ -76,7 +76,7 @@ page{
font-size: 24rpx;
}
.coupon-list{
.coupon-list {
width: 100%;
height: auto;
overflow: hidden;
......@@ -84,18 +84,18 @@ page{
padding-right: 30rpx;
}
.item{
.item {
position: relative;
height: 290rpx;
width: 100%;
background: linear-gradient(to right,#cfa568,#e3bf79);
background: linear-gradient(to right, #cfa568, #e3bf79);
margin-bottom: 30rpx;
padding-top: 52rpx;
}
.tag{
.tag {
height: 32rpx;
background: #A48143;
background: #a48143;
padding-left: 16rpx;
padding-right: 16rpx;
position: absolute;
......@@ -107,8 +107,7 @@ page{
line-height: 32rpx;
}
.content{
.content {
margin-top: 24rpx;
margin-left: 40rpx;
display: flex;
......@@ -117,50 +116,50 @@ page{
align-items: center;
}
.content .left{
.content .left {
flex: 1;
}
.name{
.name {
font-size: 44rpx;
color: #fff;
margin-bottom: 14rpx;
}
.time{
.time {
font-size: 24rpx;
color: rgba(255,255,255, 0.8);
color: rgba(255, 255, 255, 0.8);
line-height: 30rpx;
}
.content .right{
.content .right {
width: 162rpx;
}
.go{
.go {
height: 48rpx;
border:none;
border: none;
width: 162rpx;
background: rgba(255,255,255, 0.8);
background: rgba(255, 255, 255, 0.8);
border-radius: 4rpx;
line-height: 48rpx;
color: #b69150;
font-size: 24rpx;
}
.condition{
.condition {
position: absolute;
width: 100%;
bottom: 0;
left:0;
left: 0;
height: 78rpx;
background: rgba(0,0,0,.08);
background: rgba(0, 0, 0, 0.08);
padding: 24rpx 40rpx;
display: flex;
flex-direction: row;
}
.condition .txt{
.condition .txt {
display: block;
height: 30rpx;
flex: 1;
......@@ -170,8 +169,7 @@ page{
color: #fff;
}
.condition .icon{
.condition .icon {
margin-left: 30rpx;
width: 24rpx;
height: 24rpx;
......
......@@ -15,7 +15,7 @@ Page({
picUrls: [],
files: []
},
chooseImage: function (e) {
chooseImage: function(e) {
if (this.data.files.length >= 5) {
util.showErrorToast('只能上传五张图片')
return false;
......@@ -26,7 +26,7 @@ Page({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: function (res) {
success: function(res) {
that.setData({
files: that.data.files.concat(res.tempFilePaths)
});
......@@ -34,13 +34,13 @@ Page({
}
})
},
upload: function (res) {
upload: function(res) {
var that = this;
const uploadTask = wx.uploadFile({
url: api.StorageUpload,
filePath: res.tempFilePaths[0],
name: 'file',
success: function (res) {
success: function(res) {
var _res = JSON.parse(res.data);
if (_res.errno === 0) {
var url = _res.data.url
......@@ -51,7 +51,7 @@ Page({
})
}
},
fail: function (e) {
fail: function(e) {
wx.showModal({
title: '错误',
content: '上传失败',
......@@ -67,7 +67,7 @@ Page({
})
},
previewImage: function (e) {
previewImage: function(e) {
wx.previewImage({
current: e.currentTarget.id, // 当前显示图片的http链接
urls: this.data.files // 需要预览的图片http链接列表
......
page{
page {
background: #f4f4f4;
min-height: 100%;
}
.container{
.container {
background: #f4f4f4;
min-height: 100%;
padding-top: 30rpx;
}
.fb-type{
.fb-type {
height: 104rpx;
width: 100%;
background: #fff;
......@@ -21,26 +21,26 @@
padding-right: 30rpx;
}
.fb-type .type-label{
.fb-type .type-label {
height: 36rpx;
flex: 1;
color: #333;
font-size: 28rpx;
}
.fb-type .type-icon{
.fb-type .type-icon {
height: 36rpx;
width: 36rpx;
}
.fb-body{
.fb-body {
width: 100%;
background: #fff;
height: 600rpx;
padding: 18rpx 30rpx 64rpx 30rpx;
}
.fb-body .content{
.fb-body .content {
width: 100%;
height: 400rpx;
color: #333;
......@@ -48,7 +48,7 @@
font-size: 28rpx;
}
.weui-uploader__files{
.weui-uploader__files {
width: 100%;
}
......@@ -112,19 +112,19 @@
opacity: 0;
}
.fb-body .text-count{
.fb-body .text-count {
line-height: 30rpx;
float: right;
color: #666;
font-size: 24rpx;
}
.fb-mobile{
.fb-mobile {
height: 162rpx;
width: 100%;
}
.fb-mobile .label{
.fb-mobile .label {
height: 58rpx;
width: 100%;
padding-top: 14rpx;
......@@ -136,7 +136,7 @@
line-height: 33rpx;
}
.fb-mobile .mobile-box{
.fb-mobile .mobile-box {
height: 104rpx;
width: 100%;
color: #333;
......@@ -147,7 +147,7 @@
position: relative;
}
.fb-mobile .mobile{
.fb-mobile .mobile {
position: absolute;
top: 27rpx;
left: 30rpx;
......@@ -158,7 +158,7 @@
font-size: 24rpx;
}
.fb-mobile .clear-icon{
.fb-mobile .clear-icon {
position: absolute;
top: 27rpx;
right: 30rpx;
......@@ -167,7 +167,7 @@
z-index: 2;
}
.fb-btn{
.fb-btn {
right: 0;
display: flex;
justify-content: center;
......
......@@ -15,7 +15,10 @@ Page({
title: '加载中...',
});
let that = this;
util.request(api.FootprintList, { page: that.data.page, size: that.data.size }).then(function (res) {
util.request(api.FootprintList, {
page: that.data.page,
size: that.data.size
}).then(function(res) {
if (res.errno === 0) {
let f1 = that.data.footprintList;
let f2 = res.data.footprintList;
......@@ -23,8 +26,7 @@ Page({
let last = f1.length - 1;
if (last >= 0 && f1[last][0].addTime === f2[i].addTime) {
f1[last].push(f2[i]);
}
else{
} else {
let tmp = [];
tmp.push(f2[i])
f1.push(tmp);
......@@ -39,7 +41,7 @@ Page({
wx.hideLoading();
});
},
deleteItem (event){
deleteItem(event) {
let that = this;
let index = event.currentTarget.dataset.index;
let iindex = event.currentTarget.dataset.iindex;
......@@ -52,9 +54,11 @@ Page({
wx.showModal({
title: '',
content: '要删除所选足迹?',
success: function (res) {
success: function(res) {
if (res.confirm) {
util.request(api.FootprintDelete, { footprintId: footprintId }, 'POST').then(function (res) {
util.request(api.FootprintDelete, {
footprintId: footprintId
}, 'POST').then(function(res) {
if (res.errno === 0) {
wx.showToast({
title: '删除成功',
......@@ -62,7 +66,7 @@ Page({
duration: 2000
});
that.data.footprintList[index].splice(iindex, 1)
if (that.data.footprintList[index].length == 0){
if (that.data.footprintList[index].length == 0) {
that.data.footprintList.splice(index, 1)
}
that.setData({
......@@ -80,7 +84,7 @@ Page({
}
},
onLoad: function (options) {
onLoad: function(options) {
this.getFootprintList();
},
onReachBottom() {
......@@ -98,21 +102,21 @@ Page({
return false;
}
},
onReady: function () {
onReady: function() {
},
onShow: function () {
onShow: function() {
},
onHide: function () {
onHide: function() {
// 页面隐藏
},
onUnload: function () {
onUnload: function() {
// 页面关闭
},
//按下事件开始
touchStart: function (e) {
touchStart: function(e) {
let that = this;
that.setData({
touchStart: e.timeStamp
......@@ -120,7 +124,7 @@ Page({
console.log(e.timeStamp + '- touchStart')
},
//按下事件结束
touchEnd: function (e) {
touchEnd: function(e) {
let that = this;
that.setData({
touchEnd: e.timeStamp
......
......@@ -17,7 +17,7 @@
<view class='user_column_item' bindtap='goOrderIndex' data-index='1' data-route='/pages/ucenter/order/order'>
<text class="user_column_item_badge" wx:if="{{order.unpaid != 0}}">{{order.unpaid}}</text>
<image class='user_column_item_image' src='/static/images/pendpay.png'>
</image>
</image>
<view class='user_column_item_text'>待付款</view>
</view>
<view class='user_column_item' bindtap='goOrderIndex' data-index='2' data-route='/pages/ucenter/order/order'>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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