123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976 |
- <template>
- <view class="content">
- <header-title :title="'视频'+$test.$test"></header-title>
- <view class="main-video">
- <view class="">
- <form @submit="Submit">
- <view class="main-home-video">
- <view class="box-pack-between ft32 item flex-y-center border-b">
- <text>视频{{$test.$test}}<text class="red">*</text></text>
- <view class="ft24 item-off flex">
- <view class="flex-grow-1 flex-center" @click="bindchecks" :data-index="index" v-for="(item,index) of switch_list"
- :key="index" :class="index==act_index?'act':''">{{item.name}}</view>
- </view>
- </view>
- <view>
- <view v-if="video_url" class="video_content">
- <video :src="video_url" controls></video>
- <image @click="delUrl" class="video_content_del" src="../../static/images/shanchu.png" mode=""></image>
- </view>
- <view v-else class="video_content flex-center" @click="chooseVideo">
- <image class="video_content_add" src="../../static/images/add-video.png" mode=""></image>
- </view>
- </view>
- </view>
- <FlowPool :thismoshi="moshi" :rule_arr_val="ruleArr" :this_moshi_type="moshi_type" :list_way="list_way" @ondel="binddel"
- @oncheck="bindcheck" @onTime='bindtime' @confirm="bindConfirm" @bindlevel="bindlevel"></FlowPool>
- <view class="main-home-video" v-if="moshi==1">
- <view class="box-pack-between ft32 item">
- <text>{{$test.$test}}场景</text>
- <picker class="flex-center add-home ft24" @change="bindPickerChange" :value="index" :range-key="'name'" :range="allwayList">
- 添加
- </picker>
- </view>
- <view class="item-bg" v-if="arr.length>0">
- <view class="box-pack-between mar64 flex-y-center" :key='index' v-for="(item,index) of arr">
- <view class="flex-y-center flex-grow-1 pdr-20">
- <text style="margin-right: 10rpx;">{{item.name}}</text>
- <input class="flex-grow-1" type="text" @input="getScene" :data-index="index" placeholder="请填写链接或内容" :value="item.way_power"
- maxlength="5000" />
- </view>
- <image class="item-del" @click="delScene" :data-index='index' src="../../static/images/del.png" mode=""></image>
- </view>
- </view>
- </view>
- <view class="main-home-video">
- <view class="box-pack-between ft32 item">
- <text>视频内容</text>
- <view class="flex-center ft24">
- <switch :checked="video_state==1?true:false" name="video_state" @change="switch1" style="transform:scale(0.7)" />
- </view>
- </view>
- <view class="item-bg" v-if="video_state==1">
- <view class="box-pack-between mgr57">
- <view class="flex-row flex-grow-1">
- <text class="item-bg-32">视频标题</text>
- <input class="flex-grow-1" type="text" :value="info.video_title" name="video_title" placeholder="请填写视频标题" />
- </view>
- </view>
- <view class="box-pack-between mgr57">
- <view class="flex-row flex-grow-1">
- <text class="item-bg-32">视频描述</text>
- <input class="flex-grow-1" type="text" :value="info.video_desc" name="video_desc" placeholder="请填写视频描述" />
- </view>
- </view>
- <view class="box-pack-between mgr57">
- <view class="flex-row flex-grow-1">
- <text class="item-bg-32">点赞数量</text>
- <input type="number" class="flex-grow-1" maxlength="9" :value="info.video_zan" name="video_zan" placeholder="请填写视频点赞数量" />
- </view>
- </view>
- <view class="box-pack-between mgr57">
- <view class="flex-row flex-grow-1">
- <text class="item-bg-32">评论数量</text>
- <input class="flex-grow-1" type="number" maxlength="9" :value="info.video_ping" name="video_ping" placeholder="请填写视频评论数量" />
- </view>
- </view>
- <view class="box-pack-between mgr57">
- <view class="flex-row flex-grow-1">
- <text class="item-bg-32">联系电话</text>
- <input class="flex-grow-1" type="number" maxlength="11" :value="info.video_tel " name="video_tel" placeholder="请填写联系电话" />
- </view>
- </view>
- </view>
- </view>
- <view class="main-home-video">
- <view class="box-pack-between ft32 item">
- <text>跳转广告</text>
- <view class=" flex-center ft24">
- <switch name="jump_state" :checked="jump_state==1?true:false" @change="switch2" style="transform:scale(0.7)" />
- </view>
- </view>
- <view class="item-bg" v-if="jump_state==1">
- <view class="box-pack-between ft32 flex-y-center flex-grow-1" style="margin-bottom: 57rpx;">
- <text>跳转平台</text>
- <view class="ft24 item-off flex">
- <view class="flex-grow-1 flex-center" @click="bindjump(item.type)" :data-index="index"
- v-for="(item,index) of xcx_list"
- :key="index" :class="item.type==jump_type?'act':''">{{item.name}}</view>
- </view>
- </view>
- <view v-if="jump_type==1" class="box-pack-between mgr57">
- <view class="flex-row flex-grow-1">
- <text class="item-bg-32">广告网址 </text>
- <input class="flex-grow-1" type="text" name="jump_web" placeholder="请填写http/https开头的网址"
- :value="info.jump_web" />
- </view>
- </view>
- <block v-else>
- <view class="box-pack-between mgr57">
- <view class="flex-row flex-grow-1">
- <text class="item-bg-32">原始id</text>
- <input class="flex-grow-1" type="text" name="xcx_original_id" placeholder="请填写微信小程序原始id"
- :value="info.xcx_original_id" />
- </view>
- </view>
- <view class=" mgr57">
- <view class="box-pack-between">
- <view class="flex-row flex-grow-1">
- <view class="item-bg-32 flex-y-center" style="margin-right: 10rpx;"> <text>跳转路径 </text>
- <image class="zhiyin" @click="look" src="../../static/images/tip.png"
- mode=""></image> </view>
- <input class="flex-grow-1" type="text" name="xcx_link" placeholder="小程序路径(不填默认跳转首页)" :value="info.xcx_link" />
- </view>
- </view>
- <!-- <view class="ft22" style="text-align: right;"></view> -->
- </view>
- </block>
-
- <view class=" flex-row mgr57 flex-grow-1">
- <text class="item-bg-32 ">广告标题</text>
- <input class="flex-grow-1" type="text" name="jump_title" placeholder="请填写广告标题" :value="info.jump_title" />
- </view>
-
- <view class=" flex-row mgr57 flex-grow-1">
- <text class="item-bg-32">广告描述</text>
- <input class="flex-grow-1" type="text" name="jump_cont" placeholder="请填写广告描述" :value="info.jump_cont" />
- </view>
- <view class="box-pack-between flex-y-center">
- <text class="item-bg-32">广告内容</text>
- <image v-if="jump_img" @click="ChooseImage" :data-type="1" class="upimg" :src="URL+jump_img" mode="">
- </image>
- <image v-else @click="ChooseImage" :data-type="1" class="upimg" src="../../static/images/upimg.png" mode="">
- </image>
- </view>
- </view>
- </view>
- <view class="main-home-video">
- <view class="box-pack-between ft32 item">
- <text>配置微信文章分享</text>
- <view class=" flex-center ft24">
- <switch name="wx_state" :checked="wx_state==1?true:false" @change="switch3" style="transform:scale(0.7)" />
- </view>
- </view>
- <view class="item-bg" v-if="wx_state==1">
- <view class="box-pack-between mgr57">
- <view class="flex-row flex-grow-1">
- <text class="item-bg-32">分享标题 </text>
- <input class="flex-grow-1" type="text" name="wx_title" placeholder="请填写分享标题" :value="info.wx_title" />
- </view>
- </view>
- <view class=" flex-row mgr57 flex-grow-1">
- <text class="item-bg-32">分享描述</text>
- <input class="flex-grow-1" type="text" name="wx_desc" placeholder="请填写分享描述" :value="info.wx_desc" />
- </view>
- <view class="box-pack-between flex-y-center">
- <text class="item-bg-32">分享图标</text>
- <image v-if="wx_img" @click="ChooseImage" :data-type="2" class="upimg" :src="URL+wx_img" mode="">
- </image>
- <image v-else @click="ChooseImage" :data-type="2" class="upimg" src="../../static/images/upimg.png" mode="">
- </image>
- </view>
- </view>
- </view>
- <!-- <view class="box-pack-between ft32 item">
- <text>开启遮盖指引</text>
- <view class="flex-center ft24">
- <switch :checked="hj_state==1?true:false" name="hj_state" style="transform:scale(0.7)" />
- </view>
- </view> -->
- <view class="box-pack-between ft32 item main-home-video">
- <view class="flex-center">
- <text>加入换量记录池</text>
- </view>
- <view class=" flex-center ft24">
- <switch name="is_exchange" :checked="is_exchange=='Y'?true:false" style="transform:scale(0.7)" />
- </view>
- </view>
- <view class="box-pack-between ft32 item main-home-video">
- <view class="flex-center">
- <text>加入视频专区交流</text>
- </view>
- <view class=" flex-center ft24">
- <switch name="is_interflow" :checked="is_interflow==1?true:false" style="transform:scale(0.7)" />
- </view>
- </view>
- <view class="bottom-bar">
- <block v-if="card_num">
- <button form-type="submit" data-status="2" class="btn2 flex-center">
- 确定修改
- </button>
- </block>
- <block v-else>
- <button form-type="submit" data-status="2" class="btn1 flex-center">
- {{$test.$test}}视频
- </button>
- </block>
- </view>
- </form>
- </view>
- </view>
- </view>
- </template>
- <script>
- import HeaderTitle from '@/components/header/header-title.vue';
- import FlowPool from '@/components/flow-pool/flow-pool.vue';
- export default {
- components: {
- HeaderTitle,
- FlowPool,
- },
- data() {
- return {
- $test: this.$test.$test,
- switch_list: [{
- name: "本地上传"
- }, {
- name: "智能抓取"
- }, ],
- xcx_list: [{
- name: "网站",
- type: 1,
- }, {
- name: "小程序",
- type: 2,
- }, ],
- jump_type: 1,
- act_index: 0,
- arr: [],
- allwayList: [],
- index: 0,
- video_state: 1,
- // video_title:"",// 视频标题
- // video_desc:"" ,//视频描述
- // video_zan:"" , //视频点赞
- // video_ping:"", //视频评论
- // video_tel:"", //视频电话
- hj_state: 1,
- URL: getApp().globalData.URL,
- jump_state: 1,
- jump_img: "",
- wx_state: 1,
- wx_img: '',
- info: {},
- video_url: "",
- card_num: "",
- is_video: 1,
- is_exchange: 'N', is_interflow:0,
- video_otherurl: "",
- moshi: 1,
- moshi_type: 2,
- list_way: [],
- ruleArr: [],
- powerpool_id: "",
- level_arr: [1, 2, 3],
- level: "",
- rule: "",
- }
- },
- onLoad(e) {
- uni.removeStorageSync("list_way");
- this.level = this.level_arr.join(",");
- this.card_num = e.card_num;
- uni.setNavigationBarTitle({
- title: `视频${this.$test.$test}`
- })
- this.allways();
- },
- onShow() {
- var that = this,
- is_video, video_otherurl;
- is_video = this.is_video;
- video_otherurl = this.video_otherurl;
- // #ifdef MP-WEIXIN
- var pages = getCurrentPages();
- var currPage = pages[pages.length - 1]; //当前页面
- is_video = currPage.data.is_video;
- video_otherurl = currPage.data.video_otherurl;
- // #endif
- // console.log(is_video,"is_video",video_otherurl)
- if (is_video == 2) {
- var video = uni.getStorageSync("video_url") || "";
- this.is_video = is_video;
- this.act_index = video ? 1 : 0;
- this.video_url = video;
- this.video_otherurl = video_otherurl;
- }
- if (uni.getStorageSync("list_way")) {
- this.list_way = uni.getStorageSync("list_way");
- if (this.way_index == 3) {
- for (let i of this.list_way) {
- if (i.checked) {
- this.powerpool_id = i.id
- }
- }
- }
- }
- },
- onUnload() {
- this.is_video == 2 ? "" : uni.removeStorageSync("video_url")
- },
- onHide() {
- this.is_video == 2 ? "" : uni.removeStorageSync("video_url")
- },
- methods: {
- look() {
- uni.showModal({
- title: '温馨提示',
- content: '微信小程序页面路径必须添加.html后缀,如pages/home/index.html',
- showCancel: false,
- cancelText: '',
- confirmText: '好的',
- success: res => {},
- fail: () => {},
- complete: () => {}
- });
- },
- // 跳转小程序选择
- bindjump(index) {
- this.jump_type = index;
- },
- // 流量池
- bindcheck(index) {
- uni.removeStorageSync("list_way");
- this.moshi = index;
- },
- binddel(index) {
- this.list_way.splice(index, 1);
- },
- bindtime(index) {
- console.log("000", index)
- this.list_way = [];
- uni.removeStorageSync("list_way");
- this.moshi_type = index == 1 ? 1 : 2;
- this.way_index = index;
- if (index == 1) {
- uni.navigateTo({
- url: "../public/index"
- })
- }
- // 默认流量池
- if (index == 3) {
- uni.navigateTo({
- url: "../public/index?type=2"
- })
- }
- },
- // 获取时间
- bindConfirm(rule) {
- console.log(rule, "aff")
- this.rule = rule;
- },
- bindlevel(e) {
- console.log(e, "bindlevel")
- var level = [];
- for (var i of e) {
- level.push(i.level)
- }
- this.level = level.join(",");
- },
- // 流量池end
- delUrl(e) {
- this.video_url = "";
- uni.removeStorageSync("video_url")
- },
- getVideo(e) {
- this.video_url = e.detail.value;
- },
- getup(e) {
- this.request({
- url: "videofuneng/video_down",
- data: {
- url: this.video_url,
- },
- }).then(res => {
- console.log(res, "res")
- if (res.code === '200') {
- this.video_url = res.data.video_url
- }
- }).catch((res) => {});
- },
- switch1(e) {
- this.video_state = e.target.value ? 1 : 2;
- },
- switch2(e) {
- this.jump_state = e.target.value ? 1 : 2;
- },
- switch3(e) {
- this.wx_state = e.target.value ? 1 : 2;
- },
- chooseVideo(e) {
- // 上传视频
- uni.chooseVideo({
- maxDuration: 60,
- sourceType: ['album', 'camera'],
- success: (responent) => {
- let videoFile = responent.tempFilePath;
- this.Upload({
- url: "videofuneng/video_upload",
- data: {
- url: videoFile,
- type: 0,
- token: uni.getStorageSync("token"),
- }
- }).then(res => {
- console.log(res, "res")
- this.video_url = res.video_url;
- this.is_video = 1;
- }).catch({
- });
- }
- })
- },
- bindchecks(e) {
- var index = e.currentTarget.dataset.index;
- this.act_index = index;
- if (index == 1) {
- uni.navigateTo({
- url: "/pages/jihuo/getVideo"
- })
- } else {
- // this.video_otherurl = "";
- uni.removeStorageSync("video_url")
- }
- },
- getScene(e) {
- var index = e.currentTarget.dataset.index;
- this.arr[index].way_power = e.detail.value
- },
- delScene(e) {
- var index = e.currentTarget.dataset.index;
- this.arr.splice(index, 1)
- },
- bindPickerChange: function(e) {
- if (this.arr.length > 0) {
- for (let i of this.arr) {
- if (i.id == this.allwayList[e.target.value].id) {
- uni.showToast({
- title: "场景重复",
- icon: 'none'
- })
- return
- }
- }
- }
- this.arr.push({
- id: this.allwayList[e.target.value].id,
- name: this.allwayList[e.target.value].name,
- super_id: this.allwayList[e.target.value].super_id,
- });
- },
- allways() {
- this.request({
- url: "funeng/allways",
- data: {},
- }).then(res => {
- console.log(res, "res")
- if (res.code === '200') {
- this.allwayList = res.data;
- this.arr.push({
- id: res.data[0].id,
- name: res.data[0].name,
- super_id: res.data[0].super_id,
- });
- if (this.card_num) {
- this.edit_detail();
- }
- }
- }).catch((res) => {});
- },
- edit_detail(e) {
- this.request({
- url: "videofuneng/funeng_detailnew",
- data: {
- card_num: this.card_num,
- token: uni.getStorageSync("token"),
- },
- }).then(res => {
- console.log(res, "res")
- if (res.code === '200') {
- if (res.data.video_otherurl) {
- this.getup(res.data.video_otherurl);
- } else {
- this.video_url = res.data.video_url;
- }
- this.hj_state = res.data.hj_state;
- this.info = res.data;
- this.mid_img = res.data.mid_img;
- this.arr = res.data.funeng;
- this.jump_img = res.data.jump_img; //跳转图片
- this.jump_state = res.data.jump_state;
- this.wx_state = res.data.wx_state;
- this.wx_img = res.data.wx_img;
- this.jump_type= res.data.jump_type;
-
- this.video_state = res.data.video_state;
- this.hj_state = res.data.hj_state;
- this.id = res.data.id;
- // console.log(res.data.video_url, "res.data.video_url")
- // this.video_url = res.data.video_url;
- this.is_exchange = res.data.is_exchange;
- this.is_interflow= res.data.is_interflow;
- this.is_video = res.data.video_otherurl ? 2 : 1;
- this.video_otherurl = res.data.video_otherurl;
- this.moshi = res.data.moshi;
- this.moshi_type = res.data.moshi_type;
- this.ruleArr = res.data.rule_arr;
- if (this.moshi == 2) {
- if (this.moshi_type == 2) {
- var a = []
- for (let i of res.data.rule_arr) {
- a.push(i.type)
- }
- // 去除重复的数
- var b = []
- for (var i = 0; i < a.length; i++) {
- if (b.indexOf(a[i]) === -1) {
- b.push(a[i])
- }
- }
- this.level = b.join(",");
- this.powerpool_id = res.data.powerpool_id;
- }
- for (let i of res.data.powerpool) {
- i.checked = true;
- }
- this.list_way = res.data.powerpool;
- }
- }
- }).catch((res) => {});
- },
- getup(url) {
- this.request({
- url: "videofuneng/video_down",
- data: {
- url: url,
- },
- }).then(res => {
- console.log(res, "res")
- if (res.code === '200') {
- this.video_url = res.data.video_url;
- this.video_face = res.data.video_face;
- this.video_index = res.data.video_index;
- }
- }).catch((res) => {
- uni.showToast({
- title: res.message,
- icon: 'none'
- })
- });
- },
- Choose_img(e) {
- var url = e.currentTarget.dataset.url
- // 预览图片
- uni.previewImage({
- urls: [url],
- })
- },
- ChooseImage(e) {
- console.log(e, "eeeeeee")
- let type = e.currentTarget.dataset.type;
- uni.chooseImage({
- count: 1, //默认9
- sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
- sourceType: ['album'], //从相册选择
- success: (res) => {
- console.log(res)
- // type==1?this.descURL1 = res.tempFilePaths[0]:this.descURL2 = res.tempFilePaths[0]
- var tempFilesSize = res.tempFiles[0].size; //获取图片的大小,单位B
- if (type == 2 && tempFilesSize > 1000000) { //图片小于或者等于2M时 可以执行获取图片
- uni.showToast({
- title: '上传图片不能大于1M!', //标题
- icon: 'none' //图标 none不使用图标,详情看官方文档
- })
- return
- }
- var path;
- // #ifdef MP-WEIXIN
- path = res.tempFiles[0].path;
- // #endif
- // #ifdef H5
- path = res.tempFiles[0].name;
- // #endif
- var formatImage = path.split(".")[(path.split(".")).length - 1];
- if (type == 2) {
- if (formatImage != "png" && formatImage != "jpg" && formatImage != "jpeg") {
- uni.showToast({
- title: '只能上传png、jpg、jpeg格式',
- icon: 'none',
- duration: 2000,
- mask: true,
- })
- return
- }}
- res.tempFilePaths.forEach((v, i) => {
- console.log(v)
- this.Upload({
- url: "Spread/upload_img",
- data: {
- url: v,
- type: 0,
- token: uni.getStorageSync("token"),
- }
- }).then(res => {
- console.log(res, "res")
- type == 1 ? (
- this.jump_img = res.file
- ) : (
- this.wx_img = res.file
- )
- }).catch(err => {
- uni.showToast({
- title: err.message,
- icon: 'none'
- })
- });
- })
- },
- });
- },
- Submit(e) {
- console.log(e, this.is_video, this.video_otherurl, "ggg")
- let arr = this.arr,
- way_id = [],
- way_power = [];
- for (let i of arr) {
- way_id.push(i.id);
- way_power.push(i.way_power)
- }
- if (way_id.length <= 0) {
- uni.showToast({
- title: "场景为空",
- icon: 'none'
- })
- return
- }
- if (this.moshi == 2 && this.moshi_type == 2 && !this.rule) {
- uni.showToast({
- title: "请设置规则",
- icon: 'none'
- })
- return
- }
- if (e.detail.value.wx_state==1&&!e.detail.value.wx_title) {
- uni.showToast({
- title: "分享标题不能为空",
- icon: 'none'
- })
- return
- }
- if (e.detail.value.video_state==1&&!e.detail.value.video_title) {
- uni.showToast({
- title: "标题不能为空",
- icon: 'none'
- })
- return
- }
- if (e.detail.value.jump_state&&this.jump_type==1 && !e.detail.value.jump_web) {
- uni.showToast({
- title: "请填写网址链接",
- icon: 'none'
- })
- return
- }
- if (e.detail.value.jump_state&&this.jump_type==2 && !e.detail.value.xcx_original_id) {
- uni.showToast({
- title: "请填写原始id",
- icon: 'none'
- })
- return
- }
- var powerpool_id = "";
- if (this.moshi_type == 1) {
- var powerpool_arr = [];
- for (let i of this.list_way) {
- if (i.checked) {
- powerpool_arr.push(i.id);
- }
- }
- powerpool_id = powerpool_arr.join(",");
- } else {
- powerpool_id = this.powerpool_id;
- }
- let data = e.detail.value;
- data.id = this.id;
- data.video_otherurl = this.is_video == 2 ? this.video_otherurl : '';
- data.token = uni.getStorageSync("token");
- data.video_url = this.video_url; //视频地址,
- data.way_id = way_id.join(","); //通道id
- data.way_power = way_power.join(","); //赋能内容
- data.jump_img = this.jump_img; //跳转图片
- data.wx_img = this.wx_img; //分享图片
- data.type = 6;
- data.save_type = 2;
- data.video_state = e.detail.value.video_state ? 1 : 2;
- data.hj_state = 1; //1开启2不开启
- data.jump_state = e.detail.value.jump_state ? 1 : 2;
- data.wx_state = e.detail.value.wx_state ? 1 : 2;
- data.is_exchange = e.detail.value.is_exchange ? 'Y' : 'N';
- data.is_interflow = e.detail.value.is_interflow?1:0;
- data.jump_type=this.jump_type;
- data.moshi = this.moshi;
- data.moshi_type = this.moshi_type;
- data.powerpool_id = powerpool_id;
- data.level = this.level;
- data.rule = this.rule;
- let url;
- this.card_num ? (data.code = this.info.code, url = "videofuneng/save_edit") : url = "videofuneng/video";
- this.request({
- url,
- data,
- }).then(res => {
- console.log(res, "res")
- if (res.code === '200') {
- this.card_num ? (
- uni.showToast({
- title: "设置成功",
- icon: 'none'
- }),
- setTimeout(() => {
- uni.navigateBack({
- delta: 1
- })
- }, 2e3)
- ) : (
- uni.showToast({
- title: res.message,
- icon: 'none'
- }),
- uni.redirectTo({
- url: "code?type=6" + '&card_num=' + res.data.card_num
- })
- )
- }
- }).catch((res) => {
- uni.showToast({
- title: res.message,
- icon: 'none'
- })
- });
- }
- },
- }
- </script>
- <style>
- .zhiyin {
- width: 40rpx;
- height: 40rpx;
- }
- .item {
- padding: 32rpx 0rpx;
- }
- .border-b {}
- .red {
- color: red;
- }
- .main-home-video {
- width: 670rpx;
- margin: 0 auto;
- }
- .item-off {
- width: 252rpx;
- height: 54rpx;
- background: #fff;
- border-radius: 8rpx;
- color: #3387ff;
- border: 2rpx solid #3387ff;
- }
- .item-off .act {
- background: #3387ff;
- color: #FFFFFF;
- }
- .video_content {
- width: 670rpx;
- height: 320rpx;
- margin: 32rpx 0;
- position: relative;
- }
- .video_content .video_content_del {
- width: 50rpx;
- height: 50rpx;
- position: absolute;
- top: 0;
- right: -2rpx;
- z-index: 999;
- }
- .video_content video {
- width: 100%;
- height: 100%;
- }
- .video_content .video_content_add {
- width: 250rpx;
- height: 160rpx;
- }
- .item-bg {
- width: 670rpx;
- background: #f6f8fe;
- border-radius: 12rpx;
- margin: 0 auto;
- font-size: 28rpx;
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- color: #333333;
- padding: 36rpx 32rpx;
- }
- .item-del {
- width: 40rpx;
- height: 40rpx;
- }
- .item-bg-32 {
- margin-right: 32rpx;
- }
- .mgr57 {
- margin-bottom: 57rpx;
- }
- .item-bg .mgr57:last-child {
- margin-bottom: 0rpx;
- }
- .add-home {
- color: #FFFFFF;
- width: 126rpx;
- height: 54rpx;
- background: linear-gradient(315deg, #3387ff 2%, #569bff 99%);
- border-radius: 8rpx;
- box-shadow: 0px 0px 8rpx 0px rgba(51, 135, 255, 0.2);
- }
- .upimg {
- width: 126rpx;
- height: 126rpx;
- }
- .bottom-bar {
- margin-top: 30rpx;
- }
- .mar64 {
- margin-bottom: 30rpx;
- }
- .item-bg .mar64:last-child {
- margin-bottom: 0rpx;
- }
- .btm-btn {
- width: 670rpx;
- height: 98rpx;
- background: linear-gradient(315deg, #3387ff 2%, #569bff 99%);
- border-radius: 8rpx;
- box-shadow: 0px 0px 8rpx 0px rgba(51, 135, 255, 0.2);
- font-size: 32rpx;
- font-weight: 500;
- text-align: center;
- color: #fff;
- line-height: 98rpx;
- margin: 0 auto;
- margin-top: 30rpx;
- }
- .getVideo {
- width: 670rpx;
- }
- .getVideo textarea {
- background: #ffffff;
- border-radius: 8rpx;
- box-shadow: 0px 0px 14rpx 0px rgba(162, 180, 203, 0.25);
- height: 250rpx;
- width: 100%;
- padding: 20rpx;
- }
- </style>
|