更新记录

1.0.61(2024-06-14)

  • 个人中心补充

1.0.6(2024-06-14)

  • 个人中心

1.0.5(2024-06-07)

  • 提交支付
查看更多

平台兼容性

Vue2 Vue3
×
App 快应用 微信小程序 支付宝小程序 百度小程序 字节小程序 QQ小程序
HBuilderX 3.99 app-vue × × × × ×
钉钉小程序 快手小程序 飞书小程序 京东小程序
× × × ×
H5-Safari Android Browser 微信浏览器(Android) QQ浏览器(Android) Chrome IE Edge Firefox PC-Safari
× × × × × × ×

wts-SimpleMall

一款简易的商城前端组建,包含了首页、商品分类页、商品搜索、商品详情、购物车、商品下单、支付、地址、订单等功能

简单易懂,易于修改

可根据自己的数据结构进行调整

首页使用方法

<template>
    <view class="content">
        <!-- bannerList:轮播图数据 -->
        <!-- menuList:金刚区数据 -->
        <!-- goodsList:商品列表数据 -->
        <!-- goodsDetail:前往商品详情 -->
        <wts-storeIndex :bannerList="bannerList" :menuList="menuList" :goodsList="goodsList"
            @goodsDetail="goodsAction"></wts-storeIndex>
    </view>
</template>

商品详情(目前是单规格)

<template>
    <view>
        <!-- goodsInfo:商品详情数据 -->
        <!-- buyAction:购买按钮 -->
        <!-- addCarAction:添加到购物车 -->
        <!-- gocarAction:前往购物车 -->
        <!-- collectionAction:收藏按钮 -->
        <wts-goodsDetail :goodsInfo="goodsInfo" @buyAction="buyAction" @addCarAction="addCarAction"
            @gocarAction="gocarAction" @collectionAction="collectionAction"></wts-goodsDetail>
    </view>
</template>

购物车

<template>
    <view>
        <!-- goodsList:数据源 -->
        <!-- buyAction:底部购买按钮 -->
        <wts-storeCar :goodsList="dataList" @buyAction="buyAction"></wts-storeCar>
    </view>
</template>

地址列表

<template>
    <view>
        <!-- dataList:数据源 -->
        <!-- deletAddress:删除地址 -->
        <!-- editAddress:编辑地址 -->
        <!-- addAddress:新增地址 -->
        <wts-addressList :dataList="dataList" @deletAddress="deletAddress" @editAddress="editAddress"
            @addAddress="addAddress"></wts-addressList>
    </view>
</template>

添加编辑地址

<template>
    <view>
    <!-- addressInfo:地址信息 -->
    <!--    addressInfo: {
        id: '',
        name: '',
        mobile: '',
        provice: '',
        provice_id: '',
        city: '',
        city_id: '',
        distract: '',
        distract_id: '',
        address: '',
        default: false
    } -->
    <!-- selectDistrict:选择地区,使用三方选择器,或者直接修改成手动输入 -->
    <!-- saveAction:保存地址 -->
    <wts-addressAdd :addressInfo="addressInfo"></wts-addressAdd>
</view>
</template>

确认订单

<template>
    <view>
        <!-- addressInfo:地址信息数据 -->
        <!-- orderInfo:确认订单数据 -->
        <!-- selectAddress:选择地址 -->
        <!-- submitOrder:提交订单 -->
        <wts-confirmOrder :addressInfo="addressInfo" :orderInfo="orderInfo" @selectAddress="selectAddress"
            @submitOrder="submitOrder"></wts-confirmOrder>
    </view>
</template>

提交支付

<template>
    <view>
        <!-- payInfo:支付信息 -->
        <!-- submitPay:提交支付 携带有支付方式选择下标 -->
    <!-- 数据结构,可自行修改
        payInfo: {
            pay_price: '123.00',
            order_id: '1',
            payList: [{
                    name: '微信支付',
                    type: 'WeChatPay'
                },
                {
                    name: '支付宝支付',
                    type: 'Alipay'
                },
                {
                    name: '余额支付',
                    type: 'balance'
                }
            ]
        } -->
        <wts-orderPay :payInfo="payInfo" @submitPay="submitPay"></wts-orderPay>
    </view>
</template>

个人中心

<template>
    <view>
        <!-- navBarHeght:适配刘海屏(通过uni.getSystemInfo获取),有导航栏可忽略 -->
        <!-- orderMenu:订单菜单,格式为:orderMenu:[{name:'',image:'',type:'',badge:''}] -->
        <!-- @menuAction:订单 -->
        <wts-personal :navBarHeght="navBarHeght" :orderMenu="orderMenu"></wts-personal>
    </view>
</template>

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

许可协议

MIT协议

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问