diff --git a/app.js b/app.js
index 7ee7ddc..723e1d7 100644
--- a/app.js
+++ b/app.js
@@ -447,6 +447,7 @@ App({
text: '' + num //显示的内容
});--*/
th.getTabBar().setData({cartGoodsNum:num});
+ th.data.up_dating = 0
}
});
},
diff --git a/app.json b/app.json
index 7e20235..312b7c0 100644
--- a/app.json
+++ b/app.json
@@ -97,11 +97,15 @@
"pages/quan_pro/quan_pro",
"pages/liveStream/liveStream",
"pages/liveStreamDetails/liveStreamDetails",
-
+ "pages/addCustomer/addCustomer",
"pages/goods_share/goods_share",
"pages/activity_share/activity_share",
"pages/live_share/live_share",
- "pages/quan/quan"
+ "pages/quan/quan",
+ "pages/chongzhi/chongzhi",
+ "pages/chongzhiDetails/chongzhiDetails",
+ "pages/jfbuy/jfbuy"
+
]
}],
diff --git a/app.wxss b/app.wxss
index 3847731..8193c82 100644
--- a/app.wxss
+++ b/app.wxss
@@ -1,18 +1,21 @@
.pdt20 {
padding-top: 20rpx;
}
+.pdb18 {
+ padding-bottom: 18rpx;
+}
.pdt40 {
padding-top: 40rpx;
}
-.flex {
- display: flex;
-}
.ib{
display: inline-block;
}
.flex_auto {
flex: 1;
}
+.bdt16 {
+ border-top: 16rpx solid #f4f4f4;
+}
.container {
/*font-family: "iconfont" !important; */
display: flex; flex-direction: column;
@@ -20,6 +23,7 @@
box-sizing: border-box;
overflow-x:hidden;
}
+
page {
overflow-x: hidden;
}
@@ -79,9 +83,11 @@ button {
.hide {
display: none;
}
+
.t-c {
text-align: center;
}
+
.ai_and{
align-items: flex-end;
}
@@ -397,9 +403,15 @@ background: #ffe3e2;
.fs36 {
font-size: 36rpx;
}
+.fs38 {
+ font-size: 38rpx;
+}
.fs40 {
font-size: 40rpx;
}
+.ai_c {
+ align-items: center;
+}
.ai_end{
align-items: flex-end;
}
@@ -410,7 +422,8 @@ background: #ffe3e2;
font-size: 50rpx;
}
.fs60{ font-size:60rpx;}
-.flex-wrap{
+.fs80 {font-size: 80rpx;}
+.flex-wrap {
flex-wrap:wrap;
}
@@ -433,12 +446,12 @@ background: #ffe3e2;
/* 图标字体(ty) */
@font-face {
font-family: 'iconfont'; /* project id 2054717 */
- src: url('//at.alicdn.com/t/font_2054717_eqd24qr0g9a.eot');
- src: url('//at.alicdn.com/t/font_2054717_eqd24qr0g9a.eot?#iefix') format('embedded-opentype'),
- url('//at.alicdn.com/t/font_2054717_eqd24qr0g9a.woff2') format('woff2'),
- url('//at.alicdn.com/t/font_2054717_eqd24qr0g9a.woff') format('woff'),
- url('//at.alicdn.com/t/font_2054717_eqd24qr0g9a.ttf') format('truetype'),
- url('//at.alicdn.com/t/font_2054717_eqd24qr0g9a.svg#iconfont') format('svg');
+ src: url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.eot');
+ src: url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.eot?#iefix') format('embedded-opentype'),
+ url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.woff2') format('woff2'),
+ url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.woff') format('woff'),
+ url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.ttf') format('truetype'),
+ url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.svg#iconfont') format('svg');
}
.iconfont {
@@ -449,6 +462,42 @@ background: #ffe3e2;
-moz-osx-font-smoothing: grayscale;
}
+.icon-buqian:before {
+ content: "\e65f";
+}
+
+.icon-rili:before {
+ content: "\e65e";
+}
+
+.icon-yihexiao:before {
+ content: "\e726";
+}
+
+.icon-daihexiao:before {
+ content: "\e727";
+}
+
+.icon-meirong2:before {
+ content: "\e861";
+}
+
+.icon-shoujichongzhi:before {
+ content: "\e607";
+}
+
+.icon-cloud:before {
+ content: "\e61c";
+}
+
+.icon-shop:before {
+ content: "\e605";
+}
+
+.icon-order:before {
+ content: "\e606";
+}
+
.icon-save:before {
content: "\e6bb";
}
@@ -518,3 +567,4 @@ background: #ffe3e2;
}
+
diff --git a/components/diy_goodsGroup/diy_goodsGroup.js b/components/diy_goodsGroup/diy_goodsGroup.js
index b73299f..6e0c207 100644
--- a/components/diy_goodsGroup/diy_goodsGroup.js
+++ b/components/diy_goodsGroup/diy_goodsGroup.js
@@ -316,13 +316,24 @@ Component({
var arr = [1219, 2089, 3031];
var new_arr = new Array();
var card_name_map = new Map();
- for (var i = 0; i < plusCard.length; i++) {
- var name = "card" + plusCard[i].CorrPrice.toLowerCase();
- card_name_map.set(name, plusCard[i].CardName);
- }
+
+ var user = getApp().globalData.userInfo;
+
+ if(plusCard) {
+
+ for (var i = 0; i < plusCard.length; i++) {
+ if ((!user || user.card_field == null || user.card_field == "") && (plusCard[i].IsStopBuy == true)) {
+ continue;
+ }
+
+ var name = "card" + plusCard[i].CorrPrice.toLowerCase();
+ card_name_map.set(name, plusCard[i].CardName);
+ new_arr.push(plusCard[i]);
+ }
+ }
var ob = {
- "card_list": plusCard,
+ "card_list": new_arr,
"name_map": card_name_map
};
func(ob);
@@ -392,7 +403,10 @@ Component({
item.cardprice1 = val.cardprice1;
item.cardprice2 = val.cardprice2;
item.cardprice3 = val.cardprice3;
-
+
+ if(val.prom_price) item.prom_price = val.prom_price;
+ if(val.prom_integral) item.prom_integral = val.prom_integral;
+
prom_id = val.prom_id;
var prom_type = val.prom_type; //0普通商品 1秒杀 6拼单
diff --git a/components/diy_goodsGroup/diy_goodsGroup.wxml b/components/diy_goodsGroup/diy_goodsGroup.wxml
index a7553b1..37b1a76 100644
--- a/components/diy_goodsGroup/diy_goodsGroup.wxml
+++ b/components/diy_goodsGroup/diy_goodsGroup.wxml
@@ -43,9 +43,13 @@
{{item.goods_name}}
-
- ¥{{item.prom_price}}
- ¥{{item.market_price}}
+
+
+ {{item.prom_integral}}积分
+ +
+ ¥{{item.prom_price}}
+
+ ¥{{item.market_price}}
@@ -187,8 +191,12 @@
{{item.goods_name}}
-
- ¥{{item.prom_price}}
+
+
+ {{item.prom_integral}}积分
+ +
+ ¥{{item.prom_price}}
+
¥{{item.market_price}}
@@ -330,8 +338,12 @@
{{item.goods_name}}
-
- ¥{{item.prom_price}}
+
+
+ {{item.prom_integral}}积分
+ +
+ ¥{{item.prom_price}}
+
¥{{item.market_price}}
@@ -473,96 +485,114 @@
{{item.goods_name}}
-
-
-
-
-
-
-
-
- ¥
- {{filter.toFix(item[card_field],2)}}
-
-
- {{card_name}}
-
-
-
-
-
-
- ¥
- {{item.market_price}}
-
-
-
-
-
-
-
- ¥
- {{filter.toFix(item.shop_price,2)}}
-
-
-
-
-
- ¥
- {{item.market_price}}
-
-
-
-
-
-
-
-
-
-
- ¥
- {{filter.toFix(item.shop_price,2)}}
-
-
-
- ¥
- {{item.market_price}}
-
-
-
-
-
-
- ¥
- {{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}
-
- {{g_filter.get_card_price(item,card_list,1)}}
-
-
-
-
-
-
-
- ¥
- {{filter.toFix(item.shop_price,2)}}
-
-
-
-
-
- ¥
- {{item.market_price}}
-
-
-
-
-
-
-
- ¥{{item.shop_price}}
- ¥{{item.market_price}}
-
+
+
+
+ {{item.prom_integral}}积分
+ +
+ ¥{{item.prom_price}}
+
+ ¥{{item.market_price}}
+
+
+
+
+
+
+
+
+
+
+
+
+ ¥
+ {{filter.toFix(item[card_field],2)}}
+
+
+ {{card_name}}
+
+
+
+
+
+
+ ¥
+ {{item.market_price}}
+
+
+
+
+
+
+
+ ¥
+ {{filter.toFix(item.shop_price,2)}}
+
+
+
+
+
+ ¥
+ {{item.market_price}}
+
+
+
+
+
+
+
+
+
+
+ ¥
+ {{filter.toFix(item.shop_price,2)}}
+
+
+
+ ¥
+ {{item.market_price}}
+
+
+
+
+
+
+ ¥
+ {{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}
+
+ {{g_filter.get_card_price(item,card_list,1)}}
+
+
+
+
+
+
+
+ ¥
+ {{filter.toFix(item.shop_price,2)}}
+
+
+
+
+
+ ¥
+ {{item.market_price}}
+
+
+
+
+
+
+
+ ¥{{item.shop_price}}
+ ¥{{item.market_price}}
+
+
+
+
+
+
+
销量:{{item.sales_sum}}件
@@ -623,8 +653,12 @@
{{aitem.goods_name}}
-
- ¥{{aitem.prom_price}}
+
+
+ {{aitem.prom_integral}}
+ +
+ ¥{{aitem.prom_price}}
+
¥{{aitem.market_price}}
diff --git a/components/diy_goodsGroup/g_filter.wxs b/components/diy_goodsGroup/g_filter.wxs
index 6b5e379..fc32f2c 100644
--- a/components/diy_goodsGroup/g_filter.wxs
+++ b/components/diy_goodsGroup/g_filter.wxs
@@ -47,6 +47,7 @@ var g_filters = {
//---设置对应的价格名字----
for(var i=0;i<3;i++) {
var vl=all_card[i];
+ if(!vl) continue;
if(vl['CorrPrice']=="Price1" && price1>0)
{
if(min_price==null) {
diff --git a/components/goods_list/goods_list.js b/components/goods_list/goods_list.js
index 460fbe6..98c3fbf 100644
--- a/components/goods_list/goods_list.js
+++ b/components/goods_list/goods_list.js
@@ -159,7 +159,7 @@ Component({
var user = getApp().globalData.userInfo;
if(plusCard) {
for (var i = 0; i < plusCard.length; i++) {
- if (user && (user.card_field == null || user.card_field == "") && (plusCard[i].IsStopBuy == true)) {
+ if ((!user || user.card_field == null || user.card_field == "") && (plusCard[i].IsStopBuy == true)) {
continue;
}
var name = "card" + plusCard[i].CorrPrice.toLowerCase();
diff --git a/components/goods_list/goods_list.wxml b/components/goods_list/goods_list.wxml
index 85c9718..7352331 100644
--- a/components/goods_list/goods_list.wxml
+++ b/components/goods_list/goods_list.wxml
@@ -12,10 +12,12 @@
{{item.goods_name}}
-
-
+
+
+ {{item.prom_integral}}积分
+ +
-
+
¥
{{item.prom_price}}
diff --git a/components/qr_code/qr_code.wxml b/components/qr_code/qr_code.wxml
index 5aa0ec7..216c4fa 100644
--- a/components/qr_code/qr_code.wxml
+++ b/components/qr_code/qr_code.wxml
@@ -11,14 +11,15 @@
{{object.val}}
-
- {{object.content}}
+
+ {{object.content}}
有效时间:{{object.now}} 至 {{object.validay}}
使用说明: 仅{{object.name}}使用
使用说明: 全场通用
-
+ {{object.code}}
+
diff --git a/components/qr_code/qr_code.wxss b/components/qr_code/qr_code.wxss
index c4eb9e2..50d62ba 100644
--- a/components/qr_code/qr_code.wxss
+++ b/components/qr_code/qr_code.wxss
@@ -78,11 +78,11 @@ letter-spacing:6rpx;
/* 二维码边框*/
.qrcode_rim {
width: 550rpx;
- height:544rpx;
+ height:544rpx;
display:flex;
flex-direction:column;
position: absolute;
-left: 74rpx;
+left: 75rpx;
}
.qrcode{
@@ -125,4 +125,8 @@ margin-top: -5.5rpx;
.flex{
display: flex;
justify-content:center;
+}
+
+.code_show{
+ text-align: center;position: relative; left: -20rpx;
}
\ No newline at end of file
diff --git a/packageA/pages/activity_share/activity_share.js b/packageA/pages/activity_share/activity_share.js
index 76941ed..d444460 100644
--- a/packageA/pages/activity_share/activity_share.js
+++ b/packageA/pages/activity_share/activity_share.js
@@ -225,7 +225,7 @@ Page({
clickTab2(e) {
if(this.data.currentIndex2!=e.target.dataset.index){
this.setData({
- currentIndex2: e.target.dataset.index,is_no_data:0,is_no_more:0,list:[],
+ currentIndex2: e.target.dataset.index,is_no_data:0,is_no_more:0,list:[],list2:[]
});
this.data.is_load=0;
this.data.currentPage=1;
@@ -303,6 +303,10 @@ Page({
var th=this;
var prom_goods=null;
var hui_active=this.data.hui_active;
+ th.data.is_no_more2=0;
+ th.data.is_no_data2=0;
+ th.data.currentPage2=1;
+ th.setData({list2:[]})
//-- 获取优惠活动的详情信息 --
app.request.promiseGet("/api/weshop/promgoodslist/getPromGoodsInfo/"+hui_active.id,{}).then(res=>{
diff --git a/packageA/pages/activity_share/activity_share.wxml b/packageA/pages/activity_share/activity_share.wxml
index 3d3183c..30ac856 100644
--- a/packageA/pages/activity_share/activity_share.wxml
+++ b/packageA/pages/activity_share/activity_share.wxml
@@ -53,7 +53,7 @@
已拼{{item.buy_num}}份
- 1人团
+ {{item.ct_num}}人团
剩余:
@@ -153,9 +153,9 @@
-
-
-
+
+
+
@@ -226,14 +226,14 @@
- 减现金 -{{item.money}}
- 打折 {{item.sale}}%
+ 减现金 {{item.money}}
+ 打折 {{item.sale}}折
包邮
- 积分 {{item.intValue}}
+ 积分 {{item.intValue}}
积分
diff --git a/packageA/pages/checkin/checkin.js b/packageA/pages/checkin/checkin.js
new file mode 100644
index 0000000..10ea4fa
--- /dev/null
+++ b/packageA/pages/checkin/checkin.js
@@ -0,0 +1,291 @@
+// packageA//pages/checkin/checkin.js
+const app = getApp();
+
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ year: '',
+ month: '',
+ day: '',
+ weekArr: ['日', '一', '二', '三', '四', '五', '六'],
+ dateArr: [],
+ firstDay: '',
+ lastDay: '',
+ param: null,
+ clockNum: 3,
+
+ res: null,
+ isShowRules: false,
+ isCheckIn: false,
+ checkInDays: 0, //连续签到天数
+ integral: 0, //积分
+ checkInNums: 0, //补签次数
+ isCheckInDay: '',
+
+
+ flag: true,
+ },
+
+ loadQd(callback) {
+ let self = this;
+ app.request.get('/api/weshop/qdrecord/getUser/'+ app.globalData.setting.stoid + '/' + app.globalData.user_id, {
+ success: function (res) {
+ if(callback) callback();
+ self.setData({
+ res: res.data.data
+ });
+ self.loadCheckedRecord();
+ },
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function(options) {
+ let self = this;
+ this.getDate();
+ this.setDate();
+ var res = wx.getSystemInfoSync();
+ this.setData({
+ param: res.windowHeight / 12,
+ })
+
+ this.loadQd();
+
+ },
+
+
+ // 点击"我的积分"和"去购物"进行跳转
+ goto(e) {
+ let url = e.target.dataset.url;
+ app.goto(url);
+ },
+
+
+ // 点击显示签到规则
+ showRules() {
+ if(this.data.isShowRules) {
+ this.setData({
+ isShowRules: false
+ });
+ } else {
+ this.setData({
+ isShowRules: true
+ });
+ }
+ },
+
+
+ // 加载签到记录
+ loadCheckedRecord() {
+ let newDateArr = this.data.dateArr;
+ let list;
+ let bqlist;
+ if(this.data.res.qddaylist) {
+ list = this.data.res.qddaylist.split(',');
+ for(let item of list) {
+ newDateArr[item-1].isCheckIn = true;
+ };
+ }
+ if(this.data.res.curbqdaynum) {
+ bqlist = this.data.res.curbqdaynum.split(',');
+ for(let item of bqlist) {
+ var date = new Date(item);
+ newDateArr[date.getDate()-1].isBq = true;
+ }
+ }
+ this.setData({
+ dateArr: newDateArr
+ });
+ },
+
+ // 点击签到
+ checkInToday() {
+ const self = this;
+ // 获取今天的签到状态
+ let isCheckInToday = this.data.dateArr[this.data.day-1].isCheckIn;
+ // 如果还没签到, 可以点击签到
+ if(!isCheckInToday) {
+ app.request.promisePost('/api/weshop/qdrecord/saveQd', {
+ data: {
+ store_id: app.globalData.setting.stoid,
+ user_id: app.globalData.user_id,
+ }
+ }).then(res => {
+ // 改变签到状态,由false置为true
+ // let newDateArr = self.data.dateArr;
+ // newDateArr[self.data.day-1].isCheckIn = true;
+
+ self.loadQd(function() {
+ wx.showToast({
+ title: self.data.res.qdintro,
+ icon: 'none',
+ duration: 1500,
+ success: function() {
+
+ }
+ });
+ });
+
+ })
+ }
+ },
+
+
+ // 补签
+ reCheckIn() {
+ var self = this;
+ // var i = 0;
+ console.log('补签~');
+ if(this.data.flag) {
+ this.data.flag = false;
+ app.request.promisePost('/api/weshop/qdrecord/saveBQd', {
+ data: {
+ store_id: app.globalData.setting.stoid,
+ user_id: app.globalData.user_id,
+ daynum: self.data.res.getBQIntegral,
+ bqnum: self.data.res.getbqnum2,
+ bqintegral: self.data.res.getBQIntegral1,
+ }
+ }).then(res => {
+ // 改变签到状态,由false置为true
+ // let newDateArr = self.data.dateArr;
+ // newDateArr[self.data.day-1].isCheckIn = true;
+ var bqlist = self.data.res.curbqdaynum.split(',').sort();
+ var list = [];
+ for(let item of bqlist) {
+ var date = new Date(item);
+ list.push(date.getDate());
+ }
+
+ self.data.dateArr[list[0]-1].isBq = false;
+ self.setData({
+ dateArr: self.data.dateArr
+ });
+
+ self.loadQd(function() {
+ self.data.flag = true;
+ wx.showToast({
+ title: '补签成功',
+ icon: 'success',
+ duration: 1500,
+ success: function() {
+
+ }
+ });
+ });
+ })
+ }
+ },
+
+
+
+
+
+ getDate: function() { //获取当月日期
+ var mydate = new Date();
+ var year = mydate.getFullYear();
+ var month = mydate.getMonth(); //0~11: 一月至十二月
+ var months = month + 1; //1~12:一月至十二月
+ this.data.year = year;
+ this.data.month = months;
+ this.data.day = mydate.getDate(); //获取当月日期: 1~31
+ var fist = new Date(year, month, 1);
+ this.data.firstDay = fist.getDay(); //获取当月第一天
+ var last = new Date(year, months, 0); //0表示当月最后一天
+ this.data.lastDay = last.getDate(); //获取当月最后一天
+
+ this.setData({
+ year: this.data.year,
+ month: this.data.month,
+ day: this.data.day,
+ firstDay: this.data.firstDay,
+ lastDay: this.data.lastDay
+ })
+ console.log("今天:" + this.data.day);
+ },
+
+ setDate: function() {
+ var day;
+ for (var i = 1; i < this.data.lastDay + 1; i++) {
+ day = {
+ num: i,
+ };
+ this.data.dateArr.push(day);
+ }
+ this.setData({
+ dateArr: this.data.dateArr,
+ // firstDay: this.data.firstDay
+ });
+ },
+
+ // prevMonth: function() { //上一月
+ // var months = "";
+ // var years = "";
+ // if (this.data.month == 1) {
+ // years = this.data.year - 1
+ // this.data.month = 12;
+ // months = this.data.month;
+ // } else {
+ // years = this.data.year;
+ // months = this.data.month - 1;
+ // }
+
+ // var first = new Date(years, months - 1, 1);
+ // this.data.firstDay = first.getDay();
+ // var last = new Date(years, months, 0);
+ // this.data.lastDay = last.getDate();
+
+ // this.setData({
+ // month: months,
+ // year: years,
+ // firstDay: this.data.firstDay,
+ // lastDay: this.data.lastDay
+ // })
+
+ // this.data.dateArr = [];
+ // for (var i = 1; i < this.data.lastDay + 1; i++) {
+ // this.data.dateArr.push(i);
+ // }
+ // this.setData({
+ // dateArr: this.data.dateArr
+ // })
+ // },
+
+ // nextMonth: function() { //下一月
+ // var months = "";
+ // var years = "";
+ // if (this.data.month == 12) {
+ // this.data.month = 0;
+ // months = this.data.month;
+ // years = this.data.year + 1;
+ // } else {
+ // months = this.data.month + 1;
+ // years = this.data.year;
+ // }
+ // var months = this.data.month + 1;
+ // var first = new Date(years, months - 1, 1);
+ // this.data.firstDay = first.getDay();
+ // var last = new Date(years, months, 0);
+ // this.data.lastDay = last.getDate();
+ // this.setData({
+ // month: months,
+ // year: years,
+ // firstDay: this.data.firstDay,
+ // lastDay: this.data.lastDay
+ // })
+
+ // this.data.dateArr = [];
+ // for (var i = 1; i < this.data.lastDay + 1; i++) {
+ // this.data.dateArr.push(i);
+ // }
+ // this.setData({
+ // dateArr: this.data.dateArr
+ // })
+ // },
+
+})
diff --git a/packageA/pages/checkin/checkin.json b/packageA/pages/checkin/checkin.json
new file mode 100644
index 0000000..c387c73
--- /dev/null
+++ b/packageA/pages/checkin/checkin.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "签到领积分",
+ "enablePullDownRefresh": false
+}
\ No newline at end of file
diff --git a/packageA/pages/checkin/checkin.wxml b/packageA/pages/checkin/checkin.wxml
new file mode 100644
index 0000000..a155ed9
--- /dev/null
+++ b/packageA/pages/checkin/checkin.wxml
@@ -0,0 +1,114 @@
+
+
+
+
+ 我的积分
+ 规则
+
+
+
+
+ +{{res.cday1}}
+ {{myUtil.setDate(year, res.sday2, 0)}}日
+
+
+ +{{res.daynum}}
+ {{myUtil.setDate(year, res.sday2, 1)}}日
+
+
+ +{{res.tdayc1}}
+ {{myUtil.setDate(year, res.sday2, 2)}}日
+
+
+ +{{res.tdayc2}}
+ {{myUtil.setDate(year, res.sday2, 3)}}日
+
+
+ +{{res.tdayc3}}
+ {{myUtil.setDate(year, res.sday2, 4)}}日
+
+
+ +{{res.tdayc4}}
+ {{myUtil.setDate(year, res.sday2, 5)}}日
+
+
+ +{{res.tdayc5}}
+ {{myUtil.setDate(year, res.sday2, 6)}}日
+
+
+
+
+
+ {{!dateArr[day-1].isCheckIn ? '立即签到':'今日已签到'}}
+
+ 补签(-10分)
+
+
+
+
+
+
+
+
+
+
+ {{year}}年{{month}}月
+ 补签卡:{{res.getkbqnum}}
+
+
+
+
+
+
+
+
+ {{item}}
+
+
+
+
+
+
+ {{item.num}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 小积分大作为
+ 积分抵用现金,积少成多
+
+
+ 去购物 Go!
+
+
+
+
+
+
+
+
diff --git a/packageA/pages/checkin/checkin.wxs b/packageA/pages/checkin/checkin.wxs
new file mode 100644
index 0000000..540a1ed
--- /dev/null
+++ b/packageA/pages/checkin/checkin.wxs
@@ -0,0 +1,20 @@
+var myUtil = {
+ setDate: function(year, startDate, num) {
+ var date = getDate(year + '-' + startDate);
+ date.setDate(date.getDate() + num);
+ date = getDate(date).getDate();
+ return date;
+ },
+
+ // dateDiff: function(firstDate,secondDate) {
+ // var firstDate = new Date(firstDate);
+ // var secondDate = new Date(secondDate);
+ // var diff = Math.abs(firstDate.getTime() - secondDate.getTime());
+ // var result = parseInt(diff / (1000 * 60 * 60 * 24));
+ // return result;
+ // },
+};
+
+module.exports = {
+ setDate: myUtil.setDate,
+};
\ No newline at end of file
diff --git a/packageA/pages/checkin/checkin.wxss b/packageA/pages/checkin/checkin.wxss
new file mode 100644
index 0000000..2cddae1
--- /dev/null
+++ b/packageA/pages/checkin/checkin.wxss
@@ -0,0 +1,356 @@
+/* packageA//pages/checkin/checkin.wxss */
+@charset "utf-8";
+page,
+.checkin-container {
+ /* height: 100%;
+ overflow: hidden; */
+}
+
+.checkin-container {
+ background: linear-gradient(#FF7A07, #FF980F, white 95%);
+ background-repeat: no-repeat;
+}
+
+.checkin-container {
+ /* background-color: #3F7EFF; */
+}
+
+.rule-container {
+ padding-top: 40rpx;
+ align-items: center;
+ justify-content: space-between;
+ position: relative;
+}
+.points {
+ background-color: #FFBC47;
+ color: #333;
+ font-size: 26rpx;
+ border-top-right-radius: 25rpx;
+ border-bottom-right-radius: 25rpx;
+ display: flex;
+ align-items: center;
+ padding-right: 20rpx;
+ line-height: 50rpx;
+}
+.rule {
+ padding: 10rpx 20rpx;
+ color: #FFBC47;
+ font-size: 26rpx;
+}
+
+.coin {
+ width: 30rpx;
+ height: 25rpx;
+ padding-left: 10rpx;
+ padding-right: 6rpx;
+}
+
+.current {
+ display: flex;
+ justify-content: space-between;
+ padding: 60rpx 30rpx 30rpx;
+ color: white;
+ font-size: 28rpx;
+}
+
+.days {
+ font-weight: bold;
+ color: #FFE749;
+}
+
+.f-vc {
+ display: flex;
+ align-items: center;
+}
+
+.btn-container {
+ display: flex;
+ justify-content: space-around;
+ margin-bottom: 80rpx;
+}
+
+.icon-rili,
+.icon-buqian {
+ margin-right: 10rpx;
+ font-size: 40rpx;
+ font-weight: normal;
+}
+
+
+.btn {
+ width: 260rpx;
+ line-height: 76rpx;
+ padding-left: 30rpx;
+ padding-right: 30rpx;
+ background-color: #FFBC47;
+ border-radius: 38rpx;
+ color: white;
+ text-align: center;
+ box-shadow: 0 7px 0 #FF9A45, 0 8px 3px rgba(0, 0, 0, 0.3);
+ margin: 0 auto;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-weight: bold;
+}
+
+.list {
+ margin: 80rpx 20rpx 60rpx;
+ color: rgba(255,255,255,.3);
+ align-items: center;
+ position: relative;
+}
+.list::after {
+ content: '';
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 30rpx;
+ margin: 0 auto;
+ width: 94%;
+ height: 10rpx;
+ background-color: rgba(255,255,255,.3);
+}
+.list-item {
+ width: calc(100% / 7);
+ text-align: center;
+}
+.circle {
+ width: 68rpx;
+ height: 68rpx;
+ line-height: 68rpx;
+ font-size: 26rpx;
+ color: white;
+ background-color: #FF9A45;
+ margin: 0 auto 10rpx auto;
+ position: relative;
+ z-index: 3;
+}
+.list-item.active {
+ color: white;
+ /* font-weight: bold; */
+}
+.list-item.active .circle {
+ box-sizing: border-box;
+ background-color: #FFBC47;
+ /* color: white; */
+ border: 4rpx solid white;
+ line-height: 64rpx;
+ /* box-shadow: 2rpx 2rpx 16rpx #ddd; */
+}
+
+.calendar-container {
+ position: relative;
+ padding: 0 60rpx;
+}
+.calendar-container::before {
+ content: '';
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 0;
+ margin: 0 auto;
+ width: 680rpx;
+ height: 24rpx;
+ border-radius: 12rpx;
+ /* background-color: #8AAFFC; */
+ background: linear-gradient(#CBDAFC, #6E9CFD);
+ box-shadow: 0 2rpx 10rpx #6C98F4;
+}
+.calendar-wrapper {
+ background: linear-gradient(#BAD4FD, white 6rpx);
+ position: relative;
+ z-index: 2;
+ width: 100%;
+ top: 12rpx;
+ left: 0;
+ border-bottom-left-radius: 16rpx;
+ border-bottom-right-radius: 16rpx;
+ box-shadow: 0 2rpx 16rpx #999;
+}
+.calendar-title {
+ text-align: center;
+ line-height: 86rpx;
+ border-bottom: 2rpx solid #E0E6EE;
+ display: flex;
+ align-items: center;
+ padding: 0 20rpx;
+ justify-content: space-between;
+}
+
+.calendar {
+ /* height: 400rpx; */
+ font-size: 26rpx;
+ color: #838E9C;
+ padding-bottom: 20rpx;
+}
+.week {
+ display: flex;
+ flex-wrap: wrap;
+ text-align: center;
+}
+
+
+.jfbuy-container {
+ padding: 60rpx 40rpx 40rpx;
+}
+.jfbuy {
+ /* border: 2rpx solid black; */
+ border-radius: 16rpx;
+ padding: 40rpx 30rpx;
+ background-color: #FF980F;
+ box-shadow: 0 2rpx 16rpx #FF7A07;
+ /* position: fixed;
+ width: 100%;
+ bottom: 0; */
+ /* padding: 40rpx 20rpx; */
+}
+
+.jfbuy-img {
+ width: 260rpx;
+ height: 180rpx;
+ padding-right: 40rpx;
+}
+.t1 {
+ font-weight: bolder;
+ color: white;
+}
+.t2 {
+ color: white;
+ font-size: 24rpx;
+ padding-top: 10rpx;
+}
+.right {
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ flex: 1;
+}
+.btn-buy {
+ /* padding: 20rpx 10rpx; */
+ border: 2rpx solid white;
+ color: white;
+ line-height: 60rpx;
+ border-radius: 30rpx;
+}
+
+.today .day {
+ /* background-color: skyblue;
+ border-radius: 50%; */
+ /* color: white; */
+ /* width: 44rpx;
+ height: 44rpx;
+ line-height: 44rpx; */
+ /* border-radius: 50%; */
+ /* background-color: rgba(255,188,71,.6); */
+ /* box-shadow: 0 2rpx 12rpx #FFBC47; */
+}
+
+.active .day,
+.bq .day {
+ position: relative;
+}
+
+.active .day::after {
+ content: '';
+ position: absolute;
+ width: 10rpx;
+ height: 10rpx;
+ border-radius: 50%;
+ background-color: #FFBC47;
+ left: 0;
+ right: 0;
+ bottom: 12rpx;
+ margin: auto;
+ box-shadow: 0 2rpx 12rpx #FFBC47;
+}
+
+.bq .day {
+ background-color: #eee;
+}
+
+.bq .day::before {
+ position: absolute;
+ top: 4rpx;
+ right: 0;
+ content: '补';
+ color: white;
+ font-size: 16rpx;
+ line-height: 16rpx;
+ z-index: 5;
+}
+.bq .day::after {
+ position: absolute;
+ top: 0;
+ right: 0;
+ content: '';
+ width: 0;
+ border-top: 34rpx solid #ccc;
+ border-left: 34rpx solid transparent;
+
+}
+
+
+.popup-container {
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ z-index: 99;
+ background-color: rgba(0,0,0,.5);
+}
+
+.popup-wrapper {
+ position: absolute;
+ width: 80%;
+ max-height: 880rpx;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ margin: auto;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+}
+
+.popup {
+ padding: 30rpx;
+ background-color: white;
+ border-radius: 20rpx;
+ max-height: 800rpx;
+ overflow: auto;
+}
+
+.popup-title {
+ font-weight: 28rpx;
+ font-weight: bold;
+ padding-bottom: 20rpx;
+}
+
+.popup-content {
+ text-align: justify;
+}
+
+.popup-close {
+ color: white;
+ text-align: center;
+ padding-top: 20rpx;
+}
+.btn-close {
+ display: inline-block;
+ width: 50rpx;
+ height: 50rpx;
+ line-height: 50rpx;
+ border-radius: 50%;
+ border: 4rpx solid white;
+}
+
+.date {
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ text-align:center;
+}
diff --git a/packageA/pages/chongzhi/chongzhi.js b/packageA/pages/chongzhi/chongzhi.js
new file mode 100644
index 0000000..0847fa0
--- /dev/null
+++ b/packageA/pages/chongzhi/chongzhi.js
@@ -0,0 +1,228 @@
+// packageA//pages/chongzhi/chongzhi.js
+const app = getApp();
+var util = require('../../../utils/util.js');
+
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ url: app.globalData.setting.imghost,
+ imgAd: '',
+ ad_color:'',
+
+ currentIndex: 0,
+ list: null,
+
+ // 检测是否已经发送请求,防止重复发送请求
+ isLoading: false,
+ // 检测是否有更多数据,true为没有更多数据,false为还有数据
+ noMore: false,
+ // 当前页数
+ pageNum: 1,
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+
+
+ var self = this;
+
+ this.getData(true,'/api/weshop/users/pageNewVIPAddMoney',{
+ store_id: app.globalData.userInfo.store_id,
+ user_id: app.globalData.userInfo.user_id,
+ IsPos: 0,
+ });
+
+ app.request.get('/api/weshop/ad/page', {
+ data: {
+ pid: 601,
+ store_id: app.globalData.userInfo.store_id,
+ enabled: 1,
+ },
+ success: function (res) {
+ // console.log('604',res.data.data[0].ad_code);
+ if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0 ){
+ var a = res.data.data.pageData;
+ self.setData({
+ imgAd: a[0].ad_code,
+ ad_color: a[0].bgcolor,
+ });
+ }
+
+
+ },
+ });
+ },
+
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ console.log('上拉加载');
+ var data = this.data.saveData;
+ // 数据总量
+ var total = this.data.result.total;
+ // 单页最大数据量
+ var pageSize = this.data.result.pageSize;
+
+ if((total !== 0)&&(total <= pageSize)) {
+ this.setData({
+ noMore: true
+ });
+ };
+
+ if(!this.data.isLoading && !this.data.noMore) {
+ this.setData({
+ isLoading: true,
+ pageNum: this.data.pageNum + 1
+ });
+
+ data.page = this.data.pageNum;
+
+ this.getData(false,'/api/weshop/users/pageNewVIPAddMoney',data);
+ };
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ },
+
+
+ onClickTab(e) {
+ var data = {
+ store_id: app.globalData.userInfo.store_id,
+ user_id: app.globalData.userInfo.user_id,
+ page: 1,
+ };
+
+ this.setData({
+ currentIndex: e.target.dataset.index,
+ list: [],
+ });
+
+ if(e.target.dataset.index == 0) {
+ data.IsPos = 0;
+
+ } else {
+ data.IsPos = 1;
+
+ this.setData({
+ saveData: data
+ });
+ }
+ this.getData(true,'/api/weshop/users/pageNewVIPAddMoney',data);
+ },
+
+
+ // 请求数据
+ getData(isInit, url, data, callback) {
+ var self = this;
+ // 请求数据
+ app.request.get(url, {
+ data: data,
+ success: function (res) {
+ console.log('res-->', res);
+ // 请求成功后,把正在请求加载状态置为false
+ self.setData({
+ isLoading: false,
+ });
+ // 检测是否是初始化第一次加载
+ if(isInit) {
+ //第一页数据直接赋值
+ self.setData({
+ list: res.data.data.pageData,
+ // 这里保存了一份完整的响应数据
+ result: res.data.data,
+ });
+ } else {
+ // 下一页的数据拼接在原有数据后面
+ self.setData({
+ list: self.data.list.concat(res.data.data.pageData)
+ });
+ };
+ console.log('result', self.data.list);
+ // 回调函数
+ if(callback) callback();
+ // 1、第一次请求返回的数据为空,显示‘没有更多了’;
+ // 2、后面的请求,如果返回的数据为空,就表示没有下一页了,noMore置为true,这样上拉加载scrollToLower不再发起请求;
+ if((res.data.data.pageData.length === 0) || (res.data.data.total <= res.data.data.pageSize)) {
+ self.setData({
+ noMore: true
+ });
+ };
+ },
+ });
+ },
+
+
+ goDetails(e) {
+ let id = e.currentTarget.dataset.id;
+ app.goto('../chongzhiDetails/chongzhiDetails?id=' + id+"&type=1");
+ },
+
+ viewDetails(e){
+ var index=e.currentTarget.dataset.index;
+ var WriteOffCode=this.data.list[index].WriteOffCode;
+ var qrcode = this.selectComponent("#qrcode"); //组件的id
+ var code=WriteOffCode;
+ var e={is_fw:1,val:code,code:code}
+ qrcode.open(e);
+
+ },
+
+ // 检测上拉滚动到底部
+ // scrollToLower: function (requestData, callback) {
+ // // 数据总量
+ // var total = this.data.result.total;
+ // // 单页最大数据量
+ // var pageSize = this.data.result.pageSize;
+
+ // if((total !== 0)&&(total <= pageSize)) {
+ // this.setData({
+ // noMore: true
+ // });
+ // };
+
+ // if(!this.data.isLoading && !this.data.noMore) {
+ // this.setData({
+ // isLoading: true,
+ // pageNum: this.data.pageNum + 1
+ // });
+
+ // requestData.data.page = this.data.pageNum;
+
+ // this.getData(false, requestData, callback);
+ // };
+ // },
+
+
+ onerror:function(e){
+ var _errImg = e.currentTarget.dataset.errimg;
+ var _errObj = {};
+ _errObj[_errImg] = "/miniapp/images/default_g_img.gif";
+ this.setData(_errObj);
+ }
+})
\ No newline at end of file
diff --git a/packageA/pages/chongzhi/chongzhi.json b/packageA/pages/chongzhi/chongzhi.json
new file mode 100644
index 0000000..dd864e1
--- /dev/null
+++ b/packageA/pages/chongzhi/chongzhi.json
@@ -0,0 +1,8 @@
+{
+ "navigationBarTitleText": "充值有礼",
+ "enablePullDownRefresh": false,
+ "usingComponents": {
+ "nodata": "/components/nodata/nodata",
+ "qrcode":"/components/qr_code/qr_code"
+ }
+}
\ No newline at end of file
diff --git a/packageA/pages/chongzhi/chongzhi.wxml b/packageA/pages/chongzhi/chongzhi.wxml
new file mode 100644
index 0000000..43de412
--- /dev/null
+++ b/packageA/pages/chongzhi/chongzhi.wxml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+ 待核销
+ 已核销
+
+
+
+
+
+
+
+
+
+
+
+ {{item.ActName}}
+
+ 零售价:¥{{item.PosPrice}}
+ {{(currentIndex == 0 ? '兑换截止日期': '核销时间') + ':' + item.BeginDate + '至' + item.EndDate}}
+
+
+
+
+
+ 立即使用
+ 详情
+
+
+ 已核销
+ 详情
+
+
+
+
+ - 已全部加载 -
+
+
+ 暂无数据
+
+
+
+
+
\ No newline at end of file
diff --git a/packageA/pages/chongzhi/chongzhi.wxss b/packageA/pages/chongzhi/chongzhi.wxss
new file mode 100644
index 0000000..e57de1f
--- /dev/null
+++ b/packageA/pages/chongzhi/chongzhi.wxss
@@ -0,0 +1,130 @@
+/* packageA/pages/chongzhi/chongzhi.wxss */
+@charset "utf-8";
+
+page {
+ /* background-color: #FA437E; */
+}
+
+.banner-container {
+ height: 400rpx;
+}
+
+
+.title {
+ background-color: white;
+ position: relative;
+}
+
+.title::after {
+ content: '';
+ position: absolute;
+ width: 2rpx;
+ height: 50%;
+ background-color: #f5f5f5;
+ left: 0;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ margin: auto;
+}
+
+.t-item {
+ width: 50%;
+ text-align: center;
+ line-height: 100rpx;
+ font-size: 30rpx;
+ position: relative;
+}
+
+.t-item.active {
+ color: #FE6867;
+ font-weight: bold;
+}
+
+.t-item.active::after {
+ content: '';
+ position: absolute;
+ width: 10%;
+ height: 4rpx;
+ background-color: #FE6867;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ margin: 0 auto;
+}
+
+
+.list {
+ padding: 0 20rpx;
+ overflow: hidden;
+}
+
+.l-item {
+ padding: 20rpx;
+ background-color: white;
+ border-radius: 16rpx;
+ margin-top: 20rpx;
+}
+.img-block {
+ display: block;
+ width: 100%;
+ height: 100%;
+ background-color: #ccc;
+}
+
+
+.top {
+ padding-bottom: 20rpx;
+ border-bottom: 2rpx solid #f2f2f2;
+}
+.bottom {
+ padding-top: 20rpx;
+ text-align: right;
+}
+.left {
+ width: 200rpx;
+ height: 200rpx;
+ flex-shrink: 0;
+ padding-right: 20rpx;
+}
+.right {
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+}
+
+.price {
+ text-decoration:line-through;
+}
+
+.date {
+ padding-top: 10rpx;
+ color: #FE6867;
+}
+
+.btn {
+ display: inline-block;
+ background-color: #FE6867;
+ color: white;
+ padding: 20rpx 60rpx;
+ font-size: 24rpx;
+ border-radius: 8rpx;
+}
+.btn.details{
+ margin-left: 8rpx; background-color: #ff9a00;
+}
+
+.nodata {
+ text-align: center;
+ /* background-color: #f2f2f2; */
+}
+
+.no-more {
+ line-height: 3;
+ color: #ccc;
+ font-size: 26rpx;
+}
+
+.t-c {
+ text-align: center;
+}
\ No newline at end of file
diff --git a/packageA/pages/chongzhi/g_filter.wxs b/packageA/pages/chongzhi/g_filter.wxs
new file mode 100644
index 0000000..f9bd741
--- /dev/null
+++ b/packageA/pages/chongzhi/g_filter.wxs
@@ -0,0 +1,11 @@
+var is_acting = function(endtime){
+ //判断结束时间减去当前时间 ,如果当前时间大于0则为True
+ endtime = endtime.substring(0, 19);
+ var reg = getRegExp("-", "g");
+ endtime = endtime.replace(reg, '/');
+ var bijiao = getDate(endtime) - getDate();
+ return bijiao > 0 ? true : false;
+}
+module.exports = {
+ is_acting:is_acting
+}
\ No newline at end of file
diff --git a/packageA/pages/chongzhiDetails/chongzhiDetails.js b/packageA/pages/chongzhiDetails/chongzhiDetails.js
new file mode 100644
index 0000000..f2608dd
--- /dev/null
+++ b/packageA/pages/chongzhiDetails/chongzhiDetails.js
@@ -0,0 +1,255 @@
+// packageA//pages/chongzhiDetails/chongzhiDetails.js
+var util = require('../../../utils/util.js');
+const app = getApp(),os = app.globalData.setting;
+var regeneratorRuntime = require('../../../utils/runtime.js');
+
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ showCode: false,
+ result: null,
+ show_img:null,
+ url: app.globalData.setting.imghost,
+ type:0, //0是立即充值 1是购买后的
+ is_buying:0,
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+
+ const self = this;
+ if(options.type)
+ self.setData({type:options.type});
+
+ var UserInfo=app.globalData.userInfo;
+ if(!UserInfo) {
+ getApp().goto("/pages/togoin/togoin");
+ return false;
+ }
+
+
+ getApp().request.get("/api/wx/weappSendlist/page", {
+ data: {
+ store_id: os.stoid,
+ typeid: "1002"
+ },
+ success: function(res) {
+ if (res.data.code == 0 && res.data.data.pageData.length > 0) {
+ var template_id = res.data.data.pageData[0].template_id;
+ self.setData({template_id:template_id});
+
+ }
+ },
+ })
+
+
+ getApp().request.promiseGet("/api/weshop/ad/page",{
+ data:{store_id:os.stoid,enabled:1,pid:601}
+ }).then(res=>{
+ if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0){
+ var a = res.data.data.pageData;
+ self.setData({show_img:a[0].ad_code,ad_color:a[0].bgcolor});
+ }
+ })
+
+ var api="/api/weshop/users/getAddmoneyactDetails";
+ if(options.type==1){
+ api="/api/weshop/users/getBuyaddmoneyactDetails";
+ }
+
+ app.request.get(api, {
+ data: {
+ Id:options.id,
+ store_id:os.stoid,
+ user_id: UserInfo.user_id,
+ },
+ success: function (res) {
+ var result=res.data.data;
+
+ var now=new Date();
+ var reg = RegExp("-", "g");
+ var endtime = result.EndDate.replace(reg, '/');
+ var end=new Date(endtime);
+ result.is_acting=1;
+ if(end {
+ console.log(res);
+ this.data.is_buying=0;
+ if(res.data.code!=0){
+ getApp().confirmBox(res.data.msg);
+ return false;
+ }
+
+
+ var msg = res.data.data;
+ var parentSn = msg.order_sn;
+ var store_id = os.stoid;
+ getApp().request.post("/api/weshop/order/pay/createRechargeOrder", {
+ data: {
+ parentSn: parentSn,
+ store_id: store_id
+ },
+ success: function (su) {
+ console.log("su是什么",su);
+ var n=su.data.data;
+ console.log("su是什么", su);
+
+ e.weixinPay(n,
+ function () {
+ e.jumpPaymentPage();
+ }, function () {
+ getApp().showWarning("支付失败");
+ })
+ }
+ })
+ })
+ },
+ //------支付成功页面--------
+ jumpPaymentPage: function () {
+ wx.redirectTo({
+ url:"msg/msg",
+ });
+ },
+
+ //------调起支付框--------
+ weixinPay: function (n, success, fail) {
+ wx.requestPayment({
+ timeStamp: String(n.timeStamp),
+ nonceStr: n.nonceStr,
+ package: n.packageValue,
+ signType: n.signType,
+ paySign: n.paySign,
+ success: function (n) {
+ console.log(n), getApp().showSuccess("支付成功!");
+ "function" == typeof success && success();
+ wx.redirectTo({
+ url: "../deposit/deposit"
+ });
+ },
+ fail: function (n) {
+ console.log(n), "requestPayment:fail" == n.errMsg ? getApp().showWarning("支付失败") : "requestPayment:fail cancel" == n.errMsg ? getApp().showWarning("您已取消支付") : getApp().showWarning("支付失败:" + n.errMsg.substr("requestPayment:fail ".length)),
+ "function" == typeof fail && fail();
+ }
+ });
+ },
+
+ //订阅消息提醒
+ sendsm:function(func)
+ {
+ var template_id = this.data.template_id;
+ //授权订阅
+ wx.requestSubscribeMessage({
+ tmplIds: [template_id],
+ success(res) {
+ func();
+ },
+ fail(res) {
+ func();
+ }
+ })
+ },
+})
\ No newline at end of file
diff --git a/packageA/pages/chongzhiDetails/chongzhiDetails.json b/packageA/pages/chongzhiDetails/chongzhiDetails.json
new file mode 100644
index 0000000..a6f879b
--- /dev/null
+++ b/packageA/pages/chongzhiDetails/chongzhiDetails.json
@@ -0,0 +1,7 @@
+{
+ "navigationBarTitleText": "充值有礼",
+ "enablePullDownRefresh": false,
+ "usingComponents": {
+ "qrcode":"/components/qr_code/qr_code"
+ }
+}
\ No newline at end of file
diff --git a/packageA/pages/chongzhiDetails/chongzhiDetails.wxml b/packageA/pages/chongzhiDetails/chongzhiDetails.wxml
new file mode 100644
index 0000000..170d1e7
--- /dev/null
+++ b/packageA/pages/chongzhiDetails/chongzhiDetails.wxml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+ 女王专享
+ 你的美丽我来缔造
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.CouponSum}}元优惠券
+ {{item.Integral}}积分
+ {{item.GradeSum}}成长值
+ {{item.GiveName}}
+
+ 数量:{{item.Qty}}
+
+
+
+
+
+
+
+
+ 立即充值
+
+ 立即使用
+ 已核销
+
+
+
+ 已核销
+
+
+
+
+
+
diff --git a/packageA/pages/chongzhiDetails/chongzhiDetails.wxss b/packageA/pages/chongzhiDetails/chongzhiDetails.wxss
new file mode 100644
index 0000000..70cfcf9
--- /dev/null
+++ b/packageA/pages/chongzhiDetails/chongzhiDetails.wxss
@@ -0,0 +1,146 @@
+/* packageA//pages/chongzhiDetails/chongzhiDetails.wxss */
+@charset "utf-8";
+.c-y {
+ color: #FFC736;
+}
+
+.pdv10 {
+ padding-top: 10rpx;
+ padding-bottom: 10rpx;
+}
+
+.txt-justify {
+ text-align: justify;
+}
+
+.container {
+ background-color: white;
+ padding-bottom: 120rpx;
+}
+
+.banner-container {}
+
+.list {
+ /* padding: 0 20rpx;
+ background-color: skyblue; */
+}
+
+.list-item {
+ align-items: center;
+ padding: 20rpx;
+}
+
+
+.title-container {
+ padding:40rpx;
+ background-color: white;
+ letter-spacing:2px;
+}
+
+.title {
+ text-align: center;
+ position: relative;
+ color: #FFC736;
+ font-weight: bold;
+}
+
+.title::before,
+.title::after {
+ content: '';
+ position: absolute;
+ width: 15%;
+ height: 2rpx;
+ background-color: #FFC736;
+ top: 0;
+ bottom: 0;
+ margin: auto 0;
+}
+
+.title::before {
+ left: 40rpx;
+}
+
+.title::after {
+ right: 40rpx;
+}
+
+.avatar {
+ width: 120rpx;
+ height: 120rpx;
+ line-height: 120rpx;
+ border-radius: 50%;
+ background-color: pink;
+ flex-shrink: 0;
+ text-align: center;
+}
+
+.avatar image{ width: 100%; height: 100%;}
+
+.icon-meirong2 {
+ color: white;
+ font-size: 64rpx;
+}
+
+.info {
+ padding-left: 40rpx;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ flex: 1;
+}
+
+
+.btn-container {
+ position: fixed;
+ width: 100%;
+ bottom: 0;
+ text-align: center;
+ padding: 20rpx 0;
+ background-color: white;
+ border-top: 1rpx solid #f2f2f2;
+}
+
+.btn {
+ display: inline-block;
+ background-color: #FFC736;
+ color: white;
+ padding: 20rpx 160rpx;
+ border-radius: 40rpx;
+ font-size: 28rpx;
+}
+
+.img-block {
+ display: block;
+ width: 100%;
+ height: 100%;
+}
+
+.qr-container {
+ position: fixed;
+ background-color: rgba(0,0,0,.4);
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+}
+.qr {
+ background-color: white;
+ width: 80%;
+ height: 600rpx;
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ margin: auto;
+ text-align: center;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+}
+
+.qr-img {
+ width: 500rpx;
+ height: 500rpx;
+ margin: 0 auto;
+}
\ No newline at end of file
diff --git a/packageA/pages/chongzhiDetails/g_filter.wxs b/packageA/pages/chongzhiDetails/g_filter.wxs
new file mode 100644
index 0000000..f9bd741
--- /dev/null
+++ b/packageA/pages/chongzhiDetails/g_filter.wxs
@@ -0,0 +1,11 @@
+var is_acting = function(endtime){
+ //判断结束时间减去当前时间 ,如果当前时间大于0则为True
+ endtime = endtime.substring(0, 19);
+ var reg = getRegExp("-", "g");
+ endtime = endtime.replace(reg, '/');
+ var bijiao = getDate(endtime) - getDate();
+ return bijiao > 0 ? true : false;
+}
+module.exports = {
+ is_acting:is_acting
+}
\ No newline at end of file
diff --git a/packageA/pages/goods_share/goods_share.js b/packageA/pages/goods_share/goods_share.js
index 35948dc..40ae229 100644
--- a/packageA/pages/goods_share/goods_share.js
+++ b/packageA/pages/goods_share/goods_share.js
@@ -96,28 +96,32 @@ Page({
var sw_arr=JSON.parse(swithc_list);
//---如果后台又开等级卡的开关---
if(sw_arr.rank_switch && sw_arr.rank_switch=="2"){
- th.setData({rank_switch:true});
- var user=getApp().globalData.userInfo;
- var ti=setInterval(function(){
- if(!user) return false;
- clearInterval(ti);
+ th.setData({rank_switch:true});
+ var user=getApp().globalData.userInfo;
+
//---回调卡的列表---
th.getPlusCardType(function(ob){
- th.setData({card_list:ob.card_list});
- if(user.card_field ){
- var str = user['card_expiredate'].replace(/-/g, '/');
- var end = new Date(str);
- end = Date.parse(end) / 1000;
- var now = ut.gettimestamp();
- //--- 判断是等级会员,且在有效期范围内 ---
- if(user.card_field && now4) card_name=card_name.substring(0,4);
- th.setData({card_field:user.card_field,card_name:card_name,card_list:ob.card_list});
- }
- }
- })
- },500)
+ th.setData({card_list:ob.card_list});
+
+ var ti=setInterval(function(){
+ if(!user) return false;
+ clearInterval(ti);
+
+ if(user.card_field ){
+ var str = user['card_expiredate'].replace(/-/g, '/');
+ var end = new Date(str);
+ end = Date.parse(end) / 1000;
+ var now = ut.gettimestamp();
+ //--- 判断是等级会员,且在有效期范围内 ---
+ if(user.card_field && now4) card_name=card_name.substring(0,4);
+ th.setData({card_field:user.card_field,card_name:card_name,card_list:ob.card_list});
+ }
+ }
+ },1000)
+ })
+
}
});
},
@@ -277,7 +281,7 @@ Page({
var card_name_map=new Map();
var user = getApp().globalData.userInfo;
for (var i = 0; i < plusCard.length; i++) {
- if ((user.card_field==null || user.card_field=="") && (plusCard[i].IsStopBuy==true)) {
+ if ((!user || user.card_field==null || user.card_field=="") && (plusCard[i].IsStopBuy==true)) {
continue;
}
var name="card"+plusCard[i].CorrPrice.toLowerCase();
diff --git a/packageA/pages/goods_share/goods_share.wxml b/packageA/pages/goods_share/goods_share.wxml
index ec817b0..57dee07 100644
--- a/packageA/pages/goods_share/goods_share.wxml
+++ b/packageA/pages/goods_share/goods_share.wxml
@@ -42,20 +42,37 @@
data-errorimg="list[{{index}}].original_img">
- {{item.goods_name}}
- ¥{{item.shop_price}}
-
-
-
-
- PLUS¥{{item[card_field]}}
-
-
-
- PLUS¥{{g_filter.get_card_price(item,card_list,0)}}
-
-
-
+ {{item.goods_name}}
+
+
+ ¥{{item.shop_price}}
+ ¥{{item.market_price}}
+
+
+
+
+
+
+
+
+
+
+ {{card_name}}
+
+ ¥{{filter.toFix(item[card_field],2)}}
+
+
+
+
+
+
+ {{g_filter.get_card_price(item,card_list,1)}}
+
+ ¥{{g_filter.get_card_price(item,card_list,0)}}
+
+
+
+
已售:{{item.sales_sum}}
diff --git a/packageA/pages/goods_share/goods_share.wxss b/packageA/pages/goods_share/goods_share.wxss
index d88b837..969bd02 100644
--- a/packageA/pages/goods_share/goods_share.wxss
+++ b/packageA/pages/goods_share/goods_share.wxss
@@ -116,3 +116,28 @@ page {
margin-left: 10rpx;
margin-right: 5rpx;
}
+
+.card_bg {
+ box-sizing: border-box;
+ padding: 2rpx 10rpx;
+ height: 28rpx;
+ border-radius: 26rpx;
+ font-size: 18rpx;
+ line-height: 28rpx;
+ max-width: 210rpx;
+ background: #333;
+ color: #fff;
+ margin-left: 8rpx;
+}
+
+.card_bg image {
+ width: 19rpx;
+ height: 19rpx;
+ margin-right: 8rpx;
+}
+
+.txt_line{
+ text-decoration: line-through; position: relative;
+ top: 23rpx;color: #adadad;
+ font-size: 24rpx; margin-left: 10rpx;
+ }
diff --git a/packageA/pages/jfbuy/jfbuy.js b/packageA/pages/jfbuy/jfbuy.js
index 9cd3b51..76c92f3 100644
--- a/packageA/pages/jfbuy/jfbuy.js
+++ b/packageA/pages/jfbuy/jfbuy.js
@@ -18,7 +18,8 @@ Page({
active1: false,
// 控制佣金
active2: false,
- url: oo.imghost,
+ url: oo.imghost,
+ h5_url:oo.h5_url,
//popup
hiddenPopup: true,
// 排序
@@ -356,4 +357,12 @@ Page({
th.isPullDownRefresh = false;
});
},
+
+ // 点击查看
+ viewItemDetails:function(e){
+ var index=e.currentTarget.dataset.index;
+ var item=this.data.list2[index];
+ var url="/pages/goods/goodsInfo/goodsInfo?goods_id="+item.goods_id;
+ getApp().goto(url);
+ }
})
\ No newline at end of file
diff --git a/packageA/pages/jfbuy/jfbuy.wxml b/packageA/pages/jfbuy/jfbuy.wxml
index ee9e04f..04be247 100644
--- a/packageA/pages/jfbuy/jfbuy.wxml
+++ b/packageA/pages/jfbuy/jfbuy.wxml
@@ -6,12 +6,14 @@
搜索
-->
-
-
+
+
+
+ 小积分大作为
+ 积分抵用现金,积少成多
+
-
-
-
+
@@ -32,7 +34,7 @@
bindrefresherrefresh="onPullDownRefresh">
-
+
-
-
+
暂无数据
- 已全部加载 -
diff --git a/packageA/pages/jfbuy/jfbuy.wxss b/packageA/pages/jfbuy/jfbuy.wxss
index 3bb8aae..9c86464 100644
--- a/packageA/pages/jfbuy/jfbuy.wxss
+++ b/packageA/pages/jfbuy/jfbuy.wxss
@@ -105,7 +105,7 @@ page {
margin-left: 8rpx;
}
.list-container {
- height: calc(100% - 360rpx);
+ height: calc(100% - 320rpx);
/* height: 100%; */
}
.list {
@@ -420,10 +420,13 @@ radio .wx-radio-input.wx-radio-input-checked::before{
} */
.banner-container {
- height: 360rpx;
+ height: 320rpx;
}
.banner {
display: block;
- width: 100%;
- height: 100%;
+ width: 340rpx;
+ height: 240rpx;
+ margin-left:25rpx;
+ margin-right:25rpx;
+ margin-top: 30rpx;
}
\ No newline at end of file
diff --git a/packageA/pages/quan_pro/quan_pro.js b/packageA/pages/quan_pro/quan_pro.js
index c44ecfe..0d7b01d 100644
--- a/packageA/pages/quan_pro/quan_pro.js
+++ b/packageA/pages/quan_pro/quan_pro.js
@@ -119,6 +119,11 @@ Page({
}
})
},
+
+ go_quan:function(){
+ //跳转到券列表
+ getApp().goto("/pages/user/coupons/coupons");
+ }
});
diff --git a/pages/cart/cart/cart.js b/pages/cart/cart/cart.js
index d273477..3c7aa22 100644
--- a/pages/cart/cart/cart.js
+++ b/pages/cart/cart/cart.js
@@ -27,10 +27,9 @@ Page({
isadd: 0, //是否可以加商品数量
card_field:"",
- bconf:null,
-
+ bconf:null,
+ btn_click:1,
},
-
onLoad: function() {
var a = this,ee=a;
//----获取系统参数-----
@@ -50,8 +49,6 @@ Page({
a.getCardList();
});
-
-
},
onShow: function() {
@@ -65,6 +62,7 @@ Page({
}
var th = this;
+ this.setData({requestData:null,is_load:0});
//调用底部导航
//t.editTabBar(th,getApp().globalData.setting.stoid,getApp().globalData.url);
this.getCardList();
@@ -170,7 +168,7 @@ Page({
var tt = ut.gettimestamp();
//如果商品下架了,或者商品是赠品,一开始都要清除
- if ((good.down_time > 0 && good.down_time < tt) || good.is_on_sale == 0 || item.is_gift) {
+ if ((good.down_time > 0 && good.down_time < tt) || good.is_on_sale == 0) {
var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
getApp().request.delete(url, {
success: function (t) {
@@ -204,13 +202,13 @@ Page({
var r_data = res.data.data;
if (!r_data.promGoodsLists) {
var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
- a.delete(url, {});
+ getApp().request.delete(url, {});
//商品已经下架
isok = 0;
}
} else {
var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
- a.delete(url, {});
+ getApp().request.delete(url, {});
//商品已经下架
isok = 0;
}
@@ -275,6 +273,7 @@ Page({
is_edit: 0
}),
th.doCheckAll(), wx.stopPullDownRefresh();
+
}
});
},
@@ -300,27 +299,42 @@ Page({
},
//-----------------点击输入修改商品数量---------------
- valueToNum: function(t) {
- var a = t.currentTarget.dataset.item;
- var b = t.currentTarget.dataset.pitems;
- a = this.data.requestData[b].goods[a];
- var e = a;
- if (a = isNaN(t.detail.value) || t.detail.value < 1 ? 1 : parseInt(t.detail.value)) {
- var s = {
- goods_num: a,
- goods_id: e.goods_id,
- id: e.id,
- store_id: oo.stoid
- };
- this.postCardList(s, t.currentTarget.dataset.item, t.currentTarget.dataset.pitems);
- }
+ valueToNum: function(t) {
+ if(!this.data.is_load) return false;
+ //控制住,避免事件响应冲突,只有input有输入的时候,才刷新
+ if(this.data.btn_click){
+ return false;
+ }
+ this.data.btn_click=1;
+
+ var a = t.currentTarget.dataset.item;
+ var b = t.currentTarget.dataset.pitems;
+ a = this.data.requestData[b].goods[a];
+ var e = a;
+ var th=this;
+
+
+
+ if (a = isNaN(t.detail.value) || t.detail.value < 1 ? 1 : parseInt(t.detail.value)) {
+ var s = {
+ goods_num: a,
+ goods_id: e.goods_id,
+ id: e.id,
+ store_id: oo.stoid
+ };
+ th.postCardList(s, t.currentTarget.dataset.item, t.currentTarget.dataset.pitems);
+ }
+
+
+
},
//-------------加数量---------------------
addNum: function(t) {
+ if(!this.data.is_load) return false;
if (this.data.up_dating == 1) return false;
this.data.up_dating = 1;
-
+
var a = t.currentTarget.dataset.item;
var b = t.currentTarget.dataset.pitems;
a = this.data.requestData[b].goods[a];
@@ -344,9 +358,14 @@ Page({
},
//-------------减数量---------------------
subNum: function(t) {
+ if(!this.data.is_load) return false;
+ if (this.data.up_dating == 1) return false;
+ this.data.up_dating = 1;
+
var a = t.currentTarget.dataset.item;
var b = t.currentTarget.dataset.pitems;
a = this.data.requestData[b].goods[a];
+ this.data.btn_click=1;
if (a.goods_num - 1 < 0) return false;
@@ -367,6 +386,8 @@ Page({
tfeel = 0,
t_num = 0,
text_arr = "";
+ this.data.btn_click=1;
+
for (var i = 0; i < dda.length; i++) {
var item = dda[i].goods;
if (!e.data.checkAllToggle) {
@@ -419,11 +440,12 @@ Page({
},
//------门店全选按钮,要判断是否门店的匹配方式一致---------
- check_th_all_item: function(ele) {
+ check_th_all_item:async function(ele) {
var e = this,
pitems = ele.currentTarget.dataset.pitems,
item = this.data.requestData[pitems].goods,
sele = this.data.requestData[pitems].selected;
+ this.data.btn_click=1;
var isok = 1,
fir = 0,
@@ -462,18 +484,19 @@ Page({
e.setData({
[txt]: Number(!sele),
});
- e.check_prom_activity(pitems);
+ await e.check_prom_activity(pitems);
this.doCheckAll();
},
//---------------单选,也要判断门店的配送方式是否一致--------------
- check_th_item: function(t) {
+ check_th_item: async function(t) {
var e = this,
item = t.currentTarget.dataset.item,
pitems = t.currentTarget.dataset.pitems;
a = this.data.requestData[pitems].goods[item];
var isok = 1,fir = 0;
var iarr = e.data.requestData[pitems].goods;
+ this.data.btn_click=1;
//当数量大于1,且是选择的时候
@@ -508,7 +531,7 @@ Page({
if(a.prom_type==3){
//判断商品是不是优惠活动
- e.check_prom_activity(pitems);
+ await e.check_prom_activity(pitems);
}
this.doCheckAll();
@@ -554,6 +577,7 @@ Page({
//----------------------更新购物数量,加减,调用接口---------------------
postCardList: function(t, item, pitem) {
+
var e = this,th=e;
var user_id = getApp().globalData.user_id;
console.log('update');
@@ -800,17 +824,18 @@ Page({
//--更新购物车---
update_cart: function(t, pitem, item) {
var e = this;
+
getApp().request.put("/api/weshop/cart/update", {
data: t,
- success: function(ee) {
+ success:async function(ee) {
var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num";
- e.data.up_dating = 0
+
e.setData({
[txt]: t.goods_num,
});
- for(var i in e.data.requestData){
- e.check_prom_activity(i)
- }
+ //for(var i in e.data.requestData){
+ await e.check_prom_activity(pitem)
+ //}
e.doCheckAll();
getApp().requestCardNum(e);
}
@@ -824,6 +849,14 @@ Page({
//--------------去结算------------
async checkout() {
+
+ if(!this.data.is_load) return false;
+ if(this.data.up_dating) {
+ wx.showLoading({
+ title:"计算中"
+ })
+ }
+
var glist = ""; //用逗号隔开的
var map = new Map(); //使用map值键进行运算
var map_limit = new Map(); //使用map值键进行存储限购
@@ -1156,15 +1189,17 @@ Page({
var make_up_arr=new Array();
var th=this;
var map=new Map();
- var list=this.data.requestData[cindex];
+ var list= JSON.parse(JSON.stringify(this.data.requestData[cindex]));
//循环处理活动,看活动商品的数量,用map来出来存储,key为活动id,值是数量
- for(var i in list.goods){
+
+ for(var i=0;i {
@@ -1216,6 +1255,9 @@ Page({
}
continue;
}
+
+ t_prom_list.push(prom);
+
//---读取打折的详情---
var ob=p_item[1];var discount=null;
await getApp().request.promiseGet("/api/weshop/goods/getDiscount",{
@@ -1251,6 +1293,8 @@ Page({
gift_id:discount.gift_id
};
+
+ /*---
if(map2.has(p_item[0]+"")){
var index=map2.get(p_item[0]+"");
if( list.goods[index].goods_num!=discount.bs){
@@ -1268,7 +1312,11 @@ Page({
});
}
- }else{
+ }else{---*/
+ var url="/api/weshop/cart/delGift?store_id="+newd.store_id+"&user_id="
+ +newd.user_id+"&goods_id="+newd.goods_id+"&is_gift=1&pick_id="+newd.pick_id;
+ await getApp().request.promiseDelete(url, {})
+
var add_data=null;
await getApp().request.promisePost("/api/weshop/cart/save", { data: newd }).then(res=>{
if(res.data.code==0){
@@ -1279,37 +1327,44 @@ Page({
newd.id=add_data.id;
list.goods.push(newd);
}
- }
+ //}
}
-
-
-
- //-- 获取 --
- await getApp().request.promiseGet("/api/weshop/promgoodslist/list",{
- data:{prom_id:prom.id}
- }).then(res=>{
- if(res.data.code==0){
- var list=res.data.data;
- for(var i in list){
- var item=list[i];
- if(item.prom_type==0){
- if(ob.price{
+ if(res.data.code==0){
+ var list=res.data.data;
+ for(var i in list){
+ var item=list[i];
+ if(item.prom_type==0){
+ if(ob.price0){
@@ -1332,5 +1387,9 @@ Page({
if(!url || url=='') return;
if(url[0]!='/') url='/'+url;
getApp().goto(url);
- }
+ },
+
+ refresh_input:function(){
+ this.data.btn_click=0;
+ }
});
\ No newline at end of file
diff --git a/pages/cart/cart/cart.wxml b/pages/cart/cart/cart.wxml
index 3afb2e6..25882b7 100644
--- a/pages/cart/cart/cart.wxml
+++ b/pages/cart/cart/cart.wxml
@@ -79,7 +79,9 @@
一
-
+
+
diff --git a/pages/cart/cart2/cart2.js b/pages/cart/cart2/cart2.js
index 8ca850f..0367d4f 100644
--- a/pages/cart/cart2/cart2.js
+++ b/pages/cart/cart2/cart2.js
@@ -208,10 +208,10 @@ Page({
});
//--更新默认地址--,看一下是不是跳到地址页面
- if(!getApp().globalData.is_cart2_old){
+ if(!getApp().globalData.is_cart_old){
this.update_code();
}else{
- getApp().globalData.is_cart2_old=0;
+ getApp().globalData.is_cart_old=0;
}
}
@@ -317,41 +317,54 @@ Page({
//----------------展示页面,是再获取用户信息之后--------------
show_page:function(){
var th=this,ta = this.data.param;
- th.setData({
- userinfo: getApp().globalData.userInfo,});
-
- //选获取地址
- th.getuser_addr(function(addr){
- th.setData({user_addr: addr});
- //--------------------------立即购买------------------
- if(ta.is_bnow== 1){
- //读取门店
- to.get_allsto(function (e) {
- th.setData({ allsto: e });
- //获取立即购买的商品信息
- th.get_buy_goods(ta.goods_id);
- });
- }else {
- //------------------------购物车结算----------------------
- //读取门店
- to.get_allsto(function (e) {
- th.setData({ allsto: e });
- //-------获取购物车已经选择的商品--------
- th.get_cart();
- })
- }
- });
- //获取提现金额
- getApp().request.get("/api/weshop/withdrawals/summoney", {
- data: { user_id: to.globalData.user_id, store_id: oo.stoid, status: 0 },
- success: function (su) {
- if (su.data.code == 0) {
- var yuer = parseFloat(th.data.userinfo.user_money -
- (th.data.userinfo.frozen_money>0?th.data.userinfo.frozen_money:0) - su.data.data.summoney).toFixed(2);
- th.setData({ txmon: su.data.data.summoney, yuer: yuer });
- }
- }
- });
+ //th.setData({ userinfo: getApp().globalData.userInfo,}); //这个余额被缓存了
+
+ //会员的信息,要获取最新
+ var user=getApp().globalData.userInfo;
+ getApp().request.get("/api/weshop/users/get/" + oo.stoid + "/" + user.user_id, {
+ data:{r:Math.random()},
+ success: function (e) {
+ getApp().globalData.userInfo = e.data.data;
+ th.setData({userinfo:e.data.data});
+
+ //选获取地址
+ th.getuser_addr(function(addr){
+ th.setData({user_addr: addr});
+ //--------------------------立即购买------------------
+ if(ta.is_bnow== 1){
+ //读取门店
+ to.get_allsto(function (e) {
+ th.setData({ allsto: e });
+ //获取立即购买的商品信息
+ th.get_buy_goods(ta.goods_id);
+ });
+ }else {
+ //------------------------购物车结算----------------------
+ //读取门店
+ to.get_allsto(function (e) {
+ th.setData({ allsto: e });
+ //-------获取购物车已经选择的商品--------
+ th.get_cart();
+ })
+ }
+ });
+
+ //获取提现金额
+ getApp().request.get("/api/weshop/withdrawals/summoney", {
+ data: { user_id: to.globalData.user_id, store_id: oo.stoid, status: 0 },
+ success: function (su) {
+ if (su.data.code == 0) {
+ var yuer = parseFloat(th.data.userinfo.user_money -
+ (th.data.userinfo.frozen_money>0?th.data.userinfo.frozen_money:0) - su.data.data.summoney).toFixed(2);
+ th.setData({ txmon: su.data.data.summoney, yuer: yuer });
+ }
+ }
+ });
+
+
+ },
+ });
+
},
@@ -370,7 +383,17 @@ Page({
//---是不是购买等级卡成功的返回---等级卡显示的判断---
var is_card_back=getApp().globalData.is_card_back;
+
+ for (var i = 0; i < carr.length; i++) {
+ var item1 = carr[i];
+ //要把优惠活动加入,prom_goods_map中,赠品不要运算
+ if(item1.prom_type==3 && item1.is_gift!=1){
+ await th.add_prom_goods_map(item1);
+ }
+
+ }
+ //在分组的时候,就不要再调用接口,await
for (var i = 0; i < carr.length; i++) {
var item = carr[i];
@@ -397,13 +420,7 @@ Page({
}
}
-
- //要把优惠活动加入,prom_goods_map中,赠品不要运算
- if(item.prom_type==3 && item.is_gift!=1){
- await th.add_prom_goods_map(item);
- }
-
-
+
item.original_img = oo.imghost + item.original_img;
/*----接口要弄出来的,先顶着-----*/
var pcid = item.pick_id;
@@ -471,23 +488,27 @@ Page({
var ie = {
pickup_id: pcid, pname: pikname, goods: narr, wind: m_wind, distr_t: dis_t,card_cut_price:0,exp_type:e_t,
goods_price: 0, shipping_price: 0, user_money: 0, total_amount: 0, order_amount: 0, user_note:0};
-
- //-- 如果是回退回来的情况 --
- if(th.data.cartlist && th.data.cartlist.length>0) {
- for(var kj in th.data.cartlist){
- if(ie.pickup_id==th.data.cartlist[kj].pickup_id){
- ie.exp_type=th.data.cartlist[kj].exp_type;
- break;
- }
- }
- }
-
+
//-- 把等级卡会优惠多少钱装进去 --
if(item.cut_price1) ie.card_cut_price+=item.cut_price1;
arr.push(ie);
}
- }
+ }
+ //-- 如果是回退回来的情况 --
+ if(th.data.cartlist && th.data.cartlist.length>0) {
+ for(var kj in th.data.cartlist){
+ for(var ih in arr){
+ var ie=arr[ih];
+ if(ie.pickup_id==th.data.cartlist[kj].pickup_id){
+ ie.exp_type=parseInt(th.data.cartlist[kj].exp_type);
+ ie.wind=parseInt(th.data.cartlist[kj].wind);
+ break;
+ }
+ }
+ }
+ }
+
//深拷贝
th.data.old_cartlist= JSON.parse(JSON.stringify(arr));
th.setData({
@@ -532,15 +553,20 @@ Page({
case 2: et = 0; break;
}
- if(th.data.bn_goods) et=th.data.bn_exp_type
-
- var m_wind=0,def_exp_code=getApp().globalData.userInfo.def_exp_code;
+
+ var m_wind=0,def_exp_code=getApp().globalData.userInfo.def_exp_code;
if(et==0 && def_exp_code){
for(var k=0;k0){
for(var i =0;i0) o_price-=c_arr[i].cut_price;
- var f_o_price=o_price;
-
//判断包邮券的钱
var q_conditin=0;
q_conditin=o_price;
@@ -1825,7 +1855,7 @@ Page({
'twon': addr == null ? 0 : addr.twon,
'address': addr == null ? "" : addr.address,
'more_address': addr == null ? "" : addr.more_address,
- 'mobile': th.data.userinfo.mobile,
+ 'mobile': addr == null ? th.data.userinfo.mobile : addr.mobile,
'email': '',
'shipping_code': th.data.is_all_zt == 1 ? 0 : th.data.wu_arr[t_item.wind].code,
'shipping_name': th.data.is_all_zt == 1 ? '' : th.data.wu_arr[t_item.wind].name,
diff --git a/pages/cart/cart2_inte/c_filter.wxs b/pages/cart/cart2_inte/c_filter.wxs
new file mode 100644
index 0000000..7216131
--- /dev/null
+++ b/pages/cart/cart2_inte/c_filter.wxs
@@ -0,0 +1,67 @@
+var filters = {
+ toFix:function(val,count){
+ return val.toFixed(count)
+ },
+ format_time:function(ts,isFull) {
+ var d = getDate(ts*1000)
+ var fm=[d.getFullYear(), d.getMonth()+1, d.getDate()].join('-');
+ if(isFull==1)
+ fm=fm + ' '+ [d.getHours(), d.getMinutes(), d.getSeconds()].join(':')
+ return fm;
+ },
+ setcolor:function(ind){
+ if (ind == 0 || ind ==null) return "red";
+ if(ind==1 ) return "green";
+ if(ind==2) return "blue";
+ if(ind==11) return "green";
+ if(ind==12) return "blue";
+ if(ind==20) return "green";
+ return "";
+ },
+ setbgcolor: function (ind) {
+ if (ind == 0 || ind == null) return "#ffa1b9";
+ if (ind == 1) return "#59e1d2";
+ if (ind == 2) return "#a3bcff";
+ if (ind == 11) return "#59e1d2";
+ if (ind == 12) return "#a3bcff";
+ if (ind == 20) return "#6d87cd";
+ return "";
+ },
+
+ get_type:function(ind){
+ if (ind == 0 || ind == null) return "全场通用";
+ if (ind == 1) return "品牌";
+ if (ind == 2) return "品类";
+ if (ind == 11) return "用途";
+ if (ind == 12) return "分类1";
+ if (ind == 20) return "指定单品";
+ return "";
+ },
+ get_type_card:function(ind){
+ if (ind == 0 || ind == null) return "全场通用";
+ if (ind == 1) return "指定品牌";
+ if (ind == 2) return "指定品类";
+ if (ind == 11) return "指定用途";
+ if (ind == 12) return "指定分类1";
+ if (ind == 20) return "指定单品";
+ return "";
+ },
+ format_huiche:function (text) {
+ if (!text) {
+ return "";
+ }
+ var reg = getRegExp('\\\\n', 'g')
+ return text.replace(reg, '\n')
+ }
+}
+
+module.exports = {
+ toFix: filters.toFix,
+ format_time:filters.format_time,
+ setcolor:filters.setcolor,
+ setbgcolor: filters.setbgcolor,
+ get_type: filters.get_type,
+ get_split_name: filters.get_split_name,
+ get_type_card: filters.get_type_card,
+ format_huiche: filters.format_huiche,
+}
\ No newline at end of file
diff --git a/pages/cart/cart2_inte/cart2_inte.js b/pages/cart/cart2_inte/cart2_inte.js
new file mode 100644
index 0000000..c129432
--- /dev/null
+++ b/pages/cart/cart2_inte/cart2_inte.js
@@ -0,0 +1,1088 @@
+var t = getApp(),app=t, a = t.request, e = require("../../../utils/common.js"),
+ s = require("../../../utils/util.js"),ut=s, o = require("../../../utils/md5.js"), to = getApp();
+var oo=t.globalData.setting,os=oo;
+var regeneratorRuntime = require('../../../utils/runtime.js');
+var util_pay = require("../../../utils/pay.js");
+
+Page({
+ data: {
+ url: t.globalData.setting.url,
+ imgUrl: t.globalData.setting.imghost,
+ goods: null,
+ order: null,
+ orderPrices: null,
+ coupons: null,
+ coupon: null,
+ invoiceToggle: !0,
+ payWithUserMoney: !0,
+ payWithPoints: !0,
+ maxWord: 0,
+ enterAddressPage: !1,
+ firstEnter: !0,
+ //页面获取的参数
+ param:null,
+ //提交订单的格式
+ formData: {
+ order_amount:0,//支付金额
+ total_amount:0,//总价
+ all_price:0,//商品卖的总价
+ pay_points: 0,//使用积分
+ user_money: 0,//使用余额
+ couponCode: "",//使用优惠券(多单就用逗号隔开)
+ shipping_price:0,//物流费用
+ },
+
+
+ /*----------------立即购买---------------------*/
+ is_b_now:1, //0是购物车结算 1立即购买
+ bn_goods:null, //立即购买时候的调用商品
+ bn_use_money:0,//是否使用余额
+ bn_exp_type:1, //0是物流 1自提
+ bn_pick:0, //选择的门店
+ bn_pickname: "", //选择的门店名称
+ bn_t_exp_t:0, //判断商品和门店一起决定的物流自提的方式0 都可以 1自提 2物流
+
+ bn_plus_cut_price:0, //显示等级卡会优惠多少钱
+ /*------------------------*/
+ user_addr:null,//物流
+ userinfo:null, //获取会员
+ /*----------物流选择--------*/
+ wu_arr:null,
+ index:0,
+ w_sele_index:0,
+
+ //判断页面是返回回来的还是 首次进入的
+ isclose:1,
+ //申请提现的金额
+ txmon:0,
+ yuer:0,
+ //提交中,不重复提交
+ is_summit_ing:0,
+
+ disabled:0,
+ open_express:0,//控制选择物流名列表 的属性
+
+ is_express:0, //选中物流的属性
+ expres_name:"", //点击选定
+ is_shipping_code:"",//插入用户默认地址
+ wu_arr_txt:"", //要更新的物流的字段
+
+ //如果是全场包邮了,或者是全场不包邮了,就不要选包邮券
+ is_no_by:{},
+ is_by:{},
+ is_quan_by:{},
+ //--购买赠送的商品--
+ buy_now_gift_goods:null,
+ //--订单优惠--
+ order_prom:{},
+ show_submit:0, //提交按钮变正常显示
+
+ },
+ onLoad: function(t) {
+ wx.setNavigationBarTitle({ title: "填写订单",})
+ var th = this;
+ th.data.param=t;
+ //清空is_pick_up
+ getApp().request.put("/api/weshop/useraddress/updatePickUp", {
+ data: {user_id: getApp().globalData.user_id, is_pickup: 0},
+ success: function (s) {
+ }
+ });
+
+ //先获取是否有关闭使用优惠券
+ getApp().getConfig2(function (ee) {
+ var json_d = JSON.parse(ee.switch_list);
+ th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值
+ th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules,rank_switch:json_d.rank_switch});
+
+ var rank_switch=json_d.rank_switch;
+ var max_price=-1;
+ var show_card=null;
+ var name="";
+ //如果有开等级卡的时候,
+ //因为都是调接口,要返回在计算
+ if(rank_switch==2){
+ //-- 获取所有的等级卡, --
+ getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?storeId=" + os.stoid,
+ {}).then(res => {
+ if(res.data.code==0){
+ var plusCard = res.data.data;
+ //-- 循环判断,拿到最贵的那张卡 --
+ for(var ih in plusCard){
+ if(plusCard[ih].IsStopBuy == true){ continue; }
+ if(max_price<0){
+ max_price=plusCard[ih].CardFee;
+ name='card'+plusCard[ih]['CorrPrice'];
+ show_card=plusCard[ih];
+ }else{
+ if(max_price0?th.data.userinfo.frozen_money:0) - su.data.data.summoney).toFixed(2);
+ th.setData({ txmon: su.data.data.summoney, yuer: yuer });
+ }
+ }
+ });
+
+ },
+ })
+
+
+ },
+
+ //-----获取立即购买的商品信息,入口----
+ get_buy_goods: function (e){
+ var th=this;
+ var gg = to.get_b_now();
+ //--------如果goods_id一样,就是要立即购买-----
+ if(e==gg.goods_id){
+ a.get("/api/weshop/goods/get/" + oo.stoid+"/"+e, {
+ success:async function (t) {
+ var gd = t.data.data;
+ t.data.data.original_img = oo.imghost + t.data.data.original_img;
+ t.data.data['buynum'] = gg.goods_num;
+ var distr_t=0,et=0
+ if (t.data.data.distr_type==0){
+ distr_t = gg.pick_dis;
+ }else{
+ distr_t = t.data.data.distr_type;
+ }
+ switch (distr_t){
+ case 0: et=1; break;
+ case 1: et = 1; break;
+ case 2: et = 0; break;
+ }
+
+ if(th.data.bn_goods) et=th.data.bn_exp_type
+
+ var m_wind=0,def_exp_code=getApp().globalData.userInfo.def_exp_code;
+ if(et==0 && def_exp_code){
+ for(var k=0;k0 && gg.goods_price>gd[th.data.card_name] && !th.data.userinfo.card_field){
+ var cut_p= (gg.goods_price-gd[th.data.card_name])*gg.goods_num;
+ th.setData({card_cut_price:cut_p});
+ }
+ }
+
+ switch (gd.prom_type){
+ case 0:
+ case 2:
+ case 3:
+ case 5:
+ case 6:
+ getApp().my_warnning("商品不是积分活动",0,th);
+ wx.navigateBack();
+ break;
+ case 4: //-- 积分购 --
+ getApp().request.get("/api/weshop/integralbuy/pageIntegralBuyGoodsList?stype=1&stypeup=1",{
+ data:{store_id:os.stoid,goods_id:gg.goods_id},
+ success: async function (tt) {
+ if(tt.data.code==0 && tt.data.data && tt.data.data.pageData){
+ var inte_data=tt.data.data.pageData[0];
+ t.data.data.shop_price=inte_data.addmoney;
+ t.data.data.integral=inte_data.integral;
+ th.setData({
+ bn_goods: t.data.data, bn_pickname: gg.pick_name, bn_exp_type: et,index:m_wind,
+ bn_pick: gg.pick_id, bn_t_exp_t: distr_t,bn_exp_type: et
+ });
+ //计算价格
+ th.calculatePrice2();
+ }else{
+ getApp().my_warnning("商品不是积分活动",0,th);
+ wx.navigateBack();
+ }
+ }
+ });
+ break;
+ }
+ },
+ });
+ }
+ },
+
+ //---------------检查是否有收货地址-------------------
+ checkAddressList: function() {
+ var t = this;
+ return !(!this.data.order || null == this.data.order.userAddress) || (wx.showModal({
+ title: "请先填写或选择收货地址~",
+ success: function(a) {
+ a.confirm ? t.enterAddressPage() : wx.navigateBack();
+ },
+ fail: function() {
+ wx.navigateBack();
+ }
+ }), !1);
+ },
+ showInvoice: function() {
+ this.setData({
+ invoiceToggle: !this.data.invoiceToggle
+ });
+ },
+ keyUpChangePay1: function(t) {
+ this.setData({
+ payWithUserMoney: !(t.detail.value.length > 0)
+ });
+ },
+ keyUpChangePay2: function(t) {
+ this.setData({
+ payWithPoints: !(t.detail.value.length > 0)
+ });
+ },
+ keyUpChangeNum: function(t) {
+ this.setData({
+ maxWord: t.detail.value.length
+ });
+ },
+
+
+ //---------计算立即购买----------
+ calculatePrice2: function () {
+ var th = this, good = this.data.bn_goods;
+ wx.showLoading({ title:"处理中.",})
+ //-----------计算商品总价--------------
+ var allpice = good.shop_price * good.buynum;
+ var all_integral=good.integral * good.buynum;
+
+ var cut_price=0;
+ if(good.prom_type==3 && good.prom_price!==null){
+ cut_price=allpice-good.prom_price;
+ }
+ allpice=parseFloat(allpice).toFixed(2);
+ var txt = "formData.all_price";
+ th.setData({ [txt]: allpice, });
+ if(cut_price){
+ var c_txt="formData.cut_price";
+ th.setData({ [c_txt]: cut_price, });
+ }
+ to.getConfig2(function (ee) {
+ to.getwuliuprice(async function (rs) {
+
+ var o_shipping_price = 0, goods_weight = -1, goods_piece = -1;
+ //-----------当地址不为空,且是物流时,计算物流费用,并同时商品不是优惠活动的包邮----------
+ if (th.data.user_addr != null && th.data.bn_exp_type == 0 && good.is_free_shipping == 0 && good.is_past!=1 ){
+
+ switch (good['exp_sum_type']) {
+ case 1:
+ //统一运费
+ o_shipping_price += good['uniform_exp_sum']; break;
+ case 2:
+ if (goods_weight < 0) goods_weight = 0;
+ //累积商品重量 每种商品的重量 * 数量
+ goods_weight += good['weight'] * good['buynum'];break;
+ case 3:
+ if (goods_piece < 0) goods_piece = 0;
+ //累积商品数量
+ goods_piece += good['buynum']; break;
+ }
+
+ var code ="";
+ if(th.data.wu_arr && th.data.wu_arr[th.data.index]) code=th.data.wu_arr[th.data.index].code;
+ var freight_free = ee.freight_free; //全场满多少包邮
+ var no_ex_id=ee.no_ex_id;
+ th.data.is_no_by[th.data.bn_pick]=0;
+
+ var no_by_data=null;
+ var gift_freight_free=freight_free;
+ //有不包邮区域,且不免运费
+ if(no_ex_id && freight_free>0 && freight_free<=allpice-cut_price){
+ //-----------获取不包邮区域,不包邮商品-------
+ await getApp().request.promiseGet("/api/weshop/areaFeemail/getAreaGoods",{
+ data:{store_id:os.stoid,id:no_ex_id}
+ }).then(res=>{
+ if(res.data.code==0){
+ no_by_data=res.data.data[0];
+ //如果有设置不包邮区域的时候
+ if(res.data.data[0].region_list){
+ if(th.check_by_area(res.data.data[0].region_list)){
+ freight_free=0;
+ th.data.is_no_by[th.data.bn_pick]=1;
+ }
+ }
+ //如果有设置不包邮商品
+ if(res.data.data[0].goods_list && freight_free){
+ if(th.check_by_goods(res.data.data[0].goods_list)){
+ freight_free=0;
+ th.data.is_no_by[th.data.bn_pick]=1;
+ }
+ }
+ }
+ })
+ }
+
+ th.data.is_by[th.data.bn_pick]=0;
+ //--------------开始计算物流------------------
+ var shipping_price=
+ th.calculatewuliu(code, o_shipping_price, goods_weight,
+ goods_piece, th.data.user_addr, freight_free, allpice-cut_price, rs);
+ if(shipping_price<=0){
+ th.data.is_by[th.data.bn_pick]=1; //已经是包邮了,就不要选择包邮券
+ }
+
+ shipping_price = parseFloat(shipping_price).toFixed(2);
+ var wl_txt = "formData.shipping_price";
+ th.setData({ [wl_txt]: shipping_price, })
+
+ }else{
+ var wl_txt = "formData.shipping_price";
+ th.setData({ [wl_txt]: 0, })
+ }
+ //---如果有选择优惠券的情况下---
+ var quan_price=0,bn_pick=th.data.bn_pick;
+
+ //-----------------支付价,优惠券不减物流-----------------
+ var total_m = (parseFloat(allpice)).toFixed(2);
+ var order_m = (parseFloat(allpice-cut_price)-quan_price).toFixed(2);
+ var coupon_price=quan_price; //优惠券优惠了多少钱
+ if(order_m<0) {
+ order_m=0;coupon_price=parseFloat(order_m).toFixed(2);
+ }
+
+ //--看一下有没有订单优惠--
+ total_m= parseFloat( total_m)+ parseFloat( th.data.formData.shipping_price);
+ order_m = parseFloat(order_m)+ parseFloat( th.data.formData.shipping_price);
+ var atxt= "formData.total_amount";
+ th.setData({ [atxt]: total_m, })
+
+ var txt = "formData.user_money";
+ var txt2 = "formData.order_amount";
+ var txt4="formData.integral";
+
+ var amoney = parseFloat(th.data.userinfo.user_money - th.data.txmon - th.data.userinfo.frozen_money);
+ //--------------如果使用余额---------------------
+ if (th.data.bn_use_money == 1) {
+ if (amoney> order_m) {
+ order_m = order_m.toFixed(2);
+ th.setData({ [txt]: order_m, [txt2]:0,[txt4]:all_integral,show_submit:1 })
+ }else{
+ order_m =parseFloat(order_m - amoney);
+ order_m = order_m.toFixed(2);
+ th.setData({ [txt]: amoney, [txt2]: order_m,[txt4]:all_integral,show_submit:1 })
+ }
+ }else{
+ th.setData({ [txt]: 0, [txt2]: order_m,[txt4]:all_integral, show_submit:1 })
+ }
+
+ wx.hideLoading();
+
+ });
+ });
+ },
+
+ //--------------------提交订单-----------------------
+ async submitForm(t){
+ var sub_value=t;
+
+ if(this.data.is_summit_ing==1) return false; //--提交中退出--
+ this.data.is_summit_ing=1;
+ var th=this,pdata=new Array();
+ var ff=true;
+ //------------立即购买-------------
+ if (th.data.is_b_now==1 && th.data.bn_goods.prom_type!=5){
+
+ if(th.data.bn_exp_type == 0 && th.data.user_addr==null ){
+ ff = false; getApp().my_warnning("请选择收货地址",0,th);
+ th.data.is_summit_ing = 0;
+ }
+ if (!ff) return false;
+ var addr = th.data.user_addr;
+ if (th.data.bn_exp_type == 1) addr=null;
+
+ if(th.data.bn_exp_type==0)
+ if(th.data.wu_arr==null || th.data.wu_arr.length<=0){
+ getApp().my_warnning("读取物流失败",0,th);
+ th.data.is_summit_ing = 0;
+ return false;
+ }
+
+
+ var integrals=0;
+ var get_datas= {
+ user_id:getApp().globalData.user_id, store_id:o.stoid,
+ };
+ await getApp().request.promiseGet("/api/weshop/users/getAllPoints", {
+ data: get_datas
+ }).then(res => {
+ if(res.data.code==0){
+ integrals=res.data.data.Integral;
+ }
+ })
+
+ //判断积分的情况
+ if(th.data.formData.integral && parseFloat(th.data.formData.integral)< parseFloat(integrals) ){
+ getApp().my_warnning("积分不足",0,th);
+ th.data.is_summit_ing = 0;
+ return false;
+ }
+
+
+ var item={
+ 'user_id': to.globalData.user_id,
+ 'consignee': addr == null ? "" : addr.consignee,
+ 'province': addr == null ? 0 : addr.province,
+ 'city': addr == null ? 0 : addr.city,
+ 'district': addr == null ? 0 : addr.district,
+ 'twon': addr == null ? 0 : addr.twon,
+ 'address': addr == null ? "": addr.address,
+ 'more_address': addr == null ? "" : addr.more_address,
+ //'mobile': th.data.userinfo.mobile,
+ 'mobile': addr == null ? th.data.userinfo.mobile : addr.mobile,
+ 'email':'',
+ 'shipping_code': th.data.bn_exp_type == 1 ? 0 : th.data.wu_arr[th.data.index].code,
+ 'shipping_name': th.data.bn_exp_type == 1 ? '' : th.data.wu_arr[th.data.index].name,
+ 'invoice_title':'',
+ 'goods_price': th.data.formData.all_price, //商品总价
+ 'shipping_price': th.data.formData.shipping_price, //物流金额
+ 'user_money': th.data.formData.user_money, //使用余额
+ 'total_amount': th.data.formData.total_amount, //订单总价
+ 'order_amount': th.data.formData.order_amount, //应付
+ 'user_note': t.detail.value.user_note, //用户备注
+ 'store_id':oo.stoid, //商家
+ 'pickup_id': th.data.bn_pick, //门店
+ 'exp_type': th.data.bn_exp_type, //配送方式
+ 'order_goods':new Array(),
+ 'integral': th.data.formData.integral,
+ };
+ //是不是重新提交
+ if(th.data.is_continue==1) item.is_continue=1;
+
+ //获取立即购买的商品的信息
+ var gg = to.get_b_now();
+ //--商品的房间号--
+ if(gg.room_id && gg.room_id>0){
+ item.room_ids=gg.room_id;
+ }
+
+ var goods={
+ 'goods_id': gg.goods_id,
+ 'goods_name': gg.goods_name,
+ 'goods_sn': gg.goods_sn,
+ 'goods_num': gg.goods_num,
+ 'market_price': th.data.bn_goods.market_price,
+ 'goods_price': th.data.bn_goods.shop_price,
+ 'member_goods_price': th.data.bn_goods.shop_price,
+ 'store_id': oo.stoid,
+ 'prom_type':th.data.bn_goods.prom_type, //促销活动类型
+ 'prom_id': th.data.bn_goods.prom_id, //促销活动id
+ };
+
+ //-- 把导购的信息填入--
+ if(gg.guide_id){
+ goods.guide_id=gg.guide_id;
+ goods.guide_type=gg.guide_type;
+ //调用接口判断是不是会员
+ await getApp().request.promiseGet("/api/weshop/shoppingGuide/getId/"+oo.stoid+"/"+gg.guide_id,{}).then(res=>{
+ if(res.data.code==0){
+ goods.guide_name=res.data.data.salesman;
+ goods.guide_sn=res.data.data.salesman_no;
+ }
+ })
+ }
+
+ //--商品的房间号--
+ if(gg.room_id && gg.room_id>0){
+ goods.room_id=gg.room_id;
+ }
+
+ item.order_goods.push(goods);
+ pdata.push(item);
+ }
+
+
+ if (pdata.length==0) return;
+ var str = JSON.stringify(pdata);
+
+ wx.showLoading({title: "加载中"});
+ wx.request({
+ url: oo.url + '/api/weshop/order/createWxdOrder',
+ data: str,
+ method: 'POST',
+ header: {
+ 'content-type': 'application/json'
+ },// 设置请求的 header
+ success: function (res) {
+
+ th.data.is_summit_ing=0; //是否提交中
+ wx.hideLoading();
+ if (res.statusCode == 200) {
+ var data=res.data;
+ if(data.code==0){
+ console.log(th.data.is_b_now);
+ //如果是购物车结算,还要删除购物车
+ if (th.data.is_b_now == 0) {
+ console.log(th.data.cartlist_y);
+ var list = th.data.cartlist_y;
+ for (var i = 0; i < list.length; i++) {
+ //删除购物车
+ a.delete("/api/weshop/cart/del/" + oo.stoid + "/" + list[i].id, {});
+ }
+ }
+ var order_amount = 0;
+ pdata.forEach(function (em, ind) {
+ order_amount += em.order_amount;
+ })
+ //要进行判断,如果是用微信支付,就要跳转到支付界面
+ if (order_amount > 0) {
+ th.setData({ isclose: 0 });
+ //void e.jumpToCart4({
+ // order_sn: data.data,
+ //}, 1);
+ util_pay.pay(data.data, function() {
+ //app.my_warnning("支付成功",1,th);
+ //setTimeout(function () {
+ wx.redirectTo({
+ url: "/pages/payment/pay_success/pay_success?type=2&order_sn="+data.data
+ })
+ //},1000)
+
+ }, function () {
+ //支付失败
+ setTimeout(function () {
+ wx.navigateBack({ delta: 1 })
+ },1000)
+ },oo.stoid);
+
+ } else {
+ var dd = {
+ parent_sn: data.data,
+ store_id: oo.stoid,
+ type: 2,
+ };
+ a.post("/api/weshop/order/pay/createOrder", {
+ data: dd,
+ success: function (t) {
+ //console.log(t);
+ if(t.data.code==0){
+ //app.my_warnning("支付成功",1,th);
+ //setTimeout(function () {
+ th.setData({ isclose: 0 });
+ wx.redirectTo({
+ url: "/pages/payment/pay_success/pay_success?type=2&order_sn="+data.data,
+ })
+ //}, 1000)
+ }
+ },
+ fail:function () {
+
+ }
+ });
+ }
+
+ }
+ else{
+ //--内容换行--
+ var msg=data.msg;
+ //赠品活动已经取消,无法赠送,是否继续买单?
+ if(msg.indexOf("是否继续买单")>0){
+ wx.showModal({
+ title:"提示",
+ content: data.msg,
+ cancelText:'取消',
+ confirmText:'确定',
+ showCancel: true,
+ success(res){
+ if(res.cancel){
+ return;
+ }else if(res.confirm){
+ th.data.is_continue=1;
+ th.submitForm(sub_value);
+ }
+ }
+ })
+ return;
+ }
+ if(msg.length>13){
+ msg=msg.slice(0, 13) + "\r\n"+ msg.slice(13);
+ }
+ getApp().confirmBox(msg);
+ }
+ }else{
+ console.log("index.js wx.request CheckCallUser statusCode" + res.statusCode);
+ }
+ },
+ fail: function () {
+ th.data.is_summit_ing=0;
+ wx.hideLoading();
+ console.log("index.js wx.request CheckCallUser fail");
+ },
+ complete: function () {}
+ })
+
+ },
+
+ //---确认线下门店的数量足不足---
+ async check_store_num(goods_id,pick,goods_num,func){
+ var lock=0,pick_no,plist,erpwareid;
+ //先读取门店的lock
+ await getApp().request.promiseGet("/api/weshop/order/ware/lock/page",{
+ data:{store_id:os.stoid,wareId:goods_id,storageId:pick,pageSize:1000}
+ }).then(res=>{
+ if(res.data.code==0 && res.data.data.total>0){
+ for(var i in res.data.data.pageData)
+ lock+=res.data.data.pageData[i].outQty;
+ }
+ })
+ //先获取门店的编号
+ await getApp().request.promiseGet("/api/weshop/pickup/get/"+os.stoid+"/"+pick,{
+ data:{storeId:os.stoid,goodsId:t.goods_id,pickupId:pick}
+ }).then(res=>{
+ if(res.data.code==0){
+ pick_no=res.data.data.pickup_no;
+ }
+ })
+ //先获取商品的线下库存
+ await getApp().request.promiseGet("/api/weshop/goods/get/"+os.stoid+"/"+goods_id,{
+ data:{storeId:os.stoid,goodsId:t.goods_id,pickupId:pick}
+ }).then(res=>{
+ if(res.data.code==0){
+ erpwareid=res.data.data.erpwareid;
+ }
+ })
+ //读取线下的门店库存
+ await getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{
+ data:{storageNos:pick_no,wareIds:encodeURIComponent(erpwareid),storeId:os.stoid}
+ }).then(res=>{
+ if(res.data.code==0){
+ plist=res.data.data.pageData[0];
+ }
+ })
+ var isok=1;
+ if(goods_num>plist.CanOutQty-lock){
+ isok=0;
+ }
+ func(isok);
+ },
+
+ useCoupon: function() {
+ if (this.data.order.couponNum <= 0) {
+ getApp().my_warnning("无可用优惠券",0,this);
+ return;
+ }
+
+ var a = {
+ lid: this.data.coupon ? this.data.coupon.id : "0"
+ };
+ wx.navigateTo({
+ url: "/pages/user/checkcoupon/checkcoupon?" + s.Obj2Str(a)
+ });
+ },
+ enterAddressPage: function() {
+ getApp().globalData.is_cart_old=1;
+ this.data.isget_by_quan={};
+ this.data.enterAddressPage = !0, wx.navigateTo({
+ url: "/pages/user/address_list/address_list"
+ });
+ },
+
+
+
+ //--------立即购买时,选择自提和物流----------
+ setexptype:function(t){
+ var th=this;
+ var ty = t.currentTarget.dataset.t,def_exp_code= getApp().globalData.userInfo.def_exp_code;
+ th.setData({ bn_exp_type:ty});
+ //当物流为空的时候。
+ if (ty == 0 && th.data.wu_arr==null){
+ th.data.isget_by_quan={};
+ return th.get_wuliu(th.calculatePrice2());
+ }
+
+ //--自提就要把包邮券清理掉--
+ if(ty==1){
+ th.data.isget_by_quan={};
+ if(th.data.using_quan && th.data.using_quan[th.data.bn_pick] && th.data.using_quan[th.data.bn_pick].isby==1){
+ th.setData({using_quan:{}});
+ }
+ }
+
+ //判断有没有默认的物流地址值
+ if (def_exp_code != "" && def_exp_code != null && def_exp_code !=undefined) {
+ var wu_arr=this.data.wu_arr;
+ if (wu_arr!= null && wu_arr!=""){
+ for(var i=0;i 0 && o_price >= freight_free){ return 0;}
+ if (user_addr==null) { return 0; }
+ //计算物流的config item;
+ var item=null;
+ //先根据 镇 县 区找计算的config
+ item = th.get_wuliu_config(user_addr.district,code,rs);
+ if (item==null) item = th.get_wuliu_config(user_addr.city, code, rs);
+ if (item==null) item = th.get_wuliu_config(user_addr.province, code, rs);
+ if (item == null) item = th.get_wuliu_default(code,rs);
+ if (item == null) return o_shipping_price;
+ var fw_price = 0, fp_price=0;
+ item=item.config;
+ if (item == null) return o_shipping_price;
+ //------按重量----------
+ if (goods_weight>=0 && item['money']) {
+ fw_price =parseFloat(item['money']);
+ if (goods_weight > item['first_weight']){
+ var fw = goods_weight - item['first_weight'];
+ var n = Math.ceil(fw/item['second_weight'])
+ fw_price = fw_price + n * parseFloat(item['add_money']);
+ }
+ }
+ //------按件数----------
+ if (goods_piece > 0 && item['piecemoney']) {
+ fp_price = parseFloat(item['piecemoney']);
+ if (goods_piece > item['first_piece']) {
+ var fp = goods_piece - item['first_piece'];
+ var m = Math.ceil(fp / item['second_piece'])
+ fp_price = fp_price + m * parseFloat(item['add_piecemoney']);
+ }
+ }
+ var rspice =parseFloat(price + fw_price + fp_price);
+ return rspice;
+ },
+
+ //------------循环获取config-----------
+ get_wuliu_config:function(region_id,code,rs){
+ var item=null,rslist = rs.pageData;
+ for (var i = 0; i < rslist.length;i++){
+ if (rslist[i].code == code && rslist[i].region_id == region_id) { item = rslist[i];}
+ }
+ return item;
+ },
+ //-------循环获取config,code default-------
+ get_wuliu_default: function (code, rs) {
+ var item = null, rslist=rs.pageData;
+ for (var i = 0; i < rslist.length; i++) {
+ if (rslist[i].shipping_code == code && rslist[i].is_default == 1) { item = rslist[i]; }
+ }
+ return item;
+ },
+
+ //----------立即购买,选择物流-------------
+ bindPickerChange:function(e){
+ var ind = e.detail.value
+ this.setData({ index: ind });
+ this.calculatePrice2();
+ },
+ //----------购物车结算,选择物流-------------
+ bindPickerChange_w: function (e) {
+ var ind=e.detail.value, txt = e.currentTarget.dataset.txt;
+ this.setData({ [txt]: ind });
+ this.calculatePrice();
+ },
+
+ cart_set_err:function(e){
+ var txt = e.currentTarget.dataset.err;
+ var ob={};
+ ob[txt] = this.data.imgUrl + "/miniapp/images/default_g_img.gif";
+ this.setData(ob);
+ },
+
+ //// 开启物流的弹窗
+ show_wu_arr:function(e){
+ var wu_arr_txt=e.currentTarget.dataset.txt;
+ var w_sele_index=e.currentTarget.dataset.w_sele_index;
+ var is_express=null;
+ var ob={open_express: 1,wu_arr_txt:wu_arr_txt,disabled:1};
+
+ //--如果是多个门店的时候--
+ if(w_sele_index!=undefined){
+ is_express=this.data.cartlist[w_sele_index].wind;
+ ob['is_express']=is_express;
+ }
+ this.setData(ob);
+ },
+ // 关闭物流的弹窗
+ close_express:function(){
+ this.setData({ open_express:0,disabled:0 });
+ },
+ // 选择物流
+ click_express_name:function(e){
+ var express_name = e.currentTarget.dataset.name, shippingcode = e.currentTarget.dataset.shippingcode;
+ var index=e.currentTarget.dataset.idxe;
+ var ob={ is_express: index, is_shipping_code: shippingcode,disabled:0};
+ ob[this.data.wu_arr_txt]=index;
+ this.setData(ob);
+ },
+
+ //点击确定物流
+ determine_expres:function(e){
+ this.setData({ open_express: 0});
+ this.calculatePrice2();
+ },
+
+ //设置默认物流
+ select_default_logistics: function () {
+ var th=this;
+ var is_shipping_code=this.data.is_shipping_code
+ getApp().request.put("/api/weshop/users/update",{
+ data: { user_id: getApp().globalData.user_id, store_id: oo.stoid, def_exp_code: is_shipping_code},
+ success:function(rse){
+ if (rse.data.code==0){
+ getApp().globalData.userInfo.def_exp_code=is_shipping_code;
+ th.setData({ open_express: 0 });
+ //----计算此时购物车的价格----
+ if(th.data.is_b_now==1) th.calculatePrice2();
+ else th.calculatePrice();
+ }
+ }
+ })
+ },
+
+ //更新下默认,在onshow里面
+ update_code(){
+ var th=this,m_wind=0,def_exp_code=getApp().globalData.userInfo.def_exp_code;
+ //--定时器,判断wu_arr不未空--
+ var uii=setInterval(function () {
+ if(th.data.wu_arr)
+ {
+ clearInterval(uii);
+ for (var k = 0; k < th.data.wu_arr.length; k++) {
+ var item = th.data.wu_arr[k];
+ if (def_exp_code == item.code) { m_wind = k; }
+ }
+ //--如果是立即购买--
+ th.setData({index: m_wind,is_express:m_wind});
+
+ }
+ },500);
+ },
+
+ //检查区域是不是包邮
+ check_area:function(arr){
+ var user_addr=this.data.user_addr;
+ for(var i in arr){
+ var item=arr[i];
+ if(user_addr.twon==item || user_addr.district==item
+ || user_addr.city==item|| user_addr.province==item ){
+ return 0;
+ }
+ }
+ return 1;
+ },
+
+ //检查立即购买的商品是不是不包邮
+ check_good:function(arr,goods_id){
+ if(!goods_id) goods_id=this.data.bn_goods.goods_id;
+ for(var i in arr){
+ var item=arr[i];
+ if(goods_id==item) return 0;
+ }
+ return 1;
+ },
+ check_by_area:function(region_list){
+ var arr=region_list.split(",");
+ var check=this.check_area(arr);
+ return !check;
+ },
+ check_by_goods:function(goods_list,goods_id){
+ var arr=goods_list.split(",");
+ var check=this.check_good(arr,goods_id);
+ return !check;
+ },
+
+
+ //从优惠的映射中拿出商品从表的item
+ arr_get_goods:function(goods_id,arr){
+ for(var i in arr){
+ if(arr[i].goods_id==goods_id) return arr[i];
+ }
+ },
+
+ //跳转到购买卡
+ buycard:function(){
+ getApp().goto("/pages/user/plus/plus");
+ getApp().globalData.plus_buy_back=1;
+ }
+
+});
diff --git a/pages/cart/cart2_inte/cart2_inte.json b/pages/cart/cart2_inte/cart2_inte.json
new file mode 100644
index 0000000..0cfb931
--- /dev/null
+++ b/pages/cart/cart2_inte/cart2_inte.json
@@ -0,0 +1,7 @@
+{
+ "navigationBarTitleText": "填写订单",
+ "enablePullDownRefresh": false,
+ "usingComponents": {
+ "warn": "/components/long_warn/long_warn"
+ }
+}
\ No newline at end of file
diff --git a/pages/cart/cart2_inte/cart2_inte.wxml b/pages/cart/cart2_inte/cart2_inte.wxml
new file mode 100644
index 0000000..cda87da
--- /dev/null
+++ b/pages/cart/cart2_inte/cart2_inte.wxml
@@ -0,0 +1,202 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/cart/cart2_inte/cart2_inte.wxss b/pages/cart/cart2_inte/cart2_inte.wxss
new file mode 100644
index 0000000..a3ed00c
--- /dev/null
+++ b/pages/cart/cart2_inte/cart2_inte.wxss
@@ -0,0 +1,960 @@
+.bdr_t-14 {
+ border-top-left-radius: 14rpx;
+ border-top-right-radius: 14rpx;
+}
+.bdr_b-14 {
+ border-bottom-left-radius: 14rpx;
+ border-bottom-right-radius: 14rpx;
+}
+.bdr14 {
+ border-radius: 14rpx;
+}
+.mgt20 {
+ margin-top: 20rpx;
+}
+.shadow {
+ box-shadow: 0 4rpx 12px #e7e9eb;
+}
+.shadow-1 {
+ box-shadow: 16rpx 0px 12px #e7e9eb;
+}
+
+
+page {
+ /* background-color: #FAFAFA; */
+ background-color: #F0F0F0;
+ padding: 0 22rpx;
+ box-sizing: border-box;
+}
+.container {
+ background-color: #F0F0F0;
+ /* padding-top: 28rpx; */
+ padding-bottom: 120rpx;
+}
+.user-mes {
+ position: relative;
+ background-color: #fff;
+ font-size: 32rpx;
+ color: #444;
+ /* margin-top: 28rpx; */
+ border-radius: 14rpx;
+}
+.user-contact {
+ padding: 24rpx 26rpx;
+ font-weight: 600;
+}
+
+.location {
+ position: relative;
+ padding: 0 70rpx 24rpx;
+}
+
+.pos-icon {
+ position: absolute;
+ left: 28rpx;
+ top: 6rpx;
+ width: 30rpx;
+ height: 36rpx;
+}
+
+.border-img {
+ width: 100%;
+ height: 12rpx;
+}
+
+.update-logistics {
+ position: absolute;
+ right: 0;
+ top: 0;
+ width: 80rpx;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.arrow-rigth {
+ width: 32rpx;
+ height: 32rpx;
+}
+
+.order-meg {
+ margin-bottom: 20rpx;
+ font-size: 28rpx;
+
+}
+
+.order-detail {
+ padding: 30rpx 0;
+ border-bottom: 2rpx solid #eee;
+ color: #777;
+ min-height: 190rpx;
+ background-color: #fff;
+
+}
+
+.goods-img {
+ float: left;
+ width: 200rpx;
+ height: 200rpx;
+ margin: 0 20rpx;
+}
+
+.order-cont {
+ float: left;
+ width: 438rpx;
+}
+
+.goods-name {
+ height: 74rpx;
+ line-height: 40rpx;
+ overflow: hidden;
+ margin-bottom: 16rpx;
+ font-size: 28rpx;
+ color: #333;
+
+}
+
+.goods-color {
+ font-size: 24rpx;
+}
+
+.order-num {
+ margin-top: 25rpx;
+ font-size: 24rpx;
+ line-height: 42rpx;
+}
+
+.set-mes{
+ background-color: #fff;
+ /* margin-top: 20rpx; */
+}
+.use-item{
+ display: flex;
+ align-items: center;
+ height: 80rpx;
+ /* border-bottom: 1px solid #ddd; */
+ font-size: 30rpx;
+ /* width:95%;
+margin:auto; */
+ padding: 0 26rpx;
+}
+.use-item>view{
+ display: flex;
+ /* margin-right: 12rpx; */
+}
+.use-item.bfff{
+ background-color: #fff;
+}
+.use-item .dp{
+ display: block;
+ width: 50rpx;
+ height: 50rpx;
+ margin-left: -6rpx;
+}
+
+.set-item {
+ justify-content: space-between;
+ background-color: #fff;
+}
+
+.set-btn {
+ display: flex;
+ font-size: 24rpx;
+}
+
+.set-mes input {
+ width: 380rpx;
+ height: 50rpx;
+ line-height: 50rpx;
+ border: 1px solid #ddd;
+}
+
+.use-btn {
+ width: 100rpx;
+ height: 50rpx;
+ margin-left: 20rpx;
+ line-height: 50rpx;
+ text-align: center;
+ background-color: #f23030;
+ color: #fff;
+}
+
+.coupon-mes {
+ /* box-sizing: border-box; */
+ height:95rpx;
+ padding: 0 26rpx;
+ background-color: #fff;
+ font-size: 30rpx;
+ color: #444;
+ /* width: 100%; */
+ border-radius: 14rpx;
+ margin-top: 20rpx;
+ margin-bottom: 20rpx;
+}
+
+.coupon-title {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 92rpx;
+}
+
+.coupon-title>view {
+ display: flex;
+}
+
+.coupon-num {
+ height: 36rpx;
+ margin-left: 20rpx;
+ padding: 0 16rpx;
+ line-height: 36rpx;
+ text-align: center;
+ background-color: #f23030;
+ color: #fff;
+ font-size: 24rpx;
+}
+
+.leave-word {
+ position: relative;
+ font-size: 24rpx;
+ margin-left: 20rpx;
+ flex-grow: 1;
+}
+
+.word-box {
+ font-size: 26rpx;
+ /* width: 600rpx; */
+ padding: 10rpx;
+ height: 28rpx;
+ line-height: 40rpx;
+}
+
+.max-word {
+ position: absolute;
+ right: 0;
+ bottom: 0;
+}
+
+.information {
+ padding: 0 26rpx;
+ background-color: #fff;
+ /* margin-bottom: 120rpx; */
+}
+
+.information .item {
+ display: flex;
+ justify-content: space-between;
+ height: 60rpx;
+ line-height: 60rpx;
+ font-size: 26rpx;
+ color: #777;
+}
+
+.btn-wrap {
+ height: 94rpx;
+ box-sizing: border-box;
+ display: flex;
+ justify-content: space-between;
+ background-color: white;
+ align-items: center;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ padding: 0 30rpx;
+}
+
+.tips-btn {
+ /* float: right;
+ width: 200rpx;
+ height: 100rpx;
+ line-height: 100rpx;
+ text-align: center;
+ font-size: 30rpx;
+ color: #fff;
+ background-color: #f23030; */
+ color: white;
+ background-color: #FE4445;
+ height: 72rpx;
+ line-height: 72rpx;
+ padding: 0 42rpx;
+ border-radius: 36rpx;
+ margin-left: 0;
+ margin-right: 0;
+}
+
+.pay-amount {
+ /* float: right;
+ display: flex;
+ align-items: center;
+ height: 100rpx;
+ font-size: 26rpx;
+ margin-right: 40rpx; */
+}
+
+.payable {
+ color: #444;
+ /* margin-right: 20rpx; */
+}
+
+.shipping-modal {
+ z-index: 20;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ overflow-y: hidden;
+ color: #666666;
+ background-color: white;
+}
+
+.shipping-nav {
+ text-align: center;
+ font-size: 35rpx;
+ padding-top: 30rpx;
+}
+
+.shipping-list {
+ padding: 20rpx 30rpx 40rpx;
+ font-size: 28rpx;
+}
+
+.shipping-item {
+ display: block;
+ padding: 20rpx 0;
+}
+
+.shipping-btn {
+ width: 100%;
+ color: white;
+ background-color: #f23030;
+ line-height: 90rpx;
+ text-align: center;
+ font-size: 40rpx;
+}
+
+/*----------nyf新增,地址---------*/
+.add_new{
+ height: 90rpx;
+ display: flex;
+ align-items: center;
+ padding: 0 26rpx;
+}
+.addr_jia{width: 45rpx; height: 45rpx; border: 1rpx solid #ddd;
+ margin-right: 15rpx;vertical-align: middle;}
+.yu_er{
+ margin-left: 10rpx;
+ /* margin-right: 60rpx; */
+}
+.wuliu{margin-left: 20rpx;}
+
+
+/*---- 优惠券列表 -----*/
+.xc-coupon-frame{
+ width: 100%;
+ height: 92rpx;
+
+}
+.xc-coupon-frame .work-frame{
+ width: 100%;
+ height: 100%;
+ border-bottom:3rpx solid #eee;
+ padding: 0 26rpx;
+ background-color: white;
+}
+.xc-right{
+ width:20rpx;
+ height:20rpx;
+ border-top:2rpx solid #000;
+ border-right:2rpx solid #000;
+ transform:rotate(45deg);
+ display:inline-block;
+}
+
+.xc-coupon-frame .work-frame .work{ font-size: 30rpx; line-height: 92rpx; }
+.xc-right-frame{font-size: 30rpx;line-height: 92rpx; margin-right: 10rpx }
+
+/* 自定义弹出窗口 */
+.cx-popup{
+ width:100%;
+ height:880rpx;
+ background: #fff;
+ z-index: 35;
+ border-top-left-radius: 20rpx;
+ border-top-right-radius: 20rpx;
+ position:fixed;
+ bottom:0;
+ left: 0;
+ /* padding-bottom: 25rpx; */
+}
+
+.cx-popup .top{
+ width:95%;
+ height:100rpx;
+ border-bottom:3rpx solid #ddd;
+ margin: auto;
+ margin-top: 30rpx;
+
+}
+.xc-top-content{
+ width: 93%;
+ height:85rpx;
+ padding-top: 30rpx;
+ font-size: 34rpx;
+ font-weight: 600;
+
+}
+
+
+.xc-valid-coupon{
+ width: 90%;
+ height:40rpx;
+ padding-top: 24rpx;
+ overflow: hidden;
+}
+.xc-frame{
+ width: 100%;
+ height:60%;
+}
+
+.xc-frame .list-frame{
+ width: 95%;
+ height: 100%;
+ overflow-y:scroll;
+
+}
+.xc-close-frame{
+ margin-top:-10rpx;
+
+}
+
+.xc-close{
+ width: 37rpx;
+height: 37rpx;
+border-radius: 50%;
+border: 3rpx solid #333;
+text-align: center;
+line-height: 34rpx;
+font-size: 29rpx;
+color: #333;
+
+}
+.xc-money{
+ color: #af2346;
+ font-size: 35rpx;
+}
+
+.xc-money-frame{
+ margin-left:35rpx;
+
+}
+.xc-coupon-effect{
+ width: 99%;
+ min-height: 100rpx;
+ border-bottom:3rpx solid #ddd;
+
+
+}
+.xc-goods-coupon{
+ width: 85%;
+ height:100%;
+
+}
+.xc-title{
+ width:50%;
+ margin-left:222rpx;
+
+}
+.xc-coupon-money0{
+ color: #c91e31;
+ font-size: 35rpx;
+ line-height: 40rpx;
+
+}
+.xc-coupon-money{
+ color: #c91e31;
+ font-size: 35rpx;
+ line-height: 40rpx;
+ padding-top: 10px;
+
+}
+.xc-coupon-money1{
+ color: #444;
+ font-size: 28rpx;
+ line-height: 60rpx;
+
+
+}
+.xc-coupon-time{
+ height: 50rpx;
+ font-size: 27rpx;
+ color: #a4a4a4;
+}
+.xc-coupon-time .time{
+ margin-left: 15rpx;
+ font-size: 27rpx;
+}
+.xc-coupon-selection{
+ height:100%;
+}
+
+.xc-confirm {
+ width: 50%;
+ border-radius: 50rpx;
+ height: 80rpx;
+ margin:0 auto;
+ background:#d60021;
+ color:#fff;
+ font-size:28rpx;
+ margin-top: 28rpx;
+}
+
+.up{ animation: up .7s; }
+.down{ animation: down 1s; }
+@keyframes up { 0% { transform: translateY(550rpx); } 100% { transform: translateY(0); } }
+@keyframes down { 0% { transform: translateY(0); } 100% { transform: translateY(550rpx); } }
+
+.xc-not-Selection{
+ width: 40rpx;
+height: 40rpx;
+ background: #eeeeee;
+}
+
+
+.xc-close-express{
+ width: 40rpx;
+height: 40rpx;
+border-radius: 50%;
+border: 3rpx solid #333;
+text-align: center;
+font-size:32rpx;
+line-height: 38rpx;
+color: #333;
+margin-top: 5rpx;
+}
+.cx-popup .tops{
+ width: 100%;
+height: 145rpx;
+border-bottom: 3rpx solid #eee;
+
+}
+.top-content {
+ width: 82%;
+padding-top: 33px;
+height: 100%;
+padding-left: 40rpx;
+}
+.close-frame{
+ margin-top: 30rpx;
+
+}
+
+.xc-hook {
+width: 33rpx;
+height: 33rpx;
+transform: rotate(-135deg);
+line-height: 35rpx;
+text-align: center;
+margin-right: 20rpx
+
+
+}
+.xc-hooks {
+width: 30rpx;
+height: 30rpx;
+border: 1rpx solid #999;
+margin-right: 20rpx;
+}
+.express_list_frame{
+ display: flex;
+height: 80rpx;
+align-items: center;
+padding-left: 40rpx;
+border-bottom: 1rpx solid #eee;
+
+}
+.express_list{
+ width: 100%;
+ height: 65%;
+ overflow-y: auto;
+ margin-bottom: 40rpx;
+
+}
+.xc-confirms {
+ box-sizing: border-box;
+ width: 40%;
+ border-radius: 50rpx;
+ height: 80rpx;
+ margin:0 auto;
+ font-size:28rpx;
+ background: #fff;
+ color: #333;
+ border: 2rpx solid #333;
+}
+
+
+/* 优惠券的改版样式 */
+.xc-coupon-frame{
+ /* width: 710rpx; */
+ width: 100%;
+ height:auto;
+ margin: 0 auto;
+
+}
+.xc-coupon-frame .coupon-frame{
+ width: 100%;
+ height: 200rpx;
+ margin-top:10rpx;
+ border-bottom: 1rpx solid #eee;
+
+}
+.xc-coupon-frame .coupon-frame .coupon-left{
+ width: 215rpx;
+ height:100%;
+ overflow: hidden;
+}
+.xc-money-frames{
+ width:96%;
+ margin-top: -10px;
+}
+
+.xc-rmb-symbol{
+ font-size:40rpx;
+
+}
+
+.xc-rmb-val{
+ font-size:60rpx;
+
+}
+.coupon-explain{
+ font-size:25rpx;
+width:100%;
+
+
+}
+.xc-valuer{
+ margin-top:39rpx;
+ margin-left:28rpx;
+ font-size:25rpx;
+}
+.coupon-frame .oval{
+ width:155rpx;
+ height:83rpx;
+ border-radius: 50%;
+ right:-78rpx;
+ top:-37rpx;
+}
+.coupon-right{
+ /* width:490rpx; */
+ height: 99%;
+ border-top: 1rpx solid #eaeaea;
+ /* //border-bottom: 1rpx solid #eaeaea; */
+ border-right: 1rpx solid #eaeaea;
+ flex-grow: 1;
+}
+.coupon-annotation{
+ width: 95%;
+ height: 100%;
+
+}
+.xc-brand{
+ width:100rpx;
+ height:35rpx;
+ line-height: 35rpx;
+ font-size:21rpx;
+ border-radius:10rpx; position: relative; top:-1px;
+ margin-right: 8rpx
+}
+.top-frame{
+ width:82%;
+ height: 75rpx;
+ margin-top:10rpx;
+}
+.top-frame .coupon-wode{
+ font-size: 25rpx;
+ margin-left:10rpx;
+ width:340rpx;
+ height:88rpx;
+}
+.coupon-code{
+ width:60rpx;
+ height:60rpx;
+ margin-top:5rpx;
+
+}
+.frame{
+ width: 100%
+}
+.coupon-time{
+ font-size: 23rpx;
+ line-height:33rpx;
+ color: #333;
+}
+
+.clik-get{
+ width:125rpx;
+ height:45rpx;
+ border-radius: 25rpx;
+ line-height: 45rpx;
+ font-size:25rpx;
+ bottom:67rpx;
+ right:6px;
+}
+
+.code-img{
+ margin-left:20rpx;
+}
+.bottmo-explain{
+top:145rpx;
+width:94%;
+border-top:1rpx dashed #eee;
+padding-top:8rpx;
+height:38rpx;
+line-height: 51rpx;
+
+}
+.font-word{
+ font-size: 22rpx;
+}
+.circle-size{
+ background: #a0a0a0;
+ width: 27rpx;
+ height: 27rpx;
+ margin-top:13rpx;
+margin-left:8rpx;
+display: flex;
+
+align-items: center;
+}
+.xc-jiantou{
+ /* width: 9rpx;
+ height: 9rpx; */
+ /* border-top: 2rpx solid #fff;
+ border-right: 2rpx solid #fff; */
+ transform: rotate(-90deg);
+ color: #fff;
+ font-size: 15rpx;
+ /* display:inline-block;
+ margin-top: 6.5rpx; */
+ text-align: center;
+width: 24rpx;
+}
+.xc-buttom{
+ box-sizing: border-box;
+ width:100%;
+ min-height:76rpx;
+ height:auto;
+ line-height:40rpx;
+ border-left:1rpx solid #eee;
+ border-right:1rpx solid #eee;
+ border-bottom:1rpx solid #eee;
+/* margin-left: 6rpx; */
+}
+
+.goods-num{
+ font-size: 28rpx;
+ color: #333;
+}
+
+.explain-coupon{
+ font-size:25rpx;
+ padding: 10rpx 10rpx
+}
+.circle-frame{
+ width: 20rpx;
+ height: auto;
+ z-index:1;
+ left:210rpx;
+
+}
+.circle-sawtooth{
+ width: 11rpx;
+ height: 11rpx;
+ background: #fff;
+}
+
+.red{background-color: #fe7496;}
+.green{ background-color: #22c7c1;}
+.blue{background-color:#5e82e3;}
+.g_gray{background-color: #aaaaaa}
+
+.f_text{text-align: center; height:96rpx; }
+.xc-hook.sn {
+ margin-top:12%;
+width:45rpx;
+height:45rpx;
+font-size:28rpx;
+line-height:44rpx;
+
+
+}
+.xc-hooks.on{
+ margin-top:12%;
+width:42rpx;
+height:42rpx;
+}
+.may_use_coupon{
+ /* width: 95%; */
+ /* height: 68rpx; */
+ line-height:78rpx;
+ padding: 0 26rpx;
+ justify-content: space-between;
+ align-items: center;
+}
+.determine-frame{
+ width: 100%;
+ height: 130rpx;
+
+}
+.xc-determine{
+ height: 80rpx;
+ width: 40%;
+ border-radius: 50rpx;
+background: #d60021;
+color: #fff;
+font-size: 28rpx;
+margin: 0 auto;
+
+}
+.click-buttem{
+width: 90%;
+margin: auto;
+}
+.logistics-name{
+ margin-right:20rpx;
+}
+.xc-border{
+ border-top:8rpx solid #eee;
+width: 100%
+}
+.main-top{
+margin-top: 20rpx;
+
+}
+.xc-hookts{
+border: 1rpx solid #999;
+
+}
+.xc-hookts.on{
+ width:30rpx;
+height:30rpx;
+
+}
+.xc-hookt.sn{
+ width: 32rpx;
+height: 32rpx;
+font-size: 28rpx;
+line-height: 34rpx;
+}
+.xc-hookt{
+ transform: rotate(-135deg);
+text-align: center;
+
+}
+.main-bottom{
+ margin-bottom: 20rpx;
+
+}
+.xc-hookst{
+ border: 1rpx solid #999;
+
+}
+.xc-hookst.ons{
+ width: 42rpx;
+height: 42rpx;
+margin-left: 20rpx;
+
+}
+.is_use_coupon{
+ width: 65%;
+justify-content: flex-end;
+padding-top: 10rpx;
+
+
+}
+.xc-hooka{
+ transform: rotate(-135deg);
+text-align: center;
+
+}
+.xc-hooka.sn{
+ width: 45rpx;
+height: 45rpx;
+font-size: 28rpx;
+line-height: 44rpx;
+margin-left: 20rpx;
+
+}
+.color-gray{
+ color: #808080;
+}
+.n_guige{ display: inline-block; background:rgb(236, 236, 236); color: rgb(63,63,63); padding: 3rpx 10rpx; border-radius: 3rpx }
+.gift_image{ width: 60rpx; height: 60rpx; position: absolute; top: 0; left: 0}
+
+.quan_num_show{ padding: 4rpx 6rpx; background-color:#ea5551; color:#fff; border-radius: 6rpx;margin-left:10rpx;font-size:24rpx;}
+
+.navigator-hover {
+ background: none;
+ opacity: 1;
+}
+
+
+.plus_buy{
+ background-color: #fff;
+ margin:15rpx 0;
+ padding: 20rpx 10rpx;
+ position: relative;
+}
+
+
+.card_bg {
+ box-sizing: border-box;
+ padding: 2rpx 10rpx;
+ height: 28rpx;
+ border-radius: 26rpx;
+ font-size: 18rpx;
+ line-height: 28rpx;
+ max-width: 210rpx;
+ background: #333;
+ color: #fff;
+ margin-left: 8rpx;
+ position:relative;
+ top:7rpx;
+}
+
+.card_bg image {
+ width: 19rpx;
+ height: 19rpx;
+ margin-right: 8rpx;
+}
+
+/* .card_bg .card_name {
+ max-width: 76rpx;
+ width: auto;
+ overflow: hidden;
+ white-space: nowrap;
+} */
+
+.card_name {
+ position: relative;
+ top: -4rpx;
+ margin-left: 6px;
+}
+
+.car_tri_up {
+ width: 0;height: 0;
+ border-left: 20rpx solid transparent;
+ border-right: 20rpx solid transparent;
+ border-bottom: 20rpx solid #fff;
+ position: absolute;
+ right: 20rpx;
+ top:-10rpx
+}
+.card_op{
+ position: absolute;
+ right: 20rpx;
+ top:36rpx
+}
+
diff --git a/pages/cart/cart2_inte/filter.wxs b/pages/cart/cart2_inte/filter.wxs
new file mode 100644
index 0000000..c0e8d13
--- /dev/null
+++ b/pages/cart/cart2_inte/filter.wxs
@@ -0,0 +1,11 @@
+var format = function (text) {
+ if (!text) {
+ return
+ }
+ var reg = getRegExp('\\\\n', 'g')
+ return text.replace(reg, '\n')
+}
+
+module.exports = {
+ format: format
+}
diff --git a/pages/cart/cart2_pt/cart2_pt.js b/pages/cart/cart2_pt/cart2_pt.js
index 985c22f..ed7c615 100644
--- a/pages/cart/cart2_pt/cart2_pt.js
+++ b/pages/cart/cart2_pt/cart2_pt.js
@@ -131,21 +131,30 @@ Page({
//----------------展示页面,是再获取用户信息之后--------------
show_page:function(){
var th=this;
- th.setData({ userinfo: to.globalData.userInfo});
- //获取立即购买的商品信息
- th.get_buy_goods();
-
- //获取提现金额
- getApp().request.get("/api/weshop/withdrawals/summoney", {
- data: { user_id: to.globalData.user_id, store_id: oo.stoid, status: 0 },
- success: function (su) {
- if (su.data.code == 0) {
- var yuer = parseFloat(th.data.userinfo.user_money -
- (th.data.userinfo.frozen_money>0?th.data.userinfo.frozen_money:0) - su.data.data.summoney).toFixed(2);
- th.setData({ txmon: su.data.data.summoney, yuer: yuer });
- }
- }
- });
+ //th.setData({ userinfo: to.globalData.userInfo}); 会员信息要时时获取
+ var user=getApp().globalData.userInfo;
+ getApp().request.get("/api/weshop/users/get/" + oo.stoid + "/" + user.user_id, {
+ data:{r:Math.random()},
+ success: function (e) {
+
+ getApp().globalData.userInfo = e.data.data;
+ th.setData({userinfo:e.data.data});
+ //获取立即购买的商品信息
+ th.get_buy_goods();
+
+ //获取提现金额
+ getApp().request.get("/api/weshop/withdrawals/summoney", {
+ data: { user_id: to.globalData.user_id, store_id: oo.stoid, status: 0 },
+ success: function (su) {
+ if (su.data.code == 0) {
+ var yuer = parseFloat(th.data.userinfo.user_money -
+ (th.data.userinfo.frozen_money>0?th.data.userinfo.frozen_money:0) - su.data.data.summoney).toFixed(2);
+ th.setData({ txmon: su.data.data.summoney, yuer: yuer });
+ }
+ }
+ });
+ }
+ });
},
//-----获取立即购买的商品信息----
@@ -201,14 +210,18 @@ Page({
th.setData({card_cut_price:cut_p});
}
}
+
+ if(th.data.bn_goods){
+ et=th.data.bn_exp_type;
+ }
+
th.setData({
bn_goods: t.data.data, bn_pickname: gg.pick_name,
- bn_pick: gg.pick_id, bn_t_exp_t: distr_t, is_normal:1
- });
- if(!th.data.add_back){
- th.setData({ bn_exp_type: et })
- }
+ bn_pick: gg.pick_id, bn_t_exp_t: distr_t, is_normal:1,bn_exp_type:et
+ });
+
+
th.calculatePrice2();
}else{
@@ -241,14 +254,17 @@ Page({
t.data.data.prom_type = 0;
t.data.data.is_normal=1;
}
+
+ if(th.data.bn_goods){
+ et=th.data.bn_exp_type;
+ }
+
th.setData({
bn_goods: t.data.data, bn_pickname: gg.pick_name,
- bn_pick: gg.pick_id, bn_t_exp_t: distr_t
+ bn_pick: gg.pick_id, bn_t_exp_t: distr_t,bn_exp_type:et
});
- if(!th.data.add_back){
- th.setData({ bn_exp_type: et })
- }
+
//计算价格
th.calculatePrice2();
}
@@ -275,10 +291,10 @@ Page({
}
})
//--更新默认地址--,看一下是不是跳到地址页面
- if(!getApp().globalData.is_cart2_old){
+ if(!getApp().globalData.is_cart_old){
this.update_code();
}else{
- getApp().globalData.is_cart2_old=0;
+ getApp().globalData.is_cart_old=0;
}
}
@@ -481,7 +497,7 @@ Page({
'twon': addr == null ? 0 : addr.twon,
'address': addr == null ? "": addr.address,
'more_address': addr == null ? "" : addr.more_address,
- 'mobile': th.data.userinfo.mobile,
+ 'mobile': addr == null ? th.data.userinfo.mobile:addr.mobile,
'email':'',
'invoice_title':'',
'goods_price': th.data.formData.all_price, //商品总价
diff --git a/pages/cart/cart4/cart4.js b/pages/cart/cart4/cart4.js
index b5fdfd7..871fdfc 100644
--- a/pages/cart/cart4/cart4.js
+++ b/pages/cart/cart4/cart4.js
@@ -40,7 +40,9 @@ Page({
//如果是拼单就不做处理
if(rs.data.data.pageData[0].pt_prom_id>0) {
- th.data.pt_order_sn=rs.data.data.pageData[0].order_sn; th.data.is_pt=1; return false;
+ th.data.pt_order_sn=rs.data.data.pageData[0].order_sn; th.data.is_pt=1;
+ t.setData({ type:1});
+ return false;
}
//如果是只有一单的情况下,就是单号=组合单号
if(rs.data.data.pageData[0]['order_sn']==rs.data.data.pageData[0]['parent_sn']){
diff --git a/pages/giftpack/giftpacklist/giftpacklist.wxml b/pages/giftpack/giftpacklist/giftpacklist.wxml
index 70208c2..2fb5f60 100644
--- a/pages/giftpack/giftpacklist/giftpacklist.wxml
+++ b/pages/giftpack/giftpacklist/giftpacklist.wxml
@@ -74,19 +74,23 @@
- {{"数量:"+item.num}}
+
+ {{"数量:"+item.num}}
+
-
+
-
+
+
+
diff --git a/pages/goods/categoryList/categoryList.wxml b/pages/goods/categoryList/categoryList.wxml
index 163c5fc..4a87b11 100644
--- a/pages/goods/categoryList/categoryList.wxml
+++ b/pages/goods/categoryList/categoryList.wxml
@@ -411,9 +411,13 @@
{{item.goods_name}}
-
+
- ¥{{item.prom_price}}
+
+ {{item.prom_integral}}积分
+ +
+ ¥{{item.prom_price}}
+
-
-
+
+
+
+
+
+
+
+ {{prom_integral}}
+ 积分
+ +
+ {{filters.toFix(prom_price,2)}}元
+ 零售价:¥{{data.market_price}}
+
+
+
+
+
+
+ 分享
+
+
+
+ {{data.goods_name}}
+
+
+
+ 销量:{{prom_act.buy_num}}件
+ 折扣:{{filters.pInt((prom_price?prom_price:0)*100/data.shop_price)}}折
+ {{categories3[0].num}}人评价
+
+
+
+
+
+
@@ -241,7 +274,7 @@
{{card_name}}
¥{{filters.toFix(data[card_field],2)}}
-
+
零售价:¥{{data.market_price}}
@@ -350,7 +383,7 @@
-
+
{{data.goods_name}}
@@ -835,7 +868,7 @@
立即购买
-
+
@@ -916,6 +949,34 @@
支付尾款
+
+
+
+
+
+
+
+
+
+ {{filters.toFix(sele_g[card_field],2)}}
+
+
+ {{filters.toFix(sele_g.shop_price,2)}}
+
+
+ 单独购买
+
+ 立即兑换
+ 积分不足
+
+
+
+ 立即兑换
+ 积分不足
+
+
+
+
@@ -926,7 +987,7 @@
-
+
@@ -935,41 +996,31 @@
{{sele_g.goods_name}}
-
- ¥
-
-
- {{sele_g[card_field]}}
-
-
- {{sele_g.shop_price}}
-
-
+
+ ¥
+
+ {{sele_g[card_field]}}
+ {{sele_g.shop_price}}
- ¥{{prom_price}}
-
+ ¥{{prom_price}}
+
-
- 已售:{{sele_g.sales_sum}}
-
- 可售:{{def_pick_store.CanOutQty}}
- 可售:0
-
-
- 可售:{{sele_g.store_count}}
-
-
-
+
+ 已售:{{sele_g.sales_sum}}
+
+ 可售:{{def_pick_store.CanOutQty}}
+ 可售:0
+
+ 可售:{{sele_g.store_count}}
+
-
- 已售:{{prom_act.buy_num+prom_act.virtual}}
- 已售:{{prom_act.buy_num}}
- 可售:{{prom_act.goods_num-prom_act.buy_num}}
-
-
-
+
+ 已售:{{prom_act.buy_num+prom_act.virtual}}
+ 已售:{{prom_act.buy_num}}
+ 可售:{{prom_act.goods_num-prom_act.buy_num}}
+
@@ -1006,15 +1057,15 @@
地址:{{def_pick_store.fulladdress}}
-
-
- 商品属性
-
-
- {{item.gg}}
+
+
+ 商品属性
+
+
+ {{item.gg}}
+
+
-
-
@@ -1025,6 +1076,20 @@
+
+
+
+
+ 再买{{hui_condition.need}}
+ ,免{{hui_condition.money}}元
+ ,打{{hui_condition.sale}}折
+ ,包邮
+ ,送{{hui_condition.intValue}}积分
+ ,送优惠券
+ ,送赠品
+ ,送礼包
+
+
+
@@ -1072,12 +1137,9 @@
-
-
-
-
-
-
+
+
+
@@ -1103,152 +1165,23 @@
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
- {{sele_g.goods_name}}
-
-
-
-
- ¥ {{sele_g[card_field]}}
-
-
- ¥ {{sele_g.shop_price}}
-
-
- ¥ {{prom_price}}
-
-
-
-
- 已售:{{sele_g.sales_sum}}
- 可售:{{sele_g.store_count}}
-
-
-
-
- 已售:{{prom_act.buy_num}}
- 已售:{{prom_act.buy_num}}
- 可售:{{prom_act.goods_num-prom_act.buy_num}}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{def_pick_store.pickup_name}}
-
- 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}}
-
-
-
-
-
-
-
- 选择门店
-
-
-
- 更多门店
-
-
-
- 地址:{{def_pick_store.fulladdress}}
-
-
-
- 商品属性
-
-
- {{item.gg}}
-
-
-
-
-
-
- {{item.gg}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 购买数量
-
- -
-
- +
-
-
-
-
-
-
-
- 选择门店
-
-
-
-
- {{item.name}}
-
-
- {{item.pickup_name}}
-
-
-
-
-
- {{sec_sto.name}}
-
- {{item.pickup_name}}
-
-
-
-
-
-
- 确定
-
-
+
+
@@ -1490,13 +1423,15 @@
-
-
- x
-
-
-
-
+
+
+
+ x
+
+
+
+
+
diff --git a/pages/goods/goodsInfo/goodsInfo.wxss b/pages/goods/goodsInfo/goodsInfo.wxss
index 1004874..fa85c5f 100644
--- a/pages/goods/goodsInfo/goodsInfo.wxss
+++ b/pages/goods/goodsInfo/goodsInfo.wxss
@@ -422,6 +422,13 @@ border-radius: 0 56rpx 55rpx 0;
}
+.buy-btn-all{
+ background-color: #f23030;
+ height: 70rpx;
+ border-radius: 56rpx;
+}
+
+
.toTop {
position: fixed;
z-index: 3;
@@ -659,7 +666,6 @@ border-radius: 0 56rpx 55rpx 0;
position: fixed;
bottom: 50rpx;
left: 4%;
-
}
.spec-cart-btn {
@@ -671,6 +677,10 @@ left: 4%;
border-radius: 40rpx;
}
+.spec-cart-btn.w40 {
+ width: 46%;
+}
+
.spec-add-cart {
background-color: #ffb03f;
}
@@ -2640,13 +2650,19 @@ button.custom-service::after{
height: 100%;
z-index: 999;
background-color: rgba(0,0,0,.4);
- padding: 60rpx;
+ padding: 0 60rpx;
+ display: flex;
+ /* flex-wrap: wrap; */
+ align-items: center;
+}
+.poster-wrapper {
+ width: 100%;
}
.poster {
box-sizing: border-box;
width: 100%;
- height: 90%;
+ height: 1055rpx;
border-radius: 20rpx;
/* box-shadow: 0 8px 12px #666; */
position: relative;
@@ -2682,4 +2698,9 @@ button.custom-service::after{
position: absolute;
right: 20rpx;
top: 10rpx;
-}
\ No newline at end of file
+}
+
+.goods-price .rel_txt{
+ position: relative; top: 32rpx; font-size: 30rpx;
+}
+.goods-price .rel_img{width: 62rpx; height: 62rpx;position: relative; top: 12rpx;}
\ No newline at end of file
diff --git a/pages/goods/goodsList/goodsList.js b/pages/goods/goodsList/goodsList.js
index 5e35d81..ad859fe 100644
--- a/pages/goods/goodsList/goodsList.js
+++ b/pages/goods/goodsList/goodsList.js
@@ -16,8 +16,8 @@ Page({
openFilterModal: !1,
baseUrl: "/api/weshop/goods/page?1=1",
requestUrl: "",
- tabname:"goods_id", //排序的字段
- adname:"desc", //升降的字段
+ tabname:"sort", //排序的字段
+ adname:"asc", //升降的字段
is_new:0,
is_hot:0,
prom_goods_list:null,
@@ -257,7 +257,7 @@ Page({
var card_name_map=new Map();
var user = getApp().globalData.userInfo;
for (var i = 0; i < plusCard.length; i++) {
- if ((user.card_field==null || user.card_field=="") && (plusCard[i].IsStopBuy==true)) {
+ if ((!user || user.card_field==null || user.card_field=="") && (plusCard[i].IsStopBuy==true)) {
continue;
}
var name="card"+plusCard[i].CorrPrice.toLowerCase();
diff --git a/pages/goods/goodsList/goodsList.wxml b/pages/goods/goodsList/goodsList.wxml
index 7f066a6..c8ff1f4 100644
--- a/pages/goods/goodsList/goodsList.wxml
+++ b/pages/goods/goodsList/goodsList.wxml
@@ -52,9 +52,14 @@
{{item.goods_name}}
-
+
- ¥{{item.prom_price}}
+
+ {{item.prom_integral}}积分
+ +
+ ¥{{item.prom_price}}
+
+
-
充{{BeginSum}}送{{NewSum}}元
@@ -29,3 +51,24 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/user/deposit/prepaid/prepaid.wxss b/pages/user/deposit/prepaid/prepaid.wxss
index 68304d8..d027d41 100644
--- a/pages/user/deposit/prepaid/prepaid.wxss
+++ b/pages/user/deposit/prepaid/prepaid.wxss
@@ -1,8 +1,9 @@
/* 图片 */
.picture{
-margin-top: 5rpx;
+/* margin-top: 5rpx; */
width:100%;
height:270rpx;
+display: block;
}
/* 预存款扣款情况 */
.wz{
@@ -61,14 +62,15 @@ font-size:28rpx;
}
/* 立即充值 */
.ljcz{
- width: 2278rpx;
+ /* width: 2278rpx;
height: 111rpx;
font-size: 25rpx;
line-height: 320%;
color: #C4182E;
margin-left: 463rpx;
- padding-left:66rpx;
-
+ padding-left:66rpx; */
+ padding-top: 20rpx;
+ color: red;
}
/* 弹出框的大边框 */
.big-rim{
@@ -180,6 +182,77 @@ font-size:28rpx;
left:0;
}
+.give {
+ position: absolute;
+ margin-top: 70rpx;
+ margin-left: 60rpx;
+}
+
+.list {
+ padding: 0 20rpx;
+}
+
+.coupon {
+ box-sizing: border-box;
+ display: flex;
+ justify-content: space-between;
+ background-color: pink;
+ padding: 0 40rpx;
+
+
+ background-image: radial-gradient(circle at 8rpx 8rpx, transparent, red);
+ /* background-image:
+ radial-gradient(
+ circle at 0px 8px,
+ transparent 6px,
+ #ff9e6d 6px,
+ #ff9e6d 0px),
+ radial-gradient(
+ circle at 199px 8px,
+ transparent 6px,
+ #ff9e6d 6px,
+ #ff9e6d 0px); */
+ background-size: 30px 30px;
+ /* background-position: 0 0, 200px 0; */
+ /* background-repeat-y: no-repeat; */
+ background-repeat-x: no-repeat;
+}
+
+.left {
+ width: 464rpx;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ color: white;
+}
+
+.right {
+ width: calc(100% - 464rpx);
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+}
+
+.coupon-container {
+ position: relative;
+ margin-bottom: 10rpx;
+ text-align: center;
+}
+
+.info-container {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+
+}
+
+.pdv20 {
+ padding-top: 20rpx;
+ padding-bottom: 20rpx;
+}
+
diff --git a/pages/user/index/index.js b/pages/user/index/index.js
index 0176f4d..5bab8c8 100644
--- a/pages/user/index/index.js
+++ b/pages/user/index/index.js
@@ -187,6 +187,10 @@ Page({
}
})
+
+
+
+
/*-----获取会员权益列表-----*/
rq.get("/api/weshop/users/grade/vipprivilegeinfo/page", {
data: {
@@ -426,7 +430,9 @@ Page({
},
//--跳转到优惠券--
coupon: function() {
+ var th = this;
if (!this.data.userInfo) return false;
+ // th.sendsm();
wx.navigateTo({
url: '../coupons/coupons',
})
@@ -673,7 +679,7 @@ Page({
}
})
},
-
+
//导航跳转
nav_goto:function(e){
var url=e.currentTarget.dataset.url;
@@ -711,6 +717,34 @@ Page({
success: function (res) {},
cancel: function (res) {}
});
- }
+ },
+
+ //订阅消息提醒
+ sendsm:function()
+ {
+ var template_id = "";
+ rq.get("/api/wx/weappSendlist/page", {
+ data: {
+ store_id: os.stoid,
+ typeid: "1020"
+ },
+ success: function(res) {
+ if (res.data.code == 0 && res.data.data.pageData.length > 0) {
+ template_id = res.data.data.pageData[0].template_id;
+ // //授权订阅
+ wx.requestSubscribeMessage({
+ tmplIds: [template_id],
+ success(res) {
+
+ },
+ fail(res) {
+
+ }
+ })
+ }
+ }
+ })
+ },
+
})
diff --git a/pages/user/integral/integral.js b/pages/user/integral/integral.js
index 43181bc..2891c46 100644
--- a/pages/user/integral/integral.js
+++ b/pages/user/integral/integral.js
@@ -192,6 +192,21 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
+
+ var th=this;
+ getApp().request.get("/api/wx/weappSendlist/page", {
+ data: {
+ store_id: os.stoid,
+ typeid: "1002"
+ },
+ success: function(res) {
+ if (res.data.code == 0 && res.data.data.pageData.length > 0) {
+ var template_id = res.data.data.pageData[0].template_id;
+ th.setData({template_id:template_id});
+ }
+ }
+ });
+
var th=this;
getApp().getConfig2(function(ee){
var json_d = JSON.parse(ee.switch_list);
@@ -207,7 +222,7 @@ Page({
},
//点击确定
- async determine(event) {
+ determine(event) {
console.log(event.currentTarget.dataset.money);
var money = event.currentTarget.dataset.money;
var integral = event.currentTarget.dataset.integral;
@@ -216,32 +231,38 @@ Page({
var user_id = getApp().globalData.user_id;
var store_id = os.stoid;
var th= this, number;
- await getApp().request.promiseGet("/api/weshop/users/getPay"
- , {
- data: { user_id: user_id, store_id: store_id, buynum: val, mon: money, integ: integral, recharge_type:1}
- }).then(res => {
- // console.log("1" + res);
- var msg = res.data.data;
- var parentSn = msg.order_sn;
- var store_id = os.stoid;
-
- getApp().request.post("/api/weshop/order/pay/createRechargeOrder", {
- data: {
- parentSn: parentSn,
- store_id: store_id
- },
- success: function (su) {
- var n = su.data.data;
- th.weixinPay(n,
- function () {
- console.log("支付成功页面2333");
- th.jumpPaymentPage();
- }, function () {
- getApp().showWarning("支付失败");
- })
- }
- })
- })
+
+ this.sendsm(function(){
+ getApp().request.promiseGet("/api/weshop/users/getPay"
+ , {
+ data: { user_id: user_id, store_id: store_id, buynum: val, mon: money, integ: integral, recharge_type:1}
+ }).then(res => {
+ // console.log("1" + res);
+ var msg = res.data.data;
+ var parentSn = msg.order_sn;
+ var store_id = os.stoid;
+
+ getApp().request.post("/api/weshop/order/pay/createRechargeOrder", {
+ data: {
+ parentSn: parentSn,
+ store_id: store_id
+ },
+ success: function (su) {
+ var n = su.data.data;
+ th.weixinPay(n,
+ function () {
+ console.log("支付成功页面2333");
+ th.jumpPaymentPage();
+ }, function () {
+ getApp().showWarning("支付失败");
+ })
+ }
+ })
+ })
+ })
+
+
+
},
//------支付成功页面--------
jumpPaymentPage: function () {
@@ -299,12 +320,6 @@ Page({
},
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
-
- },
/**
* 页面相关事件处理函数--监听用户下拉动作
@@ -319,5 +334,22 @@ Page({
*/
onShareAppMessage: function () {
- }
+ },
+
+ //订阅消息提醒
+ sendsm:function(func)
+ {
+ var template_id = this.data.template_id;
+ // //授权订阅
+ wx.requestSubscribeMessage({
+ tmplIds: [template_id],
+ success(res) {
+ func();
+ },
+ fail(res) {
+ func();
+ }
+ })
+
+ },
})
\ No newline at end of file
diff --git a/pages/user/order_detail/order_detail.js b/pages/user/order_detail/order_detail.js
index e1931e7..929e090 100644
--- a/pages/user/order_detail/order_detail.js
+++ b/pages/user/order_detail/order_detail.js
@@ -18,7 +18,23 @@ Page({
var r = void 0 !== e.isGoup && e.isGoup;
getApp().getConfig2(function (e) {
- th.setData({conf:e});
+ th.setData({conf: e,sales_rules:e.sales_rules });
+ //--- 看后台是不是有开通等级卡 ---
+ if(e.switch_list){
+ var s_list=JSON.parse(e.switch_list);
+ var user=getApp().globalData.userInfo;
+ //如果后台有开启等级价的功能
+ if(parseInt(s_list.rank_switch)==2 && user['card_expiredate']){
+ var str = user['card_expiredate'].replace(/-/g, '/');
+ var end = new Date(str);
+ end = Date.parse(end) / 1000;
+ var now = ut.gettimestamp();
+ //--- 判断是等级会员,且在有效期范围内 ---
+ if(user.card_field && now {
- }).then(res=>{
- if(res.data.code==0){
- var r_data=res.data.data;
- if(!r_data.collocationPromList && good.prom_type==5){
- wx.showModal({
- title: '提示',
- content: good.goods_name+'未找到活动'
- });
- }
- if(!r_data.promGoodsLists && good.prom_type==3){
- wx.showModal({
- title: '提示',
- content: good.goods_name+'未找到活动'
- });
- }
- }else{
- wx.showModal({
- title: '提示',
- content: good.goods_name+'未找到活动'
- });
- return false;
- }
- })
- }
-
+ if(good.prom_type==3 || good.prom_type==5){
+ await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+good.goods_id+"/0", {}).then(res => {
+ }).then(res=>{
+ if(res.data.code==0){
+ var r_data=res.data.data;
+ if(!r_data.collocationPromList && good.prom_type==5){
+ wx.showModal({
+ title: '提示',
+ content: good.goods_name+'未找到活动'
+ });
+ }
+ if(!r_data.promGoodsLists && good.prom_type==3){
+ wx.showModal({
+ title: '提示',
+ content: good.goods_name+'未找到活动'
+ });
+ }
+ }else{
+ wx.showModal({
+ title: '提示',
+ content: good.goods_name+'未找到活动'
+ });
+ return false;
+ }
+ })
+ }
+
}else{
-
- if(gg.prom_type==1 || gg.prom_type==6){
+ if((gg.prom_type==1 || gg.prom_type==6 || gg.prom_type==4) && !good.is_gift && !good.is_integral_normal && !good.is_pd_normal) {
var prom=null;
//---如果是活动的时候---
var prom=null,th=this;
@@ -387,7 +404,17 @@ Page({
}
})
}
-
+
+ if(gg.prom_type==4){
+ await getApp().request.promiseGet("/api/weshop/integralbuy/pageIntegralBuyGoodsList?stype=1&stypeup=1",{
+ data:{store_id:os.stoid,goods_id:gg.goods_id}
+ }).then(res=>{
+ if(res.data.code==0 && res.data.data && res.data.data.pageData){
+ prom=res.data.data.pageData[0];
+ }
+ })
+ }
+
if(prom){
var t_now=ut.gettimestamp();
if(prom.is_end==0 && prom.start_timet_now){
@@ -399,25 +426,26 @@ Page({
}
}
}
-
- if(!good.is_gift && !good.is_collocation) {
- var isok = 1;
- var card_field = th.data.card_field;
- //如果会员是等级会员,商品有等级价,且不是活动商品
- if (card_field && gg[card_field] > 0) {
- if (good.goods_price != gg[card_field]) isok = 0;
- } else {
- if (good.goods_price != gg.shop_price) isok = 0;
-
- }
- if (!isok) {
- wx.showModal({
- title: '提示',
- content: gg.goods_name + '商品的价格发生了变化'
- });
- return false;
- }
- }
+ //赠品和搭配购不判断商品金额
+ var isok=1;
+ var card_field=th.data.card_field;
+ //如果会员是等级会员,商品有等级价,且不是活动商品
+ if(!good.is_gift && !good.is_collocation) {
+ if (card_field && gg[card_field] > 0) {
+ if (good.goods_price != gg[card_field]) isok = 0;
+ } else {
+ if (good.goods_price != gg.shop_price) isok = 0;
+
+ }
+ var is_h=0;
+ if (!isok) {
+ wx.showModal({
+ title: '提示',
+ content: gg.goods_name + '商品的价格发生了变化'
+ });
+ return false;
+ }
+ }
//--如果是线下库存的时候--
if(th.data.conf.sales_rules==2){
@@ -444,6 +472,8 @@ Page({
}
}
+
+ console.log("------------------------------------");
var prom=null;
//---如果是活动的时候---
@@ -456,14 +486,26 @@ Page({
}
})
}
- if(goodsinfo.prom_type==6){
+ if(goodsinfo.prom_type==6 && !good.is_pd_normal){
await getApp().request.promiseGet("/api/weshop/teamlist/get/"+os.stoid+"/"+goodsinfo.prom_id,{
}).then(res=>{
if(res.data.code==0){
prom=res.data.data;
}
})
- }
+ }
+
+ if(goodsinfo.prom_type==4 && !good.is_integral_normal){
+ await getApp().request.promiseGet("/api/weshop/integralbuy/pageIntegralBuyGoodsList?stype=1&stypeup=1",{
+ data:{store_id:os.stoid,goods_id:goodsinfo.goods_id}
+ }).then(res=>{
+ if(res.data.code==0 && res.data.data && res.data.data.pageData){
+ prom=res.data.data.pageData[0];
+ }
+ })
+ }
+
+
//----------如果有活动,并且在进行中,就不计算线下库存---------------
if(prom){
var now=ut.gettimestamp();
@@ -484,27 +526,39 @@ Page({
return false;
}
- var redis_num = 0;
- //------判断活动是否抢光-----
- await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" +
- os.stoid + "/" + goodsinfo.prom_type + "/" + goodsinfo.prom_id, {
- }).then(res => {
- redis_num = res.data.data;
- });
-
- if (good.goods_num > redis_num) {
- wx.showModal({
- title: gg.goods_name+'超出商品活动库存',
- });
- return false;
- }
- }
-
+ if(goodsinfo.prom_type==4){
+ if (good.goods_num > prom.limitqty-prom.buy_num) {
+ wx.showModal({
+ title: '提示',
+ content: goodsinfo.goods_name+'购买数量超出商品活动库存'
+ });
+ return false;
+ }
+ }else{
+ var redis_num = 0;
+ //------判断活动是否抢光-----
+ await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" +
+ os.stoid + "/" + goodsinfo.prom_type + "/" + goodsinfo.prom_id, {
+ }).then(res => {
+ redis_num = res.data.data;
+ });
+
+ if (good.goods_num > redis_num) {
+ wx.showModal({
+ title: gg.goods_name+'超出商品活动库存',
+ });
+ return false;
+ }
+ }
+ }
+
}
-
+
+
o.jumpToCart4({
order_sn: this.data.order.order_sn,
- order_amount: this.data.order.order_amount
+ order_amount: this.data.order.order_amount,
+ type: 1 //正常单
}, 1);
},
checkTeam: function() {
diff --git a/pages/user/order_detail/order_detail.wxml b/pages/user/order_detail/order_detail.wxml
index 050fc96..b9c7899 100644
--- a/pages/user/order_detail/order_detail.wxml
+++ b/pages/user/order_detail/order_detail.wxml
@@ -106,9 +106,9 @@
¥ {{order.coupon_price}}元
-
+
积分
- ¥ {{order.integral_money}}元
+ {{order.integral}}积分
diff --git a/pages/user/order_list/order_list.js b/pages/user/order_list/order_list.js
index 5d971a1..f75dc40 100644
--- a/pages/user/order_list/order_list.js
+++ b/pages/user/order_list/order_list.js
@@ -56,6 +56,12 @@ Page({
currentPage2: 1,
currentDate: '',
total: 0, //读取时段内记录数量
+ is_no_data2: 0,
+ is_no_more2: 0,
+
+
+ // 搜索内容
+ searchContent: '',
},
onLoad: function(t) {
// 设置日期选择器的结束时间为当前日期
@@ -98,7 +104,7 @@ Page({
this.resetData(), this.requestOrderList(t.currentTarget.id);
},
resetData: function() {
- s.resetConfig(), this.data.orderList = null, this.data.currentPage = 1;
+ s.resetConfig(),this.data.orderList = null, this.data.currentPage = 1;
},
@@ -117,6 +123,9 @@ Page({
r += "&order_status=2"; break;
}
r+="&isdel=0";
+ if(this.data.searchContent) {
+ r+="&keyWord=" + this.data.searchContent;
+ }
this.setData({ activeCategoryId: t }); r = r + "&page=" + e.data.currentPage;
s.request(r, function (t) {
@@ -408,7 +417,7 @@ Page({
for(var i in order_goods){
var good=order_goods[i];
//如果不是小程序有的功能,直接提示要去3.0处理
- if(good.prom_type==2 || good.prom_type==4 ){
+ if(good.prom_type==2 ){
wx.showModal({
title: '提示',
content: '小程序还未有该活动,请到3.0公众号支付'
@@ -450,7 +459,8 @@ Page({
return false;
}
- if((good.prom_type==1 || good.prom_type==6 || good.prom_type==5 ) && !good.is_gift && !good.is_collocation){
+ //商品的普通购买 ,不要进行判断
+ if((good.prom_type==1 || good.prom_type==6 || good.prom_type==5 || good.prom_type==4) && !good.is_gift && !good.is_collocation && !good.is_integral_normal && !good.is_pd_normal){
if(gg.prom_type!=good.prom_type) {
wx.showModal({
title: '提示',
@@ -486,7 +496,7 @@ Page({
}
}else{
- if(gg.prom_type==1 || gg.prom_type==6){
+ if((gg.prom_type==1 || gg.prom_type==6 || gg.prom_type==4) && !good.is_gift && !good.is_integral_normal && !good.is_pd_normal) {
var prom=null;
//---如果是活动的时候---
var prom=null,th=this;
@@ -506,7 +516,17 @@ Page({
}
})
}
-
+
+ if(gg.prom_type==4){
+ await getApp().request.promiseGet("/api/weshop/integralbuy/pageIntegralBuyGoodsList?stype=1&stypeup=1",{
+ data:{store_id:os.stoid,goods_id:gg.goods_id}
+ }).then(res=>{
+ if(res.data.code==0 && res.data.data && res.data.data.pageData){
+ prom=res.data.data.pageData[0];
+ }
+ })
+ }
+
if(prom){
var t_now=ut.gettimestamp();
if(prom.is_end==0 && prom.start_timet_now){
@@ -578,14 +598,26 @@ Page({
}
})
}
- if(goodsinfo.prom_type==6){
+ if(goodsinfo.prom_type==6 && !good.is_pd_normal){
await getApp().request.promiseGet("/api/weshop/teamlist/get/"+os.stoid+"/"+goodsinfo.prom_id,{
}).then(res=>{
if(res.data.code==0){
prom=res.data.data;
}
})
- }
+ }
+
+ if(goodsinfo.prom_type==4 && !good.is_integral_normal){
+ await getApp().request.promiseGet("/api/weshop/integralbuy/pageIntegralBuyGoodsList?stype=1&stypeup=1",{
+ data:{store_id:os.stoid,goods_id:goodsinfo.goods_id}
+ }).then(res=>{
+ if(res.data.code==0 && res.data.data && res.data.data.pageData){
+ prom=res.data.data.pageData[0];
+ }
+ })
+ }
+
+
//----------如果有活动,并且在进行中,就不计算线下库存---------------
if(prom){
var now=ut.gettimestamp();
@@ -606,20 +638,32 @@ Page({
return false;
}
- var redis_num = 0;
- //------判断活动是否抢光-----
- await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" +
- os.stoid + "/" + goodsinfo.prom_type + "/" + goodsinfo.prom_id, {
- }).then(res => {
- redis_num = res.data.data;
- });
+ if(goodsinfo.prom_type==4){
+ if (good.goods_num > prom.limitqty-prom.buy_num) {
+ wx.showModal({
+ title: '提示',
+ content: goodsinfo.goods_name+'购买数量超出商品活动库存'
+ });
+ return false;
+ }
+ }else{
+ var redis_num = 0;
+ //------判断活动是否抢光-----
+ await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" +
+ os.stoid + "/" + goodsinfo.prom_type + "/" + goodsinfo.prom_id, {
+ }).then(res => {
+ redis_num = res.data.data;
+ });
+
+ if (good.goods_num > redis_num) {
+ wx.showModal({
+ title: gg.goods_name+'超出商品活动库存',
+ });
+ return false;
+ }
+ }
+
- if (good.goods_num > redis_num) {
- wx.showModal({
- title: gg.goods_name+'超出商品活动库存',
- });
- return false;
- }
}
@@ -630,6 +674,9 @@ Page({
pay_next(e){
var th=this;
+
+
+
if (e.order_amount == 0) {
var dd = {
parent_sn: e.order_sn,
@@ -1246,7 +1293,7 @@ Page({
},
request_list: function(data, callback){
- // console.log('触发上拉刷新');
+ // console.log('进入request_list');
var th = this;
if(this.data.is_load2) return false; //-- 正在加载
@@ -1282,7 +1329,7 @@ Page({
th.setData({is_no_more2:1});
}
}
- if(callback) callback();
+ if(callback) callback(res);
} else {
wx.showToast({
title: res.data.msg,
@@ -1307,6 +1354,10 @@ Page({
});
if(currentIndex == 0) {
console.log('线上订单');
+ this.setData({
+ startDate: '选择开始时间',
+ endDate: '选择结束时间',
+ });
} else if(currentIndex == 1) {
console.log('线下订单');
@@ -1331,40 +1382,73 @@ Page({
endDate: e.detail.value
})
},
+
+ bindInput(e) {
+ this.data.searchContent = e.detail.value;
+ },
+
+ searchOnline() {
+ console.log('online',this.data.searchContent);
+ if(this.data.searchContent) {
+ console.log(this.data.searchContent);
+ this.resetData(), this.requestOrderList(this.data.activeCategoryId);
+ } else {
+ wx.showToast({
+ title: '您还没有输入搜索内容~',
+ icon: 'none',
+ })
+ };
+ },
- search() {
+ searchOffline() {
+ console.log('执行查询');
let th = this;
let startDate = this.data.startDate;
let endDate = this.data.endDate;
-
+
+ // this.data.is_no_data2 = 0;
+ this.setData({
+ currentPage2: 1,
+ list2: [],
+ is_no_data2: 0,
+ });
+
+
if(startDate == '选择开始时间' || endDate == '选择结束时间') {
wx.showToast({
title: '请选择完整的查询时间~',
icon: 'none',
})
- }
+ };
if(new Date(startDate) > new Date(endDate)) {
wx.showToast({
- title: '敲黑板!开始时间不能晚于结束时间噢~',
+ title: '不对噢!开始时间不能晚于结束时间~',
icon: 'none',
})
- }
+ return;
+ };
this.request_list({
store_id: os.stoid,
user_id: oo.user_id,
page: 1,
- BeginDate:this.data.startDate,
- EndDate: this.data.endDate,
- }, function() {
- th.setData({
- total: res.data.data.total
- });
+ BeginDate: this.data.startDate,
+ EndDate: this.data.endDate
+ }, function(res) {
+ if(res.data.data.total == 0) {
+ wx.showToast({
+ title: '没有找到相关订单',
+ icon: 'none',
+ duration: 2000
+ })
+ } else {
+ th.setData({
+ total: res.data.data.total
+ });
+ }
});
-
-
},
currentDate() {
diff --git a/pages/user/order_list/order_list.wxml b/pages/user/order_list/order_list.wxml
index 52a240c..a686d2a 100644
--- a/pages/user/order_list/order_list.wxml
+++ b/pages/user/order_list/order_list.wxml
@@ -1,12 +1,12 @@
- 线上订单
- 线下订单
+ 线上订单
+ 线下订单
-
- 搜索
+
+ 搜索
@@ -26,7 +26,7 @@
{{endDate}}
- 查询
+ 查询
注:读取时段内仅{{total}}笔记录
@@ -35,11 +35,11 @@
-
+
订单编号:{{item.order_sn}}
-
+
组团中
未支付
@@ -81,7 +81,7 @@
- {{goods.goods_name}}
+ {{goods.goods_name}}
@@ -104,9 +104,9 @@
-
+
¥
- {{filters.toFix(goods.member_goods_price,2)}}
+ {{filters.toFix(goods.member_goods_price,2)}}
x{{goods.goods_num}}
@@ -115,7 +115,7 @@
-
+
共{{item.g_num}}件商品
@@ -124,8 +124,8 @@
合计(改):
- ¥
- {{filters.toFix(item.order_amount+item.user_money+item.pt_tail_money,2)}}
+ ¥
+ {{filters.toFix(item.order_amount+item.user_money+item.pt_tail_money,2)}}
@@ -133,22 +133,22 @@
定金(改):
- ¥
- {{filters.toFix(item.order_amount+item.user_money,2)}}
+ ¥
+ {{filters.toFix(item.order_amount+item.user_money,2)}}
合计(改):
- ¥
- {{filters.toFix(item.order_amount+item.user_money,2)}}
+ ¥
+ {{filters.toFix(item.order_amount+item.user_money,2)}}
+{{item.coupon_price}}元优惠券
+{{item.integral}}积分
待支付尾款:
- ¥
- {{filters.toFix(item.pt_tail_money-item.shipping_price,2)}}
+ ¥
+ {{filters.toFix(item.pt_tail_money-item.shipping_price,2)}}
@@ -157,7 +157,7 @@
-
+
取消订单
拼团失败
@@ -182,7 +182,7 @@
- 评价
评价
@@ -208,10 +208,10 @@
- 单号:{{item.No}}
+ 单号:{{item.No}}
{{item.BillDate}}
- 消费总额:¥{{item.Sum}}
+ 消费总额:¥{{item.Sum}}
{{i.BarCode}} - {{i.WareName}}
diff --git a/pages/user/order_list/order_list.wxss b/pages/user/order_list/order_list.wxss
index eb7292c..f5752cd 100644
--- a/pages/user/order_list/order_list.wxss
+++ b/pages/user/order_list/order_list.wxss
@@ -21,6 +21,14 @@ mgt12 {
color: #999;
}
+.c-tb {
+ color: #ff5000;
+}
+
+.c-r {
+ color: #FF3B3D;
+}
+
/* 内边距 */
.pdt20 {
padding-top: 20rpx;
@@ -52,7 +60,7 @@ page {
height: 88rpx;
background-color: #fff;
justify-content: space-between;
- border-top: 2rpx solid #f6f6f6;
+ /* border-top: 2rpx solid #f6f6f6; */
}
.type-box {
@@ -69,37 +77,37 @@ page {
}
.type-item-on {
- background-color: #FF3B3D;
- color: white;
+ /* background-color: #FF3B3D; */
+ color: #FF3B3D;
font-weight: bold;
/* border-bottom: 4rpx solid #ED3036; */
position: relative;
}
.type-item-on:after {
- /* content: '';
+ content: '';
position: absolute;
left: 0;
right: 0;
bottom: 0;
- width: 50%;
+ width: 40%;
height: 4rpx;
- background-color: #ED3036;
- margin: 0 auto; */
+ background-color: #FF3B3D;
+ margin: 0 auto;
}
.container {
position: fixed;
width: 100%;
top: 0;
- z-index: 999;
+ z-index: 4;
/* position: -webkit-sticky;
position:sticky;
top: 0; */
}
.list-container {
- padding-left: 18rpx;
- padding-right: 18rpx;
+ padding-left: 20rpx;
+ padding-right: 20rpx;
overflow: hidden;
/* height: calc(100% - 282rpx); */
padding-top: 282rpx;
@@ -107,7 +115,7 @@ page {
.stay_evaluate {
background-color: white;
- margin-top: 18rpx;
+ margin-top: 20rpx;
border-radius: 8rpx;
}
@@ -210,10 +218,12 @@ page {
height: 50rpx;
line-height: 50rpx;
text-align: center;
- border: 1px solid #eee;
+ /* border: 1px solid #eee; */
margin-left: 10rpx;
- float: right;
- border-radius: 15rpx;
+ /* float: right; */
+ border-radius: 6rpx;
+ overflow: hidden;
+ background-color: #FF3B3D;
}
.order-btn-pay {
@@ -282,6 +292,7 @@ page {
width: 485rpx;
/* height: 75rpx; */
line-height: 37rpx;
+ text-align: justify;
}
.Commodity_content {
@@ -309,7 +320,8 @@ page {
.commodity_evaluate .commodity_smy .commodity_money {
margin-left: 29rpx;
letter-spacing: 1rpx;
- font-weight: bold;
+ /* font-weight: bold; */
+
}
.commodity_evaluate .links {
@@ -318,6 +330,8 @@ page {
padding-top: 20rpx;
padding-bottom: 20rpx;
border-top: 2rpx solid #F6F6F6;
+ display: flex;
+ align-items: center;
}
.commodity_evaluate .commodity_To_evaluate {
@@ -448,8 +462,8 @@ page {
.rel {
box-sizing: border-box;
- width: 184rpx;
- height: 184rpx;
+ width: 180rpx;
+ height: 180rpx;
overflow: hidden;
/* border: 2rpx solid rgb(236, 236, 236); */
}
@@ -465,8 +479,8 @@ page {
line-height: 40rpx;
}
.code{
- width: 55rpx;
- height: 55rpx;
+ width: 44rpx;
+ height: 44rpx;
}
.refund{
margin-top: 20rpx;
@@ -479,6 +493,9 @@ page {
font-size: 28rpx;
border-bottom: 2rpx solid #f2f2f2;
}
+.tab-container .iconfont {
+ margin-right: 10rpx;
+}
.tab {
flex: 1;
line-height: 80rpx;
@@ -487,6 +504,7 @@ page {
}
.tab.active {
color: #FF3B3D;
+ font-weight: bold;
}
.tab.active::after {
content: '';
@@ -531,10 +549,10 @@ page {
border-radius: 10rpx;
}
.picker {
- color: #999;
+ color: #ccc;
text-align: center;
line-height: 70rpx;
- font-size: 28rpx;
+ font-size: 26rpx;
}
.list2 {
@@ -543,11 +561,18 @@ page {
}
.title {
padding: 20rpx;
- font-size: 28rpx;
+ font-size: 26rpx;
+ display: flex;
+ align-items: center;
+}
+.icon-order {
+ font-size: 26rpx;
+ color: #FF3B3D;
+ margin-right: 10rpx;
}
.subtitle {
display: flex;
- font-size: 26rpx;
+ font-size: 24rpx;
justify-content: space-between;
background-color: #f0f0f0;
line-height: 60rpx;
@@ -561,12 +586,12 @@ page {
.subitem {
width: calc(100% / 3);
text-align: center;
- font-size: 28rpx;
+ font-size: 26rpx;
}
.name {
padding: 0 20rpx;
margin: 20rpx 0;
- font-size: 30rpx;
+ font-size: 26rpx;
word-break: break-all;
text-align: justify;
}
@@ -584,5 +609,9 @@ page {
}
.search-btn2 {
- border-radius-top-left: 8rpx;
+ border-top-left-radius: 8rpx;
+ border-bottom-left-radius: 8rpx;
}
+
+
+