绿满眶商城微信小程序-uniapp
bug
zhanghua
2025-05-28 555b592bfc02faedb307ef1be2174bce176c41c5
bug
2个文件已修改
66 ■■■■■ 已修改文件
pages/goods-manager/addGoods/addGoods.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/goods-manager/goodsList/goodsList.vue 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/goods-manager/addGoods/addGoods.vue
@@ -57,9 +57,22 @@
</template>
<script>
import UForm from '@/uview-components/uview-ui/components/u-form/u-form.vue';
import UFormItem from '@/uview-components/uview-ui/components/u-form-item/u-form-item.vue';
import UInput from '@/uview-components/uview-ui/components/u-input/u-input.vue';
import UUpload from '@/uview-components/uview-ui/components/u-upload/u-upload.vue';
import UCheckboxGroup from '@/uview-components/uview-ui/components/u-checkbox-group/u-checkbox-group.vue';
import UCheckbox from '@/uview-components/uview-ui/components/u-checkbox/u-checkbox.vue';
import UIcon from '@/uview-components/uview-ui/components/u-icon/u-icon.vue';
import UActionSheet from '@/uview-components/uview-ui/components/u-action-sheet/u-action-sheet.vue';
import storage from "@/utils/storage.js";
export default {
    components: { UForm, UFormItem, UInput, UUpload, UCheckboxGroup, UCheckbox, UIcon, UActionSheet },
    data() {
        return {
            storage,
            form: {}
        }
    },
pages/goods-manager/goodsList/goodsList.vue
@@ -7,41 +7,38 @@
                <view :border="!formData.waterfall" class="uni-list-item--waterfall" title="自定义商品列表"
                    v-for="item in data" :key="item.id" @click="addGoods(item.id)">
                    <!-- 通过header插槽定义列表左侧图片 -->
                    <template v-slot:header>
                        <view class="uni-thumb shop-picture" :class="{ 'shop-picture-column': formData.waterfall }">
                            <image :src="item.goods_thumb" mode="aspectFill"></image>
                        </view>
                    </template>
                    <template v-slot:body>
                        <view class="shop">
                            <view>
                                <view class="uni-title">
                                    <text class="uni-ellipsis-2">{{ item.name }}</text>
                                </view>
                                <!-- <view>
                    <view class="uni-thumb shop-picture" :class="{ 'shop-picture-column': formData.waterfall }">
                        <image :src="item.goods_thumb" mode="aspectFill"></image>
                    </view>
                    <view class="shop">
                        <view>
                            <view class="uni-title">
                                <text class="uni-ellipsis-2">{{ item.name }}</text>
                            </view>
                            <!-- <view>
                                    <text class="uni-tag hot-tag">{{ item.goods_tip }}</text>
                                    <text v-for="tag in item.tag" :key="tag" class="uni-tag">{{ tag }}</text>
                                </view> -->
                        </view>
                        <view>
                            <view class="shop-price">
                                <text>¥</text>
                                <text class="shop-price-text">{{ item.goods_price }}</text>
                                <text>.00</text>
                            </view>
                            <view>
                                <view class="shop-price">
                                    <text>¥</text>
                                    <text class="shop-price-text">{{ item.goods_price }}</text>
                                    <text>.00</text>
                            <view class="uni-flex-row">
                                <view class="uni-note">{{ item.comment_count || 0 }}条评论 月销量 {{
                                    item.month_sell_count || 0 }}
                                </view>
                                <view class="uni-flex-row">
                                    <view class="uni-note">{{ item.comment_count||0 }}条评论 月销量 {{
                                        item.month_sell_count||0 }}
                                    </view>
                                    <view class="uni-note ellipsis">
                                        <text class="uni-link">上架</text>
                                <view class="uni-note ellipsis">
                                    <text class="uni-link">上架</text>
                                        <text class="uni-link" style="color:red;">删除</text>
                                    </view>
                                    <text class="uni-link" style="color:red;">删除</text>
                                </view>
                            </view>
                        </view>
                    </template>
                    </view>
                    <!-- 通过body插槽定义商品布局 -->
                </view>
@@ -59,8 +56,10 @@
</template>
<script>
import UIcon from '@/uview-components/uview-ui/components/u-icon/u-icon.vue';
export default {
    components: {},
    components: { UIcon },
    data() {
        return {
            formData: {