Browse Source

1.1.8

master
xpz2018 6 years ago
parent
commit
552abd895c
7 changed files with 27 additions and 14 deletions
  1. 16
      pages/mall/index.wxs
  2. 2
      pages/mall/order-info/index.wxml
  3. 4
      pages/mall/order-offer/index.wxml
  4. 7
      pages/mall/page-list/index.wxml
  5. 9
      pages/mall/page-list/index.wxss
  6. 1
      pages/mall/shops/index.wxml
  7. 2
      utils/request.js

16
pages/mall/index.wxs

@ -1,4 +1,3 @@
function formatePrice(price) {
return Number(parseFloat(price) / 100).toFixed(2)
}
@ -6,7 +5,7 @@ function formatePrice(price) {
function formateWeight(weight) {
return Number(parseFloat(weight) / 1000).toFixed(3)
}
function isEmpty(val) {
return typeof val === 'undefined' || val === '' || val === null
}
@ -37,8 +36,19 @@ function formateDate(datetime) {
return datetime + week
}
function formateText(text, length) {
if (!text) {
return ''
}
if (text.length <= length) {
return text
}
return text.substring(0, length) + '...'
}
module.exports = {
formatePrice: formatePrice,
formateWeight: formateWeight,
formateDate: formateDate
formateDate: formateDate,
formateText: formateText
}

2
pages/mall/order-info/index.wxml

@ -19,7 +19,7 @@
</view>
<view class="bg-white text-name" style="padding:0rpx 32rpx">{{orderInfo.name}}</view>
<view class="bg-white text-black" style="font-size:24rpx;padding:24rpx 32rpx">{{orderInfo.outline}}</view>
<view class="bg-white text-black" style="font-size:28rpx;padding:24rpx 32rpx">{{orderInfo.outline}}</view>
<view class="bg-white" style="padding:0rpx 32rpx 32rpx 32rpx">
<view wx:for-item="sukItem" wx:for="{{orderInfo.attributeList}}" wx:key="sukIndex" style="padding-top:12rpx">

4
pages/mall/order-offer/index.wxml

@ -78,8 +78,8 @@
</view>
<view class="flex flex-justify" style="height:80rpx" data-index="1" bindtap="checkMode" wx:if="{{form.sellMode == 1}}">
<view class="flex align-end">
<text style="font-size:28rpx">预付定金</text>
<text class="offer-hint" style="margin-left:10rpx">预付款10%,余款货到付款</text>
<text style="font-size:28rpx;line-height: 30rpx">预付定金</text>
<text class="offer-hint" style="margin-left:10rpx;line-height: 30rpx;text-align: bottom">预付款10%,余款货到付款</text>
</view>
<text class="cuIcon-{{form.payType==1?'roundcheckfill':'roundcheck'}} text-{{form.payType==1?'blue':'grey'}}" style="font-size:36rpx"></text>
</view>

7
pages/mall/page-list/index.wxml

@ -1,3 +1,4 @@
<wxs module="formate" src="./../index.wxs"></wxs>
<view class="flex content" wx:for="{{dataList}}" wx:key="index" data-index="{{index}}" bindtap="lookItem">
<wux-image width="{{120}}" height="{{120}}" wux-class="page-icon" lazyLoad="true" src="{{item.litimgUrl}}" mode="aspectFill">
<view class="image-load" slot="loading">
@ -11,12 +12,12 @@
<view class="page-num" wx:elif="{{item.sellMode == 2}}">已拼{{item.soldNum}}{{item.unit}}</view>
</view>
<view style="height:50px">
<view class="page-outline">{{item.outline}}</view>
<view class="page-summary" style="margin-top: 8rpx">{{item.summary}}</view>
<view class="page-outline">{{formate.formateText(item.outline, 16)}}</view>
<view class="page-outline" style="margin-top: 8rpx">{{formate.formateText(item.summary, 14)}}</view>
</view>
<view class="flex flex-justify" style="align-items:flex-end;height:30px;padding-bottom:3px">
<view class="page-price">¥{{item.price}}</view>
<view class="page-stock" style="margin-bottom:6rpx">库存:{{item.stockNumber}}{{item.unit}}</view>
<view class="page-stock">库存:{{item.stockNumber}}{{item.unit}}</view>
<button class="cu-btn bg-red round shadow-blur page-btn">立即抢购</button>
</view>
</view>

9
pages/mall/page-list/index.wxss

@ -32,7 +32,7 @@
.page-outline {
margin-top: 8rpx;
font-size: 24rpx;
font-size: 28rpx;
font-family: PingFang-SC-Regular, PingFang-SC;
font-weight: 400;
color: rgba(51, 51, 51, 1);
@ -47,7 +47,7 @@
.page-summary {
margin-top: 8rpx;
font-size: 24rpx;
font-size: 28rpx;
font-family: PingFang-SC-Regular, PingFang-SC;
font-weight: 400;
color: rgba(51, 51, 51, 1);
@ -69,6 +69,7 @@
}
.page-price {
line-height: 30rpx;
font-size: 32rpx;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
@ -76,11 +77,11 @@
}
.page-stock {
font-size: 24rpx;
font-size: 20rpx;
line-height: 20rpx;
font-family: PingFang-SC-Regular, PingFang-SC;
font-weight: 400;
color: rgba(153, 153, 153, 1);
line-height: 14px;
}
.image-load {

1
pages/mall/shops/index.wxml

@ -1,4 +1,5 @@
<!--pages/message/index.wxml-->
<cu-custom bgColor="bg-white" isBack="{{false}}">
<view slot="content" style="color:black;font-size:36rpx">原纸商城</view>
</cu-custom>

2
utils/request.js

@ -27,7 +27,7 @@ function fun(url, method, data, header) {
what: 666,
desc: 'Logout'
})
resolve(result.data)
reject(result.data)
} else {
var msg = '数据错误'
if (result.data.message) {

Loading…
Cancel
Save