Commit 1d9aa20e by 严立

LL - ui 审核初版

parent bac94b8b

555 Bytes | W: | H:

248 Bytes | W: | H:

image/audit-err.png
image/audit-err.png
image/audit-err.png
image/audit-err.png
  • 2-up
  • Swipe
  • Onion skin

2.43 KB | W: | H:

862 Bytes | W: | H:

image/audit-ing.png
image/audit-ing.png
image/audit-ing.png
image/audit-ing.png
  • 2-up
  • Swipe
  • Onion skin

844 Bytes | W: | H:

467 Bytes | W: | H:

image/cart.png
image/cart.png
image/cart.png
image/cart.png
  • 2-up
  • Swipe
  • Onion skin

500 Bytes | W: | H:

221 Bytes | W: | H:

image/icon_close.png
image/icon_close.png
image/icon_close.png
image/icon_close.png
  • 2-up
  • Swipe
  • Onion skin

12.4 KB | W: | H:

4 KB | W: | H:

image/movie-bottom.png
image/movie-bottom.png
image/movie-bottom.png
image/movie-bottom.png
  • 2-up
  • Swipe
  • Onion skin

8.56 KB | W: | H:

3.51 KB | W: | H:

image/no-movie.png
image/no-movie.png
image/no-movie.png
image/no-movie.png
  • 2-up
  • Swipe
  • Onion skin

3.03 KB | W: | H:

2.9 KB | W: | H:

image/ornament-0.png
image/ornament-0.png
image/ornament-0.png
image/ornament-0.png
  • 2-up
  • Swipe
  • Onion skin

1.08 KB | W: | H:

994 Bytes | W: | H:

image/ornament-1.png
image/ornament-1.png
image/ornament-1.png
image/ornament-1.png
  • 2-up
  • Swipe
  • Onion skin

4.81 KB | W: | H:

1.02 KB | W: | H:

image/ornament-2-black.png
image/ornament-2-black.png
image/ornament-2-black.png
image/ornament-2-black.png
  • 2-up
  • Swipe
  • Onion skin

1.37 KB | W: | H:

1.24 KB | W: | H:

image/ornament-2.png
image/ornament-2.png
image/ornament-2.png
image/ornament-2.png
  • 2-up
  • Swipe
  • Onion skin

986 Bytes | W: | H:

526 Bytes | W: | H:

image/phone.png
image/phone.png
image/phone.png
image/phone.png
  • 2-up
  • Swipe
  • Onion skin

261 Bytes | W: | H:

141 Bytes | W: | H:

image/scan.png
image/scan.png
image/scan.png
image/scan.png
  • 2-up
  • Swipe
  • Onion skin

82 KB | W: | H:

75.9 KB | W: | H:

image/share.png
image/share.png
image/share.png
image/share.png
  • 2-up
  • Swipe
  • Onion skin

1.06 KB | W: | H:

482 Bytes | W: | H:

image/star-gray.png
image/star-gray.png
image/star-gray.png
image/star-gray.png
  • 2-up
  • Swipe
  • Onion skin

464 Bytes | W: | H:

435 Bytes | W: | H:

image/star-left.png
image/star-left.png
image/star-left.png
image/star-left.png
  • 2-up
  • Swipe
  • Onion skin

899 Bytes | W: | H:

633 Bytes | W: | H:

image/star-right.png
image/star-right.png
image/star-right.png
image/star-right.png
  • 2-up
  • Swipe
  • Onion skin

639 Bytes | W: | H:

427 Bytes | W: | H:

image/star-time.png
image/star-time.png
image/star-time.png
image/star-time.png
  • 2-up
  • Swipe
  • Onion skin

1.09 KB | W: | H:

472 Bytes | W: | H:

image/star-yellow.png
image/star-yellow.png
image/star-yellow.png
image/star-yellow.png
  • 2-up
  • Swipe
  • Onion skin

614 Bytes | W: | H:

273 Bytes | W: | H:

image/top.png
image/top.png
image/top.png
image/top.png
  • 2-up
  • Swipe
  • Onion skin

1.48 KB | W: | H:

993 Bytes | W: | H:

image/wechat.png
image/wechat.png
image/wechat.png
image/wechat.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -290,7 +290,21 @@ Page({
'tagId': '305',
}
}).then((response) => {
let funcData = response.data.list
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'id': funcData[i].commodityId,
'name': funcData[i].name,
'cover': funcData[i].cover,
'price': funcData[i].price,
'exchangeQuantity': funcData[i].sellNumber,
}
funcList.push(funcItem)
}
this.setData({
integralMallGoods: funcList
})
}).catch((response) => {})
},
......@@ -471,6 +485,15 @@ Page({
})
},
onMall: function () {
wx.navigateTo({ url: '/pages/mall/home/home' })
},
onMallGoodsDetail: function (funcEvent) {
let funcItem = funcEvent.currentTarget.dataset.item
wx.navigateTo({ url: '/pages/mall/goods/goods?id=' + funcItem.id })
},
/**
* 看房预约
* @function
......
......@@ -163,12 +163,12 @@
<!-- 积分商城 -->
<swiper-item>
<view class="shop-banner row con-c">
<image src="{{resourcesBase + 'bgi/bgi-00.png'}}"></image>
<button class="row con-c align-c" data-id="{{3}}" bindtap="onBuyOriginality"></button>
<image src="{{resourcesBase + 'bgi/bgi-01.png'}}"></image>
<button class="row con-c align-c" bindtap="onMall"></button>
</view>
<view class="shop-menu">
<block wx:for="{{shopRecommendD}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="shop-menu-item col con-c align-c" data-id="{{3}}" data-item="{{item}}" bindtap="onBuyRecommendOriginality">
<block wx:for="{{integralMallGoods}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="shop-menu-item col con-c align-c" data-item="{{item}}" bindtap="onMallGoodsDetail">
<image src="{{item.cover}}"></image>
<text>{{item.name}}</text>
</view>
......
......@@ -22,6 +22,9 @@ Page({
'number': '',
},
couponCodeList: [],
couponCodeSelectionIndex: 0,
integralTotal: 0,
isExpress: false,
winPopup: false,
......@@ -108,7 +111,7 @@ Page({
'cover': funcData.smOrderDetails[i].imgUrl,
'price': funcData.smOrderDetails[i].unitPrice,
'quantity': funcData.smOrderDetails[i].number,
'state': funcData.smOrderDetails[i].status,
'state': Number(funcData.smOrderDetails[i].status),
}
funcGoodsInfo.push(funcItem)
}
......@@ -147,11 +150,36 @@ Page({
})
App.ui.hideToast()
this.queryAllExchangeCoupon()
}).catch((response) => {
})
},
queryAllExchangeCoupon: function () {
App.request({
url: 'v1/order/getVolumesByOrderId',
params: {
'orderId': this.data.exchangeInfo.id
}
}).then((response) => {
let funcData = response.data
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'name': funcData[i].name,
'codeBase64': funcData[i].qrcode,
'codeNumber': funcData[i].serialNumber,
'state': Number(funcData[i].status),
}
funcList.push(funcItem)
}
this.setData({
couponCodeList: funcList,
})
}).catch((response) => {})
},
/**
* 复制物流单号
* @function
......@@ -170,27 +198,11 @@ Page({
* @param
* @returns
*/
onCouponCodeScan: function () {
App.request({
url: 'v1/order/getVolumesByOrderId',
params: {
'orderId': this.data.exchangeInfo.id
}
}).then((response) => {
let funcData = response.data[0]
let funcCouponInfo = this.data.couponInfo
funcCouponInfo.name = funcData.name
funcCouponInfo.codeBase64 = funcData.qrcode
funcCouponInfo.codeNumber = funcData.serialNumber
funcCouponInfo.state = funcData.status
this.setData({
couponInfo: funcCouponInfo,
winCouponCode: true
})
}).catch((response) => {
})
onCouponCodeScan: function (funcEvent) {
let funcIndex = funcEvent.currentTarget.dataset.index
if (funcIndex) this.setData({ couponCodeSelectionIndex: funcIndex })
this.setData({ winCouponCode: true })
console.log(funcEvent)
},
/**
......@@ -201,7 +213,7 @@ Page({
*/
onCouponCodeCopy: function () {
wx.setClipboardData({
data: this.data.couponInfo.codeNumber,
data: this.data.couponCodeList[this.data.couponCodeSelectionIndex].codeNumber,
})
},
......
......@@ -136,10 +136,10 @@
<text class="font_normal_26 color_regular" space="nbsp"> 积分</text>
</view>
</view>
<view class=" row">
<button class="goods_item_operation_code font_bold_22 color_submit row cc ac" wx:if="{{item.state === 2}}">查看券码</button>
<button class="goods_item_operation_used font_bold_22 color_submit row cc ac" wx:if="{{item.state === 3}}">已使用</button>
<button class="goods_item_operation_used font_bold_22 color_submit row cc ac" wx:if="{{item.state === 4}}">已过期</button>
<view class="row">
<button class="goods_item_operation_code font_bold_22 color_submit row cc ac" wx:if="{{item.state === 1}}" data-index="{{index}}" catchtap="onCouponCodeScan">查看券码</button>
<button class="goods_item_operation_used font_bold_22 color_submit row cc ac" wx:if="{{item.state === 2}}" data-index="{{index}}" catchtap="onCouponCodeScan">已使用</button>
<button class="goods_item_operation_used font_bold_22 color_submit row cc ac" wx:if="{{item.state === 4}}" data-index="{{index}}" catchtap="onCouponCodeScan">已过期</button>
</view>
</view>
</block>
......@@ -180,15 +180,30 @@
<view class="dialog_coupon_code row cc ac" wx:if="{{winCouponCode}}">
<view class="dialog_coupon_code_wrap col cc ac">
<text class="font_normal_26 color_submit">{{'请将券码出示给门店核销人员'}}</text>
<swiper class="dialog_coupon_code_swiper" current="{{couponCodeSelectionIndex}}">
<swiper-item class="dialog_coupon_code_item row cc" wx:for="{{couponCodeList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="dialog_coupon_code_info col cc ac">
<text class="font_normal_30 color_regular">{{couponInfo.name}}</text>
<image class="dialog_coupon_code_content" src="{{'data:image/png;base64,' + couponInfo.codeBase64}}"></image>
<!-- 无效券码蒙尘样式 -->
<view class="dialog_coupon_code_mask" wx:if="{{item.state === 2}}"></view>
<image mode="aspectFill" class="dialog_coupon_code_seal" wx:if="{{item.state === 2}}" src="{{resourcesBase + 'mine/server/codeUsed.png'}}"></image>
<text class="font_normal_30 color_regular">{{item.name}}</text>
<image class="dialog_coupon_code_content" src="{{'data:image/png;base64,' + item.codeBase64}}"></image>
<view class="dialog_coupon_code_operation row con-b ac">
<block wx:if="{{item.state === 1}}">
<text class="font_bold_26 color_secondary">券码</text>
<text class="font_bold_30 color_regular">{{couponInfo.codeNumber}}</text>
<text class="font_bold_30 color_regular">{{item.codeNumber}}</text>
<text class="font_bold_26 color_primary" bindtap="onCouponCodeCopy">复制</text>
</block>
<block wx:if="{{item.state === 2}}">
<text class="font_bold_26 color_secondary">券码</text>
<text class="font_bold_30 color_secondary text_decoration_delete" wx:if="{{item.state === 2}}">{{item.codeNumber}}</text>
<text class="font_bold_26 color_primary" space="nbsp">  </text>
</block>
</view>
</view>
</swiper-item>
</swiper>
<view class="dialog_coupon_code_close row cc ac" bindtap="onCouponCodeClose">
<image class="icon_48" src="{{imageBase + 'icon/close-1.png'}}"></image>
</view>
......
......@@ -207,6 +207,13 @@
background: #86C5E1;
}
.goods_item_operation_used {
width: 120rpx;
height: 56rpx;
border-radius: 2px;
background: #C8E1EC;
}
/* 兑换积分 */
.integral {
width: 670rpx;
......@@ -262,7 +269,19 @@
background: rgba(0, 0, 0, .65);
}
.dialog_coupon_code_swiper {
width: 750rpx;
height: 730rpx;
}
.dialog_coupon_code_item {
left: 88rpx;
width: 574rpx !important;
height: 666rpx;
}
.dialog_coupon_code_info {
position: relative;
width: 526rpx;
height: 666rpx;
margin: 56rpx 0 48rpx 0;
......@@ -270,6 +289,23 @@
background: #FFFFFF;
}
.dialog_coupon_code_mask {
position: absolute;
top: 154rpx;
left: 116rpx;
width: 296rpx;
height: 296rpx;
background: rgba(255, 255, 255, .8);
}
.dialog_coupon_code_seal {
position: absolute;
top: 252rpx;
right: -68rpx;
width: 254rpx;
height: 254rpx;
}
.dialog_coupon_code_content {
width: 296rpx;
height: 296rpx;
......@@ -289,6 +325,7 @@
width: 80rpx;
height: 80rpx;
border-radius: 50%;
margin: 32rpx 0 0 0;
background: rgba(254, 252, 249, 0.5);
}
......
......@@ -82,9 +82,6 @@ Page({
isSupportExpress: Boolean(Number(funcData.expressType)),
})
console.log(this.data.isExpress)
console.log(this.data.isSupportExpress)
// 设置门店信息
let funcShopInfo = App.getShopInfo(this.data.goodsInfo.shopIdUse)
if (funcShopInfo.appId === 0) {
......@@ -111,9 +108,7 @@ Page({
}
}
}
}).catch((response) => {
})
}).catch((response) => {})
},
/**
......@@ -151,9 +146,7 @@ Page({
this.setData({
addressList: funcList
})
}).catch((response) => {
})
}).catch((response) => {})
},
/**
......@@ -208,17 +201,10 @@ Page({
*/
onExpress: function () {
if (this.data.isSupportExpress) {
this.setData({
isExpress: !this.data.isExpress
})
this.setData({ isExpress: !this.data.isExpress })
} else {
App.ui.showToast({
iconType: 'error',
title: '商品不支持快递',
})
}
console.log(this.data.isExpress)
App.ui.showToast({ iconType: 'error', title: '商品不支持快递', })
}vv
},
/**
......@@ -316,19 +302,23 @@ Page({
'integral': this.data.goodsInfo.price * this.data.exchangeQuantity,
'office': { 'id': this.data.goodsInfo.shopIdAscription },
'usedOffice': { 'id': this.data.goodsInfo.shopIdUse },
'smOrderDetails': [{
'smOrderDetails': [],
'smPersonalDetails': [],
'name': this.data.userInfo.name,
'mobilePhone': this.data.userInfo.phone,
'goodType': this.data.goodsInfo.type,
}
for (let i = 0; i < this.data.exchangeQuantity; i++) {
funcParams.smOrderDetails.push({
'smCommodity': { 'id': this.data.goodsInfo.id },
'smInventory': { 'id': this.data.goodsInfo.stockId },
'goodType': this.data.goodsInfo.type,
'name': this.data.goodsInfo.name,
'number': this.data.exchangeQuantity,
'number': 1,
'unitPrice': this.data.goodsInfo.price,
'totalPrices': this.data.goodsInfo.price * this.data.exchangeQuantity
}],
'smPersonalDetails': [],
'name': this.data.userInfo.name,
'mobilePhone': this.data.userInfo.phone,
'goodType': this.data.goodsInfo.type,
'totalPrices': 1
})
}
if (this.data.isExpress) {
......
let App = getApp()
Page({
data: {
showMenu: false,
menu: '全 部',
menuList: [
{ id: '', name: '全 部' },
{ id: 0, name: '获 取' },
{ id: 1, name: '已使用' }
integralState: [
{ text: '全 部', value: '' },
{ text: '获 取', value: 0 },
{ text: '已使用', value: 1 },
],
integralStateSelectionIndex: 0,
winIntegralState: false,
pageNo: '1',
pageSize: '-1',
type: '', // "" 全部 0 获取 1消费(0 发放 1 兑换)
accumulateList: [],
selectedList: [],
integral: 0,
type: '',
accumulateListHeight: 0,
},
onLoad: function(options) {
this.setAccumulateListHeight()
this.getAccumulate()
this.queryIntegralRecord()
this.queryIntegral()
},
setAccumulateListHeight: function () {
let funcWindowHeight = wx.getSystemInfoSync().windowHeight
let funcAccumulateListHeight = funcWindowHeight - 410 * wx.getStorageSync('unitProportion')
this.setData({
accumulateListHeight: funcAccumulateListHeight
})
},
/**
* 查询积分
* @function
......@@ -52,67 +38,49 @@ Page({
},
// 获取积分列表
getAccumulate: function() {
wx.showLoading({
queryIntegralRecord: function() {
App.ui.showToast({
iconType: 'loading',
title: '加载中',
duration: 30000
})
App.wxRequest({
App.request({
url: 'v1/smUser/getIntegralDetails',
data: {
params: {
'pageNo': this.data.pageNo,
'pageSize': this.data.pageSize,
type: this.data.type
},
success: (response) => {
wx.hideLoading({
success: (res) => {},
})
let accumulateList = response.data
let selectedList = accumulateList
this.setData({
accumulateList,
selectedList
})
'type': this.data.integralState[this.data.integralStateSelectionIndex].value
}
})
}).then ((response) => {
App.ui.hideToast()
let funcData = response.data
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'recordDate': funcData[i].createDate,
'integral': funcData[i].integral,
'isExchange': Boolean(Number(funcData[i].type)),
}
funcList.push(funcItem)
}
this.setData({ accumulateList: funcList })
}).catch ((response) => {})
},
// 显示菜单
onShowMenu: function() {
this.setData({
showMenu: !this.data.showMenu
})
this.setData({ winIntegralState: true })
},
// 隐藏菜单
onHideMenu: function() {
this.setData({
showMenu: false
})
this.setData({ winIntegralState: false })
},
/**
* 查询今日放映
* @function
* @param type 0全部 1获取 2已使用
* @returns
*/
onTabMenu: function(event) {
let {
index,
type
} = event.currentTarget.dataset
let menu = this.data.menuList[index].name
let selectedList = []
if (index === 0) {
selectedList = this.data.accumulateList
} else {
selectedList = selectedList.filter(v => v.type === index - 1)
}
this.setData({
menu,
selectedList,
type: type
})
onTabMenu: function(funcEvent) {
let funcIndex = funcEvent.currentTarget.dataset.index
this.setData({ integralStateSelectionIndex: funcIndex })
this.onHideMenu()
this.getAccumulate()
this.queryIntegralRecord()
},
})
\ No newline at end of file
<m-nav titleText="我的积分" styleIndex="{{2}}" isOccupy="{{false}}"></m-nav>
<view class="container" bindtap="onHideMenu">
<image class="gbi" src="{{resourcesBase + 'bgi/bgi-00.png'}}"></image>
<view class="integral_total row cb ac">
<text class="integral_number">{{integral}}</text>
<view class="integral_used_type row cb ac" catchtap="onShowMenu">
<text>{{integralState[integralStateSelectionIndex].text}}</text>
<image wx:if="{{winIntegralState}}" src="/image/icon/arrow-t-2.png"></image>
<image wx:if="{{!winIntegralState}}" src="/image/icon/arrow-b-2.png"></image>
<view class="container con-s" bindtap="onHideMenu">
<!-- 积分背景图 -->
<image class="banner" src="{{resourcesBase + 'bgi/bgi-00.png'}}"></image>
<view class="my-accumulate">
<text>{{integral}}</text>
<view class="integral_used_type_list column" wx:if="{{winIntegralState}}">
<block wx:for="{{integralState}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="integral_used_type_item row ac {{integralStateSelectionIndex === index ? 'selected' : ''}}">
<text data-index="{{index}}" catchtap="onTabMenu">{{item.text}}</text>
</view>
<view class="accumulate-tips">
<text>积分用于兑换积分商品,积分商城即将上线,敬请期待</text>
</view>
<view class="banner-menu row con-b align-c" catchtap="onShowMenu">
<text>{{menu}}</text>
<image wx:if="{{showMenu}}" src="/image/icon/arrow-t-2.png"></image>
<image wx:if="{{!showMenu}}" src="/image/icon/arrow-b-2.png"></image>
<view class="banner-menu-down col" wx:if="{{showMenu}}">
<block wx:for="{{menuList}}" wx:key="id">
<text class="{{menu === item.name ? 'selected' : ''}}" data-type="{{item.id}}" data-index="{{index}}" catchtap="onTabMenu">{{item.name}}</text>
</block>
</view>
</view>
<!-- 积分列表 -->
<!-- 无积分 -->
</view>
<view class="integral_used">
<view class="accumulate-empty" wx:if="{{accumulateList.length === 0}}">
<text>暂无积分明细</text>
</view>
<!-- 有积分 -->
<!-- <view class="accumulate-wrapper col align-c" wx:else style="{{'max-height:' + accumulateListHeight + 'px;'}}"> -->
<view class="accumulate-wrapper col align-c" wx:else>
<block wx:for="{{accumulateList}}" wx:key="index">
<view class="accumulate row con-b align-c">
<view class="accumulate-left col con-b">
<view class="accumulate-wrapper column ac" wx:if="{{accumulateList.length > 0}}">
<block wx:for="{{accumulateList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="accumulate row cb ac">
<view class="accumulate-left column cb">
<view class="accumulate-type">
<text wx:if="item.type === '0'">消费</text>
<text wx:else>已使用</text>
<text>{{item.isExchange ? '兑换商品' : '消费'}}</text>
</view>
<view class="accumulate-time">
<text>{{item.createDate}}</text>
<text>{{item.recordDate}}</text>
</view>
</view>
<view class="accumulate-right {{item.type === '0' ? 'accumulate-type-color' : ''}}">
<text wx:if="{{item.type === '0'}}">+</text>
<text wx:else>-</text>
<text>{{item.integral}}</text>
<view class="accumulate-right font_normal_30 {{item.isExchange ? 'color_regular' : 'color_warning'}}">
<text>{{item.isExchange ? '- ' + item.integral : '+ ' + item.integral}}</text>
</view>
</view>
</block>
</view>
</view>
</view>
\ No newline at end of file
......@@ -3,48 +3,54 @@ page {
}
.container {
position: relative;
min-height: 100vh;
height: 100vh;
}
.banner {
.gbi {
position: fixed;
z-index: -2;
top: 0;
left: 0;
width: 750rpx;
height: 480rpx;
height: 430rpx;
}
.integral_used {
flex-grow: 1;
margin: 32rpx 0 0 0;
overflow-y: scroll;
}
.my-accumulate {
.integral_total {
width: 670rpx;
margin-top: 232rpx;
font-size: 70rpx;
font-weight: 600;
margin: 220rpx 0 0 0;
}
.integral_number {
font-size: 86rpx;
font-weight: 800;
line-height: 122rpx;
color: #F0DABB;
line-height: 97rpx;
}
.banner-menu {
position: absolute;
top: 254rpx;
right: 40rpx;
.integral_used_type {
position: relative;
width: 166rpx;
height: 56rpx;
padding: 0 24rpx;
border-radius: 4rpx;
background: rgba(255, 255, 255, 0.95);
color: #15191F;
font-size: 26rpx;
background: rgba(255, 255, 255, 0.95);
border-radius: 4rpx;
}
.banner-menu image {
.integral_used_type > image {
width: 32rpx;
height: 32rpx;
margin-left: 8rpx;
}
.banner-menu-down {
.integral_used_type_list {
position: absolute;
z-index: 99999999;
left: 0;
......@@ -56,7 +62,7 @@ page {
border-radius: 4rpx;
}
.banner-menu-down text {
.integral_used_type_item {
flex: 1;
padding-left: 24rpx;
color: #959CA8;
......@@ -69,14 +75,6 @@ page {
color: #15191F !important;
}
.accumulate-tips {
width: 670rpx;
margin-top: 8rpx;
font-size: 22rpx;
color: #FFFFFF;
line-height: 32rpx;
}
.accumulate-empty {
margin-top: 426rpx;
font-size: 38rpx;
......@@ -86,9 +84,9 @@ page {
}
.accumulate-wrapper {
position: absolute;
/* position: absolute; */
z-index: 1;
top: 410rpx;
/* top: 410rpx; */
width: 670rpx;
padding: 12rpx 0 14rpx;
background-color: #fff;
......@@ -118,16 +116,3 @@ page {
font-size: 22rpx;
color: #959DA9;
}
\ No newline at end of file
.accumulate-right {
font-size: 30rpx;
}
.accumulate-right text {
margin-left: 6rpx;
color: #E66060;
}
.accumulate-type-color {
color: #959DA9;
}
\ No newline at end of file
......@@ -128,10 +128,12 @@ Page({
* 设置是否为默认地址
* @param {event}} event
*/
onSetDefaultAddress: function (event) {
onSetDefaultAddress: function (funcEvent) {
let funcValue = funcEvent.currentTarget.dataset.value
this.setData({
addressInfo: Object.assign(this.data.addressInfo, { 'isDefault': event.detail.value })
addressInfo: Object.assign(this.data.addressInfo, { 'isDefault': funcValue })
})
console.log(this.data.addressInfo)
},
/**
......
......@@ -4,7 +4,7 @@
<view class="container">
<view class="address_info">
<view class="address_item">
<view class="address_item column cb">
<view class="row ac">
<text class="title">收货人</text>
<m-input
......@@ -20,8 +20,7 @@
<text class="text_error" wx:if="{{addressInfo.errorName}}">{{addressInfo.errorName}}</text>
</view>
<view class="address_item">
<view class="address_item column cb">
<view class="row ac">
<text class="title">手机号</text>
<m-input
......@@ -48,7 +47,7 @@
</picker>
</view>
<view class="address_item">
<view class="address_item column cb">
<view class="row ac">
<text class="title">详细地址</text>
<m-input
......@@ -65,13 +64,16 @@
</view>
</view>
<view class="address_info top30rpx">
<view class="address_item row ac cb">
<view class="address_default row cb ac">
<text class="title">设为默认地址</text>
<switch checked="{{addressInfo.isDefault}}" bindchange="onSetDefaultAddress"></switch>
<view class="switch_on row ce ac" hidden="{{!addressInfo.isDefault}}" data-value="{{false}}" bindtap="onSetDefaultAddress">
<view class="switch_slide_on"></view>
</view>
<view class="switch_off row cs ac" hidden="{{addressInfo.isDefault}}" data-value="{{true}}" bindtap="onSetDefaultAddress">
<view class="switch_slide_off"></view>
</view>
</view>
<button class="button row cc ac top40rpx" bindtap="onSaveAddress">保存</button>
<button wx:if="{{addressInfo.id}}" class="button-delete row cc ac" bindtap="onDeleteAddress">删除收货地址</button>
<button class="address_info_save row cc ac font_bold_30 color_submit" bindtap="onSaveAddress">保存</button>
<button wx:if="{{addressInfo.id}}" class="address_info_delete row cc ac font_bold_30 color_warning" bindtap="onDeleteAddress">删除收货地址</button>
</view>
\ No newline at end of file
......@@ -4,14 +4,6 @@
background-color: #F8F8FA;
}
.top30rpx {
margin-top: 30rpx;
}
.top40rpx {
margin-top: 40rpx;
}
.address_info {
width: 750rpx;
padding: 0 40rpx;
......@@ -20,8 +12,8 @@
.address_item {
width: 670rpx;
min-height: 90rpx;
padding: 26rpx 0;
min-height: 94rpx;
padding: 26rpx 0 18rpx 0;
border-bottom: 1px #E2E7EF solid;
}
......@@ -30,6 +22,14 @@
border: none;
}
.address_default {
width: 750rpx;
height: 96rpx;
margin: 34rpx 0 0 0;
padding: 0 40rpx;
background: #FFFFFF;
}
.title {
min-width: 160rpx;
font-size: 30rpx;
......@@ -38,6 +38,7 @@
}
.text_error {
margin: 16rpx 0 0 0;
font-size: 23rpx;
font-weight: 400;
color: #E15A66;
......@@ -55,7 +56,6 @@
}
.address_item_picker {
margin-left: 20rpx;
width: 500rpx;
font-size: 30rpx;
font-weight: 400;
......@@ -67,24 +67,46 @@
color: aqua;
}
.button {
.address_info_save {
width: 670rpx;
height: 96rpx;
margin-bottom: 40rpx;
background: #86C5E1;
margin: 48rpx 0 0 0;
border-radius: 2px;
background: #86C5E1;
}
font-size: 30rpx;
font-weight: 500;
color: #ffffff;
line-height: 42rpx;
.address_info_delete {
margin: 48rpx 0 0 0;
}
.button-delete {
font-size: 30rpx;
font-weight: 500;
color: rgb(233, 70, 83);
line-height: 44rpx;
.switch_on {
width: 100rpx;
height: 56rpx;
padding: 0 6rpx;
border-radius: 28rpx;
background: #86C5E1;
}
.switch_slide_on {
width: 44rpx;
height: 44rpx;
border-radius: 50%;
background: #FFFFFF;
}
.switch_off {
width: 100rpx;
height: 56rpx;
padding: 0 6rpx;
border-radius: 28rpx;
background: #E8EFF2;
}
.switch_slide_off {
width: 44rpx;
height: 44rpx;
border-radius: 50%;
background: #FFFFFF;
}
.wx-switch-input {
......
/* 主题颜色 */
.color_primary { color: #5DB5DD; }
/* 常规颜色 */
.color_regular { color: #15191F; }
/* 提示颜色 */
.color_secondary { color: #959DA9; }
/* 警告颜色 */
.color_warning { color: #E66060; }
/* 提示颜色 */
.color_tip { color: #837048; }
/* 取消颜色 */
.color_cancel { color: #656E7B; }
/* 确定颜色 */
.color_submit { color: #FFFFFF; }
/* 可用颜色 */
.color_able { color: #86C5E1;}
.text_decoration_delete {
text-decoration: line-through;
}
.color_primary { color: #5DB5DD; } /* 主题颜色 */
.color_regular { color: #15191F; } /* 常规颜色 */
.color_secondary { color: #959DA9; } /* 提示颜色 */
.bgcolor_secondary { background-color: #959DA9; }
.color_warning { color: #E66060; } /* 警告颜色 */
.color_tip { color: #837048; } /* 提示颜色 */
.color_cancel { color: #656E7B; } /* 取消颜色 */
.color_submit { color: #FFFFFF; } /* 确定颜色 */
.bgcolor_submit { background-color: #FFFFFF; }
.color_able { color: #86C5E1;} /* 可用颜色 */
.bgcolor_able { background-color: #86C5E1; }
/* 禁用颜色 */
.color_disable { color: #86C5E1 }
.color_disable { color: #86C5E1 } /* 禁用颜色 */
.bgcolor_disable { background-color: #86C5E1; }
/* 常规 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment