|
|
@@ -2,7 +2,9 @@
|
|
|
<div class="bgcolor productItem">
|
|
|
<div class="navBarTOP">
|
|
|
<van-nav-bar class="navBar" title="产品列表" left-arrow @click-left="onClickLeft">
|
|
|
- <template #right> </template>
|
|
|
+ <template #right>
|
|
|
+ <span style="color: #0057ba" @click="placeOrderFn"> 去下单 </span>
|
|
|
+ </template>
|
|
|
</van-nav-bar>
|
|
|
</div>
|
|
|
<div class="lineGrey"></div>
|
|
|
@@ -28,6 +30,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { getItemList } from '@/api';
|
|
|
+import { getOrderUrlByStoreId } from '@/api/inventory';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -67,7 +70,27 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+ placeOrderFn() {
|
|
|
+ let loading1 = this.$toast.loading({
|
|
|
+ duration: 0,
|
|
|
+ message: '加载中...',
|
|
|
+ forbidClick: true,
|
|
|
+ });
|
|
|
+ getOrderUrlByStoreId({
|
|
|
+ storeId: this.$route.query.id,
|
|
|
+ from: this.$route.query.from || '',
|
|
|
+ }).then((res) => {
|
|
|
+ loading1.clear();
|
|
|
+ if (res.code == 200 && res.data) {
|
|
|
+ window.location.href = res.data;
|
|
|
+ } else {
|
|
|
+ this.Toast({
|
|
|
+ message: res.msg,
|
|
|
+ duration: 5000,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
onClickLeft() {
|
|
|
this.$router.go(-1);
|
|
|
},
|