panhui 3 年之前
父节点
当前提交
01d46ef568

二进制
src/assets/img_dizhitiao.png


+ 66 - 0
src/assets/svgs/badge.svg

@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="30px" height="33px" viewBox="0 0 30 33" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>编组 6备份</title>
+    <defs>
+        <linearGradient x1="32.5677907%" y1="85.8195719%" x2="76.1912274%" y2="13.5475035%" id="linearGradient-1">
+            <stop stop-color="#DCE2E8" offset="0%"></stop>
+            <stop stop-color="#82A0BA" offset="100%"></stop>
+        </linearGradient>
+        <linearGradient x1="67.4322093%" y1="85.8195719%" x2="23.8087726%" y2="13.5475035%" id="linearGradient-2">
+            <stop stop-color="#DCE2E8" offset="0%"></stop>
+            <stop stop-color="#82A0BA" offset="100%"></stop>
+        </linearGradient>
+        <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-3">
+            <stop stop-color="#E2E8ED" offset="0%"></stop>
+            <stop stop-color="#AEB8C0" offset="100%"></stop>
+        </linearGradient>
+        <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-4">
+            <stop stop-color="#98B0C5" offset="0%"></stop>
+            <stop stop-color="#82A0BA" offset="100%"></stop>
+        </linearGradient>
+        <path d="M13.4456256,26.06881 L4.18247824,20.9454288 C3.52988859,20.5665872 3.13108381,19.8810644 3.13108381,19.1233812 L3.13108381,8.87661877 C3.13108381,8.11893564 3.52988859,7.4334128 4.18247824,7.05457123 L13.4456256,1.93119 C14.0982153,1.55234843 14.9139523,1.55234843 15.566542,1.93119 L24.8296894,7.05457123 C25.482279,7.4334128 25.8810838,8.11893564 25.8810838,8.87661877 L25.8810838,19.1233812 C25.8810838,19.8810644 25.482279,20.5665872 24.8296894,20.9454288 L15.566542,26.06881 C14.8958248,26.4476516 14.0982153,26.4476516 13.4456256,26.06881 Z" id="path-5"></path>
+        <filter x="-8.8%" y="-8.1%" width="117.6%" height="116.2%" filterUnits="objectBoundingBox" id="filter-6">
+            <feGaussianBlur stdDeviation="1.5" in="SourceAlpha" result="shadowBlurInner1"></feGaussianBlur>
+            <feOffset dx="0" dy="1" in="shadowBlurInner1" result="shadowOffsetInner1"></feOffset>
+            <feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"></feComposite>
+            <feColorMatrix values="0 0 0 0 0.596078431   0 0 0 0 0.690196078   0 0 0 0 0.77254902  0 0 0 1 0" type="matrix" in="shadowInnerInner1"></feColorMatrix>
+        </filter>
+        <linearGradient x1="74.4429089%" y1="38.8150537%" x2="50%" y2="86.30125%" id="linearGradient-7">
+            <stop stop-color="#839FBA" offset="0%"></stop>
+            <stop stop-color="#82A0BC" stop-opacity="0.271093409" offset="100%"></stop>
+        </linearGradient>
+        <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-8">
+            <stop stop-color="#F3F9FE" offset="0%"></stop>
+            <stop stop-color="#DDE3EA" offset="100%"></stop>
+        </linearGradient>
+        <path d="M13.6087731,24.4596353 L5.77072525,20.0193716 C5.21853401,19.6910422 4.88108381,19.0969224 4.88108381,18.4402637 L4.88108381,9.55973627 C4.88108381,8.90307755 5.21853401,8.30895776 5.77072525,7.9806284 L13.6087731,3.54036467 C14.1609643,3.21203531 14.8512033,3.21203531 15.4033946,3.54036467 L23.2414424,7.9806284 C23.7936336,8.30895776 24.1310838,8.90307755 24.1310838,9.55973627 L24.1310838,18.4402637 C24.1310838,19.0969224 23.7936336,19.6910422 23.2414424,20.0193716 L15.4033946,24.4596353 C14.8358647,24.7879647 14.1609643,24.7879647 13.6087731,24.4596353 Z" id="path-9"></path>
+        <filter x="-5.2%" y="-4.7%" width="120.8%" height="118.7%" filterUnits="objectBoundingBox" id="filter-10">
+            <feOffset dx="1" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
+            <feGaussianBlur stdDeviation="0.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
+            <feColorMatrix values="0 0 0 0 0.341176471   0 0 0 0 0.466666667   0 0 0 0 0.592156863  0 0 0 1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
+        </filter>
+        <linearGradient x1="50%" y1="34.4724617%" x2="50%" y2="100%" id="linearGradient-11">
+            <stop stop-color="#C0DFF9" offset="0%"></stop>
+            <stop stop-color="#FFFFFF" stop-opacity="0.129160528" offset="100%"></stop>
+        </linearGradient>
+    </defs>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="个人中心备份-4" transform="translate(-160.000000, -263.000000)" fill-rule="nonzero">
+            <g id="编组-11" transform="translate(160.571223, 263.009285)">
+                <path d="M4.39659279,26.7865906 L0.942891801,26.6696243 C0.666907653,26.6602776 0.450755322,26.4289712 0.460102056,26.1529871 C0.463489987,26.0529505 0.496824492,25.9562334 0.555791456,25.8753527 L4.38151438,20.6278859 L4.38151438,20.6278859 L10.5410123,25.259284 L6.61652045,30.5427917 C6.45186093,30.7644713 6.13867118,30.8106952 5.91699156,30.6460357 C5.82678174,30.5790295 5.76177365,30.4835886 5.73245354,30.3751083 L4.86234948,27.155845 C4.80504492,26.9438261 4.61609346,26.7940244 4.39659279,26.7865906 Z" id="路径" fill="url(#linearGradient-1)"></path>
+                <path d="M24.6034072,27.5835294 L28.0571082,27.4665632 C28.3330923,27.4572164 28.5492447,27.22591 28.5398979,26.9499259 C28.53651,26.8498893 28.5031755,26.7531722 28.4442085,26.6722915 L24.6184856,21.4248247 L24.6184856,21.4248247 L18.4589877,26.0562228 L22.3834795,31.3397305 C22.5481391,31.5614101 22.8613288,31.607634 23.0830084,31.4429745 C23.1732183,31.3759683 23.2382264,31.2805274 23.2675465,31.1720471 L24.1376505,27.9527838 C24.1949551,27.7407649 24.3839065,27.5909632 24.6034072,27.5835294 Z" id="路径" fill="url(#linearGradient-2)"></path>
+                <path d="M13.2824782,27.6779847 L2.59423122,21.8714859 C1.84124318,21.4421322 1.38108381,20.6652063 1.38108381,19.8064987 L1.38108381,8.19350128 C1.38108381,7.33479372 1.84124318,6.55786783 2.59423122,6.12851406 L13.2824782,0.322015334 C14.0354663,-0.107338445 14.9767013,-0.107338445 15.7296894,0.322015334 L26.4179364,6.12851406 C27.1709245,6.55786783 27.6310838,7.33479372 27.6310838,8.19350128 L27.6310838,19.8064987 C27.6310838,20.6652063 27.1709245,21.4421322 26.4179364,21.8714859 L15.7296894,27.6779847 C14.955785,28.1073384 14.0354663,28.1073384 13.2824782,27.6779847 Z" id="路径" fill="url(#linearGradient-3)"></path>
+                <g id="路径">
+                    <use fill="url(#linearGradient-4)" xlink:href="#path-5"></use>
+                    <use fill="black" fill-opacity="1" filter="url(#filter-6)" xlink:href="#path-5"></use>
+                </g>
+                <path d="M13.2130677,26.0425485 L3.9329967,20.7857767 C3.2792148,20.3970717 3.13108381,19.4889802 3.13108381,18.7115703 L24.6179298,6.94946179 C25.2717117,7.33816674 25.8810838,8.09920886 25.8810838,8.87661877 L25.8810838,19.1421018 C25.8810838,19.9195117 25.2717117,20.5652113 24.6179298,20.9539163 L15.3378589,26.0425485 C14.6659163,26.4312534 13.8668496,26.4312534 13.2130677,26.0425485 Z" id="路径" fill="url(#linearGradient-7)" style="mix-blend-mode: multiply;" opacity="0.842558361"></path>
+                <g id="路径">
+                    <use fill="black" fill-opacity="1" filter="url(#filter-10)" xlink:href="#path-9"></use>
+                    <use fill="url(#linearGradient-8)" xlink:href="#path-9"></use>
+                </g>
+                <path d="M13.3713148,24.5896861 L5.48855651,19.9290442 C4.92786804,19.6162407 4.88108381,18.4541839 4.88108381,17.8285768 L23.0514428,7.88290764 C23.6121312,8.19571116 24.1447738,8.85945733 24.1447738,9.48506437 L24.1447738,18.4246083 C24.1447738,19.0502153 23.8021308,19.6162407 23.2414424,19.9290442 L15.1935523,24.5896861 C14.6172892,24.9024896 13.9320032,24.9024896 13.3713148,24.5896861 Z" id="路径" fill="url(#linearGradient-11)" style="mix-blend-mode: multiply;" opacity="0.355971563"></path>
+            </g>
+        </g>
+    </g>
+</svg>

+ 150 - 0
src/components/Badge.vue

@@ -0,0 +1,150 @@
+<template>
+    <svg
+        width="30px"
+        height="33px"
+        viewBox="0 0 30 33"
+        version="1.1"
+        xmlns="http://www.w3.org/2000/svg"
+        xmlns:xlink="http://www.w3.org/1999/xlink"
+    >
+        <title>编组 6备份</title>
+        <defs>
+            <linearGradient x1="32.5677907%" y1="85.8195719%" x2="76.1912274%" y2="13.5475035%" id="linearGradient-1">
+                <stop :stop-color="colors[level].color1" offset="0%"></stop>
+                <stop :stop-color="colors[level].color2" offset="100%"></stop>
+            </linearGradient>
+            <linearGradient x1="67.4322093%" y1="85.8195719%" x2="23.8087726%" y2="13.5475035%" id="linearGradient-2">
+                <stop :stop-color="colors[level].color1" offset="0%"></stop>
+                <stop :stop-color="colors[level].color2" offset="100%"></stop>
+            </linearGradient>
+            <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-3">
+                <stop :stop-color="colors[level].color3" offset="0%"></stop>
+                <stop :stop-color="colors[level].color4" offset="100%"></stop>
+            </linearGradient>
+            <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-4">
+                <stop stop-color="#98B0C5" offset="0%"></stop>
+                <stop :stop-color="colors[level].color2" offset="100%"></stop>
+            </linearGradient>
+            <path
+                d="M13.4456256,26.06881 L4.18247824,20.9454288 C3.52988859,20.5665872 3.13108381,19.8810644 3.13108381,19.1233812 L3.13108381,8.87661877 C3.13108381,8.11893564 3.52988859,7.4334128 4.18247824,7.05457123 L13.4456256,1.93119 C14.0982153,1.55234843 14.9139523,1.55234843 15.566542,1.93119 L24.8296894,7.05457123 C25.482279,7.4334128 25.8810838,8.11893564 25.8810838,8.87661877 L25.8810838,19.1233812 C25.8810838,19.8810644 25.482279,20.5665872 24.8296894,20.9454288 L15.566542,26.06881 C14.8958248,26.4476516 14.0982153,26.4476516 13.4456256,26.06881 Z"
+                id="path-5"
+            ></path>
+            <filter x="-8.8%" y="-8.1%" width="117.6%" height="116.2%" filterUnits="objectBoundingBox" id="filter-6">
+                <feGaussianBlur stdDeviation="1.5" in="SourceAlpha" result="shadowBlurInner1"></feGaussianBlur>
+                <feOffset dx="0" dy="1" in="shadowBlurInner1" result="shadowOffsetInner1"></feOffset>
+                <feComposite
+                    in="shadowOffsetInner1"
+                    in2="SourceAlpha"
+                    operator="arithmetic"
+                    k2="-1"
+                    k3="1"
+                    result="shadowInnerInner1"
+                ></feComposite>
+                <feColorMatrix
+                    values="0 0 0 0 0.596078431   0 0 0 0 0.690196078   0 0 0 0 0.77254902  0 0 0 1 0"
+                    type="matrix"
+                    in="shadowInnerInner1"
+                ></feColorMatrix>
+            </filter>
+            <linearGradient x1="74.4429089%" y1="38.8150537%" x2="50%" y2="86.30125%" id="linearGradient-7">
+                <stop stop-color="#839FBA" offset="0%"></stop>
+                <stop stop-color="#82A0BC" stop-opacity="0.271093409" offset="100%"></stop>
+            </linearGradient>
+            <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-8">
+                <stop stop-color="#F3F9FE" offset="0%"></stop>
+                <stop stop-color="#DDE3EA" offset="100%"></stop>
+            </linearGradient>
+            <path
+                d="M13.6087731,24.4596353 L5.77072525,20.0193716 C5.21853401,19.6910422 4.88108381,19.0969224 4.88108381,18.4402637 L4.88108381,9.55973627 C4.88108381,8.90307755 5.21853401,8.30895776 5.77072525,7.9806284 L13.6087731,3.54036467 C14.1609643,3.21203531 14.8512033,3.21203531 15.4033946,3.54036467 L23.2414424,7.9806284 C23.7936336,8.30895776 24.1310838,8.90307755 24.1310838,9.55973627 L24.1310838,18.4402637 C24.1310838,19.0969224 23.7936336,19.6910422 23.2414424,20.0193716 L15.4033946,24.4596353 C14.8358647,24.7879647 14.1609643,24.7879647 13.6087731,24.4596353 Z"
+                id="path-9"
+            ></path>
+            <filter x="-5.2%" y="-4.7%" width="120.8%" height="118.7%" filterUnits="objectBoundingBox" id="filter-10">
+                <feOffset dx="1" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
+                <feGaussianBlur stdDeviation="0.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
+                <feColorMatrix
+                    values="0 0 0 0 0.341176471   0 0 0 0 0.466666667   0 0 0 0 0.592156863  0 0 0 1 0"
+                    type="matrix"
+                    in="shadowBlurOuter1"
+                ></feColorMatrix>
+            </filter>
+            <linearGradient x1="50%" y1="34.4724617%" x2="50%" y2="100%" id="linearGradient-11">
+                <stop stop-color="#C0DFF9" offset="0%"></stop>
+                <stop stop-color="#FFFFFF" stop-opacity="0.129160528" offset="100%"></stop>
+            </linearGradient>
+        </defs>
+        <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+            <g id="个人中心备份-4" transform="translate(-160.000000, -263.000000)" fill-rule="nonzero">
+                <g id="编组-11" transform="translate(160.571223, 263.009285)">
+                    <path
+                        d="M4.39659279,26.7865906 L0.942891801,26.6696243 C0.666907653,26.6602776 0.450755322,26.4289712 0.460102056,26.1529871 C0.463489987,26.0529505 0.496824492,25.9562334 0.555791456,25.8753527 L4.38151438,20.6278859 L4.38151438,20.6278859 L10.5410123,25.259284 L6.61652045,30.5427917 C6.45186093,30.7644713 6.13867118,30.8106952 5.91699156,30.6460357 C5.82678174,30.5790295 5.76177365,30.4835886 5.73245354,30.3751083 L4.86234948,27.155845 C4.80504492,26.9438261 4.61609346,26.7940244 4.39659279,26.7865906 Z"
+                        id="路径"
+                        fill="url(#linearGradient-1)"
+                    ></path>
+                    <path
+                        d="M24.6034072,27.5835294 L28.0571082,27.4665632 C28.3330923,27.4572164 28.5492447,27.22591 28.5398979,26.9499259 C28.53651,26.8498893 28.5031755,26.7531722 28.4442085,26.6722915 L24.6184856,21.4248247 L24.6184856,21.4248247 L18.4589877,26.0562228 L22.3834795,31.3397305 C22.5481391,31.5614101 22.8613288,31.607634 23.0830084,31.4429745 C23.1732183,31.3759683 23.2382264,31.2805274 23.2675465,31.1720471 L24.1376505,27.9527838 C24.1949551,27.7407649 24.3839065,27.5909632 24.6034072,27.5835294 Z"
+                        id="路径"
+                        fill="url(#linearGradient-2)"
+                    ></path>
+                    <path
+                        d="M13.2824782,27.6779847 L2.59423122,21.8714859 C1.84124318,21.4421322 1.38108381,20.6652063 1.38108381,19.8064987 L1.38108381,8.19350128 C1.38108381,7.33479372 1.84124318,6.55786783 2.59423122,6.12851406 L13.2824782,0.322015334 C14.0354663,-0.107338445 14.9767013,-0.107338445 15.7296894,0.322015334 L26.4179364,6.12851406 C27.1709245,6.55786783 27.6310838,7.33479372 27.6310838,8.19350128 L27.6310838,19.8064987 C27.6310838,20.6652063 27.1709245,21.4421322 26.4179364,21.8714859 L15.7296894,27.6779847 C14.955785,28.1073384 14.0354663,28.1073384 13.2824782,27.6779847 Z"
+                        id="路径"
+                        fill="url(#linearGradient-3)"
+                    ></path>
+                    <g id="路径">
+                        <use fill="url(#linearGradient-4)" xlink:href="#path-5"></use>
+                        <use fill="black" fill-opacity="1" filter="url(#filter-6)" xlink:href="#path-5"></use>
+                    </g>
+                    <path
+                        d="M13.2130677,26.0425485 L3.9329967,20.7857767 C3.2792148,20.3970717 3.13108381,19.4889802 3.13108381,18.7115703 L24.6179298,6.94946179 C25.2717117,7.33816674 25.8810838,8.09920886 25.8810838,8.87661877 L25.8810838,19.1421018 C25.8810838,19.9195117 25.2717117,20.5652113 24.6179298,20.9539163 L15.3378589,26.0425485 C14.6659163,26.4312534 13.8668496,26.4312534 13.2130677,26.0425485 Z"
+                        id="路径"
+                        fill="url(#linearGradient-7)"
+                        style="mix-blend-mode: multiply"
+                        opacity="0.842558361"
+                    ></path>
+                    <g id="路径">
+                        <use fill="black" fill-opacity="1" filter="url(#filter-10)" xlink:href="#path-9"></use>
+                        <use fill="url(#linearGradient-8)" xlink:href="#path-9"></use>
+                    </g>
+                    <path
+                        d="M13.3713148,24.5896861 L5.48855651,19.9290442 C4.92786804,19.6162407 4.88108381,18.4541839 4.88108381,17.8285768 L23.0514428,7.88290764 C23.6121312,8.19571116 24.1447738,8.85945733 24.1447738,9.48506437 L24.1447738,18.4246083 C24.1447738,19.0502153 23.8021308,19.6162407 23.2414424,19.9290442 L15.1935523,24.5896861 C14.6172892,24.9024896 13.9320032,24.9024896 13.3713148,24.5896861 Z"
+                        id="路径"
+                        fill="url(#linearGradient-11)"
+                        style="mix-blend-mode: multiply"
+                        opacity="0.355971563"
+                    ></path>
+                </g>
+            </g>
+        </g>
+    </svg>
+</template>
+
+<script>
+export default {
+    props: {
+        level: {
+            type: Number,
+            default: 0
+        }
+    },
+    data() {
+        return {
+            colors: [
+                {
+                    color1: '#DCE2E8',
+                    color2: '#82A0BA',
+                    color3: '#E2E8ED',
+                    color4: '#AEB8C0',
+                    color5: '#98B0C5',
+                    color6: '#839FBA',
+                    color7: '#82A0BC',
+                    color8: '#F3F9FE',
+                    color9: '#DDE3EA',
+                    color10: '#C0DFF9'
+                }
+            ]
+        };
+    }
+};
+</script>
+
+<style></style>

+ 4 - 0
src/mixins/asset.js

@@ -21,6 +21,10 @@ export default {
                 {
                     label: '已转赠',
                     value: 'GIFTED'
+                },
+                {
+                    label: '铸造中',
+                    value: 'MINTING'
                 }
             ]
         };

+ 18 - 2
src/router/index.js

@@ -386,10 +386,18 @@ const routes = [
             title: '第九空间'
         }
     },
+    {
+        path: '/activityOrders',
+        name: 'activityOrders',
+        component: () => import('../views/order/ActivityOrders.vue'),
+        meta: {
+            title: '第九空间'
+        }
+    },
     {
         path: '/activityList',
         name: 'activityList',
-        component: () => import('../views/activity/List.vue'),
+        component: () => import('../views/activity/List1.vue'),
         meta: {
             pageType: Page.Every,
             title: '第九空间',
@@ -399,13 +407,21 @@ const routes = [
     {
         path: '/activityDetail',
         name: 'activityDetail',
-        component: () => import('../views/activity/Detail.vue'),
+        component: () => import('../views/activity/Detail1.vue'),
         meta: {
             pageType: Page.Every,
             title: '第九空间',
             tabColor: '#181818'
         }
     },
+    {
+        path: '/activitySubmit',
+        name: 'activitySubmit',
+        component: () => import('../views/activity/Submit.vue'),
+        meta: {
+            title: '第九空间'
+        }
+    },
     {
         path: '/chooseProduct',
         name: 'chooseProduct',

+ 1 - 1
src/views/Store.vue

@@ -179,7 +179,7 @@ export default {
         },
         status() {
             if (this.active === 'explore') {
-                return 'NORMAL,TRADING,GIFTING';
+                return 'NORMAL,TRADING,GIFTING,MINTING';
             } else if (this.active === 'creator') {
                 return 'TRANSFERRED';
             } else {

+ 62 - 35
src/views/activity/ChooseProduct.vue

@@ -4,9 +4,12 @@
             <div class="top">
                 <div class="title">选择兑换藏品</div>
                 <div class="sub">
-                    <div>
+                    <div v-if="needChoose">
                         请选择<span class="prim">{{ needChoose }}款{{ search }}藏品</span>进行铸造
                     </div>
+                    <div v-else>
+                        请选择<span class="prim">{{ search }}藏品</span>进行铸造
+                    </div>
                     <div>
                         符合条件藏品 <span class="total">{{ list.length }}个</span>
                     </div>
@@ -75,12 +78,13 @@ export default {
             list: [],
             chooseIds: [],
             needChoose: 3,
-            search: ''
+            search: '',
+            activityId: 0
         };
     },
     computed: {
         canNext() {
-            return this.chooseIds.length === this.needChoose;
+            return this.needChoose === 0 || this.chooseIds.length === this.needChoose;
         },
         showTips() {
             return this.list.length < this.needChoose && !this.empty;
@@ -94,26 +98,39 @@ export default {
             message: '加载中...',
             forbidClick: true
         });
-        this.$http
-            .post(
-                '/asset/all',
-                {
-                    page: 0,
-                    size: 99,
-                    query: { status: 'NORMAL,TRADING,GIFTING', userId: this.$store.state.userInfo.id },
-                    search: this.search
-                },
-                { body: 'json' }
-            )
-            .then(res => {
-                this.list = res.content;
-                this.empty = res.empty;
-            })
-            .then(() => {
-                this.$toast.clear();
+
+        if (this.$route.query.activityId) {
+            this.activityId = this.$route.query.activityId;
+            this.$http.get('/mintActivity/get/' + this.$route.query.activityId).then(res => {
+                this.needChoose = res.num;
+                this.search = res.collectionName;
+                this.getList();
             });
+        } else {
+            this.getList();
+        }
     },
     methods: {
+        getList() {
+            this.$http
+                .post(
+                    '/asset/all',
+                    {
+                        page: 0,
+                        size: 99,
+                        query: { status: 'NORMAL,TRADING,GIFTING', userId: this.$store.state.userInfo.id },
+                        search: this.search
+                    },
+                    { body: 'json' }
+                )
+                .then(res => {
+                    this.list = res.content;
+                    this.empty = res.empty;
+                })
+                .then(() => {
+                    this.$toast.clear();
+                });
+        },
         choose(id) {
             let chooseIds = [...this.chooseIds];
             if (chooseIds.includes(id)) {
@@ -148,23 +165,33 @@ export default {
                     allowHtml: true
                 })
                 .then(() => {
-                    this.$toast.loading({
-                        message: '加载中...',
-                        forbidClick: true
-                    });
-                    this.$http
-                        .post('/mintOrder/create', {
-                            assets: this.chooseIds.join(',')
-                        })
-                        .then(res => {
-                            this.$toast.clear();
-                            this.submitSuc();
-                        })
-                        .catch(e => {
-                            if (e && e.error) {
-                                this.$toast(e.error);
+                    if (this.activityId) {
+                        this.$router.push({
+                            path: '/activitySubmit',
+                            query: {
+                                assets: this.chooseIds.join(','),
+                                activityId: this.activityId
                             }
                         });
+                    } else {
+                        this.$toast.loading({
+                            message: '加载中...',
+                            forbidClick: true
+                        });
+                        this.$http
+                            .post('/mintOrder/create', {
+                                assets: this.chooseIds.join(',')
+                            })
+                            .then(res => {
+                                this.$toast.clear();
+                                this.submitSuc();
+                            })
+                            .catch(e => {
+                                if (e && e.error) {
+                                    this.$toast(e.error);
+                                }
+                            });
+                    }
                 });
         }
     }

+ 13 - 5
src/views/activity/Detail copy.vue → src/views/activity/Detail1.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="activity">
-        <van-image v-for="(item, index) in info.detail" fit="scale-down" width="100%" :key="index" :src="item" />
+        <div class="detail" v-html="info.detail"></div>
         <div class="action-btn">
             <van-notice-bar
                 color="#FF4F50"
@@ -10,10 +10,10 @@
 
             <div class="info">
                 <div class="text1">限量</div>
-                <div>155份</div>
+                <div>{{ info.total }}份</div>
             </div>
             <div class="info">
-                <div>剩余 155</div>
+                <div>剩余 {{ info.stock }}</div>
             </div>
 
             <div class="flex1"></div>
@@ -30,13 +30,13 @@ export default {
         };
     },
     mounted() {
-        this.$http.get('/activity/get/' + this.$route.query.id).then(res => {
+        this.$http.get('/mintActivity/get/' + this.$route.query.id).then(res => {
             this.info = res;
         });
     },
     methods: {
         goBuild() {
-            this.$router.push('/chooseProduct');
+            this.$router.push('/chooseProduct?name=' + this.info.collectionName + '&activityId=' + this.info.id);
         }
     }
 };
@@ -116,4 +116,12 @@ export default {
         justify-content: center;
     }
 }
+.detail {
+    // background-color: #181818;
+    overflow: hidden;
+    img {
+        width: 100%;
+        display: block;
+    }
+}
 </style>

+ 4 - 4
src/views/activity/List copy.vue → src/views/activity/List1.vue

@@ -22,7 +22,7 @@
                     />
                     <div class="content">
                         <div class="text1">{{ item.name }}</div>
-                        <div class="text2">限量155份</div>
+                        <div class="text2">限量{{ item.total }}份</div>
                         <div class="btn">
                             <span>立即兑换</span>
                             <img src="../../assets/icon-jiantou.png" alt="" />
@@ -46,7 +46,7 @@ export default {
         return {
             list: [],
             empty: false,
-            url: '/activity/all'
+            url: '/mintActivity/all'
         };
     },
     computed: {
@@ -80,7 +80,7 @@ export default {
         background-position: top;
         background-size: 100% 500px;
         background-repeat: no-repeat;
-        top: 50px;
+        // top: 50px;
     }
 }
 .activity {
@@ -133,6 +133,6 @@ export default {
     padding: 13px 0;
     text-align: center;
     position: relative;
-    background-color: #181818;
+    background-color: #18181833;
 }
 </style>

+ 543 - 0
src/views/activity/Submit.vue

@@ -0,0 +1,543 @@
+<template>
+    <div class="submit">
+        <div class="address" v-if="!info.airDrop">
+            <div class="van-address-item van-contact-card" @click="onAdd">
+                <div class="van-cell van-cell--borderless">
+                    <div class="van-cell__value van-cell__value--alone van-address-item__value">
+                        <div role="radio" class="van-radio" tabindex="0" aria-checked="false">
+                            <span class="van-radio__label" v-if="addressInfo.id">
+                                <div class="van-address-item__name">{{ showAddress.name }} {{ showAddress.tel }}</div>
+                                <div class="van-address-item__address">{{ showAddress.address }}</div>
+                            </span>
+                            <span class="van-radio__label tips" v-else> 选择收货地址 </span>
+                        </div>
+                    </div>
+                    <i class="van-badge__wrapper van-icon van-icon-arrow van-address-item__edit"></i>
+                </div>
+            </div>
+        </div>
+        <div class="assets">
+            <div class="assets-title">
+                <div class="text1">藏品权益使用—铸造</div>
+                <div class="text2">商品的铸造将会销毁对应藏品,请谨慎选择</div>
+            </div>
+
+            <div class="assets-product" v-for="item in list" :key="item.id">
+                <van-image width="60" height="60" radius="6" :src="getImg(changeImgs(item.pic))" fit="cover" />
+                <div class="assets-info">
+                    <div class="text1">{{ item.name }}</div>
+                    <div class="flex1"></div>
+                    <div class="text2" v-if="item.category">类型:{{ item.category }}</div>
+                    <div class="text2" v-if="item.number">编号:{{ item.number }}</div>
+                </div>
+            </div>
+        </div>
+
+        <div class="pay" v-if="!$store.state.review">
+            <div class="pay-item" @click="payType = item.type" v-for="(item, index) in payInfos" :key="index">
+                <img :src="item.icon" alt="" />
+                <span>{{ item.name }}</span>
+                <img class="choose-icon" :src="payType === item.type ? icons[1] : icons[0]" alt="" />
+            </div>
+        </div>
+
+        <div class="bottom van-safe-area-bottom" ref="bottom">
+            <div class="bottom-content">
+                <span class="text">GAS费</span>
+                <span class="price"> <img src="@assets/jiage_huang.png" alt="" />{{ gas }} </span>
+                <div class="btn">
+                    <van-button
+                        round
+                        :color="`linear-gradient(135deg, ${$colors.prim} 0%, ${$colors.warn} 100%)`"
+                        @click="submit"
+                        :disabled="!!orderId"
+                    >
+                        立即支付
+                    </van-button>
+                </div>
+                <a id="pay" :href="hrefUrl"></a>
+                <!-- <wx-open-launch-weapp id="launch-btn" :username="launchName" :path="launchPath"> </wx-open-launch-weapp> -->
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import asset from '../../mixins/asset';
+import product from '../../mixins/product';
+import resolveUrl from 'resolve-url';
+let inWeixin = /micromessenger/i.test(navigator.userAgent);
+let inApp = /#cordova#/i.test(navigator.userAgent);
+let inIos = /iPhone|iPad|iPod/i.test(navigator.userAgent);
+export default {
+    name: 'activitySubmit',
+    inject: ['setKeeps'],
+    mixins: [asset, product],
+    data() {
+        return {
+            addressInfo: {},
+            list: [],
+            payType: inWeixin ? 'WEIXIN' : 'ALIPAY',
+            payChannel: null,
+            payInfos: [
+                {
+                    icon: require('@assets/svgs/zhifubao.svg'),
+                    name: '支付宝',
+                    type: 'ALIPAY'
+                },
+                {
+                    icon: require('@assets/svgs/wechat.svg'),
+                    name: '微信',
+                    type: 'WEIXIN'
+                }
+                // {
+                //   icon: require("@assets/svgs/png-decp.svg"),
+                //   name: "DCEP",
+                // },
+            ],
+            icons: [require('@assets/svgs/icon_gouxuan_huise.svg'), require('@assets/icon_gouxuan_pre.png')],
+            inWeixin,
+            inApp,
+            inIos,
+            gas: 1,
+            enable_wx_lite: false,
+            enable_wx_pub: false,
+            assets: '',
+            activityId: 0,
+            orderId: 0,
+            hrefUrl: '',
+            timer: null,
+            info: {}
+        };
+    },
+    computed: {
+        showAddress() {
+            if (this.addressInfo.id) {
+                return {
+                    id: this.addressInfo.id,
+                    name: this.addressInfo.name,
+                    tel: this.addressInfo.phone,
+                    address: `${this.addressInfo.provinceName} ${this.addressInfo.cityName} ${this.addressInfo.districtName} ${this.addressInfo.address}`,
+                    isDefault: this.addressInfo.def
+                };
+            } else {
+                return {};
+            }
+        }
+    },
+    mounted() {
+        this.emitter.on('updateChoose', info => {
+            // console.log(id);
+            this.addressInfo = info;
+        });
+        if (this.$route.query.assets) {
+            this.assets = this.$route.query.assets;
+            this.activityId = this.$route.query.activityId;
+            this.getProduct(this.$route.query.assets.split(','));
+            this.$http.get('/mintActivity/get/' + this.activityId).then(res => {
+                this.info = res;
+
+                this.$http
+                    .post(
+                        '/userAddress/all',
+                        {
+                            query: {
+                                userId: this.$store.state.userInfo.id,
+                                del: false,
+                                def: true
+                            },
+                            size: 99
+                        },
+                        { body: 'json' }
+                    )
+                    .then(res => {
+                        if (!res.empty) {
+                            this.addressInfo = res.content[0];
+                        }
+                    });
+            });
+        }
+
+        Promise.all([
+            this.$http.get('/sysConfig/get/gas_fee').then(res => {
+                this.gas = res.value;
+                if (this.$store.state.review) {
+                    this.gas = 0;
+                }
+                return Promise.resolve();
+            }),
+            inWeixin
+                ? this.$http.get('/sysConfig/get/enable_wx_pub').then(res => {
+                      this.enable_wx_pub = res.value.split(',').findIndex(i => i === this.$route.query.id) > -1;
+                      return Promise.resolve();
+                  })
+                : Promise.resolve(),
+            this.$http.get('/sysConfig/get/enable_wx_lite').then(res => {
+                this.enable_wx_lite =
+                    res.value.split(',').findIndex(i => i === this.$route.query.id) > -1 &&
+                    !/AliApp/i.test(navigator.userAgent);
+                return Promise.resolve();
+            })
+        ]).then(() => {
+            if (!(this.enable_wx_lite || this.enable_wx_pub)) {
+                this.payInfos.splice(1, 1);
+                this.payType = 'ALIPAY';
+            } else if (this.enable_wx_pub) {
+                this.payChannel = 'wx_pub';
+            } else {
+                this.payChannel = 'wx_lite';
+            }
+        });
+    },
+    methods: {
+        onAdd() {
+            this.$router.push('/mineAddress?page=submit&chooseId=' + this.addressInfo.id);
+        },
+        getOrder(next = false) {
+            this.$http.get('/notify/adapay/mintOrder/' + this.orderId).then(res => {
+                this.info = res;
+                if (this.timer) {
+                    clearTimeout(this.timer);
+                }
+                if (res.status === 'PROCESSING' || res.status === 'FINISH' || res.status === 'CANCELLED') {
+                    this.$toast.clear();
+                    this.$dialog
+                        .alert({
+                            title: '提示',
+                            message:
+                                res.status === 'CANCELLED' ? '订单支付失败,点击重新下单' : '订单已支付,点击查看订单详情'
+                        })
+                        .then(() => {
+                            if (res.status === 'CANCELLED') {
+                                this.$router.back();
+                            } else {
+                                this.$router.replace('/activityOrderDetail?id=' + res.id);
+                            }
+                            // on close
+                        });
+                } else if (next) {
+                    this.timer = setTimeout(() => {
+                        this.getOrder(next);
+                    }, 1000);
+                }
+            });
+        },
+        getProduct(list = [], index = 0) {
+            if (index >= list.length) {
+                return;
+            }
+            this.$http.get('/asset/get/' + list[index]).then(res => {
+                this.list.push(res);
+                this.getProduct(list, index + 1);
+            });
+        },
+        createOrder() {
+            if (!this.addressInfo.id && !this.info.airDrop) {
+                this.$toast('请选择收货地址');
+                return;
+            }
+            if (!this.payType) {
+                this.$toast('请选择支付方式');
+                return;
+            }
+            this.$toast.loading('请不要离开当前页面');
+
+            return this.$http
+                .post('/mintOrder/create', {
+                    assets: this.assets,
+                    mintActivityId: this.activityId,
+                    addressId: this.addressInfo.id,
+                    invitor: sessionStorage.getItem('invitor')
+                })
+                .then(res => {
+                    return Promise.resolve(res);
+                })
+                .catch(e => {
+                    return Promise.reject(e);
+                });
+        },
+        submit() {
+            if (!this.payType) {
+                this.$toast('请选择支付方式');
+                return;
+            }
+            this.createOrder()
+                .then(res => {
+                    this.$toast.clear();
+                    this.orderId = res;
+                    this.$router.replace({ query: { ...this.$route.query, orderId: res } });
+                    this.$nextTick(() => {
+                        if (this.$store.state.review) {
+                            window.store.order('358');
+                            this.getOrder(true);
+                        } else if (this.payType === 'ALIPAY') {
+                            if (this.inWeixin) {
+                                document.location.replace(
+                                    resolveUrl(this.$baseUrl, '/payOrder/mint/alipay_wx?id=' + res)
+                                );
+                            } else {
+                                this.$http
+                                    .get(`/payOrder/mint/${this.inApp ? 'alipay_app' : 'alipay_h5'}?id=${res}`)
+                                    .then(res => {
+                                        this.$toast.clear();
+                                        this.hrefUrl = 'alipays://platformapi/startapp?saId=10000007&qrcode=' + res;
+                                        // window.open(
+                                        //     'alipays://platformapi/startapp?saId=10000007&qrcode=' + res,
+                                        //     '_blank'
+                                        // );
+                                        this.$nextTick(() => {
+                                            document.getElementById('pay').click();
+                                        });
+
+                                        this.$toast.loading({
+                                            message: '加载中...',
+                                            forbidClick: true
+                                        });
+                                        this.getOrder(true);
+                                    })
+                                    .catch(e => {
+                                        if (e.error) {
+                                            this.$toast(e.error);
+                                        }
+                                    });
+                            }
+                        } else if (this.payType === 'WEIXIN') {
+                            this.$toast.loading('加载中');
+                            this.$http
+                                .post('/payOrder/mint/weixin', {
+                                    id: res,
+                                    channel: this.payChannel,
+                                    openId: localStorage.getItem('openId') || 'oWJG55wLnwdVzXoKka1-DzQKOd_Y'
+                                })
+                                .then(res => {
+                                    if ('wx_pub' === this.payChannel) {
+                                        console.log('wxPayParams', res);
+                                        wx.chooseWXPay({
+                                            ...res,
+                                            success(res) {
+                                                this.$toast.success('支付成功');
+                                                setTimeout(() => {
+                                                    this.$router.replace('/orders');
+                                                }, 1000);
+                                            },
+                                            fail(e) {
+                                                console.log(e);
+                                                this.$toast('支付失败,请稍后再试');
+                                            }
+                                        });
+                                    } else {
+                                        this.$toast.clear();
+                                        this.hrefUrl = res.scheme_code;
+                                        this.$nextTick(() => {
+                                            document.getElementById('pay').click();
+                                        });
+
+                                        this.$toast.loading({
+                                            message: '加载中...',
+                                            forbidClick: true
+                                        });
+                                        this.getOrder(true);
+                                    }
+                                    // console.log({
+                                    //     ...res,
+                                    //     package: res.package || res.packageValue
+                                    // });
+                                    // let _this = this;
+                                    // wx.chooseWXPay({
+                                    //     ...res,
+                                    //     package: res.package || res.packageValue,
+                                    //     timestamp: res.timeStamp,
+                                    //     success(res) {
+                                    //         _this.$toast.success('支付成功');
+                                    //         setTimeout(() => {
+                                    //             _this.$router.replace('/orders');
+                                    //         }, 1000);
+                                    //     },
+                                    //     fail(e) {
+                                    //         console.log(e);
+                                    //         _this.$toast('支付失败,请稍后再试');
+                                    //     }
+                                    // });
+                                })
+                                .catch(e => {
+                                    this.$toast(e.error || '支付失败请稍后再试');
+                                });
+                        }
+                    });
+                })
+                .catch(e => {
+                    if (e) {
+                        this.$toast(e.error);
+                    }
+                });
+        }
+    },
+    beforeRouteLeave(to, from, next) {
+        if (to.path === '/mineAddress') {
+            this.setKeeps(['activitySubmit']);
+        } else {
+            this.setKeeps(['activitySubmit'], false);
+        }
+        next();
+    }
+};
+</script>
+
+<style lang="less" scoped>
+.hr {
+    width: 100%;
+    height: 6px;
+    display: block;
+}
+
+.address {
+    .van-address-item {
+        position: relative;
+        padding: 20px 16px 26px;
+        .van-radio__label {
+            margin-left: 0;
+        }
+        .van-address-item__edit {
+            right: 0;
+            color: @text3;
+            &::before {
+                color: @text3;
+            }
+        }
+
+        &::before {
+            height: 6px;
+            background-size: 120px;
+        }
+    }
+    .tips {
+        color: @text3;
+    }
+}
+
+.submit {
+    background-color: @bg3;
+    padding-bottom: 100px;
+}
+.assets {
+    background-color: @bg;
+    padding: 16px;
+}
+.assets-title {
+    .text1 {
+        font-size: 14px;
+        color: #000000;
+        line-height: 24px;
+    }
+    .text2 {
+        font-size: 12px;
+        color: #ff4f50;
+    }
+}
+
+.assets-product {
+    display: flex;
+    margin: 6px 0;
+
+    .assets-info {
+        display: flex;
+        flex-direction: column;
+        flex-grow: 1;
+        margin-left: 12px;
+        .text1 {
+            font-size: 12px;
+            color: #000000;
+            line-height: 24px;
+        }
+
+        .text2 {
+            font-size: 12px;
+            color: #939599;
+            line-height: 17px;
+        }
+    }
+
+    &:last-child {
+        margin-bottom: 0;
+    }
+}
+
+.pay-item {
+    display: flex;
+    align-items: center;
+    height: 48px;
+    border-bottom: 1px solid @tabBorder;
+    span {
+        font-size: 14px;
+        font-weight: bold;
+        color: @text0;
+        line-height: 24px;
+        flex-grow: 1;
+        padding: 0 10px;
+    }
+    .choose-icon {
+        width: 24px;
+        height: 24px;
+    }
+}
+.pay {
+    padding: 0 16px;
+    background-color: @bg;
+}
+
+.bottom {
+    position: fixed;
+    bottom: 0px;
+    left: 0;
+    right: 0;
+    background-color: @bg;
+    z-index: 20;
+    border-top: 1px solid @tabBorder;
+
+    .bottom-content {
+        padding: 6px 16px;
+        display: flex;
+        align-items: flex-end;
+
+        .btn {
+            flex-grow: 1;
+            display: flex;
+            justify-content: flex-end;
+        }
+        .van-button {
+            flex-grow: 1;
+            color: @btnText !important;
+            max-width: 132px;
+        }
+        .text {
+            font-size: 14px;
+            color: @text3;
+            line-height: 20px;
+            word-break: keep-all;
+        }
+
+        .price {
+            font-size: 34px;
+            font-family: OSP;
+            font-weight: normal;
+            color: @prim;
+            line-height: 30px;
+            display: flex;
+            align-items: center;
+
+            // flex-grow: 1;
+            margin: 0 6px;
+            .font_family {
+                font-size: 10px;
+            }
+
+            img {
+                width: 10px;
+                height: 11px;
+                display: block;
+                margin-top: 8px;
+            }
+        }
+    }
+}
+</style>

+ 184 - 0
src/views/order/ActivityOrders.vue

@@ -0,0 +1,184 @@
+<template>
+    <div class="discover">
+        <van-sticky ref="top" :offset-top="bar.value.show ? 46 : 0">
+            <!-- <div class="top">
+                <div class="top-btn">
+                    <div class="btn" :class="{ active: type === 'DEFAULT' }" @click="changeActive('DEFAULT')">
+                        作品订单
+                    </div>
+                    <div class="btn" :class="{ active: type === 'BLIND_BOX' }" @click="changeActive('BLIND_BOX')">
+                        盲盒订单
+                    </div>
+                </div>
+            </div> -->
+
+            <van-tabs v-model:active="status" :ellipsis="false" line-width="16" line-height="2" @click="changeStatus">
+                <van-tab v-for="(item, index) in tabs" :key="index" :title="item.name" :name="item.status"></van-tab>
+            </van-tabs>
+        </van-sticky>
+
+        <van-list class="list" v-model:loading="loading" :finished="finished" finished-text="" @load="getData">
+            <order-info @delFn="delFn" v-for="item in list" :key="item.id" :info="item"></order-info>
+            <van-empty v-if="empty" description="你还没有订单哦~" :image="require('@assets/kong_png_wudingdan.png')" />
+        </van-list>
+    </div>
+</template>
+
+<script>
+import OrderInfo from '../../components/order/OrderInfo.vue';
+import list from '../../mixins/list';
+export default {
+    name: 'discover',
+    inject: ['bar'],
+    mixins: [list],
+    components: {
+        OrderInfo
+    },
+    data() {
+        return {
+            active: 'explore',
+            stiky: null,
+            status: 'PROCESSING,FINISH',
+            type: 'DEFAULT',
+            list: [],
+            tabs: [
+                {
+                    status: 'PROCESSING,FINISH',
+                    name: '全部'
+                },
+                {
+                    status: 'PROCESSING',
+                    name: '交易中'
+                },
+                {
+                    status: 'FINISH',
+                    name: '已完成'
+                }
+            ],
+            url: '/mintOrder/all'
+        };
+    },
+    mounted() {
+        if (this.$route.query.status) {
+            this.status = this.$route.query.status;
+        }
+    },
+    methods: {
+        beforeData() {
+            return {
+                query: {
+                    userId: this.$store.state.userInfo.id,
+                    // status: this.status,
+                    // type: this.type,
+                    hide: false,
+                    del: false
+                }
+            };
+        },
+        delFn() {
+            console.log('删除成功');
+            this.getData(true);
+            this.beforeData();
+        },
+        changeStatus(name) {
+            this.$router.replace({
+                path: '/orders',
+                query: {
+                    status: name,
+                    type: this.type
+                }
+            });
+            this.getData(true);
+        },
+        changeActive(type) {
+            this.$router.replace({
+                path: '/orders',
+                query: {
+                    status: this.status,
+                    type: type
+                }
+            });
+            this.type = type;
+            this.getData(true);
+        }
+    }
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+    display: flex;
+    padding: 10px 16px;
+    background-color: @bg;
+    align-items: center;
+    .top-btn {
+        flex-grow: 1;
+        .flex();
+        .btn {
+            font-size: @font3;
+            line-height: 26px;
+            display: inline-block;
+            vertical-align: text-bottom;
+
+            &.active {
+                color: @prim;
+                font-size: @font3;
+                font-weight: bold;
+                line-height: 30px;
+            }
+        }
+
+        .btn + .btn {
+            margin-left: 30px;
+        }
+    }
+}
+
+.discover {
+    background-color: @bg3;
+    min-height: 100vh;
+}
+
+.list {
+    padding-bottom: 100px;
+}
+
+/deep/.van-tabs__nav--line.van-tabs__nav--complete {
+    border-color: @tabBorder;
+}
+.grid-img {
+    display: block;
+}
+.van-grid {
+    margin-top: 12px;
+}
+/deep/ .van-grid-item__content {
+    padding: 14px 20px 16px;
+}
+/deep/ .van-grid-item__text {
+    color: #fff;
+    font-size: 13px;
+    line-height: 18px;
+    margin-top: 4px;
+}
+
+.title {
+    padding: 16px 20px 8px;
+    color: @prim;
+    font-size: 18px;
+    font-weight: bold;
+}
+
+.box-list {
+    // display: flex;
+    // flex-wrap: wrap;
+    padding: 0 8px;
+}
+
+.discover {
+    padding-bottom: 50px;
+}
+.van-tabs {
+    background-color: @bg;
+}
+</style>

+ 22 - 3
src/views/user/Address.vue

@@ -1,13 +1,15 @@
 <template>
     <div class="address">
-        <div class="title">我的地址</div>
+        <div class="title" v-if="page !== 'submit'">我的地址</div>
         <van-address-list
+            v-model="chooseId"
             :class="{ emptyList: empty }"
-            :switchable="false"
+            :switchable="page === 'submit'"
             :list="showList"
             default-tag-text="默认"
             @add="onAdd"
             @edit="onEdit"
+            @select="selectItem"
         />
         <van-empty :image="require('@assets/kong_png_wudizhi.png')" v-if="empty" description="你还没有收货地址哦~">
             <van-button @click="onAdd" round type="primary" class="bottom-button">新增地址</van-button>
@@ -19,7 +21,9 @@ export default {
     data() {
         return {
             list: [],
-            empty: false
+            empty: false,
+            page: '',
+            chooseId: ''
         };
     },
     computed: {
@@ -38,6 +42,12 @@ export default {
         }
     },
     mounted() {
+        if (this.$route.query.page) {
+            this.page = this.$route.query.page;
+        }
+        if (this.$route.query.chooseId) {
+            this.chooseId = this.$route.query.chooseId;
+        }
         this.$http
             .post(
                 '/userAddress/all',
@@ -61,6 +71,10 @@ export default {
         },
         onEdit(info) {
             this.$router.push('/mineAddressEdit?id=' + info.id);
+        },
+        selectItem(info, index) {
+            this.$router.go(-1);
+            this.emitter.emit('updateChoose', this.list[index]);
         }
     }
 };
@@ -113,4 +127,9 @@ export default {
         display: none;
     }
 }
+
+/deep/.van-address-item .van-radio__icon--checked .van-icon {
+    background-color: @prim;
+    border-color: @prim;
+}
 </style>