Commit ae0e6b8b by 匡雅琴

fixed

1 parent 5eceac99
......@@ -19,8 +19,8 @@ export const fetchConfig = function (isEnv = true) {
// }
//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' })
// 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.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
// return new Http().get('http://192.168.3.171:7300/mock/619c87331072f92988f05a29/marketing/config')
}
export const config = {
install(vue, cfg) {
......
......@@ -38,7 +38,7 @@
<i :class="{ 'el-icon-refresh': true, 'wait-status': refreshStatus }"></i>
更新数据
</span>
<span class="info-time">更新于</span>
<span class="info-time">更新于:{{basicInfo.updatedTime}}</span>
</div>
<div class="statistics-info">
<div class="statistics-ul">
......
......@@ -84,7 +84,6 @@ export default {
})
val[0].attContent[0] = htm
}
console.log(val)
//图片合并
// const previewListFilter = val.map(item=>{
// return {
......@@ -104,7 +103,9 @@ export default {
},
created() {
this.eventBus.$on('update', val => {
this.previewList = val
setTimeout(() => {
this.previewList = val
}, 100)
})
},
mounted() {}
......
......@@ -175,6 +175,7 @@ export default {
const params = { addChildrensFlag: true }
this.loading = true
params.isHavCustomer = true
params.isEntmicroCustomer = true
params.isFollowerStaff = isFollowerStaff
this.$apis.customerTransform.listDepartmentTree(params).then(res => {
console.log(res)
......
......@@ -24,7 +24,7 @@
<div v-for="(itm, index) in previewList" :key="itm.id">
<div class="welcome-file" v-if="itm.attType != 1 && itm.attType != 2">
<template v-if="itm.attType == 3">
<img src="@/assets/guestCustom/icon-img.png" alt />
<img src="@/assets/guestCustom/icon-video.png" alt />
<span class="welcome-file-desc" :title="itm.attContent[0]">{{ itm.attContent[0] }}</span>
</template>
<template v-else-if="itm.attType == 7">
......@@ -57,7 +57,7 @@
<span v-if="item.id == 1" @click.stop="selectEmotion">{{ item.name }}</span>
<span v-else>{{ item.name }}</span>
<input v-if="item.type == 'img'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input upload-img" :accept="item.accept || 'image/png, image/jpeg, image/jpg'" @change="e => handleImgChange(e, item)" />
<input v-else-if="item.type == 'video'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input" :accept="item.accept || 'video/*'" @change="e => handleVideoChange(e, item)" />
<input v-else-if="item.type == 'video'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input upload-video" :accept="item.accept || 'video/*'" @change="e => handleVideoChange(e, item)" />
<el-link v-else-if="item.type == 'nickname' || item.type == 'acivity'" style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link>
</div>
</div>
......@@ -210,8 +210,8 @@ export default {
return item.attType == ATT_TYPE.TEXT || item.attType == ATT_TYPE.IMAGE
})
const imgIndex = this.previewList.findIndex(imgItem => imgItem.attType == ATT_TYPE.IMAGE)
if(imgIndex != -1 && this.previewList[imgIndex].attContent.length == 9){
this.$message.error('最多上传9张图片')
if (imgIndex != -1 && this.previewList[imgIndex].attContent.length >= 9) {
this.$message.error('最多上传9张图片')
return
}
if (imgIndex == -1) {
......@@ -257,18 +257,22 @@ export default {
reader.onload = e => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
this.previewList = this.previewList.filter(item => {
return item.attType == ATT_TYPE.TEXT
})
this.eventBus.$emit('update', this.previewList)
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
this.previewList = this.previewList.filter(item => {
return item.attType == ATT_TYPE.TEXT
})
this.previewList.push({
attType: ATT_TYPE.VEDIO,
attContent: [res]
})
this.eventBus.$emit('update', this.previewList)
this.$nextTick(() => {
this.eventBus.$emit('update', this.previewList)
})
}
})
document.querySelector('.upload-video').value = ''
}
} catch (err) {
console.log(err)
......@@ -291,10 +295,16 @@ export default {
videoObj.load()
videoObj.onloadedmetadata = function (evt) {
URL.revokeObjectURL(videoUrl)
console.dir(videoObj)
if (videoObj.videoWidth > 1280 || videoObj.videoHeight > 720) {
_this.$message.error('上传视频不超过1280x720')
reject()
}
if (videoObj.duration > 30) {
_this.$message.error('上传视频不超过30s')
reject()
}
resolve(file)
}
})
......
......@@ -60,8 +60,8 @@
</glsx-dialog>
</div>
<GLFooter>
<el-button type="primary" v-loading="addLoading" @click="handleSubmit">确定</el-button>
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" v-loading="addLoading" @click="handleSubmit">通知成员发送</el-button>
<el-button type="primary" @click="handleCancel">取消</el-button>
</GLFooter>
</div>
</template>
......@@ -264,6 +264,13 @@ export default {
if (valid) {
this.attachmentShow = true
const previewList = this.$refs.welcome.previewList
if (previewList.length == 0) {
this.$message({
type: 'error',
message: '朋友圈内容不能为空'
})
return
}
if (previewList.length != 0) {
this.basicForm.attachmentList = previewList
}
......
......@@ -33,11 +33,11 @@
Next">确定</el-button>-->
<el-button type="primary" @click="handleCancel">取消</el-button>
</div>
<el-dialog title="已送达客户" :visible.sync="dialogVisible" width="576px" :before-close="handleClose" class="user-dialog">
<el-dialog title="已送达客户" :visible.sync="dialogVisible" width="576px" :before-close="handleClose" class="user-dialog">
<div class="user-list">
<div class="user-item" v-for="(item, index) in userList" :key="index">
<div class="user-image">
<img src="https://www.wangbase.com/blogimg/asset/201903/bg2019032511.png" alt="" />
<img :src="item.avatar" alt="" />
</div>
<div class="user-desc">
<div class="user-name">{{ item.customerName }}</div>
......@@ -95,10 +95,10 @@ export default {
},
{
label: '发送时间',
prop: 'sendTime'
// formatter: cellValue => {
// return new Date(cellValue.createdDate).toLocaleDateString().replace(/\//g, '-')
// }
prop: 'sendTime',
formatter: cellValue => {
return cellValue.sendTime? cellValue.sendTime:'--'
}
},
{
label: '已送达客户',
......@@ -203,6 +203,9 @@ export default {
/deep/ .el-dialog {
height: 405px;
}
/deep/ .el-dialog__footer {
text-align: center;
}
}
.customer-detail {
color: #5850ff;
......
......@@ -395,7 +395,7 @@ export default {
str = ''
} //限制只能输入一个小数点
if(value !== '' && value==0){
return (str = 1)
return (str = 0.01)
}
if (Number(value) >= 99999) {
return (str = 99999)
......@@ -413,6 +413,7 @@ export default {
return str
},
getCardContentFun() {
if(this.merchantModel ==2 && this.accountLevel ==1) return
getCardContent({ merchantId: this.merchantId }).then(res => {
if (!res) {
return
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!