Commit 7a0179d2 by wuwx

Merge branch 'v2.0.0' into wuwx_dev_v2.0.0

2 parents 77e0afa2 6822d245
import { http } from '@/main' import { http,http_merchant } from '@/main'
const defaultPath = 'marketing.api.material.' const defaultPath = 'marketing.api.material.'
...@@ -151,8 +151,8 @@ const sendDetailPage = params => { ...@@ -151,8 +151,8 @@ const sendDetailPage = params => {
const findAllDictData = params => { const findAllDictData = params => {
params.method = 'merchants.api.menu.findAllDictData' params.method = 'merchants.api.menu.findAllDictData'
return http({ return http_merchant({
url: 'http://rop-merchant.dev.glsx.com.cn/rop-merchants/router', url: 'rop-merchants/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
......
...@@ -19,8 +19,8 @@ export const fetchConfig = function (isEnv = true) { ...@@ -19,8 +19,8 @@ export const fetchConfig = function (isEnv = true) {
// } // }
//return window.fetch('https://', {}).then(res => res.json()) //return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' }) // request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config') // return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
// return new Http().get('http://192.168.3.171:7300/mock/619c87331072f92988f05a29/marketing/config') return new Http().get('https://oss-config.dev.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -22,3 +22,4 @@ export { bootstrap, mount, unmount } from '@/setup' ...@@ -22,3 +22,4 @@ export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params) export const http = params => Vue.prototype.$http(params)
export const http2 = params => Vue.prototype.$http2(params) export const http2 = params => Vue.prototype.$http2(params)
export const http_common = params => Vue.prototype.$http_common(params) export const http_common = params => Vue.prototype.$http_common(params)
export const http_merchant = params => Vue.prototype.$http_merchant(params)
...@@ -15,7 +15,7 @@ Vue.use(ElementUI) ...@@ -15,7 +15,7 @@ Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
Vue.use(GLFooter) Vue.use(GLFooter)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) { export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request2, sign, secret, sign_common, request_common } = await fetchConfig(false) const { response, request, request2, sign, secret, sign_common, request_common, request_merchant} = await fetchConfig(false)
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
...@@ -24,6 +24,7 @@ export async function bootstrap({ history, common, messenger, globalState, route ...@@ -24,6 +24,7 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$messageBox = messageBox Vue.prototype.$messageBox = messageBox
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } }) Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState // Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
// Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) // Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
......
...@@ -38,10 +38,12 @@ ...@@ -38,10 +38,12 @@
<div class="preview-operation">赞 | 评论</div> <div class="preview-operation">赞 | 评论</div>
</div> </div>
</div> </div>
<el-dialog :visible.sync="videoShow" :before-close="handleClose" class="video-dialog"> <div class="video-dialog" v-if="videoShow">
<div slot="title" style="height: 18px"></div> <div class="video-dialog-panel">
<video v-if="videoShow" width="100%" height="100%" autoplay controls :src="this.videoUrl"></video> <div class="video-close"><i class="el-icon-close" @click="videoShow = false"></i></div>
</el-dialog> <video height="100%" autoplay controls :src="this.videoUrl"></video>
</div>
</div>
</div> </div>
</template> </template>
...@@ -71,7 +73,7 @@ export default { ...@@ -71,7 +73,7 @@ export default {
previewList(val) { previewList(val) {
if (val.length && val[0].attType == 1) { if (val.length && val[0].attType == 1) {
const attContent = val[0].attContent[0] const attContent = val[0].attContent[0]
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function (res) { const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function(res) {
let word = res.replace(/\[|\]/gi, '') let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity) const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1 let index = parseInt(list.indexOf(word)) + 1
...@@ -187,6 +189,7 @@ export default { ...@@ -187,6 +189,7 @@ export default {
color: #333; color: #333;
background-color: #fff; background-color: #fff;
border-radius: 4px; border-radius: 4px;
word-wrap: break-word;
word-break: break-all; word-break: break-all;
line-height: 20px; line-height: 20px;
/deep/ img { /deep/ img {
...@@ -196,6 +199,7 @@ export default { ...@@ -196,6 +199,7 @@ export default {
} }
} }
.text { .text {
width: 100%;
font-size: 12px; font-size: 12px;
padding: 0px; padding: 0px;
margin-bottom: 6px; margin-bottom: 6px;
...@@ -272,13 +276,34 @@ export default { ...@@ -272,13 +276,34 @@ export default {
} }
} }
.video-dialog { .video-dialog {
/deep/ { z-index: 2001;
.el-dialog__header { position: fixed;
border-bottom: 0px; top: 0;
background-color: rgb(0, 0, 0); right: 0;
bottom: 0;
left: 0;
overflow: auto;
background: rgba($color: #000000, $alpha: 0.5);
&-panel {
background: #000000;
position: absolute;
top: 100px;
left: 50%;
transform: translateX(-50%);
height: calc(100% - 200px);
width: auto;
box-sizing: border-box;
padding: 10px 20px 20px;
overflow: hidden;
.video-close {
display: flex;
justify-content: flex-end;
height: 40px;
i {
cursor: pointer;
font-size: 25px;
color: #5850ff;
} }
.el-dialog__body {
padding: 0px;
} }
} }
} }
......
...@@ -148,7 +148,7 @@ export default { ...@@ -148,7 +148,7 @@ export default {
name: '视频', name: '视频',
type: 'video', type: 'video',
funName: 'video' funName: 'video'
}, }
// { // {
// id: 4, // id: 4,
// name: '活动', // name: '活动',
...@@ -241,7 +241,7 @@ export default { ...@@ -241,7 +241,7 @@ export default {
}, },
// 查看群发人数 // 查看群发人数
viewMembers() { viewMembers() {
if (!this.basicForm.userList) { if (!this.basicForm.userList || this.basicForm.userList.length == 0) {
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请选择发表成员' message: '请选择发表成员'
...@@ -365,7 +365,7 @@ export default { ...@@ -365,7 +365,7 @@ export default {
if (item.attType == 1) { if (item.attType == 1) {
const list = emoji.flat(Infinity) const list = emoji.flat(Infinity)
const cutImg = item.attContent.replaceAll('<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/', '') const cutImg = item.attContent.replaceAll('<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/', '')
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function (str) { const replaceImg = cutImg.replace(/(\d){3}.png">/g, function(str) {
let s = list[parseInt(str.split('.')[0]) - 1] let s = list[parseInt(str.split('.')[0]) - 1]
return `[${s}]` return `[${s}]`
}) })
...@@ -403,7 +403,9 @@ export default { ...@@ -403,7 +403,9 @@ export default {
const date = new Date(v).getTime() const date = new Date(v).getTime()
if (date < Date.now()) { if (date < Date.now()) {
this.timeOptions = { this.timeOptions = {
selectableRange: `${dayjs().add(1, 'm').format('HH:mm')}:00 - 23:59:59` selectableRange: `${dayjs()
.add(1, 'm')
.format('HH:mm')}:00 - 23:59:59`
} }
} else { } else {
this.timeOptions = { this.timeOptions = {
......
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
</div> </div>
</div> </div>
<div slot="sendType" slot-scope="scope"> <div slot="sendType" slot-scope="scope">
<span style="color: #eb4e4e" v-if="scope.scope.sendType == 1">定时发送</span> <span style="color: #eb4e4e" v-if="scope.scope.sendType == 2">定时发送</span>
<span v-if="scope.scope.sendType == 2">立即发送</span> <span v-if="scope.scope.sendType == 1">立即发送</span>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" disabled v-if="scope.scope.status == 2 || scope.scope.status == 1">创建中</el-button> <el-button type="text" disabled v-if="scope.scope.status == 2 || scope.scope.status == 1">创建中</el-button>
...@@ -134,7 +134,8 @@ export default { ...@@ -134,7 +134,8 @@ export default {
{ {
label: '内容', label: '内容',
prop: 'attachmentList', prop: 'attachmentList',
addHtml: 'attachmentList' addHtml: 'attachmentList',
width: '240'
}, },
{ {
label: '发布方式', label: '发布方式',
...@@ -322,7 +323,7 @@ export default { ...@@ -322,7 +323,7 @@ export default {
const time = new Date().getTime() const time = new Date().getTime()
const sendTime = new Date(row.sendTime).getTime() const sendTime = new Date(row.sendTime).getTime()
if (sendTime - time < 2 * 60 * 1000) { if (sendTime - time < 2 * 60 * 1000) {
this.$message.error('当前数据已经超时了') this.$message.error('任务临近发送时间,无法取消')
return return
} }
this.$apis.friendGroup this.$apis.friendGroup
...@@ -338,14 +339,6 @@ export default { ...@@ -338,14 +339,6 @@ export default {
// this.$set(this.employeelist[index], 'remindStatus', true) // this.$set(this.employeelist[index], 'remindStatus', true)
}) })
}, },
handleUpOrDown(row) {
if (row.goodsStatus) {
this.downForm.id = row.id
this.dwonVisibleChange()
return true
}
this.secondConfirm('上架', '是否确认上架该商品?', 'proManage', 'updateStatusProApi', { id: row.id, goodsStatus: 1 })
},
dwonVisibleChange() { dwonVisibleChange() {
this.$refs.downRef && this.$refs.downRef.clearValidate() this.$refs.downRef && this.$refs.downRef.clearValidate()
this.isDownVisible = !this.isDownVisible this.isDownVisible = !this.isDownVisible
...@@ -358,34 +351,6 @@ export default { ...@@ -358,34 +351,6 @@ export default {
goodsStatus: 0 goodsStatus: 0
} }
}, },
handleDownConfirm() {
this.$refs.downRef.validate(valid => {
if (valid) {
this.$apis.proManage.updateStatusProApi(this.downForm).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.handleDownClose()
this.handleSearch()
}
})
}
})
},
// 置顶
handleTop(row) {
this.secondConfirm('置顶', '是否确认置顶该商品?', 'proManage', 'topProApi', { id: row.id })
},
handleShare(row) {
this.$apis.proManage.getProShareApi({ id: row.id }).then(res => {
this.shareForm = res
this.handleShareClose()
})
},
handleShareClose() { handleShareClose() {
this.isShareVisible = !this.isShareVisible this.isShareVisible = !this.isShareVisible
}, },
...@@ -395,22 +360,22 @@ export default { ...@@ -395,22 +360,22 @@ export default {
var item = this[formName].find(k => k.name == refreshSigle) var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle) var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName])) this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
// if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') { if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
// const temp = {} const temp = {}
// temp[this[formName][index].optionId] = '' temp[this[formName][index].optionId] = null
// temp[this[formName][index].optionLabel] = '全部' temp[this[formName][index].optionLabel] = '全部'
// this[formName][index].optionList.unshift(temp) this[formName][index].optionList.unshift(temp)
// } }
} else { } else {
this[formName].forEach((item, index) => { this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) { if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName])) this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
// if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') { if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
// const temp = {} const temp = {}
// temp[this[formName][index].optionId] = '' temp[this[formName][index].optionId] = null
// temp[this[formName][index].optionLabel] = '全部' temp[this[formName][index].optionLabel] = '全部'
// this[formName][index].optionList.unshift(temp) this[formName][index].optionList.unshift(temp)
// } }
} }
}) })
} }
......
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
</div> </div>
</el-form> </el-form>
<SelectLabel ref="selectLabel" @tagSelected="handleSelect" :dialogVisible="dialogVisible"></SelectLabel> <SelectLabel ref="selectLabel" @tagSelected="handleSelect" :dialogVisible="dialogVisible"></SelectLabel>
<GLFooter> <GLFooter class="gl-footer">
<el-button @click="onSave">存草稿</el-button> <el-button @click="onSave">存草稿</el-button>
<el-button @click="handleCancel" class="btn-cancle">取消</el-button> <el-button @click="handleCancel" class="btn-cancle">取消</el-button>
<el-button @click="handleSubmit" type="primary">确定</el-button> <el-button @click="handleSubmit" type="primary">确定</el-button>
...@@ -816,4 +816,7 @@ export default { ...@@ -816,4 +816,7 @@ export default {
width: 200px; width: 200px;
height: 200px; height: 200px;
} }
.gl-footer {
z-index: 999;
}
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -61,7 +61,7 @@ export default { ...@@ -61,7 +61,7 @@ export default {
}) })
}) })
this.eventBus.$on('editMaterialGroup', data => { this.eventBus.$on('editMaterialGroup', data => {
data.businessType = data.businessType.toString() // data.businessType = data.businessType.toString()
this.$apis.material.editMaterialGroup(data).then(res => { this.$apis.material.editMaterialGroup(data).then(res => {
if (res) { if (res) {
this.getMaterialList() this.getMaterialList()
......
...@@ -90,4 +90,7 @@ export default { ...@@ -90,4 +90,7 @@ export default {
.w-e-text-container { .w-e-text-container {
z-index: 1 !important; z-index: 1 !important;
} }
.w-e-toolbar{
z-index: 2 !important;
}
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -49,9 +49,7 @@ ...@@ -49,9 +49,7 @@
<el-tooltip effect="dark" placement="top" :content="scope.scope.materialContentRpcResponse.materialName" :disabled="scope.scope.materialContentRpcResponse.materialName.length < 16"> <el-tooltip effect="dark" placement="top" :content="scope.scope.materialContentRpcResponse.materialName" :disabled="scope.scope.materialContentRpcResponse.materialName.length < 16">
<span>{{ scope.scope.materialContentRpcResponse.materialName }}</span> <span>{{ scope.scope.materialContentRpcResponse.materialName }}</span>
</el-tooltip> </el-tooltip>
<el-popover <el-popover placement="top" trigger="click">
placement="top"
trigger="click">
<div> <div>
<img class="img-plus" src="@/assets/material/car.png" alt=""> <img class="img-plus" src="@/assets/material/car.png" alt="">
</div> </div>
...@@ -72,11 +70,10 @@ ...@@ -72,11 +70,10 @@
<span v-if="scope.scope.materialType == 3">图文</span> <span v-if="scope.scope.materialType == 3">图文</span>
</div> </div>
<span slot="auth-button" slot-scope="scope"> <span slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button> <!-- <el-button type="text" @click="handleDetail(scope.scope)">详情</el-button> -->
<GLButton type="text" fn="详情" @click="handleDetail(scope.scope)">详情</GLButton> <GLButton type="text" fn="详情" @click="handleDetail(scope.scope)">详情</GLButton>
<!-- <el-button type="text" @click="addMaterial(2, scope.scope)">编辑</el-button> --> <!-- <el-button type="text" @click="addMaterial(2, scope.scope)">编辑</el-button> -->
<GLButton :size="size" type="text" fn="编辑" @click="addMaterial(2, scope.scope)">编辑</GLButton> <GLButton :size="size" type="text" fn="编辑" @click="addMaterial(2, scope.scope)">编辑</GLButton>
<!-- <GLButton :size="size" type="text" fn="详情" class="el-icon-plus" @click="addMaterial(1)">详情</GLButton> -->
<el-popover placement="right" trigger="click"> <el-popover placement="right" trigger="click">
<ul> <ul>
<li> <li>
...@@ -325,7 +322,7 @@ export default { ...@@ -325,7 +322,7 @@ export default {
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
let offTop = document.querySelector('.tabelList').offsetTop let offTop = document.querySelector('.tabelList').offsetTop
console.log(clientHeight, offTop); console.log(clientHeight, offTop);
this.boxHeight = clientHeight - offTop - 40 + 'px' this.boxHeight = clientHeight - offTop + 'px'
this.findAllDictData('business_type') this.findAllDictData('business_type')
this.firstCome() this.firstCome()
this.getListApi() this.getListApi()
...@@ -438,10 +435,11 @@ export default { ...@@ -438,10 +435,11 @@ export default {
}, },
getListApi() { getListApi() {
var params = this.getParams() var params = this.getParams()
params.pageSize = this.$refs.materialRef.page.pageSize, params.pageSize = this.$refs.materialRef.page.pageSize
params.pageNum = this.$refs.materialRef.page.pageNum params.pageNum = this.$refs.materialRef.page.pageNum
this.$apis.material.materialList(params).then(res => { this.$apis.material.materialList(params).then(res => {
this.materialTableData = res.data this.materialTableData = res.data
console.log(this.materialTableData, 'sdggfb')
this.tableTotal = res.count this.tableTotal = res.count
}) })
}, },
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<div class="content-item-desc" v-if="detailInfo.materialType == 3" v-html="detailInfo.materialUrl"></div> <div class="content-item-desc" v-if="detailInfo.materialType == 3" v-html="detailInfo.materialUrl"></div>
</div> </div>
<div class="content-item-image"> <div class="content-item-image">
<img src="@/assets/material/car.png" alt="" v-if="detailInfo.materialType == 3" /> <img :src="imgSrc ? imgSrc[1] : '@/assets/material/car.png'" alt="" v-if="detailInfo.materialType == 3" />
<img src="@/assets/material/pdf.png" alt="" v-if="detailInfo.materialType == 1" /> <img src="@/assets/material/pdf.png" alt="" v-if="detailInfo.materialType == 1" />
</div> </div>
</div> </div>
...@@ -151,10 +151,6 @@ ...@@ -151,10 +151,6 @@
<div class="phone-content"> <div class="phone-content">
<h4 class="phone-content-title">{{ detailInfo.materialName }}</h4> <h4 class="phone-content-title">{{ detailInfo.materialName }}</h4>
<div class="phone-content-word" v-if="detailInfo.materialType == 3" v-html="detailInfo.materialUrl"></div> <div class="phone-content-word" v-if="detailInfo.materialType == 3" v-html="detailInfo.materialUrl"></div>
<div class="phone-content-word">活动时间:2022年3月17日 8:00-23:00</div>
<div>
<img src="@/assets/material/car.png" alt="" />
</div>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
...@@ -182,7 +178,8 @@ export default { ...@@ -182,7 +178,8 @@ export default {
selectTime: [], selectTime: [],
routerInfo: '', routerInfo: '',
detailInfo: {}, detailInfo: {},
overviewInfo: {} overviewInfo: {},
imgSrc: []
} }
}, },
mounted() { mounted() {
...@@ -197,7 +194,6 @@ export default { ...@@ -197,7 +194,6 @@ export default {
params.id = this.routerInfo.id params.id = this.routerInfo.id
params.flag = 0 params.flag = 0
this.$apis.material.materialDetail(params).then(res => { this.$apis.material.materialDetail(params).then(res => {
console.log(res, 'dhakfh')
this.detailInfo = res this.detailInfo = res
if (this.detailInfo.tagJson) { if (this.detailInfo.tagJson) {
this.detailInfo.tagJson = eval(this.detailInfo.tagJson) this.detailInfo.tagJson = eval(this.detailInfo.tagJson)
...@@ -206,6 +202,12 @@ export default { ...@@ -206,6 +202,12 @@ export default {
} }
if (this.detailInfo.materialType == 3) { if (this.detailInfo.materialType == 3) {
this.detailInfo.materialUrl = decodeURIComponent(this.detailInfo.materialUrl) this.detailInfo.materialUrl = decodeURIComponent(this.detailInfo.materialUrl)
console.log(this.detailInfo.materialUrl, 'dhakfh')
let html = this.detailInfo.materialUrl
let imgHtml = html.match(/<img.*?(?:>|\/>)/g)
// html = html.replace(imgHtml[0],'')
this.imgSrc = imgHtml[0].match('<img[^<>]*? src="([^<>]*?)"')
console.log(this.imgSrc[1], 'imgimg')
} }
}) })
}, },
...@@ -280,7 +282,7 @@ export default { ...@@ -280,7 +282,7 @@ export default {
display: flex; display: flex;
.content-item { .content-item {
box-sizing: border-box; box-sizing: border-box;
width: 321px; width: 296px;
height: 117px; height: 117px;
background: #f5f5f5; background: #f5f5f5;
border-radius: 2px; border-radius: 2px;
...@@ -438,16 +440,24 @@ export default { ...@@ -438,16 +440,24 @@ export default {
height: 600px; height: 600px;
position: relative; position: relative;
.img-phone { .img-phone {
height: 500px; height: 558px;
width: 312px; width: 312px;
position: absolute; position: absolute;
top: 10%; top: 4%;
left: 25%; left: 15%;
} }
.phone-content { .phone-content {
position: absolute; position: absolute;
top: 20%; top: 15%;
left: 30%; left: 23%;
width: 244px;
height: 414px;
overflow: auto;
background-color: #fff;
padding: 8px;
box-sizing: border-box;
border-radius: 13px;
box-shadow: -2px 4px 3px #ccc;
&-title { &-title {
width: 100%; width: 100%;
height: 30px; height: 30px;
...@@ -460,6 +470,7 @@ export default { ...@@ -460,6 +470,7 @@ export default {
} }
} }
.content-item-image { .content-item-image {
margin-top: -5px;
img { img {
width: 85px; width: 85px;
height: 85px; height: 85px;
...@@ -468,4 +479,8 @@ export default { ...@@ -468,4 +479,8 @@ export default {
.el-tag { .el-tag {
margin-right: 4px; margin-right: 4px;
} }
p {
margin: 0 !important;
padding-right: 10px;
}
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
</div> --> </div> -->
<div class="membership"> <div class="membership">
<span>会员卡试用:</span> <span>会员卡试用:</span>
<span class="membershipDays" v-if="ruleForm.tryAble==1">{{ ruleForm.tryNum }}天试用</span> <span class="membershipDays" v-if="ruleForm.tryAble == 1">{{ ruleForm.tryNum }}天试用</span>
<span class="membershipDays" v-else>已关闭</span> <span class="membershipDays" v-else>已关闭</span>
<span class="lookQR" @click="extensionQR" v-if="ruleForm.tryAble==1">查看小程序推广码</span> <span class="lookQR" @click="extensionQR" v-if="ruleForm.tryAble == 1">查看小程序推广码</span>
<!-- <el-button class="lookQR" size="small" type="primary" @click="extensionQR" v-if="ruleForm.tryAble==1">生成小程序推广码</el-button> --> <!-- <el-button class="lookQR" size="small" type="primary" @click="extensionQR" v-if="ruleForm.tryAble==1">生成小程序推广码</el-button> -->
</div> </div>
<el-button class="seeEquity" size="small" type="primary" @click="openDialog">查看权益</el-button> <el-button class="seeEquity" size="small" type="primary" @click="openDialog">查看权益</el-button>
...@@ -56,21 +56,18 @@ ...@@ -56,21 +56,18 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</div> </div>
<el-form-item :class="!ruleForm.tryNum? 'is-error' : ''" class="memberTrial" label="会员卡试用" size="small" > <el-form-item :class="!ruleForm.tryNum ? 'is-error' : ''" class="memberTrial" label="会员卡试用" size="small">
<div class="trialMerge"> <div class="trialMerge">
<el-switch class="switchTag" active-value="1" inactive-value="0" v-model="ruleForm.tryAble" active-color="#5850FF" inactive-color="#E8E8EA" active-text="开" inactive-text="关"></el-switch> <el-switch class="switchTag" active-value="1" inactive-value="0" v-model="ruleForm.tryAble" active-color="#5850FF" inactive-color="#E8E8EA" active-text="开" inactive-text="关"></el-switch>
<div class="trialDays" v-if="ruleForm.tryAble == 1"> <div class="trialDays" v-if="ruleForm.tryAble == 1">
<span>试用时长</span> <span>试用时长</span>
<el-input-number v-model="ruleForm.tryNum" :controls="false" :min="1" :max="365" ></el-input-number> <el-input-number v-model="ruleForm.tryNum" :controls="false" :min="1" :max="365"></el-input-number>
<span>天试用</span> <span>天试用</span>
</div> </div>
<div class="el-form-item__error trialDays_error" v-if="ruleForm.tryAble==1 && !ruleForm.tryNum"> <div class="el-form-item__error trialDays_error" v-if="ruleForm.tryAble == 1 && !ruleForm.tryNum">请输入试用时长</div>
请输入试用时长
</div>
</div> </div>
<!-- <div v-if="ruleForm.tryAble" class="promoteQR">生成小程序码推广</div> --> <!-- <div v-if="ruleForm.tryAble" class="promoteQR">生成小程序码推广</div> -->
</el-form-item> </el-form-item>
</el-form> </el-form>
<div style="display: flex"> <div style="display: flex">
...@@ -165,7 +162,7 @@ ...@@ -165,7 +162,7 @@
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
<div slot="footer" style="margin-left:360px"> <div slot="footer" style="margin-left: 360px">
<el-button size="small" @click="handleQRClose">取消</el-button> <el-button size="small" @click="handleQRClose">取消</el-button>
<el-button type="primary" @click="handleQRConfirm" size="small">确定</el-button> <el-button type="primary" @click="handleQRConfirm" size="small">确定</el-button>
</div> </div>
...@@ -183,7 +180,7 @@ const cloneText = message => { ...@@ -183,7 +180,7 @@ const cloneText = message => {
document.body.removeChild(input) document.body.removeChild(input)
} }
import glsxDialog from '@/components/glsx-dialog' import glsxDialog from '@/components/glsx-dialog'
import { getCenterListApi, getMoreMerchant, getCardContent, updateCardContent, memberExportApi,getQrUrl } from '@/api/modules/center' import { getCenterListApi, getMoreMerchant, getCardContent, updateCardContent, memberExportApi, getQrUrl } from '@/api/modules/center'
import { statusList, memberTypeList, exportFn } from '@/common/constant' import { statusList, memberTypeList, exportFn } from '@/common/constant'
export default { export default {
components: { components: {
...@@ -207,11 +204,11 @@ export default { ...@@ -207,11 +204,11 @@ export default {
// }, 1000) // }, 1000)
} }
return { return {
promotionForm:{ promotionForm: {
QRurl:'', QRurl: '',
QRcode:'' QRcode: ''
},//推广 }, //推广
isQRVisible:false, isQRVisible: false,
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime() return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
...@@ -224,7 +221,7 @@ export default { ...@@ -224,7 +221,7 @@ export default {
status: '', status: '',
merchantName: '', merchantName: '',
memberType: '', memberType: '',
activeType:'' activeType: ''
}, },
searchFormTable: {}, searchFormTable: {},
memberTypeLists: [ memberTypeLists: [
...@@ -253,6 +250,10 @@ export default { ...@@ -253,6 +250,10 @@ export default {
{ {
dictValue: 12, dictValue: 12,
dictLabel: '无忧服务' dictLabel: '无忧服务'
},
{
dictValue: 0,
dictLabel: '试用领取'
} }
], ],
memberCenterStatus: [ memberCenterStatus: [
...@@ -332,15 +333,14 @@ export default { ...@@ -332,15 +333,14 @@ export default {
copyRuleForm: {}, copyRuleForm: {},
rules: { rules: {
cardName: [ cardName: [
{ required: true,min: 1, max: 15, message: '请输入会员卡名称',trigger: 'blur'}, { required: true, min: 1, max: 15, message: '请输入会员卡名称', trigger: 'blur' }
// { min: 1, max: 15, message: '请输入1 到 15 个字符' } // { min: 1, max: 15, message: '请输入1 到 15 个字符' }
], ],
price: [ price: [
{ required: true, message: '请输入售价',trigger: 'blur'} { required: true, message: '请输入售价', trigger: 'blur' }
// { validator: checkPrice, trigger: 'blur' } // { validator: checkPrice, trigger: 'blur' }
], ],
marketPrice: marketPrice: [{ required: true, message: '请输入市场价', trigger: 'blur' }]
[{ required: true, message: '请输入市场价',trigger: 'blur'}]
}, },
//权益 - 弹窗 //权益 - 弹窗
isDialogVisible: false, isDialogVisible: false,
...@@ -367,16 +367,16 @@ export default { ...@@ -367,16 +367,16 @@ export default {
this.$message.success('复制成功') this.$message.success('复制成功')
}, },
// 查看小程序推广码 // 查看小程序推广码
extensionQR(){ extensionQR() {
console.log(this.ruleForm.equityId) console.log(this.ruleForm.equityId)
const params = { const params = {
id:this.ruleForm.equityId id: this.ruleForm.equityId
} }
getQrUrl(params).then(res => { getQrUrl(params).then(res => {
this.isQRVisible = !this.isQRVisible this.isQRVisible = !this.isQRVisible
this.promotionForm.QRurl = res.data.url this.promotionForm.QRurl = res.data.url
this.promotionForm.QRcode =res.data.qrCode this.promotionForm.QRcode = res.data.qrCode
}) })
}, },
oninput(value) { oninput(value) {
...@@ -395,7 +395,7 @@ export default { ...@@ -395,7 +395,7 @@ export default {
if (len1 == '-') { if (len1 == '-') {
str = '' str = ''
} //限制只能输入一个小数点 } //限制只能输入一个小数点
if(value !== '' && value==0){ if (value !== '' && value == 0) {
return (str = 0.01) return (str = 0.01)
} }
if (Number(value) >= 99999) { if (Number(value) >= 99999) {
...@@ -414,7 +414,7 @@ export default { ...@@ -414,7 +414,7 @@ export default {
return str return str
}, },
getCardContentFun() { getCardContentFun() {
if(this.merchantModel ==2 && this.accountLevel ==1) return if (this.merchantModel == 2 && this.accountLevel == 1) return
getCardContent({ merchantId: this.merchantId }).then(res => { getCardContent({ merchantId: this.merchantId }).then(res => {
if (!res) { if (!res) {
return return
...@@ -429,7 +429,7 @@ export default { ...@@ -429,7 +429,7 @@ export default {
}) })
}, },
openEditWrap() { openEditWrap() {
if(!this.ruleForm.equityId) return if (!this.ruleForm.equityId) return
this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm))
this.isShowEditWrap = true this.isShowEditWrap = true
}, },
...@@ -439,7 +439,7 @@ export default { ...@@ -439,7 +439,7 @@ export default {
this.isShowEditWrap = false this.isShowEditWrap = false
}, },
submitRuleForm(formName) { submitRuleForm(formName) {
if(this.ruleForm.tryAble==true && this.ruleForm.tryNum == undefined){ if (this.ruleForm.tryAble == true && this.ruleForm.tryNum == undefined) {
return return
} }
this.$refs[formName].validate(valid => { this.$refs[formName].validate(valid => {
...@@ -511,10 +511,10 @@ export default { ...@@ -511,10 +511,10 @@ export default {
// } // }
this.$refs.memberCenterRef.data.length ? (this.$refs.memberCenterRef.tableHeightValues = '') : this.$refs.memberCenterRef.setTableHeightFun() this.$refs.memberCenterRef.data.length ? (this.$refs.memberCenterRef.tableHeightValues = '') : this.$refs.memberCenterRef.setTableHeightFun()
}, },
handleQRClose(){ handleQRClose() {
this.isQRVisible = !this.isQRVisible this.isQRVisible = !this.isQRVisible
}, },
handleQRConfirm(){ handleQRConfirm() {
this.isQRVisible = !this.isQRVisible this.isQRVisible = !this.isQRVisible
}, },
handleClose() { handleClose() {
...@@ -535,7 +535,7 @@ export default { ...@@ -535,7 +535,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.proForm{ .proForm {
// display: flex; // display: flex;
// justify-content: center; // justify-content: center;
} }
...@@ -551,13 +551,13 @@ export default { ...@@ -551,13 +551,13 @@ export default {
width: 160px; width: 160px;
height: 160px; height: 160px;
} }
.main-qrcode .tryDays{ .main-qrcode .tryDays {
margin-top: 12px; margin-top: 12px;
} }
// .form { // .form {
// padding: 32px 20px 32px 48px; // padding: 32px 20px 32px 48px;
// } // }
.form{ .form {
padding: 20px 0; padding: 20px 0;
} }
.addCardsDialog .el-dialog__header { .addCardsDialog .el-dialog__header {
...@@ -787,7 +787,7 @@ export default { ...@@ -787,7 +787,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
height: 33px; height: 33px;
.trialDays_error{ .trialDays_error {
margin-left: 135px; margin-left: 135px;
} }
.switchTag .el-switch__label { .switchTag .el-switch__label {
...@@ -817,9 +817,9 @@ export default { ...@@ -817,9 +817,9 @@ export default {
width: 50px !important; width: 50px !important;
} }
} }
.promoteQR{ .promoteQR {
color:#5850FF; color: #5850ff;
margin-bottom:26px margin-bottom: 26px;
} }
} }
.membership { .membership {
......
...@@ -391,6 +391,8 @@ export default { ...@@ -391,6 +391,8 @@ export default {
}, },
'editForm.object.additionalType'(val) { 'editForm.object.additionalType'(val) {
var idx = this.editFormDataChannel.findIndex(item => item.name == 'pushChannelType') var idx = this.editFormDataChannel.findIndex(item => item.name == 'pushChannelType')
this.editFormDataChannel[idx].optionList[0].isDisabled = val == '4' || !this.condLimitObj.hasQw
this.editFormDataChannel[idx].optionList[1].isDisabled = val == '4' || !this.condLimitObj.hasPhone
if (this.condLimitObj.hasQw) { if (this.condLimitObj.hasQw) {
this.editFormDataChannel[idx].optionList[2].isDisabled = [1, 2, 3].includes(val) this.editFormDataChannel[idx].optionList[2].isDisabled = [1, 2, 3].includes(val)
} }
...@@ -400,16 +402,8 @@ export default { ...@@ -400,16 +402,8 @@ export default {
created() { created() {
this.getDay('weekList', 7) this.getDay('weekList', 7)
this.getDay('monthList', 31) this.getDay('monthList', 31)
console.log(this.condLimitObj) // console.log(this.condLimitObj)
// 有企微 - 企业微信、微信朋友圈 this.limitQwPhone()
// 有手机号 - 短信
var channelIdx = this.editFormDataChannel.findIndex(item => item.name == 'pushChannelType')
// 企微
this.editFormDataChannel[channelIdx].optionList[0].isDisabled = !this.condLimitObj.hasQw
// 短信
this.editFormDataChannel[channelIdx].optionList[1].isDisabled = !this.condLimitObj.hasPhone
// 微信朋友圈
this.editFormDataChannel[channelIdx].optionList[2].isDisabled = !this.condLimitObj.hasQw
}, },
mounted() { mounted() {
...@@ -426,6 +420,18 @@ export default { ...@@ -426,6 +420,18 @@ export default {
}, },
methods: { methods: {
limitQwPhone() {
// 有企微 - 企业微信、微信朋友圈
// 有手机号 - 短信
var channelIdx = this.editFormDataChannel.findIndex(item => item.name == 'pushChannelType')
// 企微
this.editFormDataChannel[channelIdx].optionList[0].isDisabled = !this.condLimitObj.hasQw
// 短信
this.editFormDataChannel[channelIdx].optionList[1].isDisabled = !this.condLimitObj.hasPhone
// 微信朋友圈
this.editFormDataChannel[channelIdx].optionList[2].isDisabled = !this.condLimitObj.hasQw
},
getDay(attrName, day) { getDay(attrName, day) {
let weekNameList = ['一', '二', '三', '四', '五', '六', '日'] let weekNameList = ['一', '二', '三', '四', '五', '六', '日']
for (var i = 0; i < day; i++) { for (var i = 0; i < day; i++) {
...@@ -619,7 +625,7 @@ export default { ...@@ -619,7 +625,7 @@ export default {
.then(() => { .then(() => {
this.cancelJump() this.cancelJump()
}) })
.catch(() => {}) .catch(() => { })
} else { } else {
this.cancelJump() this.cancelJump()
} }
......
...@@ -109,12 +109,15 @@ export default { ...@@ -109,12 +109,15 @@ export default {
label: '初次查看事件', label: '初次查看事件',
prop: 'firstViewDate', prop: 'firstViewDate',
formatter: cellValue => { formatter: cellValue => {
return dayjs(cellValue.firstViewDate).format('YYYY-MM-DD HH:mm:ss') || '未查看' return cellValue.firstViewDate ? dayjs(cellValue.firstViewDate).format('YYYY-MM-DD HH:mm:ss') : '未查看'
} }
}, },
{ {
label: '查看次数', label: '查看次数',
prop: 'viewCount' prop: 'viewCount',
formatter: cellValue => {
return cellValue.viewCount || '-'
}
} }
] ]
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!