diff --git a/pages/index/home.vue b/pages/index/home.vue
index d52e7b4..4d66647 100644
--- a/pages/index/home.vue
+++ b/pages/index/home.vue
@@ -13,8 +13,8 @@
-
+
@@ -84,21 +84,27 @@
2.微信头像
- 确认授权
+ 拒绝授权
+
+ 确认授权
+
+
+
+
+
+
+
+ 授予小程序绑定微信手机号码的权限
+
+
+ 拒绝授权
+
+
+
+
-
-
-
-
-
- 授予小程序绑定微信手机号码的权限
-
-
-
-
-
@@ -121,7 +127,7 @@
hotGoods: [],
discountGoods: {},
InputBottom: 0,
- isAuthWxLoginModal: false,
+ isAuthWxLoginModal: false,
isAuthWxPhoneModal: false,
searchInfo: {},
areaList: [],
@@ -138,34 +144,34 @@
this.loadData();
},
methods: {
- async loadData() {
- uni.showLoading({
- mask: true,
- title: '加载中'
- })
- // 更新缓存中的userInfo
- let res = await this.$request.storageExistUser();
- // 获取缓存中的userInfo
- let curUserInfo = this.$request.getCurUserInfo();
- this.isAuthWxLoginModal = curUserInfo && curUserInfo.openId ? false : true;
- if (this.isAuthWxLoginModal) {
- return;
- }
- this.isAuthWxPhoneModal = !curUserInfo.phone ? true : false;
- if (this.isAuthWxPhoneModal) {
- return;
- }
- uni.hideLoading();
-
+ async loadData() {
+ uni.showLoading({
+ mask: true,
+ title: '加载中'
+ })
+ // 更新缓存中的userInfo
+ let res = await this.$request.storageExistUser();
+ // 获取缓存中的userInfo
+ let curUserInfo = this.$request.getCurUserInfo();
+ this.isAuthWxLoginModal = curUserInfo && curUserInfo.openId ? false : true;
+ if (this.isAuthWxLoginModal) {
+ return;
+ }
+ this.isAuthWxPhoneModal = !curUserInfo.phone ? true : false;
+ if (this.isAuthWxPhoneModal) {
+ return;
+ }
+ uni.hideLoading();
+
// 加载区域信息
- this.loadRegionList();
- // 加载热门商品
- let hotGoodsRes = await this.$request.getHotGoods({
- pageNum: 0,
- pageSize: 50
- });
- this.hotGoods = hotGoodsRes.rows;
-
+ this.loadRegionList();
+ // 加载热门商品
+ let hotGoodsRes = await this.$request.getHotGoods({
+ pageNum: 0,
+ pageSize: 50
+ });
+ this.hotGoods = hotGoodsRes.rows;
+
this.swiperList = await this.$api.data('swiperList');
this.categories = await this.$api.data('categories');
this.subCategories = await this.$api.data('subCategories');
@@ -198,8 +204,8 @@
}
this.areaList.push(regionList);
this.areaList.push(subRegionList);
- this.areaList.push(subSubRegionList);
- // 默认选中第一个,因此将第一个区域默认加入查询条件中
+ this.areaList.push(subSubRegionList);
+ // 默认选中第一个,因此将第一个区域默认加入查询条件中
this.searchInfo.area = [regionList[0], subRegionList[0], subSubRegionList[0]];
},
regionChange(e) {
@@ -233,7 +239,7 @@
} else if (colObj.column == 1) {
// 通过二级查三级
let subAreaList = await this.$request.areaListByStep({
- parentCode: this.regionList[0][colObj.value].areaCode
+ parentCode: this.areaList[1][colObj.value].areaCode
});
subAreaList = subAreaList.data;
this.areaList.pop();
@@ -248,27 +254,27 @@
console.log("切换细类, 大类id=" + categoryId);
let allSubCategories = await this.$api.data('subCategories');
this.subCategories = allSubCategories.slice(0, (4 - categoryId) * 5);
- },
- chooseCategory(item) {
- this.searchInfo.category = item;
- this.searchGoods();
+ },
+ chooseCategory(item) {
+ this.searchInfo.category = item;
+ this.searchGoods();
},
searchGoods() {
- let params = {
- category: this.searchInfo.category,
- area: this.searchInfo.area,
- inputGoodsName: this.searchInfo.inputGoodsName
- };
- uni.navigateTo({
- url: '/pages/product/filtered-products?params=' + encodeURIComponent(JSON.stringify(params))
+ let params = {
+ category: this.searchInfo.category,
+ area: this.searchInfo.area,
+ inputGoodsName: this.searchInfo.inputGoodsName
+ };
+ uni.navigateTo({
+ url: '/pages/product/filtered-products?params=' + encodeURIComponent(JSON.stringify(params))
})
},
showDetails(productItem) {
- let params = {
- goodsId: productItem.goodsId
- }
- uni.navigateTo({
- url: '/pages/product/product-detail?params=' + encodeURIComponent(JSON.stringify(params))
+ let params = {
+ goodsId: productItem.goodsId
+ }
+ uni.navigateTo({
+ url: '/pages/product/product-detail?params=' + encodeURIComponent(JSON.stringify(params))
});
},
showProductCategories() {
@@ -283,11 +289,11 @@
}
})
},
- getPhoneNumber(e) {
- this.$request.storagePhoneIntoUserInfo(e.detail.code).then(res => {
- if (res) {
- this.loadData();
- }
+ getPhoneNumber(e) {
+ this.$request.storagePhoneIntoUserInfo(e.detail.code).then(res => {
+ if (res) {
+ this.loadData();
+ }
})
}
}
@@ -305,5 +311,12 @@
.hot-sub-category .cu-item .hot-sub-category-icon {
font-size: 80rpx;
+ }
+
+ .modal-bottom-oper {
+ height: 70rpx;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
}
diff --git a/pages/my/edit-address.vue b/pages/my/edit-address.vue
index e0a9160..d3cce6a 100644
--- a/pages/my/edit-address.vue
+++ b/pages/my/edit-address.vue
@@ -116,7 +116,7 @@
this.multiIndex = [colObj.value, 0, 0];
} else if (colObj.column == 1) {
// 通过二级查三级
- let subSubAreaList = await this.$request.areaListByStep({parentCode: subAreaList[0].areaCode});
+ let subSubAreaList = await this.$request.areaListByStep({parentCode: this.areaList[1][colObj.value].areaCode});
subSubAreaList = subSubAreaList.data;
this.areaList.pop();
this.areaList.push(subSubAreaList);
diff --git a/pages/product/filtered-products.vue b/pages/product/filtered-products.vue
index 53e8cea..4b12f50 100644
--- a/pages/product/filtered-products.vue
+++ b/pages/product/filtered-products.vue
@@ -319,7 +319,7 @@
this.areaMultiIndex = [colObj.value, 0, 0];
} else if (colObj.column == 1) {
// 通过二级查三级
- let subAreaList = await this.$request.areaListByStep({parentCode: this.regionList[0][colObj.value].areaCode});
+ let subAreaList = await this.$request.areaListByStep({parentCode: this.areaList[1][colObj.value].areaCode});
subAreaList = subAreaList.data;
this.areaList.pop();
this.areaList.push(subAreaList);
diff --git a/style/blue/blue-topic.css b/style/blue/blue-topic.css
index 4541d3c..0ee7680 100644
--- a/style/blue/blue-topic.css
+++ b/style/blue/blue-topic.css
@@ -1,7 +1,7 @@
-.bg-back {
- background-color: #f5f5f5;
-}
-
+.bg-back {
+ background-color: #f5f5f5;
+}
+
.line-default {
color: #aaaaaa;
}
@@ -43,11 +43,16 @@ radio.main-color.checked .uni-radio-input {
}
.cu-list.menu>.cu-item.bg-main-color.light {
- color: #0081ff;
+ color: #0081ff;
background-color: #cce6ff;
-}
-
-.cu-modal .cu-bar>.cu-btn.text-main-color {
+}
+
+.cu-modal .cu-bar>.cu-btn.text-main-color {
+ color: #0081ff;
+ height: 100rpx;
+}
+
+.bg-white.text-main-color {
color: #0081ff;
- height: 100rpx;
+ background-color: #ffffff;
}