|
@@ -0,0 +1,123 @@
|
|
|
+<template>
|
|
|
+ <div id="order">
|
|
|
+ <el-row name="地址部分">
|
|
|
+ <el-col :span="24" style="padding: 10px">
|
|
|
+ <el-tag size="mini" effect="dark" type="danger" class="tag__margin">默认</el-tag>
|
|
|
+ <el-tag size="mini" effect="dark" type="primary" class="tag__margin">公司</el-tag>
|
|
|
+ 刘 先生 130****1234
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <van-cell-group>
|
|
|
+ <van-cell is-link>
|
|
|
+ <template #title>
|
|
|
+ <span class="address__title">前进大街1244号吉林省科技厅科研园小二楼</span>
|
|
|
+ </template>
|
|
|
+ </van-cell>
|
|
|
+ </van-cell-group>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <van-cell-group>
|
|
|
+ <van-cell>
|
|
|
+ <template #title>
|
|
|
+ <span class="word__title">立即送出</span>
|
|
|
+ </template>
|
|
|
+ <span class="word__send_time">大约23:00送达</span>
|
|
|
+ </van-cell>
|
|
|
+ </van-cell-group>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <template name="商品部分">
|
|
|
+ <van-card v-for="(g, gi) in goodsList" :key="`good-${gi}`" :price="g.money" :desc="g.desc" :title="g.name" :thumb="g.images[0].url" :num="g.num">
|
|
|
+ <template name="标签自定义" #tags>
|
|
|
+ <div style="margin: 3px 0" class="van-multi-ellipsis--l3">
|
|
|
+ <el-tag size="mini" v-for="(t, ti) in g.tags" :key="`g-t-${ti}-${gi}`" style="margin-right: 2px" plain>{{ t }}</el-tag>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </van-card>
|
|
|
+ </template>
|
|
|
+ <div style="padding-bottom: 50px">
|
|
|
+ <van-cell-group>
|
|
|
+ <van-cell value-class="value_class" title="配送费" value="5"></van-cell>
|
|
|
+ <van-cell value-class="value_class" title="商品金额" value="37"></van-cell>
|
|
|
+ <van-field v-model="remark" label="备注" placeholder="若有需求,请填写备注"></van-field>
|
|
|
+ </van-cell-group>
|
|
|
+ </div>
|
|
|
+ <van-submit-bar :price="4200" button-text="提交订单" @submit="onSubmit" />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+export default {
|
|
|
+ name: 'order',
|
|
|
+ props: {},
|
|
|
+ components: {},
|
|
|
+ data: function () {
|
|
|
+ return {
|
|
|
+ remark: '',
|
|
|
+ goodsList: [
|
|
|
+ {
|
|
|
+ name: '折扣商品-1',
|
|
|
+ id: 'discount-1',
|
|
|
+ money: 10,
|
|
|
+ images: [{ url: 'https://img.yzcdn.cn/vant/cat.jpeg' }],
|
|
|
+ tags: ['1人份', '220ml', '微甜', '220ml', '微甜', '220ml', '微甜', '220ml', '微甜', '220ml', '微甜', '220ml', '微甜', '220ml'],
|
|
|
+ num: 1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '折扣商品-2',
|
|
|
+ id: 'discount-1',
|
|
|
+ money: 12,
|
|
|
+ images: [{ url: 'https://img.yzcdn.cn/vant/cat.jpeg' }],
|
|
|
+ tags: ['1人份', '220ml', '微甜', '220ml', '微甜', '220ml', '微甜', '220ml', '微甜', '220ml', '微甜', '220ml', '微甜', '220ml'],
|
|
|
+ num: 2,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '折扣商品-1',
|
|
|
+ id: 'discount-3',
|
|
|
+ money: 15,
|
|
|
+ images: [{ url: 'https://img.yzcdn.cn/vant/cat.jpeg' }],
|
|
|
+ tags: ['1人份', '220ml', '微甜', '220ml', '微甜', '220ml', '微甜', '220ml', '微甜', '220ml', '微甜', '220ml', '微甜', '220ml'],
|
|
|
+ num: 3,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+ methods: {
|
|
|
+ onSubmit() {
|
|
|
+ console.log('in function:');
|
|
|
+ },
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user', 'menuParams']),
|
|
|
+ pageTitle() {
|
|
|
+ return `${this.$route.meta.title}`;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.tag__margin {
|
|
|
+ margin-right: 3px;
|
|
|
+}
|
|
|
+.address__title {
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: 700;
|
|
|
+}
|
|
|
+.word__title {
|
|
|
+ font-weight: 600;
|
|
|
+ font-size: 16px;
|
|
|
+}
|
|
|
+.word__send_time {
|
|
|
+ font-size: 16px;
|
|
|
+ color: orange;
|
|
|
+}
|
|
|
+.value_class {
|
|
|
+ color: #000;
|
|
|
+}
|
|
|
+</style>
|