Commit 5a439273cb439e69f1025e8d6361e2193da08584

Authored by taiyuan
1 parent 27a76a60

增加协助预约功能

Showing 34 changed files with 4371 additions and 0 deletions
packageA/pages/my_service/appment_main.js 0 → 100644
  1 +var e = getApp(),
  2 + a = e.globalData.setting,
  3 + os = a,
  4 + t = e.request,
  5 + d = e.globalData;
  6 +Page({
  7 +
  8 + /**
  9 + * 页面的初始数据
  10 + */
  11 + data: {
  12 + inurl: a.url, //接口网址
  13 + iurl: a.imghost, //服务器网址
  14 + store: 0, //是否显示服务门店列表
  15 + beautician: 0, //是否显示美容师列表
  16 + beautician_name: "", //选中的美容师名称
  17 + beauticianID: "", //美容师id
  18 + bea_index: "", //美容师列表下标
  19 + placeholder: "填写备注", //备注为空的placeholder
  20 + store_list: [], //门店列表
  21 + beautician_list: [], //美容师列表
  22 + store_name: "", //选择的服务门店
  23 + fir_pick_index: 0, //选择的门店下标
  24 + curpage: 1, //当前分页数
  25 + pageSize: 8, //页大小
  26 + total: 0,
  27 + ismore: 0, //是否加载完毕
  28 + itemId: "", //服务id
  29 + project_id: "", //项目id
  30 + isScroll: true, //scroll-y是否可以滑动
  31 + key_word: "", //是否按门店文字查询
  32 + is_service_read: 0, //是否调用过门店接口
  33 + is_search: 0, //是否通过key_word调用接口
  34 + is_success: 0, //是否提交成功
  35 + remarks: "", //备注
  36 + storageId: "", //线下门店id
  37 + url: "/pages/user/my_service/appment_main", //本页面地址路径用于选择时间页面跳转回来
  38 + buyType: "", //项目类型
  39 + time: "", //选择预约时间
  40 + tment_count: "", //可预约人数
  41 + lat: "", //纬度坐标
  42 + lon: "", //经度坐标
  43 + is_gps: 1, //是否开启gps
  44 + validay: "", //服务项目有效期
  45 + is_sub: 0, //判断是否重复提交
  46 + is_textea: 1, //备注是否是可输入
  47 + },
  48 + //控制备注输入
  49 + check_text: function() {
  50 + var th = this;
  51 + var is_textea = th.data.is_textea;
  52 + th.setData({
  53 + is_textea: 1,
  54 + beautician: 0
  55 + })
  56 + },
  57 + onclickstore: function() {
  58 + var th = this;
  59 + var store = th.data.store;
  60 + if (store) {
  61 + th.setData({
  62 + store: 0,
  63 + is_textea: 1
  64 + })
  65 + } else {
  66 + th.setData({
  67 + beautician: 0,
  68 + store: 1,
  69 + is_textea: 0
  70 + })
  71 + if (th.data.store_list.length < 1) {
  72 + wx.showLoading({
  73 + title: '加载中',
  74 + })
  75 + th.query_store();
  76 + }
  77 + }
  78 + },
  79 + //输入的备注
  80 + input_remarks: function(e) {
  81 + var remarks = e.detail.value;
  82 + this.setData({
  83 + remarks: remarks
  84 + })
  85 + },
  86 + //提交成功及发送模版代码
  87 + success: function() {
  88 + var th = this;
  89 + var store = th.data.store_name; //门店名称
  90 + var bea_name = th.data.beautician_name; //美容师名称
  91 + var time = th.data.time; //预约时间
  92 + var is_sub = th.data.is_sub; //是否重复提交
  93 + var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/insert"; //接口路径
  94 + var serviceId = th.data.itemId; //服务id
  95 + var beauticianID = th.data.beauticianID; //美容师id
  96 + var buyType = th.data.buyType; //服务项目类型
  97 + var storeId = a.stoid; //商家id
  98 + var storageId = th.data.storageId; //门店id
  99 + var userId = d.user_id; //用户id
  100 + var remarks = th.data.remarks; //用户备注
  101 + var project_id = th.data.project_id; //项目id
  102 + var validay = th.data.validay;
  103 + var json = {
  104 + "arrangeTime": time + ":00",
  105 + "beauticianId": beauticianID,
  106 + "buyType": buyType,
  107 + "effectiveDay": "",
  108 + "number": "",
  109 + "projectId": project_id,
  110 + "remark": remarks,
  111 + "serviceId": serviceId,
  112 + "states": 0,
  113 + "storageId": storageId,
  114 + "storeId": storeId,
  115 + "userId": userId,
  116 + "validay": validay
  117 + }
  118 + var data = JSON.stringify(json);
  119 + wx.request({
  120 + url: url,
  121 + data: json,
  122 + method: 'post',
  123 + header: {
  124 + 'content-type': 'application/json'
  125 + }, // 设置请求的 header
  126 + success: function(res) {
  127 + th.setData({
  128 + is_sub: 0
  129 + })
  130 + wx.hideLoading();
  131 + if (res.data.code == 0) {
  132 + getApp().my_warnning("预约成功", 1, th);
  133 + var store_name = th.data.store_name; //预约门店
  134 + var number = res.data.data.Number;
  135 + var temp_url = "/api/wx/open/app/user/sendSubscribeMsg"; //模版接口
  136 + var userinfo = getApp().globalData.userInfo;
  137 + var name = d.userInfo.nickname;
  138 + var json = {
  139 + // "formId": formid,
  140 + "keyWord": [{
  141 + "keyword": res.data.data.ServiceName
  142 + },
  143 + {
  144 + "keyword": time.substring(0, 16)
  145 + }, {
  146 + "keyword": res.data.data.BeauticianName
  147 + }, {
  148 + "keyword": res.data.data.StorageName
  149 + }, {
  150 + "keyword": res.data.data.Address
  151 + }
  152 + ],
  153 + "page": "/pages/user/my_service/tment_details?number=" + number,
  154 + "storeId": a.stoid,
  155 + "typeId": "1011",
  156 + "userId": d.user_id
  157 + };
  158 + var data = JSON.stringify(json);
  159 + //调用发送预约成功模版接口
  160 + wx.request({
  161 + url: th.data.inurl + temp_url,
  162 + data: data,
  163 + method: 'post',
  164 + header: {
  165 + 'content-type': 'application/json'
  166 + }, // 设置请求的 header
  167 + success: function(data) {}
  168 + })
  169 + setTimeout(function() {
  170 + wx.redirectTo({
  171 + url: "/pages/user/my_service/tment_details?number=" + number
  172 + });
  173 + }, 1000);
  174 + } else {
  175 + getApp().my_warnning(res.data.msg, 0, th);
  176 + th.settime();
  177 + }
  178 + }
  179 + })
  180 +
  181 + },
  182 + //定时显示texteat
  183 + settime: function() {
  184 + var th = this;
  185 + setTimeout(function() {
  186 + th.setData({
  187 + is_textea: 1
  188 + })
  189 + }, 2000);
  190 + },
  191 + //提交预约
  192 + sub_success: function(e) {
  193 + var th = this;
  194 + var temp_url = th.data.inurl + "/api/wx/weappSendlist/page";
  195 + var template_id = "";
  196 + if (th.data.is_sub == 1) {
  197 + return false;
  198 + }
  199 + var store = th.data.store_name; //门店名称
  200 + var bea_name = th.data.beautician_name; //美容师名称
  201 + var time = th.data.time; //预约时间
  202 + var is_sub = th.data.is_sub; //是否重复提交
  203 + th.setData({
  204 + is_textea: 0,
  205 + is_sub: 1
  206 + })
  207 + //提交预约前的判断
  208 + if (store == "") {
  209 + getApp().my_warnning("请选择服务门店", 0, th);
  210 + th.setData({
  211 + is_sub: 0
  212 + })
  213 + th.settime();
  214 + return false;
  215 + } else if (bea_name == "") {
  216 + getApp().my_warnning("请选择美容师", 0, th);
  217 + th.setData({
  218 + is_sub: 0
  219 + })
  220 + th.settime();
  221 + return false;
  222 + } else if (time == undefined || time == '') {
  223 + getApp().my_warnning("请选择预约时间", 0, th);
  224 + th.setData({
  225 + is_sub: 0
  226 + })
  227 + th.settime();
  228 + return false;
  229 + } else {
  230 + var version ="";
  231 + //判断微信版本是否达到预约成功订阅的要求
  232 + wx.getSystemInfo({
  233 + success(res) {
  234 + version = res.version;
  235 + }
  236 + })
  237 + wx.showLoading({
  238 + title: '加载中',
  239 + })
  240 + if (th.ver(version, '7.0.4') >= 0) {
  241 + //获取模版id
  242 + getApp().request.promiseGet(temp_url, {
  243 + data: {
  244 + store_id: a.stoid,
  245 + typeid: "1011"
  246 + }
  247 + }).then(res => {
  248 + if (res.data.code == 0 && res.data.data.pageData.length > 0) {
  249 + template_id = res.data.data.pageData[0].template_id;
  250 + // //授权订阅
  251 + wx.requestSubscribeMessage({
  252 + tmplIds: [template_id],
  253 + success(res) {
  254 + th.success();
  255 + },
  256 + fail(res) {
  257 + th.success();
  258 + }
  259 + })
  260 + } else {
  261 + th.success();
  262 + }
  263 + })
  264 + } else {
  265 + // 如果希望用户在最新版本的客户端上体验您的小程序,可以这样子提示
  266 + wx.showModal({
  267 + title: '提示',
  268 + content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
  269 + })
  270 + th.setData({
  271 + is_sub: 0
  272 + })
  273 + }
  274 +
  275 + }
  276 + },
  277 + //版本判断
  278 + ver:function(v1,v2){
  279 + v1 = v1.split('.')
  280 + v2 = v2.split('.')
  281 + var num1 = "" ;
  282 + var num2 = "";
  283 + var len = Math.max(v1.length, v2.length)
  284 +
  285 + while (v1.length < len) {
  286 + v1.push('0')
  287 + }
  288 + while (v2.length < len) {
  289 + v2.push('0')
  290 + }
  291 +
  292 + for (let i = 0; i < len; i++) {
  293 + num1 = parseInt(v1[i])
  294 + num2 = parseInt(v2[i])
  295 +
  296 + if (num1 > num2) {
  297 + return 1
  298 + } else if (num1 < num2) {
  299 + return -1
  300 + }
  301 + }
  302 + return 0
  303 + },
  304 + goto: function(e) {
  305 + var th = this;
  306 + th.setData({
  307 + beautician: 0,
  308 + is_textea: 0
  309 + })
  310 + if (th.data.store_name == "") {
  311 + getApp().my_warnning("请选择服务门店", 0, th);
  312 + th.settime();
  313 + } else if (th.data.beautician_name == "") {
  314 + getApp().my_warnning("请选择美容师", 0, th);
  315 + th.settime();
  316 + } else {
  317 + th.setData({
  318 + is_textea: 1
  319 + })
  320 + var url = e.currentTarget.dataset.url;
  321 + getApp().goto(url);
  322 + }
  323 + },
  324 + //点击选择门店
  325 + choose_for_store: function(e) {
  326 + var th = this;
  327 + var index_c = e.currentTarget.dataset.ind;
  328 + var fir_pick_index = th.data.fir_pick_index;
  329 + //判断是否点击选中的门店,防止重复点击重复设置选中下标
  330 + if (index_c == fir_pick_index) {
  331 + return false;
  332 + } else {
  333 + th.setData({
  334 + fir_pick_index: index_c,
  335 + beautician_name: "",
  336 + time: "",
  337 + tment_count: ""
  338 + })
  339 + }
  340 + },
  341 + //确认选择门店
  342 + choice_store: function() {
  343 + var th = this;
  344 + var index = th.data.fir_pick_index;
  345 + var store_name = th.data.store_list[index].StorageName;
  346 + var Id = th.data.store_list[index].Id;
  347 + th.setData({
  348 + store: 0,
  349 + store_name: store_name,
  350 + storageId: Id,
  351 + is_textea: 1
  352 + })
  353 + },
  354 + onReachBottom: function() {
  355 + var th = this;
  356 + if (this.data.total <= th.data.pageSize) return;
  357 + if (this.data.ismore) return;
  358 +
  359 + wx.showLoading({
  360 + title: '加载中...',
  361 + })
  362 + th.query_store();
  363 + },
  364 + //分页查询门店信息
  365 + query_store: function() {
  366 + var th = this;
  367 + th.setData({
  368 + is_textea: 0
  369 + })
  370 + var itemId = th.data.itemId; //服务id
  371 + var url = "/api/weshop/marketing/reservation/storage/pagenew";
  372 + var key_word = th.data.key_word;
  373 + key_word = key_word.replace(/\s+/g, "");
  374 + getApp().request.promiseGet(url, {
  375 + data: {
  376 + userId:getApp().globalData.user_id,
  377 + storeId: a.stoid,
  378 + serviceId: itemId,
  379 + latitude: th.data.lat,
  380 + longitude: th.data.lon,
  381 + page: th.data.curpage,
  382 + pageSize: th.data.pageSize,
  383 + keyWord: key_word
  384 + }
  385 + }).then(res => {
  386 + wx.hideLoading();
  387 + if (res.data.code == 0) {
  388 + th.data.curpage++;
  389 + var arr1 = th.data.store_list;
  390 + var arr2 = res.data.data.pageData;
  391 + var arr3 = [...arr1, ...arr2];
  392 + var ismore = 0;
  393 + if (arr3.length == res.data.data.total) ismore = 1
  394 + th.setData({
  395 + store_list: arr3,
  396 + total: res.data.data.total,
  397 + ismore: ismore,
  398 + is_service_read: 1,
  399 + }), wx.stopPullDownRefresh(); //停止下拉刷新
  400 + if (key_word != "" && res.data.data.pageData.length < 1) {
  401 + th.setData({
  402 + is_search: 1
  403 + })
  404 + }
  405 + } else {
  406 + getApp().my_warnning(res.data.msg, 0, th);
  407 + th.settime();
  408 + }
  409 + })
  410 + },
  411 + //查询
  412 + query_beautician: function() {
  413 + var th = this;
  414 + th.setData({
  415 + is_textea: 0
  416 + })
  417 + if (th.data.store_name == "") {
  418 + getApp().my_warnning("请选择服务门店", 0, th);
  419 + th.settime();
  420 + } else {
  421 + wx.showLoading({
  422 + title: '加载中',
  423 + })
  424 + var itemid = th.data.itemId; //正式使用的项目id
  425 + var storageId = th.data.storageId; //正式使用的线下门店id
  426 + var url = "/api/weshop/marketing/reservation/staff/pagenew"; //接口地址
  427 +
  428 + getApp().request.promiseGet(url, {
  429 + data: {
  430 + storeId: a.stoid,
  431 + userId: d.user_id,
  432 + serviceId: itemid,
  433 + storageId: storageId
  434 + }
  435 + }).then(res => {
  436 + wx.hideLoading();
  437 + if (res.data.code == 0) {
  438 + th.setData({
  439 + beautician_list: res.data.data
  440 + })
  441 + if (res.data.data.length < 1) {
  442 + getApp().my_warnning("暂无美容师", 0, th);
  443 + th.settime();
  444 + } else {
  445 + if (th.data.beautician == 0) {
  446 + th.setData({
  447 + beautician: 1,
  448 + })
  449 + } else {
  450 + th.setData({
  451 + beautician: 0,
  452 + })
  453 + }
  454 + }
  455 + } else {
  456 + getApp().my_warnning(res.data.msg, 0, th);
  457 + th.settime();
  458 + }
  459 + })
  460 + }
  461 + },
  462 + choice_beautician: function(e) {
  463 + var th = this;
  464 + var bea_index = e.currentTarget.dataset.baaindex;
  465 + var bea_name = th.data.beautician_list[bea_index].StaffName;
  466 + var BeauticianID = th.data.beautician_list[bea_index].staffid;
  467 + var StorageId=th.data.beautician_list[bea_index].StorageId
  468 +
  469 + th.setData({
  470 + beautician_name: bea_name,
  471 + beautician: 0,
  472 + bea_index: bea_index,
  473 + beauticianID: BeauticianID,
  474 + time: "",
  475 + tment_count: "",
  476 + is_textea: 1,
  477 + StorageId:StorageId
  478 + })
  479 +
  480 + },
  481 + //获取搜索门店输入的值
  482 + input_store: function(e) {
  483 + this.setData({
  484 + key_word: e.detail.value
  485 + })
  486 + },
  487 + //搜索门店
  488 + search_store: function() {
  489 + var th = this;
  490 + var key_word = th.data.key_word;
  491 + var store_list = th.data.store_list;
  492 + th.setData({
  493 + curpage: 1,
  494 + is_search: 0,
  495 + store_list: []
  496 + })
  497 + wx.showLoading({
  498 + title: '加载中',
  499 + })
  500 + th.query_store();
  501 + },
  502 + //美容师预约跳转页面
  503 + nav_bea: function() {
  504 + var th = this;
  505 + th.setData({
  506 + beautician: 0
  507 + })
  508 + var storageId = th.data.storageId; //线下门店id
  509 + var itemId = th.data.itemId; //服务id
  510 + var project_id = th.data.project_id;
  511 + if (storageId == "") {
  512 + getApp().my_warnning("请选择服务门店", 0, th);
  513 + th.settime();
  514 + } else {
  515 + th.setData({
  516 + is_textea: 1
  517 + })
  518 + wx.navigateTo({
  519 + url: "/pages/user/my_service/cosmetology_list?" + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id
  520 + });
  521 +
  522 + }
  523 + },
  524 + /**
  525 + * 生命周期函数--监听页面加载
  526 + */
  527 + onLoad: function(options) {
  528 + var th = this;
  529 + th.setData({
  530 + itemId: options.service_id,
  531 + buyType: options.BuyType,
  532 + project_id: options.ProjectID,
  533 + validay: options.Validay
  534 + });
  535 + wx.getLocation({
  536 + type: 'gcj02',
  537 + success: function(res) {
  538 + th.data.lat = res.latitude;
  539 + th.data.lon = res.longitude;
  540 + th.data.is_get_local_ok = 1;
  541 + th.setData({
  542 + is_gps: 1
  543 + });
  544 + },
  545 + fail: function(res) {
  546 + if (res.errCode == 2) {
  547 + th.setData({
  548 + is_gps: 0
  549 + });
  550 + if (th.data.is_gps == 0) {
  551 + getApp().confirmBox("请开启GPS定位", null, 25000, !1);
  552 + th.settime();
  553 + }
  554 + } else {
  555 + th.setData({
  556 + is_gps: "3"
  557 + });
  558 + }
  559 +
  560 + th.data.is_get_local_ok = 1;
  561 + }
  562 + });
  563 +
  564 + // 获取当前默认导购信息及归属门店信息
  565 + getApp().request.promiseGet('/api/weshop/shoppingGuide/geIdStaffInfo', {
  566 + data: {
  567 + store_id: 1,
  568 + guide_id: 73,
  569 + UserCode: '01',
  570 + }
  571 + }).then(res => {
  572 + console.log('res==>', res.data.data);
  573 + th.setData({
  574 + store_name: res.data.data.StorageName,
  575 + beautician_name: res.data.data.StaffName,
  576 + });
  577 + });
  578 +
  579 + },
  580 + //查询剩下可预约人数
  581 + query_more: function() {
  582 + var th = this;
  583 + var url = "/api/weshop/marketing/reservation/can/reservation/countnew";
  584 + var beauticianID = th.data.beauticianID; //美容师id
  585 + var projectID = th.data.itemId; //服务id
  586 + var seekTime = th.data.time; //预约日期
  587 + var storageId = th.data.storageId; //门店id
  588 + var storeId = a.stoid; //商家id
  589 + getApp().request.promiseGet(url, {
  590 + data: {
  591 + beauticianId: beauticianID,
  592 + seekTime: seekTime,
  593 + serviceId: projectID,
  594 + storageId: storageId,
  595 + storeId: storeId
  596 + }
  597 + }).then(res => {
  598 + if (res.data.code == 0) {
  599 + var tment_count = res.data.data.CanReservation;
  600 + th.setData({
  601 + tment_count: tment_count
  602 + })
  603 + } else {
  604 + getApp().my_warnning(res.data.msg, 0, th);
  605 + th.settime();
  606 + }
  607 + })
  608 +
  609 + },
  610 + /**
  611 + * 生命周期函数--监听页面显示
  612 + */
  613 + onShow: function() {
  614 + var th = this;
  615 + var seekTime = th.data.time; //预约日期
  616 + if (seekTime != "") {
  617 + th.query_more();
  618 + }
  619 + th.setData({
  620 + time: th.data.time.substring(0, 16),
  621 + is_textea: 1
  622 + })
  623 + th.query_project();
  624 + },
  625 + //获取单个服务项目信息
  626 + query_project: function() {
  627 + var th = this;
  628 + var url = "/api/weshop/marketing/reservation/sm/page"; //获取服务项目接口
  629 + var project_id = th.data.project_id; //服务项目id
  630 + getApp().request.promiseGet(url, {
  631 + data: {
  632 + storeId: a.stoid,
  633 + userId: d.user_id,
  634 + projectId: project_id
  635 + }
  636 + }).then(res => {
  637 + if (res.data.code == 0) {
  638 + th.setData({
  639 + validay: res.data.data.pageData[0].Validay
  640 + })
  641 + } else {
  642 + getApp().my_warnning(res.data.msg, 0, th);
  643 + th.settime();
  644 + }
  645 + })
  646 + },
  647 + //关闭导航
  648 + close: function() {
  649 + var th = this;
  650 + var nav_b = th.selectComponent("#nav_b"); //组件的id
  651 + nav_b.close_box();
  652 + }
  653 +})
0 \ No newline at end of file 654 \ No newline at end of file
packageA/pages/my_service/appment_main.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "预约服务",
  3 + "usingComponents": {
  4 + "warn": "/components/long_warn/long_warn",
  5 + "nav_b": "/components/nav_b/nav_b"
  6 + }
  7 +}
0 \ No newline at end of file 8 \ No newline at end of file
packageA/pages/my_service/appment_main.wxml 0 → 100644
  1 +<wxs module="filters" src="../../../utils/filter.wxs"></wxs>
  2 +<view class="container" catchtap="close">
  3 + <image class="main" src="{{iurl}}/miniapp/images/yyservice/main.png"></image>
  4 +
  5 + <view class="Fram">
  6 + <!-- 选择门店 -->
  7 + <view class="flex-vertical mabot">
  8 + <!-- 门店 -->
  9 + <view class="flex-vertical-between head fs30">
  10 + <view>门</view>
  11 + <view>店</view>
  12 + </view>
  13 +
  14 + <!-- 选择门店 -->
  15 + <view class="flex-vertical-between fs26 select" bindtap="onclickstore">
  16 + <view class="{{store_name==''?'color':''}} value ellipsis-1">{{store_name==""?'选择服务门店':store_name}}</view>
  17 + <view class="angle">∟</view>
  18 + </view>
  19 + </view>
  20 + <!-- 选择美容师 -->
  21 + <view class="flex-vertical mabot">
  22 + <!-- 门店 -->
  23 + <view class="flex-vertical-between head fs30">
  24 + <view>美</view>
  25 + <view>容</view>
  26 + <view>师</view>
  27 + </view>
  28 +
  29 + <!-- 选择美容师 -->
  30 + <view class="rel fs26">
  31 + <view class="flex-vertical-between Cosmetology" bindtap="query_beautician">
  32 + <view class="{{beautician_name==''?'color':''}} value ellipsis-1">{{beautician_name==''?'选择美容师':beautician_name}}</view>
  33 + <view class="angle">∟</view>
  34 + </view>
  35 + <!-- 美容师下拉列表 -->
  36 + <view class="beauticians abs" wx:if="{{beautician}}">
  37 + <!-- 到时候要做判断如果是index==循环的最后一个则把下边线去掉:(beaclone去掉的css) -->
  38 + <view class="beautician flex-vertical fs26" wx:for="{{beautician_list}}" bindtap="choice_beautician" data-baaindex="{{key}}" wx:for-index="key">
  39 + <view class="StaffName ellipsis-1">{{item.StaffName}}</view>
  40 + </view>
  41 + <view>
  42 + </view>
  43 + </view>
  44 + </view>
  45 + <view class="flex-center users" bindtap="nav_bea">
  46 + <image class="user" src="{{iurl}}/miniapp/images/yyservice/user.png"></image>
  47 + </view>
  48 + </view>
  49 +
  50 + <!-- 选择时间 -->
  51 + <view class="flex-vertical mabot">
  52 + <!-- 门店 -->
  53 + <view class="head fs30">
  54 + <view>预约时间</view>
  55 + </view>
  56 +
  57 + <!-- 选择时间 -->
  58 + <view class="flex-vertical-between fs26 select" data-url="/pages/user/my_service/beauty_deta?url={{url}}&StorageId={{StorageId}}&BeauticianID={{beauticianID}}&itemId={{itemId}}&modify=0&projectId={{project_id}}" bindtap="goto">
  59 + <view class="{{time==''?'color':''}}">{{time==""?'选择时间':time}}</view>
  60 + <view class="angle angler">∟</view>
  61 + </view>
  62 + </view>
  63 +
  64 + <!-- 备注 -->
  65 + <view class="flex Remarks">
  66 + <!-- 门店 -->
  67 + <view class="flex-space-between head fs30">
  68 + <view>备</view>
  69 + <view>注</view>
  70 + </view>
  71 + <view class="flex fs26">
  72 + <block wx:if="{{is_textea==1}}">
  73 + <textarea class="textarea" placeholder="{{remarks==''?'填写备注':remarks}}" placeholder-class="fs26 color" value="{{remarks}}" bindinput="input_remarks" maxlength="100">
  74 + </textarea>
  75 + </block>
  76 + <block wx:else>
  77 + <view class="textarea {{remarks==''?'color':''}}" bindtap="check_text">{{remarks==''?'填写备注':remarks}}
  78 + </view>
  79 + </block>
  80 + </view>
  81 + </view>
  82 + <view wx:if="{{tment_count!=''}}" class="notes flex-level-right fs24 color">
  83 + <view>注:剩余可预约人数{{tment_count}}人</view>
  84 + </view>
  85 +
  86 + <view class="submitMax flex-space-between fs32">
  87 + <navigator class="appment flex-center" url="/pages/user/my_service/tment_order_list">
  88 + <view>我的预约</view>
  89 + </navigator>
  90 + <form report-submit='true' bindtap="sub_success">
  91 + <button form-type="submit" class="sub_appment flex-center">
  92 + <view>提交预约</view>
  93 + </button>
  94 + </form>
  95 + </view>
  96 + </view>
  97 +
  98 +</view>
  99 +
  100 +<!-- 门店列表显示 -->
  101 +<view wx:if="{{store}}" class="storeList fixed">
  102 + <view class="choice flex-vertical-between fs32 storeListpadd">
  103 + <view>选择服务门店</view>
  104 + <icon bindtap="onclickstore" color="black" size="22" type="cancel"></icon>
  105 + </view>
  106 + <view class="searchbar flex-vertical-between storeListpadd">
  107 + <input class="inputstore fs28" placeholder="{{key_word==''?'输入要搜索的门店':key_word}}" placeholder-class="fs28" maxlength="16" bindinput="input_store" bindconfirm="search_store" />
  108 + <view class="search flex-center" bindtap="search_store">
  109 + <view class="fs28">搜索</view>
  110 + </view>
  111 + </view>
  112 + <!-- 选择门店 -->
  113 + <scroll-view class="stores" scroll-y="{{isScroll}}" enable-back-to-top="true" bindscrolltolower="onReachBottom">
  114 + <view class="store flex-vertical" wx:for="{{store_list}}" bindtap="choose_for_store" data-ind="{{index}}">
  115 + <block wx:if="{{index==fir_pick_index}}">
  116 + <icon class="icon" type="success" color="red" size="20"></icon>
  117 + </block>
  118 + <block wx:else>
  119 + <view class="circular"></view>
  120 + </block>
  121 + <view class="store_name_dis">
  122 + <view class="name_dis flex-vertical-between">
  123 + <view class="store_name fs28 ellipsis-1">{{item.StorageName}}</view>
  124 + <view wx:if="{{item.Distance!=1000000}}" class="store_dis flex fs22">
  125 + <view class="ellipsis-1">距您:{{item.Distance}}km</view>
  126 + </view>
  127 + </view>
  128 + <view class="store_address fs24 ellipsis-2">{{item.Address}}</view>
  129 + </view>
  130 + </view>
  131 + <!-- 通过搜索的时候没有找到的提示语 -->
  132 + <view wx:if="{{store_list.length<1 && is_search==1}}" class="flex-center fs28 notstore">
  133 + <view>没有找到{{key_word}}门店</view>
  134 + </view>
  135 +
  136 + <!-- 数据加载完毕 -->
  137 + <view wx:if="{{ismore && store_list.length>1}}" class="flex-center fs28 notstore">
  138 + <view>数据加载完毕</view>
  139 + </view>
  140 + </scroll-view>
  141 + <!-- sub -->
  142 + <view class="flex-center fs32" bindtap="choice_store">
  143 + <view class="determine flex-center">
  144 + <view>确定</view>
  145 + </view>
  146 + </view>
  147 +</view>
  148 +<!-- 蒙尘 -->
  149 +<view wx:if="{{store}}" class="disgraceful" bindtap="onclickstore"></view>
  150 +<warn id="warn"></warn>
  151 +<!-- 制作一个圆球导航 -->
  152 +<nav_b id="nav_b"></nav_b>
0 \ No newline at end of file 153 \ No newline at end of file
packageA/pages/my_service/appment_main.wxss 0 → 100644
  1 +.container {
  2 + border-top: 7rpx solid rgb(245, 245, 245);
  3 +}
  4 +
  5 +.main {
  6 + width: 100%;
  7 + height: 305rpx;
  8 +}
  9 +
  10 +.angle {
  11 + transform: rotate(-45deg);
  12 + margin-right: 15rpx;
  13 + margin-bottom: 10rpx;
  14 + font-size: 26rpx;
  15 + color: rgb(142, 142, 142);
  16 +}
  17 +.StaffName{
  18 + max-width: 350rpx;
  19 +}
  20 +.angler {
  21 + transform: rotate(227deg);
  22 + margin-bottom: 0rpx;
  23 +}
  24 +
  25 +.users {
  26 + background-color: rgb(255, 255, 255);
  27 +}
  28 +
  29 +.user {
  30 + width: 40rpx;
  31 + height: 40rpx;
  32 + margin-left: 15rpx;
  33 +}
  34 +
  35 +.Fram {
  36 + padding: 0rpx 60rpx;
  37 + margin-top: 60rpx;
  38 + background-color: rgb(255, 255, 255);
  39 +}
  40 +
  41 +.subSuccess {
  42 + position: fixed;
  43 + z-index: 3;
  44 + top: 420rpx;
  45 + left: 110rpx;
  46 + width: 540rpx;
  47 + height: 315rpx;
  48 + background-color: rgb(155, 155, 155);
  49 + text-align: center;
  50 + border-radius: 20rpx;
  51 + color: rgb(255, 255, 255);
  52 + font-weight: bold;
  53 +}
  54 +
  55 +.Success {
  56 + width: 110rpx;
  57 + height: 110rpx;
  58 + margin-top: 70rpx;
  59 + margin-bottom: 30rpx;
  60 +}
  61 +
  62 +.appment, .sub_appment {
  63 + width: 270rpx;
  64 + height: 60rpx;
  65 + line-height: 55rpx;
  66 + border-radius: 40rpx;
  67 +}
  68 +
  69 +button {
  70 + height: 100%;
  71 + background-color: rgb(214, 1, 33);
  72 +}
  73 +
  74 +.appment {
  75 + background-color: rgb(238, 238, 238);
  76 +}
  77 +
  78 +.sub_appment {
  79 + background-color: rgb(214, 1, 33);
  80 + color: rgb(255, 255, 255);
  81 +}
  82 +
  83 +.head {
  84 + width: 122rpx;
  85 + margin-right: 40rpx;
  86 + height: 50rpx;
  87 + line-height: 50rpx;
  88 +}
  89 +
  90 +.textarea {
  91 + width: 420rpx;
  92 + background-color: rgb(238, 238, 238);
  93 + border-radius: 6rpx;
  94 + height: 130rpx;
  95 + padding-left: 40rpx;
  96 + padding-right: 15rpx;
  97 + padding-top: 15rpx;
  98 + padding-bottom: 15rpx;
  99 +}
  100 +
  101 +.mabot {
  102 + margin-bottom: 35rpx;
  103 +}
  104 +
  105 +.select {
  106 + width: 420rpx;
  107 + height: 55rpx;
  108 + line-height: 55rpx;
  109 + background-color: rgb(238, 238, 238);
  110 + border-radius: 6rpx;
  111 + padding-left: 40rpx;
  112 + padding-right: 15rpx;
  113 +}
  114 +
  115 +.Cosmetology {
  116 + padding-left: 40rpx;
  117 + padding-right: 15rpx;
  118 + width: 365rpx;
  119 + background-color: rgb(238, 238, 238);
  120 + height: 50rpx;
  121 + line-height: 50rpx;
  122 + border-radius: 6rpx;
  123 +}
  124 +
  125 +.beauticians {
  126 + width: 407rpx;
  127 + z-index: 3;
  128 + top: 45rpx;
  129 + left: -1rpx;
  130 + padding: 0rpx 5rpx;
  131 + border: 2rpx solid rgb(238, 238, 238);
  132 + background-color: rgb(255, 255, 255);
  133 + padding-bottom: 5rpx;
  134 + height: 279rpx;
  135 + overflow-x: scroll;
  136 + overflow-y: scroll;
  137 +}
  138 +
  139 +.beautician {
  140 + height: 70rpx;
  141 + border-bottom: 2rpx solid rgb(238, 238, 238);
  142 + padding-left: 25rpx;
  143 +}
  144 +
  145 +.beaclone {
  146 + border-bottom: 0rpx;
  147 +}
  148 +
  149 +.notes {
  150 + margin-top: 15rpx;
  151 + margin-bottom: 60rpx;
  152 + margin-right: 8rpx;
  153 +}
  154 +
  155 +.color {
  156 + color: rgb(172, 172, 172);
  157 +}
  158 +
  159 +.submitMax {
  160 + margin-top: 50rpx;
  161 + padding: 0rpx 15rpx;
  162 +}
  163 +
  164 +.Remarks {
  165 + margin-top: 15rpx;
  166 +}
  167 +
  168 +/* 蒙尘 */
  169 +
  170 +.disgraceful {
  171 + position: fixed;
  172 + z-index: 4;
  173 + width: 100%;
  174 + height: 100%;
  175 + top: 0rpx;
  176 + left: 0rpx;
  177 + background-color: rgba(0, 0, 0, 0.4);
  178 +}
  179 +
  180 +.storeList {
  181 + z-index: 5;
  182 + left: 0rpx;
  183 + border-top-left-radius: 25rpx;
  184 + border-top-right-radius: 25rpx;
  185 + background-color: rgb(255, 255, 255);
  186 + width: 100%;
  187 + padding: 45rpx 0rpx;
  188 +}
  189 +
  190 +.storeListpadd {
  191 + padding: 0rpx 31rpx;
  192 +}
  193 +
  194 +.choice {
  195 + margin-bottom: 5rpx;
  196 +}
  197 +
  198 +.inputstore {
  199 + width: 510rpx;
  200 + height: 43rpx;
  201 + line-height: 43rpx;
  202 + border-radius: 30rpx;
  203 + border: 2rpx solid rgb(238, 238, 238);
  204 + padding-left: 30rpx;
  205 +}
  206 +
  207 +.searchbar {
  208 + height: 95rpx;
  209 + border-bottom: 2rpx solid rgb(238, 238, 238);
  210 +}
  211 +
  212 +.search {
  213 + width: 125rpx;
  214 + height: 45rpx;
  215 + line-height: 45rpx;
  216 + background-color: rgb(219, 27, 52);
  217 + border-radius: 30rpx;
  218 + color: rgb(255, 255, 255);
  219 +}
  220 +
  221 +.stores {
  222 + height: 500rpx;
  223 + overflow-y: scroll;
  224 +}
  225 +
  226 +.store {
  227 + margin: 0rpx 16rpx;
  228 + padding-right: 15rpx;
  229 + border-bottom: 2rpx solid rgb(238, 238, 238);
  230 + padding: 20rpx 0rpx;
  231 +}
  232 +
  233 +.icon {
  234 + padding: 0rpx 15rpx;
  235 +}
  236 +
  237 +.circular {
  238 + width: 37rpx;
  239 + height: 37rpx;
  240 + border-radius: 50%;
  241 + border: 2rpx solid rgb(52, 52, 52);
  242 + margin: 0rpx 15rpx;
  243 +}
  244 +
  245 +.store_name_dis {
  246 + width: 90%;
  247 +}
  248 +
  249 +.name_dis {
  250 + margin-bottom: 5rpx;
  251 +}
  252 +
  253 +.store_name {
  254 + max-width: 420rpx;
  255 +}
  256 +
  257 +.store_dis {
  258 + height: 30rpx;
  259 + line-height: 30rpx;
  260 + padding: 5rpx 15rpx;
  261 + background-color: rgb(227, 227, 227);
  262 + border-radius: 25rpx;
  263 + margin-right: 20rpx;
  264 + color: rgb(159, 159, 159);
  265 + max-width: 200rpx;
  266 +}
  267 +
  268 +.store_address {
  269 + color: rgb(159, 159, 159);
  270 +}
  271 +
  272 +.determine {
  273 + background-color: rgb(196, 24, 26);
  274 + width: 500rpx;
  275 + border-radius: 35rpx;
  276 + height: 60rpx;
  277 + color: rgb(255, 255, 255);
  278 + margin: 20rpx 0rpx;
  279 +}
  280 +
  281 +.value {
  282 + max-width: 300rpx;
  283 +}
  284 +
  285 +.notstore {
  286 + height: 80rpx;
  287 + color: rgb(159, 159, 159);
  288 +}
packageA/pages/my_service/beauty_deta.js 0 → 100644
  1 +var e = getApp(),
  2 + a = e.globalData.setting,
  3 + os = a,
  4 + t = e.request,
  5 + d = e.globalData;
  6 +Page({
  7 +
  8 + /**
  9 + * 页面的初始数据
  10 + */
  11 + data: {
  12 + inurl: a.url, //接口网址
  13 + iurl: a.imghost,
  14 + url: "", //选择选择时间后返回的页面
  15 + defimgurl: "/miniapp/images/no-head.jpg",
  16 + seekTime: "", //当前服务预约选择的时间
  17 + time_list: [], //可预约时间
  18 + name: "", //美容师姓名
  19 + comment: "", //美容师评价
  20 + aweeks: [], //七天的预约时间
  21 + head_img: "", //美容师头像
  22 + time:['08:00','08:30', '09:00', '09:30', '10:00', '10:30', '11:00', '11:30', '12:00', '12:30', '13:00', '13:30', '14:00','14:30', '15:00', '15:30', '16:00', '16:30', '17:00','17:30', '18:00','18:30', '19:00', '19:30', '20:00', '20:30', '21:00', '21:30', '22:00','22:30'],
  23 + weeks: [], //星期几数组
  24 + time_index: -1, //选择预约时间下标
  25 + date_id: 0, //选择日期的id
  26 + beautician_id: "", //美容师id
  27 + itemId: "", //服务id
  28 + number: "", //预约单号
  29 + modify: 0, //是否是修改时间
  30 + iscos: 0, //是否是从美容师列表过来的
  31 + hours: "", //获取当前时分秒
  32 + projectId: "", //项目id
  33 + StaffName: "", //美容师名称
  34 + },
  35 +
  36 + /**
  37 + * 生命周期函数--监听页面加载
  38 + */
  39 + onLoad: function(options) {
  40 + var th = this;
  41 + var myDate = new Date();
  42 + var minutes = myDate.getMinutes(); //获取当前分钟数(0-59)
  43 + var hours = myDate.getHours() + ":" + minutes; //获取当前小时数(0-23)
  44 + var beautician_id = options.BeauticianID;
  45 + var storageId = options.StorageId;
  46 +
  47 +
  48 + th.setData({
  49 + beautician_id: beautician_id,
  50 + itemId: options.itemId,
  51 + modify: options.modify,
  52 + hours: hours,
  53 + projectId: options.projectId,
  54 + storageId:storageId
  55 + })
  56 + if (options.url != undefined) {
  57 + th.setData({
  58 + url: options.url
  59 + })
  60 + }
  61 + if (options.number != undefined) {
  62 + th.setData({
  63 + number: options.number
  64 + })
  65 + }
  66 + if (options.iscos != undefined) {
  67 + th.setData({
  68 + iscos: options.iscos
  69 + })
  70 + }
  71 + if (options.StaffName!=undefined){
  72 + th.setData({
  73 + StaffName: options.StaffName
  74 + })
  75 + }
  76 + th.query_beatea(th.query_aweek);
  77 + },
  78 + /**
  79 + * 生命周期函数--监听页面显示
  80 + */
  81 + onShow: function() {
  82 + var th = this;
  83 + //获取当前时间
  84 + var myDate = new Date();
  85 + // var date = myDate.getHours(); //获取当前小时数(0-23);
  86 + let str = myDate.toTimeString(); //"10:55:24 GMT+0800 (中国标准时间)"
  87 + let date = str.substring(0, 8); // '10:55:24'
  88 + th.setData({
  89 + hours: date
  90 + });
  91 + },
  92 +
  93 + //图片失败,默认图片
  94 + bind_bnerr1: function(e) {
  95 + var _errImg = e.target.dataset.errorimg;
  96 + var _Img = e.target.dataset.img;
  97 + if (_Img != undefined) {
  98 + var _errObj = {};
  99 + _errObj[_errImg] = "/miniapp/images/no-head.jpg";
  100 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  101 + }
  102 + },
  103 + //选择服务日期
  104 + check_date: function(e) {
  105 + var th = this;
  106 + var id = e.currentTarget.dataset.dateid;
  107 + var date_id = th.data.date_id;
  108 + var seekTime = th.data.aweeks[id].time;
  109 + if (id != date_id) {
  110 + th.setData({
  111 + date_id: id,
  112 + seekTime: seekTime
  113 + })
  114 + th.query_date();
  115 + }
  116 + },
  117 + //获取美容师信息
  118 + query_beatea: function(func) {
  119 + var th = this;
  120 + var url = "/api/weshop/marketing/reservation/staff/get"; //接口路径
  121 + var beautician_id = th.data.beautician_id;
  122 + getApp().request.promiseGet(url, {
  123 + data: {
  124 + beauticianId: beautician_id,
  125 + storeId: a.stoid,
  126 + }
  127 + }).then(res => {
  128 + if (res.data.code == 0) {
  129 + var data = res.data.data;
  130 + var ob={
  131 + name: data.StaffName,
  132 + comment: data.Remark1,
  133 + head_img: data.PhotoUrl
  134 + };
  135 + if(!th.data.storageId){
  136 + ob.storageId=data.StorageId;
  137 + }
  138 + th.setData(ob);
  139 + func();
  140 + } else {
  141 + getApp().my_warnning(res.data.msg, 0, th);
  142 + }
  143 + })
  144 + },
  145 + //返回上个页面
  146 + navigateBack: function() {
  147 + var th = this;
  148 + var modify = th.data.modify; //是否是更改时间
  149 + var seekTime = th.data.seekTime; //选择的日期
  150 + var time_list = th.data.time_list;
  151 + var time_index = th.data.time_index;
  152 + if (time_index == -1) {
  153 + getApp().my_warnning("请选择预约时间", 0, th);
  154 + return false;
  155 + }
  156 + var date_id = th.data.date_id;
  157 + var date = th.data.aweeks[date_id].time;
  158 + var time = date + " " + time_list[time_index] + ":00";
  159 + if (modify == 1) {
  160 + var json = {
  161 + "arrangeTime": time,
  162 + "number": th.data.number,
  163 + "remark": "更改时间",
  164 + "states": 0,
  165 + "storeId": a.stoid
  166 + };
  167 + var data = JSON.stringify(json);
  168 + var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址
  169 + wx.request({
  170 + url: url,
  171 + data: data,
  172 + method: 'put',
  173 + header: {
  174 + 'content-type': 'application/json'
  175 + }, // 设置请求的 header
  176 + success: function(res) {
  177 + if (res.data.code == 0) {
  178 + getApp().my_warnning(res.data.data, 1, th);
  179 + setTimeout(function() {
  180 + wx.navigateBack({
  181 + //返回
  182 + delta: 1
  183 + })
  184 + }, 1000);
  185 + } else {
  186 + getApp().my_warnning(res.data.msg, 0, th);
  187 + }
  188 + }
  189 + })
  190 + } else {
  191 + var pages = getCurrentPages(); //当前页面
  192 + var iscos = th.data.iscos;
  193 + var delta = 1;
  194 + if (Number(iscos) == 1) {
  195 + delta = delta + Number(iscos); //返回哪个页面
  196 + var prevPage = pages[pages.length - 2 - Number(iscos)]; //上一页面
  197 + prevPage.setData({
  198 + //直接给上一个页面赋值
  199 + time: time,
  200 + beautician_name: th.data.StaffName,
  201 + beauticianID: th.data.beautician_id
  202 + });
  203 + wx.navigateBack({
  204 + //返回
  205 + delta: 2
  206 + })
  207 + } else {
  208 + var prevPage = pages[pages.length - 2]; //上一页面
  209 + prevPage.setData({
  210 + //直接给上一个页面赋值
  211 + time: time
  212 + });
  213 + wx.navigateBack({
  214 + //返回
  215 + delta: 1
  216 + })
  217 + }
  218 + }
  219 + },
  220 + //选择时间
  221 + Selection_time: function(e) {
  222 + var th = this;
  223 + var index = e.currentTarget.dataset.index;
  224 + var time_index = th.data.time_index;
  225 + if (index == time_index) {
  226 + return false;
  227 + } else {
  228 + th.setData({
  229 + time_index: index
  230 + })
  231 + }
  232 + },
  233 + //查询七天预约时间
  234 + query_aweek: function() {
  235 + var th = this;
  236 + var beautician_id = th.data.beautician_id; //美容师id
  237 + var storageId=th.data.storageId;
  238 +
  239 + var itemId = th.data.itemId; //服务id
  240 + var projectId = th.data.projectId; //项目id
  241 + var url = "/api/weshop/marketing/reservation/staff/seven/time/listnew"; //接口地址
  242 + getApp().request.promiseGet(url, {
  243 + data: {
  244 + projectId: projectId,
  245 + beauticianId: beautician_id,
  246 + serviceId: itemId,
  247 + storeId: a.stoid,
  248 + storageId:storageId
  249 + }
  250 + }).then(res => {
  251 + if (res.data.code == 0) {
  252 + var data = res.data.data;
  253 + var arr = [];
  254 + for (var i in data) {
  255 + var em = {
  256 + "time": i,
  257 + "val": data[i]
  258 + };
  259 + arr.push(em);
  260 + }
  261 + arr.sort(th.sort_arr);
  262 + var weeks = ["今天", "明天", "后天"];
  263 + var week = "";
  264 + for (var i = 3; i < arr.length; i++) {
  265 + var date = new Date(arr[i].time);
  266 + if (date.getDay() == 0) week = "周日"
  267 + if (date.getDay() == 1) week = "周一"
  268 + if (date.getDay() == 2) week = "周二"
  269 + if (date.getDay() == 3) week = "周三"
  270 + if (date.getDay() == 4) week = "周四"
  271 + if (date.getDay() == 5) week = "周五"
  272 + if (date.getDay() == 6) week = "周六"
  273 + weeks[i] = week;
  274 + }
  275 + th.setData({
  276 + aweeks: arr,
  277 + weeks: weeks
  278 + })
  279 + th.query_date();
  280 +
  281 + } else {
  282 + getApp().my_warnning(res.data.msg, 0, th);
  283 + }
  284 + })
  285 +
  286 + },
  287 +
  288 + query_date: function() {
  289 + var th = this;
  290 + var projectId = th.data.projectId;
  291 + var date_id = th.data.date_id; //日期下标
  292 + var SeekTime = th.data.aweeks[date_id].time;
  293 + var val = th.data.aweeks[date_id].val;
  294 +
  295 + var url = "/api/weshop/marketing/reservation/staff/time/listnew";
  296 + getApp().request.promiseGet(url, {
  297 + data: {
  298 + projectId: projectId,
  299 + staffId: th.data.beautician_id,
  300 + storageId:th.data.storageId,
  301 + serviceId: th.data.itemId,
  302 + seekTime: SeekTime,
  303 + storeId: a.stoid,
  304 + }
  305 + }).then(res => {
  306 + if (res.data.code == 0) {
  307 + var hours = th.data.hours;
  308 + var time_list = res.data.data;
  309 + var time = th.data.time;
  310 + var date_id = th
  311 + var new_time = [];
  312 + var date = th.data.hours.substring(0,2);
  313 +
  314 + //不等于空就是有可以预约的时间
  315 + if (time_list != null) {
  316 + if (res.data.data && res.data.data[0]!= undefined) {
  317 + if (res.data.data[0].GroupHour && res.data.data[0].GroupHour.length > 11) {
  318 + getApp().my_warnning(res.data.data[0].GroupHour, 0, th);
  319 + }
  320 + }
  321 + //循环固定和可预约的时间
  322 + for (var i = 0; i < time.length; i++) {
  323 + for (var ii = 0; ii < time_list.length; ii++) {
  324 + //判断固定的时间和可以预约的时间
  325 + if (time[i] == time_list[ii].begintime.substring(0, 5)) {
  326 + var date_id = th.data.date_id;
  327 + if (date > time_list[ii].begintime.substring(0, 2) && date_id == 0) {
  328 + new_time[i] = "";
  329 + break;
  330 + }else{
  331 + new_time[i] = time_list[ii].begintime.substring(0, 5);
  332 + break;
  333 + }
  334 + } else {
  335 + new_time[i] = "";
  336 + }
  337 + }
  338 + }
  339 + }else{
  340 + for(var i = 0 ;i<time.length;i++){
  341 + new_time[i]="";
  342 + }
  343 + }
  344 + th.setData({
  345 + time_list: new_time,
  346 + })
  347 + } else {
  348 + getApp().my_warnning(res.data.msg, 0, th);
  349 + }
  350 + })
  351 +
  352 + },
  353 + //更改预约时间
  354 + change_time: function() {
  355 + var th = this;
  356 + var seekTime = th.data.seekTime; //选择的日期
  357 + var time_list = th.data.time_list;
  358 + var time_index = th.data.time_index;
  359 + var time = time_list[time_index];
  360 + var number = th.data.number; //预约单号
  361 + var json = {
  362 + "arrangeTime": seekTime + " " + time,
  363 + "number": number,
  364 + "remark": "更改预约时间",
  365 + "states": 0,
  366 + "storeId": a.stoid
  367 + };
  368 + var data = JSON.stringify(json);
  369 + var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址
  370 + wx.request({
  371 + url: url,
  372 + data: data,
  373 + method: 'put',
  374 + header: {
  375 + 'content-type': 'application/json'
  376 + }, // 设置请求的 header
  377 + success: function(res) {
  378 + if (res.data.code == 0) {
  379 + getApp().my_warnning("更改成功", 0, th);
  380 + } else {
  381 + getApp().my_warnning(res.data.msg, 0, th);
  382 + }
  383 + }
  384 + })
  385 + },
  386 + //预览头像
  387 + previewImage: function(e) {
  388 + var th = this;
  389 + var current = e.currentTarget.dataset.src;
  390 + wx.previewImage({
  391 + current: current, // 当前显示图片的http链接
  392 + urls: [th.data.head_img] // 需要预览的图片http链接列表
  393 + })
  394 + },
  395 +
  396 + sort_arr: function(a, b) {
  397 + a = a['time'];
  398 + b = b['time'];
  399 + if (a < b) {
  400 + return -1;
  401 + }
  402 + if (a > b) {
  403 + return 1;
  404 + }
  405 + return 0;
  406 + },
  407 +
  408 + check_is_in_arr:function(val,pdata) {
  409 + if(!val || !pdata) return false;
  410 + for(var i in pdata){
  411 + if(pdata[i].begintime.indexOf(val)!=-1){
  412 + return true;
  413 + }
  414 + }
  415 + return false;
  416 + }
  417 +
  418 +
  419 +
  420 +})
0 \ No newline at end of file 421 \ No newline at end of file
packageA/pages/my_service/beauty_deta.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "美容师详情",
  3 + "usingComponents": {
  4 + "warn": "/components/long_warn/long_warn"
  5 + }
  6 +}
0 \ No newline at end of file 7 \ No newline at end of file
packageA/pages/my_service/beauty_deta.wxml 0 → 100644
  1 +<view class="container">
  2 + <view class="backcolor"></view>
  3 +
  4 + <view class="comments">
  5 + <!-- 个人信息 -->
  6 + <view class="Personal">
  7 +
  8 + <view class="name fs36 ellipsis-1">{{name}}</view>
  9 +
  10 + <view class="ellipsis-4" style="width:100%">
  11 + <view style="overflow:hidden;">
  12 + <image class="head" src="{{head_img==''?iurl+defimgurl:head_img}}" data-errorimg="{{head_img}}" binderror="bind_bnerr1" data-img="{{head_img}}" data-src="{{head_img}}"></image>
  13 + <view class="introduce fs26">
  14 + <block wx:if="{{comment!=''}}">
  15 + {{comment}}
  16 + </block>
  17 + <block wx:else>
  18 + 暂无介绍
  19 + </block>
  20 + </view>
  21 + <view style="clear:both"></view>
  22 + </view>
  23 + </view>
  24 +
  25 + </view>
  26 +
  27 + <view>
  28 + <view class="fs36" style="margin-bottom:35rpx;">服务预约</view>
  29 + <scroll-view class="scroll-h fs26 " scroll-x>
  30 + <view class="rel" wx:for="{{aweeks}}" style="display: inline-block;">
  31 + <block wx:if="{{aweeks[index].val!=''}}">
  32 + <view class="scroll-item-h bd {{index==date_id?'chbd':''}}" bindtap="check_date" data-dateid="{{index}}">
  33 + <view>{{weeks[index]}}</view>
  34 + <view>{{item.time}}</view>
  35 + </view>
  36 + </block>
  37 + <block wx:else>
  38 + <view class="scroll-item-h bd {{index==date_id?'chbd':''}}" bindtap="check_date" data-dateid="{{index}}">
  39 + <view>{{weeks[index]}}(约满)</view>
  40 + <view>{{item.time}}</view>
  41 + </view>
  42 + </block>
  43 + </view>
  44 +
  45 + </scroll-view>
  46 +
  47 + <!-- 选择时间 -->
  48 + <view class="Times">
  49 +
  50 + <view class="flex-center" wx:for="{{time}}" style="display:inline-block;" wx:for-index="key" wx:for-item="it">
  51 + <block wx:if="{{it==time_list[key]}}">
  52 + <view class="Time flex-center {{time_index==key?'chTime':''}}" bindtap="Selection_time" data-index="{{key}}">
  53 + <view>
  54 + <view class="fs26">{{it}}</view>
  55 + </view>
  56 + </view>
  57 + </block>
  58 + <block wx:else>
  59 + <view class="Time flex-center nochTime">
  60 + <view>
  61 + <view class="fs26">{{it}}</view>
  62 + </view>
  63 + </view>
  64 + </block>
  65 + </view>
  66 + <view class="choice flex-center fs32" bindtap="navigateBack">
  67 + <view>确定选择</view>
  68 + </view>
  69 +
  70 + </view>
  71 +
  72 + </view>
  73 +
  74 + </view>
  75 +
  76 +</view>
  77 +<warn id="warn"></warn>
0 \ No newline at end of file 78 \ No newline at end of file
packageA/pages/my_service/beauty_deta.wxss 0 → 100644
  1 +.container {
  2 + border-top: 7rpx solid rgb(245, 245, 245);
  3 +}
  4 +
  5 +.backcolor {
  6 + position: absolute;
  7 + top: 0rpx;
  8 + left: 0rpx;
  9 + z-index: 0;
  10 + width: 100%;
  11 + height: 270rpx;
  12 + background-color: rgb(214, 1, 33);
  13 +
  14 +}
  15 +
  16 +.comments {
  17 + position: absolute;
  18 + top: 45rpx;
  19 + left: 0rpx;
  20 + z-index: 1;
  21 + padding: 0rpx 23rpx;
  22 +}
  23 +
  24 +.name {
  25 + font-weight: bold;
  26 + float: left;
  27 + width: 250rpx;
  28 +}
  29 +
  30 +.head {
  31 + width: 130rpx;
  32 + height: 130rpx;
  33 + border-radius: 50%;
  34 + float: right;
  35 + margin: 0rpx 15rpx;
  36 + /* border: 2rpx solid red; */
  37 +}
  38 +
  39 +.introduce {
  40 + margin-top: 90rpx;
  41 + text-indent: 2em;
  42 + color: rgb(102, 102, 102);
  43 +}
  44 +
  45 +.Personal {
  46 + width: 640rpx;
  47 + height: 300rpx;
  48 + background-color: rgb(255, 255, 255);
  49 + border-radius: 5rpx;
  50 + box-shadow: 0rpx 2rpx 2rpx 2rpx rgb(250, 228, 230);
  51 + margin-bottom: 65rpx;
  52 + padding-top: 40rpx;
  53 + padding-left: 35rpx;
  54 + padding-right: 35rpx;
  55 +}
  56 +
  57 +.choice {
  58 + height: 70rpx;
  59 + background-color: rgb(214, 1, 33);
  60 + color: rgb(255, 255, 255);
  61 + margin-top: 30rpx;
  62 +}
  63 +
  64 +.scroll-h {
  65 + white-space: nowrap;
  66 + width: 704rpx;
  67 + overflow: visible;
  68 + height: 125rpx;
  69 + color: transparent;
  70 +}
  71 +
  72 +.scroll-item-h {
  73 + display: inline-block;
  74 + width: 172rpx;
  75 + text-align: center;
  76 + overflow: visible;
  77 + height: 70rpx;
  78 + padding: 15rpx 0rpx;
  79 +}
  80 +::-webkit-scrollbar{
  81 + width: 0;
  82 + height: 0;
  83 + color: transparent;
  84 +}
  85 +.box {
  86 + width: 0px;
  87 + height: 0px;
  88 + margin-left: 15rpx;
  89 + border-top: 21rpx solid transparent;
  90 + border-right: 21rpx solid transparent;
  91 + border-left: 21rpx solid transparent;
  92 + display: inline-block;
  93 + transform: rotate(180deg);
  94 + border-bottom: 21rpx solid rgb(214, 1, 33);
  95 +}
  96 +
  97 +.bd {
  98 + /* border: 2rpx solid rgb(238, 238, 238); */
  99 + background-color: rgb(255, 255, 255);
  100 + color: rgb(20, 20, 20);
  101 +}
  102 +
  103 +.chbd {
  104 + border: 2rpx solid rgb(214, 1, 33);
  105 + background-color: rgb(214, 1, 33);
  106 + color: rgb(255, 255, 255);
  107 +}
  108 +
  109 +.Times {
  110 + background-color: rgb(238, 243, 247);
  111 + margin-bottom: 30rpx;
  112 + padding:34rpx 27rpx;
  113 +}
  114 +
  115 +.Time {
  116 + border: 2rpx solid rgb(238, 238, 238);
  117 + width: 160rpx;
  118 + height: 70rpx;
  119 + background-color: rgb(255, 255, 255);
  120 + text-align: center;
  121 + padding-top: 15rpx;
  122 + padding-bottom: 15rpx;
  123 +}
  124 +.chTime{
  125 + border-color: rgb(214, 1, 33);
  126 +}
  127 +.nochTime{
  128 + color: rgb(174,177,177);
  129 + background-color: rgb(250,250,250);
  130 +}
  131 +.abs {
  132 + left: 55rpx;
  133 + bottom: -39rpx;
  134 +}
packageA/pages/my_service/cosmetology_list.js 0 → 100644
  1 +var e = getApp(),
  2 + a = e.globalData.setting,
  3 + os = a,
  4 + t = e.request,
  5 + d = e.globalData;
  6 +Page({
  7 +
  8 + /**
  9 + * 页面的初始数据
  10 + */
  11 + data: {
  12 + defimgurl: "/miniapp/images/no-head.jpg",
  13 + iurl: a.imghost,
  14 + cosmetology_list: [], //美容师列表
  15 + is_cosmetology_read: 0, //是否有读过美容师接口,该属性用在没有美容师列表的排版
  16 + curpage: 1, //当前分页数
  17 + pageSize: 10, //页大小
  18 + total: 0, //总数量
  19 + ismore: 0, //是否加载完毕
  20 + itemId: 0, //服务id,
  21 + storageId: 0, //线下门店id
  22 + projectId:"",//项目id
  23 + },
  24 + onReachBottom: function() {
  25 + var th = this;
  26 + if (this.data.total <= th.data.pageSize) return;
  27 + if (this.data.ismore) return;
  28 + wx.showLoading({
  29 + title: '加载中...',
  30 + })
  31 + th.query_cology();
  32 + },
  33 + query_cology: function() {
  34 + var th = this;
  35 + var url = "/api/weshop/marketing/reservation/staff/pagenew";
  36 + var itemId = th.data.itemId; //服务id
  37 + var storageId = th.data.storageId;
  38 + getApp().request.promiseGet(url, {
  39 + data: {
  40 + storeId: a.stoid,
  41 + userId: d.user_id,
  42 + serviceId: itemId,
  43 + storageId: storageId,
  44 + page: th.data.curpage,
  45 + pageSize: th.data.pageSize
  46 + }
  47 + }).then(res => {
  48 + wx.hideLoading();
  49 + if (res.data.code == 0) {
  50 + th.data.curpage++;
  51 + var arr1 = th.data.cosmetology_list;
  52 + var arr2 = res.data.data;
  53 + var arr3 = [...arr1, ...arr2];
  54 +
  55 +
  56 + th.setData({
  57 + cosmetology_list: arr3,
  58 + total: res.data.data.total,
  59 + is_service_read: 1,
  60 + is_cosmetology_read:1
  61 + }), wx.stopPullDownRefresh(); //停止下拉刷新
  62 + } else {
  63 + th.setData({
  64 + is_cosmetology_read:1,
  65 + ismore:1
  66 + })
  67 + }
  68 + })
  69 + },
  70 + //图片失败,默认图片
  71 + bind_bnerr1: function(e) {
  72 + var _errImg = e.target.dataset.errorimg;
  73 + var _Img = e.target.dataset.img;
  74 + if (_Img != undefined) {
  75 + var _errObj = {};
  76 + _errObj[_errImg] = "/miniapp/images/no-head.jpg";
  77 + console.log(_errObj,"zzzzzzz");
  78 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  79 + }
  80 + },
  81 + /**
  82 + * 生命周期函数--监听页面加载
  83 + */
  84 + onLoad: function(options) {
  85 + var th = this;
  86 + th.setData({
  87 + projectId: options.projectId,
  88 + itemId: options.itemId,
  89 + storageId: options.storageId
  90 + })
  91 + },
  92 +
  93 + /**
  94 + * 生命周期函数--监听页面显示
  95 + */
  96 + onShow: function() {
  97 + var th = this;
  98 + th.data.curpage++;
  99 + th.setData({
  100 + cosmetology_list: [],
  101 + total: 0,
  102 + is_service_read: 0,
  103 + is_cosmetology_read:0
  104 + })
  105 + th.query_cology();
  106 + },
  107 +
  108 +})
0 \ No newline at end of file 109 \ No newline at end of file
packageA/pages/my_service/cosmetology_list.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "美容师列表",
  3 + "usingComponents": {
  4 + "warn": "/components/long_warn/long_warn"
  5 + }
  6 +}
0 \ No newline at end of file 7 \ No newline at end of file
packageA/pages/my_service/cosmetology_list.wxml 0 → 100644
  1 +<view class="container">
  2 + <image class="appointment" src="{{iurl}}/miniapp/images/yyservice/Cosm_appo.png"></image>
  3 +
  4 + <!-- 总预约 -->
  5 + <view wx:if="{{cosmetology_list.length>0}}">
  6 + <!-- 当个预约 -->
  7 + <view class="single" wx:for="{{cosmetology_list}}" wx:for-item="item">
  8 + <!-- 个人属性 -->
  9 + <view class="flex-vertical-between">
  10 + <view class="flex-vertical">
  11 + <image class="portrait" src="{{(!item.PhotoUrl || item.PhotoUrl=='')?iurl+defimgurl:item.PhotoUrl}}" lazy-load="true" data-errorimg="cosmetology_list[{{index}}].PhotoUrl" binderror="bind_bnerr1" data-img="cosmetology_list[{{index}}].PhotoUrl"></image>
  12 + <view>
  13 + <!-- 用户名 -->
  14 + <view class="UserName ellipsis-1 fs32">{{item.StaffName}}</view>
  15 + <!-- 评价星数 -->
  16 + <view class="flex" style="margin-top:10rpx;">
  17 + <image class="Stars" src="{{iurl}}{{key<item.Star || item.Star==''?'/miniapp/images/StarsredCk.png':'/miniapp/images/StarswhiteUnCk.png'}}" wx:for="{{item.Star==''?5:5}}" wx:for-index="key" wx:for-item="it"></image>
  18 + <!-- images/StarswhiteUnCk.png//白色星星地址 -->
  19 + </view>
  20 + <!-- 个人标签 -->
  21 + <view class="Labels fs22 flex" wx:if="{{item.EvaluationLabel!=''?true:false}} ">
  22 + <view wx:if="{{lab<3}}" class="flex-center Labelitem itone {{lab==1?'itwo':''}} {{lab==2?'ith':''}}" wx:for="{{item.EvaluationLabel}}" wx:for-item="it" wx:for-index="lab">
  23 + <view class="ellipsis-1">{{it.LabelName}}</view>
  24 + </view>
  25 + </view>
  26 + </view>
  27 + </view>
  28 +
  29 + <!-- 预约状态 -->
  30 + <navigator class="flex-center gofu go" url="/pages/user/my_service/beauty_deta?StorageId={{item.StorageId}}&BeauticianID={{item.staffid}}&itemId={{itemId}}&iscos=1&modify=0&projectId={{projectId}}&StaffName={{item.StaffName}}">
  31 + <view class="fs24">预约</view>
  32 + </navigator>
  33 + </view>
  34 + <view class="fs26 information">
  35 + <block wx:if="{{item.Remark1!=''}}">
  36 + <view class="ellipsis-3">{{item.Remark1}}
  37 + </view>
  38 + </block>
  39 + <block wx:else>
  40 + <view>暂无介绍</view>
  41 + </block>
  42 + </view>
  43 + </view>
  44 + <!-- 没有数据 -->
  45 + <!-- 加载完毕并且数据大于=页大小 -->
  46 + <view class="After_all flex-center" wx:if="{{ismore && cosmetology_list.length>=4}}">
  47 + <view class="Line"></view>
  48 + <view class="end fs26 xc-black">到底了</view>
  49 + <view class="Line"></view>
  50 + </view>
  51 + </view>
  52 +</view>
  53 +<!-- 无美容师 -->
  54 +<view class="empty_order" wx:if="{{cosmetology_list.length<1 && is_cosmetology_read}}">
  55 + <view class="flex-level">
  56 + <image src="{{iurl}}miniapp/images/yyservice/no_beauty.png"></image>
  57 + </view>
  58 + <view class="flex-level fs30 xc-ash">暂无美容师</view>
  59 + <view class="flex-level">
  60 + <navigator url="/pages/user/my_service/i_service" bindtap="goto">
  61 + <view class="flex-center fs28 white">其他项目</view>
  62 + </navigator>
  63 + </view>
  64 +</view>
  65 +<warn id="warn"></warn>
0 \ No newline at end of file 66 \ No newline at end of file
packageA/pages/my_service/cosmetology_list.wxss 0 → 100644
  1 +page{
  2 + height: 100%;
  3 +}
  4 +.container{
  5 + background-color: rgb(255,255,255);
  6 +}
  7 +.appointment {
  8 + width: 100%;
  9 + height: 305rpx;
  10 +}
  11 +
  12 +.single {
  13 + margin-left: 10rpx;
  14 + border-bottom: 1rpx solid rgb(229, 229, 229);
  15 + padding-bottom: 30rpx;
  16 + padding-left: 20rpx;
  17 + padding-right: 35rpx;
  18 + padding-top: 30rpx;
  19 +}
  20 +
  21 +.portrait {
  22 + width: 140rpx;
  23 + height: 140rpx;
  24 + border-radius: 50%;
  25 + margin-right: 30rpx;
  26 +}
  27 +.UserName{
  28 + max-width: 250rpx;
  29 +}
  30 +.Stars {
  31 + width: 25rpx;
  32 + height: 25rpx;
  33 + margin-right: 7rpx;
  34 +}
  35 +.Labels{
  36 + width: 100%;
  37 + margin-top: 15rpx;
  38 +}
  39 +.Label {
  40 + margin-top: 25rpx;
  41 +}
  42 +
  43 +.Labelitem {
  44 + width: 100rpx;
  45 + height: 30rpx;
  46 + border-radius: 20rpx;
  47 + line-height: 30rpx;
  48 + margin-right: 10rpx;
  49 + padding:0rpx 9rpx;
  50 +}
  51 +
  52 +.itone {
  53 + border: 2rpx solid rgb(22, 232, 131);
  54 + color: rgb(22, 232, 131);
  55 +}
  56 +
  57 +.itwo {
  58 + border: 2rpx solid rgb(92, 135, 248);
  59 + color: rgb(92, 135, 248);
  60 +}
  61 +
  62 +.ith {
  63 + border: 2rpx solid rgb(244, 143, 55);
  64 + color: rgb(244, 143, 55);
  65 +}
  66 +
  67 +.gofu {
  68 + width: 120rpx;
  69 + padding: 5rpx 0rpx;
  70 + border-radius: 25rpx;
  71 +}
  72 +
  73 +.go {
  74 + border: 1rpx solid rgb(196, 26, 46);
  75 + color: rgb(196, 26, 46);
  76 + background-color: rgb(255,255,255);
  77 +}
  78 +
  79 +.gofull {
  80 + border: 1rpx solid rgb(185, 185, 185);
  81 + color: rgb(185, 185, 185);
  82 + background-color: rgb(255,255,255);
  83 +}
  84 +
  85 +.information {
  86 + margin-top: 25rpx;
  87 + text-indent: 2em;
  88 + color: rgb(103, 103, 103);
  89 +}
  90 +/* 无订单 */
  91 +.empty_order image {
  92 + width: 330rpx;
  93 + height: 280rpx;
  94 + margin-top: 120rpx;
  95 +}
  96 +
  97 +.empty_order .xc-ash {
  98 + margin-top: 10rpx;
  99 + font-weight: 600px;
  100 +}
  101 +
  102 +.empty_order navigator {
  103 + margin-top: 60rpx;
  104 + border-radius: 40rpx;
  105 +}
  106 +
  107 +.empty_order navigator view {
  108 + width: 247rpx;
  109 + height: 56rpx;
  110 + background-color: rgb(255, 72, 72);
  111 + border-radius: 40rpx;
  112 +}
  113 +.After_all {
  114 + height: 80rpx;
  115 +}
  116 +
  117 +.After_all .Line {
  118 + border-top: 3rpx solid rgb(0, 0, 0);
  119 + width: 130rpx;
  120 +}
  121 +
  122 +.After_all .end {
  123 + margin: 0rpx 15rpx;
  124 +}
packageA/pages/my_service/hist_service.js 0 → 100644
  1 +var e = getApp(),
  2 + a = e.globalData.setting,
  3 + os = a,
  4 + t = e.request,
  5 + d = e.globalData;
  6 +Page({
  7 +
  8 + /**
  9 + * 页面的初始数据
  10 + */
  11 + data: {
  12 + iurl: a.imghost,
  13 + isPickerShow: false,
  14 + isPickerRender: false,
  15 + startTime: "",
  16 + endTime: "",
  17 + pickerConfig: {
  18 + endDate: true,
  19 + column: "",
  20 + dateLimit: true,
  21 + initStartTime: "2019-01-01 12:32:44",
  22 + initEndTime: "2019-12-01 12:32:44",
  23 + limitStartTime: "1917-05-06 12:32:44",
  24 + limitEndTime: "2055-05-06 12:32:44"
  25 + },
  26 + hist_List: [], //服务项目列表
  27 + is_service_read: 0,
  28 + curpage: 1, //当前分页数
  29 + pageSize: 15, //页大小
  30 + total: 0,
  31 + ismore: 0, //是否加载完毕
  32 + is_screen: 0, //是否通过筛选来选择历史服务
  33 + is_reset: 0, //是否重复点击
  34 + is_nav: 1, //是否显示导航栏
  35 + },
  36 + pickerShow: function() {
  37 + this.setData({
  38 + isPickerShow: true,
  39 + isPickerRender: true,
  40 + chartHide: true
  41 + });
  42 + },
  43 + pickerHide: function() {
  44 + var th = this;
  45 + th.setData({
  46 + isPickerShow: false,
  47 + chartHide: false
  48 + });
  49 + },
  50 + //--选择时间--
  51 + setPickerTime: function(val) {
  52 + let data = val.detail,
  53 + gl_data = getApp().globalData,
  54 + th = this;
  55 + th.setData({
  56 + startTime: data.startTime,
  57 + endTime: data.endTime,
  58 + val: 0,
  59 + distance: 0,
  60 + hist_List: [],
  61 + curpage: 1,
  62 + is_screen: 1,
  63 + is_nav: 1
  64 + });
  65 + th.query_hist();
  66 + },
  67 + /**
  68 + * 生命周期函数--监听页面加载
  69 + */
  70 + onLoad: function(options) {
  71 + var th = this;
  72 + th.query_hist();
  73 + },
  74 + /**
  75 + * 生命周期函数--监听页面显示
  76 + */
  77 + onShow: function() {},
  78 +
  79 + /**
  80 + * 页面上拉触底事件的处理函数
  81 + */
  82 + onReachBottom: function() {
  83 + var th = this;
  84 + if (th.data.total <= th.data.pageSize) return false;
  85 + if (th.data.ismore) return false;
  86 +
  87 + wx.showLoading({
  88 + title: '加载中...',
  89 + })
  90 + th.query_hist();
  91 + },
  92 + //重置历史服务数据
  93 + his_reset: function() {
  94 + var th = this;
  95 + var is_reset = th.data.is_reset;
  96 + if (is_reset == 0) {
  97 + th.setData({
  98 + hist_List: [],
  99 + curpage: 1,
  100 + is_service_read: 0,
  101 + is_screen: 1,
  102 + is_reset: 1,
  103 + startTime: "",
  104 + endTime: "",
  105 + is_nav: 1
  106 + })
  107 + th.query_hist();
  108 + }
  109 + },
  110 + query_hist: function() {
  111 +
  112 + var th = this;
  113 + var startTime = th.data.startTime.substring(0, 10); //开始
  114 + var endTime = th.data.endTime.substring(0, 10); //结束
  115 + var url = "/api/weshop/marketing/reservation/history/reservation/page";
  116 + getApp().request.promiseGet(url, {
  117 + data: {
  118 + storeId: a.stoid,
  119 + userId: d.user_id,
  120 + beginDate: startTime,
  121 + endDate: endTime,
  122 + page: th.data.curpage,
  123 + pageSize: th.data.pageSize
  124 + }
  125 + }).then(res => {
  126 + wx.hideLoading();
  127 + th.setData({
  128 + is_reset: 0
  129 + })
  130 + if (res.data.code == 0) {
  131 + th.data.curpage++;
  132 + var arr1 = th.data.hist_List;
  133 + var arr2 = res.data.data.pageData;
  134 + var arr3 = [...arr1, ...arr2];
  135 + var ismore = 0;
  136 + if (arr3.length == res.data.total) ismore = 1
  137 + th.setData({
  138 + hist_List: arr3,
  139 + total: res.data.data.total,
  140 + ismore: ismore,
  141 + is_service_read: 1,
  142 + }), wx.stopPullDownRefresh(); //停止下拉刷新
  143 + } else {
  144 + th.setData({
  145 + is_service_read: 1,
  146 + is_screen: 0,
  147 + ismore: 1
  148 + })
  149 + if (startTime!="") {
  150 + th.setData({
  151 + total:0
  152 + })
  153 + }
  154 + }
  155 + })
  156 + }
  157 +})
0 \ No newline at end of file 158 \ No newline at end of file
packageA/pages/my_service/hist_service.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "历史预约",
  3 + "usingComponents": {
  4 + "timePicker": "/components/timePicker/timePicker",
  5 + "warn": "/components/long_warn/long_warn"
  6 + }
  7 +}
0 \ No newline at end of file 8 \ No newline at end of file
packageA/pages/my_service/hist_service.wxml 0 → 100644
  1 +<view class="{{isPickerRender==true?'container':''}}">
  2 + <!-- 点击方法 -->
  3 + <view class="exption flex-vertical-between fs28" wx:if="{{is_nav || hist_List.length>0}}">
  4 + <view class="flex">
  5 + 共使用
  6 + <view class="count">{{total}}</view>
  7 + 次服务
  8 + </view>
  9 + <view class="flex">
  10 + <view class="Resetfram flex-center" bindtap="his_reset">
  11 + <view class="Reset">重置</view>
  12 + <image class="Resetsub" src="{{iurl}}/miniapp/images/reset.png"></image>
  13 + </view>
  14 + <view class="flex-center" bindtap='pickerShow'>
  15 + <view>筛选</view>
  16 + <view wx:if="{{true}}" class="box"></view>
  17 + </view>
  18 + </view>
  19 + </view>
  20 +
  21 + <!-- 总的服务列表 -->
  22 + <view class="items">
  23 + <!-- 单个 -->
  24 + <view class="item flex-vertical-between" wx:for="{{hist_List}}">
  25 + <!-- left -->
  26 + <view>
  27 + <view class="flex fs28">
  28 + <view class="itemName ellipsis-1">{{item.ServiceName==''?'匿名':item.ServiceName}}</view>
  29 + <block wx:if="{{item.State==1 || item.State==4}}">
  30 + <view>(服务美容师:</view>
  31 + </block>
  32 + <block wx:else>
  33 + <view>(预约美容师:</view>
  34 + </block>
  35 + <view class="itemUsna ellipsis-1">{{item.BeauticianName}}</view>
  36 + )
  37 + </view>
  38 + <view class="fs24">{{item.ArrangeTime}}</view>
  39 + </view>
  40 + <!-- right -->
  41 + <view class="serState fs32">
  42 + <view wx:if="{{item.State==0}}">未服务</view>
  43 + <view wx:if="{{item.State==1}}">已服务</view>
  44 + <view wx:if="{{item.State==2}}">已过期</view>
  45 + <view wx:if="{{item.State==3}}">已取消</view>
  46 + <view wx:if="{{item.State==4}}">已评价</view>
  47 + </view>
  48 + </view>
  49 + <!-- 没有数据 -->
  50 + <!-- 加载完毕并且数据大于=页大小 -->
  51 + <view class="After_all flex-center" wx:if="{{ismore && hist_List.length>=pageSize}}">
  52 + <view class="Line"></view>
  53 + <view class="end fs26 xc-black">到底了</view>
  54 + <view class="Line"></view>
  55 + </view>
  56 + </view>
  57 +</view>
  58 +<view wx:if="{{hist_List.length<1 && startTime!=''}}" class="flex-center fs26 slot">
  59 + <view>该时间段无预约记录</view>
  60 +</view>
  61 +<!-- 无历史服务 -->
  62 +<view class="empty_order" wx:if="{{hist_List.length<1 && is_service_read && startTime==''}}">
  63 + <view class="flex-level">
  64 + <image src="{{iurl}}miniapp/images/yyservice/no_history.png"></image>
  65 + </view>
  66 + <view class="flex-level fs30 xc-ash">暂无服务记录</view>
  67 + <view class="flex-level">
  68 + <navigator url="/pages/user/my_service/i_service">
  69 + <view class="flex-center fs32 white">前往使用</view>
  70 + </navigator>
  71 + </view>
  72 +</view>
  73 +
  74 +
  75 +<!-- 引用时间主键 -->
  76 +<timePicker pickerShow="{{isPickerShow}}" id="picker" wx:if="{{isPickerRender}}" bind:hidePicker="pickerHide" bind:setPickerTime="setPickerTime" config="{{pickerConfig}}"></timePicker>
  77 +<warn id="warn"></warn>
0 \ No newline at end of file 78 \ No newline at end of file
packageA/pages/my_service/hist_service.wxss 0 → 100644
  1 +page {
  2 + height: 100%;
  3 +}
  4 +
  5 +.box {
  6 + width: 0px;
  7 + height: 0px;
  8 + margin-left: 15rpx;
  9 + border-top: 11rpx solid rgba(0, 0, 0, 0);
  10 + border-right: 10rpx solid rgba(0, 0, 0, 0);
  11 + border-left: 10rpx solid rgba(0, 0, 0, 0);
  12 + display: inline-block;
  13 + margin-bottom: 10rpx;
  14 + color: red;
  15 + transform: rotate(0deg);
  16 + border-bottom: 18rpx solid rgb(153, 153, 153);
  17 +}
  18 +
  19 +.exption {
  20 + padding: 0rpx 45rpx;
  21 + background-color: rgb(238, 238, 238);
  22 + height: 70rpx;
  23 + color: rgb(153, 153, 153);
  24 + position: fixed;
  25 + top:0rpx;
  26 + left: 0rpx;
  27 + width: 660rpx;
  28 +}
  29 +
  30 +.count {
  31 + margin: 0rpx 5rpx;
  32 +}
  33 +
  34 +.Resetfram {
  35 + margin-right: 40rpx;
  36 +}
  37 +
  38 +.Reset {
  39 + margin-right: 5rpx;
  40 +}
  41 +
  42 +.Resetsub {
  43 + width: 30rpx;
  44 + height: 30rpx;
  45 +}
  46 +.items{
  47 + margin-top: 70rpx;
  48 +}
  49 +.item {
  50 + margin: 0rpx 25rpx;
  51 + padding: 0rpx 20rpx;
  52 + height: 100rpx;
  53 + border-bottom: 1rpx solid rgb(242, 242, 242);
  54 +}
  55 +
  56 +.itemName {
  57 + margin-right: 10rpx;
  58 + max-width: 130rpx;
  59 +}
  60 +
  61 +.itemUsna {
  62 + max-width: 150rpx;
  63 +}
  64 +
  65 +.serState {
  66 + color: rgb(255, 82, 125);
  67 +}
  68 +
  69 +.container {
  70 + position: fixed;
  71 + width: 100%;
  72 + top: 0rpx;
  73 +}
  74 +
  75 +/* 无历史服务 */
  76 +
  77 +.empty_order {
  78 + height: 100%;
  79 + background-color: rgb(238, 238, 238);
  80 +}
  81 +
  82 +.empty_order image {
  83 + width: 329rpx;
  84 + height: 229rpx;
  85 + margin-top: 202rpx;
  86 +}
  87 +
  88 +.empty_order .xc-ash {
  89 + margin-top: 10rpx;
  90 + font-weight: 600px;
  91 +}
  92 +
  93 +.empty_order navigator {
  94 + margin-top: 65rpx;
  95 + border-radius: 40rpx;
  96 +}
  97 +
  98 +.empty_order navigator view {
  99 + width: 247rpx;
  100 + height: 65rpx;
  101 + background-color: rgb(255, 72, 72);
  102 + border-radius: 40rpx;
  103 +}
  104 +
  105 +.After_all {
  106 + height: 80rpx;
  107 +}
  108 +
  109 +.After_all .Line {
  110 + border-top: 3rpx solid rgb(0, 0, 0);
  111 + width: 130rpx;
  112 +}
  113 +
  114 +.After_all .end {
  115 + margin: 0rpx 15rpx;
  116 +}
  117 +.slot{
  118 + color: rgb(153, 153, 153);
  119 + height:300rpx;
  120 + width:100%;
  121 +}
0 \ No newline at end of file 122 \ No newline at end of file
packageA/pages/my_service/i_service.js 0 → 100644
  1 +var e = getApp(),
  2 + a = e.globalData.setting,
  3 + os = a,
  4 + t = e.request,
  5 + d = e.globalData;
  6 +Page({
  7 +
  8 + /**
  9 + * 页面的初始数据
  10 + */
  11 + data: {
  12 + qr_code_object: {
  13 + val: "12121",
  14 + content: "请将二维码展示给核销员,服务更快捷!"
  15 + },
  16 + iurl: a.imghost,
  17 + defimgurl: "/miniapp/images/yyservice/yyxmdefault.jpg",
  18 + service_List: [], //服务项目列表
  19 + is_service_read: 0,
  20 + curpage: 1, //当前分页数
  21 + pageSize: 10, //页大小
  22 + total: 0,
  23 + ismore: 0, //是否加载完毕
  24 + userinfo: null,
  25 + is_sub: 0, //是否重复提交预约
  26 + },
  27 +
  28 + /**
  29 + * 生命周期函数--监听页面加载
  30 + */
  31 + onLoad: function(options) {
  32 + var userinfo = getApp().globalData.userInfo;
  33 + if (userinfo == null) {
  34 + //界面必须使用warn 做ID,并调用
  35 + return false;
  36 + }
  37 + this.setData({
  38 + userinfo: userinfo
  39 + });
  40 + var th = this;
  41 + th.query_service();
  42 + },
  43 + /**
  44 + * 生命周期函数--监听页面显示
  45 + */
  46 + onShow: function() {
  47 + var th = this;
  48 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  49 + my_confirm.open_cancel(0);
  50 + },
  51 + onReachBottom: function() {
  52 + var th = this;
  53 + if (this.data.total <= th.data.pageSize) return;
  54 + if (this.data.ismore) return;
  55 +
  56 + th.query_service();
  57 + },
  58 + //查询服务项目列表
  59 + query_service: function() {
  60 + wx.showLoading({
  61 + title: '加载中',
  62 + })
  63 + var th = this;
  64 + var url = "/api/weshop/marketing/reservation/sm/page?State=1";
  65 + getApp().request.promiseGet(url, {
  66 + data: {
  67 + storeId: a.stoid,
  68 + userId: d.user_id,
  69 + page: th.data.curpage,
  70 + pageSize: th.data.pageSize
  71 + }
  72 + }).then(res => {
  73 + wx.hideLoading();
  74 + if (res.data.code == 0) {
  75 + th.data.curpage++;
  76 + var arr1 = th.data.service_List;
  77 + var arr2 = res.data.data.pageData;
  78 + var arr3 = [...arr1, ...arr2];
  79 + var ismore = 0;
  80 + if (arr3.length == res.data.data.total) ismore = 1
  81 + th.setData({
  82 + service_List: arr3,
  83 + total: res.data.data.total,
  84 + ismore: ismore,
  85 + is_service_read: 1,
  86 + }),
  87 + wx.stopPullDownRefresh(); //停止下拉刷新
  88 + } else {
  89 + th.setData({
  90 + is_service_read: 1
  91 + })
  92 + }
  93 + })
  94 + },
  95 + /*-- 打开服务项目 --*/
  96 + open_fw: function(e) {
  97 + wx.showLoading({
  98 + title: '加载中',
  99 + })
  100 + var th = this;
  101 + var url = e.currentTarget.dataset.url;
  102 + var service_id = e.currentTarget.dataset.service_id; //服务id
  103 + var project_id = e.currentTarget.dataset.project_id;
  104 + var ind = e.currentTarget.dataset.ind;
  105 + var item = this.data.service_List[ind];
  106 + var ewm = "^" + th.data.userinfo.erpvipid + "|" + item.ProjectID + "|" + item.BuyType + "|TY01|";
  107 + var tt = th.format_time(1);
  108 + ewm = ewm + tt;
  109 + th.data.qr_code_object.val = ewm;
  110 + th.data.qr_code_object.is_fw = 1;
  111 + var qc_com = th.selectComponent("#qc_com"); //组件的id
  112 + getApp().request.promiseGet("/api/weshop/marketing/reservation/reservation/check", {
  113 + data: {
  114 + serviceId: service_id,
  115 + storeId: a.stoid,
  116 + userId: d.user_id
  117 + }
  118 + }).then(res => {
  119 + wx.hideLoading();
  120 + th.setData({
  121 + is_sub: 0
  122 + })
  123 + if (res.data.data != null) {
  124 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  125 + my_confirm.open_cancel(1);
  126 + my_confirm.open(
  127 + "已有预约记录!",
  128 + "预约详情",
  129 + "继续使用",
  130 + function() {
  131 + my_confirm.open_cancel(0);
  132 + var deta_url = "/pages/user/my_service/tment_details?number=" + res.data.data.Number;
  133 + wx.navigateTo({
  134 + url: deta_url
  135 + })
  136 + },
  137 + function() {
  138 + my_confirm.open_cancel(0);
  139 + qc_com.open(th.data.qr_code_object)
  140 + }
  141 +
  142 + )
  143 +
  144 + } else {
  145 + qc_com.open(th.data.qr_code_object)
  146 + }
  147 + })
  148 +
  149 + },
  150 + //图片失败,默认图片
  151 + bind_bnerr1: function(e) {
  152 + var _errImg = e.target.dataset.errorimg;
  153 + var _Img = e.target.dataset.img;
  154 + if (_Img != undefined) {
  155 + var _errObj = {};
  156 + _errObj[_errImg] = "/miniapp/images/no_cate_def.png";
  157 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  158 + }
  159 + },
  160 + format_time: function(isFull) {
  161 + var d = new Date();
  162 + var m = d.getMonth() + 1;
  163 + if (m < 10) m = "0" + m;
  164 + var dd = d.getDate();
  165 + if (dd < 10) dd = "0" + dd;
  166 + var fm = [d.getFullYear(), m, dd].join('-');
  167 + if (isFull == 1)
  168 + fm = fm + ' ' + [d.getHours(), d.getMinutes(), d.getSeconds()].join(':')
  169 + return fm;
  170 + },
  171 + //跳转到首页
  172 + goto: function(e) {
  173 + var url = e.currentTarget.dataset.url;
  174 + getApp().goto(url);
  175 + },
  176 + //校正是否可预约
  177 + correcting: function(e) {
  178 + var th = this;
  179 + wx.showLoading({
  180 + title: '加载中',
  181 + })
  182 + if (th.data.is_sub == 0) {
  183 + th.setData({
  184 + is_sub: 1
  185 + })
  186 + var url = e.currentTarget.dataset.url;
  187 + var service_id = e.currentTarget.dataset.service_id; //服务id
  188 + var project_id = e.currentTarget.dataset.project_id;
  189 + getApp().request.promiseGet("/api/weshop/marketing/reservation/reservation/check", {
  190 + data: {
  191 + serviceId: service_id,
  192 + storeId: a.stoid,
  193 + userId: d.user_id
  194 + }
  195 + }).then(res => {
  196 + wx.hideLoading();
  197 + th.setData({
  198 + is_sub: 0
  199 + })
  200 + if (res.data.code == 0) {
  201 + if (res.data.data != null) {
  202 +
  203 + var number = res.data.data.Number;
  204 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  205 + my_confirm.open_cancel(1);
  206 + my_confirm.open(
  207 + "已有预约记录!",
  208 + "预约详情",
  209 + "继续预约",
  210 + function() {
  211 + my_confirm.open_cancel(0);
  212 + var deta_url = "/pages/user/my_service/tment_details?number=" + number;
  213 + wx.navigateTo({
  214 + url: deta_url
  215 + })
  216 + },
  217 + function() {
  218 + my_confirm.open_cancel(0);
  219 + getApp().request.promiseGet("/api/weshop/marketing/reservation/reservation/sm/check", {
  220 + data: {
  221 + projectId: project_id,
  222 + serviceId: service_id,
  223 + storeId: a.stoid,
  224 + userId: d.user_id
  225 + }
  226 + }).then(res => {
  227 + if (res.data.code == 0) {
  228 + wx.navigateTo({
  229 + url: url
  230 + })
  231 + } else {
  232 + getApp().my_warnning(res.data.msg, 0, th);
  233 + }
  234 + })
  235 + }
  236 + )
  237 + } else {
  238 + wx.navigateTo({
  239 + url: url,
  240 + })
  241 + }
  242 +
  243 + } else {
  244 + getApp().my_warnning(res.data.msg, 0, th);
  245 + }
  246 + })
  247 + }
  248 + },
  249 + //关闭导航
  250 + close: function () {
  251 + var th = this;
  252 + var nav_b = th.selectComponent("#nav_b"); //组件的id
  253 + nav_b.close_box();
  254 + }
  255 +
  256 +})
0 \ No newline at end of file 257 \ No newline at end of file
packageA/pages/my_service/i_service.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "服务项目",
  3 + "usingComponents": {
  4 + "qr_code": "/components/qr_code/qr_code",
  5 + "warn": "/components/long_warn/long_warn",
  6 + "my_confirm": "/components/my_confirm/my_confirm",
  7 + "nav_b": "/components/nav_b/nav_b"
  8 + }
  9 +}
0 \ No newline at end of file 10 \ No newline at end of file
packageA/pages/my_service/i_service.wxml 0 → 100644
  1 +<!-- 背景图片 -->
  2 +<view catchtap="close">
  3 + <image class="backimage" src="{{iurl}}/miniapp/images/yyservice/backimage.png" lazy-load="true"></image>
  4 + <navigator class="History fs26" url="/packageA/pages/service_record/service_record" style="left:10px;right:auto;">服务记录</navigator>
  5 + <navigator class="History fs26" url="/pages/user/my_service/hist_service">历史预约</navigator>
  6 +</view>
  7 +
  8 +<!-- 预约内容 -->
  9 +<!-- 项目框架 -->
  10 +<view class="Serviceitems" catchtap="close">
  11 + <!-- 单个项目 -->
  12 + <view class="rel" wx:for="{{service_List}}">
  13 + <view class="abs">
  14 + <!-- 皇冠log -->
  15 + <block wx:if="{{item.BuyType==4}}">
  16 + <image class="equity_money" src="{{iurl}}/miniapp/images//yyservice/equity.png" lazy-load="true"></image>
  17 + </block>
  18 + <!-- 金钱log -->
  19 + <block wx:if="{{item.BuyType==1 || item.BuyType==2 }}">
  20 + <image class="equity_money" src="{{iurl}}/miniapp/images/yyservice/money.png" lazy-load="true"></image>
  21 + </block>
  22 + <!-- 礼包log -->
  23 + <block wx:if="{{item.BuyType==3}}">
  24 + <image class="equity_money" src="{{iurl}}/miniapp/images/yyservice/giftpackage.png" lazy-load="true"></image>
  25 + </block>
  26 + </view>
  27 + <view>
  28 + <view class="flex-center">
  29 + <image class="itemimage" src="{{item.ImageUrl==''?iurl+defimgurl:item.ImageUrl}}" lazy-load="true" data-errorimg="service_List[{{index}}].ImageUrl" binderror="bind_bnerr1" data-img="{{item.ImageUrl}}"></image>
  30 + </view>
  31 +
  32 + <view class="flex-center itemName">
  33 + <view class="fs32 Name ellipsis-1">{{item.ServiceName}}</view>
  34 + </view>
  35 +
  36 + <view class="flex-center fs24 itemCount">
  37 + <view>剩余次数:</view>
  38 + <view>{{item.ObtainTimes}}</view>
  39 + </view>
  40 +
  41 + <view class="flex-center fs24 itemEffective">
  42 + <view>有效期至</view>
  43 + <view class="Date">{{item.Validay==""?"长期有效":item.Validay}}</view>
  44 + </view>
  45 +
  46 + </view>
  47 +
  48 +
  49 + <view class="flex-center fs28 functionMax">
  50 + <!-- <view class="flex-level Use" bindtap="open_fw" data-ind="{{index}}" data-service_id="{{item.ServiceID}}">
  51 + <view>帮你预约</view>
  52 + </view> -->
  53 + <view class="flex-level btn" data-url="/packageA/pages/my_service/appment_main?service_id={{item.ServiceID}}&BuyType={{item.BuyType}}&ProjectID={{item.ProjectID}}&Validay={{item.Validay}}" bindtap="correcting" data-service_id="{{item.ServiceID}}" data-project_id="{{item.ProjectID}}">
  54 + <view>帮你预约</view>
  55 + </view>
  56 + </view>
  57 +
  58 + <!-- <view class="pd20 t-c fs28 mgt20">
  59 + <text class="btn" bindtap="goto" data-url="/pages/my_service/appment_main">帮你预约</text>
  60 + </view> -->
  61 +
  62 + <!-- <view class="flex-center fs28 functionMax">
  63 + <view class="flex-level Use" bindtap="open_fw" data-ind="{{index}}" data-service_id="{{item.ServiceID}}">
  64 + <view>立即使用</view>
  65 + </view>
  66 + <view wx:if="{{item.State>0}}" class="flex-level appointment yellow-b" data-url="/pages/user/my_service/appment_main?service_id={{item.ServiceID}}&BuyType={{item.BuyType}}&ProjectID={{item.ProjectID}}&Validay={{item.Validay}}" bindtap="correcting" data-service_id="{{item.ServiceID}}" data-project_id="{{item.ProjectID}}">
  67 + <view>预约</view>
  68 + </view>
  69 + </view> -->
  70 + </view>
  71 + <!-- 没有数据 -->
  72 + <!-- 加载完毕并且数据大于=页大小 -->
  73 + <view class="After_all flex-center" wx:if="{{ismore && service_List.length>=6}}">
  74 + <view class="Line"></view>
  75 + <view class="end fs26 xc-black">到底了</view>
  76 + <view class="Line"></view>
  77 + </view>
  78 + <!-- <view class="After_all flex-center" wx:if="{{ismore && service_List.length>=6}}">选择更多服务卡项,</view> -->
  79 +</view>
  80 +<!-- 无服务项目 -->
  81 +<view wx:if="{{service_List.length<1 && is_service_read}}">
  82 + <!-- 遮住 -->
  83 + <view class="cover"></view>
  84 + <!-- 无历史服务 -->
  85 + <view class="empty_order" wx:if="{{true}}">
  86 + <view class="flex-level">
  87 + <image src="{{iurl}}miniapp/images/yyservice/no_history.png"></image>
  88 + </view>
  89 + <!-- <view class="flex-level fs30 xc-ash">暂无服务项目</view> -->
  90 + <view class="flex-level fs30 xc-ash">暂无服务卡项,<text class="ctb" data-url="/packageA/pages/cardList/cardList" bindtap="goto">立即购买!</text></view>
  91 + <view class="flex-level">
  92 + <navigator data-url="/pages/user/index/index" bindtap="goto">
  93 + <view class="flex-center fs28 white">回到首页</view>
  94 + </navigator>
  95 + </view>
  96 + </view>
  97 +</view>
  98 +<!-- 制作一个圆球导航 -->
  99 +<nav_b id="nav_b"></nav_b>
  100 +<!-- 弹出框扫描 -->
  101 +<qr_code id="qc_com"></qr_code>
  102 +<warn id="warn"></warn>
  103 +<my_confirm id="my_confirm"></my_confirm>
0 \ No newline at end of file 104 \ No newline at end of file
packageA/pages/my_service/i_service.wxss 0 → 100644
  1 +page {
  2 + overflow-x: scroll;
  3 +}
  4 +
  5 +/* 背景定位 */
  6 +
  7 +.backimage {
  8 + position: absolute;
  9 + top: 0rpx;
  10 + left: 0rpx;
  11 + z-index: 0;
  12 + width: 100%;
  13 + /* height: 100%; */
  14 +}
  15 +
  16 +/* 历史服务定位 */
  17 +
  18 +.History {
  19 + position: absolute;
  20 + top: 30rpx;
  21 + right: 20rpx;
  22 + z-index: 1;
  23 + color: rgb(255, 255, 255);
  24 +}
  25 +
  26 +.rel {
  27 + background-color: rgb(255, 255, 255);
  28 + width: 350rpx;
  29 + height: 430rpx;
  30 + border-radius: 20rpx;
  31 + display: inline-block;
  32 + margin-right: 15rpx;
  33 + margin-bottom: 20rpx;
  34 + box-shadow: 0rpx 3rpx 3rpx 3rpx rgb(233, 233, 233);
  35 +}
  36 +
  37 +.abs {
  38 + left: 10rpx;
  39 + top: 10rpx;
  40 +}
  41 +
  42 +.equity_money {
  43 + width: 50rpx;
  44 + height: 55rpx;
  45 +}
  46 +
  47 +.Serviceitems {
  48 + position: absolute;
  49 + top: 370rpx;
  50 + left: 0rpx;
  51 + z-index: 2;
  52 + padding-left: 18rpx;
  53 + padding-bottom: 20rpx;
  54 +}
  55 +
  56 +.itemimage {
  57 + width: 120rpx;
  58 + height: 120rpx;
  59 + border-radius: 50%;
  60 + margin-top: 30rpx;
  61 + margin-bottom: 20rpx;
  62 +}
  63 +
  64 +.itemName {
  65 + margin-bottom: 25rpx;
  66 + color: rgb(48, 48, 48);
  67 +}
  68 +
  69 +.itemName .Name {
  70 + max-width: 250rpx;
  71 + text-align: center;
  72 +}
  73 +
  74 +.itemCount {
  75 + margin-bottom: 5rpx;
  76 + color: rgb(177, 177, 177);
  77 + align-items: baseline;
  78 +}
  79 +
  80 +.itemEffective {
  81 + margin-bottom: 30rpx;
  82 + color: rgb(177, 177, 177);
  83 + align-items: baseline;
  84 +}
  85 +
  86 +.functionMax {
  87 + padding: 0rpx 25rpx;
  88 + color: rgb(254, 255, 255);
  89 +}
  90 +
  91 +.Use {
  92 + width: 170rpx;
  93 + height: 50rpx;
  94 + line-height: 50rpx;
  95 + border-radius: 25rpx;
  96 + background-color: red;
  97 +}
  98 +
  99 +.appointment {
  100 + width: 115rpx;
  101 + height: 50rpx;
  102 + line-height: 50rpx;
  103 + border-radius: 25rpx;
  104 + margin-left: 20rpx;
  105 +}
  106 +
  107 +.Date {
  108 + margin-left: 10rpx;
  109 +}
  110 +
  111 +/* 无服务项目 */
  112 +
  113 +.cover {
  114 + position: fixed;
  115 + z-index: 1;
  116 + left: 0rpx;
  117 + top: 390rpx;
  118 + width: 100%;
  119 + height: 200rpx;
  120 + background-color: rgb(255, 255, 255);
  121 +}
  122 +
  123 +/* 无历史服务 */
  124 +
  125 +.empty_order {
  126 + position: fixed;
  127 + left: 0rpx;
  128 + top: 500rpx;
  129 + z-index: 2;
  130 + width: 100%;
  131 +}
  132 +
  133 +.empty_order image {
  134 + width: 329rpx;
  135 + height: 229rpx;
  136 + margin-top: 80rpx;
  137 +}
  138 +
  139 +.empty_order .xc-ash {
  140 + margin-top: 10rpx;
  141 + font-weight: 600px;
  142 +}
  143 +
  144 +.empty_order navigator {
  145 + margin-top: 60rpx;
  146 + border-radius: 40rpx;
  147 +}
  148 +
  149 +.empty_order navigator view {
  150 + width: 247rpx;
  151 + height: 56rpx;
  152 + background-color: rgb(255, 72, 72);
  153 + border-radius: 40rpx;
  154 +}
  155 +
  156 +.After_all {
  157 + height: 80rpx;
  158 +}
  159 +
  160 +.After_all .Line {
  161 + border-top: 3rpx solid rgb(0, 0, 0);
  162 + width: 130rpx;
  163 +}
  164 +
  165 +.After_all .end {
  166 + margin: 0rpx 15rpx;
  167 +}
  168 +
  169 +.btn {
  170 + background-color: red;
  171 + padding: 10rpx 20rpx;
  172 + border-radius: 30rpx;
  173 +}
packageA/pages/my_service/my_service.js 0 → 100644
packageA/pages/my_service/my_service.wxml 0 → 100644
packageA/pages/my_service/tment_details.js 0 → 100644
  1 +var e = getApp(),
  2 + a = e.globalData.setting,
  3 + os = a,
  4 + t = e.request,
  5 + d = e.globalData;
  6 +Page({
  7 +
  8 + /**
  9 + * 页面的初始数据
  10 + */
  11 + data: {
  12 + url: a.url,
  13 + iurl: a.imghost,
  14 + tment_details: [], //预约详情
  15 + number: "", //订单号
  16 + arrangeTime: "", //预约年月日
  17 + day: "", //判断是上午还是下午
  18 + states: 3, //3为取消预约
  19 + },
  20 + //取消预约
  21 + cancel_tment: function(e) {
  22 + var th = this;
  23 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  24 + my_confirm.open(
  25 + "确定取消?",
  26 + "取消",
  27 + "确定",
  28 + function() {
  29 + my_confirm.open_cancel(0);
  30 + },
  31 + function() {
  32 + var index = e.currentTarget.dataset.index;
  33 + var states = th.data.states;
  34 + var tment_details = th.data.tment_details;
  35 + var number = th.data.number;
  36 + var json = {
  37 + "number": number,
  38 + "storeId": a.stoid,
  39 + "states": states
  40 + };
  41 + var data = JSON.stringify(json);
  42 + var url = th.data.url + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址
  43 + wx.request({
  44 + url: url,
  45 + data: data,
  46 + method: 'put',
  47 + header: {
  48 + 'content-type': 'application/json'
  49 + }, // 设置请求的 header
  50 + success: function(res) {
  51 + my_confirm.open_cancel(0);
  52 + if (res.data.code == 0) {
  53 + getApp().my_warnning("取消成功", 1, th);
  54 + var start = 'tment_details[' + 0 + '].State';
  55 + th.setData({
  56 + [start]: 3
  57 + })
  58 + } else {
  59 + getApp().my_warnning(res.data.msg, 0, th);
  60 + }
  61 + }
  62 + })
  63 + }
  64 + );
  65 +
  66 + },
  67 +
  68 + /**
  69 + * 生命周期函数--监听页面加载
  70 + */
  71 + onLoad: function(options) {
  72 + var th = this;
  73 + th.setData({
  74 + number: options.number
  75 + })
  76 + },
  77 + //查询美容师详情
  78 + query_bea: function() {
  79 + var th = this;
  80 + var number = th.data.number;
  81 + var url = "/api/weshop/marketing/reservation/reservation/page";
  82 + getApp().request.promiseGet(url, {
  83 + data: {
  84 + storeId: a.stoid,
  85 + userId: d.user_id,
  86 + number: number
  87 + }
  88 + }).then(res => {
  89 + wx.hideLoading();
  90 + if (res.data.code == 0) {
  91 + var data = res.data.data.pageData;
  92 + var arrangeTime = data[0].ArrangeTime.substring(0, 11);
  93 + var day = data[0].ArrangeTime.substring(11, 16);
  94 + th.setData({
  95 + tment_details: data,
  96 + arrangeTime: arrangeTime,
  97 + day: day
  98 + })
  99 +
  100 + } else {
  101 + getApp().my_warnning(res.data.msg, 0, th);
  102 + }
  103 + })
  104 + },
  105 + //显示核销码
  106 + code_show: function(e) {
  107 + var th = this;
  108 + //--获取成功的时候--
  109 + var no = e.currentTarget.dataset.order_sn;
  110 + var qc_com = th.selectComponent("#qc_com"); //组件的id
  111 + var obj = {
  112 + val: no,
  113 + content: "请将二维码展示给核销员,使用更快捷"
  114 + };
  115 + qc_com.open(obj)
  116 + },
  117 + //跳到首页
  118 + goto: function(e) {
  119 + var th = this;
  120 + wx.navigateTo({
  121 + url: '/pages/index/index/index',
  122 + })
  123 + },
  124 + /**
  125 + * 生命周期函数--监听页面显示
  126 + */
  127 + onShow: function() {
  128 + var th = this;
  129 + th.query_bea();
  130 + },
  131 + //关闭导航
  132 + close: function () {
  133 + var th = this;
  134 + var nav_b = th.selectComponent("#nav_b"); //组件的id
  135 + nav_b.close_box();
  136 + }
  137 +})
0 \ No newline at end of file 138 \ No newline at end of file
packageA/pages/my_service/tment_details.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "预约详情",
  3 + "usingComponents": {
  4 + "qr_code": "/components/qr_code/qr_code",
  5 + "warn": "/components/long_warn/long_warn",
  6 + "my_confirm": "/components/my_confirm/my_confirm",
  7 + "nav_b": "/components/nav_b/nav_b"
  8 + }
  9 +}
0 \ No newline at end of file 10 \ No newline at end of file
packageA/pages/my_service/tment_details.wxml 0 → 100644
  1 +<view class="container" wx:for="{{tment_details}}" wx:if="{{index<1}}" catchtap="close">
  2 + <!-- 预约人的属性 -->
  3 + <view class="Subscriber padding">
  4 + <!-- 状态栏 -->
  5 + <view class="statusBar fs32 flex-vertical-between lf">
  6 + <view>预约状态:</view>
  7 + <view wx:if="{{item.State==0}}">未服务</view>
  8 + <view wx:if="{{item.State==1}}">已服务</view>
  9 + <view wx:if="{{item.State==2}}">已过期</view>
  10 + <view wx:if="{{item.State==3}}">已取消</view>
  11 + <view wx:if="{{item.State==4}}">已评价</view>
  12 + </view>
  13 + <view class="fs30">
  14 + <view class="items lf">
  15 + <!-- 预约订单 -->
  16 + <view class="flex-vertical bmt" bindtap="code_show" data-order_sn="{{number}}" wx:if="{{item.State==0}}">
  17 + <view class="flex-vertical ai-bas">
  18 + <view class="name">预约订单:</view>
  19 + <view class="ellipsis-1 value">{{number}}</view>
  20 + </view>
  21 + <image src="{{iurl}}miniapp/images/order/code.png" class="code"></image>
  22 + </view>
  23 +
  24 + <!-- 预约门店 -->
  25 + <view class="flex-vertical bmt ai-bas">
  26 + <view class="name">预约门店:</view>
  27 + <view class="ellipsis-1 value">{{item.StorageName}}</view>
  28 + </view>
  29 +
  30 + <!-- 预约项目 -->
  31 + <view class="flex-vertical bmt ai-bas">
  32 + <view class="name">预约项目:</view>
  33 + <view class="ellipsis-1 value">{{item.ServiceName}}</view>
  34 + </view>
  35 +
  36 + <!-- 预约时间 -->
  37 + <view class="flex-vertical bmt ai-bas">
  38 + <view class="name">预约时间:</view>
  39 + <view class="date">{{arrangeTime}}</view>
  40 + <view>{{day}}</view>
  41 + </view>
  42 + </view>
  43 + <view class="bt">
  44 +
  45 + <!-- 美容师 -->
  46 + <view class="flex-vertical bmt ai-bas">
  47 + <view class="name flex-vertical-between">
  48 + <block wx:if="{{item.State==1 || item.State==4}}">
  49 + <view>服务美容师:</view>
  50 + </block>
  51 + <block wx:else>
  52 + <view>预约美容师:</view>
  53 + </block>
  54 + </view>
  55 + <view class="ellipsis-1 value">{{item.BeauticianName}}</view>
  56 + </view>
  57 + <!-- 预约人及联系方式 -->
  58 + <!-- 姓名 -->
  59 + <view class="flex-vertical bmt ai-bas">
  60 + <view class="name flex-vertical-between">
  61 + <view>预</view>
  62 + <view>约</view>
  63 + <view>人:</view>
  64 + </view>
  65 + <view class="ellipsis-1 value">{{item.VIPName}}</view>
  66 + </view>
  67 + <!-- 号码 -->
  68 + <view class="flex-vertical ai-bas">
  69 + <view class="name flex-vertical-between">
  70 + <view>手</view>
  71 + <view>机</view>
  72 + <view>号:</view>
  73 + </view>
  74 + <view>{{item.MobileTel}}</view>
  75 + </view>
  76 + </view>
  77 + </view>
  78 +
  79 + </view>
  80 +
  81 + <!-- 温馨提示内容 -->
  82 + <view class="Tips fs30 lf rel padding">
  83 + <!-- 棒槌 -->
  84 + <view class="Stickl abs"></view>
  85 + <view class="Stickl Stickr abs"></view>
  86 +
  87 + <view class="Cozy flex-center" style="background-image: url({{iurl}}/miniapp/images/yyservice/icon.png);">
  88 + <view>温馨提示</view>
  89 + </view>
  90 + <view>1.预约成功后需在指定时间前到达;</view>
  91 + <view>2.如有任何问题可致电咨询;</view>
  92 + <view>3.如需退约,需提前取消。</view>
  93 + </view>
  94 + <!-- submit栏 -->
  95 + <view class="subs flex-vertical-between fs32">
  96 + <!-- 左边栏 -->
  97 + <view class="sub flex-center yellow-b" wx:if="{{item.State==0}}" bindtap="cancel_tment">
  98 + <view class="yellow-b" data-index="{{index}}">取消预约</view>
  99 + </view>
  100 + <navigator wx:if="{{item.State>0}}" class="sub flex-center yellow-b" url="/pages/user/my_service/tment_order_list">
  101 + <view class="yellow-b">我的服务</view>
  102 + </navigator>
  103 + <!-- 右边栏 -->
  104 + <navigator wx:if="{{item.State==0}}" class="sub rb flex-center" url="/pages/user/my_service/beauty_deta?BeauticianID={{item.BeauticianID}}&number={{item.Number}}&itemId={{item.ServiceID}}&modify=1&projectId={{item.ProjectID}}">
  105 + <view>更改时间</view>
  106 + </navigator>
  107 + <navigator wx:if="{{item.State==1}}" class="sub rb flex-center" url="/pages/user/my_service/tment_eval?Number={{item.Number}}&evaluate={{0}}">
  108 + <view>发表评价</view>
  109 + </navigator>
  110 + <navigator wx:if="{{item.State==4}}" class="sub rb flex-center" url="/pages/user/my_service/tment_eval?Number={{item.Number}}&evaluate={{1}}">
  111 + <view>查看评价</view>
  112 + </navigator>
  113 + <navigator wx:if="{{item.State==2 || item.State==3}}" class="sub rb flex-center" url="/pages/user/my_service/appment_main?ProjectID={{item.ProjectID}}&BuyType={{item.BuyType}}&service_id={{item.ServiceID}}">
  114 + <view>重新预约</view>
  115 + </navigator>
  116 +
  117 + </view>
  118 +
  119 +</view>
  120 +
  121 +<!-- 制作一个圆球导航 -->
  122 +<nav_b id="nav_b"></nav_b>
  123 +<my_confirm id="my_confirm"></my_confirm>
  124 +<!-- 弹出框扫描 -->
  125 +<qr_code id="qc_com"></qr_code>
  126 +<warn id="warn"></warn>
0 \ No newline at end of file 127 \ No newline at end of file
packageA/pages/my_service/tment_details.wxss 0 → 100644
  1 +page {
  2 + width: 100%;
  3 + background-color: rgb(238, 238, 238);
  4 +}
  5 +
  6 +/* 公用 */
  7 +
  8 +.lf {
  9 + padding: 0rpx 40rpx;
  10 +}
  11 +
  12 +.bt {
  13 + margin: 0rpx 15rpx;
  14 + padding: 0rpx 25rpx;
  15 + border-top: 2rpx dashed rgb(238, 238, 238);
  16 + padding-top: 50rpx;
  17 + padding-bottom: 50rpx;
  18 +}
  19 +
  20 +.bmt {
  21 + margin-bottom: 35rpx;
  22 +}
  23 +
  24 +.name {
  25 + width: 160rpx;
  26 + margin-right: 25rpx;
  27 +}
  28 +
  29 +.value {
  30 + max-width: 390rpx;
  31 +}
  32 +
  33 +/* 公用 */
  34 +
  35 +.container {
  36 + padding-bottom:70rpx;
  37 +}
  38 +
  39 +.padding{
  40 + margin: 0rpx 20rpx;
  41 +}
  42 +
  43 +.Subscriber {
  44 + overflow: hidden;
  45 + margin-top: 25rpx;
  46 + background-color: rgb(255, 255, 255);
  47 + border-radius: 10rpx;
  48 +}
  49 +
  50 +.statusBar {
  51 + height: 80rpx;
  52 + background-color: rgb(214, 1, 33);
  53 + color: rgb(255, 255, 255);
  54 +}
  55 +
  56 +.date {
  57 + margin-right: 25rpx;
  58 +}
  59 +
  60 +.items {
  61 + margin: 40rpx 0rpx;
  62 +}
  63 +
  64 +.Tips {
  65 + margin-top: 20rpx;
  66 + padding-top: 35rpx;
  67 + height: 255rpx;
  68 + border-radius: 10rpx;
  69 + background-color: rgb(255, 255, 255);
  70 + margin-bottom: 50rpx;
  71 +}
  72 +
  73 +.Cozy {
  74 + width: 165rpx;
  75 + height: 43rpx;
  76 + margin-bottom: 20rpx;
  77 + color: rgb(255, 255, 255);
  78 + background-size: 100%;
  79 +}
  80 +
  81 +.subs {
  82 + width: 710rpx;
  83 + padding: 15rpx 20rpx;
  84 + position: fixed;
  85 + bottom:0rpx;
  86 + background-color: rgb(255,255,255);
  87 +}
  88 +
  89 +.sub {
  90 + width: 325rpx;
  91 + height: 65rpx;
  92 + border-radius: 30rpx;
  93 + color: rgb(255, 255, 255);
  94 +}
  95 +.code{
  96 + margin-left: 10rpx;
  97 + width: 50rpx;
  98 + height: 50rpx;
  99 +}
  100 +.rb {
  101 + background-color: rgb(214, 1, 33);
  102 +}
  103 +
  104 +/* 棒槌 */
  105 +
  106 +.Stickl {
  107 + width: 39rpx;
  108 + height: 10rpx;
  109 + background-color: rgb(153, 153, 153);
  110 + transform: rotate(270deg);
  111 + border-radius: 20rpx;
  112 + left: 95rpx;
  113 + top: -15rpx;
  114 +}
  115 +
  116 +.Stickr {
  117 + left: 590rpx;
  118 +}
packageA/pages/my_service/tment_eval.js 0 → 100644
  1 + var e = getApp(),
  2 + a = e.globalData.setting,
  3 + os = a,
  4 + t = e.request,
  5 + d = e.globalData;
  6 +Page({
  7 +
  8 + /**
  9 + * 页面的初始数据
  10 + */
  11 + data: {
  12 + url: a.url, //接口网址
  13 + iurl: a.imghost,
  14 + defimgurl: "/miniapp/images/no-head.jpg",
  15 + stars_index: -1, //当前点击的星星下标
  16 + labels: [], //星级标签数组
  17 + sub_evaluate: 0, //是否评价成功
  18 + proposal: "", //用户输入的建议
  19 + proposal_size: 100, //评价意见和建议限定字数
  20 + number: "", //订单单号
  21 + beautician: "", //美容师信息
  22 + fromType: "服务评价", //评价来源
  23 + arrangeTime: "", //服务日期
  24 + is_evaluate: 0, //是否评价
  25 + EvaluateDatetime: "", //评价时间
  26 + is_act:0, //是否能购获取图片
  27 + actId:0, //活动ID
  28 + giftBagId:0, //礼包ID
  29 +
  30 + },
  31 + //点击星级
  32 + check_stars: function(e) {
  33 + var th = this;
  34 + var is_evaluate = th.data.is_evaluate; //0可点击
  35 + if (is_evaluate == 0) {
  36 + var index = e.currentTarget.dataset.index;
  37 + var stars_index = th.data.stars_index;
  38 + if (index != stars_index) {
  39 + var url = "/api/weshop/marketing/reservation/star/label/list";
  40 + getApp().request.promiseGet(url, {
  41 + data: {
  42 + Star: index + 1,
  43 + storeId: a.stoid
  44 + }
  45 + }).then(res => {
  46 + if (res.data.code == 0) {
  47 + th.setData({
  48 + labels: res.data.data
  49 + })
  50 + } else {
  51 + getApp().my_warnning(res.data.msg, 0, th);
  52 + return;
  53 + }
  54 + })
  55 + th.setData({
  56 + stars_index: index
  57 + })
  58 + }
  59 + }
  60 + },
  61 + //输入评价意见和建议
  62 + input_proposal: function(e) {
  63 + var th = this;
  64 + var value = e.detail.value;
  65 + th.setData({
  66 + proposal: value
  67 + })
  68 + },
  69 + //图片失败,默认图片
  70 + bind_bnerr1: function (e) {
  71 + var th = this;
  72 + var _errImg = e.target.dataset.errorimg;
  73 + var _Img = e.target.dataset.img;
  74 + if (_Img != undefined) {
  75 + var _errObj = {};
  76 + _errObj[_errImg] = "/miniapp/images/no-head.jpg";
  77 + th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  78 + }
  79 + },
  80 + //选择标签
  81 + check_label: function(e) {
  82 + var th = this;
  83 + var evaluate = th.data.is_evaluate; //0为未评价,未评价才可点击标签
  84 + if (evaluate == 0) {
  85 + var index = e.currentTarget.dataset.index;
  86 + var label_id = th.data.labels[index].check;
  87 + var labels = 'labels[' + index + '].check';
  88 + if (label_id) {
  89 + label_id = 0
  90 + } else {
  91 + label_id = 1
  92 + }
  93 + th.setData({
  94 + [labels]: label_id
  95 + })
  96 + }
  97 + },
  98 + //查询美容师信息
  99 + query_bea: function() {
  100 + var th = this;
  101 + var url = "/api/weshop/marketing/reservation/reservation/page";
  102 + var number = th.data.number; //订单编号
  103 + getApp().request.promiseGet(url, {
  104 + data: {
  105 + storeId: a.stoid,
  106 + userId: d.user_id,
  107 + number: number
  108 + }
  109 + }).then(res => {
  110 + if (res.data.code == 0) {
  111 + var data = res.data.data.pageData;
  112 + var arrangeTime = data[0].ArrangeTime;
  113 + th.setData({
  114 + beautician: data,
  115 + arrangeTime: arrangeTime
  116 + })
  117 + } else {
  118 + getApp().my_warnning(res.data.msg, 0, th);
  119 + }
  120 + })
  121 + },
  122 + //获取预约评价
  123 + evaluate_get: function() {
  124 + var th = this;
  125 + var url = "/api/weshop/evaluation/evaluate/get";
  126 + getApp().request.promiseGet(url, {
  127 + data: {
  128 + number: th.data.number,
  129 + storeId: a.stoid
  130 + }
  131 + }).then(res => {
  132 + if (res.data.code == 0) {
  133 + th.setData({
  134 + stars_index: res.data.data.Star-1,
  135 + labels: res.data.data.EvaluationList,
  136 + proposal: res.data.data.Remark,
  137 + EvaluateDatetime: res.data.data.EvaluateDatetime.substring(0, 19)
  138 + })
  139 + } else {
  140 + getApp().my_warnning(res.data.msg, 0, th);
  141 + }
  142 + })
  143 + },
  144 + //提交评价
  145 + evaluate_save: function() {
  146 + var th = this;
  147 + var stars = th.data.stars_index; //评价星级
  148 + var proposal = th.data.proposal;
  149 + //判断是否评级
  150 + if (stars < 0) {
  151 + getApp().my_warnning("请进行评分", 0, th);
  152 + return false;
  153 + } else if (proposal == "") {
  154 + getApp().my_warnning("给点建议呗", 0, th);
  155 + return false;
  156 + }
  157 + wx.showLoading({
  158 + title: '加载中',
  159 + })
  160 + var labels = th.data.labels; //星级标签数组
  161 + var evaLabList = []; //用户选择的评价标签
  162 + // 查询评价标签
  163 + for (var i = 0; i < labels.length; i++) {
  164 + if (labels[i].check) {
  165 + evaLabList.push(labels[i].LabelName);
  166 + }
  167 + }
  168 + var url = th.data.url + "/api/weshop/evaluation/evaluate/insert";
  169 + var posNo = th.data.number; //收银单号
  170 + var proposal = th.data.proposal; //用户建议内容
  171 + var fromType = th.data.fromType; //评价来源
  172 + var json = {
  173 + "evaLabList": evaLabList,
  174 + "fromType": 2,
  175 + "number": posNo,
  176 + "remark": proposal,
  177 + "star": stars + 1,
  178 + "storeId": a.stoid
  179 + };
  180 + var data = JSON.stringify(json); //转换成json格式
  181 + wx.request({
  182 + url: url,
  183 + data: data,
  184 + method: 'POST',
  185 + header: {
  186 + 'content-type': 'application/json'
  187 + }, // 设置请求的 header
  188 + success: function(res) {
  189 + wx.hideLoading();
  190 + if (res.data.code == 0) {
  191 + getApp().my_warnning("评价成功", 1, th);
  192 + var namber=th.data.number;
  193 + setTimeout(function() {
  194 + wx.redirectTo({
  195 + url: "/pages/user/my_service/tment_eval?Number="+namber+"&evaluate="+1
  196 + });
  197 + }, 2000);
  198 + } else {
  199 + getApp().my_warnning(res.data.msg, 0, th);
  200 + }
  201 + }
  202 + })
  203 +
  204 + },
  205 + //图片失败,默认图片
  206 + bind_bnerr1: function(e) {
  207 + var th = this;
  208 + var _errImg = e.target.dataset.errorimg;
  209 + var _Img = e.target.dataset.img;
  210 + if (_Img != undefined) {
  211 +
  212 + var _errObj = {};
  213 + _errObj[_errImg] = th.data.iurl+"/miniapp/images/no-head.jpg";
  214 + th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  215 + }
  216 + },
  217 + /**
  218 + * 生命周期函数--监听页面加载
  219 + */
  220 + onLoad: function(options) {
  221 + var th = this;
  222 + th.setData({
  223 + number: options.Number,
  224 + is_evaluate: options.evaluate
  225 + })
  226 + th.query_bea();
  227 + th.judge_act();
  228 + },
  229 +
  230 + /**
  231 + * 生命周期函数--监听页面显示
  232 + */
  233 + onShow: function() {
  234 + var th = this;
  235 + var is_evaluate = th.data.is_evaluate;
  236 + if (is_evaluate == 1) {
  237 + th.evaluate_get();
  238 + }
  239 + },
  240 + //评价其他跳转
  241 + evaluate_qt:function(){
  242 +
  243 + wx.redirectTo({
  244 + url: "/pages/user/my_service/tment_order_list?state="+2
  245 + });
  246 + },
  247 + //点击领取礼包
  248 + clike_lb:function(){
  249 +
  250 + var id=this.data.actId;
  251 + var gifbagid = this.data.gifbagid;
  252 + console.log(id,"订单", this.data.number),
  253 + wx.redirectTo({
  254 + url: "/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType=2&orderNumber="+this.data.number
  255 + });
  256 +
  257 + },
  258 +
  259 + //--评价有礼判断---
  260 + judge_act: function () {
  261 + var th = this;
  262 + var url = "/api/weshop/marketing/comment/act/judge";
  263 + getApp().request.promiseGet(url, {
  264 + data: {
  265 + orderNumber: th.data.number,
  266 + orderType: 2,
  267 + storeId: a.stoid,
  268 + userId: d.user_id
  269 + }
  270 + }).then(res => {
  271 + if (res.data.code == 0) {
  272 + var id = res.data.data.id;
  273 + var giftbagid = res.data.data.giftbagid;
  274 + th.setData({
  275 + is_act: 1,
  276 + actId: id,
  277 + giftBagId: giftbagid
  278 + })
  279 + } else{
  280 + th.setData({
  281 + is_act:0
  282 + })
  283 + }
  284 + })
  285 + },
  286 +
  287 +})
0 \ No newline at end of file 288 \ No newline at end of file
packageA/pages/my_service/tment_eval.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "预约评价",
  3 + "usingComponents": {
  4 + "qr_code": "/components/qr_code/qr_code",
  5 + "warn": "/components/long_warn/long_warn"
  6 + }
  7 +}
0 \ No newline at end of file 8 \ No newline at end of file
packageA/pages/my_service/tment_eval.wxml 0 → 100644
  1 +<view class="container" wx:for="{{beautician}}" wx:if="{{index<1}}" wx:for-item="it">
  2 +
  3 + <!-- 头像 -->
  4 + <view class="flex-center head">
  5 +
  6 + <image class="headimg" src="{{it.PhotoUrl==''?iurl+defimgurl:it.PhotoUrl}}" lazy-load="true" data-errorimg="beautician[{{index}}].PhotoUrl" binderror="bind_bnerr1" data-img="beautician[{{index}}].PhotoUrl"></image>
  7 + </view>
  8 +
  9 + <!-- 姓名 -->
  10 + <view class="flex-level item">
  11 + <view class="itemlf flex-level-right">
  12 + <view class="fs32">服务美容师:</view>
  13 + </view>
  14 + <view class="itemlr fs30 ellipsis-1">{{it.BeauticianName}}</view>
  15 + </view>
  16 +
  17 + <!-- 项目 -->
  18 + <view class="flex-center item">
  19 + <view class="itemlf fs32 flex-level-right">服务项目:</view>
  20 + <view class="itemlr fs30 ellipsis-1">{{it.ServiceName}}</view>
  21 + </view>
  22 +
  23 + <!-- 时间 -->
  24 + <view class="flex-center item">
  25 + <view class="itemlf fs32 flex-level-right">服务时间:</view>
  26 + <view class="itemlr fs30">{{it.WriteTime}}</view>
  27 + </view>
  28 +
  29 + <!-- 评价时间 -->
  30 + <view class="flex-center" wx:if="{{is_evaluate==1}}">
  31 + <view class="itemlf fs32 flex-level-right">评价时间:</view>
  32 + <view class="itemlr fs30">{{EvaluateDatetime}}</view>
  33 + </view>
  34 +
  35 + <!-- 设置虚线 -->
  36 +
  37 + <view class="flex-center">
  38 + <view class="starss">
  39 + <image class="stars" src="{{iurl}}{{key<=stars_index?'/miniapp/images/StarsredCk.png':'/miniapp/images/StarswhiteUnCk.png'}}" wx:for="{{5}}" bindtap="check_stars" data-index="{{key}}" wx:for-index="key"></image>
  40 + </view>
  41 + </view>
  42 + <view class="tea_labs">
  43 + <view class="flex-center fs26">
  44 + <block wx:if="{{is_evaluate==0}}">
  45 + <textarea class="rel textarea" placeholder="写其他意见和建议" placeholder-class="fs24" maxlength="{{proposal_size}}" bindinput="input_proposal" value="{{proposal}}">
  46 + <!-- 提示已输入多少数字 -->
  47 + <view if="{{is_evaluate==0}}" class="proposal abs">{{proposal.length}}/{{proposal_size}}</view>
  48 + </textarea>
  49 + </block>
  50 + <block wx:else>
  51 + <view wx:if="{{proposal!=''}}" class="textarea">
  52 + {{proposal}}
  53 + </view>
  54 + </block>
  55 + </view>
  56 +
  57 + <view wx:if="{{labels.length>0 && is_evaluate==0}}" class="labels flex fs24 ellipsis-3">
  58 + <view class="label {{item.check==1?'checklabel':''}} flex-center" wx:for="{{labels}}" bindtap="check_label" data-index="{{key}}" wx:for-index="key">
  59 + <view class="ellipsis-1">{{item.LabelName}}</view>
  60 + </view>
  61 +
  62 + </view>
  63 + <view wx:if="{{labels.length>0 && is_evaluate==1}}" class="{{labels.length==1 || labels.length==2?'flex-center':''}}" style="width:100%;">
  64 + <view class="labels flex fs24 ellipsis-3">
  65 + <view class="label checklabel flex-center" wx:for="{{labels}}" bindtap="check_label" data-index="{{key}}" wx:for-index="key">
  66 + <view class="ellipsis-1">{{item.LabelName}}</view>
  67 + </view>
  68 +
  69 + </view>
  70 + </view>
  71 +
  72 + </view>
  73 +
  74 + <view wx:if="{{is_evaluate==0}}" class="feedback flex-center fs28">
  75 + <view>满意的话请打五星噢,谢谢您的支持!</view>
  76 + </view>
  77 +
  78 + <block wx:if="{{sub_evaluate}}">
  79 + <view class="subSuccess">
  80 + <view class="flex-center">
  81 + <image class="Success" src="{{iurl}}/miniapp/images/yyservice/Success.png"></image>
  82 + </view>
  83 + <view class="fs36 flex-center">
  84 + <view>评价成功</view>
  85 + </view>
  86 + </view>
  87 + </block>
  88 +</view>
  89 +<navigator wx:if="{{is_evaluate==0}}" class="Subs fs32 flex-center">
  90 + <view class="Submission flex-center" bindtap="evaluate_save">
  91 + <view>确认提交</view>
  92 + </view>
  93 +</navigator>
  94 +<view wx:else>
  95 +
  96 +
  97 +<view style="margin: auto;margin-bottom: 30rpx;" class="Submission flex-center" bindtap="evaluate_qt">
  98 + <view>评价其他</view>
  99 + </view>
  100 +
  101 + <view wx:if="{{is_act==1}}" style="margin: auto;margin-bottom: 30rpx;" class="Submission flex-center yellow-b" bindtap="clike_lb">
  102 + <view>点击领取礼品</view>
  103 + </view>
  104 + </view>
  105 +<warn id="warn"></warn>
0 \ No newline at end of file 106 \ No newline at end of file
packageA/pages/my_service/tment_eval.wxss 0 → 100644
  1 +.container {
  2 + border-top: 7rpx solid rgb(245, 245, 245);
  3 + padding-bottom: 100rpx;
  4 + background-color: rgb(255, 255, 255);
  5 +}
  6 +
  7 +.head {
  8 + height: 270rpx;
  9 +}
  10 +
  11 +.headimg {
  12 + width: 190rpx;
  13 + height: 190rpx;
  14 + border-radius: 50%;
  15 +}
  16 +
  17 +.item {
  18 + margin-bottom: 20rpx;
  19 +}
  20 +
  21 +.itemlf {
  22 + width: 195rpx;
  23 +}
  24 +
  25 +.itemlr {
  26 + width: 360rpx;
  27 +}
  28 +
  29 +.starss {
  30 + margin-top: 15rpx;
  31 + border-top: 3rpx dashed rgb(203, 203, 203);
  32 + padding-top: 25rpx;
  33 + padding-left: 15rpx;
  34 +}
  35 +
  36 +.stars {
  37 + width: 50rpx;
  38 + height: 50rpx;
  39 + margin-right: 20rpx;
  40 +}
  41 +
  42 +.datetime {
  43 + width: 190rpx;
  44 +}
  45 +
  46 +.tea_labs {
  47 + padding: 0rpx 56rpx;
  48 + margin-top: 20rpx;
  49 +}
  50 +
  51 +.proposal {
  52 + right: 20rpx;
  53 + bottom: 20rpx;
  54 + color: rgb(152, 152, 152);
  55 +}
  56 +
  57 +.textarea {
  58 + width: 100%;
  59 + height: 200rpx;
  60 + margin-top: 70rpx;
  61 + border: 2rpx solid rgb(203, 203, 203);
  62 + border-radius: 13rpx;
  63 + padding-top: 25rpx;
  64 + padding-left: 30rpx;
  65 + margin-bottom: 30rpx;
  66 + padding-right: 15rpx;
  67 + padding-bottom: 20rpx;
  68 +}
  69 +
  70 +.labels {
  71 + display: inline-block;
  72 + max-height: 240rxp;
  73 + line-height: 50rpx;
  74 + padding-left: 15rpx;
  75 +}
  76 +
  77 +.label {
  78 + padding: 0rpx 10rpx;
  79 + height: 48rpx;
  80 + line-height: 48rpx;
  81 + border: 2rpx solid rgb(218, 218, 218);
  82 + color: rgb(152, 152, 152);
  83 + border-radius: 5rpx;
  84 + margin-right: 20rpx;
  85 + width: 165rpx;
  86 + display: inline-block;
  87 + text-align: center;
  88 + margin-bottom: 10rpx;
  89 +}
  90 +
  91 +/* 选择标签的样式 */
  92 +
  93 +.checklabel {
  94 + border: 2rpx solid rgb(214, 1, 33);
  95 + background-color: rgb(255, 231, 235);
  96 + color: rgb(214, 1, 33);
  97 +}
  98 +
  99 +.feedback {
  100 + color: rgb(152, 152, 152);
  101 + margin-bottom: 70rpx;
  102 +}
  103 +
  104 +.Subs {
  105 + background-color: rgb(255, 255, 255);
  106 + position: fixed;
  107 + width: 100%;
  108 + bottom: 40rpx;
  109 +}
  110 +
  111 +.Submission {
  112 + width: 400rpx;
  113 + height: 65rpx;
  114 + border-radius: 60rpx;
  115 + background-color: rgb(214, 1, 33);
  116 + color: rgb(255, 255, 255);
  117 +}
  118 +.Submission.yellow-b{
  119 + background-color: #ffb03f;
  120 +
  121 +}
  122 +
  123 +.clonri {
  124 + margin: 0rpx;
  125 +}
  126 +
  127 +.subSuccess {
  128 + position: fixed;
  129 + z-index: 3;
  130 + top: 435rpx;
  131 + left: 66rpx;
  132 + background-color: #a6a6a6a4;
  133 + width: 615rpx;
  134 + height: 315rpx;
  135 + border-radius: 20rpx;
  136 + color: rgb(255, 255, 255);
  137 +}
  138 +
  139 +.Success {
  140 + width: 110rpx;
  141 + height: 110rpx;
  142 + margin-top: 50rpx;
  143 + margin-bottom: 45rpx;
  144 +}
packageA/pages/my_service/tment_order_list.js 0 → 100644
  1 +var e = getApp(),
  2 + a = e.globalData.setting,
  3 + os = a,
  4 + t = e.request,
  5 + d = e.globalData;
  6 +Page({
  7 +
  8 + /**
  9 + * 页面的初始数据
  10 + */
  11 + data: {
  12 + url: a.url, //接口网址
  13 + iurl: a.imghost, //图片网址
  14 + activeCategoryId: 0, //类别选中下标
  15 + defimgurl: "/miniapp/images/yyservice/yyxmdefault.jpg",
  16 + categories: [{
  17 + name: "全部",
  18 + id: 0
  19 + }, {
  20 + name: "未服务",
  21 + id: 1
  22 + }, {
  23 + name: "已服务",
  24 + id: 2
  25 + }, {
  26 + name: "已过期",
  27 + id: 3
  28 + }],
  29 + tm_order_list: [], //我的预约订单列表
  30 + curpage: 1, //当前分页数
  31 + pageSize: 10, //页大小
  32 + total: 0,
  33 + ismore: 0, //是否加载完毕
  34 + is_read: 0, //是否加载接口
  35 + states: 4, //4为取消预约
  36 + },
  37 +
  38 + /**
  39 + * 生命周期函数--监听页面加载
  40 + */
  41 + onLoad: function(options) {
  42 + var state=options.state;
  43 + if (state != null && state != undefined && state!=""){
  44 + this.setData({ activeCategoryId: state });
  45 + }
  46 +
  47 + },
  48 + changeTab: function(e) {
  49 + var th = this;
  50 + var id = e.currentTarget.dataset.id;
  51 + var activeCategoryId = th.data.activeCategoryId;
  52 + if (id != activeCategoryId) {
  53 + th.setData({
  54 + activeCategoryId: id,
  55 + tm_order_list: [],
  56 + curpage: 1,
  57 + ismore: 0,
  58 + is_read: 0
  59 + })
  60 + th.query_orderList();
  61 + } else {
  62 + return false;
  63 + }
  64 + },
  65 + //显示核销码
  66 + code_show: function(e) {
  67 + var th = this;
  68 + //--获取成功的时候--
  69 + var no = e.currentTarget.dataset.order_sn;
  70 + var qc_com = th.selectComponent("#qc_com"); //组件的id
  71 + var obj = {
  72 + val: no,
  73 + content: "请将二维码展示给核销员,使用更快捷"
  74 + };
  75 + qc_com.open(obj)
  76 + },
  77 + query_orderList: function() {
  78 + wx.showLoading({
  79 + title: '加载中',
  80 + })
  81 + var th = this;
  82 + var url = "/api/weshop/marketing/reservation/reservation/page";
  83 +
  84 + var state_index = th.data.activeCategoryId;
  85 + if (state_index == 0) {
  86 + state_index = "";
  87 + } else {
  88 + --state_index;
  89 + }
  90 + th.setData({
  91 + is_read: 0
  92 + })
  93 + getApp().request.promiseGet(url, {
  94 + data: {
  95 + storeId: a.stoid,
  96 + userId: d.user_id,
  97 + state: state_index,
  98 + page: th.data.curpage,
  99 + pageSize: th.data.pageSize
  100 + }
  101 + }).then(res => {
  102 + wx.hideLoading();
  103 + if (res.data.code == 0) {
  104 + th.data.curpage++;
  105 + var arr1 = th.data.tm_order_list;
  106 + var arr2 = res.data.data.pageData;
  107 + var arr3 = [...arr1, ...arr2];
  108 + for(var i = 0;i<arr3.length;i++){
  109 + arr3[i].ArrangeTime = arr3[i].ArrangeTime.substring(0, 16);
  110 + }
  111 + var ismore = 0;
  112 + if (arr3.length == res.data.data.total) ismore = 1
  113 + th.setData({
  114 + tm_order_list: arr3,
  115 + total: res.data.data.total,
  116 + ismore: ismore,
  117 + is_read: 1
  118 + }), wx.stopPullDownRefresh(); //停止下拉刷新 {
  119 + } else {
  120 + wx.hideLoading();
  121 + th.setData({
  122 + tm_order_list: [],
  123 + is_read: 1
  124 + })
  125 + }
  126 + })
  127 +
  128 + },
  129 + //取消预约
  130 + cancel_tment: function(e) {
  131 + var th = this;
  132 + var th = this;
  133 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  134 + my_confirm.open(
  135 + "确定取消?",
  136 + "取消",
  137 + "确定",
  138 + function() {
  139 + my_confirm.open_cancel(0);
  140 + },
  141 + function() {
  142 + my_confirm.open_cancel(0);
  143 + var index = e.currentTarget.dataset.index;
  144 + var states = th.data.states;
  145 + var order_list = th.data.tm_order_list;
  146 + var number = order_list[index].Number;
  147 + var json = {
  148 + "number": number,
  149 + "storeId": a.stoid,
  150 + "states": 3
  151 + };
  152 + var data = JSON.stringify(json);
  153 + var url = th.data.url + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址
  154 + wx.request({
  155 + url: url,
  156 + data: data,
  157 + method: 'put',
  158 + header: {
  159 + 'content-type': 'application/json'
  160 + }, // 设置请求的 header
  161 + success: function(res) {
  162 + if (res.data.code == 0) {
  163 + getApp().my_warnning("取消成功", 1, th);
  164 + var id = th.data.activeCategoryId;
  165 + if (id == 1) {
  166 + order_list.splice(index, 1);
  167 + th.setData({
  168 + tm_order_list: order_list
  169 + })
  170 + } else {
  171 + var start = 'tm_order_list[' + index + '].State';
  172 + th.setData({
  173 + [start]: 3
  174 + })
  175 + }
  176 + wx.stopPullDownRefresh(); //停止下拉刷新
  177 + } else {
  178 + getApp().my_warnning(res.data.msg, 0, th);
  179 + }
  180 + }
  181 + })
  182 + })
  183 +
  184 + },
  185 + //图片失败,默认图片
  186 + bind_bnerr1: function(e) {
  187 + var _errImg = e.target.dataset.errorimg;
  188 + var _Img = e.target.dataset.img;
  189 + if (_Img != undefined) {
  190 + var _errObj = {};
  191 + _errObj[_errImg] = "/miniapp/images/no_cate_def.png";
  192 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  193 + }
  194 + },
  195 + /**
  196 + * 生命周期函数--监听页面显示
  197 + */
  198 + onShow: function() {
  199 + var th = this;
  200 + th.setData({
  201 + curpage: 1,
  202 + total: 0,
  203 + ismore: 0,
  204 + is_read: 0,
  205 + tm_order_list: []
  206 + })
  207 + th.query_orderList();
  208 + },
  209 +
  210 + /**
  211 + * 页面上拉触底事件的处理函数
  212 + */
  213 + onReachBottom: function() {
  214 + var th = this;
  215 + if (th.data.total <= th.data.pageSize) return;
  216 + if (th.data.ismore) return;
  217 +
  218 + wx.showLoading({
  219 + title: '加载中...',
  220 + })
  221 + th.query_orderList();
  222 + },
  223 + //关闭导航
  224 + close: function() {
  225 + var th = this;
  226 + var nav_b = th.selectComponent("#nav_b"); //组件的id
  227 + nav_b.close_box();
  228 + }
  229 +
  230 +})
0 \ No newline at end of file 231 \ No newline at end of file
packageA/pages/my_service/tment_order_list.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "我的预约",
  3 + "usingComponents": {
  4 + "qr_code": "/components/qr_code/qr_code",
  5 + "warn": "/components/long_warn/long_warn",
  6 + "my_confirm": "/components/my_confirm/my_confirm",
  7 + "nav_b": "/components/nav_b/nav_b"
  8 + }
  9 +}
0 \ No newline at end of file 10 \ No newline at end of file
packageA/pages/my_service/tment_order_list.wxml 0 → 100644
  1 +<view class="container" catchtap="close">
  2 + <!-- 导航栏 -->
  3 + <view class="type-navbar padding flex-vertical fs30">
  4 + <view class="type-box flex-center {{activeCategoryId==item.id?'chtypebox':''}}" wx:for="{{categories}}" bindtap="changeTab" data-id="{{item.id}}">
  5 + <view>{{item.name}}</view>
  6 + </view>
  7 + </view>
  8 + <view class="itemMax">
  9 + <!-- 预约项目 -->
  10 + <view wx:for="{{tm_order_list}}">
  11 + <!-- 商品编号和状态 -->
  12 + <view class="Commodity_number flex-vertical-between fs26 padding">
  13 + <!--商品编号 -->
  14 + <text class="order_number ellipsis-1" selectable='true'>订单编号:{{item.Number}}</text>
  15 + <!-- 订单状态 -->
  16 + <view class="flex-center state">
  17 + <view wx:if="{{item.State==0}}">未服务</view>
  18 + <view wx:if="{{item.State==1}}">已服务</view>
  19 + <view wx:if="{{item.State==2}}">已过期</view>
  20 + <view wx:if="{{item.State==3}}">已取消</view>
  21 + <view wx:if="{{item.State==4}}">已评价</view>
  22 + </view>
  23 + </view>
  24 +
  25 + <!-- 项目属性 -->
  26 + <navigator class="items padding flex-vertical" url="/pages/user/my_service/tment_details?number={{item.Number}}">
  27 +
  28 + <view class="flex-center fs26">
  29 + <view class="itemimage">
  30 + <image class="itemimage" src="{{item.ImageUrl==''?iurl+defimgurl:item.ImageUrl}}" lazy-load="true" data-errorimg="tm_order_list[{{index}}].ImageUrl" binderror="bind_bnerr1" data-img="{{item.ImageUrl}}"></image>
  31 + </view>
  32 + <!-- 项目内容 -->
  33 + <view class="details">
  34 + <view class="item flex-vertical base">
  35 + <view class="itemname flex-level-right">预约门店:</view>
  36 + <view class="itemvalue ellipsis-1">{{item.StorageName}}</view>
  37 + </view>
  38 + <view class="item flex-vertical base">
  39 + <view class="itemname flex-level-right">预约项目:</view>
  40 + <view class="itemvalue ellipsis-1">{{item.ServiceName}}</view>
  41 + </view>
  42 + <view class="item flex-vertical base">
  43 + <block wx:if="{{item.State==1 || item.State==4}}">
  44 + <view class="itemname flex-level-right">服务美容师:
  45 + </view>
  46 + </block>
  47 + <block wx:else>
  48 + <view class="itemname flex-level-right">预约美容师:
  49 + </view>
  50 + </block>
  51 + <view class="itemvalue ellipsis-1">{{item.BeauticianName}}</view>
  52 + </view>
  53 + <view class="item flex-vertical base">
  54 + <view class="itemname flex-level-right">预约时间:</view>
  55 + <view>{{item.ArrangeTime}}</view>
  56 + </view>
  57 + <view class="item flex-vertical base" wx:if="{{item.WriteTime==''?false:true}}">
  58 + <view class="itemname flex-level-right">服务时间:</view>
  59 + <view>{{item.WriteTime}}</view>
  60 + </view>
  61 + </view>
  62 +
  63 + </view>
  64 + </navigator>
  65 + <view class="Unim flex-right-vertical fs26 padding">
  66 + <image wx:if="{{item.State==0}}" src="{{iurl}}miniapp/images/order/code.png" class="code" bindtap="code_show" data-order_sn="{{item.Number}}"></image>
  67 + <block wx:if="{{item.State==0}}">
  68 + <view class="Unimportance flex-level" data-index="{{index}}" bindtap="cancel_tment">取消预约</view>
  69 + </block>
  70 + <block wx:else>
  71 + <navigator url="/pages/user/my_service/tment_details?number={{item.Number}}" class="Unimportance flex-level">查看详情</navigator>
  72 + </block>
  73 + <navigator wx:if="{{item.State==0}}" class="important Unimportance flex-level" url="/pages/user/my_service/beauty_deta?BeauticianID={{item.BeauticianID}}&number={{item.Number}}&itemId={{item.ServiceID}}&modify=1&projectId={{item.ProjectID}}">更改时间</navigator>
  74 + <navigator wx:if="{{item.State==1}}" url="/pages/user/my_service/tment_eval?Number={{item.Number}}&evaluate={{0}}" class="important Unimportance flex-level">发表评价</navigator>
  75 + <navigator wx:if="{{item.State==2 || item.State==3}}" url="/pages/user/my_service/appment_main?ProjectID={{item.ProjectID}}&BuyType={{item.BuyType}}&service_id={{item.ServiceID}}" class="important Unimportance flex-level">重新预约</navigator>
  76 + <navigator wx:if="{{item.State==4}}" url="/pages/user/my_service/tment_eval?Number={{item.Number}}&evaluate={{1}}" class="important Unimportance flex-level">评价详情</navigator>
  77 + </view>
  78 + </view>
  79 + <view class="exactly flex-center fs26" wx:if="{{ismore && tm_order_list.length>=3}}">
  80 + <view class="line"></view>
  81 + <view class="exactly_text">到底了</view>
  82 + <view class="line"></view>
  83 + </view>
  84 + </view>
  85 +</view>
  86 +
  87 +<!-- 无预约订单 -->
  88 +<view class="empty_order" wx:if="{{tm_order_list.length<1 && is_read}}" catchtap="close">
  89 + <view class="flex-level">
  90 + <image src="{{iurl}}miniapp/images/order/empty_order.png" lazy-load="true"></image>
  91 + </view>
  92 + <view class="flex-level fs30 xc-ash">无预约记录</view>
  93 + <view class="flex-level">
  94 + <navigator url="/pages/user/my_service/i_service" bindtap="goto">
  95 + <view class="flex-center fs32 white">立即预约</view>
  96 + </navigator>
  97 + </view>
  98 +</view>
  99 +<my_confirm id="my_confirm"></my_confirm>
  100 +<!-- 制作一个圆球导航 -->
  101 +<nav_b id="nav_b"></nav_b>
  102 +<!-- 弹出框扫描 -->
  103 +<qr_code id="qc_com"></qr_code>
  104 +<warn id="warn"></warn>
0 \ No newline at end of file 105 \ No newline at end of file
packageA/pages/my_service/tment_order_list.wxss 0 → 100644
  1 +page {
  2 + height: 100%;
  3 +}
  4 +
  5 +.container {
  6 + background-color: rgb(255, 255, 255);
  7 +}
  8 +
  9 +.type-navbar {
  10 + border-top: 3rpx solid rgb(221, 221, 221);
  11 + display: flex;
  12 + justify-content: space-between;
  13 + position: fixed;
  14 + background-color: rgb(255,255,255);
  15 + width:696rpx;
  16 +}
  17 +.itemMax{
  18 + margin-top: 93rpx;
  19 +}
  20 +
  21 +.type-box {
  22 + height: 88rpx;
  23 + line-height: 88rpx;
  24 + padding: 0rpx 15rpx;
  25 + border-bottom: 5rpx solid rgb(255, 255, 255);
  26 +}
  27 +
  28 +.chtypebox {
  29 + border-bottom: 5rpx solid rgb(224, 18, 18);
  30 +}
  31 +
  32 +.Commodity_number {
  33 + height: 80rpx;
  34 + border-top: 13rpx solid rgb(245, 245, 245);
  35 +}
  36 +
  37 +.Commodity_number image {
  38 + width: 30rpx;
  39 + height: 32rpx;
  40 +}
  41 +
  42 +.padding {
  43 + padding: 0rpx 27rpx;
  44 +}
  45 +
  46 +.lin {
  47 + border-left: 2rpx solid rgb(211, 29, 54);
  48 + margin-left: 17rpx;
  49 + margin-right: 14rpx;
  50 + height: 40rpx;
  51 +}
  52 +
  53 +.order_number {
  54 + max-width: 550rpx;
  55 +}
  56 +.state{
  57 + color: rgb(216,63,82);
  58 +}
  59 +.items {
  60 + border-top: 4rpx solid rgb(245, 245, 245);
  61 + border-bottom: 4rpx solid rgb(245, 245, 245);
  62 + height: 260rpx;
  63 +}
  64 +.code{
  65 + width: 55rpx;
  66 + height: 55rpx;
  67 +}
  68 +.itemimage {
  69 + width: 190rpx;
  70 + height: 190rpx;
  71 + margin-right: 20rpx;
  72 + border-radius: 50%;
  73 + border: 1px solid #eee;
  74 +}
  75 +
  76 +.details {
  77 + height: 190rpx;
  78 +}
  79 +
  80 +.itemname {
  81 + width: 150rpx;
  82 + margin-right: 20rpx;
  83 +}
  84 +
  85 +.itemvalue {
  86 + max-width: 300rpx;
  87 +}
  88 +
  89 +.Unimportance {
  90 + width: 140rpx;
  91 + height: 40rpx;
  92 + line-height: 40rpx;
  93 + border-radius: 8rpx;
  94 + background-color: rgb(255, 255, 255);
  95 + margin-left: 20rpx;
  96 + border: 2rpx solid rgb(191, 191, 191);
  97 +}
  98 +
  99 +.important {
  100 + background-color: rgb(212, 28, 52);
  101 + border: 2rpx solid rgb(212, 28, 52);
  102 + color: rgb(255, 255, 255);
  103 +}
  104 +
  105 +.Unim {
  106 + height: 110rpx;
  107 +}
  108 +
  109 +.exactly {
  110 + height: 80rpx;
  111 + background-color: rgb(245, 245, 245);
  112 +}
  113 +
  114 +.exactly_text {
  115 + margin: 0rpx 15rpx;
  116 +}
  117 +
  118 +.line {
  119 + border-top: 2rpx solid rgb(0, 0, 0);
  120 + width: 130rpx;
  121 +}
  122 +
  123 +/* 无预约 */
  124 +
  125 +.empty_order image {
  126 + width: 300rpx;
  127 + height: 280rpx;
  128 + margin-top: 202rpx;
  129 +}
  130 +
  131 +.empty_order .xc-ash {
  132 + margin-top: 10rpx;
  133 + font-weight: 600px;
  134 +}
  135 +
  136 +.empty_order navigator {
  137 + margin-top: 60rpx;
  138 + border-radius: 40rpx;
  139 +}
  140 +
  141 +.empty_order navigator view {
  142 + width: 247rpx;
  143 + height: 65rpx;
  144 + background-color: rgb(255, 72, 72);
  145 + border-radius: 40rpx;
  146 +}
  147 +.base{
  148 + display: flex;
  149 + height: 38rpx;
  150 + line-height: 38rpx;
  151 + align-items: baseline;
  152 +}
0 \ No newline at end of file 153 \ No newline at end of file