|
@@ -17,6 +17,7 @@
|
|
|
<tm-listitem class="liebiao jiageList" :value="'¥'+zongjia" :round="24" :shadow="12" title="价格"
|
|
|
:show-right-icon="false"></tm-listitem>
|
|
|
<view class="text-align-center">
|
|
|
+ <!-- <tm-button theme="red" @click="qingkong()" :round="24" class="mt-50 logincla">清空</tm-button> -->
|
|
|
<tm-button theme="red" @click="shanchu" :round="24" class="mt-50 logincla">删除</tm-button>
|
|
|
<tm-button theme="primary" :round="24" class="mt-50 logincla" @click="goPay">立即付款</tm-button>
|
|
|
</view>
|
|
@@ -50,6 +51,29 @@
|
|
|
this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 清空
|
|
|
+ qingkong() {
|
|
|
+ let that = this;
|
|
|
+ myRequest({
|
|
|
+ url: '/api/ShopCart/deleteAllGoods',
|
|
|
+ method: 'post',
|
|
|
+ data: {}
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ console.log(res.data.data,'33');
|
|
|
+ that.$refs.toast.show({
|
|
|
+ model: 'success',
|
|
|
+ label: res.data.msg
|
|
|
+ })
|
|
|
+ // this.getList()
|
|
|
+ } else {
|
|
|
+ that.$refs.toast.show({
|
|
|
+ model: 'error',
|
|
|
+ label: res.data.msg
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
goPay() {
|
|
|
var that = this,
|
|
|
data = this.test,
|