FengChaoYu 3 anos atrás
pai
commit
e50fb08144

+ 22 - 22
package-lock.json

@@ -4677,7 +4677,7 @@
       "dependencies": {
         "define-property": {
           "version": "0.2.5",
-          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz",
           "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
           "dev": true,
           "requires": {
@@ -6489,9 +6489,9 @@
       "dev": true
     },
     "element-ui": {
-      "version": "2.15.7",
-      "resolved": "https://registry.npmmirror.com/element-ui/-/element-ui-2.15.7.tgz",
-      "integrity": "sha512-+J6rnXajxzLwV6w8Q6bf7Yqzk1FO1ewbIrCy/4B5alnd7tj8WEpfQoAvISirVaUGVGy77d9Ji3o2bF4f0AsJLQ==",
+      "version": "2.13.2",
+      "resolved": "https://registry.npmmirror.com/element-ui/-/element-ui-2.13.2.tgz",
+      "integrity": "sha512-r761DRPssMPKDiJZWFlG+4e4vr0cRG/atKr3Eqr8Xi0tQMNbtmYU1QXvFnKiFPFFGkgJ6zS6ASkG+sellcoHlQ==",
       "requires": {
         "async-validator": "~1.8.1",
         "babel-helper-vue-jsx-merge-props": "^2.0.0",
@@ -10554,7 +10554,7 @@
       "dependencies": {
         "lodash": {
           "version": "4.17.4",
-          "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
+          "resolved": "https://registry.nlark.com/lodash/download/lodash-4.17.4.tgz",
           "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
           "dev": true
         }
@@ -13264,7 +13264,7 @@
       "dependencies": {
         "jsesc": {
           "version": "0.5.0",
-          "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
+          "resolved": "https://registry.npm.taobao.org/jsesc/download/jsesc-0.5.0.tgz?cache=0&sync_timestamp=1603900010788&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjsesc%2Fdownload%2Fjsesc-0.5.0.tgz",
           "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
           "dev": true
         }
@@ -13505,13 +13505,13 @@
         },
         "has-flag": {
           "version": "2.0.0",
-          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
+          "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-2.0.0.tgz",
           "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
           "dev": true
         },
         "supports-color": {
           "version": "4.5.0",
-          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz",
+          "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-4.5.0.tgz?cache=0&sync_timestamp=1618560983872&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-4.5.0.tgz",
           "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=",
           "dev": true,
           "requires": {
@@ -13860,7 +13860,7 @@
         },
         "http-errors": {
           "version": "1.6.3",
-          "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
+          "resolved": "https://registry.npm.taobao.org/http-errors/download/http-errors-1.6.3.tgz",
           "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
           "dev": true,
           "requires": {
@@ -13872,7 +13872,7 @@
         },
         "inherits": {
           "version": "2.0.3",
-          "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+          "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz",
           "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
           "dev": true
         },
@@ -14081,7 +14081,7 @@
       "dependencies": {
         "is-fullwidth-code-point": {
           "version": "2.0.0",
-          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+          "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz?cache=0&sync_timestamp=1618552489864&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-fullwidth-code-point%2Fdownload%2Fis-fullwidth-code-point-2.0.0.tgz",
           "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
           "dev": true
         }
@@ -14114,7 +14114,7 @@
         },
         "define-property": {
           "version": "0.2.5",
-          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz",
           "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
           "dev": true,
           "requires": {
@@ -14706,13 +14706,13 @@
       "dependencies": {
         "ansi-regex": {
           "version": "2.1.1",
-          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+          "resolved": "https://registry.nlark.com/ansi-regex/download/ansi-regex-2.1.1.tgz",
           "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
           "dev": true
         },
         "ansi-styles": {
           "version": "2.2.1",
-          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
+          "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-2.2.1.tgz",
           "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
           "dev": true
         },
@@ -14736,7 +14736,7 @@
         },
         "chalk": {
           "version": "1.1.3",
-          "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+          "resolved": "https://registry.nlark.com/chalk/download/chalk-1.1.3.tgz?cache=0&sync_timestamp=1618995367379&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-1.1.3.tgz",
           "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
           "dev": true,
           "requires": {
@@ -14749,7 +14749,7 @@
           "dependencies": {
             "supports-color": {
               "version": "2.0.0",
-              "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+              "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-2.0.0.tgz?cache=0&sync_timestamp=1618560983872&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-2.0.0.tgz",
               "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
               "dev": true
             }
@@ -14769,7 +14769,7 @@
         },
         "has-flag": {
           "version": "1.0.0",
-          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
+          "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-1.0.0.tgz",
           "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=",
           "dev": true
         },
@@ -14834,7 +14834,7 @@
         },
         "strip-ansi": {
           "version": "3.0.1",
-          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+          "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz?cache=0&sync_timestamp=1618553320591&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-3.0.1.tgz",
           "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
           "dev": true,
           "requires": {
@@ -14843,7 +14843,7 @@
         },
         "supports-color": {
           "version": "3.2.3",
-          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
+          "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-3.2.3.tgz?cache=0&sync_timestamp=1618560983872&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-3.2.3.tgz",
           "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=",
           "dev": true,
           "requires": {
@@ -14875,7 +14875,7 @@
       "dependencies": {
         "deepmerge": {
           "version": "1.3.2",
-          "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.3.2.tgz",
+          "resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.3.2.tgz",
           "integrity": "sha1-FmNpFinU2/42T6EqKk8KqGqjoFA=",
           "dev": true
         }
@@ -14900,7 +14900,7 @@
       "dependencies": {
         "deepmerge": {
           "version": "1.3.2",
-          "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.3.2.tgz",
+          "resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.3.2.tgz",
           "integrity": "sha1-FmNpFinU2/42T6EqKk8KqGqjoFA=",
           "dev": true
         }
@@ -15029,7 +15029,7 @@
         },
         "is-fullwidth-code-point": {
           "version": "2.0.0",
-          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+          "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz?cache=0&sync_timestamp=1618552489864&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-fullwidth-code-point%2Fdownload%2Fis-fullwidth-code-point-2.0.0.tgz",
           "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
           "dev": true
         },

+ 1 - 1
package.json

@@ -18,7 +18,7 @@
     "clipboard": "^2.0.8",
     "core-js": "3.6.5",
     "echarts": "^5.1.1",
-    "element-ui": "2.15.7",
+    "element-ui": "2.13.2",
     "js-cookie": "2.2.0",
     "normalize.css": "7.0.0",
     "nprogress": "0.2.0",

+ 0 - 79
src/components/Mall/Member/member-account.vue

@@ -1,79 +0,0 @@
-<template>
-  <div>
-    <div class="table">
-      <el-table ref="orderTable" v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-        
-        <el-table-column align="center" label="收益金额" prop="amount"></el-table-column>
-        <el-table-column align="center" label="发生方式" prop="">
-          分享
-        </el-table-column>
-        <el-table-column align="center" label="发生时间" prop="createTime"></el-table-column>
-      </el-table>
-    </div>
-    <div class="pagination clearfix">
-      <div class="fr">
-        <el-pagination
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="currentPage"
-          :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="listTotal">
-        </el-pagination>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import {getMemberAccountList} from "@/api/member";
-
-export default {
-  name: 'MemberAccount',
-  componentName: 'MemberAccount',
-  props: ['user'],
-  data() {
-    return {
-      dataList: [], // 数据列表
-      listLoading: true, // 列表加载loading
-      currentPage: 1, // 当前页码
-      pageSize: 10, // 每页数量
-      listTotal: 0 // 列表总数
-    }
-  },
-  created() {
-    this.getAccountList();
-  },
-  methods: {
-    getAccountList() {
-      let params = {
-        userId: this.user.userId,
-        pageNum: this.currentPage,
-        pageSize: this.pageSize
-      }
-
-      getMemberAccountList(params).then(res => {
-        this.dataList = res.data.records
-        this.listTotal = res.data.total
-        this.listLoading = false
-      })
-    },
-    // 更改每页数量
-    handleSizeChange(val) {
-      this.pageSize = val
-      this.currentPage = 1
-      this.getList()
-    },
-    // 更改当前页
-    handleCurrentChange(val) {
-      this.currentPage = val
-      this.getList()
-    },
-  }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 89
src/components/Mall/Member/member-address.vue

@@ -1,89 +0,0 @@
-<template>
-  <div class="address-list">
-    <div class="table">
-      <el-table
-        ref="orderTable"
-        v-loading="listLoading"
-        :data="dataList"
-        element-loading-text="Loading"
-        border
-        fit
-        highlight-current-row stripe
-      >
-        <el-table-column align="center" label="收货人" prop="name"></el-table-column>
-        <el-table-column align="center" label="手机号" prop="phone"></el-table-column>
-        <el-table-column align="center" label="地址信息" prop="address" min-width="200"></el-table-column>
-        <el-table-column align="center" label="是否默认地址" prop="defaultAddr">
-          <template slot-scope="{ row }">
-            {{ row.defaultAddr ? '是' : '否' }}
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <div class="pagination clearfix">
-      <div class="fr">
-        <el-pagination
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="currentPage"
-          :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="listTotal">
-        </el-pagination>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import {getMemberAddressList} from "@/api/member";
-
-export default {
-  name: 'MemberAddress',
-  componentName: 'MemberAddress',
-  props: ['user'],
-  data() {
-    return {
-      dataList: [], // 数据列表
-      listLoading: true, // 列表加载loading
-      currentPage: 1, // 当前页码
-      pageSize: 10, // 每页数量
-      listTotal: 0 // 列表总数
-    }
-  },
-  created() {
-    this.getAddressList()
-  },
-  methods: {
-    getAddressList() {
-      let params = {
-        userId: this.user.userId,
-        pageNum: this.currentPage,
-        pageSize: this.pageSize
-      }
-
-      getMemberAddressList(params).then(res => {
-        this.dataList = res.data.records
-        this.listTotal = res.data.total
-        this.listLoading = false
-      })
-    },
-    // 更改每页数量
-    handleSizeChange(val) {
-      this.pageSize = val
-      this.currentPage = 1
-      this.getList()
-    },
-    // 更改当前页
-    handleCurrentChange(val) {
-      this.currentPage = val
-      this.getList()
-    },
-  }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 98
src/components/Mall/Member/member-browse.vue

@@ -1,98 +0,0 @@
-<template>
-  <div>
-    <div class="table">
-      <el-table ref="orderTable" v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-        <el-table-column align="center" label="商品信息" prop="goodsName" min-width="200">
-          <template slot-scope="scope">
-            <div class="goods-info">
-              <el-image style="width: 40px; height: 40px;" :src="scope.row.imgUrl" :preview-src-list="[scope.row.imgUrl]" fit="cover"></el-image>
-              <div class="name">{{scope.row.goodsName}}</div>
-            </div>
-          </template>
-        </el-table-column>
-        <el-table-column align="center" label="商品价格" prop="goodsPrice"></el-table-column>
-        <el-table-column align="center" label="商品状态" prop="defaultAddr">
-          <template slot-scope="scope">
-            {{ scope.row.status ? '上架' : '下架' }}
-          </template>
-        </el-table-column>
-        <el-table-column align="center" label="浏览时间" prop="createTime"></el-table-column>
-      </el-table>
-    </div>
-    <div class="pagination clearfix">
-      <div class="fr">
-        <el-pagination
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="currentPage"
-          :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="listTotal">
-        </el-pagination>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import {getMemberBrowseList} from "@/api/member";
-
-export default {
-  name: 'MemberBrowse',
-  componentName: 'MemberBrowse',
-  props: ['user'],
-  data() {
-    return {
-      dataList: [], // 数据列表
-      listLoading: true, // 列表加载loading
-      currentPage: 1, // 当前页码
-      pageSize: 10, // 每页数量
-      listTotal: 0 // 列表总数
-    }
-  },
-  created() {
-    this.getBrowseList();
-  },
-  methods: {
-    getBrowseList() {
-      let params = {
-        userId: this.user.userId,
-        pageNum: this.currentPage,
-        pageSize: this.pageSize
-      }
-
-      getMemberBrowseList(params).then(res => {
-        this.dataList = res.data.records
-        this.listTotal = res.data.total
-        this.listLoading = false
-      })
-    },
-    // 更改每页数量
-    handleSizeChange(val) {
-      this.pageSize = val
-      this.currentPage = 1
-      this.getList()
-    },
-    // 更改当前页
-    handleCurrentChange(val) {
-      this.currentPage = val
-      this.getList()
-    },
-  }
-}
-</script>
-
-<style scoped lang="scss">
-  .goods-info {
-    display: flex;
-    align-items: center;
-    .el-image {
-      flex-shrink: 0;
-    }
-    .name {
-      margin-left: 8px;
-      text-align: left;
-    }
-  }
-</style>

+ 0 - 185
src/components/Mall/Member/member-coupon.vue

@@ -1,185 +0,0 @@
-<template>
-  <div class="address-list">
-    <div class="table">
-      <el-table
-        ref="orderTable"
-        v-loading="listLoading"
-        :data="dataList"
-        element-loading-text="Loading"
-        border
-        fit
-        highlight-current-row stripe
-      >
-        <el-table-column align="center" label="券名称" prop="couponName"></el-table-column>
-        <el-table-column align="center" label="面额" prop="couponValue"></el-table-column>
-        <el-table-column align="center" label="券状态" prop="state">
-          <template slot-scope="{ row }">
-            {{ row.state ? '可用' : '不可用' }}
-          </template>
-        </el-table-column>
-        <el-table-column align="center" label="有效时间">
-          <template slot-scope="{ row }">
-            {{ formatDate(row) }}
-          </template>
-        </el-table-column>
-        <el-table-column align="center" label="分享状态" prop="transferType">
-          <template slot-scope="{ row }">
-            {{ row.transferType ? '可分享' : '不可分享' }}
-          </template>
-        </el-table-column>
-        <el-table-column align="center" label="剩余数量" prop="leftShareTimes"></el-table-column>
-        <el-table-column align="center" label="领取明细">
-          <template slot-scope="{ row }">
-            <el-button type="text" @click="openShareDetail(row.id)">查看明细</el-button>
-          </template>
-        </el-table-column>
-        <!-- <el-table-column align="center" label="使用时间" prop="useTime"></el-table-column> -->
-
-      </el-table>
-    </div>
-    <div class="pagination clearfix">
-      <div class="fr">
-        <el-pagination
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="currentPage"
-          :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="listTotal">
-        </el-pagination>
-      </div>
-    </div>
-
-    <!-- 分享详情 -->
-    <el-dialog title="分享详情" :visible.sync="shareDialog" :show-close="false" width="70%" :close-on-click-modal="false">
-      <div class="table" style="margin: 10px 0 20px;">
-        <el-table 
-          v-loading="shareTable_listLoading" 
-          :data="shareTable_dataList" 
-          element-loading-text="Loading" 
-          tooltip-effect="dark" 
-          style="width: 100%" 
-          max-height="270">
-          <el-table-column align="center" prop="userName" label="用户名称" min-width="120" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" prop="mobile" label="电话" min-width="120" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" prop="couponName" label="券名称" min-width="120"></el-table-column>
-          <el-table-column align="center" prop="userPhone" label="数量" min-width="120">
-            <template>
-              1
-            </template>
-          </el-table-column>
-          <el-table-column align="center" prop="receiveTime" label="领取时间" min-width="160"></el-table-column>
-        </el-table>
-      </div>
-      <div class="pagination clearfix">
-        <div class="fr">
-          <el-pagination
-            @current-change="shareTableCurrentChange"
-            :current-page="shareTable_currentPage"
-            :page-size="shareTable_pageSize"
-            background
-            layout="prev, pager, next"
-            :total="shareTable_listTotal">
-          </el-pagination>
-        </div>
-      </div>
-
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="shareDialog = false">关 闭</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import {getMemberCouponList, getShareList} from "@/api/member";
-import {dateFormat} from "@/utils/util"
-
-export default {
-  name: 'MemberCoupon',
-  componentName: 'MemberCoupon',
-  props: ['user'],
-  data() {
-    return {
-      dataList: [], // 数据列表
-      listLoading: true, // 列表加载loading
-      currentPage: 1, // 当前页码
-      pageSize: 10, // 每页数量
-      listTotal: 0, // 列表总数
-
-      detailId: '',
-      shareDialog: false, // 分享详情 - 弹窗
-      shareTable_dataList: null, // 分享详情 - 列表数据
-      shareTable_listLoading: true, // 分享详情 - 列表加载loading
-      shareTable_currentPage: 1, // 分享详情 - 当前页码
-      shareTable_pageSize: 10, // 分享详情 - 每页数量
-      shareTable_listTotal: 0, // 分享详情 - 列表总数
-    }
-  },
-  created() {
-    this.getCouponList()
-  },
-  methods: {
-    getCouponList() {
-      let params = {
-        userId: this.user.userId,
-        pageNum: this.currentPage,
-        pageSize: this.pageSize
-      }
-
-      getMemberCouponList(params).then(res => {
-        this.dataList = res.data.records
-        this.listTotal = res.data.total
-        this.listLoading = false
-      })
-    },
-    // 更改每页数量
-    handleSizeChange(val) {
-      this.pageSize = val
-      this.currentPage = 1
-      this.getCouponList()
-    },
-    // 更改当前页
-    handleCurrentChange(val) {
-      this.currentPage = val
-      this.getCouponList()
-    },
-    formatDate(row) {
-      return dateFormat('YYYY.mm.dd', new Date(row.activeStartTime)) + ' - ' + dateFormat('YYYY.mm.dd', new Date(row.activeEndTime))
-    },
-
-    // 分享详情 - 获取列表
-    getShareList() {
-      getShareList({
-        pageNo: this.shareTable_currentPage,
-        pageSize: this.shareTable_pageSize,
-        userCouponId: this.detailId,
-        // userId: this.user.userId,
-      }).then(res => {
-        this.shareTable_dataList = res.data.records;
-        this.shareTable_listTotal = res.data.total;
-        this.shareTable_listLoading = false;
-      })
-    },
-
-    // 分享详情 - 打开弹窗
-    openShareDetail(id) {
-      this.detailId = id;
-      this.shareDialog = true;
-      this.shareTable_currentPage = 1;
-      this.getShareList();
-    },
-
-    // 分享详情 - 更改列表当前页
-    shareTableCurrentChange(val) {
-      this.shareTable_currentPage = val;
-      this.getShareList();
-    },
-  }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 81
src/components/Mall/Member/member-customer.vue

@@ -1,81 +0,0 @@
-<template>
-  <div class="address-list">
-    <div class="table">
-      <el-table ref="orderTable" v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-        <el-table-column align="center" label="姓名" prop="nickName"></el-table-column>
-        <el-table-column align="center" label="手机号" prop="mobile"></el-table-column>
-        <el-table-column align="center" label="绑定时间" prop="createTime"></el-table-column>
-
-      </el-table>
-    </div>
-    <!-- <div class="pagination clearfix">
-      <div class="fr">
-        <el-pagination
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="currentPage"
-          :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="listTotal">
-        </el-pagination>
-      </div>
-    </div> -->
-  </div>
-</template>
-
-<script>
-import {getMemberCustomerList} from "@/api/member";
-import {dateFormat} from "@/utils/util"
-
-export default {
-  name: 'MemberCustomer',
-  componentName: 'MemberCustomer',
-  props: ['user'],
-  data() {
-    return {
-      dataList: [], // 数据列表
-      listLoading: true, // 列表加载loading
-      currentPage: 1, // 当前页码
-      pageSize: 10, // 每页数量
-      listTotal: 0 // 列表总数
-    }
-  },
-  created() {
-    this.getCustomerList();
-  },
-  methods: {
-    getCustomerList() {
-      let params = {
-        userId: this.user.userId,
-        // pageNum: this.currentPage,
-        // pageSize: this.pageSize
-      }
-
-      getMemberCustomerList(params).then(res => {
-        this.dataList = res.data
-        // this.listTotal = res.data.total
-        this.listLoading = false
-      })
-    },
-    // 更改每页数量
-    handleSizeChange(val) {
-      this.pageSize = val
-      this.currentPage = 1
-      this.getList()
-    },
-    // 更改当前页
-    handleCurrentChange(val) {
-      this.currentPage = val
-      this.getList()
-    },
-    formatDate(row) {
-      return dateFormat('YYYY.mm.dd', new Date(row.activeStartTime)) + ' - ' + dateFormat('YYYY.mm.dd', new Date(row.activeEndTime))
-    }
-  }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 198
src/components/Mall/Member/member-detail.vue

@@ -1,198 +0,0 @@
-<template>
-  <div class="detail-container">
-    <el-page-header @back="goBack" content="会员详情"></el-page-header>
-    <el-container>
-      <el-header height="100">
-        <div class="title">基础信息</div>
-        <el-divider></el-divider>
-        <el-row :gutter="20" class="member-info">
-          <el-col :xs="24" :sm="4" :md="3" :lg="2">
-            <el-avatar :size="80" :src="userDetail.avatar">
-              <img src="https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"/>
-            </el-avatar>
-          </el-col>
-          <el-col :xs="24" :sm="20" :md="21" :lg="22">
-            <!-- 普通用户 -->
-            <el-row :gutter="20" v-if="userDetail.type !== 'SERVICE'">
-              <el-col :xs="24" :sm="12" :md="6" :lg="5"><div class="item"><span>昵称:</span><span>{{ userDetail.nickName }}</span><i class="el-icon-edit pointer" @click="editName()"></i></div></el-col>
-              <el-col :xs="24" :sm="12" :md="6" :lg="5"><div class="item"><span>性别:</span><span>{{ userDetail.sex }}</span></div></el-col>
-              <el-col :xs="24" :sm="12" :md="6" :lg="5"><div class="item"><span>微信手机号:</span><span>{{ userDetail.mobile }}</span></div></el-col>
-              <el-col :xs="24" :sm="12" :md="6" :lg="5"><div class="item"><span>注册时间:</span><span>{{ userDetail.createTime }}</span></div></el-col>
-              <el-col :xs="24" :sm="12" :md="6" :lg="5"><div class="item"><span>角色:</span><span>{{ userDetail.type | MEMBER_CURRENT_TYPE_FILTER }}</span></div></el-col>
-              <el-col :xs="24" :sm="12" :md="6" :lg="5"><div class="item"><span>业务员:</span><span>{{ userDetail.serviceName ? userDetail.serviceName:'暂无' }}</span></div></el-col>
-              <el-col :xs="24" :sm="12" :md="6" :lg="5"><div class="item"><span>业务员电话:</span><span>{{ userDetail.servicePhone ? userDetail.servicePhone:'暂无' }}</span></div></el-col>
-              <el-col :xs="24" :sm="12" :md="6" :lg="5"><div><el-button type="primary" size="small" @click="applyWorker">成为业务员</el-button></div></el-col>
-            </el-row>
-            <!-- 业务员 -->
-            <el-row :gutter="20" v-if="userDetail.type === 'SERVICE'">
-              <el-col :xs="24" :sm="12" :md="6" :lg="5"><div class="item"><span>昵称:</span><span>{{ userDetail.nickName }}</span><i class="el-icon-edit pointer" @click="editName()"></i></div></el-col>
-              <el-col :xs="24" :sm="12" :md="6" :lg="5"><div class="item"><span>性别:</span><span>{{ userDetail.sex }}</span></div></el-col>
-              <el-col :xs="24" :sm="12" :md="6" :lg="5"><div class="item"><span>微信手机号:</span><span>{{ userDetail.mobile }}</span></div></el-col>
-              <el-col :xs="24" :sm="12" :md="6" :lg="5"><div class="item"><span>注册时间:</span><span>{{ userDetail.createTime }}</span></div></el-col>
-              <el-col :xs="24" :sm="12" :md="6" :lg="5"><div class="item"><span>角色:</span><span>{{ userDetail.type | MEMBER_CURRENT_TYPE_FILTER }}</span></div></el-col>
-              <el-col :xs="24" :sm="12" :md="6" :lg="5"><div class="item"><span>真实姓名:</span><span>{{ userDetail.workerName }}</span></div></el-col>
-              <el-col :xs="24" :sm="12" :md="6" :lg="5"><div class="item"><span>手机号码:</span><span>{{ userDetail.workerPhone }}</span></div></el-col>
-              <el-col :xs="24" :sm="12" :md="6" :lg="5"><div class="item"><span>职位:</span><span>{{ userDetail.position }}</span></div></el-col>
-              <el-col :xs="24" :sm="12" :md="6" :lg="5"><div class="item"><span>收益:</span><span>{{ userDetail.totalAmount }}</span></div></el-col>
-              <el-col :xs="24" :sm="12" :md="6" :lg="5"><div class="item"><span>客户:</span><span>{{ userDetail.customerNums }}</span></div></el-col>
-            </el-row>
-          </el-col>
-          
-        </el-row>
-      </el-header>
-      <el-main>
-        <el-tabs v-model="activeName" @tab-click="handleClick">
-          <el-tab-pane label="账户明细" name="account" v-if="userDetail.type === 'SERVICE'" lazy>
-            <member-account :user="userDetail"/>
-          </el-tab-pane>
-          <el-tab-pane label="订单管理" name="order" lazy>
-            <member-order :user="userDetail"/>
-          </el-tab-pane>
-          <el-tab-pane label="会员地址" name="address" lazy>
-            <member-address :user="userDetail"/>
-          </el-tab-pane>
-          <el-tab-pane label="收藏记录" name="favorite" lazy>
-            <member-favorite :user="userDetail"/>
-          </el-tab-pane>
-          <el-tab-pane label="浏览记录" name="browse" lazy>
-            <member-browse :user="userDetail"/>
-          </el-tab-pane>
-          <el-tab-pane label="优惠券" name="coupon" lazy>
-            <member-coupon :user="userDetail"/>
-          </el-tab-pane>
-          <el-tab-pane label="企微客户" name="customer" v-if="userDetail.type === 'SERVICE'" lazy>
-            <member-customer :user="userDetail"/>
-          </el-tab-pane>
-        </el-tabs>
-      </el-main>
-    </el-container>
-  </div>
-</template>
-
-<script>
-import MemberAccount from "@/components/Mall/Member/member-account";
-import MemberOrder from "@/components/Mall/Member/member-order";
-import MemberAddress from "@/components/Mall/Member/member-address";
-import MemberFavorite from "@/components/Mall/Member/member-favorite";
-import MemberBrowse from "@/components/Mall/Member/member-browse";
-import MemberCoupon from "@/components/Mall/Member/member-coupon";
-import MemberCustomer from "@/components/Mall/Member/member-customer";
-import {getMemberDetail, applyWorker, editNickname} from "@/api/member";
-
-export default {
-  name: 'MemberDetail',
-  componentName: 'MemberDetail',
-  props: ['user'],
-  components: {
-    MemberAccount, MemberOrder, MemberAddress, MemberFavorite, MemberBrowse, MemberCoupon, MemberCustomer
-  },
-  data() {
-    return {
-      activeName: this.user.type === 'SERVICE' ? 'account' : 'order',
-      userDetail: {}
-    }
-  },
-  created() {
-    this.getMemberDetail(this.user.userId)
-  },
-  methods: {
-    // 返回列表
-    goBack() {
-      this.$emit('backListFromDetail')
-    },
-    // 切换显示
-    handleClick(tab, event) {
-      // console.log(tab, event);
-    },
-    // 获取会员详情
-    getMemberDetail(userId) {
-      getMemberDetail({ userId }).then(res => {
-        this.userDetail = res.data
-      })
-    },
-
-    // 成为业务员
-    applyWorker() {
-      this.$prompt('请输入企业微信手机号码', '成为业务员', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        inputPattern: /^1[3456789]\d{9}$/,
-        inputErrorMessage: '请输入正确的手机号码'
-      }).then(({ value }) => {
-        applyWorker({
-          personalPhone: this.userDetail.mobile,
-          workPhone: value,
-        }).then(res => {
-          this.getMemberDetail(this.user.userId);
-        })
-      }).catch(() => {
-          
-      });
-      
-    },
-
-    // 修改昵称
-    editName() {
-      this.$prompt('请输入会员昵称', '修改会员昵称', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        inputValue: this.userDetail.nickName,
-        inputValidator: function(value) {
-          if(!value) return '请输入会员昵称'
-        },
-      }).then(({ value }) => {
-        editNickname({
-          userId: this.user.userId,
-          newNickName: value,
-        }).then(res => {
-          this.getMemberDetail(this.user.userId);
-        })
-      }).catch(() => {
-          
-      });
-    },
-  },
-  beforeDestroy() {
-    console.log("执行销毁前")
-  }
-}
-</script>
-
-<style scoped lang="scss">
-  .detail-container {
-    width:100%;
-    height: 100%;
-    ::v-deep .el-container {
-      margin-top: 20px;
-    }
-    ::v-deep .el-header {
-      .title {
-        font-size: 16px;
-      }
-      .el-row {
-        //display: flex;
-        /* 实现垂直居底 */
-        //align-items: end;
-        /* 实现水平居中 */
-        //justify-content: center;
-        .el-col {
-          .item {
-            padding: 10px 0;
-            white-space:nowrap;
-          }
-        }
-      }
-    }
-  }
-  .pointer {
-    cursor: pointer;
-    color: #409EFF;
-    margin-left: 5px;
-  }
-</style>
-
-<style lang="scss">
-  .pagination {
-    margin-top: 30px;
-  }
-</style>

+ 0 - 98
src/components/Mall/Member/member-favorite.vue

@@ -1,98 +0,0 @@
-<template>
-  <div class="address-list">
-    <div class="table">
-      <el-table ref="orderTable" v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-        <el-table-column align="center" label="商品信息" prop="goodsName" min-width="200">
-          <template slot-scope="scope">
-            <div class="goods-info">
-              <el-image style="width: 40px; height: 40px;" :src="scope.row.imgUrl" :preview-src-list="[scope.row.imgUrl]" fit="cover"></el-image>
-              <div class="name">{{scope.row.goodsName}}</div>
-            </div>
-          </template>
-        </el-table-column>
-        <el-table-column align="center" label="商品价格" prop="goodsPrice"></el-table-column>
-        <el-table-column align="center" label="商品状态" prop="defaultAddr">
-          <template slot-scope="scope">
-            {{ scope.row.status ? '上架' : '下架' }}
-          </template>
-        </el-table-column>
-        <el-table-column align="center" label="收藏时间" prop="createTime"></el-table-column>
-      </el-table>
-    </div>
-    <div class="pagination clearfix">
-      <div class="fr">
-        <el-pagination
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="currentPage"
-          :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="listTotal">
-        </el-pagination>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import {getMemberFavoriteList} from "@/api/member";
-
-export default {
-  name: 'MemberFavorite',
-  componentName: 'MemberFavorite',
-  props: ['user'],
-  data() {
-    return {
-      dataList: [], // 数据列表
-      listLoading: true, // 列表加载loading
-      currentPage: 1, // 当前页码
-      pageSize: 10, // 每页数量
-      listTotal: 0 // 列表总数
-    }
-  },
-  created() {
-    this.getFavoriteList()
-  },
-  methods: {
-    getFavoriteList() {
-      let params = {
-        userId: this.user.userId,
-        pageNum: this.currentPage,
-        pageSize: this.pageSize
-      }
-
-      getMemberFavoriteList(params).then(res => {
-        this.dataList = res.data.records
-        this.listTotal = res.data.total
-        this.listLoading = false
-      })
-    },
-    // 更改每页数量
-    handleSizeChange(val) {
-      this.pageSize = val
-      this.currentPage = 1
-      this.getList()
-    },
-    // 更改当前页
-    handleCurrentChange(val) {
-      this.currentPage = val
-      this.getList()
-    },
-  }
-}
-</script>
-
-<style scoped lang="scss">
-  .goods-info {
-    display: flex;
-    align-items: center;
-    .el-image {
-      flex-shrink: 0;
-    }
-    .name {
-      margin-left: 8px;
-      text-align: left;
-    }
-  }
-</style>

+ 0 - 106
src/components/Mall/Member/member-order.vue

@@ -1,106 +0,0 @@
-<template>
-  <div class="order-list">
-    <div class="table">
-      <el-table
-        ref="orderTable"
-        v-loading="listLoading"
-        :data="dataList"
-        element-loading-text="Loading"
-      >
-        <el-table-column align="center" label="订单编号" prop="orderId" min-width="180"></el-table-column>
-        <el-table-column align="center" label="商品信息" prop="orderTitle" min-width="200" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="订单金额" prop="payAmount"></el-table-column>
-        <el-table-column align="center" label="订单状态" prop="orderStatus">
-          <template slot-scope="{ row }">
-            {{ row.orderStatus | ORDER_CURRENT_STATUS_FILTER }}
-          </template>
-        </el-table-column>
-        <el-table-column align="center" label="下单时间" prop="createTime" min-width="160"></el-table-column>
-        <el-table-column align="center" label="操作" fixed="right">
-          <template slot-scope="{row}">
-            <el-button type="primary" @click="goOrderDetail(row)" size="mini">详情</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <div class="pagination clearfix">
-      <div class="fr">
-        <el-pagination
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="currentPage"
-          :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="listTotal">
-        </el-pagination>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import {getList} from "@/api/order";
-
-export default {
-  name: 'MemberOrder',
-  componentName: 'MemberOrder',
-  props: ['user'],
-  data() {
-    return {
-      dataList: [], // 数据列表
-      listLoading: true, // 列表加载loading
-      currentPage: 1, // 当前页码
-      pageSize: 10, // 每页数量
-      listTotal: 0 // 列表总数
-    }
-  },
-  created() {
-    let timer = setInterval(() => {
-      if(this.user.userId) {
-        this.getOrderList()
-        clearInterval(timer)
-      }
-    }, 100)
-  },
-  methods: {
-    getOrderList() {
-      console.log(this.user);
-      let params = {
-        userId: this.user.userId,
-        pageNum: this.currentPage,
-        pageSize: this.pageSize
-      }
-
-      getList(params).then(res => {
-        this.dataList = res.data.records
-        this.listTotal = res.data.total
-        this.listLoading = false
-      })
-    },
-    // 更改每页数量
-    handleSizeChange(val) {
-      this.pageSize = val
-      this.currentPage = 1
-      this.getList()
-    },
-    // 更改当前页
-    handleCurrentChange(val) {
-      this.currentPage = val
-      this.getList()
-    },
-    goOrderDetail(row) {
-      this.$router.push({
-        path: '/order/detail',
-        query: {
-          orderId: row.orderId
-        }
-      })
-    }
-  }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 817
src/components/Mall/add-goods.vue

@@ -1,817 +0,0 @@
-<template>
-  <div class="app-container">
-    <!-- 添加商品 -->
-    <div class="form-container">
-      <el-form ref="mainForm" :model="mainForm" :rules="mainFormRules">
-        <el-button size="small" type="primary" @click="addGoods"
-          >选择商品</el-button
-        >
-        <el-form-item
-          :label="'商品名称:'"
-          style="margin: 20px 0 40px 0"
-          prop="goodName"
-          ><el-input
-            v-model="mainForm.categoryName"
-            style="width: 40%"
-            disabled
-          ></el-input
-        ></el-form-item>
-
-        <div class="diy-table">
-          <div class="table-head clearfix">
-            <!-- <div class="item goods">商品名称</div> -->
-            <div class="right">
-              <div class="item name">规格</div>
-              <div class="item input">划线价格</div>
-              <div class="item input">销售价</div>
-              <div class="item input">分销金额</div>
-              <div class="item input">佣金比例</div>
-              <div class="item input">内部分销金额</div>
-              <div class="item input">内部佣金比例</div>
-              <div class="item input">库存</div>
-              <div class="item input">销量</div>
-            </div>
-          </div>
-          <div
-            class="goods-item"
-            v-for="(item, index) in goodsList"
-            :key="index"
-          >
-            <!-- <div class="goods-info">
-            <img :src="item.goodsImgSrc" alt="">
-            {{item.goodsName}}
-          </div> -->
-            <div class="spec-list">
-              <div
-                class="spec-item"
-                v-for="(it, idx) in item.goodsSpecs"
-                :key="idx"
-              >
-                <div class="col name">{{ it.name }}</div>
-                <div class="col input">
-                  <el-input
-                    type="number"
-                    size="small"
-                    v-model="it.orgPrice"
-                    disabled
-                  ></el-input>
-                </div>
-                <div class="col input">
-                  <el-input
-                    type="number"
-                    size="small"
-                    v-model="it.price"
-                    disabled
-                  ></el-input>
-                </div>
-                <div class="col input">
-                  <el-input
-                    type="number"
-                    size="small"
-                    v-model="it.shareAmount"
-                    disabled
-                  ></el-input>
-                </div>
-                <div class="col input">
-                  <el-input
-                    type="number"
-                    size="small"
-                    v-model="it.innerSharePercent"
-                    disabled
-                  ></el-input>
-                </div>
-                <div class="col input">
-                  <el-input
-                    type="number"
-                    size="small"
-                    v-model="it.innerShareAmount"
-                    disabled
-                  ></el-input>
-                </div>
-                <div class="col input">
-                  <el-input
-                    type="number"
-                    size="small"
-                    v-model="it.innerSharePercent"
-                    disabled
-                  ></el-input>
-                </div>
-                <div class="col input">
-                  <el-input
-                    type="number"
-                    size="small"
-                    v-model="it.stockNum"
-                    disabled
-                  ></el-input>
-                </div>
-                <div class="col input">
-                  <el-input
-                    type="number"
-                    size="small"
-                    v-model="it.soldNum"
-                    disabled
-                  ></el-input>
-                </div>
-              </div>
-            </div>
-
-            <div class="empty-text" v-if="goodsList.length < 1">暂无数据</div>
-          </div>
-        </div>
-
-        <el-form-item
-          label="商品状态"
-          prop="goodsStatus"
-          style="margin-top: 30px"
-        >
-          <el-radio-group v-model="mainForm.goodsStatus">
-            <el-radio label="true">上架</el-radio>
-            <el-radio label="false">下架</el-radio>
-          </el-radio-group>
-        </el-form-item>
-
-        <div
-          style="
-            font-size: 14px;
-            margin: 30px 0 20px 0;
-            color: #606266;
-            font-weight: 700;
-          "
-        >
-          活动专区商品标签:
-        </div>
-        <!-- <el-form-item prop="LabelSetting">
-          <el-table :data="tableData" border style="width: 100%">
-            <el-table-column prop="" label="标签组" width="180">
-            </el-table-column>
-            <el-table-column prop="TagList" label="标签">
-              <template slot-scope="scope">
-                <el-tag
-                  v-for="(item, index) in scope.row.TagList"
-                  :key="index"
-                  @click="selectTag(item, index)"
-                  style="margin-right:30px"
-                >
-                  {{ item }}
-                  <i :class="[item.checked?el-icon-check:'']"  v-if="item.checked"></i>
-                  <i class="el-icon-check" v-if="item.checked"></i>
-                </el-tag>
-              </template>
-            </el-table-column>
-          </el-table>
-        </el-form-item> -->
-         <el-form-item prop="LabelSetting">
-           <el-card shadow="never">
-               <el-tag
-                  v-for="(item, index) in TagsList"
-                  :key="index"
-                  @click="selectTag(item, index)"
-                  style="margin-right:30px"
-                >
-                  {{ item.name }}
-                 
-                  <i class="el-icon-check" v-if="item.checked"></i>
-                </el-tag>
-            </el-card>
-        </el-form-item>
-      </el-form>
-      <!-- <div class="diy-table"> -->
-        <!-- <div class="page-footer">
-      <div class="footer" :class="classObj">
-        <el-button
-          type="primary"
-          @click="submitMainForm"
-          :loading="formLoading"
-          >{{ formLoading ? "提交中 ..." : "提 交" }}</el-button
-        >
-        <el-button @click="goBack">关 闭</el-button>
-      </div>
-    </div> -->
-      <!-- </div> -->
-    </div>
-
-    <!-- 选择商品 -->
-    <el-dialog
-      title="选择商品"
-      :visible.sync="addGoodsVisible"
-      :show-close="false"
-      width="50%"
-      :close-on-click-modal="false"
-    >
-      <div class="dialog-container clearfix">
-        <div class="left fl">
-          <div class="item" @click="changeClassify('')">全部分类</div>
-          <div class="group" v-for="(item, index) in classifyList" :key="index">
-            <div class="item" @click="toggleOpen(index)">
-              <i
-                :class="
-                  item.isOpen ? 'el-icon-caret-bottom' : 'el-icon-caret-right'
-                "
-              ></i>
-              {{ item.name }}
-            </div>
-            <div class="child" v-if="item.isOpen">
-              <div
-                class="item"
-                v-for="(childItem, childIndex) in item.children"
-                :key="childIndex"
-                @click="changeClassify(childItem.categoryId)"
-              >
-                {{ childItem.name }}
-              </div>
-            </div>
-          </div>
-        </div>
-
-        <div class="right fl">
-          <div class="search">
-            <el-input
-              placeholder="请输入商品名称进行搜索"
-              v-model="keyword"
-              class="input-with-select"
-              clearable
-              size="small"
-              style="width: 250px"
-            >
-              <el-button
-                slot="append"
-                icon="el-icon-search"
-                size="small"
-                @click="getGoodsListByScreen"
-              ></el-button>
-            </el-input>
-          </div>
-          <div class="table" style="margin: 10px 0 20px">
-            <el-table
-              v-loading="table_listLoading"
-              :data="table_dataList"
-              element-loading-text="Loading"
-              tooltip-effect="dark"
-              style="width: 100%"
-              max-height="270"
-              @selection-change="handleChooseGoods"
-            >
-              <el-table-column
-                align="center"
-                type="selection"
-                :selectable="checkboxSelect"
-                width="45"
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                prop="goodsName"
-                label="商品名称"
-                min-width="200"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                prop="goodsPrice"
-                label="价格"
-                width="80"
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                prop="stockNum"
-                label="库存"
-                width="80"
-              ></el-table-column>
-            </el-table>
-          </div>
-          <div class="pagination clearfix">
-            <div class="fr">
-              <el-pagination
-                @current-change="handleTableCurrentChange"
-                :current-page="table_currentPage"
-                :page-size="table_pageSize"
-                background
-                layout="prev, pager, next"
-                :total="table_listTotal"
-              >
-              </el-pagination>
-            </div>
-          </div>
-        </div>
-      </div>
-
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitAddGoods">保 存</el-button>
-        <el-button @click="cancelAddGoods">取 消</el-button>
-      </div>
-    </el-dialog>
-
-    <div class="page-footer">
-      <div class="footer" :class="classObj">
-        <el-button
-          type="primary"
-          @click="submitMainForm"
-          :loading="formLoading"
-          >{{ formLoading ? "提交中 ..." : "提 交" }}</el-button
-        >
-        <el-button @click="goBack">关 闭</el-button>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import { getToken } from "@/utils/auth";
-import AddGoods from "@/components/Mall/add-goods";
-import { getGoodsList, getClassifyList } from "@/api/special";
-export default {
-  props: ["allTags"],
-  components: { AddGoods },
-  data() {
-    return {
-      tags: [],
-      tag:"",
-      goodsTagList: [],
-      goodsTagsList:[
-        {
-          tag:"",
-          goodsId:""
-        }
-      ],
-      goodsNameList: [], // 总商品名
-      categoryName: "", // 商品类别名称
-      baseURL: process.env.VUE_APP_BASE_API,
-      myHeaders: { "x-token": getToken() },
-      formLoading: false,
-      TagsList:[],
-      mainForm: {
-        // goodName:"", // 商品名称
-        categoryName: "", // 商品名称
-        goodsStatus: "true", // 商品状态
-        LabelSetting: "", // 商品标签
-        goodsList: [], // 总商品
-      },
-      goodsStatus: 1,
-      mainFormRules: {
-        goodsStatus: [
-          {
-            required: true,
-            message: "请选择商品状态",
-            trigger: "blur",
-          },
-        ],
-        LabelSetting: [
-          {
-            required: true,
-            message: "请添加活动专区商品标签设置",
-            trigger: "blur",
-          },
-        ],
-      },
-      goodsList: [], // 列表数据
-      addGoodsVisible: false, // 选择商品弹窗
-      classifyList: [],
-      keyword: "",
-      table_dataList: null, // 列表数据
-      table_listLoading: false, // 列表加载loading
-      table_currentPage: 1, // 当前页码
-      table_pageSize: 10, // 每页数量
-      table_listTotal: 0, // 列表总数
-      table_chooseGoods: [], // table中 当前选择商品
-    };
-  },
-  computed: {
-    sidebar() {
-      return this.$store.state.app.sidebar;
-    },
-    classObj() {
-      return {
-        hideSidebar: !this.sidebar.opened,
-        openSidebar: this.sidebar.opened,
-      };
-    },
-  },
-  created() {
-    console.log("回显商品列表", this.goodsList, this.goodsList.length);
-    console.log("全部标签", this.allTags);
-
-    let list=[]
-    this.allTags.forEach(item=>{
-      list.push({
-        name:item,
-        checked:false
-      })
-    })
-    console.log("全部标签2", list);
-    this.TagsList=list
-  },
-  updated() {
-    console.log("mainForm", this.mainForm);
-    this.table_chooseGoods.forEach((item) => {
-      item.status = JSON.parse(this.mainForm.goodsStatus);
-    });
-    console.log("选择的商品,更改是否上架状态", this.table_chooseGoods);
-   const ids= this.table_chooseGoods.map(item=>{return item.goodsId})
-   console.log('所选商品的id列表',ids)
-
-    let goodsTagsList=[]
-    ids.forEach(item=>{
-      goodsTagsList.push({
-        goodsId:item,
-        tag:this.tag
-      })
-    })
-    console.log(goodsTagsList)
-    this.goodsTagsList=goodsTagsList
-
-
-  },
-  methods: {
-    // 返回
-    goBack() {
-      // this.$router.go(-1);
-      console.log("关闭添加商品页面");
-      this.$emit("backSpecialSet", "false");
-    },
-    // 提交
-    submitMainForm() {
-      console.log("选择商品提交");
-      this.mainForm.goodsTagsList=this.goodsTagsList
-      this.$emit("addGoods",this.mainForm)
-      this.$emit("addGoods1",this.mainForm)
-    },
-    // 选择商品
-    addGoods() {
-      this.addGoodsVisible = true;
-      this.getClassifyList();
-    },
-    // 取消 选择商品
-    cancelAddGoods() {
-      this.addGoodsVisible = false;
-    },
-
-    // 提交 选择商品
-    submitAddGoods() {
-      if(this.table_chooseGoods.length !== 1) {
-        return this.$errorMsg('请选择一个商品');
-      }
-      let oldgoodsList = this.goodsList;
-      let newgoodsList = this.table_chooseGoods;
-      this.goodsList = oldgoodsList.concat(newgoodsList);
-      this.mainForm.goodsList = this.goodsList;
-      this.goodsNameList = this.goodsList.map((item) => {
-        return item.categoryName;
-      });
-      this.table_chooseGoods.forEach((item) => {
-        item.status = JSON.parse(this.mainForm.goodsStatus);
-      });
-      console.log("选择的商品,更改是否上架状态", this.table_chooseGoods);
-      const str = this.goodsNameList.join(",");
-      console.log("数组转字符", str);
-      this.addGoodsVisible = false;
-      this.mainForm.categoryName = str;
-    },
-    // 搜索
-    getGoodsListByScreen() {
-      if (this.table_chooseGoods.length > 0) {
-        return this.$errorMsg("当前已选择商品,不可搜索");
-      }
-      this.table_currentPage = 1;
-      this.getGoodsList();
-    },
-    // table点击选择商品
-    handleChooseGoods(val) {
-      this.table_chooseGoods = val;
-    },
-    // 查询重复值并禁选
-    checkboxSelect(row, rowIndex) {
-      if (row.selected) {
-        return false; // 禁用
-      } else {
-        return true; // 不禁用
-      }
-    },
-    // 更改列表当前页
-    handleTableCurrentChange(val) {
-      if (this.table_chooseGoods.length > 0) {
-        return this.$errorMsg("当前已选择商品,不可切换分页");
-      }
-      this.table_currentPage = val;
-      this.getGoodsList();
-    },
-    // 搜索
-    getGoodsListByScreen() {
-      if (this.table_chooseGoods.length > 0) {
-        return this.$errorMsg("当前已选择商品,不可搜索");
-      }
-      this.table_currentPage = 1;
-      this.getGoodsList();
-    },
-    // 选择标签
-    selectTag(item, index) {
-      this.TagsList[index].checked=!item.checked
-      this.$set(this.TagsList,index,item)
-      this.TagsList.forEach(item=>{
-        if(item.checked){
-          this.tags.push(item.name)
-        }else{
-          this.tags.splice(index,1)
-        }
-      })
-      this.tags=[...new Set(this.tags)]
-      const tag=  this.tags.join(',')
-      this.tag=tag
-    },
-
-    // 获取分类列表
-    getClassifyList() {
-      getClassifyList({ categoryLevel: 1, status: true }).then((res) => {
-        console.log("获取分类列表", res);
-        res.data.forEach((item) => {
-          item.isOpen = false;
-        });
-        this.classifyList = res.data;
-        console.log("添加了isOpen的分类类别", this.classifyList);
-        this.classifyCurrent = "";
-        this.getGoodsList();
-      });
-    },
-
-    // 展开/收起 分类
-    toggleOpen(index) {
-      this.classifyList[index].isOpen = !this.classifyList[index].isOpen;
-    },
-
-    // 切换分类
-    changeClassify(cid) {
-      if (this.table_chooseGoods.length > 0) {
-        return this.$errorMsg("当前已选择商品,不可切换分类");
-      }
-      this.classifyCurrent = cid;
-      this.table_currentPage = 1;
-      this.getGoodsList();
-    },
-
-    // 获取商品列表
-    getGoodsList() {
-      getGoodsList({
-        pageNum: this.table_currentPage,
-        pageSize: this.table_pageSize,
-        keyword: this.keyword,
-        categoryId: this.classifyCurrent,
-      }).then((res) => {
-        let oldgoodsList = this.goodsList;
-        let newgoodsList = res.data.records;
-        for (let i = 0; i < oldgoodsList.length; i++) {
-          let oldItem = oldgoodsList[i];
-          for (let j = 0; j < newgoodsList.length; j++) {
-            let newItem = newgoodsList[j];
-            if (newItem.goodsId === oldItem.goodsId) {
-              newgoodsList[j].selected = true;
-              break;
-            }
-          }
-        }
-        // for (let j = 0; j < newgoodsList.length; j++) {
-        //   let newItem = newgoodsList[j];
-        //   if (newItem.promotionGroup === true) {
-        //     newgoodsList[j].selected = true;
-        //   }
-        // }
-        this.table_dataList = newgoodsList;
-        this.table_listTotal = res.data.total;
-        this.table_listLoading = false;
-      });
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.form-container {
-  margin-top: 40px;
-  // padding: 0 6%;
-  .title {
-    font-size: 16px;
-    margin-bottom: 30px;
-    padding-left: 10px;
-    font-weight: bold;
-  }
-  .tips {
-    margin-top: 10px;
-    span {
-      display: inline-block;
-      width: 300px;
-      text-align: center;
-      line-height: 32px;
-      background: #ffefef;
-      font-size: 14px;
-      color: #f66460;
-    }
-  }
-  .tips2 {
-    font-size: 12px;
-    color: #999999;
-    line-height: 30px;
-  }
-  .container {
-    padding: 10px 20px 0;
-    background: #f5f5f5;
-    border-radius: 10px;
-  }
-  .addBtn {
-    padding: 10px 0;
-  }
-}
-
-.diy-table {
-  overflow-x: scroll;
-  border-left: 1px solid #f5f5f5;
-  margin-top: 20px;
-  width: 100%;
-  // margin-left: 77px;
-  // min-width: 1185px;
-  max-width: 100%;
-  .table-head {
-    display: flex;
-    .item {
-      height: 40px;
-      line-height: 40px;
-      float: left;
-      font-weight: 500;
-      font-size: 14px;
-      background: #f5f5f5;
-      text-align: center;
-    }
-    .right {
-      float: left;
-      width: 80%;
-      min-width: 1000px;
-      flex-shrink: 0;
-      height: 40px;
-    }
-    .goods {
-      width: 20%;
-      min-width: 250px;
-    }
-    .name {
-      width: 12%;
-      min-width: 100px;
-    }
-    .input {
-      width: 11%;
-      min-width: 100px;
-    }
-    .opera {
-      width: 10%;
-      min-width: 80px;
-      // text-align: right;
-    }
-    .blank {
-      background: #f5f5f5;
-      width: 6%;
-      min-width: 90px;
-    }
-  }
-  .goods-item {
-    display: flex;
-    align-content: center;
-    .goods-info {
-      flex-shrink: 0;
-      width: 20%;
-      min-width: 250px;
-      padding: 0 10px;
-      display: flex;
-      align-items: center;
-      border-bottom: 1px solid #f5f5f5;
-      border-right: 1px solid #f5f5f5;
-      font-size: 14px;
-      &:last-child {
-        border-bottom: none;
-      }
-      img {
-        width: 40px;
-        height: 40px;
-        margin-right: 10px;
-        flex-shrink: 0;
-      }
-    }
-    .spec-list {
-      width: 80%;
-      min-width: 1000px;
-      border-bottom: 1px solid #f5f5f5;
-      border-right: 1px solid #f5f5f5;
-      &:last-child {
-        border-bottom: none;
-      }
-      .spec-item {
-        display: flex;
-        align-items: center;
-        border-bottom: 1px solid #f5f5f5;
-        &:last-child {
-          border-bottom: none;
-        }
-        .col {
-          flex-shrink: 0;
-          height: 50px;
-          display: flex;
-          align-items: center;
-          justify-content: center;
-          padding: 0 10px;
-          border-right: 1px solid #f5f5f5;
-          &:last-child {
-            border-right: none;
-          }
-        }
-        .name {
-          width: 12%;
-          min-width: 100px;
-          font-size: 14px;
-          text-align: center;
-        }
-        .input {
-          width: 11%;
-          min-width: 100px;
-        }
-        .btn {
-          width: 11%;
-          min-width: 80px;
-        }
-      }
-    }
-    .operation {
-      flex-shrink: 0;
-      width: 6%;
-      min-width: 90px;
-      padding: 0 10px;
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      border-bottom: 1px solid #f5f5f5;
-      border-right: 1px solid #f5f5f5;
-    }
-  }
-  .empty-text {
-    line-height: 60px;
-    text-align: center;
-    color: #909399;
-  }
-}
-
-.dialog-container {
-  .left {
-    width: 140px;
-    height: 350px;
-    overflow-y: scroll;
-    .group {
-      margin-top: 10px;
-    }
-    .child {
-      margin-top: 5px;
-      .item {
-        padding-left: 18px;
-      }
-    }
-    .item {
-      cursor: pointer;
-      line-height: 24px;
-    }
-  }
-  .right {
-    width: calc(100% - 140px);
-    height: 350px;
-    box-sizing: border-box;
-    padding-left: 20px;
-  }
-}
-
-.page-footer {
-  height: 70px;
-}
-.footer {
-  position: fixed;
-  bottom: 0;
-  left: 0;
-  z-index: 1;
-  width: 100%;
-  background: #fff;
-  padding: 15px 40px;
-  box-sizing: border-box;
-  transition: all 0.28s;
-  text-align: right;
-  box-shadow: 0 2px 5px 0 rgb(0 0 0 / 50%), 0 2px 5px 0 rgb(0 0 0 / 10%);
-  &.hideSidebar {
-    margin-left: 54px;
-    width: calc(100vw - 54px);
-  }
-  &.openSidebar {
-    margin-left: 210px;
-    width: calc(100vw - 210px);
-  }
-}
-
-::v-deep input::-webkit-outer-spin-button,
-::v-deep input::-webkit-inner-spin-button {
-  -webkit-appearance: none;
-}
-::v-deep input[type="number"] {
-  -moz-appearance: textfield;
-}
-::v-deep .el-form-item__label {
-  margin-left: 0px !important;
-}
-</style>

+ 0 - 648
src/views/merchant/create_account.vue

@@ -1,648 +0,0 @@
-<template>
-  <div class="app-container">
-    <div v-show="step == 1">
-      <div class="setting_title">开通账号</div>
-      <el-divider></el-divider>
-      <div class="tips">说明:开通商户账号是指开通商城后台管理系统的总登录账号。</div>
-
-      <el-card shadow="never" class="my-card">
-        <el-form class="my-form" ref="step1Form" :model="step1Form" :rules="step1FormRules" label-width="100px" label-position="right">
-          <el-form-item label="商户账号" prop="account">
-            <el-input v-model="step1Form.account" autocomplete="off" placeholder="请输入商户账号"></el-input>
-            <el-popover
-              class="question"
-              placement="right-start"
-              title="账号设置"
-              width="260"
-              trigger="hover"
-              content="账号设置需按数字、字母组合设置至少12位账号">
-              <svg-icon icon-class="question" slot="reference" />
-            </el-popover>
-          </el-form-item>
-          <el-form-item label="账户昵称" prop="nickName">
-            <el-input v-model="step1Form.nickName" autocomplete="off" placeholder="请输入账户昵称"></el-input>
-          </el-form-item>
-          <el-form-item label="小程序名称" prop="appName">
-            <el-input v-model="step1Form.appName" autocomplete="off" placeholder="请输入小程序名称"></el-input>
-          </el-form-item>
-          <el-form-item label="负责人" prop="chargePerson">
-            <el-input v-model="step1Form.chargePerson" autocomplete="off" placeholder="请输入负责人"></el-input>
-          </el-form-item>
-          <el-form-item label="联系电话" prop="phone">
-            <el-input v-model="step1Form.phone" autocomplete="off" placeholder="请输入联系电话"></el-input>
-          </el-form-item>
-          <el-form-item label="电子邮箱" prop="email">
-            <el-input v-model="step1Form.email" autocomplete="off" placeholder="请输入电子邮箱"></el-input>
-          </el-form-item>
-          <el-form-item label="地址" prop="address">
-            <el-input v-model="step1Form.address" autocomplete="off" placeholder="请输入地址"></el-input>
-          </el-form-item>
-          <el-form-item label="登录密码" prop="newPassword">
-            <el-input v-model="step1Form.newPassword" ref="password1" autocomplete="off" placeholder="请输入登录密码" :type="passwordType1"></el-input>
-            <span class="show-pwd" @click="showPwd(1)">
-              <svg-icon :icon-class="passwordType1 === 'password' ? 'eye' : 'eye-open'" />
-            </span>
-            <el-popover
-              class="question"
-              placement="right-start"
-              title="密码设置"
-              width="260"
-              trigger="hover"
-              content="密码设置需按数字、字母组合设置至少12位密码">
-              <svg-icon icon-class="question" slot="reference" />
-            </el-popover>
-          </el-form-item>
-          <el-form-item label="确认密码" prop="confirmPassword">
-            <el-input v-model="step1Form.confirmPassword" ref="password2" autocomplete="off" placeholder="请再次输入密码" :type="passwordType2"></el-input>
-            <span class="show-pwd" @click="showPwd(2)">
-              <svg-icon :icon-class="passwordType2 === 'password' ? 'eye' : 'eye-open'" />
-            </span>
-            <el-popover
-              class="question"
-              placement="right-start"
-              title="密码设置"
-              width="260"
-              trigger="hover"
-              content="确认密码需要和登录密码保持一致">
-              <svg-icon icon-class="question" slot="reference" />
-            </el-popover>
-          </el-form-item>
-        </el-form>
-      </el-card>
-    </div>
-
-    <div v-show="step == 2">
-      <div class="setting_title">商城配置</div>
-      <el-divider></el-divider>
-      <el-form label-width="100px" label-position="right">
-        <el-upload
-          class="avatar-uploader"
-          :action="baseURL + 'common/upload'"
-          :headers="myHeaders"
-          :show-file-list="false"
-          :on-success="uploadSuccess"
-          :before-upload="beforeUpload">
-        </el-upload>
-        <el-form-item label="主logo:" prop="imgUrl">
-          <div class="images">
-            <div class="main-img">
-              <div class="img" v-if="img1_url" @mouseover="img1_hover = true;" @mouseout="img1_hover = false;">
-                <el-image ref="img1" :src="img1_url" :preview-src-list="[img1_url]" style="width: 120px; height: 120px" fit="contain"></el-image>
-                <div class="mask" v-show="img1_hover">
-                  <i class="el-icon-zoom-in" @click="previewImage('img1')"></i>
-                  <i class="el-icon-upload2" @click="uploadImage('img1')"></i>
-                </div>
-              </div>
-              <div class="add" v-else @click="uploadImage('img1')">
-                <i class="el-icon-plus avatar-uploader-icon"></i>
-              </div>
-            </div>
-            <div class="tmp-img">
-              <el-image :src="require('@/assets/template/template_1.png')" :preview-src-list="[require('@/assets/template/template_1.png')]" style="width: 120px; height: 120px; display: block" fit="contain"></el-image>
-              <div class="tmp">示例图</div>
-            </div>
-          </div>
-          <div class="tips">
-            <span>建议尺寸:400*400</span>
-          </div>
-        </el-form-item>
-        <el-form-item label="通用logo:" prop="imgUrl">
-          <div class="images">
-            <div class="main-img">
-              <div class="img" v-if="img2_url" @mouseover="img2_hover = true;" @mouseout="img2_hover = false;">
-                <el-image ref="img2" :src="img2_url" :preview-src-list="[img2_url]" style="width: 120px; height: 120px" fit="contain"></el-image>
-                <div class="mask" v-show="img2_hover">
-                  <i class="el-icon-zoom-in" @click="previewImage('img2')"></i>
-                  <i class="el-icon-upload2" @click="uploadImage('img2')"></i>
-                </div>
-              </div>
-              <div class="add" v-else @click="uploadImage('img2')">
-                <i class="el-icon-plus avatar-uploader-icon"></i>
-              </div>
-            </div>
-            <div class="tmp-img">
-              <el-image :src="require('@/assets/template/template_2.png')" :preview-src-list="[require('@/assets/template/template_2.png')]" style="width: 120px; height: 120px; display: block" fit="contain"></el-image>
-              <div class="tmp">示例图</div>
-            </div>
-          </div>
-          <div class="tips">
-            <span>建议尺寸:280*60</span>
-          </div>
-        </el-form-item>
-        <el-form-item label="头像logo:" prop="imgUrl">
-          <div class="images">
-            <div class="main-img">
-              <div class="img" v-if="img3_url" @mouseover="img3_hover = true;" @mouseout="img3_hover = false;">
-                <el-image ref="img3" :src="img3_url" :preview-src-list="[img3_url]" style="width: 120px; height: 120px" fit="contain"></el-image>
-                <div class="mask" v-show="img3_hover">
-                  <i class="el-icon-zoom-in" @click="previewImage('img3')"></i>
-                  <i class="el-icon-upload2" @click="uploadImage('img3')"></i>
-                </div>
-              </div>
-              <div class="add" v-else @click="uploadImage('img3')">
-                <i class="el-icon-plus avatar-uploader-icon"></i>
-              </div>
-            </div>
-            <div class="tmp-img">
-              <el-image :src="require('@/assets/template/template_3.png')" :preview-src-list="[require('@/assets/template/template_3.png')]" style="width: 120px; height: 120px; display: block" fit="contain"></el-image>
-              <div class="tmp">示例图</div>
-            </div>
-          </div>
-          <div class="tips">
-            <span>建议尺寸:400*400</span>
-          </div>
-        </el-form-item>
-      </el-form>
-    </div>
-
-    <div v-show="step == 3">
-      <div class="setting_title">企微配置</div>
-      <el-divider></el-divider>
-      <div class="tips">说明:企微配置是指通过配置企业微信将企微用户和系统打通,实现企业微信用户信息同平台互通,聊天会话信息同步</div>
-      <div class="tips" style="margin-top: 20px">商户名称:{{step1Form.nickName}}</div>
-
-      <el-form class="my-form2" ref="step3Form" :model="step3Form" :rules="step3FormRules" label-width="200px" label-position="right">
-        <el-card shadow="never" class="my-card">
-          <div class="title">1.配置企业ID</div>
-          <div class="box">指引:进入<el-link type="primary" :underline="false" href="https://element.eleme.io" target="_blank">企业微信</el-link>打开【我的企业】,将企业ID分别复制并填写到下方输入框中</div>
-          <el-form-item label="企业ID" prop="enterpriseId">
-            <el-input v-model="step3Form.enterpriseId" autocomplete="off" placeholder="请输入企业ID"></el-input>
-          </el-form-item>
-        </el-card>
-
-        <el-card shadow="never" class="my-card">
-          <div class="title">2.配置通讯录密钥(Secret)</div>
-          <div class="box">进入<el-link type="primary" :underline="false" href="https://element.eleme.io" target="_blank">企业微信</el-link>打开【客户联系】-选择【客户】-展开右侧【API】。将外部联系人Secret复制并填写到下方输入框中。如果外部联系人Secret不更新,请将更新后的外部联系人Secret更新复制更新到下方输入框中。</div>
-          <el-form-item label="通讯录密钥(Secret)" prop="listSecret">
-            <el-input v-model="step3Form.listSecret" autocomplete="off" placeholder="请输入通讯录密钥(Secret)"></el-input>
-          </el-form-item>
-          <el-divider></el-divider>
-          <div class="title">配置通讯录同步密钥(Secret)</div>
-          <div class="box">进入<el-link type="primary" :underline="false" href="https://element.eleme.io" target="_blank">企业微信</el-link>打开【管理工具】-选择【通讯录同步】-获取通讯录同步Secret。将通讯录同步Secret复制并填写到下方输入框中。如果通讯录同步Secret不更新,请将更新后的通讯录同步Secret更新复制更新到下方输入框中。</div>
-          <el-form-item label="通讯录同步密钥(Secret)" prop="listSyncSecret">
-            <el-input v-model="step3Form.listSyncSecret" autocomplete="off" placeholder="请输入通讯录同步密钥(Secret)"></el-input>
-          </el-form-item>
-        </el-card>
-
-        <el-card shadow="never" class="my-card">
-          <div class="title">3.配置小程序</div>
-          <div class="box">进入<el-link type="primary" :underline="false" href="https://element.eleme.io" target="_blank">企业微信</el-link>打开【应用管理】-选择【应用】-选择【小程序】-获取小程序AgentiD、小程序Secret。将小程序AgentiD、小程序Secret复制并填写到下方输入框中。</div>
-          <el-form-item label="小程序(AgentiD)" prop="appAgentId">
-            <el-input v-model="step3Form.appAgentId" autocomplete="off" placeholder="请输入小程序(AgentiD)"></el-input>
-          </el-form-item>
-          <el-form-item label="小程序(Secret)" prop="appSecret">
-            <el-input v-model="step3Form.appSecret" autocomplete="off" placeholder="请输入小程序(Secret)"></el-input>
-          </el-form-item>
-        </el-card>
-
-        <el-card shadow="never" class="my-card">
-          <div class="title" style="margin-bottom: 20px;">4.其他基础配置</div>
-          <el-form-item label="小程序appId" prop="appId">
-            <el-input v-model="step3Form.appId" autocomplete="off" placeholder="请输入小程序appId"></el-input>
-          </el-form-item>
-          <el-form-item label="商户号Id" prop="merchantId">
-            <el-input v-model="step3Form.merchantId" autocomplete="off" placeholder="请输入商户号Id"></el-input>
-          </el-form-item>
-          <el-form-item label="商户号Key" prop="merchantKey">
-            <el-input v-model="step3Form.merchantKey" autocomplete="off" placeholder="请输入商户号Key"></el-input>
-          </el-form-item>
-          <el-form-item label="子appId" prop="childAppId">
-            <el-input v-model="step3Form.childAppId" autocomplete="off" placeholder="请输入子appId"></el-input>
-          </el-form-item>
-          <el-form-item label="子密钥" prop="childKey">
-            <el-input v-model="step3Form.childKey" autocomplete="off" placeholder="请输入子密钥"></el-input>
-          </el-form-item>
-          <el-form-item label="子商户号Id" prop="childMerchantId">
-            <el-input v-model="step3Form.childMerchantId" autocomplete="off" placeholder="请输入子商户号Id"></el-input>
-          </el-form-item>
-          <el-form-item label="微信订阅模版" prop="templateId">
-            <el-input v-model="step3Form.templateId" autocomplete="off" placeholder="请输入微信订阅模版"></el-input>
-          </el-form-item>
-        </el-card>
-      </el-form>
-    </div>
-
-    <div class="page-footer">
-      <div class="footer" :class="classObj">
-        <el-button @click="changeStep(0)" v-show="step > 1">上一步</el-button>
-        <el-button @click="changeStep(1)" v-show="step < 3">下一步</el-button>
-        <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{ formLoading ? '提交中 ...' : '提 交' }}</el-button>
-        <el-popconfirm
-          title="确定关闭吗?"
-          @onConfirm="goBack"
-          style="margin-left: 10px;"
-        >
-          <el-button slot="reference">关 闭</el-button>
-        </el-popconfirm>
-      </div>
-    </div>
-    
-  </div>
-</template>
-
-<script>
-import { getToken } from '@/utils/auth'
-import { addAccount } from "@/api/merchant";
-
-export default {
-  data() {
-    var validateAccount = (rule, value, callback) => {
-      if (value === '') {
-        callback(new Error('请输入商户账号'));
-      } else if (value.length < 12) {
-        callback(new Error('账号长度至少12位'));
-      } else if (/[A-Za-z].*[0-9]|[0-9].*[A-Za-z]/.test(value) == false) {
-        callback(new Error('账号必须包含数字和字母'));
-      } else {
-        callback();
-      }
-    };
-    var validatePass3 = (rule, value, callback) => {
-      if (value === '') {
-        callback(new Error('请输入登录密码'));
-      } else if (value.length < 12) {
-        callback(new Error('密码长度至少12位'));
-      } else if (/[A-Za-z].*[0-9]|[0-9].*[A-Za-z]/.test(value) == false) {
-        callback(new Error('密码必须包含数字和字母'));
-      } else {
-        if (this.step1Form.confirmPassword !== '') {
-          this.$refs.step1Form.validateField('confirmPassword');
-        }
-        callback();
-      }
-    };
-    var validatePass4 = (rule, value, callback) => {
-      if (value === '') {
-        callback(new Error('请再次输入密码'));
-      } else if (value !== this.step1Form.newPassword) {
-        callback(new Error('两次输入密码不一致'));
-      } else {
-        callback();
-      }
-    };
-    return {
-      baseURL: process.env.VUE_APP_BASE_API,
-      myHeaders: {'x-token': getToken()},
-      step: 1,
-      step1Form: {
-        account: '', // 账号
-        nickName: '', // 用户名
-        appName: '', // 小程序名称
-        chargePerson: '', // 负责人
-        phone: '', // 联系电话
-        email: '', // 电子邮箱
-        address: '', // 地址
-        newPassword: '', // 登录密码
-        confirmPassword: '', // 确认密码
-      },
-      step1FormRules: {
-        account: [
-          { required: true, validator: validateAccount, trigger: 'blur' }
-        ],
-        nickName: [
-          { required: true, message: '请输入用户名', trigger: 'blur' }
-        ],
-        appName: [
-          { required: true, message: '请输入用户名', trigger: 'blur' }
-        ],
-        chargePerson: [
-          { required: true, message: '请输入负责人', trigger: 'blur' }
-        ],
-        phone: [
-          { required: true, message: '请输入联系电话', trigger: 'blur' }
-        ],
-        newPassword: [
-          { required: true, validator: validatePass3, trigger: 'blur' }
-        ],
-        confirmPassword: [
-          { required: true, validator: validatePass4, trigger: 'blur' }
-        ],
-      },
-      passwordType1: 'password',
-      passwordType2: 'password',
-
-      uploadImageType: null,
-      img1_url: '',
-      img1_hover: false,
-      img2_url: '',
-      img2_hover: false,
-      img3_url: '',
-      img3_hover: false,
-
-      step3Form: {
-        enterpriseId: '',
-        listSecret: '',
-        listSyncSecret: '',
-        appAgentId: '',
-        appSecret: '',
-        appId: '',
-        merchantId: '',
-        merchantKey: '',
-        childAppId: '',
-        childKey: '',
-        childMerchantId: '',
-        templateId: '',
-      },
-      step3FormRules: {
-        enterpriseId: [
-          { required: true, message: '请输入企业ID', trigger: 'blur' }
-        ],
-        listSecret: [
-          { required: true, message: '请输入通讯录密钥(Secret)', trigger: 'blur' }
-        ],
-        listSyncSecret: [
-          { required: true, message: '请输入通讯录同步密钥(Secret)', trigger: 'blur' }
-        ],
-        appAgentId: [
-          { required: true, message: '请输入小程序(AgentiD)', trigger: 'blur' }
-        ],
-        appSecret: [
-          { required: true, message: '请输入小程序(Secret)', trigger: 'blur' }
-        ],
-      },
-      formLoading: false,
-    }
-  },
-  computed: {
-    sidebar() {
-      return this.$store.state.app.sidebar
-    },
-    classObj() {
-      return {
-        hideSidebar: !this.sidebar.opened,
-        openSidebar: this.sidebar.opened
-      }
-    },
-  },
-  methods: {
-    goBack() {
-      this.$router.go(-1);
-    },
-
-    // 显示隐藏密码
-    showPwd(num) {
-      if(num == 1) {
-        if (this.passwordType1 === 'password') {
-          this.passwordType1 = ''
-        } else {
-          this.passwordType1 = 'password'
-        }
-        this.$nextTick(() => {
-          this.$refs.password1.focus()
-        })
-      }
-      if(num == 2) {
-        if (this.passwordType2 === 'password') {
-          this.passwordType2 = ''
-        } else {
-          this.passwordType2 = 'password'
-        }
-        this.$nextTick(() => {
-          this.$refs.password2.focus()
-        })
-      }
-    },
-
-    // 下一步
-    nextStep() {
-      this.$refs.step1Form.validate((valid) => {
-        if (valid) {
-          this.step = 2;
-        }
-      })
-    },
-
-    uploadImage(type) {
-      this.uploadImageType = type;
-      document.querySelector('.avatar-uploader input').click();
-    },
-
-    // 上传图片
-    uploadSuccess(res, file) {
-      this[this.uploadImageType + '_url'] = res.data.url;
-    },
-
-    beforeUpload(file) {
-      const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
-      const whiteList = ['jpg', 'jpeg', 'png'];
-      if (whiteList.indexOf(fileSuffix) === -1) {
-        this.$errorMsg('只支持上传jpg/jpeg/png文件!');
-        return false;
-      }
-    },
-
-    // 预览图片
-    previewImage(type) {
-      this.$refs[type].showViewer = true;
-    },
-
-    // 切换步骤
-    changeStep(type) {
-      if(type == 1) {
-        this.step ++;
-      }else {
-        this.step --;
-      }
-    },
-
-    // 点击 提交表单
-    clickSubmitForm() {
-      // 验证第一步
-      this.$refs.step1Form.validate((valid) => {
-        if (valid) {
-          // 验证第二步
-          if(this.img1_url && this.img2_url && this.img3_url) {
-            // 验证第三步
-            this.$refs.step3Form.validate((valid) => {
-              if (valid) {
-                this.submitForm();
-              }else {
-                this.step = 3;
-              }
-            })
-          }else {
-            this.$errorMsg('请完善商城配置');
-            this.step = 2;
-          }
-        }else {
-          this.step = 1;
-        }
-      })
-    },
-
-    // 提交表单
-    submitForm() {
-      this.$refs.step3Form.validate((valid) => {
-        if (valid) {
-          this.formLoading = true;
-          let params = {
-            type: 1,
-            userName: this.step1Form.account,
-            nickName: this.step1Form.nickName,
-            minAppName: this.step1Form.appName,
-            linkName: this.step1Form.chargePerson,
-            linkPhone: this.step1Form.phone,
-            email: this.step1Form.email,
-            address: this.step1Form.address,
-            password: this.step1Form.confirmPassword,
-
-            minLogo1: this.img1_url,
-            minLogo2: this.img2_url,
-            minLogo3: this.img3_url,
-
-            corpId: this.step3Form.enterpriseId,
-            secret2: this.step3Form.listSecret,
-            secret3: this.step3Form.listSyncSecret,
-            agentId1: this.step3Form.appAgentId,
-            secret1: this.step3Form.appSecret,
-            appId: this.step3Form.appId,
-            mchId: this.step3Form.merchantId,
-            mchKey: this.step3Form.merchantKey,
-            subAppId: this.step3Form.childAppId,
-            subSecret: this.step3Form.childKey,
-            subMchId: this.step3Form.childMerchantId,
-            template: this.step3Form.templateId,
-          }
-          addAccount(params).then(res => {
-            this.$successMsg('开通成功');
-            setTimeout(() => {
-              this.goBack();
-            }, 1500)
-          }).finally(res => {
-            this.formLoading = false;
-          })
-        }
-      })
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-  .setting_title {
-    padding-left: 0;
-  }
-  .tips {
-    font-size: 14px;
-  }
-  .my-card {
-    margin-top: 20px;
-    .box {
-      background: rgb(235, 240, 249);
-      padding: 10px;
-      font-size: 14px;
-      margin: 20px 0;
-      line-height: 18px;
-      ::v-deep .el-link {
-        vertical-align: unset;
-      }
-    }
-  }
-  .my-form {
-    width: 450px;
-    margin: 0 auto;
-  }
-  .show-pwd {
-    position: absolute;
-    right: 15px;
-    top: 0;
-    font-size: 16px;
-    cursor: pointer;
-    user-select: none;
-  }
-  .question {
-    position: absolute;
-    right: -30px;
-    top: 0;
-    font-size: 20px;
-    cursor: pointer;
-    user-select: none;
-  }
-  .my-form2 {
-    ::v-deep input {
-      width: 400px;
-    }
-  }
-  .tips {
-    margin-top: 10px;
-    span {
-      display: inline-block;
-      width: 300px;
-      text-align: center;
-      line-height: 32px;
-      background: #ffefef;
-      font-size: 14px;
-      color: #f66460;
-    }
-  }
-  .images {
-    display: flex;
-    flex-wrap: wrap;
-    .main-img {
-      display: flex;
-      flex-direction: column;
-      justify-content: center;
-      align-items: center;
-      width: 120px;
-      margin-right: 20px;
-      .img {
-        border: 1px dashed #eaeaea;
-        border-radius: 5px;
-        overflow: hidden;
-        position: relative;
-        .el-image {
-          display: block;
-        }
-        .mask {
-          position: absolute;
-          left: 0;
-          top: 0;
-          width: 120px;
-          height: 120px;
-          background: rgba($color: #000000, $alpha: 0.3);
-          display: flex;
-          align-items: center;
-          justify-content: center;
-          i {
-            font-size: 20px;
-            color: #ffffff;
-            cursor: pointer;
-            margin: 0 8px;
-          }
-        }
-      }
-      .text {
-        font-size: 14px;
-        color: #666666;
-      }
-    }
-    .add {
-      width: 120px;
-      height: 120px;
-      border: 1px dashed #eaeaea;
-      border-radius: 5px;
-      cursor: pointer;
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      i {
-        font-size: 30px;
-        color: #999;
-      }
-    }
-    .tmp-img {
-      position: relative;
-      .tmp {
-        position: absolute;
-        left: 0;
-        top: 0;
-        line-height: 20px;
-        padding: 0 8px;
-        background: #f66460;
-        border-radius: 0 0 10px 0;
-        font-size: 12px;
-        color: #ffffff;
-      }
-    }
-  }
-</style>

+ 0 - 244
src/views/merchant/merchant_list.vue

@@ -1,244 +0,0 @@
-<template>
-  <div class="app-container">
-    <!-- 筛选条件 -->
-    <div class="screen-container">
-      <div class="top clearfix">
-        <div class="title fl">条件筛选</div>
-      </div>
-      <el-form ref="screenForm" :model="screenForm" label-width="70px" size="small" label-position="left">
-        <el-row :gutter="20">
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="商户账号" prop="account">
-              <el-input v-model="screenForm.account" placeholder="请输入商户账号"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="商户昵称" prop="nickname">
-              <el-input v-model="screenForm.nickname" placeholder="请输入商户昵称"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="联系电话" prop="phone">
-              <el-input v-model="screenForm.phone" placeholder="请输入联系电话"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="电子邮箱" prop="email">
-              <el-input v-model="screenForm.email" placeholder="请输入电子邮箱"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="状态" prop="state">
-              <el-select v-model="screenForm.status" placeholder="全部">
-                <el-option label="全部" value=""></el-option>
-                <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          
-          <el-col :xs="24" :sm="12" :lg="18" class="tr">
-            <el-form-item label="">
-              <el-button size="small" @click="resetScreenForm">清空</el-button>
-              <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </div>
-
-    <div class="mymain-container">
-      <div class="btn-group clearfix">
-        <div class="fl">
-          <el-button size="small" type="primary" @click="toCreate()">开通账号</el-button>
-        </div>
-        <div class="fr">
-          <el-button size="small" type="primary" icon="el-icon-download" @click="handleExport">导出数据</el-button>
-        </div>
-      </div>
-      <div class="table">
-        <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-          <el-table-column align="center" label="操作" width="230" fixed="right">
-            <template slot-scope="scope">
-              <el-button type="text" @click="toDetail(scope.row.adminUserId, 1)">详情</el-button>
-              <el-button type="text" @click="toDetail(scope.row.adminUserId, 2)">商城配置</el-button>
-              <el-button type="text" @click="toDetail(scope.row.adminUserId, 3)">企微配置</el-button>
-              <template v-if="checkBtnRole('status')">
-                <el-popconfirm v-if="scope.row.status" style="margin-left: 10px;" title="确定冻结吗?" @onConfirm="changeStatus(scope.row.adminUserId, 0)" >
-                  <el-button slot="reference" type="text">冻结</el-button>
-                </el-popconfirm>
-                <el-popconfirm v-else style="margin-left: 10px;" title="确定恢复吗?" @onConfirm="changeStatus(scope.row.adminUserId, 1)" >
-                  <el-button slot="reference" type="text">恢复</el-button>
-                </el-popconfirm>
-              </template>
-            </template>
-          </el-table-column>
-          <el-table-column align="center" label="商户账号" prop="userName" min-width="100" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <el-button type="text" @click="toAccountList(scope.row)">查看</el-button>
-            </template>
-          </el-table-column>
-          <el-table-column align="center" label="商户昵称" prop="companyName" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="负责人" prop="linkName" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="角色" prop="roleName" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="联系电话" prop="linkPhone" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="电子邮箱" prop="email" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="地址" prop="address" min-width="200" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="状态" class-name="status-col">
-            <template slot-scope="scope">
-              <el-tag :type="scope.row.status ? 'success':'danger'">{{ scope.row.status ? '正常':'冻结' }}</el-tag>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-    </div>
-    <div class="pagination clearfix">
-      <div class="fr">
-        <el-pagination
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="currentPage"
-          :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="listTotal">
-        </el-pagination>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import { COMMON_SELECT } from '@/utils/select_data'
-import {getList, changeAccountStatus} from "@/api/merchant";
-import {downloadFiles} from '@/utils/util'
-
-export default {
-  data() {
-    return {
-      isOpen: false, // 是否展开条件筛选
-      currentPage: 1, // 当前页码
-      pageSize: 10, // 每页数量
-      listTotal: 0, // 列表总数
-      dataList: null, // 列表数据
-      listLoading: false, // 列表加载loading
-      screenForm: { // 筛选表单数据
-        account: '',
-        nickname: '',
-        phone: '',
-        email: '',
-        status: '',
-      },
-      select_status: [ // 筛选字段 - 状态
-        { label: '正常', value: true },
-        { label: '冻结', value: false }
-      ],
-    }
-  },
-  created() {
-    this.getList();
-  },
-  methods: {
-    // 查询按钮权限
-    checkBtnRole(value) {
-      // let btnRole = this.$route.meta.roles;
-      // if(!btnRole) {return true}
-      // let index = btnRole.indexOf(value);
-      // return index >= 0;
-      return true
-    },
-
-    // 查询列表
-    getList() {
-      this.listLoading = true;
-
-      let params = {
-        pageNum: this.currentPage,
-        pageSize: this.pageSize,
-        userName: this.screenForm.account,
-        nickName: this.screenForm.nickName,
-        linkPhone: this.screenForm.phone,
-        email: this.screenForm.email,
-        status: this.screenForm.status,
-      };
-      getList(params).then((res) => {
-        this.dataList = res.data.records;
-        this.listTotal = res.data.total;
-        this.listLoading = false;
-      })
-    },
-    // 提交筛选表单
-    submitScreenForm() {
-      this.currentPage = 1;
-      this.getList();
-    },
-    // 重置筛选表单
-    resetScreenForm() {
-      this.$refs.screenForm.resetFields();
-      this.currentPage = 1;
-      this.getList();
-    },
-    // 更改每页数量
-    handleSizeChange(val) {
-      this.pageSize = val;
-      this.currentPage = 1;
-      this.getList();
-    },
-    // 更改当前页
-    handleCurrentChange(val) {
-      this.currentPage = val;
-      this.getList();
-    },
-
-    // 去开通账号
-    toCreate() {
-      this.$router.push({
-        path: '/merchant/create_account',
-        query: {}
-      })
-    },
-
-    toAccountList() {
-      this.$router.push({
-        path: '/setting/account',
-        query: {
-          type: 1
-        }
-      })
-    },
-
-    toDetail(id, type) {
-      this.$router.push({
-        path: '/merchant/merchant_detail',
-        query: {
-          id, type
-        }
-      })
-    },
-
-    // 操作 - 更改状态(type: 禁用0,启用1)
-    changeStatus(id, type) {
-      type = type ? true : false
-      changeAccountStatus({adminUserId: id, status: type}).then(res => {
-        this.getList();
-        this.$successMsg();
-      })
-    },
-
-    // 导出
-    handleExport() {
-      let screenData = {
-        userName: this.screenForm.account,
-        nickName: this.screenForm.nickName,
-        linkPhone: this.screenForm.phone,
-        email: this.screenForm.email,
-        status: this.screenForm.status,
-      };
-      downloadFiles('admin/user/mch/export', screenData);
-    },
-  }
-}
-</script>
-
-<style scoped>
-
-</style>