diff --git a/api/common.js b/api/common.js
new file mode 100644
index 0000000..e7c58b9
--- /dev/null
+++ b/api/common.js
@@ -0,0 +1,5 @@
+import request from './request';
+
+export default {
+ getConfig:()=>request.get('/api/config')
+}
\ No newline at end of file
diff --git a/app.js b/app.js
index a78cc8e..53e28e7 100644
--- a/app.js
+++ b/app.js
@@ -1,7 +1,7 @@
import userApi from './api/user';
+import commonApi from './api/common';
const token = wx.getStorageSync('accessToken');
-// console.log()
-const date = new Date();
+console.log(1)
App({
verifyCodeWaitingTime:60,
onLaunch() {
@@ -14,9 +14,6 @@ App({
})
}
},
- onHide(){
- console.log('app on hide');
- },
resetUserInfoUpdateTag(){
this.globalData.userInfoGetTime = null;
},
@@ -36,6 +33,16 @@ App({
return data;
},
+ async getAppConfig(){
+ if(!this.globalData.appConfig){
+ const data = await commonApi.getConfig();
+ this.globalData.appConfig = {};
+ data.map((item)=>{
+ this.globalData.appConfig[item.key] = item.value;
+ })
+ }
+ return this.globalData.appConfig;
+ },
forceGetSummary(){
this.globalData.summaryGetTime = null;
@@ -57,7 +64,7 @@ App({
for(var key in rules){
((rules[key] instanceof Array)?rules[key]:[rules[key]]).map((item)=>{
let valid = true;
- let value = page.data[key].trim();
+ let value = (page.data[key]||'').trim();
//非空
if(item.required){
if(value==''){
@@ -82,9 +89,11 @@ App({
[`${key}Message`]:''
});
}else{
- page.setData({
- [`${key}Message`]:item.message
- });
+ if(item.message){
+ page.setData({
+ [`${key}Message`]:item.message
+ });
+ }
result.push({
[key]:item.message,autoFocus:item.autoFocus,key:key,shake:item.shake
})
diff --git a/app.json b/app.json
index 4c5da5e..0d9b1ba 100644
--- a/app.json
+++ b/app.json
@@ -1,8 +1,8 @@
{
"pages": [
"pages/index/index",
- "pages/order-detail/index",
"pages/login/index",
+ "pages/order-detail/index",
"pages/user/info/index",
"pages/withdraw/index/index",
"pages/withdraw/success/index",
@@ -11,11 +11,12 @@
"pages/user/bank/index/index",
"pages/user/bank/editor/index",
"pages/user/password/index",
- "pages/withdraw/list/index"
+ "pages/withdraw/list/index",
+ "pages/browser/index"
],
"window": {
"navigationBarTextStyle": "black",
- "navigationBarTitleText": "Weixin",
+ "navigationBarTitleText": "",
"navigationBarBackgroundColor": "#ffffff"
},
"style": "v2",
diff --git a/assets/icon/eyes-close.png b/assets/icon/eyes-close.png
new file mode 100644
index 0000000..e93a573
Binary files /dev/null and b/assets/icon/eyes-close.png differ
diff --git a/assets/icon/eyes-open.png b/assets/icon/eyes-open.png
new file mode 100644
index 0000000..889a310
Binary files /dev/null and b/assets/icon/eyes-open.png differ
diff --git a/assets/icon/fengkuai.png b/assets/icon/fengkuai.png
new file mode 100644
index 0000000..68874d4
Binary files /dev/null and b/assets/icon/fengkuai.png differ
diff --git a/assets/icon/logo.png b/assets/icon/logo.png
new file mode 100644
index 0000000..2c6ee82
Binary files /dev/null and b/assets/icon/logo.png differ
diff --git a/components/background-notice/index.js b/components/background-notice/index.js
index 516bd24..47675e2 100644
--- a/components/background-notice/index.js
+++ b/components/background-notice/index.js
@@ -27,7 +27,7 @@ Component({
this.bgam = wx.getBackgroundAudioManager();
this.bgam.title = '后台通知';
this.bgam.audioType = 'music';
- this.bgam.coverImgUrl = 'https://dman-1311994147.cos.ap-chengdu.myqcloud.com/20250227/DoADoEhKi4U4ab75d180b27fa14b7c34ae7969762809_d7ee9018-828e-43c7-8b2b-29d4352c0277.jpg?imageMogr2/thumbnail/800x800/format/webp';
+ this.bgam.coverImgUrl = 'https://dman-1311994147.cos.ap-chengdu.myqcloud.com/static/logo_large.jpg';
this.bgam.onEnded(()=>{
this.bgam.src = this.data.emptyAudio;
});
diff --git a/components/listView/index.js b/components/listView/index.js
index 91f3222..23b2149 100644
--- a/components/listView/index.js
+++ b/components/listView/index.js
@@ -5,14 +5,14 @@ Component({
* 组件的属性列表
*/
properties: {
- "bindrefresherrefresh":{
- type:Function
- },
- "refresherTriggered":{
+ refresherTriggered:{
type:Boolean,
value:false
},
- height:0,
+ height:{
+ type:Number,
+ value:0
+ },
loadMoreText:{
type:String,
value:'已经到底了'
diff --git a/components/modalView/index.js b/components/modalView/index.js
index da6537a..dc04c14 100644
--- a/components/modalView/index.js
+++ b/components/modalView/index.js
@@ -34,7 +34,10 @@ Component({
type:String,
value:'请输入内容'
},
- isShowCancel:true,
+ isShowCancel:{
+ type:Boolean,
+ value:true
+ },
cancelButtonText:{
type:String,
value:'取消'
diff --git a/components/modalView/index.wxml b/components/modalView/index.wxml
index 88e54ea..13ebb74 100644
--- a/components/modalView/index.wxml
+++ b/components/modalView/index.wxml
@@ -9,7 +9,7 @@
{{content}}
-
+
diff --git a/pages/browser/index.js b/pages/browser/index.js
new file mode 100644
index 0000000..dd5b56d
--- /dev/null
+++ b/pages/browser/index.js
@@ -0,0 +1,75 @@
+// pages/browser/index.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ webUrl:''
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let url = decodeURIComponent(options.url);
+ if(url.indexOf('?')>-1){
+ url = `${url}&random=${Math.random()}`
+ }else{
+ url = `${url}?random=${Math.random()}`
+ }
+ console.log(url);
+ this.setData({
+ webUrl:decodeURIComponent(options.url)
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/test/audio.json b/pages/browser/index.json
similarity index 100%
rename from pages/test/audio.json
rename to pages/browser/index.json
diff --git a/pages/browser/index.wxml b/pages/browser/index.wxml
new file mode 100644
index 0000000..87168c3
--- /dev/null
+++ b/pages/browser/index.wxml
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/pages/browser/index.wxss b/pages/browser/index.wxss
new file mode 100644
index 0000000..e10bd99
--- /dev/null
+++ b/pages/browser/index.wxss
@@ -0,0 +1 @@
+/* pages/browser/index.wxss */
\ No newline at end of file
diff --git a/pages/index/index.js b/pages/index/index.js
index 51da2ed..a399510 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -72,17 +72,17 @@ Page({
});
this.getUserInfo().then(()=>{
+ app.getSummary().then((data)=>{
+ this.setData({
+ summary:data
+ });
+ });
return this.loadStatusDetail();
}).then((data)=>{
return this.loadBuilding();
}).then((data)=>{
this.loadList();
});
- app.getSummary().then((data)=>{
- this.setData({
- summary:data
- });
- });
},
findNewOrder(){
// app.forceGetUserInfo().then((data)=>{
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 71922ed..d7dd5dd 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -39,7 +39,13 @@
loading="{{pager.loading}}" load-all="{{pager.loadAll}}">
+ class="item {{item.status==orderStatus.unpaid||item.status==orderStatus.completed?'no-btns':''}} {{item.is_first_order?'is-new-order':''}}">
+
+ 代取快递
+
+ 送达时间()
+
+
{{pItem.station_name}} {{pItem.pickup_codes.length}} 件
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
index 8e90934..1b11fe4 100644
--- a/pages/index/index.wxss
+++ b/pages/index/index.wxss
@@ -42,11 +42,12 @@
gap: 14rpx;
font-size: 28rpx;
}
+.nav-bar .loop-order-switch .switch{
+ width:84rpx;
+}
.nav-bar .loop-order-switch .switch .wx-switch-input{
width:84rpx;
height: 48rpx;
- --switch-checked-color:red;
- --switch-node-size: 16rpx;
}
.head{
display: flex;
@@ -112,16 +113,34 @@
}
-.package-list{
-}
.package-list .item{
margin:30rpx 16rpx;
background-color: #ffffff;
border-radius: 18rpx;
color: #555555;
- padding:56rpx 20rpx 20rpx;
+ padding:20rpx;
position: relative;
}
+.package-list .item .item-head{
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding-bottom:50rpx;
+}
+.package-list .item .item-head .tag{
+ background-color: rgba(153, 153, 153, 0.1);
+ border-radius: 12rpx;
+ padding:16rpx 20rpx;
+ font-weight: 500;
+ color:#555555;
+}
+.package-list .item .item-head .deliver-time{
+ color:#222222;
+}
+.package-list .item .item-head .time{
+ color:#ff0000;
+ font-weight: 500;
+}
.package-list .item:first-child{
margin-top:0;
}
@@ -130,27 +149,9 @@
position: absolute;
width:1.2rpx;
background-color: rgba(85, 85, 85, 0.5);
- left:38.5rpx;top:90rpx;
+ left:38.5rpx;top:160rpx;
bottom:250rpx;
}
-.package-list .item.is-new-order::before{
- top:145rpx;
-}
-.package-list .item.is-new-order{
- padding-top:110rpx;
-}
-.package-list .item.is-new-order::after{
- content:'新';
- position: absolute;
- right:24rpx;top:0;
- width:58rpx;height:58rpx;
- line-height: 52rpx;
- background-color: #FF0000;
- border-radius: 0px 0px 40rpx 40rpx;
- text-align: center;
- color: #fff;
- font-weight: 500;
-}
.package-list .item.no-btns::before{
bottom:100rpx;
}
@@ -228,7 +229,18 @@
}
.package-list .item .address .sub-title{
font-size: 32rpx;
- margin-top:24rpx
+ margin-top:24rpx;
+ display:flex;
+ align-items: center;
+}
+.package-list .item.is-new-order .address .sub-title::before{
+ content:'新';
+ background-color:#ff0000;
+ color:#fff;
+ font-size: 24rpx;
+ margin-right: 12rpx;
+ border-radius: 8rpx;
+ padding:6rpx 8rpx;
}
.package-list .item .btns{
diff --git a/pages/login/index.js b/pages/login/index.js
index e647044..a4a22f7 100644
--- a/pages/login/index.js
+++ b/pages/login/index.js
@@ -9,7 +9,10 @@ Page({
data: {
phone:'',
password:'',
- isAgree:false
+ logining:false,
+ isAgree:false,
+ isEyesOpen:false,
+ appConfig:{}
},
/**
* 生命周期函数--监听页面加载
@@ -17,15 +20,26 @@ Page({
onLoad(options) {
this.validator = {
phone:{type:'phone',message:'请输入正确的手机号',shake:true,autoFocus:true},
- password:{required:true,message:'请输入密码',shake:true,autoFocus:true}
+ password:{minLength:6,message:'请输入 6 位数密码',shake:true,autoFocus:true}
}
+ app.getAppConfig().then((data)=>{
+ this.setData({
+ appConfig:data
+ })
+ })
},
login(){
if(this.data.isAgree){
const valid = app.validateForm(this.validator,this);
console.log(valid,this.validator);
if(valid.length==0){
+ this.setData({
+ logining:true
+ })
userApi.login(this.data.phone,this.data.password).then((data)=>{
+ this.setData({
+ logining:false
+ })
app.globalData.userInfo = data.user;
app.globalData.accessToken = data.access_token;
wx.setStorage({
@@ -37,10 +51,17 @@ Page({
})
}
})
+ }).catch(()=>{
+ console.log('catch');
+ this.setData({
+ logining:false
+ })
})
}
}else{
-
+ app.validateForm({
+ shake:{required:true,shake:true}
+ },this);
}
},
handleAgreeChange(event){
@@ -48,6 +69,21 @@ Page({
isAgree:!!event.detail
})
},
+ toggleEyes(){
+ this.setData({
+ isEyesOpen:!this.data.isEyesOpen
+ })
+ },
+ navToAgreement(){
+ wx.navigateTo({
+ url: `/pages/browser/index?url=${this.data.appConfig.url_user_agreement}`,
+ })
+ },
+ navToPrivacy(){
+ wx.navigateTo({
+ url: `/pages/browser/index?url=${this.data.appConfig.url_user_privacy}`,
+ })
+ },
/**
* 生命周期函数--监听页面初次渲染完成
*/
diff --git a/pages/login/index.wxml b/pages/login/index.wxml
index 367d41a..f5b35fa 100644
--- a/pages/login/index.wxml
+++ b/pages/login/index.wxml
@@ -1,19 +1,35 @@
- 欢迎使用蜂快到家
+
+
+ 欢迎使用
+
+
-
-
-
+
+
+
+
+
+
+
+
+ 忘记密码
+
+
-
+
diff --git a/pages/login/index.wxss b/pages/login/index.wxss
index bbb5a87..2a4965b 100644
--- a/pages/login/index.wxss
+++ b/pages/login/index.wxss
@@ -13,36 +13,76 @@
right:-40rpx;top:204rpx;
}
.login .head .title{
- font-size: 46rpx;
+ font-size: 40rpx;
position: absolute;
left:40rpx;
- bottom:144rpx;
+ font-weight: 500;
+ bottom:140rpx;
+ display: flex;
+ align-items: center;
+}
+.login .head .title .t-logo{
+ height: 36rpx;
+ margin-left: 10rpx;
+}
+.login .head .logo{
+ position: absolute;
+ width: 136rpx;height: 136rpx;
+ bottom:218rpx;left:54rpx;
}
.login .input-area{
border-radius: 30rpx 30rpx 0px 0px;
margin-top:-80rpx;
background-color: #fff;
position: relative;
- padding:40rpx 50rpx;
+ padding:16rpx 50rpx 40rpx 50rpx;
}
-.login .input-area .input{
+.input-container{
+ display: flex;
+ align-items: center;
background-color:#F7F7F7;
border-radius: 18rpx;
+ margin-top:24rpx;
+ padding-left:30rpx;
+}
+.login .input-area .input{
height: 100rpx;
- padding:0 30rpx;
- margin-bottom:24rpx;
+ font-weight: 500;
+ font-size: 36rpx;
+}
+.login .input-area .ph-class{
+ font-weight: normal;
+ font-size: 32rpx;
+}
+.input-container .input{
+ flex: 1;
+}
+.input-container .icon{
+ width:44rpx;height:44rpx;
+ padding:20rpx;
}
.login .input-area .input.error{
background-color: rgb(252, 198, 198);
}
+
+.login .input-area .forgot-pwd{
+ display:flex;
+ justify-content: flex-end;
+}
+.login .input-area .forgot{
+ color:#888888;
+ font-size:24rpx;
+ padding:30rpx 0 30rpx 30rpx;
+}
+
.login .input-area .button{
- margin-top:50rpx;
border-radius: 20rpx;
}
.agree{
- font-size: 26rpx;
+ font-size: 28rpx;
margin-top:50rpx;
+ text-align: center;
}
.agree .yellow{
color:var(--main-color);
diff --git a/pages/order-detail/index.wxml b/pages/order-detail/index.wxml
index a99f829..cf12f23 100644
--- a/pages/order-detail/index.wxml
+++ b/pages/order-detail/index.wxml
@@ -1,5 +1,5 @@
+ refresher-enabled scroll-y class="order-detail {{orderDetail.is_first_order?'is-new-order':''}}">
@@ -8,8 +8,10 @@
{{orderDetail.address_detail}}
- {{orderDetail.address_name}}
- {{genderKV[orderDetail.address_gender]}}:{{orderDetail.address_phone}}丨{{deliverStatusKV[orderDetail.delivery_method]}}
+ {{orderDetail.address_name}}{{genderKV[orderDetail.address_gender]}}:{{orderDetail.address_phone}}丨{{deliverStatusKV[orderDetail.delivery_method]}}
+
+
+ 送达时间:{{orderDetail.time_period_name}}
diff --git a/pages/order-detail/index.wxss b/pages/order-detail/index.wxss
index 40b917f..3f1fe77 100644
--- a/pages/order-detail/index.wxss
+++ b/pages/order-detail/index.wxss
@@ -11,7 +11,26 @@
.address-info .sub-title{
font-size: 32rpx;
margin-top:36rpx;
+ display:flex;
+ align-items: center;
}
+.is-new-order .address-info .sub-title::before{
+ content:'新';
+ background-color:#ff0000;
+ color:#fff;
+ font-size: 24rpx;
+ margin-right: 12rpx;
+ border-radius: 8rpx;
+ padding:6rpx 8rpx;
+}
+.address-info .deliver-time{
+ margin-top:30rpx;
+}
+.address-info .deliver-time .time{
+ color: #ff0000;
+ font-weight: 500;
+}
+
.station-info{
padding-bottom:0;
}
@@ -123,6 +142,7 @@
margin: 0 auto;
text-align: center;
position: relative;
+ overflow:visible;
}
.steps .item .name{
font-size: 28rpx;
diff --git a/pages/test/audio.js b/pages/test/audio.js
deleted file mode 100644
index 01ceebf..0000000
--- a/pages/test/audio.js
+++ /dev/null
@@ -1,94 +0,0 @@
-// pages/test/audio.js
-Page({
-
- /**
- * 页面的初始数据
- */
- data: {
- time:0
- },
- gbam:null,
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
-
- this.bgam = wx.getBackgroundAudioManager();
- this.bgam.src = 'https://dman-1311994147.cos.ap-chengdu.myqcloud.com/static/empty.mp3';
- this.bgam.title = '后台通知';
- this.bgam.audioType = 'music';
- this.bgam.coverImgUrl = 'https://dman-1311994147.cos.ap-chengdu.myqcloud.com/20250227/DoADoEhKi4U4ab75d180b27fa14b7c34ae7969762809_d7ee9018-828e-43c7-8b2b-29d4352c0277.jpg?imageMogr2/thumbnail/800x800/format/webp';
- this.bgam.play();
- this.bgam.onPlay();
- this.bgam.onEnded(()=>{
- console.log('end');
- // this.bgam.src = 'https://dman-1311994147.cos.ap-chengdu.myqcloud.com/static/empty.mp3';
- // this.bgam.play();
- })
- // const innerAudioContext = wx.createInnerAudioContext({
- // useWebAudioImplement:true
- // })
- // innerAudioContext.src = '/assets/audio/order_complete.wav';
- // innerAudioContext.play();
- },
- playAudio(){
- setInterval(()=>{
- this.setData({
- time:this.data.time+1
- });
- },1000);
- setInterval(()=>{
- this.bgam.src = 'https://dman-1311994147.cos.ap-chengdu.myqcloud.com/static/new_order.mp3';
- this.bgam.play();
- },10000)
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
-
- }
-})
\ No newline at end of file
diff --git a/pages/test/audio.wxml b/pages/test/audio.wxml
deleted file mode 100644
index 7139558..0000000
--- a/pages/test/audio.wxml
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/pages/test/audio.wxss b/pages/test/audio.wxss
deleted file mode 100644
index 04f5fe0..0000000
--- a/pages/test/audio.wxss
+++ /dev/null
@@ -1 +0,0 @@
-/* pages/test/audio.wxss */
\ No newline at end of file
diff --git a/pages/user/password/index.js b/pages/user/password/index.js
index fade960..3d1340a 100644
--- a/pages/user/password/index.js
+++ b/pages/user/password/index.js
@@ -8,6 +8,7 @@ Page({
*/
data: {
phone:'',
+ isLogin:false,
verifyCode:'',
password:'',
rePassword:'',
@@ -17,9 +18,12 @@ Page({
modifyLoading:false
},
validator:{
+ phone:{
+ type:'phone',autoFocus:true,shake:true,message:'请输入正确的手机号码'
+ },
verifyCode:[
{required:true,message:'请输入验证码',shake:true,autoFocus:true},
- {length:6,message:'请输入 6 位数验证码',shake:true,autoFocus:true}
+ // {length:6,message:'请输入 6 位数验证码',shake:true,autoFocus:true}
],
password:{minLength:6,message:'请输入至少 6 位新密码',shake:true,autoFocus:true},
rePassword:{minLength:true,message:'请输入确认新密码',shake:true,autoFocus:true},
@@ -29,11 +33,10 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
- app.getUserInfo().then((data)=>{
- this.setData({
- phone:data.phone
- })
- });
+ this.setData({
+ phone:app.globalData.userInfo?.phone||'',
+ isLogin:!!app.globalData.userInfo?.phone
+ })
let time = wx.getStorageSync('password-verify-code-time');
if(time){
let remainTime = app.verifyCodeWaitingTime*1000 - ((new Date()).getTime() - time);
@@ -64,7 +67,6 @@ Page({
})
},
startTimer(){
- console.log(this.data.waitingTime);
if(this.data.waitingTime<=0){
this.setData({
codeLoading:false,
diff --git a/pages/user/password/index.wxml b/pages/user/password/index.wxml
index c02abe1..5770f54 100644
--- a/pages/user/password/index.wxml
+++ b/pages/user/password/index.wxml
@@ -1,7 +1,11 @@
手机号码
- {{phone}}
+
+
+ {{phoneMessage}}
+
验证码