浏览代码

Merge branch 'test' of maopiao/mp-ui-pc into master

kk 2 年之前
父节点
当前提交
2adf01a652

+ 1 - 1
src/App.vue

@@ -16,4 +16,4 @@ export default  {
         }
     }
 }
-</script>
+</script>

+ 10 - 0
src/api/business/goods.js

@@ -97,3 +97,13 @@ export function cradCamiloList(urlParams, data) {
   })
 }
 
+// 查看关联商品
+export function associationList(urlParams, data) {
+  return request({
+    url: '/api/v1/mp/admin/goods/detail/relationTicket',
+    method: 'post',
+    data,
+    urlParams
+  })
+}
+

+ 1 - 1
src/api/common.js

@@ -12,7 +12,7 @@ export const publicFileSaveUrl = '/api/v1/mp/image/remote/upload/commpress/0'
 export const privateFileGetUrl = '/api/v1/mp/file/remote/download?name='
 
 // 云端公开可访问的BaseUrl
-export const publicFileGetUrl = process.env.NODE_ENV === "production" ? 'https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/':'https://mp-public-test-1307117429.cos.ap-shanghai.myqcloud.com/'
+export const publicFileGetUrl = process.env.NODE_ENV === "production" ? 'https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/':'https://mp-public-test-1309783959.cos.ap-shanghai.myqcloud.com/'
 
 /**
  * Put 方式上传图片

二进制
src/assets/images/imgbottom.png


二进制
src/assets/images/imgtop.png


+ 74 - 0
src/components/Association/index.vue

@@ -0,0 +1,74 @@
+<template>
+  <div>
+    <el-dialog title="查看关联盲票" :visible.sync="associationShow" :before-close="close">
+      <el-table :data="associationData">
+        <el-table-column property="boxId" label="盲票组Id" min-width="250" align="center"></el-table-column>
+        <el-table-column property="title" label="盲票组名称" min-width="250" align="center"></el-table-column>
+        <el-table-column property="status" label="状态" min-width="250" align="center">
+          <template slot-scope="{row}">
+            {{ row.status && JSON.parse(row.status).desc }}
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination :total="total" :page.sync="pageParams.pageNum" :limit.sync="pageParams.pageSize"
+                  @pagination="getList()"/>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {associationList} from "../../api/business/goods";
+
+export default {
+  name: "camilo",
+  props: {
+    associationShow: {
+      type: Boolean,
+      default: true
+    },
+    associationGoodsId: {
+      type: Number,
+      default: 0
+    },
+  },
+  data() {
+    return {
+      pageParams: {
+        pageNum: 1,
+        pageSize: 10
+      },
+      loading: false,
+      associationData: [],
+      total: 0,
+    };
+  },
+  mounted() {
+    this.getList()
+  },
+  methods: {
+    close() {
+      this.$emit('cancel')
+    },
+    getList() {
+      if (this.loading) {
+        return
+      }
+      this.loading = true
+      associationList('pageNum=' + this.pageParams.pageNum + '&pageSize=' + this.pageParams.pageSize + '&', {goodsId: this.associationGoodsId}).then(res => {
+        this.loading = false
+        if (res.code === 0) {
+          this.associationData = res.rows
+          this.total = res.total
+        }
+      }).catch(() => {
+        this.loading = false
+      })
+    },
+
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 1 - 1
src/permission.js

@@ -7,7 +7,7 @@ import { getToken } from '@/utils/auth'
 
 NProgress.configure({ showSpinner: false })
 
-const whiteList = ['/login', '/auth-redirect', '/bind', '/register', '/skip', '/jump']
+const whiteList = ['/homePage','/login', '/auth-redirect', '/bind', '/register', '/skip', '/jump']
 
 router.beforeEach((to, from, next) => {
   NProgress.start()

+ 5 - 0
src/router/index.js

@@ -38,6 +38,11 @@ export const constantRoutes = [
       }
     ]
   },
+  {
+    path: '/homePage',
+    component: (resolve) => require(['@/views/homePage'], resolve),
+    hidden: true
+  },
   {
     path: '/login',
     component: (resolve) => require(['@/views/login'], resolve),

+ 94 - 85
src/views/business/coupon/add.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="app-container coupon-add">
     <br>
+    <el-form ref="addItem" :model="addData" :rules="rules" label-width="160px">
     <el-row :gutter="10">
-      <el-col  :xs="{span: 22, offset: 0}" :sm=" {span: 18, offset: 0}" :lg="{span: 10, offset: 0}">
-        <el-form ref="addItem" :model="addData" :rules="rules" label-width="160px">
+      <el-col :xs="{span: 22, offset: 0}" :sm=" {span: 18, offset: 0}" :lg="{span: 10, offset: 0}">
           <el-form-item label="券名称:" prop="title">
             <el-input v-model="addData.title" :readonly="readonly" placeholder="请输入券名称" :maxlength="32" show-word-limit />
           </el-form-item>
@@ -14,11 +14,7 @@
             </el-radio-group>
           </el-form-item>
           <el-form-item v-if="addData.type === 1" label="是否新用户注册发放:">
-            <el-switch :disabled="readonly"
-              v-model="addData.isNewUserCoupon"
-              :active-value="1"
-              :inactive-value="0"
-            />
+            <el-switch :disabled="readonly" v-model="addData.isNewUserCoupon" :active-value="1" :inactive-value="0" />
           </el-form-item>
           <el-form-item label="券金额:" prop="discount">
             <el-input v-model.number="addData.discount" :readonly="readonly" type="number" :min="0" placeholder="请输入券券金额">
@@ -39,7 +35,7 @@
             </el-input>
             <div class="tip">若门店承担100%,则核销后公司不需要打款给门店,依此类推。</div>
           </el-form-item>
-          
+
           <el-form-item label="最低消费金额:" prop="minOrderAmt">
             <el-input v-model="addData.minOrderAmt" :readonly="readonly" type="number" placeholder="请输入可使用的最低消费金额">
               <template slot="append">元</template>
@@ -64,7 +60,7 @@
             <div style="color:#606266">{{ addData.usedQty }}</div>
           </el-form-item>
           <el-form-item label="使用说明:" prop="description">
-            <el-input type="textarea" rows="4" :readonly="readonly" v-model="addData.description" placeholder="请输入使用说明 对用户可见"/>
+            <el-input type="textarea" rows="4" :readonly="readonly" v-model="addData.description" placeholder="请输入使用说明 对用户可见" />
           </el-form-item>
           <el-form-item v-if="addData.type === 2" label="使用范围:" prop="useArea">
             <el-radio-group v-model="addData.useArea" :disabled="readonly || addData.status === 'on' || addData.status === 'off'">
@@ -81,68 +77,75 @@
               <el-radio :label="1">指定盲票</el-radio>
             </el-radio-group>
           </el-form-item>
-        </el-form>
+
       </el-col>
     </el-row>
     <el-row :gutter="18">
-     <el-col :span="18" :offset="2">
-       <div v-if="addData.useArea === 1 && addData.type === 1" style="padding: 0 20px">
-         <el-table :data="addData.ticketBoxList" height="300px">
-           <el-table-column label="盲票ID" prop="boxId" min-width="90" />
-           <el-table-column label="盲票图片" prop="picUrl" align="center">
-             <template slot-scope="{row}">
-               <a target="_black" v-if="row.picUrl && row.picUrl.split(',').length > 0" :href="`${IMG_URL + row.picUrl}`"><img :src="`${IMG_URL + row.picUrl.split(',')[0]}`" style="max-height: 37px;max-width: 54px"></a>
-               <span v-else>-</span>
-             </template>
-           </el-table-column>
-           <el-table-column label="盲票名称" prop="title" />
-           <el-table-column label="盲票面值" prop="facePrice" >
-             <template slot-scope="{row}">
-               ¥{{$numberFormat(row.facePrice)}}
-             </template>
-           </el-table-column>
-           <el-table-column label="盲票类型" prop="type">
-             <template slot-scope="{row}">
-               {{ row.type && JSON.parse(row.type).desc }}
-             </template>
-           </el-table-column>
-           <el-table-column label="盲票状态" prop="status">
-             <template slot-scope="{row}">
-               <el-tag :type="row.status && JSON.parse(row.status).value === 'on' ? 'success' : 'info'">{{ row.status && JSON.parse(row.status).desc }}</el-tag>
-             </template>
-           </el-table-column>
-           <el-table-column v-if="!readonly" prop="date" label="操作">
-             <template slot-scope="{ $index }">
-               <el-button type="text" class="del" @click="addData.ticketBoxList.splice($index, 1)">删除</el-button>
-             </template>
-           </el-table-column>
-         </el-table>
-         <br>
-         <el-button v-if="!readonly" type="primary" size="small" plain @click="funSelectShow">选择盲票</el-button> <span style="margin-left: 10px">已选盲票({{ addData.ticketBoxList.length }})</span>
-       </div>
-       <div v-if="addData.useArea === 1 && addData.type === 2" style="padding: 0 20px">
-         <el-table :data="channelList" height="300px">
-           <el-table-column label="门店编号" prop="channelId" min-width="90" />
-           <el-table-column label="门店名称" prop="name" />
-           <el-table-column label="手机号码" prop="mobile" />
-           <el-table-column label="上级渠道" prop="parentsName"/>
-           <el-table-column label="认证状态" prop="status">
-             <template slot-scope="{row}">
-               <el-tag :type="row.certifyStatus && JSON.parse(row.certifyStatus).value === 'y' ? 'success' : 'info'">{{ row.certifyStatus && JSON.parse(row.certifyStatus).desc }}</el-tag>
-             </template>
-           </el-table-column>
-           <el-table-column v-if="!readonly" prop="date" label="操作">
-             <template slot-scope="{ $index }">
-               <el-button type="text" class="del" @click="channelList.splice($index, 1)">删除</el-button>
-             </template>
-           </el-table-column>
-         </el-table>
-         <br>
-         <el-button v-if="!readonly" type="primary" size="small" plain @click="funChannelShow">选择门店</el-button> <span style="margin-left: 10px">已选门店({{ channelList.length }})</span>
-       </div>
-     </el-col>
+      <el-col :span="18" :offset="2">
+        <div v-if="addData.useArea === 1 && addData.type === 1" style="padding: 0 20px">
+          <el-table :data="addData.ticketBoxList" height="300px">
+            <el-table-column label="盲票ID" prop="boxId" min-width="90" />
+            <el-table-column label="盲票图片" prop="picUrl" align="center">
+              <template slot-scope="{row}">
+                <a target="_black" v-if="row.picUrl && row.picUrl.split(',').length > 0" :href="`${IMG_URL + row.picUrl}`"><img :src="`${IMG_URL + row.picUrl.split(',')[0]}`" style="max-height: 37px;max-width: 54px"></a>
+                <span v-else>-</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="盲票名称" prop="title" />
+            <el-table-column label="盲票面值" prop="facePrice">
+              <template slot-scope="{row}">
+                ¥{{$numberFormat(row.facePrice)}}
+              </template>
+            </el-table-column>
+            <el-table-column label="盲票类型" prop="type">
+              <template slot-scope="{row}">
+                {{ row.type && JSON.parse(row.type).desc }}
+              </template>
+            </el-table-column>
+            <el-table-column label="盲票状态" prop="status">
+              <template slot-scope="{row}">
+                <el-tag :type="row.status && JSON.parse(row.status).value === 'on' ? 'success' : 'info'">{{ row.status && JSON.parse(row.status).desc }}</el-tag>
+              </template>
+            </el-table-column>
+            <el-table-column v-if="!readonly" prop="date" label="操作">
+              <template slot-scope="{ $index }">
+                <el-button type="text" class="del" @click="addData.ticketBoxList.splice($index, 1)">删除</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+          <br>
+          <el-button v-if="!readonly" type="primary" size="small" plain @click="funSelectShow">选择盲票</el-button> <span style="margin-left: 10px">已选盲票({{ addData.ticketBoxList.length }})</span>
+        </div>
+        <div v-if="addData.useArea === 1 && addData.type === 2" style="padding: 0 20px">
+          <el-table :data="channelList" height="300px">
+            <el-table-column label="门店编号" prop="channelId" min-width="90" />
+            <el-table-column label="门店名称" prop="name" />
+            <el-table-column label="手机号码" prop="mobile" />
+            <el-table-column label="上级渠道" prop="parentsName" />
+            <el-table-column label="认证状态" prop="status">
+              <template slot-scope="{row}">
+                <el-tag :type="row.certifyStatus && JSON.parse(row.certifyStatus).value === 'y' ? 'success' : 'info'">{{ row.certifyStatus && JSON.parse(row.certifyStatus).desc }}</el-tag>
+              </template>
+            </el-table-column>
+            <el-table-column v-if="!readonly" prop="date" label="操作">
+              <template slot-scope="{ $index }">
+                <el-button type="text" class="del" @click="channelList.splice($index, 1)">删除</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+          <br>
+          <el-button v-if="!readonly" type="primary" size="small" plain @click="funChannelShow">选择门店</el-button> <span style="margin-left: 10px">已选门店({{ channelList.length }})</span>
+        </div>
+      </el-col>
     </el-row>
-
+    <el-row :gutter="18">
+      <el-col :span="18" :offset="0" style="margin-top: 30px;">
+        <el-form-item label="优惠券详情:" prop="couponDetail">
+          <wang-editor ref="editor" v-model="addData.couponDetail" />
+        </el-form-item>
+      </el-col>
+    </el-row>
+  </el-form>
     <el-row v-if="!readonly">
       <el-col :span="23" style="text-align: center">
         <el-button type="info" @click="$router.go(-1)">取消</el-button>
@@ -151,25 +154,27 @@
     </el-row>
 
     <!-- 弹出层 -->
-    <SelectTicket :select-show="selectShow" :value="addData.ticketBoxList" :excludeBoxIds="excludeBoxIds" @close="selectShow = false" @selectTicket="selectTicket"   v-if="selectShow"/>
+    <SelectTicket :select-show="selectShow" :value="addData.ticketBoxList" :excludeBoxIds="excludeBoxIds" @close="selectShow = false" @selectTicket="selectTicket" v-if="selectShow" />
     <!-- 弹出层 -->
-    <ChannelTicket :channel-show="channelShow" :value="channelList" :excludeChannelIds="excludeChannelIds" @close="channelShow = false" @channelTicket="channelTicket"   v-if="channelShow"/>
+    <ChannelTicket :channel-show="channelShow" :value="channelList" :excludeChannelIds="excludeChannelIds" @close="channelShow = false" @channelTicket="channelTicket" v-if="channelShow" />
   </div>
 </template>
 <script>
 import Upload from '@/components/ImageUpload'
+import WangEditor from '@/components/WangEditor'
 import SelectTicket from './components/selectTicket'
 import ChannelTicket from './components/channelTicket'
 import { publicFileGetUrl } from '@/api/common'
 import { getCouponDetail, addCoupon } from '@/api/business/coupon'
 import { accDiv, accMul } from '@/utils/util'
-import {addData} from "../../../api/system/dict/data";
+import { addData } from "../../../api/system/dict/data";
 export default {
   name: 'CouponAdd',
   components: {
     Upload,
     SelectTicket,
-    ChannelTicket
+    ChannelTicket,
+    WangEditor
   },
   data() {
     return {
@@ -178,13 +183,13 @@ export default {
       readonly: this.$route.name === 'CouponQuery',
       channelList: [],
       addData: {
-        ticketBoxList:[],
+        ticketBoxList: [],
         useArea: 5,
         isNewUserCoupon: 0,
         dueDays: 90,
         type: 2,
-        channelSharedRate:0,
-        minOrderAmt:0,
+        channelSharedRate: 0,
+        minOrderAmt: 0,
         status: '',
       },
       addIng: false,
@@ -223,26 +228,30 @@ export default {
   created() {
     if (this.id) {
       getCouponDetail(this.id).then(res => {
-        const { couponId, title,isNewUserCoupon, quantity, discount, channelSharedRate, minOrderAmt, dueDays, description,usedQty, ticketBoxList, channelList, status } = res.data
+        const { couponId, title, isNewUserCoupon, quantity, discount, channelSharedRate, minOrderAmt, dueDays, description, usedQty, ticketBoxList, channelList, status,couponDetail } = res.data
         this.addData = {
           type: JSON.parse(res.data.type).value,
           useArea: JSON.parse(res.data.useArea).value,
-          isNewUserCoupon: isNewUserCoupon ? 1 : 0 ,
+          isNewUserCoupon: isNewUserCoupon ? 1 : 0,
           status: JSON.parse(res.data.status).value,
+          couponDetail: couponDetail?couponDetail:'',
           discount: accDiv(discount, 100),
           minOrderAmt: accDiv(minOrderAmt, 100),
-          couponId, title, quantity, channelSharedRate, dueDays, description, ticketBoxList,usedQty
+          couponId, title, quantity, channelSharedRate, dueDays, description, ticketBoxList, usedQty,
+        }
+        if (couponDetail) {
+          this.$refs.editor.setContent(couponDetail)
         }
         this.channelList = channelList
       })
     }
   },
   methods: {
-    funSelectShow(){
+    funSelectShow() {
       this.excludeBoxIds = this.addData.ticketBoxList.map(item => { return item.boxId })
       this.selectShow = true
     },
-    funChannelShow(){
+    funChannelShow() {
       this.excludeChannelIds = this.channelList.map(item => { return item.channelId })
       this.channelShow = true
     },
@@ -254,7 +263,7 @@ export default {
     },
     update() {
       if (this.addData.type == 1) {
-        if(this.addData.useArea !== 0 && this.addData.useArea !== 1 && this.addData.useArea !== 3 && this.addData.useArea !== 4) {
+        if (this.addData.useArea !== 0 && this.addData.useArea !== 1 && this.addData.useArea !== 3 && this.addData.useArea !== 4) {
           this.$message({
             message: '请选择使用范围!',
             type: 'warning'
@@ -263,7 +272,7 @@ export default {
         }
       } else if (this.addData.type == 2) {
         this.addData.isNewUserCoupon = null
-        if(this.addData.useArea !== 2 && this.addData.useArea !== 0 && this.addData.useArea !== 1 ) {
+        if (this.addData.useArea !== 2 && this.addData.useArea !== 0 && this.addData.useArea !== 1) {
           this.$message({
             message: '请选择使用范围!',
             type: 'warning'
@@ -274,18 +283,18 @@ export default {
       this.$refs.addItem.validate((valid, items) => {
         if (valid) {
           this.addIng = true
-          if(this.addData.useArea === 1 && this.addData.type === 1) {
+          if (this.addData.useArea === 1 && this.addData.type === 1) {
             this.addData.boxIds = this.addData.ticketBoxList.map(item => { return item.boxId }).toString()
           }
-          if(this.addData.useArea === 1 && this.addData.type === 2) {
+          if (this.addData.useArea === 1 && this.addData.type === 2) {
             let arr = []
             for (let i = 0; i < this.channelList.length; i++) {
               arr.push(this.channelList[i].channelId)
             }
             this.addData.channelIdList = arr
           }
-          const { discount, minOrderAmt, ...rest } = this.addData
-          addCoupon({...rest, ...{ discount: accMul(discount, 100), minOrderAmt: accMul(minOrderAmt, 100),}}).then(res => {
+          const { couponDetail, discount, minOrderAmt, ...rest } = this.addData
+          addCoupon({ ...rest, ...{ discount: accMul(discount, 100), minOrderAmt: accMul(minOrderAmt, 100), couponDetail: couponDetail?encodeURI(couponDetail):''} }).then(res => {
             this.addIng = false
             if (res.code === 0) {
               this.$message({

+ 1 - 1
src/views/business/goods/add.vue

@@ -5,7 +5,7 @@
       <el-row :gutter="40" style="width: 500px">
         <el-col :span="23">
           <el-form-item label="商品类型:" prop="type">
-            <el-radio-group v-model="addData.type" :disabled="addData.goodsId">
+            <el-radio-group v-model="addData.type" :disabled="addData.goodsId ? true : false">
               <el-radio :label="1">实物商品</el-radio>
               <el-radio :label="2">卡密商品</el-radio>
             </el-radio-group>

+ 20 - 1
src/views/business/goods/index.vue

@@ -170,6 +170,7 @@
       </el-table-column>
       <el-table-column fixed="right" align="center" label="操作" width="140">
         <template slot-scope="{row}">
+          <el-button  v-hasPermi="['business:goods:edit']" type="text" @click="toAssociation(row.goodsId)">查看关联盲票</el-button>
           <!-- <el-button v-hasPermi="['business:goods:query']" type="text">查看</el-button> -->
           <el-button v-hasPermi="['business:goods:edit']" type="text" @click="handleCamilo(row.goodsId)" v-if="row.type === 2">
             查看卡密
@@ -189,6 +190,7 @@
           <el-button v-if="JSON.parse(row.status).value === 'init'" v-hasPermi="['business:coupon:remove']" class="del"
                      type="text" @click="del(row)">删除
           </el-button>
+          
         </template>
       </el-table-column>
     </el-table>
@@ -232,11 +234,14 @@
         <el-button type="primary" @click="submitFileForm">确 定</el-button>
       </div>
     </el-dialog>
+    <!--    查询关联盲票弹框-->
+    <Association v-if="associationShow" @cancel="associationTicket" :associationShow="associationShow" :associationGoodsId="associationGoodsId"></Association>
   </div>
 </template>
 <script>
 
 import Camilo from '@/components/Camilo'
+import Association from '@/components/Association'
 import {publicFileGetUrl} from "@/api/common"
 import {
   getGoodsList,
@@ -256,7 +261,8 @@ import {getToken, getSign} from "@/utils/auth";
 export default {
   name: 'List',
   components: {
-    Camilo
+    Camilo,
+    Association
   },
   data() {
     return {
@@ -280,6 +286,8 @@ export default {
       },
       reqData: {},
       camiloGoodsId: null,
+      associationShow: false,
+      associationGoodsId: '',
     }
   },
   created() {
@@ -331,6 +339,17 @@ export default {
       this.camiloGoodsId = id
       this.camiloShow = true
     },
+    //查看关联盲票
+    toAssociation(id) {
+      this.associationShow = true
+      this.associationGoodsId = id
+      
+    },
+    //关闭关联盲票弹框
+    associationTicket() {
+      this.associationShow = false
+      this.associationGoodsId = ''
+    },
     //上传卡密按钮操作
     handleImport(id) {
       this.camiloGoodsId = id

+ 8 - 8
src/views/business/ticket/components/AwardForm.vue

@@ -44,7 +44,7 @@
           </el-table-column>
 
           <el-table-column label="操作" align="center">
-            <template slot-scope="scope">
+            <template>
               <el-button
                 size="mini"
                 type="text"
@@ -56,20 +56,20 @@
         </el-table>
       </div>
       <div class="prize-btn">
-<!--          <el-button type="primary" :disabled="goodsList.length > 0" size="small" @click="goodsCommand('goods', 0)">-->
-<!--            添加商品-->
-<!--          </el-button>-->
-        <el-dropdown @command="goodsCommand($event, 0)">
+         <el-button type="primary" :disabled="goodsList.length > 0" size="small" @click="goodsCommand('ticketGoods', 0)">
+           添加商品
+         </el-button>
+        <!-- <el-dropdown @command="goodsCommand($event, 0)">
           <el-button type="primary" size="small"  :disabled="goodsList.length > 0">
             添加商品<i class="el-icon-arrow-down el-icon--right"></i>
           </el-button>
           <el-dropdown-menu slot="dropdown">
-            <el-dropdown-item command="goods">商品</el-dropdown-item>
+            <el-dropdown-item command="ticketGoods">商品</el-dropdown-item>
             <el-dropdown-item command="coupon">券</el-dropdown-item>
             <el-dropdown-item command="coupon_pkg">券包</el-dropdown-item>
-<!--            <el-dropdown-item command="coin">盲豆</el-dropdown-item>-->
+           <el-dropdown-item command="coin">盲豆</el-dropdown-item>
           </el-dropdown-menu>
-        </el-dropdown>
+        </el-dropdown> -->
       </div>
     </div>
   </div>

+ 16 - 9
src/views/business/ticket/components/GoodsAdd.vue

@@ -137,6 +137,10 @@ export default {
       type: String,
       default: '',
     },
+    ticket : {
+      type: String,
+      default: '',
+    }
   },
   data() {
     return {
@@ -161,13 +165,7 @@ export default {
     getGoodsList() {
       this.loading = true;
 
-      getGoodsList(
-        "pageNum=" +
-        this.pageParams.pageNum +
-        "&pageSize=" +
-        this.pageParams.pageSize +
-        "&",
-        {
+      let data = {
           title: this.goodsTitle,
           status: "on",
           minValue: this.queryParams.minValue ? accMul(this.queryParams.minValue, 100) : this.queryParams.minValue,
@@ -176,8 +174,17 @@ export default {
           maxExchange:this.queryParams.maxExchange,
           minCost: this.queryParams.minCost ? accMul(this.queryParams.minCost, 100) : this.queryParams.minCost,
           maxCost: this.queryParams.maxCost ? accMul(this.queryParams.maxCost, 100) : this.queryParams.maxCost,
-        }
-      ).then((res) => {
+      }
+      if(this.ticket == "ticketGoods") {
+        data.exchangeShow = 2
+      }
+
+      getGoodsList(
+        "pageNum=" +
+        this.pageParams.pageNum +
+        "&pageSize=" +
+        this.pageParams.pageSize +
+        "&",data).then((res) => {
         this.goodsList = res.rows.map((item) => {
           return {
             ...item,

+ 14 - 4
src/views/business/ticket/create.vue

@@ -132,7 +132,7 @@
               <el-radio :label="2">指定渠道</el-radio>
             </el-radio-group>
           </el-form-item>
-          <el-form-item label="渠道" prop="channelIdList" v-if="form.saleChannelType == 2">
+          <el-form-item label="渠道" prop="channelIdList" v-if="form.type == 'offline' && form.saleChannelType == 2">
             <el-select
               v-model="form.channelIdList"
               placeholder="请选择渠道"
@@ -176,7 +176,9 @@
     </div>
 
     <!-- 添加商品 -->
-    <goods-add :dialog-visible="goodsTableVisible" @close="close" :iconic="iconic" @confirmGoodsForm="confirmGoodsForm" @confirmGoods="confirmGoods" v-if="goodsTableVisible" />
+    <goods-add :dialog-visible="goodsTableVisible" @close="close" ticket="goods" :iconic="iconic" @confirmGoodsForm="confirmGoodsForm" @confirmGoods="confirmGoods" v-if="goodsTableVisible" />
+    <!-- 添加盲票商品 -->
+    <goods-add :dialog-visible="goodsTableVisible2" @close="close" ticket="ticketGoods" :iconic="iconic" @confirmGoodsForm="confirmGoodsForm" @confirmGoods="confirmGoods" v-if="goodsTableVisible2" />
     <!-- 添加券 -->
     <coupon-add :dialog-visible="couponTableVisible" :iconic="iconic" @close="close" @confirmCouponForm="confirmCouponForm" @confirmCoupon="confirmCoupon" v-if="couponTableVisible" />
     <!-- 添加券包 -->
@@ -326,6 +328,7 @@ export default {
       //关联商品列表
       goodsList: [],
       goodsTableVisible: false, // 添加商品弹框
+      goodsTableVisible2: false, // 添加盲票商品弹框
       couponTitle: "", // 券名称
       couponTableVisible: false, // 添加卡券弹框
       couponPkgTableVisible: false, // 添加券包弹框
@@ -376,6 +379,7 @@ export default {
               item.prizeList.forEach((ele) => {
                 (ele.picUrl = publicFileGetUrl + ele.picUrl.split(',')[0]),
                 (ele.prizeType = JSON.parse(ele.prizeType).value);
+                ele.couponDetail = ele.couponDetail ? encodeURI(ele.couponDetail) : ''
               });
           });
           this.$nextTick(() => {
@@ -523,8 +527,7 @@ export default {
             background: "rgba(0, 0, 0, 0.4)",
           });
 
-          request(data)
-            .then((res) => {
+          request(data).then((res) => {
               loading.close();
               if (res.code == 0) {
                 this.msgSuccess("保存成功");
@@ -545,6 +548,7 @@ export default {
     // 关闭弹框
     close() {
       this.goodsTableVisible = false;
+      this.goodsTableVisible2 = false;
       this.couponTableVisible = false;
       this.couponPkgTableVisible = false;
       this.coinTableVisible = false;
@@ -567,6 +571,9 @@ export default {
         this.couponPkgTableVisible = true;
       } else if (e == "coin") {
         this.coinTableVisible = true;
+      }else if(e == "ticketGoods") {
+        this.iconic = 'goods'
+        this.goodsTableVisible2 = true;
       }
     },
     goodsCommand(e) {
@@ -579,6 +586,9 @@ export default {
       } else if (e == "coupon_pkg") {
         this.iconic = 'couponPkgForm'
         this.couponPkgTableVisible = true;
+      }else if (e == "ticketGoods") {
+        this.iconic = 'goodsForm'
+        this.goodsTableVisible2 = true;
       }
     },
     // 确认选中商品

+ 91 - 0
src/views/homePage.vue

@@ -0,0 +1,91 @@
+<template>
+  <div>
+    <div class="imgTop"></div>
+    <div class="text">
+      <div style="color: #333; font-size: 24px; margin-top: 80px;">
+        ABOUT US
+      </div>
+      <div style="color: #333; font-size: 24px; margin-top: 26px;">
+        关于我们
+      </div>
+      <div style="color: #666; font-size: 18px; margin-top: 50px;">
+        杭州盲票科技有限公司专注于供应链产品研发,通过本地化业态场景画像、设计数字娱乐互动服务工具、依托大数据分析精准运营,为线下中小微商家、线上品牌商提供一站式解决方案,随着AIoT、区块链、5G技术的发展,场景的价值越来越重要,原来中心化的平台已经走到顶了,接下来的五年、十年甚至更长时间,是以线下商业场景为核心的,盲票科技以“娱乐+社交+电商”的方式为商家赋能,多元化的场景打造,为商家获取更多新客户、留存更多老客户,并提供全面的数字化技术服务。
+      </div>
+      <div style="color: #999; font-size: 16px; margin: 60px 0 80px 0;">
+        MORE
+      </div>
+    </div>
+    <div class="imgBottom"></div>
+    <div class="bottom">
+      <div class="bottom-text">
+        <span class="icp" @click="toBeian">浙ICP备2022006422号-1</span>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+
+export default {
+  name: 'homePage',
+  data() {
+    return {
+
+    }
+  },
+  created() {
+    document.title = '盲票官网'
+  },
+  methods: {
+    toBeian() {
+      window.open('https://beian.miit.gov.cn/', '_blank');
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.div {
+  display: inline-block;
+}
+.text {
+  margin: 0 auto;
+  text-align: center;
+  width: 960px;
+}
+.imgTop {
+  height: 680px;
+  width: 100%;
+  background: url("../assets/images/imgtop.png") no-repeat center center;
+  // background-size: cover;
+}
+
+.imgBottom {
+  height: 480px;
+  width: 100%;
+  background: url("../assets/images/imgbottom.png") no-repeat center center;
+  // background-size: cover;
+}
+.bottom {
+  width: 100%;
+  text-align: center;
+
+  &-text {
+    padding-top: 52px;
+    height: 120px;
+    width: 100%;
+    max-width: 1920px;
+    text-align: center;
+    display: inline-block;
+    background: #e8e8e8;
+    font-size: 14px;
+    color: #666;
+    
+    .icp{
+      cursor: pointer;
+    }
+    .icp:hover {
+      color: #000;
+    }
+  }
+}
+</style>

+ 3 - 1
vue.config.js

@@ -36,7 +36,9 @@ module.exports = {
       //target: `http://113.31.163.91:8090`,
       // target: `http://localhost:8080`,
       // target: `https://mp-api.51jiazhu.com`,
-      target: `https://test-mp.quanshu123.com`,
+      // target: `https://test-mp.quanshu123.com`,
+      target: `https://test-mp-adm.kaimanghe.net`,
+      // target: `http://43.143.93.199:8091`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''