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