Răsfoiți Sursa

站点栏目管理

rkljw 10 luni în urmă
părinte
comite
61eaaf0cb2

+ 19 - 1
src/api/website.js

@@ -20,5 +20,23 @@ export default {
     //获取栏目列表
     websiteColumnList(parames) {
         return request.get("/website/getWebsiteColumn",parames)
-    }
+    },
+     //栏目列表
+     getWebsiteColumnList (parames){
+        return request.get("/website/getWebsiteColumnList",parames)
+    },
+    //删除栏目
+    delWebsiteColumn (parames){
+        return request.get("/website/delWebsiteColumn",parames)
+    },
+    
+    //添加栏目
+    addWebsiteColumn (parames){
+        return request.post("/website/addWebsiteColumn",parames)
+    },
+     //编辑栏目
+     updateWebsiteColumn (parames){
+        return request.post("/website/updateWebsiteColumn",parames)
+    },
+
 }

+ 4 - 2
src/components/PageHeader.vue

@@ -90,12 +90,12 @@ export default {
         console.log(e.data, '这里能收到嘛?')
       }
     })
-    console.log(this.$route)
+  
     this.$api.pub.getMenuList().then((res) => {
       this.$store.commit('navMenu/init', res.data)
       // this.$store.commit('navMenu/menu', res.data)
       
-      console.log( res.data,"==============")
+    
     })
     this.$api.user.loginUserInfo().then((res) => {
       this.$store.commit('user/init', res.data)
@@ -115,7 +115,9 @@ export default {
       let idx = -1
       for (let i = 0; i < arr.length; i++) {
         let item = arr[i]
+       
         if (action && item.action && action == item.action) {
+         
           idx = i
           break
         }

+ 0 - 235
src/components/address/addOrEdit.vue

@@ -1,235 +0,0 @@
-<!-- 新增编辑收货地址 -->
-<template>
-  <div class="box">
-    <div class="item marT20 w100">
-      <div class="item-title">
-        <span>收货人</span>
-        <span style="color: #F05271;">*</span>
-      </div>
-      <input placeholder="请填写收货人" type="text" v-model="consignee" />
-    </div>
-    <div class="item marT20 w100">
-      <div class="item-title">
-        <span>手机号码</span>
-        <span style="color: #F05271;">*</span>
-      </div>
-      <div class="flexHC w100">
-        <input placeholder="请填写手机号" type="text" v-model="mobile" />
-      </div>
-    </div>
-    <div class="item marT20 w100 ">
-      <div class="item-title">
-        <span>所在区域</span>
-        <span style="color: #F05271;">*</span>
-      </div>
-      <div class="address-detail w100">
-        <el-cascader
-          :key="cascaderKey"
-          v-model="areaSupplier"
-          placeholder="选择您的所在区域"
-          :props="cityData"
-          filterable
-        ></el-cascader>
-      </div>
-    </div>
-    <div class="item marT20 w100">
-      <div class="item-title">
-        <span>详细地址</span>
-        <span style="color: #F05271;">*</span>
-      </div>
-      <input placeholder="请填写详细地址" type="text" v-model="address" />
-    </div>
-    <div class="save-btn marT25 " @click="submit">保存地址</div>
-  </div>
-</template>
-
-<script>
-
-export default {
-  name: "addressDetail",
-  props:{
-    addrEditData:{
-      type:Object,
-      default:()=>{}
-    }
-  },
-  data() {
-    let self = this
-    return {
-      consignee: "",
-      mobile: "",
-      areaSupplier: [],
-      cascaderKey:0,
-      cityData: {
-        lazy: true,
-        async lazyLoad (node, resolve) {
-          console.log(node,'======node')
-          const { level, data } = node;  // 取出当前层级和选择数据
-          if (data && data.children && data.children.length !== 0) { // 提前加载数据切换后再点击回数据重复
-            return resolve(node)
-          }
-          let parentId = level == 0 ? 1 : data.value
-          let res = await self.$api.address.getAddressPCD(parentId)
-          if (res.data) {
-            const nodes = res.data.map(item => ({
-              value: item.regionId,
-              label: item.regionName,
-              leaf: level >= 2,
-              children: []
-            }))
-            resolve(nodes)
-          }
-        }
-      },
-      province:[],
-      address: "",
-      addressId: 0
-    };
-  },
-
-  mounted() {
-    this.regionData();
-  },
-
-  methods: {
-    regionData() {
-      if (JSON.stringify(this.addrEditData) != '{}') {
-        this.addressId = this.addrEditData.addressId;
-        this.consignee = this.addrEditData.consignee;
-        this.mobile = this.addrEditData.mobile;
-        const { province,city,district } = this.addrEditData
-        this.areaSupplier = [Number(province),Number(city),Number(district)];
-        console.log(this.areaSupplier,'----------1')
-        this.address = this.addrEditData.address;
-        this.cascaderKey++
-        // this.echoData({provinceId:province,cityId:city})
-      }
-    },
-    closeModal() {
-      this.$emit("closeModal", "1");
-    },
-    submit() {
-      if (!this.consignee) {
-        return this.$message.error('收货人不能为空')
-      }
-      if(this.consignee.length > 10){
-        return this.$message.error('收货人名称不能超过10字符')
-      }
-      if (!this.mobile) {
-        return this.$message.error('手机号不能为空')
-      }
-      if (
-        this.mobile.length != 11 ||
-        isNaN(this.mobile) ||
-        this.mobile.substring(0, 1) != 1
-      ) {
-        return this.$message.error('手机号格式不正确')
-      }
-      if (this.areaSupplier.length == 0) {
-        return this.$message.error('地址不能为空')
-      }
-      if (!this.address) {
-        return this.$message.error('详细地址不能为空')
-      }
-      if(this.address.length > 100){
-        return this.$message.error('详细地址不能超过100字符')
-      }
-      // 501 ali 100 wx
-      const params = {
-        addressId: this.addressId,
-        consignee: this.consignee,
-        mobile: this.mobile,
-        province: this.areaSupplier[0],
-        city: this.areaSupplier[1],
-        district: this.areaSupplier[2],
-        address: this.address
-      };
-      this.$emit("submitAddr", params);
-    }
-  }
-};
-</script>
-
-<style scoped>
-.box{
-  /* height: 60vh; */
-}
-.item-title {
-  font-size: 16px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #a1a1a3;
-  margin: 10px 0;
-}
-
-input {
-  width: calc(100% - 28px);
-  padding: 4px 14px;
-  background: #fafafa;
-  border-radius: 4px;
-  border: 1px solid #e8e7e8;
-  font-size: 16px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #323137;
-  line-height: 22px;
-}
-
-input:focus {
-  border: 1px solid #4d7cfe;
-}
-
-/deep/ .el-cascader {
-  width: 100%;
-}
-
-.address-detail /deep/ .el-input__inner {
-  background: #fafafa;
-  font-size: 16px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  color: #323137;
-  line-height: 22px;
-  padding: 0 14px;
-  border: 1px solid #e8e7e8;
-}
-
-.address-detail /deep/ .el-input__inner::-webkit-input-placeholder {
-  color: #999;
-}
-
-input::-webkit-input-placeholder {
-  /* WebKit, Blink, Edge */
-  color: #999;
-}
-
-input:-moz-placeholder {
-  /* Mozilla Firefox 4 to 18 */
-  color: #999;
-}
-
-input::-moz-placeholder {
-  /* Mozilla Firefox 19+ */
-  color: #999;
-}
-
-input:-ms-input-placeholder {
-  /* Internet Explorer 10-11 */
-  color: #999;
-}
-
-.save-btn {
-  margin: 20px auto 0;
-  width: 120px;
-  height: 32px;
-  line-height: 32px;
-  background: #5075fc;
-  border-radius: 5px;
-  text-align: center;
-  font-size: 14px;
-  font-family: PingFangSC-Medium, PingFang SC;
-  font-weight: 500;
-  color: #ffffff;
-  cursor: pointer;
-}
-</style>
-

+ 0 - 225
src/components/address/index.vue

@@ -1,225 +0,0 @@
-<!-- 收货地址列表 -->
-<template>
- <div>
-    <div class="address-list">
-        <ul>
-          <li v-for="item of addressList" :key="item.addressId">
-            <div style="display: flex">
-              <el-radio
-                v-model="radio"
-                :label="item.addressId"
-                @change="(val)=>change(val,item)"
-                >{{ "" }}</el-radio
-              >
-              <div class="user-info">
-                <p>
-                  {{ item.consignee }} {{ item.mobile}}
-                  <dfn v-if="item.defaultAddress" class="addr-default">默认</dfn>
-                </p>
-                <p>
-                  {{ item.fullAddress }}
-                </p>
-              </div>
-            </div>
-            <div class="edit-user-info">
-              <span @click="handleAddOrEdit(item)" class="edit" >修改地址<i class="el-icon-edit-outline"></i></span>
-              <span @click="defaultAddr(item)" class="edit" v-if="!item.defaultAddress">设为默认<i class="el-icon-s-flag"></i></span>
-              <span @click="del(item)" class="delete"  >删除地址<i class="el-icon-delete"></i></span>
-            </div>
-          </li>
-        </ul>
-      </div>
-      <div class="flex">
-        <div v-if="addressList.length>0" @click="submit" class="save-btn marT25 ">确认收货地址</div>
-        <div @click="handleAddOrEdit('')" class="save-btn marT25 margin-l20">新增收货地址</div>
-      </div>
- </div>
-</template>
-
-<script>
-export default {
-  name: "ManageAddress",
-  props: {
-    addressList: {
-      type: Array
-    },
-    currentAddrId:{
-      type:[String,Number]
-    }
-  },
-  data() {
-    return {
-      radio: "",
-      selectedRow: null
-    };
-  },
-  watch:{
-    "currentAddrId":{
-      immediate:true, 
-      handler: function(){
-        this.radio = this.currentAddrId
-        this.selectedRow = this.addressList.find(item=>item.addressId == this.currentAddrId)
-      }
-    }
-  },
-  mounted() {
-    let obj = this.addressList.find(item=>item.defaultAddress)
-    if(obj){
-      this.radio = obj.addressId
-      this.selectedRow = obj
-    }
-    // if(this.currentAddrId){
-    //   this.radio = this.currentAddrId
-    //   this.selectedRow = this.addressList.find(item=>item.addressId == this.currentAddrId)
-    // }
-  },
-  methods: {
-    change(val,row){
-      this.selectedRow = row
-    },
-    submit() {
-      if(!this.radio || !this.selectedRow) return this.$message.error('请选择收货地址')
-      this.$emit("changeAddress", this.selectedRow);
-    },
-    del(item) {
-      if(this.selectedRow.addressId){
-        if(this.selectedRow.addressId == item.addressId){
-          this.selectedRow = {}
-          this.radio = ''
-        }
-      }
-      this.$emit("deleteAddress", item);
-    },
-    defaultAddr(item){
-      this.$emit('defaultAddr',item)
-    },
-    handleAddOrEdit(item){
-      this.$emit('handleAddOrEdit',item)
-    }
-  },
-};
-</script>
-<style lang='less' scoped>
-.marT25{
-  margin-top: 25px;
-}
-.flex{
-  display: flex;
-  justify-content:center;
-}
-.margin-l20{
-  margin-left:20px;
-}
-.address-list {
-  color: #a1a1a3;
-  line-height: 22px;
-  width: 100%;
-  font-size: 14px;
-  max-height: 60vh;
-  overflow: hidden;
-  overflow-y: auto;
-}
-.address-list li {
-  display: flex;
-  width: 100%;
-  justify-content: space-between;
-  align-items: center;
-  margin-top: 18px;
-  border-bottom: 1px solid #f1f1f1;
-  padding-bottom: 18px;
-}
-.address-list .user-info p:first-child {
-  color: #000;
-  font-weight: bold;
-}
-.address-list .user-info p:last-child {
-  font-size: 12px;
-  color: #333;
-}
-.address-list .edit-user-info {
-  display: flex;
-  flex-direction: column;
-  align-items: end;
-  color: #999;
-}
-.edit-user-info i {
-  margin-right: 6px;
-}
-.edit-user-info span {
-  display: inline-block;
-  cursor: pointer;
-}
-.edit-user-info span.delete:hover {
-  color: #e83433;
-}
-.edit-user-info span.edit:hover {
-  color: #3370ff;
-}
-.addr-default {
-  width: 30px;
-  height: 14px;
-  background: rgba(80, 117, 252, 1);
-  border-radius: 3px;
-  font-size: 10px;
-  color: rgba(255, 255, 255, 1);
-  display: inline-block;
-  line-height: 14px;
-  text-align: center;
-  margin-left: 5px;
-}
-input {
-  width: calc(100% - 28px);
-  padding: 4px 14px;
-  background: #fafafa;
-  border-radius: 4px;
-  border: 1px solid #e8e7e8;
-  font-size: 16px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #323137;
-  line-height: 22px;
-}
-
-input:focus {
-  border: 1px solid #4d7cfe;
-}
-
-.el-cascader {
-  width: 100%;
-}
-.address-list /deep/ .el-radio {
-  margin: 4px 0 0 0;
-  padding: 0;
-}
-
-input::-webkit-input-placeholder {
-  /* WebKit, Blink, Edge */
-  color: #999;
-}
-
-input:-moz-placeholder {
-  /* Mozilla Firefox 4 to 18 */
-  color: #999;
-}
-
-input::-moz-placeholder {
-  /* Mozilla Firefox 19+ */
-  color: #999;
-}
-
-input:-ms-input-placeholder {
-  /* Internet Explorer 10-11 */
-  color: #999;
-}
-
-.save-btn {
-  width: 150px;
-  height: 32px;
-  background: #3370ff;
-  border-radius: 3px;
-  color: #ffffff;
-  cursor: pointer;
-  text-align: center;
-  line-height: 32px;
-}
-</style>

+ 0 - 62
src/components/pay/payAlert.vue

@@ -1,62 +0,0 @@
-<template>
-  <div class="alert">
-    <div
-      class="alert_error"
-      @click="ok"
-    ><a>遇到问题?重新支付</a></div>
-    <div
-      class="alert_ok"
-      @click="ok"
-    ><a>已完成支付</a></div>
-  </div>
-</template>
-
-<script>
-import { ElMessageBox, ElMessage } from 'element-plus'
-import api from "@/api/pay"
-export default {
-  name: "alert",
-  props: {
-    OrderNo: String
-  },
-  mounted () {
-  },
-  methods: {
-    error () {
-      this.$attrs.error()
-    },
-    ok () {
-      this.$attrs.ok()
-    }
-  }
-}
-</script >
-
-<style lang="less" scoped>
-.alert {
-  display: flex;
-  justify-content: center;
-}
-.alert_error a {
-  padding: 6px 16px;
-  font-size: 14px;
-  font-weight: 400;
-  color: #222222;
-  border: #ececec 1px solid;
-  border-radius: 16px;
-  cursor:pointer;
-}
-.alert_ok{
-  margin-left: 20px;
-}
-.alert_ok a {
-  background-color: #5379f9;
-  padding: 6px 16px;
-  font-size: 14px;
-  font-weight: 400;
-  color: #ffffff;
-  border-radius: 16px;
-  cursor:pointer;
-}
-
-</style>

+ 0 - 522
src/components/pay/payStep.vue

@@ -1,522 +0,0 @@
-<!-- 支付方式页 -->
-<template>
- <div>
-  <slot name="desc" v-if="step == 1 || step == 2"></slot>
-  <!-- 支付第一步 选择支付方式 start -->
-  <template v-if="step == 1">
-    <div class="font-weight margin-t20 margin-b20">支付方式</div>
-    <div class="pay_list">
-      <div :class="{'select_Type': active.index==index}"
-        class="pay-type-item"
-        v-for="(item,index) in paymentVOList"
-        :key="index"
-        @click="changeActive(index,item.code)">
-          <img :src="item.payImgPc">
-      </div>
-    </div>
-    <!-- 企业网银 支持的银行列表 start-->
-    <div
-      class="pay-bank-list"
-      v-if="isShowBankList" >
-      <div
-        v-for="(item,index) in bankList"
-        :key="index"
-        class="bank-item"
-        @click="handleBankPay(item)" >
-        <img
-          :src="item.logo"
-          class="bank-img" >
-      </div>
-    </div>
-    <!-- 企业网银 支持的银行列表 end-->
-    <div class="margin-t20 margin-b20 text-right" v-if="[9,17].indexOf(active.payId) != -1">
-      <el-button type="primary" size="small" :disabled="disabledPayBtn" @click="changeStep(2)">立即支付</el-button>
-    </div>
-  </template>
-  <!-- 支付第一步 选择支付方式 end -->
-
-  <!-- 支付第二步 微信或支付宝的支付码 start -->
-  <template v-if="step == 2 ">
-    <template v-if="[9,17].indexOf(active.payId) != -1">
-      <div class="QR-code-box">
-        <div class="margin-b20" :class="countDown === 0 ? 'text-lose-efficacy' : 'text-count-down'">
-          {{countDown === 0 ? '二维码已失效,点击刷新' : countDown + 'S后二维码失效,请尽快支付'}}
-        </div>
-        <div class="qrcode"
-              v-show="paymentData.qrCodeUrl">
-          <img :src="paymentData.qrImageUrl"
-                alt="qrcode">
-          <div v-if="countDown === 0"
-              class="qr-lose-efficacy"
-              @click="againPay">
-            <img class="qr-lose-efficacy-img"
-                  src="~@/assets/images/icon/refresh.png"
-                  alt="shuaxin">
-            <p>点击刷新</p>
-          </div>
-        </div>
-        <div class="pay-text">
-          <span>请使用手机打开{{active.payName}}扫描二维码完成支付</span>
-        </div>
-      </div>
-    </template>
-    <el-button type="text" @click="changeStep(1)">
-      <el-icon><ArrowLeftBold /></el-icon>
-      <span>选择其他支付方式</span>
-    </el-button>
-  </template>
-  <!-- 支付第二步 微信或支付宝的支付码 start -->
-
-  <!-- 支付第三步 查看支付结果 start -->
-  <template v-if="step == 3">
-    <div class="flex-center pay-status">
-      <!-- 支付结果支持 传入props(payResConfig),来对默认支付结果页做简单的修改;
-          也支持 插槽  <template v-slot:response> <div>自定义支付结果页</div> </template> -->
-      <slot name="response">
-        <img src="~@/assets/ok.png" />
-        <div class="margin-l20">
-          <div class="font-weight font-s20 margin-b20" >付款成功</div>
-          <div class="font-weight font-s18 margin-b20" v-if="payResConfig.subTitle">{{payResConfig.subTitle}}</div>
-          <div class="margin-b10">付款订单编号:{{paidRes.orderSns}}</div>
-          <div class="margin-b10">{{paidRes.payName}}:{{paidRes.orderAmount}}元</div>
-          <div class="margin-b20">
-            <el-button type="text" v-if="isShowPaidDetailBtn" @click="toDetail">查看付款订单详情</el-button>
-            <el-button type="text" @click="backList">返回列表</el-button>
-          </div>
-        </div>
-      </slot>
-    </div>
-  </template>
-  <!-- 支付第三步 查看支付结果 start -->
- </div>
-</template>
-
-<script>
-import { ElMessageBox, ElMessage } from 'element-plus'
-import alert from "./payAlert"
-import { h, resolveComponent } from "vue"
-export default {
- name: 'payType',
- data () {
-  return {
-    bankAndOrderData:{
-      paymentVOList:[
-        // { payImgPc:'https://baiyingxianniu.oss-cn-beijing.aliyuncs.com/images/common/payment_list/wxpay_pc.png'},
-        // { payImgPc:'https://baiyingxianniu.oss-cn-beijing.aliyuncs.com/images/common/payment_list/alipay_pc.png'},
-      ]
-    },
-    active:{
-      index:'-1',
-      payId:'',
-      payName:''
-    },
-    bankList:[],
-    step:1,
-    countDown: 60,
-    paymentData:{
-      // qrCodeUrl:'https://payment.china-clearing.com/Cashier/Im?q=MDEyOWhGWHk0T0NzSERYMSZjb2RlPTE2Ljg0Mg==',
-      // qrImageUrl:'https://payment.china-clearing.com/Cashier/Im?q=MDEyOWhGWHk0T0NzSERYMSZjb2RlPTE2Ljg0Mg=='
-    },
-    timer:null,
-    checkStatusTimer:null,
-    paidRes:{}
-  }
- },
- props:{
-  payOrderIdList:{
-    type: Array,
-    default:() => []
-  },
-  payResConfig:{
-    type: Object,
-    default:() => {
-      return {
-        title:'付款成功!',
-        subTitle:'', // 温馨提示:占用信用额度将返回可用额度,您可以继续申请采购!
-        showPaidDetailBtn:false // 如果是非批量支付,支付完成显示  【查看付款订单详情】 按钮,点击后的逻辑emit处理
-      }
-    }
-  }
-  //  shipAmount: {
-  //    type: String,
-  //    default: '0'
-  //  },
- },
- components: {},
- computed: {
-  isShowPaidDetailBtn(){
-    // 多单支付 不显示 查看付款订单详情 按钮
-    return this.payOrderIdList.length == 1 && this.payResConfig.showPaidDetailBtn
-  },
-  disabledPayBtn(){
-    const {payId}  = this.active
-    // 支付类型:;9-微信;17-支付宝 19 企业网银
-    return  !(payId == '9' || payId == '17' || payId == '')
-  },
-  paymentVOList(){
-    return this.bankAndOrderData.paymentVOList
-  },
-  isShowBankList(){
-    return this.active.payId == 19
-  }
- },
- methods: {
-    // 获取支付方式
-  async payOrderCashier () {
-      let params = {
-          payOrderIdList: this.payOrderIdList
-        }
-      const res = await this.$api.distributionMode.payOrderCashier(params)
-      if (res.code != 200) return this.$message.error(res.message || '系统开小差了~')
-      this.bankAndOrderData = res.data
-      this.$emit('payOrderCashier',res.data)
-  },
-  // 支付方式点击
-  async changeActive(index){
-      this.active = {
-        index,
-        ...this.paymentVOList[index]
-      }
-      if(this.paymentVOList[index].payId == 19){
-        this.bankList = this.paymentVOList[index].bankVoList
-      }
-  },
-  changeStep(step){
-    if(step == 2 && this.active.index == -1)  return this.$message.error("请选择支付方式")
-    if(step == 1){
-      // 初始化状态
-      this.initSetInterval()
-    }else if(step == 2){
-      this.getPaymentData()
-    }else if( step == 3){
-      // 啥也不干 通过改变this.step = 3 展示支付结果
-    }
-    this.step = step
-  },
-  // 刷新支付码
-  againPay(){
-    this.getPaymentData()
-  },
-  // 预单 (预先去中金那里生成一个待支付的订单)  返回支付码或者网银的支付链接
-  async getPaymentData(bankId){
-    let params = {
-        payOrderIdList: this.payOrderIdList,
-        payId: this.active.payId // 支付类型:;9-微信;17-支付宝 19 企业网银
-      }
-   
-    if (bankId && this.active.payId == 19){
-      params.bankId = bankId
-    }
-    const res = await this.$api.distributionMode.getPayQrCode(params)
-    if(res.code != 200) return this.$message.error(res.message || '系统开小差了~')
-    if([9,17].indexOf(this.active.payId) != -1){
-      // 微信 支付宝支付
-      this.countDown = res.data.expireTime // 二维码有效期 单位是s  没返回则是默认的60s
-      this.paymentData = res.data.paymentInfoVO
-      this.setIntervalFun() // 页面上的支付倒计时
-      this.checkPaidStatus()// 支付状态轮询
-    }else if(this.active.payId == 19){
-      // 企业网银支付
-      window.open(res.data.paymentInfoVO.ebankPayUrl)
-      this.toBankPay()
-    }
-  },
-  // 清除倒计时 包括支付Interval(timer) 和 轮询支付状态Interval(checkStatusTimer)
-  initSetInterval(){
-    clearInterval(this.timer)
-    clearInterval(this.checkStatusTimer)
-    this.countDown = 60
-    this.timer = null
-    this.checkStatusTimer = null
-    this.active = {
-      index:'-1',
-      payId:''
-    }
-  },
-  // 支付码有效期倒计时
-  async setIntervalFun () {
-    clearInterval(this.timer)
-    if (this.paymentData.qrCodeUrl) {
-      this.timer = setInterval(async () => {
-        if (this.countDown === 0) {
-          clearInterval(this.timer)
-          this.timer = null
-        } else {
-          this.countDown--
-        }
-      }, 1000)
-    }
-  },
-    // 每5s来检查一下支付状态
-  checkPaidStatus(){
-    clearInterval(this.checkStatusTimer)
-    this.checkStatusTimer = setInterval( () => {
-      this.getCheckStatus().then((res) => {
-        console.log(res,'0-0-0-0-0')
-        if (res) {
-          clearInterval(this.checkStatusTimer)
-          this.checkStatusTimer = null
-        }
-      }).catch(err=>{
-        console.log(err,'0-0-0-')
-      })
-    }, 5000)
-  },
-  // 获取支付状态
-  getCheckStatus(){
-    return new Promise( async (resolve, reject) =>{
-      let params = {
-          payOrderIdList: this.payOrderIdList
-      }
-      const res = await this.$api.distributionMode.getCheckPaid(params)
-      if(res.code !== 200){
-        reject(false)
-        return this.$message.error(res.message || '检查支付状态失败')
-      }else{
-        if (res.data.paid) {
-          this.paidRes = res.data
-          this.initSetInterval()
-          this.changeStep(3)
-          this.$emit('refresh')
-          resolve(true)
-        }else{
-          reject(false)
-        }
-      }
-    })
-  },
-  // 支付方式选择 企业网银
-  handleBankPay(item){
-    this.getPaymentData(item.code)
-  },
-  // 选择了某个银行  去支付  处理页面的等待支付结果逻辑
-  toBankPay(){
-    ElMessageBox.alert(
-            h(alert,
-              {
-                error () {
-                  ElMessageBox.close()
-                  this.getCheckStatus().then((res) => {
-                    console.log(res,'支付成功')
-                  }).catch(err=>{
-                    console.log(err,'0-0-0-')
-                    //失败 提示
-                    ElMessageBox.confirm(
-                        '检测到您尚未付款,请前去支付',
-                        {
-                          confirmButtonText: '去支付',
-                          center: true,
-                          showCancelButton: false,
-                          showClose: false,
-                          customClass: 'check_box',
-                        }
-                    )
-                  })
-
-                },
-                ok: () => {
-                  ElMessageBox.close()
-                  this.getCheckStatus().then((res) => {
-                      console.log(res,'支付成功')
-                    }).catch(err=>{
-                      console.log(err,'0-0-0-')
-                      //失败 提示
-                      ElMessageBox.confirm(
-                          '检测到您尚未付款,请前去支付',
-                          {
-                            confirmButtonText: '去支付',
-                            center: true,
-                            showCancelButton: false,
-                            showClose: false,
-                            customClass: 'check_box',
-                          }
-                      )
-                    })
-                }
-              }
-            ),
-            '',
-            {
-              dangerouslyUseHTMLString: true,
-              showClose: false,
-              showConfirmButton: false,
-              customClass: 'alert_class',
-
-            }
-          )
-  },
-  toDetail(){
-    this.$emit('toDetail')
-    this.$emit('backList')
-  },
-  backList(){
-    this.$emit('backList')
-  }
- },
- created () {
-  this.payOrderCashier()
- },
- beforeDestroy(){
-    this.initSetInterval()
-    this.step=1
- }
-}
-</script>
-<style lang='less' scoped>
-.font-weight{
-  font-weight: bold;
-}
-.margin-t20{
-  margin-top:20px;
-}
-.margin-b20{
-  margin-bottom: 20px;
-}
-.margin-b10{
-  margin-bottom: 10px;
-}
-.margin-l20{
-  margin-left: 20px;
-}
-.red{
-  color: #ff3d3d;
-}
-.font-s20{
-  font-size: 20px;
-}
-.font-s18{
-  font-size:18px;
-}
-.flex-between{
-  display: flex;
-  justify-content:space-between;
-}
-.flex-center{
-  display: flex;
-  justify-content:center;
-  align-items:center;
-}
-.text-right{
-  text-align: right;
-}
-.pay_list {
-  display: flex;
-  flex-wrap: wrap;
-  padding-right: 20px;
-  padding-bottom: 15px;
-  .pay-type-item{
-    border: #e6e6e6 1px solid;
-    border-radius:5px;
-    img{
-      width: 170px;
-      height: 40px;
-      cursor: pointer;
-    }
-  }
-  .pay-type-item+.pay-type-item{
-      margin-left: 20px;
-  }
-  .select_Type {
-    border: #a4b8fb 1px solid !important;
-  }
-}
-.pay-bank-list {
-  border: 1px solid #ebe6e6;
-  // width: 835px;
-  display: flex;
-  flex-wrap: wrap;
-  padding-right: 20px;
-  padding-bottom: 15px;
-  .bank-item {
-    margin-top: 15px;
-    margin-left: 20px;
-    border: #e6e6e6 1px solid;
-    cursor: pointer;
-    &:hover{
-     border: #a4b8fb 1px solid;
-    }
-    img {
-      width: 145px;
-      height: 42px;
-    }
-  }
-}
-
-.QR-code-box{
-  .text-count-down {
-      height: 14px;
-      font-size: 14px;
-      font-family: PingFangSC-Medium, PingFang SC;
-      font-weight: 500;
-      color: #25b6ed;
-      line-height: 14px;
-      margin-top: 16px;
-      text-align: center;
-  }
-  .text-lose-efficacy {
-      height: 14px;
-      font-size: 14px;
-      font-family: PingFangSC-Medium, PingFang SC;
-      font-weight: 500;
-      color: #888888;
-      line-height: 14px;
-      margin-top: 16px;
-      text-align: center;
-  }
-  .pay-text {
-      text-align: center;
-      margin-top: 11px;
-      line-height: 100%;
-  }
-  .qrcode{
-    width: 100%;
-    height: 143px;
-    text-align: center;
-    overflow: hidden;
-    position: relative;
-    // margin: 0 auto;
-    img {
-        width: 143px;
-        height: 143px;
-        transform: scale(1.4);
-    }
-    .qr-lose-efficacy {
-        width: 150px;
-        height: 143px;
-        position: absolute;
-        top: 0;
-        left: 0;
-        right: 0;
-        bottom: 0;
-        margin: auto;
-        background: #ffffff;
-        opacity: 0.94;
-        cursor: pointer;
-        text-align: center;
-        .qr-lose-efficacy-img {
-            width: 32px;
-            height: 32px;
-            margin-top: 46px;
-            transform: rotate(0deg);
-            transition: all 1.2s;
-        }
-        p {
-            height: 20px;
-            font-size: 13px;
-            font-family: PingFangSC-Medium, PingFang SC;
-            font-weight: 500;
-            color: #25b6ed;
-            line-height: 20px;
-            margin-top: 10px;
-            text-align: center;
-        }
-    }
-  }
-}
-.pay-status{
-  min-height: 300px;
-}
-.el-button--primary{
-  color: #fff;
-}
-</style>

+ 20 - 0
src/router/index.js

@@ -37,6 +37,26 @@ const routes = [{
                 component: () =>
                     import ('@views/website/index.vue')
             },
+            {
+                meta: {
+                    action: "websiteList",
+                    title: '站点角色'
+                },
+                path: 'websiteList/nice',
+                name: 'nice',
+                component: () =>
+                    import ('@views/website/index.vue')
+            },
+            {
+                meta: {
+                    action: "websiteColumn",
+                    title: '栏目管理'
+                },
+                path: 'websiteColumn',
+                name: 'websiteColumn',
+                component: () =>
+                    import ('@views/websiteColumn/index.vue')
+            }
            
         ]
     },

+ 0 - 1
src/views/LeftLayout.vue

@@ -69,7 +69,6 @@ export default {
         }else{
           this.url = pathname + '/' + hash
         }
-        console.log(this.url,'======url')
       }
     }
   },

+ 2 - 0
src/views/role/index.vue

@@ -292,6 +292,8 @@ import router from "../../router";
         })
       },
       searchFrom(){
+        this.currentPage = 1
+        this.pageSize = 10
         this.getList()
       },
       assignPermissions(row,index){

+ 2 - 1
src/views/website/index.vue

@@ -139,7 +139,6 @@
     methods: {
       // 获取菜单信息列表
       getList:function(){
-        console.log("#######################@@@")
         let _t = this;
         _t.loadingFlag = true;
         let parames = {
@@ -248,6 +247,8 @@
         })
       },
       searchFrom(){
+        this.currentPage = 1
+        this.pageSize = 10
         this.getList()
       }
 

+ 122 - 0
src/views/websiteColumn/components/edit.vue

@@ -0,0 +1,122 @@
+<template>
+  <div>
+    <el-form ref="form" :rules="rules"  :model="form" label-width="120px">
+      <el-form-item
+          label="栏目名称:"
+          prop="column_name"
+      >
+        <el-input v-model.number="form.column_name"  placeholder="请输入栏目名称"></el-input>
+      </el-form-item>
+      <el-form-item
+          label="父级栏目:"
+          prop="column_arr_id"
+      >
+      <el-cascader
+      v-model="form.column_arr_id"
+      :options="websiteColumnList"
+      :props="{
+                checkStrictly: true,
+                value:'id',
+                label:'column_name',
+                children:'children',
+              }" 
+      clearable></el-cascader>
+    </el-form-item>
+      <el-form-item label="sort:" prop="sort">
+        <el-input v-model="form.sort"  placeholder="请输入排序" ></el-input>
+      </el-form-item>
+      <el-form-item label="备注信息:" prop="remark">
+        <el-input v-model="form.remark"  placeholder="请输入站备注信息" ></el-input>
+      </el-form-item>
+      <el-form-item>
+        <div style="text-align: center">
+          <el-button type="primary" @click="onSubmit" :disabled="Isdisabled" :loading="isloading">保存</el-button>
+          <el-button style="color: #5075FC " @click="closeDlg">取消</el-button>
+        </div>
+      </el-form-item>
+    </el-form>
+  </div>
+</template>
+<script>
+export default {
+  props: {
+    websiteColumnDataForm: {
+      type: Object,
+      default: () => {}
+    },
+    isloading:{
+      type:Boolean,
+      default: true
+    },
+    closeDlg:{
+      type:Function
+    }
+  },
+  data() {
+    let self = this
+    return {
+      websiteColumnList:[],
+      form: {
+        id:'',
+        column_name: '',
+        column_arr_id:[0],
+        sort:"",
+        remark:"",
+      },
+      menulist: [],
+      Isdisabled: false,
+      rules: {
+        column_name: [
+          { required: true, message: '栏目名称必填' },
+        ],
+        column_arr_id: [
+          { required: true, message: '请选择栏目' }
+        ]
+      }
+    }
+  },
+  mounted() {
+    if(this.websiteColumnDataForm) {
+      this.form = Object.assign({} , this.websiteColumnDataForm)
+      this.form.column_arr_id =  this.websiteColumnDataForm.column_arr_id
+    }
+
+    this.getwebsiteColumnColumnList()
+  },
+  methods: {
+    closeDlg() {
+      // this.isloading = false
+      console.log("edit提交")
+      this.$emit('closeDlg',1)
+    },
+    onSubmit() {
+      let that = this
+      that.$refs['form'].validate((valid) => {
+        if (valid) {
+          this.$emit('websiteColumnSubmitClick', this.form)
+        }
+      })
+    },
+    getwebsiteColumnColumnList(){
+      console.log("fuck you =======")
+      let _t= this
+      let parames = {}
+     this.$api.website.websiteColumnList(parames).then(res=>{
+                if(res.code==200){
+                   console.log(res.data)
+                  _t.websiteColumnList = res.data
+                }else{
+                    this.$message.error("查询失败")
+                }
+            })
+    },
+
+    
+  }
+}
+</script>
+<style>
+.el-cascader-node>.el-radio{
+  margin-top:25px;
+}
+</style>

+ 261 - 0
src/views/websiteColumn/index.vue

@@ -0,0 +1,261 @@
+<template>
+    <div class="main-content__div">
+      <div class="table-box__div" v-cloak v-loading="loadingFlag">
+      <el-form  class="demo-form-inline">
+        <el-form-item label="栏目名称">
+          <el-input
+            placeholder="栏目名称"
+            v-model="keyWord"
+            style="width:150px;"
+            size="small"
+            >
+          </el-input>
+        </el-form-item>
+        
+        <!-- 搜索按钮 -->
+        <el-form-item>
+          <el-button type="primary" size="small" @click="searchFrom()">搜索</el-button>
+        </el-form-item>
+       
+      </el-form>
+      </div>
+      <!-- 列表 -->
+      <div class="table-box__div" v-cloak v-loading="loadingFlag">
+        <!-- 查询表单 -->
+        <el-form :inline="true" class="demo-form-inline">
+          <el-form-item>
+            <el-button type="primary" size="small" @click="addClick">添加栏目</el-button>
+          </el-form-item>
+        
+        </el-form>
+        <el-table
+          size="mini"
+          :data="tableData"
+          :empty-text="tableDataLoadingText"
+          style="width: 100%;font-size: 15px;"
+          :header-cell-style="{background:'#FAFAFA'}"
+        >
+          <el-table-column label="编号" width="150" prop="id"></el-table-column>
+          <el-table-column label="栏目名称" prop="column_name" width="250"></el-table-column>
+          <el-table-column label="父级栏目" prop="parent_column_name" width="200"></el-table-column>
+          <el-table-column label="排序" prop="sort" width="200"></el-table-column>
+          <el-table-column label="备注" prop="remark" width="200"></el-table-column>
+          <el-table-column label="更新时间" prop="updated_at" width="200"></el-table-column>
+
+          <el-table-column   prop="" label="操作" align="center" >
+                  <template v-slot="scope">
+                    <div style="display: flex;flex-direction: column;justify-content: center;align-items: center;">
+                      <span class="btn"  @click="updateClick(scope.row, scope.$index)">编辑</span>
+                      <span class="btn"  @click="deleteAuthority(scope.row,scope.$index)">删除</span>
+                    </div>
+                  </template>
+                </el-table-column>
+        </el-table>
+        <!-- 分页 -->
+        <div class="block" v-show="pagination" style="margin-top: 10px;float: right;">
+          <el-pagination
+            background
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-size="pageSize"
+            layout="total, prev, pager, next, jumper"
+            :total="parseInt(tableCount)">
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+  <Dialog title="温馨提示" content="您确认要删除该栏目吗?"
+          @close="DialogShow = false"
+          @submitSureClick="submitSureClickDel"
+          @DialogFalse="DialogShow = false"
+          :innerVisible="DialogShow">
+  </Dialog>
+  <DialogSlot
+      title="添加/编辑"
+      @close="websiteColumnDialogShow = false"
+      @DialogClose="websiteColumnDialogShow = false"
+      :innerVisible="websiteColumnDialogShow"
+      @colesClick="websiteColumnDialogShow  = false"
+  >
+    <editFrom
+        @colesClick="websiteColumnDialogShow = false"
+        :websiteColumnDataForm="websiteColumnDataForm"
+         :isloading="isloading"
+        @websiteColumnSubmitClick="websiteColumnSubmitClick"
+        @closeDlg="closeDlg"
+        >
+    </editFrom>
+  </DialogSlot>
+  </template>
+  <script>
+  import Dialog from "../../components/dialog";
+  import editFrom from "./components/edit";
+  import DialogSlot from "../../components/DialogSlot";
+  export default {
+    components: {
+      Dialog,
+      editFrom,
+      DialogSlot
+    },
+    data() {
+      return {
+        value:"1",
+        //  站点数据
+        tableData: [],
+        //  加载中数据提示
+        tableDataLoadingText:"拼命加载中······",
+        //  是否显示分页
+        pagination:false,
+        //  每页显示的条数
+        pageSize:10,
+        //  当前页
+        currentPage:1,
+        //  菜单列表数据总条数
+        tableCount:0,
+        keyWord:'',
+        loadingFlag: false,
+        isShowSource: false, // 是否显示来源列
+        id:0,
+        DialogShow: false, //控制删除弹窗
+        websiteColumnId:'',
+        websiteColumnRowIndex:'',
+        websiteColumnDataForm: {},
+        websiteColumnTableData: [],
+        isloading:false, //提交按钮状态
+        websiteColumnDialogShow: false, // 控制保存弹窗
+      }
+    },
+    mounted() {},
+    methods: {
+      // 获取菜单信息列表
+      getList:function(){
+        let _t = this;
+        _t.loadingFlag = true;
+        let parames = {
+            'page':this.currentPage,
+            'pageSize':this.pageSize,
+            'keyWord':this.keyWord
+        }
+        this.$api.website.getWebsiteColumnList(parames).then(res=>{
+                _t.loadingFlag = false;
+                if(res.code==200){
+                  if(res.data.rows.length==0){
+                    this.$message.error("没有数据了")
+                    return
+                  }
+                    _t.tableData = res.data.rows;
+                    _t.tableCount = res.data.count;
+                     //  总条数大于每页显示的条数时显示分页
+                    if( _t.tableCount > _t.pageSize ){
+                     _t.pagination = true;
+                    }
+                    if( _t.tableData.length==0 ){
+                     _t.tableDataLoadingText = "暂无数据";
+                    }
+                }else{
+                    this.$message.error("查询失败")
+                }
+            })
+      },
+      // 点击翻页
+      handleCurrentChange(val) {
+        this.currentPage = val;
+        this.getList();
+      },
+
+      addClick(){
+        this.websiteColumnDataForm = {}
+        this.websiteColumnDialogShow = true
+      },
+      //更新菜单
+      updateClick(row,index){
+        console.log(row)
+        this.websiteColumnDataForm = row
+        this.rowIndex = index
+        this.websiteColumnDialogShow = true
+      },
+      // websiteColumnDialogShow(){
+      //   this.isloading = false
+      // },
+      closeDlg(val){
+      
+          this.websiteColumnDialogShow = false
+          this.isloading = false
+      },
+      websiteColumnSubmitClick(data){
+        let _t = this
+        console.log("提交数据",data)
+        let parames = data
+        _t.isloading = true
+        //有id更新,没有新增
+        if(parames.id){
+          this.$api.website.updateWebsiteColumn(parames).then(res=>{
+                _t.loadingFlag = false;
+                if(res.code==200){
+                  _t.tableData[_t.rowIndex] = parames
+                     console.log("修改成功")
+                    //  location.reload();
+                    this.getList();
+                }else{
+                    this.$message.error("修改失败")
+                }
+                this.websiteColumnDialogShow = false
+                this.isloading = false
+            })
+        }else{
+          this.$api.website.addWebsiteColumn(parames).then(res=>{
+                _t.loadingFlag = false;
+                if(res.code==200){
+                     console.log("创建成功")
+                     this.getList();
+                }else{
+                    this.$message.error(res.message)
+                }
+                this.websiteColumnDialogShow = false
+                this.isloading = false
+            })
+        }
+       
+      },
+      //删除菜单
+      deleteAuthority(row, index) {
+        this.websiteColumnId = row.id
+        this.websiteColumnRowIndex = index
+        this.DialogShow = true
+      },
+      submitSureClickDel(row,index){
+        let parames = {
+          'id':this.websiteColumnId
+        }
+        this.$api.website.delWebsiteColumn(parames).then(res=>{
+          if(res.code==200){
+            this.DialogShow = false
+            this.tableData.splice(index, 1);
+            this.getList()
+          }else{
+            this.$message.error("删除失败")
+          }
+        })
+      },
+      searchFrom(){
+        this.currentPage = 1
+        this.pageSize = 10
+        this.getList()
+      }
+
+    },
+    created() {
+        this.getList();
+    }
+  }
+  </script>
+  <style >
+   .demo-form-inline{
+      display: flex;
+   }
+   .demo-form-inline .el-form-item{
+    margin: 0 20px;
+   }
+  </style>
+  
+