| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837 |
- <template>
- <div :style="bgcolors">
- <div class="i-layout-page-header">
- <span class="ivu-page-header-title mr20">{{ $route.meta.title }}</span>
- <div>
- <div style="float: right">
- <Button class="bnt" type="primary" @click="save">保存</Button>
- </div>
- </div>
- </div>
- <div class="box-wrapper">
- <div class="left-wrapper" v-if="!$route.params.id && groupAll.length">
- <Menu :theme="theme3" :active-name="sortName" width="auto">
- <MenuGroup>
- <MenuItem
- :name="item.config_name"
- class="menu-item"
- v-for="(item, index) in groupAll"
- :key="index"
- @click.native="edits(item)"
- >
- {{ item.name }}
- </MenuItem>
- <MenuItem name="guide" class="menu-item" @click.native="edits(2)"> 开屏广告 </MenuItem>
- </MenuGroup>
- </Menu>
- </div>
- <div v-if="name == 'user_recharge_quota'" class="iframe">
- <div class="iframe-boxs">
- <div class="moneyBox">
- <div class="box1">
- <div class="font1">我的余额</div>
- <div>¥ <i class="font2">0.00</i></div>
- </div>
- <div class="moneyBox_content">
- <div class="box2">
- <div>账户充值</div>
- <div>佣金导入</div>
- </div>
- <div class="box3">
- <div v-show="item.status != 0" class="box3_box" v-for="(item, index) in sginList.list" :key="index">
- <div>{{ item.price }}<i class="font">元</i></div>
- <div class="font">赠送:{{ item.give_money }}元</div>
- </div>
- <div class="box3_box">
- <div class="other">其他</div>
- </div>
- </div>
- <div class="box4">
- <div class="tips">注意事项:</div>
- <div class="tips-samll">
- <p>充值后帐户的金额不能提现,可用于商城消费使用。</p>
- <p>佣金导入账户之后不能再次导出、不可提现。</p>
- <p>账户充值出现问题可联系商城客服,也可拨打商城客服热线:40088888889。</p>
- </div>
- </div>
- <div class="box5">立即充值</div>
- </div>
- </div>
- </div>
- </div>
- <div v-if="name == 'admin_login_slide'" class="pciframe" :bordered="false" dis-hover>
- <img src="../../../assets/images/pclogin.png" class="pciframe-box" />
- <div class="pcmoddile_goods">
- <div class="nofont" v-if="tabList.list == ''">暂无照片,请添加~</div>
- <swiper v-else :options="swiperOption" class="pcswiperimg_goods">
- <swiper-slide class="spcwiperimg_goods" v-for="(item, index) in tabList.list" :key="index">
- <img :src="item.slide" />
- </swiper-slide>
- </swiper>
- </div>
- </div>
- <div v-if="name == 'integral_shop_banner'" class="iframe" :bordered="false">
- <div class="iframe-box">
- <img src="../../../assets/images/integral.png" style="width: 100%" />
- <div class="moddile_goods">
- <div class="nofonts" v-if="tabList.list == '' || !tabList.list.length || !tabList.list[0].img">
- 暂无照片,请添加~
- </div>
- <swiper v-else :options="swiperOption" class="pcswiperimg_goods">
- <swiper-slide class="swiperimg_goods" v-for="(item, index) in tabList.list" :key="index">
- <img :src="item.img" />
- </swiper-slide>
- </swiper>
- </div>
- </div>
- </div>
- <div
- v-if="
- name != 'sign_day_num' &&
- name != 'admin_login_slide' &&
- name != 'user_recharge_quota' &&
- name != 'integral_shop_banner' &&
- a != 1 &&
- guide != 2
- "
- class="iframe"
- :bordered="false"
- dis-hover
- >
- <iframe :src="url" class="iframe-box" frameborder="0"></iframe>
- <div class="moddile"></div>
- <div
- v-if="
- name == 'routine_home_bast_banner' ||
- name == 'routine_home_hot_banner' ||
- name == 'routine_home_new_banner' ||
- name == 'routine_home_benefit_banner'
- "
- class="moddile_box"
- >
- <div class="nofonts" v-if="tabList.list == '' || !tabList.list.length || !tabList.list[0].img">
- 暂无照片,请添加~
- </div>
- <swiper v-else :options="swiperOption" class="swiperimg">
- <swiper-slide class="swiperimg" v-for="(item, index) in tabList.list" :key="index">
- <img :src="item.img" />
- </swiper-slide>
- </swiper>
- </div>
- <div v-if="name == 'combination_banner'" class="moddile_goods">
- <div class="nofonts" v-if="tabList.list == ''">暂无照片,请添加~</div>
- <swiper v-else :options="swiperOption" class="swiperimg_goods">
- <swiper-slide class="swiperimg_goods" v-for="(item, index) in tabList.list" :key="index">
- <img :src="item.img" />
- </swiper-slide>
- </swiper>
- </div>
- </div>
- <div v-if="name == 'sign_day_num'" class="iframe" :bordered="false">
- <div class="iframe-box">
- <img v-if="bgimg == 1" src="../../../assets/images/bluesgin.png" />
- <img v-if="bgimg == 2" src="../../../assets/images/greesgin.png" />
- <img v-if="bgimg == 3" src="../../../assets/images/redsgin.png" />
- <img v-if="bgimg == 4" src="../../../assets/images/pinksgin.png" />
- <img v-if="bgimg == 5" src="../../../assets/images/oragesgin.png" />
- </div>
- </div>
- <div v-if="a == 1" class="iframe" :bordered="false">
- <div class="agreement-box">
- <div class="template"></div>
- <div class="htmls_box">
- <div class="htmls_top">服务协议与隐私政策</div>
- <div class="htmls_font">
- <div class="ok">我同意</div>
- <div>不同意</div>
- </div>
- <div class="htmls" v-html="formValidate.content"></div>
- </div>
- </div>
- </div>
- <div v-if="a == 1" style="margin-left: 40px">
- <div class="table_box">
- <div type="flex">
- <div v-bind="grid">
- <div class="title">隐私权限页面展示:</div>
- </div>
- </div>
- <div>
- <Form
- class="form"
- ref="formValidate"
- :model="formValidate"
- :rules="ruleValidate"
- :label-width="labelWidth"
- :label-position="labelPosition"
- @submit.native.prevent
- >
- <div class="goodsTitle acea-row"></div>
- <FormItem label="" prop="content" style="margin: 0px">
- <WangEditor
- style="width: 90%"
- :content="formValidate.content"
- @editorContent="getEditorContent"
- ></WangEditor>
- </FormItem>
- </Form>
- </div>
- </div>
- </div>
- <div v-if="guide == 2" class="iframe" :bordered="false">
- <div class="nofonts" v-if="tabList.list == '' || !tabList.list.length || !tabList.list[0].img">
- 暂无照片,请添加~
- </div>
- <swiper :options="swiperOption" class="swiperimgs" v-else>
- <swiper-slide class="swiperimgs" v-for="(item, index) in tabList.list" :key="index">
- <img :src="item.img" />
- </swiper-slide>
- </swiper>
- </div>
- <div v-if="name == 'sign_day_num'" style="margin-left: 20px">
- <div class="table_box">
- <div type="flex">
- <div v-bind="grid">
- <div class="title">签到天数设置</div>
- <Button
- type="primary"
- icon="md-add"
- @click="groupAdd('添加数据')"
- style="margin-left: 14px; margin-top: 30px"
- >添加数据</Button
- >
- </div>
- </div>
- <div class="table">
- <Table
- :columns="columns1"
- :data="cmsList"
- ref="table"
- class="mt25"
- :loading="loading"
- highlight-row
- no-userFrom-text="暂无数据"
- no-filtered-userFrom-text="暂无筛选结果"
- >
- <template slot-scope="{ row, index }" slot="status">
- <i-switch
- v-model="row.status"
- :value="row.status"
- :true-value="1"
- :false-value="0"
- @on-change="onchangeIsShow(row)"
- size="large"
- >
- <span slot="open">显示</span>
- <span slot="close">隐藏</span>
- </i-switch>
- </template>
- <template slot-scope="{ row, index }" slot="action">
- <a @click="edit(row, '编辑')">编辑</a>
- <Divider type="vertical" />
- <a @click="del(row, '删除这条信息', index)">删除</a>
- </template>
- </Table>
- </div>
- </div>
- </div>
- <div v-if="name == 'user_recharge_quota'" style="margin-left: 20px">
- <div class="table_box">
- <div type="flex">
- <div v-bind="grid">
- <div class="title">充值金额设置</div>
- <Button
- type="primary"
- icon="md-add"
- @click="groupAdd('添加数据')"
- style="margin-left: 14px; margin-top: 30px"
- >添加数据</Button
- >
- </div>
- </div>
- <div class="table">
- <Table
- :columns="columns1"
- :data="sginList.list"
- ref="table"
- class="mt25"
- :loading="loading"
- highlight-row
- no-userFrom-text="暂无数据"
- no-filtered-userFrom-text="暂无筛选结果"
- >
- <template slot-scope="{ row, index }" slot="status">
- <i-switch
- v-model="row.status"
- :value="row.status"
- :true-value="1"
- :false-value="0"
- @on-change="onchangeIsShow(row)"
- size="large"
- >
- <span slot="open">显示</span>
- <span slot="close">隐藏</span>
- </i-switch>
- </template>
- <template slot-scope="{ row, index }" slot="action">
- <a @click="edit(row, '编辑')">编辑</a>
- <Divider type="vertical" />
- <a @click="del(row, '删除这条信息', index)">删除</a>
- </template>
- </Table>
- </div>
- </div>
- </div>
- <div v-else>
- <div
- v-if="name != 'sign_day_num' && a != 1 && guide != 2"
- :class="name != 'admin_login_slide' ? 'content' : 'contents'"
- >
- <div class="right-box">
- <div class="hot_imgs">
- <div class="title" v-if="name == 'admin_login_slide'">幻灯片设置</div>
- <div class="title" v-else>轮播图设置</div>
- <div class="title-text">建议尺寸:690 * 240px,拖拽图片可调整图片顺序哦,最多添加五张</div>
- <div class="list-box">
- <draggable
- v-if="name == 'admin_login_slide'"
- class="dragArea list-group Bbox"
- :list="tabList.list"
- group="peoples"
- handle=".move-icon"
- >
- <div class="items" v-for="(item, index) in tabList.list" :key="index">
- <div class="move-icon">
- <span class="iconfont icondrag2"></span>
- </div>
- <div class="img-box" @click="modalPicTap('单选', index)">
- <img :src="item.slide" alt="" v-if="item.slide" />
- <div class="upload-box" v-else>
- <Icon type="ios-camera-outline" size="36" />
- </div>
- <div class="delect-btn" @click.stop="bindDelete(item, index)">
- <Icon type="md-close-circle" size="26" />
- </div>
- </div>
- <div class="info"></div>
- </div>
- </draggable>
- <draggable v-else class="dragArea list-group" :list="tabList.list" group="peoples" handle=".move-icon">
- <div class="item" v-for="(item, index) in tabList.list" :key="index">
- <div class="move-icon">
- <span class="iconfont icondrag2"></span>
- </div>
- <div class="img-box" @click="modalPicTap('单选', index)">
- <img :src="item.img" alt="" v-if="item.img" />
- <div class="upload-box" v-else>
- <Icon type="ios-camera-outline" size="36" />
- </div>
- <div class="delect-btn" @click.stop="bindDelete(item, index)">
- <Icon type="md-close-circle" size="26" />
- </div>
- </div>
- <div class="info">
- <div class="info-item">
- <span>图片名称:</span>
- <div class="input-box">
- <Input v-model="item.comment" placeholder="请填写名称" />
- </div>
- </div>
- <div class="info-item">
- <span>链接地址:</span>
- <div class="input-box" @click="link(index)">
- <Input v-model="item.link" icon="ios-arrow-forward" readonly placeholder="选择链接" />
- </div>
- </div>
- </div>
- </div>
- </draggable>
- <div>
- <Modal
- v-model="modalPic"
- width="950px"
- scrollable
- footer-hide
- closable
- title="上传商品图"
- :mask-closable="false"
- :z-index="999"
- >
- <uploadPictures
- :isChoice="isChoice"
- @getPic="getPic"
- :gridBtn="gridBtn"
- :gridPic="gridPic"
- v-if="modalPic"
- ></uploadPictures>
- </Modal>
- </div>
- </div>
- <template>
- <div class="add-btn">
- <Button
- type="primary"
- ghost
- style="width: 100px; height: 35px; background-color: #1890ff; color: #ffffff"
- @click="addBox"
- >添加图片
- </Button>
- </div>
- </template>
- </div>
- </div>
- </div>
- </div>
- <div v-if="guide === 2" :class="name != 'admin_login_slide' ? 'content' : 'contents'">
- <div class="right-box">
- <div class="hot_imgs">
- <div class="title">引导页设置</div>
- <div class="title-text">建议尺寸:750 * 1334px,拖拽图片可调整图片顺序哦,最多添加五张</div>
- <div class="list-box">
- <div>
- <Form :model="formItem" :label-width="80">
- <FormItem label="开屏广告:">
- <i-switch v-model="formItem.status" :true-value="1" :false-value="0" size="large">
- <span slot="开">开启</span>
- <span slot="关">关闭</span>
- </i-switch>
- </FormItem>
- <FormItem label="广告时间:">
- <Input
- v-model.number="formItem.time"
- type="number"
- placeholder="请输入开屏广告时间"
- style="width: 150px"
- ></Input>
- 单位(秒)
- </FormItem>
- </Form>
- </div>
- <draggable class="dragArea list-group" :list="tabList.list" group="peoples" handle=".move-icon">
- <div class="item" v-for="(item, index) in tabList.list" :key="index">
- <div class="move-icon">
- <span class="iconfont icondrag2"></span>
- </div>
- <div class="img-box" @click="modalPicTap('单选', index)">
- <img :src="item.img" alt="" v-if="item.img" />
- <div class="upload-box" v-else>
- <Icon type="ios-camera-outline" size="36" />
- </div>
- <div class="delect-btn" @click.stop="bindDelete(item, index)">
- <Icon type="md-close-circle" size="26" />
- </div>
- </div>
- <div class="info">
- <div class="info-item">
- <span>图片名称:</span>
- <div class="input-box">
- <Input v-model="item.comment" placeholder="请填写名称" />
- </div>
- </div>
- <div class="info-item">
- <span>链接地址:</span>
- <div class="input-box" @click="link(index)">
- <Input v-model="item.link" icon="ios-arrow-forward" readonly placeholder="选择链接" />
- </div>
- </div>
- </div>
- </div>
- </draggable>
- <div>
- <Modal
- v-model="modalPic"
- width="950px"
- scrollable
- footer-hide
- closable
- title="上传商品图"
- :mask-closable="false"
- :z-index="999"
- >
- <uploadPictures
- :isChoice="isChoice"
- @getPic="getPic"
- :gridBtn="gridBtn"
- :gridPic="gridPic"
- v-if="modalPic"
- ></uploadPictures>
- </Modal>
- </div>
- </div>
- <template v-if="tabList.list.length < 5">
- <div class="add-btn">
- <Button
- type="primary"
- ghost
- style="width: 100px; height: 35px; background-color: #1890ff; color: #ffffff"
- @click="addBox"
- >添加图片
- </Button>
- </div>
- </template>
- </div>
- </div>
- </div>
- </div>
- <linkaddress ref="linkaddres" @linkUrl="linkUrl"></linkaddress>
- </div>
- </template>
- <script>
- import WangEditor from '@/components/wangEditor/index.vue';
- import Setting from '@/setting';
- import { diyGetInfo, diySave, getColorChange } from '@/api/diy';
- import { mapState } from 'vuex';
- import editFrom from '@/components/from/from';
- import { productGetTempKeysApi, uploadType } from '@/api/product';
- import {
- groupAllApi,
- groupDataListApi,
- groupSaveApi,
- openAdvSave,
- groupDataAddApi,
- groupDataHeaderApi,
- groupDataEditApi,
- groupDataSetApi,
- getAgreement,
- setAgreement,
- getOpenAdv,
- } from '@/api/system';
- import draggable from 'vuedraggable';
- import uploadPictures from '@/components/uploadPictures';
- import linkaddress from '@/components/linkaddress';
- import { getCookies } from '@/libs/util';
- export default {
- name: 'list',
- components: {
- editFrom,
- draggable,
- uploadPictures,
- linkaddress,
- WangEditor,
- },
- computed: {
- bgcolors() {
- return {
- '--color-theme': this.bgCol,
- };
- },
- labelWidth() {
- return this.isMobile ? undefined : 120;
- },
- labelPosition() {
- return this.isMobile ? 'top' : 'right';
- },
- ...mapState('admin/layout', ['menuCollapse']),
- },
- data() {
- return {
- formValidate: {
- content: '',
- },
- ruleValidate: {},
- myConfig: {
- autoHeightEnabled: false, // 编辑器不自动被内容撑高
- initialFrameHeight: 500, // 初始容器高度
- initialFrameWidth: '100%', // 初始容器宽度
- UEDITOR_HOME_URL: '/UEditor/',
- serverUrl: '',
- },
- a: 0, //判断的隐私协议
- guide: 0,
- bgimg: 0,
- columns1: [],
- bgCol: '',
- name: 'routine_home_bast_banner',
- grid: {
- xl: 7,
- lg: 7,
- md: 12,
- sm: 24,
- xs: 24,
- },
- loading: false,
- sginList: [],
- progress: 0, // 进度条默认0
- swiperOption: {
- //显示分页
- pagination: {
- el: '.swiper-pagination',
- },
- //设置点击箭头
- navigation: {
- nextEl: '.swiper-button-next',
- prevEl: '.swiper-button-prev',
- },
- //自动轮播
- autoplay: {
- delay: 2000,
- //当用户滑动图片后继续自动轮播
- disableOnInteraction: false,
- },
- //开启循环模式
- loop: false,
- },
- url: '',
- BaseURL: Setting.apiBaseURL.replace(/adminapi/, ''),
- pageId: 0,
- theme3: 'light',
- tabList: [],
- upload_type: '', //视频上传类型 1 本地上传 2 3 4 OSS上传
- uploadData: {}, // 上传参数
- lastObj: {
- add_time: '',
- comment: '',
- gid: '',
- id: '',
- img: '',
- link: '',
- sort: '',
- status: 1,
- },
- isChoice: '单选',
- modalPic: false,
- gridPic: {
- xl: 6,
- lg: 8,
- md: 12,
- sm: 12,
- xs: 12,
- },
- gridBtn: {
- xl: 4,
- lg: 8,
- md: 8,
- sm: 8,
- xs: 8,
- },
- groupAll: [],
- activeIndex: 0,
- sortName: null,
- activeIndexs: 0,
- cmsList: [],
- loadingExist: false,
- formItem: {
- time: '',
- type: 'pic',
- status: 1,
- value: [],
- video_link: '',
- },
- fileUrl: Setting.apiBaseURL + '/file/upload',
- cardUrl: Setting.apiBaseURL + '/file/upload/1',
- header: {},
- type: 0,
- upload: {
- videoIng: false, // 是否显示进度条;
- },
- };
- },
- created() {
- this.color();
- this.uploadType();
- this.getToken();
- },
- mounted() {
- this.getGroupAll();
- this.info();
- this.url = this.BaseURL + 'pages/columnGoods/HotNewGoods/index?type=1';
- },
- methods: {
- getEditorContent(data) {
- this.formValidate.content = data;
- },
- // 删除视频;
- delVideo() {
- let that = this;
- that.$set(that.formItem, 'video_link', '');
- },
- //获取视频上传类型
- uploadType() {
- uploadType().then((res) => {
- this.upload_type = res.data.upload_type;
- });
- },
- // 上传成功
- handleSuccess(res, file, fileList) {
- if (res.status === 200) {
- this.$set(this.formItem, 'video_link', res.data.src);
- this.$Message.success(res.msg);
- } else {
- this.$Message.error(res.msg);
- }
- },
- zh_uploadFile() {
- if (this.video_link) {
- this.formValidate.video_link = this.video_link;
- } else {
- this.$refs.refid.click();
- }
- },
- zh_uploadFile_change(evfile) {
- let that = this;
- let suffix = evfile.target.files[0].name.substr(evfile.target.files[0].name.indexOf('.'));
- if (suffix.indexOf('.mp4') === -1) {
- return that.$Message.error('只能上传MP4文件');
- }
- productGetTempKeysApi()
- .then((res) => {
- that.$videoCloud
- .videoUpload({
- type: res.data.type,
- evfile: evfile,
- res: res,
- uploading(status, progress) {
- that.upload.videoIng = status;
- },
- })
- .then((res) => {
- that.formValidate.video_link = res.url;
- that.$Message.success('视频上传成功');
- })
- .catch((res) => {
- that.$Message.error(res);
- });
- })
- .catch((res) => {
- that.$Message.error(res.msg);
- });
- },
- // 上传头部token
- getToken() {
- this.header['Authori-zation'] = 'Bearer ' + getCookies('token');
- },
- beforeUpload() {
- this.uploadData = {};
- let promise = new Promise((resolve) => {
- this.$nextTick(function () {
- resolve(true);
- });
- });
- return promise;
- },
- linkUrl(e) {
- this.tabList.list[this.activeIndexs].link = e;
- },
- color() {
- getColorChange('color_change').then((res) => {
- switch (res.data.status) {
- case 1:
- this.bgCol = '#3875EA';
- this.bgimg = 1;
- break;
- case 2:
- this.bgCol = '#00C050';
- this.bgimg = 2;
- break;
- case 3:
- this.bgCol = '#E93323';
- this.bgimg = 3;
- break;
- case 4:
- this.bgCol = '#FF448F';
- this.bgimg = 4;
- break;
- case 5:
- this.bgCol = '#FE5C2D';
- this.bgimg = 5;
- break;
- }
- });
- },
- // 添加表单
- groupAdd() {
- this.$modalForm(groupDataAddApi({ gid: this.pageId, config_name: this.name }, 'setting/group_data/create')).then(
- () => {
- this.url = this.BaseURL + 'pages/users/user_sgin/index';
- this.info();
- },
- );
- },
- info() {
- groupDataListApi({ config_name: this.name }, 'setting/group_data')
- .then(async (res) => {
- this.tabList = res.data;
- if (this.name == 'admin_login_slide') {
- this.tabList.list.forEach((item, index, array) => {
- if (typeof item.slide != 'string' && item.slide != 'undefined') {
- item.slide = item.slide[0];
- }
- });
- } else if (this.name == 'sign_day_num') {
- this.cmsList = res.data.list;
- } else if (this.name == 'user_recharge_quota') {
- this.sginList = res.data;
- } else {
- this.tabList.list.forEach((item, index, array) => {
- if (typeof item.img != 'string' && item.img != 'undefined') {
- item.img = item.img[0];
- }
- });
- }
- })
- .catch((res) => {
- this.loading = false;
- this.$Message.error(res.msg);
- });
- },
- edits(row) {
- this.pageId = row.id || 0;
- this.name = row.config_name || '';
- if (row == 1) {
- this.a = 1;
- this.guide = 0;
- this.getAgreement();
- } else if (row == 2) {
- this.a = 0;
- this.guide = 2;
- getOpenAdv().then((res) => {
- if (res.data) {
- this.formItem = res.data;
- this.tabList.list = res.data.value;
- } else {
- this.formItem = {
- time: '',
- type: 'pic',
- status: 1,
- value: [],
- video_link: '',
- };
- this.tabList.list = [];
- }
- });
- } else {
- this.info();
- this.guide = 0;
- this.a = 0;
- switch (row.config_name) {
- case 'routine_home_bast_banner':
- this.url = this.BaseURL + 'pages/columnGoods/HotNewGoods/index?type=1&name=精品推荐';
- break;
- case 'sign_day_num':
- this.url = '';
- this.getListHeader();
- break;
- case 'combination_banner':
- this.url = this.BaseURL + 'pages/activity/goods_combination/index';
- break;
- case 'routine_home_hot_banner':
- this.url = this.BaseURL + 'pages/columnGoods/HotNewGoods/index?type=2&name=热门榜单';
- break;
- case 'routine_home_new_banner':
- this.url = this.BaseURL + 'pages/columnGoods/HotNewGoods/index?type=3&name=首发新品';
- break;
- case 'routine_home_benefit_banner':
- this.url = this.BaseURL + 'pages/columnGoods/HotNewGoods/index?type=4&name=促销单品';
- break;
- case 'user_recharge_quota':
- this.url = '';
- this.getListHeader();
- break;
- case 'admin_login_slide':
- this.url = '';
- break;
- case 'integral_shop_banner':
- this.url = '';
- break;
- }
- }
- },
- addBox() {
- if (this.tabList.list.length == 0) {
- this.tabList.list.push(this.lastObj);
- this.lastObj = {
- add_time: '',
- comment: '',
- gid: '',
- id: '',
- img: '',
- link: '',
- sort: '',
- status: 1,
- };
- } else {
- if (this.tabList.list.length == 5) {
- this.$Message.warning('最多添加五张呦');
- } else {
- let obj = JSON.parse(JSON.stringify(this.lastObj));
- this.tabList.list.push(obj);
- }
- }
- },
- // 删除
- bindDelete(item, index) {
- this.tabList.list.splice(index, 1);
- },
- // 点击图文封面
- modalPicTap(title, index) {
- this.activeIndex = index;
- this.modalPic = true;
- },
- // 获取图片信息
- getPic(pc) {
- this.$nextTick(() => {
- if (this.name == 'admin_login_slide') {
- this.tabList.list[this.activeIndex].slide = pc.att_dir;
- } else {
- this.tabList.list[this.activeIndex].img = pc.att_dir;
- }
- this.modalPic = false;
- });
- },
- save() {
- if (this.a == 1) {
- this.onsubmit('formValidate');
- } else if (this.guide == 2) {
- this.formItem.value = this.tabList.list;
- openAdvSave(this.formItem).then((res) => {
- this.$Message.success(res.msg);
- });
- } else {
- this.loadingExist = true;
- groupSaveApi({
- gid: this.pageId,
- config_name: this.name,
- data: this.tabList.list,
- })
- .then((res) => {
- this.loadingExist = false;
- this.$Message.success(res.msg);
- })
- .catch((err) => {
- this.loadingExist = false;
- this.$Message.error(err.msg);
- });
- }
- },
- link(index) {
- this.activeIndexs = index;
- this.$refs.linkaddres.modals = true;
- },
- getListHeader() {
- this.loading = true;
- groupDataHeaderApi({ config_name: this.name }, 'setting/sign_data/header')
- .then((res) => {
- let data = res.data;
- let header = data.header;
- let index = [];
- this.columns1 = header;
- this.loading = false;
- })
- .catch((res) => {
- this.loading = false;
- this.$Message.error(res.msg);
- });
- },
- // 编辑
- edit(row) {
- this.$modalForm(
- groupDataEditApi({ gid: this.pageId, config_name: this.name }, 'setting/group_data/' + row.id + '/edit'),
- ).then(() => {
- this.info();
- this.url = this.BaseURL + 'pages/users/user_sgin/index';
- });
- },
- // 删除
- del(row, tit, num) {
- let delfromData = {
- title: tit,
- num: num,
- url: 'setting/group_data/' + row.id,
- method: 'DELETE',
- ids: '',
- };
- this.$modalSure(delfromData)
- .then((res) => {
- this.info();
- this.$Message.success(res.msg);
- })
- .catch((res) => {
- this.$Message.error(res.msg);
- });
- },
- // 修改是否显示
- onchangeIsShow(row) {
- groupDataSetApi('setting/group_data/set_status/' + row.id + '/' + row.status)
- .then(async (res) => {
- this.url = this.BaseURL + '/pages/users/user_sgin/index';
- this.$Message.success(res.msg);
- this.info();
- })
- .catch((res) => {
- this.url = this.BaseURL + '/pages/users/user_sgin/index';
- this.$Message.error(res.msg);
- });
- },
- getGroupAll() {
- groupAllApi()
- .then(async (res) => {
- this.groupAll = res.data;
- this.sortName = res.data[0].config_name;
- this.pageId = res.data[0].id;
- })
- .catch((res) => {
- this.$Message.error(res.msg);
- });
- },
- getContent(val) {
- this.formValidate.content = val;
- },
- // 提交数据
- onsubmit(name) {
- this.$refs[name].validate((valid) => {
- if (valid) {
- setAgreement(this.formValidate)
- .then(async (res) => {
- this.$Message.success(res.msg);
- })
- .catch((res) => {
- this.$Message.error(res.msg);
- });
- } else {
- return false;
- }
- });
- },
- //详情
- getAgreement() {
- getAgreement()
- .then(async (res) => {
- let data = res.data;
- this.formValidate = {
- content: data.content,
- };
- })
- .catch((res) => {
- this.loading = false;
- this.$Message.error(res.msg);
- });
- },
- },
- };
- </script>
- <style scoped lang="stylus">
- /deep/ .ivu-menu-vertical .ivu-menu-item-group-title {
- display: none;
- }
- /deep/ .ivu-menu-vertical.ivu-menu-light:after {
- display: none;
- }
- /deep/.ivu-form-item-content {
- margin-left: 0px !important;
- }
- .nofont {
- text-align: center;
- line-height: 123px;
- }
- .nofonts {
- text-align: center;
- line-height: 105px;
- }
- .save {
- width: 100%;
- margin: 0 auto;
- text-align: center;
- background-color: #FFF;
- bottom: 0;
- padding: 16px;
- border-top: 3px solid #f5f7f9;
- }
- .form {
- .goodsTitle {
- margin-bottom: 25px;
- }
- .goodsTitle ~ .goodsTitle {
- margin-top: 20px;
- }
- .goodsTitle .title {
- border-bottom: 2px solid #1890ff;
- padding: 0 8px 12px 5px;
- color: #000;
- font-size: 14px;
- }
- .goodsTitle .icons {
- font-size: 15px;
- margin-right: 8px;
- color: #999;
- }
- .add {
- font-size: 12px;
- color: #1890ff;
- padding: 0 12px;
- cursor: pointer;
- }
- .radio {
- margin-right: 20px;
- }
- .upLoad {
- width: 58px;
- height: 58px;
- line-height: 58px;
- border: 1px dotted rgba(0, 0, 0, 0.1);
- border-radius: 4px;
- background: rgba(0, 0, 0, 0.02);
- }
- .iconfont {
- color: #898989;
- }
- .pictrue {
- width: 60px;
- height: 60px;
- border: 1px dotted rgba(0, 0, 0, 0.1);
- margin-right: 10px;
- }
- .pictrue img {
- width: 100%;
- height: 100%;
- }
- }
- .agreement-box {
- width: 310px;
- height: 550px;
- border-radius: 10px;
- background: rgba(0, 0, 0, 0);
- border: 1px solid #EEEEEE;
- opacity: 1;
- position: relative;
- .template {
- position: absolute;
- width: 100%;
- height: 100%;
- top: 0;
- left: 0;
- border-radius: 10px;
- background-color: #817e81;
- }
- .htmls_box {
- font-size: 12px;
- width: 259px;
- height: 430px;
- border-radius: 10px;
- background-color: #fff;
- position: absolute;
- top: 58px;
- left: 26px;
- .htmls_top {
- position: absolute;
- top: 8px;
- left: 0;
- height: 34px;
- text-align: center;
- width: 100%;
- line-height: 35px;
- font-weight: 600;
- font-size: 20px;
- }
- .htmls_font {
- position: absolute;
- bottom: 0;
- left: 0;
- padding: 15px 15px;
- text-align: center;
- width: 100%;
- div {
- height: 35px;
- line-height: 35px;
- border-radius: 20px;
- }
- .ok {
- background-color: #f33316;
- color: #FFFFFF;
- }
- }
- .htmls {
- position: absolute;
- background-color: #fff;
- top: 50px;
- left: 0;
- width: 259px;
- height: 281px;
- border-radius: 4px;
- overflow: auto;
- padding: 5px 15px;
- word-break: break-word;
- }
- .htmls::-webkit-scrollbar {
- display: none;
- }
- }
- }
- .Bbox {
- width: 495px;
- display: flex;
- flex-wrap: wrap;
- }
- .item {
- margin-right: 15px;
- border: 1px dashed #dbdbdb;
- padding-bottom: 10px;
- padding-right: 15px;
- padding-top: 20px;
- }
- .items {
- margin-right: 15px;
- border: 1px dashed #dbdbdb;
- padding-bottom: 10px;
- padding-top: 15px;
- position: relative;
- display: flex;
- margin-top: 20px;
- .move-icon {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 30px;
- height: 80px;
- cursor: move;
- color: #D8D8D8;
- }
- .img-box {
- position: relative;
- width: 80px;
- height: 80px;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .info {
- flex: 1;
- margin-left: 22px;
- .info-item {
- display: flex;
- align-items: center;
- margin-bottom: 10px;
- span {
- // width 40px
- font-size: 13px;
- .input-box {
- flex: 1;
- }
- }
- }
- }
- .delect-btn {
- position: absolute;
- right: -12px;
- top: -12px;
- color: #999999;
- .iconfont {
- font-size: 28px;
- color: #999;
- }
- }
- }
- .table {
- width: 700px;
- color: #515a6e;
- font-size: 14px;
- background-color: #fff;
- margin-left: 20px;
- }
- .contents {
- width: 150px;
- .right-box {
- margin-left: 40px;
- }
- .title-text {
- width: 500px;
- }
- }
- .pciframe {
- margin-left: 20px;
- width: 430px;
- height: 280px;
- background: #FFFFFF;
- border: 1px solid #EEEEEE;
- border-radius: 13px;
- position: relative;
- img {
- width: 100%;
- height: 100%;
- }
- .pciframe-box {
- background: rgba(0, 0, 0, 0);
- // border: 1px solid #EEEEEE;
- border-radius: 4px;
- }
- .pcmoddile_goods {
- position: absolute;
- top: 69px;
- width: 171px;
- height: 140px;
- border-top-left-radius: 2px;
- border-bottom-left-radius: 2px;
- left: 65px;
- background-color: #fff;
- }
- .pcswiperimg_goods {
- height: 140px;
- background-color: #f5f5f5;
- img {
- width: 100%;
- height: 100%;
- }
- }
- }
- .link {
- display: inline-block;
- width: 100%;
- height: 32px;
- line-height: 1.5;
- padding: 4px 7px;
- border: 1px solid #dcdee2;
- border-radius: 4px;
- background-color: #fff;
- position: relative;
- cursor: text;
- transition: border 0.2s ease-in-out, background 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
- font-size: 13px;
- font-family: PingFangSC-Regular;
- line-height: 22px;
- color: rgba(0, 0, 0, 0.25);
- opacity: 1;
- cursor: pointer;
- .you {
- color: #999999;
- float: right;
- margin-right: 11px;
- }
- }
- .swiperimg {
- width: 310px;
- max-height: 126px;
- border-top-left-radius: 10px;
- border-top-right-radius: 10px;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .swiperimgs {
- width: 310px;
- height: 100%;
- border-radius: 10px;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .swiperimg_goods {
- width: 284px;
- height: 124px;
- border-radius: 4px;
- line-height: 99px;
- text-align: center;
- background-color: #f5f5f5;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .title {
- padding: 0 0 13px 0;
- font-weight: bold;
- font-size: 15px;
- border-left: 2px solid #1890FF;
- height: 23px;
- padding-left: 10px;
- }
- .title-text {
- padding: 0 0 0px 16px;
- color: #999;
- font-size: 12px;
- margin-top: 10px;
- }
- .content {
- // width 510px;
- .right-box {
- margin-left: 40px;
- }
- }
- .box {
- border-top: 3px solid #f5f7f9;
- padding: 10px;
- padding-top: 25px;
- width: 100%;
- .save {
- background-color: #1890FF;
- color: #FFFFFF;
- width: 71px;
- height: 30px;
- margin: 0 auto;
- text-align: center;
- line-height: 30px;
- cursor: pointer;
- }
- }
- .iframe {
- margin-left: 20px;
- position: relative;
- width: 310px;
- height: 550px;
- background: #FFFFFF;
- border: 1px solid #EEEEEE;
- opacity: 1;
- border-radius: 10px;
- }
- .moddile {
- position: absolute;
- width: 310px;
- height: 550px;
- top: 0px;
- opacity: 0;
- left: 0px;
- border-radius: 4px;
- }
- .moddile_box {
- position: absolute;
- top: 0px;
- width: 310px;
- height: 115px;
- border-top-left-radius: 4px;
- border-top-right-radius: 4px;
- left: 0px;
- background-color: #f5f5f5;
- }
- .moddile_goods {
- position: absolute;
- top: 12px;
- width: 284px;
- height: 124px;
- /* border-top-left-radius: 10px; */
- /* border-top-right-radius: 10px; */
- border-radius: 5px;
- left: 13px;
- line-height: 99px;
- text-align: center;
- background-color: #f5f5f5;
- }
- .iframe-box {
- width: 310px;
- height: 100%;
- border-radius: 10px;
- // margin: 30px 15px 0px 15px
- background: rgba(0, 0, 0, 0);
- border: 1px solid #EEEEEE;
- opacity: 1;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .left-wrapper {
- min-width: 213px;
- background: #fff;
- border-right: 1px solid #dcdee2;
- }
- .menu-item {
- position: relative;
- display: flex;
- justify-content: space-between;
- word-break: break-all;
- .icon-box {
- z-index: 3;
- position: absolute;
- right: 20px;
- top: 50%;
- transform: translateY(-50%);
- display: none;
- }
- &:hover .icon-box {
- display: block;
- }
- .right-menu {
- z-index: 10;
- position: absolute;
- right: -106px;
- top: -11px;
- width: auto;
- min-width: 121px;
- }
- }
- .tabBox_img {
- width: 36px;
- height: 36px;
- border-radius: 4px;
- cursor: pointer;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .ivu-menu {
- z-index: auto;
- }
- .icondrag2 {
- font-size: 26px;
- color: #d8d8d8;
- }
- .hot_imgs {
- margin-bottom: 20px;
- .title {
- font-size: 14px;
- }
- .list-box {
- .item {
- position: relative;
- display: flex;
- margin-top: 20px;
- .move-icon {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 30px;
- height: 80px;
- cursor: move;
- color: #D8D8D8;
- }
- .img-box {
- position: relative;
- width: 80px;
- height: 80px;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .info {
- flex: 1;
- margin-left: 22px;
- .info-item {
- display: flex;
- align-items: center;
- margin-bottom: 10px;
- span {
- // width 40px
- font-size: 13px;
- }
- .input-box {
- flex: 1;
- }
- }
- }
- .delect-btn {
- position: absolute;
- right: -12px;
- top: -12px;
- color: #999999;
- .iconfont {
- font-size: 28px;
- color: #999;
- }
- }
- }
- }
- .add-btn {
- margin-top: 20px;
- }
- }
- .upload-box {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- height: 100%;
- background: #ccc;
- }
- .iconfont {
- color: #DDDDDD;
- font-size: 28px;
- }
- .iframe-boxs::-webkit-scrollbar {
- display: none;
- }
- .sgin_iframe::-webkit-scrollbar {
- display: none;
- }
- .iframe-boxs {
- width: 310px;
- height: 550px;
- border-radius: 10px;
- background: rgba(0, 0, 0, 0);
- border: 1px solid #EEEEEE;
- opacity: 1;
- overflow: auto;
- .moneyBox {
- background-color: var(--color-theme);
- height: 414px;
- border-radius: 10px;
- .box1 {
- text-align: center;
- color: #FFFFFF;
- padding-bottom: 15px;
- .font1 {
- padding-top: 20px;
- // padding-bottom 15px
- font-size: 12px;
- opacity: 0.6;
- }
- .font2 {
- font-size: 30px;
- font-style: normal;
- opacity: 0.9;
- }
- }
- .moneyBox_content {
- background-color: #FFFFFF;
- height: 317px;
- border-radius: 4px;
- .box2 {
- display: flex;
- justify-content: space-around;
- height: 35px;
- line-height: 35px;
- margin-bottom: 10px;
- div:nth-child(1) {
- font-weight: bold;
- border-bottom: 2px solid var(--color-theme);
- }
- }
- .box3 {
- padding: 0px 10px;
- display: flex;
- justify-content: left;
- flex-wrap: wrap;
- .box3_box {
- width: 90px;
- height: 55px;
- border-radius: 9px;
- background-color: #f4f4f4;
- color: #888;
- margin-bottom: 10px;
- text-align: center;
- padding-top: 3px;
- font-size: 19px;
- margin-right: 3px;
- margin-left: 3px;
- .font {
- font-size: 11px;
- font-style: normal;
- }
- }
- .box3_box:nth-child(1) {
- width: 90px;
- height: 55px;
- border-radius: 9px;
- background-color: var(--color-theme);
- color: #FFFFFF;
- text-align: center;
- padding-top: 3px;
- margin-right: 3px;
- margin-left: 3px;
- }
- .other {
- line-height: 55px;
- }
- }
- .box4 {
- padding: 0px 10px;
- .tips {
- font-size: 14px;
- color: #333333;
- font-weight: 800;
- margin-bottom: 7px;
- margin-top: 10px;
- }
- .tips-samll {
- font-size: 12px;
- color: #333333;
- margin-bottom: 7px;
- p {
- margin: 2px 0px;
- }
- }
- }
- .box5 {
- font-size: 15px;
- width: 225px;
- height: 40px;
- border-radius: 25px;
- margin: 23px auto 0 auto;
- line-height: 40px;
- text-align: center;
- background-color: var(--color-theme);
- color: #FFFFFF;
- }
- }
- }
- }
- .bnt {
- // width 80px!important
- }
- /deep/.i-layout-page-header {
- height: 66px;
- background-color: #fff;
- border-bottom: 1px solid #e8eaec;
- }
- /deep/.ivu-page-header {
- border-bottom: unset;
- position: fixed;
- z-index: 9;
- width: 100%;
- }
- /deep/.i-layout-page-header {
- height: 66px;
- background-color: #fff;
- border-bottom: 1px solid #e8eaec;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .box-wrapper {
- display: flex;
- flex-wrap: nowrap;
- padding: 20px;
- background-color: #fff;
- border-radius: 5px;
- }
- .iview-video-style {
- width: 100%;
- height: 180px;
- border-radius: 10px;
- background-color: #707070;
- margin-top: 10px;
- position: relative;
- overflow: hidden;
- }
- .iview-video-style .iconv {
- color: #fff;
- line-height: 180px;
- width: 50px;
- height: 50px;
- display: inherit;
- font-size: 26px;
- position: absolute;
- top: -74px;
- left: 50%;
- margin-left: -25px;
- }
- .iview-video-style .mark {
- position: absolute;
- width: 100%;
- height: 30px;
- top: 0;
- background-color: rgba(0, 0, 0, 0.5);
- text-align: center;
- }
- </style>
|