@@ -1732,15 +1735,16 @@
shujuloading: false,
iframaUrl: '',
iframaShow: false,
- iframeWin:null,
- jiangli:{
- id:'1894944771529637890', //活动id
- name:'商业抽奖活动', //活动名称
- styles:'1', //抽奖样式 1:大转盘 2:砸金蛋 3:刮刮卡 4:翻牌乐 5:福袋 6:摇一摇
+ iframeWin: null,
+ jiangli: {
+ id: '1895043663592030209', //活动id
+ actName: '商业测试活动1', //活动名称
+ actStyle: '1', //抽奖样式 1:大转盘 2:砸金蛋 3:刮刮卡 4:翻牌乐 5:福袋 6:摇一摇
// id:'',
- // name:''
+ // actName:'',
+ // actStyle:'', //抽奖样式 1:大转盘 2:砸金蛋 3:刮刮卡 4:翻牌乐 5:福袋 6:摇一摇
},
- radioreward:'不设置奖励'
+ radioreward: '不设置奖励'
}
},
computed: {
@@ -1749,24 +1753,25 @@
created() {
this.getAll()
},
- mounted() {
- // 监听iframe页面点击按钮触发事件
- window.addEventListener('message', (event) => {
- const data = event.data
- if (data.code === 'success') {
- // alert(data.test)
- console.log('id',data.id)
- console.log('name',data.name)
- this.jiangli = {
- id:''+data.id,
- name:data.name,
- styles:data.style
- }
- this.iframaShow = false
- }
- })
- // this.iframeWin = this.$refs.iframe.contentWindow
- },
+ mounted() {
+ // 监听iframe页面点击按钮触发事件
+ window.addEventListener('message', (event) => {
+ const data = event.data
+ if (data.code === 'success') {
+ // alert(data.test)
+ console.log('id', data.id)
+ console.log('name', data.name)
+ console.log('styles', data.style)
+ this.jiangli = {
+ id: '' + data.id,
+ actName: data.name,
+ actStyle: data.style
+ }
+ this.iframaShow = false
+ }
+ })
+ // this.iframeWin = this.$refs.iframe.contentWindow
+ },
methods: {
input(e, e1) {
// this.formInline[e1] = e
@@ -1810,14 +1815,16 @@
return false;
}
if (this.radioreward == '转盘抽奖') {
- if (this.jiangli.id && this.jiangli.id== '') {
+ if (this.jiangli.id && this.jiangli.id == '') {
this.$message({
message: '请创建转盘活动',
})
return false;
}
- }else{
+ } else {
this.jiangli.id = ''
+ this.jiangli.actName = ''
+ this.jiangli.actStyle = ''
}
let ids = null
if (this.wenConstData.length != 0) {
@@ -1830,6 +1837,8 @@
return false;
}
this.formInline.rewardForParticipation = this.jiangli.id
+ this.formInline.actStyle = this.jiangli.actStyle
+ this.formInline.actName = this.jiangli.actName
this.formInline.createTime = this.currentTime()
TerminaAdd(this.formInline).then(res => {
if (res.data.code == '500') {
@@ -1896,7 +1905,7 @@
item.question = JSON.parse(item.question)
}
const array = this.objectToArray(item.question)
- this.jiangli.id = item.rewardForParticipation
+ this.jiangli.id = item.rewardForParticipation
this.wenData = array
// this.secondData.cereQuestionManagements.map((res, index) => {
// if (typeof res.optionSettings == 'string') {
@@ -2062,12 +2071,13 @@
if (typeof item.question === 'string') {
item.question = JSON.parse(item.question)
}
- if(item.rewardForParticipation!=''){
- this.radioreward='转盘抽奖'
- }else{
- this.radioreward='不设置奖励'
+ if (item.rewardForParticipation != '') {
+ this.radioreward = '转盘抽奖'
+ } else {
+ this.radioreward = '不设置奖励'
}
- this.jiangli.id = item.rewardForParticipation
+ this.jiangli.id = item.rewardForParticipation
+ this.jiangli.actName = item.actName
this.secondDataTi = item.cereQuestionManagements
this.bainjiBox = true
@@ -2091,16 +2101,20 @@
ids = this.secondDataTi.map(item => item.id);
}
if (this.radioreward == '转盘抽奖') {
- if (this.jiangli.id &&this.jiangli.id== '') {
+ if (this.jiangli.id && this.jiangli.id == '') {
this.$message({
message: '请创建转盘活动',
})
return false;
}
- }else{
+ } else {
this.jiangli.id = ''
+ this.jiangli.actStyle = ''
+ this.jiangli.actName = ''
}
this.secondData.rewardForParticipation = this.jiangli.id
+ this.secondData.actStyle = this.jiangli.actStyle
+ this.secondData.actName = this.jiangli.actName
this.secondData.questionId = ids.join(',')
this.secondData.updateTime = this.currentTime()
@@ -2588,13 +2602,13 @@
needGender: '必填',
needOpinion: '必填',
}
- // this.jiangli={
- // id:'',
- // name:'',
- // styles:''
- // }
+ this.jiangli = {
+ id: '',
+ actName: '',
+ actStyle: ''
+ }
this.xuanzheData = []
- this.radioreward='不设置奖励'
+ this.radioreward = '不设置奖励'
const today = new Date();
const startOfToday = new Date(today.getFullYear(), today.getMonth(), today.getDate());
const endOfToday = new Date(today.getFullYear(), today.getMonth(), today.getDate());
@@ -2825,22 +2839,40 @@
if (token && token.startsWith('Bearer')) {
token = token.substring(7);
}
- token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJqd3RfdXNlcl9pbmZvIjoie1wiYXBwSWRcIjoxLFwiYXJlYUNvZGVzXCI6W10sXCJjb21wYW55QWRtaW5cIjpmYWxzZSxcImNvbXBhbnlDb2RlXCI6XCJKSkxEXzAwMVwiLFwiZGVwdENvZGVcIjpcIjAwMlwiLFwiZGVwdFRhZ1wiOlwiXCIsXCJsb2dpblR5cGVcIjpcIlBDXCIsXCJtYWluRGVwdENvZGVcIjpcIjAwMlwiLFwibWFuYWdlclwiOnRydWUsXCJuYW1lXCI6XCLotoXnuqfnrqHnkIblkZhcIixcInBob25lXCI6XCIxMzU0MTMwNDkxMFwiLFwicm9sZXNcIjpbXCJyb2xlX3N1cGVyX2FkbWluXCIsXCJ2aXAtYWRtaW5cIl0sXCJzdXBlckFkbWluXCI6dHJ1ZSxcInRvcERlcHRDb2RlXCI6XCIwMDJcIixcInVzZXJJZFwiOjEsXCJ1c2VybmFtZVwiOlwic3VwZXItampsZFwifSIsImp0aSI6IjA4ZWVmYzQyLWRmNzktNDc5Zi05MjcwLTdkNGI5OTcwM2I5NSIsImV4cCI6MTc0MDYzOTI1OSwiaWF0IjoxNzQwNjI0ODU5LCJzdWIiOiJDRFdMIiwiaXNzIjoiT0EifQ.t4sL7LQ7pQrVBl1juvV6crqsYZUmrHsINH78YsYpgi4'
+ token =
+ 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJqd3RfdXNlcl9pbmZvIjoie1wiYXBwSWRcIjoxLFwiYXJlYUNvZGVzXCI6W10sXCJjb21wYW55QWRtaW5cIjpmYWxzZSxcImNvbXBhbnlDb2RlXCI6XCJKSkxEXzAwMVwiLFwiZGVwdENvZGVcIjpcIjAwMlwiLFwiZGVwdFRhZ1wiOlwiXCIsXCJsb2dpblR5cGVcIjpcIlBDXCIsXCJtYWluRGVwdENvZGVcIjpcIjAwMlwiLFwibWFuYWdlclwiOnRydWUsXCJuYW1lXCI6XCLotoXnuqfnrqHnkIblkZhcIixcInBob25lXCI6XCIxMzU0MTMwNDkxMFwiLFwicm9sZXNcIjpbXCJyb2xlX3N1cGVyX2FkbWluXCIsXCJ2aXAtYWRtaW5cIl0sXCJzdXBlckFkbWluXCI6dHJ1ZSxcInRvcERlcHRDb2RlXCI6XCIwMDJcIixcInVzZXJJZFwiOjEsXCJ1c2VybmFtZVwiOlwic3VwZXItampsZFwifSIsImp0aSI6ImMxMWQ5ZjJjLTc1ZjItNDM5Yy05NjMzLTliYzU4MTc2NmZmYiIsImV4cCI6MTc0MDY2Mjg2NywiaWF0IjoxNzQwNjQ4NDY3LCJzdWIiOiJDRFdMIiwiaXNzIjoiT0EifQ.-2jv7Vq8pqn8PehIpd1lMXJrSqPsmCfhXp7fddL56qI'
this.iframaShow = true
- if(val == 0){
+ if (val == 0) {
this.iframaUrl =
`https://jy.scjysm.asia:18086/cdwltool/addEmptyLottery?token=${token}&channel=shangye&thirdPartyUrl=http://localhost:9529/#/investigation/index`
- }else if(val == 1){
+ } else if (val == 1) {
this.iframaUrl =
`https://jy.scjysm.asia:18086/cdwltool/addEmptyLottery?token=${token}&id=${this.jiangli.id}&title=活动详情&channel=shangye&thirdPartyUrl=http://localhost:9529/#/investigation/index`
- }else if(val == 2){
+ } else if (val == 2) {
this.iframaUrl =
`https://jy.scjysm.asia:18086/cdwltool/addEmptyLottery?token=${token}&id=${this.jiangli.id}&channel=shangye&thirdPartyUrl=http://localhost:9529/#/investigation/index`
}
// window.location.href =
},
-
+ getStatusText(val) {
+ switch (val) {
+ case '1':
+ return '大转盘';
+ case '2':
+ return '砸金蛋';
+ case '3':
+ return '刮刮卡';
+ case '4':
+ return '翻牌乐';
+ case '5':
+ return '福袋';
+ case '6':
+ return '摇一摇';
+ default:
+ return '无';
+ }
+ }
}
}
@@ -3214,4 +3246,4 @@
}
}
-
+
\ No newline at end of file
diff --git a/yanshouban/src/views/customer/yixiang/index.vue b/yanshouban/src/views/customer/yixiang/index.vue
index 505ebac..3dce5b9 100644
--- a/yanshouban/src/views/customer/yixiang/index.vue
+++ b/yanshouban/src/views/customer/yixiang/index.vue
@@ -348,8 +348,13 @@
匹配记录
-
-
+
+
@@ -1126,11 +1131,7 @@ async getshen(item){