Commit 542e1553 by 前端

Merge branch 'v3.20.0' into 'master'

V3.20.0

See merge request !24
2 parents 5de6e891 103b67a7
...@@ -4537,9 +4537,9 @@ ...@@ -4537,9 +4537,9 @@
} }
}, },
"dayjs": { "dayjs": {
"version": "1.11.7", "version": "1.11.10",
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.7.tgz", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz",
"integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ==" "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ=="
}, },
"de-indent": { "de-indent": {
"version": "1.0.2", "version": "1.0.2",
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
"axios": "^0.21.4", "axios": "^0.21.4",
"core-js": "^3.19.1", "core-js": "^3.19.1",
"cors": "^2.8.5", "cors": "^2.8.5",
"dayjs": "^1.11.10",
"el-tree-transfer": "^2.4.7", "el-tree-transfer": "^2.4.7",
"element-ui": "^2.15.6", "element-ui": "^2.15.6",
"glsx-common": "^2.1.0", "glsx-common": "^2.1.0",
......
import { http } from '@/main' import { http ,marketing_http} from '@/main'
/*获取权益卡管理列表*/ /*获取权益卡管理列表*/
const getEquityCardList = params => { const getEquityCardList = params => {
params.method = 'scrm.api.equity.card.class.list.with.page' params.method = 'scrm.api.equity.card.class.list.with.page'
...@@ -11,7 +11,7 @@ const newEquityCard = params => { ...@@ -11,7 +11,7 @@ const newEquityCard = params => {
params.method = 'scrm.api.equity.card.class.insert' params.method = 'scrm.api.equity.card.class.insert'
return http({ return http({
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
/*编辑权益卡*/ /*编辑权益卡*/
...@@ -19,7 +19,7 @@ const editEquityCard = params => { ...@@ -19,7 +19,7 @@ const editEquityCard = params => {
params.method = 'scrm.api.equity.card.class.update' params.method = 'scrm.api.equity.card.class.update'
return http({ return http({
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
/*权益卡批量生成*/ /*权益卡批量生成*/
...@@ -57,7 +57,7 @@ const getMerchantList = params => { ...@@ -57,7 +57,7 @@ const getMerchantList = params => {
params.method = 'scrm.api.equity.goods.merchant.list' params.method = 'scrm.api.equity.goods.merchant.list'
return http({ return http({
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
/*导出*/ /*导出*/
...@@ -65,7 +65,7 @@ const cardExport = params => { ...@@ -65,7 +65,7 @@ const cardExport = params => {
params.method = 'scrm.api.equity.card.export' params.method = 'scrm.api.equity.card.export'
return http({ return http({
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
/*获取领用门店列表*/ /*获取领用门店列表*/
...@@ -73,15 +73,16 @@ const getCollectionMerchantList = params => { ...@@ -73,15 +73,16 @@ const getCollectionMerchantList = params => {
params.method = 'scrm.api.equity.card.get.by.merchant.name' params.method = 'scrm.api.equity.card.get.by.merchant.name'
return http({ return http({
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
/*获取推广信息*/ /*获取推广信息*/
const getQrUrl = params => { const getQrUrl = params => {
params.method = 'scrm.api.equity.card.class.generate.try.url' params.method = 'scrm.api.equity.card.class.generate.try.url'
params.isOperateFlag = 1
return http({ return http({
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
/*获取用户明细列表*/ /*获取用户明细列表*/
...@@ -134,7 +135,7 @@ const gethwBrandList = params => { ...@@ -134,7 +135,7 @@ const gethwBrandList = params => {
}) })
} }
const editHwActiveDayApi= params => { const editHwActiveDayApi = params => {
params.method = `scrm.api.equity.hw.order.updateLimitedTimeActivity` params.method = `scrm.api.equity.hw.order.updateLimitedTimeActivity`
return http({ return http({
data: params, data: params,
...@@ -142,7 +143,7 @@ const editHwActiveDayApi= params => { ...@@ -142,7 +143,7 @@ const editHwActiveDayApi= params => {
}) })
} }
const getHwActiveDayApi= params => { const getHwActiveDayApi = params => {
params.method = `scrm.api.equity.hw.order.getLimitedTimeActivity` params.method = `scrm.api.equity.hw.order.getLimitedTimeActivity`
return http({ return http({
data: params, data: params,
...@@ -150,15 +151,22 @@ const getHwActiveDayApi= params => { ...@@ -150,15 +151,22 @@ const getHwActiveDayApi= params => {
}) })
} }
const syncHwDataApi= params => { const syncHwDataApi = params => {
params.method = `scrm.api.equity.hw.order.sync` params.method = `scrm.api.equity.hw.order.sync`
return http({ return http({
data: params, data: params,
sign: true sign: true
}) })
} }
/**
* 查询门店红包活动列表
*/
const getActivityRedEnvelopeList = params => {
params.method = 'marketing.api.activityRedEnvelope.merchant.list'
return marketing_http({
data: params,
})
}
export default { export default {
getEquityCardList, getEquityCardList,
newEquityCard, newEquityCard,
...@@ -179,5 +187,6 @@ export default { ...@@ -179,5 +187,6 @@ export default {
gethwBrandList, gethwBrandList,
editHwActiveDayApi, editHwActiveDayApi,
getHwActiveDayApi, getHwActiveDayApi,
syncHwDataApi syncHwDataApi,
getActivityRedEnvelopeList
} }
...@@ -130,8 +130,8 @@ const saveCouponInfo = params => { ...@@ -130,8 +130,8 @@ const saveCouponInfo = params => {
// 获取模板下的优惠券列表 // 获取模板下的优惠券列表
const getCouponById = params => { const getCouponById = params => {
if(!params.templateId) { if (!params.templateId) {
return new Promise((resolve, reject)=>{ return new Promise((resolve, reject) => {
reject() reject()
}) })
}; };
...@@ -164,7 +164,19 @@ const delTemplateById = params => { ...@@ -164,7 +164,19 @@ const delTemplateById = params => {
}) })
} }
// 获取领取优惠券的短链
const getUrlLink = params => {
params.method = `${defaultPath}urlLink.get`
return other_http({
url,
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
getUrlLink,
getCouponsList, getCouponsList,
createCoupons, createCoupons,
getExportApi, getExportApi,
......
.el-message {
z-index: 3000 !important;
}
.equity-wrap .contain { .equity-wrap .contain {
background: #ffffff; background: #ffffff;
// margin: 0 0 20px 0; // margin: 0 0 20px 0;
......
...@@ -22,4 +22,5 @@ export { bootstrap, mount, unmount } from '@/setup' ...@@ -22,4 +22,5 @@ export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params) export const http = params => Vue.prototype.$http(params)
export const new_http = params => Vue.prototype.$new_http(params) export const new_http = params => Vue.prototype.$new_http(params)
export const other_http = params => Vue.prototype.$other_http(params) export const other_http = params => Vue.prototype.$other_http(params)
export const marketing_http = params => Vue.prototype.$marketing_http(params)
import './utils/util.js' import './utils/util.js'
...@@ -17,8 +17,8 @@ Vue.use(GLCombiForm) ...@@ -17,8 +17,8 @@ Vue.use(GLCombiForm)
Vue.use(GLTableButton) Vue.use(GLTableButton)
Vue.use(GLDialog) Vue.use(GLDialog)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) { export async function bootstrap ({ history, common, messenger, globalState, routerBase }) {
const { response, request, other_request, sign, secret } = await fetchConfig(globalState.configSwitch) const { response, request, other_request, sign, secret, marketing_request } = await fetchConfig(globalState.configSwitch)
let newrequest = Object.assign({}, request) let newrequest = Object.assign({}, request)
newrequest.baseURL = juedeDomain(request.baseURL) newrequest.baseURL = juedeDomain(request.baseURL)
Vue.prototype.$history = history Vue.prototype.$history = history
...@@ -30,6 +30,7 @@ export async function bootstrap({ history, common, messenger, globalState, route ...@@ -30,6 +30,7 @@ export async function bootstrap({ history, common, messenger, globalState, route
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.$other_http = new common.Http({ response, request: other_request, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$other_http = new common.Http({ response, request: other_request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$new_http = new common.Http({ response, request: newrequest, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$new_http = new common.Http({ response, request: newrequest, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$marketing_http = new common.Http({ response, request: marketing_request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState // Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
// Vue.use(GLButton,GLTable, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) // Vue.use(GLButton,GLTable, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers) const routesData = common.utils.deepClone(globalState.routers)
...@@ -38,25 +39,25 @@ export async function bootstrap({ history, common, messenger, globalState, route ...@@ -38,25 +39,25 @@ export async function bootstrap({ history, common, messenger, globalState, route
subscribe({ messenger }) subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase }) Vue.use(GLButton, { routes, routerBase })
} }
export async function mount(props) { export async function mount (props) {
const insts = render(props.routerBase, routes) const insts = render(props.routerBase, routes)
router = insts.router router = insts.router
instance = insts.vm instance = insts.vm
} }
export async function unmount() { export async function unmount () {
instance.$destroy() instance.$destroy()
instance.$el.innerHTML = '' instance.$el.innerHTML = ''
instance = null instance = null
router = null router = null
} }
function subscribe({ messenger }) { function subscribe ({ messenger }) {
messenger.subscribe(v => { messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v) console.log(`监听到子应用${v.from}发来消息:`, v)
}) })
} }
function juedeDomain(url) { function juedeDomain (url) {
const val = { const val = {
environment: 'test', environment: 'test',
channel: 1, channel: 1,
......
...@@ -24,6 +24,9 @@ ...@@ -24,6 +24,9 @@
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton> <GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div> </div>
</GLTable> </GLTable>
<GLDialog class="codeDialog" mode="small" title="领取链接" @onOk="handleCopyLink" okText="复制" cancelText="取消" :before-close="closeLinkDialog" @onCancel="closeLinkDialog" :visible.sync="dialogShow">
<div class="link-wrap">{{ urlLink }}</div>
</GLDialog>
</div> </div>
</template> </template>
...@@ -32,6 +35,7 @@ export default { ...@@ -32,6 +35,7 @@ export default {
name: 'index', name: 'index',
data() { data() {
return { return {
dialogShow: false,
getListApi: this.$apis.goodsCouponApi.getCouponsList, getListApi: this.$apis.goodsCouponApi.getCouponsList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
searchForm: { searchForm: {
...@@ -99,6 +103,19 @@ export default { ...@@ -99,6 +103,19 @@ export default {
listeners: { listeners: {
click: row => this.goDetailPage(row) click: row => this.goDetailPage(row)
} }
},
{
type: 'el-button',
name: row => {
return '领取链接'
},
attrs: {
type: 'text',
fn: '领取链接'
},
listeners: {
click: row => this.goLink(row.scope)
}
} }
], ],
tableParams: { tableParams: {
...@@ -214,13 +231,41 @@ export default { ...@@ -214,13 +231,41 @@ export default {
optionLabel: 'label', optionLabel: 'label',
isClear: true isClear: true
} }
] ],
urlLink:'',
} }
}, },
created() { created() {
this.getAllBrandList() this.getAllBrandList()
}, },
methods: { methods: {
goLink(row) {
this.$apis.goodsCouponApi.getUrlLink({
couponId:row.id
}).then(res=>{
console.log(res)
this.urlLink =res
this.dialogShow = true
})
},
handleCopyLink() {
this.$message({
message: '复制成功',
type: 'success',
customClass: 'message-Z-zinde'
})
const input = document.createElement('input')
document.body.appendChild(input)
input.setAttribute('value', this.urlLink)
input.select()
document.execCommand('Copy')
document.body.removeChild(input)
},
closeLinkDialog() {
this.dialogShow = !this.dialogShow
this.urlLink=''
},
handleOk() { handleOk() {
this.$refs.tableRef.refreshTable() this.$refs.tableRef.refreshTable()
}, },
...@@ -326,4 +371,11 @@ export default { ...@@ -326,4 +371,11 @@ export default {
} }
} }
} }
.link-wrap {
background: #f8f8f8;
border-radius: 2px;
padding: 20px;
position: relative;
margin-top: 20px;
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!