|
@@ -81,7 +81,6 @@ const data = reactive({
|
|
|
address: store.state.user.addressInfo,
|
|
|
queryValue: '',
|
|
|
})
|
|
|
-console.log('--------index--------',data.address);
|
|
|
|
|
|
// 分页
|
|
|
const pages = ref({
|
|
@@ -98,11 +97,11 @@ const cityClick = async () => {
|
|
|
{ latitude, longitude },
|
|
|
addresstree.value
|
|
|
)
|
|
|
- console.log('TCL: cityClick -> address', address)
|
|
|
data.address = { ...data.address, ...address }
|
|
|
- store.dispatch('handlerAddress',data.address)
|
|
|
- settingAddress();
|
|
|
- console.log('address', address)
|
|
|
+ console.log("TCL: settingAddress1 -> data", data)
|
|
|
+ store.dispatch('handlerAddress', data.address)
|
|
|
+ const token = getToken();
|
|
|
+ token ? settingAddress():getList();
|
|
|
}
|
|
|
|
|
|
const loadmoreInfo = ref({
|
|
@@ -153,17 +152,13 @@ const getList = async () => {
|
|
|
latitude,
|
|
|
longitude,
|
|
|
}
|
|
|
- console.log('volunteerinfolist ==>',params);
|
|
|
-
|
|
|
+
|
|
|
const res = await volunteerinfolist(params)
|
|
|
|
|
|
if (!res || !res.rows) {
|
|
|
return
|
|
|
}
|
|
|
- console.log(
|
|
|
- '判断是否已经到了最后一页',
|
|
|
- pages.value.current >= Math.ceil(res.total / pages.value.pageSize)
|
|
|
- )
|
|
|
+
|
|
|
|
|
|
// 如果是第一页,先清空
|
|
|
if (pages.value.current === 1) {
|
|
@@ -175,7 +170,6 @@ const getList = async () => {
|
|
|
res.rows.forEach((item, index) => {
|
|
|
index % 2 !== 0 ? rightList.value.push(item) : leftList.value.push(item)
|
|
|
})
|
|
|
- console.log('home', leftList.value, rightList.value);
|
|
|
|
|
|
pages.value.total = res.total
|
|
|
if (pages.value.current >= Math.ceil(res.total / pages.value.pageSize)) {
|
|
@@ -229,9 +223,9 @@ const getBanners = async () => {
|
|
|
|
|
|
const settingAddress = async () => {
|
|
|
try {
|
|
|
- console.log('data', data)
|
|
|
|
|
|
const { address } = data
|
|
|
+
|
|
|
const { cityCode, latitude, longitude } = address
|
|
|
const parmas = {
|
|
|
provinceName: cityCode.data[0], // 省
|
|
@@ -247,7 +241,6 @@ const settingAddress = async () => {
|
|
|
latitude,
|
|
|
longitude,
|
|
|
}
|
|
|
- console.log("TCL: settingAddress -> parmas", parmas);
|
|
|
const res = await settingHomeAddress(parmas)
|
|
|
leftList.value = [];
|
|
|
rightList.value = [];
|
|
@@ -271,8 +264,7 @@ onShow(() => {
|
|
|
globalData.value = { statusBarHeight, navBarHeight }
|
|
|
},
|
|
|
})
|
|
|
- console.log('=========>!userType',!userType);
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
|
|
|
const addresstree = ref([])
|
|
@@ -288,14 +280,15 @@ onPageScroll(e => {
|
|
|
onMounted(async () => {
|
|
|
getNotice()
|
|
|
const token = getToken();
|
|
|
- // console.log("TCL: token", token || 'null')
|
|
|
+
|
|
|
+ const res_dara = await regionAddresstree()
|
|
|
+ addresstree.value = res_dara.data
|
|
|
+
|
|
|
if (token) {
|
|
|
- const res_dara = await regionAddresstree()
|
|
|
- addresstree.value = res_dara.data
|
|
|
locateTheCurrentAddress(res_dara.data)
|
|
|
.then((res) => {
|
|
|
- console.log('locateTheCurrentAddress', res)
|
|
|
data.address = res
|
|
|
+ console.log("TCL: settingAddress0 -> data", data)
|
|
|
settingAddress()
|
|
|
})
|
|
|
.catch((error) => {
|
|
@@ -303,8 +296,6 @@ onMounted(async () => {
|
|
|
getList()
|
|
|
})
|
|
|
} else {
|
|
|
-
|
|
|
-
|
|
|
getList();
|
|
|
}
|
|
|
})
|
|
@@ -375,7 +366,8 @@ onUnload(() => { })
|
|
|
height: 180rpx;
|
|
|
border-radius: 16rpx;
|
|
|
background: linear-gradient(180deg, #FEF9ED 0%, #FFF9F3 100%);
|
|
|
- .notice-bar{
|
|
|
+
|
|
|
+ .notice-bar {
|
|
|
margin-top: 10rpx;
|
|
|
}
|
|
|
}
|
|
@@ -386,14 +378,14 @@ onUnload(() => { })
|
|
|
margin-left: 11rpx;
|
|
|
margin-right: 17rpx;
|
|
|
margin-bottom: 120rpx;
|
|
|
-
|
|
|
+
|
|
|
&.no-margin {
|
|
|
margin-top: 0;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 轮播图下的圆角样式
|
|
|
-.home-Wrapper{
|
|
|
+.home-Wrapper {
|
|
|
position: absolute;
|
|
|
top: 542rpx;
|
|
|
width: 100%;
|