mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
加入 优惠券市场 功能 未开发完
This commit is contained in:
parent
5d427f81b4
commit
fc11ef8606
BIN
public/.DS_Store
vendored
BIN
public/.DS_Store
vendored
Binary file not shown.
@ -951,4 +951,17 @@ nav-link nav-link-breadcrumb active:active {
|
||||
text-align: center;
|
||||
height: 100;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.coupon-market .coupon{
|
||||
border-radius: 5px;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.coupon-market .coupon img{
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
}
|
||||
.coupon-market .coupon .title{
|
||||
font-size: 16px;
|
||||
}
|
||||
BIN
public/pages/.DS_Store
vendored
BIN
public/pages/.DS_Store
vendored
Binary file not shown.
42
public/pages/scm/couponMarket/couponMarket.html
Normal file
42
public/pages/scm/couponMarket/couponMarket.html
Normal file
@ -0,0 +1,42 @@
|
||||
<div class="coupon-market">
|
||||
<div class="row">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-5 padding-lr-0 margin-left-sm">
|
||||
<input type="text" class="form-control" placeholder="请输入优惠券名称" @keyup.enter="_doSearch()" />
|
||||
</div>
|
||||
<div class="col-md-1 padding-lr-0 margin-left-sm">
|
||||
<button type="button" class="form-control btn btn-primary" @click="_doSearch()">
|
||||
<span>
|
||||
<vc:i18n name="查询"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row margin-top-xs margin-bottom-sm">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-5 padding-lr-0 margin-left-sm">
|
||||
<a href="javascript:void(0)" @click="_querySupplierCoupon(item)" v-for="(item,index) in couponMarketInfo.suppliers">{{item.supplierName}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vc-line"></div>
|
||||
<div class="row " style="margin:15px auto">
|
||||
<div v-for="(item,index) in couponMarketInfo.coupons" class="coupon margin padding-xs" :key="index">
|
||||
<!-- <img :src="item.url" class="border-radius"/> -->
|
||||
<img :src="couponMarketInfo.url" class="border-radius" />
|
||||
<div class="title padding-xs">
|
||||
<span>{{item.name}}</span>
|
||||
</div>
|
||||
<div class="row padding-xs">
|
||||
<div class="col-md-6">
|
||||
售价:<span style="color: #ff0036">¥{{item.valuePrice}}</span>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<a href="">购买</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="couponMarketInfo.records > 1">
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
83
public/pages/scm/couponMarket/couponMarket.js
Normal file
83
public/pages/scm/couponMarket/couponMarket.js
Normal file
@ -0,0 +1,83 @@
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 15;
|
||||
vc.extends({
|
||||
data: {
|
||||
couponMarketInfo: {
|
||||
coupons: [],
|
||||
suppliers: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
url:'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic1.zhimg.com%2Fv2-e262fc8062b7ef085a9f4de51a31f08f_1440w.jpg%3Fsource%3D172ae18b&refer=http%3A%2F%2Fpic1.zhimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1671372327&t=5644f55f337250a4f5af2baae7f34e3e'
|
||||
},
|
||||
},
|
||||
_initMethod: function () {
|
||||
|
||||
|
||||
$that._loadTopSupplier();
|
||||
$that._loadCoupons(DEFAULT_PAGE,DEFAULT_ROWS,'');
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
vc.component._listSupplierCoupons(_currentPage, DEFAULT_ROWS,'');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_querySupplierCoupon:function(_item){
|
||||
$that._loadCoupons(DEFAULT_PAGE,DEFAULT_ROWS,_item.supplierId);
|
||||
},
|
||||
_doSearch:function(){
|
||||
$that._loadCoupons(DEFAULT_PAGE,DEFAULT_ROWS,'');
|
||||
},
|
||||
_loadTopSupplier: function () {
|
||||
|
||||
let param = {
|
||||
params: {
|
||||
page: 1,
|
||||
row: 5,
|
||||
}
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('/supplier.listSupplier',
|
||||
param,
|
||||
function (json, res) {
|
||||
let _supplierManageInfo = JSON.parse(json);
|
||||
vc.component.couponMarketInfo.suppliers = _supplierManageInfo.data;
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_loadCoupons: function (_page, _row, _supplierId) {
|
||||
|
||||
let param = {
|
||||
params: {
|
||||
page: _page,
|
||||
row: _row,
|
||||
supplierId: _supplierId
|
||||
}
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('/supplierCoupon.listSupplierCoupon',
|
||||
param,
|
||||
function (json, res) {
|
||||
let _supplierCouponInfo = JSON.parse(json);
|
||||
vc.component.couponMarketInfo.total = _supplierCouponInfo.total;
|
||||
vc.component.couponMarketInfo.records = _supplierCouponInfo.records;
|
||||
vc.component.couponMarketInfo.coupons = _supplierCouponInfo.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.couponMarketInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
},
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user