立即购买和后台商品加访问前台链接

This commit is contained in:
pushuo 2022-08-26 15:24:13 +08:00
parent 65b5efb904
commit 87e8b16a38
3 changed files with 6 additions and 3 deletions

View File

@ -2130,7 +2130,8 @@ __webpack_require__.r(__webpack_exports__);
$btn.html(loadHtml).prop('disabled', true);
$http.post('/carts', {
sku_id: sku_id,
quantity: quantity
quantity: quantity,
buy_now: isBuyNow
}, {
hload: !!event
}).then(function (res) {

View File

@ -116,7 +116,9 @@
<td>
<div class="wh-60"><img :src="item.images[0] || 'image/placeholder.png'" class="img-fluid"></div>
</td>
<td>@{{ item.name || '无名称' }}</td>
<td>
<a :href="item.url" target="_blank" class="text-dark">@{{ item.name || '无名称' }}</a>
</td>
<td>@{{ item.price_formatted }}</td>
<td>@{{ item.created_at }}</td>
<td>@{{ item.position }}</td>

View File

@ -29,7 +29,7 @@ export default {
const loadHtml = '<span class="spinner-border spinner-border-sm"></span>';
$btn.html(loadHtml).prop('disabled', true);
$http.post('/carts', {sku_id, quantity}, {hload: !!event}).then((res) => {
$http.post('/carts', {sku_id, quantity, buy_now: isBuyNow}, {hload: !!event}).then((res) => {
this.getCarts();
layer.msg(res.message)
if (isBuyNow) {