0.1.5 • Published 2 years ago

gs-ganglonggou-components v0.1.5

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

岗隆购-组件包

使用

import glComponents from 'ganglonggou-components/dist/ganglonggou-components.common'
import 'ganglonggou-components/dist/ganglonggou-components.css'

Vue.use(glComponents);

商品搜索页

Props
参数说明类型默认值必须
api-base-urlapi接口基础头,example:http://xx/api/string-true
son-into-type子入口类型string-true
keyword-logs本地搜索记录string[]false
head-open是否撑开头部Booleantruefalse
Events
事件名说明回调参数
back-click广告位点击触发adItemData:广告位信息
clean-keyword-log清除搜索历史触发-
go-search商品位点击触发keyword:搜索关键词
service-click客服点击-
Example
    <li-search-goods :api-base-url="apiBaseUrl"
                     son-into-type="wx"
                     :keyword-logs="keywordLogs"
                    :head-open="true"
                     @back-click="backClick"
                     @clean-keyword-log="cleanKeywordLog"
                     @go-search="goSearch"
                     @service-click="serviceClick"/>

所有分类页

Props
参数说明类型默认值必须
api-base-urlapi接口基础头,example:http://xx/api/string-true
head-open是否撑开头部Booleantruefalse
ori-classify-data原始分类数组Array-true
Events
事件名说明回调参数
classify-click分类条目点击classifyName:分类名称
bar-click推广图点击goodsId
search-box-click搜索框点击-
service-click客服点击-
Example
       <li-all-classify    :api-base-url="apiBaseUrl"
                           :head-open="false"
                           :ori-classify-data="testData"
                           @classify-click="classifyItemClick"
                           @bar-click="barClick"
                           @search-box-click="searchBoxClick"
                           @service-click="serviceClick"/>

搜索完成页

Props
参数说明类型默认值必须
api-base-urlapi接口基础头,example:http://xx/api/string-true
head-open是否撑开头部Booleantruefalse
keyword搜索关键词String-true
show-keyword是否显示搜索关键词Booleanfalsefalse
Events
事件名说明回调参数
back-click广告位点击触发adItemData:广告位信息
search-box-click搜索框点击-
service-click客服点击-
goods-card-click商品点击goodsInfo
Example
     <li-search-goods-complete     :api-base-url="apiBaseUrl"
                                   keyword="苹果"
                                   :head-open="true"
                                   :show-keyword="false"
                                   @back-click="backClick"
                                   @search-box-click="searchBoxClick"
                                   @goods-card-click="goodsCardClick"
                                   @service-click="serviceClick"/>

首页

Props
参数说明类型默认值必须
apiBaseUrlapi接口基础头,example:http://xx/api/string-true
headOpen是否需要头部撑开booleantruefalse
showSys是否显示扫一扫图标booleantruefalse
Events
事件名说明回调参数
ad-location-click广告位点击触发adItemData:广告位信息
search-click搜索栏点击触发-
goods-card-click商品位点击触发{goodsId:100,goodsImg:"url",goodsName:"name"}
more-classify-click分类左侧更多点击触发parentClassifyId:分类id
every-day-box-click每日特价区域点击
sys-camera-click扫一扫相机点击
sys-photo-click扫一扫相册点击
Example
    <li-first-page     :api-base-url="apiBaseUrl"
                       :head-open="true"
                       :show-sys="true"
                       @ad-location-click="adLocationClick"
                       @search-click="searchBoxClick"
                       @goods-card-click="goodsCardClick"
                       @more-classify-click="moreClassifyClick"
                       @every-day-box-click="everyDayBoxClick"
                       @sys-camera-click="cameraClick"
                       @sys-photo-click="photoClick"/>

分类广告页

Props
参数说明类型默认值必须
apiBaseUrlapi接口基础头,example:http://xx/api/string-true
parentClassifyId父分类IDnumber-true
headOpen是否需要头部撑开booleantruefalse
Events
事件名说明回调参数
goods-card-click商品位点击触发goodsName
left-icon-click点击头部左侧返回触发-
Example
    <li-classify-ad v-if="false"
                        :apiBaseUrl="apiBaseUrl"
                        :parent-classify-id="819"
                        :head-open="true"
                        @left-icon-click="backClick"
                        @goods-card-click="goodsCardClick"/>

分类广告页

Props
参数说明类型默认值必须
apiBaseUrlapi接口基础头,example:http://xx/api/string-true
parentClassifyId父分类IDnumber-true
headOpen是否需要头部撑开booleantruefalse
Events
事件名说明回调参数
goods-card-click商品位点击触发goodsName
left-icon-click点击头部左侧返回触发-
Example
    <li-classify-ad     :apiBaseUrl="apiBaseUrl"
                        :parent-classify-id="819"
                        :head-open="true"
                        @left-icon-click="backClick"
                        @goods-card-click="goodsCardClick"/>

商品详情

Props
参数说明类型默认值必须
apiBaseUrlapi接口基础头,example:http://xx/api/string-true
goodsName商品名称string""false
goodsMainImg商品主图string""false
goodsId商品idstring-true
skuIdskuIdboolean0false
showRightButton是否显示分享按钮booleantruefalse
isOpen是否需要安全边距booleantruefalse
integralName积分名称string-true
cartNumber购物车数量number0false
Events
事件名说明回调参数
coupon-click广告位点击触发adItemData:广告位信息
get-more-evaluate更多评价{goodsId: 100,evaluateCount: 200}
goods-card-click点击商品卡片触发goodsInfo
online-customer-service在线客服-
phone-service电话客服-
shop-car-click购物车-
add-shop-cart加入购物车cartInfo
immediate-buy立即购买cartInfo
page-complete页面准备完成回调cartInfo
back-button-click点击返回按钮-
share-button-click点击分享按钮shareInfo
image-preview预览图片imgSrc
page-load-fail页面加载失败回调-
sku-switchedsku切换cartInfo
CartInfo
键名备注
goods_number商品数量
goods_sn
goods_name
goods_id
cat_id
goods_head_name
goods_price商品价格
one_goods_price商品单价
market_price划线价
goods_stock商品库存
goods_sales_volume销量
goods_attribute_img当前属性图片
sku_id所选属性id
attr_desc所选属性详情
is_promote是否秒杀商品
promote_number
promote_start_date
promote_end_date
give_integral返积分
integral用积分
one_give_integral返积分
one_integral用积分
integral_desc积分描述
Example
   <li-goods-page    :api-base-url="apiBaseUrl"
                     :show-right-button="true"
                     :goods-name="goodsName"
                     :goods-main-img="goodsMainImg"
                     :sku-id="29511"
                     :is-open="true"
                     :cart-number="1"
                     integral-name="积分"
                     :goods-id="goodsId"
                     @coupon-click="couponClick"
                     @get-more-evaluate="getMoreEvaluate"
                     @goods-card-click="goodsCardClick"
                     @online-customer-service="serviceClick"
                     @phone-service="phoneService"
                     @shop-car-click="shopCarClick"
                     @add-shop-cart="addShopCart"
                     @immediate-buy="immediateBuy"
                     @page-complete="pageComplete"
                     @back-button-click="backClick"
                     @share-button-click="shareButtonClick"
                     @image-preview="imagePreview"
                     @page-load-fail="pageLoadFail"
                     @sku-switched="skuSwitched"
      />

填写订单

Props
参数说明类型默认值必须
api-base-urlapi接口基础头,example:http://xx/api/string-true
carts-preview商品列表 {goodsId: 757,skuId: 44606,goodsNumber: 1,},array-true
user-token用户tokenboolean-true
integral-name积分名称boolean-true
Events
事件名说明回调参数
page-load-fail页面加载失败errorMsg
write-order-success订单提交成功orderSn
write-order-fail订单提交失败errorMsg
add-address添加收货地址-
switch-address切换收货地址-
Example
      <li-write-order :api-base-url="apiBaseUrl"
            :carts-preview="cartsPreview"
            :user-token="userToken"
            :integral-name="integralName"
            @page-load-fail="pageLoadFail"
            @write-order-success="writeOrderSuccess"
            @write-order-fail="writeOrderFail"
            @add-address="addAddress"
            @switch-address="switchAddress"/>