|
@@ -124,7 +124,7 @@
|
|
</van-action-sheet>
|
|
</van-action-sheet>
|
|
<van-goods-action>
|
|
<van-goods-action>
|
|
<van-goods-action-icon icon="chat-o" text="客服" />
|
|
<van-goods-action-icon icon="chat-o" text="客服" />
|
|
- <van-goods-action-icon icon="cart-o" text="购物车" />
|
|
|
|
|
|
+ <van-goods-action-icon icon="cart-o" @click="$router.push('/shopCart')" text="购物车" />
|
|
<van-goods-action-icon icon="shop-o" text="店铺" />
|
|
<van-goods-action-icon icon="shop-o" text="店铺" />
|
|
<van-goods-action-button type="danger" text="立即购买" @click="showDesc = true" />
|
|
<van-goods-action-button type="danger" text="立即购买" @click="showDesc = true" />
|
|
</van-goods-action>
|
|
</van-goods-action>
|
|
@@ -132,8 +132,10 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
-import { prodInfo, prodCommData, isCollection, changeItem, confirm } from '../api/prodinfo'
|
|
|
|
|
|
+import { prodInfo, prodCommData, isCollection, changeItem, confirm }
|
|
|
|
+ from '../api/prodinfo'
|
|
import { formatHtml } from '../utils/util'
|
|
import { formatHtml } from '../utils/util'
|
|
|
|
+import { Toast } from 'vant'
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -196,8 +198,13 @@ export default {
|
|
this.shopcart.prodId = this.prodData.prodId
|
|
this.shopcart.prodId = this.prodData.prodId
|
|
this.shopcart.skuId = this.defaultSku.skuId
|
|
this.shopcart.skuId = this.defaultSku.skuId
|
|
this.shopcart.shopId = this.prodData.shopId
|
|
this.shopcart.shopId = this.prodData.shopId
|
|
- this.shopcart.count = confirm.orderItem.prodCount
|
|
|
|
- changeItem(this.shopcart)
|
|
|
|
|
|
+ this.shopcart.count = this.confirm.orderItem.prodCount
|
|
|
|
+ changeItem(this.shopcart).then(r=>{
|
|
|
|
+ Toast("添加成功!")
|
|
|
|
+ this.showDesc = false
|
|
|
|
+ }).catch(e=>{
|
|
|
|
+ console.log(e)
|
|
|
|
+ })
|
|
},
|
|
},
|
|
init(sku) {
|
|
init(sku) {
|
|
const properties = []
|
|
const properties = []
|