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

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

parent 822d5075
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;
......
...@@ -15,7 +15,7 @@ Page({ ...@@ -15,7 +15,7 @@ Page({
picUrls: [], picUrls: [],
files: [] files: []
}, },
chooseImage: function (e) { chooseImage: function(e) {
if (this.data.files.length >= 5) { if (this.data.files.length >= 5) {
util.showErrorToast('只能上传五张图片') util.showErrorToast('只能上传五张图片')
return false; return false;
...@@ -26,7 +26,7 @@ Page({ ...@@ -26,7 +26,7 @@ Page({
count: 1, count: 1,
sizeType: ['original', 'compressed'], sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'], sourceType: ['album', 'camera'],
success: function (res) { success: function(res) {
that.setData({ that.setData({
files: that.data.files.concat(res.tempFilePaths) files: that.data.files.concat(res.tempFilePaths)
}); });
...@@ -34,13 +34,13 @@ Page({ ...@@ -34,13 +34,13 @@ Page({
} }
}) })
}, },
upload: function (res) { upload: function(res) {
var that = this; var that = this;
const uploadTask = wx.uploadFile({ const uploadTask = wx.uploadFile({
url: api.StorageUpload, url: api.StorageUpload,
filePath: res.tempFilePaths[0], filePath: res.tempFilePaths[0],
name: 'file', name: 'file',
success: function (res) { success: function(res) {
var _res = JSON.parse(res.data); var _res = JSON.parse(res.data);
if (_res.errno === 0) { if (_res.errno === 0) {
var url = _res.data.url var url = _res.data.url
...@@ -51,7 +51,7 @@ Page({ ...@@ -51,7 +51,7 @@ Page({
}) })
} }
}, },
fail: function (e) { fail: function(e) {
wx.showModal({ wx.showModal({
title: '错误', title: '错误',
content: '上传失败', content: '上传失败',
...@@ -67,7 +67,7 @@ Page({ ...@@ -67,7 +67,7 @@ Page({
}) })
}, },
previewImage: function (e) { previewImage: function(e) {
wx.previewImage({ wx.previewImage({
current: e.currentTarget.id, // 当前显示图片的http链接 current: e.currentTarget.id, // 当前显示图片的http链接
urls: this.data.files // 需要预览的图片http链接列表 urls: this.data.files // 需要预览的图片http链接列表
......
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;
} }
.fb-type{ .fb-type {
height: 104rpx; height: 104rpx;
width: 100%; width: 100%;
background: #fff; background: #fff;
...@@ -21,26 +21,26 @@ ...@@ -21,26 +21,26 @@
padding-right: 30rpx; padding-right: 30rpx;
} }
.fb-type .type-label{ .fb-type .type-label {
height: 36rpx; height: 36rpx;
flex: 1; flex: 1;
color: #333; color: #333;
font-size: 28rpx; font-size: 28rpx;
} }
.fb-type .type-icon{ .fb-type .type-icon {
height: 36rpx; height: 36rpx;
width: 36rpx; width: 36rpx;
} }
.fb-body{ .fb-body {
width: 100%; width: 100%;
background: #fff; background: #fff;
height: 600rpx; height: 600rpx;
padding: 18rpx 30rpx 64rpx 30rpx; padding: 18rpx 30rpx 64rpx 30rpx;
} }
.fb-body .content{ .fb-body .content {
width: 100%; width: 100%;
height: 400rpx; height: 400rpx;
color: #333; color: #333;
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
font-size: 28rpx; font-size: 28rpx;
} }
.weui-uploader__files{ .weui-uploader__files {
width: 100%; width: 100%;
} }
...@@ -112,19 +112,19 @@ ...@@ -112,19 +112,19 @@
opacity: 0; opacity: 0;
} }
.fb-body .text-count{ .fb-body .text-count {
line-height: 30rpx; line-height: 30rpx;
float: right; float: right;
color: #666; color: #666;
font-size: 24rpx; font-size: 24rpx;
} }
.fb-mobile{ .fb-mobile {
height: 162rpx; height: 162rpx;
width: 100%; width: 100%;
} }
.fb-mobile .label{ .fb-mobile .label {
height: 58rpx; height: 58rpx;
width: 100%; width: 100%;
padding-top: 14rpx; padding-top: 14rpx;
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
line-height: 33rpx; line-height: 33rpx;
} }
.fb-mobile .mobile-box{ .fb-mobile .mobile-box {
height: 104rpx; height: 104rpx;
width: 100%; width: 100%;
color: #333; color: #333;
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
position: relative; position: relative;
} }
.fb-mobile .mobile{ .fb-mobile .mobile {
position: absolute; position: absolute;
top: 27rpx; top: 27rpx;
left: 30rpx; left: 30rpx;
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
font-size: 24rpx; font-size: 24rpx;
} }
.fb-mobile .clear-icon{ .fb-mobile .clear-icon {
position: absolute; position: absolute;
top: 27rpx; top: 27rpx;
right: 30rpx; right: 30rpx;
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
z-index: 2; z-index: 2;
} }
.fb-btn{ .fb-btn {
right: 0; right: 0;
display: flex; display: flex;
justify-content: center; justify-content: center;
......
...@@ -15,7 +15,10 @@ Page({ ...@@ -15,7 +15,10 @@ Page({
title: '加载中...', title: '加载中...',
}); });
let that = this; 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) { if (res.errno === 0) {
let f1 = that.data.footprintList; let f1 = that.data.footprintList;
let f2 = res.data.footprintList; let f2 = res.data.footprintList;
...@@ -23,8 +26,7 @@ Page({ ...@@ -23,8 +26,7 @@ Page({
let last = f1.length - 1; let last = f1.length - 1;
if (last >= 0 && f1[last][0].addTime === f2[i].addTime) { if (last >= 0 && f1[last][0].addTime === f2[i].addTime) {
f1[last].push(f2[i]); f1[last].push(f2[i]);
} } else {
else{
let tmp = []; let tmp = [];
tmp.push(f2[i]) tmp.push(f2[i])
f1.push(tmp); f1.push(tmp);
...@@ -39,7 +41,7 @@ Page({ ...@@ -39,7 +41,7 @@ Page({
wx.hideLoading(); wx.hideLoading();
}); });
}, },
deleteItem (event){ deleteItem(event) {
let that = this; let that = this;
let index = event.currentTarget.dataset.index; let index = event.currentTarget.dataset.index;
let iindex = event.currentTarget.dataset.iindex; let iindex = event.currentTarget.dataset.iindex;
...@@ -52,9 +54,11 @@ Page({ ...@@ -52,9 +54,11 @@ Page({
wx.showModal({ wx.showModal({
title: '', title: '',
content: '要删除所选足迹?', content: '要删除所选足迹?',
success: function (res) { success: function(res) {
if (res.confirm) { 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) { if (res.errno === 0) {
wx.showToast({ wx.showToast({
title: '删除成功', title: '删除成功',
...@@ -62,7 +66,7 @@ Page({ ...@@ -62,7 +66,7 @@ Page({
duration: 2000 duration: 2000
}); });
that.data.footprintList[index].splice(iindex, 1) 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.data.footprintList.splice(index, 1)
} }
that.setData({ that.setData({
...@@ -80,7 +84,7 @@ Page({ ...@@ -80,7 +84,7 @@ Page({
} }
}, },
onLoad: function (options) { onLoad: function(options) {
this.getFootprintList(); this.getFootprintList();
}, },
onReachBottom() { onReachBottom() {
...@@ -98,21 +102,21 @@ Page({ ...@@ -98,21 +102,21 @@ Page({
return false; 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; let that = this;
that.setData({ that.setData({
touchStart: e.timeStamp touchStart: e.timeStamp
...@@ -120,7 +124,7 @@ Page({ ...@@ -120,7 +124,7 @@ Page({
console.log(e.timeStamp + '- touchStart') console.log(e.timeStamp + '- touchStart')
}, },
//按下事件结束 //按下事件结束
touchEnd: function (e) { touchEnd: function(e) {
let that = this; let that = this;
that.setData({ that.setData({
touchEnd: e.timeStamp touchEnd: e.timeStamp
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<view class='user_column_item' bindtap='goOrderIndex' data-index='1' data-route='/pages/ucenter/order/order'> <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> <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 class='user_column_item_image' src='/static/images/pendpay.png'>
</image> </image>
<view class='user_column_item_text'>待付款</view> <view class='user_column_item_text'>待付款</view>
</view> </view>
<view class='user_column_item' bindtap='goOrderIndex' data-index='2' data-route='/pages/ucenter/order/order'> <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