From ebf32a18b0574ba5c1824b0b6ab1f691d99a881a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Tue, 26 Oct 2021 15:27:13 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E5=95=86=E5=93=81=E8=A7=84?= =?UTF-8?q?=E6=A0=BC=E4=B8=AD=E5=8F=AF=E8=83=BD=E5=87=BA=E7=8E=B0=E7=9A=84?= =?UTF-8?q?sku=E5=88=A4=E6=96=AD=EF=BC=8C=E4=BC=98=E5=8C=96=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=95=86=E5=93=81=E8=A7=84=E6=A0=BC=E4=B8=8A=E4=B8=8B?= =?UTF-8?q?=E6=BB=91=E5=8A=A8=E3=80=822.=E4=BC=98=E5=8C=96=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F=E3=80=823.?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B4=AD=E7=89=A9=E8=BD=A6=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/m-buy/goods.vue | 39 +- components/verify-code/verify-code.vue | 278 +++++++++++ manifest.json | 4 +- pages/cart/payment/popup/goods.vue | 39 +- pages/passport/codeLogin.vue | 250 ---------- pages/passport/login.scss | 68 --- pages/passport/login.vue | 658 +++++++++++++++++++++---- pages/passport/mp-codeLogin.scss | 8 - pages/passport/onClickLogin.vue | 296 ----------- pages/product/goods.vue | 32 +- pages/product/product/popup/goods.vue | 54 +- pages/product/product/style.scss | 3 +- pages/tabbar/cart/cartList.vue | 65 ++- pages/tabbar/cart/mp-carui.scss | 3 +- uni.scss | 2 +- 15 files changed, 987 insertions(+), 812 deletions(-) create mode 100644 components/verify-code/verify-code.vue delete mode 100644 pages/passport/codeLogin.vue delete mode 100644 pages/passport/login.scss delete mode 100644 pages/passport/mp-codeLogin.scss delete mode 100644 pages/passport/onClickLogin.vue diff --git a/components/m-buy/goods.vue b/components/m-buy/goods.vue index b675f44..a809743 100644 --- a/components/m-buy/goods.vue +++ b/components/m-buy/goods.vue @@ -48,7 +48,7 @@ - + @@ -65,7 +65,7 @@ :input-height="numberBox.height" :size="numberBox.size" :min="1" v-model="num"> - + @@ -142,7 +142,7 @@ export default { /**点击规格 */ handleClickSpec(val, index, specValue) { - this.$set(this.currentSelceted, index, specValue.value); + this.currentSelceted[index] = specValue.value; let selectedSkuId = this.goodsSpec.find((i) => { let matched = true; let specValues = i.specValues.filter((j) => j.specName !== "images"); @@ -156,19 +156,28 @@ export default { return i; } }); - this.selectSkuList = { - spec: { - specName: val.name, - specValue: specValue.value, - }, - data: this.goodsDetail, - }; - this.selectName = specValue.value; + if (selectedSkuId?.skuId) { + this.$set(this.currentSelceted, index, specValue.value); + this.selectSkuList = { + spec: { + specName: val.name, + specValue: specValue.value, + }, + data: this.goodsDetail, + }; + this.selectName = specValue.value; - this.$emit("handleClickSku", { - skuId: selectedSkuId.skuId, - goodsId: this.goodsDetail.goodsId, - }); + this.$emit("handleClickSku", { + skuId: selectedSkuId.skuId, + goodsId: this.goodsDetail.goodsId, + }); + } else { + uni.showToast({ + title: "暂无该商品!", + duration: 2000, + icon: "none", + }); + } }, /** diff --git a/components/verify-code/verify-code.vue b/components/verify-code/verify-code.vue new file mode 100644 index 0000000..2d873aa --- /dev/null +++ b/components/verify-code/verify-code.vue @@ -0,0 +1,278 @@ + + + diff --git a/manifest.json b/manifest.json index 99d881d..df31a4c 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "lili商城", "appid" : "__UNI__C100675", "description" : "", - "versionName" : "4.0.46", - "versionCode" : 4000046, + "versionName" : "4.0.47", + "versionCode" : 4000047, "transformPx" : false, "app-plus" : { "compatible" : { diff --git a/pages/cart/payment/popup/goods.vue b/pages/cart/payment/popup/goods.vue index 2f7ecec..edf2f7e 100644 --- a/pages/cart/payment/popup/goods.vue +++ b/pages/cart/payment/popup/goods.vue @@ -48,7 +48,7 @@ - + @@ -65,7 +65,7 @@ :input-height="numberBox.height" :size="numberBox.size" :min="1" v-model="num"> - + @@ -142,7 +142,7 @@ export default { /**点击规格 */ handleClickSpec(val, index, specValue) { - this.$set(this.currentSelceted, index, specValue.value); + this.currentSelceted[index] = specValue.value; let selectedSkuId = this.goodsSpec.find((i) => { let matched = true; let specValues = i.specValues.filter((j) => j.specName !== "images"); @@ -156,19 +156,28 @@ export default { return i; } }); - this.selectSkuList = { - spec: { - specName: val.name, - specValue: specValue.value, - }, - data: this.goodsDetail, - }; - this.selectName = specValue.value; + if (selectedSkuId?.skuId) { + this.$set(this.currentSelceted, index, specValue.value); + this.selectSkuList = { + spec: { + specName: val.name, + specValue: specValue.value, + }, + data: this.goodsDetail, + }; + this.selectName = specValue.value; - this.$emit("handleClickSku", { - skuId: selectedSkuId.skuId, - goodsId: this.goodsDetail.goodsId, - }); + this.$emit("handleClickSku", { + skuId: selectedSkuId.skuId, + goodsId: this.goodsDetail.goodsId, + }); + } else { + uni.showToast({ + title: "暂无该商品!", + duration: 2000, + icon: "none", + }); + } }, /** diff --git a/pages/passport/codeLogin.vue b/pages/passport/codeLogin.vue deleted file mode 100644 index 3fcfdb7..0000000 --- a/pages/passport/codeLogin.vue +++ /dev/null @@ -1,250 +0,0 @@ - - - - \ No newline at end of file diff --git a/pages/passport/login.scss b/pages/passport/login.scss deleted file mode 100644 index 7762a64..0000000 --- a/pages/passport/login.scss +++ /dev/null @@ -1,68 +0,0 @@ -.sub-title { - font-size: 24rpx; - color: #999; -} -.cell { - margin: 40rpx 0; -} -.login-ball { - border-bottom-left-radius: 300rpx; - height: 400rpx; - position: relative; -} - -/deep/ .u-form-item--right__content__slot { - width: 100%; - display: block; -} - -.title { - font-size: 48rpx; - color: #000; - text-align: center; -} -.privacy { - font-size: 24upx; - color: #999; - text-align: center; - margin-top: 360rpx; - width: 100%; - display: flex; - justify-content: center; -} -span { - color: $aider-light-color; -} -.form { - padding: 0 72rpx; -} -.divider { - margin: 30rpx 0 !important; -} -.submit { - height: 80rpx; - line-height: 80rpx; - color: #fff; - text-align: center; - font-size: 30rpx; - border-radius: 100px; -} -.logo { - margin-top: 20rpx; - width: 200rpx; - height: 200rpx; - text-align: center; -} -.logo-cell { - text-align: center; -} -.text-tips { - text-align: center; -} -.tips { - position: absolute; - bottom: 10rpx; - width: 100%; - - text-align: center; -} diff --git a/pages/passport/login.vue b/pages/passport/login.vue index f2b455f..a2cd41f 100644 --- a/pages/passport/login.vue +++ b/pages/passport/login.vue @@ -1,113 +1,242 @@ + - + \ No newline at end of file diff --git a/pages/passport/mp-codeLogin.scss b/pages/passport/mp-codeLogin.scss deleted file mode 100644 index 87ebeeb..0000000 --- a/pages/passport/mp-codeLogin.scss +++ /dev/null @@ -1,8 +0,0 @@ - -/deep/ .u-form-item { - margin: 40rpx 0 !important; - padding: 40rpx 0 !important; -} -.submit { - margin-top: 40rpx; -} diff --git a/pages/passport/onClickLogin.vue b/pages/passport/onClickLogin.vue deleted file mode 100644 index eb766cf..0000000 --- a/pages/passport/onClickLogin.vue +++ /dev/null @@ -1,296 +0,0 @@ - - - - diff --git a/pages/product/goods.vue b/pages/product/goods.vue index d55f275..c8b31bc 100644 --- a/pages/product/goods.vue +++ b/pages/product/goods.vue @@ -410,17 +410,7 @@ export default { routerVal: "", }; }, - // #ifdef MP-WEIXNI - shareAppMessage() { - return { - title: this.goodsDetail.goodsName, - type: 0, - query: `id=${this.routerVal.id}&goodsId=${this.routerVal.goodsId}`, - path: `/pages/product/goods`, - imageUrl: this.goodsDetail.goodsGalleryList[0], - }; - }, - // #endif + watch: { isGroup(val) { if (val) { @@ -483,7 +473,7 @@ export default { getMpScene(this.routerVal.scene).then((res) => { if (res.data.success) { let data = res.data.result.split(","); // skuId,goodsId,distributionId - console.warn(data) + console.warn(data); this.init(data[0], data[1], data[2]); } }); @@ -495,7 +485,19 @@ export default { ); } }, + // #ifdef MP-WEIXIN + onShareAppMessage(res) { + return { + path: this.share(), + title: `[好友推荐]${this.goodsDetail.goodsName}`, + imageUrl: this.goodsDetail.goodsGalleryList[0], + }; + }, + // #endif methods: { + share() { + return `/pages/product/goods?id=${this.routerVal.id}&goodsId=${this.routerVal.goodsId}`; + }, /** * 导航栏列表栏 */ @@ -521,12 +523,14 @@ export default { /** * 初始化信息 */ - async init(id, goodsId, distributionId="") { + async init(id, goodsId, distributionId = "") { this.isGroup = false; //初始化拼团 this.productId = id; // skuId // 这里请求获取到页面数据 解析数据 let response = await getGoods(id, goodsId); + + console.log(response); if (!response.data.success) { setTimeout(() => { uni.navigateBack(); @@ -536,7 +540,7 @@ export default { if (distributionId || this.$store.state.distributionId) { let disResult = await getGoodsDistribution(distributionId); if (!disResult.data.success || disResult.statusCode == 403) { - console.log("绑定成功!") + console.log("绑定成功!"); this.$store.state.distributionId = distributionId; } } diff --git a/pages/product/product/popup/goods.vue b/pages/product/product/popup/goods.vue index b9b5571..eb98d57 100644 --- a/pages/product/product/popup/goods.vue +++ b/pages/product/product/popup/goods.vue @@ -53,14 +53,14 @@ - + {{ spec.name }} {{ spec_val.value }} + @click="handleClickSpec(spec, specIndex, spec_val)">{{ spec_val.value }} @@ -71,7 +71,7 @@ v-model="num"> - + @@ -86,6 +86,7 @@ diff --git a/pages/product/product/style.scss b/pages/product/product/style.scss index 82b3e4a..efedaa9 100644 --- a/pages/product/product/style.scss +++ b/pages/product/product/style.scss @@ -71,7 +71,8 @@ page { font-size: 32rpx; } .-goods-desc { - padding: 36rpx 0 24rpx 0; + padding: 36rpx 0 0 0; + margin-bottom: 24rpx; font-size: 24rpx; color: #666; display: -webkit-box; diff --git a/pages/tabbar/cart/cartList.vue b/pages/tabbar/cart/cartList.vue index 2f3a8f2..07cf0cd 100644 --- a/pages/tabbar/cart/cartList.vue +++ b/pages/tabbar/cart/cartList.vue @@ -26,17 +26,17 @@ @change="checkboxChangeDP(item)"> - {{ + {{ item.storeName }} - -
+ +
领劵
失效 - + @@ -76,7 +76,8 @@

{{skuItem.goodsSku.simpleSpecs}}

-

+
+ ¥{{ formatPrice(skuItem.goodsSku.price)[0] }} .{{ formatPrice(skuItem.goodsSku.price)[1] }}
@@ -101,11 +102,10 @@ font-size="24" :timestamp="getCountDownTime(seckill.endTime)">
-
-
预估到手价 ¥{{ formatPrice(skuItem.priceDetailDTO.flowPrice)[0]}} .{{ formatPrice(skuItem.priceDetailDTO.flowPrice)[1] }} @@ -137,7 +137,7 @@ class="discountPrice"> 优惠减:¥{{(cartDetail.priceDetailDTO.goodsPrice - cartDetail.priceDetailDTO.flowPrice) | unitPrice}} - 优惠明细 + 优惠明细
@@ -208,6 +208,7 @@ export default { WEIXIN_num: "", //购物车兼容微信步进器 }; }, + mounted() { // #ifdef MP-WEIXIN // 小程序默认分享 @@ -542,6 +543,11 @@ export default { }; +