From 209060fd764fb49ac60b0b023b9f0f037f4f2ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Mon, 9 Aug 2021 18:40:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=BA=97=E9=93=BAui?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/goods.js | 11 - api/store.js | 15 +- manifest.json | 6 +- pages.json | 18 +- pages/cart/payment/payOrder.vue | 5 +- pages/mine/deposit/operation.vue | 2 +- pages/mine/help/tips.vue | 2 +- pages/product/goods.vue | 14 +- .../product/evaluation/-evaluation.vue | 4 - pages/product/product/shop/-shop.vue | 43 +- pages/product/shopPage.vue | 600 ++++++++++++------ pages/product/shopPageGoods.vue | 398 +++--------- pages/product/shopPageMain.vue | 581 ----------------- plugins/APPUpdate/index.js | 3 +- 14 files changed, 559 insertions(+), 1143 deletions(-) delete mode 100644 pages/product/shopPageMain.vue diff --git a/api/goods.js b/api/goods.js index 89097f9..3b82627 100644 --- a/api/goods.js +++ b/api/goods.js @@ -118,17 +118,6 @@ export function getCategoryList(id) { }); } -/** - * 获取商品分类 - * @param parent_id - */ -export function getCategory(parent_id = 0) { - return http.request({ - url: `goods/categories/${parent_id}/children`, - method: Method.GET, - loading: false, - }); -} diff --git a/api/store.js b/api/store.js index b18fa9b..56b41eb 100644 --- a/api/store.js +++ b/api/store.js @@ -20,10 +20,21 @@ export function getstoreList(params) { * 获取店铺基本信息 * @param storeId */ -export function getstoreBaseInfo(storeId) { + export function getStoreBaseInfo(storeId) { return http.request({ url: `/store/get/detail/${storeId}`, method: Method.GET, loading: false, }); -} \ No newline at end of file +} + +/** + * 获取店铺分类 + * @param id + */ + export function getStoreCategory(id) { + return http.request({ + url: `/store/label/get/${id}`, + method: Method.GET, + }); +} diff --git a/manifest.json b/manifest.json index 2a5e47d..777f3ba 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "lili商城", "appid" : "__UNI__C100675", "description" : "", - "versionName" : "4.0.25", - "versionCode" : 4000025, + "versionName" : "4.0.26", + "versionCode" : 4000026, "transformPx" : false, "app-plus" : { "compatible" : { @@ -178,7 +178,7 @@ "mp-weixin" : { /* 小程序特有相关 */ "usingComponents" : true, - "appid" : "", + "appid" : "wx6f10f29075dc1b0b", "optimization" : { "subPackages" : true }, diff --git a/pages.json b/pages.json index ddc8d6e..7cd8415 100644 --- a/pages.json +++ b/pages.json @@ -335,12 +335,18 @@ { "root": "pages/product", "pages": [{ - "path": "shopPage", - "style": { - "navigationBarTitleText": "详情展示", - "navigationStyle": "custom" - } - }, + "path": "shopPage", + "style": { + "navigationBarTitleText": "", + "navigationStyle": "custom" + } + },{ + "path": "shopPageGoods", + "style": { + "navigationBarTitleText": "", + "navigationStyle": "custom" + } + }, { "path": "goods", "style": { diff --git a/pages/cart/payment/payOrder.vue b/pages/cart/payment/payOrder.vue index 0a94a1e..a013ab6 100644 --- a/pages/cart/payment/payOrder.vue +++ b/pages/cart/payment/payOrder.vue @@ -151,6 +151,7 @@ parms.clientType = this.paymentType; API_Trade.getCashierData(parms).then((res) => { + if(res.data.success){ this.cashierParams = res.data.result; @@ -160,9 +161,11 @@ }); // #endif + + // #ifndef APP-PLUS //判断是否微信浏览器 var ua = window.navigator.userAgent.toLowerCase(); - + // #endif diff --git a/pages/mine/deposit/operation.vue b/pages/mine/deposit/operation.vue index 9e53816..7aff032 100644 --- a/pages/mine/deposit/operation.vue +++ b/pages/mine/deposit/operation.vue @@ -26,7 +26,7 @@ export default { walletNum: 0, }; }, - async mounted() { + async onShow() { if (this.$options.filters.isLogin("auth")) { let result = await getUserWallet(); //预存款 this.walletNum = result.data.result.memberWallet; diff --git a/pages/mine/help/tips.vue b/pages/mine/help/tips.vue index 13f7095..5401e69 100644 --- a/pages/mine/help/tips.vue +++ b/pages/mine/help/tips.vue @@ -1,6 +1,6 @@ diff --git a/pages/product/goods.vue b/pages/product/goods.vue index 2b59091..d581c99 100644 --- a/pages/product/goods.vue +++ b/pages/product/goods.vue @@ -506,21 +506,16 @@ export default { * 初始化信息 */ async init(id, goodsId, distributionId) { - console.log(id, goodsId); this.isGroup = false; //初始化拼团 this.productId = id; // skuId // 这里请求获取到页面数据 解析数据 - uni.showLoading({ - title: "加载中", - mask: true, - }); + let response = await getGoods(id, goodsId); if (!response.data.success) { uni.navigateBack(); return false; } - // 这里是绑定分销员 if (distributionId || this.$store.state.distributionId) { let disResult = await getGoodsDistribution(distributionId); @@ -528,7 +523,6 @@ export default { this.$store.state.distributionId = distributionId; } } - uni.hideLoading(); /**商品信息以及规格信息存储 */ this.goodsDetail = response.data.result.data; this.goodsSpec = response.data.result.specs; @@ -551,7 +545,7 @@ export default { this.imgList = this.goodsDetail.goodsGalleryList; // 获取店铺基本信息 - this.getstoreBaseInfoFun(this.goodsDetail.storeId); + this.getStoreBaseInfoFun(this.goodsDetail.storeId); // 获取购物车 this.cartCount(); @@ -675,8 +669,8 @@ export default { /** * 获取店铺信息 */ - getstoreBaseInfoFun(id) { - API_store.getstoreBaseInfo(id).then((res) => { + getStoreBaseInfoFun(id) { + API_store.getStoreBaseInfo(id).then((res) => { if (res.data.success) { this.storeDetail = res.data.result; } diff --git a/pages/product/product/evaluation/-evaluation.vue b/pages/product/product/evaluation/-evaluation.vue index c10125f..27ad2fd 100644 --- a/pages/product/product/evaluation/-evaluation.vue +++ b/pages/product/product/evaluation/-evaluation.vue @@ -223,10 +223,6 @@ export default { color: #333; padding: 20rpx 0; } - - .img { - } - .bot { display: flex; justify-content: space-between; diff --git a/pages/product/product/shop/-shop.vue b/pages/product/product/shop/-shop.vue index a2c90dd..c1eb65e 100644 --- a/pages/product/product/shop/-shop.vue +++ b/pages/product/product/shop/-shop.vue @@ -106,22 +106,22 @@ export default { } } -.shopTag{ - background: $main-color; - font-size: 24rpx; - padding: 0 12rpx; - margin-left: 10rpx; - font-weight: normal; - border-radius: 10rpx; - color: #fff; -} - .recommend-list-view { width: 100%; } +.shopTag { + background: $main-color; + font-size: 24rpx; + margin-left: 10rpx; + padding: 6rpx 12rpx; + border-radius: 10rpx; + font-weight: normal; + color: #fff; +} .store-info { display: flex; + align-items: center; justify-content: space-between; background: #fff; padding: 40rpx 20rpx 50rpx; @@ -139,25 +139,22 @@ export default { .name-star { flex: 1; margin-left: 20rpx; - padding: 10rpx 0; - font-size: 30rpx; - .name { display: flex; + align-items: center; width: 100%; + line-height: 1; font-weight: 700; font-size: 28rpx; - line-height: 24px; - margin-left: 10px; } - .desc { - font-size: 12px; - color: #999; - margin-left: 10px; - text{ - margin-right: 10px; - } - } + .desc { + font-size: 12px; + color: #999; + margin-left: 10px; + text { + margin-right: 10px; + } + } } .to-store-btn { diff --git a/pages/product/shopPage.vue b/pages/product/shopPage.vue index cc81740..f0901b9 100644 --- a/pages/product/shopPage.vue +++ b/pages/product/shopPage.vue @@ -1,63 +1,131 @@ - + +.category-item { + background: #fff; + padding: 22rpx; + margin: 20rpx 10rpx; + > .flex { + color: #666; + justify-content: space-between; + } + > .child-list { + display: flex; + margin: 20rpx 0; + flex-wrap: wrap; + > .child { + justify-content: center; + margin: 1% 0; + display: flex; + width: 48%; + font-size: 24rpx; + color: #999; + margin-right: 1%; + border: 1rpx solid #ededed; + box-sizing: border-box; + height: 70rpx; + text-align: center; + line-height: 70rpx; + } + } +} + \ No newline at end of file diff --git a/pages/product/shopPageGoods.vue b/pages/product/shopPageGoods.vue index 771c09b..fe4e9fe 100644 --- a/pages/product/shopPageGoods.vue +++ b/pages/product/shopPageGoods.vue @@ -1,340 +1,124 @@ + \ No newline at end of file diff --git a/pages/product/shopPageMain.vue b/pages/product/shopPageMain.vue deleted file mode 100644 index 1c49f71..0000000 --- a/pages/product/shopPageMain.vue +++ /dev/null @@ -1,581 +0,0 @@ - - - - - diff --git a/plugins/APPUpdate/index.js b/plugins/APPUpdate/index.js index 09b1f5f..7a15aa4 100644 --- a/plugins/APPUpdate/index.js +++ b/plugins/APPUpdate/index.js @@ -37,7 +37,6 @@ export const getServerNo = function (callback) { result.versionInfo = response.content || "暂无"; result.forceUpdate = response.forceUpdate; result.downloadUrl = response.downloadUrl; - callback && callback(result); } }); @@ -855,7 +854,7 @@ function downloadPopup(data, callback, cancelCallback, rebootCallback) { export default function (isPrompt = false) { getCurrentNo((version) => { getServerNo((res) => { - if (res.versionCode.replace(/\./g, "") < version.versionCode) { + if (res.versionCode.replace(/\./g, "") <= version.versionCode) { return false; }