Chore:代码格式化&删除无用的文件

This commit is contained in:
lifizer
2024-03-27 17:55:22 +08:00
parent eb87337e70
commit cfd09436f1
5 changed files with 46 additions and 2991 deletions
-8
View File
@@ -856,14 +856,6 @@
"navigationBarTitleText": "文玩"
}
},
{
"path": "views/store",
"style": {
"navigationBarTitleText": "文玩店铺详情",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "views/storeList",
"style": {
+37 -38
View File
@@ -126,13 +126,13 @@
</template>
<script>
import MescrollMixins from "@/mixins/mescroll-mixins.js";
import {fetchCity} from "@/api/wenwan";
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue";
import {getCurAddress, getLocation} from "@/utils/common.js";
import MescrollMixins from '@/mixins/mescroll-mixins.js'
import {fetchCity} from '@/api/wenwan'
import MescrollBody from '@/components/mescroll-uni/mescroll-body.vue'
import {getCurAddress, getLocation} from '@/utils/common.js'
export default {
name: "choseCity",
name: 'ChoseCity',
components: {
MescrollBody
},
@@ -143,8 +143,7 @@ export default {
// 此时mescroll会携带page的参数:
// let pageNum = mescroll.num; // 页码, 默认从1开始
// let pageSize = mescroll.size; // 页长, 默认每页10条
mescroll.endSuccess(10);
mescroll.endSuccess(10)
}
})
],
@@ -162,23 +161,23 @@ export default {
auto: true
},
listGroup: [],
provinceName: "",
provinceName: '',
listCity: [],
navActive: 0,
keyword: "",
keyword: '',
type: null,
location: "",
location: '',
banner: {},
recommendInfo: null // 推荐信息
};
}
},
onLoad(options) {
this.type = Number(options.type);
this.location = options.city;
this.type = Number(options.type)
this.location = options.city
if (this.location === undefined) {
this.getMapData();
this.getMapData()
}
this.init();
this.init()
},
methods: {
reload() {
@@ -218,23 +217,23 @@ export default {
})
},
async getMapData() {
const map = await getLocation();
const map = await getLocation()
if (map) {
const {latitude, longitude} = map[1];
const address = await getCurAddress(latitude, longitude);
this.location = address[1].data.result.ad_info.city;
const {latitude, longitude} = map[1]
const address = await getCurAddress(latitude, longitude)
this.location = address[1].data.result.ad_info.city
}
},
init() {
fetchCity(this.type).then(res => {
if (res.success) {
this.listGroup = res.data.group;
this.listGroup = res.data.group
if (this.listGroup.length > 0) {
this.listCity = this.listGroup[0].city;
this.provinceName = this.listGroup[0].label;
this.listCity = this.listGroup[0].city
this.provinceName = this.listGroup[0].label
this.recommendInfo = this.listGroup[0].recommendInfo
this.banner = {
...this.listGroup[0],
...this.listGroup[0],
icon: this.listGroup[0].icon,
url: this.listGroup[0].uniappUrl
}
@@ -243,18 +242,18 @@ export default {
})
},
asideTap(index) {
this.navActive = index;
this.listCity = this.listGroup[index].city;
this.provinceName = this.listGroup[index].label;
this.navActive = index
this.listCity = this.listGroup[index].city
this.provinceName = this.listGroup[index].label
this.recommendInfo = this.listGroup[index].recommendInfo
this.banner = {
...this.listGroup[index],
icon: this.listGroup[index].icon,
url: this.listGroup[index].uniappUrl
}
//触发加载请求
this.mescroll.scrollTo(0, 0);
this.mescroll && this.mescroll.resetUpScroll(false);
// 触发加载请求
this.mescroll.scrollTo(0, 0)
this.mescroll && this.mescroll.resetUpScroll(false)
},
emptyClick: function () {
//触发加载请求
@@ -262,9 +261,9 @@ export default {
},
search() {
this.listGroup.findIndex((group, index) => {
let result;
let result
group.city.forEach(item => {
result = item.cityName.indexOf(this.keyword, 0);
result = item.cityName.indexOf(this.keyword, 0)
if (result !== -1) {
this.asideTap(index);
return null;
@@ -276,8 +275,8 @@ export default {
})
},
select(item) {
if (this.type === 0 && item.hasData === 0) return;
if ((this.type === 1 || this.type === 2) && item.hasShop === 0) return;
if (this.type === 0 && item.hasData === 0) return
if ((this.type === 1 || this.type === 2) && item.hasShop === 0) return
uni.setStorageSync("cityName", item.cityName)
switch (this.type) {
@@ -285,20 +284,20 @@ export default {
uni.navigateTo({
url: `/pkg_product/views/nativeList?cityId=${item.cityId}`
})
break;
break
case 1:
uni.navigateTo({
url: `/wenwan/views/storeList?cityId=${item.cityId}`
})
break;
break
case 6:
uni.navigateTo({
url: `/pkg_product/views/scenicSpot?cityId=${item.cityId}`
})
break;
break
default:
uni.navigateBack()
break;
break
}
},
goToStore(id) {
@@ -306,7 +305,7 @@ export default {
return
}
uni.navigateTo({
url: "/pagesInn/inn/innHome?id=" + id
url: '/pagesInn/inn/innHome?id=' + id
})
},
goToGoods(productId) {
+9 -3
View File
@@ -210,9 +210,15 @@
<view class="service-section goods-section" v-if="storeInfo && storeInfo.isTickets!=1">
<view class="cell flex jc-between ai-center" @click="changeCoupons()" v-if="couponList['usable'].length>0">
<view>
<text class="coupon-label tc" v-for="(item,index) in couponList.usable" :key="index" v-if="index<2">
{{ item.couponTitle }}
</text>
<template v-for="(item, index) in couponList.usable">
<text
v-if="index < 2"
:key="index"
class="coupon-label tc"
>
{{ item.couponTitle }}
</text>
</template>
</view>
<view class="value">优惠详情
<uni-icons type="right" size="13" color="#707070"></uni-icons>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff