Commit 4261f62774a8f1e2a10cfe1506505983a7ff9c52

Authored by 前端开发-罗建龙
1 parent 49a66726

移包优化

Showing 31 changed files with 6939 additions and 0 deletions
packageG/pages/goods/com_screen.js 0 → 100644
  1 +const ut = require("../../../utils/util.js");
  2 +var regeneratorRuntime = require('../../../utils/runtime.js');
  3 +var oo = getApp().globalData.setting;
  4 +module.exports = {
  5 + //下拉排序
  6 + bind_pk_sort:function (e,th){
  7 + var index=e.detail.value;
  8 + var ob=th.data.more_sort_arr[index];
  9 +
  10 + var url = th.data.requestUrl;
  11 + if (th.data.tabname!=ob.value){
  12 +
  13 + var txt='desc';
  14 + if(ob.value=='sort') txt='asc'
  15 + th.setData({ tabname: ob.value, adname:txt });
  16 + }
  17 + th.resetData();
  18 +
  19 + //开始点击分类
  20 + if(th.requestGoodsList) {
  21 + //-- 开始点击分类 --
  22 + th.requestGoodsList(url);
  23 + }else if(th.requestSearch){
  24 + //-- 重新开始搜索 --
  25 + th.requestSearch(url);
  26 + }
  27 +
  28 + },
  29 +
  30 + //-- 获取列表 --
  31 + set_screen:async function (url,th){
  32 + if(!url) url=th.data.requestUrl;
  33 +
  34 + var arr=url.split('1=1&');
  35 + url='/api/weshop/goods/goodsBrandGroup?'+arr[1];
  36 +
  37 + var screen_brand=null;
  38 + var screen_nation=null;
  39 + var screen_price=null;
  40 + var screen_cate=null;
  41 + //如果有分类的话
  42 + if( th.data.cat_id && !th.data.screen_cate){
  43 + var c_url="/api/weshop/goodscategory/get/"+oo.stoid+"/"+ th.data.cat_id;
  44 + var f_cate=null;
  45 + await getApp().request.promiseGet(c_url,{
  46 + }).then(res=>{
  47 + if(res.data.code==0 && res.data.data){
  48 + f_cate=res.data.data;
  49 + }
  50 + })
  51 +
  52 + //分类必须有parent_id_path值
  53 + if(f_cate && f_cate['parent_id_path']){
  54 + var new_arr=f_cate['parent_id_path'].split('_');
  55 + c_url='/api/weshop/goodscategory/page?store_id='+oo.stoid+'&parent_id_path='+(new_arr[0]+"_"+new_arr['1']);
  56 + await getApp().request.promiseGet(c_url,{
  57 + data:{level:2,pageSize:1000}
  58 + }).then(res=>{
  59 + if(ut.ajax_ok(res) ){
  60 + screen_cate=res.data.data.pageData.filter(function(e){
  61 + return e.name
  62 + });
  63 + }
  64 + })
  65 + }
  66 +
  67 + }
  68 +
  69 +
  70 + if(url.indexOf('brand_id')==-1) {
  71 + var url1 = url + "&grouptype=1";
  72 + await getApp().request.promiseGet(url1, {
  73 + data: {is_mainshow: 1, isonsale: 1, store_id: oo.stoid}
  74 + }).then(res => {
  75 + if (res.data.code == 0 && res.data.data && res.data.data.length) {
  76 + screen_brand = res.data.data.filter(function(e){
  77 + return e.name
  78 + });
  79 + }
  80 + })
  81 + }
  82 +
  83 + if(url.indexOf('nation_id')==-1) {
  84 + url1 = url + "&grouptype=2";
  85 + await getApp().request.promiseGet(url1, {
  86 + data: {is_mainshow: 1, isonsale: 1, store_id: oo.stoid}
  87 + }).then(res => {
  88 + if (res.data.code == 0 && res.data.data && res.data.data.length) {
  89 + screen_nation = res.data.data.filter(function(e){
  90 + return e.name;
  91 + });
  92 + }
  93 + })
  94 + }
  95 +
  96 +
  97 + if(url.indexOf('startprice')==-1) {
  98 + url1 = url + "&grouptype=3";
  99 + await getApp().request.promiseGet(url1, {
  100 + data: {is_mainshow: 1, isonsale: 1, store_id: oo.stoid}
  101 + }).then(res => {
  102 + if (res.data.code == 0 && res.data.data && res.data.data.length) {
  103 + var price = res.data.data;
  104 + var max_price = price[0].final_price;
  105 + var psize = Math.ceil(max_price / 5); // 每一段累积的价钱
  106 + var parr = [];
  107 + for (var i = 0; i < 5; i++) {
  108 + var start = i * psize;
  109 + var end = start + psize;
  110 + // 如果没有这个价格范围的商品则不列出来
  111 + var ii = false;
  112 + for (var v in price) {
  113 + var item_p = price[v];
  114 + if (item_p.final_price > start && item_p.final_price <= end) {
  115 + ii = true;
  116 + }
  117 + }
  118 + if (ii == false) continue;
  119 + var obj = {};
  120 + obj['price'] = start + "-" + end;
  121 + if (i == 0) obj['name'] = end + "元以下";
  122 + else if (i == 4) obj['name'] = start + "元以上";
  123 + else obj['name'] = start + "-" + end + '元';
  124 + parr.push(obj)
  125 + }
  126 + screen_price = parr;
  127 + }
  128 + })
  129 + }
  130 +
  131 + th.setData({screen_brand,screen_nation,screen_price,screen_cate})
  132 +
  133 + },
  134 +
  135 +
  136 + filterGoods:function (e,th){
  137 +
  138 + var index=e.currentTarget.dataset.index;
  139 + var type=e.currentTarget.dataset.type;
  140 + var url=th.data.requestUrl;
  141 +
  142 + switch (type){
  143 + case "1"://分类
  144 + var item=th.data.screen_cate[index];
  145 + if( th.data.cat_id){
  146 + var arr_m=url.split("1=1&");
  147 + var arr_m2=arr_m[1].split('&');
  148 + var url="";
  149 + for(var jj in arr_m2){
  150 + if(arr_m2[jj].indexOf('cat_id')>=-1){
  151 + url+="&cat_id="+item.id;
  152 + }else if(arr_m2[jj].indexOf('pid')>=-1){
  153 + url+="&pid="+item.parent_id;
  154 + }else{
  155 + url+="&"+arr_m2[jj];
  156 + }
  157 + }
  158 + }else {
  159 + url+="&cat_id="+item.id+"&pid="+item.parent_id;
  160 + }
  161 + url=arr_m[0]+"1=1&"+url;
  162 + break;
  163 + case "2"://国别
  164 + var item=th.data.screen_nation[index];
  165 + url+="&nation_id="+item.nation_id;
  166 + break;
  167 + case "3"://品牌
  168 + var item=th.data.screen_brand[index];
  169 + url+="&brand_id="+item.brand_id;
  170 + break;
  171 + case "4"://价格
  172 + var item=th.data.screen_price[index];
  173 + var p_arr=item.price.split('-');
  174 + url+="&startprice="+p_arr[0]+"&endprice="+p_arr[1];
  175 + break;
  176 + }
  177 +
  178 + th.setData({screen_brand:null,screen_nation:null,openFilterModal:0,is_go:0,
  179 + screen_price:null,screen_cate:null,requestData:null})
  180 + th.data.currentPage=1;
  181 + //进行筛选
  182 + this.set_screen(url,th);
  183 +
  184 + th.setData({
  185 + tabname:"sort", //排序的字段
  186 + adname:"asc", //升降的字段
  187 + })
  188 +
  189 + //开始点击分类
  190 + if(th.requestGoodsList) {
  191 + //-- 开始点击分类 --
  192 + th.requestGoodsList(url);
  193 + }else if(th.requestSearch){
  194 + //-- 重新开始搜索 --
  195 + th.requestSearch(url);
  196 + }
  197 + },
  198 +
  199 + //-- 展开和收起的控制 --
  200 + open_more:function(e,th){
  201 + var type=e.currentTarget.dataset.type;
  202 + switch(type){
  203 + case "1":
  204 + if(th.data.fil_cate_state==0 || th.data.fil_cate_state==2) th.setData({fil_cate_state:1})
  205 + else th.setData({fil_cate_state:2})
  206 + break;
  207 + case "2":
  208 + if(th.data.fil_nation_state==0 || th.data.fil_nation_state==2) th.setData({fil_nation_state:1})
  209 + else th.setData({fil_nation_state:2})
  210 + break;
  211 + case "3":
  212 + if(th.data.fil_brand_state==0 || th.data.fil_brand_state==2) th.setData({fil_brand_state:1})
  213 + else th.setData({fil_brand_state:2})
  214 + break;
  215 + case "4":
  216 + if(th.data.fil_price_state==0 || th.data.fil_price_state==2) th.setData({fil_price_state:1})
  217 + else th.setData({fil_price_state:2})
  218 + break;
  219 +
  220 + }
  221 + },
  222 +
  223 + clear_fil(th){
  224 + var url=th.data.old_req_url;
  225 + th.setData({screen_brand:null,screen_nation:null,openFilterModal:0,is_go:0,
  226 + screen_price:null,screen_cate:null,requestData:null})
  227 + th.data.currentPage=1;
  228 +
  229 + //进行筛选
  230 + this.set_screen(url,th);
  231 + if(th.requestGoodsList) {
  232 + //-- 开始点击分类 --
  233 + th.requestGoodsList(url);
  234 + }else if(th.requestSearch){
  235 + //-- 重新开始搜索 --
  236 + th.requestSearch(url);
  237 + }
  238 + }
  239 +
  240 +
  241 +}
0 242 \ No newline at end of file
... ...
packageG/pages/goods/com_screen.wxss 0 → 100644
  1 +/*--三角形的显示--*/
  2 +.arrow_down,.arrow_up{
  3 + width: 0px;
  4 + height: 0px;
  5 + font-size: 0;
  6 + line-height: 0;
  7 + border-right: 5px solid transparent;
  8 + border-left: 5px solid transparent;
  9 +}
  10 +
  11 +.arrow_down {
  12 + border-top: 5px solid #a5a5a5; margin-top: 4rpx;
  13 +}
  14 +.arrow_up{
  15 + border-bottom: 5px solid #a5a5a5;
  16 +}
  17 +
  18 +.arrow_down.on{
  19 + border-top: 5px solid #F4281C ;
  20 +}
  21 +.arrow_up.on{
  22 + border-bottom: 5px solid #F4281C;
  23 +}
  24 +
  25 +.f_cate_item{ height:80rpx; display:flex; justify-content: space-between; align-items: center; border-bottom: 1rpx solid #dcdcdc;}
  26 +
  27 +.filter-items{ color: #666; overflow:hidden}
  28 +.filter-items.normal_to{ max-height: 260rpx}
  29 +.filter-items.back_to{ height: 0rpx}
  30 +
  31 +.up_ar{ transform: rotate(180deg)}
  32 +.fil_btn{ width: 47%; height:80rpx; border-radius:10rpx; display: flex;
  33 + justify-content:center; align-items: center; font-size:28rpx;color:#fff}
  34 +.fil_cancle{ background-color: #25c6fc }
  35 +.fil_sure{ background-color:#dd272c }
  36 +
  37 +.filter-modal {
  38 + position: fixed;
  39 + left: 150rpx;
  40 + top: 0;
  41 + right: 0;
  42 + bottom: 0;
  43 + z-index: 1120;
  44 + background-color: white;
  45 + overflow-x: hidden;
  46 +}
  47 +
  48 +.filter-box {
  49 + box-sizing: border-box;
  50 + width: 100%;
  51 + font-size: 28rpx;
  52 + padding: 20rpx;
  53 +}
  54 +
  55 +.filter-name {
  56 + width: 100%;
  57 + padding: 20rpx 0;
  58 + word-break: keep-all;
  59 + white-space: nowrap;
  60 + text-overflow: ellipsis;
  61 + overflow: hidden;
  62 + font-size: 30rpx;
  63 +}
  64 +
  65 +.filter-item {
  66 + float: left;
  67 + width: fit-content;
  68 + max-width: 500rpx;
  69 + word-break: keep-all;
  70 + white-space: nowrap;
  71 + text-overflow: ellipsis;
  72 + overflow: hidden;
  73 + padding: 10rpx;
  74 + border-radius: 10rpx;
  75 + border: 1rpx #ddd solid;
  76 + margin: 0 10rpx 10rpx 0;
  77 + background-color: #fdfdfd;
  78 + color: #666;
  79 +}
0 80 \ No newline at end of file
... ...
packageG/pages/goods/search/g_filter.wxs 0 → 100644
  1 +var g_filters = {
  2 + //-- 判断是不是有等级价 --
  3 + is_has_rank: function (rank_switch, item) {
  4 + if (!rank_switch) return false;
  5 + if (item.cardprice1 || item.cardprice2 || item.cardprice3) { return true }
  6 + return false;
  7 + },
  8 +
  9 + //-- 判断,不是等级会员时候,要显示的最低等级价和名称 --
  10 + get_card_price: function (goods, all_card, type) {
  11 + var price1 = parseFloat(goods['cardprice1']);
  12 + var price2 = parseFloat(goods['cardprice2']);
  13 + var price3 = parseFloat(goods['cardprice3']);
  14 + if (!all_card) {
  15 + if (type == 0) return 0;
  16 + return "";
  17 + }
  18 +
  19 + var arr = [];
  20 + var min_price = 0;
  21 + var min_name = "";
  22 +
  23 + var min_price = null;
  24 + var min_name = null;
  25 + //---设置对应的价格名字----
  26 + for (var i = 0; i < 3; i++) {
  27 + var vl = all_card[i];
  28 + if (!vl) continue;
  29 + if (vl['CorrPrice'] == "Price1" && price1 > 0) {
  30 + if (min_price == null) {
  31 + min_price = price1; min_name = vl['CardName'];
  32 + }
  33 + else if (price1 < min_price) {
  34 + min_price = price1; min_name = vl['CardName'];
  35 + }
  36 + }
  37 + if (vl['CorrPrice'] == "Price2" && price2 > 0) {
  38 + if (min_price == null) {
  39 + min_price = price2; min_name = vl['CardName'];
  40 + }
  41 + else if (price2 < min_price) {
  42 + min_price = price2; min_name = vl['CardName'];
  43 + }
  44 + }
  45 +
  46 + if (vl['CorrPrice'] == "Price3" && price3 > 0) {
  47 + if (min_price == null) {
  48 + min_price = price3; min_name = vl['CardName'];
  49 + }
  50 + else if (price3 < min_price) {
  51 + min_price = price3; min_name = vl['CardName'];
  52 + }
  53 + }
  54 +
  55 + }
  56 + if (min_price == null) {
  57 + if (type == 0) return 0;
  58 + return "";
  59 + }
  60 +
  61 + //if(type==0) return arr.length;
  62 + //--进行排序,升序---
  63 + /*---
  64 + arr.sort(function(a,b){
  65 + if (a.price < b.price) {
  66 + return -1;
  67 + } else if (a.fee == b.fee) {
  68 + return 0;
  69 + } else {
  70 + return 1;
  71 + }
  72 + })--*/
  73 + //-- 获取最下价钱,和相应的卡的名称 --
  74 + //min_price=min.price;
  75 + //min_name=min.name;
  76 + if (type == 0) return min_price.toFixed(2);
  77 + if (min_name.length > 7) min_name = min_name.substring(0, 8);
  78 + return min_name;
  79 + },
  80 +
  81 +
  82 + get_goods_url: function (item) {
  83 +
  84 + var url1 = "/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id + "&prom_id=" + item.prom_id + "&prom_type="+item.prom_type
  85 + // 预售活动
  86 + if (item.prom_type == 8) {
  87 + url1 = "/packageC/pages/presell/goodsInfo/goodsInfo?goods_id=" + item.goods_id + "&prom_id=" + item.prom_id
  88 + }
  89 + // 如果是幸运购活动商品
  90 + if (item.prom_type == 9) {
  91 + url1 = "/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=" + item.goods_id + "&group_id=" + item.prom_id
  92 + }
  93 +
  94 + if ([1,2,6].indexOf(item.prom_type)>-1 && item.prom_id > 0) {
  95 + url1 = "/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id + "&prom_id=" + item.prom_id + "&prom_type="+item.prom_type;
  96 + }
  97 +
  98 +
  99 + return url1;
  100 + }
  101 +}
  102 +
  103 +module.exports = {
  104 + is_has_rank: g_filters.is_has_rank,
  105 + get_card_price: g_filters.get_card_price,
  106 + get_goods_url: g_filters.get_goods_url
  107 +}
0 108 \ No newline at end of file
... ...
packageG/pages/goods/search/search.js 0 → 100644
  1 +var t = function (t) {
  2 + return t && t.__esModule ? t : {
  3 + default: t
  4 + };
  5 +}(require("../../../../utils/LoadMore.js")), ut = require("../../../../utils/util.js"),
  6 + a = getApp(), e = new t.default(), rq = a.request, oo = a.globalData.setting;
  7 +const com_fil = require("../com_screen.js");
  8 +
  9 +Page({
  10 + data: {
  11 + url: a.globalData.setting.imghost,
  12 + resourceUrl: a.globalData.setting.resourceUrl,
  13 + currentPage: 1,
  14 + requestData: null,
  15 + allData: null,
  16 + openFilterModal: !1,
  17 + openSearchModal: !1,
  18 + baseUrl: "/api/weshop/goods/page?isnewwhere=1",
  19 + requestUrl: "",
  20 + old_req_url:'',
  21 + //hotWords: [ [ "手机", "小米", "iphone" ], [ "三星", "华为", "冰箱" ] ]
  22 + hotWords: null,
  23 + is_no_plus: 1,
  24 + tabname: "sort", //排序的字段
  25 + adname: "asc", //升降的字段
  26 + rq_data: null,
  27 + searchRecord: [],
  28 + keyword: '',
  29 + is_his: 0,
  30 + hiddenClear: true,
  31 + fliter_flag: false,
  32 +
  33 + more_sort_arr:[
  34 + {name:'综合',value:'sort'},
  35 + {name:'新品',value:'on_time'},
  36 + {name:'评论',value:'comment_count'},
  37 + ],
  38 +
  39 + fil_cate_state:0,
  40 + fil_nation_state:0,
  41 + fil_brand_state:0,
  42 + fil_price_state:0,
  43 + },
  44 +
  45 + onLoad: function (t) {
  46 + this.data.rq_data = t;
  47 + //群id
  48 + if(t && t.groupchat_id){
  49 + getApp().globalData.groupchat_id=t.groupchat_id
  50 + }
  51 + if (t.o) {
  52 + this.data.rq_data.o = JSON.parse(t.o);
  53 + };
  54 + if(t.o) {
  55 + var req = t.o;
  56 + if(req.cat_id){
  57 + var baseUrl= "/api/weshop/goods/page?isnewwhere=1&cat_id="+req.cat_id
  58 + this.setData({ baseUrl: baseUrl });
  59 + }
  60 + if(req.nation_id){
  61 + var baseUrl= "/api/weshop/goods/page?isnewwhere=1&nation_id="+req.nation_id
  62 + this.setData({ baseUrl: baseUrl });
  63 + }
  64 + if(req.brand_id){
  65 + var baseUrl= "/api/weshop/goods/page?isnewwhere=1&brand_id="+req.brand_id
  66 + this.setData({ baseUrl: baseUrl });
  67 + }
  68 + }else{
  69 + var baseUrl= "/api/weshop/goods/page?isnewwhere=1"
  70 + this.setData({ baseUrl: baseUrl });
  71 + }
  72 +
  73 +
  74 +
  75 + //接受有没有导购的参数
  76 + var first_leader = t.first_leader;
  77 + if (first_leader) {
  78 + getApp().globalData.first_leader = first_leader;
  79 + //调用接口判断是不是会员
  80 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + oo.stoid + "/" + first_leader, {}).then(res => {
  81 + if (res.data.code == 0) {
  82 + getApp().globalData.guide_id = res.data.data.id;
  83 + getApp().globalData.guide_pick_id= res.data.data.pickup_id
  84 + }
  85 + })
  86 + }
  87 +
  88 + //调用接口判断商家plus有没有过期
  89 + rq.promiseGet("/store/storemoduleendtime/page?store_id=" + oo.stoid + "&type=3", {}).then(res => {
  90 + if (res.data.code == 0) {
  91 + var arr = res.data.data.pageData;
  92 + if (arr.length > 0) {
  93 + var item = arr[0];
  94 + if (item.is_sy == 0) {
  95 + var now = Date.parse(new Date()); now = now / 1000;
  96 + if (item.end_time < now) {
  97 + th.setData({ is_no_plus: 0 })
  98 + }
  99 + }
  100 + }
  101 + }
  102 + })
  103 +
  104 + var th = this;
  105 + a.getConfig2(function (rs) {
  106 + var arr = new Array(), arr2 = new Array();
  107 + if (rs.hot_keywords != null && ut.trim(rs.hot_keywords) != "") {
  108 + var arr1 = rs.hot_keywords.split('|');
  109 + for (var i = 0; i < arr1.length; i++) {
  110 + if (i % 5 == 0 && i != 0) {
  111 + arr.push(arr2);
  112 + arr2 = [];
  113 + } else {
  114 + arr2.push(arr1[i]);
  115 + }
  116 + }
  117 + if (arr2.length > 0) arr.push(arr2);
  118 + th.setData({ hotWords: arr });
  119 + }
  120 +
  121 +
  122 + //计算等级价相关
  123 + var swithc_list = rs.switch_list;
  124 + var sw_arr = JSON.parse(swithc_list);
  125 + //---如果后台又开等级卡的开关---
  126 + ut.get_plus_name_price(sw_arr,th);
  127 + if(sw_arr.is_retail_price){
  128 + th.setData({is_retail_price:1});
  129 + }
  130 +
  131 + })
  132 + //e.init(this, "", "requestData");
  133 + var url = this.data.baseUrl;
  134 +
  135 + //扫一扫过来,显示搜索的内容
  136 + var s_key = t.s_key;
  137 + if (s_key) {
  138 + s_key = s_key.trim();
  139 + this.search(s_key); this.openSearchModal();
  140 + return;
  141 + }
  142 +
  143 + if (0 != t.brand_id && t.brand_id != undefined) { url += "&brand_id=" + t.brand_id; }
  144 + if (0 != t.nation_id && t.nation_id != undefined) { url += "&nation_id=" + t.nation_id; }
  145 + if (0 != t.max_price && t.max_price != undefined) { url += "&min_pirce=" + t.min_pirce + "&max_price=" + t.max_price; }
  146 + if (0 != t.ladder_id && t.ladder_id != undefined) {
  147 + url += "&ladder_id=" + t.ladder_id;
  148 + this.setData({
  149 + baseUrl: url,
  150 + })
  151 + }
  152 + if (url != this.data.baseUrl) return this.requestSearch(url);
  153 + this.openSearchModal();
  154 + // 获取历史搜索记录
  155 + this.getHistorySearch();
  156 + },
  157 +
  158 + onShow: function () {
  159 + getApp().check_can_share();
  160 + },
  161 +
  162 + changeTab: function (t) {
  163 + var ord = t.currentTarget.dataset.href;
  164 + var ad = t.currentTarget.dataset.ad;
  165 +
  166 + var url = this.data.requestUrl;
  167 +
  168 + if (this.data.tabname != ord) {
  169 + this.setData({ tabname: ord, adname: "desc" });
  170 + } else {
  171 + ad = ad == "desc" ? "asc" : "desc";
  172 + this.setData({ adname: ad });
  173 + }
  174 + this.resetData(), this.requestSearch(url);
  175 +
  176 + },
  177 +
  178 + //-----------真的调用地址进行搜索------------
  179 + requestSearch: function (t) {
  180 + // console.log('t===>', t);
  181 + if (this.data.loading) return false;
  182 + this.data.loading = 1;
  183 + var e = this, th = e;
  184 + if (getApp().globalData.userInfo) {
  185 + t += "&user_id=" + getApp().globalData.userInfo.user_id;
  186 + }
  187 + this.data.requestUrl = t;
  188 +
  189 + var user_id = getApp().globalData.user_id;
  190 + if (!user_id) user_id = 0;
  191 + let data = {
  192 + is_mainshow: 1,
  193 + isonsale: 1,
  194 + store_id: oo.stoid,
  195 + orderField: e.data.tabname,
  196 + orderType: e.data.adname,
  197 + page: e.data.currentPage,
  198 + };
  199 +
  200 + let o = this.data.rq_data.o;
  201 + if (o) {
  202 + if (o.cat_id) data.cat_id = o.cat_id;
  203 + if (o.pid && o.pid != 'three') data.parent_id = o.pid;
  204 + if (o.nation_id) data.nation_id = o.nation_id;
  205 + if (o.brand_id) data.brand_id = o.brand_id;
  206 + };
  207 +
  208 +
  209 + getApp().request.promiseGet(t, { data: data }).then(async res => {
  210 + th.data.loading = 0;
  211 + if (ut.ajax_ok(res)) {
  212 + if (!e.data.requestData) {
  213 + // e.data.requestData=[];
  214 + e.setData({
  215 + requestData: [],
  216 + });
  217 + };
  218 + for (let i in res.data.data.pageData) {
  219 + let item = res.data.data.pageData[i];
  220 + item.original_img = th.data.url + item.original_img;
  221 +
  222 + /*--
  223 + var url="/api/weshop/activitylist/getGoodActInfo";
  224 + var req_data={
  225 + store_id:oo.stoid,goodsidlist:item.goods_id,is_detail:1,user_id:user_id
  226 + };
  227 + //获取商品的实际活动
  228 + await getApp().request.promiseGet(url, {data:req_data}).then(res=>{
  229 + if(res.data.code==0 && res.data.data && res.data.data.length==1){
  230 + item.prom_type=res.data.data[0].prom_type;
  231 + item.prom_id=res.data.data[0].act_id;
  232 + }
  233 + })--*/
  234 +
  235 + var prom_type = item.prom_type; //0普通商品 1秒杀 6拼单 2团购 4积分购
  236 + var prom_id = item.prom_id;
  237 + var now = ut.gettimestamp();
  238 + var url = "";
  239 + switch (prom_type) {
  240 + case 1:
  241 + url = "/api/ms/flash_sale/getNew/" + oo.stoid + "/" + user_id + "/" + prom_id;
  242 + break;
  243 + case 2:
  244 + url = "/api/weshop/goods/groupBuy/getActInfo/" + oo.stoid + "/" + item.goods_id + "/" + prom_id
  245 + break;
  246 + case 4:
  247 + url = "/api/weshop/integralbuy/get/" + oo.stoid + "/" + prom_id;
  248 + break;
  249 + case 6:
  250 + url = "/api/weshop/teamlist/get/" + oo.stoid + "/" + prom_id;
  251 + await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1", {
  252 + data: {
  253 + store_id: oo.stoid,
  254 + is_end: 0,
  255 + is_show: 1,
  256 + user_id: getApp().globalData.user_id,
  257 + pageSize: 1000,
  258 + }
  259 + }).then(pd => {
  260 + let pd_list = pd.data.data.pageData;
  261 + if (res.data.code == 0 && pd_list.length > 0) {
  262 + var flag = pd_list.some(pd => {
  263 + return pd.goods_id == item.goods_id
  264 + })
  265 +
  266 + if (!flag) {
  267 + item.prom_type = 0;
  268 + item.prom_id = 0;
  269 + item.prom_price = null;
  270 + }
  271 + }
  272 + })
  273 + break;
  274 + case 8:
  275 + var presell_id = prom_id;
  276 + var url1 = "/api/weshop/marketing/marketingPresellList/list";
  277 + var rd = {
  278 + store_id: oo.stoid,
  279 + presell_id: presell_id,
  280 + goods_id: item.goods_id
  281 + }
  282 + //------获取预售从表----------
  283 + await getApp().request.promiseGet(url1, {
  284 + data: rd
  285 + }).then(res => {
  286 + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) {
  287 + var arr = res.data.data[0];
  288 + item.prom_price = arr.presell_price;
  289 + item.sales_sum = arr.buy_goodnum + (arr.virtual_qty ? arr.virtual_qty : 0);
  290 + }
  291 + })
  292 + break;
  293 + default:
  294 + break;
  295 + };
  296 + if (url != null && url != '') {
  297 + await getApp().request.promiseGet(url, {}).then(async res => {
  298 + var prom = null;
  299 + if (res.data.code == 0 && res.data.data) {
  300 + prom = res.data.data;
  301 +
  302 + if (prom != null && prom.is_end == 0 && prom.end_time > now && (prom.start_time < now || (prom_type!=2 && prom.show_time && prom.show_time < now))) {
  303 + item.prom_price = res.data.data.price;
  304 + if(prom_type==4){
  305 + item.prom_price= res.data.data.addmoney;
  306 + }
  307 +
  308 + if (res.data.data.user_price) item.prom_price = res.data.data.user_price;
  309 + var vNum = prom.virtual_num ? prom.virtual_num : 0;
  310 + var vNum1 = prom.virtualNum ? prom.virtualNum : 0;
  311 + var vNum2 = prom.virtual ? prom.virtual : 0;
  312 + item.sales_sum = prom.buy_num + (vNum + vNum1 + vNum2);
  313 + } else {
  314 + item.prom_type = 0;
  315 + item.prom_id = 0;
  316 + item.prom_price = null;
  317 + }
  318 + }
  319 + })
  320 + };
  321 + if (!th.data.requestData) th.data.requestData = [];
  322 + th.data.requestData.push(item);
  323 + e.setData({ requestData: e.data.requestData });
  324 + }
  325 + }
  326 + e.closeSearchModal();
  327 + })
  328 + },
  329 + onReachBottom: function () {
  330 + console.log('触发上滑加载事件');
  331 + this.data.currentPage++
  332 + console.log('触发上滑加载事件currentPage', this.data.currentPage);
  333 + this.data.openSearchModal || e.canloadMore() && this.requestSearch(this.data.requestUrl);
  334 + },
  335 +
  336 +
  337 + openFilterModal: function () {
  338 + this.setData({
  339 + openFilterModal: !0
  340 + });
  341 + },
  342 + closeFilterModal: function () {
  343 + this.setData({
  344 + openFilterModal: !1
  345 + });
  346 + },
  347 + filterGoods: function (t) {
  348 + this.resetData(), this.requestSearch(t.currentTarget.dataset.href), this.closeFilterModal();
  349 + },
  350 +
  351 +
  352 +
  353 + resetData: function () {
  354 + e.resetConfig(),
  355 + // this.data.requestData = null,
  356 + this.data.currentPage = 1;
  357 + this.setData({
  358 + requestData: null,
  359 + });
  360 + },
  361 +
  362 + //---回复最初的设置---显示全部分类--
  363 + restoreData: function () {
  364 + this.setData({
  365 + requestData: this.data.allData,
  366 + });
  367 + this.data.currentPage = 2;
  368 + },
  369 + openSearchModal: function () {
  370 + this.setData({
  371 + openSearchModal: !0
  372 + });
  373 + },
  374 + closeSearchModal: function () {
  375 + this.setData({
  376 + openSearchModal: !1
  377 + });
  378 + },
  379 +
  380 + submitSearch: function (t) {
  381 + var val = t.detail.value.word;
  382 + if (val == undefined) val = t.detail.value;
  383 + val = val ? val.trim() : '';
  384 + if (!val) {
  385 + a.showWarning("请输入关键词");
  386 + }
  387 + this.search(val);
  388 + },
  389 +
  390 + //热搜关键字
  391 + searchHotWord: function (t) {
  392 + var word = t.currentTarget.dataset.word;
  393 + if (word) {
  394 + this.setData({
  395 + keyword: word,
  396 + hiddenClear: false,
  397 + });
  398 + };
  399 + this.historyRecord(word);
  400 + this.search(word);
  401 + },
  402 +
  403 + //-----点击搜索按钮----
  404 + search: function (t) {
  405 + if ("string" != typeof t || "" == t) return a.showWarning("请输入关键词");
  406 + this.data.key_str = t;
  407 + this.resetData();
  408 +
  409 + this.data.old_req_url=this.data.baseUrl + "&key_str=" + encodeURIComponent(t);
  410 +
  411 + this.set_screen(this.data.baseUrl + "&key_str=" + encodeURIComponent(t))
  412 + this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t));
  413 + this.historyRecord();
  414 + },
  415 +
  416 + //---------分享配置--------
  417 + onShareAppMessage: function (e) {
  418 + getApp().globalData.no_clear = 1;
  419 + var curPage = this;
  420 + var pagePath = curPage.route; //当前页面url
  421 + if (pagePath.indexOf('/') != 0) {
  422 + pagePath = '/' + pagePath;
  423 + }
  424 +
  425 + if (this.data.key_str) {
  426 + pagePath += "?s_key=" + this.data.key_str;
  427 + }
  428 +
  429 + if (getApp().globalData.user_id) {
  430 +
  431 + if (pagePath.indexOf("?") > 0) {
  432 + pagePath += "&first_leader=" + getApp().globalData.user_id;
  433 + } else {
  434 + pagePath += "?first_leader=" + getApp().globalData.user_id;
  435 + }
  436 + }
  437 + //群id分享
  438 + if (getApp().globalData.groupchat_id) {
  439 + pagePath+="&groupchat_id="+getApp().globalData.groupchat_id
  440 + }
  441 +
  442 + // console.log("11-11"+pagePath);
  443 + return {
  444 + title: "商品搜索",
  445 + path: pagePath,
  446 + }
  447 + },
  448 +
  449 +
  450 + //---------图片失败,默认图片--------
  451 + bind_bnerr: function (e) {
  452 + var _errImg = e.target.dataset.errorimg;
  453 + var _errObj = {};
  454 + _errObj[_errImg] = this.data.url + "/miniapp/images/default_g_img.gif";
  455 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  456 + },
  457 +
  458 + //--- 获取卡类列表 ---
  459 + getPlusCardType: function (func) {
  460 + var storid = oo.stoid;
  461 + var th = this;
  462 + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => {
  463 + var plusCard = res.data.data;
  464 + var arr = [1219, 2089, 3031];
  465 + var new_arr = new Array();
  466 + var card_name_map = new Map();
  467 + var user = getApp().globalData.userInfo;
  468 +
  469 + for (var i = 0; i < plusCard.length; i++) {
  470 + if ((!user || user.card_field == null || user.card_field == "") && (plusCard[i].IsStopBuy == true)) {
  471 + continue;
  472 + }
  473 + var name = "card" + plusCard[i].CorrPrice.toLowerCase();
  474 + card_name_map.set(name, plusCard[i].CardName);
  475 + new_arr.push(plusCard[i]);
  476 +
  477 + }
  478 +
  479 + var ob = { "card_list": new_arr, "name_map": card_name_map };
  480 + func(ob);
  481 + })
  482 + },
  483 +
  484 +
  485 + getInput(e) {
  486 + let val = e.detail.value;
  487 + if (val) {
  488 + this.setData({
  489 + keyword: e.detail.value,
  490 + hiddenClear: false,
  491 + });
  492 + } else {
  493 + this.setData({
  494 + hiddenClear: true,
  495 + });
  496 + }
  497 +
  498 + },
  499 +
  500 + historyRecord(w) {
  501 + let keyword = w;
  502 + let self = this;
  503 + if (!keyword) {
  504 + keyword = this.data.key_str.trim();
  505 + }
  506 + let searchRecord = this.data.searchRecord;
  507 + if (!searchRecord || searchRecord.length == 0) searchRecord = wx.getStorageSync('searchRecord') || [];
  508 +
  509 + if (keyword) {
  510 +
  511 + var index = searchRecord.indexOf(keyword);
  512 + if (index > -1) {
  513 + // 已经存在该值
  514 + searchRecord.splice(index, 1);
  515 + searchRecord.unshift(keyword);
  516 +
  517 + // 将历史记录添加到缓存中
  518 + wx.setStorage({
  519 + key: 'searchRecord',
  520 + data: searchRecord,
  521 + success: function (res) {
  522 + self.setData({
  523 + searchRecord,
  524 + })
  525 + }
  526 + })
  527 +
  528 + return;
  529 + } else {
  530 + if (searchRecord.length >= 10) {
  531 + searchRecord.pop(); // 删除最早的一条记录
  532 + };
  533 + searchRecord.unshift(keyword);
  534 +
  535 + // // 将历史记录添加到缓存中
  536 + wx.setStorage({
  537 + key: 'searchRecord',
  538 + data: searchRecord,
  539 + success: function (res) {
  540 + self.setData({
  541 + searchRecord,
  542 + })
  543 + }
  544 + })
  545 + };
  546 + };
  547 + },
  548 +
  549 + closePoster() {
  550 + this.setData({
  551 + fliter_flag: false,
  552 + });
  553 + },
  554 +
  555 + show_fliter() {
  556 + this.setData({
  557 + fliter_flag: true
  558 + })
  559 + },
  560 + fliter_close() {
  561 + this.setData({
  562 + fliter_flag: false,
  563 + })
  564 + },
  565 +
  566 +
  567 + // 获取历史搜索记录
  568 + getHistorySearch() {
  569 + this.setData({
  570 + searchRecord: wx.getStorageSync('searchRecord') || [] //若无存储则为空
  571 + });
  572 + },
  573 +
  574 + // 清除历史搜素记录
  575 + clearSearchRecord() {
  576 + wx.clearStorageSync('searchRecord');
  577 + this.setData({
  578 + searchRecord: []
  579 + });
  580 + },
  581 +
  582 + go_url: function (e) {
  583 + var url = e.currentTarget.dataset.url;
  584 + getApp().goto(url);
  585 + },
  586 +
  587 + clearInput() {
  588 + this.setData({
  589 + keyword: '',
  590 + hiddenClear: true,
  591 + openSearchModal: true,
  592 + });
  593 + },
  594 +
  595 + inputFocus(e) {
  596 + this.setData({
  597 + openSearchModal: true,
  598 + });
  599 + },
  600 +
  601 + /*-- 和筛选相关的 --*/
  602 + bind_pk_sort(e){ com_fil.bind_pk_sort(e,this); },
  603 + set_screen(url){ com_fil.set_screen(url,this); },
  604 + filterGoods(e){ com_fil.filterGoods(e,this); },
  605 + open_more(e){ com_fil.open_more(e,this); },
  606 + clear_fil(){ com_fil.clear_fil(this); }
  607 +
  608 +
  609 +});
0 610 \ No newline at end of file
... ...
packageG/pages/goods/search/search.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "商品搜索",
  3 + "enablePullDownRefresh": false,
  4 + "usingComponents": {
  5 + "share_box": "/components/share_box/share_box"
  6 + },
  7 + "componentPlaceholder": {
  8 + "van-popup": "view"
  9 + }
  10 +}
0 11 \ No newline at end of file
... ...
packageG/pages/goods/search/search.wxml 0 → 100644
  1 +<wxs module="g_filter" src="g_filter.wxs"></wxs>
  2 +
  3 +<view class="container">
  4 + <!-- 搜索框 -->
  5 + <view class="search-bar">
  6 + <form bindsubmit="submitSearch">
  7 + <view class="pdh20 pdv10 flex ai_c jc_sb">
  8 + <view class="input-box">
  9 + <input class="input-search" name="word" placeholder="请输入商品关键字" bindconfirm="submitSearch" bindinput="getInput" bindfocus="inputFocus" value="{{keyword}}"/>
  10 + <text class="iconfont icon-guan" hidden="{{hiddenClear}}" catchtap="clearInput"></text>
  11 + </view>
  12 + <button class="btn" formType="submit" hover-class="none">搜索</button>
  13 + </view>
  14 + </form>
  15 + </view>
  16 +
  17 +
  18 + <view wx:if="{{openSearchModal}}">
  19 + <view class="pd20">
  20 + <view class="" wx:if="{{searchRecord.length != 0}}">
  21 + <view class="flex jc_sb ai_c">
  22 + <text class="fs28 bold">历史搜索</text>
  23 + <text class="iconfont icon-shanchu c-6" bindtap="clearSearchRecord" wx:if="{{searchRecord.length != 0}}"></text>
  24 + </view>
  25 + <block wx:if="{{searchRecord.length>0}}">
  26 + <view class="hot-row flex flex-wrap" wx:key="{{index}}">
  27 + <view class="hot-item history ellipsis-1" bindtap="searchHotWord" data-word="{{item}}" wx:for="{{searchRecord}}" wx:key="{{index}}">{{item}}</view>
  28 + </view>
  29 + </block>
  30 + <view wx:else class="fs24">暂无历史搜索记录</view>
  31 + </view>
  32 +
  33 + <view class="" wx:if="{{hotWords.length>0}}">
  34 + <view class="fs28 bold">热门搜索</view>
  35 + <block wx:if="{{hotWords.length>0}}">
  36 + <view class="hot-row" wx:for="{{hotWords}}" wx:key="{{index}}">
  37 + <view bindtap="searchHotWord" class="hot-item" data-word="{{item}}" wx:for="{{item}}" wx:key="{{index}}">{{item}}</view>
  38 + </view>
  39 + </block>
  40 + </view>
  41 + </view>
  42 + </view>
  43 +
  44 +
  45 +
  46 + <block wx:if="{{!openSearchModal}}">
  47 +
  48 + <view class="nav flex">
  49 + <navigator class="nav-item f1" >
  50 + <picker bindchange="bind_pk_sort" value="{{index}}" range="{{more_sort_arr}}" range-key="name">
  51 + <text wx:if="{{tabname=='on_time'}}">新品</text>
  52 + <text wx:elif="{{tabname=='comment_count'}}">评论</text>
  53 + <text wx:else>综合</text>
  54 + </picker>
  55 + <view class="arrow_down"></view>
  56 + </navigator>
  57 +
  58 +
  59 + <navigator bindtap="changeTab" class="nav-item f1" data-href="sales_sum" data-ad="{{adname}}">销量
  60 + <view>
  61 + <view class="arrow_up {{tabname=='sales_sum' && adname=='asc'?'on':'' }} "></view>
  62 + <view class="arrow_down {{tabname=='sales_sum' && adname=='desc'?'on':'' }} "></view>
  63 + </view>
  64 + </navigator>
  65 + <navigator bindtap="changeTab" class="nav-item f1" data-href="final_price" data-ad="{{adname}}">价格
  66 + <view>
  67 + <view class="arrow_up {{tabname=='final_price' && adname=='asc'?'on':'' }} "></view>
  68 + <view class="arrow_down {{tabname=='final_price' && adname=='desc'?'on':'' }} "></view>
  69 + </view>
  70 + </navigator>
  71 + <navigator bindtap="openFilterModal" class="nav-item f1">筛选<view class="ico-filter">
  72 + <image class="wh100" src="{{url}}/miniapp/images/xx.png"></image>
  73 + </view>
  74 + </navigator>
  75 + <!-- <navigator bindtap="openSearchModal" class="nav-item nav-search">
  76 + <image class="wh100 search-img" src="{{url}}/miniapp/images/search.png"></image>
  77 + </navigator> -->
  78 + </view>
  79 +
  80 +
  81 +
  82 + <view class="choice_list">
  83 + <navigator class="choice_item flex ai-center" url="{{g_filter.get_goods_url(item)}}" wx:for="{{requestData}}" wx:key="{{index}}">
  84 + <view class="img-wrap">
  85 + <image src="{{item.original_img}}" lazy-load="true" binderror="bind_bnerr" data-errorimg="requestData[{{index}}].original_img"></image>
  86 + </view>
  87 + <view class="item-cont">
  88 + <view class="title ellipsis-2">{{item.goods_name}}</view>
  89 + <!-- 判断是否有活动价,小程序没有有团购和拼单 -->
  90 + <block wx:if="{{(item.prom_price>0 || item.prom_integral) && item.prom_id>0 && item.prom_type!=3 && item.prom_type!=5 && item.prom_type!=7 && item.prom_type!=10}}">
  91 + <!-- 活动价 -->
  92 + <view class="price">
  93 + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
  94 + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
  95 + <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>
  96 + </view>
  97 + <view class="comment flex jc_sb">
  98 +<!-- <view class="word-line xc-ash">¥{{item.market_price}}</view>-->
  99 + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>
  100 + </view>
  101 + </block>
  102 + <block wx:else>
  103 + <!-- 商品价格,先判断下是后又等级价-->
  104 + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}">
  105 + <!-- 当会员是等级卡的时候 -->
  106 + <block wx:if="{{card_field}}">
  107 + <!-- 等级价>0 -->
  108 + <block wx:if="{{item[card_field]>0}}">
  109 + <view class="flex ai_center">
  110 + <view class="price">¥{{item[card_field]}}</view>
  111 + <view class="card_bg flex ai-center">
  112 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  113 + <!-- <view class="card_name ellipsis-1">{{card_name}}</view> -->
  114 + <text class="ellipsis-1">{{card_name}}</text>
  115 + </view>
  116 + </view>
  117 + <view class="comment flex jc_sb">
  118 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash no_line_x">¥{{item.market_price}}</view>
  119 + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>
  120 + </view>
  121 + </block>
  122 + <block wx:else>
  123 + <view class="price">¥{{item.shop_price}}</view>
  124 + <view class="comment flex jc_sb">
  125 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash no_line_x">¥{{item.market_price}}</view>
  126 + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>
  127 + </view>
  128 + </block>
  129 + </block>
  130 + <block wx:else>
  131 + <block wx:if="{{g_filter.get_card_price(item,card_list,0) && is_no_plus}}">
  132 + <view class="flex ai-center">
  133 + <view class="price">¥{{item.shop_price}}</view>
  134 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price no_line_x">¥{{item.market_price}}</view>
  135 + </view>
  136 + <view class="comment flex jc_sb">
  137 + <view class="flex ai_center">
  138 + <view class="">¥{{g_filter.get_card_price(item,card_list,0)}}</view>
  139 + <view class="card_bg flex">
  140 + <view class="flex ai-center">
  141 + <image src="{{url}}/miniapp/images/plus/dj_icon.png" class=""></image>
  142 + <text class="ellipsis-1">{{g_filter.get_card_price(item,card_list,1)}}</text>
  143 + </view>
  144 + </view>
  145 + </view>
  146 + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>
  147 + </view>
  148 + </block>
  149 + <block wx:else>
  150 + <view class="price">¥{{item.shop_price}}</view>
  151 + <view class="comment flex jc_sb">
  152 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash no_line_x">¥{{item.market_price}}</view>
  153 + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>
  154 + </view>
  155 + </block>
  156 + </block>
  157 + </block>
  158 + <block wx:else>
  159 + <view class="price">¥{{item.shop_price}}</view>
  160 + <view class="comment flex jc_sb">
  161 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash no_line_x">¥{{item.market_price}}</view>
  162 + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>
  163 + </view>
  164 + </block>
  165 + </block>
  166 + </view>
  167 + </navigator>
  168 + <!-- 有商品列表的时候,要有分享攻击 -->
  169 + <share_box id="share"></share_box>
  170 + </view>
  171 + <!-- 无数据提示 -->
  172 + <view class="no-data" wx:if="{{!requestData||requestData.length==0}}">
  173 + <image class="cart-image" src="{{url}}/miniapp/images/cart-null.png"></image>
  174 + <view class="no-data-title">没有相关的数据</view>
  175 + <navigator bindtap="go_url" class="lookat" data-url="/pages/index/index/index"> 去逛逛 </navigator>
  176 + </view>
  177 +
  178 + </block>
  179 +</view>
  180 +
  181 +<include src="../com_screen.wxml" />
0 182 \ No newline at end of file
... ...
packageG/pages/goods/search/search.wxss 0 → 100644
  1 +.container {
  2 + color: #666;
  3 + overflow: visible;
  4 +}
  5 +
  6 +.nav {
  7 + position: sticky;
  8 + top: 90rpx;
  9 + background-color: white;
  10 + z-index: 99;
  11 +}
  12 +
  13 +.nav-item {
  14 + /* float: left;
  15 + width: 30%;
  16 + height: 90rpx;
  17 + line-height: 90rpx; */
  18 + padding: 14rpx 10rpx;
  19 + display: flex;
  20 + align-items: center;
  21 + justify-content: center;
  22 + font-size: 28rpx;
  23 + border-bottom: 2rpx solid #E6E6E6;
  24 + background-color: #fff;
  25 +}
  26 +
  27 +.nav-item .ico-dg {
  28 + width: 18rpx;
  29 + height: 12rpx;
  30 + margin-left: 10rpx;
  31 + line-height: 0;
  32 +}
  33 +
  34 +.nav-item .ico-filter {
  35 + width: 20rpx;
  36 + height: 20rpx;
  37 + margin-left: 10rpx;
  38 + line-height: 0;
  39 +}
  40 +
  41 +.ico-dir {
  42 + width: 16rpx;
  43 + height: 22rpx;
  44 + margin-left: 10rpx;
  45 + background-repeat: no-repeat;
  46 + background-size: cover;
  47 + background-position-x: 0;
  48 +}
  49 +
  50 +.ico-dir-dn {
  51 + background-position-x: -16rpx;
  52 +}
  53 +
  54 +.ico-dir-up {
  55 + background-position-x: -32rpx;
  56 +}
  57 +
  58 +.nav-search {
  59 + width: 10%;
  60 +}
  61 +
  62 +.nav-item .search-img {
  63 + width: 30rpx;
  64 + height: 30rpx;
  65 +}
  66 +
  67 +.choice_list {
  68 + background-color: #fff;
  69 +}
  70 +
  71 +.choice_item {
  72 + position: relative;
  73 + width: 100%;
  74 + min-height: 200rpx;
  75 + padding: 10rpx 0;
  76 + border-bottom: 2rpx solid #E6E6E6;
  77 + font-size: 30rpx;
  78 +}
  79 +
  80 +.img-wrap {
  81 + /* float: left; */
  82 + width: 180rpx;
  83 + height: 180rpx;
  84 + padding: 0 10rpx 0 30rpx;
  85 + flex-shrink: 0;
  86 + /* padding: 10rpx; */
  87 +}
  88 +
  89 +.img-wrap image {
  90 + width: 100%;
  91 + height: 100%;
  92 +}
  93 +
  94 +.item-cont .title {
  95 + height: 72rpx;
  96 + margin: 16rpx 0;
  97 + padding-right: 30rpx;
  98 + line-height: 36rpx;
  99 + color: #333;
  100 + overflow: hidden;
  101 + text-align: justify;
  102 +}
  103 +
  104 +.price {
  105 + display: inline-block;
  106 + color: #f23030;
  107 + /* line-height: 24rpx; */
  108 + /* padding-bottom: 20rpx; */
  109 +}
  110 +
  111 +.comment {
  112 + font-size: 25rpx;
  113 + padding-right: 30rpx;
  114 + margin-top: 4rpx;
  115 +}
  116 +
  117 +
  118 +.viewall-btn {
  119 + margin-top: 20rpx;
  120 + width: 300rpx;
  121 +}
  122 +
  123 +.search-modal {
  124 + /* position: fixed;
  125 + top: 0;
  126 + right: 0;
  127 + left: 0;
  128 + bottom: 0;
  129 + z-index: 20;
  130 + background-color: white;
  131 + overflow-x: hidden;
  132 + padding: 80rpx 30rpx;
  133 + font-size: 30rpx;
  134 + color: #555; */
  135 +}
  136 +
  137 +.search-bar {
  138 + /* width: 100%;
  139 + box-sizing: border-box; */
  140 + background-color: white;
  141 + position: sticky;
  142 + top: 0;
  143 + z-index: 1;
  144 +}
  145 +
  146 +.search-input {
  147 + width: 80%;
  148 + float: left;
  149 + border: 1rpx solid #e0e0e0;
  150 + box-sizing: border-box;
  151 + height: 80rpx;
  152 + padding-left: 20rpx;
  153 + border-top-left-radius: 10rpx;
  154 + border-bottom-left-radius: 10rpx;
  155 +}
  156 +
  157 +.search-btn {
  158 + width: 20%;
  159 + height: 80rpx;
  160 + background-color: #f23030;
  161 + display: inline-block;
  162 + text-align: center;
  163 + border-top-right-radius: 10rpx;
  164 + border-bottom-right-radius: 10rpx;
  165 +}
  166 +
  167 +.search-btn .search-img {
  168 + height: 45rpx;
  169 + width: 45rpx;
  170 + padding: 20rpx;
  171 +}
  172 +
  173 +.search-hot {
  174 + margin-top: 40rpx;
  175 +}
  176 +
  177 +.hot-title {
  178 + font-size: 35rpx;
  179 + color: black;
  180 + /* margin-bottom: 30rpx; */
  181 +}
  182 +
  183 +.hot-row {
  184 + display: flex;
  185 + /*--justify-content: space-between---*/
  186 + padding: 10rpx 0;
  187 +}
  188 +
  189 +.hot-item {
  190 + padding: 6rpx 20rpx;
  191 + border: 2rpx solid #e0e0e0;
  192 + border-radius: 40rpx;
  193 + font-size: 28rpx;
  194 + margin-right: 16rpx;
  195 +}
  196 +
  197 +/* .card_bg {
  198 + display: flex;
  199 + max-width: 110rpx;
  200 + height: 25rpx;
  201 + align-items: center;
  202 + border-radius: 26rpx;
  203 + font-size: 19rpx;
  204 + padding: 2rpx 10rpx;
  205 + background: #333;
  206 + color: #fff;
  207 + justify-content: center;
  208 + margin-left: 8rpx;
  209 + margin-top: 7rpx;
  210 + line-height: 25rpx;
  211 + width: auto;
  212 +} */
  213 +
  214 +.card_bg {
  215 + box-sizing: border-box;
  216 + padding: 2rpx 10rpx;
  217 + /* height: 28rpx; */
  218 + border-radius: 26rpx;
  219 + font-size: 18rpx;
  220 + /* line-height: 28rpx; */
  221 + max-width: 210rpx;
  222 + background: #333;
  223 + color: #fff;
  224 + margin-left: 8rpx;
  225 +}
  226 +
  227 +.card_bg image {
  228 + width: 19rpx;
  229 + height: 19rpx;
  230 + margin-right: 8rpx;
  231 + flex-shrink: 0;
  232 +}
  233 +
  234 +.card_name {
  235 + position: relative;
  236 + top: -4rpx;
  237 +}
  238 +
  239 +/* .card_bg image {
  240 + width: 19rpx;
  241 + height: 19rpx;
  242 + margin-right: 1rpx;
  243 + vertical-align: middle;
  244 +}
  245 +
  246 +.card_bg .card_name {
  247 + max-width: 76rpx;
  248 + width: auto;
  249 + overflow: hidden;
  250 + white-space: nowrap;
  251 +} */
  252 +
  253 +.navigator-hover {
  254 + opacity: 1;
  255 +}
  256 +
  257 +.mk_price {
  258 + margin-left: 10rpx;
  259 + font-size: 25rpx;
  260 +}
  261 +
  262 +.item-cont {
  263 + /* line-height: 38rpx; */
  264 + flex-grow: 1;
  265 +}
  266 +
  267 +.history {
  268 + background-color: #f0f0f0;
  269 + color: #7b7b7b;
  270 + border: none;
  271 + margin-bottom: 16rpx;
  272 +}
  273 +
  274 +.history:first-of-type {
  275 + /* margin-left: 0; */
  276 +}
  277 +
  278 +.input-box {
  279 + position: relative;
  280 + flex: 1;
  281 + padding-left: 50rpx;
  282 + padding-right: 70rpx;
  283 + background-color: #f0f0f0;
  284 + border-radius: 60rpx;
  285 +}
  286 +
  287 +.input-box::before {
  288 + font-family: iconfont;
  289 + position: absolute;
  290 + left: 20rpx;
  291 + top: 50%;
  292 + transform: translateY(-50%);
  293 + content: '\e618';
  294 +}
  295 +
  296 +.input-search {
  297 + position: relative;
  298 + padding: 10rpx;
  299 + font-size: 28rpx;
  300 +}
  301 +
  302 +
  303 +.btn {
  304 + margin-left: 0;
  305 + margin-right: 0;
  306 + line-height: 1;
  307 + padding: 20rpx;
  308 + font-size: 30rpx;
  309 +}
  310 +
  311 +.btn::after {
  312 + border: none;
  313 +}
  314 +
  315 +.icon-guan {
  316 + font-size: 20rpx;
  317 + padding: 10rpx;
  318 + position: absolute;
  319 + right: 20rpx;
  320 + top: 50%;
  321 + transform: translateY(-50%);
  322 +}
  323 +
  324 +.lookat {
  325 + display: inline-block;
  326 + color: #FF6768;
  327 + border: 2rpx solid #FF6768;
  328 + border-radius: 80rpx;
  329 + font-size: 30rpx;
  330 +}
  331 +
  332 +.no-data .no-data-title {
  333 + font-size: 28rpx;
  334 + color: #999;
  335 +}
  336 +
  337 +.mt30 {
  338 + margin-top: 30rpx;
  339 +}
  340 +
  341 +.popup_item {
  342 + display: flex;
  343 + justify-content: space-between;
  344 + margin-top: 30rpx;
  345 +}
  346 +
  347 +.popup_input {
  348 + border-radius: 20rpx;
  349 + width: 40%;
  350 + font-size: 24rpx;
  351 + padding: 10rpx;
  352 + background: #f9f9f9;
  353 +}
  354 +.popup_price1 {
  355 + text-align: center;
  356 + padding: 0 30rpx;
  357 + margin-top: 30rpx;
  358 + background: red;
  359 + border-radius: 20rpx;
  360 +}
  361 +
  362 +.popup_price {
  363 + text-align: center;
  364 + padding: 10rpx 30rpx;
  365 + margin-top: 30rpx;
  366 + background: red;
  367 + border-radius: 35rpx;
  368 +}
  369 +.mask {
  370 + position: fixed;
  371 + top: 0;
  372 + left: 0;
  373 + width: 100%;
  374 + height: 100%;
  375 + z-index: 999;
  376 + background-color: rgba(0,0,0,.4);
  377 + }
  378 +
  379 +.popup_brand {
  380 + display: flex;
  381 + flex-wrap: wrap;
  382 + justify-content: space-between;
  383 +}
  384 +
  385 +.filter {
  386 + height: 100%;
  387 + position: absolute;
  388 + right: 0;
  389 + top: 0;
  390 + background: pink;
  391 + width: 80%;
  392 + z-index: 1000;
  393 + transition: all .5s;
  394 +}
  395 +
  396 +
  397 +@import '../com_screen.wxss';
0 398 \ No newline at end of file
... ...
packageG/pages/payment/pay_success/pay_success.js 0 → 100644
  1 +var e = getApp();
  2 +var regeneratorRuntime = require('../../../../utils/runtime.js');
  3 +var ut = require("../../../../utils/util.js");
  4 +Page({
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + url: e.globalData.setting.imghost,
  10 + resourceUrl: e.globalData.setting.resourceUrl,
  11 + iurl: e.globalData.setting.imghost,
  12 + order:null,
  13 + type:1,
  14 + allmoney:0,
  15 + user_money:0,
  16 + order_sn:"",
  17 + pick:null,
  18 + pre_cut:0,//预存金额
  19 + },
  20 +
  21 + /**
  22 + * 生命周期函数--监听页面加载
  23 + */
  24 + onLoad:async function(options) {
  25 + wx.setNavigationBarTitle({
  26 + title: '支付成功',
  27 + });
  28 + this.setData({
  29 + options,
  30 + });
  31 + var type=options.type,order_sn=options.order_sn;
  32 + var th=this,order=null;
  33 +
  34 + getApp().request.promiseGet("/api/weshop/ad/page?pid=1211&store_id=" + getApp().globalData.setting.stoid, {
  35 + data: {
  36 + enabled: 1
  37 + }
  38 + }).then(res => {
  39 + if (res.data.code == 0 && res.data.data.pageData && res.data.data.pageData.length > 0) {
  40 + var a = res.data.data.pageData;
  41 + var arr = new Array();
  42 + for (var i = 0; i < a.length; i++) {
  43 + var tt = {
  44 + 'ad_code': getApp().globalData.setting.imghost + a[i].ad_code,
  45 + 'media_link': '',
  46 + 'ad_weapplink': a[i].ad_weapplink
  47 + };
  48 + arr.push(tt);
  49 + }
  50 + if (arr.length > 0) th.setData({
  51 + banner: arr,
  52 + });
  53 + }
  54 + })
  55 +
  56 +
  57 +
  58 + // 卡项订单
  59 + if(options.card == 1) {
  60 + let url = '/api/weshop/recharge/user/page'
  61 + let data = {
  62 + store_id: getApp().globalData.setting.stoid,
  63 + user_id: getApp().globalData.userInfo.user_id,
  64 + order_id: this.data.options.order_id,
  65 + };
  66 +
  67 + // 请求数据
  68 + getApp().promiseGet(url, {
  69 + data: data,
  70 + }).then(res => {
  71 + if (res.data.code == 0) {
  72 + console.log('请求成功', res);
  73 + this.setData({
  74 + order: res.data.data.pageData[0],
  75 + order_sn: res.data.data.pageData[0].order_sn,
  76 + });
  77 + } else {
  78 + throw (res);
  79 + };
  80 + }).catch(err => {
  81 + wx.showToast({
  82 + title: err.data.data,
  83 + icon: 'error',
  84 + });
  85 + });
  86 + } else {
  87 +
  88 + //如果是等1,就是单个订单的订单号
  89 + if(type==1){
  90 + await getApp().request.promiseGet("/api/weshop/order/page",
  91 + {data:{store_id:e.globalData.setting.stoid,order_sn:order_sn}}).then(res=>{
  92 + if(ut.ajax_ok(res)){
  93 + order=res.data.data.pageData[0];
  94 + th.setData({order:order,order_sn:order_sn})
  95 + }
  96 +
  97 + })
  98 + }else{
  99 + await getApp().request.promiseGet("/api/weshop/order/page",
  100 + {data:{store_id:e.globalData.setting.stoid,parent_sn:order_sn}}).then(res=>{
  101 +
  102 + if(ut.ajax_ok(res)){
  103 + var allmoney=0,user_money=0;
  104 + for(var i in res.data.data.pageData){
  105 + var item=res.data.data.pageData[i];
  106 + allmoney+=item.order_amount;
  107 + user_money += item.user_money?item.user_money:0;
  108 + }
  109 + order=res.data.data.pageData[0];
  110 + th.setData({ order: order, type: 2, allmoney: allmoney, order_sn: order_sn, user_money: user_money})
  111 + }
  112 +
  113 +
  114 + })
  115 + }
  116 + //--获取门店--
  117 + if(order.exp_type==1) {
  118 + await getApp().request.promiseGet("/api/weshop/pickup/get/"+ e.globalData.setting.stoid+"/"+order.pickup_id,
  119 + {1:1}).then(res => {
  120 + th.setData({pick:res.data.data})
  121 + });
  122 + };
  123 + //--只使用预存支付,达到免单时要请求预存使用额度----
  124 + if(order.order_amount==0 && order.user_money==0){
  125 + await getApp().request.promiseGet("/api/weshop/orderMore/get/"+ e.globalData.setting.stoid+"/"+order_sn,{1:1}).then(res => {
  126 + if(res.data && res.data.code==0 && res.data.data){
  127 + let pre_cut=res.data.data.pre_cut
  128 + th.setData({pre_cut})
  129 + }
  130 + });
  131 + }
  132 +
  133 + };
  134 +
  135 +
  136 +
  137 + },
  138 +
  139 + goto: function() {
  140 + var url= '/pages/index/index/index';
  141 + getApp().goto(url)
  142 + },
  143 +
  144 + gotoshequn:function(e){
  145 + getApp().goto(e.currentTarget.dataset.url);
  146 + },
  147 +
  148 +
  149 +})
0 150 \ No newline at end of file
... ...
packageG/pages/payment/pay_success/pay_success.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "支付成功"
  3 +}
0 4 \ No newline at end of file
... ...
packageG/pages/payment/pay_success/pay_success.wxml 0 → 100644
  1 +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
  2 +<view>
  3 + <!-- 支付成功提示 -->
  4 + <view class="payradio">
  5 + <!-- 提示框 -->
  6 + <view class="Success_box flex-center">
  7 + <view>
  8 + <view class="flex-center">
  9 + <image src="{{url}}miniapp/images/pay/paysuccess.png"></image>
  10 + </view>
  11 + <view class="Success_box_title fs32">订单支付成功!</view>
  12 + </view>
  13 + </view>
  14 +
  15 +
  16 + <!-- 链接 -->
  17 + <view class="fs28 pd20" style="padding-top: 0;">
  18 + <view class="flex-center">
  19 +
  20 + <block wx:if="{{options.card == 1}}">
  21 + <!-- <view class="flex-center"> -->
  22 + <navigator class="btn border c-6" url="/packageA/pages/details_serviceCard/details_serviceCard?order_id={{order.order_id}}">
  23 + <view>订单详情</view>
  24 + </navigator>
  25 + <!-- </view> -->
  26 + <!-- <view class="flex-center"> -->
  27 + <navigator class="btn bg-red white mgl20" url="/pages/user/my_service/i_service">
  28 + <view>立即预约</view>
  29 + </navigator>
  30 + <!-- </view> -->
  31 + </block>
  32 +
  33 + <block wx:else>
  34 +
  35 + <navigator class="btn border c-6" bindtap="goto">
  36 + <view>回到首页</view>
  37 + </navigator>
  38 + <navigator class="btn bg-yellow white mgl20" url="/pages/user/order_list/order_list">
  39 + <view>查看订单</view>
  40 + </navigator>
  41 + </block>
  42 +
  43 + </view>
  44 +
  45 + </view>
  46 +
  47 +
  48 + <!-- 支付信息 -->
  49 + <view class="payitem_max fs28">
  50 + <!-- 订单编号 -->
  51 + <view class="payitem flex">
  52 + <view>订单编号 :</view>
  53 + <text selectable="true">{{order_sn}}</text>
  54 + </view>
  55 +
  56 + <!-- 实付金额 -->
  57 +
  58 + <view class="payitem flex">
  59 + <view>实付金额 :</view>
  60 + <!-- {{filters.toFix()}} -->
  61 + <!-- 卡项订单 -->
  62 + <view class="pay_money" wx:if="{{options.card == 1}}">{{filters.toFix(order.account,2) }}元</view>
  63 +
  64 + <block wx:else>
  65 + <view class="pay_money" wx:if="{{type==1}}">
  66 + <view wx:if="{{order.order_amount==0 && order.user_money==0 && pre_cut>0}}">{{filters.toFix(pre_cut,2)}}元</view>
  67 + <view wx:else>{{filters.toFix(order.order_amount+order.user_money+order.pt_tail_money,2)}}元</view>
  68 + </view>
  69 + <view class="pay_money" wx:else>
  70 + <view wx:if="{{order.order_amount==0 && order.user_money==0 && pre_cut>0}}">{{filters.toFix(pre_cut,2)}}元</view>
  71 + <view wx:else>{{filters.toFix(allmoney+user_money,2) }}元</view>
  72 + </view>
  73 + </block>
  74 + </view>
  75 +
  76 + <!-- 支付方式 -->
  77 + <view class="payitem flex" wx:if="{{options.card == 1}}">
  78 + <view>支付方式 :</view>
  79 + <view>微信支付</view>
  80 + </view>
  81 +
  82 + <block wx:else>
  83 + <view class="payitem flex" wx:if="{{type==1}}">
  84 + <view>支付方式 :</view>
  85 + <view wx:if="{{order.order_amount>0 && order.user_money>0 }}">微信支付,余额支付</view>
  86 + <view wx:elif="{{order.order_amount>0}}">微信支付</view>
  87 + <view wx:elif="{{order.user_money>0}}">余额支付</view>
  88 + <view wx:else>
  89 + <view wx:if="{{pre_cut>0}}">预存抵扣</view>
  90 + <view wx:else>免单</view>
  91 + </view>
  92 + </view>
  93 + <view class="payitem flex" wx:else>
  94 + <view>支付方式 :</view>
  95 + <view wx:if="{{allmoney>0 && user_money>0 }}">微信支付,余额支付</view>
  96 + <view wx:elif="{{allmoney>0}}">微信支付</view>
  97 + <view wx:elif="{{user_money>0}}">余额支付</view>
  98 + <view wx:else>
  99 + <view wx:if="{{pre_cut>0}}">预存抵扣</view>
  100 + <view wx:else>免单</view>
  101 + </view>
  102 + </view>
  103 + </block>
  104 +
  105 +
  106 +
  107 +
  108 + </view>
  109 + </view>
  110 + <view class="flex-level">
  111 + <view class="line"></view>
  112 + </view>
  113 +
  114 +
  115 +
  116 + <!-- 跳转链接 -->
  117 + <view>
  118 + <!-- 个人收货信息 -->
  119 + <view class="pay_User fs28" wx:if="{{order.exp_type==0 || order.exp_type==2 }}">
  120 + <view class="payitem flex">
  121 + <view class="pay_Receiving">收货人 :</view>
  122 + <view class="pay_name ellipsis-1">{{order.consignee}}</view>
  123 + <view>{{order.mobile}}</view>
  124 + </view>
  125 + <view class="payitem flex">
  126 + <view class="pay_Receiving">收货地址 :</view>
  127 + <view class="address ellipsis-2">{{order.more_address+order.address}}</view>
  128 + </view>
  129 + </view>
  130 +
  131 + <!-- 收货门店信息 -->
  132 + <view class="pay_User fs28" wx:else>
  133 + <view class="payitem flex">
  134 + <view class="pay_Receiving">门店 :</view>
  135 + <view class="pay_name ellipsis-1" wx:if="{{options.card == 1}}">{{order.list[0].pickup_name}}</view>
  136 + <view class="pay_name ellipsis-1" wx:else>{{pick.pickup_name}}</view>
  137 + </view>
  138 + <view class="payitem flex">
  139 + <view class="pay_Receiving">门店地址 :</view>
  140 + <view class="pay_name" wx:if="{{options.card == 1}}">{{order.list[0].fulladdress}}</view>
  141 + <view class="address ellipsis-2" wx:else>{{pick.fulladdress}}</view>
  142 + </view>
  143 + </view>
  144 +
  145 + </view>
  146 +</view>
  147 +
  148 +
  149 +<view class="shequn" style="margin-top:20rpx;" bindtap="gotoshequn" wx:if="{{banner}}" data-url="{{banner[0].ad_weapplink}}">
  150 + <image src="{{banner[0].ad_code}}" mode="scaleToFill" style="width: 100%;border-radius: 15rpx;" />
  151 +</view>
0 152 \ No newline at end of file
... ...
packageG/pages/payment/pay_success/pay_success.wxss 0 → 100644
  1 +page {
  2 + border-top: 2rpx solid rgb(245, 245, 245);
  3 +}
  4 +.line {
  5 + border-top: 2rpx solid rgb(245, 245, 245);
  6 + width: 700rpx;
  7 +}
  8 +
  9 +.payradio .Success_box {
  10 + padding-top: 45rpx;
  11 + padding-bottom: 45rpx;
  12 +}
  13 +
  14 +.payradio .Success_box .Success_box_title {
  15 + margin-top: 45rpx;
  16 + color: rgb(8, 8, 8);
  17 +}
  18 +
  19 +.payradio image {
  20 + width: 140rpx;
  21 + height: 140rpx;
  22 + display: flex;
  23 +}
  24 +
  25 +.payitem_max {
  26 + padding: 0rpx 55rpx;
  27 + color: rgb(104, 104, 104);
  28 + padding-bottom: 30rpx;
  29 +}
  30 +
  31 +.payitem_max .payitem {
  32 + margin-top: 30rpx;
  33 +}
  34 +
  35 +.payitem_max .payitem .pay_nam {
  36 + width: 200rpx;
  37 +}
  38 +
  39 +.payitem_max .payitem view {
  40 + margin-right: 50rpx;
  41 +}
  42 +.pay_money{
  43 + color: rgb(219, 27, 52);
  44 +}
  45 +
  46 +.pay_User {
  47 + padding-left: 55rpx;
  48 + color: rgb(104, 104, 104);
  49 +}
  50 +
  51 +.pay_User .payitem {
  52 + margin-top: 30rpx;
  53 +}
  54 +
  55 +.pay_User .payitem .pay_Receiving {
  56 + width: 128rpx;
  57 + margin-right: 50rpx;
  58 +}
  59 +
  60 +.pay_User .payitem .pay_name {
  61 + margin-right: 38rpx;
  62 + /* max-width: 250rpx; */
  63 +}
  64 +
  65 +.btn {
  66 + box-sizing: border-box;
  67 + height: 75rpx;
  68 + line-height: 75rpx;
  69 + /* padding: 10rpx; */
  70 + text-align: center;
  71 + border-radius: 20rpx;
  72 + padding: 0 40rpx;
  73 +}
  74 +
  75 +.pay_home {
  76 + /* margin-top: 35rpx; */
  77 + color: rgb(255, 255, 255);
  78 + /* width: 566rpx;
  79 + height: 68rpx; */
  80 + border-radius: 30rpx;
  81 + background-color: rgb(219, 27, 52);
  82 +}
  83 +.address{
  84 + width: 470rpx;
  85 +}
  86 +
  87 +.bg-red {
  88 + background-color: rgb(219, 27, 52);
  89 +}
  90 +
  91 +.bg-yellow {
  92 + background-color: #feca53;
  93 +}
  94 +
  95 +.border {
  96 + border: 2rpx solid #ccc;
  97 +}
  98 +
  99 +
  100 +.shequn{
  101 + width: 94%;
  102 + margin:0 23rpx 23rpx 23rpx;
  103 + min-height: 260rpx;
  104 + background: white;
  105 + border-radius: 15rpx;
  106 + display: flex;
  107 +}
  108 +
  109 +.shequnleft{
  110 + display: block;
  111 + width: 60%;
  112 + margin: 30rpx;
  113 +}
  114 +.shequnleft .one1{
  115 + display: flex;
  116 + width: 100%;
  117 + height: 110rpx;
  118 + line-height: 110rpx;
  119 + margin-top: -15rpx;
  120 + font-size: 30rpx;
  121 + color: #313131;
  122 + font-weight: bold;
  123 +}
  124 +.shequnleft .one2{
  125 + display: flex;
  126 + width: 100%;
  127 + color: #f39700;
  128 + font-size: 24rpx;
  129 +}
  130 +.shequnleft .one3{
  131 + display: flex;
  132 + width: 100%;
  133 + color: #313131;
  134 + font-size: 24rpx;
  135 +}
  136 +.shequnright{
  137 + display: flex;
  138 + width: 40%;
  139 + justify-content: center;
  140 + align-items: center;
  141 +}
  142 +
  143 +.shequnright image{
  144 + width: 150rpx;
  145 + height: 150rpx;
  146 +}
... ...
packageG/pages/user/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: "/packageG/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 + VipId:getApp().globalData.userInfo.erpvipid,
  435 + }
  436 + }).then(res => {
  437 + wx.hideLoading();
  438 + if (res.data.code == 0) {
  439 + th.setData({
  440 + beautician_list: res.data.data
  441 + })
  442 + if (res.data.data.length < 1) {
  443 + getApp().my_warnning("暂无美容师", 0, th);
  444 + th.settime();
  445 + } else {
  446 + if (th.data.beautician == 0) {
  447 + th.setData({
  448 + beautician: 1,
  449 + })
  450 + } else {
  451 + th.setData({
  452 + beautician: 0,
  453 + })
  454 + }
  455 + }
  456 + } else {
  457 + getApp().my_warnning(res.data.msg, 0, th);
  458 + th.settime();
  459 + }
  460 + })
  461 + }
  462 + },
  463 + choice_beautician: function(e) {
  464 + var th = this;
  465 + var bea_index = e.currentTarget.dataset.baaindex;
  466 + var bea_name = th.data.beautician_list[bea_index].StaffName;
  467 + var BeauticianID = th.data.beautician_list[bea_index].staffid;
  468 + var StorageId=th.data.beautician_list[bea_index].StorageId
  469 +
  470 + th.setData({
  471 + beautician_name: bea_name,
  472 + beautician: 0,
  473 + bea_index: bea_index,
  474 + beauticianID: BeauticianID,
  475 + time: "",
  476 + tment_count: "",
  477 + is_textea: 1,
  478 + StorageId:StorageId
  479 + })
  480 +
  481 + },
  482 + //获取搜索门店输入的值
  483 + input_store: function(e) {
  484 + this.setData({
  485 + key_word: e.detail.value
  486 + })
  487 + },
  488 + //搜索门店
  489 + search_store: function() {
  490 + var th = this;
  491 + var key_word = th.data.key_word;
  492 + var store_list = th.data.store_list;
  493 + th.setData({
  494 + curpage: 1,
  495 + is_search: 0,
  496 + store_list: []
  497 + })
  498 + wx.showLoading({
  499 + title: '加载中',
  500 + })
  501 + th.query_store();
  502 + },
  503 + //美容师预约跳转页面
  504 + nav_bea: function() {
  505 + var th = this;
  506 + th.setData({
  507 + beautician: 0
  508 + })
  509 + var storageId = th.data.storageId; //线下门店id
  510 + var itemId = th.data.itemId; //服务id
  511 + var project_id = th.data.project_id;
  512 + if (storageId == "") {
  513 + getApp().my_warnning("请选择服务门店", 0, th);
  514 + th.settime();
  515 + } else {
  516 + th.setData({
  517 + is_textea: 1
  518 + })
  519 + wx.navigateTo({
  520 + url: "/packageG/pages/user/my_service/cosmetology_list?" + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id
  521 + });
  522 +
  523 + }
  524 + },
  525 + /**
  526 + * 生命周期函数--监听页面加载
  527 + */
  528 + onLoad: function(options) {
  529 + var th = this;
  530 + th.setData({
  531 + itemId: options.service_id,
  532 + buyType: options.BuyType,
  533 + project_id: options.ProjectID,
  534 + validay: options.Validay
  535 + })
  536 + wx.getLocation({
  537 + type: 'gcj02',
  538 + success: function(res) {
  539 + th.data.lat = res.latitude;
  540 + th.data.lon = res.longitude;
  541 + th.data.is_get_local_ok = 1;
  542 + th.setData({
  543 + is_gps: 1
  544 + });
  545 + },
  546 + fail: function(res) {
  547 + if (res.errCode == 2) {
  548 + th.setData({
  549 + is_gps: 0
  550 + });
  551 + if (th.data.is_gps == 0) {
  552 + getApp().confirmBox("请开启GPS定位", null, 25000, !1);
  553 + th.settime();
  554 + }
  555 + } else {
  556 + th.setData({
  557 + is_gps: "3"
  558 + });
  559 + }
  560 +
  561 + th.data.is_get_local_ok = 1;
  562 + }
  563 + })
  564 + //获取上一次的预约
  565 + this.get_fir_service();
  566 +
  567 + },
  568 + //查询剩下可预约人数
  569 + query_more: function() {
  570 + var th = this;
  571 + var url = "/api/weshop/marketing/reservation/can/reservation/countnew";
  572 + var beauticianID = th.data.beauticianID; //美容师id
  573 + var projectID = th.data.itemId; //服务id
  574 + var seekTime = th.data.time; //预约日期
  575 + var storageId = th.data.storageId; //门店id
  576 + var storeId = a.stoid; //商家id
  577 + getApp().request.promiseGet(url, {
  578 + data: {
  579 + beauticianId: beauticianID,
  580 + seekTime: seekTime,
  581 + serviceId: projectID,
  582 + storageId: storageId,
  583 + storeId: storeId
  584 + }
  585 + }).then(res => {
  586 + if (res.data.code == 0) {
  587 + var tment_count = res.data.data.CanReservation;
  588 + th.setData({
  589 + tment_count: tment_count
  590 + })
  591 + } else {
  592 + getApp().my_warnning(res.data.msg, 0, th);
  593 + th.settime();
  594 + }
  595 + })
  596 +
  597 + },
  598 + /**
  599 + * 生命周期函数--监听页面显示
  600 + */
  601 + onShow: function() {
  602 + var th = this;
  603 + var seekTime = th.data.time; //预约日期
  604 + if (seekTime != "") {
  605 + th.query_more();
  606 + }
  607 + th.setData({
  608 + time: th.data.time.substring(0, 16),
  609 + is_textea: 1
  610 + })
  611 + th.query_project();
  612 + },
  613 + //获取单个服务项目信息
  614 + query_project: function() {
  615 + var th = this;
  616 + var url = "/api/weshop/marketing/reservation/sm/page"; //获取服务项目接口
  617 + var project_id = th.data.project_id; //服务项目id
  618 + getApp().request.promiseGet(url, {
  619 + data: {
  620 + storeId: a.stoid,
  621 + userId: d.user_id,
  622 + projectId: project_id
  623 + }
  624 + }).then(res => {
  625 + if (res.data.code == 0) {
  626 + th.setData({
  627 + validay: res.data.data.pageData[0].Validay
  628 + })
  629 + } else {
  630 + getApp().my_warnning(res.data.msg, 0, th);
  631 + th.settime();
  632 + }
  633 + })
  634 + },
  635 + //关闭导航
  636 + close: function() {
  637 + var th = this;
  638 + var nav_b = th.selectComponent("#nav_b"); //组件的id
  639 + nav_b.close_box();
  640 + },
  641 +
  642 + //判断分享的导购是不是有门店,是不是该门店下又该会员
  643 + check_firleader(data){
  644 + var th=this;
  645 + var itemId = this.data.itemId; //服务id
  646 + var url = "/api/weshop/marketing/reservation/storage/pagenew";
  647 + var key_word = data.store_name;
  648 + key_word = key_word.replace(/\s+/g, "");
  649 + var usr=getApp().globalData.userInfo;
  650 + getApp().request.promiseGet(url, {
  651 + data: {
  652 + userId: usr.user_id,
  653 + storeId: os.stoid,
  654 + serviceId: itemId,
  655 + page: 1,
  656 + pageSize: 1000,
  657 + keyWord: key_word
  658 + }
  659 + }).then(res => {
  660 + //-- 如果是门店的话 --
  661 + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length) {
  662 + var store_data=null;
  663 + for(var i in res.data.data.pageData){
  664 + var it=res.data.data.pageData[i];
  665 + if(it.Id==data.StorageId){
  666 + store_data={
  667 + store_name: data.store_name,
  668 + storageId: data.StorageId,
  669 + };
  670 + break;
  671 + }
  672 + }
  673 + if(!store_data) return false;
  674 + th.setData(store_data)
  675 +
  676 + }else{
  677 + return false;
  678 + }
  679 +
  680 + //导购接口地址
  681 + var url = "/api/weshop/marketing/reservation/staff/pagenew";
  682 + return getApp().request.promiseGet(url, {
  683 + isShowLoading:1,
  684 + data: {
  685 + storeId: os.stoid,
  686 + userId: usr.user_id,
  687 + serviceId: itemId,
  688 + storageId: data.StorageId
  689 + }
  690 + })
  691 + }).then(res=>{
  692 + if (res && res.data && res.data.code == 0) {
  693 + var beautician_list=res.data.data;
  694 + for(var i in beautician_list){
  695 + var item=beautician_list[i];
  696 + if(item.staffid==data.beauticianID){
  697 + th.setData({
  698 + beautician_name:data.beautician_name,
  699 + beauticianID:data.beauticianID,
  700 + })
  701 + break;
  702 + }
  703 + }
  704 +
  705 + }
  706 + })
  707 + },
  708 +
  709 + //获取上一次预约的信息
  710 + get_fir_service:function (){
  711 + var th=this;
  712 + var usr=getApp().globalData.userInfo;
  713 + if(!usr) return false;
  714 +
  715 + getApp().promiseGet("/api/weshop/marketing/reservation/reservation/page",{
  716 + data:{storeId:os.stoid,userId:usr.user_id,projectId:th.data.project_id}
  717 + }).then(res=>{
  718 + if(res.data.code==0 && res.data.data && res.data.data.pageData ){
  719 + var ppdata= res.data.data.pageData[0];
  720 + var data={
  721 + store_name:ppdata.StorageName,
  722 + beautician_name:ppdata.BeauticianName,
  723 + beauticianID:ppdata.BeauticianID,
  724 + StorageId:ppdata.StorageID,
  725 + }
  726 + //检查门店和导购能不能默认使用
  727 + th.check_firleader(data);
  728 + };
  729 + })
  730 + }
  731 +
  732 +
  733 +
  734 +})
0 735 \ No newline at end of file
... ...
packageG/pages/user/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 8 \ No newline at end of file
... ...
packageG/pages/user/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="/packageG/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="/packageG/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 153 \ No newline at end of file
... ...
packageG/pages/user/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 +}
... ...
packageG/pages/user/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 + VipId:options.VipId,
  56 + })
  57 + if (options.url != undefined) {
  58 + th.setData({
  59 + url: options.url
  60 + })
  61 + }
  62 + if (options.number != undefined) {
  63 + th.setData({
  64 + number: options.number
  65 + })
  66 + }
  67 + if (options.iscos != undefined) {
  68 + th.setData({
  69 + iscos: options.iscos
  70 + })
  71 + }
  72 + if (options.StaffName != undefined) {
  73 + th.setData({
  74 + StaffName: options.StaffName
  75 + })
  76 + }
  77 + th.query_beatea(th.query_aweek);
  78 + },
  79 + /**
  80 + * 生命周期函数--监听页面显示
  81 + */
  82 + onShow: function () {
  83 + var th = this;
  84 + //获取当前时间
  85 + var myDate = new Date();
  86 + // var date = myDate.getHours(); //获取当前小时数(0-23);
  87 + let str = myDate.toTimeString(); //"10:55:24 GMT+0800 (中国标准时间)"
  88 + let date = str.substring(0, 8); // '10:55:24'
  89 + th.setData({
  90 + hours: date
  91 + });
  92 + },
  93 +
  94 + //图片失败,默认图片
  95 + bind_bnerr1: function (e) {
  96 + var _errImg = e.target.dataset.errorimg;
  97 + var _Img = e.target.dataset.img;
  98 + if (_Img != undefined) {
  99 + var _errObj = {};
  100 + _errObj[_errImg] = "/miniapp/images/no-head.jpg";
  101 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  102 + }
  103 + },
  104 + //选择服务日期
  105 + check_date: function (e) {
  106 + var th = this;
  107 + var id = e.currentTarget.dataset.dateid;
  108 + var date_id = th.data.date_id;
  109 + var seekTime = th.data.aweeks[id].time;
  110 + if (id != date_id) {
  111 + th.setData({
  112 + date_id: id,
  113 + seekTime: seekTime
  114 + })
  115 + th.query_date();
  116 + }
  117 + },
  118 + //获取美容师信息
  119 + query_beatea: function (func) {
  120 + var th = this;
  121 + var url = "/api/weshop/marketing/reservation/staff/get"; //接口路径
  122 + var beautician_id = th.data.beautician_id;
  123 + getApp().request.promiseGet(url, {
  124 + data: {
  125 + beauticianId: beautician_id,
  126 + storeId: a.stoid,
  127 + }
  128 + }).then(res => {
  129 + if (res.data.code == 0) {
  130 + var data = res.data.data;
  131 + var ob = {
  132 + name: data.StaffName,
  133 + comment: data.Remark1,
  134 + head_img: data.PhotoUrl
  135 + };
  136 + if (!th.data.storageId) {
  137 + ob.storageId = data.StorageId;
  138 + }
  139 + th.setData(ob);
  140 + func();
  141 + } else {
  142 + getApp().my_warnning(res.data.msg, 0, th);
  143 + }
  144 + })
  145 + },
  146 + //返回上个页面
  147 + navigateBack: function () {
  148 + var th = this;
  149 + var modify = th.data.modify; //是否是更改时间
  150 + var seekTime = th.data.seekTime; //选择的日期
  151 + var time_list = th.data.time_list;
  152 + var time_index = th.data.time_index;
  153 + if (time_index == -1) {
  154 + getApp().my_warnning("请选择预约时间", 0, th);
  155 + return false;
  156 + }
  157 + var date_id = th.data.date_id;
  158 + var date = th.data.aweeks[date_id].time;
  159 + var time = date + " " + time_list[time_index] + ":00";
  160 + if (modify == 1) {
  161 + var json = {
  162 + "arrangeTime": time,
  163 + "number": th.data.number,
  164 + "remark": "更改时间",
  165 + "states": 0,
  166 + "storeId": a.stoid,
  167 + };
  168 + var data = JSON.stringify(json);
  169 + var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址
  170 + wx.request({
  171 + url: url,
  172 + data: data,
  173 + method: 'put',
  174 + header: {
  175 + 'content-type': 'application/json'
  176 + }, // 设置请求的 header
  177 + success: function (res) {
  178 + if (res.data.code == 0) {
  179 + getApp().my_warnning(res.data.data, 1, th);
  180 + setTimeout(function () {
  181 + wx.navigateBack({
  182 + //返回
  183 + delta: 1
  184 + })
  185 + }, 1000);
  186 + } else {
  187 + getApp().my_warnning(res.data.msg, 0, th);
  188 + }
  189 + }
  190 + })
  191 + } else {
  192 + var pages = getCurrentPages(); //当前页面
  193 + var iscos = th.data.iscos;
  194 + var delta = 1;
  195 + if (Number(iscos) == 1) {
  196 + delta = delta + Number(iscos); //返回哪个页面
  197 + var prevPage = pages[pages.length - 2 - Number(iscos)]; //上一页面
  198 + prevPage.setData({
  199 + //直接给上一个页面赋值
  200 + time: time,
  201 + beautician_name: th.data.StaffName,
  202 + beauticianID: th.data.beautician_id
  203 + });
  204 + wx.navigateBack({
  205 + //返回
  206 + delta: 2
  207 + })
  208 + } else {
  209 + var prevPage = pages[pages.length - 2]; //上一页面
  210 + prevPage.setData({
  211 + //直接给上一个页面赋值
  212 + time: time
  213 + });
  214 + wx.navigateBack({
  215 + //返回
  216 + delta: 1
  217 + })
  218 + }
  219 + }
  220 + },
  221 + //选择时间
  222 + Selection_time: function (e) {
  223 + var th = this;
  224 + var index = e.currentTarget.dataset.index;
  225 + var time_index = th.data.time_index;
  226 + if (index == time_index) {
  227 + return false;
  228 + } else {
  229 + th.setData({
  230 + time_index: index
  231 + })
  232 + }
  233 + },
  234 + //查询七天预约时间
  235 + query_aweek: function () {
  236 + var th = this;
  237 + var beautician_id = th.data.beautician_id; //美容师id
  238 + var storageId = th.data.storageId;
  239 +
  240 + var itemId = th.data.itemId; //服务id
  241 + var projectId = th.data.projectId; //项目id
  242 + var number = th.data.number; //预约单号
  243 + var url = "/api/weshop/marketing/reservation/staff/seven/time/listnew"; //接口地址
  244 + getApp().request.promiseGet(url, {
  245 + data: {
  246 + projectId: projectId,
  247 + beauticianId: beautician_id,
  248 + serviceId: itemId,
  249 + storeId: a.stoid,
  250 + storageId: storageId,
  251 + number: number,
  252 + VipId: getApp().globalData.userInfo.erpvipid,
  253 + }
  254 + }).then(res => {
  255 + if (res.data.code == 0) {
  256 + var data = res.data.data;
  257 + var arr = [];
  258 + for (var i in data) {
  259 + var em = {
  260 + "time": i,
  261 + "val": data[i]
  262 + };
  263 + arr.push(em);
  264 + }
  265 + arr.sort(th.sort_arr);
  266 + var weeks = ["今天", "明天", "后天"];
  267 + var week = "";
  268 + for (var i = 3; i < arr.length; i++) {
  269 + var date = new Date(arr[i].time);
  270 + if (date.getDay() == 0) week = "周日"
  271 + if (date.getDay() == 1) week = "周一"
  272 + if (date.getDay() == 2) week = "周二"
  273 + if (date.getDay() == 3) week = "周三"
  274 + if (date.getDay() == 4) week = "周四"
  275 + if (date.getDay() == 5) week = "周五"
  276 + if (date.getDay() == 6) week = "周六"
  277 + weeks[i] = week;
  278 + }
  279 + th.setData({
  280 + aweeks: arr,
  281 + weeks: weeks
  282 + })
  283 + th.query_date();
  284 +
  285 + } else {
  286 + getApp().my_warnning(res.data.msg, 0, th);
  287 + }
  288 + })
  289 +
  290 + },
  291 +
  292 + query_date: function () {
  293 + var th = this;
  294 + var projectId = th.data.projectId;
  295 + var date_id = th.data.date_id; //日期下标
  296 + var SeekTime = th.data.aweeks[date_id].time;
  297 + var val = th.data.aweeks[date_id].val;
  298 + var number = th.data.number; //预约单号
  299 + var url = "/api/weshop/marketing/reservation/staff/time/listnew";
  300 + getApp().request.promiseGet(url, {
  301 + data: {
  302 + projectId: projectId,
  303 + staffId: th.data.beautician_id,
  304 + storageId: th.data.storageId,
  305 + serviceId: th.data.itemId,
  306 + seekTime: SeekTime,
  307 + storeId: a.stoid,
  308 + number: number,
  309 + VipId: getApp().globalData.userInfo.erpvipid,
  310 + }
  311 + }).then(res => {
  312 + if (res.data.code == 0) {
  313 + var hours = th.data.hours;
  314 + var time_list = res.data.data;
  315 + var time = th.data.time;
  316 + var date_id = th
  317 + var new_time = [];
  318 + var date = th.data.hours.substring(0, 2);
  319 +
  320 + //不等于空就是有可以预约的时间
  321 + if (time_list != null) {
  322 + if (res.data.data && res.data.data[0] != undefined) {
  323 + if (res.data.data[0].GroupHour && res.data.data[0].GroupHour.length > 11) {
  324 + getApp().my_warnning(res.data.data[0].GroupHour, 0, th);
  325 + }
  326 + }
  327 + //循环固定和可预约的时间
  328 + for (var i = 0; i < time.length; i++) {
  329 + for (var ii = 0; ii < time_list.length; ii++) {
  330 + //判断固定的时间和可以预约的时间
  331 + if (time[i] == time_list[ii].begintime.substring(0, 5)) {
  332 + var date_id = th.data.date_id;
  333 + if (date > time_list[ii].begintime.substring(0, 2) && date_id == 0) {
  334 + new_time[i] = "";
  335 + break;
  336 + } else {
  337 + new_time[i] = time_list[ii].begintime.substring(0, 5);
  338 + break;
  339 + }
  340 + } else {
  341 + new_time[i] = "";
  342 + }
  343 + }
  344 + }
  345 + } else {
  346 + for (var i = 0; i < time.length; i++) {
  347 + new_time[i] = "";
  348 + }
  349 + }
  350 + th.setData({
  351 + time_list: new_time,
  352 + })
  353 + } else {
  354 + getApp().my_warnning(res.data.msg, 0, th);
  355 + }
  356 + })
  357 +
  358 + },
  359 + //更改预约时间
  360 + change_time: function () {
  361 + var th = this;
  362 + var seekTime = th.data.seekTime; //选择的日期
  363 + var time_list = th.data.time_list;
  364 + var time_index = th.data.time_index;
  365 + var time = time_list[time_index];
  366 + var number = th.data.number; //预约单号
  367 + var json = {
  368 + "arrangeTime": seekTime + " " + time,
  369 + "number": number,
  370 + "remark": "更改预约时间",
  371 + "states": 0,
  372 + "storeId": a.stoid
  373 + };
  374 + var data = JSON.stringify(json);
  375 + var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址
  376 + wx.request({
  377 + url: url,
  378 + data: data,
  379 + method: 'put',
  380 + header: {
  381 + 'content-type': 'application/json'
  382 + }, // 设置请求的 header
  383 + success: function (res) {
  384 + if (res.data.code == 0) {
  385 + getApp().my_warnning("更改成功", 0, th);
  386 + } else {
  387 + getApp().my_warnning(res.data.msg, 0, th);
  388 + }
  389 + }
  390 + })
  391 + },
  392 + //预览头像
  393 + previewImage: function (e) {
  394 + var th = this;
  395 + var current = e.currentTarget.dataset.src;
  396 + getApp().globalData.no_clear=1;
  397 + wx.previewImage({
  398 + current: current, // 当前显示图片的http链接
  399 + urls: [th.data.head_img] // 需要预览的图片http链接列表
  400 + })
  401 + },
  402 +
  403 + sort_arr: function (a, b) {
  404 + a = a['time'];
  405 + b = b['time'];
  406 + if (a < b) {
  407 + return -1;
  408 + }
  409 + if (a > b) {
  410 + return 1;
  411 + }
  412 + return 0;
  413 + },
  414 +
  415 + check_is_in_arr: function (val, pdata) {
  416 + if (!val || !pdata) return false;
  417 + for (var i in pdata) {
  418 + if (pdata[i].begintime.indexOf(val) != -1) {
  419 + return true;
  420 + }
  421 + }
  422 + return false;
  423 + }
  424 +
  425 +
  426 +
  427 +})
0 428 \ No newline at end of file
... ...
packageG/pages/user/my_service/beauty_deta.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "美容师详情",
  3 + "usingComponents": {
  4 + "warn": "/components/long_warn/long_warn"
  5 + }
  6 +}
0 7 \ No newline at end of file
... ...
packageG/pages/user/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 78 \ No newline at end of file
... ...
packageG/pages/user/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 +}
... ...
packageG/pages/user/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 109 \ No newline at end of file
... ...
packageG/pages/user/my_service/cosmetology_list.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "美容师列表",
  3 + "usingComponents": {
  4 + "warn": "/components/long_warn/long_warn"
  5 + }
  6 +}
0 7 \ No newline at end of file
... ...
packageG/pages/user/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="/packageG/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 66 \ No newline at end of file
... ...
packageG/pages/user/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 +}
... ...
packageG/pages/user/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 231 \ No newline at end of file
... ...
packageG/pages/user/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 10 \ No newline at end of file
... ...
packageG/pages/user/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="/packageG/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="/packageG/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 105 \ No newline at end of file
... ...
packageG/pages/user/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 153 \ No newline at end of file
... ...
packageG/pages/user/userinfo/userinfo.js 0 → 100644
  1 +function e(e, a, r) {
  2 + return a in e ? Object.defineProperty(e, a, {
  3 + value: r,
  4 + enumerable: !0,
  5 + configurable: !0,
  6 + writable: !0
  7 + }) : e[a] = r, e;
  8 +}
  9 +
  10 +var a = getApp(),
  11 + r = a.globalData.setting,
  12 + t = a.request,
  13 + s = require("../../../../utils/common.js"),
  14 + util = require("../../../../utils/util.js"),
  15 + ut = util,
  16 + d = getApp().globalData;
  17 +
  18 +var timestamp = Date.parse(new Date());
  19 +var date = new Date(timestamp);
  20 +const {
  21 + barcode,
  22 + qrcode
  23 +} = require('../../../../utils/index.js');
  24 +
  25 +Page({
  26 + data: {
  27 + phone: "",
  28 + url: r.url,
  29 + resourceUrl: r.resourceUrl,
  30 + iurl: r.imghost,
  31 + defaultAvatar: r.resourceUrl + "/static/images/user68.jpg",
  32 + user: null,
  33 + tc_hide: true,
  34 + stoname: "",
  35 + checkDate: false,
  36 + datet: "",
  37 + year: date.getFullYear(),
  38 + store: 0,
  39 + all_sto: "",
  40 + region_name: "",
  41 + def_pick_store: "",
  42 + sort_store: 0, //门店分类
  43 + sec_sto: "",
  44 + more_store: 0, //选择门店
  45 + choice_sort_store: 0, //选择分类门店
  46 + more_store: 0, //选择门店
  47 + lat: null, //维度
  48 + lon: null, //经度
  49 + fir_pick_index: 0,
  50 + sec_pick_index: 0,
  51 + is_gps: 1,
  52 + is_no_plus:1,
  53 + lon: 0,
  54 + only_pk: 0,
  55 + open_ind_store: 0, //哪里打开的门店列表的控制属性
  56 + ispwhid: 1, //是否隐藏密码显示
  57 + isstcsp: 0, //是否启用密码消费
  58 + isGender: 1, //什么性别
  59 + iscalendar: 0, //是否是农历
  60 + consumption: "", //消费密码
  61 + identity_card: "", //身份证值
  62 + address: "", //地址
  63 + openid: "", //openid
  64 + pulscardname: "", //PLUS会员的卡
  65 + gradename: "", //会员权益的卡
  66 + isBool: "",
  67 + sto_sele_id: "", //所属门店id
  68 + is_zy: 0, //是否执行onshow
  69 + is_lable_set: "", //是否启用我的兴趣标签
  70 + check_label: [], //我选择的兴趣标签
  71 + fir_guide_id:null, //存储会员详情接口出来的美导ID
  72 +
  73 + userInfo: {},
  74 + hasUserInfo: false,
  75 + canIUseGetUserProfile: false,
  76 + getusercode_vailtime:10,//会员二维码时效
  77 +
  78 + sele_ing:0,
  79 + set_isstcsp:0
  80 +
  81 + },
  82 + //通过路径跳转到其他页面
  83 + goto: function(e) {
  84 + this.data.is_zy=1; //避免页面重新加载
  85 + var url = e.currentTarget.dataset.url;
  86 + getApp().goto(url);
  87 + },
  88 + //获取配置信息
  89 + get_config: function() {
  90 + var th = this;
  91 + getApp().getConfig2(function(ee) {
  92 + console.log('ee',ee);
  93 + var sms_conf = ee.switch_list;
  94 + sms_conf = JSON.parse(sms_conf);
  95 + let reg_type = ee.reg_type;
  96 + let reg_info = ee.reg_info;
  97 + var con_f={
  98 + rank_switch:sms_conf.rank_switch,
  99 + is_lable_set: sms_conf.user_label_set, //是不是会员标签设置
  100 + guide_title:sms_conf.guide_consultant, //系统参数 导购标题
  101 + guide_change_time:sms_conf.guide_change_time, //每月能修改几次
  102 + }
  103 + if(reg_type) con_f.reg_info= JSON.parse(reg_info);
  104 + th.setData(con_f)
  105 +
  106 + if (sms_conf.usercode_vailtime!=null && parseInt(sms_conf.usercode_vailtime)>0)
  107 + {
  108 + th.setData({ getusercode_vailtime: sms_conf.usercode_vailtime });
  109 + }
  110 + if (sms_conf.user_label_set) {
  111 + th.query_checklabels();
  112 + }
  113 + },1)
  114 + },
  115 + //查找会员选择的兴趣标签
  116 + query_checklabels: function() {
  117 + var th = this;
  118 + var url = "/api/weshop/marketing/holiday/vip/interest/label/get";
  119 + var interest_lables = th.data.interest_lables; //兴趣标签
  120 + getApp().request.promiseGet(url, {
  121 + data: {
  122 + userId: d.user_id,
  123 + storeId: r.stoid
  124 + }
  125 + }).then(res => {
  126 + if (res.data.code == 0) {
  127 + var data = res.data.data;
  128 + var VipLabel = th.data.check_label; //通过id标签找到已选择的标签
  129 + var dateList = data.VipLabel.split(",");
  130 + for (var i in dateList) {
  131 + if (dateList[i] != "") {
  132 + VipLabel.push(dateList[i]);
  133 + }
  134 + }
  135 + th.setData({
  136 + check_label: VipLabel
  137 + })
  138 + } else {
  139 + getApp().my_warnning("系统繁忙,请稍后再试", 0, th);
  140 + }
  141 + })
  142 + },
  143 + //是否启动密码消费
  144 + isstcsp: function() {
  145 + var th = this;
  146 + var isstcsp = th.data.isstcsp;
  147 + if (isstcsp == 0) {
  148 + th.setData({
  149 + isstcsp: 1
  150 + })
  151 + } else {
  152 +
  153 + if(this.data.user.isVerification) {
  154 + getApp().my_warnning("已设置消费需启用密码,无法取消", 0, th);
  155 + return false;
  156 + }
  157 +
  158 + th.setData({
  159 + isstcsp: 0
  160 + })
  161 + }
  162 + },
  163 + //出生日期是否是农历
  164 + iscalendar: function() {
  165 +
  166 + if(this.data.user.birthday) return false;
  167 + var th = this;
  168 + var iscalendar = th.data.iscalendar;
  169 + if (iscalendar == 0) {
  170 + th.setData({
  171 + iscalendar: 1
  172 + })
  173 + } else {
  174 + th.setData({
  175 + iscalendar: 0
  176 + })
  177 + }
  178 + },
  179 + //性别
  180 + isGender: function(e) {
  181 + var th = this;
  182 + var sex = e.currentTarget.dataset.sex;
  183 + th.setData({
  184 + isGender: sex
  185 + })
  186 + },
  187 + //密码是否隐藏显示
  188 + ispwhid: function() {
  189 + var th = this;
  190 + var ispwhid = th.data.ispwhid;
  191 +
  192 + if (ispwhid == 0) {
  193 + th.setData({
  194 + ispwhid: 1
  195 + })
  196 + } else {
  197 + th.setData({
  198 + ispwhid: 0
  199 + })
  200 + }
  201 + },
  202 + checkDate: function() {
  203 + var th = this;
  204 + if (th.data.checkDate) {
  205 + th.setData({
  206 + checkDate: false
  207 + })
  208 + } else {
  209 + th.setData({
  210 + checkDate: true
  211 + })
  212 + }
  213 + },
  214 + bindChange: function(e) {
  215 + this.setData({
  216 + datet: e.detail.value,
  217 + });
  218 + },
  219 + //---点击二级之后的选择---
  220 + choose_for_store: function(e) {
  221 + var index_c = e.currentTarget.dataset.ind;
  222 +
  223 + this.setData({
  224 + sec_pick_index: index_c,
  225 + fir_pick_index: index_c
  226 + })
  227 + },
  228 + //确定def_pick为选择的门店
  229 + sure_pick: function(e) {
  230 + var th = this;
  231 + var item = null;
  232 + var openindstore = th.data.open_ind_store;
  233 + if (th.data.choice_sort_store == 0) {
  234 + var index = th.data.fir_pick_index;
  235 + if (th.data.is_show_sto_cat == 1) {
  236 + item = th.data.def_pickpu_list[index];
  237 + } else {
  238 + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候
  239 + }
  240 +
  241 + } else {
  242 + var index = th.data.sec_pick_index;
  243 + item = th.data.sec_sto.s_arr[index];
  244 + }
  245 + if(!item) return false;
  246 + th.setData({
  247 + def_pick_store: item,
  248 + stoname: item.pickup_name,
  249 + sto_sele_name: item.pickup_name,
  250 + sto_sele_id: item.pickup_id,
  251 + sto_sele_distr: item.distr_type,
  252 + store: 0,
  253 + choice_sort_store: 0,
  254 + fir_pick_index: 0
  255 + });
  256 +
  257 + if (openindstore == 1) {
  258 + th.setData({
  259 + openSpecModal: !0,
  260 + openSpecModal_ind: openindstore,
  261 + });
  262 + } else if (openindstore == 2) {
  263 + th.setData({
  264 + openSpecModal: !0,
  265 + openSpecModal_ind: openindstore,
  266 + openSpecModal_pt: 1
  267 + });
  268 + }
  269 + },
  270 + choose_for_store_fir: function(e) {
  271 + var index_c = e.currentTarget.dataset.ind;
  272 + this.setData({
  273 + fir_pick_index: index_c
  274 + })
  275 + },
  276 + wait_for_store_config: function() {
  277 + var th = this;
  278 + wx.getLocation({
  279 + type: 'gcj02',
  280 + success: function(res) {
  281 + th.data.lat = res.latitude;
  282 + th.data.lon = res.longitude;
  283 + th.data.is_get_local_ok = 1;
  284 + },
  285 + fail: function(res) {
  286 + if (res.errCode == 2) {
  287 + th.setData({
  288 + is_gps: 0
  289 + });
  290 + if (th.data.is_gps == 0) {
  291 + getApp().confirmBox("请开启GPS定位", null, 10000, !1);
  292 + }
  293 + } else {
  294 + th.setData({
  295 + is_gps: "3"
  296 + });
  297 + }
  298 + th.data.is_get_local_ok = 1;
  299 + }
  300 + })
  301 + },
  302 + onclickstore: function() {
  303 + var th = this;
  304 + //检验门店的点击,看下次数是不是到了
  305 + this.check_click_ok(function(){
  306 + if (th.data.store == 0) {
  307 + th.setData({
  308 + store: 1
  309 + })
  310 + } else {
  311 + th.setData({
  312 + store: 0
  313 + })
  314 + }
  315 + var dd = {
  316 + store_id: r.stoid,
  317 + isstop: 0,
  318 + pageSize: 2000
  319 + }
  320 + th.setData({
  321 + sort_store: 0
  322 + });
  323 + var i = getApp().request;
  324 + //如果有距离的话
  325 + if (th.data.lat != null) {
  326 + dd.lat = th.data.lat;
  327 + dd.lon = th.data.lon;
  328 + }
  329 + //----------获取门店----------------
  330 + getApp().request.get("/api/weshop/pickup/list", {
  331 + data: dd,
  332 + success:function(res){
  333 + var e = res;
  334 + if (e.data.code == 0) {
  335 + //-- 如果有默认选择门店的时候,要把默认门店放在第一位 --
  336 + if (th.data.def_pick_store) {
  337 + for (var k = 0; k < e.data.data.pageData.length; k++) {
  338 + if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) {
  339 + e.data.data.pageData.splice(k, 1); //删除
  340 + break;
  341 + }
  342 + }
  343 + e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加
  344 + }
  345 +
  346 + //单总量超出5个的时候
  347 + if (e.data.data.total > 10) {
  348 + i.get("/api/weshop/storagecategory/page", {
  349 + data: {
  350 + store_id: r.stoid,
  351 + pageSize: 1000,
  352 + orderField:"sort",
  353 + orderType:'asc',
  354 + },
  355 + success: function(ee) {
  356 + if (ee.data.code == 0) {
  357 +
  358 + var check_all_cate=0;
  359 + if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0){
  360 + for(let i in ee.data.data.pageData){
  361 + let item=ee.data.data.pageData[i];
  362 + if(item.is_show==1){
  363 + check_all_cate=1;break
  364 + }
  365 + }
  366 + }
  367 +
  368 +
  369 + if (check_all_cate) {
  370 +
  371 + var sto_cate = ee.data.data.pageData;
  372 + var sto_arr = e.data.data.pageData;
  373 + var newarr = new Array();
  374 + var qita = new Array();
  375 +
  376 + var is_del_pk=0;
  377 + //----要进行门店分组--------
  378 + for (var i = 0; i < sto_arr.length; i++) {
  379 + //找一下这个门店有没有在分类数组内
  380 + var find2 = 0, find2name = "",sort=0;
  381 + is_del_pk=0;
  382 + for (var m = 0; m < sto_cate.length; m++) {
  383 + if (sto_arr[i].category_id == sto_cate[m].cat_id) {
  384 + if(sto_cate[m].is_show!=1){
  385 + is_del_pk=1; sto_arr.splice(i,1);
  386 + i--;
  387 + }else {
  388 + find2 = sto_cate[m].cat_id;
  389 + find2name = sto_cate[m].cat_name;
  390 + sort = sto_cate[m].sort;
  391 + is_del_pk=0;
  392 + }
  393 + break;
  394 + }
  395 + }
  396 +
  397 + if(is_del_pk) continue;
  398 + if (newarr.length > 0) {
  399 + var find = 0;
  400 + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他
  401 + if (find2 != 0) {
  402 + for (var ii = 0; ii < newarr.length; ii++) {
  403 + if (sto_arr[i].category_id == newarr[ii].cat_id) {
  404 + newarr[ii].s_arr.push(sto_arr[i]);
  405 + find = 1;
  406 + break;
  407 + }
  408 + }
  409 + if (find == 0) {
  410 + var arr0 = new Array();
  411 + arr0.push(sto_arr[i]);
  412 + var item = {
  413 + cat_id: find2,
  414 + name: find2name,
  415 + sort:sort,
  416 + s_arr: arr0
  417 + };
  418 + newarr.push(item);
  419 + }
  420 + } else {
  421 + qita.push(sto_arr[i]);
  422 + }
  423 + } else {
  424 + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他
  425 + if (find2 != 0) {
  426 + var arr0 = new Array();
  427 + arr0.push(sto_arr[i]);
  428 + var item = {
  429 + cat_id: find2,
  430 + name: find2name,
  431 + sort:sort,
  432 + s_arr: arr0
  433 + };
  434 + newarr.push(item);
  435 + } else {
  436 + qita.push(sto_arr[i]);
  437 + }
  438 + }
  439 + }
  440 +
  441 + var def_arr = new Array();
  442 + //-- 开始就看10个门店 --
  443 + for (var k = 0; k < 10; k++) {
  444 + if (k == e.data.data.pageData.length) break;
  445 + def_arr.push(e.data.data.pageData[k]);
  446 + }
  447 +
  448 + th.setData({
  449 + def_pickpu_list: def_arr,
  450 + pickpu_list: ee.data.data.pageData
  451 + });
  452 +
  453 + //门店分类要排序下
  454 + function compare(property){
  455 + return function(a,b){
  456 + var value1 = a[property];
  457 + var value2 = b[property];
  458 + return value1 - value2;
  459 + }
  460 + }
  461 + if(newarr.length>0)
  462 + newarr.sort(compare("sort"));
  463 +
  464 + //----安排其他的分类-----
  465 + if (qita.length > 0) {
  466 + var item = {
  467 + cat_id: -1,
  468 + name: "其他",
  469 + s_arr: qita
  470 + };
  471 + newarr.push(item);
  472 + }
  473 + th.setData({
  474 + is_show_sto_cat: 1,
  475 + all_sto: newarr
  476 + });
  477 +
  478 + } else {
  479 + th.setData({
  480 + is_show_sto_cat: -1,
  481 + only_pk: e.data.data.pageData
  482 + });
  483 + }
  484 + } else {
  485 + th.setData({
  486 + is_show_sto_cat: -1,
  487 + only_pk: e.data.data.pageData
  488 + });
  489 + }
  490 + }
  491 + });
  492 + } else {
  493 + th.setData({
  494 + is_show_sto_cat: 0,
  495 + only_pk: e.data.data.pageData
  496 + });
  497 + }
  498 + }
  499 + }
  500 + })
  501 +
  502 + },2)
  503 +
  504 + },
  505 +
  506 + //选择更多门店
  507 + more_store: function() {
  508 + this.setData({
  509 + sort_store: 1
  510 + });
  511 + },
  512 + //---选择分类门店---
  513 + choice_sort_store: function(e) {
  514 + var index = e.currentTarget.dataset.index;
  515 + var region_name = e.currentTarget.dataset.region;
  516 + var item = this.data.all_sto[index];
  517 + this.setData({
  518 + region_name: region_name,
  519 + sort_store: 0,
  520 + choice_sort_store: 1,
  521 + sec_sto: item,
  522 + sec_pick_index: 0
  523 + });
  524 + },
  525 + // 返回按钮
  526 + returns: function() {
  527 + this.setData({
  528 + sort_store: 0,
  529 + choice_sort_store: 0
  530 + });
  531 + },
  532 + //身份证号严格校验
  533 + IdentityIDCard: function(e) {
  534 + var code = e.detail.value;
  535 + //身份证号前两位代表区域
  536 + var city = {
  537 + 11: "北京",
  538 + 12: "天津",
  539 + 13: "河北",
  540 + 14: "山西",
  541 + 15: "内蒙古",
  542 + 21: "辽宁",
  543 + 22: "吉林",
  544 + 23: "黑龙江 ",
  545 + 31: "上海",
  546 + 32: "江苏",
  547 + 33: "浙江",
  548 + 34: "安徽",
  549 + 35: "福建",
  550 + 36: "江西",
  551 + 37: "山东",
  552 + 41: "河南",
  553 + 42: "湖北 ",
  554 + 43: "湖南",
  555 + 44: "广东",
  556 + 45: "广西",
  557 + 46: "海南",
  558 + 50: "重庆",
  559 + 51: "四川",
  560 + 52: "贵州",
  561 + 53: "云南",
  562 + 54: "西藏 ",
  563 + 61: "陕西",
  564 + 62: "甘肃",
  565 + 63: "青海",
  566 + 64: "宁夏",
  567 + 65: "新疆",
  568 + 71: "台湾",
  569 + 81: "香港",
  570 + 82: "澳门",
  571 + 91: "国外 "
  572 + };
  573 + //身份证格式正则表达式
  574 + var idCardReg = /^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i;
  575 + var errorMess = ""; //错误提示信息
  576 + var isPass = true; //身份证验证是否通过(true通过、false未通过)
  577 +
  578 + //如果身份证不满足格式正则表达式
  579 + if (!code || !idCardReg.test(code)) {
  580 + errorMess = "您输入的身份证号格式有误!";
  581 + isPass = false;
  582 + }
  583 +
  584 + //区域数组中不包含需验证的身份证前两位
  585 + else if (!city[code.substr(0, 2)]) {
  586 + errorMess = "您输入的身份证地址编码有误!";
  587 + isPass = false;
  588 + } else {
  589 + //18位身份证需要验证最后一位校验位
  590 + if (code.length == 18) {
  591 + code = code.split('');
  592 + //∑(ai×Wi)(mod 11)
  593 + //加权因子
  594 + var factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
  595 + //校验位
  596 + var parity = [1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2];
  597 + var sum = 0;
  598 + var ai = 0;
  599 + var wi = 0;
  600 + for (var i = 0; i < 17; i++) {
  601 + ai = code[i];
  602 + wi = factor[i];
  603 + sum += ai * wi;
  604 + }
  605 + var last = parity[sum % 11];
  606 + if (parity[sum % 11] != code[17]) {
  607 + errorMess = "您输入的身份证号不存在!";
  608 + isPass = false;
  609 + }
  610 + }
  611 + }
  612 + var returnParam = {
  613 + 'errorMess': errorMess,
  614 + 'isPass': isPass
  615 + }
  616 + if (errorMess != "") {
  617 + wx.showModal({
  618 + title: errorMess,
  619 + content: '',
  620 + showCancel: false,
  621 + confirmText: '确定',
  622 + confirmColor: '',
  623 + success: function(res) {},
  624 + fail: function(res) {},
  625 + complete: function(res) {},
  626 + })
  627 + }
  628 + return returnParam;
  629 + },
  630 + //------初始化加载----------
  631 + onLoad: function(t) {
  632 + let th= this;
  633 + var user = getApp().globalData.userInfo;
  634 + if (user.card_field != '' && user.card_field != null && user.card_field != undefined && user.card_expiredate) {
  635 + var now = ut.gettimestamp();
  636 + var str = user.card_expiredate.replace(/-/g, '/');;
  637 + var end = new Date(str);
  638 + end = Date.parse(end) / 1000;
  639 + if (now < end) {
  640 + this.puls_user();
  641 + }
  642 + }
  643 + //调用接口判断商家plus有没有过期
  644 + getApp().request.promiseGet("/store/storemoduleendtime/page?store_id=" + r.stoid + "&type=3", {}).then(res => {
  645 + if (res.data.code == 0) {
  646 + var arr = res.data.data.pageData;
  647 + if (arr.length > 0) {
  648 + var item = arr[0];
  649 + if (item.is_sy == 0) {
  650 + var now = Date.parse(new Date()); now = now / 1000;
  651 + if (item.end_time < now) {
  652 + th.setData({ is_no_plus: 0 })
  653 + }
  654 + }
  655 + }
  656 + }
  657 + })
  658 + this.initial_user();
  659 + // 获取用户昵称
  660 + if (wx.getUserProfile) {
  661 + this.setData({
  662 + canIUseGetUserProfile: true
  663 + })
  664 + }
  665 + //如果有指定要启用密码的时候
  666 + if(t.isstcsp){
  667 + this.setData({set_isstcsp:1,ispwhid:0});
  668 + }
  669 +
  670 + },
  671 +
  672 + // 获取用户头像昵称
  673 + getUserProfile(e) {
  674 + var th = this;
  675 +
  676 + var ob={
  677 + nickname:this.data.user.nickname,
  678 + head_pic:this.data.user.head_pic,
  679 + }
  680 + getApp().globalData.up_nick_avatar=ob;
  681 + getApp().goto('/packageE/pages/user/nick_avatar/nick_avatar');
  682 +
  683 +
  684 + // new Promise((resolve, reject) => {
  685 + // wx.getUserProfile({
  686 + // desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
  687 + // success: (res) => {
  688 + // th.data.user.nickname = res.userInfo.nickName;
  689 + // th.data.user.head_pic = res.userInfo.avatarUrl;
  690 + // this.setData({
  691 + // userInfo: res.userInfo,
  692 + // hasUserInfo: true,
  693 + // user: th.data.user,
  694 + // });
  695 + // resolve(res.userInfo);
  696 + // },
  697 + //
  698 + // });
  699 + // }).then((userInfo) => {
  700 + // getApp().request.put("/api/weshop/users/update", {
  701 + // data: {
  702 + // storeId: r.stoid,
  703 + // user_id: getApp().globalData.user_id,
  704 + // nickname: userInfo.nickName,
  705 + // head_pic: userInfo.avatarUrl
  706 + //
  707 + // },
  708 + // success: function(su) {
  709 + // if (su.data.code == 0) {
  710 + // console.log("update user info OK");
  711 + // }
  712 + // }
  713 + // });
  714 + // });
  715 +
  716 +
  717 + },
  718 +
  719 +
  720 + //-----------会员是否初始化---------------------
  721 + initial_user: function() {
  722 +
  723 + var th = this;
  724 + getApp().request.get("/api/weshop/users/grade/vip/init/get", {
  725 + data: {
  726 + storeId: r.stoid,
  727 + },
  728 + success: function(su) {
  729 + var isBool = su.data.data.isBool;
  730 + th.setData({
  731 + isBool: isBool
  732 + });
  733 +
  734 + if (!isBool) return false;
  735 + //-----会员权益获取--------------
  736 + getApp().request.get("/api/weshop/users/grade/aftervipinfo/get", {
  737 + data: {
  738 + storeId: r.stoid,
  739 + userId: getApp().globalData.user_id,
  740 + },
  741 + success: function(su) {
  742 + var gradename = su.data.data.GradeName;
  743 + th.setData({
  744 + gradename: gradename
  745 + });
  746 + }
  747 + });
  748 +
  749 + }
  750 + });
  751 + this.get_config();
  752 + },
  753 +
  754 +
  755 + //-----Plus会员获取-----------
  756 + puls_user: function() {
  757 + var th = this;
  758 + getApp().request.get("/api/weshop/plus/vip/mem/list", {
  759 + data: {
  760 + storeId: r.stoid,
  761 + userId: getApp().globalData.user_id,
  762 + },
  763 + success: function(su) {
  764 +
  765 + if (su.data.code == 0) {
  766 + var cardname = su.data.data[0].MemCardName;
  767 + th.setData({
  768 + pulscardname: cardname
  769 + });
  770 + }
  771 + }
  772 + });
  773 + },
  774 +
  775 + onShow: function() {
  776 + getApp().check_can_share();
  777 + var e = this;
  778 +
  779 + //如果有传值进行跳转的话,
  780 + var choice_guide=null;
  781 + if(getApp().globalData.choice_guide){
  782 + choice_guide=JSON.parse(JSON.stringify(getApp().globalData.choice_guide));
  783 + getApp().globalData.choice_guide=null;
  784 + let user=this.data.user;
  785 + this.setData({
  786 + 'user.staffName':choice_guide.StaffName,
  787 + 'user.staffId':choice_guide.Id,
  788 + 'user.staffTel':choice_guide.Tel
  789 + })
  790 + return false;
  791 + }
  792 +
  793 + if (this.data.is_zy){
  794 + this.data.is_zy=0;
  795 + return false;
  796 + }
  797 + this.wait_for_store_config();
  798 +
  799 +
  800 +
  801 + var req = t;
  802 + req.get("/api/weshop/users/getAndUpdateUser/" + r.stoid + "/" + getApp().globalData.user_id, {
  803 + success: function(src) {
  804 + var a = src.data.data;
  805 +
  806 + if(!a) a={};
  807 + var time ="",birthday ="";
  808 + if(a && a.reg_time) time=util.formatTime(a.reg_time, "'Y/M/D");
  809 + if(a && a.birthday) birthday=util.formatTime(a.birthday, "'Y/M/D");
  810 +
  811 + a.reg_time = time;
  812 + a.birthday = birthday
  813 +
  814 + if(a.address=='null' || !a.address){
  815 + a.address="";
  816 + }
  817 +
  818 + e.data.fir_guide_id=a.staffId;
  819 + if(choice_guide){
  820 + a.staffName=choice_guide.StaffName;
  821 + a.staffId=choice_guide.Id;
  822 + a.staffTel=choice_guide.Tel;
  823 + }
  824 +
  825 + if(e.data.set_isstcsp){
  826 + a.vipnopwd=1;
  827 + }
  828 +
  829 + e.setData({
  830 + phone: a.mobile,
  831 + user: a,
  832 + openid: a.openid,
  833 + sto_sele_id: a.pickup_id,
  834 + consumption: a.paypwd,
  835 + identity_card: a.idcard,
  836 + address: a.address,
  837 + isGender: a.sex,
  838 + isstcsp: a.vipnopwd,
  839 + iscalendar:a.islunar
  840 + });
  841 +
  842 + }
  843 + })
  844 +
  845 +
  846 + a.getUserInfo(function(a) {
  847 + var txt = util.formatTime(a.birthday, 'yyyy-M-d'),
  848 + arr = txt.split(' ');
  849 + a.birthday = arr[0];
  850 + var txt2 = util.formatTime(a.reg_time, 'yyyy-M-d'),
  851 + arr2 = txt.split(' ');
  852 + a.reg_time = arr2[0];
  853 + if (a.pickup_id != null) {
  854 + req.get("/api/weshop/pickup/get/" + r.stoid + "/" + a.pickup_id, {
  855 + success: function(da) {
  856 + if(da.data.data){
  857 + //设置门店
  858 + e.setData({
  859 + stoname: da.data.data.pickup_name
  860 + });
  861 + }
  862 +
  863 + }
  864 + })
  865 + }
  866 +
  867 + }, !0);
  868 + },
  869 +
  870 + onHide:function (){
  871 + this.data.sele_ing=0;
  872 + },
  873 +
  874 + editUserInfo: function(e) {
  875 + var r = e.currentTarget.dataset.type;
  876 + if (("password" == r || "paypwd" == r) && !this.data.user.mobile) return a.showWarning("请先绑定手机号码");
  877 + r && this.data.user && wx.navigateTo({
  878 + url: "/pages/user/userinfo_edit/userinfo_edit?type=" + r
  879 + });
  880 + },
  881 +
  882 + /*--------------------修改头像---------------------*/
  883 + changeAvatar: function() {
  884 + return false;
  885 + var r = this;
  886 + getApp().globalData.no_clear=1;
  887 + wx.chooseImage({
  888 + count: 1,
  889 + sizeType: ["compressed", "original"],
  890 + sourceType: ["camera", "album"],
  891 + success: function(u) {
  892 + t.uploadFile(r.data.url + "/api/user/upload_headpic", {
  893 + filePath: u.tempFilePaths[0],
  894 + name: "head_pic",
  895 + success: function(t) {
  896 + var u = s.getFullUrl(t.data.result);
  897 + r.setData(e({}, "user.head_pic", u)), a.globalData.userInfo.head_pic = u, a.showSuccess("设置头像成功");
  898 + }
  899 + });
  900 + }
  901 + });
  902 + },
  903 +
  904 +
  905 + //------卡片的显示和关闭--------
  906 + show_tc: function() {
  907 + var that=this;
  908 + var req = t;
  909 + if (!getApp().globalData.userInfo) return false;
  910 + //base64_encode($user.mobile.'|'.date('Y-m-d H:i:s')
  911 + var getnowtime;
  912 + req.get("/api/weshop/users/getServerTime", {
  913 + success: function (res) {
  914 + if (res.data.code == 0)
  915 + {
  916 + getnowtime=res.data.data;
  917 + if (!getnowtime)
  918 + {
  919 + getApp().showWarning("获取服务时间失败");
  920 + return;
  921 + }
  922 + //base64_encode($user.mobile.'|'.date('Y-m-d H:i:s')
  923 + var val = that.data.userInfo.mobile + "|" +getnowtime+"|"+that.data.getusercode_vailtime;
  924 + val = "^" + ut.base64_encode(val);
  925 +
  926 + qrcode('qrcode', val, 480, 480, that);
  927 + that.setData({
  928 + tc_hide: false,
  929 + });
  930 + }
  931 + }
  932 + })
  933 +
  934 +
  935 + },
  936 + hide_tc: function() {
  937 + this.setData({
  938 + tc_hide: true,
  939 + });
  940 + },
  941 + //消费密码输入框失去焦点事件
  942 + lose_focus: function(e) {
  943 + var th = this;
  944 + var val = e.detail.value;
  945 + this.setData({
  946 + consumption: val
  947 + })
  948 + },
  949 +
  950 + //地址
  951 + address: function(e) {
  952 + var val = e.detail;
  953 + this.setData({
  954 + address: val.value
  955 + });
  956 + },
  957 +
  958 + //身份证验证
  959 + identity_card: function(e) {
  960 + var val = e.detail;
  961 +
  962 + this.setData({
  963 + identity_card: val.value
  964 + });
  965 +
  966 + },
  967 + //用户名字
  968 + user_name: function(e) {
  969 + var th = this;
  970 + var name = e.detail.value;
  971 + var vipname = 'user.vipname';
  972 + if (name != "" || name != null) {
  973 + th.setData({
  974 + [vipname]: name
  975 + });
  976 + }
  977 +
  978 + },
  979 +
  980 + //点击确认修改信息
  981 + confirm_revision: function() {
  982 + var th = this;
  983 + var isstcsp = th.data.isstcsp; //是否启用消费密码
  984 + var phone = th.data.phone; //手机号码
  985 + if (phone == "" || phone == null) {
  986 + getApp().my_warnning("手机不能为空", 0, th);
  987 + return false;
  988 + }
  989 + var consumption = th.data.consumption; //消费密码
  990 + var isstcsp = th.data.isstcsp;
  991 + if (isstcsp == 1) {
  992 +
  993 + if (consumption == null || consumption == "" || consumption == undefined) {
  994 + getApp().my_warnning("消费密码不能为空", 0, th);
  995 + return false;
  996 + }
  997 + if (consumption.length < 6) {
  998 + getApp().my_warnning("消费密码不能小于6位", 0, th);
  999 + return false;
  1000 + }
  1001 + }
  1002 + var sex = th.data.isGender; //性别
  1003 +
  1004 + if (sex != "1" && sex != "2") {
  1005 + getApp().my_warnning("请选择性别", 0, th);
  1006 + return false;
  1007 + }
  1008 + var user_name = th.data.user.vipname; //用户姓名
  1009 + if (user_name == "" || user_name == null) {
  1010 + getApp().my_warnning("请输入名字", 0, th);
  1011 + return false;
  1012 + }
  1013 + var identity_card = th.data.identity_card; //身份证
  1014 +
  1015 + if (identity_card!=null && identity_card!=undefined && identity_card != "" && !(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(identity_card))) {
  1016 + getApp().my_warnning("身份证号码错误", 0, th);
  1017 + return false;
  1018 + }
  1019 + var address = th.data.address; //地址
  1020 + var sto_sele_id = th.data.sto_sele_id;
  1021 + var datas = {
  1022 + mobile: phone, //手机号码
  1023 + store_id: r.stoid,
  1024 + user_id: getApp().globalData.user_id,
  1025 + vipnopwd: isstcsp,
  1026 + //vippass: consumption, //消费密码
  1027 + sex: sex, //性别
  1028 + vipname: user_name, //昵称
  1029 + idcard: identity_card, //身份证
  1030 + address: address, //地址
  1031 + pickup_id: sto_sele_id ,//自提门店 所属门店
  1032 + islunar:th.data.iscalendar,
  1033 + birthday:th.data.datet
  1034 + }
  1035 +
  1036 + if (isstcsp == 1) {
  1037 + datas.vippass=consumption;
  1038 + }
  1039 +
  1040 +
  1041 + //往上提交美导的ID
  1042 + if(th.data.fir_guide_id!=th.data.user.staffId){
  1043 + datas.staffId=th.data.user.staffId;
  1044 + datas.StaffName=th.data.user.staffName;
  1045 + }
  1046 +
  1047 + getApp().request.put("/api/weshop/users/updateUserInfo", {
  1048 + data: datas,
  1049 + success: function(res) {
  1050 + if (res.data.code == 0) {
  1051 + getApp().my_warnning("修改成功", 1, th);
  1052 + getApp().goto("/pages/user/index/index");
  1053 + } else {
  1054 + getApp().my_warnning("系统繁忙,请稍后再试", 0, th);
  1055 + }
  1056 + }
  1057 + })
  1058 + },
  1059 + //选择地址
  1060 + goto_address: function() {
  1061 + // this.setData({ is_zy: 1 });
  1062 + },
  1063 + //更换手机
  1064 + go_phone: function(e) {
  1065 + var url = e.currentTarget.dataset.url;
  1066 + this.setData({
  1067 + is_zy: 1
  1068 + });
  1069 + getApp().goto(url);
  1070 + },
  1071 +
  1072 + //--点击分享事件---
  1073 + onShareAppMessage: function(t) {
  1074 + getApp().globalData.no_clear=1;
  1075 + return o.share;
  1076 + },
  1077 +
  1078 + //-- 跳转到获取导购的列表 --
  1079 + go_get_guide:function () {
  1080 + let th=this;
  1081 +
  1082 + if(this.data.sele_ing) return false;
  1083 + this.data.sele_ing=1;
  1084 + this.check_click_ok(function(){
  1085 + th.data.is_zy=1;
  1086 + getApp().goto("/packageB/pages/user/choice_guide/choice_guide?is_back=1");
  1087 +
  1088 + },1)
  1089 + },
  1090 +
  1091 + //点击门店,导购的次数判断, type 1=导购 2=门店
  1092 + check_click_ok:function(func,idx){
  1093 + var th=this;
  1094 + var userId=getApp().globalData.user_id;
  1095 + getApp().request.get("/api/weshop/users/getGuideNum/"+r.stoid+"/"+userId+"/"+idx, {
  1096 + success: function(res) {
  1097 + if(res.data.code==0){
  1098 + func();
  1099 + }else{
  1100 + getApp().my_warnning(res.data.msg, 0, th);
  1101 + }
  1102 + }
  1103 + });
  1104 + }
  1105 +
  1106 +
  1107 +});
0 1108 \ No newline at end of file
... ...
packageG/pages/user/userinfo/userinfo.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "个人资料",
  3 + "enablePullDownRefresh": false,
  4 + "usingComponents": {
  5 + "warn": "/components/long_warn/long_warn"
  6 + }
  7 +}
0 8 \ No newline at end of file
... ...
packageG/pages/user/userinfo/userinfo.wxml 0 → 100644
  1 +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
  2 +<view class="container">
  3 +
  4 + <!-- 头像,昵称,多个卡 -->
  5 + <view class="head flex-space-between">
  6 + <view class="flex-center">
  7 +
  8 + <view class="flex-center">
  9 + <image class="Headportrait" src="{{user.head_pic}}"></image>
  10 + </view>
  11 +
  12 + <view class="flex-center vipmax">
  13 + <view>
  14 + <view>
  15 + <view class="ellipsis-2 Nickname" style="font-size: 31rpx">
  16 + <view style="float:left;">{{user.nickname}}</view>
  17 + <button bindtap="getUserProfile" style="margin-left:10rpx;float:left;width: 50rpx;height:50rpx;font-size:20rpx;background:rgba(217, 81, 99, 0.9);" class="flex-center fs30 confirmtext"><text class="iconfont icon-tongbu"></text></button>
  18 + </view>
  19 + </view>
  20 +
  21 + <view class="flex fs22 vip">
  22 + <block wx:if="{{isBool && gradename}}">
  23 + <navigator url="/pages/user/userqy/userqy">
  24 + <view class="flex-center AncrownMax">
  25 + <image class="Ancrown" src="{{iurl}}/miniapp/images/userqy/user_userqy_huang.png"></image>
  26 + <view>{{gradename}}</view>
  27 + </view>
  28 + </navigator>
  29 + </block>
  30 + <block wx:if="{{pulscardname && rank_switch > 0 }}">
  31 + <navigator url="/pages/user/plus/plus">
  32 + <view class="flex-center plusMax">
  33 + <image class="fuls" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image>
  34 + <view>{{pulscardname}}</view>
  35 + </view>
  36 + </navigator>
  37 + </block>
  38 + </view>
  39 +
  40 +
  41 + </view>
  42 + </view>
  43 + </view>
  44 + <view class="flex ai_and">
  45 + <view class="flex-level ai_and" style="background-image:url({{iurl}}/miniapp/images/userinfo/userinfo/code.png);width:170rpx;height:140rpx;margin-top: 80rpx;background-size:100%;" bindtap="show_tc">
  46 + <view class="fs26 code" style="color:rgb(255,255,255);margin-left:9rpx;margin-top: 100rpx;">我的二维码</view>
  47 + </view>
  48 + </view>
  49 + </view>
  50 +
  51 + <view class="user-container">
  52 + <view class="Bbottom">
  53 + <view bindtap="changeAvatar" class="user-head flex-vertical-between">
  54 + <view class="user-txt">卡号</view>
  55 + <view class="user-txt-right">{{user.erpvipno}}
  56 + </view>
  57 + </view>
  58 + <view bindtap="editUserInfo1" class="user-name flex-vertical-between" data-type="nickname">
  59 + <view>是否启用消费密码</view>
  60 + <view class="flex-center" bindtap="isstcsp">
  61 + <view class="flex-center cmleft">
  62 + <block wx:if="{{isstcsp}}">
  63 + <icon size="20" type="success" color="rgb(212,2,31)"></icon>
  64 + </block>
  65 + <block wx:else>
  66 + <icon size="20" type="success" color="rgb(0, 0, 0, 0.4)"></icon>
  67 + </block>
  68 + <view class="Mleft">启用密码消费</view>
  69 + </view>
  70 + </view>
  71 +
  72 + </view>
  73 + <!-- 是否显示密码 -->
  74 + <view class="flex-vertical-between user-name" wx:if="{{isstcsp==1}}">
  75 + <view class="user-txt">消费密码</view>
  76 + <view class="flex">
  77 + <block wx:if="{{ispwhid}}">
  78 + <input bindblur="lose_focus" class="fs28 hion user-txt-right" value="{{consumption}}" password="true" type="number"/>
  79 + </block>
  80 + <block wx:else>
  81 + <input bindblur="lose_focus" focus="{{set_isstcsp?true:false}}" class="fs28 hion user-txt-right" value="{{consumption}}" type="number"/>
  82 + </block>
  83 +
  84 + <block wx:if="{{ispwhid}}">
  85 + <image class="eye" src="{{iurl}}/miniapp/images/userinfo/userinfo/Eye.png" bindtap="ispwhid"></image>
  86 + </block>
  87 + <block wx:else>
  88 + <image class="eye" src="{{iurl}}/miniapp/images/userinfo/open_eye.png" bindtap="ispwhid"></image>
  89 + </block>
  90 +
  91 + </view>
  92 + </view>
  93 +
  94 +
  95 + <view bindtap="editUserInfo1" class="user-name flex-vertical-between" data-type="sex">
  96 + <view>性别</view>
  97 + <view class="flex">
  98 + <view class="flex-center {{isGender==1?'Gendercheck':'Gender'}}" data-sex="1" bindtap="isGender">
  99 + <block wx:if="{{isGender==1}}">
  100 + <image class="GenderImage" src="{{iurl}}/miniapp/images/userinfo/userinfo/malealready.png"></image>
  101 + </block>
  102 + <block wx:else>
  103 + <image class="GenderImage" src="{{iurl}}/miniapp/images/userinfo/userinfo/malenot.png"></image>
  104 + </block>
  105 + <view class="fs24">男</view>
  106 + </view>
  107 + <view class="flex-center {{isGender==2?'Gendercheck':'Gender'}}" data-sex="2" bindtap="isGender">
  108 + <block wx:if="{{isGender==2}}">
  109 + <image class="GenderImage" src="{{iurl}}/miniapp/images/userinfo/userinfo/femalealready.png"></image>
  110 + </block>
  111 + <block wx:else>
  112 + <image class="GenderImage" src="{{iurl}}/miniapp/images/userinfo/userinfo/femalenot.png"></image>
  113 + </block>
  114 + <view class="fs26">女</view>
  115 + </view>
  116 +
  117 + <block wx:if="{{!user.sex}}">
  118 + <text class="lb_txt" wx:if="{{reg_info.sex && reg_info.sex_state && (reg_info.sex_state_type == 0)}}">+{{reg_info.sex}}积分</text>
  119 + <text class="lb_txt" wx:if="{{reg_info.sex && reg_info.sex_state && (reg_info.sex_state_type == 1)}}">+{{reg_info.sex}}成长值</text>
  120 + </block>
  121 +
  122 + </view>
  123 +
  124 + </view>
  125 +
  126 + <view bindtap="editUserInfo1" class="user-name flex-vertical-between" data-type="sex">
  127 + <view>出生日期</view>
  128 + <view class="flex flex-vertical-between fs28 Birth">
  129 + <view class="flex" bindtap="iscalendar">
  130 +
  131 + <!-- <block wx:if="user.birthday==null&&user.birthday==''"> -->
  132 +
  133 + <block wx:if="{{iscalendar}}">
  134 + <view class="flex-center">
  135 + <icon size="20" type="success" color="rgb(212,2,31)"></icon>
  136 + </view>
  137 + </block>
  138 + <block wx:else>
  139 + <icon size="20" type="success" color="rgb(0, 0, 0, 0.4)"></icon>
  140 + </block>
  141 +
  142 + <!-- </block> -->
  143 +
  144 +
  145 + <view class="flex-center">
  146 + <view class="Mleft">农历</view>
  147 + </view>
  148 + </view>
  149 + <view class="user-txt-right flex ai_c">
  150 + <!-- 填充数据的时候要判断是否已经有出生日期,有值的话就不可修改 -->
  151 + <block wx:if="{{user.birthday==''||user.birthday==null}}">
  152 + <picker bindchange='bindChange' value="{{datet}}" mode="date" start="{{year-70}}-1-1" end="{{year}}-12-31">
  153 + {{datet?datet:"请选择时间"}}
  154 + </picker>
  155 + </block>
  156 + <block wx:else>
  157 + <view>{{datet==""? user.birthday==""?"":filters.replace_time2(user.birthday):datet}}</view>
  158 + </block>
  159 +
  160 + <block wx:if="{{!user.birthday}}">
  161 + <text class="lb_txt" wx:if="{{reg_info.birthday && reg_info.birthday_state && (reg_info.birthday_type == 0)}}">+{{reg_info.birthday}}积分</text>
  162 + <text class="lb_txt" wx:if="{{reg_info.birthday && reg_info.birthday_state && (reg_info.birthday_type == 1)}}">+{{reg_info.birthday}}成长值</text>
  163 + </block>
  164 +
  165 + </view>
  166 + </view>
  167 + </view>
  168 + </view>
  169 + <view class="Bbottom">
  170 + <view bindtap="editUserInfo1" class="user-name mt flex-vertical-between" data-type="nickname">
  171 + <view class="user-name-txt">姓名</view>
  172 + <view class="flex ai_c">
  173 + <input maxlength="10" bindblur="user_name" class="user-txt-right t-r" placeholder="*姓名" value='{{user.vipname}}' />
  174 + <block wx:if="{{!user.vipname}}">
  175 + <text class="lb_txt" wx:if="{{reg_info.name && reg_info.name_state && (reg_info.name_val_type == 0)}}">+{{reg_info.name}}积分</text>
  176 + <text class="lb_txt" wx:if="{{reg_info.name && reg_info.name_state && (reg_info.name_val_type == 1)}}">+{{reg_info.name}}成长值</text>
  177 + </block>
  178 + </view>
  179 + </view>
  180 +
  181 + <view bindtap="editUserInfo1" class="user-name flex-vertical-between" data-type="nickname">
  182 + <view class="user-name-txt">身份证</view>
  183 + <view class="flex ai_c">
  184 + <input bindblur="identity_card" class="user-txt-right t-r" value="{{user.idcard}}" placeholder="*身份证" />
  185 + <block wx:if="{{!user.idcard}}">
  186 + <text class="lb_txt" wx:if="{{reg_info.idcard && reg_info.idcard_state && (reg_info.idcard_type == 0)}}">+{{reg_info.idcard}}积分</text>
  187 + <text class="lb_txt" wx:if="{{reg_info.idcard && reg_info.idcard_state && (reg_info.idcard_type == 1)}}">+{{reg_info.idcard}}成长值</text>
  188 + </block>
  189 + </view>
  190 +
  191 + </view>
  192 + <view data-url="/packageB/pages/user/Change_phone/Change_phone" bindtap="go_phone" class="user-name flex-vertical-between" data-type="mobile">
  193 + <view class="user-name-txt">更换手机</view>
  194 + <view class="flex-center user-txt-right">
  195 + <view class="flex">{{phone}}</view>
  196 + <view class="angle">∟</view>
  197 + </view>
  198 + </view>
  199 +
  200 + <view class="user-name flex-vertical-between" data-type="mobile">
  201 + <view class="user-name-txt">地址</view>
  202 + <!-- <block wx:if="{{user.address.length>0}}">
  203 + <view>{{user.address}}</view>
  204 + </block>
  205 + <block wx:else> -->
  206 + <view class="flex ai_c">
  207 + <input bindblur="address" maxlength="30" value="{{user.address}}" class="user-txt-right" placeholder="*地址" style="text-align:right" />
  208 + <block wx:if="{{!user.address}}">
  209 + <text class="lb_txt" wx:if="{{reg_info.address && reg_info.address_state && (reg_info.address_type == 0)}}">+{{reg_info.address}}积分</text>
  210 + <text class="lb_txt" wx:if="{{reg_info.address && reg_info.address_state && (reg_info.address_type == 1)}}">+{{reg_info.address}}成长值</text>
  211 + </block>
  212 + </view>
  213 +
  214 + </view>
  215 +
  216 + <!-- 选择门店 -->
  217 + <view bindtap="onclickstore" class="user-name flex-vertical-between" data-type="email">
  218 + <view class="user-name-txt">所属门店</view>
  219 + <view class="flex-center user-txt-right">
  220 + <view class="one-line">{{stoname}}</view>
  221 + <view class="flex ai_c">
  222 + <view class="angle">∟</view>
  223 + <block wx:if="{{!user.pickup_id}}">
  224 + <text class="lb_txt" wx:if="{{reg_info.pick && reg_info.pick_state && (reg_info.pick_type == 0)}}">+{{reg_info.pick}}积分</text>
  225 + <text class="lb_txt" wx:if="{{reg_info.pick && reg_info.pick_state && (reg_info.pick_type == 1)}}">+{{reg_info.pick}}成长值</text>
  226 + </block>
  227 + </view>
  228 +
  229 + </view>
  230 + </view>
  231 +
  232 + <!-- 美容顾问 -->
  233 + <view bindtap="go_get_guide" class="user-name flex-vertical-between" data-type="email">
  234 + <view class="user-name-txt">{{guide_title}}</view>
  235 + <view class="flex-center user-txt-right">
  236 + <view class="one-line">{{user.staffName?user.staffName:"*选择顾问"}}</view>
  237 + <view class="angle">∟</view>
  238 + </view>
  239 + </view>
  240 +
  241 + <view wx:if="{{user.staffTel}}" class="user-name flex-vertical-between">
  242 + <view class="user-name-txt">{{guide_title}}电话</view>
  243 + <view class="flex-center user-txt-right">
  244 + <view class="one-line">{{user.staffTel}}</view>
  245 + </view>
  246 +
  247 + </view>
  248 +
  249 +
  250 +
  251 + </view>
  252 + <!-- 我的兴趣 -->
  253 + <view wx:if="{{ isBool==1 && is_lable_set==1}}" class="padding Bbottom">
  254 + <!-- 我的兴趣 -->
  255 + <view wx:if="{{is_lable_set!=null && is_lable_set==1}}" class="Bbottom">
  256 + <view class="interest fs28">
  257 + <view class="flex-vertical-between" bindtap="goto" data-url="/packageE/pages/user/labels/labels">
  258 + <view class="fs30">我的兴趣</view>
  259 + <view class="angle">∟</view>
  260 + </view>
  261 + <!-- 选中的标签 -->
  262 + <view class="lables">
  263 + <block wx:if="{{check_label.length>0}}">
  264 + <view class="lable" wx:for="{{check_label}}" wx:for-item="label">
  265 + <view class="ellipsis-1">{{label}}</view>
  266 + </view>
  267 + </block>
  268 + <!-- 添加标签按钮 -->
  269 + <view class="add_lable ib ellipsis-1" bindtap="goto" data-url="/packageE/pages/user/labels/labels">
  270 + <text class="plus">+</text>
  271 + <text>标签</text>
  272 + </view>
  273 + </view>
  274 + </view>
  275 + </view>
  276 + </view>
  277 +
  278 + <navigator bindtap="goto" class="user-name mt flex-vertical-between" data-url="/packageF/pages/user/address_list/address_list">
  279 + <view class="user-name-txt">收货地址</view>
  280 + <view class="flex-center user-txt-right">
  281 + <view class="angle">∟</view>
  282 + </view>
  283 + </navigator>
  284 +
  285 + <view bindtap="editUserInfo1" class="user-name flex-vertical-between" data-type="email">
  286 + <view class="user-name-txt">绑定时间</view>
  287 + <view class="user-txt-right one-line">{{user.reg_time?filters.replace_time2(user.reg_time):""}}</view>
  288 + </view>
  289 +
  290 +</view>
  291 +<!-- 确认修改按钮 -->
  292 +<view class="flex-center confirm">
  293 + <view class="flex-center fs30 confirmtext" bindtap="confirm_revision">
  294 + <view>确认修改</view>
  295 + </view>
  296 +</view>
  297 +
  298 +<!--弹出层内容,其中的“我知道”中绑定让弹出层消失的函数:bindtap="hide"-->
  299 +<view class="tc_view" hidden='{{tc_hide}}' bindtap='hide_tc'>
  300 + <view class="modal-box" hidden="{{flag}}" bindtap="hide"></view>
  301 + <view class="modal-body">
  302 + <view class="modal-content">
  303 + <view class="flex">
  304 + <image src="{{user.head_pic}}" class="hd_img"></image>
  305 + <view class="ctent_txt">
  306 + <view class='txt1'>{{user.nickname}}
  307 + <image wx:if="{{user.sex==2}}" class="arrow-right" src="{{iurl}}/miniapp/images/user/wum.png"></image>
  308 + <image wx:else class="arrow-right" src="{{iurl}}/miniapp/images/user/man.png"></image>
  309 + </view>
  310 + <view class='txt2' wx:if="{{user.address}}">{{user.address}}</view>
  311 + </view>
  312 + </view>
  313 + <view class="m_ta">
  314 + <canvas class="g_img" canvas-id="qrcode" />
  315 + </view>
  316 + <view class="s_sao">扫一扫上面的二维码图案,即可消费</view>
  317 + </view>
  318 + </view>
  319 +</view>
  320 +
  321 +<!-- 选择门店的弹框,1.1版最新的 -->
  322 +<block wx:if="{{store==1}}">
  323 + <view class="mongolia-layer" bindtap="onclickstore"></view>
  324 + <view class="popup-frame">
  325 + <block wx:if="{{sort_store==0}}">
  326 + <!-- 头部 标题 -->
  327 + <view class="popup-top flex-space-between">
  328 + <text class="fs32 nearby_store">{{choice_sort_store==0?'附近的门店':region_name}}</text>
  329 + <view>
  330 + <view>
  331 + <icon bindtap="onclickstore" class="modal-closes" color="black" size="22" type="cancel"></icon>
  332 + </view>
  333 + <view class="felx choose_more" bindtap="more_store" wx:if="{{is_show_sto_cat>0}}">
  334 + <text class="fs26 red-co">{{choice_sort_store==0?'更多门店':'返回'}}</text>
  335 + <view class="bg_rights"></view>
  336 + </view>
  337 + </view>
  338 + </view>
  339 + <!-- 门店列表,最外层的门店列表,一开始 -->
  340 + <view class="store-list">
  341 + <!--如果还没有点击更多门店的时候 -->
  342 + <block wx:if="{{choice_sort_store==0}}">
  343 + <!-- 需要for循环 -->
  344 + <block wx:if="{{is_show_sto_cat==1}}">
  345 + <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}">
  346 + <view class="store flex-vertical">
  347 + <!-- 需要点击事件 -->
  348 + <block wx:if="{{index==fir_pick_index}}">
  349 + <view class="circle white xc-hook fs20 red-b">Г</view>
  350 + </block>
  351 + <block wx:else>
  352 + <view class="circle xc-hooks"></view>
  353 + </block>
  354 + <view class="address-frame xc-ash">
  355 + <view class="flex-vertical-between butttem5">
  356 + <view class="flex xc-ash">
  357 + <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view>
  358 + </view>
  359 + <view>
  360 + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">
  361 + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}}</view>
  362 + </view>
  363 + </view>
  364 + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view>
  365 + </view>
  366 + </view>
  367 + </view>
  368 + </block>
  369 + <block wx:else>
  370 + <view class="store_choose flex" wx:for="{{only_pk}}" bindtap="choose_for_store_fir" data-ind="{{index}}">
  371 + <view class="store flex-vertical">
  372 + <!-- 需要点击事件 -->
  373 + <block wx:if="{{index==fir_pick_index}}">
  374 + <view class="circle white xc-hook fs20 red-b">Г</view>
  375 + </block>
  376 + <block wx:else>
  377 + <view class="circle xc-hooks"></view>
  378 + </block>
  379 +
  380 + <view class="address-frame xc-ash">
  381 + <view class="flex-vertical-between ">
  382 + <view class="flex xc-ash">
  383 + <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view>
  384 + </view>
  385 + <view>
  386 + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}}
  387 + </view>
  388 + </view>
  389 + </view>
  390 + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view>
  391 + </view>
  392 + </view>
  393 + </view>
  394 + </block>
  395 + </block>
  396 + <block wx:else>
  397 + <!-- 如果是点击选择门店分类后显示分类下的门店 -->
  398 + <view class="store_choose flex" wx:for="{{sec_sto.s_arr}}" data-ind="{{index}}" bindtap="choose_for_store">
  399 + <view class="store flex-vertical">
  400 + <!-- 需要点击事件 -->
  401 + <block wx:if="{{index==sec_pick_index}}">
  402 + <view class="circle white xc-hook fs20 red-b">Г</view>
  403 + </block>
  404 + <block wx:else>
  405 + <view class="circle xc-hooks"></view>
  406 + </block>
  407 +
  408 + <view class="address-frame xc-ash">
  409 + <view class="flex-vertical-between ">
  410 + <view class="flex xc-ash">
  411 + <view class="fs28 xc-black3 address_name">{{item.pickup_name}}</view>
  412 + </view>
  413 + <view>
  414 + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}}</view>
  415 + </view>
  416 + </view>
  417 + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view>
  418 + </view>
  419 + </view>
  420 + </view>
  421 + </block>
  422 +
  423 + </view>
  424 +
  425 + <!-- 门店列表底部 -->
  426 + <view class="store-bottom-frame">
  427 + <view class="store-bottom flex-center">
  428 + <view class="determine red-b fs30 white t-c" bindtap="sure_pick" data-openindstore="{{open_ind_store}}">确定</view>
  429 + <!-- <view class="default t-c fs28" bindtap="set_def_pick" data-openindstore="{{open_ind_store}}">设为默认</view> -->
  430 + </view>
  431 + </view>
  432 +
  433 + </block>
  434 +
  435 +
  436 + <block wx:else>
  437 + <view class="popup-top flex-space-between">
  438 + <text class="fs32 nearby_store">门店分类选择</text>
  439 + <view>
  440 + <view>
  441 + <icon bindtap="onclickstore" class="modal-closes" color="black" size="22" type="cancel"></icon>
  442 + </view>
  443 + </view>
  444 + </view>
  445 + <view class="sort_store_list">
  446 +
  447 + <view class="sort-store-frame" wx:for="{{all_sto}}" data-index="{{index}}" bindtap="choice_sort_store" data-region="{{item.name}}">
  448 + <view class="sort-store flex-vertical-between">
  449 + <view class="fs30" di>{{item.name}}</view>
  450 + <view class="black_rights-frame">
  451 + <view class="black_rights"></view>
  452 + </view>
  453 + </view>
  454 + </view>
  455 +
  456 + </view>
  457 + </block>
  458 + </view>
  459 +</block>
  460 +</view>
  461 +<warn id="warn"></warn>
0 462 \ No newline at end of file
... ...
packageG/pages/user/userinfo/userinfo.wxss 0 → 100644
  1 +.container {
  2 + padding-bottom: 165rpx;
  3 + transform: translate();
  4 +}
  5 +
  6 +.user-container {
  7 + font-size: 30rpx;
  8 +}
  9 +
  10 +input {
  11 + width: 450rpx;
  12 +}
  13 +
  14 +.head {
  15 + height: 220rpx;
  16 + border-bottom: 6rpx solid rgb(245, 245, 245);
  17 + border-top: 2rpx solid rgb(245, 245, 245);
  18 + background-size: 100%;
  19 +}
  20 +
  21 +.angle {
  22 + transform: rotate(225deg);
  23 + font-size: 24rpx;
  24 + margin-top: 2rpx;
  25 + color: rgb(153, 153, 153);
  26 +}
  27 +
  28 +.Headportrait {
  29 + width: 145rpx;
  30 + height: 145rpx;
  31 + border-radius: 50%;
  32 + margin-left: 40rpx;
  33 +}
  34 +
  35 +.vip {
  36 + margin-top: 30rpx;
  37 + color: rgb(255, 255, 255);
  38 +}
  39 +
  40 +.AncrownMax {
  41 + background-color: rgb(57, 57, 57);
  42 + height: 36rpx;
  43 + border-radius: 20rpx;
  44 + margin-right: 20rpx;
  45 + line-height: 36rpx;
  46 + padding-right: 14rpx;
  47 + padding-left: 10rpx;
  48 +}
  49 +
  50 +.Nickname {
  51 + max-width: 375rpx;
  52 +}
  53 +
  54 +.Ancrown {
  55 + width: 30rpx;
  56 + height: 30rpx;
  57 + margin-right: 5rpx;
  58 +}
  59 +
  60 +.plusMax {
  61 + background-color: rgb(212, 58, 30);
  62 + height: 36rpx;
  63 + border-radius: 20rpx;
  64 + line-height: 36rpx;
  65 + padding-left: 10rpx;
  66 + padding-right: 14rpx;
  67 +}
  68 +
  69 +.fuls {
  70 + width: 25rpx;
  71 + height: 25rpx;
  72 + margin-right: 5rpx;
  73 +}
  74 +
  75 +.Bbottom {
  76 + border-bottom: 6rpx solid rgb(245, 245, 245);
  77 +}
  78 +
  79 +.Mleft {
  80 + margin-left: 8rpx;
  81 +}
  82 +
  83 +.Birth {
  84 + width: 500rpx;
  85 +}
  86 +
  87 +.Gendercheck {
  88 + width: 90rpx;
  89 + height: 35rpx;
  90 + border: 2rpx solid rgb(212, 2, 31);
  91 + color: rgb(212, 2, 31);
  92 + border-radius: 20rpx;
  93 + margin-left: 15rpx;
  94 +}
  95 +
  96 +.Gender {
  97 + width: 90rpx;
  98 + height: 35rpx;
  99 + border: 2rpx solid rgb(153, 153, 153);
  100 + color: rgb(153, 153, 153);
  101 + border-radius: 20rpx;
  102 + margin-left: 15rpx;
  103 +}
  104 +
  105 +.GenderImage {
  106 + width: 25rpx;
  107 + height: 25rpx;
  108 + margin-right: 10rpx;
  109 +}
  110 +
  111 +.confirm {
  112 + width: 100%;
  113 + position: fixed;
  114 + left: 0rpx;
  115 + bottom: 0rpx;
  116 + height: 130rpx;
  117 + background-color: rgb(255, 255, 255);
  118 + z-index: 9;
  119 + border-top: 1rpx solid #ddd;
  120 +}
  121 +
  122 +.confirmtext {
  123 + width: 495rpx;
  124 + height: 65rpx;
  125 + color: rgb(255, 255, 255);
  126 + background-color: rgb(214, 1, 33);
  127 + border-radius: 35rpx;
  128 +}
  129 +
  130 +.cmleft {
  131 + margin-left: 45rpx;
  132 +}
  133 +
  134 +.hion {
  135 + width: 300rpx;
  136 + text-align: right;
  137 + margin-top: 3rpx;
  138 + margin-right: 5rpx;
  139 +}
  140 +
  141 +.eye {
  142 + width: 50rpx;
  143 + height: 50rpx;
  144 +}
  145 +
  146 +.user-head {
  147 + height: 95rpx;
  148 + background-color: white;
  149 + margin: 0rpx 20rpx;
  150 + border-bottom: 2rpx solid rgb(245, 245, 245);
  151 + padding: 0rpx 20rpx;
  152 + padding-top: 20rpx;
  153 +}
  154 +
  155 +.user_headimg {
  156 + height: 140rpx;
  157 + width: 140rpx;
  158 + border-radius: 70rpx;
  159 +}
  160 +
  161 +.user-name {
  162 + height: 95rpx;
  163 + margin-top: 2rpx;
  164 + background-color: white;
  165 + margin: 0rpx 20rpx;
  166 + border-bottom: 2rpx solid rgb(245, 245, 245);
  167 + padding: 0rpx 20rpx;
  168 +}
  169 +
  170 +.user-name.mt {
  171 + margin-top: 20rpx;
  172 +}
  173 +
  174 +.address {
  175 + max-width: 300rpx;
  176 +}
  177 +
  178 +.Receiving_goods {
  179 + width: 330rpx;
  180 +}
  181 +
  182 +.user-change {
  183 + width: 100%;
  184 + height: 100rpx;
  185 + margin-top: 20rpx;
  186 + background-color: white;
  187 +}
  188 +
  189 +.one-line {
  190 + white-space: nowrap;
  191 + word-break: keep-all;
  192 + overflow: hidden;
  193 +}
  194 +
  195 +/*---弹出层---*/
  196 +
  197 +.modal-box {
  198 + position: fixed;
  199 + width: 100%;
  200 + height: 100%;
  201 + top: 0px;
  202 + background: rgba(0, 0, 0, 0.4);
  203 + overflow: hidden;
  204 +}
  205 +
  206 +.modal-body {
  207 + position: fixed;
  208 + top: 80rpx;
  209 + left: 0;
  210 + z-index: 100;
  211 + background: #fff;
  212 + margin-left: 73rpx;
  213 + width: 600rpx;
  214 + height: 860rpx;
  215 + border-radius: 8px;
  216 + text-align: center;
  217 +}
  218 +
  219 +.modal-content {
  220 + width: 480rpx;
  221 + margin: 0 auto;
  222 + margin-top: 60rpx;
  223 + overflow: hidden;
  224 +}
  225 +
  226 +.modal-content .hd_img {
  227 + width: 170rpx;
  228 + height: 170rpx;
  229 + border-radius: 5px;
  230 +}
  231 +
  232 +.ctent_txt {
  233 + margin-left: 30rpx;
  234 + text-align: left;
  235 +}
  236 +
  237 +.txt1 {
  238 + font-size: 34rpx;
  239 + font-weight: bold;
  240 +}
  241 +
  242 +.txt2 {
  243 + font-size: 30rpx;
  244 + color: #999;
  245 + margin-top: 20rpx;
  246 +}
  247 +
  248 +.arrow-right {
  249 + width: 35rpx;
  250 + height: 35rpx;
  251 + margin-left: 10rpx;
  252 + position: relative;
  253 + top: 5rpx;
  254 +}
  255 +
  256 +.code {
  257 + margin-bottom: 10rpx;
  258 +}
  259 +
  260 +.user-txt-right {
  261 + color: rgb(153, 153, 153);
  262 + font-size: 28rpx;
  263 +}
  264 +
  265 +.user-txt {
  266 + font-size: 32rpx;
  267 +}
  268 +
  269 +.m_ta {
  270 + margin-top: 50rpx;
  271 +}
  272 +
  273 +.g_img {
  274 + width: 480rpx;
  275 + height: 480rpx;
  276 +}
  277 +
  278 +.s_sao {
  279 + font-size: 27rpx;
  280 + margin-top: 25rpx;
  281 +}
  282 +
  283 +.order-ico1 {
  284 + width: 80rpx;
  285 + height: 46rpx;
  286 + margin-left: 40rpx;
  287 + margin-right: 20rpx;
  288 + color: rgba(0, 0, 0, 0.4);
  289 +}
  290 +
  291 +.f_btn {
  292 + font-size: 24rpx;
  293 + padding: 0 12rpx;
  294 + margin-right: 26rpx;
  295 + margin-top: -10rpx;
  296 +}
  297 +
  298 +.order-ico3 {
  299 + width: 54rpx;
  300 + height: 40rpx;
  301 + margin-left: 40rpx;
  302 + margin-right: 20rpx;
  303 +}
  304 +
  305 +.wh1001 {
  306 + width: 62rpx;
  307 + height: 100%;
  308 +}
  309 +
  310 +.wh1002 {
  311 + width: 76rpx;
  312 + height: 100%;
  313 +}
  314 +
  315 +.order-ico.cla {
  316 + width: 32rpx;
  317 +}
  318 +
  319 +.order-ico.cla2 {
  320 + width: 42rpx;
  321 + margin-left: 34rpx;
  322 +}
  323 +
  324 +.order-ico.cla3 {
  325 + width: 40rpx;
  326 + margin-left: 36rpx;
  327 +}
  328 +
  329 +/* 日期控件 */
  330 +
  331 +.pi {
  332 + width: 200rpx;
  333 + height: auto;
  334 + margin-left: 10rpx;
  335 +}
  336 +
  337 +.vipmax {
  338 + margin-left: 20rpx;
  339 +}
  340 +
  341 +/* 门店地址 */
  342 +
  343 +.xc-address_frame {
  344 + border-top: 1rpx solid #eee;
  345 + width: 100%;
  346 + height: auto;
  347 +}
  348 +
  349 +.on_height {
  350 + height: 90rpx;
  351 +}
  352 +
  353 +.sn_height {
  354 + height: 170rpx;
  355 +}
  356 +
  357 +.xc-address_frame .address_frame {
  358 + width: 92%;
  359 + padding-left: 10rpx;
  360 + margin: auto;
  361 +}
  362 +
  363 +.stores-img {
  364 + width: 40rpx;
  365 + height: 35rpx;
  366 + margin-right: 10rpx;
  367 +}
  368 +
  369 +.shop_name {
  370 + margin-right: 10rpx;
  371 +}
  372 +
  373 +.address {
  374 + width: 87%;
  375 + margin-top: 5rpx;
  376 + margin-bottom: 5rpx;
  377 +}
  378 +
  379 +.distance {
  380 + padding-left: 15rpx;
  381 + padding-right: 15rpx;
  382 + background: #eee;
  383 + border-radius: 20rpx;
  384 + margin-right: 5rpx;
  385 + color: #999;
  386 + height: 38rpx;
  387 + line-height: 38rpx;
  388 +}
  389 +
  390 +/* 选择门店的弹窗 */
  391 +
  392 +.mongolia-layer {
  393 + position: fixed;
  394 + left: 0;
  395 + top: 0;
  396 + right: 0;
  397 + bottom: 0;
  398 + z-index: 11;
  399 + background: rgba(0, 0, 0, 0.4);
  400 + width: 100%;
  401 + height: 91.9%;
  402 +}
  403 +
  404 +.popup-frame {
  405 + position: fixed;
  406 + bottom: -1rpx;
  407 + z-index: 20;
  408 + background: white;
  409 + width: 100%;
  410 + border-radius: 20rpx 20rpx 0 0;
  411 +}
  412 +
  413 +.popup-top {
  414 + border-bottom: 1rpx solid #eee;
  415 + height: 155rpx;
  416 + width: 95%;
  417 + margin: auto;
  418 + line-height: 155rpx;
  419 +}
  420 +
  421 +.bg_rights {
  422 + border-top: 2rpx solid;
  423 + border-right: 2rpx solid;
  424 + transform: rotate(45deg);
  425 + display: inline-block;
  426 + width: 15rpx;
  427 + height: 15rpx;
  428 + border-color: #da0b31;
  429 +}
  430 +
  431 +.modal-closes {
  432 + position: absolute;
  433 + right: 30rpx;
  434 + top: 20rpx;
  435 + height: 50rpx;
  436 + line-height: 50rpx;
  437 +}
  438 +
  439 +.choose_more {
  440 + margin-top: 40rpx;
  441 + padding-right: 20rpx;
  442 +}
  443 +
  444 +.choose_mores {
  445 + margin-top: 30rpx;
  446 + margin-right: 15rpx;
  447 +}
  448 +
  449 +.store-list {
  450 + width: 95%;
  451 + min-height: 300rpx;
  452 + max-height: 610rpx;
  453 + overflow-y: scroll;
  454 + margin: auto;
  455 +}
  456 +
  457 +.store-list .store_choose {
  458 + width: 100%;
  459 + height: 120rpx;
  460 + line-height: 125rpx;
  461 + border-bottom: 1rpx solid #eee;
  462 +}
  463 +
  464 +.store-list .store_choose .store {
  465 + width: 100%;
  466 + margin: auto;
  467 + line-height: 37rpx;
  468 + padding-left: 20rpx;
  469 +}
  470 +
  471 +.xc-hook {
  472 + width: 33rpx;
  473 + height: 33rpx;
  474 + transform: rotate(-145deg);
  475 + line-height: 37rpx;
  476 + text-align: center;
  477 +}
  478 +
  479 +.xc-hooks {
  480 + width: 30rpx;
  481 + height: 30rpx;
  482 + border: 1rpx solid #999;
  483 +}
  484 +
  485 +.address-frame {
  486 + width: 93%;
  487 + margin-left: 7rpx;
  488 +}
  489 +
  490 +.nearby_store {
  491 + margin-left: 17rpx;
  492 +}
  493 +
  494 +.address_name {
  495 + margin-right: 10rpx;
  496 +}
  497 +
  498 +.address-val {
  499 + height: 38rpx;
  500 + line-height: 38rpx;
  501 +}
  502 +
  503 +.store-bottom {
  504 + width: 85%;
  505 + margin: auto;
  506 + height: 90rpx;
  507 +}
  508 +
  509 +.determine {
  510 + width: 320rpx;
  511 + height: 55rpx;
  512 + border-radius: 50rpx;
  513 + line-height: 55rpx;
  514 +}
  515 +
  516 +.default {
  517 + width: 260rpx;
  518 + height: 55rpx;
  519 + border: 3rpx solid #c8c8c8;
  520 + border-radius: 50rpx;
  521 + line-height: 55rpx;
  522 +}
  523 +
  524 +.store-bottom-frame {
  525 + width: 95%;
  526 + margin: auto;
  527 +}
  528 +
  529 +/* 门店分类列表 */
  530 +
  531 +.sort_store_list {
  532 + max-height: 700rpx;
  533 + overflow: hidden;
  534 + overflow-y: scroll;
  535 + width: 95%;
  536 + margin: auto;
  537 +}
  538 +
  539 +.sort_store_list .sort-store-frame {
  540 + width: 100%;
  541 + height: 100rpx;
  542 + line-height: 100rpx;
  543 + border-bottom: 1rpx solid #eee;
  544 +}
  545 +
  546 +.sort_store_list .sort-store-frame .sort-store {
  547 + width: 94.5%;
  548 + margin: auto;
  549 +}
  550 +
  551 +.black_rights-frame {
  552 + width: 50%;;
  553 +}
  554 +
  555 +.black_rights-frame .black_rights {
  556 + border-top: 3rpx solid;
  557 + border-right: 3rpx solid;
  558 + transform: rotate(45deg);
  559 + display: inline-block;
  560 + width: 20rpx;
  561 + height: 20rpx;
  562 +}
  563 +
  564 +.xc-val-money {
  565 + height: 80rpx;
  566 +}
  567 +
  568 +.xc-distance-bottom {
  569 + margin-bottom: 40rpx;
  570 +}
  571 +
  572 +.xc-distance-top {
  573 + margin-top: 10rpx;
  574 +}
  575 +
  576 +.xc-width {
  577 + width: 100%;
  578 +}
  579 +
  580 +.right-arrow {
  581 + width: 15rpx;
  582 + height: 15rpx;
  583 + border-top: 2rpx solid #d70026;
  584 + border-right: 2rpx solid #d70026;
  585 + transform: rotate(45deg);
  586 + display: inline-block;
  587 + margin-bottom: 3rpx;
  588 +}
  589 +
  590 +.xc-goods-attribute {
  591 + border-bottom: 1px solid #eee;
  592 + padding-bottom: 15px;
  593 + margin-bottom: 40rpx;
  594 +}
  595 +
  596 +.xc-val-fream {
  597 + width: 105rpx;
  598 +}
  599 +
  600 +.is_stock {
  601 + width: 58%;
  602 + height: 70rpx;
  603 + border-radius: 55rpx;
  604 +}
  605 +
  606 +.select_store_height {
  607 + height: 50rpx;
  608 +}
  609 +
  610 +.butttem5 {
  611 + margin-bottom: 5rpx;
  612 +}
  613 +
  614 +.s_btn {
  615 + margin-top: 25rpx;
  616 +}
  617 +
  618 +.padding {
  619 + padding: 0rpx 20rpx;
  620 +}
  621 +
  622 +.interest {
  623 + padding: 0rpx 20rpx;
  624 + padding-top: 30rpx;
  625 + padding-bottom: 30rpx;
  626 +}
  627 +
  628 +.lables {
  629 + display: inline-block;
  630 + padding-top: 25rpx;
  631 +}
  632 +
  633 +.lable {
  634 + display: inline-block;
  635 + height: 44rpx;
  636 + line-height: 44rpx;
  637 + margin-right: 15rpx;
  638 + color: rgb(255, 255, 255);
  639 + border: 2rpx solid rgb(255, 138, 160);
  640 + background-color: rgb(255, 138, 160);
  641 + padding: 0rpx 25rpx;
  642 + border-radius: 30rpx;
  643 + margin-bottom: 21rpx;
  644 + max-width: 195rpx;
  645 +}
  646 +
  647 +.add_lable {
  648 + height: 44rpx;
  649 + line-height: 44rpx;
  650 + color: rgb(189, 189, 189);
  651 + border: 2rpx solid rgb(189, 189, 189);
  652 + border-radius: 30rpx;
  653 + padding: 0rpx 25rpx;
  654 +}
  655 +
  656 +.plus {
  657 + font-weight: bold;
  658 + margin-right: 8rpx;
  659 +}
  660 +
  661 +.lable_wh {
  662 + height: 46rpx;
  663 + line-height: 46rpx;
  664 +}
  665 +
  666 +.lb_txt{
  667 + color: red; font-size: 24rpx;
  668 +}
... ...