relation.blade.php 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753
  1. @extends('layouts.base')
  2. @section('title', '关系链设置')
  3. @section('content')
  4. <link href="{{static_url('yunshop/css/total.css')}}" media="all" rel="stylesheet" type="text/css" />
  5. <link rel="stylesheet" href="{{static_url('css/public-number.css')}}">
  6. <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods1.css')}}"/>
  7. <style scoped>
  8. .main-panel{
  9. margin-top:50px;
  10. }
  11. .main-panel #re_content {
  12. padding: 10px;
  13. }
  14. .panel{
  15. margin-bottom:10px!important;
  16. border-radius: 10px;
  17. padding-left: 20px;
  18. }
  19. .panel .active a {
  20. background-color: #29ba9c!important;
  21. border-radius: 18px!important;
  22. color:#fff;
  23. }
  24. .panel a{
  25. border:none!important;
  26. background-color:#fff!important;
  27. }
  28. .content{
  29. background: #eff3f6;
  30. padding:10px!important;
  31. }
  32. .con{
  33. padding-bottom:40px;
  34. position:relative;
  35. border-radius: 8px;
  36. }
  37. .con .setting .block{
  38. padding:10px;
  39. background-color:#fff;
  40. border-radius: 8px;
  41. }
  42. .block{
  43. padding:10px;
  44. background-color:#fff;
  45. border-radius: 8px;
  46. }
  47. .con .setting .block .title{
  48. font-size:18px;
  49. margin-bottom:15px;
  50. display:flex;
  51. align-items:center;
  52. }
  53. .confirm-btn{
  54. width: calc(100% - 266px);
  55. position:fixed;
  56. bottom:0;
  57. right:0;
  58. margin-right:10px;
  59. line-height:63px;
  60. background-color: #ffffff;
  61. box-shadow: 0px 8px 23px 1px
  62. rgba(51, 51, 51, 0.3);
  63. background-color:#fff;
  64. text-align:center;
  65. }
  66. b{
  67. font-size:14px;
  68. }
  69. .el-checkbox__inner{
  70. border:solid 1px #56be69!important;
  71. }
  72. .upload-boxed .el-icon-close {
  73. position: absolute;
  74. top: -5px;
  75. right: -5px;
  76. color: #fff;
  77. background: #333;
  78. border-radius: 50%;
  79. cursor: pointer;
  80. }
  81. </style>
  82. <style>
  83. .el-checkbox__label {
  84. line-height: 40px;
  85. }
  86. /* 提示文本 */
  87. .text-des {
  88. margin-left: 0px;
  89. }
  90. .text {
  91. color: #999;
  92. font-variant: small-caps;
  93. font-weight: 400;
  94. font-size: 12px;
  95. font-family: arial, verdana;
  96. }
  97. .text-des-jur,
  98. .text-des {
  99. color: #999;
  100. line-height: 20px;
  101. }
  102. /* 选择框修改边框颜色 */
  103. .el-radio__inner,
  104. .el-checkbox__inner {
  105. border: 1px solid #999;
  106. }
  107. /* 提示头文本 */
  108. .el-form-item__content {
  109. /* border: 1px solid red; */
  110. line-height: 40px !important;
  111. }
  112. .el-form-item__label,
  113. .el-radio {
  114. /*font-weight: 600;*/
  115. }
  116. /* 上传商品图片列表 */
  117. .el-upload-list--picture-card .el-upload-list__item {
  118. width: 110px;
  119. height: 110px;
  120. margin-right: 20px;
  121. }
  122. .el-upload--picture-card:hover .el-icon-plus {
  123. color: #29BA9C;
  124. }
  125. .el-upload--picture-card {
  126. width: 110px;
  127. height: 110px;
  128. line-height: 100px;
  129. position: relative;
  130. overflow: hidden;
  131. }
  132. .upload-text {
  133. display: block;
  134. line-height: 0;
  135. margin-top: 28px;
  136. position: absolute;
  137. top: 50%;
  138. left: 50%;
  139. transform: translate(-50%, -50%);
  140. }
  141. .des-text {
  142. margin-top: 10px;
  143. }
  144. .vue-upload {
  145. width: 556.5px;
  146. margin-left: 162px;
  147. }
  148. .el-form-item__content {
  149. line-height: 20px;
  150. font-size: 13px;
  151. }
  152. /* 上传商品部分*/
  153. .addLevel {
  154. margin-left: 65px;
  155. }
  156. /*上传图片 */
  157. .addImg-box {
  158. width: 700px;
  159. display: flex;
  160. flex-wrap: wrap;
  161. cursor: pointer;
  162. }
  163. .addImg-list {
  164. height: 150px;
  165. width: 150px;
  166. margin-right: 20px;
  167. margin-bottom: 60px;
  168. position: relative;
  169. }
  170. .cancel-box {
  171. width: 16px;
  172. height: 16px;
  173. user-select: none;
  174. background: black;
  175. position: absolute;
  176. top: -9px;
  177. right: -9px;
  178. border-radius: 50%;
  179. }
  180. .cancel {
  181. color: white;
  182. font-size: 18px;
  183. line-height: 19px;
  184. text-indent: 0px;
  185. position: relative;
  186. left: 2px;
  187. top: -10px;
  188. }
  189. .anew {
  190. width: 100%;
  191. color: whitesmoke;
  192. text-align: center;
  193. font-size: 13px !important;
  194. font-weight: 400;
  195. padding: 5px 0 5px 0;
  196. position: absolute;
  197. bottom: 0;
  198. background: rgba(0, 0, 0, .5) !important;
  199. }
  200. /* 商品图片添加 */
  201. .add-price-img {
  202. height: 150px;
  203. width: 150px;
  204. text-align: center;
  205. line-height: 20px;
  206. cursor: pointer;
  207. position: relative;
  208. border: 1px solid #ccc;
  209. }
  210. .el-icon-plus {
  211. font-size: 40px;
  212. margin-top: 45px;
  213. }
  214. .select-price {
  215. font-size: 13px;
  216. margin-top: 15px;
  217. }
  218. .cell {
  219. text-align: center;
  220. }
  221. .el-checkbox-group {
  222. font-size: 1px;
  223. }
  224. /* 优化显示效果 */
  225. [v-cloak] {
  226. display: none;
  227. }
  228. /* 文字溢出隐藏 */
  229. .middenTitle {
  230. width: 100%;
  231. font-size: 12px;
  232. white-space: normal;
  233. text-overflow: -o-ellipsis-lastline;
  234. overflow: hidden;
  235. text-overflow:
  236. ellipsis;
  237. display: -webkit-box;
  238. -webkit-line-clamp: 2;
  239. line-clamp: 2;
  240. -webkit-box-orient: vertical;
  241. line-height: 20px;
  242. text-indent: -6px;
  243. margin-top: 6px;
  244. }
  245. </style>
  246. <div style="padding: 10px">
  247. @include('layouts.newTabs')
  248. <div>
  249. <div id="app" v-cloak>
  250. <div class="total-head block" style="margin: 0 0 20px 0;padding: 0">
  251. <!-- 关系链设置 -->
  252. <div class="block">
  253. <div class="vue-title">
  254. <div class="vue-title-left"></div>
  255. <div class="vue-title-content">关系链设置</div>
  256. </div>
  257. <el-form ref="form" :model="form" label-width="15%">
  258. <el-form-item label="启用关系链">
  259. <el-switch active-value="1" inactive-value="0" v-model="form.status" active-color="#29BA9C" inactive-color="#ccc">
  260. </el-switch>
  261. <div class="text-des-jur text">开启后首页也需要授权登录</div>
  262. </el-form-item>
  263. <el-form-item label="获得推广权益的条件">
  264. <el-radio-group v-model="form.become">
  265. <div style="margin-top:10px;">
  266. <el-radio :label="0" :disabled = "form.become_child != 0 ? true : false">无条件</el-radio>
  267. </div>
  268. <div style="margin:10px 0;">
  269. <el-radio :label="1">申请</el-radio>
  270. </div>
  271. <el-radio :label="2">或</el-radio>
  272. <el-radio :label="3">与</el-radio>
  273. <div class="text-des text">[或]满足以下任意条件都可以成为推广员</div>
  274. <div class="text-des text">[与]满足以下所有条件才可以成为推广员</div>
  275. </el-radio-group>
  276. </el-form-item>
  277. <!-- 控制显示隐藏块 -->
  278. <div v-show="isTermShow">
  279. <el-form-item>
  280. <el-checkbox-group v-model="form.become_term">
  281. <el-checkbox :label="2">
  282. 消费达到 &nbsp;<el-input clearable v-model="form.become_ordercount" style="width:100%">
  283. <template slot="append">次</template>
  284. </el-input>
  285. </el-checkbox></br>
  286. <el-checkbox :label="3">
  287. 消费达到 &nbsp;<el-input clearable v-model="form.become_moneycount" style="width:100%">
  288. <template slot="append">元</template>
  289. </el-input>
  290. </el-checkbox>
  291. <div>
  292. <el-checkbox :label="4">购买商品</el-checkbox>
  293. </div>
  294. <!-- 上传商品部分 -->
  295. <div>
  296. <div>
  297. <!-- 上传商品 -->
  298. <div class="addImg-box">
  299. <div class="addImg-list" v-for="(good,i) in form.goods" :key="i" @click="uploadingGoods(0,i)">
  300. <div class="itemImg_box">
  301. <img style="width:150px;height:150px" :src="good.thumb" alt="">
  302. <div class="middenTitle">【ID:[[ good.id ]]】[[ good.title ]]</div>
  303. </div>
  304. <div class="cancel-box" @click.stop="cancel(i)"><i class="cancel">×</i></div>
  305. <div class="anew">点击重新上传</div>
  306. </div>
  307. <div @click.stop="uploadingGoods(1)" class="add-price-img">
  308. <i class="el-icon-plus"></i>
  309. <div class="select-price">选择商品</div>
  310. </div>
  311. </div>
  312. <p class="text">可指定多件商品,只需购买其中一件就可以成为推广员,选择重复的商品保存后会只保留一个</p>
  313. <el-dialog width="55%" center title="选择商品" :visible.sync="isUploadingGoods">
  314. <el-input clearable v-model="seekInput" placeholder="搜索商品名称" style="width:80%;margin-right:25px"></el-input>
  315. <el-button @click="seekBtn(1)" @keyup.enter="seekBtn" type="primary">搜索</el-button>
  316. <el-table ref="singleTable" v-loading="loading" height="400" :data="gridData">
  317. <el-table-column property="id" label="ID"></el-table-column>
  318. <el-table-column label="商品信息">
  319. <template slot-scope="scope">
  320. <img style="width:30px;height:30px;margin-right:5px" v-if="scope.row.thumb!==null && scope.row.thumb" :src="scope.row.thumb">
  321. <span>[[scope.row.title]]</span>
  322. </template>
  323. </el-table-column>
  324. <el-table-column label="操作">
  325. <template slot-scope="scope">
  326. <el-button @click="addGoods(scope.row,scope.$index)">操作</el-button>
  327. </template>
  328. </el-table-column>
  329. </el-table>
  330. <div style="margin-top:50px">
  331. [[currentPage]]
  332. <el-pagination layout="prev, pager, next,jumper" background style="text-align:center" :page-size="pagesize" :current-page="currentPage" :total="total" @current-change="handleCurrentChange">
  333. </el-pagination>
  334. </div>
  335. </el-dialog>
  336. </div>
  337. <div v-if="is_sales_commission == 1">
  338. <el-checkbox :label="5" style="margin-top:10px">
  339. 自购销售佣金累计达到 &nbsp;
  340. <el-input clearable v-model="form.become_selfmoney" style="width:400px;"><template slot="append">元</template></el-input>
  341. </el-checkbox>
  342. <div style="margin-left:176px;">该条件只针对销售佣金插件使用</div>
  343. </div>
  344. </div>
  345. </el-checkbox-group>
  346. <el-form-item style=" width:600px;">
  347. <el-radio-group v-model="form.become_order">
  348. <el-radio :label="0">付款后</el-radio>
  349. <el-radio :label="1">完成后</el-radio>
  350. </el-radio-group>
  351. <div class="text">消费条件统计的方式</div>
  352. </el-form-item>
  353. </el-form-item>
  354. </div>
  355. <el-form-item label="锁定客户的标准">
  356. <el-radio-group v-model="form.become_child">
  357. <el-radio :label="0">点击首次分享链接</el-radio>
  358. <el-radio :label="1" :disabled = "form.become == 0 ? true : false">首次下单</el-radio>
  359. <el-radio :label="2" :disabled = "form.become == 0 ? true : false">首次付款</el-radio>
  360. </el-radio-group>
  361. <div class="text">首次下单/首次付款:无条件不可用</div>
  362. </el-form-item>
  363. <el-form-item label="是否需要审核才能推广">
  364. <el-radio-group v-model="form.become_check">
  365. <el-radio :label="1">需要</el-radio>
  366. <el-radio :label="0">不需要</el-radio>
  367. </el-radio-group>
  368. <div class="text">以上条件达到后,是否需要审核才能推广客户</div>
  369. </el-form-item>
  370. </el-form>
  371. </div>
  372. <div style="background: #eff3f6;width:100%;height:15px;"></div>
  373. <div class="block">
  374. <div class="vue-title">
  375. <div class="vue-title-left"></div>
  376. <div class="vue-title-content">关系链</div>
  377. </div>
  378. <el-form ref="form" :model="form" label-width="15%">
  379. <el-form-item label="导入会员">
  380. <el-button type="primary" @click="btnImport">重置</el-button>
  381. <div class="select_text_box">
  382. <p>旧会员同步新关系链,如果不同步,除经销商团队业绩升级、统计团队业绩功能外,其他功能不影响使用。<br>
  383. 如会员数据量过大,建议关闭站点再导入
  384. </p>
  385. </div>
  386. </el-form-item>
  387. </el-form>
  388. </div>
  389. <div class="block">
  390. <div style="background: #eff3f6;width:100%;height:15px;"></div>
  391. <div class="vue-title">
  392. <div class="vue-title-left"></div>
  393. <div class="vue-title-content">奖励设置</div>
  394. </div>
  395. <el-form ref="form" :model="form" label-width="15%">
  396. <el-form-item label="推荐一个人奖励积分">
  397. <el-input clearable v-model="form.reward_points" style="width:360px;"></el-input>
  398. <div class="text">提示:只奖励给第一次锁定的上级会员</div>
  399. </el-form-item>
  400. <el-form-item label="赠送积分最大人数">
  401. <el-input clearable v-model="form.maximum_number" style="width:360px;"></el-input>
  402. <div class="text">不填或为0则不限制</div>
  403. </el-form-item>
  404. </el-form>
  405. </div>
  406. <div style="background: #eff3f6;width:100%;height:15px;"></div>
  407. <div class="block">
  408. <div class="vue-title">
  409. <div class="vue-title-left"></div>
  410. <div class="vue-title-content">页面设置</div>
  411. </div>
  412. <el-form ref="form" :model="form" label-width="15%">
  413. <el-form-item label="推广中心跳转">
  414. <el-switch active-value="1" inactive-value="0" v-model="form.is_jump" active-color="#29BA9C" inactive-color="#ccc" />
  415. </el-form-item>
  416. <div v-show="isSkipShow">
  417. <el-form-item label="链接">
  418. <div>
  419. <el-input clearable v-model="form.jump_link" style="width:50%;margin-right:5px;"></el-input>
  420. <el-button @click="showLink('link','link_two')">选择链接</el-button>
  421. <div class="text">当会员没有获得推广资格的时候,点击推广中心跳转到指定的页面的,默认进入推广中心</div>
  422. </div>
  423. </el-form-item>
  424. <el-form-item label="小程序链接">
  425. <div>
  426. <el-input clearable v-model="form.small_jump_link" style="width:50%;margin-right:5px;"></el-input>
  427. <el-button @click="showLink('mini','min_link_two')">选择小程序链接</el-button>
  428. </div>
  429. </el-form-item>
  430. </div>
  431. <el-form-item label="我的收入页面">
  432. <el-switch active-value="1" inactive-value="0" v-model="form.share_page" active-color="#29BA9C" inactive-color="#ccc" />
  433. </el-form-item>
  434. <el-form-item label="收入明细购买者信息">
  435. <el-switch active-value="1" inactive-value="0" v-model="form.share_page_deail" active-color="#29BA9C" inactive-color="#ccc" />
  436. </el-form-item>
  437. <pop :show="show" @replace="changeLink" @add="parHref"></pop>
  438. <program :pro="pro" @replacepro="changeprogram" @addpro="parpro"></program>
  439. </el-form>
  440. </div>
  441. </div>
  442. <el-dialog width="60%" :visible.sync="showProgress" center :close-on-click-modal="false">
  443. <h3 style="">清除旧数据进度,请勿刷新当前页面</h3>
  444. <el-progress :percentage="del_process" ></el-progress>
  445. <h3 style="">同步新数据进度,请勿刷新当前页面</h3>
  446. <el-progress :percentage="process" ></el-progress>
  447. </el-dialog>
  448. <div class="confirm-btn">
  449. <el-button type="primary" @click="submit">提交</el-button>
  450. </div>
  451. </div>
  452. </div>
  453. </div>
  454. @include('public.admin.pop')
  455. @include('public.admin.program')
  456. <script>
  457. var vm = new Vue({
  458. el: '#app',
  459. delimiters: ['[[', ']]'],
  460. data() {
  461. let set = {!! json_encode(($set?:[])) !!};
  462. return {
  463. uploadShow:false,
  464. chooseImgName:'',
  465. uploadListShow:false,
  466. chooseImgListName:'',
  467. type:'',
  468. selNum:'',
  469. form:{
  470. ...set
  471. },
  472. //页面设置
  473. page: {
  474. promotion_skip: 0,
  475. link: "",
  476. applet_link: "",
  477. income_page: 0,
  478. buyer_info: 0
  479. },
  480. is_sales_commission:set.is_sales_commission?1:0,
  481. isUploadingGoods:false,
  482. goodsIndex:null,
  483. seekInput: "",
  484. //商品列表
  485. gridData: [],
  486. //页码数
  487. currentPage: 1,
  488. //一页显示数据
  489. pagesize: 1,
  490. //总页数
  491. total: 1,
  492. //当前响应的图标
  493. loading: true,
  494. process: 0,
  495. showProgress: false,
  496. del_process: 0,
  497. show: false, //是否开启公众号弹窗
  498. pro: false, //是否开启小程序弹窗
  499. chooseLink:"",
  500. chooseMiniLink:"",
  501. }
  502. },
  503. created() {
  504. },
  505. computed: {
  506. //判断支付佣金部分显示隐藏
  507. isTermShow() {
  508. if (this.form.become === 2 || this.form.become === 3) {
  509. return true
  510. } else {
  511. return false
  512. }
  513. },
  514. //判断跳转部分显示隐藏
  515. isSkipShow() {
  516. if (this.form.is_jump == "0") {
  517. return false
  518. } else {
  519. return true
  520. }
  521. }
  522. },
  523. methods: {
  524. submit() {
  525. let that = this;
  526. let url = '{!! yzWebFullUrl('member.member-set.relation-store') !!}';
  527. let json = {
  528. set : this.form
  529. };
  530. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  531. this.$http.post(url,json).then(response => {
  532. if (response.data.result) {
  533. this.$message({type: 'success',message: response.data.msg});
  534. } else {
  535. this.$message({message: response.data.msg,type: 'error'});
  536. }
  537. loading.close();
  538. // location.reload();
  539. },response => {
  540. loading.close();
  541. });
  542. },
  543. cancel(i) {
  544. this.form.goods.splice(i, 1);
  545. },
  546. uploadingGoods(i, index) {
  547. if (index !== undefined) {
  548. //当前点击图片的下标
  549. this.goodsIndex = index;
  550. } else {
  551. this.goodsIndex = null;
  552. }
  553. //点击打开搜索框
  554. this.isUploadingGoods = true;
  555. //请求当前商品的数据
  556. this.postSearch(1);
  557. },
  558. //请求商品信息
  559. postSearch(page) {
  560. this.$http.post("{!!yzWebFullUrl('member.member-level.search-goods')!!}", {
  561. page
  562. }).then(res => {
  563. if (res.data.result === 1) {
  564. this.loading = true;
  565. setTimeout(() => {
  566. this.loading = false;
  567. }, 500)
  568. let {
  569. data: data,
  570. total,
  571. current_page: page,
  572. per_page: size,
  573. } = res.body.data.goods;
  574. //商品列表
  575. this.gridData = data;
  576. //总数
  577. this.total = total;
  578. //一页显示的数据
  579. this.pagesize = size;
  580. //页码数
  581. this.currentPage = page;
  582. } else {
  583. this.$message.error(res.data.msg);
  584. }
  585. })
  586. },
  587. seekBtn(page) {
  588. this.$http.post("{!!yzWebFullUrl('member.member-relation.query')!!}", {
  589. page,
  590. keyword: this.seekInput
  591. }).then(res => {
  592. let {
  593. data: data,
  594. total,
  595. current_page: page,
  596. per_page: size,
  597. } = res.body.data;
  598. this.loading = true;
  599. if (res.data.result == 1) {
  600. setTimeout(() => {
  601. this.loading = false;
  602. }, 300)
  603. // 商品列表
  604. this.gridData = data;
  605. //总数
  606. this.total = total;
  607. //一页显示的数据
  608. this.pagesize = size;
  609. //页码数
  610. this.currentPage = page;
  611. }
  612. })
  613. },
  614. addGoods(val, i) {
  615. if (this.goodsIndex == null) {
  616. this.form.goods.push(val);
  617. } else {
  618. this.form.goods[this.goodsIndex] = val;
  619. this.isUploadingGoods = false;
  620. }
  621. },
  622. handleCurrentChange(page) {
  623. if (this.seekInput) {
  624. this.seekBtn(page);
  625. } else {
  626. this.postSearch(page);
  627. }
  628. },
  629. //导入
  630. btnImport() {
  631. this.count = 0;
  632. this.process = 0;
  633. this.showProgress = true;
  634. this.$http.post("{!! yzWebFullUrl('member.member.exportRelation') !!}",{})
  635. .then(response => {
  636. if (response.data.result) {
  637. this.process = parseInt(response.data.data.process);
  638. this.del_process = parseInt(response.data.data.del_process);
  639. this.loop(
  640. response.data.data.page,
  641. response.data.data.del_page,
  642. response.data.data.del_total,
  643. response.data.data.max_parent_id,
  644. response.data.data.max_child_id,
  645. response.data.data.max_member_id);
  646. } else {
  647. this.$message({message: response.data.msg,type: 'error'});
  648. }
  649. },response => {
  650. }
  651. );
  652. },
  653. loop (page,del_page,del_total,max_parent_id,max_child_id,max_member_id) {
  654. this.$http.post("{!! yzWebFullUrl('member.member.exportRelation') !!}",{
  655. page:page,
  656. del_page:del_page,
  657. del_total:del_total,
  658. max_parent_id:max_parent_id,
  659. max_child_id:max_child_id,
  660. max_member_id:max_member_id
  661. })
  662. .then(response => {
  663. if (response.data.result) {
  664. if (!this.showProgress) {
  665. this.$message({type: 'error',message: '终止同步!'});
  666. return;
  667. }
  668. if (response.data.data) {
  669. this.process = parseInt(response.data.data.process);
  670. this.del_process = parseInt(response.data.data.del_process);
  671. }
  672. if (response.data.data.status == true) {
  673. this.showProgress = false;
  674. this.$message({type: 'success',message: '同步成功!'});
  675. } else {
  676. this.loop( response.data.data.page,
  677. response.data.data.del_page,
  678. response.data.data.del_total,
  679. response.data.data.max_parent_id,
  680. response.data.data.max_child_id,
  681. response.data.data.max_member_id);
  682. }
  683. } else {
  684. this.$message({type: 'error',message: response.data.msg});
  685. this.showProgress = false;
  686. }
  687. },response => {
  688. this.$message({type: 'error',message: response.data.msg});
  689. this.showProgress = false;
  690. });
  691. },
  692. showLink(type, name) {
  693. if (type == "link") {
  694. this.chooseLink = name;
  695. this.show = true;
  696. } else {
  697. this.chooseMiniLink = name;
  698. this.pro = true;
  699. }
  700. },
  701. //弹窗显示与隐藏的控制
  702. changeLink(item) {
  703. this.show = item;
  704. },
  705. //当前链接的增加
  706. parHref(child, confirm) {
  707. this.show = confirm;
  708. this.form.jump_link = child;
  709. },
  710. //小程序链接
  711. changeprogram(item) {
  712. this.pro = item;
  713. },
  714. parpro(child, confirm) {
  715. this.pro = confirm;
  716. this.form.small_jump_link = child;
  717. },
  718. }
  719. })
  720. </script>
  721. @endsection