Branch_ccc #10

Merged
root merged 22 commits from Branch_ccc into master 2024-11-13 11:11:55 +08:00
15 changed files with 723 additions and 722 deletions
Showing only changes of commit 4c2de20b28 - Show all commits

View File

@ -1,6 +1,7 @@
<!-- 订单详情 --> <!-- 订单详情 -->
<template> <template>
<s-layout title="订单详情" class="index-wrap" navbar="normal"> <s-layout title="订单详情" navbar="normal">
<view class="new-overflow">
<!-- 订单状态 TODO --> <!-- 订单状态 TODO -->
<!-- <view class="state-box ss-col-center new-class" :style="[ <!-- <view class="state-box ss-col-center new-class" :style="[
{ {
@ -21,11 +22,13 @@
</image> </image>
<!-- 待评价 --> <!-- 待评价 -->
<image v-if=" state.orderInfo.status === 30 && state.orderInfo.buttons?.includes('comment')" class="state-img" <image v-if=" state.orderInfo.status === 30 && state.orderInfo.buttons?.includes('comment')"
class="state-img"
src="https://zysc.fjptzykj.com:3000/shangcheng/b729e67ba7b6039676a43b28ca855228ed82914f7669482b938e9696ed9cc798.png"> src="https://zysc.fjptzykj.com:3000/shangcheng/b729e67ba7b6039676a43b28ca855228ed82914f7669482b938e9696ed9cc798.png">
</image> </image>
<!-- 已完成 --> <!-- 已完成 -->
<image v-if=" state.orderInfo.status === 30 && !state.orderInfo.buttons?.includes('comment')" class="state-img" <image v-if=" state.orderInfo.status === 30 && !state.orderInfo.buttons?.includes('comment')"
class="state-img"
src="https://zysc.fjptzykj.com:3000/shangcheng/7b1b2022173b3b6812ad256c836b4c5c67b6aa63a203c7d142ae90802a416e7b.png"> src="https://zysc.fjptzykj.com:3000/shangcheng/7b1b2022173b3b6812ad256c836b4c5c67b6aa63a203c7d142ae90802a416e7b.png">
</image> </image>
@ -81,8 +84,8 @@
<view class="order-list" v-for="item in state.orderInfo.items" :key="item.goods_id"> <view class="order-list" v-for="item in state.orderInfo.items" :key="item.goods_id">
<view class="order-card"> <view class="order-card">
<s-goods-item @tap="onGoodsDetail(item.spuId)" :img="item.picUrl" :title="item.spuName" <s-goods-item @tap="onGoodsDetail(item.spuId)" :img="item.picUrl" :title="item.spuName"
:skuText="item.properties.map((property) => property.valueName).join(' ')" :price="item.price" :skuText="item.properties.map((property) => property.valueName).join(' ')"
:num="item.count"> :price="item.price" :num="item.count">
<template #tool> <template #tool>
<view class="ss-flex"> <view class="ss-flex">
<button class="ss-reset-button apply-btn" <button class="ss-reset-button apply-btn"
@ -95,14 +98,16 @@
"> ">
申请售后 申请售后
</button> </button>
<button class="ss-reset-button apply-btn" v-if="item.afterSaleStatus === 10" @tap.stop=" <button class="ss-reset-button apply-btn" v-if="item.afterSaleStatus === 10"
@tap.stop="
sheep.$router.go('/pages/order/aftersale/detail', { sheep.$router.go('/pages/order/aftersale/detail', {
id: item.afterSaleId, id: item.afterSaleId,
}) })
"> ">
退款中 退款中
</button> </button>
<button class="ss-reset-button apply-btn" v-if="item.afterSaleStatus === 20" @tap.stop=" <button class="ss-reset-button apply-btn" v-if="item.afterSaleStatus === 20"
@tap.stop="
sheep.$router.go('/pages/order/aftersale/detail', { sheep.$router.go('/pages/order/aftersale/detail', {
id: item.afterSaleId, id: item.afterSaleId,
}) })
@ -204,7 +209,8 @@
v-if="state.orderInfo.buttons?.includes('pay')" @tap="onPay(state.orderInfo.payOrderId)"> v-if="state.orderInfo.buttons?.includes('pay')" @tap="onPay(state.orderInfo.payOrderId)">
继续支付 继续支付
</button> </button>
<button class="ss-reset-button cancel-btn" v-if="state.orderInfo.buttons?.includes('combination')" @tap=" <button class="ss-reset-button cancel-btn" v-if="state.orderInfo.buttons?.includes('combination')"
@tap="
sheep.$router.go('/pages/activity/groupon/detail', { sheep.$router.go('/pages/activity/groupon/detail', {
id: state.orderInfo.combinationRecordId, id: state.orderInfo.combinationRecordId,
}) })
@ -225,6 +231,8 @@
</button> </button>
</view> </view>
</su-fixed> </su-fixed>
</view>
</s-layout> </s-layout>
</template> </template>
@ -263,11 +271,9 @@
title: '待发货' title: '待发货'
}, { }, {
title: '待收货' title: '待收货'
} }, {
, {
title: '待评价' title: '待评价'
} }, {
, {
title: '已完成' title: '已完成'
}], // }], //
active: 0 active: 0
@ -458,11 +464,15 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.new-overflow{
overflow: hidden;
}
.new-class { .new-class {
display: flex; display: flex;
// justify-content: center; // justify-content: center;
padding: 11px 29px; padding: 11px 29px;
} }
.new-address { .new-address {
padding-top: 30px; padding-top: 30px;
padding-left: 15px; padding-left: 15px;
@ -486,7 +496,7 @@
.state-box { .state-box {
color: rgba(#fff, 0.9); color: rgba(#fff, 0.9);
width: 100%; // width: 100%;
// background: v-bind(headerBg) no-repeat, // background: v-bind(headerBg) no-repeat,
// linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient)); // linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
background: rgba(214, 68, 49); background: rgba(214, 68, 49);

View File

@ -2,21 +2,12 @@
<template> <template>
<s-layout title="我的订单"> <s-layout title="我的订单">
<su-sticky bgColor="#fff"> <su-sticky bgColor="#fff">
<su-tabs <su-tabs :list="tabMaps" :scrollable="false" @change="onTabsChange" :current="state.currentTab" />
:list="tabMaps"
:scrollable="false"
@change="onTabsChange"
:current="state.currentTab"
/>
</su-sticky> </su-sticky>
<s-empty v-if="state.pagination.total === 0" icon="/static/order-empty.png" text="暂无订单" /> <s-empty v-if="state.pagination.total === 0" icon="/static/order-empty.png" text="暂无订单" />
<view v-if="state.pagination.total > 0"> <view v-if="state.pagination.total > 0">
<view <view class="bg-white order-list-card-box ss-r-10 ss-m-t-14 ss-m-20" v-for="order in state.pagination.list"
class="bg-white order-list-card-box ss-r-10 ss-m-t-14 ss-m-20" :key="order.id" @tap="onOrderDetail(order.id)">
v-for="order in state.pagination.list"
:key="order.id"
@tap="onOrderDetail(order.id)"
>
<view class="order-card-header ss-flex ss-col-center ss-row-between ss-p-x-20"> <view class="order-card-header ss-flex ss-col-center ss-row-between ss-p-x-20">
<view class="order-no">订单号{{ order.no }}</view> <view class="order-no">订单号{{ order.no }}</view>
<view class="order-state ss-font-26" :class="formatOrderColor(order)"> <view class="order-state ss-font-26" :class="formatOrderColor(order)">
@ -24,81 +15,49 @@
</view> </view>
</view> </view>
<view class="border-bottom" v-for="item in order.items" :key="item.id"> <view class="border-bottom" v-for="item in order.items" :key="item.id">
<s-goods-item <s-goods-item :img="item.picUrl" :title="item.spuName"
:img="item.picUrl" :skuText="item.properties.map((property) => property.valueName).join(' ')" :price="item.price"
:title="item.spuName" :num="item.count" />
:skuText="item.properties.map((property) => property.valueName).join(' ')"
:price="item.price"
:num="item.count"
/>
</view> </view>
<view class="pay-box ss-m-t-30 ss-flex ss-row-right ss-p-r-20"> <view class="pay-box ss-m-t-30 ss-flex ss-row-right ss-p-r-20">
<view class="ss-flex ss-col-center"> <view class="ss-flex ss-col-center">
<view class="discounts-title pay-color" <view class="discounts-title pay-color"> {{ order.productCount }} 件商品,总金额:</view>
> {{ order.productCount }} 件商品,总金额:</view
>
<view class="discounts-money pay-color"> {{ fen2yuan(order.payPrice) }} </view> <view class="discounts-money pay-color"> {{ fen2yuan(order.payPrice) }} </view>
</view> </view>
</view> </view>
<view <view class="order-card-footer ss-flex ss-col-center ss-p-x-20"
class="order-card-footer ss-flex ss-col-center ss-p-x-20" :class="order.buttons.length > 3 ? 'ss-row-between' : 'ss-row-right'">
:class="order.buttons.length > 3 ? 'ss-row-between' : 'ss-row-right'"
>
<view class="ss-flex ss-col-center"> <view class="ss-flex ss-col-center">
<button <button v-if="order.buttons.includes('combination')" class="tool-btn ss-reset-button"
v-if="order.buttons.includes('combination')" @tap.stop="onOrderGroupon(order)">
class="tool-btn ss-reset-button"
@tap.stop="onOrderGroupon(order)"
>
拼团详情 拼团详情
</button> </button>
<button <button v-if="order.buttons.length === 0" class="tool-btn ss-reset-button"
v-if="order.buttons.length === 0" @tap.stop="onOrderDetail(order.id)">
class="tool-btn ss-reset-button"
@tap.stop="onOrderDetail(order.id)"
>
查看详情 查看详情
</button> </button>
<button <button v-if="order.buttons.includes('confirm')" class="tool-btn ss-reset-button"
v-if="order.buttons.includes('confirm')" @tap.stop="onConfirm(order)">
class="tool-btn ss-reset-button"
@tap.stop="onConfirm(order)"
>
确认收货 确认收货
</button> </button>
<button <button v-if="order.buttons.includes('express')" class="tool-btn ss-reset-button"
v-if="order.buttons.includes('express')" @tap.stop="onExpress(order.id)">
class="tool-btn ss-reset-button"
@tap.stop="onExpress(order.id)"
>
查看物流 查看物流
</button> </button>
<button <button v-if="order.buttons.includes('cancel')" class="tool-btn ss-reset-button"
v-if="order.buttons.includes('cancel')" @tap.stop="onCancel(order.id)">
class="tool-btn ss-reset-button"
@tap.stop="onCancel(order.id)"
>
取消订单 取消订单
</button> </button>
<button <button v-if="order.buttons.includes('comment')" class="tool-btn ss-reset-button"
v-if="order.buttons.includes('comment')" @tap.stop="onComment(order.id)">
class="tool-btn ss-reset-button"
@tap.stop="onComment(order.id)"
>
评价 评价
</button> </button>
<button <button v-if="order.buttons.includes('delete')" class="delete-btn ss-reset-button"
v-if="order.buttons.includes('delete')" @tap.stop="onDelete(order.id)">
class="delete-btn ss-reset-button"
@tap.stop="onDelete(order.id)"
>
删除订单 删除订单
</button> </button>
<button <button v-if="order.buttons.includes('pay')"
v-if="order.buttons.includes('pay')" class="tool-btn ss-reset-button ui-BG-Main-Gradient" @tap.stop="onPay(order.payOrderId)">
class="tool-btn ss-reset-button ui-BG-Main-Gradient"
@tap.stop="onPay(order.payOrderId)"
>
继续支付 继续支付
</button> </button>
</view> </view>
@ -107,20 +66,21 @@
</view> </view>
<!-- 加载更多 --> <!-- 加载更多 -->
<uni-load-more <uni-load-more v-if="state.pagination.total > 0" :status="state.loadStatus" :content-text="{
v-if="state.pagination.total > 0"
:status="state.loadStatus"
:content-text="{
contentdown: '上拉加载更多', contentdown: '上拉加载更多',
}" }" @tap="loadMore" />
@tap="loadMore"
/>
</s-layout> </s-layout>
</template> </template>
<script setup> <script setup>
import { reactive } from 'vue'; import {
import { onLoad, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'; reactive
} from 'vue';
import {
onLoad,
onReachBottom,
onPullDownRefresh
} from '@dcloudio/uni-app';
import { import {
fen2yuan, fen2yuan,
formatOrderColor, formatOrderColor,
@ -129,9 +89,13 @@
} from '@/sheep/hooks/useGoods'; } from '@/sheep/hooks/useGoods';
import sheep from '@/sheep'; import sheep from '@/sheep';
import _ from 'lodash'; import _ from 'lodash';
import { isEmpty } from 'lodash'; import {
isEmpty
} from 'lodash';
import OrderApi from '@/sheep/api/trade/order'; import OrderApi from '@/sheep/api/trade/order';
import { resetPagination } from '@/sheep/util'; import {
resetPagination
} from '@/sheep/util';
// //
const state = reactive({ const state = reactive({
@ -145,8 +109,7 @@
loadStatus: '', loadStatus: '',
}); });
const tabMaps = [ const tabMaps = [{
{
name: '全部', name: '全部',
}, },
{ {
@ -224,7 +187,9 @@
} }
// //
const { code } = await OrderApi.receiveOrder(order.id); const {
code
} = await OrderApi.receiveOrder(order.id);
if (code === 0) { if (code === 0) {
resetPagination(state.pagination); resetPagination(state.pagination);
await getOrderList(); await getOrderList();
@ -279,7 +244,9 @@
if (!res.confirm) { if (!res.confirm) {
return; return;
} }
const { code } = await OrderApi.cancelOrder(orderId); const {
code
} = await OrderApi.cancelOrder(orderId);
if (code === 0) { if (code === 0) {
// //
let index = state.pagination.list.findIndex((order) => order.id === orderId); let index = state.pagination.list.findIndex((order) => order.id === orderId);
@ -298,7 +265,9 @@
content: '确定要删除订单吗?', content: '确定要删除订单吗?',
success: async function(res) { success: async function(res) {
if (res.confirm) { if (res.confirm) {
const { code } = await OrderApi.deleteOrder(orderId); const {
code
} = await OrderApi.deleteOrder(orderId);
if (code === 0) { if (code === 0) {
// //
let index = state.pagination.list.findIndex((order) => order.id === orderId); let index = state.pagination.list.findIndex((order) => order.id === orderId);
@ -312,7 +281,10 @@
// //
async function getOrderList() { async function getOrderList() {
state.loadStatus = 'loading'; state.loadStatus = 'loading';
let { code, data } = await OrderApi.getOrderPage({ let {
code,
data
} = await OrderApi.getOrderPage({
pageNo: state.pagination.pageNo, pageNo: state.pagination.pageNo,
pageSize: state.pagination.pageSize, pageSize: state.pagination.pageSize,
status: tabMaps[state.currentTab].value, status: tabMaps[state.currentTab].value,
@ -421,8 +393,7 @@
font-weight: 500; font-weight: 500;
} }
.order-state { .order-state {}
}
} }
.pay-box { .pay-box {

View File

@ -51,7 +51,7 @@
<image @tap.stop="showMaoLocation(item)" style="margin-right:10px;" <image @tap.stop="showMaoLocation(item)" style="margin-right:10px;"
src="https://zysc.fjptzykj.com:3000/shangcheng/c7362f85726ef0030b407f1c3749c710ca0caa51fee5cc8ffbb64e11226354a8.png" src="https://zysc.fjptzykj.com:3000/shangcheng/c7362f85726ef0030b407f1c3749c710ca0caa51fee5cc8ffbb64e11226354a8.png"
class="img"></image> class="img"></image>
<image @click="call(item.phone)" <image @click.stop="call(item.phone)"
src="https://zysc.fjptzykj.com:3000/shangcheng/535ee6f79e04d4b6e46fcfa59ed052f214ad6ab756c340c0c040e68357f68e9a.png" src="https://zysc.fjptzykj.com:3000/shangcheng/535ee6f79e04d4b6e46fcfa59ed052f214ad6ab756c340c0c040e68357f68e9a.png"
class="img"></image> class="img"></image>
</view> </view>

View File

@ -134,6 +134,7 @@
</view> </view>
</view> </view>
<!-- <navigator class="button" hover-class="none" open-type='switchTab'>去获取</navigator> --> <!-- <navigator class="button" hover-class="none" open-type='switchTab'>去获取</navigator> -->
<view class="button" @click="sheep.$router.redirect('/pages/index/category')">去获取</view>
</view> </view>
</view> </view>
</view> </view>

View File

@ -67,7 +67,7 @@
:class="valVip == index ? 'on' : ''" v-for="(item,index) in vipList" :key="index"> :class="valVip == index ? 'on' : ''" v-for="(item,index) in vipList" :key="index">
<view class="t">{{item.name}}</view> <view class="t">{{item.name}}</view>
<view class="c"><text class="tx">{{item.specialPrice}}</text></view> <view class="c"><text class="tx">{{item.specialPrice}}</text></view>
<view class="b" v-if="index==0">试用1天</view> <view class="b" v-if="item.name=='试用'">试用1天</view>
<view class="b sc" v-else>{{item.originalPrice}}</view> <view class="b sc" v-else>{{item.originalPrice}}</view>
</view> </view>
</scroll-view> </scroll-view>

View File

@ -70,8 +70,8 @@
<view v-if="type === 'UserOrder'" class="new-huiy" @click=" <view v-if="type === 'UserOrder'" class="new-huiy" @click="
sheep.$router.go('/pages/user/user_vip/list') sheep.$router.go('/pages/user/user_vip/list')
"> ">
<view class="new-button" v-if="userInfo.activate">已开通</view> <view class="new-button" v-if="userInfo.activate && userInfo.activate != 4">已开通</view>
<view class="new-button" v-if="userInfo.activate == 0">立即开通</view> <view class="new-button" v-if="userInfo.activate == 0 || userInfo.activate == 4">立即开通</view>
<image class="seckill1" mode="aspectFit" <image class="seckill1" mode="aspectFit"
src="https://zysc.fjptzykj.com:3000/shangcheng/64776e2edc3c2f15295e7c3976ba301e08f9170f99a2e845d8f33bd65179b177.png" /> src="https://zysc.fjptzykj.com:3000/shangcheng/64776e2edc3c2f15295e7c3976ba301e08f9170f99a2e845d8f33bd65179b177.png" />
</view> </view>

View File

@ -43,16 +43,16 @@
<view v-if="layoutType === LayoutTypeEnum.TWO_COL && state.goodsList.length" <view v-if="layoutType === LayoutTypeEnum.TWO_COL && state.goodsList.length"
class="goods-md-wrap ss-flex ss-flex-wrap ss-col-top"> class="goods-md-wrap ss-flex ss-flex-wrap ss-col-top">
<view class="goods-list-box"> <view class="goods-list-box">
<!-- <view class="left-list" :style="[{ paddingRight: data.space + 'rpx', marginBottom: data.space + 'px' }]"
v-for="item in state.leftGoodsList" :key="item.id"> -->
<view class="left-list" :style="[{ paddingRight: data.space + 'rpx', marginBottom: data.space + 'px' }]" <view class="left-list" :style="[{ paddingRight: data.space + 'rpx', marginBottom: data.space + 'px' }]"
v-for="item in state.goodsList" :key="item.id"> v-for="item in state.leftGoodsList" :key="item.id">
<!-- <view class="left-list" :style="[{ paddingRight: data.space + 'rpx', marginBottom: data.space + 'px' }]"
v-for="item in state.goodsList" :key="item.id"> -->
<s-goods-column class="goods-md-box" size="md" :goodsFields="data.fields" :tagStyle="data.badge" <s-goods-column class="goods-md-box" size="md" :goodsFields="data.fields" :tagStyle="data.badge"
:data="item" :titleColor="data.fields.name?.color" :data="item" :titleColor="data.fields.name?.color"
:subTitleColor="data.fields.introduction.color" :topRadius="data.borderRadiusTop" :subTitleColor="data.fields.introduction.color" :topRadius="data.borderRadiusTop"
:bottomRadius="data.borderRadiusBottom" :titleWidth="330 - marginLeft - marginRight" :bottomRadius="data.borderRadiusBottom" :titleWidth="330 - marginLeft - marginRight"
@click="sheep.$router.go('/pages/goods/index', { id: item.id })" @click="sheep.$router.go('/pages/goods/index', { id: item.id })"
@getHeight="calculateGoodsColumn($event, 'left')"> >
<!-- 购买按钮 --> <!-- 购买按钮 -->
<template v-slot:cart> <template v-slot:cart>
<button class="ss-reset-button cart-btn" :style="[buyStyle]"> <button class="ss-reset-button cart-btn" :style="[buyStyle]">
@ -62,7 +62,7 @@
</s-goods-column> </s-goods-column>
</view> </view>
</view> </view>
<!-- <view class="goods-list-box"> <view class="goods-list-box">
<view class="right-list" :style="[{ paddingLeft: data.space + 'rpx', marginBottom: data.space + 'px' }]" <view class="right-list" :style="[{ paddingLeft: data.space + 'rpx', marginBottom: data.space + 'px' }]"
v-for="item in state.rightGoodsList" :key="item.id"> v-for="item in state.rightGoodsList" :key="item.id">
<s-goods-column class="goods-md-box" size="md" :goodsFields="data.fields" :tagStyle="data.badge" <s-goods-column class="goods-md-box" size="md" :goodsFields="data.fields" :tagStyle="data.badge"
@ -70,7 +70,7 @@
:subTitleColor="data.fields.introduction.color" :topRadius="data.borderRadiusTop" :subTitleColor="data.fields.introduction.color" :topRadius="data.borderRadiusTop"
:bottomRadius="data.borderRadiusBottom" :titleWidth="330 - marginLeft - marginRight" :bottomRadius="data.borderRadiusBottom" :titleWidth="330 - marginLeft - marginRight"
@click="sheep.$router.go('/pages/goods/index', { id: item.id })" @click="sheep.$router.go('/pages/goods/index', { id: item.id })"
@getHeight="calculateGoodsColumn($event, 'right')"> >
<template v-slot:cart> <template v-slot:cart>
<button class="ss-reset-button cart-btn" :style="[buyStyle]"> <button class="ss-reset-button cart-btn" :style="[buyStyle]">
{{ btnBuy.type === 'text' ? btnBuy.text : '' }} {{ btnBuy.type === 'text' ? btnBuy.text : '' }}
@ -78,7 +78,7 @@
</template> </template>
</s-goods-column> </s-goods-column>
</view> </view>
</view> --> </view>
</view> </view>
<!-- 布局3. 单列小图左图右内容 --> <!-- 布局3. 单列小图左图右内容 -->
@ -135,7 +135,8 @@
goodsList: [], goodsList: [],
leftGoodsList: [], leftGoodsList: [],
rightGoodsList: [], rightGoodsList: [],
isShow:'recommendNew' isShow:'recommendNew',
count:0
}); });
const props = defineProps({ const props = defineProps({
data: { data: {
@ -183,7 +184,7 @@
//region //region
// //
let count = 3; // let count = 0;
// //
let leftHeight = 0; let leftHeight = 0;
// //
@ -194,20 +195,22 @@
* @param height 商品的高度 * @param height 商品的高度
* @param where 添加到哪一列 * @param where 添加到哪一列
*/ */
function calculateGoodsColumn(height = 0, where = 'left') { function calculateGoodsColumn() {
// //
if (!state.goodsList[count]) return; // if (!state.goodsList[state.count]) return;
// //
if (where === 'left') leftHeight += height; // if (where === 'left') leftHeight += height;
if (where === 'right') rightHeight += height; // if (where === 'right') rightHeight += height;
// //
if (leftHeight <= rightHeight) { if (state.count % 2 == 0) {
state.leftGoodsList.push(state.goodsList[count]); state.leftGoodsList.push(state.goodsList[state.count]);
} else { } else {
state.rightGoodsList.push(state.goodsList[count]); state.rightGoodsList.push(state.goodsList[state.count]);
} }
// console.log();
// //
count++; state.count++;
} }
//endregion //endregion
@ -240,20 +243,25 @@
}, },
}).then((res) => { }).then((res) => {
// //
count=0;
leftHeight = 0; leftHeight = 0;
rightHeight = 0; rightHeight = 0;
state.goodsList = []; // state.goodsList = [];
state.goodsList = res.data; state.goodsList = res.data;
state.count = 0
// console.log(state.goodsList,"-----state.goodsList")
state.leftGoodsList = [] state.leftGoodsList = []
state.rightGoodsList = [] state.rightGoodsList = []
//
res.data.forEach((item) => {
calculateGoodsColumn(); calculateGoodsColumn();
}); });
});
} }
// //
onMounted(async () => { onMounted(async () => {
if(props.fl){ if(props.fl){
classValue("recommendNew");
} }
// //
if(!props.fl){ if(!props.fl){
@ -263,9 +271,12 @@
// //
calculateGoodsColumn(); calculateGoodsColumn();
} }
}else{
classValue("recommendNew");
} }
}); });
</script> </script>
@ -305,18 +316,16 @@
} }
} }
.goods-md-wrap { // .goods-md-wrap {
width: 100%; // width: 100%;
} // }
.goods-list-box { .goods-list-box {
width: 100%; width: 50%;
box-sizing: border-box; box-sizing: border-box;
::v-deep &{ ::v-deep &{
display:flex; .left-list, .right-list{
flex-wrap:wrap; // width:48%;
.left-list{
width:48%;
} }
.left-list:nth-child(3n+2){ .left-list:nth-child(3n+2){
margin-right:0; margin-right:0;

View File

@ -369,7 +369,7 @@
import { import {
PromotionActivityTypeEnum PromotionActivityTypeEnum
} from '@/sheep/util/const'; } from '@/sheep/util/const';
console.log(PromotionActivityTypeEnum,"PromotionActivityTypeEnum") // console.log(PromotionActivityTypeEnum,"PromotionActivityTypeEnum")
// //
const props = defineProps({ const props = defineProps({
goodsFields: { goodsFields: {

View File

@ -147,7 +147,7 @@
data: activity data: activity
} = await CombinationApi.getCombinationActivity(props.data.activityId); } = await CombinationApi.getCombinationActivity(props.data.activityId);
const ss = await SpuApi.getSpulist(); const ss = await SpuApi.getSpulist();
console.log(ss, "getSpuListByIds") // console.log(ss, "getSpuListByIds")
productList.value = ss.data; productList.value = ss.data;
}); });
</script> </script>

View File

@ -211,7 +211,7 @@
// const { data: activity } = await SeckillApi.getSeckillActivity(props.data.activityId); // const { data: activity } = await SeckillApi.getSeckillActivity(props.data.activityId);
// const { data: spu } = await SpuApi.getSpuDetail(activity.spuId); // const { data: spu } = await SpuApi.getSpuDetail(activity.spuId);
const data = await SpuApi.getSpuSeckilllist(); const data = await SpuApi.getSpuSeckilllist();
console.log(data,"datadatadatadatadatadatadatadata") // console.log(data,"datadatadatadatadatadatadatadata")
productList.value = data.data; productList.value = data.data;
}); });

View File

@ -1,15 +1,16 @@
<!-- 海报弹窗 --> <!-- 海报弹窗 -->
<template> <template>
<su-popup :show="show" round="10" @close="onClosePoster" type="center" class="popup-box"> <su-popup :show="show" round="10" @close="onClosePoster" type="center" class="popup-box">
<view class="ss-flex-col ss-col-center ss-row-center"> <view class="ss-flex-col ss-col-center ss-row-center"
:style="{
height: poster.css.height + 'px',
width: poster.css.width + 'px',
}">
<image <image
v-if="!!painterImageUrl" v-if="!!painterImageUrl"
class="poster-img" class="poster-img"
:src="painterImageUrl" :src="painterImageUrl"
:style="{
height: poster.css.height + 'px',
width: poster.css.width + 'px',
}"
:show-menu-by-longpress="true" :show-menu-by-longpress="true"
/> />
</view> </view>
@ -17,7 +18,6 @@
class="poster-btn-box ss-m-t-20 ss-flex ss-row-between ss-col-center" class="poster-btn-box ss-m-t-20 ss-flex ss-row-between ss-col-center"
v-if="!!painterImageUrl" v-if="!!painterImageUrl"
> >
<button class="cancel-btn ss-reset-button" @tap="onClosePoster">取消</button>
<button class="save-btn ss-reset-button ui-BG-Main" @tap="onSavePoster"> <button class="save-btn ss-reset-button ui-BG-Main" @tap="onSavePoster">
{{ {{
['wechatOfficialAccount', 'H5'].includes(sheep.$platform.name) ['wechatOfficialAccount', 'H5'].includes(sheep.$platform.name)
@ -25,6 +25,7 @@
: '保存图片' : '保存图片'
}} }}
</button> </button>
<button class="cancel-btn ss-reset-button" @tap="onClosePoster">取消</button>
</view> </view>
<!-- 海报画板默认隐藏只用来生成海报生成方式为主动调用 --> <!-- 海报画板默认隐藏只用来生成海报生成方式为主动调用 -->
<l-painter <l-painter
@ -65,6 +66,7 @@
css: { css: {
// //
width: sheep.$platform.device.windowWidth * 0.9, width: sheep.$platform.device.windowWidth * 0.9,
// width: 1 * 0.9,
height: 550, height: 550,
}, },
views: [], views: [],
@ -137,10 +139,11 @@
position: absolute; position: absolute;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
bottom: -80rpx; bottom: -172rpx;
flex-wrap: wrap;
.cancel-btn { .cancel-btn {
width: 240rpx; width: 100%;
height: 70rpx; height: 70rpx;
line-height: 70rpx; line-height: 70rpx;
background: $white; background: $white;
@ -148,10 +151,11 @@
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
color: $dark-9; color: $dark-9;
margin-top:10px;
} }
.save-btn { .save-btn {
width: 240rpx; width: 100%;
height: 70rpx; height: 70rpx;
line-height: 70rpx; line-height: 70rpx;
border-radius: 35rpx; border-radius: 35rpx;
@ -162,5 +166,7 @@
.poster-img { .poster-img {
border-radius: 20rpx; border-radius: 20rpx;
width: 100%;
height:100%;
} }
</style> </style>

View File

@ -10,14 +10,14 @@
? sheep.$url.cdn(userInfo.avatar) ? sheep.$url.cdn(userInfo.avatar)
: defaultAvatar : defaultAvatar
" mode="aspectFill" @tap="sheep.$router.go('/pages/user/info')"></image> " mode="aspectFill" @tap="sheep.$router.go('/pages/user/info')"></image>
<image v-if="userInfo.activate" class="vipCard" <image v-if="userInfo.activate && userInfo.activate != 4" class="vipCard"
src="https://zysc.fjptzykj.com:3000/shangcheng/8064149c53fe05f8d20263fba31992da2d24a751877a4ddcc696d7f53b5cc771.png"> src="https://zysc.fjptzykj.com:3000/shangcheng/8064149c53fe05f8d20263fba31992da2d24a751877a4ddcc696d7f53b5cc771.png">
</image> </image>
</view> </view>
<view style="z-index:22222;"> <view style="z-index:22222;">
<view class="nickname-box ss-flex ss-col-center"> <view class="nickname-box ss-flex ss-col-center">
<view class="nick-name ss-m-r-20">{{ userInfo?.nickname || nickname }}</view> <view class="nick-name ss-m-r-20">{{ userInfo?.nickname || nickname }}</view>
<view class="vipImg" v-if="userInfo.activate"> <view class="vipImg" v-if="userInfo.activate && userInfo.activate != 4">
<image class="img" <image class="img"
src="https://zysc.fjptzykj.com:3000/shangcheng/0419db3d6a991486176256374c05c2834006fd42b3f5f80e3ff385b027b7c34f.png" /> src="https://zysc.fjptzykj.com:3000/shangcheng/0419db3d6a991486176256374c05c2834006fd42b3f5f80e3ff385b027b7c34f.png" />
</view> </view>
@ -37,13 +37,13 @@
</view> </view>
</view> </view>
<!-- 提示绑定手机号 先隐藏 yudao 需要再修改 --> <!-- 提示绑定手机号 先隐藏 yudao 需要再修改 -->
<view class="bind-mobile-box ss-flex ss-row-between ss-col-center" v-if="isLogin && !userInfo.mobile"> <!-- <view class="bind-mobile-box ss-flex ss-row-between ss-col-center" v-if="isLogin && !userInfo.mobile">
<view class="ss-flex"> <view class="ss-flex">
<text class="cicon-mobile-o" /> <text class="cicon-mobile-o" />
<view class="mobile-title ss-m-l-20"> 点击绑定手机号确保账户安全 </view> <view class="mobile-title ss-m-l-20"> 点击绑定手机号确保账户安全 </view>
</view> </view>
<button class="ss-reset-button bind-btn" @tap="onBind">去绑定</button> <button class="ss-reset-button bind-btn" @tap="onBind">去绑定</button>
</view> </view> -->
</view> </view>
</template> </template>

View File

@ -74,7 +74,7 @@ const app = defineStore({
methods: ['poster', 'link'], methods: ['poster', 'link'],
linkAddress: 'http://127.0.0.1:3000', // TODO 芋艿:可以考虑改到 .env 那 linkAddress: 'http://127.0.0.1:3000', // TODO 芋艿:可以考虑改到 .env 那
posterInfo: { posterInfo: {
user_bg: '/shangcheng/user-poster-bg.png', user_bg: '/shangcheng/baa4f41883b4bb8880ff83281f258418281ea0383c505001300ca2953299db8a.png',
goods_bg: '/shangcheng/goods-poster-bg.png', goods_bg: '/shangcheng/goods-poster-bg.png',
groupon_bg: '/shangcheng/groupon-poster-bg.png', groupon_bg: '/shangcheng/groupon-poster-bg.png',
}, },

View File

@ -339,7 +339,11 @@ by ZXLee
</script> </script>
<script src="./js/z-paging-main.js" /> <script src="./js/z-paging-main.js" />
<style scoped> <style scoped lang="scss">
@import "./css/z-paging-main.css"; @import "./css/z-paging-main.css";
@import "./css/z-paging-static.css"; @import "./css/z-paging-static.css";
.zp-list-cell{
padding: 0 15px;
}
</style> </style>