Skip to content

Commit f6fef35

Browse files
authored
Merge pull request bailicangdu#286 from catchonme/master
修改拼写错误,food页面排序问题
2 parents 67a29f1 + 8fe8fc7 commit f6fef35

File tree

6 files changed

+29
-22
lines changed

6 files changed

+29
-22
lines changed

src/components/common/computeTime.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
.page{
7979
display: inline-block;
8080
.rem_time{
81-
@include sc(.55rem, #orange);
81+
@include sc(.55rem, orange);
8282
padding: .1rem .2rem;
8383
border-radius: .15rem;
8484
}

src/page/food/food.vue

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</ul>
3939
</section>
4040
</section>
41-
</transition>
41+
</transition>
4242
</div>
4343
<div class="sort_item" :class="{choose_type:sortBy == 'sort'}">
4444
<div class="sort_item_container" @click="chooseType('sort')">
@@ -120,7 +120,7 @@
120120
</li>
121121
</ul>
122122
</section>
123-
</transition>
123+
</transition>
124124
</div>
125125
<div class="sort_item" :class="{choose_type:sortBy == 'activity'}">
126126
<div class="sort_item_container" @click="chooseType('activity')">
@@ -168,15 +168,15 @@
168168
<section class="shop_list_container">
169169
<shop-list :geohash="geohash" :restaurantCategoryId="restaurant_category_id" :restaurantCategoryIds="restaurant_category_ids" :sortByType='sortByType' :deliveryMode="delivery_mode" :confirmSelect="confirmStatus" :supportIds="support_ids" v-if="latitude" @DidConfrim="clearAll"></shop-list>
170170
</section>
171-
</div>
171+
</div>
172172
</template>
173173

174174
<script>
175175
import {mapState, mapMutations} from 'vuex'
176176
import headTop from 'src/components/header/head'
177177
import shopList from 'src/components/common/shoplist'
178178
import {getImgPath} from 'src/components/common/mixin'
179-
import {msiteAdress, foodCategory, foodDelivery, foodActivity} from 'src/service/getData'
179+
import {msiteAddress, foodCategory, foodDelivery, foodActivity} from 'src/service/getData'
180180
181181
export default {
182182
data(){
@@ -222,10 +222,10 @@ export default {
222222
this.headTitle = this.$route.query.title;
223223
this.foodTitle = this.headTitle;
224224
this.restaurant_category_id = this.$route.query.restaurant_category_id;
225-
//防止刷新页面时,vuex状态丢失,经度纬度需要重新获取,并存入vuex
225+
//防止刷新页面时,vuex状态丢失,经度纬度需要重新获取,并存入vuex
226226
if (!this.latitude) {
227227
//获取位置信息
228-
let res = await msiteAdress(this.geohash);
228+
let res = await msiteAddress(this.geohash);
229229
// 记录当前经度纬度进入vuex
230230
this.RECORD_ADDRESS(res);
231231
}
@@ -288,8 +288,14 @@ export default {
288288
},
289289
//点击某个排序方式,获取事件对象的data值,并根据获取的值重新获取数据渲染
290290
sortList(event){
291-
console.log(this.filterNum)
292-
this.sortByType = event.target.getAttribute('data');
291+
let node;
292+
// 如果点击的是 span 中的文字,则需要获取到 span 的父标签 p
293+
if (event.target.nodeName.toUpperCase() !== 'P') {
294+
node = event.target.parentNode;
295+
} else {
296+
node = event.target;
297+
}
298+
this.sortByType = node.getAttribute('data');
293299
this.sortBy = '';
294300
},
295301
//筛选选项中的配送方式选择
@@ -327,8 +333,9 @@ export default {
327333
},
328334
//只有点击清空按钮才清空数据,否则一直保持原有状态
329335
clearSelect(){
330-
this.support_ids.map(item => item.status = false);
331-
this.filterNum = 0;
336+
this.support_ids.map(item => item.status = false);
337+
this.filterNum = 0;
338+
this.delivery_mode = null;
332339
},
333340
//点击确认时,将需要筛选的id值传递给子组件,并且收回列表
334341
confirmSelectFun(){
@@ -378,7 +385,7 @@ export default {
378385
transition: all .3s;
379386
fill:#666;
380387
}
381-
388+
382389
}
383390
.choose_type{
384391
.sort_item_container{

src/page/login/login.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<input v-if="!showPassword" type="password" placeholder="密码" v-model="passWord">
2222
<input v-else type="text" placeholder="密码" v-model="passWord">
2323
<div class="button_switch" :class="{change_to_text: showPassword}">
24-
<div class="circel_button" :class="{trans_to_right: showPassword}" @click="changePassWordType"></div>
24+
<div class="circle_button" :class="{trans_to_right: showPassword}" @click="changePassWordType"></div>
2525
<span>abc</span>
2626
<span>...</span>
2727
</div>
@@ -278,7 +278,7 @@
278278
border: 1px;
279279
border-radius: 0.5rem;
280280
position: relative;
281-
.circel_button{
281+
.circle_button{
282282
transition: all .3s;
283283
position: absolute;
284284
top: -0.2rem;

src/page/msite/msite.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</svg>
99
</router-link>
1010
<router-link to="/home" slot="msite-title" class="msite_title">
11-
<span class="title_text ellipsis">{{msietTitle}}</span>
11+
<span class="title_text ellipsis">{{msiteTitle}}</span>
1212
</router-link>
1313
</head-top>
1414
<nav class="msite_nav">
@@ -46,15 +46,15 @@ import {mapMutations} from 'vuex'
4646
import headTop from 'src/components/header/head'
4747
import footGuide from 'src/components/footer/footGuide'
4848
import shopList from 'src/components/common/shoplist'
49-
import {msiteAdress, msiteFoodTypes, cityGuess} from 'src/service/getData'
49+
import {msiteAddress, msiteFoodTypes, cityGuess} from 'src/service/getData'
5050
import 'src/plugins/swiper.min.js'
5151
import 'src/style/swiper.min.css'
5252
5353
export default {
5454
data(){
5555
return {
5656
geohash: '', // city页面传递过来的地址geohash
57-
msietTitle: '请选择地址...', // msiet页面头部标题
57+
msiteTitle: '请选择地址...', // msite页面头部标题
5858
foodTypes: [], // 食品分类列表
5959
hasGetData: false, //是否已经获取地理位置数据,成功之后再获取商铺列表信息
6060
imgBaseUrl: 'https://fuss10.elemecdn.com', //图片域名地址
@@ -70,8 +70,8 @@ export default {
7070
//保存geohash 到vuex
7171
this.SAVE_GEOHASH(this.geohash);
7272
//获取位置信息
73-
let res = await msiteAdress(this.geohash);
74-
this.msietTitle = res.name;
73+
let res = await msiteAddress(this.geohash);
74+
this.msiteTitle = res.name;
7575
// 记录当前经度纬度
7676
this.RECORD_ADDRESS(res);
7777

src/page/shop/shop.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@
317317

318318
<script>
319319
import {mapState, mapMutations} from 'vuex'
320-
import {msiteAdress, shopDetails, foodMenu, getRatingList, ratingScores, ratingTags} from 'src/service/getData'
320+
import {msiteAddress, shopDetails, foodMenu, getRatingList, ratingScores, ratingTags} from 'src/service/getData'
321321
import loading from 'src/components/common/loading'
322322
import buyCart from 'src/components/common/buyCart'
323323
import ratingStar from 'src/components/common/ratingStar'
@@ -427,7 +427,7 @@
427427
async initData(){
428428
if (!this.latitude) {
429429
//获取位置信息
430-
let res = await msiteAdress(this.geohash);
430+
let res = await msiteAddress(this.geohash);
431431
// 记录当前经度纬度进入vuex
432432
this.RECORD_ADDRESS(res);
433433
}

src/service/getData.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const searchplace = (cityid, value) => fetch('/v1/pois', {
5050
* 获取msite页面地址信息
5151
*/
5252

53-
export const msiteAdress = geohash => fetch('/v2/pois/' + geohash);
53+
export const msiteAddress = geohash => fetch('/v2/pois/' + geohash);
5454

5555

5656
/**

0 commit comments

Comments
 (0)