Commit debd6a66 by 前端

Merge branch 'yangm_dev_2.0.0' into 'v2.0.0'

fixed

See merge request !13
2 parents 887d0e25 2730ebaf
......@@ -107,6 +107,18 @@ const momentRemindUser = params => {
sign: true
})
}
//根据id提醒用户
const momentCancel = params => {
params.method = 'marketing.api.moment.created.cancel'
params.sessionId = session
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
momentDetail,
momentRemindUser,
......@@ -117,4 +129,5 @@ export default {
momentStaff,
momentStaffCustomers,
getListApi,
momentCancel
}
\ No newline at end of file
......@@ -19,7 +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('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) {
......
......@@ -210,7 +210,7 @@ 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(this.previewList[imgIndex].attContent.length == 9){
if(imgIndex != -1 && this.previewList[imgIndex].attContent.length == 9){
this.$message.error('最多上传9张图片')
return
}
......
......@@ -43,6 +43,7 @@
<el-popover v-if="scope.scope.status == 0" placement="top" width="230" trigger="click" content="未到朋友圈发送时间,无法查看详情">
<el-button slot="reference" type="text" style="color: #999999">详情</el-button>
</el-popover>
<el-button type="text" v-if="scope.scope.sendType == 2 && getTimeStatus(scope.scope.sendTime) && scope.scope.status != 4" @click="handleCancel(scope.scope)">取消发送</el-button>
<el-button type="text" v-if="scope.scope.status == 3" @click="handleDetail(scope.scope)">详情</el-button>
</div>
</GLTable>
......@@ -311,6 +312,35 @@ export default {
query: params
})
},
getTimeStatus(val) {
const time = new Date().getTime()
let sendTime = new Date(val).getTime()
if (sendTime - time > 2 * 60 * 1000) {
return true
} else {
return false
}
},
handleCancel(row) {
const time = new Date().getTime()
const sendTime = new Date(row.sendTime).getTime()
if (sendTime - time < 2 * 60 * 1000) {
this.$message.error('当前数据已经超时了')
return
}
this.$apis.friendGroup
.momentCancel({
id: row.id
})
.then(res => {
this.getListData()
this.$message({
type: 'success',
message: '取消成功'
})
// this.$set(this.employeelist[index], 'remindStatus', true)
})
},
handleUpOrDown(row) {
if (row.goodsStatus) {
this.downForm.id = row.id
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!