diff --git a/app.wxss b/app.wxss
index 0807496..b593c38 100644
--- a/app.wxss
+++ b/app.wxss
@@ -135,6 +135,7 @@
box-sizing: border-box;
}
+
.c-green {
color: #7CFC00;
}
@@ -159,6 +160,14 @@
color: #c7c7c7;
}
+.c-6 {
+ color: #666;
+}
+
+.c-9 {
+ color: #999;
+}
+
.c-d {
@@ -232,6 +241,11 @@
margin-top: 30rpx;
}
+.mgt40 {
+ margin-top: 40rpx;
+}
+
+
.h68 {
height: 68rpx;
}
@@ -729,9 +743,9 @@ background: #ffe3e2;
/* 图标字体(ty) */
@font-face {
font-family: 'iconfont'; /* Project id 2054717 */
- src: url('//at.alicdn.com/t/font_2054717_kwrwze5y6c.woff2?t=1635844276600') format('woff2'),
- url('//at.alicdn.com/t/font_2054717_kwrwze5y6c.woff?t=1635844276600') format('woff'),
- url('//at.alicdn.com/t/font_2054717_kwrwze5y6c.ttf?t=1635844276600') format('truetype');
+ src: url('//at.alicdn.com/t/font_2054717_y42sikta7lc.woff2?t=1642407649188') format('woff2'),
+ url('//at.alicdn.com/t/font_2054717_y42sikta7lc.woff?t=1642407649188') format('woff'),
+ url('//at.alicdn.com/t/font_2054717_y42sikta7lc.ttf?t=1642407649188') format('truetype');
}
.iconfont {
@@ -742,6 +756,18 @@ background: #ffe3e2;
-moz-osx-font-smoothing: grayscale;
}
+.icon-shangpin:before {
+ content: "\e661";
+}
+
+.icon-bankcard:before {
+ content: "\e693";
+}
+
+.icon-tongbu:before {
+ content: "\e6ca";
+}
+
.icon-luck:before {
content: "\e621";
}
diff --git a/packageA/pages/details_serviceCard/details_serviceCard.js b/packageA/pages/details_serviceCard/details_serviceCard.js
index 4cd640e..83d9784 100644
--- a/packageA/pages/details_serviceCard/details_serviceCard.js
+++ b/packageA/pages/details_serviceCard/details_serviceCard.js
@@ -1,66 +1,481 @@
// packageA/pages/details_serviceCard/details_serviceCard.js
+const app = getApp();
+const os = app.globalData.setting;
+let self = null;
+
Page({
- /**
- * 页面的初始数据
- */
- data: {
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ is_summit_ing: 0,
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function(options) {
+ self = this;
+ this.data.options = options;
+ app.isLogin().then(function(data) {
+ self.setData({
+ userInfo: data,
+ });
+ self.getConfig();
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function() {
+ if (app.globalData.userInfo) {
+ if (!this.data.isLogin) {
+ this.setData({
+ userInfo: app.globalData.userInfo,
+ imghost: app.globalData.setting.imghost,
+ isLogin: true,
+ });
+
+ let url = '/api/weshop/recharge/user/page'
+ let data = {
+ store_id: app.globalData.setting.stoid,
+ user_id: this.data.userInfo.user_id,
+ order_id: this.data.options.order_id,
+ };
+
+ // 请求数据
+ app.promiseGet(url, {
+ data: data,
+ }).then(res => {
+ if (res.data.code == 0) {
+ console.log('请求成功', res);
+ this.setData({
+ details: res.data.data.pageData[0],
+ });
+ } else {
+ throw (res);
+ };
+ }).catch(err => {
+ wx.showToast({
+ title: err.data.data,
+ icon: 'error',
+ });
+ });
+
+ };
+ };
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function() {
+
+ },
+
+
+ // 内容复制到剪贴板
+ copy() {
+ console.log('点击了复制按钮');
+ wx.setClipboardData({
+ data: this.data.details.order_sn,
+ success(res) {
+ wx.getClipboardData({
+ success(res) {
+ console.log(res.data);
+ }
+ })
+ }
+ })
+ },
+
+
+ // 图片异常时加载默认图片
+ bind_bnerr(e) {
+ var errImg = e.currentTarget.dataset.errorimg;
+ var errObj = {};
+ errObj[errImg] = 'public/images/default_goods_image_240.gif';
+ this.setData(errObj); // this.setData({ details.list[0].img_url});
+ },
+
+
+ // 查看商品详情
+ viewDetails(e) {
+ let goods_id = e.currentTarget.dataset.gid;
+ let url = '/packageA/pages/goodsInfo/goodsInfo?goods_id=' + goods_id;
+ app.goto(url);
+ },
+
+ // 获取系统参数
+ getConfig() {
+ app.getConfig2(function(e) {
+ // console.log('101',e);
+ let json_d = JSON.parse(e.switch_list);
+ self.setData({
+ sys_switch: json_d,
+ // weapp_customertype: json_d.weapp_customertype,
+ });
+ }, 1);
+ },
+
+
+ // 联系微信客服
+ contact_wx() {
+ var url = this.data.sys_switch.weapp_customertype_url;
+ var id = this.data.sys_switch.weapp_customertype_appid;
+ wx.openCustomerServiceChat({
+ extInfo: {
+ url: url
+ },
+ corpId: id,
+ success(res) {}
+ })
+ },
+
+
+ // 联系电话客服
+ contactService() {
+ app.getConfig(function(t) {
+ if (t.store_tel == undefined) {
+ app.request.get('/api/weshop/store/get/' + os.stoid, {
+ isShowLoading: 1,
+ data: {},
+ success: function(rs) {
+ app.globalData.config = rs.data.data;
+ if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) {
+ app.my_warnning('商家未设置电话', 0, self);
+ return false;
+ }
+ app.confirmBox('请联系客服:' + rs.data.data.store_tel);
+ }
+ })
+ } else {
+ app.confirmBox('请联系客服:' + t.store_tel);
+ }
+ });
+ },
+
+
+ // 评价商品
+ access() {
+ let listLength = this.data.details.list.length;
+ let order_id = this.data.details.order_id;
+ let url = '';
+
+ // 卡项订单跳转到评论页要多加个参数card=1
+ // 卡项订单goods_id要带card_id
+ if (listLength == 1) {
+ let price = this.data.details.list[0].price;
+ let card_id = this.data.details.list[0].card_id;
+ url =
+ `/packageB/pages/user/add_comment/add_comment?card=1&goods_id=${card_id}&order_id=${order_id}&price=${price}`
+ };
+ if (listLength > 1) {
+ url = `/packageB/pages/user/comment/comment?card=1&status=0&order_id=${order_id}`;
+ };
+ f
+ // console.log('url', url);
+ app.goto(url);
+ },
+
+
+ // 查看评论
+ viewComment() {
+ let order_id = this.data.details.order_id;
+ let card_id = this.data.details.list[0].card_id;
+ let listLength = this.data.details.list.length;
+ let url = '';
+
+ // 卡项订单单个商品
+ if (listLength == 1) {
+ url = `/packageB/pages/user/view_comment/view_comment?card=1&goods_id=${card_id}&order_id=${order_id}`;
+ };
+ // 卡项订单多个商品
+ if (listLength > 1) {
+ // status控制评论列表页的activeStatus
+ url = `/packageB/pages/user/comment/comment?card=1&status=1&order_id=${order_id}`;
+ };
+
+ app.goto(url);
+ },
+
+
+ // 再来一单
+ buy2(t) {
+ let details = this.data.details;
+ var th = this;
+ var ind = 1; // 1:加入购物车
+ // var ind = t.currentTarget.dataset.openSpecModal_ind;
+ // var action= t.currentTarget.dataset.action;
+ var action = 'add'; //
+ // if(!ind) ind = t.currentTarget.dataset.openspecmodal_ind;
+
+ th.setData({
+ open_ind_store: ind
+ });
+
+ // if(!th.data.sto_sele_name){
+ // getApp().my_warnning('请选择门店', 1, th, 450);
+ // return false;
+ // }
+
+
+ if (action == "buy") {
+ //--------------此时操作的数据------------
+ // var newd = {
+ // id: th.data.data.id,
+ // goods_num: th.data.goodsInputNum,
+ // pick_id: th.data.sto_sele_id,
+ // keyid: th.data.sto_sele_keyid,
+ // };
+ // newd['pick_name'] = th.data.sto_sele_name;
+ // newd['guide_id'] = getApp().globalData.guide_id;
+ // newd['guide_type']=0;
+ // th.buyNow(newd);
+ } else {
+
+ var newd = {
+ // service_id: th.data.data.id,
+ // service_sn:th.data.data.service_sn,
+ // service_name:th.data.data.goods_name,
+ // goods_num: th.data.goodsInputNum,
+ // pick_id: th.data.sto_sele_id,
+ // user_id:oo.user_id,
+ // store_id:os.stoid,
+ // money:th.data.data.shop_price,
+
+ service_id: details.list[0].card_id,
+ service_sn: details.list[0].service_sn,
+ service_name: details.list[0].service_name,
+ goods_num: details.list[0].qty,
+ pick_id: details.list[0].pickup_id,
+ user_id: this.data.userInfo.user_id,
+ store_id: app.globalData.setting.stoid,
+ money: details.list[0].price,
+ };
+ if (getApp().globalData.guide_id) {
+ newd['guide_id'] = getApp().globalData.guide_id;
+ newd['guide_type'] = 0;
+ }
+
+ //----先看会员在购物车中是否加入了该商品-----
+ app.request.get("/api/weshop/cartService/page", {
+ data: {
+ store_id: app.globalData.setting.stoid,
+ user_id: this.data.userInfo.user_id,
+ service_id: details.list[0].card_id,
+ pick_id: details.list[0].pickup_id,
+ },
+ success: function(re) {
+
+ //-------如果购物车中有相关的数据---------
+ if (re.data.data.total > 0) {
+ var item = re.data.data.pageData[0];
+ var updata = {
+ id: item.id,
+ goods_num: details.list[0].qty + item.goods_num,
+ money: details.list[0].price,
+ store_id: app.globalData.setting.stoid,
+ };
+
+ if (getApp().globalData.guide_id) {
+ updata['guide_id'] = getApp().globalData.guide_id;
+ updata['guide_type'] = 1;
+ }
+ getApp().request.put("/api/weshop/cartService/update", {
+ data: updata,
+ success: function(t) {
+ // getApp().my_warnning('加入购物车成功', 1, th, 450);
+ var c_num = th.data.cartGoodsNum + th.data.goodsInputNum;
+ th.setData({
+ cartGoodsNum: c_num
+ });
+ app.goto('/pages/cart/cart/cart');
+ // th.closeSpecModal();
+ }
+ });
+ } else {
+
+ getApp().request.post("/api/weshop/cartService/save", {
+ data: newd,
+ success: function(t) {
+ // getApp().my_warnning('加入购物车成功', 1, th, 450);
+ var c_num = th.data.cartGoodsNum + th.data.goodsInputNum;
+ th.setData({
+ cartGoodsNum: c_num
+ });
+ app.goto('/pages/cart/cart/cart');
+ // th.closeSpecModal();
+ }
+ });
+ }
+ }
+ });
+
+ }
+ },
+
+
+ // 取消订单
+ // api/weshop/recharge/update?store_id=&order_id=&order_status=3
+ cancle() {
+ wx.showModal({
+ title: '提示',
+ content: '确定取消订单吗?',
+ success(res) {
+ if (res.confirm) {
+ console.log('用户点击确定');
+ let order_id = self.data.details.order_id;
+ let order_sn = self.data.details.order_sn;
+ app.request.put('/api/weshop/recharge/update', {
+ data: {
+ store_id: os.stoid,
+ order_id: order_id,
+ order_sn: order_sn,
+ order_status: 3,
+ },
+ success: function(res) {
- },
+ //取消成功刷新订单
+ let url = '/api/weshop/recharge/user/page'
+ let data = {
+ store_id: app.globalData.setting.stoid,
+ user_id: self.data.userInfo.user_id,
+ order_id: self.data.options.order_id,
+ };
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
+ // 请求数据
+ app.promiseGet(url, {
+ data: data,
+ }).then(res => {
+ if (res.data.code == 0) {
+ console.log('请求成功', res);
+ wx.showToast({
+ title: '取消成功',
+ });
+ self.setData({
+ details: res.data.data.pageData[0],
+ });
+ } else {
+ throw (res);
+ };
+ }).catch(err => {
+ wx.showToast({
+ title: err.data.data,
+ icon: 'error',
+ });
+ });
- },
+ },
+ })
+ } else if (res.cancel) {
+ console.log('用户点击取消');
+ }
+ }
+ });
+ },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
- },
+ // 立即支付
+ pay() {
+ let order_sn = this.data.details.order_sn;
+ let store_id = app.globalData.setting.stoid;
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
+ app.request.post('/api/weshop/order/pay/createRechargeOrder', {
+ data: {
+ parentSn: order_sn,
+ store_id: store_id,
+ },
- },
+ success: function(res) {
+ var n = res.data.data;
+ self.weixinPay(n, function() {
+ app.showWarning('支付成功');
+ // setTimeout(function() {
+ // wx.reLaunch({
+ // url: '/pages/user/my_service/i_service',
+ // })
+ // }, 1000)
+ }, function() {
+ app.showWarning('支付失败');
+ // setTimeout(function() {
+ // wx.reLaunch({
+ // url: '/packageA/pages/cardList/cardList',
+ // })
+ // }, 1000)
+ });
+ }
+ })
+ },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
- },
+ //------调起支付框--------
+ weixinPay: function(n, success, fail) {
+ if (!n) return false;
+ 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();
+ }
+ });
+ },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
- },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
- }
-})
\ No newline at end of file
+})
diff --git a/packageA/pages/details_serviceCard/details_serviceCard.wxml b/packageA/pages/details_serviceCard/details_serviceCard.wxml
index a3825a8..40b576b 100644
--- a/packageA/pages/details_serviceCard/details_serviceCard.wxml
+++ b/packageA/pages/details_serviceCard/details_serviceCard.wxml
@@ -1,46 +1,88 @@
+
+
-
-
- 门店名称名称名称名称名称名称名称名称名称名称
- 待评价
-
-
-
-
-
-
-
- 我是商品标题
- 10
+
+
+
+ {{item.pickup_name}}
+
+
+ 待支付
+ 待评价
+ 已评价
+ 已取消
+ 已作废
+
+
+
+
+
+
+
+
+
-
- 10个/蓝色
- x1
+
+
+ {{item.service_name}}
+ {{item.price}}
+
+
+
+ x{{item.qty}}
+
-
+
+
+
- 共2件商品,合计:21.00
+ 共{{filter.count(details.list)}}件商品,合计:{{details.account}}
+
+
订单信息
+
- 订单编号:fwk20221252125222212
- 复制
+ 订单编号:{{details.order_sn}}
+ 复制
- 下单时间:2021-12-27 18:00:00
+ 下单时间:{{filter.format_time(details.ctime, 1)}}
+
- 联系客服
- 卡项同步
+
+
+
+ 联系客服
+ 联系客服
+
+
+
+
- 立即评价
- 再来一单
+
+
+ 取消订单
+ 立即支付
+
+
+
+ 再来一单
+ 立即评价
+
+
+
+ 再来一单
+ 查看评价
+
diff --git a/packageA/pages/details_serviceCard/details_serviceCard.wxss b/packageA/pages/details_serviceCard/details_serviceCard.wxss
index 91b3ce2..ca4f2b6 100644
--- a/packageA/pages/details_serviceCard/details_serviceCard.wxss
+++ b/packageA/pages/details_serviceCard/details_serviceCard.wxss
@@ -18,6 +18,7 @@ page {
border: 2rpx solid #808080;
}
+
.bg-red {
background-image: -webkit-linear-gradient(315deg,#f2140c,#f2270c 70%,#f24d0c);
background-image: linear-gradient(135deg,#f2140c,#f2270c 70%,#f24d0c);
diff --git a/pages/goods/categoryList/categoryList.js b/pages/goods/categoryList/categoryList.js
index 291b636..a69258c 100644
--- a/pages/goods/categoryList/categoryList.js
+++ b/pages/goods/categoryList/categoryList.js
@@ -67,7 +67,10 @@ Page({
status_show:0,
currentTab: 0, //预设当前项的值
- load:0,
+ load:0,
+ xmlist: null,
+
+
},
@@ -134,6 +137,7 @@ Page({
if (this.data.is_used_share==0){
this.get_nation();
+ this.getServiceCategory();
}
//风格三
@@ -202,7 +206,7 @@ Page({
if(this.data.load) return false;
getApp().getConfig2(function (e) {
-
+ console.log('card------------>>>>', e);
var data=e;
var switch_list_data = data.switch_list;
var switch_list = JSON.parse(switch_list_data);
@@ -215,13 +219,14 @@ Page({
if (e.categoryset.indexOf("," + 1 + ",") != -1) { that.setData({ is_show_pl: 1 }); }
if (e.categoryset.indexOf("," + 3 + ",") != -1) { that.setData({ is_show_pp: 1 }); }
if (e.categoryset.indexOf("," + 2 + ",") != -1) { that.setData({ is_show_gb: 1 }); }
+ if (e.categoryset.indexOf("," + 4 + ",") != -1) { that.setData({ is_show_xm: 1 }); }
that.setData({ store_config: e,is_do:1 });
//---有勾品类---
if (that.data.is_show_pl){
that.requestFirstCategoris();
}
- if (that.data.is_show_gb != 1 && that.data.is_show_pp != 1 && that.data.is_show_pl){
+ if (that.data.is_show_xm != 1 && that.data.is_show_gb != 1 && that.data.is_show_pp != 1 && that.data.is_show_pl){
that.data.pl_timer = setInterval(function () {
if (that.data.one_level_classify.length>0){
var item=that.data.one_level_classify[0],arr=item.array;
@@ -259,6 +264,7 @@ Page({
if (that.data.is_show_pl) that.setData({ currentTab: 0 });
else if (that.data.is_show_gb){ that.setData({ currentTab: 1 });that.get_nation(); }
else if (that.data.is_show_pp) {that.setData({ currentTab: 2 });that.get_brand(); }
+ else if (that.data.is_show_xm) {that.setData({ currentTab: 3 });that.getServiceCategory(); }
//----求传参过来的控制-----
if (getApp().globalData.cat_type == 1 && that.data.is_show_gb ) {
@@ -267,6 +273,9 @@ Page({
} else if (getApp().globalData.cat_type == 2 && that.data.is_show_pp ) {
that.setData({ currentTab: 2 });
that.get_brand();
+ } else if (getApp().globalData.cat_type == 3 && that.data.is_show_xm ) {
+ that.setData({ currentTab: 3 });
+ that.getServiceCategory();
} else if (that.data.is_show_pl) {
that.setData({ currentTab: 0 });
}
@@ -277,7 +286,7 @@ Page({
that.setData({ status_show: 2 });
}
- that.data.load=1;
+ that.data.load=1;
})
},
@@ -402,6 +411,13 @@ Page({
if (e.detail.current == 2 && that.data.groups == null) {
that.get_brand();
}
+
+ //获取服务卡项
+ if (e.detail.current == 3 && that.data.xmlist == null) {
+ that.getServiceCategory();
+ }
+
+
},
//-----------点击切换-----------
clickTab: function (e) {
@@ -422,9 +438,15 @@ Page({
if (e.detail.current == 2 && that.data.groups == null) {
that.get_brand();
}
+
+ //获取服务卡项
+ if (e.detail.current == 3 && that.data.xmlist == null) {
+ that.getServiceCategory();
+ }
+
},
- tabLetter(e) {
+ tabLetter(e) {
const index = e.currentTarget.dataset.index;
this.setData({
selected: index,
@@ -488,8 +510,9 @@ Page({
var lurl = "/pages/goods/goodsList/goodsList?nation_id=" + cid;
wx.navigateTo({ url: lurl });
},
+
//获取国别
- get_nation:function(){
+ get_nation:function() {
var s = this;
e.get("/api/weshop/nation/page", {
data: {
@@ -575,6 +598,33 @@ Page({
}
});
},
+
+
+ // 获取服务卡项分类
+ getServiceCategory: function() {
+ var s = this;
+ e.get("/api/weshop/serviceCategory/page", {
+ data: {
+ is_show: 1,
+ store_id:oo.stoid,
+ pageSize: 1000,
+ },
+ success: function (e) {
+ var dda = e.data.data.pageData;
+ s.setData({
+ xmlist:dda,
+ });
+ }
+ });
+ },
+
+
+ goServiceCategoryList: function(t) {
+ var cid = t.currentTarget.dataset.cid;
+ var lurl = "/packageA/pages/cardList/cardList?cat_id=" + cid;
+ wx.navigateTo({ url: lurl });
+ },
+
//---------分享配置--------
onShareAppMessage: function (e) {
@@ -659,7 +709,7 @@ Page({
let cur = e.currentTarget.dataset.current;
if(cur) {
if (this.data.currentTab == cur) {
- if (this.data.select_classify_on != 220 && this.data.select_classify_on != 223) {
+ if (this.data.select_classify_on != 220 && this.data.select_classify_on != 221 && this.data.select_classify_on != 223) {
return false;
} else if (cur != 0) {
return false;
@@ -746,6 +796,8 @@ Page({
_errObj[_errImg] = "/miniapp/images/default_g_img.gif";
this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
},
+
+
//选择更多
select_more:function(e){
var cid = e.currentTarget.dataset.cid;
@@ -754,6 +806,8 @@ Page({
wx.navigateTo({ url: lurl });
},
+
+
//扫一扫
getScancode:function(){
var _this = this;
@@ -767,6 +821,8 @@ Page({
}
})
},
+
+
onUnload: function () {
//this.destroyActivityTimer();
},
diff --git a/pages/goods/categoryList/categoryList.wxml b/pages/goods/categoryList/categoryList.wxml
index e7c7e1e..211dc16 100644
--- a/pages/goods/categoryList/categoryList.wxml
+++ b/pages/goods/categoryList/categoryList.wxml
@@ -12,6 +12,8 @@
data-current="1" bindtap="clickTab">国家
品牌
+ 项目
@@ -22,7 +24,7 @@
-
+
@@ -86,6 +88,26 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{fitem.name}}
+
+ {{item.name}}
+
+
+
+
+
@@ -103,7 +125,7 @@
-
+
-
+
-
-
-
- 国家
+
+
+
+ 国家
+
-
-
+
+
-
+
-
- 品牌
-
+
+ 品牌
+
+
+
+
+
+ 项目
+
+
+
+
+
-
-
-
-
-
-
-
- {{ittms.items.name}}
-
-
-
+
+
+
+
+
+
+ {{ittms.items.name}}
+
+
+
+
+
-
-
@@ -211,11 +243,32 @@
+
+
+
+
+
+ {{classify_name}}
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
-
-
+
+
+
-
+
{{classify_name}}
更多
@@ -241,8 +294,8 @@
-
-
+
+
@@ -282,7 +335,7 @@
-
+
+
+
+ 项目
+
+
+
+
+
@@ -356,6 +420,9 @@
+
+
+
@@ -383,6 +450,8 @@
+
+
@@ -405,9 +474,31 @@
+
+
+
+
+
+ {{classify_name}}
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
diff --git a/pages/payment/pay_success/pay_success.js b/pages/payment/pay_success/pay_success.js
index 9b415c8..ae38430 100644
--- a/pages/payment/pay_success/pay_success.js
+++ b/pages/payment/pay_success/pay_success.js
@@ -24,44 +24,84 @@ Page({
wx.setNavigationBarTitle({
title: '支付成功',
});
-
+ this.setData({
+ options,
+ });
var type=options.type,order_sn=options.order_sn;
var th=this,order=null;
- //如果是等1,就是单个订单的订单号
- if(type==1){
- await getApp().request.promiseGet("/api/weshop/order/page",
- {data:{store_id:e.globalData.setting.stoid,order_sn:order_sn}}).then(res=>{
- if(ut.ajax_ok(res)){
- order=res.data.data.pageData[0];
- th.setData({order:order,order_sn:order_sn})
- }
-
- })
- }else{
- await getApp().request.promiseGet("/api/weshop/order/page",
- {data:{store_id:e.globalData.setting.stoid,parent_sn:order_sn}}).then(res=>{
-
- if(ut.ajax_ok(res)){
- var allmoney=0,user_money=0;
- for(var i in res.data.data.pageData){
- var item=res.data.data.pageData[i];
- allmoney+=item.order_amount;
- user_money += item.user_money?item.user_money:0;
- }
- order=res.data.data.pageData[0];
- th.setData({ order: order, type: 2, allmoney: allmoney, order_sn: order_sn, user_money: user_money})
- }
-
-
- })
- }
- //--获取门店--
- if(order.exp_type==1) {
- await getApp().request.promiseGet("/api/weshop/pickup/get/"+ e.globalData.setting.stoid+"/"+order.pickup_id,
- {1:1}).then(res => {
- th.setData({pick:res.data.data})
- });
- }
+
+
+ // 卡项订单
+ if(options.card == 1) {
+ let url = '/api/weshop/recharge/user/page'
+ let data = {
+ store_id: getApp().globalData.setting.stoid,
+ user_id: getApp().globalData.userInfo.user_id,
+ order_id: this.data.options.order_id,
+ };
+
+ // 请求数据
+ getApp().promiseGet(url, {
+ data: data,
+ }).then(res => {
+ if (res.data.code == 0) {
+ console.log('请求成功', res);
+ this.setData({
+ order: res.data.data.pageData[0],
+ order_sn: res.data.data.pageData[0].order_sn,
+ });
+ } else {
+ throw (res);
+ };
+ }).catch(err => {
+ wx.showToast({
+ title: err.data.data,
+ icon: 'error',
+ });
+ });
+ } else {
+
+ //如果是等1,就是单个订单的订单号
+ if(type==1){
+ await getApp().request.promiseGet("/api/weshop/order/page",
+ {data:{store_id:e.globalData.setting.stoid,order_sn:order_sn}}).then(res=>{
+ if(ut.ajax_ok(res)){
+ order=res.data.data.pageData[0];
+ th.setData({order:order,order_sn:order_sn})
+ }
+
+ })
+ }else{
+ await getApp().request.promiseGet("/api/weshop/order/page",
+ {data:{store_id:e.globalData.setting.stoid,parent_sn:order_sn}}).then(res=>{
+
+ if(ut.ajax_ok(res)){
+ var allmoney=0,user_money=0;
+ for(var i in res.data.data.pageData){
+ var item=res.data.data.pageData[i];
+ allmoney+=item.order_amount;
+ user_money += item.user_money?item.user_money:0;
+ }
+ order=res.data.data.pageData[0];
+ th.setData({ order: order, type: 2, allmoney: allmoney, order_sn: order_sn, user_money: user_money})
+ }
+
+
+ })
+ }
+ //--获取门店--
+ if(order.exp_type==1) {
+ await getApp().request.promiseGet("/api/weshop/pickup/get/"+ e.globalData.setting.stoid+"/"+order.pickup_id,
+ {1:1}).then(res => {
+ th.setData({pick:res.data.data})
+ });
+ };
+
+
+ };
+
+
+
},
goto: function() {
diff --git a/pages/payment/pay_success/pay_success.wxml b/pages/payment/pay_success/pay_success.wxml
index a910a9c..7976a12 100644
--- a/pages/payment/pay_success/pay_success.wxml
+++ b/pages/payment/pay_success/pay_success.wxml
@@ -25,25 +25,38 @@
实付金额 :
- {{filters.toFix(order.order_amount+order.user_money+order.pt_tail_money,2)}}元
- {{filters.toFix(allmoney+user_money,2) }}元
+
+ {{filters.toFix(order.account,2) }}元
+
+
+ {{filters.toFix(order.order_amount+order.user_money+order.pt_tail_money,2)}}元
+ {{filters.toFix(allmoney+user_money,2) }}元
+
-
- 支付方式 :
- 微信支付,余额支付
- 微信支付
- 余额支付
- 免单
-
-
- 支付方式 :
- 微信支付,余额支付
- 微信支付
- 余额支付
- 免单
-
+
+ 支付方式 :
+ 微信支付
+
+
+
+
+ 支付方式 :
+ 微信支付,余额支付
+ 微信支付
+ 余额支付
+ 免单
+
+
+ 支付方式 :
+ 微信支付,余额支付
+ 微信支付
+ 余额支付
+ 免单
+
+
+
@@ -72,23 +85,42 @@
门店 :
- {{pick.pickup_name}}
+ {{order.list[0].pickup_name}}
+ {{pick.pickup_name}}
门店地址 :
- {{pick.fulladdress}}
+ {{order.list[0].fulladdress}}
+ {{pick.fulladdress}}
-
-
-
- 查看订单
-
-
-
-
+
+
+
+
+
+
+ 订单详情
+
+
+
+
+ 立即预约
+
+
+
+
+
+
+ 查看订单
+
+
+
+
+
+
回到首页
diff --git a/pages/payment/pay_success/pay_success.wxss b/pages/payment/pay_success/pay_success.wxss
index f69e931..3a996eb 100644
--- a/pages/payment/pay_success/pay_success.wxss
+++ b/pages/payment/pay_success/pay_success.wxss
@@ -59,26 +59,38 @@ page {
.pay_User .payitem .pay_name {
margin-right: 38rpx;
- max-width: 250rpx;
+ /* max-width: 250rpx; */
}
-.pay_order {
- margin-top: 115rpx;
- color: rgb(104, 104, 104);
- width: 560rpx;
- height: 62rpx;
- border-radius: 30rpx;
- border: 3rpx solid rgb(209, 209, 209);
+.btn {
+ box-sizing: border-box;
+ height: 80rpx;
+ line-height: 80rpx;
+ /* padding: 10rpx; */
+ text-align: center;
+ border-radius: 40rpx;
}
.pay_home {
- margin-top: 35rpx;
+ /* margin-top: 35rpx; */
color: rgb(255, 255, 255);
- width: 566rpx;
- height: 68rpx;
+ /* width: 566rpx;
+ height: 68rpx; */
border-radius: 30rpx;
background-color: rgb(219, 27, 52);
}
.address{
width: 470rpx;
-}
\ No newline at end of file
+}
+
+.bg-red {
+ background-color: rgb(219, 27, 52);
+}
+
+.bg-yellow {
+ background-color: #feca53;
+}
+
+.border {
+ border: 2rpx solid #ccc;
+}
diff --git a/pages/store/index.wxss b/pages/store/index.wxss
index 3906111..9a03ec1 100644
--- a/pages/store/index.wxss
+++ b/pages/store/index.wxss
@@ -1,4 +1,4 @@
-.box{
+/* .box{
padding: 10px;
border-bottom: 10px solid #f5f5f5;
color: #000000;
@@ -44,5 +44,278 @@ position: relative;
.sear_inp{width: 490rpx; background-color:#eaeaea; height: 80rpx; border-radius:5rpx; margin: 25rpx;}
.sear_inp input{width: 400rpx;}
.select{height: 80rpx; width: 220rpx;background-color:#eaeaea; margin:25rpx; font-size: 28rpx; line-height: 80rpx;text-align: center }
-.sear_btn{ width: 50rpx; height: 100%; display: flex; align-items: center;}
+.sear_btn{ width: 50rpx; height: 100%; display: flex; align-items: center;} */
+
+.border-bottom {
+ border-bottom: 2rpx solid #e0e0e0;
+}
+
+.fs22 {
+ font-size: 22rpx;
+}
+
+.flexShrink-0 {
+ flex-shrink: 0;
+}
+
+.pt16 {
+ padding-top: 16rpx;
+}
+
+.maxWidth-340 {
+ max-width: 340rpx;
+}
+
+.maxWidth-400 {
+ max-width: 400rpx;
+}
+
+
+/* 图标字体 */
+/* @font-face {
+ font-family: 'iconfont';
+ src: url('//at.alicdn.com/t/font_2054717_8s87fgrotfo.eot');
+ src: url('//at.alicdn.com/t/font_2054717_8s87fgrotfo.eot?#iefix') format('embedded-opentype'),
+ url('//at.alicdn.com/t/font_2054717_8s87fgrotfo.woff2') format('woff2'),
+ url('//at.alicdn.com/t/font_2054717_8s87fgrotfo.woff') format('woff'),
+ url('//at.alicdn.com/t/font_2054717_8s87fgrotfo.ttf') format('truetype'),
+ url('//at.alicdn.com/t/font_2054717_8s87fgrotfo.svg#iconfont') format('svg');
+}
+
+.iconfont {
+ font-family: "iconfont" !important;
+ font-size: 28rpx;
+ font-style: normal;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-weizhi:before {
+ content: "\e615";
+ color: #FFBA10;
+}
+
+.icon-arrow_down:before {
+ content: "\e600";
+}
+
+.icon-arrow_right:before {
+ content: "\e61f";
+} */
+/* 图标字体 */
+
+
+
+.icon-weizhi {
+ color: #FFBA10;
+}
+
+page {
+ height: 100%;
+ font-size: 28rpx;
+}
+
+.container {
+ height: 100%;
+}
+#map {
+ /* width: 100%;
+ height: ; */
+ display: block;
+ width: 100%;
+ height: 100%;
+}
+.tab-container.active {
+ height: calc(100% - 86rpx);
+}
+.map-container.active ~ .tab-container .list-container {
+ height: 204rpx;
+ overflow: hidden;
+}
+.map-container.active ~ .tab-container .list {
+ overflow: hidden;
+}
+.tab-container.active .list-container {
+ height: calc(100% - 108rpx - 84rpx);
+ background-color: #F7F7F7;
+}
+
+
+.search-container {
+ display: flex;
+ align-items: center;
+ padding: 0 32rpx;
+ border-bottom: 2rpx solid #F0F0F0;
+}
+
+.city:after {
+ display: inline-block;
+ content: '◣';
+ font-size: 14rpx;
+ padding-left: 8rpx;
+ padding-right: 20rpx;
+ transform: rotateZ(-45deg);
+ position: relative;
+ top: -16rpx;
+}
+
+.input-container {
+ padding: 12rpx 0;
+ flex: 1;
+}
+
+.input {
+ padding: 0 20rpx;
+ height: 60rpx;
+ line-height: 60rpx;
+ border-radius: 30rpx;
+ background-color: #F3F3F3;
+}
+
+.placeholder {
+ color: #676767;
+ font-size: 24rpx;
+}
+
+
+
+
+
+/* 切换卡 */
+.tab-title-container {
+ display: flex;
+ text-align: center;
+ border-bottom: 20rpx solid #F7F7F7;
+}
+.tab-title {
+ width: 50%;
+ line-height: 88rpx;
+ position: relative;
+}
+.tab-title.active {
+ font-weight: bold;
+}
+.tab-title.active::after {
+ position: absolute;
+ content: '';
+ width: 110rpx;
+ height: 4rpx;
+ left: 50%;
+ bottom: 0;
+ transform: translateX(-50%);
+ background-color: #FFBA10;
+}
+
+.map-container {
+ transition: 0.1s all linear;
+ background-color: pink;
+}
+
+.map-container.active {
+ height: calc(100% - 86rpx - 80rpx - 200rpx);
+ transition: 0.1s all linear;
+}
+
+
+
+
+/* 查看地图 */
+.view-map {
+ line-height: 80rpx;
+ text-align: center;
+ font-size: 24rpx;
+ color: #000;
+ border-bottom: 2rpx solid #F0F0F0;
+}
+
+
+/* 列表 */
+.list {
+ height: 100%;
+}
+.list-item {
+ padding: 40rpx 28rpx;
+ border-bottom: 2rpx solid #F0F0F0;
+ justify-content: space-between;
+ background-color: #fff;
+}
+.list-item:last-child {
+ border-bottom: none;
+}
+radio .wx-radio-input {
+ width: 32rpx;
+ height: 32rpx;
+}
+radio .wx-radio-input.wx-radio-input-checked {
+ border-color: #333;
+ /* border-color: #FFBA10; */
+ background-color: white;
+}
+radio .wx-radio-input.wx-radio-input-checked::before {
+ display: inline-block;
+ content: '';
+ width: 24rpx;
+ height: 24rpx;
+ border-radius: 50%;
+ background-color: #333;
+ /* background-color: #FFBA10; */
+}
+.name-container {
+ padding-left: 14rpx;
+ padding-right: 30rpx;
+ box-sizing: border-box;
+}
+.name {
+ display: flex;
+ align-items: center;
+ font-size: 30rpx;
+ position: relative;
+}
+.address {
+ color: #6E6E6E;
+ font-size: 26rpx;
+ line-height: 34rpx;
+ padding-top: 16rpx;
+ /* padding-right: 40rpx; */
+ text-align: justify;
+}
+.tag {
+ color: #FF5B5A;
+ border-radius: 6rpx;
+ border: 2rpx solid #FF5B5A;
+ font-size: 22rpx;
+ padding: 0 4rpx;
+ flex-shrink: 0;
+ margin-left: 4rpx;
+}
+
+.distance {
+ color: #6E6E6E;
+ font-size: 22rpx;
+ line-height: 34rpx;
+ padding-top: 16rpx;
+ /* word-break: break-all; */
+}
+
+.icon-arrow_right {
+ padding-left: 20rpx;
+}
+
+.right {
+ min-width: 200rpx;
+ text-align: right;
+}
+
+.icon-arrow_down.active {
+ display: inline-block;
+ transform: rotateZ(180deg);
+}
+
+
+
+
+
+
+
+
diff --git a/pages/user/order_list/order_list.js b/pages/user/order_list/order_list.js
index 5d61095..9e151fd 100644
--- a/pages/user/order_list/order_list.js
+++ b/pages/user/order_list/order_list.js
@@ -85,10 +85,12 @@ Page({
var startDate=date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
- if(t.index) {
+ if(t.index && t.tabindex) {
this.setData({
- currentIndex: t.index
+ currentIndex: t.index,
+ tabIndex: t.tabindex,
});
+ this.clickTab();
};
this.setData({
@@ -144,7 +146,7 @@ Page({
},1)
this.resetData(), this.requestOrderList(this.data.activeCategoryId);
-
+ this.clickTab();
},
changeTab: function(t) {
if (this.data.activeCategoryId == t.currentTarget.id) return false;
@@ -2138,8 +2140,15 @@ Page({
// 点击卡项订单二级tabbar
clickTab(e) {
- console.log('服务卡项index', e.target.dataset.index);
- let currentIndex = e.target.dataset.index;
+ // console.log('服务卡项index', e.target.dataset.index);
+ let currentIndex = 0;
+ if(e) {
+ currentIndex = e.target.dataset.index;
+ } else {
+ currentIndex = this.data.tabIndex
+ };
+
+ // let || this.data.tabIndex;
let url = '/api/weshop/recharge/user/page';
let data = {
diff --git a/pages/user/order_list/order_list.wxml b/pages/user/order_list/order_list.wxml
index cbb3219..3fca809 100644
--- a/pages/user/order_list/order_list.wxml
+++ b/pages/user/order_list/order_list.wxml
@@ -4,7 +4,7 @@
线上订单
- 卡项订单
+ 卡项订单
线下订单
diff --git a/utils/filter.wxs b/utils/filter.wxs
index 0717a64..c193211 100644
--- a/utils/filter.wxs
+++ b/utils/filter.wxs
@@ -171,7 +171,18 @@ var filters = {
JSONStringify: function(val) {
return JSON.stringify(val);
- }
+ },
+
+ // 循环列表计算数量
+ count: function(list) {
+ var sum = 0;
+ if(list && list.length != 0) {
+ list.forEach(function(item) {
+ sum += item.qty;
+ });
+ return sum;
+ };
+ },
@@ -194,4 +205,5 @@ module.exports = {
price: filters.price,
div100: filters.div100,
JSONStringify: filters.JSONStringify,
+ count: filters.count,
}
\ No newline at end of file
diff --git a/utils/request.js b/utils/request.js
index cb197ae..2ed01bb 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -2,6 +2,10 @@ var t = require("util.js");
module.exports = {
uniqueId: "",
+ // i: url
+ // e: method
+ // s: data
+ // a: header
request: function(e, i, o) {
var n = this, a = o.header ? o.header : {
"content-type": "application/x-www-form-urlencoded"
@@ -39,7 +43,9 @@ module.exports = {
uploadFile: function(t, e) {
var i = this;
- t = this.modifyUrl(t, e), console.log("app.request", t, e), e.isShowLoading = void 0 === e.isShowLoading || e.isShowLoading,
+ t = this.modifyUrl(t, e),
+ // console.log("app.request", t, e),
+ e.isShowLoading = void 0 === e.isShowLoading || e.isShowLoading,
e.isShowLoading && this.showLoading(), wx.uploadFile(Object.assign({}, e, {
url: t,
filePath: e.filePath,