一大波细节
1
.cloudbase/container/debug.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"containers":[],"config":{}}
|
||||||
@ -20,21 +20,13 @@ export default {
|
|||||||
delete:(address_id)=>request.delete(`/api/address/${address_id}`)
|
delete:(address_id)=>request.delete(`/api/address/${address_id}`)
|
||||||
},
|
},
|
||||||
building:{
|
building:{
|
||||||
list(community_id){
|
list:(community_id)=>request.get('/api/community/building/list',{community_id})
|
||||||
if(!app){
|
|
||||||
app = getApp();
|
|
||||||
}
|
|
||||||
const data = {
|
|
||||||
community_id,
|
|
||||||
user_id:app.globalData.userInfo.userid
|
|
||||||
}
|
|
||||||
return request.get('/api/community/building/list',{community_id})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
station:{
|
station:{
|
||||||
list:(community_id)=>request.get('/api/station',{community_id})
|
list:(community_id)=>request.get('/api/station',{community_id})
|
||||||
},
|
},
|
||||||
uploadImg(file){
|
uploadImg(file){
|
||||||
|
if(!app)app = getApp();
|
||||||
return new Promise((rs,rj)=>{
|
return new Promise((rs,rj)=>{
|
||||||
wx.uploadFile({
|
wx.uploadFile({
|
||||||
filePath: file.tempFilePath,
|
filePath: file.tempFilePath,
|
||||||
|
|||||||
@ -7,20 +7,26 @@ const sendRequest = (options)=>{
|
|||||||
wx.request({
|
wx.request({
|
||||||
url: `${baseUrl}${options.url}`,
|
url: `${baseUrl}${options.url}`,
|
||||||
success:(result)=>{
|
success:(result)=>{
|
||||||
|
//Http Request的状态
|
||||||
if(result.statusCode==200){
|
if(result.statusCode==200){
|
||||||
|
//后端的自定义状态
|
||||||
if(result.data.code==200){
|
if(result.data.code==200){
|
||||||
rs(result.data.data);
|
rs(result.data.data);
|
||||||
}else{
|
}else{
|
||||||
|
if(!options.options.noTips){
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
icon:'error',
|
icon:'error',
|
||||||
title: result.data.message,
|
title: result.data.message,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
rj(result.data);
|
rj(result.data);
|
||||||
}
|
}
|
||||||
}else if(result.statusCode==401){
|
}else if(result.statusCode==401){
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/login/login',
|
url: '/pages/login/login',
|
||||||
})
|
})
|
||||||
|
}else{
|
||||||
|
rj(result.data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -42,16 +48,16 @@ const sendRequest = (options)=>{
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
baseUrl:baseUrl,
|
baseUrl:baseUrl,
|
||||||
get(url,data){
|
get(url,data,options){
|
||||||
return sendRequest({url,method:'get',data});
|
return sendRequest({url,method:'get',data,options:options||{}});
|
||||||
},
|
},
|
||||||
post(url,data){
|
post(url,data,options){
|
||||||
return sendRequest({url,method:'post',data});
|
return sendRequest({url,method:'post',data,options:options||{}});
|
||||||
},
|
},
|
||||||
put(url,data){
|
put(url,data,options){
|
||||||
return sendRequest({url,method:'put',data});
|
return sendRequest({url,method:'put',data,options:options||{}});
|
||||||
},
|
},
|
||||||
delete(url,data){
|
delete(url,data,options){
|
||||||
return sendRequest({url,method:'delete',data});
|
return sendRequest({url,method:'delete',data,options:options||{}});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -35,7 +35,10 @@ export default {
|
|||||||
DELIVERY_AT_DOORSTEP:"放在门口",
|
DELIVERY_AT_DOORSTEP:"放在门口",
|
||||||
DELIVERY_TO_ROOM:"敲门递件"
|
DELIVERY_TO_ROOM:"敲门递件"
|
||||||
},
|
},
|
||||||
pre:(data)=>request.post('/api/order/pre-order',data),
|
/**
|
||||||
|
* noTips:存在未支付的订单,不需要 toast,然后弹窗跳转订单详情
|
||||||
|
* */
|
||||||
|
pre:(data)=>request.post('/api/order/pre-order',data,{noTips:true}),
|
||||||
real:(data)=>request.post('/api/order',data),
|
real:(data)=>request.post('/api/order',data),
|
||||||
list:(data)=>request.get('/api/order/user/list',data),
|
list:(data)=>request.get('/api/order/user/list',data),
|
||||||
cancel:(orderid)=>request.post(`/api/order/${orderid}/user/cancel`),
|
cancel:(orderid)=>request.post(`/api/order/${orderid}/user/cancel`),
|
||||||
|
|||||||
70
app.js
@ -3,7 +3,8 @@ import commonApi from './api/common';
|
|||||||
let token = wx.getStorageSync('accessToken');
|
let token = wx.getStorageSync('accessToken');
|
||||||
console.log(12);
|
console.log(12);
|
||||||
App({
|
App({
|
||||||
onLaunch() {
|
onLaunch(options) {
|
||||||
|
console.log(options);
|
||||||
wx.getStorage({
|
wx.getStorage({
|
||||||
key:'accessToken',
|
key:'accessToken',
|
||||||
success:(res)=>{
|
success:(res)=>{
|
||||||
@ -12,7 +13,7 @@ App({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
navToLogin(){
|
navToLogin(){
|
||||||
wx.navigateTo({
|
wx.reLaunch({
|
||||||
url: '/pages/login/login',
|
url: '/pages/login/login',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -98,6 +99,71 @@ App({
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
validateForm(rules,page){
|
||||||
|
const result = [];
|
||||||
|
for(var key in rules){
|
||||||
|
((rules[key] instanceof Array)?rules[key]:[rules[key]]).map((item)=>{
|
||||||
|
let valid = true;
|
||||||
|
let value = (page.data[key]+'').trim();
|
||||||
|
//非空
|
||||||
|
if(item.required){
|
||||||
|
if(value==''){
|
||||||
|
valid = false;
|
||||||
|
}
|
||||||
|
}else if(item.length){
|
||||||
|
//绝对长度
|
||||||
|
if(value.length!=item.length){
|
||||||
|
valid = false;
|
||||||
|
}
|
||||||
|
}else if(item.type=='phone'){
|
||||||
|
if(value.length!=11){
|
||||||
|
valid = false;
|
||||||
|
}
|
||||||
|
}else if(item.maxLength||item.minLength){
|
||||||
|
if(value.length>(item.maxLength||Infinity)||value.length<item.minLength||0){
|
||||||
|
valid = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(valid){
|
||||||
|
page.setData({
|
||||||
|
[`${key}Message`]:''
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
page.setData({
|
||||||
|
[`${key}Message`]:item.message
|
||||||
|
});
|
||||||
|
result.push({
|
||||||
|
[key]:item.message,autoFocus:item.autoFocus,key:key,shake:item.shake
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const focusInput = result.find((item)=>item.autoFocus);
|
||||||
|
if(focusInput){
|
||||||
|
page.setData({
|
||||||
|
[`${focusInput.key}Focus`]:true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const shakeInput = result.find((item)=>item.shake);
|
||||||
|
if(shakeInput){
|
||||||
|
if(!shakeInput.animation){
|
||||||
|
shakeInput.animation = wx.createAnimation({
|
||||||
|
duration: 20,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
shakeInput.animation.translateX(10).step();
|
||||||
|
shakeInput.animation.translateX(-10).step();
|
||||||
|
shakeInput.animation.translateX(10).step();
|
||||||
|
shakeInput.animation.translateX(-10).step();
|
||||||
|
shakeInput.animation.translateX(5).step();
|
||||||
|
shakeInput.animation.translateX(0).step();
|
||||||
|
// needSetData[`${key}Animation`] = item.animation.export();
|
||||||
|
page.setData({
|
||||||
|
[`${shakeInput.key}Animation`]:shakeInput.animation.export()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
},
|
||||||
getAddressList(){
|
getAddressList(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
34
app.json
@ -4,7 +4,6 @@
|
|||||||
"pages/shop/index/index",
|
"pages/shop/index/index",
|
||||||
"pages/order/index/index",
|
"pages/order/index/index",
|
||||||
"pages/my/index/index",
|
"pages/my/index/index",
|
||||||
"pages/index/index",
|
|
||||||
"pages/login/login",
|
"pages/login/login",
|
||||||
"pages/logs/logs",
|
"pages/logs/logs",
|
||||||
"pages/help/package/index",
|
"pages/help/package/index",
|
||||||
@ -20,9 +19,10 @@
|
|||||||
"pages/my/coupon/index",
|
"pages/my/coupon/index",
|
||||||
"pages/my/money/index",
|
"pages/my/money/index",
|
||||||
"pages/my/firend/index",
|
"pages/my/firend/index",
|
||||||
"pages/my/setting/index",
|
"pages/my/setting/index/index",
|
||||||
"pages/shop/bill/index",
|
"pages/shop/bill/index",
|
||||||
"pages/shop/bill_success/index"
|
"pages/shop/bill_success/index",
|
||||||
|
"pages/my/setting/name/index"
|
||||||
],
|
],
|
||||||
"window": {
|
"window": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
@ -33,31 +33,25 @@
|
|||||||
"color": "#222222",
|
"color": "#222222",
|
||||||
"selectedColor": "#FFC300",
|
"selectedColor": "#FFC300",
|
||||||
"backgroundColor": "#ffffff",
|
"backgroundColor": "#ffffff",
|
||||||
"borderStyle": "white",
|
"borderStyle": "black",
|
||||||
"list": [
|
"list": [
|
||||||
{
|
{
|
||||||
"pagePath": "pages/help/index/index",
|
"pagePath": "pages/help/index/index",
|
||||||
"text": "帮忙",
|
"text": "蜂快",
|
||||||
"iconPath": "assets/icon/tabs/tab1@3x.png",
|
"iconPath": "assets/icon/tabs/tab1.png",
|
||||||
"selectedIconPath": "assets/icon/tabs/tab1-active@3x.png"
|
"selectedIconPath": "assets/icon/tabs/tab1-active.png"
|
||||||
},
|
|
||||||
{
|
|
||||||
"pagePath": "pages/shop/index/index",
|
|
||||||
"text": "省钱",
|
|
||||||
"iconPath": "assets/icon/tabs/tab2@3x.png",
|
|
||||||
"selectedIconPath": "assets/icon/tabs/tab2-active@3x.png"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/order/index/index",
|
"pagePath": "pages/order/index/index",
|
||||||
"text": "订单",
|
"text": "订单",
|
||||||
"iconPath": "assets/icon/tabs/tab3@3x.png",
|
"iconPath": "assets/icon/tabs/tab3.png",
|
||||||
"selectedIconPath": "assets/icon/tabs/tab3-active@3x.png"
|
"selectedIconPath": "assets/icon/tabs/tab3-active.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/my/index/index",
|
"pagePath": "pages/my/index/index",
|
||||||
"text": "我的",
|
"text": "我的",
|
||||||
"iconPath": "assets/icon/tabs/tab4@3x.png",
|
"iconPath": "assets/icon/tabs/tab4.png",
|
||||||
"selectedIconPath": "assets/icon/tabs/tab4-active@3x.png"
|
"selectedIconPath": "assets/icon/tabs/tab4-active.png"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -67,8 +61,10 @@
|
|||||||
"lazyCodeLoading": "requiredComponents",
|
"lazyCodeLoading": "requiredComponents",
|
||||||
"permission": {
|
"permission": {
|
||||||
"scope.userLocation": {
|
"scope.userLocation": {
|
||||||
"desc": "你的位置信息将用于小程序位置接口的效果展示"
|
"desc": "将获取你的位置,用于为你提供配送服务"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"requiredPrivateInfos": ["getLocation"]
|
"requiredPrivateInfos": [
|
||||||
|
"getLocation"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
98
app.wxss
@ -1,14 +1,15 @@
|
|||||||
@import '/assets/style/weui.wxss';
|
|
||||||
page{
|
page{
|
||||||
font-size:32rpx;
|
font-size:32rpx;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
--main-font-color:#222222;
|
--main-font-color:#000000;
|
||||||
--main-bgclolor:#F5F5F5;
|
--main-bgclolor:#F5F5F5;
|
||||||
--main-color:#FEC400;
|
--main-color:#FEC400;
|
||||||
--main-hover-color:#fcce39;
|
--main-hover-color:#fcce39;
|
||||||
color:var(--main-font-color);
|
color:var(--main-font-color);
|
||||||
background-color:var(--main-bgclolor);
|
background-color:var(--main-bgclolor);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
min-height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
button{
|
button{
|
||||||
@ -34,30 +35,40 @@ button:not([size=mini]) .icon{
|
|||||||
|
|
||||||
button[type=primary]{
|
button[type=primary]{
|
||||||
background-color:var(--main-color);
|
background-color:var(--main-color);
|
||||||
color:#222222;
|
color:var(--main-font-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button[type=primary]:not([disabled]).button-hover{
|
||||||
|
background-color: var(--main-hover-color);
|
||||||
|
color:var(--main-font-color);
|
||||||
|
}
|
||||||
|
|
||||||
button[plain]{
|
button[plain]{
|
||||||
border: 1rpx solid rgba(255, 195, 0, 0.5);
|
border: 1rpx solid rgba(255, 195, 0, 0.5);
|
||||||
color: #FFC300;
|
color: #FFC300;
|
||||||
}
|
}
|
||||||
button:not([plain])[type=primary]:hover{
|
/* button:not([plain])[type=primary]:hover{
|
||||||
background-color:var(--main-hover-color);
|
background-color:var(--main-hover-color);
|
||||||
}
|
color:var(--main-font-color);
|
||||||
|
} */
|
||||||
button[type=default]{
|
button[type=default]{
|
||||||
color: #333333;
|
color:var(--main-font-color);
|
||||||
font-size:32rpx;
|
font-size:32rpx;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
button[type=default].button-hover{
|
||||||
|
color:#666;
|
||||||
|
}
|
||||||
|
|
||||||
button[type=primary][plain]{
|
button[type=primary][plain]{
|
||||||
border-color: var(--main-color);
|
border-color: var(--main-color);
|
||||||
color:var(--main-color);
|
color:var(--main-color);
|
||||||
padding:28rpx 25rpx;
|
padding:28rpx 25rpx;
|
||||||
}
|
}
|
||||||
button[type=primary][plain]:hover{
|
/* button[type=primary][plain]:hover{
|
||||||
border-color:var(--main-color);
|
border-color:var(--main-color);
|
||||||
color:var(--main-color);
|
color:var(--main-color);
|
||||||
}
|
} */
|
||||||
button[loading][type=primary] {
|
button[loading][type=primary] {
|
||||||
background-color:var(--main-color);
|
background-color:var(--main-color);
|
||||||
color: hsla(0,0%,100%,.6);
|
color: hsla(0,0%,100%,.6);
|
||||||
@ -84,8 +95,8 @@ radio-group label+label{
|
|||||||
}
|
}
|
||||||
|
|
||||||
radio{
|
radio{
|
||||||
width: 34rpx;
|
width: 17px;
|
||||||
height: 34rpx;
|
height: 17px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
radio .wx-radio-input{
|
radio .wx-radio-input{
|
||||||
@ -94,7 +105,6 @@ radio .wx-radio-input{
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
line-height: 20px;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;left:0;
|
top: 0;left:0;
|
||||||
}
|
}
|
||||||
@ -102,16 +112,16 @@ radio .wx-radio-input.wx-radio-input-checked{
|
|||||||
background-color:transparent;
|
background-color:transparent;
|
||||||
border-color: var(--main-color);
|
border-color: var(--main-color);
|
||||||
}
|
}
|
||||||
radio .wx-radio-input.wx-radio-input-checked::before{
|
radio .wx-radio-input.wx-radio-input-checked::after{
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 22rpx;
|
width: 11px;
|
||||||
height:22rpx;
|
height:11px;
|
||||||
left:4rpx;top:4rpx;
|
left:2px;top:2px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: var(--main-color);
|
background: var(--main-color);
|
||||||
transform: none;
|
transform: none;
|
||||||
-webkit-transform:none
|
-webkit-transform:none;
|
||||||
}
|
}
|
||||||
checkbox .wx-checkbox-input{
|
checkbox .wx-checkbox-input{
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
@ -132,7 +142,7 @@ page-container .content{
|
|||||||
padding:30rpx;
|
padding:30rpx;
|
||||||
margin:20rpx;
|
margin:20rpx;
|
||||||
}
|
}
|
||||||
.page-container.shadow{
|
.page-container.shadow,.cells.shadow{
|
||||||
box-shadow: 0px 6px 6px 1px rgba(0, 0, 0, 0.05);
|
box-shadow: 0px 6px 6px 1px rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,10 +163,10 @@ page-container .content{
|
|||||||
border-color:#FFC300;
|
border-color:#FFC300;
|
||||||
}
|
}
|
||||||
.spliter{
|
.spliter{
|
||||||
border-bottom: 1px solid rgba(153, 153, 153, 0.2);
|
border-bottom: 1rpx solid rgba(153, 153, 153, 0.2);
|
||||||
}
|
}
|
||||||
.spliter.dashed{
|
.spliter.dashed{
|
||||||
border-bottom: 1px dashed rgba(153, 153, 153, 0.2);
|
border-bottom: 1rpx dashed rgba(153, 153, 153, 0.2);
|
||||||
}
|
}
|
||||||
.money,.money-promation,.money-normal,.money-disable{
|
.money,.money-promation,.money-normal,.money-disable{
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
@ -192,12 +202,14 @@ page-container .content{
|
|||||||
}
|
}
|
||||||
|
|
||||||
.bottom-bar{
|
.bottom-bar{
|
||||||
border-radius: 24rpx 24rpx 0 0;
|
padding:24rpx;
|
||||||
padding:34rpx 40rpx;
|
|
||||||
position:fixed;
|
position:fixed;
|
||||||
bottom:0;
|
bottom:0;
|
||||||
left:0;right:0;
|
left:0;right:0;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
border-top: 0.5px solid rgba(153, 153, 153, 0.2);
|
||||||
|
padding-bottom:calc(constant(safe-area-inset-bottom) + 24rpx);
|
||||||
|
padding-bottom:calc(env(safe-area-inset-bottom) + 24rpx);
|
||||||
}
|
}
|
||||||
.custom-scroll-view{
|
.custom-scroll-view{
|
||||||
height:100vh;
|
height:100vh;
|
||||||
@ -209,10 +221,11 @@ page-container .content{
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
.bottom-bar-v2{
|
.bottom-bar-v2{
|
||||||
border-radius: 24rpx 24rpx 0 0;
|
padding:24rpx;
|
||||||
padding:34rpx 40rpx;
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
text-align: right;
|
border-top: 0.5px solid rgba(153, 153, 153, 0.2);
|
||||||
|
padding-bottom:calc(constant(safe-area-inset-bottom) + 24rpx);
|
||||||
|
padding-bottom:calc(env(safe-area-inset-bottom) + 24rpx);
|
||||||
}
|
}
|
||||||
|
|
||||||
.cells{
|
.cells{
|
||||||
@ -225,7 +238,6 @@ page-container .content{
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding:0 40rpx;
|
padding:0 40rpx;
|
||||||
min-height: 116rpx;
|
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
@ -234,30 +246,50 @@ page-container .content{
|
|||||||
}
|
}
|
||||||
.cells .cell::after{
|
.cells .cell::after{
|
||||||
content: '';
|
content: '';
|
||||||
border-bottom: 1rpx solid rgba(153, 153, 153, 0.2);
|
border-bottom: 1.2rpx solid rgba(153, 153, 153, 0.1);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom:0;
|
bottom:0;
|
||||||
left:40rpx;
|
left:40rpx;
|
||||||
right:40rpx;
|
right:40rpx;
|
||||||
}
|
}
|
||||||
.cells .cell:last-child::after{
|
.cells .cell:last-child::after,.cells .cell.no-border::after{
|
||||||
border:0;
|
border:0;
|
||||||
}
|
}
|
||||||
.cells .cell-hd{
|
.cells .cell-hd{
|
||||||
margin-right:20rpx;
|
margin-right:20rpx;
|
||||||
}
|
}
|
||||||
|
.cells .cell-hd.not-empty::before{
|
||||||
|
content: '*';
|
||||||
|
color: #EB0000
|
||||||
|
}
|
||||||
.cells .cell-hd .icon{
|
.cells .cell-hd .icon{
|
||||||
width:40rpx;height:40rpx;
|
width:40rpx;height:40rpx;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
.cells .cell-bd{
|
.cells .cell-bd{
|
||||||
flex:1;
|
flex:1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
position:relative;
|
||||||
|
min-height: 116rpx;
|
||||||
}
|
}
|
||||||
.cells .cell-ft{
|
.cells .cell-bd .error{
|
||||||
|
color:red;
|
||||||
|
position: absolute;
|
||||||
|
left:0;bottom:10rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
.cells .cell-bd input{
|
||||||
|
height:100rpx;
|
||||||
|
}
|
||||||
|
.cells .cell-ft,.right-arrow{
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-right:40rpx;
|
color:#999;
|
||||||
}
|
}
|
||||||
.cells .cell-ft::after{
|
.cells.cells-access .cell-ft,.right-arrow{
|
||||||
|
padding-right: 40rpx;
|
||||||
|
}
|
||||||
|
.cells.cells-access .cell-ft::after,.cells .cell.cell-access .cell-ft::after,.right-arrow::after{
|
||||||
content:" ";
|
content:" ";
|
||||||
width:24rpx;height:48rpx;
|
width:24rpx;height:48rpx;
|
||||||
-webkit-mask-position:0 0;
|
-webkit-mask-position:0 0;
|
||||||
@ -333,4 +365,10 @@ navigator button{
|
|||||||
}
|
}
|
||||||
.page-dispatch{
|
.page-dispatch{
|
||||||
height:40rpx;
|
height:40rpx;
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navigator-hover{
|
||||||
|
background-color: transparent;
|
||||||
|
opacity: 1;
|
||||||
}
|
}
|
||||||
BIN
assets/icon/help/arrow-down.png
Normal file
|
After Width: | Height: | Size: 214 B |
|
Before Width: | Height: | Size: 182 B |
BIN
assets/icon/help/delete.png
Normal file
|
After Width: | Height: | Size: 725 B |
|
Before Width: | Height: | Size: 576 B |
BIN
assets/icon/help/house.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 858 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 981 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.1 KiB |
BIN
assets/icon/help/images.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/icon/help/plus.png
Normal file
|
After Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 434 B |
BIN
assets/icon/my/avatar.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
assets/icon/my/friend-empty.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
assets/icon/my/login-bg.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
BIN
assets/icon/tabs/tab1-active.png
Normal file
|
After Width: | Height: | Size: 900 B |
|
Before Width: | Height: | Size: 944 B |
BIN
assets/icon/tabs/tab1.png
Normal file
|
After Width: | Height: | Size: 644 B |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 906 B After Width: | Height: | Size: 906 B |
|
Before Width: | Height: | Size: 565 B |
|
Before Width: | Height: | Size: 909 B After Width: | Height: | Size: 909 B |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1019 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
@ -1,148 +0,0 @@
|
|||||||
import commonApi from '../../api/common';
|
|
||||||
const app = getApp();
|
|
||||||
|
|
||||||
Component({
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 组件的属性列表
|
|
||||||
*/
|
|
||||||
properties: {
|
|
||||||
saveText:{
|
|
||||||
type:String,
|
|
||||||
value:"保存"
|
|
||||||
},
|
|
||||||
deleteText:{
|
|
||||||
type:String,
|
|
||||||
value:''
|
|
||||||
},
|
|
||||||
communityId:{
|
|
||||||
type:Number,
|
|
||||||
value:null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 组件的初始数据
|
|
||||||
*/
|
|
||||||
data: {
|
|
||||||
buildingList:[],
|
|
||||||
buildingIndex:0,
|
|
||||||
communityList:[],
|
|
||||||
communityIndex:0,
|
|
||||||
|
|
||||||
currentEditAddress:{},
|
|
||||||
name:'',
|
|
||||||
gender:'',
|
|
||||||
phone:'',
|
|
||||||
community_building_id:'',
|
|
||||||
address_detail:''
|
|
||||||
},
|
|
||||||
lifetimes:{
|
|
||||||
attached(){
|
|
||||||
if(app.globalData.tempAddress){
|
|
||||||
this.setData({
|
|
||||||
currentEditAddress:app.globalData.tempAddress,
|
|
||||||
name:app.globalData.tempAddress.name,
|
|
||||||
gender:app.globalData.tempAddress.gender,
|
|
||||||
phone:app.globalData.tempAddress.phone,
|
|
||||||
community_building_id:app.globalData.tempAddress.community_building_id,
|
|
||||||
address_detail:app.globalData.tempAddress.address_detail
|
|
||||||
})
|
|
||||||
}
|
|
||||||
commonApi.community.list().then((data)=>{
|
|
||||||
let communityIndex;
|
|
||||||
this.setData({
|
|
||||||
communityList:data.items
|
|
||||||
});
|
|
||||||
data.items.map((item,index)=>{
|
|
||||||
if(item.id==this.data.currentEditAddress.id){
|
|
||||||
communityIndex = index;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
//没有找到 id 就是新增,就去找默认的社区进行填充
|
|
||||||
if(communityIndex){
|
|
||||||
this.getBuildingList();
|
|
||||||
}else{
|
|
||||||
for(let [index,item] of data.items.entries()){
|
|
||||||
if(item.id==this.properties.communityId){
|
|
||||||
this.setData({
|
|
||||||
communityIndex:index
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.getBuildingList();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// console.log(app.globalData.tempAddress);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 组件的方法列表
|
|
||||||
*/
|
|
||||||
methods: {
|
|
||||||
save(){
|
|
||||||
|
|
||||||
|
|
||||||
this.triggerEvent('save');
|
|
||||||
let data = {
|
|
||||||
community_id:this.data.communityList[this.data.communityIndex].id,
|
|
||||||
community_building_id:this.data.buildingList[this.data.buildingIndex].id,
|
|
||||||
address_detail:this.data.address_detail,
|
|
||||||
name:this.data.name,
|
|
||||||
gender:this.data.gender,
|
|
||||||
phone:this.data.phone
|
|
||||||
}
|
|
||||||
console.log(data);
|
|
||||||
if(this.data.currentEditAddress&&this.data.currentEditAddress.id){
|
|
||||||
//编辑
|
|
||||||
data.id = this.data.currentEditAddress.id;
|
|
||||||
commonApi.address.update(data);
|
|
||||||
}else{
|
|
||||||
//新增
|
|
||||||
data.is_default = true;
|
|
||||||
commonApi.address.add(data).then((data)=>{
|
|
||||||
const pages = getCurrentPages();
|
|
||||||
const prePage = pages[pages.length-2];
|
|
||||||
prePage.changeAddress(data);
|
|
||||||
wx.navigateBack({
|
|
||||||
success(){
|
|
||||||
wx.showToast({
|
|
||||||
title: '新增成功',
|
|
||||||
icon:'success'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getBuildingList(){
|
|
||||||
const current = this.data.communityList[this.data.communityIndex];
|
|
||||||
commonApi.building.list(current.id).then((data)=>{
|
|
||||||
let buildingIndex = 0;
|
|
||||||
data.items.map((item,index)=>{
|
|
||||||
item.displayText = `${item.community_name} ${item.building_name}`;
|
|
||||||
if(item.id==this.data.currentEditAddress.id){
|
|
||||||
buildingIndex = index;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.setData({
|
|
||||||
buildingList:data.items,
|
|
||||||
buildingIndex
|
|
||||||
})
|
|
||||||
});
|
|
||||||
},
|
|
||||||
del(){
|
|
||||||
this.triggerEvent('delete')
|
|
||||||
},
|
|
||||||
chooseCommonity(event){
|
|
||||||
this.setData({
|
|
||||||
communityIndex:event.detail.value
|
|
||||||
})
|
|
||||||
},
|
|
||||||
buildingChange(event){
|
|
||||||
const buildingIndex = event.detail.value;
|
|
||||||
this.setData({buildingIndex});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"component": true,
|
|
||||||
"usingComponents": {},
|
|
||||||
"styleIsolation": "shared"
|
|
||||||
}
|
|
||||||
@ -1,43 +0,0 @@
|
|||||||
<view class="page-container shadow editor">
|
|
||||||
<picker range="{{communityList}}" range-key="name" value="{{communityIndex}}" bindchange="chooseCommonity">
|
|
||||||
<view class="item">
|
|
||||||
<label class="key">绑定小区</label>
|
|
||||||
<label class="value">
|
|
||||||
{{communityList&&communityList.length>0?communityList[communityIndex].name:''}}
|
|
||||||
</label>
|
|
||||||
</view>
|
|
||||||
</picker>
|
|
||||||
<view class="item">
|
|
||||||
<label class="key">用户姓名</label>
|
|
||||||
<input class="value" placeholder="请输入用户名" model:value="{{name}}"/>
|
|
||||||
<radio-group class="radio-group" model:value="{{gender}}">
|
|
||||||
<label>
|
|
||||||
<radio value="MALE" class="radio" checked></radio>
|
|
||||||
<label>先生</label>
|
|
||||||
</label>
|
|
||||||
<label>
|
|
||||||
<radio value="FEMALE" class="radio"></radio>
|
|
||||||
<label>女士</label>
|
|
||||||
</label>
|
|
||||||
</radio-group>
|
|
||||||
</view>
|
|
||||||
<view class="item">
|
|
||||||
<label class="key">手机号码</label>
|
|
||||||
<input class="value" placeholder="请输入手机号码" model:value="{{phone}}"/>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<picker range="{{buildingList}}" range-key="displayText" bindchange="buildingChange"
|
|
||||||
value="{{buildingIndex}}">
|
|
||||||
<view class="item">
|
|
||||||
<label class="key">选择楼栋</label>
|
|
||||||
<input class="value" placeholder="请选择" disabled value="{{buildingList[buildingIndex].displayText}}" />
|
|
||||||
<image class="right-icon" src="/assets/icon/help/arrow-right@2x.png"/>
|
|
||||||
</view>
|
|
||||||
</picker>
|
|
||||||
<view class="item no-border">
|
|
||||||
<label class="key">详细地址</label>
|
|
||||||
<input class="value" placeholder="例:1 单元1301" model:value="{{address_detail}}"/>
|
|
||||||
</view>
|
|
||||||
<button type="primary" bind:tap="save">{{saveText}}</button>
|
|
||||||
<button wx:if="{{deleteText}}" type="primary" plain bind:tap="del">{{deleteText}}</button>
|
|
||||||
</view>
|
|
||||||
@ -1,42 +0,0 @@
|
|||||||
.page-container.editor{
|
|
||||||
padding-top:0;
|
|
||||||
font-size: 30rpx;
|
|
||||||
}
|
|
||||||
.editor .item{
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
border-bottom: 1rpx solid rgba(153, 153, 153, 0.2);
|
|
||||||
min-height: 130rpx;
|
|
||||||
}
|
|
||||||
.editor .item.no-border{
|
|
||||||
border:none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor .item .key{
|
|
||||||
}
|
|
||||||
.editor .item .key::before{
|
|
||||||
content: '*';
|
|
||||||
color: #EB0000;
|
|
||||||
}
|
|
||||||
.editor .item label.value{
|
|
||||||
line-height: 1.5;
|
|
||||||
height: auto;
|
|
||||||
align-self: center;
|
|
||||||
}
|
|
||||||
.editor .item .value{
|
|
||||||
flex:1;
|
|
||||||
margin-left: 30rpx;
|
|
||||||
height: 100%;
|
|
||||||
padding:15rpx 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
.editor .item .right-icon{
|
|
||||||
width:34rpx;height:34rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor .radio-group{
|
|
||||||
font-size: 24rpx;
|
|
||||||
}
|
|
||||||
.editor button+button{
|
|
||||||
margin-top:30rpx;
|
|
||||||
}
|
|
||||||
@ -12,9 +12,7 @@ Component({
|
|||||||
type:Boolean,
|
type:Boolean,
|
||||||
value:false
|
value:false
|
||||||
},
|
},
|
||||||
"height":{
|
height:0,
|
||||||
type:Number
|
|
||||||
},
|
|
||||||
loadMoreText:{
|
loadMoreText:{
|
||||||
type:String,
|
type:String,
|
||||||
value:'已经到底了'
|
value:'已经到底了'
|
||||||
@ -26,6 +24,10 @@ Component({
|
|||||||
loadAll:{
|
loadAll:{
|
||||||
type:Boolean,
|
type:Boolean,
|
||||||
value:false
|
value:false
|
||||||
|
},
|
||||||
|
class:{
|
||||||
|
type:String,
|
||||||
|
value:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -33,14 +35,15 @@ Component({
|
|||||||
* 组件的初始数据
|
* 组件的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
defaultHeight:''
|
heightStyle:'',
|
||||||
|
scrollHeight:0
|
||||||
},
|
},
|
||||||
lifetimes:{
|
lifetimes:{
|
||||||
attached(){
|
attached(){
|
||||||
|
this.createSelectorQuery().select('#scrollView').boundingClientRect((res)=>{
|
||||||
|
this.data.scrollHeight = res.height;
|
||||||
|
}).exec();
|
||||||
const windowInfo = wx.getWindowInfo();
|
const windowInfo = wx.getWindowInfo();
|
||||||
this.setData({
|
|
||||||
defaultHeight:`calc(100vh)`
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -52,10 +55,25 @@ Component({
|
|||||||
},
|
},
|
||||||
scrolling(event){
|
scrolling(event){
|
||||||
//scrollTop scrollHeight
|
//scrollTop scrollHeight
|
||||||
const bottomHeight = event.detail.scrollHeight-event.detail.scrollTop-this.properties.height;
|
const bottomHeight = event.detail.scrollHeight-event.detail.scrollTop-this.data.scrollHeight;
|
||||||
if(bottomHeight<100){
|
if(bottomHeight<100){
|
||||||
this.triggerEvent('loadMore');
|
this.triggerEvent('loadMore');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
observers:{
|
||||||
|
height(h){
|
||||||
|
let heightStyle = '';
|
||||||
|
if(h){
|
||||||
|
if(typeof h == 'string'){
|
||||||
|
heightStyle = `height:${h}`
|
||||||
|
}else{
|
||||||
|
heightStyle = `height:${this.properties.height*2}rpx`
|
||||||
|
}
|
||||||
|
this.setData({
|
||||||
|
heightStyle:heightStyle
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
"component": true,
|
"component": true,
|
||||||
"usingComponents": {}
|
"usingComponents": {},
|
||||||
|
"styleIsolation": "apply-shared"
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
<scroll-view scroll-y refresher-enabled="true" bindrefresherrefresh="refreshList" refresher-triggered="{{refresherTriggered}}" style="height:{{height*2}}rpx;" bindscroll="scrolling">
|
<scroll-view scroll-y refresher-enabled bindrefresherrefresh="refreshList" refresher-triggered="{{refresherTriggered}}" style="{{heightStyle}}" bindscroll="scrolling" class="scroll-view" id="scrollView">
|
||||||
<slot/>
|
<slot/>
|
||||||
<view class="load-more" wx:if="{{showLoadMore}}">
|
<view class="load-more" wx:if="{{showLoadMore}}">
|
||||||
<label class="text" wx:if="{{loadAll}}">{{loadMoreText}}</label>
|
<label class="text" wx:if="{{loadAll}}">{{loadMoreText}}</label>
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
|
.scroll-view{
|
||||||
|
height:100%;
|
||||||
|
}
|
||||||
.load-more{
|
.load-more{
|
||||||
padding:100rpx 0;
|
padding:56rpx 0 80rpx 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #888888;
|
color: #888888;
|
||||||
font-size:24rpx;
|
font-size:24rpx;
|
||||||
@ -14,8 +17,8 @@
|
|||||||
.load-more::before{
|
.load-more::before{
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left:0;top:112rpx;
|
left:0;top:68rpx;
|
||||||
width:100%;height:1.5rpx;
|
width:100%;height:1rpx;
|
||||||
background-color: rgba(136, 136, 136, 0.25);
|
background-color: rgba(136, 136, 136, 0.25);
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
}
|
}
|
||||||
@ -49,5 +49,8 @@ Component({
|
|||||||
},
|
},
|
||||||
share(){
|
share(){
|
||||||
},
|
},
|
||||||
|
getHeight(){
|
||||||
|
return this.data.statusBarHeight + this.data.navBarHeight;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -1,5 +1,5 @@
|
|||||||
import commonApi from '../../../../api/common';
|
import commonApi from '../../../../api/common';
|
||||||
|
const app = getApp();
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
@ -21,6 +21,12 @@ Page({
|
|||||||
community_building_id:'',
|
community_building_id:'',
|
||||||
address_detail:''
|
address_detail:''
|
||||||
},
|
},
|
||||||
|
validator:{
|
||||||
|
name:{required:true,message:'请输入姓名',shake:true,autoFocus:true},
|
||||||
|
phone:{type:'phone',message:'请输入正确的手机号',shake:true,autoFocus:true},
|
||||||
|
buildingIndex:{required:true,message:'请选择楼栋',shake:true,autoFocus:true},
|
||||||
|
address_detail:{required:true,message:'请输入详细地址',shake:true,autoFocus:true}
|
||||||
|
},
|
||||||
deleteAddress(){
|
deleteAddress(){
|
||||||
wx.showModal({
|
wx.showModal({
|
||||||
title: '确定删除此地址吗',
|
title: '确定删除此地址吗',
|
||||||
@ -80,6 +86,11 @@ Page({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
save(){
|
save(){
|
||||||
|
const valid = app.validateForm(this.validator,this);
|
||||||
|
console.log(valid);
|
||||||
|
if(valid.length!=0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
let data = {
|
let data = {
|
||||||
community_id:this.data.communityId,
|
community_id:this.data.communityId,
|
||||||
community_building_id:this.data.buildingList[this.data.buildingIndex].id,
|
community_building_id:this.data.buildingList[this.data.buildingIndex].id,
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"address-editor":"/components/address"
|
|
||||||
},
|
},
|
||||||
"navigationBarTitleText": "编辑地址"
|
"navigationBarTitleText": "编辑地址"
|
||||||
}
|
}
|
||||||
@ -1,45 +1,64 @@
|
|||||||
<view class="page-container shadow editor">
|
<view class="cells shadow editor">
|
||||||
<!-- <picker range="{{communityList}}" range-key="name" value="{{communityIndex}}" bindchange="chooseCommonity"> -->
|
<view class="cell">
|
||||||
<view class="item">
|
<view class="cell-hd not-empty">绑定小区</view>
|
||||||
<label class="key">绑定小区</label>
|
<view class="cell-bd">
|
||||||
<label class="value">
|
|
||||||
{{communityName}}
|
{{communityName}}
|
||||||
</label>
|
|
||||||
</view>
|
</view>
|
||||||
<!-- </picker> -->
|
|
||||||
<view class="item">
|
|
||||||
<label class="key">用户姓名</label>
|
|
||||||
<view class="value">
|
|
||||||
<input class="input" placeholder="请输入用户名" model:value="{{name}}"/>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="cell">
|
||||||
|
<view class="cell-hd not-empty">用户姓名</view>
|
||||||
|
<view class="cell-bd">
|
||||||
|
<input class="input" placeholder="请输入用户名" model:value="{{name}}"
|
||||||
|
animation="{{nameAnimation}}" focus="{{nameFocus}}"/>
|
||||||
|
<view class="error">{{nameMessage}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="cell-ft">
|
||||||
<radio-group class="radio-group" model:value="{{gender}}">
|
<radio-group class="radio-group" model:value="{{gender}}">
|
||||||
<label>
|
<label class="item">
|
||||||
<radio value="MALE" class="radio" checked="{{gender=='MALE'}}"></radio>
|
<radio value="MALE" class="radio" checked="{{gender=='MALE'}}"></radio>
|
||||||
<label>先生</label>
|
<label>先生</label>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label class="item">
|
||||||
<radio value="FEMALE" class="radio" checked="{{gender=='FEMALE'}}"></radio>
|
<radio value="FEMALE" class="radio" checked="{{gender=='FEMALE'}}"></radio>
|
||||||
<label>女士</label>
|
<label>女士</label>
|
||||||
</label>
|
</label>
|
||||||
</radio-group>
|
</radio-group>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
|
||||||
<label class="key">手机号码</label>
|
|
||||||
<input class="value" placeholder="请输入手机号码" model:value="{{phone}}"/>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<picker range="{{buildingList}}" range-key="building_name" bindchange="buildingChange"
|
|
||||||
model:value="{{buildingIndex}}">
|
<view class="cell">
|
||||||
<view class="item">
|
<view class="cell-hd not-empty">手机号码</view>
|
||||||
<label class="key">选择楼栋</label>
|
<view class="cell-bd">
|
||||||
<input class="value" placeholder="请选择" disabled value="{{buildingList[buildingIndex].building_name}}" />
|
<input class="value" placeholder="请输入手机号码" model:value="{{phone}}"
|
||||||
<image class="right-icon" src="/assets/icon/help/arrow-right@2x.png"/>
|
animation="{{phoneAnimation}}" focus="{{phoneFocus}}"/>
|
||||||
|
<view class="error">{{phoneMessage}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="cell cell-access">
|
||||||
|
<view class="cell-hd not-empty">选择楼栋</view>
|
||||||
|
<picker class="cell-bd picker" range="{{buildingList}}" range-key="building_name" bindchange="buildingChange" model:value="{{buildingIndex}}">
|
||||||
|
<input class="value" placeholder="请选择" disabled value="{{buildingList[buildingIndex].building_name}}" animation="{{buildingIndexAnimation}}" focus="{{buildingIndexFocus}}"/>
|
||||||
|
<view class="error">{{buildingIndexMessage}}</view>
|
||||||
</picker>
|
</picker>
|
||||||
<view class="item no-border">
|
<view class="cell-ft"></view>
|
||||||
<label class="key">详细地址</label>
|
|
||||||
<input class="value" placeholder="例:1 单元1301" model:value="{{address_detail}}"/>
|
|
||||||
</view>
|
</view>
|
||||||
<button type="primary" bind:tap="save">{{editType=='add'?'保存并使用':'保存'}}</button>
|
|
||||||
<button wx:if="{{editType=='edit'}}" type="primary" plain bind:tap="deleteAddress">删除</button>
|
<view class="cell no-border">
|
||||||
|
<view class="cell-hd not-empty">详细地址</view>
|
||||||
|
<view class="cell-bd">
|
||||||
|
<input class="value" placeholder="例:1 单元1301" model:value="{{address_detail}}"
|
||||||
|
animation="{{address_detailAnimation}}" focus="{{address_detailFocus}}"/>
|
||||||
|
<view class="error">{{address_detailMessage}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<button class="button" type="primary" bind:tap="save">
|
||||||
|
{{editType=='add'?'保存并使用':'保存'}}
|
||||||
|
</button>
|
||||||
|
<button wx:if="{{editType=='edit'}}" type="primary" plain bind:tap="deleteAddress"
|
||||||
|
class="button">删除</button>
|
||||||
</view>
|
</view>
|
||||||
@ -2,43 +2,19 @@
|
|||||||
padding-top:0;
|
padding-top:0;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
.editor .item{
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
border-bottom: 1rpx solid rgba(153, 153, 153, 0.2);
|
|
||||||
min-height: 130rpx;
|
|
||||||
}
|
|
||||||
.editor .item.no-border{
|
|
||||||
border:none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor .item .key{
|
|
||||||
}
|
|
||||||
.editor .item .key::before{
|
|
||||||
content: '*';
|
|
||||||
color: #EB0000;
|
|
||||||
}
|
|
||||||
.editor .item label.value{
|
|
||||||
line-height: 1.5;
|
|
||||||
height: auto;
|
|
||||||
align-self: center;
|
|
||||||
}
|
|
||||||
.editor .item .value{
|
|
||||||
flex:1;
|
|
||||||
margin-left: 30rpx;
|
|
||||||
height: 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
.editor .item .value .input{
|
|
||||||
padding:15rpx 0;
|
|
||||||
}
|
|
||||||
.editor .item .right-icon{
|
|
||||||
width:34rpx;height:34rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor .radio-group{
|
.editor .radio-group{
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
.editor button+button{
|
.radio-group{
|
||||||
margin-top:30rpx;
|
color:var(--main-font-color);
|
||||||
|
}
|
||||||
|
.radio-group .item{
|
||||||
|
padding:20rpx 0;
|
||||||
|
}
|
||||||
|
.button{
|
||||||
|
margin:30rpx!important;
|
||||||
|
}
|
||||||
|
.picker input{
|
||||||
|
width:100%;
|
||||||
|
flex: 1;
|
||||||
}
|
}
|
||||||
@ -10,7 +10,8 @@ Page({
|
|||||||
addressList:[],
|
addressList:[],
|
||||||
communityId:null,
|
communityId:null,
|
||||||
communityName:'',
|
communityName:'',
|
||||||
genderKV:userApi.genderKV
|
genderKV:userApi.genderKV,
|
||||||
|
loading:true
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -34,9 +35,12 @@ Page({
|
|||||||
* 生命周期函数--监听页面显示
|
* 生命周期函数--监听页面显示
|
||||||
*/
|
*/
|
||||||
onShow() {
|
onShow() {
|
||||||
|
wx.showNavigationBarLoading();
|
||||||
commonApi.address.list(this.data.communityId).then((data)=>{
|
commonApi.address.list(this.data.communityId).then((data)=>{
|
||||||
|
wx.hideNavigationBarLoading();
|
||||||
this.setData({
|
this.setData({
|
||||||
addressList:data
|
addressList:data,
|
||||||
|
loading:false
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"address-editor":"/components/address"
|
|
||||||
},
|
},
|
||||||
"navigationBarTitleText": "收件人信息"
|
"navigationBarTitleText": "收件人信息"
|
||||||
}
|
}
|
||||||
@ -1,8 +1,6 @@
|
|||||||
<!-- <address-editor saveText="保存并使用" communityId="{{communityId}}"/> -->
|
|
||||||
|
|
||||||
<view class="page-container address-list">
|
<view class="page-container address-list">
|
||||||
<view class="head">常用地址</view>
|
<view class="head">常用地址</view>
|
||||||
<block wx:if="{{addressList.length>0}}">
|
<block>
|
||||||
<view class="item" wx:for="{{addressList}}" data-item="{{item}}" wx:key="index" bind:tap="setCurrentAddress">
|
<view class="item" wx:for="{{addressList}}" data-item="{{item}}" wx:key="index" bind:tap="setCurrentAddress">
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<view class="title">{{item.community_name}} {{item.community_building_name}} {{item.address_detail}}</view>
|
<view class="title">{{item.community_name}} {{item.community_building_name}} {{item.address_detail}}</view>
|
||||||
@ -12,7 +10,8 @@
|
|||||||
capture-catch:tap="goToAddressEditor" data-item="{{item}}"/>
|
capture-catch:tap="goToAddressEditor" data-item="{{item}}"/>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<view class="list-empty" wx:else>
|
<view wx:if="{{loading}}" class="loading">加载中...</view>
|
||||||
|
<view class="list-empty" wx:if="{{addressList.length==0&&!loading}}">
|
||||||
<view class="title">该小区暂无常用地址</view>
|
<view class="title">该小区暂无常用地址</view>
|
||||||
<view class="sub-title">使用过的地址会在这里显示</view>
|
<view class="sub-title">使用过的地址会在这里显示</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -36,3 +36,8 @@
|
|||||||
.add-button{
|
.add-button{
|
||||||
margin: 40rpx 20rpx!important;
|
margin: 40rpx 20rpx!important;
|
||||||
}
|
}
|
||||||
|
.loading{
|
||||||
|
padding:50rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
@ -61,7 +61,8 @@ Page({
|
|||||||
});
|
});
|
||||||
const data = {
|
const data = {
|
||||||
skip:this.data.pager.limit*this.data.pager.pageIndex,
|
skip:this.data.pager.limit*this.data.pager.pageIndex,
|
||||||
limit:this.data.pager.limit
|
limit:this.data.pager.limit,
|
||||||
|
status:'OPENING'
|
||||||
}
|
}
|
||||||
if(this.data.lng&&this.data.lat){
|
if(this.data.lng&&this.data.lat){
|
||||||
data.longitude = this.data.lng;
|
data.longitude = this.data.lng;
|
||||||
|
|||||||
@ -1,12 +1,11 @@
|
|||||||
<list-view class="community-list" bind:refresh="refreshList"
|
<list-view class="community-list" bind:refresh="refreshList"
|
||||||
bind:loadMore="loadList" height="{{scrollViewHeight}}"
|
bind:loadMore="loadList" refresher-triggered="{{pager.refreshTrigger}}"
|
||||||
refresher-triggered="{{pager.refreshTrigger}}"
|
show-load-more="{{!(communityList.length==0&&pager.loadAll)}}"
|
||||||
show-load-more="{{communityList.length!=0}}"
|
|
||||||
loading="{{pager.loading}}" load-all="{{pager.loadAll}}">
|
loading="{{pager.loading}}" load-all="{{pager.loadAll}}">
|
||||||
<view class="item {{item.id==currentCommunity.id?'current':''}}" wx:for="{{communityList}}" wx:key="index"
|
<view class="item {{item.id==currentCommunity.id?'current':''}}" wx:for="{{communityList}}" wx:key="index"
|
||||||
bind:tap="onSelectItem" data-item="{{item}}">
|
bind:tap="onSelectItem" data-item="{{item}}">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<image class="icon" src="/assets/icon/help/house@2x.png"/>
|
<image class="icon" src="/assets/icon/help/house.png"/>
|
||||||
<label class="label">{{item.name}}</label>
|
<label class="label">{{item.name}}</label>
|
||||||
</view>
|
</view>
|
||||||
<view class="sub-title">
|
<view class="sub-title">
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
.community-list{}
|
.community-list{
|
||||||
|
position:absolute;
|
||||||
|
left:0;top:0;
|
||||||
|
width: 100%;
|
||||||
|
height:100vh;
|
||||||
|
}
|
||||||
.community-list .item{
|
.community-list .item{
|
||||||
border-radius: 18rpx;
|
border-radius: 18rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|||||||
@ -27,13 +27,18 @@ Page({
|
|||||||
preOrdering:false,
|
preOrdering:false,
|
||||||
ordering:false,
|
ordering:false,
|
||||||
|
|
||||||
genderKV:userApi.genderKV
|
genderKV:userApi.genderKV,
|
||||||
|
navBarHeight:0
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
let height = this.selectComponent("#navBar").getHeight();
|
||||||
|
this.setData({
|
||||||
|
navBarHeight:height
|
||||||
|
})
|
||||||
this.setData({
|
this.setData({
|
||||||
isLogin:!!app.globalData.accessToken
|
isLogin:!!app.globalData.accessToken
|
||||||
})
|
})
|
||||||
@ -130,6 +135,21 @@ Page({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
preOrder(event){
|
preOrder(event){
|
||||||
|
let msg = '';
|
||||||
|
if(!(this.data.currentCommunity&&this.data.currentCommunity.id)){
|
||||||
|
msg = '选择小区';
|
||||||
|
}
|
||||||
|
if(!(this.data.currentAddress&&this.data.currentAddress.id)){
|
||||||
|
msg = '选择送达地址';
|
||||||
|
}
|
||||||
|
if(msg){
|
||||||
|
wx.showToast({
|
||||||
|
title:msg,
|
||||||
|
duration:1000,
|
||||||
|
icon:'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(this.data.preOrdering)return;
|
if(this.data.preOrdering)return;
|
||||||
wx.getStorage({
|
wx.getStorage({
|
||||||
key:'pre-order',
|
key:'pre-order',
|
||||||
@ -143,12 +163,31 @@ Page({
|
|||||||
preOrdering:false,
|
preOrdering:false,
|
||||||
preOrder:data
|
preOrder:data
|
||||||
});
|
});
|
||||||
|
}).catch((data)=>{
|
||||||
|
if(data.code==400&&data.data&&data.data.orderid){
|
||||||
|
wx.showModal({
|
||||||
|
title: '你有订单未支付',
|
||||||
|
content: '',
|
||||||
|
confirmText:'去支付',
|
||||||
|
complete: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
wx.navigateTo({
|
||||||
|
url: `/pages/order/detail/index?id=${data.data.orderid}`,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.setData({
|
||||||
|
preOrdering:false
|
||||||
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
fail(){
|
fail(){
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
icon:'error',
|
icon:'none',
|
||||||
title: '请选择驿站'
|
duration:1000,
|
||||||
|
title: '选择取件驿站'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
<view>
|
<view>
|
||||||
<view class="bg"></view>
|
<view class="bg">
|
||||||
<nav-bar class="nav-bar">
|
<image class="image" src="/assets/icon/my/login-bg.png" style="top:{{navBarHeight}}px"/>
|
||||||
|
</view>
|
||||||
|
<nav-bar class="nav-bar" id="navBar">
|
||||||
<image class="logo" src="/assets/icon/navbar/lanfeng@2x.png"/>
|
<image class="logo" src="/assets/icon/navbar/lanfeng@2x.png"/>
|
||||||
</nav-bar>
|
</nav-bar>
|
||||||
<view class="choose-community" bind:tap="goToCommunity">
|
<view class="choose-community" bind:tap="goToCommunity">
|
||||||
@ -9,15 +11,17 @@
|
|||||||
currentCommunity.id?currentCommunity.name:'请选择小区'
|
currentCommunity.id?currentCommunity.name:'请选择小区'
|
||||||
}}
|
}}
|
||||||
</view>
|
</view>
|
||||||
<image class="arrow" src="/assets/icon/help/arrow-down@2x.png"/>
|
<image class="arrow" src="/assets/icon/help/arrow-down.png"/>
|
||||||
</view>
|
</view>
|
||||||
<view class="address-panel">
|
<view class="address-panel">
|
||||||
<view class="ap-item send" bind:tap="goToAddress">
|
<view class="ap-item send" bind:tap="goToAddress">
|
||||||
<image class="icon" src="/assets/icon/help/send@2x.png"/>
|
<view class="icon send">送</view>
|
||||||
|
<!-- <image class="icon" src="/assets/icon/help/send@2x.png"/> -->
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<block wx:if="{{currentAddress&¤tAddress.id}}">
|
<block wx:if="{{currentAddress&¤tAddress.id}}">
|
||||||
<view class="title {{currentAddress.community_name?'bold':''}}">
|
<view class="title {{currentAddress.community_name?'bold':''}}">
|
||||||
{{currentAddress.community_name}}
|
{{currentAddress.community_name}}
|
||||||
|
{{currentAddress.community_building_name}}
|
||||||
{{currentAddress.address_detail}}
|
{{currentAddress.address_detail}}
|
||||||
</view>
|
</view>
|
||||||
<view class="sub-title">
|
<view class="sub-title">
|
||||||
@ -32,13 +36,14 @@
|
|||||||
<image class="arrow" src="/assets/icon/help/arrow-right@2x.png"/>
|
<image class="arrow" src="/assets/icon/help/arrow-right@2x.png"/>
|
||||||
</view>
|
</view>
|
||||||
<view class="ap-item take" bind:tap="goToAddPackage">
|
<view class="ap-item take" bind:tap="goToAddPackage">
|
||||||
<image class="icon" src="/assets/icon/help/take@2x.png"/>
|
<!-- <image class="icon" src="/assets/icon/help/take@2x.png"/> -->
|
||||||
|
<view class="icon get">取</view>
|
||||||
<view class="text" wx:if="{{package.name}}">
|
<view class="text" wx:if="{{package.name}}">
|
||||||
<view class="title {{package.name?'bold':''}}">{{package.name}}</view>
|
<view class="title {{package.name?'bold':''}}">{{package.name}}</view>
|
||||||
<view class="sub-title">共计 {{package.count}} 个包裹</view>
|
<view class="sub-title">共计 {{package.count}} 个包裹</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="text" wx:else>
|
<view class="text" wx:else>
|
||||||
<view class="title">选择驿站</view>
|
<view class="title">选择取件驿站</view>
|
||||||
<view class="sub-title"></view>
|
<view class="sub-title"></view>
|
||||||
</view>
|
</view>
|
||||||
<image class="arrow" src="/assets/icon/help/arrow-right@2x.png"/>
|
<image class="arrow" src="/assets/icon/help/arrow-right@2x.png"/>
|
||||||
@ -54,7 +59,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<image class="icon" src="/assets/icon/help/icon3.png"/>
|
<image class="icon" src="/assets/icon/help/icon3.png"/>
|
||||||
<view class="text">蜂蜜抵扣</view>
|
<view class="text">安全保障</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -113,6 +118,6 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="tips">{{preOrder.price_detail_text}}</view>
|
<view class="tips">{{preOrder.price_detail_text}}</view>
|
||||||
|
|
||||||
<button class="button" type="primary" bind:tap="getOrder" loading="{{ordering}}">立即购买</button>
|
<button class="button" type="primary" bind:tap="getOrder" loading="{{ordering}}">确认下单</button>
|
||||||
</view>
|
</view>
|
||||||
</page-container>
|
</page-container>
|
||||||
@ -5,6 +5,14 @@
|
|||||||
position:absolute;
|
position:absolute;
|
||||||
z-index:-1;
|
z-index:-1;
|
||||||
}
|
}
|
||||||
|
.bg .image{
|
||||||
|
width: 396rpx;
|
||||||
|
height:140rpx;
|
||||||
|
position: absolute;
|
||||||
|
right:20rpx;
|
||||||
|
top:260rpx;
|
||||||
|
padding-top:90rpx;
|
||||||
|
}
|
||||||
.nav-bar .logo{
|
.nav-bar .logo{
|
||||||
width:168rpx;
|
width:168rpx;
|
||||||
height:42rpx;
|
height:42rpx;
|
||||||
@ -42,7 +50,19 @@
|
|||||||
}
|
}
|
||||||
.address-panel .ap-item .icon{
|
.address-panel .ap-item .icon{
|
||||||
width:40rpx;height:40rpx;
|
width:40rpx;height:40rpx;
|
||||||
margin-top:4rpx
|
margin-top:4rpx;
|
||||||
|
color:#fff;
|
||||||
|
border-radius: 50%;
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
.address-panel .ap-item .icon.send{
|
||||||
|
background-color: #000000;
|
||||||
|
}
|
||||||
|
.address-panel .ap-item .icon.get{
|
||||||
|
background-color: var(--main-color);
|
||||||
}
|
}
|
||||||
.address-panel .ap-item .text{
|
.address-panel .ap-item .text{
|
||||||
flex:1;
|
flex:1;
|
||||||
@ -56,7 +76,7 @@
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
.address-panel .ap-item .text .sub-title{
|
.address-panel .ap-item .text .sub-title{
|
||||||
color:#7C8695;
|
color: #999999;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
margin-top:22rpx;
|
margin-top:22rpx;
|
||||||
min-height: 28rpx;
|
min-height: 28rpx;
|
||||||
@ -82,7 +102,7 @@
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
.address-panel .bottom .text{
|
.address-panel .bottom .text{
|
||||||
color: #7C8695;
|
color: #999999;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
margin-left: 8rpx;
|
margin-left: 8rpx;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -114,7 +134,7 @@
|
|||||||
|
|
||||||
.promotion-panel .text .sub-title{
|
.promotion-panel .text .sub-title{
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #7C8695;
|
color: #999999;
|
||||||
margin-top:26rpx;
|
margin-top:26rpx;
|
||||||
}
|
}
|
||||||
.promotion-panel .button{
|
.promotion-panel .button{
|
||||||
|
|||||||
@ -13,18 +13,16 @@ Page({
|
|||||||
|
|
||||||
bottomBarButtonTap(){
|
bottomBarButtonTap(){
|
||||||
const data = [];
|
const data = [];
|
||||||
let hasPackage = false;
|
|
||||||
this.data.stationList.map((item)=>{
|
this.data.stationList.map((item)=>{
|
||||||
if(item.package.length>0&&item.package[0]!=''){
|
if(item.package.length>0&&item.package[0]!=''){
|
||||||
hasPackage = true;
|
|
||||||
}
|
|
||||||
data.push({
|
data.push({
|
||||||
station_id:item.id,
|
station_id:item.id,
|
||||||
station_name:item.name,
|
station_name:item.name,
|
||||||
pickup_codes:item.package.filter((item)=>item!='').join(',')
|
pickup_codes:item.package.filter((item)=>item!='').join(',')
|
||||||
});
|
});
|
||||||
|
}
|
||||||
})
|
})
|
||||||
if(hasPackage){
|
if(data.length>0){
|
||||||
wx.setStorage({
|
wx.setStorage({
|
||||||
key:'pre-order',
|
key:'pre-order',
|
||||||
data:{
|
data:{
|
||||||
@ -52,9 +50,13 @@ Page({
|
|||||||
if(!this.data.stationList[index].package){
|
if(!this.data.stationList[index].package){
|
||||||
this.data.stationList[index].package = [];
|
this.data.stationList[index].package = [];
|
||||||
}
|
}
|
||||||
|
let hasEmptyInput = this.data.stationList[index].package.find((item)=>item=='')==undefined;
|
||||||
|
if(hasEmptyInput){
|
||||||
this.data.stationList[index].package.push('');
|
this.data.stationList[index].package.push('');
|
||||||
|
}
|
||||||
|
this.data.stationList[index].focus = true;
|
||||||
this.setData({
|
this.setData({
|
||||||
stationList:this.data.stationList
|
[`stationList[${index}]`]:this.data.stationList[index]
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
deletePackage(event){
|
deletePackage(event){
|
||||||
@ -62,7 +64,7 @@ Page({
|
|||||||
const packageIndex = event.currentTarget.dataset.p_index;
|
const packageIndex = event.currentTarget.dataset.p_index;
|
||||||
this.data.stationList[itemIndex].package.splice(packageIndex,1);
|
this.data.stationList[itemIndex].package.splice(packageIndex,1);
|
||||||
this.setData({
|
this.setData({
|
||||||
stationList:this.data.stationList
|
[`stationList[${itemIndex}].package`]:this.data.stationList[itemIndex].package
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
setPackageCode(event){
|
setPackageCode(event){
|
||||||
@ -79,23 +81,30 @@ Page({
|
|||||||
wx.getStorage({
|
wx.getStorage({
|
||||||
key:'pre-order',
|
key:'pre-order',
|
||||||
success:(res)=>{
|
success:(res)=>{
|
||||||
data.items.map((item)=>{
|
data.items.map((item,index)=>{
|
||||||
const __item = res.data.price_request.packages.find((_item)=>_item.station_id==item.id);
|
const __item = res.data.price_request.packages.find((_item)=>_item.station_id==item.id);
|
||||||
item.package = __item.pickup_codes.split(',')||[''];
|
if(__item){
|
||||||
|
item.package = __item.pickup_codes.split(',')||[];
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.setData({
|
this.setData({
|
||||||
sendType:res.data.delivery_method,
|
sendType:res.data.delivery_method,
|
||||||
stationList:data.items
|
stationList:data.items
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
data.items.map((item)=>{
|
data.items.map((item)=>{
|
||||||
item.package = [''];
|
item.package = [];
|
||||||
});
|
});
|
||||||
this.setData({
|
this.setData({
|
||||||
stationList:data.items
|
stationList:data.items
|
||||||
|
});
|
||||||
|
wx.nextTick(()=>{
|
||||||
|
this.setData({
|
||||||
|
[`stationList[0].focus`]:true
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,42 +1,58 @@
|
|||||||
<view class="custom-scroll-view">
|
<view class="custom-scroll-view">
|
||||||
<view class="main">
|
<view class="main">
|
||||||
|
<view class="page-container img-area">
|
||||||
|
<view class="head">
|
||||||
|
<view class="title">
|
||||||
|
<image class="icon" src="/assets/icon/help/images.png"/>
|
||||||
|
<view>快捷下单</view>
|
||||||
|
</view>
|
||||||
|
<view class="sub-title">
|
||||||
|
上传取件信息图片时,图片需清晰显示取件位置信息
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<button class="button" type="default">点击上传取件图片</button>
|
||||||
|
</view>
|
||||||
<view class="page-container" wx:for="{{stationList}}" wx:key="index">
|
<view class="page-container" wx:for="{{stationList}}" wx:key="index">
|
||||||
<view class="head">
|
<view class="head">
|
||||||
<image class="icon" src="/assets/icon/help/house@2x.png"/>
|
<view class="title">
|
||||||
<view class="text">
|
<image class="icon" src="/assets/icon/help/house.png"/>
|
||||||
<view class="title">{{item.name}}</view>
|
<view>{{item.name}}</view>
|
||||||
<view class="sub-title">{{item.service_text}}</view>
|
</view>
|
||||||
|
<view class="sub-title">
|
||||||
|
{{item.service_text}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="package-list">
|
<view class="package-list">
|
||||||
<view class="item" wx:for="{{item.package}}" wx:for-item="pItem" wx:for-index="pIndex" wx:key="pIndex">
|
<view class="item" wx:for="{{item.package}}" wx:for-item="pItem" wx:for-index="pIndex" wx:key="pIndex">
|
||||||
<label class="label">取件码{{pIndex+1}}</label>
|
<label class="label">取件码{{pIndex+1}}</label>
|
||||||
<input value="{{pItem}}" class="input" bindinput="setPackageCode"
|
<input value="{{pItem}}" class="input" bindinput="setPackageCode" cursor-spacing="136rpx"
|
||||||
data-index="{{index}}" data-p_index="{{pIndex}}"/>
|
data-index="{{index}}" data-p_index="{{pIndex}}" focus="{{item.focus&&pItem==''}}"/>
|
||||||
<button class="button" bind:tap="deletePackage" data-index="{{index}}" data-p_index="{{pIndex}}">
|
<button class="button" bind:tap="deletePackage" data-index="{{index}}" data-p_index="{{pIndex}}">
|
||||||
<image class="icon" src="/assets/icon/help/delete@2x.png"/>
|
<image class="icon" src="/assets/icon/help/delete.png"/>
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<button type="default" class="button" bind:tap="addPackage" data-index="{{index}}">
|
<button type="default" class="button" bind:tap="addPackage" data-index="{{index}}">
|
||||||
<image src="/assets/icon/help/plus@2x.png" class="icon"/>
|
<image src="/assets/icon/help/plus.png" class="icon"/>
|
||||||
<label>添加取件码</label>
|
<label>添加取件码</label>
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="page-container">
|
<view class="page-container send-way">
|
||||||
|
<view class="title">投递方式</view>
|
||||||
<radio-group class="radio" model:value="{{sendType}}">
|
<radio-group class="radio" model:value="{{sendType}}">
|
||||||
<label>
|
<label class="item">
|
||||||
<radio value="DELIVERY_AT_DOORSTEP" checked="{{sendType=='DELIVERY_AT_DOORSTEP'}}"/>
|
|
||||||
<label>放在门口</label>
|
|
||||||
</label>
|
|
||||||
<label>
|
|
||||||
<radio value="DELIVERY_TO_ROOM" checked="{{sendType=='DELIVERY_TO_ROOM'}}"/>
|
<radio value="DELIVERY_TO_ROOM" checked="{{sendType=='DELIVERY_TO_ROOM'}}"/>
|
||||||
<label>敲门递件</label>
|
<label>敲门递件</label>
|
||||||
</label>
|
</label>
|
||||||
|
<label class="item">
|
||||||
|
<radio value="DELIVERY_AT_DOORSTEP" checked="{{sendType=='DELIVERY_AT_DOORSTEP'}}"/>
|
||||||
|
<label>放在门口</label>
|
||||||
|
</label>
|
||||||
</radio-group>
|
</radio-group>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom-bar-v2">
|
<view class="bottom-bar-v2">
|
||||||
<button class="button" type="primary" bind:tap="bottomBarButtonTap">保存并使用</button>
|
<button class="button" type="primary" bind:tap="bottomBarButtonTap">保存并使用</button>
|
||||||
|
<view class="page-dispatch"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -2,32 +2,42 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
.page-container .head{
|
.page-container .head{
|
||||||
display: flex;
|
|
||||||
padding-bottom:14rpx;
|
padding-bottom:14rpx;
|
||||||
}
|
}
|
||||||
.page-container .head .icon{
|
.page-container .head .icon{
|
||||||
width:40rpx;height:40rpx;
|
width:40rpx;height:40rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
}
|
|
||||||
.page-container .head .text{
|
|
||||||
flex:1;
|
|
||||||
padding-left:10rpx;
|
|
||||||
}
|
}
|
||||||
.page-container .head .title{
|
.page-container .head .title{
|
||||||
font-size: 34rpx;
|
font-size: 36rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
.page-container .head .sub-title{
|
.page-container .head .sub-title{
|
||||||
font-size:26rpx;
|
font-size:26rpx;
|
||||||
color: #888888;
|
color: #888888;
|
||||||
margin-top:24rpx;
|
margin-top:24rpx;
|
||||||
|
padding-left:60rpx;
|
||||||
}
|
}
|
||||||
.page-container>.button{
|
.page-container>.button{
|
||||||
margin-top:20rpx;
|
margin-top:20rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
background: rgba(124, 134, 149, 0.08);
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-container .radio{
|
.send-way .radio{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-between;
|
||||||
|
padding-top:30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.send-way .title{
|
||||||
|
font-size: 34prx;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
.send-way .radio .item{
|
||||||
|
padding:14rpx 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -66,3 +76,7 @@
|
|||||||
.package-list .item .icon{
|
.package-list .item .icon{
|
||||||
width:36rpx;height:36rpx;
|
width:36rpx;height:36rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.img-area.page-container .head .sub-title{
|
||||||
|
padding-left:0;
|
||||||
|
}
|
||||||
@ -2,5 +2,5 @@
|
|||||||
<image class="icon" src="/assets/icon/help/success@2x.png"/>
|
<image class="icon" src="/assets/icon/help/success@2x.png"/>
|
||||||
<view class="title">恭喜下单成功</view>
|
<view class="title">恭喜下单成功</view>
|
||||||
<view class="sub-title">{{successText}}</view>
|
<view class="sub-title">{{successText}}</view>
|
||||||
<button class="button" type="primary" plain="true" bind:tap="navToOrderDetail">前往查看订单</button>
|
<button class="button" type="primary" plain bind:tap="navToOrderDetail">查看订单</button>
|
||||||
</view>
|
</view>
|
||||||
@ -10,9 +10,9 @@ page{
|
|||||||
margin-top:320rpx;
|
margin-top:320rpx;
|
||||||
}
|
}
|
||||||
.title{
|
.title{
|
||||||
font-size: 40rpx;
|
font-size: 44rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color:#222222;
|
color:var(--main-color);
|
||||||
margin-top:50rpx;
|
margin-top:50rpx;
|
||||||
}
|
}
|
||||||
.sub-title{
|
.sub-title{
|
||||||
@ -21,7 +21,11 @@ page{
|
|||||||
margin-top:40rpx;
|
margin-top:40rpx;
|
||||||
}
|
}
|
||||||
.button{
|
.button{
|
||||||
|
border: 1.2rpx solid #999999!important;
|
||||||
|
color:var(--main-font-color)!important;
|
||||||
|
font-weight: normal;
|
||||||
border-radius: 60rpx;
|
border-radius: 60rpx;
|
||||||
padding:19rpx!important;
|
padding:19rpx!important;
|
||||||
margin:90rpx!important;
|
margin:90rpx auto!important;
|
||||||
|
width:438rpx!important;
|
||||||
}
|
}
|
||||||
@ -1,49 +0,0 @@
|
|||||||
// index.js
|
|
||||||
const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'
|
|
||||||
|
|
||||||
Page({
|
|
||||||
data: {
|
|
||||||
motto: 'Hello World',
|
|
||||||
userInfo: {
|
|
||||||
avatarUrl: defaultAvatarUrl,
|
|
||||||
nickName: '',
|
|
||||||
},
|
|
||||||
hasUserInfo: false,
|
|
||||||
canIUseGetUserProfile: wx.canIUse('getUserProfile'),
|
|
||||||
canIUseNicknameComp: wx.canIUse('input.type.nickname'),
|
|
||||||
},
|
|
||||||
bindViewTap() {
|
|
||||||
wx.navigateTo({
|
|
||||||
url: '../logs/logs'
|
|
||||||
})
|
|
||||||
},
|
|
||||||
onChooseAvatar(e) {
|
|
||||||
const { avatarUrl } = e.detail
|
|
||||||
const { nickName } = this.data.userInfo
|
|
||||||
this.setData({
|
|
||||||
"userInfo.avatarUrl": avatarUrl,
|
|
||||||
hasUserInfo: nickName && avatarUrl && avatarUrl !== defaultAvatarUrl,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
onInputChange(e) {
|
|
||||||
const nickName = e.detail.value
|
|
||||||
const { avatarUrl } = this.data.userInfo
|
|
||||||
this.setData({
|
|
||||||
"userInfo.nickName": nickName,
|
|
||||||
hasUserInfo: nickName && avatarUrl && avatarUrl !== defaultAvatarUrl,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getUserProfile(e) {
|
|
||||||
// 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认,开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
|
|
||||||
wx.getUserProfile({
|
|
||||||
desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
|
|
||||||
success: (res) => {
|
|
||||||
console.log(res)
|
|
||||||
this.setData({
|
|
||||||
userInfo: res.userInfo,
|
|
||||||
hasUserInfo: true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"usingComponents": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
<!--index.wxml-->
|
|
||||||
<scroll-view class="scrollarea" scroll-y type="list">
|
|
||||||
<view class="container">
|
|
||||||
<view class="userinfo">
|
|
||||||
<block wx:if="{{canIUseNicknameComp && !hasUserInfo}}">
|
|
||||||
<button class="avatar-wrapper" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar">
|
|
||||||
<image class="avatar" src="{{userInfo.avatarUrl}}"></image>
|
|
||||||
</button>
|
|
||||||
<view class="nickname-wrapper">
|
|
||||||
<text class="nickname-label">昵称1</text>
|
|
||||||
<input type="nickname" class="nickname-input" placeholder="请输入昵称" bind:change="onInputChange" />
|
|
||||||
</view>
|
|
||||||
</block>
|
|
||||||
<block wx:elif="{{!hasUserInfo}}">
|
|
||||||
<button wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile"> 获取头像昵称 </button>
|
|
||||||
<view wx:else> 请使用2.10.4及以上版本基础库 </view>
|
|
||||||
</block>
|
|
||||||
<block wx:else>
|
|
||||||
<image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
|
|
||||||
<text class="userinfo-nickname">{{userInfo.nickName}}</text>
|
|
||||||
</block>
|
|
||||||
</view>
|
|
||||||
<view class="usermotto">
|
|
||||||
<text class="user-motto">{{motto}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view>
|
|
||||||
<navigator>123</navigator>
|
|
||||||
<navigator>123</navigator>
|
|
||||||
<navigator>123</navigator>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
@ -1,62 +0,0 @@
|
|||||||
/**index.wxss**/
|
|
||||||
page {
|
|
||||||
height: 100vh;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
.scrollarea {
|
|
||||||
flex: 1;
|
|
||||||
overflow-y: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.userinfo {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
color: #aaa;
|
|
||||||
width: 80%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.userinfo-avatar {
|
|
||||||
overflow: hidden;
|
|
||||||
width: 128rpx;
|
|
||||||
height: 128rpx;
|
|
||||||
margin: 20rpx;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.usermotto {
|
|
||||||
margin-top: 200px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.avatar-wrapper {
|
|
||||||
padding: 0;
|
|
||||||
width: 56px !important;
|
|
||||||
border-radius: 8px;
|
|
||||||
margin-top: 40px;
|
|
||||||
margin-bottom: 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.avatar {
|
|
||||||
display: block;
|
|
||||||
width: 56px;
|
|
||||||
height: 56px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nickname-wrapper {
|
|
||||||
display: flex;
|
|
||||||
width: 100%;
|
|
||||||
padding: 16px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border-top: .5px solid rgba(0, 0, 0, 0.1);
|
|
||||||
border-bottom: .5px solid rgba(0, 0, 0, 0.1);
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nickname-label {
|
|
||||||
width: 105px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nickname-input {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
@ -4,27 +4,18 @@ const app = getApp();
|
|||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
isAgree: false,
|
isAgree: false,
|
||||||
loging:false
|
loging:false,
|
||||||
|
animation:null
|
||||||
},
|
},
|
||||||
|
radioChange(event){
|
||||||
handleAgreeChange(e) {
|
|
||||||
this.setData({
|
this.setData({
|
||||||
isAgree: e.detail.value.length > 0
|
isAgree:event.detail.value!=''
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
preLogin(){
|
||||||
onLogin() {
|
this.shake();
|
||||||
if (!this.data.isAgree) {
|
|
||||||
wx.showToast({
|
|
||||||
title: '请先同意用户协议和隐私政策',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
getPhoneNumber(event){
|
getPhoneNumber(event){
|
||||||
console.log(event);
|
|
||||||
if(!event.detail.code){
|
if(!event.detail.code){
|
||||||
//未接受
|
//未接受
|
||||||
return;
|
return;
|
||||||
@ -61,5 +52,22 @@ Page({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
shake(){
|
||||||
|
if(!this.animation){
|
||||||
|
this.animation = wx.createAnimation({
|
||||||
|
duration: 20,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.animation.translateX(10).step();
|
||||||
|
this.animation.translateX(-10).step();
|
||||||
|
this.animation.translateX(10).step();
|
||||||
|
this.animation.translateX(-10).step();
|
||||||
|
this.animation.translateX(5).step();
|
||||||
|
this.animation.translateX(0).step();
|
||||||
|
// needSetData[`${key}Animation`] = item.animation.export();
|
||||||
|
this.setData({
|
||||||
|
animation:this.animation.export()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -2,12 +2,15 @@
|
|||||||
<image src="/assets/imgs/login/text1.png" class="text1"/>
|
<image src="/assets/imgs/login/text1.png" class="text1"/>
|
||||||
<image src="/assets/imgs/login/text2.png" class="text2"/>
|
<image src="/assets/imgs/login/text2.png" class="text2"/>
|
||||||
<image src="/assets/imgs/login/main.jpg" class="main"/>
|
<image src="/assets/imgs/login/main.jpg" class="main"/>
|
||||||
<button class="button" type="primary" loading="{{loging}}" disabled="{{!isAgree}}"
|
<button class="button" type="primary" wx:if="{{isAgree}}" loading="{{loging}}" disabled="{{loging}}"
|
||||||
open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">手机号快捷登录</button>
|
open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">手机号快捷登录</button>
|
||||||
|
<button class="button" type="primary" bindtap="preLogin" wx:else>
|
||||||
|
手机号快捷登录
|
||||||
|
</button>
|
||||||
<view class="agree">
|
<view class="agree">
|
||||||
<radio-group bindchange="handleAgreeChange" modal:value="{{isAgree}}">
|
<radio-group bindchange="radioChange">
|
||||||
<label class="policy">
|
<label class="policy" animation="{{animation}}">
|
||||||
<radio class="radio" value="agree" checked="{{false}}"></radio>
|
<radio class="radio" value="agree"></radio>
|
||||||
<label>我已阅读并同意</label>
|
<label>我已阅读并同意</label>
|
||||||
<label class="yellow">《用户协议》</label>与
|
<label class="yellow">《用户协议》</label>与
|
||||||
<label class="yellow">《隐私政策》</label>
|
<label class="yellow">《隐私政策》</label>
|
||||||
|
|||||||
@ -61,6 +61,8 @@ Page({
|
|||||||
skip:this.data.pager[tabName].limit*this.data.pager[tabName].pageIndex,
|
skip:this.data.pager[tabName].limit*this.data.pager[tabName].pageIndex,
|
||||||
limit:this.data.pager[tabName].limit
|
limit:this.data.pager[tabName].limit
|
||||||
}).then((data)=>{
|
}).then((data)=>{
|
||||||
|
data = data.concat(data).concat(data)
|
||||||
|
|
||||||
if(this.data.pager[tabName].pageIndex==0){
|
if(this.data.pager[tabName].pageIndex==0){
|
||||||
this.data[tabName+'List'] = data;
|
this.data[tabName+'List'] = data;
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@ -10,8 +10,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<list-view class="coupon-list" wx:if="{{tabIndex==0}}"
|
<list-view class="coupon-list" wx:if="{{tabIndex==0}}" bind:refresh="refreshList"
|
||||||
height="{{listViewHeight}}" bind:refresh="refreshList"
|
|
||||||
bind:loadMore="loadMore" refresher-triggered="{{pager.tab1.refreshTrigger}}"
|
bind:loadMore="loadMore" refresher-triggered="{{pager.tab1.refreshTrigger}}"
|
||||||
show-load-more="{{!(tab1List.length==0&&pager.tab1.loadAll)}}"
|
show-load-more="{{!(tab1List.length==0&&pager.tab1.loadAll)}}"
|
||||||
loading="{{pager.tab1.loading}}" load-all="{{pager.tab1.loadAll}}">
|
loading="{{pager.tab1.loading}}" load-all="{{pager.tab1.loadAll}}">
|
||||||
@ -20,7 +19,7 @@
|
|||||||
<view class="name">{{item.coupon_name}}</view>
|
<view class="name">{{item.coupon_name}}</view>
|
||||||
<view class="desc">有效期至 {{item.expire_time}}</view>
|
<view class="desc">有效期至 {{item.expire_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right money money-yellow">{{item.coupon_amount}}</view>
|
<view class="right money money-normal">{{item.coupon_amount}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-empty" wx:if="{{tab1List.length==0&&pager.tab1.loadAll}}">
|
<view class="list-empty" wx:if="{{tab1List.length==0&&pager.tab1.loadAll}}">
|
||||||
<image class="icon" src="/assets/icon/shop/coupon-empty@2x.png"/>
|
<image class="icon" src="/assets/icon/shop/coupon-empty@2x.png"/>
|
||||||
@ -29,8 +28,7 @@
|
|||||||
</list-view>
|
</list-view>
|
||||||
|
|
||||||
|
|
||||||
<list-view class="coupon-list" wx:if="{{tabIndex==1}}"
|
<list-view class="coupon-list" wx:if="{{tabIndex==1}}" bind:refresh="refreshList"
|
||||||
height="{{listViewHeight}}" bind:refresh="refreshList"
|
|
||||||
bind:loadMore="loadMore" refresher-triggered="{{pager.tab2.refreshTrigger}}"
|
bind:loadMore="loadMore" refresher-triggered="{{pager.tab2.refreshTrigger}}"
|
||||||
show-load-more="{{!(tab2List.length==0&&pager.tab2.loadAll)}}"
|
show-load-more="{{!(tab2List.length==0&&pager.tab2.loadAll)}}"
|
||||||
loading="{{pager.tab2.loading}}" load-all="{{pager.tab2.loadAll}}">
|
loading="{{pager.tab2.loading}}" load-all="{{pager.tab2.loadAll}}">
|
||||||
@ -39,7 +37,7 @@
|
|||||||
<view class="name">{{item.coupon_name}}</view>
|
<view class="name">{{item.coupon_name}}</view>
|
||||||
<view class="desc">有效期至 {{item.expire_time}}</view>
|
<view class="desc">有效期至 {{item.expire_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right money money-yellow">{{item.coupon_amount}}</view>
|
<view class="right money money-normal">{{item.coupon_amount}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-empty" wx:if="{{tab2List.length==0&&pager.tab2.loadAll}}">
|
<view class="list-empty" wx:if="{{tab2List.length==0&&pager.tab2.loadAll}}">
|
||||||
<image class="icon" src="/assets/icon/shop/coupon-empty@2x.png"/>
|
<image class="icon" src="/assets/icon/shop/coupon-empty@2x.png"/>
|
||||||
@ -48,8 +46,7 @@
|
|||||||
</list-view>
|
</list-view>
|
||||||
|
|
||||||
|
|
||||||
<list-view class="coupon-list" wx:if="{{tabIndex==2}}"
|
<list-view class="coupon-list" wx:if="{{tabIndex==2}}" bind:refresh="refreshList"
|
||||||
height="{{listViewHeight}}" bind:refresh="refreshList"
|
|
||||||
bind:loadMore="loadMore" refresher-triggered="{{pager.tab3.refreshTrigger}}"
|
bind:loadMore="loadMore" refresher-triggered="{{pager.tab3.refreshTrigger}}"
|
||||||
show-load-more="{{!(tab3List.length==0&&pager.tab3.loadAll)}}"
|
show-load-more="{{!(tab3List.length==0&&pager.tab3.loadAll)}}"
|
||||||
loading="{{pager.tab3.loading}}" load-all="{{pager.tab3.loadAll}}">
|
loading="{{pager.tab3.loading}}" load-all="{{pager.tab3.loadAll}}">
|
||||||
@ -58,7 +55,7 @@
|
|||||||
<view class="name">{{item.coupon_name}}</view>
|
<view class="name">{{item.coupon_name}}</view>
|
||||||
<view class="desc">有效期至 {{item.expire_time}}</view>
|
<view class="desc">有效期至 {{item.expire_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right money money-yellow">{{item.coupon_amount}}</view>
|
<view class="right money">{{item.coupon_amount}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-empty" wx:if="{{tab3List.length==0&&pager.tab3.loadAll}}">
|
<view class="list-empty" wx:if="{{tab3List.length==0&&pager.tab3.loadAll}}">
|
||||||
<image class="icon" src="/assets/icon/shop/coupon-empty@2x.png"/>
|
<image class="icon" src="/assets/icon/shop/coupon-empty@2x.png"/>
|
||||||
|
|||||||
@ -1,3 +1,9 @@
|
|||||||
|
.coupon-list{
|
||||||
|
position: absolute;
|
||||||
|
top:114rpx;
|
||||||
|
left:0;height:calc(100vh - 114rpx);
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
.coupon-list .item{
|
.coupon-list .item{
|
||||||
display: flex;
|
display: flex;
|
||||||
margin:20rpx;
|
margin:20rpx;
|
||||||
@ -12,13 +18,11 @@
|
|||||||
flex:1;
|
flex:1;
|
||||||
}
|
}
|
||||||
.coupon-list .item .name{
|
.coupon-list .item .name{
|
||||||
font-size: 34rpx;
|
font-size: 36rpx;
|
||||||
font-weight: 500;
|
|
||||||
}
|
}
|
||||||
.coupon-list .item .desc{
|
.coupon-list .item .desc{
|
||||||
font-weight: 26rpx;
|
|
||||||
color: #888888;
|
color: #888888;
|
||||||
margin-top:40rpx;
|
margin-top:44rpx;
|
||||||
}
|
}
|
||||||
.coupon-list .item .money{
|
.coupon-list .item .money{
|
||||||
font-size:54rpx;
|
font-size:54rpx;
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
<list-view class="firend-list" height="{{scrollViewHeight}}"
|
<list-view class="firend-list" bind:refresh="refreshList" bind:loadMore="loadList"
|
||||||
bind:refresh="refreshList" bind:loadMore="loadList"
|
|
||||||
refresher-triggered="{{pager.refreshTrigger}}"
|
refresher-triggered="{{pager.refreshTrigger}}"
|
||||||
show-load-more="{{!(list.length==0&&pager.loadAll)}}"
|
show-load-more="{{!(list.length==0&&pager.loadAll)}}"
|
||||||
loading="{{pager.loading}}" load-all="{{pager.loadAll}}">
|
loading="{{pager.loading}}" load-all="{{pager.loadAll}}">
|
||||||
@ -14,6 +13,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-empty" wx:if="{{list.length==0&&pager.loadAll}}">
|
<view class="list-empty" wx:if="{{list.length==0&&pager.loadAll}}">
|
||||||
|
<image src="/assets/icon/my/friend-empty.png" class="icon"/>
|
||||||
<view class="sub-title">暂无邻友</view>
|
<view class="sub-title">暂无邻友</view>
|
||||||
</view>
|
</view>
|
||||||
</list-view>
|
</list-view>
|
||||||
@ -1,4 +1,9 @@
|
|||||||
|
|
||||||
|
.firend-list{
|
||||||
|
position:absolute;
|
||||||
|
top:0;left:0;
|
||||||
|
width:100%;height:100vh;
|
||||||
|
}
|
||||||
.firend-list .item{
|
.firend-list .item{
|
||||||
display: flex;
|
display: flex;
|
||||||
margin:20rpx;
|
margin:20rpx;
|
||||||
@ -27,3 +32,11 @@
|
|||||||
.firend-list .item .status{
|
.firend-list .item .status{
|
||||||
color:var(--main-color)
|
color:var(--main-color)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.list-empty{
|
||||||
|
padding-top:480rpx;
|
||||||
|
}
|
||||||
|
.list-empty .sub-title{
|
||||||
|
margin-top:30rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
@ -3,13 +3,15 @@
|
|||||||
bindrefresherpulling="scrollViewPulling" bindrefresherrestore="scrollViewPullingOver"
|
bindrefresherpulling="scrollViewPulling" bindrefresherrestore="scrollViewPullingOver"
|
||||||
refresher-background="var(--main-color)">
|
refresher-background="var(--main-color)">
|
||||||
<view class="user-info">
|
<view class="user-info">
|
||||||
<navigator class="content" url="/pages/my/setting/index">
|
<view class="content">
|
||||||
<image class="avatar" src="{{userInfo.optimized_avatar}}"/>
|
<navigator url="/pages/my/setting/index/index">
|
||||||
<view class="name">{{userInfo.nickname}}</view>
|
<image class="avatar" src="{{userInfo.optimized_avatar||'/assets/icon/my/avatar.png'}}"/>
|
||||||
<view class="setting">
|
|
||||||
<image src="/assets/icon/my/setting@2x.png" class="icon"/>
|
|
||||||
</view>
|
|
||||||
</navigator>
|
</navigator>
|
||||||
|
<view class="name">{{userInfo.nickname}}</view>
|
||||||
|
<navigator class="setting" url="/pages/my/setting/index/index">
|
||||||
|
<image src="/assets/icon/my/setting@2x.png" class="icon"/>
|
||||||
|
</navigator>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="page-container property">
|
<view class="page-container property">
|
||||||
@ -23,17 +25,29 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="cells">
|
<!-- <view class="cells cells-access">
|
||||||
<navigator url="" class="cell" hover-class="cell-active">
|
<navigator url="" class="cell invite-cell" hover-class="cell-active">
|
||||||
<view class="cell-hd">
|
<view class="cell-hd">
|
||||||
<image class="icon" src="/assets/icon/my/share@2x.png"></image>
|
<image class="icon" src="/assets/icon/my/share@2x.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="cell-bd invite-cell">
|
<view class="cell-bd">
|
||||||
<view>邀请邻友</view>
|
<view>
|
||||||
<view class="spec">邻友下单赠送 1 张跑腿券</view>
|
<view>邀请好友下单</view>
|
||||||
|
<view class="spec">邀请好友领券下单,自己再得1张跑腿券</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cell-ft"></view>
|
<view class="cell-ft"></view>
|
||||||
</navigator>
|
</navigator>
|
||||||
|
</view> -->
|
||||||
|
<view class="invite-cell">
|
||||||
|
<view class="title">
|
||||||
|
<image class="icon" src="/assets/icon/my/share@2x.png"></image>
|
||||||
|
<view class="text">邀请好友下单</view>
|
||||||
|
<view class="right-arrow"></view>
|
||||||
|
</view>
|
||||||
|
<view class="sub-title">邀请邻友领券下单,自己再得1张跑腿券</view>
|
||||||
|
</view>
|
||||||
|
<view class="cells cells-access">
|
||||||
<navigator url="/pages/my/firend/index" class="cell" hover-class="cell-active">
|
<navigator url="/pages/my/firend/index" class="cell" hover-class="cell-active">
|
||||||
<view class="cell-hd">
|
<view class="cell-hd">
|
||||||
<image class="icon" src="/assets/icon/my/firend@2x.png"></image>
|
<image class="icon" src="/assets/icon/my/firend@2x.png"></image>
|
||||||
|
|||||||
@ -10,13 +10,13 @@
|
|||||||
.user-info .content{
|
.user-info .content{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin:218rpx 40rpx 0 46rpx;
|
margin:218rpx 40rpx 0 40rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
.user-info .content .avatar{
|
.user-info .content .avatar{
|
||||||
width:112rpx;height:112rpx;
|
width:120rpx;height:120rpx;
|
||||||
border: 2px solid #FFFFFF;
|
border: 2px solid #FFFFFF;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
@ -27,7 +27,7 @@
|
|||||||
margin-left:30rpx;
|
margin-left:30rpx;
|
||||||
}
|
}
|
||||||
.user-info .content .setting{
|
.user-info .content .setting{
|
||||||
background-color: #fff;
|
background: rgba(255, 255, 255, 0.9);
|
||||||
width:66rpx;height:66rpx;
|
width:66rpx;height:66rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -58,30 +58,35 @@
|
|||||||
}
|
}
|
||||||
.property .item .value{
|
.property .item .value{
|
||||||
font-size:56rpx;
|
font-size:56rpx;
|
||||||
font-weight: bold;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.invite-cell{
|
.invite-cell{
|
||||||
display:flex;
|
padding:40rpx 40rpx 36rpx 40rpx;
|
||||||
justify-content: space-between;
|
background-color: #fff;
|
||||||
|
margin:20rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
}
|
}
|
||||||
.invite-cell .spec{
|
.invite-cell .title{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.invite-cell .title .text{
|
||||||
|
margin-left:20rpx;
|
||||||
|
flex:1;
|
||||||
|
}
|
||||||
|
.invite-cell .icon{
|
||||||
|
width:40rpx;height:40rpx;
|
||||||
|
}
|
||||||
|
.invite-cell .sub-title{
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
position: relative;
|
color: #888888;
|
||||||
color:var(--main-color);
|
margin-top:30rpx;
|
||||||
}
|
padding-left:60rpx;
|
||||||
.invite-cell .spec::before{
|
|
||||||
content:'';
|
|
||||||
position: absolute;
|
|
||||||
bottom: -16rpx;
|
|
||||||
background: rgba(153, 153, 153, 0.2);
|
|
||||||
width:100%;
|
|
||||||
height: 8rpx;
|
|
||||||
}
|
}
|
||||||
.cell.is-button{
|
.cell.is-button{
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
text-align: left;
|
|
||||||
}
|
}
|
||||||
.cell.is-button:hover{
|
.cell.is-button:hover{
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
<view class="consume">
|
<view class="custom-scroll-view">
|
||||||
|
<view class="consume">
|
||||||
<view class="title">蜂蜜 (克)</view>
|
<view class="title">蜂蜜 (克)</view>
|
||||||
<view class="point">{{userInfo.points}}</view>
|
<view class="point">{{userInfo.points}}</view>
|
||||||
<view class="tips">取快递自动抵扣</view>
|
<view class="tips">取快递自动抵扣</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<list-view class="money-list" bind:refresh="refreshList"
|
<list-view class="money-list main" bind:refresh="refreshList"
|
||||||
bind:loadMore="loadList" height="{{scrollViewHeight}}"
|
bind:loadMore="loadList" refresher-triggered="{{pager.refreshTrigger}}"
|
||||||
refresher-triggered="{{pager.refreshTrigger}}"
|
|
||||||
show-load-more="{{!(list.length==0&&pager.loadAll)}}"
|
show-load-more="{{!(list.length==0&&pager.loadAll)}}"
|
||||||
loading="{{pager.loading}}" load-all="{{pager.loadAll}}">
|
loading="{{pager.loading}}" load-all="{{pager.loadAll}}">
|
||||||
<view class="item" wx:for="{{list}}" wx:key="index">
|
<view class="item" wx:for="{{list}}" wx:key="index">
|
||||||
@ -21,4 +21,5 @@
|
|||||||
<image class="icon" src="/assets/icon/shop/point-empty@2x.png"/>
|
<image class="icon" src="/assets/icon/shop/point-empty@2x.png"/>
|
||||||
<view class="sub-title">暂无蜂蜜</view>
|
<view class="sub-title">暂无蜂蜜</view>
|
||||||
</view>
|
</view>
|
||||||
</list-view>
|
</list-view>
|
||||||
|
</view>
|
||||||
@ -13,6 +13,7 @@
|
|||||||
.consume .point{
|
.consume .point{
|
||||||
font-size: 70rpx;
|
font-size: 70rpx;
|
||||||
margin-top:40rpx;
|
margin-top:40rpx;
|
||||||
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
.consume .tips{
|
.consume .tips{
|
||||||
position:absolute;
|
position:absolute;
|
||||||
@ -24,9 +25,6 @@
|
|||||||
padding:0 16rpx;
|
padding:0 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.money-list{
|
|
||||||
margin-top:46rpx;
|
|
||||||
}
|
|
||||||
.money-list .item{
|
.money-list .item{
|
||||||
display: flex;
|
display: flex;
|
||||||
margin:20rpx;
|
margin:20rpx;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
const app = getApp();
|
const app = getApp();
|
||||||
import userApi from '../../../api/user';
|
import userApi from '../../../../api/user';
|
||||||
import commonApi from '../../../api/common';
|
import commonApi from '../../../../api/common';
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
@ -18,12 +18,6 @@ Page({
|
|||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.setData({
|
|
||||||
isShowPopup:false,
|
|
||||||
name:app.globalData.userInfo.nickname,
|
|
||||||
inputName:app.globalData.userInfo.nickname,
|
|
||||||
avatar:app.globalData.userInfo.avatar
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
saveName(){
|
saveName(){
|
||||||
this.saveUser();
|
this.saveUser();
|
||||||
@ -54,10 +48,18 @@ Page({
|
|||||||
count:1,
|
count:1,
|
||||||
mediaType:'image',
|
mediaType:'image',
|
||||||
success:(res)=>{
|
success:(res)=>{
|
||||||
commonApi.uploadImg(res.tempFiles[0]).then((data)=>{
|
console.log(res);
|
||||||
|
wx.cropImage({
|
||||||
|
cropScale: '1:1',
|
||||||
|
src: res.tempFiles[0].tempFilePath,
|
||||||
|
success:(_res)=>{
|
||||||
|
commonApi.uploadImg(_res).then((data)=>{
|
||||||
this.saveUser(data.url);
|
this.saveUser(data.url);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
modifyName(){
|
modifyName(){
|
||||||
@ -65,6 +67,16 @@ Page({
|
|||||||
isShowPopup:true
|
isShowPopup:true
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
logout(){
|
||||||
|
wx.removeStorage({
|
||||||
|
key: 'accessToken',
|
||||||
|
success(){
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/pages/login/login',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
*/
|
*/
|
||||||
@ -76,7 +88,12 @@ Page({
|
|||||||
* 生命周期函数--监听页面显示
|
* 生命周期函数--监听页面显示
|
||||||
*/
|
*/
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.setData({
|
||||||
|
isShowPopup:false,
|
||||||
|
name:app.globalData.userInfo.nickname,
|
||||||
|
inputName:app.globalData.userInfo.nickname,
|
||||||
|
avatar:app.globalData.userInfo.avatar
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1,17 +1,19 @@
|
|||||||
<view class="cells">
|
<view class="cells cells-access">
|
||||||
<view class="cell" bind:tap="chooseImage">
|
<view class="cell" bind:tap="chooseImage">
|
||||||
<view class="cell-bd">修改头像</view>
|
<view class="cell-bd">修改头像</view>
|
||||||
<view class="cell-ft">
|
<view class="cell-ft">
|
||||||
<image src="{{avatar}}" class="avatar"/>
|
<image src="{{avatar}}" class="avatar"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cell" bind:tap="modifyName">
|
<navigator url="/pages/my/setting/name/index" class="cell">
|
||||||
<view class="cell-bd">修改昵称</view>
|
<view class="cell-bd">修改昵称</view>
|
||||||
<view class="cell-ft">{{name}}</view>
|
<view class="cell-ft">
|
||||||
|
<view class="text">{{name}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
</navigator>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="cells">
|
<view class="cells cells-access">
|
||||||
<view class="cell">
|
<view class="cell">
|
||||||
<view class="cell-bd">隐私政策</view>
|
<view class="cell-bd">隐私政策</view>
|
||||||
<view class="cell-ft"></view>
|
<view class="cell-ft"></view>
|
||||||
@ -21,6 +23,7 @@
|
|||||||
<view class="cell-ft"></view>
|
<view class="cell-ft"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<button type="default" class="logout-btn" bind:tap="logout">退出登录</button>
|
||||||
|
|
||||||
<page-container show="{{isShowPopup}}" close-on-slide-down>
|
<page-container show="{{isShowPopup}}" close-on-slide-down>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
@ -18,3 +18,16 @@
|
|||||||
line-height: 88rpx;
|
line-height: 88rpx;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
.cells .cell-ft .text{
|
||||||
|
color:var(--main-font-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.logout-btn{
|
||||||
|
margin:40rpx 20rpx 20rpx!important;
|
||||||
|
padding:38rpx 0!important;
|
||||||
|
line-height: 1;
|
||||||
|
background-color: rgba(153, 153, 153, 0.15)!important;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: normal;
|
||||||
|
color: #666666!important;
|
||||||
|
}
|
||||||
95
pages/my/setting/name/index.js
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
import userApi from '../../../../api/user';
|
||||||
|
const app = getApp();
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
name:'',
|
||||||
|
userInfo:{},
|
||||||
|
loading:false
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad(options) {
|
||||||
|
app.getUserInfo().then((data)=>{
|
||||||
|
this.setData({
|
||||||
|
userInfo:data,
|
||||||
|
name:data.nickname
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
save(){
|
||||||
|
if(this.data.name==this.data.userInfo.nickname||this.data.name==''){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(this.data.loading)return;
|
||||||
|
this.setData({
|
||||||
|
loading:true
|
||||||
|
})
|
||||||
|
userApi.updateUser({nickname:this.data.name}).then((data)=>{
|
||||||
|
return app.forceGetUserInfo();
|
||||||
|
}).then((data)=>{
|
||||||
|
console.log(app.globalData.userInfo);
|
||||||
|
wx.navigateBack({
|
||||||
|
success(){
|
||||||
|
wx.showToast({
|
||||||
|
title: '更新成功',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage() {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
4
pages/my/setting/name/index.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {},
|
||||||
|
"navigationBarTitleText": "修改昵称"
|
||||||
|
}
|
||||||
5
pages/my/setting/name/index.wxml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<view class="page-container">
|
||||||
|
<input class="input" placeholder="请输入昵称" model:value="{{name}}"/>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<button loading="{{loading}}" type="primary" bind:tap="save" class="save-btn" disabled="{{name==userInfo.nickname||name==''}}">保存并使用</button>
|
||||||
14
pages/my/setting/name/index.wxss
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
.page-container{
|
||||||
|
height:160rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding:0 40rpx;
|
||||||
|
}
|
||||||
|
.page-container .input{
|
||||||
|
height:100rpx;
|
||||||
|
flex: 1;
|
||||||
|
font-size: 36rpx;
|
||||||
|
}
|
||||||
|
.save-btn{
|
||||||
|
margin:40rpx 20rpx!important;
|
||||||
|
}
|
||||||
@ -14,7 +14,8 @@ Page({
|
|||||||
|
|
||||||
scrollViewHeight:0,
|
scrollViewHeight:0,
|
||||||
|
|
||||||
refresherTriggered:true
|
refresherTriggered:true,
|
||||||
|
genderKV:userApi.genderKV
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,19 +50,38 @@ Page({
|
|||||||
title: '你确定取消此订单吗?',
|
title: '你确定取消此订单吗?',
|
||||||
complete: (res) => {
|
complete: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
userApi.order.cancel(this.data.orderDetail.order.orderid).then(()=>{
|
userApi.order.cancel(this.data.orderDetail.orderid).then(()=>{
|
||||||
this.getOrderDetail(this.data.orderDetail.order.orderid);
|
wx.showToast({
|
||||||
|
title: '取消成功',
|
||||||
|
})
|
||||||
|
this.getOrderDetail();
|
||||||
const pages = getCurrentPages();
|
const pages = getCurrentPages();
|
||||||
const prePage = pages[pages.length-2];
|
const prePage = pages[pages.length-2];
|
||||||
prePage.loadOrderList();
|
prePage.refreshList();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//订单更改后上一个页面如果是订单列表,就刷新
|
||||||
|
refreshOrderList(){
|
||||||
|
const pages = getCurrentPages();
|
||||||
|
const prePage = pages[pages.length-2];
|
||||||
|
if(prePage&&prePage.refreshList){
|
||||||
|
prePage.refreshList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pay(){
|
||||||
|
const merchantPay = this.selectComponent('#merchantOrderComponent');
|
||||||
|
merchantPay.createPayment(this.data.orderDetail.orderid,true);
|
||||||
|
},
|
||||||
|
paySuccess(){
|
||||||
|
this.refreshOrderList();
|
||||||
|
this.getOrderDetail();
|
||||||
|
},
|
||||||
copyOrderId(){
|
copyOrderId(){
|
||||||
wx.setClipboardData({
|
wx.setClipboardData({
|
||||||
data: this.data.orderDetail.order.orderid,
|
data: this.data.orderDetail.orderid,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleContact(e){
|
handleContact(e){
|
||||||
@ -71,7 +91,19 @@ Page({
|
|||||||
},
|
},
|
||||||
makePhoneCall(){
|
makePhoneCall(){
|
||||||
wx.makePhoneCall({
|
wx.makePhoneCall({
|
||||||
phoneNumber: this.data.orderDetail.order.deliveryman_phone,
|
phoneNumber: this.data.orderDetail.deliveryman_phone,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
preview(event){
|
||||||
|
const current = event.currentTarget.dataset.url;
|
||||||
|
wx.previewImage({
|
||||||
|
current:current,
|
||||||
|
urls: this.data.orderDetail.complete_images,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
orderAgain(){
|
||||||
|
wx.switchTab({
|
||||||
|
url: '/pages/help/index/index',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
{
|
{
|
||||||
"usingComponents": {},
|
"usingComponents": {
|
||||||
|
"merchant-order":"/components/merchantOrder"
|
||||||
|
},
|
||||||
"navigationBarTitleText": "订单详情"
|
"navigationBarTitleText": "订单详情"
|
||||||
}
|
}
|
||||||
@ -1,14 +1,15 @@
|
|||||||
<scroll-view scroll-y style="height:{{scrollViewHeight*2}}rpx" refresher-enabled
|
<view class="custom-scroll-view" wx:if="{{orderDetail.orderid}}">
|
||||||
|
<scroll-view scroll-y refresher-enabled class="main"
|
||||||
bindrefresherrefresh="getOrderDetail" refresher-triggered="{{refresherTriggered}}">
|
bindrefresherrefresh="getOrderDetail" refresher-triggered="{{refresherTriggered}}">
|
||||||
<view class="order-status {{orderDetail.order.status}}">{{orderStatusKV[orderDetail.order.status]}}</view>
|
<view class="order-status {{orderDetail.status}}">{{orderStatusKV[orderDetail.status]}}</view>
|
||||||
<view class="page-container sender" wx:if="{{orderDetail.order.deliveryman_user_id}}">
|
<view class="page-container sender" wx:if="{{orderDetail.deliveryman_user_id}}">
|
||||||
<view class="title">跑腿员</view>
|
<view class="title">配送员</view>
|
||||||
<view class="spliter"></view>
|
<view class="spliter"></view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<image class="avatar" src="{{orderDetail.order.deliveryman_avatar}}"/>
|
<image class="avatar" src="{{orderDetail.deliveryman_avatar}}"/>
|
||||||
<view class="center">
|
<view class="center">
|
||||||
<view class="name">{{orderDetail.order.deliveryman_nickname}}</view>
|
<view class="name">{{orderDetail.deliveryman_nickname}}</view>
|
||||||
<view class="desc">已安全送达{{orderDetail.order.delivery_count}}件</view>
|
<view class="desc">已安全送达{{orderDetail.delivery_count}}件</view>
|
||||||
</view>
|
</view>
|
||||||
<button class="button" plain size="mini" bind:tap="makePhoneCall">
|
<button class="button" plain size="mini" bind:tap="makePhoneCall">
|
||||||
<image class="icon" src="/assets/icon/shop/phone@2x.png"/>
|
<image class="icon" src="/assets/icon/shop/phone@2x.png"/>
|
||||||
@ -19,13 +20,21 @@
|
|||||||
<view class="page-container address">
|
<view class="page-container address">
|
||||||
<view class="title">送货地址</view>
|
<view class="title">送货地址</view>
|
||||||
<view class="spliter"></view>
|
<view class="spliter"></view>
|
||||||
<view class="text">{{orderDetail.order.community_name}}{{orderDetail.order.address_detail}}</view>
|
<view class="text">
|
||||||
<view class="user">{{orderDetail.order.address_name}} {{orderDetail.order.address_phone}}</view>
|
{{orderDetail.community_name}}
|
||||||
|
{{orderDetail.building_name}}
|
||||||
|
{{orderDetail.address_detail}}
|
||||||
|
</view>
|
||||||
|
<view class="user">
|
||||||
|
{{orderDetail.address_name}}
|
||||||
|
{{genderKV[orderDetail.address_gender]}}
|
||||||
|
{{orderDetail.address_phone}}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="page-container package-info">
|
<view class="page-container package-info">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<view class="left">取件信息</view>
|
<view class="left">取件信息</view>
|
||||||
<view class="right" wx:if="{{orderDetail.order.deliveryman_user_id}}">
|
<view class="right" wx:if="{{orderDetail.deliveryman_user_id}}">
|
||||||
<label>送达时间</label>
|
<label>送达时间</label>
|
||||||
<label class="time">18:00~21:00</label>
|
<label class="time">18:00~21:00</label>
|
||||||
</view>
|
</view>
|
||||||
@ -44,23 +53,33 @@
|
|||||||
<view class="page-container send-way">
|
<view class="page-container send-way">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<view class="left">送达方式</view>
|
<view class="left">送达方式</view>
|
||||||
<view class="right">{{orderDeliverStatusKV[orderDetail.order.delivery_method]}}</view>
|
<view class="right">{{orderDeliverStatusKV[orderDetail.delivery_method]}}</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="page-container photos" wx:if="{{orderDetail.complete_images&&orderDetail.complete_images.length>0}}">
|
||||||
|
<view class="title">
|
||||||
|
<view class="left">送达图片</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="spliter"></view>
|
||||||
|
<view class="imgs">
|
||||||
|
<image class="image" src="{{item}}" wx:for="{{orderDetail.complete_images}}" wx:key="index" bind:tap="preview" data-url="{{item}}"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="page-container order-info">
|
<view class="page-container order-info">
|
||||||
<view class="title">订单信息</view>
|
<view class="title">订单信息</view>
|
||||||
<view class="spliter"></view>
|
<view class="spliter"></view>
|
||||||
<view class="kv">
|
<view class="kv">
|
||||||
<view class="key">订单编号</view>
|
<view class="key">订单编号</view>
|
||||||
<view class="value">{{orderDetail.order.orderid}}</view>
|
<view class="value">{{orderDetail.orderid}}</view>
|
||||||
<view class="copy-area" bind:tap="copyOrderId">
|
<view class="copy-area" bind:tap="copyOrderId">
|
||||||
<view class="copy">复制</view>
|
<view class="copy">复制</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="kv">
|
<view class="kv">
|
||||||
<view class="key">提交时间</view>
|
<view class="key">提交时间</view>
|
||||||
<view class="value">{{orderDetail.order.create_time}}</view>
|
<view class="value">{{orderDetail.create_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="kv">
|
<view class="kv">
|
||||||
<view class="key">取件数量</view>
|
<view class="key">取件数量</view>
|
||||||
@ -70,17 +89,27 @@
|
|||||||
<view class="key">跑腿费用</view>
|
<view class="key">跑腿费用</view>
|
||||||
<view class="value">
|
<view class="value">
|
||||||
<view class="money">
|
<view class="money">
|
||||||
{{orderDetail.order.original_amount-orderDetail.order.coupon_discount_amount}}
|
{{orderDetail.original_amount-orderDetail.coupon_discount_amount}}
|
||||||
</view>
|
</view>
|
||||||
<view class="tag">先享后付</view>
|
<view class="tag">先享后付</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
<view class="scroll-view-dispatch"></view>
|
||||||
<view class="bottom-bar">
|
</scroll-view>
|
||||||
|
<view class="bottom-bar-v2">
|
||||||
|
<view class="btns">
|
||||||
<button class="button button1" plain size="mini" bind:tap="cancelOrder"
|
<button class="button button1" plain size="mini" bind:tap="cancelOrder"
|
||||||
wx:if="{{orderDetail.order.status==orderStatus.created}}">取消订单</button>
|
wx:if="{{orderDetail.status==orderStatus.created}}">取消订单</button>
|
||||||
<!-- <button class="button button2" plain size="mini">联系客服</button> -->
|
<button class="pay" type="primary" wx:if="{{orderDetail.status==orderStatus.unpaid}}"
|
||||||
<button class="button button2" open-type="contact" bindcontact="handleContact" plain size="mini">联系客服</button>
|
bind:tap="pay">去支付</button>
|
||||||
<view class="page-dispatch"></view>
|
<button class="button button1" plain size="mini" bind:tap="orderAgain"
|
||||||
|
wx:if="{{orderDetail.status==orderStatus.cancelled||orderDetail.status==orderStatus.completed}}">再来一单</button>
|
||||||
|
<button class="button button2" open-type="contact" bindcontact="handleContact" plain
|
||||||
|
size="mini" wx:else>联系客服</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<merchant-order id="merchantOrderComponent" bind:paySuccess="paySuccess"/>
|
||||||
@ -48,6 +48,7 @@
|
|||||||
}
|
}
|
||||||
.sender .info .avatar{
|
.sender .info .avatar{
|
||||||
width:100rpx;height:100rpx;
|
width:100rpx;height:100rpx;
|
||||||
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
.sender .info .center{
|
.sender .info .center{
|
||||||
margin-left:24rpx;
|
margin-left:24rpx;
|
||||||
@ -136,28 +137,45 @@
|
|||||||
padding:0 10rpx;
|
padding:0 10rpx;
|
||||||
margin-left: 32rpx;
|
margin-left: 32rpx;
|
||||||
}
|
}
|
||||||
.bottom-bar{
|
.bottom-bar-v2{
|
||||||
text-align: right;
|
|
||||||
}
|
}
|
||||||
.bottom-bar .button{
|
.bottom-bar-v2 .btns{
|
||||||
|
display: flex;
|
||||||
|
gap: 30rpx;
|
||||||
|
align-items: center;
|
||||||
|
justify-content:flex-end;
|
||||||
|
}
|
||||||
|
.bottom-bar-v2 .pay{
|
||||||
|
flex:1
|
||||||
|
}
|
||||||
|
.bottom-bar-v2 .button{
|
||||||
line-height: 72rpx;
|
line-height: 72rpx;
|
||||||
padding:0 36rpx;
|
padding:0 36rpx;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
border-radius: 18rpx;
|
border-radius: 18rpx;
|
||||||
|
margin:0;
|
||||||
}
|
}
|
||||||
.bottom-bar .button1{
|
.bottom-bar-v2 .button1{
|
||||||
color: #555555;
|
color: #555555;
|
||||||
border: 1rpx solid rgba(153, 153, 153, 0.5);
|
border: 1rpx solid rgba(153, 153, 153, 0.5);
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
.bottom-bar .button2{
|
.bottom-bar-v2 .button2{
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
margin-left:30rpx;
|
|
||||||
}
|
|
||||||
.patch{
|
|
||||||
padding-bottom:200rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.send-way .left{
|
.send-way .left{
|
||||||
padding:10rpx 0;
|
padding:10rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.photos .spliter{
|
||||||
|
margin:24rpx 0;
|
||||||
|
}
|
||||||
|
.photos .imgs{
|
||||||
|
display: flex;
|
||||||
|
gap: 16rpx;
|
||||||
|
}
|
||||||
|
.photos .imgs .image{
|
||||||
|
width:140rpx;height:140rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
@ -72,12 +72,6 @@ Page({
|
|||||||
this.loadOrderList();
|
this.loadOrderList();
|
||||||
this.loadMerchantOrderList();
|
this.loadMerchantOrderList();
|
||||||
this.loadMerchantPayOrderList();
|
this.loadMerchantPayOrderList();
|
||||||
|
|
||||||
const windowInfo = wx.getWindowInfo();
|
|
||||||
this.setData({
|
|
||||||
scrollViewHeight:windowInfo.windowHeight-windowInfo.statusBarHeight-44-57
|
|
||||||
})
|
|
||||||
|
|
||||||
},
|
},
|
||||||
refreshList(){
|
refreshList(){
|
||||||
if(this.data.tabIndex==0){
|
if(this.data.tabIndex==0){
|
||||||
@ -229,7 +223,6 @@ Page({
|
|||||||
* 生命周期函数--监听页面显示
|
* 生命周期函数--监听页面显示
|
||||||
*/
|
*/
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -4,5 +4,5 @@
|
|||||||
"merchant-order":"/components/merchantOrder",
|
"merchant-order":"/components/merchantOrder",
|
||||||
"list-view":"/components/listView"
|
"list-view":"/components/listView"
|
||||||
},
|
},
|
||||||
"navigationStyle": "custom"
|
"navigationBarTitleText": "我的订单"
|
||||||
}
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<nav-bar class="nav-bar"/>
|
<!-- <nav-bar class="nav-bar"/> -->
|
||||||
|
|
||||||
<view class="tab-bar">
|
<!-- <view class="tab-bar">
|
||||||
<view class="item-container {{tabIndex==0?'current':''}}" bind:tap="changeTab" data-index="0">
|
<view class="item-container {{tabIndex==0?'current':''}}" bind:tap="changeTab" data-index="0">
|
||||||
<view class="item">配送订单</view>
|
<view class="item">配送订单</view>
|
||||||
</view>
|
</view>
|
||||||
@ -10,15 +10,16 @@
|
|||||||
<view class="item-container {{tabIndex==2?'current':''}}" bind:tap="changeTab" data-index="2">
|
<view class="item-container {{tabIndex==2?'current':''}}" bind:tap="changeTab" data-index="2">
|
||||||
<view class="item">商品订单</view>
|
<view class="item">商品订单</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<!-- <swiper style="height:{{scrollViewHeight*2}}rpx"> -->
|
<!-- <swiper style="height:{{scrollViewHeight*2}}rpx"> -->
|
||||||
|
|
||||||
<!-- 跑腿列表 -->
|
<!-- 跑腿列表 -->
|
||||||
<!-- <swiper-item> -->
|
<!-- <swiper-item> -->
|
||||||
|
|
||||||
<list-view class="order-list" wx:if="{{tabIndex==0}}"
|
<list-view class="order-list" wx:if="{{tabIndex==0}}"
|
||||||
bind:refresh="refreshList" bind:loadMore="loadMore" height="{{scrollViewHeight}}"
|
bind:refresh="refreshList" bind:loadMore="loadMore"
|
||||||
refresher-triggered="{{refreshTriggered.tab1}}"
|
refresher-triggered="{{refreshTriggered.tab1}}"
|
||||||
load-more-text="仅展示最近一年的订单" show-load-more="{{!(orderList.length==0&&pager.tab1.loadAll)}}"
|
show-load-more="{{!(orderList.length==0&&pager.tab1.loadAll)}}"
|
||||||
loading="{{pager.tab1.loading}}" load-all="{{pager.tab1.loadAll}}">
|
loading="{{pager.tab1.loading}}" load-all="{{pager.tab1.loadAll}}">
|
||||||
<view class="item" wx:for="{{orderList}}" wx:key="index" bind:tap="goToDetail" data-id="{{item.orderid}}">
|
<view class="item" wx:for="{{orderList}}" wx:key="index" bind:tap="goToDetail" data-id="{{item.orderid}}">
|
||||||
<view class="head">
|
<view class="head">
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
.nav-bar{
|
.nav-bar{
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
.order-list{
|
||||||
|
position:absolute;
|
||||||
|
top:0;height:100vh;
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
.order-list .item{
|
.order-list .item{
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 18rpx;
|
border-radius: 18rpx;
|
||||||
|
|||||||