PageSourceSearch

https://www.regal.co.jp/StaffContent/assets/js/impl/staffstart-impl-coordinateList.js?20240515_1

js regal.co.jp collected 2026-10-02 02:28:05 UTC 8,555 bytes, 230 lines download raw bytes

1var ecblib = ecblib || {};
2ecblib.staffstart = ecblib.staffstart || {};
3ecblib.staffstart.impl = ecblib.staffstart.impl || {};
4
5(function() {
6  'use strict';
7  ecblib.staffstart.impl.coordinateList = function(_el, _mobile, _option, _conditionFunc) {
8    ecblib.staffstart.util.initGloalVariables(_mobile);
9
10    new Vue({
11      el: _el,
12      data: function () {
13        return {
14          mobile: _mobile,
15          displayType: ecblib.staffstart.displaytype,
16          displayTypeConst: ecblib.staffstart.displaytype_const,
17          isShowMenu: false,
18          breadCrumbList: [
19            { name: 'トップ', url: ecblib.staffstart.uri.home },
20            { name: 'スタイリング', url: '#' },
21          ],
22          sortTypes: [
23            { id: 'time', name: '新着順' },
24            { id: 'pv', name: '人気順' },
25            { id: 'sales', name: 'おすすめ順' },
26          ],
27  
28          coordinatesLlength: 0,
29          searchConditions: {},
30  
31          selected_tag: null,
32          selected_tags: [],
33          shop: 0,
34          category: { first: [], second: [] },
35          brand: [],
36          gender: null,
37          genre: null,
38          user: { skin_type: null, skin_color: null, eyelid: null },
39          stature: { min: null, max: null },
40          age: { min: null, max: null },
41          release_date: null,
42          from_date: null,
43          sort_type: 'time',
44          product_code: null,
45          base_product_code: null,
46          size: [],
47          feature: null,
48          qualification_1: [],
49          qualification_2: [],
50          ss_pageindex: null,
51          ss_pageindex_coordinate: null,
52          product_code_array: null,
53          cid_array: [],
54        };
55      },
56      created: function () {
57        const _self = this;
58        _self.Search();
59        window.addEventListener("popstate", function() {
60          _self.Search();
61        });
62      },
63      methods: {
64        getCoordinates: function () {
65          if(_conditionFunc) {
66            this.searchConditions = _conditionFunc(this);
67          } else {
68            this.searchConditions = {
69              tag_id: this.selected_tags.length > 0 ? this.selected_tags.map(function(i) {return i.tag_id}).join() : null,
70              tag: this.selected_tag,
71              shop_code: this.shop == 0 ? null : this.shop,
72              parent_category: this.category.first.length > 0 ? this.category.first.join() : null,
73              category: this.category.second.length > 0 ? this.category.second.join() : null,
74              label: this.brand.length > 0 ? this.brand.join() : null,
75              user_gender: this.gender,
76              coordinate_genre: this.genre,
77              "user.skin_type": this.user ? this.user.skin_type : null,
78              "user.skin_color": this.user ? this.user.skin_color : null,
79              "user.eyelid": this.user ? this.user.eyelid : null,
80              from_height: this.stature ? this.stature.min : null,
81              to_height: this.stature ? this.stature.max : null,
82              from_age: this.age ? this.age.min : null,
83              to_age: this.age ? this.age.max : null,
84              sort: this.sort_type,
85              product_code: this.product_code,
86              size: this.size,
87              feature: this.feature,
88              qualification_1 : this.qualification_1,
89              qualification_2 : this.qualification_2,
90              ss_pageindex: this.ss_pageindex,
91              from_date: this.from_date,
92            };
93          }
94          this.isShowMenu = false;
95        },
96        initSearchConditions: function () {
97          this.selected_tag = null;
98          this.selected_tags = [];
99          this.shop = 0;
100          this.category = { first: [], second: [] };
101          this.brand = [];
102          this.gender = null;
103          this.genre = null;
104          this.user = { skin_type: null, skin_color: null, eyelid: null };
105          this.stature = { min: null, max: null };
106          this.age = { min: null, max: null };
107          this.release_date = null;
108          this.size = [];
109          this.feature = null;
110          this.qualification_1 = [];
111          this.qualification_2 = [];
112          this.ss_pageindex = null;
113          this.ss_pageindex_coordinate = null;
114          this.from_date = null;
115  
116          this.getCoordinates();
117        },
118        pushHistory: function(){
119          if(location.pathname.indexOf('relate_goods.aspx') > 0) return;
120          var params = this.searchConditions;
121
122          let queryStringArray = [];
123          Object.keys(params).forEach(
124            function(i) {
125              if(params[i] === false || params[i] === 0 || (params[i] != '' && params[i] !== null && params[i] !== undefined)) {
126                queryStringArray.push(i + '=' +  encodeURI(params[i]));
127              }
128            }
129          );
130          if(location.href != location.href.substr(0, location.href.indexOf('?')) + '?' + queryStringArray.join('&')){
131            history.pushState(null, null, location.pathname + '?' + queryStringArray.join('&'));
132          }
133        },
134        Search: function(){
135          const _self = this;
136
137          _self.shop = 0;
138          _self.category = { first: [], second: [] };
139          _self.brand = [];
140          _self.gender = null;
141          _self.genre = null;
142          _self.user = { skin_type: null, skin_color: null, eyelid: null };
143          _self.stature = { min: null, max: null };
144          _self.age = { min: null, max: null };
145          _self.release_date = null;
146          _self.from_date = null;
147          _self.size = [];
148          _self.feature = null;
149          _self.qualification_1 = [];
150          _self.qualification_2 = [];
151          _self.ss_pageindex = null;
152          _self.ss_pageindex_coordinate = null;
153
154          if (_option) {
155            Object.keys(_option).forEach(
156              function(i) {
157                if (i in _self) {
158                  _self[i] = _option[i];
159                }
160              }
161            );
162          }
163          const queryParams = ecblib.staffstart.util.queryParams();
164          if(Object.keys(queryParams).length > 0){
165            Object.keys(queryParams).forEach(
166              function(i) {
167                switch (i){
168                  case "shop_code":
169                    _self.shop = queryParams[i];
170                    break;
171                  case "category":
172                    _self.category.second = queryParams[i].split(",");
173                    break;
174                  case "label":
175                    _self.brand = queryParams[i].split(",");
176                    break;
177                  case "user_gender":
178                    _self.gender = queryParams[i];
179                    break;
180                  case "from_height":
181                    _self.stature.min = Number(queryParams[i]);
182                    break;
183                  case "to_height":
184                    _self.stature.max = Number(queryParams[i]);
185                    break;
186                  case "size":
187                    _self.size = queryParams[i].split(",");
188                    break;
189                  case "feature":
190                    _self.feature = queryParams[i];
191                    break;
192                  case "qualification_1":
193                    _self.qualification_1 = queryParams[i].split(",");
194                    break;
195                  case "qualification_2":
196                    _self.qualification_2 = queryParams[i].split(",");
197                    break;
198                  case "tag":
199                    _self.selected_tag = queryParams[i];
200                    break;
201                  case "sort":
202                    _self.sort_type = queryParams[i];
203                    break;
204                  default:
205                    if (i in _self) {
206                      _self[i] = queryParams[i];
207                    }
208                }
209              }
210            );
211          }
212          this.getCoordinates();
213        },
214      },
215      watch: {
216        'sort_type': function () {
217          this.getCoordinates();
218          this.pushHistory();
219        },
220        'selected_tag': function (newTag, oldTag) {
221          if(newTag !== oldTag) {
222            this.searchConditions.tag = newTag
223            this.pushHistory();
224            this.getCoordinates();
225          }
226        },
227      },
228    });
229  };
230})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.