Merge branch 'dev-ryan'
# Conflicts: # buyer/src/components/header/Header.vue # buyer/src/components/invoiceModal/index.vue # manager/src/config/index.js
This commit is contained in:
		
						commit
						d57b33cb4e
					
				@ -4,7 +4,7 @@
 | 
				
			|||||||
    <meta charset="utf-8">
 | 
					    <meta charset="utf-8">
 | 
				
			||||||
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
 | 
					    <meta name="viewport" content="width=device-width,initial-scale=1.0">
 | 
				
			||||||
    <link rel="icon" href="./static/logo.ico" type="image/x-icon">
 | 
					    <link rel="icon" href="./static/logo.ico" type="image/x-icon">
 | 
				
			||||||
    <!-- <script src = 'https://webapi.amap.com/maps?v=2.0&key=b440952723253aa9fe483e698057bf7d'></script> -->
 | 
					    <script src="https://yzf.qq.com/xv/web/static/chat_sdk/yzf_chat.min.js"></script>
 | 
				
			||||||
    <title>LILI</title>
 | 
					    <title>LILI</title>
 | 
				
			||||||
  </head>
 | 
					  </head>
 | 
				
			||||||
  <body>
 | 
					  <body>
 | 
				
			||||||
 | 
				
			|||||||
@ -441,3 +441,39 @@ export function memberPointHistory (params) {
 | 
				
			|||||||
    params
 | 
					    params
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * 分页获取会员站内信
 | 
				
			||||||
 | 
					 * @param {Object} params 请求参数,包括pageNumber、pageSize、status
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					export function memberMsgList (params) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: `/buyer/member/message`,
 | 
				
			||||||
 | 
					    method: Method.GET,
 | 
				
			||||||
 | 
					    needToken: true,
 | 
				
			||||||
 | 
					    params
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * 设置消息为已读
 | 
				
			||||||
 | 
					 * @param {String} messageId 消息id
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					 export function readMemberMsg (params) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: `/buyer/member/message`,
 | 
				
			||||||
 | 
					    method: Method.PUT,
 | 
				
			||||||
 | 
					    needToken: true,
 | 
				
			||||||
 | 
					    params
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * 删除会员消息
 | 
				
			||||||
 | 
					 * @param {String} messageId 消息id
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					 export function delMemberMsg (params) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: `/buyer/member/message`,
 | 
				
			||||||
 | 
					    method: Method.DELETE,
 | 
				
			||||||
 | 
					    needToken: true,
 | 
				
			||||||
 | 
					    params
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -63,17 +63,17 @@ export default {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    selectTags (item) {
 | 
					    selectTags (item) { // 选择热门标签
 | 
				
			||||||
      this.searchData = item;
 | 
					      this.searchData = item;
 | 
				
			||||||
      this.search();
 | 
					      this.search();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    search () {
 | 
					    search () { // 全平台搜索商品
 | 
				
			||||||
      this.$router.push({
 | 
					      this.$router.push({
 | 
				
			||||||
        path: '/goodsList',
 | 
					        path: '/goodsList',
 | 
				
			||||||
        query: { keyword: this.searchData }
 | 
					        query: { keyword: this.searchData }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    searchStore () {
 | 
					    searchStore () { // 店铺搜索商品
 | 
				
			||||||
      this.$emit('search', this.searchData)
 | 
					      this.$emit('search', this.searchData)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
				
			|||||||
@ -57,7 +57,7 @@ import {
 | 
				
			|||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: 'addressManage',
 | 
					  name: 'addressManage',
 | 
				
			||||||
  props: {
 | 
					  props: {
 | 
				
			||||||
    id: {
 | 
					    id: { // 传入的地址id
 | 
				
			||||||
      defalut: '',
 | 
					      defalut: '',
 | 
				
			||||||
      type: String
 | 
					      type: String
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -89,7 +89,7 @@ export default {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    save () {
 | 
					    save () { // 保存地址
 | 
				
			||||||
      this.$refs.form.validate((valid) => {
 | 
					      this.$refs.form.validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          const params = JSON.parse(JSON.stringify(this.formData));
 | 
					          const params = JSON.parse(JSON.stringify(this.formData));
 | 
				
			||||||
@ -138,15 +138,15 @@ export default {
 | 
				
			|||||||
      this.formData.lat = item.position.lat;
 | 
					      this.formData.lat = item.position.lat;
 | 
				
			||||||
      this.formData.lon = item.position.lng;
 | 
					      this.formData.lon = item.position.lng;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    show () {
 | 
					    show () { // 地址模态框显示
 | 
				
			||||||
      this.showAddr = true;
 | 
					      this.showAddr = true;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    hide () {
 | 
					    hide () { // 地址模态框隐藏
 | 
				
			||||||
      this.showAddr = false;
 | 
					      this.showAddr = false;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  watch: {
 | 
					  watch: {
 | 
				
			||||||
    id: {
 | 
					    id: { // 传入的地址id
 | 
				
			||||||
      handler: function (v) {
 | 
					      handler: function (v) {
 | 
				
			||||||
        if (v) {
 | 
					        if (v) {
 | 
				
			||||||
          this.getAddrById(v);
 | 
					          this.getAddrById(v);
 | 
				
			||||||
 | 
				
			|||||||
@ -59,7 +59,6 @@ export default {
 | 
				
			|||||||
      isActive: 0 // 已激活tab栏下标
 | 
					      isActive: 0 // 已激活tab栏下标
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted () {},
 | 
					 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    // 点击右侧的回调
 | 
					    // 点击右侧的回调
 | 
				
			||||||
    callBack () {
 | 
					    callBack () {
 | 
				
			||||||
 | 
				
			|||||||
@ -44,7 +44,7 @@ export default {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    getList () {
 | 
					    getList () { // 获取优惠券列表
 | 
				
			||||||
      this.loading = true
 | 
					      this.loading = true
 | 
				
			||||||
      memberCouponList(this.params).then(res => {
 | 
					      memberCouponList(this.params).then(res => {
 | 
				
			||||||
        this.loading = false
 | 
					        this.loading = false
 | 
				
			||||||
@ -67,18 +67,18 @@ export default {
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    changePageNum (val) {
 | 
					    changePageNum (val) { // 分页改变页码
 | 
				
			||||||
      this.params.pageNumber = val;
 | 
					      this.params.pageNumber = val;
 | 
				
			||||||
      this.getList()
 | 
					      this.getList()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    changePageSize (val) {
 | 
					    changePageSize (val) { // 分页改变页数
 | 
				
			||||||
      this.pageNumber = 1;
 | 
					      this.pageNumber = 1;
 | 
				
			||||||
      this.params.pageSize = val;
 | 
					      this.params.pageSize = val;
 | 
				
			||||||
      this.getList()
 | 
					      this.getList()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    useScope (type, storeName) {
 | 
					    useScope (type, storeName) { // 根据字段返回 优惠券适用范围
 | 
				
			||||||
      let shop = '平台';
 | 
					      let shop = '平台';
 | 
				
			||||||
      let goods = '全部商品'
 | 
					      let goods = '全部商品'
 | 
				
			||||||
      if (storeName !== 'platform') shop = storeName
 | 
					      if (storeName !== 'platform') shop = storeName
 | 
				
			||||||
@ -104,7 +104,7 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style scoped lang="scss">
 | 
				
			||||||
@import '../../assets/styles/coupon.scss';
 | 
					@import '../../assets/styles/coupon.scss';
 | 
				
			||||||
.pageration{
 | 
					.pageration {
 | 
				
			||||||
    text-align: right;
 | 
					  text-align: right;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 | 
				
			|||||||
@ -151,8 +151,6 @@ export default {
 | 
				
			|||||||
      ]
 | 
					      ]
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  components: {},
 | 
					 | 
				
			||||||
  mounted () {},
 | 
					 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    getCartList () { // 获取购物车列表
 | 
					    getCartList () { // 获取购物车列表
 | 
				
			||||||
      this.loading = true
 | 
					      this.loading = true
 | 
				
			||||||
 | 
				
			|||||||
@ -44,12 +44,12 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    showCartNum (item) {
 | 
					    showCartNum (item) { // 获取购物车数量
 | 
				
			||||||
      if (this.userInfo && item.title === '购物车') {
 | 
					      if (this.userInfo && item.title === '购物车') {
 | 
				
			||||||
        this.getCartList()
 | 
					        this.getCartList()
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    clickBar (val) {
 | 
					    clickBar (val) { // tabbar点击操作
 | 
				
			||||||
      if (!this.userInfo) {
 | 
					      if (!this.userInfo) {
 | 
				
			||||||
        this.$Modal.confirm({
 | 
					        this.$Modal.confirm({
 | 
				
			||||||
          title: '请登录',
 | 
					          title: '请登录',
 | 
				
			||||||
@ -83,7 +83,7 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    openBlank (path) {
 | 
					    openBlank (path) { // 新页面打开地址
 | 
				
			||||||
      let routerUrl = this.$router.resolve({
 | 
					      let routerUrl = this.$router.resolve({
 | 
				
			||||||
        path: path
 | 
					        path: path
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
 | 
				
			|||||||
@ -13,11 +13,6 @@
 | 
				
			|||||||
<script>
 | 
					<script>
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: 'Main',
 | 
					  name: 'Main',
 | 
				
			||||||
  data () {
 | 
					 | 
				
			||||||
    return {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  props: {
 | 
					  props: {
 | 
				
			||||||
    _Title: { // 描述内容
 | 
					    _Title: { // 描述内容
 | 
				
			||||||
      type: null,
 | 
					      type: null,
 | 
				
			||||||
 | 
				
			|||||||
@ -62,7 +62,7 @@ export default {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    goArticle () { // 跳转
 | 
					    goArticle () { // 跳转文章页
 | 
				
			||||||
      let routeUrl = this.$router.resolve({
 | 
					      let routeUrl = this.$router.resolve({
 | 
				
			||||||
        path: '/article'
 | 
					        path: '/article'
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
 | 
				
			|||||||
@ -19,7 +19,7 @@ export default {
 | 
				
			|||||||
    time: { // 传入的初始时间
 | 
					    time: { // 传入的初始时间
 | 
				
			||||||
      default: 1718977559428
 | 
					      default: 1718977559428
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    type: {
 | 
					    type: { // 区分是在详情还是购物车调用
 | 
				
			||||||
      default: 'goodsDetail', // 设置两个值,goodsDetail和cart,样式不同
 | 
					      default: 'goodsDetail', // 设置两个值,goodsDetail和cart,样式不同
 | 
				
			||||||
      type: String
 | 
					      type: String
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -37,7 +37,7 @@ export default {
 | 
				
			|||||||
    this.init()
 | 
					    this.init()
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    countDown (val) {
 | 
					    countDown (val) { // 倒计时方法
 | 
				
			||||||
      function addZero (i) {
 | 
					      function addZero (i) {
 | 
				
			||||||
        return i < 10 ? '0' + i : i + '';
 | 
					        return i < 10 ? '0' + i : i + '';
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
@ -58,8 +58,8 @@ export default {
 | 
				
			|||||||
        clearInterval(this.interval)
 | 
					        clearInterval(this.interval)
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    init () {
 | 
					    init () { // 初始化
 | 
				
			||||||
      this.interval = setInterval((item) => {
 | 
					      this.interval = setInterval(() => {
 | 
				
			||||||
        this.countDown(this.time);
 | 
					        this.countDown(this.time);
 | 
				
			||||||
      }, 1000);
 | 
					      }, 1000);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -20,7 +20,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        <div class="goodsConfig mt_10">
 | 
					        <div class="goodsConfig mt_10">
 | 
				
			||||||
          <span @click="collect" ><Icon type="ios-heart" :color="isCollected ? '#ed3f14' : '#666'" />{{isCollected?'已收藏':'收藏'}}</span>
 | 
					          <span @click="collect" ><Icon type="ios-heart" :color="isCollected ? '#ed3f14' : '#666'" />{{isCollected?'已收藏':'收藏'}}</span>
 | 
				
			||||||
          <!-- <span>举报</span> -->
 | 
					 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <!-- 右侧商品信息、活动信息、操作展示 -->
 | 
					      <!-- 右侧商品信息、活动信息、操作展示 -->
 | 
				
			||||||
@ -60,7 +59,7 @@
 | 
				
			|||||||
                  :key="index"
 | 
					                  :key="index"
 | 
				
			||||||
                  @click="receiveCoupon(item.id)"
 | 
					                  @click="receiveCoupon(item.id)"
 | 
				
			||||||
                  >
 | 
					                  >
 | 
				
			||||||
                  <span v-if="item.couponType == 'PRICE'">满{{ item.consumeThreshold }}减{{item.price | unitPrice}}</span>
 | 
					                  <span v-if="item.couponType == 'PRICE'">满{{ item.consumeThreshold }}减{{item.price}}</span>
 | 
				
			||||||
                  <span v-if="item.couponType == 'DISCOUNT'">满{{ item.consumeThreshold }}打{{item.couponDiscount}}折</span>
 | 
					                  <span v-if="item.couponType == 'DISCOUNT'">满{{ item.consumeThreshold }}打{{item.couponDiscount}}折</span>
 | 
				
			||||||
                  </span>
 | 
					                  </span>
 | 
				
			||||||
              </p>
 | 
					              </p>
 | 
				
			||||||
@ -120,38 +119,16 @@
 | 
				
			|||||||
              <span class="inventory"> {{skuDetail.weight}}kg</span>
 | 
					              <span class="inventory"> {{skuDetail.weight}}kg</span>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
          <div class="add-buy-car">
 | 
					          <div class="add-buy-car" v-if="$route.query.way === 'POINT'">
 | 
				
			||||||
 | 
					            <Button type="error" :loading="loading" :disabled="skuDetail.quantity === 0" @click="pointPay">积分购买</Button>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					          <div class="add-buy-car" v-else>
 | 
				
			||||||
            <Button type="error" :loading="loading" :disabled="skuDetail.quantity === 0" @click="addShoppingCartBtn">加入购物车</Button>
 | 
					            <Button type="error" :loading="loading" :disabled="skuDetail.quantity === 0" @click="addShoppingCartBtn">加入购物车</Button>
 | 
				
			||||||
            <Button type="warning" :loading="loading1" :disabled="skuDetail.quantity === 0" @click="buyNow">立即购买</Button>
 | 
					            <Button type="warning" :loading="loading1" :disabled="skuDetail.quantity === 0" @click="buyNow">立即购买</Button>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
 | 
					          
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
 | 
					 | 
				
			||||||
      <!-- <div class="item-detail-see">
 | 
					 | 
				
			||||||
        <Divider>更多推荐</Divider>
 | 
					 | 
				
			||||||
        <Row>
 | 
					 | 
				
			||||||
          <Col :span="24" class="see-Item">
 | 
					 | 
				
			||||||
            <img class="see-Img" src="https://demo.dscmall.cn/storage/images/201703/thumb_img/0_thumb_G_1489099128797.jpg" alt="" />
 | 
					 | 
				
			||||||
            <p>
 | 
					 | 
				
			||||||
              名龙堂i7 6700升7700 GTX1060 6G台式电脑主机DIY游戏组装整机
 | 
					 | 
				
			||||||
              升6GB独显 送正版WIN10 一年上门
 | 
					 | 
				
			||||||
            </p>
 | 
					 | 
				
			||||||
            <p class="global_color">¥2500.00</p>
 | 
					 | 
				
			||||||
          </Col>
 | 
					 | 
				
			||||||
          <Col :span="24" class="see-Item">
 | 
					 | 
				
			||||||
            <img
 | 
					 | 
				
			||||||
              class="see-Img"
 | 
					 | 
				
			||||||
              src="https://demo.dscmall.cn/storage/images/201703/thumb_img/0_thumb_G_1489099128797.jpg"
 | 
					 | 
				
			||||||
              alt=""
 | 
					 | 
				
			||||||
            />
 | 
					 | 
				
			||||||
            <p>
 | 
					 | 
				
			||||||
              名龙堂i7 6700升7700 GTX1060 6G台式电脑主机DIY游戏组装整机
 | 
					 | 
				
			||||||
              升6GB独显 送正版WIN10 一年上门
 | 
					 | 
				
			||||||
            </p>
 | 
					 | 
				
			||||||
            <p class="global_color">¥2500.00</p>
 | 
					 | 
				
			||||||
          </Col>
 | 
					 | 
				
			||||||
        </Row>
 | 
					 | 
				
			||||||
      </div> -->
 | 
					 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
@ -247,6 +224,22 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    pointPay () { // 积分购买
 | 
				
			||||||
 | 
					      const params = {
 | 
				
			||||||
 | 
					        num: this.count,
 | 
				
			||||||
 | 
					        skuId: this.skuDetail.id,
 | 
				
			||||||
 | 
					        cartType: 'BUY_NOW'
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					      this.loading1 = true;
 | 
				
			||||||
 | 
					      addCartGoods(params).then(res => {
 | 
				
			||||||
 | 
					        this.loading1 = false;
 | 
				
			||||||
 | 
					        if (res.success) {
 | 
				
			||||||
 | 
					          this.$router.push({path: '/pay', query: {way: 'POINT'}});
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          this.$Message.warning(res.message);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    async collect () { // 收藏商品
 | 
					    async collect () { // 收藏商品
 | 
				
			||||||
      if (this.isCollected) {
 | 
					      if (this.isCollected) {
 | 
				
			||||||
        let cancel = await cancelCollect('GOODS', this.skuDetail.id)
 | 
					        let cancel = await cancelCollect('GOODS', this.skuDetail.id)
 | 
				
			||||||
@ -338,6 +331,7 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted () {
 | 
					  mounted () {
 | 
				
			||||||
 | 
					    // 用户登录才会判断是否收藏
 | 
				
			||||||
    if (this.Cookies.getItem('userInfo')) {
 | 
					    if (this.Cookies.getItem('userInfo')) {
 | 
				
			||||||
      isCollection('GOODS', this.skuDetail.id).then(res => {
 | 
					      isCollection('GOODS', this.skuDetail.id).then(res => {
 | 
				
			||||||
        if (res.success && res.result) {
 | 
					        if (res.success && res.result) {
 | 
				
			||||||
 | 
				
			|||||||
@ -38,10 +38,10 @@
 | 
				
			|||||||
                  </div>
 | 
					                  </div>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
                <div class="remarks-bar">
 | 
					                <div class="remarks-bar">
 | 
				
			||||||
                  <span @click="searchByGrade('')" :class="{selectedBar: commentParams.grade === ''}">全部({{commentTypeNum.all}})</span>
 | 
					                  <span @click="viewByGrade('')" :class="{selectedBar: commentParams.grade === ''}">全部({{commentTypeNum.all}})</span>
 | 
				
			||||||
                  <span @click="searchByGrade('GOOD')" :class="{selectedBar: commentParams.grade === 'GOOD'}">好评({{commentTypeNum.good}})</span>
 | 
					                  <span @click="viewByGrade('GOOD')" :class="{selectedBar: commentParams.grade === 'GOOD'}">好评({{commentTypeNum.good}})</span>
 | 
				
			||||||
                  <span @click="searchByGrade('MODERATE')" :class="{selectedBar: commentParams.grade === 'MODERATE'}">中评({{commentTypeNum.moderate}})</span>
 | 
					                  <span @click="viewByGrade('MODERATE')" :class="{selectedBar: commentParams.grade === 'MODERATE'}">中评({{commentTypeNum.moderate}})</span>
 | 
				
			||||||
                  <span @click="searchByGrade('WORSE')" :class="{selectedBar: commentParams.grade === 'WORSE'}">差评({{commentTypeNum.worse}})</span>
 | 
					                  <span @click="viewByGrade('WORSE')" :class="{selectedBar: commentParams.grade === 'WORSE'}">差评({{commentTypeNum.worse}})</span>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
                <div style="text-align: center;margin-top: 20px;" v-if="commentList.length === 0">
 | 
					                <div style="text-align: center;margin-top: 20px;" v-if="commentList.length === 0">
 | 
				
			||||||
                  暂无评价数据
 | 
					                  暂无评价数据
 | 
				
			||||||
@ -86,9 +86,6 @@
 | 
				
			|||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
              </div>
 | 
					              </div>
 | 
				
			||||||
            </TabPane>
 | 
					            </TabPane>
 | 
				
			||||||
            <!-- <TabPane label="商品问答">
 | 
					 | 
				
			||||||
              <ShowGoodsQuestion/>
 | 
					 | 
				
			||||||
            </TabPane> -->
 | 
					 | 
				
			||||||
          </Tabs>
 | 
					          </Tabs>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
@ -97,7 +94,6 @@
 | 
				
			|||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import ShowGoodsQuestion from '@/components/goodsDetail/ShowGoodsQuestion';
 | 
					 | 
				
			||||||
import { goodsComment, goodsCommentNum } from '@/api/member.js';
 | 
					import { goodsComment, goodsCommentNum } from '@/api/member.js';
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: 'ShowGoodsDetail',
 | 
					  name: 'ShowGoodsDetail',
 | 
				
			||||||
@ -122,21 +118,21 @@ export default {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  computed: {
 | 
					  computed: {
 | 
				
			||||||
    skuDetail () {
 | 
					    skuDetail () { // skuId
 | 
				
			||||||
      return this.detail.data;
 | 
					      return this.detail.data;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    changeHeight (name) {
 | 
					    changeHeight (name) {  // 设置商品详情高度
 | 
				
			||||||
      let heightCss = window.getComputedStyle(this.$refs[name]).height;
 | 
					      let heightCss = window.getComputedStyle(this.$refs[name]).height;
 | 
				
			||||||
      heightCss = parseInt(heightCss.substr(0, heightCss.length - 2)) + 89;
 | 
					      heightCss = parseInt(heightCss.substr(0, heightCss.length - 2)) + 89;
 | 
				
			||||||
      this.$refs.itemIntroDetail.style.height = heightCss + 'px';
 | 
					      this.$refs.itemIntroDetail.style.height = heightCss + 'px';
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePageNum (val) {
 | 
					    changePageNum (val) { // 修改评论页码
 | 
				
			||||||
      this.commentParams.pageNumber = val;
 | 
					      this.commentParams.pageNumber = val;
 | 
				
			||||||
      this.getList();
 | 
					      this.getList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePageSize (val) {
 | 
					    changePageSize (val) { // 修改评论页数
 | 
				
			||||||
      this.commentParams.pageNumber = 1;
 | 
					      this.commentParams.pageNumber = 1;
 | 
				
			||||||
      this.commentParams.pageSize = val;
 | 
					      this.commentParams.pageSize = val;
 | 
				
			||||||
      this.getList();
 | 
					      this.getList();
 | 
				
			||||||
@ -155,12 +151,12 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    searchByGrade (grade) {
 | 
					    viewByGrade (grade) { // 好中差评切换
 | 
				
			||||||
      this.$set(this.commentParams, 'grade', grade);
 | 
					      this.$set(this.commentParams, 'grade', grade);
 | 
				
			||||||
      this.commentParams.pageNumber = 1;
 | 
					      this.commentParams.pageNumber = 1;
 | 
				
			||||||
      this.getList();
 | 
					      this.getList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    tabClick (name) {
 | 
					    tabClick (name) { // 商品详情和评价之间的tab切换
 | 
				
			||||||
      if (name === 0) {
 | 
					      if (name === 0) {
 | 
				
			||||||
        this.$nextTick(() => {
 | 
					        this.$nextTick(() => {
 | 
				
			||||||
          this.changeHeight('itemIntroGoods')
 | 
					          this.changeHeight('itemIntroGoods')
 | 
				
			||||||
@ -198,7 +194,7 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleScroll () {
 | 
					    handleScroll () { // 监听页面滚动
 | 
				
			||||||
      if (this.onceFlag) {
 | 
					      if (this.onceFlag) {
 | 
				
			||||||
        this.$nextTick(() => {
 | 
					        this.$nextTick(() => {
 | 
				
			||||||
          this.changeHeight('itemIntroGoods')
 | 
					          this.changeHeight('itemIntroGoods')
 | 
				
			||||||
@ -208,15 +204,12 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted () {
 | 
					  mounted () {
 | 
				
			||||||
    this.$nextTick(() => {
 | 
					    this.$nextTick(() => { // 手动设置详情高度,解决无法撑开问题
 | 
				
			||||||
      setTimeout(this.changeHeight('itemIntroGoods'), 2000);
 | 
					      setTimeout(this.changeHeight('itemIntroGoods'), 2000);
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
    window.addEventListener('scroll', this.handleScroll)
 | 
					    window.addEventListener('scroll', this.handleScroll)
 | 
				
			||||||
    this.getList();
 | 
					    this.getList();
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  components: {
 | 
					 | 
				
			||||||
    ShowGoodsQuestion
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -283,14 +276,12 @@ export default {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
.item-intro-detail{
 | 
					.item-intro-detail{
 | 
				
			||||||
  margin: 0  30px;
 | 
					  margin: 0  30px;
 | 
				
			||||||
  // min-height: 1500px;
 | 
					 | 
				
			||||||
  width: 100%;
 | 
					  width: 100%;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.item-intro-nav{
 | 
					.item-intro-nav{
 | 
				
			||||||
  width: 100%;
 | 
					  width: 100%;
 | 
				
			||||||
  height: 38px;
 | 
					  height: 38px;
 | 
				
			||||||
  background-color: #F7F7F7;
 | 
					  background-color: #F7F7F7;
 | 
				
			||||||
  // border-bottom: 1px solid $theme_color;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.item-intro-nav ul{
 | 
					.item-intro-nav ul{
 | 
				
			||||||
  margin: 0px;
 | 
					  margin: 0px;
 | 
				
			||||||
@ -329,8 +320,6 @@ export default {
 | 
				
			|||||||
  width: 240px;
 | 
					  width: 240px;
 | 
				
			||||||
  height: 36px;
 | 
					  height: 36px;
 | 
				
			||||||
  font-size: 14px;
 | 
					  font-size: 14px;
 | 
				
			||||||
  /* text-align: center; */
 | 
					 | 
				
			||||||
  /* background-color: #ccc; */
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.item-param-title {
 | 
					.item-param-title {
 | 
				
			||||||
  color: #232323;
 | 
					  color: #232323;
 | 
				
			||||||
 | 
				
			|||||||
@ -1,53 +0,0 @@
 | 
				
			|||||||
<template>
 | 
					 | 
				
			||||||
  <div class="wrapper">
 | 
					 | 
				
			||||||
    <div v-if="true" class="question-list">
 | 
					 | 
				
			||||||
      <div class="-item" v-for="index in 6" :key="index">
 | 
					 | 
				
			||||||
        <!-- 提问 -->
 | 
					 | 
				
			||||||
        <div class="-item-put -item-div">
 | 
					 | 
				
			||||||
          <div class="-item-div-l blod">
 | 
					 | 
				
			||||||
            <Tag color="warning">问</Tag>
 | 
					 | 
				
			||||||
            有屏幕调节亮度吗
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
          <div class="-item-div-r">2020年10月21日17:03:35</div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
        <!-- 解答 -->
 | 
					 | 
				
			||||||
        <div class="-item-reply -item-div">
 | 
					 | 
				
			||||||
          <div class="-item-div-l">
 | 
					 | 
				
			||||||
            <Tag color="success">答</Tag>
 | 
					 | 
				
			||||||
            能调节,点屏幕上方有一条调整带,可正负2调整。
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
          <div class="-item-div-r">2020年10月21日17:03:35</div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
    <div v-else class="question-empty">
 | 
					 | 
				
			||||||
      <empty></empty>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
  </div>
 | 
					 | 
				
			||||||
</template>
 | 
					 | 
				
			||||||
<script>
 | 
					 | 
				
			||||||
export default {};
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
<style scoped lang="scss">
 | 
					 | 
				
			||||||
.-item-div {
 | 
					 | 
				
			||||||
  padding: 10px 0;
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  align-items: center;
 | 
					 | 
				
			||||||
  justify-content: space-between;
 | 
					 | 
				
			||||||
  margin: 10px 0;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.-item-div-l {
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  @include content_color($light_content_color);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.-item-div-r {
 | 
					 | 
				
			||||||
  @include sub_color($light_content_color);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.blod {
 | 
					 | 
				
			||||||
  font-weight: bold;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.-item {
 | 
					 | 
				
			||||||
  margin: 10px 0;
 | 
					 | 
				
			||||||
  border-bottom: 1px solid $border_color;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
</style>
 | 
					 | 
				
			||||||
@ -1,85 +0,0 @@
 | 
				
			|||||||
<template>
 | 
					 | 
				
			||||||
  <div>
 | 
					 | 
				
			||||||
    <div class="remarks-title">
 | 
					 | 
				
			||||||
      <span>售后保障</span>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
    <div class="item-protect-container">
 | 
					 | 
				
			||||||
      <div class="item-protect-box">
 | 
					 | 
				
			||||||
        <p class="item-protect-title-box">
 | 
					 | 
				
			||||||
          <Avatar style="background-color: #e4393c" icon="ribbon-a" />
 | 
					 | 
				
			||||||
          <span class="item-protect-title">卖家服务</span>
 | 
					 | 
				
			||||||
        </p>
 | 
					 | 
				
			||||||
        <p class="item-protect-detail">
 | 
					 | 
				
			||||||
          高品质敢承诺:7天无理由退货,30天免费换新,质量问题商家承担来回运费换新;如需发票,请在确认收货无误后联系商家开出。(注*发票不随货品一同发出)
 | 
					 | 
				
			||||||
        </p>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
      <div class="item-protect-box">
 | 
					 | 
				
			||||||
        <p class="item-protect-title-box">
 | 
					 | 
				
			||||||
          <Avatar style="background-color: #e4393c" icon="cash" />
 | 
					 | 
				
			||||||
          <span class="item-protect-title">平台承诺</span>
 | 
					 | 
				
			||||||
        </p>
 | 
					 | 
				
			||||||
        <p class="item-protect-detail">
 | 
					 | 
				
			||||||
          平台卖家销售并发货的商品,由平台卖家提供发票和相应的售后服务。请您放心购买!<br> 注:因厂家会在没有任何提前通知的情况下更改产品包装、产地或者一些附件,本司不能确保客户收到的货物与商城图片、产地、附件说明完全一致。只能确保为原厂正货!并且保证与当时市场上同样主流新品一致。若本商城没有及时更新,请大家谅解!
 | 
					 | 
				
			||||||
        </p>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
      <div class="item-protect-box">
 | 
					 | 
				
			||||||
        <p class="item-protect-title-box">
 | 
					 | 
				
			||||||
          <Avatar style="background-color: #e4393c" icon="locked" />
 | 
					 | 
				
			||||||
          <span class="item-protect-title">正品行货</span>
 | 
					 | 
				
			||||||
        </p>
 | 
					 | 
				
			||||||
        <p class="item-protect-detail">
 | 
					 | 
				
			||||||
          BIT商城向您保证所售商品均为正品行货,BIT自营商品开具机打发票或电子发票。
 | 
					 | 
				
			||||||
        </p>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
      <div class="item-protect-box">
 | 
					 | 
				
			||||||
        <p class="item-protect-title-box">
 | 
					 | 
				
			||||||
          <Avatar style="background-color: #e4393c" icon="settings" />
 | 
					 | 
				
			||||||
          <span class="item-protect-title">全国联保</span>
 | 
					 | 
				
			||||||
        </p>
 | 
					 | 
				
			||||||
        <p class="item-protect-detail">
 | 
					 | 
				
			||||||
          凭质保证书及BIT商城发票,可享受全国联保服务(奢侈品、钟表除外;奢侈品、钟表由BIT联系保修,享受法定三包售后服务),与您亲临商场选购的商品享受相同的质量保证。BIT商城还为您提供具有竞争力的商品价格和运费政策,请您放心购买!<br><br> 注:因厂家会在没有任何提前通知的情况下更改产品包装、产地或者一些附件,本司不能确保客户收到的货物与商城图片、产地、附件说明完全一致。只能确保为原厂正货!并且保证与当时市场上同样主流新品一致。若本商城没有及时更新,请大家谅解!
 | 
					 | 
				
			||||||
        </p>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
  </div>
 | 
					 | 
				
			||||||
</template>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<script>
 | 
					 | 
				
			||||||
export default {
 | 
					 | 
				
			||||||
  name: 'ShowProductWarranty'
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<style scoped lang="scss">
 | 
					 | 
				
			||||||
.remarks-title {
 | 
					 | 
				
			||||||
  padding-left: 15px;
 | 
					 | 
				
			||||||
  height: 36px;
 | 
					 | 
				
			||||||
  font-size: 16px;
 | 
					 | 
				
			||||||
  font-weight: bolder;
 | 
					 | 
				
			||||||
  line-height: 36px;
 | 
					 | 
				
			||||||
  color: #666666;
 | 
					 | 
				
			||||||
  background-color: #F7F7F7;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.item-protect-container {
 | 
					 | 
				
			||||||
  padding: 15px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.item-protect-box {
 | 
					 | 
				
			||||||
  margin-bottom: 30px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.item-protect-title-box {
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  align-items: center;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.item-protect-title {
 | 
					 | 
				
			||||||
  padding-left: 15px;
 | 
					 | 
				
			||||||
  font-size: 20px;
 | 
					 | 
				
			||||||
  font-weight: bolder;
 | 
					 | 
				
			||||||
  color: $theme_color;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.item-protect-detail {
 | 
					 | 
				
			||||||
  padding-top: 5px;
 | 
					 | 
				
			||||||
  padding-left: 46px;
 | 
					 | 
				
			||||||
  font-size: 14px;
 | 
					 | 
				
			||||||
  color: #999;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
</style>
 | 
					 | 
				
			||||||
@ -9,7 +9,6 @@
 | 
				
			|||||||
        </li>
 | 
					        </li>
 | 
				
			||||||
      </ul>
 | 
					      </ul>
 | 
				
			||||||
      <ul class="detail">
 | 
					      <ul class="detail">
 | 
				
			||||||
        <!-- <li class="first hover-pointer" @click="handleClickTheme()">切换主题</li> -->
 | 
					 | 
				
			||||||
        <li class="first" v-show="!userInfo.username">
 | 
					        <li class="first" v-show="!userInfo.username">
 | 
				
			||||||
          <router-link :to="`/login?rePath=${$route.path}&query=${JSON.stringify($route.query)}`">
 | 
					          <router-link :to="`/login?rePath=${$route.path}&query=${JSON.stringify($route.query)}`">
 | 
				
			||||||
            <span style="border:none" class="tipsLogin">请登录</span>
 | 
					            <span style="border:none" class="tipsLogin">请登录</span>
 | 
				
			||||||
@ -35,14 +34,18 @@
 | 
				
			|||||||
            </DropdownMenu>
 | 
					            </DropdownMenu>
 | 
				
			||||||
          </Dropdown>
 | 
					          </Dropdown>
 | 
				
			||||||
        </li>
 | 
					        </li>
 | 
				
			||||||
        <li class="hover-color" @click="goUserCenter('/home/MyOrder')"><span class="nav-item">我的订单</span></li>
 | 
					        <li @click="goUserCenter('/home/MyOrder')"><span class="nav-item hover-color">我的订单</span></li>
 | 
				
			||||||
        <li class="hover-color" @click="goUserCenter('/home/MyTracks')"><span class="nav-item">我的足迹</span></li>
 | 
					        <li @click="goUserCenter('/home/MyTracks')"><span class="nav-item hover-color">我的足迹</span></li>
 | 
				
			||||||
 | 
					        <li @click="goUserCenter('/home/MsgList')"><span class="nav-item hover-color">我的消息</span></li>
 | 
				
			||||||
        <li v-if="$route.name !== 'Cart'" style="position:relative;">
 | 
					        <li v-if="$route.name !== 'Cart'" style="position:relative;">
 | 
				
			||||||
          <i class="cart-badge" v-show="Number(cartNum)">{{cartNum < 100 ? cartNum : '99'}}</i>
 | 
					          <i class="cart-badge" v-show="Number(cartNum)">{{cartNum < 100 ? cartNum : '99'}}</i>
 | 
				
			||||||
          <Dropdown placement="bottom-start">
 | 
					          <Dropdown placement="bottom-start">
 | 
				
			||||||
            <router-link to="/cart" target="_blank">
 | 
					            <router-link to="/cart" target="_blank">
 | 
				
			||||||
              <span @mouseenter="getCartList">
 | 
					              <span @mouseenter="getCartList">
 | 
				
			||||||
                <Icon size="18" class="cart-icon" type="ios-cart-outline"></Icon>
 | 
					                <Icon
 | 
				
			||||||
 | 
					                  size="18"
 | 
				
			||||||
 | 
					                  type="ios-cart-outline"
 | 
				
			||||||
 | 
					                ></Icon>
 | 
				
			||||||
                购物车
 | 
					                购物车
 | 
				
			||||||
              </span>
 | 
					              </span>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -116,37 +119,28 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    handleClickTheme() {
 | 
					    changeCity (city) { // 选择所在城市
 | 
				
			||||||
      this.themeType === "light"
 | 
					 | 
				
			||||||
        ? (this.themeType = "dark")
 | 
					 | 
				
			||||||
        : (this.themeType = "light");
 | 
					 | 
				
			||||||
      window.document.documentElement.setAttribute(
 | 
					 | 
				
			||||||
        "data-theme",
 | 
					 | 
				
			||||||
        this.themeType
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    changeCity(city) {
 | 
					 | 
				
			||||||
      this.city = city;
 | 
					      this.city = city;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    goToPay() {
 | 
					    goToPay () { // 跳转购物车
 | 
				
			||||||
      let url = this.$router.resolve({
 | 
					      let url = this.$router.resolve({
 | 
				
			||||||
        path: "/cart",
 | 
					        path: "/cart",
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      window.open(url.href, "_blank");
 | 
					      window.open(url.href, "_blank");
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    myInfo() {
 | 
					    myInfo () { // 跳转会员中心
 | 
				
			||||||
      let url = this.$router.resolve({
 | 
					      let url = this.$router.resolve({
 | 
				
			||||||
        path: "/home",
 | 
					        path: "/home",
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      window.open(url.href, "_blank");
 | 
					      window.open(url.href, "_blank");
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    signOutFun() {
 | 
					    signOutFun () { // 退出登录
 | 
				
			||||||
      storage.removeItem("accessToken");
 | 
					      storage.removeItem('accessToken');
 | 
				
			||||||
      storage.removeItem("refreshToken");
 | 
					      storage.removeItem('refreshToken');
 | 
				
			||||||
      storage.removeItem("userInfo");
 | 
					      storage.removeItem('userInfo');
 | 
				
			||||||
      storage.removeItem("cartNum");
 | 
					      storage.removeItem('cartNum');
 | 
				
			||||||
      this.$store.commit("SET_CARTNUM", 0);
 | 
					      this.$store.commit('SET_CARTNUM', 0)
 | 
				
			||||||
      this.$router.push("/login");
 | 
					      this.$router.push('/login');
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    goUserCenter(path) {
 | 
					    goUserCenter(path) {
 | 
				
			||||||
      // 跳转我的订单,我的足迹
 | 
					      // 跳转我的订单,我的足迹
 | 
				
			||||||
@ -230,13 +224,13 @@ export default {
 | 
				
			|||||||
  float: left;
 | 
					  float: left;
 | 
				
			||||||
  font-size: 14px;
 | 
					  font-size: 14px;
 | 
				
			||||||
  line-height: 35px;
 | 
					  line-height: 35px;
 | 
				
			||||||
  margin-right: 15px;
 | 
					  margin-right: 10px;
 | 
				
			||||||
  font-weight: bold;
 | 
					  font-weight: bold;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.nav a,
 | 
					.nav a,
 | 
				
			||||||
.nav-item {
 | 
					.nav-item {
 | 
				
			||||||
  text-decoration: none;
 | 
					  text-decoration: none;
 | 
				
			||||||
  padding-left: 15px;
 | 
					  padding-left: 10px;
 | 
				
			||||||
  border-left: 1px solid #ccc;
 | 
					  border-left: 1px solid #ccc;
 | 
				
			||||||
  color: #999;
 | 
					  color: #999;
 | 
				
			||||||
  cursor: pointer;
 | 
					  cursor: pointer;
 | 
				
			||||||
@ -377,9 +371,6 @@ export default {
 | 
				
			|||||||
.sign-out p {
 | 
					.sign-out p {
 | 
				
			||||||
  font-size: 12px;
 | 
					  font-size: 12px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.cart-icon {
 | 
					 | 
				
			||||||
  padding: 0 6px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.goods-title:hover {
 | 
					.goods-title:hover {
 | 
				
			||||||
  color: $theme_color;
 | 
					  color: $theme_color;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -1,10 +1,10 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="shop-box">
 | 
					  <div class="shop-box">
 | 
				
			||||||
    <div class="shop-container">
 | 
					    <div class="shop-container">
 | 
				
			||||||
      <div class="shop-title">
 | 
					      <div class="shop-title-content">
 | 
				
			||||||
        <div class="shop-title-content">
 | 
					        <img class="hover-pointer" @click="linkTo(`/merchant?id=${storeDetail.storeId}`)" :src="storeDetail.storeLogo" height="40" alt="">
 | 
				
			||||||
          <p><router-link :to="`/merchant?id=${skuDetail.storeId}`">{{ skuDetail.storeName }}</router-link></p>
 | 
					        <p><router-link :to="`/merchant?id=${storeDetail.storeId}`">{{ storeDetail.storeName }}</router-link></p>
 | 
				
			||||||
        </div>
 | 
					        <div class="ml_20" v-html="storeDetail.storeDesc"></div>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
@ -20,7 +20,7 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  computed: {
 | 
					  computed: {
 | 
				
			||||||
    skuDetail () {
 | 
					    storeDetail () { // 店铺详情
 | 
				
			||||||
      return this.detail;
 | 
					      return this.detail;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
@ -46,57 +46,17 @@ export default {
 | 
				
			|||||||
  color: #fff;
 | 
					  color: #fff;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.shop-title {
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  flex-direction: row;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.shop-title-icon {
 | 
					 | 
				
			||||||
  font-size: 46px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.shop-title-content {
 | 
					.shop-title-content {
 | 
				
			||||||
  padding-top: 8px;
 | 
					 | 
				
			||||||
  margin-left: 15px;
 | 
					 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
 | 
					  align-items: center;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.shop-title-content p {
 | 
					.shop-title-content p {
 | 
				
			||||||
  line-height: 26px;
 | 
					 | 
				
			||||||
  font-size: 20px;
 | 
					  font-size: 20px;
 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.shop-title-content p:nth-child(2) {
 | 
					 | 
				
			||||||
  font-size: 16px;
 | 
					 | 
				
			||||||
  margin-left: 20px;
 | 
					  margin-left: 20px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.shop-title-content a {
 | 
					.shop-title-content a {
 | 
				
			||||||
  color: #fff;
 | 
					  color: #fff;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.shop-another-item {
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  flex-direction: row;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.shop-another-item-detail {
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  flex-direction: row;
 | 
					 | 
				
			||||||
  align-items: center;
 | 
					 | 
				
			||||||
  margin-left: 15px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.shop-another-item-img {
 | 
					 | 
				
			||||||
  height: 80px;
 | 
					 | 
				
			||||||
  border-radius: 40px;
 | 
					 | 
				
			||||||
  overflow: hidden;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.shop-another-item-img img {
 | 
					 | 
				
			||||||
  width: 80px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.shop-anoter-item-intro {
 | 
					 | 
				
			||||||
  margin-left: 15px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 | 
				
			|||||||
@ -23,7 +23,7 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    goCartList () {
 | 
					    goCartList () { // 跳转购物车页面
 | 
				
			||||||
      let routerUrl = this.$router.resolve({
 | 
					      let routerUrl = this.$router.resolve({
 | 
				
			||||||
        path: '/cart'
 | 
					        path: '/cart'
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
 | 
				
			|||||||
@ -67,14 +67,14 @@ export default {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    getArticleList () {
 | 
					    getArticleList () { // 获取常见问题列表
 | 
				
			||||||
      articleList(this.params).then(res => {
 | 
					      articleList(this.params).then(res => {
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
          this.articleList = res.result.records
 | 
					          this.articleList = res.result.records
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    goArticle (id) {
 | 
					    goArticle (id) { // 跳转文章详情
 | 
				
			||||||
      let routeUrl = this.$router.resolve({
 | 
					      let routeUrl = this.$router.resolve({
 | 
				
			||||||
        path: '/article',
 | 
					        path: '/article',
 | 
				
			||||||
        query: {id}
 | 
					        query: {id}
 | 
				
			||||||
 | 
				
			|||||||
@ -32,7 +32,6 @@ export default {
 | 
				
			|||||||
      options: this.data.options // 装修数据
 | 
					      options: this.data.options // 装修数据
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {}
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
				
			|||||||
@ -50,9 +50,8 @@ export default {
 | 
				
			|||||||
      this.$emit('content', val);
 | 
					      this.$emit('content', val);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted () {},
 | 
					 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    changeCurr (index) {
 | 
					    changeCurr (index) { // 选择分类
 | 
				
			||||||
      this.currentIndex = index;
 | 
					      this.currentIndex = index;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
@ -71,7 +71,7 @@ export default {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  watch: {
 | 
					  watch: {
 | 
				
			||||||
    diffSeconds (val) {
 | 
					    diffSeconds (val) {  // 秒杀倒计时
 | 
				
			||||||
      const hours = Math.floor(val / 3600);
 | 
					      const hours = Math.floor(val / 3600);
 | 
				
			||||||
      // 当前秒数 / 60,向下取整
 | 
					      // 当前秒数 / 60,向下取整
 | 
				
			||||||
      // 获取到所有分钟数 3600 / 60 = 60分钟
 | 
					      // 获取到所有分钟数 3600 / 60 = 60分钟
 | 
				
			||||||
@ -139,7 +139,7 @@ export default {
 | 
				
			|||||||
        }, 1000);
 | 
					        }, 1000);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    goPromotion () {
 | 
					    goPromotion () { // 跳转秒杀页面
 | 
				
			||||||
      let routeUrl = this.$router.resolve({
 | 
					      let routeUrl = this.$router.resolve({
 | 
				
			||||||
        path: '/seckill'
 | 
					        path: '/seckill'
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1 @@
 | 
				
			|||||||
## 此组件为结算页面修改发票信息使用 后续可以复用到个人信息添加发票页面
 | 
					## 此组件为结算页面修改发票信息使用 后续可以复用到个人信息添加发票页面
 | 
				
			||||||
 | 
					 | 
				
			||||||
### 目前没有参数,之后会设置一个参数接收历史的单位发票数据
 | 
					 | 
				
			||||||
@ -11,37 +11,42 @@
 | 
				
			|||||||
            </div> -->
 | 
					            </div> -->
 | 
				
			||||||
      <!-- 普通发票 -->
 | 
					      <!-- 普通发票 -->
 | 
				
			||||||
      <div class="nav-content">
 | 
					      <div class="nav-content">
 | 
				
			||||||
        <Form :model="invoiceForm" ref="form" label-position="left" :rules="ruleInline" :label-width="110">
 | 
					        <Form
 | 
				
			||||||
 | 
					          :model="invoiceForm"
 | 
				
			||||||
 | 
					          ref="form"
 | 
				
			||||||
 | 
					          label-position="left"
 | 
				
			||||||
 | 
					          :rules="ruleInline"
 | 
				
			||||||
 | 
					          :label-width="110"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
          <FormItem label="发票类型">
 | 
					          <FormItem label="发票类型">
 | 
				
			||||||
            <RadioGroup v-model="invoice" type="button" button-style="solid">
 | 
					            <RadioGroup v-model="invoiceForm.type" type="button" button-style="solid">
 | 
				
			||||||
              <Radio @on-change="changeInvoice" :label="1">电子普通发票</Radio>
 | 
					 | 
				
			||||||
              <Radio :label="2" :disabled="true">增值税专用发票</Radio>
 | 
					 | 
				
			||||||
            </RadioGroup>
 | 
					 | 
				
			||||||
          </FormItem>
 | 
					 | 
				
			||||||
          <FormItem label="发票抬头">
 | 
					 | 
				
			||||||
            <RadioGroup v-model="type" @on-change="changeInvoice" type="button" button-style="solid">
 | 
					 | 
				
			||||||
              <Radio :label="1">个人</Radio>
 | 
					              <Radio :label="1">个人</Radio>
 | 
				
			||||||
              <Radio :label="2">单位</Radio>
 | 
					              <Radio :label="2">单位</Radio>
 | 
				
			||||||
            </RadioGroup>
 | 
					            </RadioGroup>
 | 
				
			||||||
          </FormItem>
 | 
					          </FormItem>
 | 
				
			||||||
          <FormItem label="个人名称" v-if="type === 1" prop="receiptTitle">
 | 
					          <FormItem
 | 
				
			||||||
 | 
					            label="发票抬头"
 | 
				
			||||||
 | 
					            v-if="invoiceForm.type == 2"
 | 
				
			||||||
 | 
					            prop="receiptTitle"
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
            <i-input v-model="invoiceForm.receiptTitle"></i-input>
 | 
					            <i-input v-model="invoiceForm.receiptTitle"></i-input>
 | 
				
			||||||
          </FormItem>
 | 
					          </FormItem>
 | 
				
			||||||
          <FormItem label="单位名称" v-if="type === 2" prop="receiptTitle">
 | 
					          <FormItem
 | 
				
			||||||
            <i-input v-model="invoiceForm.receiptTitle"></i-input>
 | 
					            label="纳税人识别号"
 | 
				
			||||||
          </FormItem>
 | 
					            v-if="invoiceForm.type == 2"
 | 
				
			||||||
          <FormItem label="纳税人识别号" v-if="type === 2" prop="taxpayerId">
 | 
					            prop="taxpayerId"
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
            <i-input v-model="invoiceForm.taxpayerId"></i-input>
 | 
					            <i-input v-model="invoiceForm.taxpayerId"></i-input>
 | 
				
			||||||
          </FormItem>
 | 
					          </FormItem>
 | 
				
			||||||
          <FormItem label="发票内容">
 | 
					          <FormItem label="发票内容">
 | 
				
			||||||
            <RadioGroup v-model="invoiceForm.receiptContent" type="button" button-style="solid">
 | 
					            <RadioGroup v-model="invoiceForm.receiptContent" type="button" button-style="solid">
 | 
				
			||||||
 | 
					              <Radio label="不开发票">不开发票</Radio>
 | 
				
			||||||
              <Radio label="商品明细">商品明细</Radio>
 | 
					              <Radio label="商品明细">商品明细</Radio>
 | 
				
			||||||
              <Radio label="商品类别">商品类别</Radio>
 | 
					 | 
				
			||||||
            </RadioGroup>
 | 
					            </RadioGroup>
 | 
				
			||||||
          </FormItem>
 | 
					          </FormItem>
 | 
				
			||||||
        </Form>
 | 
					        </Form>
 | 
				
			||||||
        <div style="text-align: center">
 | 
					        <div style="text-align: center">
 | 
				
			||||||
          <Button type="primary" :loading="loading" @click="submit">保存发票信息</Button>
 | 
					          <Button type="primary" :loading="loading" @click="save">保存发票信息</Button>
 | 
				
			||||||
          <Button type="default" @click="invoiceAvailable = false">取消</Button>
 | 
					          <Button type="default" @click="invoiceAvailable = false">取消</Button>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
@ -49,104 +54,100 @@
 | 
				
			|||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import { receiptSelect } from "@/api/cart.js";
 | 
					import { saveReceipt } from '@/api/member.js';
 | 
				
			||||||
import { TINumber } from "@/plugins/RegExp.js";
 | 
					import { TINumber } from '@/plugins/RegExp.js';
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "invoiceModal",
 | 
					  name: 'invoiceModal',
 | 
				
			||||||
  data() {
 | 
					  data () {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      invoice: 1,
 | 
					 | 
				
			||||||
      invoiceAvailable: false, // 模态框显隐
 | 
					      invoiceAvailable: false, // 模态框显隐
 | 
				
			||||||
      loading: false, // 提交状态
 | 
					      loading: false, // 提交状态
 | 
				
			||||||
      invoiceForm: {
 | 
					      invoiceForm: { // 发票表单
 | 
				
			||||||
        // 发票表单
 | 
					 | 
				
			||||||
        // 普票表单
 | 
					        // 普票表单
 | 
				
			||||||
        receiptTitle: "", // 发票抬头
 | 
					        receiptTitle: '', // 发票抬头
 | 
				
			||||||
        taxpayerId: "", // 纳税人识别号
 | 
					        taxpayerId: '', // 纳税人识别号
 | 
				
			||||||
        receiptContent: "商品明细", // 发票内容
 | 
					        receiptContent: '不开发票', // 发票内容
 | 
				
			||||||
 | 
					        type: 1 // 1 个人 2 单位
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      type: 1, // 1 个人 2 单位
 | 
					      ruleInline: { // 验证规则
 | 
				
			||||||
      ruleInline: {
 | 
					        receiptTitle: [{ required: true, message: '请填写公司名称' }],
 | 
				
			||||||
        taxpayerId: [
 | 
					        taxpayerId: [
 | 
				
			||||||
          { required: true, message: "请填写纳税人识别号" },
 | 
					          { required: true, message: '请填写纳税人识别号' },
 | 
				
			||||||
          { pattern: TINumber, message: "请填写正确的纳税人识别号" },
 | 
					          { pattern: TINumber, message: '请填写正确的纳税人识别号' }
 | 
				
			||||||
        ],
 | 
					        ]
 | 
				
			||||||
      },
 | 
					      }
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  props: ["invoiceData"],
 | 
					 | 
				
			||||||
  watch: {
 | 
					 | 
				
			||||||
    invoiceData: {
 | 
					 | 
				
			||||||
      handler(val) {
 | 
					 | 
				
			||||||
        this.invoiceForm = { ...val };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        if (val.taxpayerId) {
 | 
					 | 
				
			||||||
          this.type = 2;
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
          this.type = 1;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      deep: true,
 | 
					 | 
				
			||||||
      immeadite: true,
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    /**
 | 
					    save () { // 保存发票
 | 
				
			||||||
     *  选择发票抬头
 | 
					      if (this.invoiceForm.type === 1) {
 | 
				
			||||||
     */
 | 
					        // 个人
 | 
				
			||||||
    changeInvoice(val) {
 | 
					        let flag = true;
 | 
				
			||||||
      this.$nextTick(() => {
 | 
					        this.receiptItems.forEach((e) => {
 | 
				
			||||||
        this.type = val;
 | 
					          if (
 | 
				
			||||||
      });
 | 
					            e.receiptTitle === '个人' &&
 | 
				
			||||||
    },
 | 
					            e.receiptContent === this.invoiceForm.receiptContent
 | 
				
			||||||
 | 
					          ) {
 | 
				
			||||||
    /**
 | 
					            this.$emit('change', e);
 | 
				
			||||||
     *  保存判断
 | 
					            flag = false;
 | 
				
			||||||
     */
 | 
					            this.invoiceAvailable = false;
 | 
				
			||||||
    save() {
 | 
					 | 
				
			||||||
      let flage = true;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      // 保存分为两种类型,个人以及企业
 | 
					 | 
				
			||||||
      const { type, receiptTitle, receiptContent } = JSON.parse(
 | 
					 | 
				
			||||||
        JSON.stringify(this.invoiceForm)
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      // 判断是否填写发票抬头
 | 
					 | 
				
			||||||
      if (!receiptTitle) {
 | 
					 | 
				
			||||||
        this.$Message.error("请填写发票抬头!");
 | 
					 | 
				
			||||||
        flage = false;
 | 
					 | 
				
			||||||
        return false;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      if (type == 2) {
 | 
					 | 
				
			||||||
        this.$refs.form.validate((valid) => {
 | 
					 | 
				
			||||||
          if (!valid) {
 | 
					 | 
				
			||||||
            flage = false;
 | 
					 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      } else {
 | 
					 | 
				
			||||||
        delete this.invoiceForm.taxpayerId;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
      return flage;
 | 
					        if (flag) {
 | 
				
			||||||
    },
 | 
					          let params = {
 | 
				
			||||||
 | 
					            receiptTitle: '个人',
 | 
				
			||||||
    async submit() {
 | 
					            receiptContent: this.invoiceForm.receiptContent
 | 
				
			||||||
      if (this.save()) {
 | 
					          };
 | 
				
			||||||
        this.loading = true;
 | 
					          this.loading = true;
 | 
				
			||||||
        let submit = {
 | 
					          saveReceipt(params)
 | 
				
			||||||
          way: this.$route.query.way,
 | 
					            .then((res) => {
 | 
				
			||||||
          ...this.invoiceForm,
 | 
					              this.loading = false;
 | 
				
			||||||
        };
 | 
					              if (res.success) {
 | 
				
			||||||
        let receipt = await receiptSelect(submit);
 | 
					                this.$emit('change', res.result);
 | 
				
			||||||
        if (receipt.success) {
 | 
					                this.invoiceAvailable = false;
 | 
				
			||||||
          this.$emit("change", true);
 | 
					              }
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					            .catch(() => {
 | 
				
			||||||
 | 
					              this.loading = false;
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
        this.loading = false;
 | 
					        // 单位
 | 
				
			||||||
 | 
					        this.$refs.form.validate((valid) => {
 | 
				
			||||||
 | 
					          if (valid) {
 | 
				
			||||||
 | 
					            this.loading = true;
 | 
				
			||||||
 | 
					            let params = {
 | 
				
			||||||
 | 
					              receiptTitle: this.invoiceForm.receiptTitle,
 | 
				
			||||||
 | 
					              taxpayerId: this.invoiceForm.taxpayerId,
 | 
				
			||||||
 | 
					              receiptContent: this.invoiceForm.receiptContent
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					            let flag = true;
 | 
				
			||||||
 | 
					            this.receiptItems.forEach((e) => {
 | 
				
			||||||
 | 
					              if (e.taxpayerId === params.taxpayerId) {
 | 
				
			||||||
 | 
					                flag = false;
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					            if (!flag) {
 | 
				
			||||||
 | 
					              this.$Message.error('已有当前税号的发票信息,请直接选择已有发票');
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					              saveReceipt(params)
 | 
				
			||||||
 | 
					                .then((res) => {
 | 
				
			||||||
 | 
					                  this.loading = false;
 | 
				
			||||||
 | 
					                  if (res.success) {
 | 
				
			||||||
 | 
					                    this.$emit('change', res.result);
 | 
				
			||||||
 | 
					                    this.invoiceAvailable = false;
 | 
				
			||||||
 | 
					                  }
 | 
				
			||||||
 | 
					                })
 | 
				
			||||||
 | 
					                .catch(() => {
 | 
				
			||||||
 | 
					                  this.loading = false;
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    }
 | 
				
			||||||
  },
 | 
					  }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
				
			|||||||
@ -85,7 +85,7 @@ export default {
 | 
				
			|||||||
        this.$emit('getAddress', this.addrContent);
 | 
					        this.$emit('getAddress', this.addrContent);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    init () {
 | 
					    init () { // 初始化地图
 | 
				
			||||||
      AMapLoader.load({
 | 
					      AMapLoader.load({
 | 
				
			||||||
        key: 'b440952723253aa9fe483e698057bf7d', // 申请好的Web端开发者Key,首次调用 load 时必填
 | 
					        key: 'b440952723253aa9fe483e698057bf7d', // 申请好的Web端开发者Key,首次调用 load 时必填
 | 
				
			||||||
        version: '', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
 | 
					        version: '', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
 | 
				
			||||||
 | 
				
			|||||||
@ -21,7 +21,7 @@ export default {
 | 
				
			|||||||
  props: ['addressId'],
 | 
					  props: ['addressId'],
 | 
				
			||||||
  mounted () {},
 | 
					  mounted () {},
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    change (val, selectedData) {
 | 
					    change (val, selectedData) { // 选择地区
 | 
				
			||||||
      /**
 | 
					      /**
 | 
				
			||||||
       * @returns [regionId,region]
 | 
					       * @returns [regionId,region]
 | 
				
			||||||
       */
 | 
					       */
 | 
				
			||||||
@ -30,7 +30,7 @@ export default {
 | 
				
			|||||||
        selectedData[selectedData.length - 1].__label.split('/')
 | 
					        selectedData[selectedData.length - 1].__label.split('/')
 | 
				
			||||||
      ]);
 | 
					      ]);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    loadData (item, callback) {
 | 
					    loadData (item, callback) { // 加载数据
 | 
				
			||||||
      item.loading = true;
 | 
					      item.loading = true;
 | 
				
			||||||
      getRegion(item.value).then((res) => {
 | 
					      getRegion(item.value).then((res) => {
 | 
				
			||||||
        if (res.result.length <= 0) {
 | 
					        if (res.result.length <= 0) {
 | 
				
			||||||
@ -59,7 +59,7 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    async init () {
 | 
					    async init () { // 初始化地图数据
 | 
				
			||||||
      let data = await getRegion(0);
 | 
					      let data = await getRegion(0);
 | 
				
			||||||
      let arr = [];
 | 
					      let arr = [];
 | 
				
			||||||
      data.result.forEach((item) => {
 | 
					      data.result.forEach((item) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -209,7 +209,7 @@ export default {
 | 
				
			|||||||
      },
 | 
					      },
 | 
				
			||||||
      deep: true
 | 
					      deep: true
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    '$route': {
 | 
					    '$route': { // 监听路由
 | 
				
			||||||
      handler (val, oVal) {
 | 
					      handler (val, oVal) {
 | 
				
			||||||
        if (this.$route.query.categoryId) {
 | 
					        if (this.$route.query.categoryId) {
 | 
				
			||||||
          let cateId = this.$route.query.categoryId.split(',')
 | 
					          let cateId = this.$route.query.categoryId.split(',')
 | 
				
			||||||
@ -373,6 +373,7 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted () {
 | 
					  mounted () {
 | 
				
			||||||
 | 
					    // 有分类id就根据id搜索
 | 
				
			||||||
    if (this.$route.query.categoryId) {
 | 
					    if (this.$route.query.categoryId) {
 | 
				
			||||||
      let cateId = this.$route.query.categoryId.split(',')
 | 
					      let cateId = this.$route.query.categoryId.split(',')
 | 
				
			||||||
      Object.assign(this.params, this.$route.query)
 | 
					      Object.assign(this.params, this.$route.query)
 | 
				
			||||||
 | 
				
			|||||||
@ -93,6 +93,11 @@ export default {
 | 
				
			|||||||
      getCategory(0).then(res => {
 | 
					      getCategory(0).then(res => {
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
          this.cateList = res.result;
 | 
					          this.cateList = res.result;
 | 
				
			||||||
 | 
					          // 过期时间
 | 
				
			||||||
 | 
					          var expirationTime = new Date().setHours(new Date().getHours() + 1);
 | 
				
			||||||
 | 
					          // 存放过期时间
 | 
				
			||||||
 | 
					          localStorage.setItem('category_expiration_time', expirationTime);
 | 
				
			||||||
 | 
					          // 存放分类信息
 | 
				
			||||||
          localStorage.setItem('category', JSON.stringify(res.result))
 | 
					          localStorage.setItem('category', JSON.stringify(res.result))
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
@ -117,7 +122,12 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted () {
 | 
					  mounted () {
 | 
				
			||||||
    if (localStorage.getItem('category')) {
 | 
					    if (localStorage.getItem('category') && localStorage.getItem('category_expiration_time')) {
 | 
				
			||||||
 | 
					      // 如果缓存过期,则获取最新的信息
 | 
				
			||||||
 | 
					      if (new Date() > localStorage.getItem('category_expiration_time')) {
 | 
				
			||||||
 | 
					        this.getCate();
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
      this.cateList = JSON.parse(localStorage.getItem('category'))
 | 
					      this.cateList = JSON.parse(localStorage.getItem('category'))
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      this.getCate()
 | 
					      this.getCate()
 | 
				
			||||||
 | 
				
			|||||||
@ -6,7 +6,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#### 在组件上添加v-if来判断组件显隐 
 | 
					#### 在组件上添加v-if来判断组件显隐 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### verifyType 验证格式[ 'LOGIN' ,'REGISTER' ]等,详情看接口文档   
 | 
					#### verifyType 验证格式[ 'LOGIN' ,'REGISTER' ]   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### @change方法  获取回调,参数为对象 {status:false,distance:100}   status 为回调状态,distance为移动距离
 | 
					#### @change方法  获取回调,参数为对象 {status:false,distance:100}   status 为回调状态,distance为移动距离
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -43,11 +43,11 @@ export default {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    mouseDown (e) {
 | 
					    mouseDown (e) { // 鼠标按下操作,
 | 
				
			||||||
      this.downX = e.clientX;
 | 
					      this.downX = e.clientX;
 | 
				
			||||||
      this.flag = true;
 | 
					      this.flag = true;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    mouseMove (e) {
 | 
					    mouseMove (e) { // 鼠标移动
 | 
				
			||||||
      if (this.flag) {
 | 
					      if (this.flag) {
 | 
				
			||||||
        let offset = e.clientX - this.downX;
 | 
					        let offset = e.clientX - this.downX;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -60,7 +60,7 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    mouseUp () {
 | 
					    mouseUp () { // 鼠标抬起
 | 
				
			||||||
      if (!this.flag) return false;
 | 
					      if (!this.flag) return false;
 | 
				
			||||||
      this.flag = false;
 | 
					      this.flag = false;
 | 
				
			||||||
      let params = {
 | 
					      let params = {
 | 
				
			||||||
@ -83,7 +83,7 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    refresh () {
 | 
					    refresh () { // 刷新验证图片
 | 
				
			||||||
      this.flag = false;
 | 
					      this.flag = false;
 | 
				
			||||||
      this.downX = 0;
 | 
					      this.downX = 0;
 | 
				
			||||||
      this.distance = 0;
 | 
					      this.distance = 0;
 | 
				
			||||||
@ -91,7 +91,7 @@ export default {
 | 
				
			|||||||
      this.verifyText = '拖动滑块解锁';
 | 
					      this.verifyText = '拖动滑块解锁';
 | 
				
			||||||
      this.getImg();
 | 
					      this.getImg();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getImg () {
 | 
					    getImg () { // 获取验证图片
 | 
				
			||||||
      getVerifyImg(this.type).then(res => {
 | 
					      getVerifyImg(this.type).then(res => {
 | 
				
			||||||
        this.data = res.result;
 | 
					        this.data = res.result;
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
 | 
				
			|||||||
@ -26,7 +26,3 @@ export function postVerifyImg (params) {
 | 
				
			|||||||
    headers: {uuid: storage.getItem('uuid')}
 | 
					    headers: {uuid: storage.getItem('uuid')}
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
export function mouseup () {
 | 
					 | 
				
			||||||
  console.log(111);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
				
			|||||||
@ -17,10 +17,10 @@ export default {
 | 
				
			|||||||
   * @description api请求基础路径
 | 
					   * @description api请求基础路径
 | 
				
			||||||
   */
 | 
					   */
 | 
				
			||||||
  api_dev: {
 | 
					  api_dev: {
 | 
				
			||||||
    // common: 'http://192.168.0.103:8890',
 | 
					    // common: 'http://192.168.0.109:8890',
 | 
				
			||||||
    // buyer: 'http://192.168.0.103:8888',
 | 
					    // buyer: 'http://192.168.0.109:8888',
 | 
				
			||||||
    // seller: 'http://192.168.0.103:8889',
 | 
					    // seller: 'http://192.168.0.109:8889',
 | 
				
			||||||
    // manager: 'http://192.168.0.103:8887'
 | 
					    // manager: 'http://192.168.0.109:8887'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    common: 'https://common-api.pickmall.cn',
 | 
					    common: 'https://common-api.pickmall.cn',
 | 
				
			||||||
    buyer: 'https://buyer-api.pickmall.cn',
 | 
					    buyer: 'https://buyer-api.pickmall.cn',
 | 
				
			||||||
 | 
				
			|||||||
@ -37,6 +37,11 @@ Vue.prototype.linkTo = function (url) {
 | 
				
			|||||||
    window.open(url, '_blank')
 | 
					    window.open(url, '_blank')
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					// 联系客服
 | 
				
			||||||
 | 
					Vue.prototype.connectCs = function (sign = '37ef9b97807d03c6741298ed4eb5b536d2d238e08a3c00fb01fe48f03a569974c99ad767e72c04b3165ef29aca2c488b505fe4ca') { 
 | 
				
			||||||
 | 
					  const url = 'https://yzf.qq.com/xv/web/static/chat/index.html?sign=' + sign
 | 
				
			||||||
 | 
					  window.open(url, '_blank')
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
Vue.prototype.Cookies = storage
 | 
					Vue.prototype.Cookies = storage
 | 
				
			||||||
/* eslint-disable no-new */
 | 
					/* eslint-disable no-new */
 | 
				
			||||||
new Vue({
 | 
					new Vue({
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,7 @@
 | 
				
			|||||||
    <BaseHeader></BaseHeader>
 | 
					    <BaseHeader></BaseHeader>
 | 
				
			||||||
    <Search></Search>
 | 
					    <Search></Search>
 | 
				
			||||||
    <drawer></drawer>
 | 
					    <drawer></drawer>
 | 
				
			||||||
    <ShopHeader v-if="goodsMsg.data" :detail="goodsMsg.data"></ShopHeader>
 | 
					    <ShopHeader :detail="storeMsg"></ShopHeader>
 | 
				
			||||||
    <div class="shop-item-path">
 | 
					    <div class="shop-item-path">
 | 
				
			||||||
      <div class="shop-nav-container">
 | 
					      <div class="shop-nav-container">
 | 
				
			||||||
        <Breadcrumb>
 | 
					        <Breadcrumb>
 | 
				
			||||||
@ -11,8 +11,9 @@
 | 
				
			|||||||
          <BreadcrumbItem v-for="(item, index) in categoryBar" :to="goGoodsList(index)" target="_blank" :key="index">{{item.name}}</BreadcrumbItem>
 | 
					          <BreadcrumbItem v-for="(item, index) in categoryBar" :to="goGoodsList(index)" target="_blank" :key="index">{{item.name}}</BreadcrumbItem>
 | 
				
			||||||
        </Breadcrumb>
 | 
					        </Breadcrumb>
 | 
				
			||||||
        <div class="store-collect">
 | 
					        <div class="store-collect">
 | 
				
			||||||
          <span class="mr_10"><router-link :to="'Merchant?id=' + goodsMsg.data.storeId">{{goodsMsg.data.storeName}}</router-link></span>
 | 
					          <span class="mr_10" v-if="goodsMsg.data"><router-link :to="'Merchant?id=' + goodsMsg.data.storeId">{{goodsMsg.data.storeName}}</router-link></span>
 | 
				
			||||||
          <span @click="collect" ><Icon type="ios-heart" :color="storeCollected ? '#ed3f14' : '#666'" />{{storeCollected?'已收藏店铺':'收藏店铺'}}</span>
 | 
					          <span @click="collect" ><Icon type="ios-heart" :color="storeCollected ? '#ed3f14' : '#666'" />{{storeCollected?'已收藏店铺':'收藏店铺'}}</span>
 | 
				
			||||||
 | 
					          <span @click="connectCs(storeMsg.yzfSign)" class="ml_10"><Icon custom="icomoon icon-customer-service" />联系客服</span>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
@ -40,6 +41,7 @@ import ShowGoodsDetail from '@/components/goodsDetail/ShowGoodsDetail';
 | 
				
			|||||||
import ShowLikeGoods from '@/components/like';
 | 
					import ShowLikeGoods from '@/components/like';
 | 
				
			||||||
import { goodsSkuDetail } from '@/api/goods';
 | 
					import { goodsSkuDetail } from '@/api/goods';
 | 
				
			||||||
import { cancelCollect, collectGoods, isCollection } from '@/api/member';
 | 
					import { cancelCollect, collectGoods, isCollection } from '@/api/member';
 | 
				
			||||||
 | 
					import {getDetailById} from '@/api/shopentry'
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: 'GoodsDetail',
 | 
					  name: 'GoodsDetail',
 | 
				
			||||||
  beforeRouteEnter (to, from, next) {
 | 
					  beforeRouteEnter (to, from, next) {
 | 
				
			||||||
@ -48,20 +50,15 @@ export default {
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  created () {
 | 
					  created () {
 | 
				
			||||||
    this.getGoodsDetail();
 | 
					    this.getGoodsDetail();
 | 
				
			||||||
    if (this.Cookies.getItem('userInfo')) {
 | 
					    
 | 
				
			||||||
      isCollection('STORE', this.goodsMsg.data.storeId).then(res => {
 | 
					 | 
				
			||||||
        if (res.success && res.result) {
 | 
					 | 
				
			||||||
          this.storeCollected = true;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  data () {
 | 
					  data () {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      goodsMsg: {}, // 商品信息
 | 
					      goodsMsg: {}, // 商品信息
 | 
				
			||||||
      isLoading: false, // 加载状态
 | 
					      isLoading: false, // 加载状态
 | 
				
			||||||
      categoryBar: [], // 分类
 | 
					      categoryBar: [], // 分类
 | 
				
			||||||
      storeCollected: false // 商品收藏
 | 
					      storeCollected: false, // 商品收藏
 | 
				
			||||||
 | 
					      storeMsg: {} // 店铺信息
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
@ -81,8 +78,23 @@ export default {
 | 
				
			|||||||
              name: cateName[index]
 | 
					              name: cateName[index]
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
          });
 | 
					          });
 | 
				
			||||||
 | 
					          console.log(cateArr);
 | 
				
			||||||
          this.categoryBar = cateArr;
 | 
					          this.categoryBar = cateArr;
 | 
				
			||||||
          this.goodsMsg = res.result;
 | 
					          this.goodsMsg = res.result;
 | 
				
			||||||
 | 
					          // 判断是否收藏
 | 
				
			||||||
 | 
					          if (this.Cookies.getItem('userInfo')) {
 | 
				
			||||||
 | 
					            isCollection('STORE', this.goodsMsg.data.storeId).then(res => {
 | 
				
			||||||
 | 
					              if (res.success && res.result) {
 | 
				
			||||||
 | 
					                this.storeCollected = true;
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          // 获取店铺信息
 | 
				
			||||||
 | 
					          getDetailById(this.goodsMsg.data.storeId).then(res => {
 | 
				
			||||||
 | 
					            if (res.success) {
 | 
				
			||||||
 | 
					              this.storeMsg = res.result
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          this.$Message.error(res.message)
 | 
					          this.$Message.error(res.message)
 | 
				
			||||||
          this.$router.push('/')
 | 
					          this.$router.push('/')
 | 
				
			||||||
@ -91,7 +103,7 @@ export default {
 | 
				
			|||||||
        this.$router.push('/')
 | 
					        this.$router.push('/')
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    goGoodsList (currIndex) {
 | 
					    goGoodsList (currIndex) { // 跳转商品列表
 | 
				
			||||||
      const arr = []
 | 
					      const arr = []
 | 
				
			||||||
      this.categoryBar.forEach((e, index) => {
 | 
					      this.categoryBar.forEach((e, index) => {
 | 
				
			||||||
        if (index <= currIndex) {
 | 
					        if (index <= currIndex) {
 | 
				
			||||||
@ -132,7 +144,6 @@ export default {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style scoped lang="scss">
 | 
				
			||||||
.shop-item-path {
 | 
					.shop-item-path {
 | 
				
			||||||
  height: 38px;
 | 
					  height: 38px;
 | 
				
			||||||
@ -146,6 +157,7 @@ export default {
 | 
				
			|||||||
  padding: 20px 0;
 | 
					  padding: 20px 0;
 | 
				
			||||||
  @include white_background_color();
 | 
					  @include white_background_color();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.shop-nav-container {
 | 
					.shop-nav-container {
 | 
				
			||||||
  width: 1200px;
 | 
					  width: 1200px;
 | 
				
			||||||
  margin: 0 auto;
 | 
					  margin: 0 auto;
 | 
				
			||||||
 | 
				
			|||||||
@ -9,9 +9,10 @@
 | 
				
			|||||||
        <img :src="storeMsg.storeLogo" height="50" alt="">
 | 
					        <img :src="storeMsg.storeLogo" height="50" alt="">
 | 
				
			||||||
        <div>
 | 
					        <div>
 | 
				
			||||||
          <p>{{storeMsg.storeName || 'xx店铺'}}</p>
 | 
					          <p>{{storeMsg.storeName || 'xx店铺'}}</p>
 | 
				
			||||||
          <p>{{storeMsg.storeDesc || 'xx店铺描述'}}</p>
 | 
					          <p v-html="storeMsg.storeDesc"></p>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div class="store-collect" @click="collect"><Icon type="ios-heart" :color="storeCollected ? '#ed3f14' : '#fff'" />{{storeCollected?'已收藏店铺':'收藏店铺'}}</div>
 | 
					        <div class="store-collect" @click="collect"><Icon type="ios-heart" :color="storeCollected ? '#ed3f14' : '#fff'" />{{storeCollected?'已收藏店铺':'收藏店铺'}}</div>
 | 
				
			||||||
 | 
					        <span class="hover-pointer ml_10" @click="connectCs(storeMsg.yzfSign)"><Icon custom="icomoon icon-customer-service"  />联系客服</span>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div  class="store-category">
 | 
					    <div  class="store-category">
 | 
				
			||||||
@ -204,7 +205,7 @@ export default {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.store-collect{
 | 
					.store-collect{
 | 
				
			||||||
  margin-left: 20px!important;
 | 
					  margin-left: 750px!important;
 | 
				
			||||||
  &:hover{
 | 
					  &:hover{
 | 
				
			||||||
    cursor: pointer;
 | 
					    cursor: pointer;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@
 | 
				
			|||||||
    <Search></Search>
 | 
					    <Search></Search>
 | 
				
			||||||
    <cateNav></cateNav>
 | 
					    <cateNav></cateNav>
 | 
				
			||||||
    <ul class="category">
 | 
					    <ul class="category">
 | 
				
			||||||
      <li @click="selectCate(cate.id)" v-for="(cate, index) in cateList" :key="index">{{cate.name}}</li>
 | 
					      <li @click="selectCate(cate.id)" :class="{'selected-cate': cate.id === params.pointsGoodsCategoryId}" v-for="(cate, index) in cateList" :key="index">{{cate.name}}</li>
 | 
				
			||||||
    </ul>
 | 
					    </ul>
 | 
				
			||||||
    <h3 class="promotion-decorate">积分商品</h3>
 | 
					    <h3 class="promotion-decorate">积分商品</h3>
 | 
				
			||||||
    <!-- 列表 -->
 | 
					    <!-- 列表 -->
 | 
				
			||||||
@ -39,6 +39,13 @@
 | 
				
			|||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div class="page-size">
 | 
				
			||||||
 | 
					      <Page :total="total" @on-change="changePageNum"
 | 
				
			||||||
 | 
					        @on-page-size-change="changePageSize"
 | 
				
			||||||
 | 
					        :page-size="params.pageSize"
 | 
				
			||||||
 | 
					        show-sizer>
 | 
				
			||||||
 | 
					      </Page>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
    <BaseFooter></BaseFooter>
 | 
					    <BaseFooter></BaseFooter>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
@ -56,7 +63,8 @@ export default {
 | 
				
			|||||||
        pageNumber: 1,
 | 
					        pageNumber: 1,
 | 
				
			||||||
        pageSize: 20,
 | 
					        pageSize: 20,
 | 
				
			||||||
        pointsGoodsCategoryId: ''
 | 
					        pointsGoodsCategoryId: ''
 | 
				
			||||||
      }
 | 
					      },
 | 
				
			||||||
 | 
					      total: 0 // 商品总数
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted () {
 | 
					  mounted () {
 | 
				
			||||||
@ -69,6 +77,7 @@ export default {
 | 
				
			|||||||
      pointGoods(this.params).then(res => {
 | 
					      pointGoods(this.params).then(res => {
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
          this.goodsList = res.result.records
 | 
					          this.goodsList = res.result.records
 | 
				
			||||||
 | 
					          this.total = res.result.total
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@ -79,11 +88,27 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    selectCate (id) {
 | 
					    selectCate (id) { // 选择商品分类
 | 
				
			||||||
      this.params.pointsGoodsCategoryId = id
 | 
					      this.params.pointsGoodsCategoryId = id
 | 
				
			||||||
      this.getList()
 | 
					      this.getList()
 | 
				
			||||||
      this.$router.push({query: {categoryId: id}})
 | 
					      this.$router.push({query: {categoryId: id}})
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
 | 
					    goGoodsDetail (skuId, goodsId) { // 跳转商品详情
 | 
				
			||||||
 | 
					      let routerUrl = this.$router.resolve({
 | 
				
			||||||
 | 
					        path: '/goodsDetail',
 | 
				
			||||||
 | 
					        query: {skuId, goodsId, way: 'POINT'}
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					      window.open(routerUrl.href, '_blank')
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    changePageNum (val) { // 修改页码
 | 
				
			||||||
 | 
					      this.params.pageNumber = val;
 | 
				
			||||||
 | 
					      this.getList()
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    changePageSize (val) { // 修改页数
 | 
				
			||||||
 | 
					      this.pageNumber = 1;
 | 
				
			||||||
 | 
					      this.params.pageSize = val;
 | 
				
			||||||
 | 
					      this.getList()
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
@ -104,8 +129,19 @@ export default {
 | 
				
			|||||||
    margin: 0 10px;
 | 
					    margin: 0 10px;
 | 
				
			||||||
    &:hover{
 | 
					    &:hover{
 | 
				
			||||||
      cursor: pointer;
 | 
					      cursor: pointer;
 | 
				
			||||||
 | 
					      color: $theme_color;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					  .selected-cate{
 | 
				
			||||||
 | 
					    color: $theme_color;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.page-size {
 | 
				
			||||||
 | 
					  width: 1200px;
 | 
				
			||||||
 | 
					  margin: 10px auto;
 | 
				
			||||||
 | 
					  display: flex;
 | 
				
			||||||
 | 
					  justify-content: flex-end;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.promotion-decorate::before,.promotion-decorate::after{
 | 
					.promotion-decorate::before,.promotion-decorate::after{
 | 
				
			||||||
  background-image: url('../../static/sprite@2x.png');
 | 
					  background-image: url('../../static/sprite@2x.png');
 | 
				
			||||||
 | 
				
			|||||||
@ -34,33 +34,6 @@
 | 
				
			|||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <!-- <div class="other-user-buy-box">
 | 
					 | 
				
			||||||
      <div class="other-user-buy-title">
 | 
					 | 
				
			||||||
        <p>可以顺便看下其他商品哦 ~</p>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
      <div class="other-user-buy-row" v-for="(items,index1) in recommend" :key="index1">
 | 
					 | 
				
			||||||
        <div class="other-user-buy-item-box" v-for="(item,index2) in items" :key="index2">
 | 
					 | 
				
			||||||
          <div class="other-user-buy-item-img">
 | 
					 | 
				
			||||||
            <a href="item_detail.html"><img :src="item.img" alt=""></a>
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
          <div class="other-buy-detail-box">
 | 
					 | 
				
			||||||
            <div class="other-buy-title">
 | 
					 | 
				
			||||||
              <a href="item_detail.html">
 | 
					 | 
				
			||||||
                <p>{{item.intro}}</p>
 | 
					 | 
				
			||||||
              </a>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
            <div class="other-buy-price">
 | 
					 | 
				
			||||||
              <p>¥{{item.price}}</p>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
            <div class="other-buy-btn-box">
 | 
					 | 
				
			||||||
              <router-link to="/goodsDetail">
 | 
					 | 
				
			||||||
                <button class="other-buy-btn"><Icon type="ios-cart"></Icon> 加入购物车</button>
 | 
					 | 
				
			||||||
              </router-link>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
    </div> -->
 | 
					 | 
				
			||||||
    <BaseFooter></BaseFooter>
 | 
					    <BaseFooter></BaseFooter>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
				
			|||||||
@ -25,13 +25,6 @@
 | 
				
			|||||||
<script>
 | 
					<script>
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: 'AccountBind',
 | 
					  name: 'AccountBind',
 | 
				
			||||||
  data () {
 | 
					 | 
				
			||||||
    return {}
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  mounted () {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  methods: {}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,6 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="wrapper">
 | 
					  <div class="wrapper">
 | 
				
			||||||
    <card _Title="账户安全"/>
 | 
					    <card _Title="账户安全"/>
 | 
				
			||||||
 | 
					 | 
				
			||||||
    <div class="safeList">
 | 
					    <div class="safeList">
 | 
				
			||||||
      <!-- 密码 -->
 | 
					      <!-- 密码 -->
 | 
				
			||||||
      <Row class="safeItem">
 | 
					      <Row class="safeItem">
 | 
				
			||||||
@ -16,102 +15,11 @@
 | 
				
			|||||||
          <Button @click="modifyPwd">修改密码</Button>
 | 
					          <Button @click="modifyPwd">修改密码</Button>
 | 
				
			||||||
        </Col>
 | 
					        </Col>
 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
      <!-- 邮箱 -->
 | 
					 | 
				
			||||||
      <!-- <Row class="safeItem">
 | 
					 | 
				
			||||||
        <Col :span="2">
 | 
					 | 
				
			||||||
          <Icon size="40" type="md-mail" />
 | 
					 | 
				
			||||||
        </Col>
 | 
					 | 
				
			||||||
        <Col :span="16">
 | 
					 | 
				
			||||||
          <div class="setDivItem">
 | 
					 | 
				
			||||||
            邮箱验证
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
          <div class="setDivItem " v-if="true">
 | 
					 | 
				
			||||||
            您的验证邮箱:<span>xxxxx</span>
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
          <div class="setDivItem " v-else>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
        </Col>
 | 
					 | 
				
			||||||
        <Col :span="4">
 | 
					 | 
				
			||||||
          <Button>修改邮箱</Button>
 | 
					 | 
				
			||||||
        </Col>
 | 
					 | 
				
			||||||
      </Row> -->
 | 
					 | 
				
			||||||
      <!-- 手机验证 -->
 | 
					 | 
				
			||||||
      <!-- <Row class="safeItem">
 | 
					 | 
				
			||||||
        <Col :span="2">
 | 
					 | 
				
			||||||
          <Icon size="40" type="ios-phone-portrait" />
 | 
					 | 
				
			||||||
        </Col>
 | 
					 | 
				
			||||||
        <Col :span="16">
 | 
					 | 
				
			||||||
          <div class="setDivItem">
 | 
					 | 
				
			||||||
            手机验证
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
          <div class="setDivItem " v-if="true">
 | 
					 | 
				
			||||||
            您的手机号:<span>xxxxx</span>
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
          <div class="setDivItem " v-else>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
        </Col>
 | 
					 | 
				
			||||||
        <Col :span="4">
 | 
					 | 
				
			||||||
          <Button>立即验证</Button>
 | 
					 | 
				
			||||||
        </Col>
 | 
					 | 
				
			||||||
      </Row> -->
 | 
					 | 
				
			||||||
      <!-- 支付密码 -->
 | 
					 | 
				
			||||||
      <!-- <Row class="safeItem">
 | 
					 | 
				
			||||||
        <Col :span="2">
 | 
					 | 
				
			||||||
          <Icon size="40" type="md-lock" />
 | 
					 | 
				
			||||||
        </Col>
 | 
					 | 
				
			||||||
        <Col :span="16">
 | 
					 | 
				
			||||||
          <div class="setDivItem">
 | 
					 | 
				
			||||||
            支付密码
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
          <div class="setDivItem " v-if="true">
 | 
					 | 
				
			||||||
            安全认证:<span>xxxxx</span>
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
          <div class="setDivItem " v-else>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
        </Col>
 | 
					 | 
				
			||||||
        <Col :span="4">
 | 
					 | 
				
			||||||
          <Button @click="goModifyPwd" v-if="pwdStatus == '设置密码'" type="error">{{pwdStatus}}</Button>
 | 
					 | 
				
			||||||
          <Dropdown style="margin-left: 20px" v-if="pwdStatus == '修改密码'" @on-click="selectPwd">
 | 
					 | 
				
			||||||
            <Button type="primary">
 | 
					 | 
				
			||||||
              修改密码
 | 
					 | 
				
			||||||
              <Icon type="ios-arrow-down"></Icon>
 | 
					 | 
				
			||||||
            </Button>
 | 
					 | 
				
			||||||
            <DropdownMenu slot="list" on-click="selectPwd">
 | 
					 | 
				
			||||||
              <DropdownItem name = "1">修改密码</DropdownItem>
 | 
					 | 
				
			||||||
              <DropdownItem name = "2">重置密码</DropdownItem>
 | 
					 | 
				
			||||||
            </DropdownMenu>
 | 
					 | 
				
			||||||
          </Dropdown>
 | 
					 | 
				
			||||||
        </Col>
 | 
					 | 
				
			||||||
      </Row> -->
 | 
					 | 
				
			||||||
      <!-- 实名 -->
 | 
					 | 
				
			||||||
      <!-- <Row class="safeItem">
 | 
					 | 
				
			||||||
        <Col :span="2">
 | 
					 | 
				
			||||||
          <Icon size="40" type="md-card" />
 | 
					 | 
				
			||||||
        </Col>
 | 
					 | 
				
			||||||
        <Col :span="16">
 | 
					 | 
				
			||||||
          <div class="setDivItem">
 | 
					 | 
				
			||||||
            实名认证
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
          <div class="setDivItem " v-if="true">
 | 
					 | 
				
			||||||
            已认证:<span>xxxxx</span>
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
          <div class="setDivItem " v-else>
 | 
					 | 
				
			||||||
            您还未实名认证该账户,立即实名认证可加快提现速度。
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
        </Col>
 | 
					 | 
				
			||||||
        <Col :span="4">
 | 
					 | 
				
			||||||
          <Button>立即认证</Button>
 | 
					 | 
				
			||||||
        </Col>
 | 
					 | 
				
			||||||
      </Row> -->
 | 
					 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import card from '@/components/card'
 | 
					 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  getPwdStatus
 | 
					  getPwdStatus
 | 
				
			||||||
} from '@/api/account';
 | 
					} from '@/api/account';
 | 
				
			||||||
@ -122,7 +30,6 @@ export default {
 | 
				
			|||||||
      pwdStatus: '' // 密码状态
 | 
					      pwdStatus: '' // 密码状态
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  components: {card},
 | 
					 | 
				
			||||||
  mounted () {
 | 
					  mounted () {
 | 
				
			||||||
    this.getPwdStatus()
 | 
					    this.getPwdStatus()
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
@ -131,10 +38,7 @@ export default {
 | 
				
			|||||||
    goModifyPwd () {
 | 
					    goModifyPwd () {
 | 
				
			||||||
      this.$router.push({name: 'ModifyPwd', query: { status: 2 }})
 | 
					      this.$router.push({name: 'ModifyPwd', query: { status: 2 }})
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    selectPwd (value) {
 | 
					    modifyPwd () { // 修改密码
 | 
				
			||||||
      this.$router.push({name: 'ModifyPwd', query: { status: value }})
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    modifyPwd () {
 | 
					 | 
				
			||||||
      this.$router.push({name: 'ModifyPwd', query: { status: 1 }})
 | 
					      this.$router.push({name: 'ModifyPwd', query: { status: 1 }})
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 获取密码状态
 | 
					    // 获取密码状态
 | 
				
			||||||
 | 
				
			|||||||
@ -18,7 +18,7 @@
 | 
				
			|||||||
          <div class="title order-item-title">
 | 
					          <div class="title order-item-title">
 | 
				
			||||||
            <span>订单号:{{item.orderNo}}</span>
 | 
					            <span>订单号:{{item.orderNo}}</span>
 | 
				
			||||||
            <span class="color999 ml_10">{{item.createTime}}</span>
 | 
					            <span class="color999 ml_10">{{item.createTime}}</span>
 | 
				
			||||||
            <span class="hover-pointer fontsize_12 eval-detail" @click="evaluate(item.id)">评价详情</span>
 | 
					            <span class="hover-pointer fontsize_12 eval-detail" @click="evaluateDetail(item.id)">评价详情</span>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
          <Row class="order-item-view">
 | 
					          <Row class="order-item-view">
 | 
				
			||||||
            <i-col span="12" class="item-view-name">
 | 
					            <i-col span="12" class="item-view-name">
 | 
				
			||||||
@ -80,7 +80,7 @@ export default {
 | 
				
			|||||||
    this.getList()
 | 
					    this.getList()
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    getList () {
 | 
					    getList () { // 获取评价列表
 | 
				
			||||||
      evolutionList(this.params).then(res => {
 | 
					      evolutionList(this.params).then(res => {
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
          const list = res.result.records;
 | 
					          const list = res.result.records;
 | 
				
			||||||
@ -92,19 +92,16 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePageNum (val) {
 | 
					    changePageNum (val) { // 修改页码
 | 
				
			||||||
      this.params.pageNumber = val;
 | 
					      this.params.pageNumber = val;
 | 
				
			||||||
      this.getList()
 | 
					      this.getList()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePageSize (val) {
 | 
					    changePageSize (val) { // 修改页数
 | 
				
			||||||
      this.pageNumber = 1;
 | 
					      this.pageNumber = 1;
 | 
				
			||||||
      this.params.pageSize = val;
 | 
					      this.params.pageSize = val;
 | 
				
			||||||
      this.getList()
 | 
					      this.getList()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changeIndex (index) {
 | 
					    evaluateDetail (id) { // 跳转评价详情
 | 
				
			||||||
      console.log(index);
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    evaluate (id) {
 | 
					 | 
				
			||||||
      this.$router.push({path: '/home/evalDetail', query: { id }})
 | 
					      this.$router.push({path: '/home/evalDetail', query: { id }})
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
@ -112,6 +109,10 @@ export default {
 | 
				
			|||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style scoped lang="scss">
 | 
				
			||||||
 | 
					.page-size {
 | 
				
			||||||
 | 
					  display: flex;
 | 
				
			||||||
 | 
					  justify-content: flex-end;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
.order-img {
 | 
					.order-img {
 | 
				
			||||||
  > img {
 | 
					  > img {
 | 
				
			||||||
    width: 60px;
 | 
					    width: 60px;
 | 
				
			||||||
 | 
				
			|||||||
@ -141,23 +141,23 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    getDetail () {
 | 
					    getDetail () { // 获取投诉详情
 | 
				
			||||||
      getComplainDetail(this.$route.query.id).then(res => {
 | 
					      getComplainDetail(this.$route.query.id).then(res => {
 | 
				
			||||||
        if (res.success) this.detail = res.result
 | 
					        if (res.success) this.detail = res.result
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    goGoodsDetail (skuId, goodsId) {
 | 
					    goGoodsDetail (skuId, goodsId) { // 跳转商品详情
 | 
				
			||||||
      let routerUrl = this.$router.resolve({
 | 
					      let routerUrl = this.$router.resolve({
 | 
				
			||||||
        path: '/goodsDetail',
 | 
					        path: '/goodsDetail',
 | 
				
			||||||
        query: {skuId, goodsId}
 | 
					        query: {skuId, goodsId}
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
      window.open(routerUrl.href, '_blank')
 | 
					      window.open(routerUrl.href, '_blank')
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleView (name) {
 | 
					    handleView (name) { // 预览图片
 | 
				
			||||||
      this.previewImage = name;
 | 
					      this.previewImage = name;
 | 
				
			||||||
      this.visible = true;
 | 
					      this.visible = true;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 回复
 | 
					    // 回复消息
 | 
				
			||||||
    handleSubmit () {
 | 
					    handleSubmit () {
 | 
				
			||||||
      if (this.params.content === '') {
 | 
					      if (this.params.content === '') {
 | 
				
			||||||
        this.$Message.error('请填写对话内容');
 | 
					        this.$Message.error('请填写对话内容');
 | 
				
			||||||
 | 
				
			|||||||
@ -18,7 +18,7 @@
 | 
				
			|||||||
          <div class="title order-item-title">
 | 
					          <div class="title order-item-title">
 | 
				
			||||||
            <span>投诉单号:{{item.id}}</span>
 | 
					            <span>投诉单号:{{item.id}}</span>
 | 
				
			||||||
            <span class="color999 ml_10">{{item.createTime}}</span>
 | 
					            <span class="color999 ml_10">{{item.createTime}}</span>
 | 
				
			||||||
            <span class="hover-pointer fontsize_12 eval-detail" @click="detail(item.id)">投诉详情</span>
 | 
					            <span class="hover-pointer fontsize_12 eval-detail" @click="goDetail(item.id)">投诉详情</span>
 | 
				
			||||||
            <span class="hover-pointer fontsize_12 eval-detail" style="right: 90px" v-if="item.complainStatus != 'EXPIRED' && item.complainStatus != 'CANCEL'" @click="cancel(item.id)">取消投诉</span>
 | 
					            <span class="hover-pointer fontsize_12 eval-detail" style="right: 90px" v-if="item.complainStatus != 'EXPIRED' && item.complainStatus != 'CANCEL'" @click="cancel(item.id)">取消投诉</span>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
          <Row class="order-item-view">
 | 
					          <Row class="order-item-view">
 | 
				
			||||||
@ -93,7 +93,7 @@ export default {
 | 
				
			|||||||
    this.getList()
 | 
					    this.getList()
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    getList () {
 | 
					    getList () { // 获取投诉列表
 | 
				
			||||||
      complainList(this.params).then(res => {
 | 
					      complainList(this.params).then(res => {
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
          const list = res.result.records;
 | 
					          const list = res.result.records;
 | 
				
			||||||
@ -102,16 +102,16 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePageNum (val) {
 | 
					    changePageNum (val) { // 改变页码
 | 
				
			||||||
      this.params.pageNumber = val;
 | 
					      this.params.pageNumber = val;
 | 
				
			||||||
      this.getList()
 | 
					      this.getList()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePageSize (val) {
 | 
					    changePageSize (val) { // 改变页数
 | 
				
			||||||
      this.pageNumber = 1;
 | 
					      this.pageNumber = 1;
 | 
				
			||||||
      this.params.pageSize = val;
 | 
					      this.params.pageSize = val;
 | 
				
			||||||
      this.getList()
 | 
					      this.getList()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    cancel (id) {
 | 
					    cancel (id) { // 取消投诉
 | 
				
			||||||
      this.$Modal.confirm({
 | 
					      this.$Modal.confirm({
 | 
				
			||||||
        title: '取消投诉',
 | 
					        title: '取消投诉',
 | 
				
			||||||
        content: '<p>确定取消投诉吗?</p>',
 | 
					        content: '<p>确定取消投诉吗?</p>',
 | 
				
			||||||
@ -126,7 +126,7 @@ export default {
 | 
				
			|||||||
        onCancel: () => { }
 | 
					        onCancel: () => { }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    detail (id) {
 | 
					    goDetail (id) { // 跳转投诉详情
 | 
				
			||||||
      this.$router.push({path: '/home/complainDetail', query: { id }})
 | 
					      this.$router.push({path: '/home/complainDetail', query: { id }})
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
@ -213,7 +213,7 @@ export default {
 | 
				
			|||||||
    this.distribution()
 | 
					    this.distribution()
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    apply () {
 | 
					    apply () { // 申请成为分销商
 | 
				
			||||||
      this.$refs.form.validate(valid => {
 | 
					      this.$refs.form.validate(valid => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          this.applyLoading = true
 | 
					          this.applyLoading = true
 | 
				
			||||||
@ -239,10 +239,10 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    qrcodeData (data64) {
 | 
					    qrcodeData (data64) { // 二维码base64地址
 | 
				
			||||||
      this.base64Img = data64
 | 
					      this.base64Img = data64
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    downloadQrcode () {
 | 
					    downloadQrcode () { // 下载二维码
 | 
				
			||||||
      let a = document.createElement('a'); // 生成一个a元素
 | 
					      let a = document.createElement('a'); // 生成一个a元素
 | 
				
			||||||
      let event = new MouseEvent('click'); // 创建一个单击事件
 | 
					      let event = new MouseEvent('click'); // 创建一个单击事件
 | 
				
			||||||
      a.download = this.goodsNameCurr || 'photo'
 | 
					      a.download = this.goodsNameCurr || 'photo'
 | 
				
			||||||
@ -265,11 +265,11 @@ export default {
 | 
				
			|||||||
        this.getLog()
 | 
					        this.getLog()
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePage (val) {
 | 
					    changePage (val) { // 修改页码
 | 
				
			||||||
      this.params.pageNumber = val;
 | 
					      this.params.pageNumber = val;
 | 
				
			||||||
      this.getGoodsData()
 | 
					      this.getGoodsData()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePageLog (val) {
 | 
					    changePageLog (val) { // 修改页码 日志
 | 
				
			||||||
      this.logParams.pageNumber = val;
 | 
					      this.logParams.pageNumber = val;
 | 
				
			||||||
      this.getLog()
 | 
					      this.getLog()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
				
			|||||||
@ -68,19 +68,19 @@ export default {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    getList () {
 | 
					    getList () { // 获取收藏列表
 | 
				
			||||||
      this.spinShow = true
 | 
					      this.spinShow = true
 | 
				
			||||||
      collectList(this.params).then(res => {
 | 
					      collectList(this.params).then(res => {
 | 
				
			||||||
        this.spinShow = false
 | 
					        this.spinShow = false
 | 
				
			||||||
        if (res.success) this.list = res.result.records;
 | 
					        if (res.success) this.list = res.result.records;
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    change (index) {
 | 
					    change (index) { // tab栏切换
 | 
				
			||||||
      if (index === 0) { this.params.type = 'GOODS' }
 | 
					      if (index === 0) { this.params.type = 'GOODS' }
 | 
				
			||||||
      if (index === 1) { this.params.type = 'SHOP' }
 | 
					      if (index === 1) { this.params.type = 'SHOP' }
 | 
				
			||||||
      this.getList()
 | 
					      this.getList()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    cancel (id) {
 | 
					    cancel (id) { // 取消收藏
 | 
				
			||||||
      let typeName = this.params.type === 'GOODS' ? '商品' : '店铺'
 | 
					      let typeName = this.params.type === 'GOODS' ? '商品' : '店铺'
 | 
				
			||||||
      this.$Modal.confirm({
 | 
					      this.$Modal.confirm({
 | 
				
			||||||
        title: 'Title',
 | 
					        title: 'Title',
 | 
				
			||||||
@ -94,23 +94,23 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePageNum (val) {
 | 
					    changePageNum (val) { // 修改页码
 | 
				
			||||||
      this.params.pageNumber = val;
 | 
					      this.params.pageNumber = val;
 | 
				
			||||||
      this.getList()
 | 
					      this.getList()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePageSize (val) {
 | 
					    changePageSize (val) { // 修改页数
 | 
				
			||||||
      this.pageNumber = 1;
 | 
					      this.pageNumber = 1;
 | 
				
			||||||
      this.params.pageSize = val;
 | 
					      this.params.pageSize = val;
 | 
				
			||||||
      this.getList()
 | 
					      this.getList()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    buynow (skuId, goodsId) {
 | 
					    buynow (skuId, goodsId) { // 跳转详情
 | 
				
			||||||
      let url = this.$router.resolve({
 | 
					      let url = this.$router.resolve({
 | 
				
			||||||
        path: '/goodsDetail',
 | 
					        path: '/goodsDetail',
 | 
				
			||||||
        query: {skuId, goodsId}
 | 
					        query: {skuId, goodsId}
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
      window.open(url.href, '_blank')
 | 
					      window.open(url.href, '_blank')
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    goShop (id) {
 | 
					    goShop (id) { // 跳转店铺页面
 | 
				
			||||||
      let url = this.$router.resolve({
 | 
					      let url = this.$router.resolve({
 | 
				
			||||||
        path: '/merchant',
 | 
					        path: '/merchant',
 | 
				
			||||||
        query: {id}
 | 
					        query: {id}
 | 
				
			||||||
 | 
				
			|||||||
@ -78,12 +78,12 @@ export default {
 | 
				
			|||||||
    this.getList()
 | 
					    this.getList()
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    getList () {
 | 
					    getList () { // 获取发票列表
 | 
				
			||||||
      receiptList().then(res => {
 | 
					      receiptList().then(res => {
 | 
				
			||||||
        this.list = res.result.records;
 | 
					        this.list = res.result.records;
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    save () {
 | 
					    save () { // 保存发票
 | 
				
			||||||
      this.$refs.form.validate((valid) => {
 | 
					      this.$refs.form.validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          this.loading = true;
 | 
					          this.loading = true;
 | 
				
			||||||
@ -105,7 +105,7 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    resetData () {
 | 
					    resetData () { // 重置表单数据
 | 
				
			||||||
      this.$refs.form.resetFields();
 | 
					      this.$refs.form.resetFields();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
@ -99,7 +99,7 @@ export default {
 | 
				
			|||||||
        againPassword: '',
 | 
					        againPassword: '',
 | 
				
			||||||
        newPassword: ''
 | 
					        newPassword: ''
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      ruleInLines: {
 | 
					      ruleInLines: { // 验证规则
 | 
				
			||||||
        picture: [
 | 
					        picture: [
 | 
				
			||||||
          {required: true, message: '请输入图片验证码', trigger: 'blur'}
 | 
					          {required: true, message: '请输入图片验证码', trigger: 'blur'}
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
@ -107,7 +107,7 @@ export default {
 | 
				
			|||||||
          {required: true, message: '请输入短信验证码', trigger: 'blur'}
 | 
					          {required: true, message: '请输入短信验证码', trigger: 'blur'}
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      ruleIn: {
 | 
					      ruleIn: { // 验证规则
 | 
				
			||||||
        newPassword: [
 | 
					        newPassword: [
 | 
				
			||||||
          {required: true, message: '请输入新密码', trigger: 'blur'},
 | 
					          {required: true, message: '请输入新密码', trigger: 'blur'},
 | 
				
			||||||
          {type: 'string', min: 6, message: '密码不能少于6位'}
 | 
					          {type: 'string', min: 6, message: '密码不能少于6位'}
 | 
				
			||||||
@ -117,7 +117,7 @@ export default {
 | 
				
			|||||||
          {type: 'string', min: 6, message: '密码不能少于6位'}
 | 
					          {type: 'string', min: 6, message: '密码不能少于6位'}
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      ruleInline: {
 | 
					      ruleInline: { // 验证规则
 | 
				
			||||||
        password: [
 | 
					        password: [
 | 
				
			||||||
          {required: true, message: '请输入旧密码', trigger: 'blur'}
 | 
					          {required: true, message: '请输入旧密码', trigger: 'blur'}
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
 | 
				
			|||||||
@ -63,7 +63,7 @@ export default {
 | 
				
			|||||||
    this.getPoint()
 | 
					    this.getPoint()
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    getHistory () {
 | 
					    getHistory () { // 获取积分历史
 | 
				
			||||||
      memberPointHistory(this.params).then(res => {
 | 
					      memberPointHistory(this.params).then(res => {
 | 
				
			||||||
        this.logData = res.result;
 | 
					        this.logData = res.result;
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
@ -73,11 +73,11 @@ export default {
 | 
				
			|||||||
        if (res.success) this.pointObj = res.result
 | 
					        if (res.success) this.pointObj = res.result
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePage (val) {
 | 
					    changePage (val) { // 修改页码
 | 
				
			||||||
      this.pageNumber = val
 | 
					      this.pageNumber = val
 | 
				
			||||||
      this.getHistory()
 | 
					      this.getHistory()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePageSize (val) {
 | 
					    changePageSize (val) { // 修改页数
 | 
				
			||||||
      this.param.pageSize = val
 | 
					      this.param.pageSize = val
 | 
				
			||||||
      this.params.pageNumber = 1
 | 
					      this.params.pageNumber = 1
 | 
				
			||||||
      this.getHistory()
 | 
					      this.getHistory()
 | 
				
			||||||
 | 
				
			|||||||
@ -8,7 +8,6 @@
 | 
				
			|||||||
        <Upload
 | 
					        <Upload
 | 
				
			||||||
          :show-upload-list="false"
 | 
					          :show-upload-list="false"
 | 
				
			||||||
          :on-success="handleSuccess"
 | 
					          :on-success="handleSuccess"
 | 
				
			||||||
          :before-upload="handleBeforeUpload"
 | 
					 | 
				
			||||||
          :format="['jpg','jpeg','png']"
 | 
					          :format="['jpg','jpeg','png']"
 | 
				
			||||||
          :action="action"
 | 
					          :action="action"
 | 
				
			||||||
          :headers="accessToken"
 | 
					          :headers="accessToken"
 | 
				
			||||||
@ -58,7 +57,7 @@ export default {
 | 
				
			|||||||
    this.accessToken.accessToken = storage.getItem('accessToken');
 | 
					    this.accessToken.accessToken = storage.getItem('accessToken');
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    save () {
 | 
					    save () { // 保存
 | 
				
			||||||
      this.$refs.form.validate(valid => {
 | 
					      this.$refs.form.validate(valid => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          let params = {
 | 
					          let params = {
 | 
				
			||||||
@ -76,10 +75,9 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleSuccess (res, file) {
 | 
					    handleSuccess (res, file) { // 上传成功
 | 
				
			||||||
      this.$set(this.formItem, 'face', res.result)
 | 
					      this.$set(this.formItem, 'face', res.result)
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleBeforeUpload () {}
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -88,7 +88,7 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    getOrderDetail () {
 | 
					    getOrderDetail () { // 获取订单详情
 | 
				
			||||||
      orderDetail(this.$route.query.sn).then(res => {
 | 
					      orderDetail(this.$route.query.sn).then(res => {
 | 
				
			||||||
        this.order = res.result
 | 
					        this.order = res.result
 | 
				
			||||||
        this.orderGoods = res.result.orderItems[this.$route.query.index]
 | 
					        this.orderGoods = res.result.orderItems[this.$route.query.index]
 | 
				
			||||||
@ -96,7 +96,7 @@ export default {
 | 
				
			|||||||
        this.orderGoods.uploadList = []
 | 
					        this.orderGoods.uploadList = []
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    save () {
 | 
					    save () { // 保存评价
 | 
				
			||||||
      if (!this.form.serviceScore || !this.form.deliveryScore) {
 | 
					      if (!this.form.serviceScore || !this.form.deliveryScore) {
 | 
				
			||||||
        this.$Message.warning('物流服务评价不能为空')
 | 
					        this.$Message.warning('物流服务评价不能为空')
 | 
				
			||||||
        return false;
 | 
					        return false;
 | 
				
			||||||
@ -129,26 +129,26 @@ export default {
 | 
				
			|||||||
        this.loading = false;
 | 
					        this.loading = false;
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    goGoodsDetail (skuId, goodsId) {
 | 
					    goGoodsDetail (skuId, goodsId) { // 跳转商品详情
 | 
				
			||||||
      let routerUrl = this.$router.resolve({
 | 
					      let routerUrl = this.$router.resolve({
 | 
				
			||||||
        path: '/goodsDetail',
 | 
					        path: '/goodsDetail',
 | 
				
			||||||
        query: {skuId, goodsId}
 | 
					        query: {skuId, goodsId}
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
      window.open(routerUrl.href, '_blank')
 | 
					      window.open(routerUrl.href, '_blank')
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleView (name) {
 | 
					    handleView (name) { // 预览图片
 | 
				
			||||||
      this.previewImage = name;
 | 
					      this.previewImage = name;
 | 
				
			||||||
      this.visible = true;
 | 
					      this.visible = true;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleRemove (index) {
 | 
					    handleRemove (index) { // 移除图片
 | 
				
			||||||
      this.orderGoods.uploadList.splice(index, 1)
 | 
					      this.orderGoods.uploadList.splice(index, 1)
 | 
				
			||||||
      this.$forceUpdate()
 | 
					      this.$forceUpdate()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleSuccess (res, file) {
 | 
					    handleSuccess (res, file) { // 上传成功回调
 | 
				
			||||||
      this.orderGoods.uploadList.push(res.result)
 | 
					      this.orderGoods.uploadList.push(res.result)
 | 
				
			||||||
      this.$forceUpdate()
 | 
					      this.$forceUpdate()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleBeforeUpload () {
 | 
					    handleBeforeUpload () { // 上传之前钩子
 | 
				
			||||||
      const check = this.orderGoods.uploadList.length < 10;
 | 
					      const check = this.orderGoods.uploadList.length < 10;
 | 
				
			||||||
      if (!check) {
 | 
					      if (!check) {
 | 
				
			||||||
        this.$Notice.warning({
 | 
					        this.$Notice.warning({
 | 
				
			||||||
 | 
				
			|||||||
@ -65,19 +65,19 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    getDetail () {
 | 
					    getDetail () { // 获取评价详情
 | 
				
			||||||
      evaluationDetail(this.$route.query.id).then(res => {
 | 
					      evaluationDetail(this.$route.query.id).then(res => {
 | 
				
			||||||
        if (res.success) this.orderGoods = res.result
 | 
					        if (res.success) this.orderGoods = res.result
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    goGoodsDetail (skuId, goodsId) {
 | 
					    goGoodsDetail (skuId, goodsId) { // 跳转商品详情
 | 
				
			||||||
      let routerUrl = this.$router.resolve({
 | 
					      let routerUrl = this.$router.resolve({
 | 
				
			||||||
        path: '/goodsDetail',
 | 
					        path: '/goodsDetail',
 | 
				
			||||||
        query: {skuId, goodsId}
 | 
					        query: {skuId, goodsId}
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
      window.open(routerUrl.href, '_blank')
 | 
					      window.open(routerUrl.href, '_blank')
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleView (name) {
 | 
					    handleView (name) { // 预览图片
 | 
				
			||||||
      this.previewImage = name;
 | 
					      this.previewImage = name;
 | 
				
			||||||
      this.visible = true;
 | 
					      this.visible = true;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										17
									
								
								buyer/src/pages/home/memberCenter/memberMsg/MsgDetail.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								buyer/src/pages/home/memberCenter/memberMsg/MsgDetail.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,17 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div class="msg-list">
 | 
				
			||||||
 | 
					    会员消息详情
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      detail: {}, // 消息详情
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
							
								
								
									
										41
									
								
								buyer/src/pages/home/memberCenter/memberMsg/MsgList.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								buyer/src/pages/home/memberCenter/memberMsg/MsgList.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,41 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div class="msg-list">
 | 
				
			||||||
 | 
					    <card _Title="我的消息" :_Tabs="status" :_Size="16" />
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import {memberMsgList, readMemberMsg, delMemberMsg} from '@/api/member.js'
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      list: [], // 会员列表
 | 
				
			||||||
 | 
					      status: ['未读', '已读', '回收站'],
 | 
				
			||||||
 | 
					      params: { // 请求参数
 | 
				
			||||||
 | 
					        pageNumber: 1,
 | 
				
			||||||
 | 
					        pageSize: 10,
 | 
				
			||||||
 | 
					        status: ''
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    getList () { // 获取消息列表
 | 
				
			||||||
 | 
					      memberMsgList(this.params).then(res => {
 | 
				
			||||||
 | 
					        if (res.success) {
 | 
				
			||||||
 | 
					          this.list = res.result.records;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    setRead (id) { // 设置消息已读
 | 
				
			||||||
 | 
					      readMemberMsg(id).then(res => {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted () {
 | 
				
			||||||
 | 
					    this.getList()
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@ -79,7 +79,7 @@ export default {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    save () {
 | 
					    save () { // 保存地址
 | 
				
			||||||
      this.$refs.form.validate((valid) => {
 | 
					      this.$refs.form.validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          const params = JSON.parse(JSON.stringify(this.formData));
 | 
					          const params = JSON.parse(JSON.stringify(this.formData));
 | 
				
			||||||
 | 
				
			|||||||
@ -133,7 +133,7 @@ export default {
 | 
				
			|||||||
      });
 | 
					      });
 | 
				
			||||||
      window.open(routeUrl.href, '_blank');
 | 
					      window.open(routeUrl.href, '_blank');
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getList () {
 | 
					    getList () { // 获取售后列表
 | 
				
			||||||
      this.spinShow = true;
 | 
					      this.spinShow = true;
 | 
				
			||||||
      let params = JSON.parse(JSON.stringify(this.params))
 | 
					      let params = JSON.parse(JSON.stringify(this.params))
 | 
				
			||||||
      afterSaleList(params).then(res => {
 | 
					      afterSaleList(params).then(res => {
 | 
				
			||||||
@ -144,11 +144,11 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePageNum (val) {
 | 
					    changePageNum (val) { // 修改页码
 | 
				
			||||||
      this.params.pageNumber = val;
 | 
					      this.params.pageNumber = val;
 | 
				
			||||||
      this.getList()
 | 
					      this.getList()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePageSize (val) {
 | 
					    changePageSize (val) { // 修改页数
 | 
				
			||||||
      this.pageNumber = 1;
 | 
					      this.pageNumber = 1;
 | 
				
			||||||
      this.params.pageSize = val;
 | 
					      this.params.pageSize = val;
 | 
				
			||||||
      this.getList()
 | 
					      this.getList()
 | 
				
			||||||
 | 
				
			|||||||
@ -75,7 +75,7 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getLog () {
 | 
					    getLog () { // 获取售后日志
 | 
				
			||||||
      afterSaleLog(this.$route.query.sn).then(res => {
 | 
					      afterSaleLog(this.$route.query.sn).then(res => {
 | 
				
			||||||
        this.logList = res.result;
 | 
					        this.logList = res.result;
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
 | 
				
			|||||||
@ -139,7 +139,7 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    getInfo () {
 | 
					    getInfo () { // 获取售后信息
 | 
				
			||||||
      afterSaleInfo(this.$route.query.sn).then(res => {
 | 
					      afterSaleInfo(this.$route.query.sn).then(res => {
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
          this.info = res.result
 | 
					          this.info = res.result
 | 
				
			||||||
@ -147,15 +147,15 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getReason (type) {
 | 
					    getReason (type) { // 获取售后原因
 | 
				
			||||||
      afterSaleReason(type).then(res => {
 | 
					      afterSaleReason(type).then(res => {
 | 
				
			||||||
        if (res.success) this.reasonList = res.result
 | 
					        if (res.success) this.reasonList = res.result
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changeReason (type) {
 | 
					    changeReason (type) { // 改变售后原因列表
 | 
				
			||||||
      this.getReason(type)
 | 
					      this.getReason(type)
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    apply () {
 | 
					    apply () { // 售后申请提交
 | 
				
			||||||
      this.$refs.form.validate(valid => {
 | 
					      this.$refs.form.validate(valid => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          let params = Object.assign(this.info, this.form)
 | 
					          let params = Object.assign(this.info, this.form)
 | 
				
			||||||
@ -170,19 +170,19 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleView (name) {
 | 
					    handleView (name) { // 预览图片
 | 
				
			||||||
      this.previewImage = name;
 | 
					      this.previewImage = name;
 | 
				
			||||||
      this.visible = true;
 | 
					      this.visible = true;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleRemove (index) {
 | 
					    handleRemove (index) { // 移除图片
 | 
				
			||||||
      this.uploadList.splice(index, 1)
 | 
					      this.uploadList.splice(index, 1)
 | 
				
			||||||
      this.$forceUpdate()
 | 
					      this.$forceUpdate()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleSuccess (res, file) {
 | 
					    handleSuccess (res, file) { // 上传成功回调
 | 
				
			||||||
      this.uploadList.push(res.result)
 | 
					      this.uploadList.push(res.result)
 | 
				
			||||||
      this.$forceUpdate()
 | 
					      this.$forceUpdate()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleBeforeUpload () {
 | 
					    handleBeforeUpload () { // 上传之前钩子函数
 | 
				
			||||||
      const check = this.uploadList.length < 6;
 | 
					      const check = this.uploadList.length < 6;
 | 
				
			||||||
      if (!check) {
 | 
					      if (!check) {
 | 
				
			||||||
        this.$Notice.warning({
 | 
					        this.$Notice.warning({
 | 
				
			||||||
 | 
				
			|||||||
@ -78,7 +78,7 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    getOrderDetail () {
 | 
					    getOrderDetail () { // 获取订单详情
 | 
				
			||||||
      orderDetail(this.$route.query.sn).then(res => {
 | 
					      orderDetail(this.$route.query.sn).then(res => {
 | 
				
			||||||
        this.order = res.result
 | 
					        this.order = res.result
 | 
				
			||||||
        this.orderGoods = res.result.orderItems[this.$route.query.index]
 | 
					        this.orderGoods = res.result.orderItems[this.$route.query.index]
 | 
				
			||||||
@ -92,7 +92,7 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    save () {
 | 
					    save () { // 提交投诉信息
 | 
				
			||||||
      let params = {
 | 
					      let params = {
 | 
				
			||||||
        goodsId: this.orderGoods.goodsId,
 | 
					        goodsId: this.orderGoods.goodsId,
 | 
				
			||||||
        complainTopic: this.form.complainTopic,
 | 
					        complainTopic: this.form.complainTopic,
 | 
				
			||||||
@ -108,26 +108,26 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    goGoodsDetail (skuId, goodsId) {
 | 
					    goGoodsDetail (skuId, goodsId) { // 跳转商品详情
 | 
				
			||||||
      let routerUrl = this.$router.resolve({
 | 
					      let routerUrl = this.$router.resolve({
 | 
				
			||||||
        path: '/goodsDetail',
 | 
					        path: '/goodsDetail',
 | 
				
			||||||
        query: {skuId, goodsId}
 | 
					        query: {skuId, goodsId}
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
      window.open(routerUrl.href, '_blank')
 | 
					      window.open(routerUrl.href, '_blank')
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleView (name) {
 | 
					    handleView (name) { // 预览图片
 | 
				
			||||||
      this.previewImage = name;
 | 
					      this.previewImage = name;
 | 
				
			||||||
      this.visible = true;
 | 
					      this.visible = true;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleRemove (index) {
 | 
					    handleRemove (index) { // 移除图片
 | 
				
			||||||
      this.orderGoods.uploadList.splice(index, 1)
 | 
					      this.orderGoods.uploadList.splice(index, 1)
 | 
				
			||||||
      this.$forceUpdate()
 | 
					      this.$forceUpdate()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleSuccess (res, file) {
 | 
					    handleSuccess (res, file) { // 上传成功回调
 | 
				
			||||||
      this.orderGoods.uploadList.push(res.result)
 | 
					      this.orderGoods.uploadList.push(res.result)
 | 
				
			||||||
      this.$forceUpdate()
 | 
					      this.$forceUpdate()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleBeforeUpload () {
 | 
					    handleBeforeUpload () { // 上传之前钩子函数
 | 
				
			||||||
      const check = this.orderGoods.uploadList.length < 6;
 | 
					      const check = this.orderGoods.uploadList.length < 6;
 | 
				
			||||||
      if (!check) {
 | 
					      if (!check) {
 | 
				
			||||||
        this.$Notice.warning({
 | 
					        this.$Notice.warning({
 | 
				
			||||||
 | 
				
			|||||||
@ -240,7 +240,7 @@ export default {
 | 
				
			|||||||
    complainResult (sn) { // 投诉结果
 | 
					    complainResult (sn) { // 投诉结果
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    delOrder (sn) {
 | 
					    delOrder (sn) { // 删除订单
 | 
				
			||||||
      this.$Modal.confirm({
 | 
					      this.$Modal.confirm({
 | 
				
			||||||
        title: '删除订单',
 | 
					        title: '删除订单',
 | 
				
			||||||
        content: '<p>确认删除当前订单吗?</p>',
 | 
					        content: '<p>确认删除当前订单吗?</p>',
 | 
				
			||||||
@ -255,7 +255,7 @@ export default {
 | 
				
			|||||||
        onCancel: () => {}
 | 
					        onCancel: () => {}
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getList () {
 | 
					    getList () { // 获取订单列表
 | 
				
			||||||
      this.spinShow = true;
 | 
					      this.spinShow = true;
 | 
				
			||||||
      let params = JSON.parse(JSON.stringify(this.params))
 | 
					      let params = JSON.parse(JSON.stringify(this.params))
 | 
				
			||||||
      if (params.orderStatus === 'ALL') {
 | 
					      if (params.orderStatus === 'ALL') {
 | 
				
			||||||
@ -269,11 +269,11 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePageNum (val) {
 | 
					    changePageNum (val) { // 修改页码
 | 
				
			||||||
      this.params.pageNumber = val;
 | 
					      this.params.pageNumber = val;
 | 
				
			||||||
      this.getList()
 | 
					      this.getList()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePageSize (val) {
 | 
					    changePageSize (val) { // 修改页数
 | 
				
			||||||
      this.pageNumber = 1;
 | 
					      this.pageNumber = 1;
 | 
				
			||||||
      this.params.pageSize = val;
 | 
					      this.params.pageSize = val;
 | 
				
			||||||
      this.getList()
 | 
					      this.getList()
 | 
				
			||||||
@ -289,7 +289,7 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    sureCancel () {
 | 
					    sureCancel () { // 确定取消
 | 
				
			||||||
      cancelOrder(this.cancelParams).then(res => {
 | 
					      cancelOrder(this.cancelParams).then(res => {
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
          this.$Message.success('取消订单成功')
 | 
					          this.$Message.success('取消订单成功')
 | 
				
			||||||
 | 
				
			|||||||
@ -128,7 +128,7 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    traces () {
 | 
					    traces () { // 物流信息
 | 
				
			||||||
      getTraces(this.$route.query.sn).then(res => {
 | 
					      getTraces(this.$route.query.sn).then(res => {
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
          this.logistics = res.result
 | 
					          this.logistics = res.result
 | 
				
			||||||
 | 
				
			|||||||
@ -41,6 +41,11 @@ const member = [{
 | 
				
			|||||||
    title: '账户安全',
 | 
					    title: '账户安全',
 | 
				
			||||||
    path: 'AccountSafe'
 | 
					    path: 'AccountSafe'
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    icon: '',
 | 
				
			||||||
 | 
					    title: '我的消息',
 | 
				
			||||||
 | 
					    path: 'MsgList'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    icon: '',
 | 
					    icon: '',
 | 
				
			||||||
    title: '我的足迹',
 | 
					    title: '我的足迹',
 | 
				
			||||||
 | 
				
			|||||||
@ -1,77 +1,133 @@
 | 
				
			|||||||
// import Vue from 'vue';
 | 
					// import Vue from 'vue';
 | 
				
			||||||
import axios from 'axios';
 | 
					import axios from "axios";
 | 
				
			||||||
import https from 'https';
 | 
					import https from "https";
 | 
				
			||||||
import {
 | 
					import { Message, Spin, Modal } from "view-design";
 | 
				
			||||||
  Message,
 | 
					import Storage from "./storage";
 | 
				
			||||||
  Spin,
 | 
					import config from "@/config";
 | 
				
			||||||
  Modal
 | 
					import router from "../router/index.js";
 | 
				
			||||||
} from 'view-design';
 | 
					import store from "../vuex/store";
 | 
				
			||||||
import Storage from './storage';
 | 
					import { handleRefreshToken } from "@/api/index";
 | 
				
			||||||
import config from '@/config';
 | 
					const qs = require("qs");
 | 
				
			||||||
import router from '../router/index.js';
 | 
					export const buyerUrl =
 | 
				
			||||||
import store from '../vuex/store';
 | 
					  process.env.NODE_ENV === "development"
 | 
				
			||||||
import {
 | 
					    ? config.api_dev.buyer
 | 
				
			||||||
  handleRefreshToken
 | 
					    : config.api_prod.buyer;
 | 
				
			||||||
} from '@/api/index';
 | 
					export const commonUrl =
 | 
				
			||||||
const qs = require('qs');
 | 
					  process.env.NODE_ENV === "development"
 | 
				
			||||||
 | 
					    ? config.api_dev.common
 | 
				
			||||||
export const buyerUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.buyer : config.api_prod.buyer);
 | 
					    : config.api_prod.common;
 | 
				
			||||||
export const commonUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.common : config.api_prod.common);
 | 
					export const managerUrl =
 | 
				
			||||||
export const managerUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.manager : config.api_prod.manager);
 | 
					  process.env.NODE_ENV === "development"
 | 
				
			||||||
export const sellerUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.seller : config.api_prod.seller);
 | 
					    ? config.api_dev.manager
 | 
				
			||||||
 | 
					    : config.api_prod.manager;
 | 
				
			||||||
 | 
					export const sellerUrl =
 | 
				
			||||||
 | 
					  process.env.NODE_ENV === "development"
 | 
				
			||||||
 | 
					    ? config.api_dev.seller
 | 
				
			||||||
 | 
					    : config.api_prod.seller;
 | 
				
			||||||
// 创建axios实例
 | 
					// 创建axios实例
 | 
				
			||||||
var isRefreshToken = 0;
 | 
					var isRefreshToken = 0;
 | 
				
			||||||
const refreshToken = getTokenDebounce()
 | 
					const refreshToken = getTokenDebounce();
 | 
				
			||||||
const service = axios.create({
 | 
					const service = axios.create({
 | 
				
			||||||
  timeout: 10000, // 请求超时时间
 | 
					  timeout: 10000, // 请求超时时间
 | 
				
			||||||
  baseURL: buyerUrl, // API
 | 
					  baseURL: buyerUrl, // API
 | 
				
			||||||
  httpsAgent: new https.Agent({
 | 
					  httpsAgent: new https.Agent({
 | 
				
			||||||
    rejectUnauthorized: false
 | 
					    rejectUnauthorized: false
 | 
				
			||||||
  }),
 | 
					  }),
 | 
				
			||||||
  paramsSerializer: params => qs.stringify(params, {
 | 
					  paramsSerializer: params =>
 | 
				
			||||||
    arrayFormat: 'repeat'
 | 
					    qs.stringify(params, {
 | 
				
			||||||
  })
 | 
					      arrayFormat: "repeat"
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// request拦截器
 | 
					// request拦截器
 | 
				
			||||||
service.interceptors.request.use(config => {
 | 
					service.interceptors.request.use(
 | 
				
			||||||
  const {
 | 
					  config => {
 | 
				
			||||||
    loading
 | 
					    const { loading } = config;
 | 
				
			||||||
  } = config;
 | 
					    // 如果是put/post请求,用qs.stringify序列化参数
 | 
				
			||||||
  // 如果是put/post请求,用qs.stringify序列化参数
 | 
					    const isPutPost = config.method === "put" || config.method === "post";
 | 
				
			||||||
  const isPutPost = config.method === 'put' || config.method === 'post';
 | 
					    const isJson = config.headers["Content-Type"] === "application/json";
 | 
				
			||||||
  const isJson = config.headers['Content-Type'] === 'application/json';
 | 
					    const isFile = config.headers["Content-Type"] === "multipart/form-data";
 | 
				
			||||||
  const isFile = config.headers['Content-Type'] === 'multipart/form-data';
 | 
					    if (isPutPost && isJson) {
 | 
				
			||||||
  if (isPutPost && isJson) {
 | 
					      config.data = JSON.stringify(config.data);
 | 
				
			||||||
    config.data = JSON.stringify(config.data);
 | 
					    }
 | 
				
			||||||
 | 
					    if (isPutPost && !isFile && !isJson) {
 | 
				
			||||||
 | 
					      config.data = qs.stringify(config.data, {
 | 
				
			||||||
 | 
					        arrayFormat: "repeat"
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    /** 配置全屏加载 */
 | 
				
			||||||
 | 
					    if (process.client && loading !== false) {
 | 
				
			||||||
 | 
					      config.loading = Spin.show();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    const uuid = Storage.getItem("uuid");
 | 
				
			||||||
 | 
					    config.headers["uuid"] = uuid;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 获取访问Token
 | 
				
			||||||
 | 
					    let accessToken = Storage.getItem("accessToken");
 | 
				
			||||||
 | 
					    if (accessToken && config.needToken) {
 | 
				
			||||||
 | 
					      config.headers["accessToken"] = accessToken;
 | 
				
			||||||
 | 
					      // 解析当前token时间
 | 
				
			||||||
 | 
					      let jwtData = JSON.parse(
 | 
				
			||||||
 | 
					        decodeURIComponent(escape(window.atob(accessToken.split(".")[1])))
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
 | 
					      if (jwtData.exp < Math.round(new Date() / 1000)) {
 | 
				
			||||||
 | 
					        refresh()
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return config;
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  error => {
 | 
				
			||||||
 | 
					    Promise.reject(error);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  if (isPutPost && !isFile && !isJson) {
 | 
					);
 | 
				
			||||||
    config.data = qs.stringify(config.data, {
 | 
					
 | 
				
			||||||
      arrayFormat: 'repeat'
 | 
					async function refresh() {
 | 
				
			||||||
 | 
					  const getTokenRes = await refreshToken();
 | 
				
			||||||
 | 
					  if (getTokenRes === "success") {
 | 
				
			||||||
 | 
					    // 刷新token
 | 
				
			||||||
 | 
					    if (isRefreshToken === 1) {
 | 
				
			||||||
 | 
					      error.response.config.headers.accessToken = Storage.getItem(
 | 
				
			||||||
 | 
					        "accessToken"
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
 | 
					      return service(error.response.config);
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					      router.go(0);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    Storage.removeItem("accessToken");
 | 
				
			||||||
 | 
					    Storage.removeItem("refreshToken");
 | 
				
			||||||
 | 
					    Storage.removeItem("userInfo");
 | 
				
			||||||
 | 
					    Storage.setItem("cartNum", 0);
 | 
				
			||||||
 | 
					    store.commit("SET_CARTNUM", 0);
 | 
				
			||||||
 | 
					    console.log("1111");
 | 
				
			||||||
 | 
					    Modal.confirm({
 | 
				
			||||||
 | 
					      title: "请登录",
 | 
				
			||||||
 | 
					      content: "<p>请登录后执行此操作</p>",
 | 
				
			||||||
 | 
					      okText: "立即登录",
 | 
				
			||||||
 | 
					      cancelText: "继续浏览",
 | 
				
			||||||
 | 
					      onOk: () => {
 | 
				
			||||||
 | 
					        router.push({
 | 
				
			||||||
 | 
					          path: "/login",
 | 
				
			||||||
 | 
					          query: {
 | 
				
			||||||
 | 
					            rePath: router.history.current.path,
 | 
				
			||||||
 | 
					            query: JSON.stringify(router.history.current.query)
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      onCancel: () => {
 | 
				
			||||||
 | 
					        Modal.remove();
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  /** 配置全屏加载 */
 | 
					}
 | 
				
			||||||
  if (process.client && loading !== false) {
 | 
					 | 
				
			||||||
    config.loading = Spin.show();
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  const uuid = Storage.getItem('uuid');
 | 
					 | 
				
			||||||
  config.headers['uuid'] = uuid;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  // 获取访问Token
 | 
					 | 
				
			||||||
  let accessToken = Storage.getItem('accessToken');
 | 
					 | 
				
			||||||
  if (accessToken && config.needToken) {
 | 
					 | 
				
			||||||
    config.headers['accessToken'] = accessToken;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  return config;
 | 
					 | 
				
			||||||
}, error => {
 | 
					 | 
				
			||||||
  Promise.reject(error);
 | 
					 | 
				
			||||||
});
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
// respone拦截器
 | 
					// respone拦截器
 | 
				
			||||||
service.interceptors.response.use(
 | 
					service.interceptors.response.use(
 | 
				
			||||||
  async response => {
 | 
					  async response => {
 | 
				
			||||||
    await closeLoading(response);
 | 
					    await closeLoading(response);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return response.data;
 | 
					    return response.data;
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  async error => {
 | 
					  async error => {
 | 
				
			||||||
@ -84,45 +140,15 @@ service.interceptors.response.use(
 | 
				
			|||||||
      isRefreshToken++;
 | 
					      isRefreshToken++;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      if (isRefreshToken === 1) {
 | 
					      if (isRefreshToken === 1) {
 | 
				
			||||||
        const getTokenRes = await refreshToken();
 | 
					        refresh()
 | 
				
			||||||
        if (getTokenRes === 'success') { // 刷新token
 | 
					        isRefreshToken = 0;
 | 
				
			||||||
          if (isRefreshToken === 1) {
 | 
					 | 
				
			||||||
            error.response.config.headers.accessToken = Storage.getItem('accessToken')
 | 
					 | 
				
			||||||
            return service(error.response.config)
 | 
					 | 
				
			||||||
          } else {
 | 
					 | 
				
			||||||
            router.go(0)
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
          Storage.removeItem('accessToken');
 | 
					 | 
				
			||||||
          Storage.removeItem('refreshToken');
 | 
					 | 
				
			||||||
          Storage.removeItem('userInfo');
 | 
					 | 
				
			||||||
          Storage.setItem('cartNum', 0)
 | 
					 | 
				
			||||||
          store.commit('SET_CARTNUM', 0)
 | 
					 | 
				
			||||||
          console.log('1111');
 | 
					 | 
				
			||||||
          Modal.confirm({
 | 
					 | 
				
			||||||
            title: '请登录',
 | 
					 | 
				
			||||||
            content: '<p>请登录后执行此操作</p>',
 | 
					 | 
				
			||||||
            okText: '立即登录',
 | 
					 | 
				
			||||||
            cancelText: '继续浏览',
 | 
					 | 
				
			||||||
            onOk: () => {
 | 
					 | 
				
			||||||
              router.push({
 | 
					 | 
				
			||||||
                path: '/login',
 | 
					 | 
				
			||||||
                query: {
 | 
					 | 
				
			||||||
                  rePath: router.history.current.path,
 | 
					 | 
				
			||||||
                  query: JSON.stringify(router.history.current.query)
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
              });
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            onCancel: () => {
 | 
					 | 
				
			||||||
              Modal.remove();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        isRefreshToken = 0
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      if (error.message) {
 | 
					      if (error.message) {
 | 
				
			||||||
        let _message = error.code === 'ECONNABORTED' ? '连接超时,请稍候再试!' : '网络错误,请稍后再试!';
 | 
					        let _message =
 | 
				
			||||||
 | 
					          error.code === "ECONNABORTED"
 | 
				
			||||||
 | 
					            ? "连接超时,请稍候再试!"
 | 
				
			||||||
 | 
					            : "网络错误,请稍后再试!";
 | 
				
			||||||
        Message.error(errorData.message || _message);
 | 
					        Message.error(errorData.message || _message);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -134,7 +160,7 @@ service.interceptors.response.use(
 | 
				
			|||||||
 * 关闭全局加载
 | 
					 * 关闭全局加载
 | 
				
			||||||
 * @param target
 | 
					 * @param target
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
const closeLoading = (target) => {
 | 
					const closeLoading = target => {
 | 
				
			||||||
  if (!target.config || !target.config.loading) return true;
 | 
					  if (!target.config || !target.config.loading) return true;
 | 
				
			||||||
  return new Promise((resolve, reject) => {
 | 
					  return new Promise((resolve, reject) => {
 | 
				
			||||||
    setTimeout(() => {
 | 
					    setTimeout(() => {
 | 
				
			||||||
@ -145,13 +171,13 @@ const closeLoading = (target) => {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const Method = {
 | 
					export const Method = {
 | 
				
			||||||
  GET: 'get',
 | 
					  GET: "get",
 | 
				
			||||||
  POST: 'post',
 | 
					  POST: "post",
 | 
				
			||||||
  PUT: 'put',
 | 
					  PUT: "put",
 | 
				
			||||||
  DELETE: 'delete'
 | 
					  DELETE: "delete"
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default function request (options) {
 | 
					export default function request(options) {
 | 
				
			||||||
  // 如果是服务端或者是请求的刷新token,不需要检查token直接请求。
 | 
					  // 如果是服务端或者是请求的刷新token,不需要检查token直接请求。
 | 
				
			||||||
  //   if (process.server || options.url.indexOf('passport/token') !== -1) {
 | 
					  //   if (process.server || options.url.indexOf('passport/token') !== -1) {
 | 
				
			||||||
  return service(options);
 | 
					  return service(options);
 | 
				
			||||||
@ -160,47 +186,46 @@ export default function request (options) {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 防抖闭包来一波
 | 
					// 防抖闭包来一波
 | 
				
			||||||
function getTokenDebounce () {
 | 
					function getTokenDebounce() {
 | 
				
			||||||
  let lock = false
 | 
					  let lock = false;
 | 
				
			||||||
  let success = false
 | 
					  let success = false;
 | 
				
			||||||
  return function () {
 | 
					  return function() {
 | 
				
			||||||
    if (!lock) {
 | 
					    if (!lock) {
 | 
				
			||||||
      lock = true
 | 
					      lock = true;
 | 
				
			||||||
      let oldRefreshToken = Storage.getItem('refreshToken');
 | 
					      let oldRefreshToken = Storage.getItem("refreshToken");
 | 
				
			||||||
      handleRefreshToken(oldRefreshToken).then(res => {
 | 
					      handleRefreshToken(oldRefreshToken)
 | 
				
			||||||
        if (res.success) {
 | 
					        .then(res => {
 | 
				
			||||||
          let {
 | 
					          if (res.success) {
 | 
				
			||||||
            accessToken,
 | 
					            let { accessToken, refreshToken } = res.result;
 | 
				
			||||||
            refreshToken
 | 
					            Storage.setItem("accessToken", accessToken);
 | 
				
			||||||
          } = res.result;
 | 
					            Storage.setItem("refreshToken", refreshToken);
 | 
				
			||||||
          Storage.setItem('accessToken', accessToken);
 | 
					 | 
				
			||||||
          Storage.setItem('refreshToken', refreshToken);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
          success = true
 | 
					            success = true;
 | 
				
			||||||
          lock = false
 | 
					            lock = false;
 | 
				
			||||||
        } else {
 | 
					          } else {
 | 
				
			||||||
          success = false
 | 
					            success = false;
 | 
				
			||||||
          lock = false
 | 
					            lock = false;
 | 
				
			||||||
          // router.push('/login')
 | 
					            // router.push('/login')
 | 
				
			||||||
        }
 | 
					          }
 | 
				
			||||||
      }).catch((err) => {
 | 
					        })
 | 
				
			||||||
        console.log(err);
 | 
					        .catch(err => {
 | 
				
			||||||
        success = false
 | 
					          console.log(err);
 | 
				
			||||||
        lock = false
 | 
					          success = false;
 | 
				
			||||||
      })
 | 
					          lock = false;
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return new Promise(resolve => {
 | 
					    return new Promise(resolve => {
 | 
				
			||||||
      // 一直看lock,直到请求失败或者成功
 | 
					      // 一直看lock,直到请求失败或者成功
 | 
				
			||||||
      const timer = setInterval(() => {
 | 
					      const timer = setInterval(() => {
 | 
				
			||||||
        if (!lock) {
 | 
					        if (!lock) {
 | 
				
			||||||
          clearInterval(timer)
 | 
					          clearInterval(timer);
 | 
				
			||||||
          if (success) {
 | 
					          if (success) {
 | 
				
			||||||
            resolve('success')
 | 
					            resolve("success");
 | 
				
			||||||
          } else {
 | 
					          } else {
 | 
				
			||||||
            resolve('fail')
 | 
					            resolve("fail");
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }, 500) // 轮询时间间隔
 | 
					      }, 500); // 轮询时间间隔
 | 
				
			||||||
    })
 | 
					    });
 | 
				
			||||||
  }
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -47,6 +47,8 @@ const ComplainList = resolve => require(['@/pages/home/memberCenter/ComplainList
 | 
				
			|||||||
const ComplainDetail = resolve => require(['@/pages/home/memberCenter/ComplainDetail'], resolve);
 | 
					const ComplainDetail = resolve => require(['@/pages/home/memberCenter/ComplainDetail'], resolve);
 | 
				
			||||||
const Invoice = resolve => require(['@/pages/home/memberCenter/Invoice'], resolve);
 | 
					const Invoice = resolve => require(['@/pages/home/memberCenter/Invoice'], resolve);
 | 
				
			||||||
const Point = resolve => require(['@/pages/home/memberCenter/Point'], resolve);
 | 
					const Point = resolve => require(['@/pages/home/memberCenter/Point'], resolve);
 | 
				
			||||||
 | 
					const MsgList = resolve => require(['@/pages/home/memberCenter/memberMsg/MsgList'], resolve);
 | 
				
			||||||
 | 
					const MsgDetail = resolve => require(['@/pages/home/memberCenter/memberMsg/MsgDetail'], resolve);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * 会员中心
 | 
					 * 会员中心
 | 
				
			||||||
@ -316,6 +318,18 @@ export default new Router({
 | 
				
			|||||||
      name: 'AddAddress',
 | 
					      name: 'AddAddress',
 | 
				
			||||||
      component: AddAddress
 | 
					      component: AddAddress
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      path: 'MsgList',
 | 
				
			||||||
 | 
					      name: 'MsgList',
 | 
				
			||||||
 | 
					      component: MsgList,
 | 
				
			||||||
 | 
					      meta: {title: '我的消息'}
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      path: 'MsgDetail',
 | 
				
			||||||
 | 
					      name: 'MsgDetail',
 | 
				
			||||||
 | 
					      component: MsgDetail,
 | 
				
			||||||
 | 
					      meta: {title: '我的消息'}
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      path: 'MyOrder',
 | 
					      path: 'MyOrder',
 | 
				
			||||||
      name: 'MyOrder',
 | 
					      name: 'MyOrder',
 | 
				
			||||||
 | 
				
			|||||||
@ -27,7 +27,6 @@
 | 
				
			|||||||
    "print-js": "^1.0.63",
 | 
					    "print-js": "^1.0.63",
 | 
				
			||||||
    "qrcodejs2": "0.0.2",
 | 
					    "qrcodejs2": "0.0.2",
 | 
				
			||||||
    "quill": "^1.3.7",
 | 
					    "quill": "^1.3.7",
 | 
				
			||||||
    "vue-qr": "^2.3.0",
 | 
					 | 
				
			||||||
    "sass-loader": "^8.0.2",
 | 
					    "sass-loader": "^8.0.2",
 | 
				
			||||||
    "sockjs-client": "^1.4.0",
 | 
					    "sockjs-client": "^1.4.0",
 | 
				
			||||||
    "stompjs": "^2.3.3",
 | 
					    "stompjs": "^2.3.3",
 | 
				
			||||||
@ -40,14 +39,17 @@
 | 
				
			|||||||
    "vue-clipboard2": "^0.3.0",
 | 
					    "vue-clipboard2": "^0.3.0",
 | 
				
			||||||
    "vue-cropper": "^0.4.9",
 | 
					    "vue-cropper": "^0.4.9",
 | 
				
			||||||
    "vue-i18n": "^8.15.1",
 | 
					    "vue-i18n": "^8.15.1",
 | 
				
			||||||
 | 
					    "vue-json-excel": "^0.3.0",
 | 
				
			||||||
    "vue-json-pretty": "^1.4.1",
 | 
					    "vue-json-pretty": "^1.4.1",
 | 
				
			||||||
    "vue-lazyload": "^1.3.3",
 | 
					    "vue-lazyload": "^1.3.3",
 | 
				
			||||||
 | 
					    "vue-qr": "^2.3.0",
 | 
				
			||||||
    "vue-router": "^3.1.3",
 | 
					    "vue-router": "^3.1.3",
 | 
				
			||||||
    "vuedraggable": "^2.23.2",
 | 
					    "vuedraggable": "^2.23.2",
 | 
				
			||||||
    "vuex": "^3.4.0",
 | 
					    "vuex": "^3.4.0",
 | 
				
			||||||
    "wangeditor": "^4.5.3",
 | 
					    "wangeditor": "^4.5.3",
 | 
				
			||||||
    "xlsx": "^0.16.2",
 | 
					    "xlsx": "^0.16.2",
 | 
				
			||||||
    "xss": "^1.0.7"
 | 
					    "xss": "^1.0.7",
 | 
				
			||||||
 | 
					    "uuid": "^8.3.2"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "devDependencies": {
 | 
					  "devDependencies": {
 | 
				
			||||||
    "@vue/cli-plugin-babel": "^4.4.4",
 | 
					    "@vue/cli-plugin-babel": "^4.4.4",
 | 
				
			||||||
 | 
				
			|||||||
@ -5,6 +5,7 @@
 | 
				
			|||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
 | 
					import {v4 as uuidv4} from 'uuid';
 | 
				
			||||||
import {getCategoryTree} from '@/api/goods.js'
 | 
					import {getCategoryTree} from '@/api/goods.js'
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  updated() {
 | 
					  updated() {
 | 
				
			||||||
@ -15,7 +16,14 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    let uuid = this.getStore('uuid');
 | 
				
			||||||
 | 
					    if (!uuid) {
 | 
				
			||||||
 | 
					      uuid = uuidv4();
 | 
				
			||||||
 | 
					      this.setStore('uuid', uuid);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
import {commonUrl, getRequest} from '@/libs/axios';
 | 
					import {commonUrl, getRequest, getRequestWithNoToken, postRequestWithNoToken} from '@/libs/axios';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 通过id获取子地区
 | 
					// 通过id获取子地区
 | 
				
			||||||
export const getChildRegion = (id) => {
 | 
					export const getChildRegion = (id) => {
 | 
				
			||||||
@ -6,6 +6,16 @@ export const getChildRegion = (id) => {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 点地图获取地址信息
 | 
					// 点地图获取地址信息
 | 
				
			||||||
export const getRegion = (parpams) => {
 | 
					export const getRegion = (params) => {
 | 
				
			||||||
  return getRequest(`${commonUrl}/common/region/region`, parpams);
 | 
					  return getRequest(`${commonUrl}/common/region/region`, params);
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 获取拼图验证
 | 
				
			||||||
 | 
					export const getVerifyImg = (verificationEnums) => {
 | 
				
			||||||
 | 
					  return getRequestWithNoToken(`${commonUrl}/common/slider/${verificationEnums}`);
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 拼图验证
 | 
				
			||||||
 | 
					export const postVerifyImg = (params) => {
 | 
				
			||||||
 | 
					  return postRequestWithNoToken(`${commonUrl}/common/slider/${params.verificationEnums}`, params);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -1,174 +1,231 @@
 | 
				
			|||||||
// 统一请求路径前缀在libs/axios.js中修改
 | 
					// 统一请求路径前缀在libs/axios.js中修改
 | 
				
			||||||
import { getRequest, postRequest, putRequest, deleteRequest } from '@/libs/axios';
 | 
					import {
 | 
				
			||||||
 | 
					  getRequest,
 | 
				
			||||||
 | 
					  postRequest,
 | 
				
			||||||
 | 
					  putRequest,
 | 
				
			||||||
 | 
					  deleteRequest
 | 
				
			||||||
 | 
					} from "@/libs/axios";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 获取限时抢购申请列表
 | 
					// 获取限时抢购申请列表
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const getPromotionSeckill = (params) => {
 | 
					export const getPromotionSeckill = params => {
 | 
				
			||||||
 | 
					  return getRequest(`/promotion/seckill/apply`, params);
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return getRequest(`/promotion/seckill/apply`, params)
 | 
					// 是否推荐直播间
 | 
				
			||||||
}
 | 
					export const whetherStar = params => {
 | 
				
			||||||
 | 
					  return putRequest(`/broadcast/studio/recommend/${params.id}`,params);
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 添加优惠券活动
 | 
				
			||||||
 | 
					export const addCouponActivity = params => {
 | 
				
			||||||
 | 
					  return postRequest(`/promotion/couponActivity/addCouponActivity`, params);
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 获取店铺直播间列表
 | 
				
			||||||
 | 
					export const getLiveList = params => {
 | 
				
			||||||
 | 
					  return getRequest("/broadcast/studio", params);
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 获取直播间详情
 | 
				
			||||||
 | 
					export const getLiveInfo = studioId => {
 | 
				
			||||||
 | 
					  return getRequest(`/broadcast/studio/studioInfo/${studioId}`);
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 获取当前进行中的促销活动商品
 | 
					// 获取当前进行中的促销活动商品
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const getPromotionGoods = (promotionId,params) => {
 | 
					export const getPromotionGoods = (promotionId, params) => {
 | 
				
			||||||
  return getRequest(`/promotion/${promotionId}/goods`, params)
 | 
					  return getRequest(`/promotion/${promotionId}/goods`, params);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 获取当前进行中的促销活动
 | 
					// 获取当前进行中的促销活动
 | 
				
			||||||
export const getAllPromotion = (params) => {
 | 
					export const getAllPromotion = params => {
 | 
				
			||||||
  return getRequest('/promotion/current', params)
 | 
					  return getRequest("/promotion/current", params);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 获取拼团数据
 | 
					// 获取拼团数据
 | 
				
			||||||
export const getPintuanList = (params) => {
 | 
					export const getPintuanList = params => {
 | 
				
			||||||
    return getRequest('/promotion/pintuan', params)
 | 
					  return getRequest("/promotion/pintuan", params);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 获取拼团详情
 | 
					// 获取拼团详情
 | 
				
			||||||
export const getPintuanDetail = (id) => {
 | 
					export const getPintuanDetail = id => {
 | 
				
			||||||
    return getRequest(`/promotion/pintuan/${id}`)
 | 
					  return getRequest(`/promotion/pintuan/${id}`);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 获取拼团商品数据
 | 
					// 获取拼团商品数据
 | 
				
			||||||
export const getPintuanGoodsList = (params) => {
 | 
					export const getPintuanGoodsList = params => {
 | 
				
			||||||
    return getRequest(`/promotion/pintuan/goods/${params.pintuanId}`,params)
 | 
					  return getRequest(`/promotion/pintuan/goods/${params.pintuanId}`, params);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 关闭拼团活动
 | 
					// 关闭拼团活动
 | 
				
			||||||
export const closePintuan = (pintuanId) => {
 | 
					export const closePintuan = pintuanId => {
 | 
				
			||||||
    return putRequest(`/promotion/pintuan/close/${pintuanId}`)
 | 
					  return putRequest(`/promotion/pintuan/close/${pintuanId}`);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 保存平台优惠券
 | 
					// 保存平台优惠券
 | 
				
			||||||
export const savePlatformCoupon = (params) => {
 | 
					export const savePlatformCoupon = params => {
 | 
				
			||||||
    return postRequest('/promotion/coupon', params,{'Content-type': 'application/json'})
 | 
					  return postRequest("/promotion/coupon", params, {
 | 
				
			||||||
}
 | 
					    "Content-type": "application/json"
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
// 修改平台优惠券
 | 
					// 修改平台优惠券
 | 
				
			||||||
export const editPlatformCoupon = (params) => {
 | 
					export const editPlatformCoupon = params => {
 | 
				
			||||||
    return putRequest('/promotion/coupon', params,{'Content-type': 'application/json'})
 | 
					  return putRequest("/promotion/coupon", params, {
 | 
				
			||||||
}
 | 
					    "Content-type": "application/json"
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 获取平台优惠券
 | 
					// 获取平台优惠券
 | 
				
			||||||
export const getPlatformCouponList = (params) => {
 | 
					export const getPlatformCouponList = params => {
 | 
				
			||||||
    return getRequest('/promotion/coupon', params)
 | 
					  return getRequest("/promotion/coupon", params);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
//  作废优惠券
 | 
					//  作废优惠券
 | 
				
			||||||
export const deletePlatformCoupon = (ids) => {
 | 
					export const deletePlatformCoupon = ids => {
 | 
				
			||||||
    return deleteRequest(`/promotion/coupon/${ids}`)
 | 
					  return deleteRequest(`/promotion/coupon/${ids}`);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
//  更新优惠券状态
 | 
					//  更新优惠券状态
 | 
				
			||||||
export const updatePlatformCouponStatus = ( params) => {
 | 
					export const updatePlatformCouponStatus = params => {
 | 
				
			||||||
    return putRequest(`/promotion/coupon/status`, params)
 | 
					  return putRequest(`/promotion/coupon/status`, params);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
//  获取单个优惠券
 | 
					//  获取单个优惠券
 | 
				
			||||||
export const getPlatformCoupon = (id) => {
 | 
					export const getPlatformCoupon = id => {
 | 
				
			||||||
    return getRequest(`/promotion/coupon/${id}`)
 | 
					  return getRequest(`/promotion/coupon/${id}`);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 获取优惠券领取详情
 | 
					// 获取优惠券领取详情
 | 
				
			||||||
export const getMemberReceiveCouponList = (id) => {
 | 
					export const getMemberReceiveCouponList = id => {
 | 
				
			||||||
    return getRequest(`/promotion/coupon/member/${id}`)
 | 
					  return getRequest(`/promotion/coupon/member/${id}`);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
//  作废会员优惠券
 | 
					//  作废会员优惠券
 | 
				
			||||||
export const deleteMemberReceiveCoupon = (id) => {
 | 
					export const deleteMemberReceiveCoupon = id => {
 | 
				
			||||||
    return putRequest(`/promotion/coupon/member/cancellation/${id}`)
 | 
					  return putRequest(`/promotion/coupon/member/cancellation/${id}`);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 保存平台优惠券
 | 
				
			||||||
 | 
					export const saveActivityCoupon = params => {
 | 
				
			||||||
 | 
					  return postRequest("/promotion/couponActivity", params, {
 | 
				
			||||||
 | 
					    "Content-type": "application/json"
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					// 获取活动优惠券列表
 | 
				
			||||||
 | 
					export const getActivityCouponList = params => {
 | 
				
			||||||
 | 
					  return getRequest("/promotion/couponActivity/activityCoupons", params);
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					// 获取平台优惠券活动
 | 
				
			||||||
 | 
					export const getCouponActivityList = params => {
 | 
				
			||||||
 | 
					  return getRequest("/promotion/couponActivity", params);
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					//  作废优惠券
 | 
				
			||||||
 | 
					export const closeActivity = id => {
 | 
				
			||||||
 | 
					  return deleteRequest(`/promotion/couponActivity/${id}`);
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					//  更新优惠券活动
 | 
				
			||||||
 | 
					export const updateCouponActivity = params => {
 | 
				
			||||||
 | 
					  return putRequest(`/promotion/couponActivity/status`, params);
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					//  获取单个优惠券活动
 | 
				
			||||||
 | 
					export const getCouponActivity = id => {
 | 
				
			||||||
 | 
					  return getRequest(`/promotion/couponActivity/${id}`);
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 获取限时抢购数据
 | 
					// 获取限时抢购数据
 | 
				
			||||||
export const getSeckillList = (params) => {
 | 
					export const getSeckillList = params => {
 | 
				
			||||||
    return getRequest('/promotion/seckill', params)
 | 
					  return getRequest("/promotion/seckill", params);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 获取限时抢购审核列表
 | 
					// 获取限时抢购审核列表
 | 
				
			||||||
export const seckillGoodsList = (params) => {
 | 
					export const seckillGoodsList = params => {
 | 
				
			||||||
    return getRequest('/promotion/seckill/apply', params)
 | 
					  return getRequest("/promotion/seckill/apply", params);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 获取限时抢购详情数据
 | 
					// 获取限时抢购详情数据
 | 
				
			||||||
export const seckillDetail = (id, params) => {
 | 
					export const seckillDetail = (id, params) => {
 | 
				
			||||||
    return getRequest(`/promotion/seckill/${id}`, params)
 | 
					  return getRequest(`/promotion/seckill/${id}`, params);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 删除限时抢购
 | 
					// 删除限时抢购
 | 
				
			||||||
export const delSeckill = (id) => {
 | 
					export const delSeckill = id => {
 | 
				
			||||||
    return deleteRequest(`/promotion/seckill/${id}`)
 | 
					  return deleteRequest(`/promotion/seckill/${id}`);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 保存限时抢购
 | 
					// 保存限时抢购
 | 
				
			||||||
export const saveSeckill = (params) => {
 | 
					export const saveSeckill = params => {
 | 
				
			||||||
    return postRequest('/promotion/seckill', params)
 | 
					  return postRequest("/promotion/seckill", params);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 修改限时抢购
 | 
					// 修改限时抢购
 | 
				
			||||||
export const updateSeckill = (params) => {
 | 
					export const updateSeckill = params => {
 | 
				
			||||||
    return putRequest('/promotion/seckill', params)
 | 
					  return putRequest("/promotion/seckill", params);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 关闭限时抢购
 | 
					// 关闭限时抢购
 | 
				
			||||||
export const closeSeckill = (id) => {
 | 
					export const closeSeckill = id => {
 | 
				
			||||||
    return putRequest(`/promotion/seckill/close/${id}`)
 | 
					  return putRequest(`/promotion/seckill/close/${id}`);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 审核限时抢购
 | 
					// 审核限时抢购
 | 
				
			||||||
export const auditApplySeckill = (params) => {
 | 
					export const auditApplySeckill = params => {
 | 
				
			||||||
    return putRequest(`/promotion/seckill/apply/audit/${params.ids}`, params)
 | 
					  return putRequest(`/promotion/seckill/apply/audit/${params.ids}`, params);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 满优惠列表
 | 
					// 满优惠列表
 | 
				
			||||||
export const getFullDiscountList = (params) => {
 | 
					export const getFullDiscountList = params => {
 | 
				
			||||||
    return getRequest(`/promotion/fullDiscount`,params)
 | 
					  return getRequest(`/promotion/fullDiscount`, params);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
// 满优惠列表
 | 
					// 满优惠列表
 | 
				
			||||||
export const getFullDiscountById = (id) => {
 | 
					export const getFullDiscountById = id => {
 | 
				
			||||||
    return getRequest(`/promotion/fullDiscount/${id}`)
 | 
					  return getRequest(`/promotion/fullDiscount/${id}`);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 积分商品列表
 | 
					// 积分商品列表
 | 
				
			||||||
export const getPointsGoodsList = (params) => {
 | 
					export const getPointsGoodsList = params => {
 | 
				
			||||||
    return getRequest(`/promotion/pointsGoods`,params)
 | 
					  return getRequest(`/promotion/pointsGoods`, params);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
// 积分商品详情
 | 
					// 积分商品详情
 | 
				
			||||||
export const getPointsGoodsById = (id) => {
 | 
					export const getPointsGoodsById = id => {
 | 
				
			||||||
    return getRequest(`/promotion/pointsGoods/${id}`)
 | 
					  return getRequest(`/promotion/pointsGoods/${id}`);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
// 添加积分商品
 | 
					// 添加积分商品
 | 
				
			||||||
export const addPointsGoods = (params) => {
 | 
					export const addPointsGoods = params => {
 | 
				
			||||||
    return postRequest(`/promotion/pointsGoods`,params, {'Content-type': 'application/json'})
 | 
					  return postRequest(`/promotion/pointsGoods`, params, {
 | 
				
			||||||
}
 | 
					    "Content-type": "application/json"
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
// 修改积分商品
 | 
					// 修改积分商品
 | 
				
			||||||
export const updatePointsGoods = (params) => {
 | 
					export const updatePointsGoods = params => {
 | 
				
			||||||
    return putRequest(`/promotion/pointsGoods`,params, {'Content-type': 'application/json'})
 | 
					  return putRequest(`/promotion/pointsGoods`, params, {
 | 
				
			||||||
}
 | 
					    "Content-type": "application/json"
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
// 修改积分商品状态
 | 
					// 修改积分商品状态
 | 
				
			||||||
export const editPointsGoodsStatus = (id, params) => {
 | 
					export const editPointsGoodsStatus = (id, params) => {
 | 
				
			||||||
    return putRequest(`/promotion/pointsGoods/${id}`,params)
 | 
					  return putRequest(`/promotion/pointsGoods/${id}`, params);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
// 删除积分商品
 | 
					// 删除积分商品
 | 
				
			||||||
export const deletePointsGoodsStatus = (id) => {
 | 
					export const deletePointsGoodsStatus = id => {
 | 
				
			||||||
    return deleteRequest(`/promotion/pointsGoods/${id}`)
 | 
					  return deleteRequest(`/promotion/pointsGoods/${id}`);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 积分商品分类列表
 | 
					// 积分商品分类列表
 | 
				
			||||||
export const getPointsGoodsCategoryList = (params) => {
 | 
					export const getPointsGoodsCategoryList = params => {
 | 
				
			||||||
    return getRequest(`/promotion/pointsGoodsCategory`,params)
 | 
					  return getRequest(`/promotion/pointsGoodsCategory`, params);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
// 积分商品分类详情
 | 
					// 积分商品分类详情
 | 
				
			||||||
export const getPointsGoodsCategoryById = (id) => {
 | 
					export const getPointsGoodsCategoryById = id => {
 | 
				
			||||||
    return getRequest(`/promotion/pointsGoodsCategory/${id}`)
 | 
					  return getRequest(`/promotion/pointsGoodsCategory/${id}`);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
// 添加积分商品分类
 | 
					// 添加积分商品分类
 | 
				
			||||||
export const addPointsGoodsCategory = (params) => {
 | 
					export const addPointsGoodsCategory = params => {
 | 
				
			||||||
    return postRequest(`/promotion/pointsGoodsCategory`, params)
 | 
					  return postRequest(`/promotion/pointsGoodsCategory`, params);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
// 更新积分商品分类
 | 
					// 更新积分商品分类
 | 
				
			||||||
export const updatePointsGoodsCategory = (params) => {
 | 
					export const updatePointsGoodsCategory = params => {
 | 
				
			||||||
    return putRequest(`/promotion/pointsGoodsCategory`, params)
 | 
					  return putRequest(`/promotion/pointsGoodsCategory`, params);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
// 删除积分商品分类
 | 
					// 删除积分商品分类
 | 
				
			||||||
export const deletePointsGoodsCategoryById = (id) => {
 | 
					export const deletePointsGoodsCategoryById = id => {
 | 
				
			||||||
    return deleteRequest(`/promotion/pointsGoodsCategory/${id}`)
 | 
					  return deleteRequest(`/promotion/pointsGoodsCategory/${id}`);
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -21,11 +21,10 @@ export default {
 | 
				
			|||||||
    // buyer: "https://buyer-api.pickmall.cn",
 | 
					    // buyer: "https://buyer-api.pickmall.cn",
 | 
				
			||||||
    // seller: "https://store-api.pickmall.cn",
 | 
					    // seller: "https://store-api.pickmall.cn",
 | 
				
			||||||
    // manager: "https://admin-api.pickmall.cn"
 | 
					    // manager: "https://admin-api.pickmall.cn"
 | 
				
			||||||
    common: "http://192.168.0.109:8890",
 | 
					    common: 'http://192.168.0.109:8890',
 | 
				
			||||||
    buyer: "http://192.168.0.109:8888",
 | 
					    buyer: 'http://192.168.0.109:8888',
 | 
				
			||||||
    seller: "http://192.168.0.109:8889",
 | 
					    seller: 'http://192.168.0.109:8889',
 | 
				
			||||||
    manager: "http://192.168.0.109:8887"
 | 
					    manager: 'http://192.168.0.109:8887'
 | 
				
			||||||
 | 
					 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  api_prod: {
 | 
					  api_prod: {
 | 
				
			||||||
    common: "https://common-api.pickmall.cn",
 | 
					    common: "https://common-api.pickmall.cn",
 | 
				
			||||||
 | 
				
			|||||||
@ -24,6 +24,8 @@ service.interceptors.request.use(
 | 
				
			|||||||
        ...config.params
 | 
					        ...config.params
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    const uuid = getStore('uuid');
 | 
				
			||||||
 | 
					    config.headers['uuid'] = uuid;
 | 
				
			||||||
    return config;
 | 
					    return config;
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  err => {
 | 
					  err => {
 | 
				
			||||||
 | 
				
			|||||||
@ -5,7 +5,7 @@ export const loginRouter = {
 | 
				
			|||||||
  path: "/login",
 | 
					  path: "/login",
 | 
				
			||||||
  name: "login",
 | 
					  name: "login",
 | 
				
			||||||
  meta: {
 | 
					  meta: {
 | 
				
			||||||
    title: "登录 - lili "
 | 
					    title: "登录 - lili运营后台"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  component: () => import("@/views/login.vue")
 | 
					  component: () => import("@/views/login.vue")
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@ -243,6 +243,43 @@ export const otherRouter = {
 | 
				
			|||||||
      name: "platform-coupon-info",
 | 
					      name: "platform-coupon-info",
 | 
				
			||||||
      component: () => import("@/views/promotion/coupon/couponInfo.vue")
 | 
					      component: () => import("@/views/promotion/coupon/couponInfo.vue")
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      path: "coupon-activity/add",
 | 
				
			||||||
 | 
					      title: "添加优惠券活动",
 | 
				
			||||||
 | 
					      name: "add-coupon-activity",
 | 
				
			||||||
 | 
					      component: () => import("@/views/promotion/couponActivity/couponPublish.vue")
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      path: "coupon-activity/edit",
 | 
				
			||||||
 | 
					      title: "编辑平台优惠券活动",
 | 
				
			||||||
 | 
					      name: "edit-coupon-activity",
 | 
				
			||||||
 | 
					      component: () => import("@/views/promotion/couponActivity/couponPublish.vue")
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      path: "promotion/coupon-activity-info",
 | 
				
			||||||
 | 
					      title: "券活动详情",
 | 
				
			||||||
 | 
					      name: "coupon-activity-info",
 | 
				
			||||||
 | 
					      component: () => import("@/views/promotion/couponActivity/couponInfo.vue")
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      path: "promotion/member-receive-coupon",
 | 
				
			||||||
 | 
					      title: "领取详情",
 | 
				
			||||||
 | 
					      name: "member-coupon-activity",
 | 
				
			||||||
 | 
					      component: () =>
 | 
				
			||||||
 | 
					        import("@/views/promotion/coupon/memberReceiveCoupon.vue")
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      path: "promotion/platform-coupon-info",
 | 
				
			||||||
 | 
					      title: "详情",
 | 
				
			||||||
 | 
					      name: "platform-coupon-activity",
 | 
				
			||||||
 | 
					      component: () => import("@/views/promotion/coupon/couponInfo.vue")
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      path: "promotion/add-coupon-specify",
 | 
				
			||||||
 | 
					      title: "精准发劵",
 | 
				
			||||||
 | 
					      name: "add-coupon-specify",
 | 
				
			||||||
 | 
					      component: () => import("@/views/promotion/coupon/couponSpecify.vue")
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      path: "promotion/manager-pintuan",
 | 
					      path: "promotion/manager-pintuan",
 | 
				
			||||||
      title: "平台拼团",
 | 
					      title: "平台拼团",
 | 
				
			||||||
@ -296,6 +333,12 @@ export const otherRouter = {
 | 
				
			|||||||
      title: "短信签名",
 | 
					      title: "短信签名",
 | 
				
			||||||
      name: "add-sms-sign",
 | 
					      name: "add-sms-sign",
 | 
				
			||||||
      component: () => import("@/views/sys/message/smsSign.vue")
 | 
					      component: () => import("@/views/sys/message/smsSign.vue")
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      path: "liveDetail",
 | 
				
			||||||
 | 
					      title: "查看直播",
 | 
				
			||||||
 | 
					      name: "liveDetail",
 | 
				
			||||||
 | 
					      component: () => import("@/views/promotion/live/liveDetail.vue")
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  ]
 | 
					  ]
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -18,6 +18,72 @@ export function unitPrice(val, unit, location) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					let timer, flag;
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * 节流原理:在一定时间内,只能触发一次
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @param {Function} func 要执行的回调函数
 | 
				
			||||||
 | 
					 * @param {Number} wait 延时的时间
 | 
				
			||||||
 | 
					 * @param {Boolean} immediate 是否立即执行
 | 
				
			||||||
 | 
					 * @return null
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					 export function throttle(func, wait = 500, immediate = true) {
 | 
				
			||||||
 | 
						if (immediate) {
 | 
				
			||||||
 | 
							if (!flag) {
 | 
				
			||||||
 | 
								flag = true;
 | 
				
			||||||
 | 
								// 如果是立即执行,则在wait毫秒内开始时执行
 | 
				
			||||||
 | 
								typeof func === 'function' && func();
 | 
				
			||||||
 | 
								timer = setTimeout(() => {
 | 
				
			||||||
 | 
									flag = false;
 | 
				
			||||||
 | 
								}, wait);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							if (!flag) {
 | 
				
			||||||
 | 
								flag = true
 | 
				
			||||||
 | 
								// 如果是非立即执行,则在wait毫秒内的结束处执行
 | 
				
			||||||
 | 
								timer = setTimeout(() => {
 | 
				
			||||||
 | 
									flag = false
 | 
				
			||||||
 | 
									typeof func === 'function' && func();
 | 
				
			||||||
 | 
								}, wait);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					let timeout = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @param {Function} func 要执行的回调函数
 | 
				
			||||||
 | 
					 * @param {Number} wait 延时的时间
 | 
				
			||||||
 | 
					 * @param {Boolean} immediate 是否立即执行
 | 
				
			||||||
 | 
					 * @return null
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					 export function debounce(func, wait = 500, immediate = false) {
 | 
				
			||||||
 | 
						// 清除定时器
 | 
				
			||||||
 | 
						if (timeout !== null) clearTimeout(timeout);
 | 
				
			||||||
 | 
						// 立即执行,此类情况一般用不到
 | 
				
			||||||
 | 
						if (immediate) {
 | 
				
			||||||
 | 
							var callNow = !timeout;
 | 
				
			||||||
 | 
							timeout = setTimeout(function() {
 | 
				
			||||||
 | 
								timeout = null;
 | 
				
			||||||
 | 
							}, wait);
 | 
				
			||||||
 | 
							if (callNow) typeof func === 'function' && func();
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							// 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法
 | 
				
			||||||
 | 
							timeout = setTimeout(function() {
 | 
				
			||||||
 | 
								typeof func === 'function' && func();
 | 
				
			||||||
 | 
							}, wait);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * 货币格式化
 | 
					 * 货币格式化
 | 
				
			||||||
 * @param price
 | 
					 * @param price
 | 
				
			||||||
 | 
				
			|||||||
@ -10,67 +10,77 @@
 | 
				
			|||||||
          <span slot="close">关闭</span>
 | 
					          <span slot="close">关闭</span>
 | 
				
			||||||
        </i-switch>
 | 
					        </i-switch>
 | 
				
			||||||
      </FormItem>
 | 
					      </FormItem>
 | 
				
			||||||
 | 
					      <FormItem label="分销关系绑定天数" prop="distributionDay">
 | 
				
			||||||
 | 
					        <InputNumber :min="1" style="width:100px;" v-model="form.distributionDay" @on-change="handleSubmit"></InputNumber>
 | 
				
			||||||
 | 
					      </FormItem>
 | 
				
			||||||
 | 
					      <FormItem label="分销结算天数" prop="cashDay">
 | 
				
			||||||
 | 
					        <InputNumber :min="1" style="width:100px;" v-model="form.cashDay" @on-change="handleSubmit "></InputNumber>
 | 
				
			||||||
 | 
					      </FormItem>
 | 
				
			||||||
    </Form>
 | 
					    </Form>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
 | 
					import { setSetting, getSetting } from "@/api/index";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  import {setSetting, getSetting} from "@/api/index";
 | 
					export default {
 | 
				
			||||||
 | 
					  name: "distributionSetting",
 | 
				
			||||||
  export default {
 | 
					  components: {},
 | 
				
			||||||
    name: "distributionSetting",
 | 
					  data() {
 | 
				
			||||||
    components: {},
 | 
					    return {
 | 
				
			||||||
    data() {
 | 
					      loading: true, // 表单加载状态
 | 
				
			||||||
      return {
 | 
					      form: {
 | 
				
			||||||
        loading: true, // 表单加载状态
 | 
					        // 添加或编辑表单对象初始化数据
 | 
				
			||||||
        form: { // 添加或编辑表单对象初始化数据
 | 
					        isOpen: "",
 | 
				
			||||||
          isOpen: ""
 | 
					        distributionDay: "", //分销关系绑定天数
 | 
				
			||||||
        },
 | 
					        cashDay: "", //分销结算天数
 | 
				
			||||||
        // 表单验证规则
 | 
					 | 
				
			||||||
        formValidate: {},
 | 
					 | 
				
			||||||
        submitLoading: false, // 添加或编辑提交状态
 | 
					 | 
				
			||||||
        selectList: [], // 多选数据
 | 
					 | 
				
			||||||
        selectCount: 0, // 多选计数
 | 
					 | 
				
			||||||
        data: [], // 表单数据
 | 
					 | 
				
			||||||
        total: 0 // 表单数据总数
 | 
					 | 
				
			||||||
      };
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    methods: {
 | 
					 | 
				
			||||||
      init() {
 | 
					 | 
				
			||||||
        this.getDataList();
 | 
					 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      getDataList() {
 | 
					      // 表单验证规则
 | 
				
			||||||
        this.loading = true;
 | 
					      formValidate: {},
 | 
				
			||||||
        // 带多条件搜索参数获取表单数据 请自行修改接口
 | 
					      submitLoading: false, // 添加或编辑提交状态
 | 
				
			||||||
        getSetting("DISTRIBUTION_SETTING").then(res => {
 | 
					      selectList: [], // 多选数据
 | 
				
			||||||
          this.loading = false;
 | 
					      selectCount: 0, // 多选计数
 | 
				
			||||||
          if (res.success) {
 | 
					      data: [], // 表单数据
 | 
				
			||||||
            this.form = res.result;
 | 
					      total: 0, // 表单数据总数
 | 
				
			||||||
          }
 | 
					    };
 | 
				
			||||||
        });
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    init() {
 | 
				
			||||||
 | 
					      this.getDataList();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getDataList() {
 | 
				
			||||||
 | 
					      this.loading = true;
 | 
				
			||||||
 | 
					      // 带多条件搜索参数获取表单数据 请自行修改接口
 | 
				
			||||||
 | 
					      getSetting("DISTRIBUTION_SETTING").then((res) => {
 | 
				
			||||||
        this.loading = false;
 | 
					        this.loading = false;
 | 
				
			||||||
      },
 | 
					        if (res.success) {
 | 
				
			||||||
      handleSubmit() {
 | 
					          this.form = res.result;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        this.$refs.form.validate(valid => {
 | 
					      });
 | 
				
			||||||
          if (valid) {
 | 
					      this.loading = false;
 | 
				
			||||||
            setSetting("DISTRIBUTION_SETTING", this.form).then(res => {
 | 
					 | 
				
			||||||
              if (res.success) {
 | 
					 | 
				
			||||||
                this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
                this.getDataList();
 | 
					 | 
				
			||||||
              }
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    mounted() {
 | 
					    handleSubmit() {
 | 
				
			||||||
      this.init();
 | 
					      this.$refs.form.validate((valid) => {
 | 
				
			||||||
    }
 | 
					        if (valid) {
 | 
				
			||||||
  };
 | 
					          // 防抖处理一下
 | 
				
			||||||
 | 
					          this.$options.filters.debounce(this.submit(), 1500);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    submit() {
 | 
				
			||||||
 | 
					      setSetting("DISTRIBUTION_SETTING", this.form).then((res) => {
 | 
				
			||||||
 | 
					        if (res.success) {
 | 
				
			||||||
 | 
					          this.$Message.success("操作成功");
 | 
				
			||||||
 | 
					          this.getDataList();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.init();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
					 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 | 
				
			|||||||
@ -211,10 +211,8 @@
 | 
				
			|||||||
import { homeStatistics, hotGoods, hotShops, getNoticePage } from "@/api/index";
 | 
					import { homeStatistics, hotGoods, hotShops, getNoticePage } from "@/api/index";
 | 
				
			||||||
import show from "./show.vue";
 | 
					import show from "./show.vue";
 | 
				
			||||||
import * as API_Goods from "@/api/goods";
 | 
					import * as API_Goods from "@/api/goods";
 | 
				
			||||||
 | 
					 | 
				
			||||||
import { Chart } from "@antv/g2";
 | 
					import { Chart } from "@antv/g2";
 | 
				
			||||||
import * as API_Member from "@/api/member";
 | 
					import * as API_Member from "@/api/member";
 | 
				
			||||||
import Cookies from "js-cookie";
 | 
					 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "home",
 | 
					  name: "home",
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
@ -502,11 +500,13 @@ export default {
 | 
				
			|||||||
      let data = this.chartList;
 | 
					      let data = this.chartList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      data.forEach((item) => {
 | 
					      data.forEach((item) => {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        item.title = "历史在线人数";
 | 
					        item.title = "历史在线人数";
 | 
				
			||||||
 | 
					        item.date = item.date.substring(5)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      this.historyMemberChart.data(data);
 | 
					      this.historyMemberChart.data(data);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      console.error(data)
 | 
					 | 
				
			||||||
      this.historyMemberChart.tooltip({
 | 
					      this.historyMemberChart.tooltip({
 | 
				
			||||||
        showCrosshairs: true,
 | 
					        showCrosshairs: true,
 | 
				
			||||||
        shared: true,
 | 
					        shared: true,
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										246
									
								
								manager/src/views/lili-dialog/coupon-dialog.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										246
									
								
								manager/src/views/lili-dialog/coupon-dialog.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,246 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div class="wrapper">
 | 
				
			||||||
 | 
					    <div class="wap-content">
 | 
				
			||||||
 | 
					      <div class="query-wrapper">
 | 
				
			||||||
 | 
					        <div class="query-item">
 | 
				
			||||||
 | 
					          <div>搜索范围</div>
 | 
				
			||||||
 | 
					          <Input placeholder="商品名称" @on-clear="goodsData=[]; goodsParams.goodsName=''; goodsParams.pageNumber = 1; getQueryGoodsList()" @on-enter="()=>{goodsData=[];goodsParams.pageNumber =1; getQueryGoodsList();}" icon="ios-search" clearable
 | 
				
			||||||
 | 
					            style="width: 150px" v-model="goodsParams.goodsName" />
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					        <div class="query-item">
 | 
				
			||||||
 | 
					          <Cascader v-model="category" placeholder="请选择商品分类" style="width: 250px" :data="skuList"></Cascader>
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					        <div class="query-item">
 | 
				
			||||||
 | 
					          <Button type="primary" @click="goodsData=[]; getQueryGoodsList();" icon="ios-search">搜索</Button>
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					      <div style="positon:retavle;">
 | 
				
			||||||
 | 
					        <Scroll class="wap-content-list" :on-reach-bottom="handleReachBottom" :distance-to-edge="[3,3]">
 | 
				
			||||||
 | 
					          <div class="wap-content-item" :class="{ active: item.selected }" @click="checkedGoods(item, index)" v-for="(item, index) in goodsData" :key="index">
 | 
				
			||||||
 | 
					            <div>
 | 
				
			||||||
 | 
					              <img :src="item.thumbnail" alt="" />
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					            <div class="wap-content-desc">
 | 
				
			||||||
 | 
					              <div class="wap-content-desc-title">{{ item.goodsName }}</div>
 | 
				
			||||||
 | 
					              <div class="wap-sku">{{ item.goodsUnit }}</div>
 | 
				
			||||||
 | 
					              <div class="wap-content-desc-bottom">
 | 
				
			||||||
 | 
					                <div>¥{{ item.price | unitPrice }}</div>
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					          <Spin size="large" fix v-if="loading"></Spin>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          <div v-if="empty" class="empty">暂无商品信息</div>
 | 
				
			||||||
 | 
					        </Scroll>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import * as API_Goods from "@/api/goods";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      type: "multiple", //单选或者多选 single  multiple
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      skuList: [], // 商品sku列表
 | 
				
			||||||
 | 
					      total: "",  // 商品总数
 | 
				
			||||||
 | 
					      goodsParams: { // 商品请求参数
 | 
				
			||||||
 | 
					        pageNumber: 1,
 | 
				
			||||||
 | 
					        pageSize: 18,
 | 
				
			||||||
 | 
					        order: "desc",
 | 
				
			||||||
 | 
					        goodsName: "",
 | 
				
			||||||
 | 
					        sn: "",
 | 
				
			||||||
 | 
					        categoryPath: "",
 | 
				
			||||||
 | 
					        marketEnable: "UPPER",
 | 
				
			||||||
 | 
					        isAuth: "PASS",
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      category: [], // 分类
 | 
				
			||||||
 | 
					      goodsData: [], // 商品数据
 | 
				
			||||||
 | 
					      empty: false, // 空数据
 | 
				
			||||||
 | 
					      loading: false, // 加载状态
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    selectedWay: {
 | 
				
			||||||
 | 
					      type: Array,
 | 
				
			||||||
 | 
					      default: new Array()
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
 | 
					    category(val) {
 | 
				
			||||||
 | 
					      this.goodsParams.categoryPath = val[0];
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    selectedWay: {
 | 
				
			||||||
 | 
					      handler() {
 | 
				
			||||||
 | 
					        this.$emit("selected", this.selectedWay);
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      deep: true,
 | 
				
			||||||
 | 
					      immediate: true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    "goodsParams.categoryPath": {
 | 
				
			||||||
 | 
					      handler: function () {
 | 
				
			||||||
 | 
					        this.goodsData = [];
 | 
				
			||||||
 | 
					        (this.goodsParams.pageNumber = 0), this.getQueryGoodsList();
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      deep: true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.init();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    handleReachBottom() {
 | 
				
			||||||
 | 
					      setTimeout(() => {
 | 
				
			||||||
 | 
					        if (
 | 
				
			||||||
 | 
					          this.goodsParams.pageNumber * this.goodsParams.pageSize <=
 | 
				
			||||||
 | 
					          this.total
 | 
				
			||||||
 | 
					        ) {
 | 
				
			||||||
 | 
					          this.goodsParams.pageNumber++;
 | 
				
			||||||
 | 
					          this.getQueryGoodsList();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }, 1500);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getQueryGoodsList() {
 | 
				
			||||||
 | 
					      API_Goods.getGoodsSkuData(this.goodsParams).then((res) => {
 | 
				
			||||||
 | 
					        this.initGoods(res);
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    initGoods(res) {
 | 
				
			||||||
 | 
					      if (res.result.records.length !=0) {
 | 
				
			||||||
 | 
					        res.result.records.forEach((item) => {
 | 
				
			||||||
 | 
					          item.selected = false;
 | 
				
			||||||
 | 
					          item.___type = "goods"; //设置为goods让pc wap知道标识
 | 
				
			||||||
 | 
					          
 | 
				
			||||||
 | 
					          this.selectedWay.forEach(e => {
 | 
				
			||||||
 | 
					            if (e.id === item.id) {
 | 
				
			||||||
 | 
					              item.selected = true 
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        /**
 | 
				
			||||||
 | 
					         * 解决数据请求中,滚动栏会一直上下跳动
 | 
				
			||||||
 | 
					         */
 | 
				
			||||||
 | 
					        this.total = res.result.total;
 | 
				
			||||||
 | 
					        this.goodsData.push(...res.result.records);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        this.empty = true;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // 查询商品
 | 
				
			||||||
 | 
					    init() {
 | 
				
			||||||
 | 
					      API_Goods.getGoodsSkuData(this.goodsParams).then((res) => {
 | 
				
			||||||
 | 
					        // 商品
 | 
				
			||||||
 | 
					        this.initGoods(res);
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					      if (localStorage.getItem('category')) {
 | 
				
			||||||
 | 
					        this.deepGroup(JSON.parse(localStorage.getItem('category')))
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        setTimeout(() => {
 | 
				
			||||||
 | 
					          this.deepGroup(JSON.parse(localStorage.getItem('category')))
 | 
				
			||||||
 | 
					        },3000)
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    deepGroup(val) {
 | 
				
			||||||
 | 
					      val.forEach((item) => {
 | 
				
			||||||
 | 
					        let childWay = []; //第二级
 | 
				
			||||||
 | 
					        // 第二层
 | 
				
			||||||
 | 
					        if (item.children) {
 | 
				
			||||||
 | 
					          item.children.forEach((child) => {
 | 
				
			||||||
 | 
					            // // 第三层
 | 
				
			||||||
 | 
					            if (child.children) {
 | 
				
			||||||
 | 
					              child.children.forEach((grandson, index, arr) => {
 | 
				
			||||||
 | 
					                arr[index] = {
 | 
				
			||||||
 | 
					                  value: grandson.id,
 | 
				
			||||||
 | 
					                  label: grandson.name,
 | 
				
			||||||
 | 
					                  children: "",
 | 
				
			||||||
 | 
					                };
 | 
				
			||||||
 | 
					              });
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            let children = {
 | 
				
			||||||
 | 
					              value: child.id,
 | 
				
			||||||
 | 
					              label: child.name,
 | 
				
			||||||
 | 
					              children: child.children,
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					            childWay.push(children);
 | 
				
			||||||
 | 
					          });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        // 第一层
 | 
				
			||||||
 | 
					        let way = {
 | 
				
			||||||
 | 
					          value: item.id,
 | 
				
			||||||
 | 
					          label: item.name,
 | 
				
			||||||
 | 
					          children: childWay,
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        this.skuList.push(way);
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 点击商品
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    checkedGoods(val, index) {
 | 
				
			||||||
 | 
					      // 如果单选的话
 | 
				
			||||||
 | 
					      if (this.type != "multiple") {
 | 
				
			||||||
 | 
					        this.goodsData.forEach((item) => {
 | 
				
			||||||
 | 
					          item.selected = false;
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        this.selectedWay = [];
 | 
				
			||||||
 | 
					        val.selected = true;
 | 
				
			||||||
 | 
					        this.selectedWay.push(val);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return false;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      if (val.selected == false) {
 | 
				
			||||||
 | 
					        val.selected = true;
 | 
				
			||||||
 | 
					        this.selectedWay.push(val);
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        val.selected = false;
 | 
				
			||||||
 | 
					        for (let i = 0; i<this.selectedWay.length; i++ ) {
 | 
				
			||||||
 | 
					          if (this.selectedWay[i].id===val.id) {
 | 
				
			||||||
 | 
					            this.selectedWay.splice(i,1)
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					<style scoped lang="scss">
 | 
				
			||||||
 | 
					@import "./style.scss";
 | 
				
			||||||
 | 
					.wap-content {
 | 
				
			||||||
 | 
					  width: 100%;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.empty {
 | 
				
			||||||
 | 
					  text-align: center;
 | 
				
			||||||
 | 
					  padding: 8px 0;
 | 
				
			||||||
 | 
					  width: 100%;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.wap-content {
 | 
				
			||||||
 | 
					  flex: 1;
 | 
				
			||||||
 | 
					  padding: 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.wap-content-list {
 | 
				
			||||||
 | 
					  position: relative;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.wap-content-item {
 | 
				
			||||||
 | 
					  width: 210px;
 | 
				
			||||||
 | 
					  margin: 10px 7px;
 | 
				
			||||||
 | 
					  padding: 6px 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// .wap-content-item{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// }
 | 
				
			||||||
 | 
					.active {
 | 
				
			||||||
 | 
					  background: url("../../assets/selected.png") no-repeat;
 | 
				
			||||||
 | 
					  background-position: right;
 | 
				
			||||||
 | 
					  background-size: 10%;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@ -14,10 +14,12 @@
 | 
				
			|||||||
<script>
 | 
					<script>
 | 
				
			||||||
import goodsDialog from "./goods-dialog";
 | 
					import goodsDialog from "./goods-dialog";
 | 
				
			||||||
import linkDialog from "./link-dialog";
 | 
					import linkDialog from "./link-dialog";
 | 
				
			||||||
 | 
					import couponDialog from "./coupon-dialog";
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    goodsDialog,
 | 
					    goodsDialog,
 | 
				
			||||||
    linkDialog,
 | 
					    linkDialog,
 | 
				
			||||||
 | 
					    couponDialog,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,254 +0,0 @@
 | 
				
			|||||||
<template>
 | 
					 | 
				
			||||||
  <div class="floor-list">
 | 
					 | 
				
			||||||
    <div class="list">
 | 
					 | 
				
			||||||
      <div class="template-saved" v-for="item in templateList" :key="item.id">
 | 
					 | 
				
			||||||
        <div class="template-title">
 | 
					 | 
				
			||||||
          <span>{{ item.name }}</span>
 | 
					 | 
				
			||||||
          <span :class="{ 'theme-color': item.pageShow == 'OPEN' }">{{
 | 
					 | 
				
			||||||
            item.pageShow == "OPEN" ? "已发布" : "未发布"
 | 
					 | 
				
			||||||
          }}</span>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
        <div class="template-content">
 | 
					 | 
				
			||||||
          <!-- <img :src="item.img || require(`@/assets/img-error.png`)" alt=""> -->
 | 
					 | 
				
			||||||
          <div class="cover">
 | 
					 | 
				
			||||||
            <Button icon="md-color-palette" @click="decorate(item.id)"
 | 
					 | 
				
			||||||
              >装修</Button
 | 
					 | 
				
			||||||
            >
 | 
					 | 
				
			||||||
            <Button icon="md-pricetags" @click="Template(item)">编辑</Button>
 | 
					 | 
				
			||||||
            <Button
 | 
					 | 
				
			||||||
              icon="md-send"
 | 
					 | 
				
			||||||
              v-if="item.pageShow == 'CLOSE'"
 | 
					 | 
				
			||||||
              @click="releaseTemplate(item.id)"
 | 
					 | 
				
			||||||
              >发布</Button
 | 
					 | 
				
			||||||
            >
 | 
					 | 
				
			||||||
            <Button
 | 
					 | 
				
			||||||
              icon="md-trash"
 | 
					 | 
				
			||||||
              v-if="item.pageShow == 'CLOSE'"
 | 
					 | 
				
			||||||
              @click="delTemplate(item.id)"
 | 
					 | 
				
			||||||
              >删除</Button
 | 
					 | 
				
			||||||
            >
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
      <div class="new-template" @click="createTemp">
 | 
					 | 
				
			||||||
        <Icon type="md-add" />
 | 
					 | 
				
			||||||
        <div>新建模板</div>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
    <Modal
 | 
					 | 
				
			||||||
      v-model="showModal"
 | 
					 | 
				
			||||||
      title="模板设置"
 | 
					 | 
				
			||||||
      draggable
 | 
					 | 
				
			||||||
      width="600"
 | 
					 | 
				
			||||||
      :z-index="100"
 | 
					 | 
				
			||||||
      :loading="loading"
 | 
					 | 
				
			||||||
      mask-closable="false"
 | 
					 | 
				
			||||||
      @on-ok="newTemplate"
 | 
					 | 
				
			||||||
      @on-cancel="showModal = false"
 | 
					 | 
				
			||||||
    >
 | 
					 | 
				
			||||||
      <Form ref="form" :model="formData" :rules="rules" :label-width="80">
 | 
					 | 
				
			||||||
        <FormItem label="模板名称" prop="name">
 | 
					 | 
				
			||||||
          <Input v-model="formData.name" placeholder="请输入模板名称" />
 | 
					 | 
				
			||||||
        </FormItem>
 | 
					 | 
				
			||||||
      </Form>
 | 
					 | 
				
			||||||
    </Modal>
 | 
					 | 
				
			||||||
  </div>
 | 
					 | 
				
			||||||
</template>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<script>
 | 
					 | 
				
			||||||
import * as API_floor from "@/api/other.js";
 | 
					 | 
				
			||||||
export default {
 | 
					 | 
				
			||||||
  name: "floorList",
 | 
					 | 
				
			||||||
  data() {
 | 
					 | 
				
			||||||
    return {
 | 
					 | 
				
			||||||
      showModal: false,
 | 
					 | 
				
			||||||
      templateList: [],
 | 
					 | 
				
			||||||
      formData: {
 | 
					 | 
				
			||||||
        status: false,
 | 
					 | 
				
			||||||
        name: "",
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      rules: {
 | 
					 | 
				
			||||||
        name: [{ required: true, message: "请输入模板名称", trigger: "blur" }],
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      loading: true,
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  mounted() {
 | 
					 | 
				
			||||||
    let height = window.innerHeight - 150;
 | 
					 | 
				
			||||||
    document.querySelector(".floor-list").style.height = height + "px";
 | 
					 | 
				
			||||||
    this.getTemplateList();
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  methods: {
 | 
					 | 
				
			||||||
    newTemplate() {
 | 
					 | 
				
			||||||
      // 添加,编辑模板
 | 
					 | 
				
			||||||
      this.$refs.form.validate((valid) => {
 | 
					 | 
				
			||||||
        if (valid) {
 | 
					 | 
				
			||||||
          const data = this.formData;
 | 
					 | 
				
			||||||
          data.status ? (data.pageShow = "OPEN") : (data.pageShow = "CLOSE");
 | 
					 | 
				
			||||||
          delete data.status;
 | 
					 | 
				
			||||||
          (data.pageType = "INDEX"), (data.pageClientType = "PC");
 | 
					 | 
				
			||||||
          if (data.id) {
 | 
					 | 
				
			||||||
            API_floor.updateHome(data.id, data).then((res) => {
 | 
					 | 
				
			||||||
              this.$Message.success("编辑模板成功");
 | 
					 | 
				
			||||||
              this.showModal = false;
 | 
					 | 
				
			||||||
              this.getTemplateList();
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
          } else {
 | 
					 | 
				
			||||||
            API_floor.setHomeSetup(data).then((res) => {
 | 
					 | 
				
			||||||
              this.$Message.success("新建模板成功");
 | 
					 | 
				
			||||||
              this.showModal = false;
 | 
					 | 
				
			||||||
              this.getTemplateList();
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
          this.loading = false;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    createTemp() {
 | 
					 | 
				
			||||||
      // 新建表单
 | 
					 | 
				
			||||||
      this.$refs.form.resetFields();
 | 
					 | 
				
			||||||
      this.showModal = true;
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Template(item) {
 | 
					 | 
				
			||||||
      // 编辑表单
 | 
					 | 
				
			||||||
      item.pageShow == "OPEN" ? (item.status = true) : (item.status = false);
 | 
					 | 
				
			||||||
      this.formData = item;
 | 
					 | 
				
			||||||
      this.showModal = true;
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    decorate(id) {
 | 
					 | 
				
			||||||
      // 装修
 | 
					 | 
				
			||||||
      this.$router.push({ name: "renovation", query: { id: id } });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    getTemplateList() {
 | 
					 | 
				
			||||||
      //模板列表
 | 
					 | 
				
			||||||
      let params = {
 | 
					 | 
				
			||||||
        pageNumber: 1,
 | 
					 | 
				
			||||||
        pageSize: 999,
 | 
					 | 
				
			||||||
        pageType: "INDEX",
 | 
					 | 
				
			||||||
        pageClientType: "PC",
 | 
					 | 
				
			||||||
      };
 | 
					 | 
				
			||||||
      API_floor.getHomeList(params).then((res) => {
 | 
					 | 
				
			||||||
        if (res.success) {
 | 
					 | 
				
			||||||
          this.templateList = res.result.records;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    releaseTemplate(id) {
 | 
					 | 
				
			||||||
      //发布模板
 | 
					 | 
				
			||||||
      API_floor.releasePageHome(id).then((res) => {
 | 
					 | 
				
			||||||
        if (res.success) {
 | 
					 | 
				
			||||||
          this.$Message.success("发布模板成功");
 | 
					 | 
				
			||||||
          this.getTemplateList();
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    delTemplate(id) {
 | 
					 | 
				
			||||||
      this.$Modal.confirm({
 | 
					 | 
				
			||||||
        title: "提示",
 | 
					 | 
				
			||||||
        content: "<p>确定删除该模板吗?</p>",
 | 
					 | 
				
			||||||
        onOk: () => {
 | 
					 | 
				
			||||||
          API_floor.removePageHome(id).then((res) => {
 | 
					 | 
				
			||||||
            if (res.success) {
 | 
					 | 
				
			||||||
              this.$Message.success("删除模板成功");
 | 
					 | 
				
			||||||
              this.getTemplateList();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        onCancel: () => {},
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  computed: {},
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<style lang="scss" scoped>
 | 
					 | 
				
			||||||
.floor-list {
 | 
					 | 
				
			||||||
  background-color: #fff;
 | 
					 | 
				
			||||||
  width: 100%;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.list {
 | 
					 | 
				
			||||||
  width: 100%;
 | 
					 | 
				
			||||||
  height: 100%;
 | 
					 | 
				
			||||||
  padding: 10px;
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  flex-wrap: wrap;
 | 
					 | 
				
			||||||
  > div {
 | 
					 | 
				
			||||||
    width: 260px;
 | 
					 | 
				
			||||||
    height: 450px;
 | 
					 | 
				
			||||||
    margin: 10px 15px;
 | 
					 | 
				
			||||||
    border: 1px solid #eee;
 | 
					 | 
				
			||||||
    border-radius: 5px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .new-template {
 | 
					 | 
				
			||||||
    cursor: pointer;
 | 
					 | 
				
			||||||
    display: flex;
 | 
					 | 
				
			||||||
    align-items: center;
 | 
					 | 
				
			||||||
    flex-direction: column;
 | 
					 | 
				
			||||||
    justify-content: center;
 | 
					 | 
				
			||||||
    border: 2px dashed $theme_color;
 | 
					 | 
				
			||||||
    color: $theme_color;
 | 
					 | 
				
			||||||
    background: #f88c7138;
 | 
					 | 
				
			||||||
    .ivu-icon {
 | 
					 | 
				
			||||||
      font-size: 30px;
 | 
					 | 
				
			||||||
      margin-bottom: 10px;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .template-saved {
 | 
					 | 
				
			||||||
    overflow: hidden;
 | 
					 | 
				
			||||||
    .template-title {
 | 
					 | 
				
			||||||
      padding: 10px;
 | 
					 | 
				
			||||||
      background: #eee;
 | 
					 | 
				
			||||||
      display: flex;
 | 
					 | 
				
			||||||
      justify-content: space-between;
 | 
					 | 
				
			||||||
      .theme-color {
 | 
					 | 
				
			||||||
        color: $theme_color;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .template-content {
 | 
					 | 
				
			||||||
    height: 407px;
 | 
					 | 
				
			||||||
    width: 100%;
 | 
					 | 
				
			||||||
    position: relative;
 | 
					 | 
				
			||||||
    background: #ddd;
 | 
					 | 
				
			||||||
    &:hover {
 | 
					 | 
				
			||||||
      .cover {
 | 
					 | 
				
			||||||
        visibility: visible;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    img {
 | 
					 | 
				
			||||||
      width: 100%;
 | 
					 | 
				
			||||||
      height: 100%;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    .cover {
 | 
					 | 
				
			||||||
      visibility: hidden;
 | 
					 | 
				
			||||||
      width: 100%;
 | 
					 | 
				
			||||||
      height: 407px;
 | 
					 | 
				
			||||||
      background: rgba(0, 0, 0, 0.3);
 | 
					 | 
				
			||||||
      position: absolute;
 | 
					 | 
				
			||||||
      top: 0;
 | 
					 | 
				
			||||||
      left: 0;
 | 
					 | 
				
			||||||
      display: flex;
 | 
					 | 
				
			||||||
      flex-direction: column;
 | 
					 | 
				
			||||||
      justify-content: center;
 | 
					 | 
				
			||||||
      align-items: center;
 | 
					 | 
				
			||||||
      .ivu-btn {
 | 
					 | 
				
			||||||
        margin-bottom: 10px;
 | 
					 | 
				
			||||||
        background: transparent;
 | 
					 | 
				
			||||||
        color: #fff;
 | 
					 | 
				
			||||||
        border-color: #fff;
 | 
					 | 
				
			||||||
        &:hover {
 | 
					 | 
				
			||||||
          background-color: $theme_color;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
</style>
 | 
					 | 
				
			||||||
@ -79,11 +79,11 @@
 | 
				
			|||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import { btnWay } from "./btn.js";
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      btnWay, // 按钮类型
 | 
					
 | 
				
			||||||
      type: "full", // 是否全屏
 | 
					      type: "full", // 是否全屏
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      //全屏广告
 | 
					      //全屏广告
 | 
				
			||||||
@ -100,7 +100,7 @@ export default {
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {},
 | 
					  methods: {},
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    console.log(this.btnWay);
 | 
					
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -109,12 +109,7 @@ export default {
 | 
				
			|||||||
      this.$refs.liliDialog.open('link')
 | 
					      this.$refs.liliDialog.open('link')
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // 关闭
 | 
					
 | 
				
			||||||
    closeDecorate(index) {
 | 
					 | 
				
			||||||
      this.$nextTick(() => {
 | 
					 | 
				
			||||||
        this.btnWay.splice(index, 1);
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    //点击图片解析成base64
 | 
					    //点击图片解析成base64
 | 
				
			||||||
    changeFile(item, index) {
 | 
					    changeFile(item, index) {
 | 
				
			||||||
      const file = document.getElementById("files" + index).files[0];
 | 
					      const file = document.getElementById("files" + index).files[0];
 | 
				
			||||||
 | 
				
			|||||||
@ -76,7 +76,7 @@
 | 
				
			|||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import { btnWay } from "./btn.js";
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
@ -95,7 +95,7 @@ export default {
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {},
 | 
					  methods: {},
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    console.log(this.btnWay);
 | 
					
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    // 点击链接
 | 
					    // 点击链接
 | 
				
			||||||
@ -103,12 +103,7 @@ export default {
 | 
				
			|||||||
      this.$refs.liliDialog.open('link')
 | 
					      this.$refs.liliDialog.open('link')
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // 关闭
 | 
					
 | 
				
			||||||
    closeDecorate(index) {
 | 
					 | 
				
			||||||
      this.$nextTick(() => {
 | 
					 | 
				
			||||||
        this.btnWay.splice(index, 1);
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    //点击图片解析成base64
 | 
					    //点击图片解析成base64
 | 
				
			||||||
    changeFile(item, index) {
 | 
					    changeFile(item, index) {
 | 
				
			||||||
      const file = document.getElementById("files" + index).files[0];
 | 
					      const file = document.getElementById("files" + index).files[0];
 | 
				
			||||||
 | 
				
			|||||||
@ -1,21 +0,0 @@
 | 
				
			|||||||
/**
 | 
					 | 
				
			||||||
 * btnWay 设置悬浮按钮功能
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export const btnWay = [
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    img: require('@/assets/icon.png'),
 | 
					 | 
				
			||||||
    title: "",
 | 
					 | 
				
			||||||
    size:"80*80"
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    img: require('@/assets/icon.png'),
 | 
					 | 
				
			||||||
    title: "",
 | 
					 | 
				
			||||||
    size:"80*80"
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    img: require('@/assets/icon.png'),
 | 
					 | 
				
			||||||
    title: "",
 | 
					 | 
				
			||||||
    size:"80*80"
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
];
 | 
					 | 
				
			||||||
@ -1,147 +0,0 @@
 | 
				
			|||||||
<template>
 | 
					 | 
				
			||||||
  <div class="model-view">
 | 
					 | 
				
			||||||
    <div class="model-view-content">
 | 
					 | 
				
			||||||
      <div class="content">
 | 
					 | 
				
			||||||
        <div class="wap-title">首页</div>
 | 
					 | 
				
			||||||
        <div class="draggable">
 | 
					 | 
				
			||||||
          <div class="position">
 | 
					 | 
				
			||||||
            <div class="btn-item">
 | 
					 | 
				
			||||||
              <img
 | 
					 | 
				
			||||||
                src="https://shopro-1253949872.file.myqcloud.com/uploads/20200704/f6b9c9d20d21df541ac52e9548486e1a.png"
 | 
					 | 
				
			||||||
                alt=""
 | 
					 | 
				
			||||||
              />
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
            <div class="btn-item" v-for="(item, index) in btnWay" :key="index">
 | 
					 | 
				
			||||||
              <img :src="item.img" alt="" />
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
    <div class="model-config">
 | 
					 | 
				
			||||||
      <div class="decorate">
 | 
					 | 
				
			||||||
        <div class="decorate-title">悬浮按钮</div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        <div class="decorate-list">
 | 
					 | 
				
			||||||
          <div
 | 
					 | 
				
			||||||
            class="decorate-item"
 | 
					 | 
				
			||||||
            v-for="(item, index) in btnWay"
 | 
					 | 
				
			||||||
            :key="index"
 | 
					 | 
				
			||||||
          >
 | 
					 | 
				
			||||||
            <div class="decorate-item-title">
 | 
					 | 
				
			||||||
              <div>图标{{ index + 1 }}</div>
 | 
					 | 
				
			||||||
              <Icon
 | 
					 | 
				
			||||||
                @click="closeDecorate(index)"
 | 
					 | 
				
			||||||
                size="20"
 | 
					 | 
				
			||||||
                color="#e1251b"
 | 
					 | 
				
			||||||
                type="md-close-circle"
 | 
					 | 
				
			||||||
              />
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
            <div class="decorate-item-box">
 | 
					 | 
				
			||||||
              <!-- 选择照片 -->
 | 
					 | 
				
			||||||
              <div class="decorate-view">
 | 
					 | 
				
			||||||
                <div class="decorate-view-title">选择图标</div>
 | 
					 | 
				
			||||||
                <div>
 | 
					 | 
				
			||||||
                  <img class="show-image" :src="item.img" alt />
 | 
					 | 
				
			||||||
                  <input
 | 
					 | 
				
			||||||
                    type="file"
 | 
					 | 
				
			||||||
                    class="hidden-input"
 | 
					 | 
				
			||||||
                    @change="changeFile(item, index)"
 | 
					 | 
				
			||||||
                    ref="files"
 | 
					 | 
				
			||||||
                    :id="'files' + index"
 | 
					 | 
				
			||||||
                  />
 | 
					 | 
				
			||||||
                  <div class="tips">
 | 
					 | 
				
			||||||
                    建议尺寸
 | 
					 | 
				
			||||||
                    <span>{{ item.size }}</span>
 | 
					 | 
				
			||||||
                  </div>
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
                <div class="selectBtn">
 | 
					 | 
				
			||||||
                  <Button
 | 
					 | 
				
			||||||
                    size="small"
 | 
					 | 
				
			||||||
                    @click="handleClickFile(item, index)"
 | 
					 | 
				
			||||||
                    ghost
 | 
					 | 
				
			||||||
                    type="primary"
 | 
					 | 
				
			||||||
                    >选择照片</Button
 | 
					 | 
				
			||||||
                  >
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
              </div>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        <Button type="primary" @click="addDecorate()" ghost>添加</Button>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
  </div>
 | 
					 | 
				
			||||||
</template>
 | 
					 | 
				
			||||||
<script>
 | 
					 | 
				
			||||||
import { btnWay } from "./btn.js";
 | 
					 | 
				
			||||||
export default {
 | 
					 | 
				
			||||||
  data() {
 | 
					 | 
				
			||||||
    return {
 | 
					 | 
				
			||||||
      btnWay, // 按钮类型
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  methods: {},
 | 
					 | 
				
			||||||
  mounted() {
 | 
					 | 
				
			||||||
    console.log(this.btnWay);
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  methods: {
 | 
					 | 
				
			||||||
    //添加设置
 | 
					 | 
				
			||||||
    addDecorate() {
 | 
					 | 
				
			||||||
      let way = {
 | 
					 | 
				
			||||||
        img: "https://picsum.photos/id/264/200/200",
 | 
					 | 
				
			||||||
        title: "标题",
 | 
					 | 
				
			||||||
        size: this.btnWay[0].size,
 | 
					 | 
				
			||||||
      };
 | 
					 | 
				
			||||||
      this.btnWay.push(way);
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // 关闭
 | 
					 | 
				
			||||||
    closeDecorate(index) {
 | 
					 | 
				
			||||||
      this.$nextTick(() => {
 | 
					 | 
				
			||||||
        this.btnWay.splice(index, 1);
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    //点击图片解析成base64
 | 
					 | 
				
			||||||
    changeFile(item, index) {
 | 
					 | 
				
			||||||
      const file = document.getElementById("files" + index).files[0];
 | 
					 | 
				
			||||||
      if (file == void 0) return false;
 | 
					 | 
				
			||||||
      const reader = new FileReader();
 | 
					 | 
				
			||||||
      reader.readAsDataURL(file);
 | 
					 | 
				
			||||||
      this.$nextTick((res) => {
 | 
					 | 
				
			||||||
        reader.onload = (e) => {
 | 
					 | 
				
			||||||
          item.img = e.target.result;
 | 
					 | 
				
			||||||
        };
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 点击选择照片
 | 
					 | 
				
			||||||
    handleClickFile(item, index) {
 | 
					 | 
				
			||||||
      document.getElementById("files" + index).click();
 | 
					 | 
				
			||||||
      // console.log(let files = files)
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
<style scoped lang="scss">
 | 
					 | 
				
			||||||
@import "./style.scss";
 | 
					 | 
				
			||||||
@import "./decorate.scss";
 | 
					 | 
				
			||||||
.draggable {
 | 
					 | 
				
			||||||
  position: relative;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.position {
 | 
					 | 
				
			||||||
  position: absolute;
 | 
					 | 
				
			||||||
  right: 30px;
 | 
					 | 
				
			||||||
  bottom: 50px;
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  flex-direction: column-reverse;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.btn-item {
 | 
					 | 
				
			||||||
  > img {
 | 
					 | 
				
			||||||
    margin: 4px 0;
 | 
					 | 
				
			||||||
    border-radius: 50%;
 | 
					 | 
				
			||||||
    width: 30px;
 | 
					 | 
				
			||||||
    height: 30px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
</style>
 | 
					 | 
				
			||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
import index from './index.vue' //首页
 | 
					import index from './index.vue' //首页
 | 
				
			||||||
import btn from './btn.vue' //按钮
 | 
					
 | 
				
			||||||
import advertising from './advertising.vue' //全屏活动
 | 
					import advertising from './advertising.vue' //全屏活动
 | 
				
			||||||
import alertAdvertising from './alertAdvertising.vue' //弹窗活动
 | 
					import alertAdvertising from './alertAdvertising.vue' //弹窗活动
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -7,7 +7,7 @@ import alertAdvertising from './alertAdvertising.vue' //弹窗活动
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
const templates = {
 | 
					const templates = {
 | 
				
			||||||
	index,
 | 
						index,
 | 
				
			||||||
	btn,
 | 
					
 | 
				
			||||||
	advertising,
 | 
						advertising,
 | 
				
			||||||
	alertAdvertising
 | 
						alertAdvertising
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -3,35 +3,22 @@
 | 
				
			|||||||
  <div class="model-title">
 | 
					  <div class="model-title">
 | 
				
			||||||
    <div>店铺装修</div>
 | 
					    <div>店铺装修</div>
 | 
				
			||||||
    <div class="btns">
 | 
					    <div class="btns">
 | 
				
			||||||
      <Button
 | 
					      <Button @click="clickBtn(item)" size="small" v-for="(item, index) in way" :key="index" :type="item.selected ? 'primary' : ''">
 | 
				
			||||||
        @click="clickBtn(item)"
 | 
					 | 
				
			||||||
        size="small"
 | 
					 | 
				
			||||||
        v-for="(item, index) in way"
 | 
					 | 
				
			||||||
        :key="index"
 | 
					 | 
				
			||||||
        :type="item.selected ? 'primary' : ''"
 | 
					 | 
				
			||||||
      >
 | 
					 | 
				
			||||||
        {{ item.title }}
 | 
					        {{ item.title }}
 | 
				
			||||||
      </Button>
 | 
					      </Button>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div class="model-title-view-btn">
 | 
					    <div class="model-title-view-btn">
 | 
				
			||||||
      <Poptip placement="bottom" width="100">
 | 
					      <!-- TODO 后期会补全 目前版本暂无 -->
 | 
				
			||||||
 | 
					      <!-- <Poptip placement="bottom" width="100">
 | 
				
			||||||
        <Button size="default" @click="creatQrCode">预览模板</Button>
 | 
					        <Button size="default" @click="creatQrCode">预览模板</Button>
 | 
				
			||||||
        <div slot="content" class="default-view-content">
 | 
					        <div slot="content" class="default-view-content">
 | 
				
			||||||
          <div>临时预览</div>
 | 
					          <div>临时预览</div>
 | 
				
			||||||
          <div ref="qrCodeUrl"></div>
 | 
					          <div ref="qrCodeUrl"></div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </Poptip>
 | 
					      </Poptip> -->
 | 
				
			||||||
      <Button size="default" type="primary" @click="handleSpinShow"
 | 
					      <Button size="default" type="primary" @click="handleSpinShow">保存模板</Button>
 | 
				
			||||||
        >保存模板</Button
 | 
					 | 
				
			||||||
      >
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <Modal
 | 
					      <Modal title="保存中" v-model="saveDialog" :closable="true" :mask-closable="false" :footer-hide="true">
 | 
				
			||||||
        title="保存中"
 | 
					 | 
				
			||||||
        v-model="saveDialog"
 | 
					 | 
				
			||||||
        :closable="true"
 | 
					 | 
				
			||||||
        :mask-closable="false"
 | 
					 | 
				
			||||||
        :footer-hide="true"
 | 
					 | 
				
			||||||
      >
 | 
					 | 
				
			||||||
        <div v-if="progress">
 | 
					        <div v-if="progress">
 | 
				
			||||||
          <div class="model-item">
 | 
					          <div class="model-item">
 | 
				
			||||||
            模板名称 <Input style="width: 200px" v-model="submitWay.name" />
 | 
					            模板名称 <Input style="width: 200px" v-model="submitWay.name" />
 | 
				
			||||||
@ -61,17 +48,14 @@ export default {
 | 
				
			|||||||
      progress: true, // 展示进度
 | 
					      progress: true, // 展示进度
 | 
				
			||||||
      num: 20, // 提交进度
 | 
					      num: 20, // 提交进度
 | 
				
			||||||
      saveDialog: false, // 加载状态
 | 
					      saveDialog: false, // 加载状态
 | 
				
			||||||
      way: [ // 装修tab栏切换
 | 
					      way: [
 | 
				
			||||||
 | 
					        // 装修tab栏切换
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          title: "首页",
 | 
					          title: "首页",
 | 
				
			||||||
          name: "index",
 | 
					          name: "index",
 | 
				
			||||||
          selected: true,
 | 
					          selected: true,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					
 | 
				
			||||||
          title: "悬浮按钮",
 | 
					 | 
				
			||||||
          name: "btn",
 | 
					 | 
				
			||||||
          selected: false,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          title: "全屏广告",
 | 
					          title: "全屏广告",
 | 
				
			||||||
          name: "advertising",
 | 
					          name: "advertising",
 | 
				
			||||||
@ -84,7 +68,8 @@ export default {
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      qrcode: "", // 二维码
 | 
					      qrcode: "", // 二维码
 | 
				
			||||||
      submitWay: { // 表单信息
 | 
					      submitWay: {
 | 
				
			||||||
 | 
					        // 表单信息
 | 
				
			||||||
        pageShow: this.$route.query.type || false,
 | 
					        pageShow: this.$route.query.type || false,
 | 
				
			||||||
        name: this.$route.query.name || "模板名称",
 | 
					        name: this.$route.query.name || "模板名称",
 | 
				
			||||||
        pageClientType: "H5",
 | 
					        pageClientType: "H5",
 | 
				
			||||||
@ -128,11 +113,13 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // 更新
 | 
					    // 更新
 | 
				
			||||||
    update() {
 | 
					    update() {
 | 
				
			||||||
         this.progress = false;
 | 
					      this.progress = false;
 | 
				
			||||||
      API_Other.updateHome(this.$route.query.id, {
 | 
					      API_Other.updateHome(this.$route.query.id, {
 | 
				
			||||||
        pageData: JSON.stringify(this.$store.state.styleStore),
 | 
					        pageData: JSON.stringify(this.$store.state.styleStore),
 | 
				
			||||||
        name: this.submitWay.name,
 | 
					        name: this.submitWay.name,
 | 
				
			||||||
        pageShow: this.submitWay.pageShow,
 | 
					        pageShow: this.submitWay.pageShow,
 | 
				
			||||||
 | 
					        pageType: "INDEX",
 | 
				
			||||||
 | 
					        pageClientType: "H5",
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
        .then((res) => {
 | 
					        .then((res) => {
 | 
				
			||||||
          this.num = 50;
 | 
					          this.num = 50;
 | 
				
			||||||
@ -175,7 +162,7 @@ export default {
 | 
				
			|||||||
              this.goback();
 | 
					              this.goback();
 | 
				
			||||||
            }, 1000);
 | 
					            }, 1000);
 | 
				
			||||||
          } else {
 | 
					          } else {
 | 
				
			||||||
             this.progress = true;
 | 
					            this.progress = true;
 | 
				
			||||||
            this.saveDialog = false;
 | 
					            this.saveDialog = false;
 | 
				
			||||||
            this.$Message.error("保存失败,请稍后重试");
 | 
					            this.$Message.error("保存失败,请稍后重试");
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
.image-mode {
 | 
					.image-mode {
 | 
				
			||||||
    max-width: 100%;
 | 
					    width: 100%;
 | 
				
			||||||
    height: auto;
 | 
					    height: 100%;
 | 
				
			||||||
    display: block;
 | 
					    display: block;
 | 
				
			||||||
    padding: 1px;
 | 
					    padding: 1px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -1,11 +1,11 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="layout">
 | 
					  <div class="layout">
 | 
				
			||||||
      <img class="image-mode" :src="res.list[0].img" alt="">
 | 
					    <img class="image-mode" :src="res.list[0].img" alt="">
 | 
				
			||||||
      <img class="image-mode" :src="res.list[1].img" alt="">
 | 
					    <img class="image-mode" :src="res.list[1].img" alt="">
 | 
				
			||||||
      <img class="image-mode" :src="res.list[2].img" alt="">
 | 
					    <img class="image-mode" :src="res.list[2].img" alt="">
 | 
				
			||||||
      <img class="image-mode" :src="res.list[3].img" alt="">
 | 
					    <img class="image-mode" :src="res.list[3].img" alt="">
 | 
				
			||||||
      <img class="image-mode" :src="res.list[4].img" alt="">
 | 
					    <img class="image-mode" :src="res.list[4].img" alt="">
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -13,21 +13,18 @@
 | 
				
			|||||||
export default {
 | 
					export default {
 | 
				
			||||||
  title: "五列单行图片模块",
 | 
					  title: "五列单行图片模块",
 | 
				
			||||||
  props: ["res"],
 | 
					  props: ["res"],
 | 
				
			||||||
  mounted() {
 | 
					 | 
				
			||||||
    console.log(this.res);
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
@import "./tpl.scss";
 | 
					@import "./tpl.scss";
 | 
				
			||||||
.layout {
 | 
					.layout {
 | 
				
			||||||
 
 | 
					  background: #e8e8e8;
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  align-items: center;
 | 
					  align-items: center;
 | 
				
			||||||
  justify-content: center;
 | 
					  justify-content: center;
 | 
				
			||||||
  background-size: cover;
 | 
					  background-size: cover;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
img{
 | 
					img {
 | 
				
			||||||
  width: 67px;
 | 
					  width: 67px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
@ -12,20 +12,21 @@
 | 
				
			|||||||
export default {
 | 
					export default {
 | 
				
			||||||
  title: "四列单行图片模块",
 | 
					  title: "四列单行图片模块",
 | 
				
			||||||
  props: ["res"],
 | 
					  props: ["res"],
 | 
				
			||||||
  mounted() {
 | 
					
 | 
				
			||||||
    console.log(this.res);
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
@import "./tpl.scss";
 | 
					@import "./tpl.scss";
 | 
				
			||||||
.layout {
 | 
					.layout {
 | 
				
			||||||
  height: 84px;
 | 
					  // background: #e8e8e8;
 | 
				
			||||||
 | 
					  // height: 84px;
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
 | 
					  padding: 0 8px;
 | 
				
			||||||
  align-items: center;
 | 
					  align-items: center;
 | 
				
			||||||
  justify-content: center;
 | 
					  justify-content: center;
 | 
				
			||||||
  background-size: cover;
 | 
					  background-size: cover;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
img{
 | 
					img{
 | 
				
			||||||
  width: 84px;
 | 
					  width: 84px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -11,14 +11,12 @@
 | 
				
			|||||||
export default {
 | 
					export default {
 | 
				
			||||||
  title: "三列单行图片模块",
 | 
					  title: "三列单行图片模块",
 | 
				
			||||||
  props: ["res"],
 | 
					  props: ["res"],
 | 
				
			||||||
  mounted() {
 | 
					 | 
				
			||||||
    console.log(this.res);
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
@import "./tpl.scss";
 | 
					@import "./tpl.scss";
 | 
				
			||||||
.layout {
 | 
					.layout {
 | 
				
			||||||
 | 
					   background: #e8e8e8;
 | 
				
			||||||
  height: 110px;
 | 
					  height: 110px;
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  align-items: center;
 | 
					  align-items: center;
 | 
				
			||||||
 | 
				
			|||||||
@ -20,7 +20,7 @@ export default {
 | 
				
			|||||||
  title: "左一右二",
 | 
					  title: "左一右二",
 | 
				
			||||||
  props: ["res"],
 | 
					  props: ["res"],
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    console.log(this.res);
 | 
					
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
				
			|||||||
@ -10,7 +10,7 @@
 | 
				
			|||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div class="view-height-150">
 | 
					    <div class="view-height-150">
 | 
				
			||||||
      <img class="image-mode" :src="res.list[2].img" />
 | 
					      <img class="image-mode" style="height:150px;" :src="res.list[2].img" />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
@ -21,18 +21,22 @@ export default {
 | 
				
			|||||||
  props: ["res"],
 | 
					  props: ["res"],
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    console.log(this.res);
 | 
					    console.log(this.res);
 | 
				
			||||||
  }
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
@import "./tpl.scss";
 | 
					@import "./tpl.scss";
 | 
				
			||||||
.layout {
 | 
					.layout {
 | 
				
			||||||
  height: 167px;
 | 
					  height: 150px;
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  align-items: center;
 | 
					  align-items: center;
 | 
				
			||||||
  justify-content: center;
 | 
					  justify-content: center;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  background-size: cover;
 | 
					  background-size: cover;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					.view-height-75 {
 | 
				
			||||||
 | 
					  .image-mode {
 | 
				
			||||||
 | 
					    height: 75px;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
@ -22,6 +22,8 @@
 | 
				
			|||||||
        </Row>
 | 
					        </Row>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
 | 
					      <!-- 拼图验证码 -->
 | 
				
			||||||
 | 
					      <verify ref="verify" class="verify-con" verifyType="LOGIN" @change="verifyChange"></verify>
 | 
				
			||||||
      <div v-if="socialLogining">
 | 
					      <div v-if="socialLogining">
 | 
				
			||||||
        <RectLoading />
 | 
					        <RectLoading />
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
@ -41,6 +43,7 @@ import LangSwitch from "@/views/main-components/lang-switch";
 | 
				
			|||||||
import RectLoading from "@/views/my-components/lili/rect-loading";
 | 
					import RectLoading from "@/views/my-components/lili/rect-loading";
 | 
				
			||||||
import CountDownButton from "@/views/my-components/lili/count-down-button";
 | 
					import CountDownButton from "@/views/my-components/lili/count-down-button";
 | 
				
			||||||
import util from "@/libs/util.js";
 | 
					import util from "@/libs/util.js";
 | 
				
			||||||
 | 
					import verify from "@/views/my-components/verify";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
@ -49,17 +52,20 @@ export default {
 | 
				
			|||||||
    LangSwitch,
 | 
					    LangSwitch,
 | 
				
			||||||
    Header,
 | 
					    Header,
 | 
				
			||||||
    Footer,
 | 
					    Footer,
 | 
				
			||||||
 | 
					    verify,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      loading: false, // 加载状态
 | 
					      loading: false, // 加载状态
 | 
				
			||||||
      form: { // 表单数据
 | 
					      form: {
 | 
				
			||||||
 | 
					        // 表单数据
 | 
				
			||||||
        username: "",
 | 
					        username: "",
 | 
				
			||||||
        password: "",
 | 
					        password: "",
 | 
				
			||||||
        mobile: "",
 | 
					        mobile: "",
 | 
				
			||||||
        code: "",
 | 
					        code: "",
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      rules: { // 验证规则
 | 
					      rules: {
 | 
				
			||||||
 | 
					        // 验证规则
 | 
				
			||||||
        username: [
 | 
					        username: [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            required: true,
 | 
					            required: true,
 | 
				
			||||||
@ -80,6 +86,7 @@ export default {
 | 
				
			|||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    mounted() {},
 | 
					    mounted() {},
 | 
				
			||||||
    afterLogin(res) {
 | 
					    afterLogin(res) {
 | 
				
			||||||
 | 
					      // 登录成功后处理
 | 
				
			||||||
      let accessToken = res.result.accessToken;
 | 
					      let accessToken = res.result.accessToken;
 | 
				
			||||||
      let refreshToken = res.result.refreshToken;
 | 
					      let refreshToken = res.result.refreshToken;
 | 
				
			||||||
      this.setStore("accessToken", accessToken);
 | 
					      this.setStore("accessToken", accessToken);
 | 
				
			||||||
@ -101,22 +108,34 @@ export default {
 | 
				
			|||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    submitLogin() {
 | 
					    submitLogin() {
 | 
				
			||||||
 | 
					      // 登录操作
 | 
				
			||||||
      this.$refs.usernameLoginForm.validate((valid) => {
 | 
					      this.$refs.usernameLoginForm.validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          this.loading = true;
 | 
					          this.$refs.verify.show = true;
 | 
				
			||||||
          login({
 | 
					 | 
				
			||||||
            username: this.form.username,
 | 
					 | 
				
			||||||
            password: this.md5(this.form.password),
 | 
					 | 
				
			||||||
          }).then((res) => {
 | 
					 | 
				
			||||||
            if (res && res.success) {
 | 
					 | 
				
			||||||
              this.afterLogin(res);
 | 
					 | 
				
			||||||
            } else {
 | 
					 | 
				
			||||||
              this.loading = false;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    verifyChange(con) {
 | 
				
			||||||
 | 
					      // 拼图验证码回显
 | 
				
			||||||
 | 
					      if (!con.status) return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      this.loading = true;
 | 
				
			||||||
 | 
					      login({
 | 
				
			||||||
 | 
					        username: this.form.username,
 | 
				
			||||||
 | 
					        password: this.md5(this.form.password),
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					        .then((res) => {
 | 
				
			||||||
 | 
					          if (res && res.success) {
 | 
				
			||||||
 | 
					            this.afterLogin(res);
 | 
				
			||||||
 | 
					          } else {
 | 
				
			||||||
 | 
					            this.loading = false;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					          this.loading = false;
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      this.$refs.verify.show = false;
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
@ -140,7 +159,12 @@ export default {
 | 
				
			|||||||
    position: relative;
 | 
					    position: relative;
 | 
				
			||||||
    zoom: 1;
 | 
					    zoom: 1;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					  .verify-con {
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    top: 90px;
 | 
				
			||||||
 | 
					    z-index: 10;
 | 
				
			||||||
 | 
					    left: 20px;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  .form {
 | 
					  .form {
 | 
				
			||||||
    padding-top: 1vh;
 | 
					    padding-top: 1vh;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -179,5 +203,4 @@ export default {
 | 
				
			|||||||
.flex {
 | 
					.flex {
 | 
				
			||||||
  justify-content: center;
 | 
					  justify-content: center;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 | 
				
			|||||||
@ -2,7 +2,6 @@
 | 
				
			|||||||
  <div>
 | 
					  <div>
 | 
				
			||||||
    <Row class="header">
 | 
					    <Row class="header">
 | 
				
			||||||
      <img src="../../assets/logo.png" class="logo" width="220px">
 | 
					      <img src="../../assets/logo.png" class="logo" width="220px">
 | 
				
			||||||
      <!-- <div class="description">{{ $t('LILISHOP-ADMIN') }}</div> -->
 | 
					 | 
				
			||||||
    </Row>
 | 
					    </Row>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
@ -15,13 +14,13 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
.header {
 | 
					.header {
 | 
				
			||||||
 | 
					 | 
				
			||||||
  margin-bottom: 6vh;
 | 
					  margin-bottom: 6vh;
 | 
				
			||||||
  text-align: center;
 | 
					  text-align: center;
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  justify-content: center !important;
 | 
					  justify-content: center !important;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.logo {
 | 
					.logo {
 | 
				
			||||||
  transform: scale(2);
 | 
					  width: 440px;
 | 
				
			||||||
 | 
					  height: 158px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 | 
				
			|||||||
@ -55,6 +55,7 @@ export default {
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    changeMenu(name) { //二级路由点击
 | 
					    changeMenu(name) { //二级路由点击
 | 
				
			||||||
 | 
					    console.log(name)
 | 
				
			||||||
      this.$router.push({
 | 
					      this.$router.push({
 | 
				
			||||||
        name: name
 | 
					        name: name
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
 | 
				
			|||||||
@ -21,11 +21,11 @@
 | 
				
			|||||||
        <Button @click="addMember" type="primary">添加会员</Button>
 | 
					        <Button @click="addMember" type="primary">添加会员</Button>
 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
 | 
					      <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
 | 
				
			||||||
        </Table>
 | 
					      </Table>
 | 
				
			||||||
      <Row type="flex" justify="end" class="page">
 | 
					      <Row type="flex" justify="end" class="page">
 | 
				
			||||||
        <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
 | 
					        <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
 | 
				
			||||||
          size="small" show-total show-elevator show-sizer></Page>
 | 
					          show-total show-elevator show-sizer></Page>
 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
    </Card>
 | 
					    </Card>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -137,12 +137,14 @@ export default {
 | 
				
			|||||||
      loading: true, // 表单加载状态
 | 
					      loading: true, // 表单加载状态
 | 
				
			||||||
      addFlag: false, // modal显隐控制
 | 
					      addFlag: false, // modal显隐控制
 | 
				
			||||||
      updateRegion: false, // 地区
 | 
					      updateRegion: false, // 地区
 | 
				
			||||||
      addMemberForm: { // 添加用户表单
 | 
					      addMemberForm: {
 | 
				
			||||||
 | 
					        // 添加用户表单
 | 
				
			||||||
        mobile: "",
 | 
					        mobile: "",
 | 
				
			||||||
        username: "",
 | 
					        username: "",
 | 
				
			||||||
        password: "",
 | 
					        password: "",
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      searchForm: { // 请求参数
 | 
					      searchForm: {
 | 
				
			||||||
 | 
					        // 请求参数
 | 
				
			||||||
        pageNumber: 1,
 | 
					        pageNumber: 1,
 | 
				
			||||||
        pageSize: 10,
 | 
					        pageSize: 10,
 | 
				
			||||||
        order: "desc",
 | 
					        order: "desc",
 | 
				
			||||||
@ -152,7 +154,8 @@ export default {
 | 
				
			|||||||
      },
 | 
					      },
 | 
				
			||||||
      picModelFlag: false, // 选择图片
 | 
					      picModelFlag: false, // 选择图片
 | 
				
			||||||
      formValidate: {}, // 表单数据
 | 
					      formValidate: {}, // 表单数据
 | 
				
			||||||
      addRule: { // 验证规则
 | 
					      addRule: {
 | 
				
			||||||
 | 
					        // 验证规则
 | 
				
			||||||
        mobile: [
 | 
					        mobile: [
 | 
				
			||||||
          { required: true, message: "请输入手机号码" },
 | 
					          { required: true, message: "请输入手机号码" },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
@ -229,6 +232,7 @@ export default {
 | 
				
			|||||||
                  {
 | 
					                  {
 | 
				
			||||||
                    props: {
 | 
					                    props: {
 | 
				
			||||||
                      size: "small",
 | 
					                      size: "small",
 | 
				
			||||||
 | 
					                      type: params.row.___selected ? "primary" : "",
 | 
				
			||||||
                    },
 | 
					                    },
 | 
				
			||||||
                    style: {
 | 
					                    style: {
 | 
				
			||||||
                      marginRight: "5px",
 | 
					                      marginRight: "5px",
 | 
				
			||||||
@ -236,11 +240,11 @@ export default {
 | 
				
			|||||||
                    },
 | 
					                    },
 | 
				
			||||||
                    on: {
 | 
					                    on: {
 | 
				
			||||||
                      click: () => {
 | 
					                      click: () => {
 | 
				
			||||||
                        this.callback(params.row);
 | 
					                        this.callback(params.row, params.index);
 | 
				
			||||||
                      },
 | 
					                      },
 | 
				
			||||||
                    },
 | 
					                    },
 | 
				
			||||||
                  },
 | 
					                  },
 | 
				
			||||||
                  "选择"
 | 
					                  params.row.___selected ? "已选择" : "选择"
 | 
				
			||||||
                ),
 | 
					                ),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                h(
 | 
					                h(
 | 
				
			||||||
@ -251,7 +255,8 @@ export default {
 | 
				
			|||||||
                      size: "small",
 | 
					                      size: "small",
 | 
				
			||||||
                    },
 | 
					                    },
 | 
				
			||||||
                    style: {
 | 
					                    style: {
 | 
				
			||||||
                      marginRight: "5px", display: this.selectedMember ? "none" : "block",
 | 
					                      marginRight: "5px",
 | 
				
			||||||
 | 
					                      display: this.selectedMember ? "none" : "block",
 | 
				
			||||||
                    },
 | 
					                    },
 | 
				
			||||||
                    on: {
 | 
					                    on: {
 | 
				
			||||||
                      click: () => {
 | 
					                      click: () => {
 | 
				
			||||||
@ -270,7 +275,8 @@ export default {
 | 
				
			|||||||
                      ghost: true,
 | 
					                      ghost: true,
 | 
				
			||||||
                    },
 | 
					                    },
 | 
				
			||||||
                    style: {
 | 
					                    style: {
 | 
				
			||||||
                      marginRight: "5px", display: this.selectedMember ? "none" : "block",
 | 
					                      marginRight: "5px",
 | 
				
			||||||
 | 
					                      display: this.selectedMember ? "none" : "block",
 | 
				
			||||||
                    },
 | 
					                    },
 | 
				
			||||||
                    on: {
 | 
					                    on: {
 | 
				
			||||||
                      click: () => {
 | 
					                      click: () => {
 | 
				
			||||||
@ -306,18 +312,75 @@ export default {
 | 
				
			|||||||
      ],
 | 
					      ],
 | 
				
			||||||
      data: [], // 表单数据
 | 
					      data: [], // 表单数据
 | 
				
			||||||
      total: 0, // 表单数据总数
 | 
					      total: 0, // 表单数据总数
 | 
				
			||||||
 | 
					      selectMember: [], //保存选中的用户
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    // 是否为选中模式
 | 
				
			||||||
 | 
					    selectedMember: {
 | 
				
			||||||
 | 
					      type: Boolean,
 | 
				
			||||||
 | 
					      default: false,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // 已选择用户数据
 | 
				
			||||||
 | 
					    selectedList: {
 | 
				
			||||||
 | 
					      type: null,
 | 
				
			||||||
 | 
					      default: "",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
 | 
					    selectedList: {
 | 
				
			||||||
 | 
					      handler(val) {
 | 
				
			||||||
 | 
					        this.$set(this, "selectMember", JSON.parse(JSON.stringify(val)));
 | 
				
			||||||
 | 
					        this.init(this.data);
 | 
				
			||||||
 | 
					        // 将父级数据与当前组件数据进行匹配
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      deep: true,
 | 
				
			||||||
 | 
					      immediate: true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    // 回调给父级
 | 
					    // 回调给父级
 | 
				
			||||||
    callback(val) {
 | 
					    callback(val, index) {
 | 
				
			||||||
 | 
					      this.$set(val, "___selected", !val.___selected);
 | 
				
			||||||
 | 
					      console.log(val.___selected);
 | 
				
			||||||
 | 
					      let findUser = this.selectMember.find((item) => {
 | 
				
			||||||
 | 
					        return item.id == val.id;
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					      // 如果没有则添加
 | 
				
			||||||
 | 
					      if (!findUser) {
 | 
				
			||||||
 | 
					        this.selectMember.push(val);
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        // 有重复数据就删除
 | 
				
			||||||
 | 
					        this.selectMember.map((item, index) => {
 | 
				
			||||||
 | 
					          if (item.id == findUser.id) {
 | 
				
			||||||
 | 
					            this.selectMember.splice(index, 1);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      this.$emit("callback", val);
 | 
					      this.$emit("callback", val);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    init() {
 | 
					    // 初始化信息
 | 
				
			||||||
      this.getData();
 | 
					    init(data) {
 | 
				
			||||||
 | 
					      data.forEach((item) => {
 | 
				
			||||||
 | 
					        if (this.selectMember.length != 0) {
 | 
				
			||||||
 | 
					          this.selectMember.forEach((member) => {
 | 
				
			||||||
 | 
					            if (member.id == item.id) {
 | 
				
			||||||
 | 
					              this.$set(item, "___selected", true);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          });
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          this.$set(item, "___selected", false);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					      this.data = data;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePage(v) {
 | 
					    changePage(v) {
 | 
				
			||||||
      this.searchForm.pageNumber = v;
 | 
					      this.searchForm.pageNumber = v;
 | 
				
			||||||
 | 
					      // 此处如果是父子级传值的时候需要做一下处理
 | 
				
			||||||
 | 
					      //selectedMember
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      this.getData();
 | 
					      this.getData();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePageSize(v) {
 | 
					    changePageSize(v) {
 | 
				
			||||||
@ -373,12 +436,13 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //查询会员列表
 | 
					    //查询会员列表
 | 
				
			||||||
    getData() {
 | 
					    getData() {
 | 
				
			||||||
      API_Member.getMemberListData(this.searchForm).then((res) => {
 | 
					      API_Member.getMemberListData(this.searchForm).then((res) => {
 | 
				
			||||||
        if (res.result.records) {
 | 
					        if (res.result.records) {
 | 
				
			||||||
          this.loading = false;
 | 
					          this.loading = false;
 | 
				
			||||||
          this.data = res.result.records;
 | 
					          this.init(res.result.records);
 | 
				
			||||||
          this.total = res.result.total;
 | 
					          this.total = res.result.total;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
@ -467,7 +531,7 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    this.init();
 | 
					    this.getData();
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
@ -476,7 +540,7 @@ export default {
 | 
				
			|||||||
/deep/ .ivu-table-wrapper {
 | 
					/deep/ .ivu-table-wrapper {
 | 
				
			||||||
  width: 100%;
 | 
					  width: 100%;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
/deep/ .ivu-card{
 | 
					/deep/ .ivu-card {
 | 
				
			||||||
  width: 100%;
 | 
					  width: 100%;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.face {
 | 
					.face {
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										346
									
								
								manager/src/views/my-components/lili/coupon-choose.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										346
									
								
								manager/src/views/my-components/lili/coupon-choose.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,346 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div class="sku-choose">
 | 
				
			||||||
 | 
					    <Button @click="showDrawer=true" :icon="icon">{{ text }}</Button>
 | 
				
			||||||
 | 
					    <span @click="clearSelectData" class="clear">清空已选</span>
 | 
				
			||||||
 | 
					    <Collapse simple class="collapse">
 | 
				
			||||||
 | 
					      <Panel name="1">
 | 
				
			||||||
 | 
					        已选择
 | 
				
			||||||
 | 
					        <span class="select-count">{{ selectObj.length }}</span> 件
 | 
				
			||||||
 | 
					        <p slot="content">
 | 
				
			||||||
 | 
					          <Tag
 | 
				
			||||||
 | 
					            v-for="(item, i) in selectObj"
 | 
				
			||||||
 | 
					            :key="i"
 | 
				
			||||||
 | 
					            :name="item.id"
 | 
				
			||||||
 | 
					            color="default"
 | 
				
			||||||
 | 
					            closable
 | 
				
			||||||
 | 
					            @on-close="handleCancelObj"
 | 
				
			||||||
 | 
					          >{{ createName(item) }}
 | 
				
			||||||
 | 
					          </Tag>
 | 
				
			||||||
 | 
					        </p>
 | 
				
			||||||
 | 
					      </Panel>
 | 
				
			||||||
 | 
					    </Collapse>
 | 
				
			||||||
 | 
					    <Drawer title="选择活动优惠券" closable v-model="showDrawer" :width="width" draggable>
 | 
				
			||||||
 | 
					      <Table
 | 
				
			||||||
 | 
					        :loading="showLoading"
 | 
				
			||||||
 | 
					        border
 | 
				
			||||||
 | 
					        :columns="tableColumns"
 | 
				
			||||||
 | 
					        :data="tableData"
 | 
				
			||||||
 | 
					        :height="height"
 | 
				
			||||||
 | 
					        ref="tableData"
 | 
				
			||||||
 | 
					      ></Table>
 | 
				
			||||||
 | 
					      <Row type="flex" justify="end" style="margin: 10px 0;">
 | 
				
			||||||
 | 
					        <Page
 | 
				
			||||||
 | 
					          :current="searchForm.pageNumber"
 | 
				
			||||||
 | 
					          :total="tableTotal"
 | 
				
			||||||
 | 
					          :page-size="searchForm.pageSize"
 | 
				
			||||||
 | 
					          @on-change="changeDataPage"
 | 
				
			||||||
 | 
					          @on-page-size-change="changeDataPageSize"
 | 
				
			||||||
 | 
					          :page-size-opts="[10,20,50]"
 | 
				
			||||||
 | 
					          size="small"
 | 
				
			||||||
 | 
					          show-total
 | 
				
			||||||
 | 
					          show-elevator
 | 
				
			||||||
 | 
					          show-sizer
 | 
				
			||||||
 | 
					        ></Page>
 | 
				
			||||||
 | 
					      </Row>
 | 
				
			||||||
 | 
					      <div class="my-drawer-footer">
 | 
				
			||||||
 | 
					        已选择
 | 
				
			||||||
 | 
					        <span class="select-count">{{ selectObj.length }}</span> 件
 | 
				
			||||||
 | 
					        <Button @click="clearSelectData" style="margin-left:10px">清空已选</Button>
 | 
				
			||||||
 | 
					        <Button @click="showDrawer=false" type="primary" style="margin-left:10px">关闭</Button>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					    </Drawer>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import {
 | 
				
			||||||
 | 
					  getPlatformCouponList
 | 
				
			||||||
 | 
					} from "@/api/promotion";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: "userChoose",
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    text: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "选择SKU"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    icon: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "md-basket"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    initData: {
 | 
				
			||||||
 | 
					      type: Array,
 | 
				
			||||||
 | 
					      default: []
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    createName: {
 | 
				
			||||||
 | 
					      type: Function,
 | 
				
			||||||
 | 
					      default: function (item) {
 | 
				
			||||||
 | 
					        return item.goodsName
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.selectObj = this.initData
 | 
				
			||||||
 | 
					    console.log(JSON.stringify(this.initData))
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      //默认值后续计算
 | 
				
			||||||
 | 
					      height: 500,
 | 
				
			||||||
 | 
					      width: 500,
 | 
				
			||||||
 | 
					      //加载状态
 | 
				
			||||||
 | 
					      showLoading: true,
 | 
				
			||||||
 | 
					      //展示抽屉
 | 
				
			||||||
 | 
					      showDrawer: false,
 | 
				
			||||||
 | 
					      selectObj: [], // 选择数据
 | 
				
			||||||
 | 
					      searchForm: { // 请求参数
 | 
				
			||||||
 | 
					        getType: "ACTIVITY",// 活动优惠券
 | 
				
			||||||
 | 
					        pageNumber: 1, // 当前页数
 | 
				
			||||||
 | 
					        pageSize: 10, // 页面大小
 | 
				
			||||||
 | 
					        sort: "createTime", // 默认排序字段
 | 
				
			||||||
 | 
					        order: "desc", // 默认排序方式
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      tableColumns: [ // 表头
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "index",
 | 
				
			||||||
 | 
					          width: 60,
 | 
				
			||||||
 | 
					          align: "center"
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          title: "商品名称",
 | 
				
			||||||
 | 
					          key: "goodsName",
 | 
				
			||||||
 | 
					          minWidth: 140
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          title: "规格",
 | 
				
			||||||
 | 
					          key: "specName",
 | 
				
			||||||
 | 
					          minWidth: 140,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          title: "图片",
 | 
				
			||||||
 | 
					          key: "thumbnail",
 | 
				
			||||||
 | 
					          width: 80,
 | 
				
			||||||
 | 
					          align: "center",
 | 
				
			||||||
 | 
					          render: (h, params) => {
 | 
				
			||||||
 | 
					            return h("Avatar", {
 | 
				
			||||||
 | 
					              props: {
 | 
				
			||||||
 | 
					                src: params.row.face
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          title: "状态",
 | 
				
			||||||
 | 
					          key: "status",
 | 
				
			||||||
 | 
					          align: "center",
 | 
				
			||||||
 | 
					          width: 120,
 | 
				
			||||||
 | 
					          render: (h, params) => {
 | 
				
			||||||
 | 
					            if (params.row.delFlag == 0) {
 | 
				
			||||||
 | 
					              return h("div", [
 | 
				
			||||||
 | 
					                h("Badge", {
 | 
				
			||||||
 | 
					                  props: {
 | 
				
			||||||
 | 
					                    status: "success",
 | 
				
			||||||
 | 
					                    text: "正常"
 | 
				
			||||||
 | 
					                  }
 | 
				
			||||||
 | 
					                })
 | 
				
			||||||
 | 
					              ]);
 | 
				
			||||||
 | 
					            } else if (params.row.delFlag == -1) {
 | 
				
			||||||
 | 
					              return h("div", [
 | 
				
			||||||
 | 
					                h("Badge", {
 | 
				
			||||||
 | 
					                  props: {
 | 
				
			||||||
 | 
					                    status: "error",
 | 
				
			||||||
 | 
					                    text: "禁用"
 | 
				
			||||||
 | 
					                  }
 | 
				
			||||||
 | 
					                })
 | 
				
			||||||
 | 
					              ]);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          title: "创建时间",
 | 
				
			||||||
 | 
					          key: "createTime",
 | 
				
			||||||
 | 
					          sortable: true,
 | 
				
			||||||
 | 
					          sortType: "desc",
 | 
				
			||||||
 | 
					          width: 170
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          title: "操作",
 | 
				
			||||||
 | 
					          key: "action",
 | 
				
			||||||
 | 
					          width: 130,
 | 
				
			||||||
 | 
					          align: "center",
 | 
				
			||||||
 | 
					          fixed: "right",
 | 
				
			||||||
 | 
					          render: (h, params) => {
 | 
				
			||||||
 | 
					            let select;
 | 
				
			||||||
 | 
					            this.selectObj.forEach(item => {
 | 
				
			||||||
 | 
					              if (item.id === params.row.id) {
 | 
				
			||||||
 | 
					                select = params.row
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (select) {
 | 
				
			||||||
 | 
					              return h("div", [
 | 
				
			||||||
 | 
					                h(
 | 
				
			||||||
 | 
					                  "Button",
 | 
				
			||||||
 | 
					                  {
 | 
				
			||||||
 | 
					                    props: {
 | 
				
			||||||
 | 
					                      type: "info",
 | 
				
			||||||
 | 
					                      size: "small"
 | 
				
			||||||
 | 
					                    },
 | 
				
			||||||
 | 
					                    on: {
 | 
				
			||||||
 | 
					                      click: () => {
 | 
				
			||||||
 | 
					                        this.chooseCancel(params.row);
 | 
				
			||||||
 | 
					                      }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                  },
 | 
				
			||||||
 | 
					                  "取消选择"
 | 
				
			||||||
 | 
					                )
 | 
				
			||||||
 | 
					              ]);
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					              return h("div", [
 | 
				
			||||||
 | 
					                h(
 | 
				
			||||||
 | 
					                  "Button",
 | 
				
			||||||
 | 
					                  {
 | 
				
			||||||
 | 
					                    props: {
 | 
				
			||||||
 | 
					                      type: "info",
 | 
				
			||||||
 | 
					                      size: "small"
 | 
				
			||||||
 | 
					                    },
 | 
				
			||||||
 | 
					                    on: {
 | 
				
			||||||
 | 
					                      click: () => {
 | 
				
			||||||
 | 
					                        this.chooseObj(params.row);
 | 
				
			||||||
 | 
					                      }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                  },
 | 
				
			||||||
 | 
					                  "选择"
 | 
				
			||||||
 | 
					                )
 | 
				
			||||||
 | 
					              ]);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      tableData: [], // 表格数据
 | 
				
			||||||
 | 
					      tableTotal: 0 // 总数
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    changeDataPage(v) {
 | 
				
			||||||
 | 
					      this.searchForm.pageNumber = v;
 | 
				
			||||||
 | 
					      this.searchData();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    changeDataPageSize(v) {
 | 
				
			||||||
 | 
					      this.searchForm.pageSize = v;
 | 
				
			||||||
 | 
					      this.searchData();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    searchData() {
 | 
				
			||||||
 | 
					      this.showLoading = true;
 | 
				
			||||||
 | 
					      getPlatformCouponList(this.searchForm).then(res => {
 | 
				
			||||||
 | 
					        this.showLoading = false;
 | 
				
			||||||
 | 
					        if (res.success) {
 | 
				
			||||||
 | 
					          this.tableData = res.result.records;
 | 
				
			||||||
 | 
					          this.tableTotal = res.result.total;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleSearchData() {
 | 
				
			||||||
 | 
					      this.searchForm.pageNumber = 1;
 | 
				
			||||||
 | 
					      this.searchForm.pageSize = 10;
 | 
				
			||||||
 | 
					      this.searchData();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleResetObj() {
 | 
				
			||||||
 | 
					      this.$refs.searchForm.resetFields();
 | 
				
			||||||
 | 
					      this.searchForm.pageNumber = 1;
 | 
				
			||||||
 | 
					      this.searchForm.pageSize = 9;
 | 
				
			||||||
 | 
					      this.searchForm.departmentId = "";
 | 
				
			||||||
 | 
					      // 重新加载数据
 | 
				
			||||||
 | 
					      this.searchData();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    setData(v) {
 | 
				
			||||||
 | 
					      this.selectObj = v;
 | 
				
			||||||
 | 
					      this.$emit("on-change", this.selectObj);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chooseCancel(v) {
 | 
				
			||||||
 | 
					      let _index;
 | 
				
			||||||
 | 
					      this.selectObj.forEach((e, index) => {
 | 
				
			||||||
 | 
					        if (v.id == e.id) {
 | 
				
			||||||
 | 
					          _index = index;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      if (_index || _index == 0) {
 | 
				
			||||||
 | 
					        this.selectObj.splice(_index, 1);
 | 
				
			||||||
 | 
					        this.$emit("on-change", this.selectObj);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chooseObj(v) {
 | 
				
			||||||
 | 
					      // 去重
 | 
				
			||||||
 | 
					      let that = this;
 | 
				
			||||||
 | 
					      let flag = true;
 | 
				
			||||||
 | 
					      this.selectObj.forEach(e => {
 | 
				
			||||||
 | 
					        if (v.id == e.id) {
 | 
				
			||||||
 | 
					          flag = false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					      if (flag) {
 | 
				
			||||||
 | 
					        this.selectObj.push(v);
 | 
				
			||||||
 | 
					        this.$emit("on-change", this.selectObj);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    clearSelectData() {
 | 
				
			||||||
 | 
					      this.selectObj = [];
 | 
				
			||||||
 | 
					      this.$emit("on-change", this.selectObj);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleCancelObj(e, id) {
 | 
				
			||||||
 | 
					      // 删除所选用户
 | 
				
			||||||
 | 
					      let newArray = [];
 | 
				
			||||||
 | 
					      this.selectObj.forEach(e => {
 | 
				
			||||||
 | 
					        if (id != e.id) {
 | 
				
			||||||
 | 
					          newArray.push(e);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					      this.selectObj = newArray;
 | 
				
			||||||
 | 
					      this.$emit("on-change", this.selectObj);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  created() {
 | 
				
			||||||
 | 
					    // 计算高度
 | 
				
			||||||
 | 
					    this.height = Number(document.documentElement.clientHeight - 230);
 | 
				
			||||||
 | 
					    this.width = Number(document.documentElement.clientWidth / 2) > 900 ? 900 : Number(document.documentElement.clientWidth / 2)
 | 
				
			||||||
 | 
					    this.searchData();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
					.sku-choose {
 | 
				
			||||||
 | 
					  .clear {
 | 
				
			||||||
 | 
					    font-size: 12px;
 | 
				
			||||||
 | 
					    margin-left: 15px;
 | 
				
			||||||
 | 
					    color: #40a9ff;
 | 
				
			||||||
 | 
					    cursor: pointer;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .collapse {
 | 
				
			||||||
 | 
					    font-size: 12px;
 | 
				
			||||||
 | 
					    margin-top: 15px;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .select-count {
 | 
				
			||||||
 | 
					    font-weight: 600;
 | 
				
			||||||
 | 
					    color: #40a9ff;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.my-drawer-footer {
 | 
				
			||||||
 | 
					  z-index: 10;
 | 
				
			||||||
 | 
					  width: 100%;
 | 
				
			||||||
 | 
					  position: absolute;
 | 
				
			||||||
 | 
					  bottom: 0;
 | 
				
			||||||
 | 
					  left: 0;
 | 
				
			||||||
 | 
					  border-top: 1px solid #e8e8e8;
 | 
				
			||||||
 | 
					  padding: 10px 16px;
 | 
				
			||||||
 | 
					  text-align: right;
 | 
				
			||||||
 | 
					  background: #fff;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@ -15,20 +15,8 @@
 | 
				
			|||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <Modal
 | 
					    <Modal title="编辑html代码" v-model="showHTMLModal" :mask-closable="false" :width="900" :fullscreen="full">
 | 
				
			||||||
      title="编辑html代码"
 | 
					      <Input v-if="!full" v-model="dataEdit" :rows="15" type="textarea" style="max-height:60vh;overflow:auto;" />
 | 
				
			||||||
      v-model="showHTMLModal"
 | 
					 | 
				
			||||||
      :mask-closable="false"
 | 
					 | 
				
			||||||
      :width="900"
 | 
					 | 
				
			||||||
      :fullscreen="full"
 | 
					 | 
				
			||||||
    >
 | 
					 | 
				
			||||||
      <Input
 | 
					 | 
				
			||||||
        v-if="!full"
 | 
					 | 
				
			||||||
        v-model="dataEdit"
 | 
					 | 
				
			||||||
        :rows="15"
 | 
					 | 
				
			||||||
        type="textarea"
 | 
					 | 
				
			||||||
        style="max-height:60vh;overflow:auto;"
 | 
					 | 
				
			||||||
      />
 | 
					 | 
				
			||||||
      <Input v-if="full" v-model="dataEdit" :rows="32" type="textarea" />
 | 
					      <Input v-if="full" v-model="dataEdit" :rows="32" type="textarea" />
 | 
				
			||||||
      <div slot="footer">
 | 
					      <div slot="footer">
 | 
				
			||||||
        <Button @click="full=!full" icon="md-expand">全屏开/关</Button>
 | 
					        <Button @click="full=!full" icon="md-expand">全屏开/关</Button>
 | 
				
			||||||
@ -56,21 +44,21 @@ export default {
 | 
				
			|||||||
  props: {
 | 
					  props: {
 | 
				
			||||||
    id: {
 | 
					    id: {
 | 
				
			||||||
      type: String,
 | 
					      type: String,
 | 
				
			||||||
      default: "editor"
 | 
					      default: "editor",
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    value: String,
 | 
					    value: String,
 | 
				
			||||||
    base64: {
 | 
					    base64: {
 | 
				
			||||||
      type: Boolean,
 | 
					      type: Boolean,
 | 
				
			||||||
      default: false
 | 
					      default: false,
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    showExpand: {
 | 
					    showExpand: {
 | 
				
			||||||
      type: Boolean,
 | 
					      type: Boolean,
 | 
				
			||||||
      default: true
 | 
					      default: true,
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    openXss: {
 | 
					    openXss: {
 | 
				
			||||||
      type: Boolean,
 | 
					      type: Boolean,
 | 
				
			||||||
      default: false
 | 
					      default: false,
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
@ -79,16 +67,17 @@ export default {
 | 
				
			|||||||
      dataEdit: "", // 编辑数据
 | 
					      dataEdit: "", // 编辑数据
 | 
				
			||||||
      showHTMLModal: false, // 显示html
 | 
					      showHTMLModal: false, // 显示html
 | 
				
			||||||
      full: false, // html全屏开关
 | 
					      full: false, // html全屏开关
 | 
				
			||||||
      fullscreenModal: false // 显示全屏预览
 | 
					      fullscreenModal: false, // 显示全屏预览
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    initEditor() {
 | 
					    initEditor() {
 | 
				
			||||||
      let that = this;
 | 
					      let that = this;
 | 
				
			||||||
      // 详见wangeditor3官网文档 https://www.kancloud.cn/wangfupeng/wangeditor3/332599
 | 
					      // 详见wangeditor3官网文档 https://www.kancloud.cn/wangfupeng/wangeditor3/332599
 | 
				
			||||||
      editor = new E(`#${this.id}`);
 | 
					      editor = new E(`#${this.id}`);
 | 
				
			||||||
      // 编辑内容绑定数据
 | 
					      // 编辑内容绑定数据
 | 
				
			||||||
      editor.config.onchange = html => {
 | 
					      editor.config.onchange = (html) => {
 | 
				
			||||||
        if (this.openXss) {
 | 
					        if (this.openXss) {
 | 
				
			||||||
          this.data = xss(html);
 | 
					          this.data = xss(html);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
@ -108,30 +97,30 @@ export default {
 | 
				
			|||||||
        editor.config.uploadImgServer = uploadFile;
 | 
					        editor.config.uploadImgServer = uploadFile;
 | 
				
			||||||
        // lili如要header中传入token鉴权
 | 
					        // lili如要header中传入token鉴权
 | 
				
			||||||
        editor.config.uploadImgHeaders = {
 | 
					        editor.config.uploadImgHeaders = {
 | 
				
			||||||
          accessToken: that.getStore("accessToken")
 | 
					          accessToken: that.getStore("accessToken"),
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
        editor.config.uploadFileName = "file";
 | 
					        editor.config.uploadFileName = "file";
 | 
				
			||||||
        editor.config.uploadImgHooks = {
 | 
					        editor.config.uploadImgHooks = {
 | 
				
			||||||
          before: function(xhr, editor, files) {
 | 
					          before: function (xhr, editor, files) {
 | 
				
			||||||
            // 图片上传之前触发
 | 
					            // 图片上传之前触发
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          success: function(xhr, editor, result) {
 | 
					          success: function (xhr, editor, result) {
 | 
				
			||||||
            // 图片上传并返回结果,图片插入成功之后触发
 | 
					            // 图片上传并返回结果,图片插入成功之后触发
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          fail: function(xhr, editor, result) {
 | 
					          fail: function (xhr, editor, result) {
 | 
				
			||||||
            // 图片上传并返回结果,但图片插入错误时触发
 | 
					            // 图片上传并返回结果,但图片插入错误时触发
 | 
				
			||||||
            that.$Message.error("上传图片失败");
 | 
					            that.$Message.error("上传图片失败");
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          error: function(xhr, editor) {
 | 
					          error: function (xhr, editor) {
 | 
				
			||||||
            // 图片上传出错时触发
 | 
					            // 图片上传出错时触发
 | 
				
			||||||
            that.$Message.error("上传图片出错");
 | 
					            that.$Message.error("上传图片出错");
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          timeout: function(xhr, editor) {
 | 
					          timeout: function (xhr, editor) {
 | 
				
			||||||
            // 图片上传超时时触发
 | 
					            // 图片上传超时时触发
 | 
				
			||||||
            that.$Message.error("上传图片超时");
 | 
					            that.$Message.error("上传图片超时");
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          // 如果服务器端返回的不是 {errno:0, data: [...]} 这种格式,可使用该配置
 | 
					          // 如果服务器端返回的不是 {errno:0, data: [...]} 这种格式,可使用该配置
 | 
				
			||||||
          customInsert: function(insertImg, result, editor) {
 | 
					          customInsert: function (insertImg, result, editor) {
 | 
				
			||||||
            if (result.success == true) {
 | 
					            if (result.success == true) {
 | 
				
			||||||
              let url = result.result;
 | 
					              let url = result.result;
 | 
				
			||||||
              insertImg(url);
 | 
					              insertImg(url);
 | 
				
			||||||
@ -139,10 +128,11 @@ export default {
 | 
				
			|||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
              that.$Message.error(result.message);
 | 
					              that.$Message.error(result.message);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          },
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      editor.config.customAlert = function(info) {
 | 
					
 | 
				
			||||||
 | 
					      editor.config.customAlert = function (info) {
 | 
				
			||||||
        // info 是需要提示的内容
 | 
					        // info 是需要提示的内容
 | 
				
			||||||
        // that.$Message.info(info);
 | 
					        // that.$Message.info(info);
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
@ -156,8 +146,8 @@ export default {
 | 
				
			|||||||
          // type -> 'emoji' / 'image'
 | 
					          // type -> 'emoji' / 'image'
 | 
				
			||||||
          type: "image",
 | 
					          type: "image",
 | 
				
			||||||
          // content -> 数组
 | 
					          // content -> 数组
 | 
				
			||||||
          content: sina
 | 
					          content: sina,
 | 
				
			||||||
        }
 | 
					        },
 | 
				
			||||||
      ];
 | 
					      ];
 | 
				
			||||||
      editor.create();
 | 
					      editor.create();
 | 
				
			||||||
      if (this.value) {
 | 
					      if (this.value) {
 | 
				
			||||||
@ -187,7 +177,7 @@ export default {
 | 
				
			|||||||
          editor.txt.html(this.data);
 | 
					          editor.txt.html(this.data);
 | 
				
			||||||
          this.$emit("input", this.data);
 | 
					          this.$emit("input", this.data);
 | 
				
			||||||
          this.$emit("on-change", this.data);
 | 
					          this.$emit("on-change", this.data);
 | 
				
			||||||
        }
 | 
					        },
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    setData(value) {
 | 
					    setData(value) {
 | 
				
			||||||
@ -200,22 +190,21 @@ export default {
 | 
				
			|||||||
        this.$emit("input", this.data);
 | 
					        this.$emit("input", this.data);
 | 
				
			||||||
        this.$emit("on-change", this.data);
 | 
					        this.$emit("on-change", this.data);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  watch: {
 | 
					  watch: {
 | 
				
			||||||
    value(val) {
 | 
					    value(val) {
 | 
				
			||||||
      this.setData(val);
 | 
					      this.setData(val);
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    this.initEditor();
 | 
					    this.initEditor();
 | 
				
			||||||
  }
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
.e-menu {
 | 
					.e-menu {
 | 
				
			||||||
 | 
					 | 
				
			||||||
  z-index: 101;
 | 
					  z-index: 101;
 | 
				
			||||||
  position: absolute;
 | 
					  position: absolute;
 | 
				
			||||||
  cursor: pointer;
 | 
					  cursor: pointer;
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										14
									
								
								manager/src/views/my-components/verify/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								manager/src/views/my-components/verify/README.md
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,14 @@
 | 
				
			|||||||
 | 
					### 滑动拼图验证
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### 在页面中引入 .vue文件
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### 参数  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### 在组件上添加v-if来判断组件显隐 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### verifyType 验证格式[ 'LOGIN' ,'REGISTER' ]   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### @change方法  获取回调,参数为对象 {status:false,distance:100}   status 为回调状态,distance为移动距离
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					####    <Verify  class="verify-content" verifyType='LOGIN' @change="verifyChange"></Verify>
 | 
				
			||||||
							
								
								
									
										185
									
								
								manager/src/views/my-components/verify/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										185
									
								
								manager/src/views/my-components/verify/index.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,185 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div class="verify-content" v-if="show" @mousemove="mouseMove" @mouseup="mouseUp">
 | 
				
			||||||
 | 
					    <div class="imgBox" :style="{width:data.originalWidth+'px',height:data.originalHeight + 'px'}">
 | 
				
			||||||
 | 
					      <img :src="data.backImage" style="width:100%;height:100%" alt="">
 | 
				
			||||||
 | 
					      <img class="slider" :src="data.slidingImage" :style="{left:distance+'px',top:data.randomY+'px'}" :width="data.sliderWidth" :height="data.sliderHeight" alt="">
 | 
				
			||||||
 | 
					      <Icon type="md-refresh" class="refresh" @click="refresh" />
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div class="handle" :style="{width:data.originalWidth+'px'}">
 | 
				
			||||||
 | 
					      <span class="bgcolor" :style="{width:distance + 'px',background:bgColor}"></span>
 | 
				
			||||||
 | 
					      <span class="swiper" :style="{left:distance + 'px'}" @mousedown="mouseDown">
 | 
				
			||||||
 | 
					        <Icon type="md-arrow-round-forward" />
 | 
				
			||||||
 | 
					      </span>
 | 
				
			||||||
 | 
					      <span class="text">{{verifyText}}</span>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import { getVerifyImg, postVerifyImg } from './verify.js';
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    verifyType: {
 | 
				
			||||||
 | 
					      defalut: 'LOGIN',
 | 
				
			||||||
 | 
					      type: String
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  data () {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      show: false, // 验证码显隐
 | 
				
			||||||
 | 
					      type: 'LOGIN', // 请求类型
 | 
				
			||||||
 | 
					      data: { // 验证码数据
 | 
				
			||||||
 | 
					        backImage: '',
 | 
				
			||||||
 | 
					        slidingImage: '',
 | 
				
			||||||
 | 
					        originalHeight: 150,
 | 
				
			||||||
 | 
					        originalWidth: 300,
 | 
				
			||||||
 | 
					        sliderWidth: 60,
 | 
				
			||||||
 | 
					        sliderHeight: 60
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      distance: 0, // 拼图移动距离
 | 
				
			||||||
 | 
					      flag: false, // 判断滑块是否按下
 | 
				
			||||||
 | 
					      downX: 0, // 鼠标按下位置
 | 
				
			||||||
 | 
					      bgColor: 'aqua', // 滑动背景颜色
 | 
				
			||||||
 | 
					      verifyText: '拖动滑块解锁' // 文字提示
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    mouseDown (e) {
 | 
				
			||||||
 | 
					      this.downX = e.clientX;
 | 
				
			||||||
 | 
					      this.flag = true;
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    mouseMove (e) {
 | 
				
			||||||
 | 
					      if (this.flag) {
 | 
				
			||||||
 | 
					        let offset = e.clientX - this.downX;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (offset > this.data.originalWidth - 43) {
 | 
				
			||||||
 | 
					          this.distance = this.data.originalWidth - 43;
 | 
				
			||||||
 | 
					        } else if (offset < 0) {
 | 
				
			||||||
 | 
					          this.distance = 0;
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          this.distance = offset;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    mouseUp () {
 | 
				
			||||||
 | 
					      if (!this.flag) return false;
 | 
				
			||||||
 | 
					      this.flag = false;
 | 
				
			||||||
 | 
					      let params = {
 | 
				
			||||||
 | 
					        verificationEnums: this.type,
 | 
				
			||||||
 | 
					        xPos: this.distance
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					      postVerifyImg(params).then(res => {
 | 
				
			||||||
 | 
					        if (res.result) {
 | 
				
			||||||
 | 
					          this.bgColor = 'green';
 | 
				
			||||||
 | 
					          this.verifyText = '解锁成功';
 | 
				
			||||||
 | 
					          this.$emit('change', { status: true, distance: this.distance });
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          this.bgColor = 'red';
 | 
				
			||||||
 | 
					          this.verifyText = '解锁失败';
 | 
				
			||||||
 | 
					          let that = this;
 | 
				
			||||||
 | 
					          setTimeout(() => {
 | 
				
			||||||
 | 
					            that.refresh();
 | 
				
			||||||
 | 
					          }, 1000);
 | 
				
			||||||
 | 
					          this.$emit('change', { status: false, distance: this.distance });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    refresh () {
 | 
				
			||||||
 | 
					      this.flag = false;
 | 
				
			||||||
 | 
					      this.downX = 0;
 | 
				
			||||||
 | 
					      this.distance = 0;
 | 
				
			||||||
 | 
					      this.bgColor = 'aqua';
 | 
				
			||||||
 | 
					      this.verifyText = '拖动滑块解锁';
 | 
				
			||||||
 | 
					      this.getImg();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getImg () {
 | 
				
			||||||
 | 
					      getVerifyImg(this.type).then(res => {
 | 
				
			||||||
 | 
					        this.data = res.result;
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  created () {
 | 
				
			||||||
 | 
					    this.getImg();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
 | 
					    verifyType: {
 | 
				
			||||||
 | 
					      immediate: true,
 | 
				
			||||||
 | 
					      handler: function (v) {
 | 
				
			||||||
 | 
					        this.type = v;
 | 
				
			||||||
 | 
					        this.refresh();
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    show (v) {
 | 
				
			||||||
 | 
					      if (v) this.refresh();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
					.verify-content{
 | 
				
			||||||
 | 
					  padding: 10px;
 | 
				
			||||||
 | 
					  background: #fff;
 | 
				
			||||||
 | 
					  border: 1px solid #eee;
 | 
				
			||||||
 | 
					  border-radius: 5px;
 | 
				
			||||||
 | 
					  box-shadow: 1px 1px 3px #999;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.imgBox {
 | 
				
			||||||
 | 
					  width: 300px;
 | 
				
			||||||
 | 
					  height: 150px;
 | 
				
			||||||
 | 
					  position: relative;
 | 
				
			||||||
 | 
					  overflow: hidden;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .slider {
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    cursor: pointer;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .refresh {
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    right: 5px;
 | 
				
			||||||
 | 
					    top: 5px;
 | 
				
			||||||
 | 
					    font-size: 20px;
 | 
				
			||||||
 | 
					    color: #fff;
 | 
				
			||||||
 | 
					    cursor: pointer;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.handle {
 | 
				
			||||||
 | 
					  border: 1px solid rgb(134, 134, 134);
 | 
				
			||||||
 | 
					  margin-top: 5px;
 | 
				
			||||||
 | 
					  height: 42px;
 | 
				
			||||||
 | 
					  background: #ddd;
 | 
				
			||||||
 | 
					  position: relative;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .bgcolor {
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    top: 0;
 | 
				
			||||||
 | 
					    left: 0;
 | 
				
			||||||
 | 
					    width: 40px;
 | 
				
			||||||
 | 
					    height: 40px;
 | 
				
			||||||
 | 
					    opacity: 0.5;
 | 
				
			||||||
 | 
					    background: aqua;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .swiper {
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    width: 40px;
 | 
				
			||||||
 | 
					    height: 40px;
 | 
				
			||||||
 | 
					    background-color: #fff;
 | 
				
			||||||
 | 
					    cursor: pointer;
 | 
				
			||||||
 | 
					    display: flex;
 | 
				
			||||||
 | 
					    align-items: center;
 | 
				
			||||||
 | 
					    justify-content: center;
 | 
				
			||||||
 | 
					    .ivu-icon {
 | 
				
			||||||
 | 
					      font-size: 20px;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .text {
 | 
				
			||||||
 | 
					    display: inline-block;
 | 
				
			||||||
 | 
					    width: inherit;
 | 
				
			||||||
 | 
					    text-align: center;
 | 
				
			||||||
 | 
					    line-height: 42px;
 | 
				
			||||||
 | 
					    font-size: 14px;
 | 
				
			||||||
 | 
					    user-select: none;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
							
								
								
									
										13
									
								
								manager/src/views/my-components/verify/verify.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								manager/src/views/my-components/verify/verify.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,13 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					import {commonUrl, getRequestWithNoToken, postRequestWithNoToken} from '@/libs/axios';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 获取拼图验证
 | 
				
			||||||
 | 
					export const getVerifyImg = (verificationEnums) => {
 | 
				
			||||||
 | 
					  return getRequestWithNoToken(`${commonUrl}/common/slider/${verificationEnums}`);
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 拼图验证
 | 
				
			||||||
 | 
					export const postVerifyImg = (params) => {
 | 
				
			||||||
 | 
					  return postRequestWithNoToken(`${commonUrl}/common/slider/${params.verificationEnums}`, params);
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
@ -1,16 +1,27 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="search">
 | 
					  <div class="search">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <Card>
 | 
					    <Card>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <Row @keydown.enter.native="handleSearch">
 | 
					      <Row @keydown.enter.native="handleSearch">
 | 
				
			||||||
        <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
 | 
					        <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
 | 
				
			||||||
          <Form-item label="订单号" prop="orderSn">
 | 
					          <Form-item label="订单号" prop="orderSn">
 | 
				
			||||||
            <Input type="text" v-model="searchForm.orderSn" placeholder="请输入订单号" clearable style="width: 200px" />
 | 
					            <Input type="text" v-model="searchForm.orderSn" placeholder="请输入订单号" clearable style="width: 160px" />
 | 
				
			||||||
          </Form-item>
 | 
					          </Form-item>
 | 
				
			||||||
          <Form-item label="会员名称" prop="buyerName">
 | 
					          <Form-item label="会员名称" prop="buyerName">
 | 
				
			||||||
            <Input type="text" v-model="searchForm.buyerName" placeholder="请输入会员名称" clearable style="width: 200px" />
 | 
					            <Input type="text" v-model="searchForm.buyerName" placeholder="请输入会员名称" clearable style="width: 160px" />
 | 
				
			||||||
 | 
					          </Form-item>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          <Form-item label="订单类型" prop="orderType">
 | 
				
			||||||
 | 
					            <Select v-model="searchForm.orderType" placeholder="请选择" clearable style="width: 160px">
 | 
				
			||||||
 | 
					              <Option value="NORMAL">普通订单</Option>
 | 
				
			||||||
 | 
					              <Option value="PINTUAN">拼团订单</Option>
 | 
				
			||||||
 | 
					              <Option value="GIFT">赠品订单</Option>
 | 
				
			||||||
 | 
					              <Option value="VIRTUAL">核验订单</Option>
 | 
				
			||||||
 | 
					            </Select>
 | 
				
			||||||
          </Form-item>
 | 
					          </Form-item>
 | 
				
			||||||
          <Form-item label="订单状态" prop="orderStatus">
 | 
					          <Form-item label="订单状态" prop="orderStatus">
 | 
				
			||||||
            <Select v-model="searchForm.orderStatus" placeholder="请选择" clearable style="width: 200px">
 | 
					            <Select v-model="searchForm.orderStatus" placeholder="请选择" clearable style="width: 160px">
 | 
				
			||||||
              <Option value="UNPAID">未付款</Option>
 | 
					              <Option value="UNPAID">未付款</Option>
 | 
				
			||||||
              <Option value="PAID">已付款</Option>
 | 
					              <Option value="PAID">已付款</Option>
 | 
				
			||||||
              <Option value="UNDELIVERED">待发货</Option>
 | 
					              <Option value="UNDELIVERED">待发货</Option>
 | 
				
			||||||
@ -20,29 +31,91 @@
 | 
				
			|||||||
              <Option value="CANCELLED">已取消</Option>
 | 
					              <Option value="CANCELLED">已取消</Option>
 | 
				
			||||||
            </Select>
 | 
					            </Select>
 | 
				
			||||||
          </Form-item>
 | 
					          </Form-item>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          <Form-item label="下单时间">
 | 
					          <Form-item label="下单时间">
 | 
				
			||||||
            <DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker>
 | 
					            <DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 160px"></DatePicker>
 | 
				
			||||||
          </Form-item>
 | 
					          </Form-item>
 | 
				
			||||||
          <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
 | 
					          <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
 | 
				
			||||||
        </Form>
 | 
					        </Form>
 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
 | 
					      <div>
 | 
				
			||||||
 | 
					        <download-excel class="export-excel-wrapper" :data="data" :fields="fields" name="商品订单.xls">
 | 
				
			||||||
 | 
					          <Button type="primary" class="export">
 | 
				
			||||||
 | 
					            导出Excel
 | 
				
			||||||
 | 
					          </Button>
 | 
				
			||||||
 | 
					        </download-excel>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
 | 
					      <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <Row type="flex" justify="end" class="page">
 | 
					      <Row type="flex" justify="end" class="page">
 | 
				
			||||||
        <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
 | 
					        <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
 | 
				
			||||||
          size="small" show-total show-elevator show-sizer></Page>
 | 
					          show-total show-elevator show-sizer></Page>
 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
    </Card>
 | 
					    </Card>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import * as API_Order from "@/api/order";
 | 
					import * as API_Order from "@/api/order";
 | 
				
			||||||
 | 
					import JsonExcel from "vue-json-excel";
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "orderList",
 | 
					  name: "orderList",
 | 
				
			||||||
  components: {},
 | 
					  components: {
 | 
				
			||||||
 | 
					    "download-excel": JsonExcel,
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
 | 
					      // 表格的表头以及内容
 | 
				
			||||||
 | 
					      fields: {
 | 
				
			||||||
 | 
					        订单编号: "sn",
 | 
				
			||||||
 | 
					        下单时间: "createTime",
 | 
				
			||||||
 | 
					        客户名称: "memberName",
 | 
				
			||||||
 | 
					        客户账号: "",
 | 
				
			||||||
 | 
					        收货人: "",
 | 
				
			||||||
 | 
					        收货人手机号: "",
 | 
				
			||||||
 | 
					        收货人地址: "",
 | 
				
			||||||
 | 
					        支付方式: {
 | 
				
			||||||
 | 
					          field: "clientType",
 | 
				
			||||||
 | 
					          callback: (value) => {
 | 
				
			||||||
 | 
					            if (value == "H5") {
 | 
				
			||||||
 | 
					              return "移动端";
 | 
				
			||||||
 | 
					            } else if (value == "PC") {
 | 
				
			||||||
 | 
					              return "PC端";
 | 
				
			||||||
 | 
					            } else if (value == "WECHAT_MP") {
 | 
				
			||||||
 | 
					              return "小程序端";
 | 
				
			||||||
 | 
					            } else if (value == "APP") {
 | 
				
			||||||
 | 
					              return "移动应用端";
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					              return value;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        配送方式: "",
 | 
				
			||||||
 | 
					        配送费用: "",
 | 
				
			||||||
 | 
					        订单商品金额: "",
 | 
				
			||||||
 | 
					        订单优惠金额: "",
 | 
				
			||||||
 | 
					        订单应付金额: "",
 | 
				
			||||||
 | 
					        商品SKU编号: "",
 | 
				
			||||||
 | 
					        商品数量: "groupNum",
 | 
				
			||||||
 | 
					        买家备注: "",
 | 
				
			||||||
 | 
					        订单状态: "",
 | 
				
			||||||
 | 
					        付款状态: {
 | 
				
			||||||
 | 
					          field: "payStatus",
 | 
				
			||||||
 | 
					          callback: (value) => {
 | 
				
			||||||
 | 
					            return value == "UNPAID"
 | 
				
			||||||
 | 
					              ? "未付款"
 | 
				
			||||||
 | 
					              : value == "PAID"
 | 
				
			||||||
 | 
					              ? "已付款"
 | 
				
			||||||
 | 
					              : "";
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        发货状态: "",
 | 
				
			||||||
 | 
					        发票类型: "",
 | 
				
			||||||
 | 
					        发票抬头: "",
 | 
				
			||||||
 | 
					        店铺: "storeName",
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
      loading: true, // 表单加载状态
 | 
					      loading: true, // 表单加载状态
 | 
				
			||||||
      searchForm: {
 | 
					      searchForm: {
 | 
				
			||||||
        // 搜索框初始化对象
 | 
					        // 搜索框初始化对象
 | 
				
			||||||
@ -65,42 +138,56 @@ export default {
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
          title: "订单号",
 | 
					          title: "订单号",
 | 
				
			||||||
          key: "sn",
 | 
					          key: "sn",
 | 
				
			||||||
          minWidth: 230,
 | 
					          minWidth: 240,
 | 
				
			||||||
          tooltip: true,
 | 
					          tooltip: true,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					
 | 
				
			||||||
          title: "下单时间",
 | 
					 | 
				
			||||||
          key: "createTime",
 | 
					 | 
				
			||||||
          width: 200,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          title: "订单来源",
 | 
					          title: "订单来源",
 | 
				
			||||||
          key: "clientType",
 | 
					          key: "clientType",
 | 
				
			||||||
          width: 95,
 | 
					          width: 120,
 | 
				
			||||||
          render: (h, params) => {
 | 
					          render: (h, params) => {
 | 
				
			||||||
            if (params.row.clientType == "H5") {
 | 
					            if (params.row.clientType == "H5") {
 | 
				
			||||||
              return h("div",{},"移动端");
 | 
					              return h("div", {}, "移动端");
 | 
				
			||||||
            }else if(params.row.clientType == "PC") {
 | 
					            } else if (params.row.clientType == "PC") {
 | 
				
			||||||
              return h("div",{},"PC端");
 | 
					              return h("div", {}, "PC端");
 | 
				
			||||||
            }else if(params.row.clientType == "WECHAT_MP") {
 | 
					            } else if (params.row.clientType == "WECHAT_MP") {
 | 
				
			||||||
              return h("div",{},"小程序端");
 | 
					              return h("div", {}, "小程序端");
 | 
				
			||||||
            }else if(params.row.clientType == "APP") {
 | 
					            } else if (params.row.clientType == "APP") {
 | 
				
			||||||
              return h("div",{},"移动应用端");
 | 
					              return h("div", {}, "移动应用端");
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					              return h("div", {}, params.row.clientType);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            else{
 | 
					          },
 | 
				
			||||||
               return h("div",{},params.row.clientType);
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          title: "订单类型",
 | 
				
			||||||
 | 
					          key: "orderType",
 | 
				
			||||||
 | 
					          width: 120,
 | 
				
			||||||
 | 
					          render: (h, params) => {
 | 
				
			||||||
 | 
					            if (params.row.orderType == "NORMAL") {
 | 
				
			||||||
 | 
					              return h("div", [h("span", {}, "普通订单")]);
 | 
				
			||||||
 | 
					            } else if (params.row.orderType == "PINTUAN") {
 | 
				
			||||||
 | 
					              return h("div", [h("span", {}, "拼团订单")]);
 | 
				
			||||||
 | 
					            } else if (params.row.orderType == "GIFT") {
 | 
				
			||||||
 | 
					              return h("div", [h("span", {}, "赠品订单")]);
 | 
				
			||||||
 | 
					            } else if (params.row.orderType == "VIRTUAL") {
 | 
				
			||||||
 | 
					              return h("div", [h("tag", {}, "核验订单")]);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          title: "买家名称",
 | 
					          title: "买家名称",
 | 
				
			||||||
          key: "memberName",
 | 
					          key: "memberName",
 | 
				
			||||||
          width: 130,
 | 
					          minWidth: 130,
 | 
				
			||||||
 | 
					          tooltip: true,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          title: "订单金额",
 | 
					          title: "订单金额",
 | 
				
			||||||
          key: "flowPrice",
 | 
					          key: "flowPrice",
 | 
				
			||||||
          minWidth: 120,
 | 
					          minWidth: 100,
 | 
				
			||||||
 | 
					          tooltip: true,
 | 
				
			||||||
          render: (h, params) => {
 | 
					          render: (h, params) => {
 | 
				
			||||||
            return h(
 | 
					            return h(
 | 
				
			||||||
              "div",
 | 
					              "div",
 | 
				
			||||||
@ -112,7 +199,7 @@ export default {
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
          title: "订单状态",
 | 
					          title: "订单状态",
 | 
				
			||||||
          key: "orderStatus",
 | 
					          key: "orderStatus",
 | 
				
			||||||
          width: 95,
 | 
					          minWidth: 100,
 | 
				
			||||||
          render: (h, params) => {
 | 
					          render: (h, params) => {
 | 
				
			||||||
            if (params.row.orderStatus == "UNPAID") {
 | 
					            if (params.row.orderStatus == "UNPAID") {
 | 
				
			||||||
              return h("div", [h("span", {}, "未付款")]);
 | 
					              return h("div", [h("span", {}, "未付款")]);
 | 
				
			||||||
@ -131,12 +218,19 @@ export default {
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          title: "下单时间",
 | 
				
			||||||
 | 
					          key: "createTime",
 | 
				
			||||||
 | 
					          width: 170,
 | 
				
			||||||
 | 
					          sortable: true,
 | 
				
			||||||
 | 
					          sortType: "desc",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          title: "操作",
 | 
					          title: "操作",
 | 
				
			||||||
          key: "action",
 | 
					          key: "action",
 | 
				
			||||||
          align: "center",
 | 
					          align: "center",
 | 
				
			||||||
          width: 180,
 | 
					          width: 100,
 | 
				
			||||||
          render: (h, params) => {
 | 
					          render: (h, params) => {
 | 
				
			||||||
            return h("div", [
 | 
					            return h("div", [
 | 
				
			||||||
              h(
 | 
					              h(
 | 
				
			||||||
@ -280,4 +374,11 @@ export default {
 | 
				
			|||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
// 建议引入通用样式 可删除下面样式代码
 | 
					// 建议引入通用样式 可删除下面样式代码
 | 
				
			||||||
@import "@/styles/table-common.scss";
 | 
					@import "@/styles/table-common.scss";
 | 
				
			||||||
 | 
					.export {
 | 
				
			||||||
 | 
					  margin: 10px 20px 10px 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.export-excel-wrapper {
 | 
				
			||||||
 | 
					  display: inline;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 | 
				
			|||||||
@ -57,7 +57,7 @@
 | 
				
			|||||||
                <Input type="number" v-model="form.sort" clearable style="width: 10%" />
 | 
					                <Input type="number" v-model="form.sort" clearable style="width: 10%" />
 | 
				
			||||||
              </FormItem>
 | 
					              </FormItem>
 | 
				
			||||||
              <FormItem class="form-item-view-el" label="文章内容" prop="content">
 | 
					              <FormItem class="form-item-view-el" label="文章内容" prop="content">
 | 
				
			||||||
                <editor v-model="form.content"></editor>
 | 
					                <editor openXss v-model="form.content"></editor>
 | 
				
			||||||
              </FormItem>
 | 
					              </FormItem>
 | 
				
			||||||
              <FormItem label="是否展示" prop="openStatus">
 | 
					              <FormItem label="是否展示" prop="openStatus">
 | 
				
			||||||
                <i-switch size="large" v-model="form.openStatus" :true-value="open" :false-value="close">
 | 
					                <i-switch size="large" v-model="form.openStatus" :true-value="open" :false-value="close">
 | 
				
			||||||
@ -123,7 +123,7 @@ export default {
 | 
				
			|||||||
      searchTreeValue: "", // 切换
 | 
					      searchTreeValue: "", // 切换
 | 
				
			||||||
      form: {
 | 
					      form: {
 | 
				
			||||||
        // 添加或编辑表单对象初始化数据
 | 
					        // 添加或编辑表单对象初始化数据
 | 
				
			||||||
        openStatus:false,
 | 
					        openStatus: false,
 | 
				
			||||||
        title: "",
 | 
					        title: "",
 | 
				
			||||||
        categoryId: "",
 | 
					        categoryId: "",
 | 
				
			||||||
        sort: 1,
 | 
					        sort: 1,
 | 
				
			||||||
@ -380,7 +380,6 @@ export default {
 | 
				
			|||||||
          //为了在是否展示一列展示开关 需要改一下数据类型,最终提交再次更改
 | 
					          //为了在是否展示一列展示开关 需要改一下数据类型,最终提交再次更改
 | 
				
			||||||
          this.data = [];
 | 
					          this.data = [];
 | 
				
			||||||
          if (res.result.records.length > 0) {
 | 
					          if (res.result.records.length > 0) {
 | 
				
			||||||
 | 
					 | 
				
			||||||
            this.data = res.result.records;
 | 
					            this.data = res.result.records;
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@ -390,7 +389,6 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    handleSubmit() {
 | 
					    handleSubmit() {
 | 
				
			||||||
 | 
					 | 
				
			||||||
      this.$refs.form.validate((valid) => {
 | 
					      this.$refs.form.validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          this.submitLoading = true;
 | 
					          this.submitLoading = true;
 | 
				
			||||||
@ -403,7 +401,6 @@ export default {
 | 
				
			|||||||
                this.$Message.success("操作成功");
 | 
					                this.$Message.success("操作成功");
 | 
				
			||||||
                this.getDataList();
 | 
					                this.getDataList();
 | 
				
			||||||
                this.modalVisible = false;
 | 
					                this.modalVisible = false;
 | 
				
			||||||
 | 
					 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
          } else {
 | 
					          } else {
 | 
				
			||||||
@ -414,8 +411,6 @@ export default {
 | 
				
			|||||||
                this.$Message.success("操作成功");
 | 
					                this.$Message.success("操作成功");
 | 
				
			||||||
                this.getDataList();
 | 
					                this.getDataList();
 | 
				
			||||||
                this.modalVisible = false;
 | 
					                this.modalVisible = false;
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
@ -440,10 +435,25 @@ export default {
 | 
				
			|||||||
          this.form.categoryId = res.result.categoryId;
 | 
					          this.form.categoryId = res.result.categoryId;
 | 
				
			||||||
          this.treeValue = data.articleCategoryName;
 | 
					          this.treeValue = data.articleCategoryName;
 | 
				
			||||||
          this.form.id = data.id;
 | 
					          this.form.id = data.id;
 | 
				
			||||||
          this.form.content = res.result.content;
 | 
					          this.form.content = htmlEscape(res.result.content);
 | 
				
			||||||
          this.form.title = res.result.title;
 | 
					          this.form.title = res.result.title;
 | 
				
			||||||
          this.form.sort = res.result.sort;
 | 
					          this.form.sort = res.result.sort;
 | 
				
			||||||
            this.form.openStatus = res.result.openStatus
 | 
					          this.form.openStatus = res.result.openStatus;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    htmlEscape(text) {
 | 
				
			||||||
 | 
					      return text.replace(/[<>"&]/g, function (match, pos, originalText) {
 | 
				
			||||||
 | 
					        switch (match) {
 | 
				
			||||||
 | 
					          case "<":
 | 
				
			||||||
 | 
					            return "<";
 | 
				
			||||||
 | 
					          case ">":
 | 
				
			||||||
 | 
					            return ">";
 | 
				
			||||||
 | 
					          case "&":
 | 
				
			||||||
 | 
					            return "&";
 | 
				
			||||||
 | 
					          case '"':
 | 
				
			||||||
 | 
					            return """;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
				
			|||||||
@ -4,21 +4,10 @@
 | 
				
			|||||||
      <Row>
 | 
					      <Row>
 | 
				
			||||||
        <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
 | 
					        <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
 | 
				
			||||||
          <Form-item label="活动名称" prop="couponName">
 | 
					          <Form-item label="活动名称" prop="couponName">
 | 
				
			||||||
            <Input
 | 
					            <Input type="text" v-model="searchForm.couponName" placeholder="请输入活动名称" clearable style="width: 200px" />
 | 
				
			||||||
              type="text"
 | 
					 | 
				
			||||||
              v-model="searchForm.couponName"
 | 
					 | 
				
			||||||
              placeholder="请输入活动名称"
 | 
					 | 
				
			||||||
              clearable
 | 
					 | 
				
			||||||
              style="width: 200px"
 | 
					 | 
				
			||||||
            />
 | 
					 | 
				
			||||||
          </Form-item>
 | 
					          </Form-item>
 | 
				
			||||||
          <Form-item label="活动状态" prop="promotionStatus">
 | 
					          <Form-item label="活动状态" prop="promotionStatus">
 | 
				
			||||||
            <Select
 | 
					            <Select v-model="searchForm.promotionStatus" placeholder="请选择" clearable style="width: 200px">
 | 
				
			||||||
              v-model="searchForm.promotionStatus"
 | 
					 | 
				
			||||||
              placeholder="请选择"
 | 
					 | 
				
			||||||
              clearable
 | 
					 | 
				
			||||||
              style="width: 200px"
 | 
					 | 
				
			||||||
            >
 | 
					 | 
				
			||||||
              <Option value="NEW">未开始</Option>
 | 
					              <Option value="NEW">未开始</Option>
 | 
				
			||||||
              <Option value="START">已开始/上架</Option>
 | 
					              <Option value="START">已开始/上架</Option>
 | 
				
			||||||
              <Option value="END">已结束/下架</Option>
 | 
					              <Option value="END">已结束/下架</Option>
 | 
				
			||||||
@ -26,66 +15,27 @@
 | 
				
			|||||||
            </Select>
 | 
					            </Select>
 | 
				
			||||||
          </Form-item>
 | 
					          </Form-item>
 | 
				
			||||||
          <Form-item label="活动时间">
 | 
					          <Form-item label="活动时间">
 | 
				
			||||||
            <DatePicker
 | 
					            <DatePicker v-model="selectDate" type="daterange" clearable placeholder="选择起始时间" style="width: 200px"></DatePicker>
 | 
				
			||||||
              v-model="selectDate"
 | 
					 | 
				
			||||||
              type="daterange"
 | 
					 | 
				
			||||||
              clearable
 | 
					 | 
				
			||||||
              placeholder="选择起始时间"
 | 
					 | 
				
			||||||
              style="width: 200px"
 | 
					 | 
				
			||||||
            ></DatePicker>
 | 
					 | 
				
			||||||
          </Form-item>
 | 
					          </Form-item>
 | 
				
			||||||
          <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
 | 
					          <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
 | 
				
			||||||
        </Form>
 | 
					        </Form>
 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
      <Row class="operation padding-row">
 | 
					      <Row class="operation padding-row">
 | 
				
			||||||
        <Button @click="add" type="primary">添加</Button>
 | 
					        <Button @click="add" type="primary">添加优惠券</Button>
 | 
				
			||||||
        <Button @click="delAll">批量下架</Button>
 | 
					        <Button @click="delAll">批量下架</Button>
 | 
				
			||||||
        <!-- <Button @click="upAll" >批量上架</Button> -->
 | 
					        <!-- <Button @click="upAll" >批量上架</Button> -->
 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
      <Table
 | 
					      <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-select-cancel="cancelSelect" @on-selection-change="changeSelect">
 | 
				
			||||||
        :loading="loading"
 | 
					        <template slot-scope="{ row,index }" slot="action">
 | 
				
			||||||
        border
 | 
					          <Button v-if="!checked && row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="primary" size="small" style="margin-right: 10px" @click="edit(row)">编辑
 | 
				
			||||||
        :columns="columns"
 | 
					          </Button>
 | 
				
			||||||
        :data="data"
 | 
					          <Button v-if="!checked && row.promotionStatus === 'START' || row.promotionStatus === 'NEW'" type="error" size="small" style="margin-right: 10px" @click="remove(row)">下架
 | 
				
			||||||
        ref="table"
 | 
					          </Button>
 | 
				
			||||||
        sortable="custom"
 | 
					 | 
				
			||||||
        @on-sort-change="changeSort"
 | 
					 | 
				
			||||||
        @on-selection-change="changeSelect"
 | 
					 | 
				
			||||||
      >
 | 
					 | 
				
			||||||
        <template slot-scope="{ row }" slot="action">
 | 
					 | 
				
			||||||
          <Button
 | 
					 | 
				
			||||||
            v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'"
 | 
					 | 
				
			||||||
            type="primary"
 | 
					 | 
				
			||||||
            size="small"
 | 
					 | 
				
			||||||
            style="margin-right: 10px"
 | 
					 | 
				
			||||||
            @click="edit(row)"
 | 
					 | 
				
			||||||
          >编辑
 | 
					 | 
				
			||||||
          </Button
 | 
					 | 
				
			||||||
          >
 | 
					 | 
				
			||||||
          <Button
 | 
					 | 
				
			||||||
            v-if="row.promotionStatus === 'START' || row.promotionStatus === 'NEW'"
 | 
					 | 
				
			||||||
            type="error"
 | 
					 | 
				
			||||||
            size="small"
 | 
					 | 
				
			||||||
            style="margin-right: 10px"
 | 
					 | 
				
			||||||
            @click="remove(row)"
 | 
					 | 
				
			||||||
          >下架
 | 
					 | 
				
			||||||
          </Button
 | 
					 | 
				
			||||||
          >
 | 
					 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </Table>
 | 
					      </Table>
 | 
				
			||||||
      <Row type="flex" justify="end" class="page">
 | 
					      <Row type="flex" justify="end" class="page">
 | 
				
			||||||
        <Page
 | 
					        <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
 | 
				
			||||||
          :current="searchForm.pageNumber + 1"
 | 
					          show-total show-elevator show-sizer></Page>
 | 
				
			||||||
          :total="total"
 | 
					 | 
				
			||||||
          :page-size="searchForm.pageSize"
 | 
					 | 
				
			||||||
          @on-change="changePage"
 | 
					 | 
				
			||||||
          @on-page-size-change="changePageSize"
 | 
					 | 
				
			||||||
          :page-size-opts="[10, 20, 50]"
 | 
					 | 
				
			||||||
          size="small"
 | 
					 | 
				
			||||||
          show-total
 | 
					 | 
				
			||||||
          show-elevator
 | 
					 | 
				
			||||||
          show-sizer
 | 
					 | 
				
			||||||
        ></Page>
 | 
					 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
    </Card>
 | 
					    </Card>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
@ -94,13 +44,13 @@
 | 
				
			|||||||
<script>
 | 
					<script>
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  getPlatformCouponList,
 | 
					  getPlatformCouponList,
 | 
				
			||||||
  deletePlatformCoupon,
 | 
					 | 
				
			||||||
  updatePlatformCouponStatus,
 | 
					  updatePlatformCouponStatus,
 | 
				
			||||||
} from "@/api/promotion";
 | 
					} from "@/api/promotion";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "coupon",
 | 
					  name: "coupon",
 | 
				
			||||||
  components: {},
 | 
					  components: {},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      loading: true, // 表单加载状态
 | 
					      loading: true, // 表单加载状态
 | 
				
			||||||
@ -109,10 +59,11 @@ export default {
 | 
				
			|||||||
      modalTitle: "", // 添加或编辑标题
 | 
					      modalTitle: "", // 添加或编辑标题
 | 
				
			||||||
      searchForm: {
 | 
					      searchForm: {
 | 
				
			||||||
        // 搜索框初始化对象
 | 
					        // 搜索框初始化对象
 | 
				
			||||||
        pageNumber: 0, // 当前页数
 | 
					        pageNumber: 1, // 当前页数
 | 
				
			||||||
        pageSize: 10, // 页面大小
 | 
					        pageSize: 10, // 页面大小
 | 
				
			||||||
        sort: "startTime", // 默认排序字段
 | 
					        sort: "startTime", // 默认排序字段
 | 
				
			||||||
        order: "desc", // 默认排序方式
 | 
					        order: "desc", // 默认排序方式
 | 
				
			||||||
 | 
					        getType: "", // 默认排序方式
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      form: {
 | 
					      form: {
 | 
				
			||||||
        // 添加或编辑表单对象初始化数据
 | 
					        // 添加或编辑表单对象初始化数据
 | 
				
			||||||
@ -121,7 +72,7 @@ export default {
 | 
				
			|||||||
      // 表单验证规则
 | 
					      // 表单验证规则
 | 
				
			||||||
      formValidate: {
 | 
					      formValidate: {
 | 
				
			||||||
        promotionName: [
 | 
					        promotionName: [
 | 
				
			||||||
          {required: true, message: "不能为空", trigger: "blur"},
 | 
					          { required: true, message: "不能为空", trigger: "blur" },
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      submitLoading: false, // 添加或编辑提交状态
 | 
					      submitLoading: false, // 添加或编辑提交状态
 | 
				
			||||||
@ -138,15 +89,16 @@ export default {
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
          title: "活动名称",
 | 
					          title: "活动名称",
 | 
				
			||||||
          key: "promotionName",
 | 
					          key: "promotionName",
 | 
				
			||||||
          width: 120,
 | 
					          minWidth: 100,
 | 
				
			||||||
          fixed: "left",
 | 
					          fixed: "left",
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          title: "优惠券名称",
 | 
					          title: "优惠券名称",
 | 
				
			||||||
          key: "couponName",
 | 
					          key: "couponName",
 | 
				
			||||||
          width: 120,
 | 
					          minWidth: 100,
 | 
				
			||||||
          tooltip: true
 | 
					          tooltip: true,
 | 
				
			||||||
        }, {
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
          title: "面额/折扣",
 | 
					          title: "面额/折扣",
 | 
				
			||||||
          key: "price",
 | 
					          key: "price",
 | 
				
			||||||
          width: 120,
 | 
					          width: 120,
 | 
				
			||||||
@ -165,11 +117,14 @@ export default {
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
          title: "领取数量/总数量",
 | 
					          title: "领取数量/总数量",
 | 
				
			||||||
          key: "publishNum",
 | 
					          key: "publishNum",
 | 
				
			||||||
 | 
					          width: 150,
 | 
				
			||||||
          render: (h, params) => {
 | 
					          render: (h, params) => {
 | 
				
			||||||
            return h(
 | 
					            return h(
 | 
				
			||||||
              "div", params.row.receivedNum + "/" + params.row.publishNum)
 | 
					              "div",
 | 
				
			||||||
 | 
					              params.row.receivedNum + "/" + params.row.publishNum
 | 
				
			||||||
 | 
					            );
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          minWidth:130,
 | 
					          minWidth: 130,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          title: "优惠券类型",
 | 
					          title: "优惠券类型",
 | 
				
			||||||
@ -205,21 +160,28 @@ export default {
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          title: "活动时间",
 | 
					          title: "活动时间",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          render: (h, params) => {
 | 
					          render: (h, params) => {
 | 
				
			||||||
            return h("div", {
 | 
					            if (params.row.getType === "ACTIVITY") {
 | 
				
			||||||
              domProps:
 | 
					              return h("div", "长期有效");
 | 
				
			||||||
                {innerHTML: params.row.startTime + "<br/>" + params.row.endTime}
 | 
					            } else {
 | 
				
			||||||
            });
 | 
					              return h("div", {
 | 
				
			||||||
 | 
					                domProps: {
 | 
				
			||||||
 | 
					                  innerHTML:
 | 
				
			||||||
 | 
					                    params.row.startTime + "<br/>" + params.row.endTime,
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					              });
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          minWidth:150,
 | 
					 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          title: "状态",
 | 
					          title: "状态",
 | 
				
			||||||
 | 
					          width: 100,
 | 
				
			||||||
          key: "promotionStatus",
 | 
					          key: "promotionStatus",
 | 
				
			||||||
          fixed: "right",
 | 
					          fixed: "right",
 | 
				
			||||||
          render: (h, params) => {
 | 
					          render: (h, params) => {
 | 
				
			||||||
            let text = "未知",
 | 
					            let text = "未知",
 | 
				
			||||||
              color = "";
 | 
					              color = "red";
 | 
				
			||||||
            if (params.row.promotionStatus == "NEW") {
 | 
					            if (params.row.promotionStatus == "NEW") {
 | 
				
			||||||
              text = "未开始";
 | 
					              text = "未开始";
 | 
				
			||||||
              color = "default";
 | 
					              color = "default";
 | 
				
			||||||
@ -245,20 +207,38 @@ export default {
 | 
				
			|||||||
              ),
 | 
					              ),
 | 
				
			||||||
            ]);
 | 
					            ]);
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          minWidth:70,
 | 
					          minWidth: 70,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          title: "操作",
 | 
					          title: "操作",
 | 
				
			||||||
          slot: "action",
 | 
					          slot: "action",
 | 
				
			||||||
          align: "center",
 | 
					          align: "center",
 | 
				
			||||||
          fixed: "right",
 | 
					          fixed: "right",
 | 
				
			||||||
          minWidth: 140
 | 
					          maxWidth: 140,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      data: [], // 表单数据
 | 
					      data: [], // 表单数据
 | 
				
			||||||
      total: 0, // 表单数据总数
 | 
					      total: 0, // 表单数据总数
 | 
				
			||||||
 | 
					      selectCoupon: [], //本级选中的优惠券
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    // 是否为选中模式
 | 
				
			||||||
 | 
					    checked: {
 | 
				
			||||||
 | 
					      type: Boolean,
 | 
				
			||||||
 | 
					      default: false,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    //优惠券类型 查询参数
 | 
				
			||||||
 | 
					    getType: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    //已选择优惠券
 | 
				
			||||||
 | 
					    selectedList: {
 | 
				
			||||||
 | 
					      type: Array,
 | 
				
			||||||
 | 
					      default: [],
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  watch: {
 | 
					  watch: {
 | 
				
			||||||
    $route(to, from) {
 | 
					    $route(to, from) {
 | 
				
			||||||
      if (to.fullPath == "/promotion/manager-coupon") {
 | 
					      if (to.fullPath == "/promotion/manager-coupon") {
 | 
				
			||||||
@ -267,23 +247,38 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    // 选中优惠券 父级传值
 | 
				
			||||||
 | 
					    selectedList: {
 | 
				
			||||||
 | 
					      handler(val) {
 | 
				
			||||||
 | 
					        // 判断是否是父级回调给自己已选择优惠券
 | 
				
			||||||
 | 
					        if (val.length != 0) {
 | 
				
			||||||
 | 
					          this.selectCoupon = val;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      deep: true,
 | 
				
			||||||
 | 
					      immediate: true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    check() {
 | 
				
			||||||
 | 
					      // this.selectCoupon.push(this.selectList)
 | 
				
			||||||
 | 
					      this.$emit("selected", this.selectCoupon);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    init() {
 | 
					    init() {
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    add() {
 | 
					    add() {
 | 
				
			||||||
      this.$router.push({name: "add-platform-coupon"});
 | 
					      this.$router.push({ name: "add-platform-coupon" });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 跳转至领取详情页面 */
 | 
					    /** 跳转至领取详情页面 */
 | 
				
			||||||
    receiveInfo(v) {
 | 
					    receiveInfo(v) {
 | 
				
			||||||
      this.$router.push({name: "member-receive-coupon", query: {id: v.id}});
 | 
					      this.$router.push({ name: "member-receive-coupon", query: { id: v.id } });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    info(v) {
 | 
					    info(v) {
 | 
				
			||||||
      this.$router.push({name: "platform-coupon-info", query: {id: v.id}});
 | 
					      this.$router.push({ name: "platform-coupon-info", query: { id: v.id } });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePage(v) {
 | 
					    changePage(v) {
 | 
				
			||||||
      this.searchForm.pageNumber = v - 1;
 | 
					      this.searchForm.pageNumber = v;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
      this.clearSelectAll();
 | 
					      // this.clearSelectAll();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePageSize(v) {
 | 
					    changePageSize(v) {
 | 
				
			||||||
      this.searchForm.pageSize = v;
 | 
					      this.searchForm.pageSize = v;
 | 
				
			||||||
@ -305,7 +300,35 @@ export default {
 | 
				
			|||||||
    clearSelectAll() {
 | 
					    clearSelectAll() {
 | 
				
			||||||
      this.$refs.table.selectAll(false);
 | 
					      this.$refs.table.selectAll(false);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 取消已选择的数据
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    cancelSelect(selection, row) {
 | 
				
			||||||
 | 
					      console.log(row)
 | 
				
			||||||
 | 
					      let findCoupon = this.selectCoupon.find((item) => {
 | 
				
			||||||
 | 
					        return item.id == row.id;
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					      // 如果没有则添加
 | 
				
			||||||
 | 
					      if (!findCoupon) {
 | 
				
			||||||
 | 
					        this.selectCoupon.push(row);
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        // 有重复数据就删除
 | 
				
			||||||
 | 
					        this.selectCoupon.map((item, index) => {
 | 
				
			||||||
 | 
					          if (item.id == findCoupon.id) {
 | 
				
			||||||
 | 
					            this.selectCoupon.splice(index, 1);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 选择优惠券
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    changeSelect(e) {
 | 
					    changeSelect(e) {
 | 
				
			||||||
 | 
					      if (this.checked && e.length != 0) {
 | 
				
			||||||
 | 
					        this.selectCoupon.push(...e);
 | 
				
			||||||
 | 
					        this.check();
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
      this.selectList = e;
 | 
					      this.selectList = e;
 | 
				
			||||||
      this.selectCount = e.length;
 | 
					      this.selectCount = e.length;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@ -322,6 +345,18 @@ export default {
 | 
				
			|||||||
      getPlatformCouponList(this.searchForm).then((res) => {
 | 
					      getPlatformCouponList(this.searchForm).then((res) => {
 | 
				
			||||||
        this.loading = false;
 | 
					        this.loading = false;
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
 | 
					          res.result.records.forEach((item) => {
 | 
				
			||||||
 | 
					            if (this.selectCoupon.length != 0) {
 | 
				
			||||||
 | 
					              this.selectCoupon.forEach((child) => {
 | 
				
			||||||
 | 
					                if (item.id == child.id) {
 | 
				
			||||||
 | 
					                  item.___selected = true;
 | 
				
			||||||
 | 
					                  item._checked = true;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					              });
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            item.___selected = false;
 | 
				
			||||||
 | 
					          });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          this.data = res.result.records;
 | 
					          this.data = res.result.records;
 | 
				
			||||||
          this.total = res.result.total;
 | 
					          this.total = res.result.total;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@ -363,7 +398,7 @@ export default {
 | 
				
			|||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    edit(v) {
 | 
					    edit(v) {
 | 
				
			||||||
      this.$router.push({name: "edit-platform-coupon", query: {id: v.id}});
 | 
					      this.$router.push({ name: "edit-platform-coupon", query: { id: v.id } });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    remove(v) {
 | 
					    remove(v) {
 | 
				
			||||||
      this.$Modal.confirm({
 | 
					      this.$Modal.confirm({
 | 
				
			||||||
@ -373,7 +408,10 @@ export default {
 | 
				
			|||||||
        loading: true,
 | 
					        loading: true,
 | 
				
			||||||
        onOk: () => {
 | 
					        onOk: () => {
 | 
				
			||||||
          // 删除
 | 
					          // 删除
 | 
				
			||||||
          updatePlatformCouponStatus({couponIds: v.id, promotionStatus: "CLOSE"})
 | 
					          updatePlatformCouponStatus({
 | 
				
			||||||
 | 
					            couponIds: v.id,
 | 
				
			||||||
 | 
					            promotionStatus: "CLOSE",
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
            .then((res) => {
 | 
					            .then((res) => {
 | 
				
			||||||
              this.$Modal.remove();
 | 
					              this.$Modal.remove();
 | 
				
			||||||
              if (res.success) {
 | 
					              if (res.success) {
 | 
				
			||||||
@ -449,6 +487,10 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    //如果作为组件方式,传入了类型值,则搜索参数附加类型
 | 
				
			||||||
 | 
					    if (this.getType) {
 | 
				
			||||||
 | 
					      this.searchForm.getType = this.getType;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    this.init();
 | 
					    this.init();
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -6,10 +6,10 @@
 | 
				
			|||||||
          <h4>基本信息</h4>
 | 
					          <h4>基本信息</h4>
 | 
				
			||||||
          <div class="form-item-view">
 | 
					          <div class="form-item-view">
 | 
				
			||||||
            <FormItem label="活动名称" prop="promotionName">
 | 
					            <FormItem label="活动名称" prop="promotionName">
 | 
				
			||||||
              <Input type="text" v-model="form.promotionName" placeholder="活动名称" clearable style="width: 260px" />
 | 
					              <Input type="text" v-model="form.promotionName" placeholder="活动名称" clearable style="width: 260px"/>
 | 
				
			||||||
            </FormItem>
 | 
					            </FormItem>
 | 
				
			||||||
            <FormItem label="优惠券名称" prop="couponName">
 | 
					            <FormItem label="优惠券名称" prop="couponName">
 | 
				
			||||||
              <Input type="text" v-model="form.couponName" placeholder="优惠券名称" clearable style="width: 260px" />
 | 
					              <Input type="text" v-model="form.couponName" placeholder="优惠券名称" clearable style="width: 260px"/>
 | 
				
			||||||
            </FormItem>
 | 
					            </FormItem>
 | 
				
			||||||
            <FormItem label="优惠券类型" prop="couponType">
 | 
					            <FormItem label="优惠券类型" prop="couponType">
 | 
				
			||||||
              <Select v-model="form.couponType" style="width: 260px">
 | 
					              <Select v-model="form.couponType" style="width: 260px">
 | 
				
			||||||
@ -18,11 +18,11 @@
 | 
				
			|||||||
              </Select>
 | 
					              </Select>
 | 
				
			||||||
            </FormItem>
 | 
					            </FormItem>
 | 
				
			||||||
            <FormItem label="折扣" prop="couponDiscount" v-if="form.couponType == 'DISCOUNT'">
 | 
					            <FormItem label="折扣" prop="couponDiscount" v-if="form.couponType == 'DISCOUNT'">
 | 
				
			||||||
              <Input type="number" v-model="form.couponDiscount" placeholder="折扣" clearable style="width: 260px" />
 | 
					              <Input type="number" v-model="form.couponDiscount" placeholder="折扣" clearable style="width: 260px"/>
 | 
				
			||||||
              <span class="describe">请输入0-10之间数字,可以输入一位小数</span>
 | 
					              <span class="describe">请输入0-10之间数字,可以输入一位小数</span>
 | 
				
			||||||
            </FormItem>
 | 
					            </FormItem>
 | 
				
			||||||
            <FormItem label="面额" prop="price" v-if="form.couponType == 'PRICE'">
 | 
					            <FormItem label="面额" prop="price" v-if="form.couponType == 'PRICE'">
 | 
				
			||||||
              <Input type="text" v-model="form.price" placeholder="面额" clearable style="width: 260px" />
 | 
					              <Input type="text" v-model="form.price" placeholder="面额" clearable style="width: 260px"/>
 | 
				
			||||||
            </FormItem>
 | 
					            </FormItem>
 | 
				
			||||||
            <FormItem label="活动类型" prop="getType">
 | 
					            <FormItem label="活动类型" prop="getType">
 | 
				
			||||||
              <Select v-model="form.getType" style="width: 260px">
 | 
					              <Select v-model="form.getType" style="width: 260px">
 | 
				
			||||||
@ -33,33 +33,49 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            <FormItem label="店铺承担比例" prop="storeCommission">
 | 
					            <FormItem label="店铺承担比例" prop="storeCommission">
 | 
				
			||||||
              <Input v-model="form.storeCommission" placeholder="店铺承担比例" style="width: 260px">
 | 
					              <Input v-model="form.storeCommission" placeholder="店铺承担比例" style="width: 260px">
 | 
				
			||||||
              <span slot="append">%</span>
 | 
					                <span slot="append">%</span>
 | 
				
			||||||
              </Input>
 | 
					              </Input>
 | 
				
			||||||
              <span class="describe">店铺承担比例,输入0-100之间数值</span>
 | 
					              <span class="describe">店铺承担比例,输入0-100之间数值</span>
 | 
				
			||||||
            </FormItem>
 | 
					            </FormItem>
 | 
				
			||||||
            <FormItem label="发放数量" prop="publishNum">
 | 
					            <FormItem label="发放数量" prop="publishNum" v-if="form.getType==='FREE'">
 | 
				
			||||||
              <Input v-model="form.publishNum" placeholder="发放数量" style="width: 260px" />
 | 
					              <Input v-model="form.publishNum" placeholder="发放数量" style="width: 260px"/>
 | 
				
			||||||
 | 
					            </FormItem>
 | 
				
			||||||
 | 
					            <FormItem label="领取数量限制" prop="couponLimitNum" v-if="form.getType==='FREE'">
 | 
				
			||||||
 | 
					              <Input v-model="form.couponLimitNum" placeholder="领取限制" clearable style="width: 260px"/>
 | 
				
			||||||
 | 
					            </FormItem>
 | 
				
			||||||
 | 
					            <FormItem label="范围描述" prop="description">
 | 
				
			||||||
 | 
					              <Input v-model="form.description" type="textarea" :rows="4" maxlength="50" show-word-limit clearable
 | 
				
			||||||
 | 
					                     style="width: 260px"/>
 | 
				
			||||||
            </FormItem>
 | 
					            </FormItem>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
          <h4>使用限制</h4>
 | 
					          <h4>使用限制</h4>
 | 
				
			||||||
          <div class="form-item-view">
 | 
					          <div class="form-item-view">
 | 
				
			||||||
            <FormItem label="消费门槛" prop="consumeThreshold">
 | 
					            <FormItem label="消费门槛" prop="consumeThreshold">
 | 
				
			||||||
              <Input type="text" v-model="form.consumeThreshold" placeholder="消费门槛" clearable style="width: 260px" />
 | 
					              <Input type="text" v-model="form.consumeThreshold" placeholder="消费门槛" clearable style="width: 260px"/>
 | 
				
			||||||
            </FormItem>
 | 
					 | 
				
			||||||
            <FormItem label="领取限制" prop="couponLimitNum">
 | 
					 | 
				
			||||||
              <Input v-model="form.couponLimitNum" placeholder="领取限制" clearable style="width: 260px" />
 | 
					 | 
				
			||||||
            </FormItem>
 | 
					            </FormItem>
 | 
				
			||||||
            <FormItem label="有效期" prop="rangeTime">
 | 
					            <FormItem label="有效期" prop="rangeTime">
 | 
				
			||||||
              <DatePicker
 | 
					              <div v-if="form.getType == 'ACTIVITY'">
 | 
				
			||||||
                type="datetimerange"
 | 
					                <RadioGroup v-model="rangeTimeType">
 | 
				
			||||||
                v-model="form.rangeTime"
 | 
					
 | 
				
			||||||
                format="yyyy-MM-dd HH:mm:ss"
 | 
					                  <Radio :label="1">
 | 
				
			||||||
                placeholder="请选择"
 | 
					                    起止时间
 | 
				
			||||||
                :options="options"
 | 
					                  </Radio>
 | 
				
			||||||
                style="width: 260px"
 | 
					                  <Radio :label="0">固定时间</Radio>
 | 
				
			||||||
              >
 | 
					
 | 
				
			||||||
              </DatePicker>
 | 
					                </RadioGroup>
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
 | 
					              <div v-if="rangeTimeType == 1">
 | 
				
			||||||
 | 
					                <DatePicker type="datetimerange" v-model="form.rangeTime" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择"
 | 
				
			||||||
 | 
					                            :options="options" style="width: 260px">
 | 
				
			||||||
 | 
					                </DatePicker>
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
 | 
					              <div class="effectiveDays" v-if="rangeTimeType == 0">
 | 
				
			||||||
 | 
					                领取当天开始
 | 
				
			||||||
 | 
					                <InputNumber v-model="form.effectiveDays" :min="1" style="width:100px;" :max="365"/>
 | 
				
			||||||
 | 
					                天内有效(1-365间的整数)
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
            </FormItem>
 | 
					            </FormItem>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <FormItem label="使用范围" prop="scopeType">
 | 
					            <FormItem label="使用范围" prop="scopeType">
 | 
				
			||||||
              <RadioGroup type="button" button-style="solid" v-model="form.scopeType">
 | 
					              <RadioGroup type="button" button-style="solid" v-model="form.scopeType">
 | 
				
			||||||
                <Radio label="ALL">全品类</Radio>
 | 
					                <Radio label="ALL">全品类</Radio>
 | 
				
			||||||
@ -75,20 +91,17 @@
 | 
				
			|||||||
              </div>
 | 
					              </div>
 | 
				
			||||||
              <Table border :columns="columns" :data="form.promotionGoodsList" @on-selection-change="changeSelect">
 | 
					              <Table border :columns="columns" :data="form.promotionGoodsList" @on-selection-change="changeSelect">
 | 
				
			||||||
                <template slot-scope="{ row }" slot="QRCode">
 | 
					                <template slot-scope="{ row }" slot="QRCode">
 | 
				
			||||||
                  <img :src="row.QRCode || '../../../assets/lili.png'" width="50px" height="50px" alt="" />
 | 
					                  <img :src="row.QRCode || '../../../assets/lili.png'" width="50px" height="50px" alt=""/>
 | 
				
			||||||
                </template>
 | 
					                </template>
 | 
				
			||||||
              </Table>
 | 
					              </Table>
 | 
				
			||||||
            </FormItem>
 | 
					            </FormItem>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <FormItem v-if="form.scopeType == 'PORTION_GOODS_CATEGORY'">
 | 
					            <FormItem v-if="form.scopeType == 'PORTION_GOODS_CATEGORY'">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
              <Cascader @on-change="getGoodsCategory" :data="goodsCategoryList" style="width:300px;" v-model="form.scopeIdGoods"></Cascader>
 | 
					              <Cascader @on-change="getGoodsCategory" :data="goodsCategoryList" style="width:300px;"
 | 
				
			||||||
 | 
					                        v-model="form.scopeIdGoods"></Cascader>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            </FormItem>
 | 
					            </FormItem>
 | 
				
			||||||
 | 
					 | 
				
			||||||
            <FormItem label="范围描述" prop="description">
 | 
					 | 
				
			||||||
              <Input v-model="form.description" type="textarea" :rows="4" maxlength="50" show-word-limit clearable style="width: 260px" />
 | 
					 | 
				
			||||||
            </FormItem>
 | 
					 | 
				
			||||||
            <div>
 | 
					            <div>
 | 
				
			||||||
              <Button type="text" @click="closeCurrentPage">返回</Button>
 | 
					              <Button type="text" @click="closeCurrentPage">返回</Button>
 | 
				
			||||||
              <Button type="primary" :loading="submitLoading" @click="handleSubmit">提交</Button>
 | 
					              <Button type="primary" :loading="submitLoading" @click="handleSubmit">提交</Button>
 | 
				
			||||||
@ -107,8 +120,8 @@ import {
 | 
				
			|||||||
  getPlatformCoupon,
 | 
					  getPlatformCoupon,
 | 
				
			||||||
  editPlatformCoupon,
 | 
					  editPlatformCoupon,
 | 
				
			||||||
} from "@/api/promotion";
 | 
					} from "@/api/promotion";
 | 
				
			||||||
import { getCategoryTree } from "@/api/goods";
 | 
					import {getCategoryTree} from "@/api/goods";
 | 
				
			||||||
import { regular } from "@/utils";
 | 
					import {regular} from "@/utils";
 | 
				
			||||||
import skuSelect from "@/views/lili-dialog";
 | 
					import skuSelect from "@/views/lili-dialog";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
@ -116,6 +129,16 @@ export default {
 | 
				
			|||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    skuSelect,
 | 
					    skuSelect,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
 | 
					    "form.getType": {
 | 
				
			||||||
 | 
					      handler(val) {
 | 
				
			||||||
 | 
					        if (val == "FREE") {
 | 
				
			||||||
 | 
					          this.rangeTimeType = 1;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      deep: true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    const checkPrice = (rule, value, callback) => {
 | 
					    const checkPrice = (rule, value, callback) => {
 | 
				
			||||||
      if (!value && value !== 0) {
 | 
					      if (!value && value !== 0) {
 | 
				
			||||||
@ -140,12 +163,13 @@ export default {
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
 | 
					      rangeTimeType: 1,
 | 
				
			||||||
      modalType: 0, // 是否编辑
 | 
					      modalType: 0, // 是否编辑
 | 
				
			||||||
      form: {
 | 
					      form: {
 | 
				
			||||||
        /** 店铺承担比例 */
 | 
					        /** 店铺承担比例 */
 | 
				
			||||||
        storeCommission: 0,
 | 
					        storeCommission: 0,
 | 
				
			||||||
        /** 发行数量 */
 | 
					        /** 发行数量 */
 | 
				
			||||||
        publishNum: 1,
 | 
					        publishNum: 0,
 | 
				
			||||||
        /** 运费承担者 */
 | 
					        /** 运费承担者 */
 | 
				
			||||||
        scopeType: "ALL",
 | 
					        scopeType: "ALL",
 | 
				
			||||||
        /** 限领数量 */
 | 
					        /** 限领数量 */
 | 
				
			||||||
@ -154,9 +178,11 @@ export default {
 | 
				
			|||||||
        couponType: "PRICE",
 | 
					        couponType: "PRICE",
 | 
				
			||||||
        /** 优惠券名称 */
 | 
					        /** 优惠券名称 */
 | 
				
			||||||
        couponName: "",
 | 
					        couponName: "",
 | 
				
			||||||
 | 
					        promotionName: "",
 | 
				
			||||||
        getType: "FREE",
 | 
					        getType: "FREE",
 | 
				
			||||||
        promotionGoodsList: [],
 | 
					        promotionGoodsList: [],
 | 
				
			||||||
        scopeIdGoods: [],
 | 
					        scopeIdGoods: [],
 | 
				
			||||||
 | 
					        rangeDayType: "",
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      id: this.$route.query.id, // 优惠券id
 | 
					      id: this.$route.query.id, // 优惠券id
 | 
				
			||||||
      submitLoading: false, // 添加或编辑提交状态
 | 
					      submitLoading: false, // 添加或编辑提交状态
 | 
				
			||||||
@ -169,38 +195,37 @@ export default {
 | 
				
			|||||||
        value: "id",
 | 
					        value: "id",
 | 
				
			||||||
      }, // 级联选择器配置项
 | 
					      }, // 级联选择器配置项
 | 
				
			||||||
      formRule: {
 | 
					      formRule: {
 | 
				
			||||||
        promotionName: [{ required: true, message: "活动名称不能为空" }],
 | 
					        promotionName: [{required: true, message: "活动名称不能为空"}],
 | 
				
			||||||
        couponName: [{ required: true, message: "优惠券名称不能为空" }],
 | 
					        couponName: [{required: true, message: "优惠券名称不能为空"}],
 | 
				
			||||||
        couponLimitNum: [{ required: true, message: "领取限制不能为空" }],
 | 
					 | 
				
			||||||
        price: [
 | 
					        price: [
 | 
				
			||||||
          { required: true, message: "请输入面额" },
 | 
					          {required: true, message: "请输入面额"},
 | 
				
			||||||
          { validator: checkPrice },
 | 
					          {validator: checkPrice},
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
        rangeTime: [{ required: true, message: "请选择优惠券有效期" }],
 | 
					        rangeTime: [{required: true, message: "请选择优惠券有效期"}],
 | 
				
			||||||
        consumeThreshold: [
 | 
					        consumeThreshold: [
 | 
				
			||||||
          { required: true, message: "请输入消费门槛" },
 | 
					          {required: true, message: "请输入消费门槛"},
 | 
				
			||||||
          { validator: checkWeight },
 | 
					          {validator: checkWeight},
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
        couponDiscount: [
 | 
					        couponDiscount: [
 | 
				
			||||||
          { required: true, message: "请输入折扣" },
 | 
					          {required: true, message: "请输入折扣"},
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            pattern: regular.discount,
 | 
					            pattern: regular.discount,
 | 
				
			||||||
            message: "请输入0-10的数字,可有一位小数",
 | 
					            message: "请输入0-10的数字,可有一位小数",
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
        storeCommission: [
 | 
					        storeCommission: [
 | 
				
			||||||
          { required: true, message: "请输入店铺承担比例" },
 | 
					          {required: true, message: "请输入店铺承担比例"},
 | 
				
			||||||
          { pattern: regular.rate, message: "请输入0-100的正整数" },
 | 
					          {pattern: regular.rate, message: "请输入0-100的正整数"},
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
        publishNum: [
 | 
					        publishNum: [
 | 
				
			||||||
          { required: true, message: "请输入发放数量" },
 | 
					          {required: true, message: "请输入发放数量"},
 | 
				
			||||||
          { pattern: regular.integer, message: "请输入正整数" },
 | 
					          {pattern: regular.integer, message: "请输入正整数"},
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
        couponLimitNum: [
 | 
					        couponLimitNum: [
 | 
				
			||||||
          { required: true, message: "请输入领取限制" },
 | 
					          {required: true, message: "领取限制不能为空"},
 | 
				
			||||||
          { pattern: regular.integer, message: "请输入正整数" },
 | 
					          {pattern: regular.integer, message: "请输入正整数"},
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
        description: [{ required: true, message: "请输入范围描述" }],
 | 
					        description: [{required: true, message: "请输入范围描述"}],
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      columns: [
 | 
					      columns: [
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@ -277,6 +302,7 @@ export default {
 | 
				
			|||||||
        if (!data.promotionGoodsList) data.promotionGoodsList = [];
 | 
					        if (!data.promotionGoodsList) data.promotionGoodsList = [];
 | 
				
			||||||
        if (data.scopeType == "PORTION_GOODS_CATEGORY") {
 | 
					        if (data.scopeType == "PORTION_GOODS_CATEGORY") {
 | 
				
			||||||
          let prevCascader = data.scopeId.split(",");
 | 
					          let prevCascader = data.scopeId.split(",");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          // console.log(prevCascader);
 | 
					          // console.log(prevCascader);
 | 
				
			||||||
          function next(params, prev) {
 | 
					          function next(params, prev) {
 | 
				
			||||||
            for (let i = 0; i < params.length; i++) {
 | 
					            for (let i = 0; i < params.length; i++) {
 | 
				
			||||||
@ -301,6 +327,7 @@ export default {
 | 
				
			|||||||
              }
 | 
					              }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          next(this.goodsCategoryList, []);
 | 
					          next(this.goodsCategoryList, []);
 | 
				
			||||||
          data.scopeIdGoods = prevCascader;
 | 
					          data.scopeIdGoods = prevCascader;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@ -314,13 +341,24 @@ export default {
 | 
				
			|||||||
      this.$refs.form.validate((valid) => {
 | 
					      this.$refs.form.validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          const params = JSON.parse(JSON.stringify(this.form));
 | 
					          const params = JSON.parse(JSON.stringify(this.form));
 | 
				
			||||||
          params.startTime = this.$options.filters.unixToDate(
 | 
					          // 判断当前活动类型
 | 
				
			||||||
            this.form.rangeTime[0] / 1000
 | 
					          params.getType != "ACTIVITY" ? delete params.effectiveDays : "";
 | 
				
			||||||
          );
 | 
					
 | 
				
			||||||
          params.endTime = this.$options.filters.unixToDate(
 | 
					          //判断当前时间类型
 | 
				
			||||||
            this.form.rangeTime[1] / 1000
 | 
					          if (this.rangeTimeType == 1) {
 | 
				
			||||||
          );
 | 
					            params.rangeDayType = "FIXEDTIME";
 | 
				
			||||||
          delete params.rangeTime
 | 
					            params.startTime = this.$options.filters.unixToDate(
 | 
				
			||||||
 | 
					              this.form.rangeTime[0] / 1000
 | 
				
			||||||
 | 
					            );
 | 
				
			||||||
 | 
					            params.endTime = this.$options.filters.unixToDate(
 | 
				
			||||||
 | 
					              this.form.rangeTime[1] / 1000
 | 
				
			||||||
 | 
					            );
 | 
				
			||||||
 | 
					            delete params.effectiveDays;
 | 
				
			||||||
 | 
					          } else {
 | 
				
			||||||
 | 
					            params.rangeDayType = "DYNAMICTIME";
 | 
				
			||||||
 | 
					            delete params.rangeTime;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          let scopeId = [];
 | 
					          let scopeId = [];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          if (
 | 
					          if (
 | 
				
			||||||
@ -328,7 +366,7 @@ export default {
 | 
				
			|||||||
            (!params.promotionGoodsList ||
 | 
					            (!params.promotionGoodsList ||
 | 
				
			||||||
              params.promotionGoodsList.length == 0)
 | 
					              params.promotionGoodsList.length == 0)
 | 
				
			||||||
          ) {
 | 
					          ) {
 | 
				
			||||||
            this.$Modal.warning({ title: "提示", content: "请选择指定商品" });
 | 
					            this.$Modal.warning({title: "提示", content: "请选择指定商品"});
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -336,7 +374,7 @@ export default {
 | 
				
			|||||||
            params.scopeType == "PORTION_GOODS_CATEGORY" &&
 | 
					            params.scopeType == "PORTION_GOODS_CATEGORY" &&
 | 
				
			||||||
            (!params.scopeIdGoods || params.scopeIdGoods.length == 0)
 | 
					            (!params.scopeIdGoods || params.scopeIdGoods.length == 0)
 | 
				
			||||||
          ) {
 | 
					          ) {
 | 
				
			||||||
            this.$Modal.warning({ title: "提示", content: "请选择商品分类" });
 | 
					            this.$Modal.warning({title: "提示", content: "请选择商品分类"});
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -392,12 +430,13 @@ export default {
 | 
				
			|||||||
      );
 | 
					      );
 | 
				
			||||||
      this.$router.go(-1);
 | 
					      this.$router.go(-1);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    openSkuList() { // 显示商品选择器
 | 
					    openSkuList() {
 | 
				
			||||||
 | 
					      // 显示商品选择器
 | 
				
			||||||
      this.$refs.skuSelect.open("goods");
 | 
					      this.$refs.skuSelect.open("goods");
 | 
				
			||||||
      let data = JSON.parse(JSON.stringify(this.form.promotionGoodsList))
 | 
					      let data = JSON.parse(JSON.stringify(this.form.promotionGoodsList));
 | 
				
			||||||
      data.forEach(e => {
 | 
					      data.forEach((e) => {
 | 
				
			||||||
        e.id = e.skuId
 | 
					        e.id = e.skuId;
 | 
				
			||||||
      })
 | 
					      });
 | 
				
			||||||
      this.$refs.skuSelect.goodsData = data;
 | 
					      this.$refs.skuSelect.goodsData = data;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changeSelect(e) {
 | 
					    changeSelect(e) {
 | 
				
			||||||
@ -434,15 +473,15 @@ export default {
 | 
				
			|||||||
      // 回显已选商品
 | 
					      // 回显已选商品
 | 
				
			||||||
      let list = [];
 | 
					      let list = [];
 | 
				
			||||||
      item.forEach((e) => {
 | 
					      item.forEach((e) => {
 | 
				
			||||||
          list.push({
 | 
					        list.push({
 | 
				
			||||||
            goodsName: e.goodsName,
 | 
					          goodsName: e.goodsName,
 | 
				
			||||||
            price: e.price,
 | 
					          price: e.price,
 | 
				
			||||||
            originalPrice: e.price,
 | 
					          originalPrice: e.price,
 | 
				
			||||||
            quantity: e.quantity,
 | 
					          quantity: e.quantity,
 | 
				
			||||||
            storeId: e.storeId,
 | 
					          storeId: e.storeId,
 | 
				
			||||||
            storeName: e.storeName,
 | 
					          storeName: e.storeName,
 | 
				
			||||||
            skuId: e.id,
 | 
					          skuId: e.id,
 | 
				
			||||||
          });
 | 
					        });
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      this.form.promotionGoodsList = list;
 | 
					      this.form.promotionGoodsList = list;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@ -480,7 +519,7 @@ export default {
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
          });
 | 
					          });
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return { value: item.id, label: item.name, children: item.children };
 | 
					        return {value: item.id, label: item.name, children: item.children};
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    filterCategory(list) {
 | 
					    filterCategory(list) {
 | 
				
			||||||
@ -522,10 +561,20 @@ h4 {
 | 
				
			|||||||
  line-height: 40px;
 | 
					  line-height: 40px;
 | 
				
			||||||
  text-align: left;
 | 
					  text-align: left;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.describe {
 | 
					.describe {
 | 
				
			||||||
  font-size: 12px;
 | 
					  font-size: 12px;
 | 
				
			||||||
  margin-left: 10px;
 | 
					  margin-left: 10px;
 | 
				
			||||||
  color: #999;
 | 
					  color: #999;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.effectiveDays {
 | 
				
			||||||
 | 
					  font-size: 12px;
 | 
				
			||||||
 | 
					  color: #999;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  > * {
 | 
				
			||||||
 | 
					    margin: 0 4px;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user