mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-08-06 10:57:25 +08:00
feat: 更新项目配置与组件使用
- 在入口文件中引入uview-plus的配置,优化字体加载逻辑 - 移除manifest.json中不必要的权限描述 - 更新package.json和package-lock.json,添加开发依赖 - 调整多个组件的样式和结构,提升用户体验 - 修复部分组件的逻辑和样式问题,确保兼容性
This commit is contained in:
@@ -37,7 +37,6 @@
|
||||
|
||||
<!-- 数据 -->
|
||||
<view
|
||||
v-if="navItem.dataList && coupon"
|
||||
class="coupon-item"
|
||||
:class="{ 'coupon-used': navIndex != 0 }"
|
||||
v-for="(coupon, index) in navItem.dataList"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<view class="wrapper" v-if="flag">
|
||||
<div class='goods' v-if="selectedGoods">
|
||||
<image class="goods-image" :src="selectedGoods.thumbnail" alt="">
|
||||
<p class="goodsName">{{selectedGoods.goodsName}}</p>
|
||||
<div class="goodsPrice">{{(selectedGoods.promotionPrice ||unitPrice(selectedGoods.price ), '¥')}}</div>
|
||||
<image class="goods-image" :src="selectedGoods.thumbnail" alt="" />
|
||||
<p class="goodsName">{{selectedGoods.goodsName}}</p>
|
||||
<div class="goodsPrice">{{ unitPrice(selectedGoods.promotionPrice || selectedGoods.price, '¥') }}</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="tips">
|
||||
@@ -55,7 +55,7 @@
|
||||
<div class="user-list" v-if="data.pintuanMemberVOS">
|
||||
<div class="user-item" v-for="(item,index) in data.pintuanMemberVOS" :key="index">
|
||||
<span class="master" v-if="item.orderSn == ''">团长</span>
|
||||
<image class="img" :src="item.face" alt="">
|
||||
<image class="img" :src="item.face" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -25,9 +25,7 @@
|
||||
<u-form-item label="地址别名" label-width="130">
|
||||
<u-input v-model="form.alias" placeholder="请输入地址别名" />
|
||||
</u-form-item>
|
||||
<u-checkbox-group shape="circle" size="30">
|
||||
<u-checkbox :active-color="lightColor" v-model="form.isDefault">设为默认地址</u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<u-checkbox usedAlone shape="circle" size="30" :active-color="lightColor" v-model:checked="form.isDefault" label="设为默认地址"></u-checkbox>
|
||||
|
||||
<div class="saveBtn" @click="save">保存</div>
|
||||
</u-form>
|
||||
@@ -144,33 +142,43 @@ export default {
|
||||
|
||||
// 保存当前 地址
|
||||
save() {
|
||||
this.$refs.uForm.validate((valid) => {
|
||||
if (valid) {
|
||||
let pages = getCurrentPages(); //获取页面栈
|
||||
let beforePage = pages[pages.length - 2]; //上个页面
|
||||
this.$refs.uForm.validate().then(() => {
|
||||
const params = { ...this.form };
|
||||
delete params.___path;
|
||||
|
||||
// 如果没有id则为新增地址
|
||||
if (!this.form.id) {
|
||||
// 删除没有的数据
|
||||
delete this.form.___path;
|
||||
addAddress(this.form).then((res) => {
|
||||
if (res.data.success) {
|
||||
uni.navigateBack();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 修改地址
|
||||
delete this.form.___path;
|
||||
delete this.form.updateBy;
|
||||
delete this.form.updateTime;
|
||||
editAddress(this.form).then((res) => {
|
||||
if (res.data.success) {
|
||||
uni.navigateBack();
|
||||
}
|
||||
});
|
||||
}
|
||||
if (Array.isArray(params.consigneeAddressIdPath)) {
|
||||
params.consigneeAddressIdPath = params.consigneeAddressIdPath.join(",");
|
||||
}
|
||||
});
|
||||
if (Array.isArray(params.consigneeAddressPath)) {
|
||||
params.consigneeAddressPath = params.consigneeAddressPath.join(",");
|
||||
}
|
||||
|
||||
if (!params.id) {
|
||||
addAddress(params).then((res) => {
|
||||
if (res.data.success) {
|
||||
uni.navigateBack();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message || "保存失败",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
delete params.updateBy;
|
||||
delete params.updateTime;
|
||||
editAddress(params).then((res) => {
|
||||
if (res.data.success) {
|
||||
uni.navigateBack();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message || "保存失败",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
||||
// 三级地址联动回调
|
||||
|
||||
@@ -119,14 +119,22 @@
|
||||
background: $light-color;
|
||||
position: fixed;
|
||||
width: 690rpx;
|
||||
bottom: 60rpx;
|
||||
bottom: calc(60rpx + constant(safe-area-inset-bottom));
|
||||
bottom: calc(60rpx + env(safe-area-inset-bottom));
|
||||
height: 80rpx;
|
||||
left: 30rpx;
|
||||
font-size: 30rpx;
|
||||
line-height: 80rpx;
|
||||
|
||||
.u-icon {
|
||||
margin-right: 10rpx;
|
||||
color: #fff;
|
||||
border-radius: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 99;
|
||||
overflow: hidden;
|
||||
|
||||
.btn-text {
|
||||
margin-left: 12rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,10 +34,10 @@
|
||||
</view>
|
||||
<view style="height: 100px"></view>
|
||||
</view>
|
||||
<button type="default" class="btn" @click="addAddress('')">
|
||||
<u-icon name="plus-circle"></u-icon>
|
||||
添加新收货人
|
||||
</button>
|
||||
<view class="btn" @click="addAddress('')">
|
||||
<u-icon name="plus-circle" color="#ffffff" size="18"></u-icon>
|
||||
<text class="btn-text">添加新收货人</text>
|
||||
</view>
|
||||
<u-action-sheet :list="removeList" :tips="tips" v-model:show="showAction" @click="deleteAddressMessage"></u-action-sheet>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
<view style="height: 100px"></view>
|
||||
</view>
|
||||
|
||||
<button type="default" class="btn" @click="addAddress('')">
|
||||
<u-icon name="plus-circle"></u-icon>
|
||||
添加新收货人
|
||||
</button>
|
||||
<view class="btn" @click="addAddress('')">
|
||||
<u-icon name="plus-circle" color="#ffffff" size="18"></u-icon>
|
||||
<text class="btn-text">添加新收货人</text>
|
||||
</view>
|
||||
|
||||
<u-action-sheet :list="removeList" :tips="tips" v-model:show="showAction" @click="deleteAddressMessage"></u-action-sheet>
|
||||
</view>
|
||||
|
||||
@@ -122,9 +122,7 @@ export default {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
> * {
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
gap: 20rpx;
|
||||
width: 33%;
|
||||
// color: #fff;
|
||||
}
|
||||
|
||||
@@ -6,13 +6,15 @@
|
||||
<div class="bagbar">{{$u.timeFormat(row.send_time, 'yyyy-mm-dd')}}</div>
|
||||
</div>
|
||||
<u-card @click="goDetail(row.sn,row.logi_id,row.ship_no)" :title="title" title-color="#666666" title-size="24" sub-title-color="#666666" sub-title-size="24" :border="false" :sub-title=row.status>
|
||||
<view class="msg-body" #body>
|
||||
<template #body>
|
||||
<view class="msg-body">
|
||||
<image class="msgImg" :src="row.goods_img" mode=""></image>
|
||||
<view class="msgView">
|
||||
<view>{{row.goodsName}}</view>
|
||||
<view class="msgNum">订单号:{{row.sn}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</u-card>
|
||||
</view>
|
||||
</block>
|
||||
@@ -99,7 +101,7 @@ export default {
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
background: $u-type-info-disabled;
|
||||
background: $u-info-disabled;
|
||||
}
|
||||
.storeImg {
|
||||
width: 100%;
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
</div>
|
||||
<div class="msgMsg">{{$u.timeFormat(row.send_time, 'yyyy-mm-dd')}}</div>
|
||||
<u-card :title="title" :title-size="35" :border="false">
|
||||
<view class #body>
|
||||
<template #body>
|
||||
<view class="u-body-item u-flex u-row-between u-p-b-0">
|
||||
<view class="u-body-item-title u-line-2">{{row.content}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</u-card>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
@@ -1,64 +1,96 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<u-navbar>
|
||||
<u-tabs :active-color="lightColor" class="slot-wrap" :list="navList" :is-scroll="true" :current="tabCurrentIndex" @change="tabClick"></u-tabs>
|
||||
<u-navbar
|
||||
:fixed="true"
|
||||
:placeholder="true"
|
||||
:border="false"
|
||||
left-icon=""
|
||||
title=""
|
||||
>
|
||||
<template #center>
|
||||
<view class="slot-wrap">
|
||||
<u-tabs
|
||||
:active-color="lightColor"
|
||||
class="collect-tabs"
|
||||
:list="navList"
|
||||
:is-scroll="true"
|
||||
:current="tabCurrentIndex"
|
||||
@change="tabClick"
|
||||
></u-tabs>
|
||||
</view>
|
||||
</template>
|
||||
</u-navbar>
|
||||
<view class="swiper-box">
|
||||
<view class="collect-body">
|
||||
<!-- 显示商品栏 -->
|
||||
<view v-if="tabCurrentIndex == 0" class="tab-content">
|
||||
<scroll-view class="list-scroll-content" scroll-y>
|
||||
<!-- 空白页 -->
|
||||
<u-empty style="margin-top: 40rpx" text="暂无收藏商品数据" mode="favor" v-if="goodsEmpty"></u-empty>
|
||||
<!-- 商品展示数据 -->
|
||||
<u-swipe-action v-else v-for="(item, index) in goodList" :key="index">
|
||||
<u-swipe-action-item @open="openLeftChange(item, index, 'goods')" :show="item.selected"
|
||||
:options="LeftOptions"
|
||||
@click="clickGoodsSwiperAction(item, index)" :name="index">
|
||||
<view class="goods" @click="goGoodsDetail(item)">
|
||||
<u-image width="131rpx" height="131rpx" :src="item.image" mode="aspectFit">
|
||||
<template #loading><u-loading></u-loading></template>
|
||||
</u-image>
|
||||
<view class="goods-intro">
|
||||
<view>{{ item.goodsName }}</view>
|
||||
<view class="goods-sn">{{ item.goods_sn }}</view>
|
||||
<view>¥{{unitPrice(item.price) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-swipe-action-item>
|
||||
</u-swipe-action>
|
||||
|
||||
<template v-else>
|
||||
<u-swipe-action
|
||||
v-for="(item, index) in goodList"
|
||||
:key="index"
|
||||
class="collect-swipe"
|
||||
>
|
||||
<u-swipe-action-item
|
||||
@open="openLeftChange(item, 'goods')"
|
||||
:show="item.selected"
|
||||
:options="LeftOptions"
|
||||
@click="clickGoodsSwiperAction(item, index)"
|
||||
:name="index"
|
||||
>
|
||||
<view class="goods" @click="goGoodsDetail(item)">
|
||||
<u-image width="131rpx" height="131rpx" :src="item.image" mode="aspectFit">
|
||||
<template #loading><u-loading></u-loading></template>
|
||||
</u-image>
|
||||
<view class="goods-intro">
|
||||
<view class="goods-name">{{ item.goodsName }}</view>
|
||||
<view class="goods-sn">{{ item.goods_sn }}</view>
|
||||
<view class="goods-price">¥{{ unitPrice(item.price) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-swipe-action-item>
|
||||
</u-swipe-action>
|
||||
</template>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<!-- 显示收藏的店铺栏 -->
|
||||
<view v-else class="tab-content">
|
||||
<scroll-view class="list-scroll-content" scroll-y>
|
||||
<!-- 空白页 -->
|
||||
<u-empty style="margin-top: 40rpx" text="暂无收藏店铺数据" mode="favor" v-if="storeEmpty"></u-empty>
|
||||
<!-- 店铺展示数据 -->
|
||||
<u-swipe-action v-else v-for="(item, index) in storeList" :key="index">
|
||||
<u-swipe-action-item @open="openLeftChange(item, 'store')" :show="item.selected"
|
||||
:options="LeftOptions"
|
||||
@click="clickStoreSwiperAction(item)">
|
||||
<view class="store" @click="goStoreMainPage(item.id)">
|
||||
<view class="intro">
|
||||
<view class="store-logo">
|
||||
<u-image width="102rpx" height="102rpx" :src="item.storeLogo" :alt="item.storeName"
|
||||
mode="aspectFit">
|
||||
<template #loading><u-loading></u-loading></template>
|
||||
</u-image>
|
||||
<template v-else>
|
||||
<u-swipe-action
|
||||
v-for="(item, index) in storeList"
|
||||
:key="index"
|
||||
class="collect-swipe"
|
||||
>
|
||||
<u-swipe-action-item
|
||||
@open="openLeftChange(item, 'store')"
|
||||
:show="item.selected"
|
||||
:options="LeftOptions"
|
||||
@click="clickStoreSwiperAction(item)"
|
||||
:name="index"
|
||||
>
|
||||
<view class="store" @click="goStoreMainPage(item.id)">
|
||||
<view class="intro">
|
||||
<view class="store-logo">
|
||||
<u-image width="102rpx" height="102rpx" :src="item.storeLogo" :alt="item.storeName"
|
||||
mode="aspectFit">
|
||||
<template #loading><u-loading></u-loading></template>
|
||||
</u-image>
|
||||
</view>
|
||||
<view class="store-name">
|
||||
<view>{{ item.storeName }}</view>
|
||||
<u-tag size="mini" type="error" :color="$mainColor" v-if="item.selfOperated"
|
||||
text="自营" mode="plain" shape="circle" />
|
||||
</view>
|
||||
<view class="store-collect">
|
||||
<view>进店逛逛</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="store-name">
|
||||
<view>{{ item.storeName }}</view>
|
||||
<u-tag size="mini" type="error" :color="$mainColor" v-if="item.selfOperated"
|
||||
text="自营" mode="plain" shape="circle" />
|
||||
</view>
|
||||
<view class="store-collect">
|
||||
<view>进店逛逛</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-swipe-action-item>
|
||||
</u-swipe-action>
|
||||
</u-swipe-action-item>
|
||||
</u-swipe-action>
|
||||
</template>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -142,16 +174,10 @@
|
||||
* 打开商品左侧取消收藏
|
||||
*/
|
||||
openLeftChange(val, type) {
|
||||
const {
|
||||
goodList,
|
||||
storeList
|
||||
} = this;
|
||||
let way;
|
||||
type == "goods" ? (way = goodList) : (way = storeList);
|
||||
const way = type === "goods" ? this.goodList : this.storeList;
|
||||
way.forEach((item) => {
|
||||
item["selected"] = false;
|
||||
item.selected = false;
|
||||
});
|
||||
val["selected"] = false;
|
||||
val.selected = true;
|
||||
},
|
||||
|
||||
@@ -284,19 +310,30 @@
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.slot-wrap{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding-right: 72rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.slot-wrap {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.collect-tabs {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.swiper-box {
|
||||
overflow-y: auto;
|
||||
.collect-body {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.list-scroll-content {
|
||||
@@ -304,63 +341,52 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
::v-deep .u-swipe-content {
|
||||
.collect-swipe,
|
||||
:deep(.u-swipe-action),
|
||||
:deep(.u-swipe-action-item),
|
||||
:deep(.u-swipe-action-item__content) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.u-swipe-action-item__content) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.goods {
|
||||
background-color: #fff;
|
||||
border-bottom: 1px solid $border-color-light;
|
||||
height: 190rpx;
|
||||
min-height: 190rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 30rpx 20rpx;
|
||||
margin-top: 20rpx;
|
||||
|
||||
image {
|
||||
width: 131rpx;
|
||||
height: 131rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
width: 100%;
|
||||
|
||||
.goods-intro {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
font-size: $font-base;
|
||||
line-height: 48rpx;
|
||||
margin-left: 30rpx;
|
||||
|
||||
view:nth-child(1) {
|
||||
.goods-name {
|
||||
line-height: 1.4em;
|
||||
font-size: 24rpx;
|
||||
max-height: 2.8em; //height是line-height的整数倍,防止文字显示不全
|
||||
max-height: 2.8em;
|
||||
overflow: hidden;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
view:nth-child(2) {
|
||||
.goods-sn {
|
||||
color: #cccccc;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
view:nth-child(3) {
|
||||
.goods-price {
|
||||
color: $light-color;
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
color: $main-color;
|
||||
height: 50rpx;
|
||||
width: 120rpx;
|
||||
font-size: $font-sm;
|
||||
padding: 0;
|
||||
line-height: 50rpx;
|
||||
background-color: #ffffff;
|
||||
margin-top: 80rpx;
|
||||
|
||||
&::after {
|
||||
border-color: $main-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.store {
|
||||
@@ -368,90 +394,42 @@
|
||||
border: 1px solid $border-color-light;
|
||||
border-radius: 16rpx;
|
||||
margin: 20rpx 10rpx;
|
||||
width: calc(100% - 20rpx);
|
||||
box-sizing: border-box;
|
||||
|
||||
.intro {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 30rpx 0 40rpx;
|
||||
height: 170rpx;
|
||||
min-height: 170rpx;
|
||||
|
||||
.store-logo {
|
||||
width: 102rpx;
|
||||
height: 102rpx;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.store-name {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin-left: 30rpx;
|
||||
line-height: 2em;
|
||||
|
||||
:first-child {
|
||||
font-size: $font-base;
|
||||
}
|
||||
|
||||
:last-child {
|
||||
font-size: $font-sm;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.store-collect {
|
||||
flex-shrink: 0;
|
||||
border-left: 1px solid $border-color-light;
|
||||
padding-left: 20rpx;
|
||||
text-align: center;
|
||||
|
||||
:last-child {
|
||||
color: #999;
|
||||
font-size: $font-sm;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navbar {
|
||||
display: flex;
|
||||
height: 40px;
|
||||
padding: 0 5px;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
|
||||
.nav-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
font-size: 26rpx;
|
||||
|
||||
text {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
text.current {
|
||||
color: $light-color;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 20rpx;
|
||||
bottom: -10rpx;
|
||||
width: 30rpx;
|
||||
height: 0;
|
||||
border-bottom: 2px solid $light-color;
|
||||
}
|
||||
color: #999;
|
||||
font-size: $font-sm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,46 +5,52 @@
|
||||
<div class="light-color edit" @click="isEdit = !isEdit">{{ !isEdit ? '编辑' : '完成'}}</div>
|
||||
</template>
|
||||
</u-navbar>
|
||||
<u-notice-bar mode="vertical" :list="['右划删除浏览记录']"></u-notice-bar>
|
||||
<view class="tracks-tip">
|
||||
<u-icon name="volume" color="#f9ae3d" size="19"></u-icon>
|
||||
<text class="tracks-tip-text">右划删除浏览记录</text>
|
||||
</view>
|
||||
<u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty>
|
||||
<div v-else>
|
||||
<view v-for="(item, index) in trackList" :key="index">
|
||||
<view class="myTracks-title" @click="navigateToStore(item)">{{item.storeName}}</view>
|
||||
<view class="myTracks-items">
|
||||
|
||||
<u-swipe-action style="width: 100%;">
|
||||
<u-swipe-action-item :show="item.show" :name="index"
|
||||
@click="delTracks" @open="open" :options="options">
|
||||
|
||||
<view v-else class="tracks-list">
|
||||
<block v-for="(item, index) in trackList" :key="index">
|
||||
<view class="myTracks-title" @click="navigateToStore(item)">{{ item.storeName }}</view>
|
||||
<u-swipe-action class="myTracks-swipe">
|
||||
<u-swipe-action-item
|
||||
:show="item.show"
|
||||
:name="index"
|
||||
@click="delTracks"
|
||||
@open="open"
|
||||
:options="options"
|
||||
>
|
||||
<view class="myTracks-item">
|
||||
<u-checkbox-group v-if="isEdit" class="store-line-check">
|
||||
<u-checkbox shape="circle" :active-color="lightColor" v-model="item.checked"
|
||||
@change="checkboxChangeDP(item)"></u-checkbox>
|
||||
<u-checkbox
|
||||
usedAlone
|
||||
shape="circle"
|
||||
:active-color="lightColor"
|
||||
v-model:checked="item.checked"
|
||||
@change="checkboxChangeDP(item)"
|
||||
></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<view class="myTracks-item-img" @click.stop="navigateToDetail(item)">
|
||||
<image :src="item.thumbnail"></image>
|
||||
<image class="track-thumb" :src="item.thumbnail"></image>
|
||||
</view>
|
||||
<view class="myTracks-item-content" @click.stop="navigateToDetail(item)">
|
||||
<view class="myTracks-item-title">
|
||||
{{ item.goodsName }}
|
||||
<view class="myTracks-item-title-desc"> </view>
|
||||
</view>
|
||||
<view class="myTracks-item-price">
|
||||
¥{{unitPrice(item.price) }}
|
||||
¥{{ unitPrice(item.price) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-swipe-action-item>
|
||||
</u-swipe-action>
|
||||
|
||||
</view>
|
||||
</u-swipe-action>
|
||||
<view class="myTracks-divider"></view>
|
||||
|
||||
</view>
|
||||
<div @click="handleClickDeleteSelected" v-if="isEdit" class="submit">
|
||||
</block>
|
||||
<view v-if="isEdit" class="submit" @click="handleClickDeleteSelected">
|
||||
删除所选
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
@@ -165,8 +171,11 @@
|
||||
/**
|
||||
* 删除足迹
|
||||
*/
|
||||
delTracks(index,ids) {
|
||||
deleteHistoryListId(ids || this.trackList[index].goodsId).then((res) => {
|
||||
delTracks(e, ids) {
|
||||
const index = typeof e === 'object' ? (e.name ?? e.index) : e;
|
||||
const goodsId = ids || this.trackList[index]?.goodsId;
|
||||
if (!goodsId) return;
|
||||
deleteHistoryListId(goodsId).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
this.trackList = [];
|
||||
this.params.pageNumber = 1
|
||||
@@ -185,9 +194,10 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.submit{
|
||||
.submit {
|
||||
position: fixed;
|
||||
bottom: 20rpx;
|
||||
bottom: calc(20rpx + constant(safe-area-inset-bottom));
|
||||
bottom: calc(20rpx + env(safe-area-inset-bottom));
|
||||
left: 10%;
|
||||
width: 80%;
|
||||
height: 80rpx;
|
||||
@@ -197,110 +207,110 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: $light-color;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.myTracks {
|
||||
width: 100%;
|
||||
padding-top: 2rpx;
|
||||
}
|
||||
|
||||
.tracks-tip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 18rpx 24rpx;
|
||||
background: #fdf6ec;
|
||||
}
|
||||
|
||||
.tracks-tip-text {
|
||||
margin-left: 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #f9ae3d;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.tracks-list {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.myTracks-swipe,
|
||||
:deep(.u-swipe-action),
|
||||
:deep(.u-swipe-action-item),
|
||||
:deep(.u-swipe-action-item__content) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.u-swipe-action-item__content) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.myTracks-title {
|
||||
width: 100%;
|
||||
height: 110rpx;
|
||||
padding-left: 20rpx;
|
||||
padding: 0 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
font-weight: bold;
|
||||
background-color: #fff;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.myTracks-items {
|
||||
padding-top: 2rpx;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.myTracks-item {
|
||||
width: 100%;
|
||||
height: 226rpx;
|
||||
padding-left: 20rpx;
|
||||
padding-right: 20rpx;
|
||||
margin-bottom: 2rpx;
|
||||
// border-radius: 6/@px;
|
||||
min-height: 226rpx;
|
||||
padding: 30rpx 20rpx;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.store-line-check {
|
||||
margin-right: 16rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.myTracks-item-img {
|
||||
margin-right: 20rpx;
|
||||
border-radius: 8rpx;
|
||||
flex-shrink: 0;
|
||||
|
||||
image {
|
||||
.track-thumb {
|
||||
width: 130rpx;
|
||||
height: 130rpx;
|
||||
border-radius: 8rpx;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.myTracks-item-content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.myTracks-item-title {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.myTracks-item-title-desc {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.myTracks-item-price {
|
||||
font-size: 28rpx;
|
||||
color: $light-color;
|
||||
padding: 10rpx 0 0 0;
|
||||
}
|
||||
|
||||
.myTracks-action {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
height: 75rpx;
|
||||
align-items: center;
|
||||
padding: 0 32rpx;
|
||||
}
|
||||
|
||||
.myTracks-action-btn {
|
||||
width: 130rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
|
||||
.myTracks-divider {
|
||||
width: 100%;
|
||||
height: 20rpx;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.myTracks-action-check {
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
.edit{
|
||||
padding-right: 32rpx;
|
||||
.edit {
|
||||
padding-right: 32rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -8,24 +8,27 @@
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<u-row class="portrait-box2">
|
||||
<u-col span="6" class="portrait-box2-col" :gutter="16">
|
||||
<view class="point-summary">
|
||||
<view class="point-summary-item">
|
||||
<text>累计获得:</text>
|
||||
<text class="pcolor">{{ pointData.totalPoint || 0 }}</text>
|
||||
</u-col>
|
||||
<u-col span="6" class="portrait-box2-col">
|
||||
</view>
|
||||
<view class="point-summary-divider"></view>
|
||||
<view class="point-summary-item">
|
||||
<text>剩余积分:</text>
|
||||
<text class="pcolor">{{ pointData.point || 0 }}</text>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<div class="point-list">
|
||||
<view class="point-item" v-for="(item, index) in pointList" :key="index">
|
||||
<view>
|
||||
<view class="point-item-left">
|
||||
<view class="point-label">{{ item.content }}</view>
|
||||
<view>{{ item.createTime}}</view>
|
||||
<view class="point-item-time">{{ item.createTime }}</view>
|
||||
</view>
|
||||
<view class="point-item-value" :class="[item.pointType == 'INCREASE' ? 'plus' : 'reduce']">
|
||||
<text>{{ item.pointType == "INCREASE" ? "+" : "-" }}</text>{{ item.variablePoint }}
|
||||
</view>
|
||||
<view :class="[item.pointType == 'INCREASE' ? 'plus' : 'reduce']"><span>{{item.pointType == "INCREASE" ? '+' : '-'}}</span>{{ item.variablePoint }}</view>
|
||||
</view>
|
||||
<uni-load-more :status="count.loadStatus"></uni-load-more>
|
||||
</div>
|
||||
@@ -99,8 +102,8 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.point-list{
|
||||
margin-top: 50rpx;
|
||||
.point-list {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.title {
|
||||
height: 80rpx;
|
||||
@@ -120,45 +123,61 @@ export default {
|
||||
|
||||
.point-item {
|
||||
width: 100%;
|
||||
height: 130rpx;
|
||||
padding: 0 20rpx;
|
||||
min-height: 130rpx;
|
||||
padding: 24rpx 20rpx;
|
||||
background: #ffffff;
|
||||
font-size: $font-sm;
|
||||
border-bottom: 1px solid $border-color-light;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
> view:nth-child(1) {
|
||||
box-sizing: border-box;
|
||||
|
||||
.point-item-left {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
line-height: 40rpx;
|
||||
view {
|
||||
color: #666666;
|
||||
}
|
||||
:last-child {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
> view:nth-child(2) {
|
||||
.point-item-time {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.point-item-value {
|
||||
flex-shrink: 0;
|
||||
width: 100rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.portrait-box2 {
|
||||
height: 100rpx;
|
||||
.point-summary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 100rpx;
|
||||
padding: 28rpx 0;
|
||||
background: #ffffff;
|
||||
border-radius: 0 0 20rpx 20rpx;
|
||||
margin: 0 20rpx;
|
||||
font-size: 26rpx;
|
||||
::v-deep .u-col {
|
||||
text-align: center !important;
|
||||
box-sizing: border-box;
|
||||
|
||||
.point-summary-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
::v-deep .u-col:first-child {
|
||||
border-right: 1px solid $border-color-light;
|
||||
|
||||
.point-summary-divider {
|
||||
width: 1px;
|
||||
height: 48rpx;
|
||||
background: $border-color-light;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.pcolor {
|
||||
color: $light-color;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,8 +241,9 @@ export default {
|
||||
}
|
||||
|
||||
}
|
||||
.point-label{
|
||||
font-weight: bold;
|
||||
margin-bottom: 10rpx;
|
||||
.point-label {
|
||||
font-weight: bold;
|
||||
margin-bottom: 10rpx;
|
||||
color: #666666;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -111,13 +111,41 @@ page {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
}
|
||||
.scoll-page {
|
||||
.scoll-page,
|
||||
.goods-scroll {
|
||||
flex: 1;
|
||||
height: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.search-navbar-wrap {
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.search-navbar {
|
||||
width: 100%;
|
||||
|
||||
:deep(.u-navbar__content__left) {
|
||||
width: auto !important;
|
||||
padding: 0 0 0 16rpx !important;
|
||||
}
|
||||
}
|
||||
|
||||
.goods-content {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: $bg-color;
|
||||
}
|
||||
|
||||
.content {
|
||||
background-color: $bg-color;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.index-nav-arrow:last-child {
|
||||
@@ -266,6 +294,8 @@ view {
|
||||
|
||||
.search-keyword {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
background-color: #ededed;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,31 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<u-navbar :bg-color="navObj.background" :auto-back="false">
|
||||
<mSearch
|
||||
ref="mSearch"
|
||||
class="mSearch-input-box"
|
||||
@clickLeft="back"
|
||||
:mode="2"
|
||||
:placeholder="defaultKeyword"
|
||||
@search="doSearch(false)"
|
||||
@confirm="doSearch(false)"
|
||||
@SwitchType="doSearchSwitch()"
|
||||
v-model="keyword"
|
||||
:isFocusVal="!isShowSeachGoods"
|
||||
></mSearch>
|
||||
<u-navbar
|
||||
:bg-color="navObj.background"
|
||||
:auto-back="false"
|
||||
:fixed="true"
|
||||
:placeholder="true"
|
||||
:border="false"
|
||||
left-icon=""
|
||||
title=""
|
||||
class="search-navbar"
|
||||
>
|
||||
<template #left>
|
||||
<view class="search-navbar-wrap" :style="searchNavbarStyle">
|
||||
<mSearch
|
||||
ref="mSearch"
|
||||
class="mSearch-input-box"
|
||||
@clickLeft="back"
|
||||
:mode="2"
|
||||
:placeholder="defaultKeyword"
|
||||
@search="doSearch(false)"
|
||||
@confirm="doSearch(false)"
|
||||
@SwitchType="doSearchSwitch()"
|
||||
v-model="keyword"
|
||||
:isFocusVal="!isShowSeachGoods"
|
||||
></mSearch>
|
||||
</view>
|
||||
</template>
|
||||
</u-navbar>
|
||||
|
||||
<view class="search-keyword" v-if="!isShowSeachGoods">
|
||||
@@ -33,9 +46,11 @@
|
||||
<view class="keyword-block" v-if="oldKeywordList.length > 0">
|
||||
<view class="keyword-list-header"><view class="u-tips">搜索历史</view></view>
|
||||
<div class="oldKeyList">
|
||||
<div class="oldKeyItem" v-if="keyword" v-for="(keyword, index) in oldKeywordList" :key="index" @click="doSearch(keyword)">
|
||||
<template v-for="(keyword, index) in oldKeywordList" :key="index">
|
||||
<div class="oldKeyItem" v-if="keyword" @click="doSearch(keyword)">
|
||||
<span>{{ keyword }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div @click="showMore" v-if="oldKeywordIndex > loadIndex" class="oldKeyItem">展示更多</div>
|
||||
</div>
|
||||
@@ -77,36 +92,32 @@
|
||||
<view class="nav-item" @click="sortGoods">筛选</view>
|
||||
</view>
|
||||
<!-- 一行一个商品展示 -->
|
||||
<div v-if="isSWitch">
|
||||
<scroll-view
|
||||
:style="{ height: goodsHeight }"
|
||||
enableBackToTop="true"
|
||||
lower-threshold="250"
|
||||
@scrolltolower="loadmore()"
|
||||
scroll-with-animation
|
||||
scroll-y
|
||||
class="scoll-page"
|
||||
>
|
||||
<goodsList :res="goodsList" type="oneColumns" :keyword="keyword" />
|
||||
<uni-load-more :status="loadingType" @loadmore="loadmore()"></uni-load-more>
|
||||
</scroll-view>
|
||||
</div>
|
||||
<scroll-view
|
||||
v-if="isSWitch"
|
||||
class="goods-scroll"
|
||||
enableBackToTop="true"
|
||||
lower-threshold="250"
|
||||
@scrolltolower="loadmore()"
|
||||
scroll-with-animation
|
||||
scroll-y
|
||||
>
|
||||
<goodsList :res="goodsList" type="oneColumns" :keyword="keyword" />
|
||||
<uni-load-more :status="loadingType" @loadmore="loadmore()"></uni-load-more>
|
||||
</scroll-view>
|
||||
<!-- 一行两个商品展示 -->
|
||||
<div v-if="!isSWitch && !(goodsList == [] || goodsList == '' || goodsList == null)">
|
||||
<scroll-view
|
||||
:style="{ height: goodsHeight }"
|
||||
scroll-anchoring
|
||||
enableBackToTop="true"
|
||||
@scrolltolower="loadmore()"
|
||||
scroll-with-animation
|
||||
scroll-y
|
||||
lower-threshold="250"
|
||||
class="scoll-page"
|
||||
>
|
||||
<goodsList :res="goodsList" :keyword="keyword" />
|
||||
<uni-load-more :status="loadingType"></uni-load-more>
|
||||
</scroll-view>
|
||||
</div>
|
||||
<scroll-view
|
||||
v-if="!isSWitch && !(goodsList == [] || goodsList == '' || goodsList == null)"
|
||||
class="goods-scroll"
|
||||
scroll-anchoring
|
||||
enableBackToTop="true"
|
||||
@scrolltolower="loadmore()"
|
||||
scroll-with-animation
|
||||
scroll-y
|
||||
lower-threshold="250"
|
||||
>
|
||||
<goodsList :res="goodsList" :keyword="keyword" />
|
||||
<uni-load-more :status="loadingType"></uni-load-more>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<u-popup border-radius="20" mode="right" width="90%" v-model:show="sortPopup">
|
||||
@@ -229,7 +240,6 @@ export default {
|
||||
type: '',
|
||||
index: ''
|
||||
},
|
||||
goodsHeight: '',
|
||||
defaultKeyword: '',
|
||||
keyword: '',
|
||||
oldKeywordList: [],
|
||||
@@ -267,10 +277,25 @@ export default {
|
||||
categoryId: ''
|
||||
},
|
||||
|
||||
routerVal: ''
|
||||
routerVal: '',
|
||||
capsuleInsetRight: 0,
|
||||
searchNavbarWidth: 0,
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
searchNavbarStyle() {
|
||||
if (this.searchNavbarWidth) {
|
||||
return {
|
||||
width: `${this.searchNavbarWidth}px`,
|
||||
};
|
||||
}
|
||||
return {
|
||||
width: '100%',
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
onPageScroll(e) {
|
||||
console.log(e);
|
||||
this.scrollTop = e.scrollTop;
|
||||
@@ -309,6 +334,9 @@ export default {
|
||||
}
|
||||
this.loadData();
|
||||
},
|
||||
onReady() {
|
||||
this.setSearchNavbarWidth();
|
||||
},
|
||||
components: {
|
||||
mSearch,
|
||||
goodsList
|
||||
@@ -338,40 +366,22 @@ export default {
|
||||
this.loadData();
|
||||
},
|
||||
|
||||
mounted() {
|
||||
const { windowWidth, windowHeight } = uni.getSystemInfoSync();
|
||||
|
||||
let topHeight = 0;
|
||||
let navHeight = 0;
|
||||
|
||||
uni.getSystemInfo({
|
||||
success: function(res) {
|
||||
// res - 各种参数
|
||||
|
||||
let top = uni.createSelectorQuery().select('.u-navbar');
|
||||
top.boundingClientRect(function(data) {
|
||||
if (data && data.height) {
|
||||
//data - 各种参数
|
||||
topHeight = data.height; // 获取元素宽度
|
||||
}
|
||||
}).exec();
|
||||
let nav = uni.createSelectorQuery().select('.navbar');
|
||||
nav.boundingClientRect(function(data) {
|
||||
if (data && data.height) {
|
||||
//data - 各种参数
|
||||
navHeight = data.height; // 获取元素宽度
|
||||
}
|
||||
}).exec();
|
||||
}
|
||||
});
|
||||
this.goodsHeight = windowHeight - navHeight - topHeight;
|
||||
// #ifdef APP-PLUS
|
||||
this.goodsHeight = this.goodsHeight - 100;
|
||||
// #endif
|
||||
this.goodsHeight += 'px';
|
||||
},
|
||||
|
||||
methods: {
|
||||
setSearchNavbarWidth() {
|
||||
// #ifdef MP-WEIXIN
|
||||
try {
|
||||
const menuButton = uni.getMenuButtonBoundingClientRect();
|
||||
const { windowWidth } = uni.getWindowInfo();
|
||||
this.capsuleInsetRight = windowWidth - menuButton.left;
|
||||
const leftPadding = uni.upx2px(16);
|
||||
const gap = uni.upx2px(8);
|
||||
this.searchNavbarWidth =
|
||||
windowWidth - this.capsuleInsetRight - leftPadding - gap;
|
||||
} catch (e) {
|
||||
this.searchNavbarWidth = 280;
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
// 数据去重一下 只显示一次 减免 劵 什么的
|
||||
getPromotion(item) {
|
||||
if (item.promotionMap) {
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="goods-item-view" v-for="(item,index) in sku.orderItems" v-if="item.sn == sn"
|
||||
<template v-for="(item,index) in sku.orderItems" :key="index">
|
||||
<view class="goods-item-view" v-if="item.sn == sn"
|
||||
@click="gotoGoodsDetail(sku.goods_id)">
|
||||
<view class="goods-img">
|
||||
<u-image border-radius="6" width="131rpx" height="131rpx" :src="item.image"></u-image>
|
||||
@@ -24,6 +25,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
<view class="after-num">
|
||||
<view>申请数量</view>
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="goods-item-view" :key="index" v-for="(item,index) in sku.orderItems" v-if="item.sn == sn" @click="navigateToGoodsDetail(sku.skuId)">
|
||||
<template v-for="(item,index) in sku.orderItems" :key="index">
|
||||
<view class="goods-item-view" v-if="item.sn == sn" @click="navigateToGoodsDetail(sku.skuId)">
|
||||
<view class="goods-img">
|
||||
<u-image border-radius="6" width="131rpx" height="131rpx" :src="item.image"></u-image>
|
||||
</view>
|
||||
@@ -22,6 +23,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
@@ -114,7 +114,9 @@
|
||||
v-if="serviceDetail.serviceType != 'RETURN_MONEY' && serviceDetail.serviceStatus != 'APPLY'">
|
||||
<view class="title">联系方式:</view>
|
||||
<view class="value">{{
|
||||
storeAfterSaleAddress.salesConsigneeMobile ||secrecyMobile("")
|
||||
storeAfterSaleAddress.salesConsigneeMobile
|
||||
? secrecyMobile(storeAfterSaleAddress.salesConsigneeMobile)
|
||||
: ''
|
||||
}}</view>
|
||||
</view>
|
||||
<view v-if="refundShow">
|
||||
|
||||
@@ -18,12 +18,11 @@
|
||||
<view class="info-view">
|
||||
<view>
|
||||
<u-time-line v-if="logList.length != 0">
|
||||
<u-time-line-item>
|
||||
<!-- 此处没有自定义左边的内容,会默认显示一个点 -->
|
||||
<template v-slot:content>
|
||||
<view v-for="(time,index) in logList" :key="index">
|
||||
<view class="u-order-desc">{{time.message}}</view>
|
||||
<view class="u-order-time">{{time.createTime}}</view>
|
||||
<u-time-line-item v-for="(time, index) in logList" :key="index">
|
||||
<template #content>
|
||||
<view>
|
||||
<view class="u-order-desc">{{ time.message }}</view>
|
||||
<view class="u-order-time">{{ time.createTime }}</view>
|
||||
</view>
|
||||
</template>
|
||||
</u-time-line-item>
|
||||
|
||||
@@ -5,12 +5,13 @@
|
||||
<view class="seller-info u-flex u-row-between">
|
||||
<view class="seller-name">
|
||||
<view class="name">{{ order.storeName || "" }}</view>
|
||||
<view class="status">{{ orderStatusList[order.orderStatus] }}</view>
|
||||
<view class="status">{{ orderStatusMap[order.orderStatus] }}</view>
|
||||
</view>
|
||||
<view class="order-sn"></view>
|
||||
</view>
|
||||
<u-line color="#DCDFE6"></u-line>
|
||||
<view class="goods-item-view" v-for="(sku, index) in orderGoodsList" :key="index" v-if="sku.skuId == skuId">
|
||||
<template v-for="(sku, index) in orderGoodsList" :key="index">
|
||||
<view class="goods-item-view" v-if="sku.skuId == skuId">
|
||||
<view class="goods-img">
|
||||
<u-image border-radius="6" width="131rpx" height="131rpx" :src="sku.image"></u-image>
|
||||
</view>
|
||||
@@ -24,6 +25,7 @@
|
||||
<view>x{{ sku.num }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
<!-- 投诉主题 -->
|
||||
@@ -65,7 +67,7 @@ export default {
|
||||
return {
|
||||
storage,
|
||||
uploadFileList: [],
|
||||
orderStatusList: {
|
||||
orderStatusMap: {
|
||||
//订单状态列表
|
||||
UNDELIVERED: "待发货",
|
||||
PARTS_DELIVERED: "部分发货",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<view class="logistics-detail">
|
||||
<view class="card">
|
||||
<div v-if="logisticsList && logisticsList.length>0">
|
||||
<ul class="express-log" v-for="(packageItem, packageIndex) in logisticsList" :key="packageIndex" v-if="packageItem">
|
||||
<ul class="express-log" v-for="(packageItem, packageIndex) in logisticsList" :key="packageIndex">
|
||||
<div class="layui-layer-wrap">
|
||||
<dl>
|
||||
<dt>物流公司:</dt>
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
</view>
|
||||
<swiper class="swiper-box" :current="current" @change="changeSwiper" duration="500">
|
||||
<swiper-item v-for="(item, listIndex) in list" :key="listIndex">
|
||||
<scroll-view scroll-y style="height: 100%" @scrolltolower="renderData(listIndex)">
|
||||
<scroll-view scroll-y :enable-flex="true" class="evaluate-scroll" @scrolltolower="renderData(listIndex)">
|
||||
<view class="evaluate-scroll-inner">
|
||||
<u-empty text="尚无需要评价的商品" mode="list" v-if="orderList.length == 0"></u-empty>
|
||||
<view class="seller-view" v-for="(order, index) in orderList" :key="index">
|
||||
<!-- 店铺名称 -->
|
||||
@@ -62,6 +63,7 @@
|
||||
|
||||
</view>
|
||||
<uni-load-more :status="params.loadStatus"></uni-load-more>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
@@ -327,6 +329,16 @@ page {
|
||||
height: calc(100% - 88rpx);
|
||||
}
|
||||
|
||||
.evaluate-scroll {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.evaluate-scroll-inner {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.goods-specs {
|
||||
margin-bottom: 10rpx;
|
||||
color: #cccccc;
|
||||
|
||||
@@ -214,9 +214,7 @@
|
||||
@click="shippingFlag = true"
|
||||
>
|
||||
{{
|
||||
shippingMethod.find((e) => {
|
||||
return e.value == shippingText;
|
||||
}).label
|
||||
getShippingLabel()
|
||||
}}
|
||||
</u-col>
|
||||
</u-row>
|
||||
@@ -513,6 +511,13 @@ export default {
|
||||
mounted() {},
|
||||
|
||||
methods: {
|
||||
getShippingLabel() {
|
||||
const item =
|
||||
this.shippingMethod.find((e) => e.value === this.shippingText) ||
|
||||
this.shippingWay.find((e) => e.value === this.shippingText);
|
||||
return item ? item.label : "";
|
||||
},
|
||||
|
||||
//发票回调 选择发票之后刷新购物车
|
||||
async callbackInvoice(val) {
|
||||
this.invoiceFlag = false;
|
||||
@@ -746,6 +751,9 @@ export default {
|
||||
});
|
||||
});
|
||||
this.shippingMethod = way;
|
||||
if (way.length && !way.some((item) => item.value === this.shippingText)) {
|
||||
this.shippingText = way[0].value;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<view>
|
||||
<!-- 订单状态 -->
|
||||
<div class="info-view order-view">
|
||||
<div class="order-status" v-if="orderStatusList[order.orderStatus]">
|
||||
{{ orderStatusList[order.orderStatus].title }}
|
||||
<div>{{ orderStatusList[order.orderStatus].value }}</div>
|
||||
<div class="order-status" v-if="orderStatusMap[order.orderStatus]">
|
||||
{{ orderStatusMap[order.orderStatus].title }}
|
||||
<div>{{ orderStatusMap[order.orderStatus].value }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -35,7 +35,7 @@
|
||||
<view>
|
||||
<view class="address-title">
|
||||
<span>{{ order.consigneeName || "未填写昵称" }}</span>
|
||||
<span>{{ order.consigneeMobile || "未填写手机号secrecyMobile(") }}</span>
|
||||
<span>{{ order.consigneeMobile ? secrecyMobile(order.consigneeMobile) : '未填写手机号' }}</span>
|
||||
</view>
|
||||
<view class="address">地址:{{ order.consigneeAddressPath }}
|
||||
{{ order.consigneeDetail }}</view>
|
||||
@@ -67,7 +67,7 @@
|
||||
<view class="seller-info u-flex u-row-between">
|
||||
<view class="seller-name" @click="goToShopPage(order)">
|
||||
<view class="name">{{ order.storeName }}</view>
|
||||
<view class="status" v-if="orderStatusList[order.orderStatus]"> {{ orderStatusList[order.orderStatus].title
|
||||
<view class="status" v-if="orderStatusMap[order.orderStatus]"> {{ orderStatusMap[order.orderStatus].title
|
||||
}}</view>
|
||||
</view>
|
||||
<view class="order-sn"></view>
|
||||
@@ -268,7 +268,7 @@ export default {
|
||||
lightColor: this.$lightColor,
|
||||
logisticsList: "", //物流信息
|
||||
shareFlag: false, //拼团分享开关
|
||||
orderStatusList: {
|
||||
orderStatusMap: {
|
||||
UNPAID: {
|
||||
title: "未付款",
|
||||
value: "商品暂未付款",
|
||||
|
||||
@@ -46,9 +46,7 @@
|
||||
</div>
|
||||
|
||||
<div class="flex" v-show="current != 1">
|
||||
<u-checkbox-group :icon-size="24" width="45rpx">
|
||||
<u-checkbox shape="circle" v-model="enablePrivacy" active-color="#FF5E00"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<u-checkbox usedAlone :icon-size="24" shape="circle" v-model:checked="enablePrivacy" active-color="#FF5E00"></u-checkbox>
|
||||
<div class="tips">
|
||||
未注册的手机号验证后将自动创建用户账号,登录即代表您已同意<span @click="navigateToPrivacy('PRIVACY_POLICY')">《隐私协议》</span>
|
||||
<span @click="navigateToPrivacy('USER_AGREEMENT')">
|
||||
@@ -63,14 +61,15 @@
|
||||
|
||||
<!-- 循环出当前可使用的第三方登录模式 -->
|
||||
<div class="flex login-list">
|
||||
<div v-if="item.code" :style="{ background: item.color }" class="login-item"
|
||||
v-for="(item, index) in loginList" :key="index">
|
||||
<template v-for="(item, index) in loginList" :key="index">
|
||||
<div v-if="item.code" :style="{ background: item.color }" class="login-item">
|
||||
<u-icon v-if="item.title != 'APPLE'" color="#fff" size="42" :name="item.icon"
|
||||
@click="navigateLogin(item)">
|
||||
</u-icon>
|
||||
<u-image v-else src="/static/appleidButton@2x.png" :lazy-load="false" @click="navigateLogin(item)"
|
||||
width="80" height="80" />
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<myVerification v-if="codeFlag" @send="verification" class="verification" ref="verification"
|
||||
business="LOGIN" />
|
||||
|
||||
@@ -1,383 +1,417 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-navbar :auto-back="false" @leftClick="back" title="小程序登录"></u-navbar>
|
||||
<u-modal v-model:show="phoneAuthPopup" :mask-close-able="true" :title="projectName+'商城'"
|
||||
:show-confirm-button="false">
|
||||
<div class="tips">
|
||||
为了更好地用户体验,需要您授权手机号
|
||||
</div>
|
||||
<button class="register" type="primary" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
|
||||
去授权
|
||||
</button>
|
||||
</u-modal>
|
||||
<view class="wx-auth-container">
|
||||
<div class="box">
|
||||
<view class="logo-info">
|
||||
<text class="title">欢迎进入{{ projectName }}</text>
|
||||
</view>
|
||||
<view class="small-tips">
|
||||
<view>为您提供优质服务,{{ projectName }}需要获取以下信息</view>
|
||||
<view>您的公开信息(昵称、头像)</view>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button type="primary" :disabled="logingFlag" bindtap="getUserProfile" @click="getUserProfile()"
|
||||
class="btn-auth">登录</button>
|
||||
<div @click="backToHome" class="btn-callback">暂不登录</div>
|
||||
</view>
|
||||
<div class="privacy">
|
||||
<u-checkbox shape="circle" v-model="checked" :active-color="lightColor">
|
||||
<div class="flex">
|
||||
阅读并同意<navigator class="light-color" url="/pages/mine/help/tips?type=PRIVACY_POLICY">《隐私协议》</navigator>
|
||||
<navigator class="light-color" url="/pages/mine/help/tips?type=USER_AGREEMENT">《用户协议》</navigator>
|
||||
</div>
|
||||
</u-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mpAutoLogin
|
||||
} from "@/api/connect.js";
|
||||
|
||||
import {
|
||||
whetherNavigate
|
||||
} from "@/utils/Foundation"; //登录跳转
|
||||
import {
|
||||
getUserInfo
|
||||
} from "@/api/members";
|
||||
import storage from "@/utils/storage.js";
|
||||
import config from '@/config/config'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lightColor:this.$lightColor,
|
||||
checked:false,
|
||||
configs:config,
|
||||
// 是否展示手机号码授权弹窗,默认第一步不展示,要先获取用户基础信息
|
||||
phoneAuthPopup: false,
|
||||
// 授权信息展示,商城名称
|
||||
projectName: config.name,
|
||||
//微信返回信息,用于揭秘信息,获取sessionkey
|
||||
code: "",
|
||||
//微信昵称
|
||||
nickName: "",
|
||||
logingFlag: false,
|
||||
//微信头像
|
||||
image: "",
|
||||
};
|
||||
},
|
||||
|
||||
//微信小程序进入页面,先获取code,否则几率出现code和后续交互数据不对应情况
|
||||
mounted() {
|
||||
// 小程序默认分享
|
||||
uni.showShareMenu({
|
||||
withShareTicket: true
|
||||
});
|
||||
|
||||
|
||||
//获取code
|
||||
uni.login({
|
||||
success: (res) => {
|
||||
if(res.errMsg === "login:ok") {
|
||||
this.code = res.code
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "系统异常,请联系管理员!"
|
||||
})
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* TODO 此方法不一定是最优解,如果有更好的办法请在 https://gitee.com/beijing_hongye_huicheng/lilishop/issues 中提出
|
||||
* 小程序返回bug
|
||||
* 1.介于微信登录是在login.vue的基础上作为判断跳转来
|
||||
* 所以在页面栈中会自动记录回退路径,所以导致每次微信小程序点击回退就会自动返回login页面
|
||||
* 当然login页面的判断就是 没有登录就会跳转到微信小程序页面 导致了无法回退到之前页面
|
||||
* 2.解决方法: 尝试在回退的时候判断地址,让回退多一级这样就避免了
|
||||
*/
|
||||
|
||||
back() {
|
||||
whetherNavigate("wx");
|
||||
},
|
||||
backToHome() {
|
||||
uni.switchTab({
|
||||
url: `/pages/tabbar/home/index`,
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
//获取用户信息
|
||||
getUserProfile(e) {
|
||||
if(!this.checked){
|
||||
uni.showToast({
|
||||
title:"请勾选协议",
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.logingFlag = true;
|
||||
|
||||
if (this.code) {
|
||||
// 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
|
||||
uni.getUserProfile({
|
||||
desc: "用于完善会员资料", // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
|
||||
success: (res) => {
|
||||
console.log("success", res)
|
||||
this.nickName = res.userInfo.nickName;
|
||||
this.image = res.userInfo.avatarUrl;
|
||||
|
||||
/**
|
||||
* 根据公有的配置设置登录方式
|
||||
*/
|
||||
if(this.configs.enableFetchMobileLogin){
|
||||
this.phoneAuthPopup = true;
|
||||
return false
|
||||
}
|
||||
let iv = res.iv;
|
||||
let encryptedData = res.encryptedData;
|
||||
|
||||
let code = this.code;
|
||||
let image = this.image;
|
||||
let nickName = this.nickName;
|
||||
mpAutoLogin({
|
||||
encryptedData,
|
||||
iv,
|
||||
code,
|
||||
image,
|
||||
nickName,
|
||||
}).then((apiRes) => {
|
||||
storage.setAccessToken(apiRes.data.result.accessToken);
|
||||
storage.setRefreshToken(apiRes.data.result.refreshToken);
|
||||
// 登录成功
|
||||
uni.showToast({
|
||||
title: "登录成功!",
|
||||
icon: "none",
|
||||
});
|
||||
//获取用户信息
|
||||
getUserInfo().then((user) => {
|
||||
storage.setUserInfo(user.data.result);
|
||||
storage.setHasLogin(true);
|
||||
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
fail: (res) => {
|
||||
console.log("fail", res)
|
||||
},
|
||||
});
|
||||
|
||||
this.logingFlag = false;
|
||||
}
|
||||
},
|
||||
|
||||
//获取手机号授权
|
||||
getPhoneNumber(e) {
|
||||
let iv = e.detail.iv;
|
||||
let encryptedData = e.detail.encryptedData;
|
||||
if (!e.detail.encryptedData) {
|
||||
uni.showToast({
|
||||
title: "请授予手机号码权限,手机号码会和会员系统用户绑定!",
|
||||
icon: "none",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
let code = this.code;
|
||||
let image = this.image;
|
||||
let nickName = this.nickName;
|
||||
mpAutoLogin({
|
||||
encryptedData,
|
||||
iv,
|
||||
code,
|
||||
image,
|
||||
nickName,
|
||||
}).then((res) => {
|
||||
storage.setAccessToken(res.data.result.accessToken);
|
||||
storage.setRefreshToken(res.data.result.refreshToken);
|
||||
// 登录成功
|
||||
uni.showToast({
|
||||
title: "登录成功!",
|
||||
icon: "none",
|
||||
});
|
||||
//获取用户信息
|
||||
getUserInfo().then((user) => {
|
||||
storage.setUserInfo(user.data.result);
|
||||
storage.setHasLogin(true);
|
||||
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/*微信授权*/
|
||||
page {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.wx-auth-container {
|
||||
width: 100%;
|
||||
margin-top: 20%;
|
||||
}
|
||||
|
||||
.logo-info {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: flex-start;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
padding: 20rpx;
|
||||
|
||||
flex-direction: column;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
text-align: center;
|
||||
-webkit-transform: scale(2.5);
|
||||
transform: scale(2.5);
|
||||
}
|
||||
|
||||
.logo-info-img {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
border: none;
|
||||
}
|
||||
|
||||
text.title,
|
||||
text.shop {
|
||||
display: inline-block;
|
||||
font-size: 60rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
text.shop {
|
||||
display: inline-block;
|
||||
font-size: 55rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.box {
|
||||
margin: 0 32rpx;
|
||||
}
|
||||
|
||||
/* 文字提示*/
|
||||
.small-tips {
|
||||
width: 94%;
|
||||
padding: 20rpx;
|
||||
font-size: 24rpx;
|
||||
margin: 0 0 20rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.auth-button {
|
||||
padding: 10px 20px;
|
||||
width: calc(100% - 20 * 4rpx);
|
||||
}
|
||||
|
||||
.tips {
|
||||
width: 80%;
|
||||
text-align: left;
|
||||
margin: 6% 10%;
|
||||
margin-top: 48rpx;
|
||||
line-height: 1.75;
|
||||
}
|
||||
|
||||
.register {
|
||||
color: $weChat-color !important;
|
||||
border: none !important;
|
||||
background: #fff !important;
|
||||
}
|
||||
|
||||
.btn-auth {
|
||||
width: 92%;
|
||||
margin: 0 auto 40rpx;
|
||||
border-radius: 100px;
|
||||
// animation: mymove 5s infinite;
|
||||
// -webkit-animation: mymove 5s infinite; /*Safari and Chrome*/
|
||||
// animation-direction: alternate; /*轮流反向播放动画。*/
|
||||
// animation-timing-function: ease-in-out; /*动画的速度曲线*/
|
||||
// /* Safari 和 Chrome */
|
||||
// -webkit-animation: mymove 5s infinite;
|
||||
// -webkit-animation-direction: alternate; /*轮流反向播放动画。*/
|
||||
// -webkit-animation-timing-function: ease-in-out; /*动画的速度曲线*/
|
||||
}
|
||||
.btn-callback {
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
background: #ededed;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 100px;
|
||||
width: 92%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.btn-callback {
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
background: #ededed;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 100px;
|
||||
width: 92%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.btns {
|
||||
margin-top: 100rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@keyframes mymove {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
/*开始为原始大小*/
|
||||
}
|
||||
|
||||
25% {
|
||||
transform: scale(1.1);
|
||||
/*放大1.1倍*/
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
75% {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
}
|
||||
|
||||
.privacy{
|
||||
text-align: center;
|
||||
margin-top: 20rpx;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-navbar :auto-back="false" :fixed="true" :placeholder="true" @leftClick="back" title="小程序登录"></u-navbar>
|
||||
<u-modal v-model:show="phoneAuthPopup" :mask-close-able="true" :title="projectName+'商城'"
|
||||
:show-confirm-button="false">
|
||||
<div class="tips">
|
||||
为了更好地用户体验,需要您授权手机号
|
||||
</div>
|
||||
<button class="register" type="primary" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
|
||||
去授权
|
||||
</button>
|
||||
</u-modal>
|
||||
<view class="wx-auth-container">
|
||||
<div class="box">
|
||||
<view class="logo-info">
|
||||
<text class="title">欢迎进入{{ projectName }}</text>
|
||||
</view>
|
||||
<view class="small-tips">
|
||||
<view>为您提供优质服务,{{ projectName }}需要获取以下信息</view>
|
||||
<view>您的公开信息(昵称、头像)</view>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button type="primary" :disabled="logingFlag" bindtap="getUserProfile" @click="getUserProfile()"
|
||||
class="btn-auth">登录</button>
|
||||
<div @click="backToHome" class="btn-callback">暂不登录</div>
|
||||
</view>
|
||||
<view class="privacy">
|
||||
<view class="privacy-row">
|
||||
<u-checkbox
|
||||
class="privacy-check"
|
||||
usedAlone
|
||||
shape="circle"
|
||||
v-model:checked="checked"
|
||||
:active-color="lightColor"
|
||||
:icon-size="18"
|
||||
></u-checkbox>
|
||||
<view class="privacy-text">
|
||||
阅读并同意
|
||||
<navigator class="privacy-link" url="/pages/mine/help/tips?type=PRIVACY_POLICY">《隐私协议》</navigator>
|
||||
<navigator class="privacy-link" url="/pages/mine/help/tips?type=USER_AGREEMENT">《用户协议》</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mpAutoLogin
|
||||
} from "@/api/connect.js";
|
||||
|
||||
import {
|
||||
whetherNavigate
|
||||
} from "@/utils/Foundation"; //登录跳转
|
||||
import {
|
||||
getUserInfo
|
||||
} from "@/api/members";
|
||||
import storage from "@/utils/storage.js";
|
||||
import config from '@/config/config'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lightColor:this.$lightColor,
|
||||
checked:false,
|
||||
configs:config,
|
||||
// 是否展示手机号码授权弹窗,默认第一步不展示,要先获取用户基础信息
|
||||
phoneAuthPopup: false,
|
||||
// 授权信息展示,商城名称
|
||||
projectName: config.name,
|
||||
//微信返回信息,用于揭秘信息,获取sessionkey
|
||||
code: "",
|
||||
//微信昵称
|
||||
nickName: "",
|
||||
logingFlag: false,
|
||||
//微信头像
|
||||
image: "",
|
||||
};
|
||||
},
|
||||
|
||||
//微信小程序进入页面,先获取code,否则几率出现code和后续交互数据不对应情况
|
||||
mounted() {
|
||||
// 小程序默认分享
|
||||
uni.showShareMenu({
|
||||
withShareTicket: true
|
||||
});
|
||||
|
||||
|
||||
//获取code
|
||||
uni.login({
|
||||
success: (res) => {
|
||||
if(res.errMsg === "login:ok") {
|
||||
this.code = res.code
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "系统异常,请联系管理员!"
|
||||
})
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* TODO 此方法不一定是最优解,如果有更好的办法请在 https://gitee.com/beijing_hongye_huicheng/lilishop/issues 中提出
|
||||
* 小程序返回bug
|
||||
* 1.介于微信登录是在login.vue的基础上作为判断跳转来
|
||||
* 所以在页面栈中会自动记录回退路径,所以导致每次微信小程序点击回退就会自动返回login页面
|
||||
* 当然login页面的判断就是 没有登录就会跳转到微信小程序页面 导致了无法回退到之前页面
|
||||
* 2.解决方法: 尝试在回退的时候判断地址,让回退多一级这样就避免了
|
||||
*/
|
||||
|
||||
back() {
|
||||
whetherNavigate("wx");
|
||||
},
|
||||
backToHome() {
|
||||
uni.switchTab({
|
||||
url: `/pages/tabbar/home/index`,
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
//获取用户信息
|
||||
getUserProfile(e) {
|
||||
if(!this.checked){
|
||||
uni.showToast({
|
||||
title:"请勾选协议",
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.logingFlag = true;
|
||||
|
||||
if (this.code) {
|
||||
// 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
|
||||
uni.getUserProfile({
|
||||
desc: "用于完善会员资料", // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
|
||||
success: (res) => {
|
||||
console.log("success", res)
|
||||
this.nickName = res.userInfo.nickName;
|
||||
this.image = res.userInfo.avatarUrl;
|
||||
|
||||
/**
|
||||
* 根据公有的配置设置登录方式
|
||||
*/
|
||||
if(this.configs.enableFetchMobileLogin){
|
||||
this.phoneAuthPopup = true;
|
||||
return false
|
||||
}
|
||||
let iv = res.iv;
|
||||
let encryptedData = res.encryptedData;
|
||||
|
||||
let code = this.code;
|
||||
let image = this.image;
|
||||
let nickName = this.nickName;
|
||||
mpAutoLogin({
|
||||
encryptedData,
|
||||
iv,
|
||||
code,
|
||||
image,
|
||||
nickName,
|
||||
}).then((apiRes) => {
|
||||
storage.setAccessToken(apiRes.data.result.accessToken);
|
||||
storage.setRefreshToken(apiRes.data.result.refreshToken);
|
||||
// 登录成功
|
||||
uni.showToast({
|
||||
title: "登录成功!",
|
||||
icon: "none",
|
||||
});
|
||||
//获取用户信息
|
||||
getUserInfo().then((user) => {
|
||||
storage.setUserInfo(user.data.result);
|
||||
storage.setHasLogin(true);
|
||||
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
fail: (res) => {
|
||||
console.log("fail", res)
|
||||
},
|
||||
});
|
||||
|
||||
this.logingFlag = false;
|
||||
}
|
||||
},
|
||||
|
||||
//获取手机号授权
|
||||
getPhoneNumber(e) {
|
||||
let iv = e.detail.iv;
|
||||
let encryptedData = e.detail.encryptedData;
|
||||
if (!e.detail.encryptedData) {
|
||||
uni.showToast({
|
||||
title: "请授予手机号码权限,手机号码会和会员系统用户绑定!",
|
||||
icon: "none",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
let code = this.code;
|
||||
let image = this.image;
|
||||
let nickName = this.nickName;
|
||||
mpAutoLogin({
|
||||
encryptedData,
|
||||
iv,
|
||||
code,
|
||||
image,
|
||||
nickName,
|
||||
}).then((res) => {
|
||||
storage.setAccessToken(res.data.result.accessToken);
|
||||
storage.setRefreshToken(res.data.result.refreshToken);
|
||||
// 登录成功
|
||||
uni.showToast({
|
||||
title: "登录成功!",
|
||||
icon: "none",
|
||||
});
|
||||
//获取用户信息
|
||||
getUserInfo().then((user) => {
|
||||
storage.setUserInfo(user.data.result);
|
||||
storage.setHasLogin(true);
|
||||
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/*微信授权*/
|
||||
page {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.wx-auth-container {
|
||||
width: 100%;
|
||||
padding-top: 120rpx;
|
||||
}
|
||||
|
||||
.logo-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
padding: 0 20rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
text-align: center;
|
||||
-webkit-transform: scale(2.5);
|
||||
transform: scale(2.5);
|
||||
}
|
||||
|
||||
.logo-info-img {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
border: none;
|
||||
}
|
||||
|
||||
text.title,
|
||||
text.shop {
|
||||
display: inline-block;
|
||||
font-size: 60rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
text.shop {
|
||||
display: inline-block;
|
||||
font-size: 55rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.box {
|
||||
margin: 0 32rpx;
|
||||
}
|
||||
|
||||
/* 文字提示*/
|
||||
.small-tips {
|
||||
width: 94%;
|
||||
padding: 20rpx;
|
||||
font-size: 24rpx;
|
||||
margin: 0 0 20rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.auth-button {
|
||||
padding: 10px 20px;
|
||||
width: calc(100% - 20 * 4rpx);
|
||||
}
|
||||
|
||||
.tips {
|
||||
width: 80%;
|
||||
text-align: left;
|
||||
margin: 6% 10%;
|
||||
margin-top: 48rpx;
|
||||
line-height: 1.75;
|
||||
}
|
||||
|
||||
.register {
|
||||
color: $weChat-color !important;
|
||||
border: none !important;
|
||||
background: #fff !important;
|
||||
}
|
||||
|
||||
.btn-auth {
|
||||
width: 92%;
|
||||
margin: 0 auto 40rpx;
|
||||
border-radius: 100px;
|
||||
// animation: mymove 5s infinite;
|
||||
// -webkit-animation: mymove 5s infinite; /*Safari and Chrome*/
|
||||
// animation-direction: alternate; /*轮流反向播放动画。*/
|
||||
// animation-timing-function: ease-in-out; /*动画的速度曲线*/
|
||||
// /* Safari 和 Chrome */
|
||||
// -webkit-animation: mymove 5s infinite;
|
||||
// -webkit-animation-direction: alternate; /*轮流反向播放动画。*/
|
||||
// -webkit-animation-timing-function: ease-in-out; /*动画的速度曲线*/
|
||||
}
|
||||
.btn-callback {
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
background: #ededed;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 100px;
|
||||
width: 92%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.btn-callback {
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
background: #ededed;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 100px;
|
||||
width: 92%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.btns {
|
||||
margin-top: 100rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@keyframes mymove {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
/*开始为原始大小*/
|
||||
}
|
||||
|
||||
25% {
|
||||
transform: scale(1.1);
|
||||
/*放大1.1倍*/
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
75% {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
}
|
||||
|
||||
.privacy {
|
||||
margin-top: 32rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.privacy-row {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
width: 92%;
|
||||
}
|
||||
|
||||
.privacy-check {
|
||||
flex-shrink: 0;
|
||||
margin-top: 4rpx;
|
||||
|
||||
::v-deep .u-checkbox {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.privacy-text {
|
||||
flex: 1;
|
||||
margin-left: 12rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.privacy-link {
|
||||
display: inline;
|
||||
color: $light-color;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -351,9 +351,7 @@ page {
|
||||
flex-wrap: wrap;
|
||||
/* height: 140rpx; */
|
||||
overflow: hidden;
|
||||
> * {
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.bot {
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
var chat = requirePlugin('myPlugin')
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -15,6 +14,19 @@
|
||||
|
||||
},
|
||||
onLoad (e) {
|
||||
// 腾讯云智服客服插件需在 manifest.json 的 mp-weixin.plugins 中注册后方可使用,
|
||||
// 未注册时 requirePlugin 会抛出 "has not registered any plugins",此处做容错处理。
|
||||
let chat
|
||||
try {
|
||||
chat = requirePlugin('myPlugin')
|
||||
} catch (err) {
|
||||
uni.showToast({
|
||||
title: '客服功能暂未配置',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
return
|
||||
}
|
||||
const params = JSON.parse((decodeURIComponent(e.params)))
|
||||
chat.init({
|
||||
sign: params.mpSign, //必传,公司渠道唯一标识,腾讯云智服后台系统创建「小程序插件」渠道后,在「渠道管理」获取
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
:y="navbarListY" placement="top-start" />
|
||||
<view class="index">
|
||||
<!-- topBar -->
|
||||
<u-navbar :bg-color="navbar.background" :auto-back="false" :class="headerFlag ? 'header' : 'header bg-none scroll-hide'">
|
||||
<u-navbar :bg-color="navbar.background" :auto-back="false" @leftClick="back" :class="headerFlag ? 'header' : 'header bg-none scroll-hide'">
|
||||
<div class="headerRow">
|
||||
<div class="backs">
|
||||
<u-icon @click="back()" name="arrow-left" class="icon-back"></u-icon>
|
||||
@@ -36,7 +36,7 @@
|
||||
</u-navbar>
|
||||
|
||||
<u-navbar :border="false" v-show="!headerFlag" class="header-only-back" :bg-color="navbarOnlyBack.background"
|
||||
:auto-back="false">
|
||||
:auto-back="false" @leftClick="back">
|
||||
<div>
|
||||
<div class="bg-back">
|
||||
<u-icon size="40" @click="back()" name="arrow-left" class="icon-back"></u-icon>
|
||||
@@ -198,15 +198,15 @@
|
||||
<view class="page-bottom mp-iphonex-bottom" id="pageBottom">
|
||||
<view class="icon-btn">
|
||||
<view class="icon-btn-item" @click="navigateToStore(goodsDetail.storeId)">
|
||||
<u-icon size="34" class="red" name="home-fill"></u-icon>
|
||||
<u-icon size="22" class="red" name="home-fill"></u-icon>
|
||||
<view class="red icon-btn-name">店铺</view>
|
||||
</view>
|
||||
<view class="icon-btn-item" @click="linkMsgDetail()">
|
||||
<u-icon size="34" name="kefu-ermai"></u-icon>
|
||||
<u-icon size="22" name="kefu-ermai"></u-icon>
|
||||
<view class="icon-btn-name">客服</view>
|
||||
</view>
|
||||
<view class="icon-btn-item" @click="reluchToCart()">
|
||||
<u-icon size="34" name="storeping-cart"></u-icon>
|
||||
<u-icon size="22" name="shopping-cart"></u-icon>
|
||||
<view class="icon-btn-name">购物车</view>
|
||||
<view v-if="nums && nums > 0" class="num-icon">{{ nums }}</view>
|
||||
</view>
|
||||
@@ -574,6 +574,10 @@ export default {
|
||||
}
|
||||
/**商品信息以及规格信息存储 */
|
||||
this.goodsDetail = response.data.result.data;
|
||||
// 清洗缩略图,避免损坏地址(如 1?x-oss-process=style/400X400)触发渲染层 500
|
||||
if (this.goodsDetail) {
|
||||
this.goodsDetail.thumbnail = this.parseGoodsImageUrl(this.goodsDetail.thumbnail);
|
||||
}
|
||||
this.wholesaleList = response.data.result.wholesaleList;
|
||||
this.goodsSpec = response.data.result.specs;
|
||||
this.PromotionList = response.data.result.promotionMap;
|
||||
@@ -592,8 +596,12 @@ export default {
|
||||
this.isSeckill = true
|
||||
}
|
||||
});
|
||||
// 轮播图
|
||||
this.imgList = this.goodsDetail.goodsGalleryList.filter(i => i.indexOf("\"url\":") === -1 && i.indexOf("\"status\":") === -1);
|
||||
// 轮播图:兼容上传 JSON 与纯 URL,解析后去重
|
||||
const gallery = (this.goodsDetail.goodsGalleryList || [])
|
||||
.map((i) => this.parseGoodsImageUrl(i, ""))
|
||||
.filter(Boolean);
|
||||
this.imgList = [...new Set(gallery)];
|
||||
|
||||
|
||||
// 获取店铺基本信息
|
||||
this.getStoreBaseInfoFun(this.goodsDetail.storeId);
|
||||
@@ -740,6 +748,9 @@ export default {
|
||||
API_store.getStoreBaseInfo(id).then((res) => {
|
||||
if (res.data.success) {
|
||||
this.storeDetail = res.data.result;
|
||||
if (this.storeDetail) {
|
||||
this.storeDetail.storeLogo = this.parseGoodsImageUrl(this.storeDetail.storeLogo);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -780,7 +791,10 @@ export default {
|
||||
storeId: this.goodsDetail.storeId,
|
||||
recommend: true,
|
||||
}).then((res) => {
|
||||
this.recommendList = res.data.result.records;
|
||||
this.recommendList = (res.data.result.records || []).map((item) => ({
|
||||
...item,
|
||||
thumbnail: this.parseGoodsImageUrl(item.thumbnail),
|
||||
}));
|
||||
});
|
||||
},
|
||||
|
||||
@@ -795,7 +809,10 @@ export default {
|
||||
currentGoodsId: this.goodsDetail.id,
|
||||
keyword: this.goodsDetail.name
|
||||
}).then((res) => {
|
||||
this.likeGoodsList = res.data.result.records;
|
||||
this.likeGoodsList = (res.data.result.records || []).map((item) => ({
|
||||
...item,
|
||||
thumbnail: this.parseGoodsImageUrl(item.thumbnail),
|
||||
}));
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</view>
|
||||
<!-- 查看全部评价按钮 -->
|
||||
<view v-if="commDetail && commDetail.records && commDetail.records.length > 0" class="eva-section-btn" @click="toComment(goodsDetail.goodsId, goodsDetail.grade)">
|
||||
<text>查看全部评价</text>
|
||||
<text class="btn-text">查看全部评价</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -131,7 +131,7 @@ export default {
|
||||
margin: 2px 0 20rpx 0;
|
||||
background: #fff;
|
||||
|
||||
text {
|
||||
.btn-text {
|
||||
width: 200rpx;
|
||||
height: 50rpx;
|
||||
font-size: 22rpx;
|
||||
@@ -207,7 +207,7 @@ export default {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
> view > text {
|
||||
> .star-con > .name {
|
||||
margin-left: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ export default {
|
||||
return {
|
||||
goodsDetail: "",
|
||||
style: {
|
||||
img:"display:block"
|
||||
img:"display:block;width:100%"
|
||||
}
|
||||
};
|
||||
},
|
||||
@@ -114,15 +114,6 @@ export default {
|
||||
|
||||
width: 100%;
|
||||
}
|
||||
.vhtml {
|
||||
::v-deep img {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep img {
|
||||
width: 100%;
|
||||
}
|
||||
.goods-detail-box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!-- 轮播图 -->
|
||||
<view class="carousel">
|
||||
|
||||
<swiper circular="true" duration="400" @change="swiperChange">
|
||||
<swiper class="goods-swiper" circular="true" duration="400" @change="swiperChange">
|
||||
<swiper-item v-if='video'>
|
||||
<!-- #ifndef APP-PLUS -->
|
||||
<video class="video" show-mute-btn style="width:100%; height:100%;" muted autoplay :src='video' loop
|
||||
@@ -20,9 +20,7 @@
|
||||
<swiper-item class="swiper-item" v-for="(item, index) in res" :key="index">
|
||||
|
||||
<view class="image-wrapper">
|
||||
<u-image :src="item" mode="aspectFit" class="loaded" width="100%" height="100%">
|
||||
<template #loading><u-loading></u-loading></template>
|
||||
</u-image>
|
||||
<image class="swiper-img" :src="item" mode="aspectFit"></image>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
@@ -63,7 +61,7 @@ export default {
|
||||
height: 750rpx;
|
||||
position: relative;
|
||||
|
||||
swiper {
|
||||
.goods-swiper {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@@ -72,17 +70,17 @@ export default {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.swiper-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.swiper-item {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
height: 750rpx;
|
||||
overflow: hidden;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
position: relative;
|
||||
@@ -104,7 +102,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .image-wrapper image {
|
||||
::v-deep .image-wrapper .u-image__image {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<u-popup class="popup" v-model:show="addressFlag" :height="setup.height" :mode="setup.mode" :border-radius="setup.radius" @close="closeAddress()" closeable>
|
||||
<u-popup class="popup" :show="addressFlag" :height="setup.height" :mode="setup.mode" :border-radius="setup.radius" @close="closeAddress()" closeable>
|
||||
<view class="header-title">选择地址</view>
|
||||
<view class="view-box" v-if="addressDetail">
|
||||
<view class="view-item" v-for="(item, index) in addressDetail" :key="index" @click="clickAddress(item)">
|
||||
@@ -46,19 +46,19 @@ export default {
|
||||
],
|
||||
};
|
||||
},
|
||||
props: ["goodsId", "addressFlag"],
|
||||
props: ["goodsId", "addressFlag"],
|
||||
|
||||
mounted() {
|
||||
if (this.isLogin("auth")) {
|
||||
this.getShippingAddress();
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/passport/login",
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
mounted() {
|
||||
this.addressFlag = false;
|
||||
if( this.isLogin("auth") ){
|
||||
this.getShippingAddress()
|
||||
}
|
||||
else{
|
||||
uni.navigateTo({
|
||||
url: 'pages/passport/login'
|
||||
});
|
||||
},
|
||||
/**关闭地址 */
|
||||
closeAddress() {
|
||||
this.$emit("closeAddress", false);
|
||||
@@ -66,7 +66,6 @@ export default {
|
||||
},
|
||||
|
||||
getpicker() {
|
||||
// this.$refs.cityPicker.show();
|
||||
uni.navigateTo({
|
||||
url: "/pages/mine/address/add",
|
||||
});
|
||||
@@ -87,10 +86,6 @@ export default {
|
||||
this.checked = addr[0];
|
||||
this.$emit("deliveryData", this.checked);
|
||||
}
|
||||
// addr[0] ? "" : (addr = res.data);
|
||||
|
||||
// /**获取默认地址是否有货 */
|
||||
// this.clickAddress(addr[0]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<view class="coupon-item">
|
||||
<view class="top">
|
||||
<div class="price">
|
||||
<span v-if="item.couponType == 'DISCOUNT'">{{ item.couponDiscount }}折</span>
|
||||
<span v-if="item.couponType == 'PRICE'">¥{{unitPrice(item.price) }}</span>
|
||||
<span class="price-num" v-if="item.couponType == 'DISCOUNT'">{{ item.couponDiscount }}折</span>
|
||||
<span class="price-num" v-if="item.couponType == 'PRICE'">¥{{unitPrice(item.price) }}</span>
|
||||
</div>
|
||||
<view class="text">
|
||||
<div class="coupon-List-title">
|
||||
@@ -21,7 +21,7 @@
|
||||
<div>满{{unitPrice(item.consumeThreshold) }}可用</div>
|
||||
</view>
|
||||
<view class="lingqu-btn" @click="getCoupon(item, index)">
|
||||
<div :class="yhqFlag[index] ? 'cur' : ''">
|
||||
<div class="lingqu-text" :class="yhqFlag[index] ? 'cur' : ''">
|
||||
{{ yhqFlag[index] ? "已领取或领完" : "立即领取" }}
|
||||
</div>
|
||||
</view>
|
||||
@@ -139,7 +139,7 @@
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
.price-num {
|
||||
font-size: 50rpx;
|
||||
}
|
||||
}
|
||||
@@ -164,7 +164,7 @@
|
||||
align-items: center;
|
||||
margin-left: 40rpx;
|
||||
|
||||
text {
|
||||
.lingqu-text {
|
||||
width: 140rpx;
|
||||
height: 40rpx;
|
||||
text-align: center;
|
||||
|
||||
@@ -116,9 +116,7 @@ export default {
|
||||
text-align: left;
|
||||
color: #333333;
|
||||
margin-left: 20rpx;
|
||||
> span {
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
word-spacing: 15rpx;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</view>
|
||||
<view class="to-store-btn" @click="tostorePage(goodsDetail)">
|
||||
<view>进店逛逛</view>
|
||||
<view class="to-store-text">进店逛逛</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -122,11 +122,6 @@ export default {
|
||||
.logo {
|
||||
overflow: hidden;
|
||||
border-radius: 6px;
|
||||
|
||||
> img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.name-star {
|
||||
@@ -144,9 +139,6 @@ export default {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
margin-left: 10px;
|
||||
text {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +146,7 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
> view {
|
||||
> .to-store-text {
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
width: 160rpx;
|
||||
@@ -171,18 +163,6 @@ export default {
|
||||
.star-con {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
view {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.star {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
background: url(https://image.shutterstock.com/image-vector/star-icon-vector-illustration-260nw-474687040.jpg);
|
||||
background-size: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.recommend-list {
|
||||
@@ -230,8 +210,10 @@ export default {
|
||||
}
|
||||
.store-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 10rpx 0;
|
||||
> div {
|
||||
> .collectionNum,
|
||||
> .goodsNum {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ page {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
font-size: 22rpx;
|
||||
font-size: 20rpx;
|
||||
color: #262626;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -256,7 +256,8 @@ page {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
> .icon-btn-name {
|
||||
margin: 4rpx 0;
|
||||
margin-top: 2rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</view>
|
||||
</u-navbar>
|
||||
<!-- 轮播图 -->
|
||||
<u-swiper @click="clickSwiper" class="swiper" :effect3d="true" :list="swiperImg">
|
||||
<u-swiper @click="clickSwiper" class="swiper" keyName="image" :list="swiperImg">
|
||||
|
||||
</u-swiper>
|
||||
<u-tabs :is-scroll="false" @change="changeTabs" :current="current" :active-color="activeColor" inactive-color="#606266" ref="tabs" :list="tabs"></u-tabs>
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<u-navbar :auto-back="false" title="购物车">
|
||||
<template #right>
|
||||
<div class="light-color edit" @click="isEdit = !isEdit">{{ !isEdit ? '编辑' : '完成'}}</div>
|
||||
</template>
|
||||
</u-navbar>
|
||||
<u-navbar
|
||||
class="cart-navbar"
|
||||
:style="cartNavbarStyle"
|
||||
:auto-back="false"
|
||||
:fixed="true"
|
||||
:placeholder="true"
|
||||
:border="false"
|
||||
left-icon=""
|
||||
title="购物车"
|
||||
:right-text="isEdit ? '完成' : '编辑'"
|
||||
@rightClick="toggleEdit"
|
||||
></u-navbar>
|
||||
<!-- 空白页-->
|
||||
<view v-if="!loading && (cartDetail.cartList == '' || cartDetail.cartList == [] || !cartDetail)" class="empty">
|
||||
<image src="/static/emptyCart.png" mode="aspectFit"></image>
|
||||
@@ -19,21 +26,13 @@
|
||||
:key="index">
|
||||
<view class="tab">
|
||||
<view class="store-line">
|
||||
<u-checkbox-group class="store-line-check">
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<u-checkbox shape="circle" :active-color="lightColor" v-model="item.checked"
|
||||
@change="checkboxChangeDP(item)"></u-checkbox>
|
||||
<!-- #endif -->
|
||||
<!-- 微信小程序这里 v-model出现问题,改用:value -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<u-checkbox shape="circle" :active-color="lightColor" :value="item.checked"
|
||||
@change="checkboxChangeDP(item)"></u-checkbox>
|
||||
<!-- #endif -->
|
||||
</u-checkbox-group>
|
||||
<span class="store-name wes store-line-desc" @click.stop="navigateToStore(item)">{{
|
||||
<view class="store-line-check">
|
||||
<u-checkbox usedAlone shape="circle" :active-color="lightColor" v-model:checked="item.checked"
|
||||
:label-size="14" @change="(checked) => onStoreCheckChange(item, checked)"></u-checkbox>
|
||||
</view>
|
||||
<text class="store-name wes" @click.stop="navigateToStore(item)">{{
|
||||
item.storeName
|
||||
}}</span>
|
||||
<u-icon @click="navigateToStore(item)" size="24" style="margin-left:10rpx;" name="arrow-right"></u-icon>
|
||||
}}</text>
|
||||
</view>
|
||||
<view class="right-col" v-if="item.canReceiveCoupon" @click="navigateToCoupon(item)">
|
||||
<div class="right-line"></div>
|
||||
@@ -56,21 +55,13 @@
|
||||
<view class="goods-row" :class="{ invalid: isInvalid(skuItem) }">
|
||||
<view class="goods-config">
|
||||
<view>
|
||||
<u-checkbox-group v-if="skuItem.invalid == 0 && !skuItem.errorMessage">
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<u-checkbox shape="circle" :active-color="lightColor" class="c-left" v-model="skuItem.checked"
|
||||
@change="checkboxChange(skuItem)"></u-checkbox>
|
||||
<!-- #endif -->
|
||||
<!-- 微信小程序这里 v-model出现问题,改用:value -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<u-checkbox shape="circle" :active-color="lightColor" class="c-left" :value="skuItem.checked"
|
||||
@change="checkboxChange(skuItem)"></u-checkbox>
|
||||
<!-- #endif -->
|
||||
</u-checkbox-group>
|
||||
<u-checkbox v-if="skuItem.invalid == 0 && !skuItem.errorMessage" usedAlone shape="circle"
|
||||
:active-color="lightColor" class="c-left" v-model:checked="skuItem.checked"
|
||||
@change="(checked) => onSkuCheckChange(skuItem, checked)"></u-checkbox>
|
||||
<span class="invalid" v-else style="font-size: 24rpx">失效</span>
|
||||
</view>
|
||||
<u-image border-radius="10" :fade="true" @click="navigateToGoods(skuItem)" width="160rpx" height="160rpx"
|
||||
:src="skuItem.goodsSku.thumbnail" />
|
||||
mode="aspectFill" :src="getSkuThumbnail(skuItem.goodsSku.thumbnail)" />
|
||||
</view>
|
||||
<view class="goods-content">
|
||||
<!-- 商品名称 -->
|
||||
@@ -125,9 +116,10 @@
|
||||
<!-- 结账 -->
|
||||
<div class="box box6">
|
||||
<view class="navL">
|
||||
<u-checkbox shape="circle" :active-color="lightColor" v-model="checkout" @change="checkOut()" label-size="24">全选
|
||||
<u-checkbox class="checkout-all" usedAlone shape="circle" :active-color="lightColor" v-model:checked="checkout"
|
||||
:label-size="12" label="全选" @change="checkOut">
|
||||
</u-checkbox>
|
||||
<span class="price">
|
||||
<span class="price checkout-total">
|
||||
<div class="prices">
|
||||
<div class="fullPrice">
|
||||
<span class="number" v-if="cartDetail && cartDetail.priceDetailDTO">
|
||||
@@ -183,6 +175,7 @@
|
||||
import * as API_Trade from "@/api/trade";
|
||||
import { debounce } from "@/utils/tools.js";
|
||||
import uniNumberBox from '@/components/uni-number-box'
|
||||
import config from "@/config/config";
|
||||
export default {
|
||||
components:{uniNumberBox}, // 数量加减组件
|
||||
data() {
|
||||
@@ -214,10 +207,24 @@ export default {
|
||||
isEdit: false, // 是否是编辑
|
||||
checkout: false, //全选按钮
|
||||
WEIXIN_num: "", //购物车兼容微信步进器
|
||||
defaultGoodsImage: config.logo,
|
||||
capsuleInsetRight: 0,
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
cartNavbarStyle() {
|
||||
if (!this.capsuleInsetRight) {
|
||||
return {};
|
||||
}
|
||||
return {
|
||||
"--cart-capsule-inset": `${this.capsuleInsetRight}px`,
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.setCapsuleInset();
|
||||
// #ifdef MP-WEIXIN
|
||||
// 小程序默认分享
|
||||
uni.showShareMenu({ withShareTicket: true });
|
||||
@@ -242,6 +249,29 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setCapsuleInset() {
|
||||
// #ifdef MP-WEIXIN
|
||||
try {
|
||||
const menuButton = uni.getMenuButtonBoundingClientRect();
|
||||
const { windowWidth } = uni.getWindowInfo();
|
||||
this.capsuleInsetRight = windowWidth - menuButton.left + uni.upx2px(8);
|
||||
} catch (e) {
|
||||
this.capsuleInsetRight = 90;
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
|
||||
toggleEdit() {
|
||||
this.isEdit = !this.isEdit;
|
||||
},
|
||||
|
||||
getSkuThumbnail(url) {
|
||||
if (url && /^(https?:)?\/\//.test(String(url))) {
|
||||
return url;
|
||||
}
|
||||
return this.defaultGoodsImage;
|
||||
},
|
||||
|
||||
/**
|
||||
* 倒数计时
|
||||
*/
|
||||
@@ -420,11 +450,11 @@ export default {
|
||||
/**
|
||||
* 全选
|
||||
*/
|
||||
checkOut() {
|
||||
API_Trade.checkAll(this.checkout).then((result) => {
|
||||
checkOut(checked) {
|
||||
const selected = typeof checked === "boolean" ? checked : this.checkout;
|
||||
API_Trade.checkAll(selected).then((result) => {
|
||||
if (result.data.success) {
|
||||
this.getCardData();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -440,14 +470,12 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 店铺点击
|
||||
*/
|
||||
checkboxChangeDP(e) {
|
||||
// #ifdef MP-WEIXIN
|
||||
e.checked = !e.checked;
|
||||
// #endif
|
||||
this.checkStoreFun(e.storeId, e.checked);
|
||||
onStoreCheckChange(storeItem, checked) {
|
||||
this.checkStoreFun(storeItem.storeId, checked);
|
||||
},
|
||||
|
||||
onSkuCheckChange(skuItem, checked) {
|
||||
this.updateSkuCheckedFun(skuItem.goodsSku.id, checked);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -501,15 +529,16 @@ export default {
|
||||
let checkOuted = true;
|
||||
for (let i = 0; i < this.cartDetail.cartList.length; i++) {
|
||||
let item = this.cartDetail.cartList[i];
|
||||
console.log(item);
|
||||
item.checked = item.checked == 1;
|
||||
// 循环出当前商品是否全选
|
||||
if (item.checked == 0) {
|
||||
if (!item.checked) {
|
||||
checkOuted = false;
|
||||
}
|
||||
// 如果有拼团活动顺便删除
|
||||
item.skuList &&
|
||||
item.skuList.forEach((sku) => {
|
||||
if (sku.checked == 0) {
|
||||
sku.checked = sku.checked == 1;
|
||||
if (!sku.checked) {
|
||||
checkOuted = false;
|
||||
}
|
||||
if(Object.keys(sku.promotionMap).length != 0)
|
||||
@@ -535,15 +564,6 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 选中某个复选框时,由checkbox时触发
|
||||
*/
|
||||
checkboxChange(e) {
|
||||
// #ifdef MP-WEIXIN
|
||||
e.checked = !e.checked;
|
||||
// #endif
|
||||
this.updateSkuCheckedFun(e.goodsSku.id, e.checked);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -560,9 +580,16 @@ page {
|
||||
.u-image {
|
||||
box-shadow: 0 4rpx 12rpx 0 rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.edit{
|
||||
padding-right: 32rpx;
|
||||
font-size: 28rpx;
|
||||
|
||||
.cart-navbar {
|
||||
::v-deep .u-navbar__content__right {
|
||||
padding-right: var(--cart-capsule-inset, 13px);
|
||||
}
|
||||
|
||||
::v-deep .u-navbar__content__right__text {
|
||||
color: $light-color;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
.promotion-notice {
|
||||
margin-top: 10px;
|
||||
@@ -593,16 +620,26 @@ page {
|
||||
}
|
||||
|
||||
.store-name {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
|
||||
.store-arrow {
|
||||
flex-shrink: 0;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.invalid {
|
||||
filter: grayscale(1);
|
||||
}
|
||||
|
||||
.cart-item {
|
||||
width: 100%;
|
||||
border-radius: 0.4em;
|
||||
transition: 0.35s;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 空白页 */
|
||||
@@ -698,11 +735,16 @@ page {
|
||||
}
|
||||
|
||||
.goods-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin-left: 20rpx;
|
||||
overflow: hidden;
|
||||
> p {
|
||||
padding-left: 20rpx;
|
||||
|
||||
> p,
|
||||
.sp-name,
|
||||
.sp-type,
|
||||
.sp-number {
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -718,25 +760,27 @@ page {
|
||||
border-right: 1px solid $light-color;
|
||||
}
|
||||
|
||||
.store-line-check,
|
||||
.store-line-img,
|
||||
.store-line-desc {
|
||||
// #ifdef MP-WEIXIN
|
||||
float: left;
|
||||
// #endif
|
||||
.store-line-check {
|
||||
flex-shrink: 0;
|
||||
|
||||
::v-deep .u-checkbox {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.store-line {
|
||||
// #ifndef MP-WEIXIN
|
||||
display: flex;
|
||||
// #endif
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
flex:10;
|
||||
}
|
||||
|
||||
.goods-config {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
|
||||
::v-deep .invalid {
|
||||
display: block;
|
||||
width: 80rpx !important;
|
||||
@@ -746,15 +790,17 @@ page {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 30rpx 0 0 0;
|
||||
padding: 24rpx 0 8rpx;
|
||||
}
|
||||
|
||||
.right-col {
|
||||
flex:2;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
width: 100rpx;
|
||||
color: $light-color;
|
||||
font-size: 26rpx;
|
||||
margin-left: 16rpx;
|
||||
|
||||
> span {
|
||||
margin-left: 20rpx;
|
||||
@@ -762,14 +808,10 @@ page {
|
||||
}
|
||||
|
||||
.right-line {
|
||||
width: 3px;
|
||||
float: left;
|
||||
width: 2rpx;
|
||||
height: 40rpx;
|
||||
border-left: 1px solid #eeeeee;
|
||||
|
||||
::v-deep span {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.box6 {
|
||||
@@ -795,6 +837,21 @@ page {
|
||||
padding: 0 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
gap: 24rpx;
|
||||
|
||||
.checkout-all {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
::v-deep .u-checkbox {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.checkout-total {
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,28 @@
|
||||
<template>
|
||||
<view class="category-wrap">
|
||||
<u-navbar class="navbar" :auto-back="false">
|
||||
<div class="title">商品分类</div>
|
||||
<!-- #ifdef H5 -->
|
||||
<u-search class="nav-search" @click="search" placeholder="搜索商品" :show-action="false"></u-search>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef H5 -->
|
||||
<u-search class="nav-search" disabled @click="search" placeholder="搜索商品" :show-action="false"></u-search>
|
||||
<!-- #endif -->
|
||||
<u-navbar
|
||||
class="navbar"
|
||||
:auto-back="false"
|
||||
:fixed="true"
|
||||
:placeholder="true"
|
||||
:border="false"
|
||||
left-icon=""
|
||||
title=""
|
||||
bg-color="#ffffff"
|
||||
>
|
||||
<template #left>
|
||||
<view class="nav-content">
|
||||
<text class="title">商品分类</text>
|
||||
<view class="nav-search-wrap" :style="searchBarStyle">
|
||||
<!-- #ifdef H5 -->
|
||||
<u-search class="nav-search" @click="search" placeholder="搜索商品" :show-action="false"></u-search>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef H5 -->
|
||||
<u-search class="nav-search" disabled @click="search" placeholder="搜索商品" :show-action="false"></u-search>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</u-navbar>
|
||||
<view class="content">
|
||||
<scroll-view scroll-y scroll-with-animation class="left-aside">
|
||||
@@ -26,12 +41,14 @@
|
||||
<text class="s-item">{{ item.name }}</text>
|
||||
<!-- 分类详情 -->
|
||||
<view class="t-list">
|
||||
<view @click="navigateToList(item.id, children.id)" v-if="children.parentId === item.id" class="t-item" v-for="(children, cIndex) in item.children" :key="children.id"
|
||||
<template v-for="(children, cIndex) in item.children" :key="children.id">
|
||||
<view @click="navigateToList(item.id, children.id)" v-if="children.parentId === item.id" class="t-item"
|
||||
:class="{ 'margin-right': (cIndex + 1) % 3 == 0 }">
|
||||
<u-image width="70px" height="70px" :src="children.image" :lazy-load="true">
|
||||
</u-image>
|
||||
<text>{{ children.name }}</text>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -48,8 +65,17 @@ export default {
|
||||
tabList: [], //左侧标题列表
|
||||
categoryList: [], //右侧分类数据列表
|
||||
topImg: "", //顶部图片
|
||||
searchBarWidth: 0, //导航栏搜索框宽度(避让微信胶囊)
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
searchBarStyle() {
|
||||
if (this.searchBarWidth) {
|
||||
return { width: `${this.searchBarWidth}px` };
|
||||
}
|
||||
return { width: "460rpx" };
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
this.loadData();
|
||||
// #ifdef MP-WEIXIN
|
||||
@@ -57,7 +83,29 @@ export default {
|
||||
uni.showShareMenu({ withShareTicket: true });
|
||||
// #endif
|
||||
},
|
||||
onReady() {
|
||||
this.setSearchBarWidth();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 根据微信胶囊位置计算搜索框宽度,避免被胶囊遮挡
|
||||
*/
|
||||
setSearchBarWidth() {
|
||||
// #ifdef MP-WEIXIN
|
||||
try {
|
||||
const menuButton = uni.getMenuButtonBoundingClientRect();
|
||||
const { windowWidth } = uni.getWindowInfo();
|
||||
const capsuleInsetRight = windowWidth - menuButton.left;
|
||||
const titleWidth = uni.upx2px(160); // “商品分类” 标题宽度
|
||||
const leftPadding = uni.upx2px(60); // 左侧内边距
|
||||
const gap = uni.upx2px(20); // 搜索框与胶囊间距
|
||||
this.searchBarWidth =
|
||||
windowWidth - capsuleInsetRight - titleWidth - leftPadding - gap;
|
||||
} catch (e) {
|
||||
this.searchBarWidth = 180;
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@@ -124,22 +172,30 @@ uni-scroll-view .uni-scroll-view::-webkit-scrollbar {
|
||||
.s-list {
|
||||
box-shadow: 0 4rpx 12rpx 0 rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.nav-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.nav-search-wrap {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.nav-search {
|
||||
padding-left: 30rpx !important;
|
||||
padding-right: 20rpx !important;
|
||||
width: 100%;
|
||||
}
|
||||
.title {
|
||||
display: block;
|
||||
width: 259rpx;
|
||||
flex-shrink: 0;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
|
||||
|
||||
font-size: 28rpx;
|
||||
padding-right: 16rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.category-wrap {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.content {
|
||||
height: calc(100vh - 94px);
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
display: flex;
|
||||
}
|
||||
.item-price {
|
||||
> span {
|
||||
.price-text {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: #e1212b;
|
||||
@@ -26,7 +26,7 @@
|
||||
position: relative;
|
||||
}
|
||||
.item-line-through {
|
||||
> span {
|
||||
.price-text {
|
||||
font-size: 10px;
|
||||
font-weight: 400;
|
||||
text-decoration: line-through;
|
||||
@@ -46,12 +46,12 @@
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
height: 50px;
|
||||
> div:nth-of-type(1) {
|
||||
.join-title-name {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
> div:nth-of-type(2) {
|
||||
.join-title-more {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,11 @@
|
||||
display: block;
|
||||
padding: 2rpx;
|
||||
}
|
||||
// 首页楼层模块统一左右边距(轮播图、宫格等 .layout 容器)
|
||||
$home-layout-padding: 16rpx;
|
||||
|
||||
.layout {
|
||||
padding: 16rpx;
|
||||
padding: $home-layout-padding;
|
||||
margin: 8rpx 0;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,23 @@
|
||||
<template>
|
||||
<div class="layout">
|
||||
<div class="box">
|
||||
<u-swiper @click="clickSwiper" interval="5000" duration="500" height="350" v-if="res" name="img" :list="res.list">
|
||||
<view class="layout">
|
||||
<view class="banner-box">
|
||||
<u-swiper
|
||||
v-if="res && res.list && res.list.length"
|
||||
class="home-banner-swiper"
|
||||
:list="res.list"
|
||||
keyName="img"
|
||||
height="350rpx"
|
||||
imgMode="scaleToFill"
|
||||
interval="5000"
|
||||
duration="500"
|
||||
circular
|
||||
indicator
|
||||
@click="clickSwiper"
|
||||
>
|
||||
<template #loading><u-loading></u-loading></template>
|
||||
</u-swiper>
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -34,4 +46,25 @@ export default {
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./tpl.scss";
|
||||
|
||||
.banner-box {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
:deep(.home-banner-swiper),
|
||||
:deep(.u-swiper),
|
||||
:deep(.u-swiper__wrapper) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.u-swiper__wrapper__item),
|
||||
:deep(.u-swiper__wrapper__item__wrapper) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.u-swiper__wrapper__item__wrapper__image) {
|
||||
width: 100% !important;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -29,7 +29,4 @@ export default {
|
||||
justify-content: center;
|
||||
background-size: cover;
|
||||
}
|
||||
img {
|
||||
width: 84px;
|
||||
}
|
||||
</style>
|
||||
@@ -29,9 +29,5 @@ export default {
|
||||
width: 100%;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
> img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -33,7 +33,4 @@ export default {
|
||||
justify-content: center;
|
||||
background-size: cover;
|
||||
}
|
||||
img {
|
||||
width: 111px;
|
||||
}
|
||||
</style>
|
||||
@@ -38,10 +38,5 @@ export default {
|
||||
}
|
||||
.flex-item {
|
||||
width: 50%;
|
||||
> img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -10,76 +10,79 @@
|
||||
:key="index"
|
||||
>
|
||||
<h4 class="h4">{{ title.title }}</h4>
|
||||
<div>{{ title.desc }}</div>
|
||||
<div class="title-desc">{{ title.desc }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</u-sticky>
|
||||
<div class="goods-list">
|
||||
<div
|
||||
v-if="
|
||||
item.___index != undefined
|
||||
? selected.index == item.___index
|
||||
: selected.val == item.type
|
||||
"
|
||||
@click="handleClick(item)"
|
||||
class="goods-item"
|
||||
v-for="(item, item_index) in res.list[0].listWay"
|
||||
:key="item_index"
|
||||
>
|
||||
<div class="goods-img">
|
||||
<u-image
|
||||
:src="item.img"
|
||||
height="350rpx"
|
||||
mode="aspectFit"
|
||||
width="100%"
|
||||
>
|
||||
<template #loading><u-loading></u-loading></template>
|
||||
</u-image>
|
||||
</div>
|
||||
<div class="goods-desc">
|
||||
<div class="goods-title">
|
||||
{{ item.title }}
|
||||
<template v-for="(item, item_index) in res.list[0].listWay" :key="item_index">
|
||||
<div
|
||||
v-if="
|
||||
item.___index != undefined
|
||||
? selected.index == item.___index
|
||||
: selected.val == item.type
|
||||
"
|
||||
@click="handleClick(item)"
|
||||
class="goods-item"
|
||||
>
|
||||
<div class="goods-img">
|
||||
<u-image
|
||||
:src="item.img"
|
||||
height="350rpx"
|
||||
mode="aspectFit"
|
||||
width="100%"
|
||||
>
|
||||
<template #loading><u-loading></u-loading></template>
|
||||
</u-image>
|
||||
</div>
|
||||
<div class="goods-bottom">
|
||||
<div class="goods-price">
|
||||
¥<span
|
||||
>{{ goodsFormatPrice(item.price)[0] }} </span
|
||||
>.{{ goodsFormatPrice(item.price)[1] }}
|
||||
<div class="goods-desc">
|
||||
<div class="goods-title">
|
||||
{{ item.title }}
|
||||
</div>
|
||||
<div class="goods-bottom">
|
||||
<div class="goods-price">
|
||||
¥<span class="price-int"
|
||||
>{{ goodsFormatPrice(item.price)[0] }} </span
|
||||
>.{{ goodsFormatPrice(item.price)[1] }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div
|
||||
<template
|
||||
v-if="res.list[0].titleWay[selected.index].bindCategory && goodsData.length"
|
||||
v-for="(item, index) in goodsData"
|
||||
:key="index"
|
||||
class="goods-item"
|
||||
@click="handleClick(item)"
|
||||
>
|
||||
<div class="goods-img">
|
||||
<u-image
|
||||
:src="item.thumbnail"
|
||||
height="350rpx"
|
||||
mode="aspectFit"
|
||||
width="100%"
|
||||
>
|
||||
<template #loading><u-loading></u-loading></template>
|
||||
</u-image>
|
||||
</div>
|
||||
<div class="goods-desc">
|
||||
<div class="goods-title">
|
||||
{{ item.goodsName }}
|
||||
<div
|
||||
v-for="(item, index) in goodsData"
|
||||
:key="index"
|
||||
class="goods-item"
|
||||
@click="handleClick(item)"
|
||||
>
|
||||
<div class="goods-img">
|
||||
<u-image
|
||||
:src="item.thumbnail"
|
||||
height="350rpx"
|
||||
mode="aspectFit"
|
||||
width="100%"
|
||||
>
|
||||
<template #loading><u-loading></u-loading></template>
|
||||
</u-image>
|
||||
</div>
|
||||
<div class="goods-bottom">
|
||||
<div class="goods-price">
|
||||
¥<span
|
||||
>{{ goodsFormatPrice(item.price)[0] }} </span
|
||||
>.{{ goodsFormatPrice(item.price)[1] }}
|
||||
<div class="goods-desc">
|
||||
<div class="goods-title">
|
||||
{{ item.goodsName }}
|
||||
</div>
|
||||
<div class="goods-bottom">
|
||||
<div class="goods-price">
|
||||
¥<span class="price-int"
|
||||
>{{ goodsFormatPrice(item.price)[0] }} </span
|
||||
>.{{ goodsFormatPrice(item.price)[1] }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -170,12 +173,12 @@ $w_94: 94%;
|
||||
}
|
||||
|
||||
.selected-title {
|
||||
> h4 {
|
||||
.h4 {
|
||||
font-size: 30rpx;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
> div {
|
||||
.title-desc {
|
||||
font-weight: bold;
|
||||
color: $main-color !important;
|
||||
}
|
||||
@@ -191,11 +194,11 @@ $w_94: 94%;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
|
||||
> h4 {
|
||||
.h4 {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
> div {
|
||||
.title-desc {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
@@ -223,10 +226,6 @@ $w_94: 94%;
|
||||
border-top-left-radius: 20rpx;
|
||||
border-top-right-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
> img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.goods-desc {
|
||||
@@ -252,7 +251,7 @@ $w_94: 94%;
|
||||
> .goods-price {
|
||||
line-height: 2;
|
||||
color: $main-color;
|
||||
> span {
|
||||
.price-int {
|
||||
font-size: 42rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<div class="layout">
|
||||
<div class="join-list">
|
||||
<div class="join-title">
|
||||
<div>{{ res.list[0].title }}</div>
|
||||
<div>更多</div>
|
||||
<div class="join-title-name">{{ res.list[0].title }}</div>
|
||||
<div class="join-title-more">更多</div>
|
||||
</div>
|
||||
<div class="join-box">
|
||||
<div class="join-item" @click="modelNavigateTo(item)" v-for="item in 4" :key="item">
|
||||
@@ -11,10 +11,10 @@
|
||||
<img class="item-img" src="https://picsum.photos/id/268/200/200" alt />
|
||||
</div>
|
||||
<div class="item-price">
|
||||
<span>¥120.00</span>
|
||||
<span class="price-text">¥120.00</span>
|
||||
</div>
|
||||
<div class="item-line-through">
|
||||
<span>¥190.00</span>
|
||||
<span class="price-text">¥190.00</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="layout">
|
||||
<div class="flex-one hot-image">
|
||||
<image mode="widthFix" :src="res.list[0].img" alt=""></image>
|
||||
<image class="hot-image-main" mode="widthFix" :src="res.list[0].img" alt=""></image>
|
||||
|
||||
<image
|
||||
v-for="(area, index) in res.list[0].zoneInfo"
|
||||
@@ -47,11 +47,9 @@ export default {
|
||||
width: 100%;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
image {
|
||||
width: 100%;
|
||||
|
||||
min-height: 200rpx;
|
||||
// height: 100%;
|
||||
}
|
||||
}
|
||||
.hot-image-main {
|
||||
width: 100%;
|
||||
min-height: 200rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<div class="layout">
|
||||
<div class="join-list">
|
||||
<div class="join-title">
|
||||
<div>{{ res.list[0].title }}</div>
|
||||
<div>更多</div>
|
||||
<div class="join-title-name">{{ res.list[0].title }}</div>
|
||||
<div class="join-title-more">更多</div>
|
||||
</div>
|
||||
<div class="join-box">
|
||||
<div class="join-item" v-for="item in 4" :key="item">
|
||||
@@ -11,10 +11,10 @@
|
||||
<img class="item-img" src="https://picsum.photos/id/268/200/200" alt />
|
||||
</div>
|
||||
<div class="item-price">
|
||||
<span>20积分</span>
|
||||
<span class="price-text">20积分</span>
|
||||
</div>
|
||||
<div class="item-line-through">
|
||||
<span>30积分</span>
|
||||
<span class="price-text">30积分</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -34,7 +34,7 @@ export default {
|
||||
display: flex;
|
||||
}
|
||||
.item-price {
|
||||
> span {
|
||||
.price-text {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: #e1212b;
|
||||
@@ -53,7 +53,7 @@ export default {
|
||||
position: relative;
|
||||
}
|
||||
.item-line-through {
|
||||
> span {
|
||||
.price-text {
|
||||
font-size: 10px;
|
||||
font-weight: 400;
|
||||
text-decoration: line-through;
|
||||
@@ -73,11 +73,11 @@ export default {
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
height: 50px;
|
||||
> div:nth-of-type(1) {
|
||||
.join-title-name {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
> div:nth-of-type(2) {
|
||||
.join-title-more {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<div class="layout">
|
||||
<div class="join-list">
|
||||
<div class="join-title">
|
||||
<div>{{ res.list[0].title }}</div>
|
||||
<div>更多</div>
|
||||
<div class="join-title-name">{{ res.list[0].title }}</div>
|
||||
<div class="join-title-more">更多</div>
|
||||
</div>
|
||||
<div class="join-box">
|
||||
<div class="join-item" v-for="item in 4" :key="item">
|
||||
@@ -16,10 +16,10 @@
|
||||
<div class="item-position-tips">2人团</div>
|
||||
</div>
|
||||
<div class="item-price">
|
||||
<span>¥120.00</span>
|
||||
<span class="price-text">¥120.00</span>
|
||||
</div>
|
||||
<div class="item-line-through">
|
||||
<span>¥120.00</span>
|
||||
<span class="price-text">¥120.00</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -39,7 +39,7 @@ export default {
|
||||
display: flex;
|
||||
}
|
||||
.item-price {
|
||||
> span {
|
||||
.price-text {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: #e1212b;
|
||||
@@ -58,7 +58,7 @@ export default {
|
||||
position: relative;
|
||||
}
|
||||
.item-line-through {
|
||||
> span {
|
||||
.price-text {
|
||||
font-size: 10px;
|
||||
font-weight: 400;
|
||||
text-decoration: line-through;
|
||||
@@ -78,11 +78,11 @@ export default {
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
height: 50px;
|
||||
> div:nth-of-type(1) {
|
||||
.join-title-name {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
> div:nth-of-type(2) {
|
||||
.join-title-more {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div class="layout">
|
||||
<div class="menu-list">
|
||||
<div
|
||||
<view class="layout">
|
||||
<view class="menu-list">
|
||||
<view
|
||||
class="menu-item"
|
||||
@click="modelNavigateTo(item)"
|
||||
v-for="(item, index) in res.list"
|
||||
:key="index"
|
||||
>
|
||||
<div>
|
||||
<view class="menu-img-wrap">
|
||||
<u-image
|
||||
width="88rpx"
|
||||
height="88rpx"
|
||||
@@ -16,11 +16,11 @@
|
||||
>
|
||||
<template #loading><u-loading></u-loading></template>
|
||||
</u-image>
|
||||
</div>
|
||||
<div class="menu-title">{{ item.title }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
<view class="menu-title">{{ item.title }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { modelNavigateTo } from "./tpl";
|
||||
@@ -38,24 +38,45 @@ export default {
|
||||
@import "./tpl.scss";
|
||||
.menu-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-start;
|
||||
|
||||
> .menu-item {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
width: 20%;
|
||||
// flex: 1;
|
||||
flex: 0 0 20%;
|
||||
box-sizing: border-box;
|
||||
margin: 20rpx 0;
|
||||
padding: 0 4rpx;
|
||||
}
|
||||
}
|
||||
.menu-img {
|
||||
display: flex;
|
||||
margin: 0 auto;
|
||||
|
||||
.menu-img-wrap {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.menu-img {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
:deep(.menu-img .u-image) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.menu-title {
|
||||
margin-top: 8rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 1.3;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -9,7 +9,7 @@
|
||||
>
|
||||
<div>
|
||||
<div class="join-title">
|
||||
<div>{{ item.title }}</div>
|
||||
<div class="join-title-name">{{ item.title }}</div>
|
||||
<div
|
||||
class="sub"
|
||||
v-if="item.type !== 'SECKILL'"
|
||||
@@ -54,7 +54,7 @@
|
||||
{{ i.goodsName ? i.goodsName : i.name }}
|
||||
</div>
|
||||
<div class="item-price">
|
||||
<span>¥{{ i.price ? i.price : i.originalPrice }}</span>
|
||||
<span class="price-text">¥{{ i.price ? i.price : i.originalPrice }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -195,7 +195,7 @@ export default {
|
||||
width: 316rpx !important;
|
||||
}
|
||||
.item-price {
|
||||
> span {
|
||||
.price-text {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #e1212b;
|
||||
@@ -214,7 +214,7 @@ export default {
|
||||
position: relative;
|
||||
}
|
||||
.item-line-through {
|
||||
> span {
|
||||
.price-text {
|
||||
font-size: 20rpx;
|
||||
font-weight: 400;
|
||||
text-decoration: line-through;
|
||||
@@ -234,11 +234,12 @@ export default {
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
height: 100rpx;
|
||||
> div:nth-of-type(1) {
|
||||
.join-title-name {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
> div:nth-of-type(2) {
|
||||
.sub,
|
||||
.sub-seckill {
|
||||
font-size: 20rpx;
|
||||
line-height: 1.75;
|
||||
border-radius: 16rpx;
|
||||
|
||||
@@ -1,25 +1,16 @@
|
||||
<template>
|
||||
<div class="layout">
|
||||
<div class="search" @click="handleSearch">
|
||||
<view class="layout">
|
||||
<view class="search" @click="handleSearch">
|
||||
<u-icon name="search"></u-icon>
|
||||
{{ res.list[0].title }}
|
||||
</div>
|
||||
<div class="navbar-right message" @click="linkMsgDetail" style="border-style:none;background:rgb(234,234,234);">
|
||||
<image style="width:53rpx;height:53rpx;margin-top:6rpx;" src="@/static/img/title.png"></image>
|
||||
</div>
|
||||
</div>
|
||||
<text class="search-text">{{ res.list[0].title }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
title:"搜索栏",
|
||||
props: ["res","storeId"],
|
||||
methods: {
|
||||
linkMsgDetail(){
|
||||
uni.navigateTo({
|
||||
url:`/pages/tabbar/home/title`
|
||||
})
|
||||
},
|
||||
|
||||
handleSearch() {
|
||||
if(this.storeId){
|
||||
uni.navigateTo({
|
||||
@@ -39,25 +30,33 @@ export default {
|
||||
@import "./tpl.scss";
|
||||
|
||||
.search {
|
||||
width: 100%;
|
||||
height: 64rpx;
|
||||
border-radius: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
justify-content: flex-start;
|
||||
padding: 0 10rpx;
|
||||
background: #ededed;
|
||||
color: #999;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.search-text {
|
||||
margin-left: 12rpx;
|
||||
font-size: 26rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.layout {
|
||||
background: #fff;
|
||||
padding: 0 16rpx;
|
||||
position: relative;
|
||||
}
|
||||
.navbar-right{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
// right: 0;
|
||||
}
|
||||
.message{
|
||||
right:40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<div class="layout">
|
||||
<div class="join-list">
|
||||
<div class="join-title">
|
||||
<div>{{ res.list[0].title }}</div>
|
||||
<div>更多</div>
|
||||
<div class="join-title-name">{{ res.list[0].title }}</div>
|
||||
<div class="join-title-more">更多</div>
|
||||
</div>
|
||||
<div class="join-box">
|
||||
<div class="join-item" v-for="item in 4" :key="item">
|
||||
@@ -15,10 +15,10 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="item-price">
|
||||
<span>¥120.00</span>
|
||||
<span class="price-text">¥120.00</span>
|
||||
</div>
|
||||
<div class="item-line-through">
|
||||
<span>¥190.00</span>
|
||||
<span class="price-text">¥190.00</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -58,13 +58,8 @@ export default {
|
||||
background-size: cover;
|
||||
padding: 0;
|
||||
}
|
||||
.-item-image{
|
||||
|
||||
padding: 10px ;
|
||||
>img{
|
||||
|
||||
width: 100%;
|
||||
}
|
||||
.-item-image {
|
||||
padding: 10px;
|
||||
}
|
||||
.-item-tilte {
|
||||
background: $aider-light-color;
|
||||
|
||||
@@ -53,18 +53,10 @@ export default {
|
||||
display: flex;
|
||||
height: 200rpx;
|
||||
width: 100%;
|
||||
> img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.view-height-85 {
|
||||
padding: 0 1px;
|
||||
width: 50%;
|
||||
> img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.image-mode{
|
||||
width: 100%;
|
||||
|
||||
@@ -8,8 +8,9 @@
|
||||
width="100%"
|
||||
:src="res.list[0].img"
|
||||
alt
|
||||
><u-loading #loading></u-loading
|
||||
></u-image>
|
||||
>
|
||||
<template #loading><u-loading></u-loading></template>
|
||||
</u-image>
|
||||
</div>
|
||||
<div class="view-height-85" @click="modelNavigateTo(res.list[1])">
|
||||
<u-image
|
||||
@@ -18,8 +19,9 @@
|
||||
width="100%"
|
||||
:src="res.list[1].img"
|
||||
alt
|
||||
><u-loading #loading></u-loading
|
||||
></u-image>
|
||||
>
|
||||
<template #loading><u-loading></u-loading></template>
|
||||
</u-image>
|
||||
</div>
|
||||
</div>
|
||||
<div class="view-width-100" @click="modelNavigateTo(res.list[2])">
|
||||
@@ -28,8 +30,9 @@
|
||||
height="200rpx"
|
||||
width="100%"
|
||||
:src="res.list[2].img"
|
||||
><u-loading #loading></u-loading
|
||||
></u-image>
|
||||
>
|
||||
<template #loading><u-loading></u-loading></template>
|
||||
</u-image>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -3,16 +3,26 @@
|
||||
<!-- uni 中不能使用 vue component 所以用if判断每个组件 -->
|
||||
<div v-for="(item, index) in pageData.list" :key="index">
|
||||
<!-- 搜索栏,如果在楼层装修顶部则会自动浮动,否则不浮动 -->
|
||||
<u-navbar class="navbar" v-if="item.type == 'search'" :auto-back="false" :fixed="index === 1 ? false : true">
|
||||
<search style="width: 100%" :res="item.options" />
|
||||
<!-- #ifndef H5 -->
|
||||
<!-- 扫码功能 不兼容h5 详情文档: https://uniapp.dcloud.io/api/system/barcode?id=scancode -->
|
||||
<template #right>
|
||||
<div class="navbar-right">
|
||||
<u-icon name="scan" @click="scan()" color="#666" size="50"></u-icon>
|
||||
</div>
|
||||
<u-navbar
|
||||
class="navbar"
|
||||
v-if="item.type == 'search'"
|
||||
:auto-back="false"
|
||||
:fixed="index === 1 ? false : true"
|
||||
:placeholder="index === 1 ? false : true"
|
||||
left-icon=""
|
||||
title=""
|
||||
bg-color="#ffffff"
|
||||
>
|
||||
<template #left>
|
||||
<view class="navbar-search-wrap" :style="searchBarStyle" @click.stop>
|
||||
<search :res="item.options" />
|
||||
</view>
|
||||
</template>
|
||||
<template #right>
|
||||
<view class="navbar-message" :style="messageIconStyle" @click="linkMsgDetail">
|
||||
<image class="message-icon" src="/static/img/title.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
</template>
|
||||
<!-- #endif -->
|
||||
</u-navbar>
|
||||
<carousel v-if="item.type == 'carousel'" :res="item.options" />
|
||||
<titleLayout v-if="item.type == 'title'" :res="item.options" />
|
||||
@@ -68,6 +78,8 @@ import tpl_notice from "@/pages/tabbar/home/template/tpl_notice"; //标题栏模
|
||||
import tpl_promotions from "@/pages/tabbar/home/template/tpl_promotions_detail"; //标题栏模块
|
||||
import storage from "@/utils/storage.js";
|
||||
import fetchCoupon from '@/pages/tabbar/home/template/fetch_coupon'
|
||||
// 与 tpl.scss $home-layout-padding 保持一致
|
||||
const HOME_LAYOUT_PADDING_RPX = 16;
|
||||
// import {receiveCoupons} from "@/api/members"
|
||||
|
||||
export default {
|
||||
@@ -79,8 +91,30 @@ export default {
|
||||
pageData: "", //楼层页面数据
|
||||
isIos: "",
|
||||
enableLoad: false, //触底加载 针对于商品模块
|
||||
capsuleInsetRight: 0,
|
||||
searchBarWidth: 0,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
messageIconStyle() {
|
||||
if (!this.capsuleInsetRight) {
|
||||
return {};
|
||||
}
|
||||
return {
|
||||
marginRight: `${this.capsuleInsetRight}px`,
|
||||
};
|
||||
},
|
||||
searchBarStyle() {
|
||||
if (this.searchBarWidth) {
|
||||
return {
|
||||
width: `${this.searchBarWidth}px`,
|
||||
};
|
||||
}
|
||||
return {
|
||||
width: '560rpx',
|
||||
};
|
||||
},
|
||||
},
|
||||
components: {
|
||||
carousel: tpl_banner,
|
||||
titleLayout: tpl_title,
|
||||
@@ -104,6 +138,7 @@ export default {
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.setCapsuleInset();
|
||||
this.init();
|
||||
// #ifdef MP-WEIXIN
|
||||
// 小程序默认分享
|
||||
@@ -112,6 +147,28 @@ export default {
|
||||
|
||||
},
|
||||
methods: {
|
||||
setCapsuleInset() {
|
||||
// #ifdef MP-WEIXIN
|
||||
try {
|
||||
const menuButton = uni.getMenuButtonBoundingClientRect();
|
||||
const { windowWidth } = uni.getWindowInfo();
|
||||
this.capsuleInsetRight = windowWidth - menuButton.left;
|
||||
const messageWidth = uni.upx2px(20);
|
||||
const leftPadding = uni.upx2px(HOME_LAYOUT_PADDING_RPX);
|
||||
const gap = uni.upx2px(0);
|
||||
this.searchBarWidth =
|
||||
windowWidth - this.capsuleInsetRight - messageWidth - leftPadding - gap;
|
||||
} catch (e) {
|
||||
this.capsuleInsetRight = 90;
|
||||
this.searchBarWidth = 260;
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
linkMsgDetail() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/tabbar/home/title",
|
||||
});
|
||||
},
|
||||
fetchCoupon(){
|
||||
this.$refs.coupon.firstGetAuto();
|
||||
},
|
||||
@@ -245,7 +302,31 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.navbar-right {
|
||||
padding: 0 16rpx 0 0;
|
||||
@import "@/pages/tabbar/home/template/tpl.scss";
|
||||
|
||||
.navbar {
|
||||
width: 100%;
|
||||
|
||||
:deep(.u-navbar__content__left) {
|
||||
width: auto !important;
|
||||
padding: 0 0 0 $home-layout-padding !important;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-search-wrap {
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.navbar-message {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.message-icon {
|
||||
width: 53rpx;
|
||||
height: 53rpx;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
<view class="status_bar">
|
||||
<!-- 这里是状态栏 -->
|
||||
</view>
|
||||
<view class="header" @click="userDetail">
|
||||
<view class="header" @click="userDetail">
|
||||
<view class="head-1">
|
||||
<image :src="userInfo.face || userImage"></image>
|
||||
<image class="head-avatar" :src="userInfo.face || userImage"></image>
|
||||
</view>
|
||||
<view class="head-2" v-if="userInfo.id">
|
||||
<view class="user-name">{{ userInfo.nickName }}</view>
|
||||
@@ -14,57 +14,55 @@
|
||||
<view class="head-2" v-else>
|
||||
<view class="user-name">登录/注册</view>
|
||||
</view>
|
||||
<u-icon style="display: flex;align-items: flex-start;" name="arrow-right"></u-icon>
|
||||
<u-icon class="header-arrow" name="arrow-right"></u-icon>
|
||||
</view>
|
||||
<!-- 积分,优惠券,关注, -->
|
||||
<div class="pointBox box">
|
||||
<u-row text-align="center" gutter="16" class="point">
|
||||
<u-col text-align="center" span="4" @click="navigateTo('/pages/mine/deposit/operation')">
|
||||
<view>预存款</view>
|
||||
<view class="money">{{unitPrice(walletNum) }}</view>
|
||||
</u-col>
|
||||
|
||||
<u-col text-align="center" span="4" @click="navigateTo('/pages/cart/coupon/myCoupon')">
|
||||
<view>优惠券</view>
|
||||
<view>{{ couponNum || 0 }}</view>
|
||||
</u-col>
|
||||
|
||||
<u-col text-align="center" span="4" @click="navigateTo('/pages/mine/myTracks')">
|
||||
<view>足迹</view>
|
||||
<view>{{ footNum || 0 }}</view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
<view class="point">
|
||||
<view class="point-item" @click="navigateTo('/pages/mine/deposit/operation')">
|
||||
<view class="point-label">预存款</view>
|
||||
<view class="point-value money">{{ unitPrice(walletNum) }}</view>
|
||||
</view>
|
||||
<view class="point-item" @click="navigateTo('/pages/cart/coupon/myCoupon')">
|
||||
<view class="point-label">优惠券</view>
|
||||
<view class="point-value">{{ couponNum || 0 }}</view>
|
||||
</view>
|
||||
<view class="point-item" @click="navigateTo('/pages/mine/myTracks')">
|
||||
<view class="point-label">足迹</view>
|
||||
<view class="point-value">{{ footNum || 0 }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 我的订单,代付款 -->
|
||||
<view class="order">
|
||||
<view class="order-item" @click="navigateTo('/pages/order/myOrder?status=1')">
|
||||
<div class="bag bag2">
|
||||
<u-icon name="bag-fill" size="35" color="#fff"></u-icon>
|
||||
</div>
|
||||
<view>待付款</view>
|
||||
<view class="bag bag2">
|
||||
<u-icon name="bag-fill" size="22" color="#fff"></u-icon>
|
||||
</view>
|
||||
<view class="order-item-label">待付款</view>
|
||||
</view>
|
||||
<view class="order-item" @click="navigateTo('/pages/order/myOrder?status=3')">
|
||||
<div class="bag bag3">
|
||||
<u-icon name="car-fill" size="35" color="#fff"></u-icon>
|
||||
</div>
|
||||
<view>待收货</view>
|
||||
<view class="bag bag3">
|
||||
<u-icon name="car-fill" size="22" color="#fff"></u-icon>
|
||||
</view>
|
||||
<view class="order-item-label">待收货</view>
|
||||
</view>
|
||||
<view class="order-item" @click="navigateTo('/pages/order/evaluate/myEvaluate')">
|
||||
<div class="bag bag4">
|
||||
<u-icon name="star-fill" size="35" color="#fff"></u-icon>
|
||||
</div>
|
||||
<view>待评价</view>
|
||||
<view class="bag bag4">
|
||||
<u-icon name="star-fill" size="22" color="#fff"></u-icon>
|
||||
</view>
|
||||
<view class="order-item-label">待评价</view>
|
||||
</view>
|
||||
<view class="order-item" @click="navigateTo('/pages/order/afterSales/afterSales')">
|
||||
<div class="bag bag5">
|
||||
<u-icon name="server-fill" size="35" color="#fff"></u-icon>
|
||||
</div>
|
||||
<view>售后</view>
|
||||
<view class="bag bag5">
|
||||
<u-icon name="server-fill" size="22" color="#fff"></u-icon>
|
||||
</view>
|
||||
<view class="order-item-label">售后</view>
|
||||
</view>
|
||||
<view class="order-item" @click="navigateTo('/pages/order/myOrder?status=0')">
|
||||
<div class="bag bag1">
|
||||
<u-icon name="order" size="35" color="#fff"></u-icon>
|
||||
</div>
|
||||
<view>我的订单</view>
|
||||
<view class="bag bag1">
|
||||
<u-icon name="order" size="22" color="#fff"></u-icon>
|
||||
</view>
|
||||
<view class="order-item-label">我的订单</view>
|
||||
</view>
|
||||
</view>
|
||||
</div>
|
||||
@@ -179,21 +177,18 @@ body {
|
||||
background-repeat: no-repeat;
|
||||
color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.head-1 {
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
width: 152rpx;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
.head-avatar {
|
||||
width: 152rpx;
|
||||
height: 144rpx;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 30rpx;
|
||||
border: 3px solid #fff;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.edti-head {
|
||||
@@ -205,7 +200,7 @@ body {
|
||||
top: 100rpx;
|
||||
right: 0;
|
||||
|
||||
image {
|
||||
.head-avatar {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
@@ -215,13 +210,14 @@ body {
|
||||
.head-2 {
|
||||
flex: 1;
|
||||
margin-left: 30rpx;
|
||||
margin-top: 100rpx;
|
||||
line-height: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
::v-deep .u-icon,
|
||||
.u-icon {
|
||||
margin-top: 106rpx;
|
||||
.header-arrow {
|
||||
flex-shrink: 0;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,47 +230,53 @@ body {
|
||||
}
|
||||
|
||||
.point {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
height: 160rpx;
|
||||
|
||||
font-size: $font-sm;
|
||||
// #ifdef MP-WEIXIN
|
||||
padding: 24rpx;
|
||||
|
||||
// #endif
|
||||
.u-col {
|
||||
view {
|
||||
color: $u-main-color;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
view:last-child {
|
||||
margin-top: 8rpx;
|
||||
color: $main-color;
|
||||
font-size: $font-lg;
|
||||
}
|
||||
.point-item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.point-label {
|
||||
color: $u-main-color;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.point-value {
|
||||
margin-top: 8rpx;
|
||||
color: $main-color;
|
||||
font-size: $font-lg;
|
||||
}
|
||||
}
|
||||
|
||||
.order {
|
||||
height: 140rpx;
|
||||
text-align: center;
|
||||
font-size: $font-sm;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
padding: 0 3%;
|
||||
color: #999;
|
||||
|
||||
.order-item {
|
||||
position: relative;
|
||||
line-height: 2em;
|
||||
width: 96rpx;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
:first-child {
|
||||
font-size: 48rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.order-item-label {
|
||||
margin-top: 10rpx;
|
||||
line-height: 1.4;
|
||||
font-size: $font-sm;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -285,13 +287,18 @@ body {
|
||||
|
||||
.user-name {
|
||||
font-size: 34rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.bag {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
border-radius: 50%;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.bag1 {
|
||||
|
||||
@@ -6,51 +6,51 @@
|
||||
<div class="paddingBox">
|
||||
<view class="interact-container">
|
||||
<view class="interact-item" @click="navigateTo('/pages/mine/address/addressManage')">
|
||||
<image src="/static/mine/myaddress.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/myaddress.png" mode=""></image>
|
||||
<view>地址管理</view>
|
||||
</view>
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/mine/myTracks')">
|
||||
<image src="/static/mine/logistics.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/logistics.png" mode=""></image>
|
||||
<view>我的足迹</view>
|
||||
</view>
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/order/evaluate/myEvaluate')">
|
||||
<image src="/static/mine/feedback.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/feedback.png" mode=""></image>
|
||||
<view>我的评价</view>
|
||||
</view>
|
||||
<!-- <view class="interact-item" @click="linkMsgDetail()">
|
||||
<image src="/static/mine/mycommit.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/mycommit.png" mode=""></image>
|
||||
<view>我的消息</view>
|
||||
</view> -->
|
||||
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/mine/myCollect')">
|
||||
<image src="/static/mine/myfavorite.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/myfavorite.png" mode=""></image>
|
||||
<view>我的关注</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/mine/point/myPoint')">
|
||||
<image src="/static/mine/mypoint.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/mypoint.png" mode=""></image>
|
||||
<view>我的积分</view>
|
||||
</view>
|
||||
|
||||
<view class="interact-item" @click="distribution">
|
||||
<image src="/static/mine/distribution.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/distribution.png" mode=""></image>
|
||||
<view>我的分销</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/order/complain/complainList')">
|
||||
<image src="/static/mine/shensu.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/shensu.png" mode=""></image>
|
||||
<view>我的投诉</view>
|
||||
</view>
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/cart/coupon/myCoupon')">
|
||||
<image src="/static/mine/mycoupon.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/mycoupon.png" mode=""></image>
|
||||
<view>优惠券</view>
|
||||
</view>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/mine/signIn')">
|
||||
<image src="/static/mine/sign.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/sign.png" mode=""></image>
|
||||
<view>每日签到</view>
|
||||
</view>
|
||||
|
||||
@@ -68,41 +68,41 @@
|
||||
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/cart/coupon/couponCenter')">
|
||||
<image src="/static/mine/couponcenter.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/couponcenter.png" mode=""></image>
|
||||
<view>领券中心</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/promotion/bargain/log')">
|
||||
<image src="/static/mine/kanjia.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/kanjia.png" mode=""></image>
|
||||
<view>砍价记录</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/mine/set/feedBack')">
|
||||
<image src="/static/mine/feedback.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/feedback.png" mode=""></image>
|
||||
<view>意见反馈</view>
|
||||
</view>
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/mine/set/editionIntro')">
|
||||
<image src="/static/mine/pointgift.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/pointgift.png" mode=""></image>
|
||||
<view>关于</view>
|
||||
</view>
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/passport/entry/seller/index')">
|
||||
<image src="/static/mine/feedback.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/feedback.png" mode=""></image>
|
||||
<view>店铺入驻</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- <view class="interact-item" @click="inviter()">-->
|
||||
<!-- <image src="/static/mine/share.png" mode=""></image>-->
|
||||
<!-- <image class="interact-item-icon" src="/static/mine/share.png" mode=""></image>-->
|
||||
<!-- <view>邀新</view>-->
|
||||
<!-- </view>-->
|
||||
<view class="interact-item" @click="navigateTo('/pages/mine/set/setUp')">
|
||||
<image src="/static/mine/setting.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/setting.png" mode=""></image>
|
||||
<view>设置</view>
|
||||
</view>
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
<u-popup v-model:show="sharingShow" mode="bottom" border-radius="14">
|
||||
<view style="margin: 10px; text-align: center;"> 请邀请用户扫描二维码或者将地址复制转发给其他用户 </view>
|
||||
<view class='qrcode'>
|
||||
<uqrcode ref="uqrcode" canvas-id="qrcode" :value="sharingLink" :options="{ margin: 10 }">
|
||||
<uqrcode v-if="sharingLink" ref="uqrcode" canvas-id="qrcode" :value="sharingLink" :options="{ margin: 10 }">
|
||||
</uqrcode>
|
||||
</view>
|
||||
|
||||
@@ -253,17 +253,10 @@ export default {
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 4rpx 24rpx 0 rgba($color: #f6f6f6, $alpha: 1);
|
||||
|
||||
.interact-item-img {
|
||||
width: 52rpx !important;
|
||||
height: 52rpx !important;
|
||||
// margin-bottom: !important;
|
||||
margin: 0 auto 6rpx auto !important;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
margin-bottom: 6rpx;
|
||||
.interact-item-icon {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
display: flex;
|
||||
@@ -272,10 +265,17 @@ export default {
|
||||
text-align: center;
|
||||
|
||||
.interact-item {
|
||||
font-size: $font-sm;
|
||||
font-size: 24rpx;
|
||||
width: 25%;
|
||||
height: 160rpx;
|
||||
padding: 30rpx;
|
||||
flex: 0 0 25%;
|
||||
box-sizing: border-box;
|
||||
height: 150rpx;
|
||||
padding: 20rpx 8rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user