diff --git a/components/diy_nav/diy_nav.js b/components/diy_nav/diy_nav.js index 2365b15..f3160d0 100644 --- a/components/diy_nav/diy_nav.js +++ b/components/diy_nav/diy_nav.js @@ -46,7 +46,8 @@ Component({ //智能跳转 go_url:function (e) { var url=e.currentTarget.dataset.url; - getApp().goto(url); + console.log('url==>', url); + // getApp().goto(url); } } }) \ No newline at end of file diff --git a/packageA/pages/cardList/cardList.js b/packageA/pages/cardList/cardList.js index 00c2c47..c0644a1 100644 --- a/packageA/pages/cardList/cardList.js +++ b/packageA/pages/cardList/cardList.js @@ -16,6 +16,8 @@ Page({ currentQuery: { store_id: app.globalData.setting.stoid, }, + + default_img: '/miniapp/images/default_g_img.gif', }, /** diff --git a/packageA/pages/cardList/cardList.wxml b/packageA/pages/cardList/cardList.wxml index d558238..6c16f9f 100644 --- a/packageA/pages/cardList/cardList.wxml +++ b/packageA/pages/cardList/cardList.wxml @@ -1,6 +1,6 @@ - + @@ -26,6 +26,6 @@ - + - 已经到底了 - diff --git a/packageA/pages/cardList/cardList.wxss b/packageA/pages/cardList/cardList.wxss index 4d4c4ae..80d7aff 100644 --- a/packageA/pages/cardList/cardList.wxss +++ b/packageA/pages/cardList/cardList.wxss @@ -20,7 +20,7 @@ page { display: block; width: 240rpx; height: 240rpx; - background-color: pink; + /* background-color: pink; */ } .price { diff --git a/packageA/pages/goodsInfo/buy_integral.wxml b/packageA/pages/goodsInfo/buy_integral.wxml deleted file mode 100644 index be8b5ca..0000000 --- a/packageA/pages/goodsInfo/buy_integral.wxml +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - {{data.goods_name}} - - - {{prom_integral}}积分 - + - {{prom_price}}元 - 0积分 - - - - - - 已售:{{prom_act.buy_num}} - 可售:{{prom_act.limitqty-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}} - - - - - - - - - - 购买数量 - - - - - + - - - - - - - - - 配送不匹配 - - - - - - - 库存不足 - - - - - - 库存不足 - - - - 库存不足 - - - - 请先选择门店 - - - - 库存不足 - - - 立即兑换 - - - - - - - - - - - - - \ No newline at end of file diff --git a/packageA/pages/goodsInfo/buy_integral_normal.wxml b/packageA/pages/goodsInfo/buy_integral_normal.wxml deleted file mode 100644 index 82293cc..0000000 --- a/packageA/pages/goodsInfo/buy_integral_normal.wxml +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - {{sele_g.goods_name}} - - - - {{sele_g[card_field]}} - {{sele_g.shop_price}} - - - - 已售:{{sele_g.sales_sum}} - - 可售:{{def_pick_store.CanOutQty}} - 可售:0 - - 可售:{{sele_g.store_count}} - - - - - - - - - - {{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}} - - - - - - - - - - 购买数量 - - - - - + - - - - - - - - - - - 配送不匹配 - - - - - 库存不足 - - - - - - 库存不足 - - - - 库存不足 - - - - 请先选择门店 - - - - 库存不足 - - - - 加入购物车 - 立即购买 - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packageA/pages/goodsInfo/buy_pt.wxml b/packageA/pages/goodsInfo/buy_pt.wxml deleted file mode 100644 index cfeab1b..0000000 --- a/packageA/pages/goodsInfo/buy_pt.wxml +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - - {{sele_g.goods_name}} - - - - - ¥ {{sele_g[card_field]}} - - - ¥ {{sele_g.shop_price}} - - - ¥ {{prom_price}} - - - - - 已售:{{sele_g.sales_sum}} - - 可售:{{def_pick_store.CanOutQty}} - 可售:0 - - 可售:{{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}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 配送不匹配 - - - - - - 库存不足 - - - - - - 库存不足 - - - - 库存不足 - - - - 请先选择门店 - - - - 库存不足 - - - 立即购买 - - - - - - - - - - - - - - 配送不匹配 - - - 确定 - - - - - - - \ No newline at end of file diff --git a/packageA/pages/my_service/appment_main.js b/packageA/pages/my_service/appment_main.js index 34f6d04..91279de 100644 --- a/packageA/pages/my_service/appment_main.js +++ b/packageA/pages/my_service/appment_main.js @@ -34,7 +34,7 @@ Page({ is_success: 0, //是否提交成功 remarks: "", //备注 storageId: "", //线下门店id - url: "/pages/user/my_service/appment_main", //本页面地址路径用于选择时间页面跳转回来 + url: "/packageA/pages/my_service/appment_main", //本页面地址路径用于选择时间页面跳转回来 buyType: "", //项目类型 time: "", //选择预约时间 tment_count: "", //可预约人数 @@ -96,7 +96,7 @@ Page({ var buyType = th.data.buyType; //服务项目类型 var storeId = a.stoid; //商家id var storageId = th.data.storageId; //门店id - var userId = d.user_id; //用户id + var userId = th.data.options.userid; //用户id var remarks = th.data.remarks; //用户备注 var project_id = th.data.project_id; //项目id var validay = th.data.validay; @@ -150,10 +150,10 @@ Page({ "keyword": res.data.data.Address } ], - "page": "/pages/user/my_service/tment_details?number=" + number, + "page": "/packageA/pages/my_service/tment_details?number=" + number, "storeId": a.stoid, "typeId": "1011", - "userId": d.user_id + "userId": th.data.options.userid }; var data = JSON.stringify(json); //调用发送预约成功模版接口 @@ -168,7 +168,7 @@ Page({ }) setTimeout(function() { wx.redirectTo({ - url: "/pages/user/my_service/tment_details?number=" + number + url: "/packageA/pages/my_service/tment_details?number=" + number }); }, 1000); } else { @@ -373,7 +373,7 @@ Page({ key_word = key_word.replace(/\s+/g, ""); getApp().request.promiseGet(url, { data: { - userId:getApp().globalData.user_id, + userId: th.data.options.userid, storeId: a.stoid, serviceId: itemId, latitude: th.data.lat, @@ -413,7 +413,8 @@ Page({ var th = this; th.setData({ is_textea: 0 - }) + }); + if (th.data.store_name == "") { getApp().my_warnning("请选择服务门店", 0, th); th.settime(); @@ -428,7 +429,7 @@ Page({ getApp().request.promiseGet(url, { data: { storeId: a.stoid, - userId: d.user_id, + userId: th.data.options.userid, serviceId: itemid, storageId: storageId } @@ -459,6 +460,7 @@ Page({ }) } }, + choice_beautician: function(e) { var th = this; var bea_index = e.currentTarget.dataset.baaindex; @@ -515,8 +517,10 @@ Page({ th.setData({ is_textea: 1 }) + console.log('optionsxxx===>', this.data.options); + // console.log('1-->', "/pages/user/my_service/cosmetology_list?userid=" + th.data.options.userid + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id); wx.navigateTo({ - url: "/pages/user/my_service/cosmetology_list?" + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id + url: "/packageA/pages/my_service/cosmetology_list?userid=" + this.data.options.userid + '&storageId=' + storageId + '&itemId=' + itemId + "&projectId=" + project_id }); } @@ -527,6 +531,7 @@ Page({ onLoad: function(options) { var th = this; th.setData({ + options, itemId: options.service_id, buyType: options.BuyType, project_id: options.ProjectID, @@ -562,19 +567,34 @@ Page({ }); // 获取当前默认导购信息及归属门店信息 - getApp().request.promiseGet('/api/weshop/shoppingGuide/geIdStaffInfo', { - data: { - store_id: 1, - guide_id: 73, - UserCode: '01', - } - }).then(res => { - console.log('res==>', res.data.data); - th.setData({ - store_name: res.data.data.StorageName, - beautician_name: res.data.data.StaffName, + if(options.firstleader) { + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+a.stoid+"/"+options.firstleader,{}).then(res=>{ +        if(res.data.code==0){ +          getApp().globalData.guide_id=res.data.data.id; + + getApp().request.promiseGet('/api/weshop/shoppingGuide/geIdStaffInfo', { + data: { + store_id: a.stoid, + guide_id: e.globalData.guide_id, + UserCode: th.data.options.usercode, + } + }).then(res => { + console.log('res==>', a.stoid, e.globalData.guide_id, th.data.options.usercode); + if(res.data.data.Tech) { + th.setData({ + store_name: res.data.data.StorageName, + beautician_name: res.data.data.StaffName, + beauticianID: res.data.data.StaffId, + StorageId: res.data.data.StorageId, + }); + } + }); + + +        }; }); - }); + }; + }, //查询剩下可预约人数 @@ -630,7 +650,7 @@ Page({ getApp().request.promiseGet(url, { data: { storeId: a.stoid, - userId: d.user_id, + userId: th.data.options.userid, projectId: project_id } }).then(res => { @@ -645,9 +665,9 @@ Page({ }) }, //关闭导航 - close: function() { - var th = this; - var nav_b = th.selectComponent("#nav_b"); //组件的id - nav_b.close_box(); - } + // close: function() { + // var th = this; + // var nav_b = th.selectComponent("#nav_b"); //组件的id + // nav_b.close_box(); + // } }) \ No newline at end of file diff --git a/packageA/pages/my_service/appment_main.wxml b/packageA/pages/my_service/appment_main.wxml index 756e539..4b99d91 100644 --- a/packageA/pages/my_service/appment_main.wxml +++ b/packageA/pages/my_service/appment_main.wxml @@ -55,7 +55,7 @@ - + {{time==""?'选择时间':time}} @@ -147,4 +147,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/packageA/pages/my_service/beauty_deta.js b/packageA/pages/my_service/beauty_deta.js index eaf4fdb..550ffdf 100644 --- a/packageA/pages/my_service/beauty_deta.js +++ b/packageA/pages/my_service/beauty_deta.js @@ -46,13 +46,16 @@ Page({ th.setData({ + options, + storeid: options.storeid, beautician_id: beautician_id, itemId: options.itemId, modify: options.modify, hours: hours, projectId: options.projectId, - storageId:storageId - }) + storageId: storageId, + }); + if (options.url != undefined) { th.setData({ url: options.url @@ -162,7 +165,7 @@ Page({ "number": th.data.number, "remark": "更改时间", "states": 0, - "storeId": a.stoid + "storeId": a.stoid, }; var data = JSON.stringify(json); var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址 @@ -198,7 +201,8 @@ Page({ //直接给上一个页面赋值 time: time, beautician_name: th.data.StaffName, - beauticianID: th.data.beautician_id + beauticianID: th.data.beautician_id, + storageId: th.data.storageId, }); wx.navigateBack({ //返回 @@ -208,7 +212,8 @@ Page({ var prevPage = pages[pages.length - 2]; //上一页面 prevPage.setData({ //直接给上一个页面赋值 - time: time + time: time, + storageId: th.data.storageId, }); wx.navigateBack({ //返回 @@ -245,7 +250,7 @@ Page({ beauticianId: beautician_id, serviceId: itemId, storeId: a.stoid, - storageId:storageId + storageId:storageId } }).then(res => { if (res.data.code == 0) { @@ -363,7 +368,7 @@ Page({ "number": number, "remark": "更改预约时间", "states": 0, - "storeId": a.stoid + "storeId": a.stoid, }; var data = JSON.stringify(json); var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址 diff --git a/packageA/pages/my_service/cosmetology_list.js b/packageA/pages/my_service/cosmetology_list.js index 5d71119..1e6c4fb 100644 --- a/packageA/pages/my_service/cosmetology_list.js +++ b/packageA/pages/my_service/cosmetology_list.js @@ -3,6 +3,8 @@ var e = getApp(), os = a, t = e.request, d = e.globalData; + + Page({ /** @@ -21,6 +23,7 @@ Page({ storageId: 0, //线下门店id projectId:"",//项目id }, + onReachBottom: function() { var th = this; if (this.data.total <= th.data.pageSize) return; @@ -30,6 +33,8 @@ Page({ }) th.query_cology(); }, + + query_cology: function() { var th = this; var url = "/api/weshop/marketing/reservation/staff/pagenew"; @@ -38,7 +43,7 @@ Page({ getApp().request.promiseGet(url, { data: { storeId: a.stoid, - userId: d.user_id, + userId: th.data.options.userid, serviceId: itemId, storageId: storageId, page: th.data.curpage, @@ -67,6 +72,8 @@ Page({ } }) }, + + //图片失败,默认图片 bind_bnerr1: function(e) { var _errImg = e.target.dataset.errorimg; @@ -78,12 +85,17 @@ Page({ this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; } }, + + + /** * 生命周期函数--监听页面加载 */ onLoad: function(options) { + console.log('options--->', options); var th = this; - th.setData({ + this.setData({ + options, projectId: options.projectId, itemId: options.itemId, storageId: options.storageId @@ -105,4 +117,5 @@ Page({ th.query_cology(); }, + }) \ No newline at end of file diff --git a/packageA/pages/my_service/cosmetology_list.wxml b/packageA/pages/my_service/cosmetology_list.wxml index 66049b0..00a22ca 100644 --- a/packageA/pages/my_service/cosmetology_list.wxml +++ b/packageA/pages/my_service/cosmetology_list.wxml @@ -27,7 +27,7 @@ - + 预约 diff --git a/packageA/pages/my_service/hist_service.js b/packageA/pages/my_service/hist_service.js index 724d21f..8bad05a 100644 --- a/packageA/pages/my_service/hist_service.js +++ b/packageA/pages/my_service/hist_service.js @@ -69,7 +69,7 @@ Page({ */ onLoad: function(options) { var th = this; - // console.log('xxoptions==>', options); + console.log('xxoptions==>', options); this.setData({ options, }); @@ -120,7 +120,7 @@ Page({ getApp().request.promiseGet(url, { data: { storeId: a.stoid, - userId: this.data.options.userid, + userId: th.data.options.userid, beginDate: startTime, endDate: endTime, page: th.data.curpage, diff --git a/packageA/pages/my_service/i_service.js b/packageA/pages/my_service/i_service.js index 00a3e8e..e820f39 100644 --- a/packageA/pages/my_service/i_service.js +++ b/packageA/pages/my_service/i_service.js @@ -40,7 +40,10 @@ Page({ options, }); var th = this; - th.query_service(); + // if(options.UserId) { + th.query_service(); + // }; + }, /** * 生命周期函数--监听页面显示 @@ -132,7 +135,7 @@ Page({ "继续使用", function() { my_confirm.open_cancel(0); - var deta_url = "/pages/user/my_service/tment_details?number=" + res.data.data.Number; + var deta_url = "/packageA/pages/my_service/tment_details?userid="+ th.data.options.UserId + "&number=" + res.data.data.Number; wx.navigateTo({ url: deta_url }) @@ -212,7 +215,7 @@ Page({ "继续预约", function() { my_confirm.open_cancel(0); - var deta_url = "/pages/user/my_service/tment_details?number=" + number; + var deta_url = "/packageA/pages/my_service/tment_details?number=" + number + "&userid="+ th.data.options.UserId; wx.navigateTo({ url: deta_url }) diff --git a/packageA/pages/my_service/i_service.wxml b/packageA/pages/my_service/i_service.wxml index 81b5351..0794377 100644 --- a/packageA/pages/my_service/i_service.wxml +++ b/packageA/pages/my_service/i_service.wxml @@ -1,8 +1,8 @@ - 服务记录 - 历史预约 + 服务记录 + 历史预约 @@ -50,7 +50,7 @@ - + 帮你预约 diff --git a/packageA/pages/my_service/tment_details.js b/packageA/pages/my_service/tment_details.js index 7cdc06b..441aa7b 100644 --- a/packageA/pages/my_service/tment_details.js +++ b/packageA/pages/my_service/tment_details.js @@ -71,6 +71,7 @@ Page({ onLoad: function(options) { var th = this; th.setData({ + options, number: options.number }) }, @@ -82,7 +83,7 @@ Page({ getApp().request.promiseGet(url, { data: { storeId: a.stoid, - userId: d.user_id, + userId: th.data.options.userid, number: number } }).then(res => { diff --git a/packageA/pages/my_service/tment_details.wxml b/packageA/pages/my_service/tment_details.wxml index a6c137b..6a4baec 100644 --- a/packageA/pages/my_service/tment_details.wxml +++ b/packageA/pages/my_service/tment_details.wxml @@ -97,20 +97,20 @@ 取消预约 - + 我的服务 - + 更改时间 - + 发表评价 - + 查看评价 - + 重新预约 diff --git a/packageA/pages/my_service/tment_eval.js b/packageA/pages/my_service/tment_eval.js index 3c60c6a..35595f5 100644 --- a/packageA/pages/my_service/tment_eval.js +++ b/packageA/pages/my_service/tment_eval.js @@ -40,7 +40,7 @@ Page({ getApp().request.promiseGet(url, { data: { Star: index + 1, - storeId: a.stoid + storeId: a.stoid, } }).then(res => { if (res.data.code == 0) { @@ -103,7 +103,7 @@ Page({ getApp().request.promiseGet(url, { data: { storeId: a.stoid, - userId: d.user_id, + userId: th.data.options.userid, number: number } }).then(res => { @@ -126,7 +126,7 @@ Page({ getApp().request.promiseGet(url, { data: { number: th.data.number, - storeId: a.stoid + storeId: a.stoid, } }).then(res => { if (res.data.code == 0) { @@ -175,7 +175,7 @@ Page({ "number": posNo, "remark": proposal, "star": stars + 1, - "storeId": a.stoid + "storeId": a.stoid, }; var data = JSON.stringify(json); //转换成json格式 wx.request({ @@ -220,6 +220,7 @@ Page({ onLoad: function(options) { var th = this; th.setData({ + options, number: options.Number, is_evaluate: options.evaluate }) @@ -265,7 +266,7 @@ Page({ orderNumber: th.data.number, orderType: 2, storeId: a.stoid, - userId: d.user_id + userId: th.data.options.userid, } }).then(res => { if (res.data.code == 0) { diff --git a/packageA/pages/my_service/tment_order_list.js b/packageA/pages/my_service/tment_order_list.js index 8ad4b7f..7e0b0a7 100644 --- a/packageA/pages/my_service/tment_order_list.js +++ b/packageA/pages/my_service/tment_order_list.js @@ -39,6 +39,9 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function(options) { + this.setData({ + options, + }); var state=options.state; if (state != null && state != undefined && state!=""){ this.setData({ activeCategoryId: state }); @@ -93,7 +96,7 @@ Page({ getApp().request.promiseGet(url, { data: { storeId: a.stoid, - userId: d.user_id, + userId: th.data.options.userid, state: state_index, page: th.data.curpage, pageSize: th.data.pageSize diff --git a/packageA/pages/my_service/tment_order_list.wxml b/packageA/pages/my_service/tment_order_list.wxml index 43df4a9..c3d41aa 100644 --- a/packageA/pages/my_service/tment_order_list.wxml +++ b/packageA/pages/my_service/tment_order_list.wxml @@ -68,12 +68,12 @@ 取消预约 - 查看详情 + 查看详情 - 更改时间 - 发表评价 - 重新预约 - 评价详情 + 更改时间 + 发表评价 + 重新预约 + 评价详情 diff --git a/packageA/pages/service_record/service_record.js b/packageA/pages/service_record/service_record.js index ada8828..8660dc8 100644 --- a/packageA/pages/service_record/service_record.js +++ b/packageA/pages/service_record/service_record.js @@ -28,6 +28,7 @@ Page({ }, onShow: function() { + reqData.url = '/api/weshop/marketing/servicewrite/page'; reqData.data = { storeId: app.globalData.setting.stoid, }; @@ -39,8 +40,6 @@ Page({ reqData.data.userId = app.globalData.user_id; this.isLogin() .then(function(data) { - reqData.url = '/api/weshop/marketing/servicewrite/page'; - _this.getData(true, reqData.url, reqData.data); }); }; diff --git a/packageA/pages/shop_details/shop_details.js b/packageA/pages/shop_details/shop_details.js new file mode 100644 index 0000000..6ac8106 --- /dev/null +++ b/packageA/pages/shop_details/shop_details.js @@ -0,0 +1,20 @@ +Page({ + data: { + shop: null, + }, + + onLoad(options) { + let shop = JSON.parse(decodeURIComponent(options.shop)) + this.setData({ + shop: shop, + }); + }, + + // 监听拨打电话 + onPhone() { + wx.makePhoneCall({ + phoneNumber: this.data.shop.pickup_phone, + }) + }, + +}) \ No newline at end of file diff --git a/pages/user/my_service/i_service.wxml b/pages/user/my_service/i_service.wxml index cd465d8..d239a70 100644 --- a/pages/user/my_service/i_service.wxml +++ b/pages/user/my_service/i_service.wxml @@ -65,6 +65,7 @@ 到底了 + @@ -75,7 +76,8 @@ - 暂无服务项目 + + 暂无服务卡项,立即购买! 回到首页