diff --git a/api/common.js b/api/common.js
index 1e4ac7f..d3daa64 100644
--- a/api/common.js
+++ b/api/common.js
@@ -33,7 +33,7 @@ export default {
},
activities:{
detail:(activity_id)=>request.get(`/api/coupon-activities/${activity_id}`),
- receive:(activity_id)=>request.post(`/api/coupon-activities/${activity_id}/receive`)
+ receive:(activity_id)=>request.post(`/api/coupon-activities/${activity_id}/receive`,{},{noTips:true})
},
uploadImg(file,progress){
if(!app)app = getApp();
diff --git a/api/user.js b/api/user.js
index 7c0d29c..859d176 100644
--- a/api/user.js
+++ b/api/user.js
@@ -13,11 +13,14 @@ export default {
})
},
loginWithCode(wxCode,phoneCode,rCode){
- return request.post('/api/wechat/phone-login',{
+ let params = {
login_code:wxCode,
- phone_code:phoneCode,
- referral_code:rCode||''
- });
+ phone_code:phoneCode
+ }
+ if(rCode){
+ params.referral_code = rCode;
+ }
+ return request.post('/api/wechat/phone-login',params);
},
info(){
return request.get('/api/user/info');
diff --git a/app.js b/app.js
index 0ac7c91..d5570f0 100644
--- a/app.js
+++ b/app.js
@@ -3,9 +3,6 @@ import commonApi from './api/common';
let token = wx.getStorageSync('accessToken');
App({
async onLaunch(options){
- // await this.aaa();
- console.log(wx.router);
- console.log('app onlaunch',new Date().getTime());
wx.getStorage({
key:'accessToken',
success:(res)=>{
@@ -33,15 +30,7 @@ App({
}
})
},
- aaa(){
- return new Promise((rs,rj)=>{
- setTimeout(()=>{
- rs();
- },2000)
- })
- },
onShow(options){
- console.log('app onShow',new Date().getTime());
/**
* shared_user_code 通过分享进来的 分享者 的user_code
* 这里必须放到onshow 里 才能实时获取 code 先保存在这里,再跳转登录的时候通过 url 带过去,防止刷新丢失 code
diff --git a/app.json b/app.json
index 5d371ed..bcc9b21 100644
--- a/app.json
+++ b/app.json
@@ -1,8 +1,8 @@
{
"pages": [
"pages/help/index/index",
- "pages/login/login",
"pages/my/promation/activities/index",
+ "pages/login/login",
"pages/help/success/index",
"pages/shop/index/index",
"pages/order/index/index",
diff --git a/app.wxss b/app.wxss
index 82a96d3..30abf2c 100644
--- a/app.wxss
+++ b/app.wxss
@@ -27,7 +27,7 @@ button .icon,button label{
vertical-align: middle;
}
button:not([size=mini]){
- width:auto;
+ width:auto!important;
padding:30rpx 25rpx;
font-size: 36rpx;
}
@@ -36,8 +36,8 @@ button:not([size=mini]) .icon{
}
button[type=primary]{
- background-color:var(--main-color);
- color:var(--main-font-color);
+ background-color:var(--main-color)!important;
+ color:var(--main-font-color)!important;
}
button[disabled]{
opacity: .7;
diff --git a/components/listView/index.js b/components/listView/index.js
index 537fa2d..42e3cad 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/pages/help/index/index.wxss b/pages/help/index/index.wxss
index 016de5a..f4fa14c 100644
--- a/pages/help/index/index.wxss
+++ b/pages/help/index/index.wxss
@@ -110,6 +110,7 @@
}
.order-button{
margin:40rpx 20rpx!important;
+ box-shadow: 0px 6rpx 10rpx 4rpx rgba(255, 195, 0, 0.2);
}
.action-bar{
display: flex;
diff --git a/pages/help/package/index.js b/pages/help/package/index.js
index 62998bc..afd025b 100644
--- a/pages/help/package/index.js
+++ b/pages/help/package/index.js
@@ -85,7 +85,7 @@ Page({
data:{
price_request:priceRequest,
delivery_method:this.data.sendType,
- timePeriodId:this.data.timePeriods[this.data.timePeriodsIndex].time_period_id
+ community_time_period_id:this.data.timePeriods[this.data.timePeriodsIndex].communtiy_time_period_id
},
success(){
wx.navigateBack();
@@ -142,7 +142,22 @@ Page({
const packageIndex = event.currentTarget.dataset.p_index;
this.data.stationList[itemIndex].package[packageIndex] = event.detail.value;
},
-
+ checkInput(event){
+ const itemIndex = event.currentTarget.dataset.index;
+ const packageIndex = event.currentTarget.dataset.p_index;
+ let packages = this.data.stationList[itemIndex].package;
+ if(packages.length>1){
+ if(packages.filter((item)=>item==packages[packages.length-1]).length>1){
+ wx.showToast({
+ icon:'none',
+ title: '取件码重复'
+ })
+ this.setData({
+ [`stationList[${itemIndex}].package[${packageIndex}]`]:''
+ });
+ }
+ }
+ },
/**
* 生命周期函数--监听页面加载
*/
@@ -159,7 +174,7 @@ Page({
wx.getStorage({
key:'pre-order',
success:(res)=>{
- this.savedTimePeriodId = res.data.timePeriodId;
+ this.savedTimePeriodId = res.data.community_time_period_id;
this.findTimePeriodId();
data.items.map((item,index)=>{
const __item = res.data.price_request.packages.find((_item)=>_item.station_id==item.id);
@@ -201,8 +216,7 @@ Page({
},
findTimePeriodId(){
const timePeriodsIndex = this.data.timePeriods.findIndex((item)=>{
- console.log(item.time_period_id,this.savedTimePeriodId);
- return item.time_period_id==this.savedTimePeriodId;
+ return item.communtiy_time_period_id==this.savedTimePeriodId;
});
if(timePeriodsIndex>-1){
this.setData({
@@ -299,9 +313,13 @@ Page({
})
},
chooseTime(event){
- this.setData({
- timePeriodsIndex:event.currentTarget.dataset.index
- })
+ const index = event.currentTarget.dataset.index;
+ const item = this.data.timePeriods[index];
+ if(!item.order_full){
+ this.setData({
+ timePeriodsIndex:index
+ })
+ }
},
/**
* 生命周期函数--监听页面初次渲染完成
diff --git a/pages/help/package/index.json b/pages/help/package/index.json
index e2cb8c4..4bbf394 100644
--- a/pages/help/package/index.json
+++ b/pages/help/package/index.json
@@ -1,6 +1,5 @@
{
"usingComponents": {
- "bottomBar":"/components/bottomBar"
},
"navigationStyle": "default",
"navigationBarTitleText": "添加快递信息"
diff --git a/pages/help/package/index.wxml b/pages/help/package/index.wxml
index 8a1f2ec..8e0fae1 100644
--- a/pages/help/package/index.wxml
+++ b/pages/help/package/index.wxml
@@ -49,7 +49,7 @@
-
+
\ No newline at end of file
diff --git a/pages/my/index/index.wxss b/pages/my/index/index.wxss
index 59dc51e..a455233 100644
--- a/pages/my/index/index.wxss
+++ b/pages/my/index/index.wxss
@@ -1,3 +1,6 @@
+.user-info-scroll-view{
+ height:100vh;
+}
.user-info{
height:460rpx;
position: relative;
diff --git a/pages/my/promation/activities/index.js b/pages/my/promation/activities/index.js
index 95942ee..3708509 100644
--- a/pages/my/promation/activities/index.js
+++ b/pages/my/promation/activities/index.js
@@ -45,6 +45,10 @@ Page({
this.setData({
detail:data
})
+ }).catch(()=>{
+ this.setData({
+ detailLoading:false
+ })
})
},
getActivity(){
@@ -55,15 +59,15 @@ Page({
wx.showToast({
title: '领取成功',
});
- const pages = getCurrentPages();
- if(pages.length>1){
- wx.navigateBack();
- }else{
- wx.reLaunch({
- url: '/pages/help/index/index',
- })
- }
+ this.setData({
+ isShowModal:true,
+ errorMsg:'恭喜您已领取成功!'
+ })
}).catch((e)=>{
+ this.setData({
+ isShowModal:true,
+ errorMsg:e.message||'领取错误'
+ })
this.setData({
getting:false
})
diff --git a/pages/my/promation/activities/index.wxml b/pages/my/promation/activities/index.wxml
index e4c6f86..c06bd2a 100644
--- a/pages/my/promation/activities/index.wxml
+++ b/pages/my/promation/activities/index.wxml
@@ -14,19 +14,18 @@
先领券,再下单,免费配送
-
-
+ -->
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml
index 6fa8944..f83b49a 100644
--- a/pages/order/detail/index.wxml
+++ b/pages/order/detail/index.wxml
@@ -34,9 +34,8 @@
取件信息
-
-
-
+
+ 送达时间
diff --git a/pages/order/detail/index.wxss b/pages/order/detail/index.wxss
index b6d4bf4..045ce97 100644
--- a/pages/order/detail/index.wxss
+++ b/pages/order/detail/index.wxss
@@ -12,7 +12,7 @@
font-size: 30rpx;
}
.page-container .title .right .time{
- color:#EB0000;
+ color:#ff0000;
font-weight: 500;
font-size: 32rpx;
margin-left: 10rpx;
diff --git a/project.config.json b/project.config.json
index 16d7a22..c445cdc 100644
--- a/project.config.json
+++ b/project.config.json
@@ -44,5 +44,6 @@
"tabIndent": "auto",
"tabSize": 2
},
- "appid": "wx3cc5b7dcb28f2756"
+ "appid": "wx3cc5b7dcb28f2756",
+ "simulatorPluginLibVersion": {}
}
\ No newline at end of file