Commit d7c9a931 by cwq0219

Merge branch 'v1.0.1' of http://192.168.3.233:8090/saas/scrm-micro-marketing into v1.0.1

2 parents 1b2e8969 9e30d9dc
......@@ -29,7 +29,8 @@ const insert = params => {
url: URL,
method: 'POST',
data: params,
sign: true
sign: true,
returnAll: true
})
}
......
......@@ -356,13 +356,6 @@ export default {
if (valid) {
this.$refs.groupForm.validate(v => {
if (v) {
if (this.groupNumber == 0) {
this.$message({
type: 'error',
message: '选择客户数量为0,不可创建'
})
return
}
const params = this.getSiftMembers()
params.type = 1
// params.attachmentList = this.basicForm.attachmentList
......@@ -370,6 +363,120 @@ export default {
const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList
const attachmentList = previewList.map(item => {
if (item.attType == 1) {
const list = [
'微笑',
'撇嘴',
'色',
'发呆',
'得意',
'流泪',
'害羞',
'闭嘴',
'睡',
'大哭',
'尴尬',
'发怒',
'调皮',
'呲牙',
'惊讶',
'难过',
'酷',
'冷汗',
'抓狂',
'吐',
'偷笑',
'可爱',
'白眼',
'傲慢',
'饥饿',
'困',
'惊恐',
'流汗',
'憨笑',
'大兵',
'奋斗',
'咒骂',
'疑问',
'嘘',
'晕',
'折磨',
'衰',
'骷髅',
'敲打',
'再见',
'擦汗',
'抠鼻',
'鼓掌',
'糗大了',
'坏笑',
'左哼哼',
'右哼哼',
'哈欠',
'鄙视',
'委屈',
'快哭了',
'阴险',
'亲亲',
'吓',
'可怜',
'菜刀',
'西瓜',
'啤酒',
'篮球',
'乒乓',
'咖啡',
'饭',
'猪头',
'玫瑰',
'凋谢',
'示爱',
'爱心',
'心碎',
'蛋糕',
'闪电',
'炸弹',
'刀',
'足球',
'瓢虫',
'便便',
'月亮',
'太阳',
'礼物',
'拥抱',
'强',
'弱',
'握手',
'胜利',
'抱拳',
'勾引',
'拳头',
'差劲',
'爱你',
'NO',
'OK',
'爱情',
'飞吻',
'跳跳',
'发抖',
'怄火',
'转圈',
'磕头',
'回头',
'跳绳',
'挥手',
'激动',
'街舞',
'献吻',
'左太极',
'右太极'
]
const cutImg = item.attContent.replaceAll('<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/', '')
console.log(cutImg)
const replaceImg = cutImg.replace(/(\d){1,2}.gif">/g, function(str) {
let s = list[str.split('.')[0]]
return `[${s}]`
})
item.attContent = replaceImg
item.attContent = item.attContent.replace('@昵称', '[@昵称]')
} else if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
......@@ -392,29 +499,34 @@ export default {
if (params.sendType == 2) {
params.sendTimeStr = this.basicForm.sendTime + ' ' + this.basicForm.sendDate
}
console.log(params)
this.addLoading = true
this.$apis.customerTransform
.insert(params)
.then(res => {
if (res) {
console.log(res)
if (res.code == '-1') {
this.$message({
type: 'error',
message: res.message
})
this.handleCancel()
} else if (res.code == 0) {
this.$message({
type: 'success',
message: '操作成功!'
})
this.handleCancel()
} else {
this.$message({
type: 'error',
message: res.message
})
}
this.addLoading = false
})
.catch(err => {
console.log(err)
this.$message({
type: 'error',
message: err.message
})
this.addLoading = false
if (err.code == '-1') {
this.handleCancel()
}
})
}
})
......
......@@ -5,7 +5,7 @@
<div class="preview-info" v-for="item in previewList" :key="item.id">
<img class="avatar" src="@/assets/guestCustom/default-customer.png" alt />
<template v-if="item.attType == 1">
<div class="preview-text text">{{ item.attContent }}</div>
<div class="preview-text text" v-html="item.attContent"></div>
</template>
<template v-else-if="item.attType == 7">
<div class="preview-activity">
......@@ -45,13 +45,135 @@
<script>
export default {
name: 'Preview',
props: { eventBus: Object, list: Array },
props: { eventBus: Object },
data() {
return {
previewList: [],
currentTime: ''
}
},
watch: {
previewList(val) {
console.log(val)
if (val[0].attType == 1) {
const attContent = val[0].attContent
const htm = attContent.replace(/\[[\u4E00-\u9FA5]{1,3}]/gi, function(res) {
let word = res.replace(/\[|\]/gi, '')
const list = [
'微笑',
'撇嘴',
'色',
'发呆',
'得意',
'流泪',
'害羞',
'闭嘴',
'睡',
'大哭',
'尴尬',
'发怒',
'调皮',
'呲牙',
'惊讶',
'难过',
'酷',
'冷汗',
'抓狂',
'吐',
'偷笑',
'可爱',
'白眼',
'傲慢',
'饥饿',
'困',
'惊恐',
'流汗',
'憨笑',
'大兵',
'奋斗',
'咒骂',
'疑问',
'嘘',
'晕',
'折磨',
'衰',
'骷髅',
'敲打',
'再见',
'擦汗',
'抠鼻',
'鼓掌',
'糗大了',
'坏笑',
'左哼哼',
'右哼哼',
'哈欠',
'鄙视',
'委屈',
'快哭了',
'阴险',
'亲亲',
'吓',
'可怜',
'菜刀',
'西瓜',
'啤酒',
'篮球',
'乒乓',
'咖啡',
'饭',
'猪头',
'玫瑰',
'凋谢',
'示爱',
'爱心',
'心碎',
'蛋糕',
'闪电',
'炸弹',
'刀',
'足球',
'瓢虫',
'便便',
'月亮',
'太阳',
'礼物',
'拥抱',
'强',
'弱',
'握手',
'胜利',
'抱拳',
'勾引',
'拳头',
'差劲',
'爱你',
'NO',
'OK',
'爱情',
'飞吻',
'跳跳',
'发抖',
'怄火',
'转圈',
'磕头',
'回头',
'跳绳',
'挥手',
'激动',
'街舞',
'献吻',
'左太极',
'右太极'
]
let index = list.indexOf(word)
return `<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/${index}.gif">`
})
console.log(htm)
val[0].attContent = htm
}
}
},
created() {
this.eventBus.$on('update', val => {
this.previewList = val
......
......@@ -458,6 +458,7 @@ export default {
let Textnode = document.createElement('div')
Textnode.innerHTML = replaceImg
this.currentText = Textnode.innerText
console.log(this.currentText, 11111111)
this.$emit('updateText', this.currentText)
},
handleDelete(e) {
......
......@@ -292,6 +292,7 @@ export default {
this.$refs.textContent.addImg(`https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/${index}.gif`)
},
updateText(val) {
console.log(val)
this.textInput(val)
},
// 上传图片
......
<template>
<div class="live-room">
<div class="memberCardWrap">
<div class="memberCardWrap" v-if="!(merchantModel==2 && accountLevel==1)">
<div class="cardBoxWrap">
<img src="@/assets/memberCard.png" alt="" />
<div class="masonry">
......@@ -9,17 +9,20 @@
<div class="memberCardName">{{ ruleForm.cardName }}</div>
</div>
<div class="cardDetail" v-if="!isShowEditWrap">
<p>{{ ruleForm.cardName }}</p>
<img src="@/assets/edit.png" class="editIcon" @click="openEditWrap" alt="" />
<div>
<div class="flex-1"> <p>{{ ruleForm.cardName }}</p>
<GLButton @click="openEditWrap" fn="编辑" mode="div"> <img src="@/assets/edit.png" class="editIcon" @click="openEditWrap" alt="" /></GLButton>
</div>
<!-- <img src="@/assets/edit.png" class="editIcon" @click="openEditWrap" alt="" /> -->
<div class="row">
<span>售价:</span>
<span class="price" v-if="ruleForm.price">¥{{ ruleForm.price }}</span>
</div>
<div>
<div class="row">
<span>市场价:</span>
<span class="price" v-if="ruleForm.marketPrice">¥{{ ruleForm.marketPrice }}</span>
</div>
<div>
<div class="row">
<span>会员权益使用地址:</span>
<span class="address ellipsis-1" :title="ruleForm.linkUrl">{{ ruleForm.linkUrl }}</span>
</div>
......@@ -50,7 +53,7 @@
</div>
</div>
<p class="pageTitle">会员中心</p>
<p class="pageTitle" v-if="!(merchantModel==2 && accountLevel==1)">会员中心</p>
<div class="live-room container">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right">
<el-row>
......@@ -258,13 +261,17 @@ export default {
//权益 - 弹窗
isDialogVisible: false,
merchantData: {},
merchantId: 0 //记得改 glsxadmin:44184606
merchantId: 0,//记得改 glsxadmin:44184606
merchantModel: 1, //集团:1,门店:2
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
}
},
created() {
if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId
this.merchantId = this.$globalState.session.merchantId
this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel
}
this.getCardContentFun()
},
......@@ -445,14 +452,17 @@ mounted () {
vertical-align: middle;
cursor: pointer;
}
> p {
.flex-1{
display: flex;
p {
display: inline-block;
font-weight: 600;
color: #333333;
font-size: 16px;
margin: 0;
}
> div {
}
.row {
margin-top: 15px;
font-weight: 400;
font-size: 14px;
......
......@@ -41,8 +41,10 @@
<img class="img-60" :src="scope.scope.shareImgUrl" />
</span> -->
<span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="handleDetail(scope.scope)" v-if="scope.scope.orderType == 1">详情</el-button>
<el-button type="text" style="color:#eee" v-else>详情</el-button>
<!-- <el-button type="text" @click="handleDetail(scope.scope)" v-if="scope.scope.orderType == 1">详情</el-button>
<el-button type="text" style="color:#eee" v-else>详情</el-button> -->
<GLButton @click="handleDetail(scope.scope)" fn="订单详情" type="text" v-if="scope.scope.orderType == 1">详情</GLButton>
<GLButton style="color: #eee" fn="订单详情" type="text" v-else>详情</GLButton>
</span>
</GLTable>
</div>
......@@ -51,12 +53,12 @@
<script>
import { orderTypesList, orderStatusList } from '@/common/constant'
import url from "@/assets/empty.png"
import url from '@/assets/empty.png'
import { getOrderListApi } from '@/api/modules/order'
export default {
data() {
return {
url:url,
url: url,
isReload: true,
pickerOptions: {
disabledDate(time) {
......@@ -147,9 +149,7 @@ export default {
}
}
},
mounted () {
},
mounted() {},
methods: {
tabClick(index) {
this.currentIndex = index
......
......@@ -6,8 +6,8 @@
<el-form :inline="true" style="width:100%" :model="searchForm" label-width="100px" label-position="right">
<el-row>
<el-form-item size="small">
<el-button :size="size" type="primary" icon="el-icon-plus" @click="handleCreate">创建服务</el-button>
<!-- <GLButton type="primary" @click="handleCreate" size="small" icon="el-icon-plus" fn="创建服务" mode="el-button">创建服务</GLButton> -->
<!-- <el-button :size="size" type="primary" icon="el-icon-plus" @click="handleCreate">创建服务</el-button> -->
<GLButton type="primary" @click="handleCreate" size="small" icon="el-icon-plus" fn="创建服务" mode="el-button">创建服务</GLButton>
</el-form-item>
<el-form-item size="small" label="服务名称">
<el-input :size="size" v-model="searchForm.couponName" placeholder="请输入服务名称" clearable></el-input>
......
......@@ -119,8 +119,8 @@
width: footerWidth + 'px'
}"
>
<el-button type="primary" @click="submitForm('ruleForm')" size="small">创建</el-button>
<el-button type="primary" @click="goBack" size="small">取消</el-button>
<el-button type="primary" @click="submitForm('ruleForm')" size="medium">创建</el-button>
<el-button type="primary" @click="goBack" size="medium">取消</el-button>
</div>
<!-- :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" -->
<glsx-dialog title="" top="30vh" :hasScroll="false" width="547px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleConfirm">
......
......@@ -3,8 +3,8 @@
<tip-panel panelWidth="616px" panelMinHeight="40px" :panelContent="panelContent" v-if="isFirstShow" @closePanel="closePanel"></tip-panel>
<div class="live-room container">
<div class="btnWrap">
<el-button :size="size" type="primary" @click="handleCreate" icon="el-icon-plus">创建套餐</el-button>
<!-- <GLButton type="primary" @click="handleCreate" size="small" icon="el-icon-plus" fn="创建套餐" mode="el-button">创建套餐</GLButton> -->
<!-- <el-button :size="size" type="primary" @click="handleCreate" icon="el-icon-plus">创建套餐</el-button> -->
<GLButton type="primary" @click="handleCreate" size="small" icon="el-icon-plus" fn="创建套餐" mode="el-button">创建套餐</GLButton>
<el-button :size="size" @click="showViewer=true">查看示例效果</el-button>
<el-image-viewer v-if="showViewer" :on-close="()=>{showViewer=false}" :url-list="srcList" style="padding:4%;"/>
</div>
......
......@@ -46,8 +46,8 @@
width: footerWidth + 'px'
}"
>
<el-button type="primary" @click="submitForm('ruleForm')" size="small">创建</el-button>
<el-button type="primary" @click="goBack" size="small">取消</el-button>
<el-button type="primary" @click="submitForm('ruleForm')" size="medium">创建</el-button>
<el-button type="primary" @click="goBack" size="medium">取消</el-button>
</div>
<!-- :modalAppendToBody="false" -->
<glsx-dialog title="套餐服务" class="setmealServiceDialog" width="1142px" :noCancel="true" :noClose="false" btnSize="small" :isVisible="setmealDialogVisible" @closeDialog="handleClose" @confirmDialog="handleConfirm">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!