Commit 1f40cd3a by crushh

update: dist

parent 38ff818c
...@@ -225,7 +225,7 @@ export default { ...@@ -225,7 +225,7 @@ export default {
name: '拆盲盒列表', name: '拆盲盒列表',
component: () => import(/* webpackChunkName: "game" */ '../../views/game/cmh/index.vue'), component: () => import(/* webpackChunkName: "game" */ '../../views/game/cmh/index.vue'),
meta: { meta: {
keepAlive: true // keepAlive: true
} }
}, },
{ {
......
...@@ -220,7 +220,7 @@ export default { ...@@ -220,7 +220,7 @@ export default {
} }
const currentTemp = this.templateData.filter(item => item.templateId == this.baseForm.templateId)[0]; const currentTemp = this.templateData.filter(item => item.templateId == this.baseForm.templateId)[0];
let obj = {}; let obj = {};
let arr = ['backMusicUrl', 'shareCard', 'shareReport']; let arr = ['backMusicUrl'];
currentTemp.gameTemplateMaterialList.forEach(item => { currentTemp.gameTemplateMaterialList.forEach(item => {
if (item.materialKey == 'backMusicUrl') { if (item.materialKey == 'backMusicUrl') {
this.backMusicOptions.push(item); this.backMusicOptions.push(item);
...@@ -293,15 +293,10 @@ export default { ...@@ -293,15 +293,10 @@ export default {
return true; return true;
}, },
handleTemplateArr(data, type) { handleTemplateArr(data, type) {
console.log(data); console.log(type);
this.gameExt = data; this.gameExt = data;
const materialKeys = ['mpUrlView', 'adsLinkUrl', 'adsImageUrl']; const materialKeys = ['mpUrlView', 'adsLinkUrl', 'adsImageUrl']; // 模板切换时 保留广告位
data.forEach(item => { data.forEach(item => {
if (item.materialSize) {
const { width, height, size } = JSON.parse(item.materialSize);
this.baseForm[item.materialKey + 'Size0'] = width + '*' + height + 'px';
this.baseForm[item.materialKey + 'Size1'] = size;
}
if (item.materialKey == 'prizeStyleJson') { if (item.materialKey == 'prizeStyleJson') {
this.prizeStyleJson = JSON.parse(item.materialValue); this.prizeStyleJson = JSON.parse(item.materialValue);
this.baseForm['prizeStyleJson'] = JSON.parse(item.materialValue); this.baseForm['prizeStyleJson'] = JSON.parse(item.materialValue);
...@@ -314,7 +309,11 @@ export default { ...@@ -314,7 +309,11 @@ export default {
this.baseForm[item.materialKey] = item.materialValue; this.baseForm[item.materialKey] = item.materialValue;
} }
} }
if (item.materialSize) {
const { width, height, size } = JSON.parse(item.materialSize);
this.baseForm[item.materialKey + 'Size0'] = width + '*' + height + 'px';
this.baseForm[item.materialKey + 'Size1'] = size;
}
if (item.materialKey == 'backMusicUrl') { if (item.materialKey == 'backMusicUrl') {
if (type == 'echo') { if (type == 'echo') {
if (item.customFlag == 1) { if (item.customFlag == 1) {
......
...@@ -211,23 +211,23 @@ export default { ...@@ -211,23 +211,23 @@ export default {
created() { created() {
this.getTableList(); this.getTableList();
}, },
activated() { // activated() {
console.log('activated'); // console.log('activated');
console.log(this.$route.meta.refresh); // console.log(this.$route.meta.refresh);
if (this.$route.meta.refresh) { // if (this.$route.meta.refresh) {
this.dateTime = []; // this.dateTime = [];
this.listParams = { // this.listParams = {
gameName: '', // gameName: '',
status: '', // status: '',
startTime: '', // startTime: '',
endTime: '', // endTime: '',
pageNum: 1, // pageNum: 1,
pageSize: 20 // pageSize: 20
}; // };
} // }
console.log(JSON.stringify(this.listParams)); // console.log(JSON.stringify(this.listParams));
this.getTableList(); // this.getTableList();
}, // },
beforeRouteEnter(to, from, next) { beforeRouteEnter(to, from, next) {
// const { // const {
// meta: { type, path, refresh } // meta: { type, path, refresh }
......
...@@ -46,10 +46,10 @@ ...@@ -46,10 +46,10 @@
</el-form-item> </el-form-item>
</div> </div>
<div v-if="index == 1"> <div v-if="index == 1">
<div class="flex mb10"><el-checkbox v-model="item.conditionType" :true-label="0" :false-label="-1" @change="$emit('change', { val: item.conditionJson.value, type: item.conditionType })" /> <span class="ml10">消耗积分获得游戏次数</span></div> <div class="flex mb10"><el-checkbox v-model="item.conditionType" :true-label="0" :false-label="-1" :disabled="isDisabled" @change="$emit('change', { val: item.conditionJson.value, type: item.conditionType })" /> <span class="ml10">消耗积分获得游戏次数</span></div>
<div v-show="item.conditionType == 0"> <div v-show="item.conditionType == 0">
<el-form-item label="参与游戏每次消耗积分" :prop="'gameRuleConditionList.' + index + '.conditionJson.' + 'value'"> <el-form-item label="参与游戏每次消耗积分" :prop="'gameRuleConditionList.' + index + '.conditionJson.' + 'value'">
<el-input placeholder="请输入积分" v-model="item.conditionJson.value" @change="$emit('change', { val: item.conditionJson.value, type: item.conditionType })" class="w140" /> <el-input placeholder="请输入积分" :disabled="isDisabled" v-model="item.conditionJson.value" @change="$emit('change', { val: item.conditionJson.value, type: item.conditionType })" class="w140" />
<span class="ml10">积分 </span> <span class="ml10">积分 </span>
</el-form-item> </el-form-item>
<el-form-item label="提示客户积分获取路径" :prop="'gameRuleConditionList.' + index + '.conditionJson.' + 'mpUrlView'" :rules="rules.mpUrlView"> <el-form-item label="提示客户积分获取路径" :prop="'gameRuleConditionList.' + index + '.conditionJson.' + 'mpUrlView'" :rules="rules.mpUrlView">
...@@ -57,22 +57,22 @@ ...@@ -57,22 +57,22 @@
<div class="wxapp mr16" v-if="item.conditionJson.mpUrlView && item.conditionJson.mpUrlView.name"> <div class="wxapp mr16" v-if="item.conditionJson.mpUrlView && item.conditionJson.mpUrlView.name">
{{ item.conditionJson.mpUrlView.name }} {{ item.conditionJson.mpUrlView.name }}
</div> </div>
<el-button type="text" @click="show = true"> 选择链接 </el-button> <el-button type="text" :disabled="isDisabled" @click="show = true"> 选择链接 </el-button>
</el-form-item> </el-form-item>
</div> </div>
</div> </div>
<div v-if="index == 2"> <div v-if="index == 2">
<div class="flex mb10"><el-checkbox v-model="item.conditionType" :true-label="1" :false-label="-1" /><span class="ml10"> 邀请好友助力获得游戏次数</span></div> <div class="flex mb10"><el-checkbox v-model="item.conditionType" :true-label="1" :false-label="-1" :disabled="isDisabled" /><span class="ml10"> 邀请好友助力获得游戏次数</span></div>
<div v-show="item.conditionType == 1"> <div v-show="item.conditionType == 1">
<el-form-item label="邀请机制" label-width="80px"> 每成功邀请<el-input-number v-model="item.conditionJson.inviteNum" :min="1" class="w110 ml10 mr10" controls-position="right" />人可获得 <el-input-number v-model="item.conditionJson.value" :min="1" class="w110 ml10 mr10" controls-position="right" />次游戏</el-form-item> <el-form-item label="邀请机制" label-width="80px"> 每成功邀请 <el-input-number v-model="item.conditionJson.inviteNum" :min="1" class="w110 ml10 mr10" controls-position="right" :disabled="isDisabled" />人可获得 <el-input-number v-model="item.conditionJson.value" :min="1" class="w110 ml10 mr10" controls-position="right" :disabled="isDisabled" />次游戏</el-form-item>
<el-form-item label="成功邀请条件" label-width="108px"> <el-form-item label="成功邀请条件" label-width="108px">
<el-radio-group v-model="item.conditionJson.type"> <el-radio-group v-model="item.conditionJson.type" :disabled="isDisabled">
<el-radio :label="11">注册新会员</el-radio> <el-radio :label="11">注册新会员</el-radio>
<el-radio :label="12">首次关注服务号</el-radio> <el-radio :label="12">首次关注服务号</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<div v-show="item.conditionJson.type == 12"> <div v-show="item.conditionJson.type == 12">
<el-form-item label="关注回复" :prop="'gameRuleConditionList.' + index + '.conditionJson.' + 'subscribeMsg'" label-width="80px" :rules="rules.subscribeMsg"> <el-input maxlength="20" show-word-limit v-model="item.conditionJson.subscribeMsg" /> </el-form-item> <el-form-item label="关注回复" :prop="'gameRuleConditionList.' + index + '.conditionJson.' + 'subscribeMsg'" label-width="80px" :rules="rules.subscribeMsg"> <el-input maxlength="20" :disabled="isDisabled" show-word-limit v-model="item.conditionJson.subscribeMsg" /> </el-form-item>
</div> </div>
<div> <div>
<div class="subTitle"> <div class="subTitle">
...@@ -83,12 +83,12 @@ ...@@ -83,12 +83,12 @@
</div> </div>
</div> </div>
</div> </div>
<el-form-item label="小程序卡片标题" label-width="122px" :prop="'gameRuleConditionList.' + index + '.conditionJson.' + 'shareTitle'" :rules="rules.shareTitle"> <el-input class="w340" maxlength="24" show-word-limit v-model="item.conditionJson.shareTitle" /> </el-form-item> <el-form-item label="小程序卡片标题" label-width="122px" :prop="'gameRuleConditionList.' + index + '.conditionJson.' + 'shareTitle'" :rules="rules.shareTitle"> <el-input class="w340" maxlength="24" show-word-limit v-model="item.conditionJson.shareTitle" :disabled="isDisabled" /> </el-form-item>
<el-form-item label="小程序卡片图片" label-width="122px"> <el-form-item label="小程序卡片图片" label-width="122px">
<div class="flex"> <div class="flex">
<img :src="item.conditionJson.shareCard" alt="游戏背景" style="width: 100px;height: 75px;" /> <img :src="item.conditionJson.shareCard" alt="游戏背景" style="width: 100px;height: 75px;" />
<el-upload class="avatar-uploader" action="123" :show-file-list="false" :before-upload="file => beforeAvatarUpload(file, 'shareCard', shareCardSize1)"> <el-upload class="avatar-uploader" action="123" :show-file-list="false" :disabled="isDisabled" :before-upload="file => beforeAvatarUpload(file, 'shareCard', shareCardSize1)">
<el-button type="text" class="ml16">替换图片</el-button> <el-button type="text" class="ml16" :disabled="isDisabled">替换图片</el-button>
</el-upload> </el-upload>
</div> </div>
...@@ -97,8 +97,8 @@ ...@@ -97,8 +97,8 @@
<el-form-item label="分享海报" label-width="122px"> <el-form-item label="分享海报" label-width="122px">
<div class="flex"> <div class="flex">
<img :src="item.conditionJson.shareReport" alt="游戏背景" style="width: 100px;height: 178px;" /> <img :src="item.conditionJson.shareReport" alt="游戏背景" style="width: 100px;height: 178px;" />
<el-upload class="avatar-uploader" action="123" :show-file-list="false" :before-upload="file => beforeAvatarUpload(file, 'shareReport', shareReportSize1)"> <el-upload class="avatar-uploader" action="123" :show-file-list="false" :disabled="isDisabled" :before-upload="file => beforeAvatarUpload(file, 'shareReport', shareReportSize1)">
<el-button type="text" class="ml16">替换图片</el-button> <el-button type="text" class="ml16" :disabled="isDisabled">替换图片</el-button>
</el-upload> </el-upload>
<el-button type="text" class="ml16 downloadBtn" @click="downloadTmp">下载模板</el-button> <el-button type="text" class="ml16 downloadBtn" @click="downloadTmp">下载模板</el-button>
</div> </div>
...@@ -253,7 +253,7 @@ export default { ...@@ -253,7 +253,7 @@ export default {
}, },
watch: { watch: {
shareImgData(val) { shareImgData(val) {
console.log(val); console.log(val.shareCard);
const { shareCard, shareReport, shareCardSize0, shareCardSize1, shareReportSize1, shareReportSize0 } = val; const { shareCard, shareReport, shareCardSize0, shareCardSize1, shareReportSize1, shareReportSize0 } = val;
this.ruleForm.gameRuleConditionList[2].conditionJson.shareCard = shareCard; this.ruleForm.gameRuleConditionList[2].conditionJson.shareCard = shareCard;
this.ruleForm.gameRuleConditionList[2].conditionJson.shareReport = shareReport; this.ruleForm.gameRuleConditionList[2].conditionJson.shareReport = shareReport;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment