register.blade.php 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. @extends('layouts.base')
  2. @section('title', '基础设置')
  3. @section('content')
  4. <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods1.css')}}"/>
  5. <style>
  6. .main-panel {
  7. margin-top: 50px;
  8. }
  9. .panel {
  10. margin-bottom: 10px !important;
  11. padding-left: 20px;
  12. border-radius: 10px;
  13. }
  14. .panel .active a {
  15. background-color: #29ba9c !important;
  16. border-radius: 18px !important;
  17. color: #fff;
  18. }
  19. .panel a {
  20. border: none !important;
  21. background-color: #fff !important;
  22. }
  23. .content {
  24. background: #eff3f6;
  25. padding: 10px !important;
  26. }
  27. .con {
  28. padding-bottom: 20px;
  29. position: relative;
  30. border-radius: 8px;
  31. min-height: 100vh;
  32. background-color: #fff;
  33. }
  34. .con .setting .block {
  35. padding: 10px;
  36. background-color: #fff;
  37. border-radius: 8px;
  38. }
  39. .con .setting .block .title {
  40. font-size: 18px;
  41. margin-bottom: 15px;
  42. display: flex;
  43. align-items: center;
  44. }
  45. .confirm-btn {
  46. width: calc(100% - 266px);
  47. position: fixed;
  48. bottom: 0;
  49. right: 0;
  50. margin-right: 10px;
  51. line-height: 63px;
  52. background-color: #ffffff;
  53. box-shadow: 0px 8px 23px 1px rgba(51, 51, 51, 0.3);
  54. background-color: #fff;
  55. text-align: center;
  56. }
  57. b {
  58. font-size: 14px;
  59. }
  60. .upload-boxed .el-icon-close {
  61. position: absolute;
  62. top: -5px;
  63. right: -5px;
  64. color: #fff;
  65. background: #333;
  66. border-radius: 50%;
  67. cursor: pointer;
  68. }
  69. </style>
  70. <div id='re_content'>
  71. <div class="con">
  72. <div class="setting">
  73. <el-form ref="form" :model="form" label-width="15%">
  74. <div class="setting">
  75. <div class="block">
  76. <div class="title"><span
  77. style="width: 4px;height: 18px;background-color: #29ba9c;margin-right:15px;display:inline-block;"></span><b>基础设置</b>
  78. </div>
  79. <el-form ref="form" :model="form" label-width="15%">
  80. <el-form-item label="转发宝">
  81. <template>
  82. <el-switch
  83. v-model="form.forwarding_treasure_enable"
  84. active-value="1"
  85. inactive-value="0"
  86. >
  87. </el-switch>
  88. </template>
  89. </el-form-item>
  90. <el-form-item label="芸签APP ID">
  91. <el-input v-model="form.forwarding_treasure_appid" style="width:70%;"></el-input>
  92. </el-form-item>
  93. <el-form-item label="芸签APP Secret">
  94. <el-input v-model="form.forwarding_treasure_appsecret"
  95. style="width:70%;"></el-input>
  96. </el-form-item>
  97. <el-form-item label="AI验证次数">
  98. <el-input type="number" v-model="form.forwarding_treasure_num"
  99. style="width:70%;"></el-input>
  100. </el-form-item>
  101. <el-form-item>
  102. <p>接口总数:[[yun_form.apiTotalCount]] 单;接口使用总数: [[yun_form.statistics]]
  103. 单;接口剩余总数:[[yun_form.apiTotalCount - yun_form.statistics]]
  104. 单;到期时间:[[yun_form.endDate]]</p>
  105. </el-form-item>
  106. </el-form>
  107. </div>
  108. </div>
  109. </div>
  110. <div class="confirm-btn">
  111. <el-button type="primary" @click="submit">提交</el-button>
  112. </div>
  113. </el-form>
  114. </div>
  115. </div>
  116. <script src="{{resource_get('static/yunshop/tinymce4.7.5/tinymce.min.js')}}"></script>
  117. @include('public.admin.tinymceee')
  118. @include('public.admin.uploadImg')
  119. <script>
  120. var vm = new Vue({
  121. el: "#re_content",
  122. delimiters: ['[[', ']]'],
  123. data() {
  124. let info = {!!json_encode($data?:'{}') !!};
  125. return {
  126. activeName: 'one',
  127. uploadShow: false,
  128. chooseImgName: '',
  129. uploadListShow: false,
  130. chooseImgListName: '',
  131. form: {
  132. forwarding_treasure_enable: info.forwarding_treasure_enable && info.forwarding_treasure_enable ? info.forwarding_treasure_enable : '0',
  133. forwarding_treasure_appid: info.forwarding_treasure_appid && info.forwarding_treasure_appid ? info.forwarding_treasure_appid : '',
  134. forwarding_treasure_appsecret: info.forwarding_treasure_appsecret && info.forwarding_treasure_appsecret ? info.forwarding_treasure_appsecret : '',
  135. forwarding_treasure_num: info.forwarding_treasure_num && info.forwarding_treasure_num ? info.forwarding_treasure_num : 3,
  136. },
  137. yun_form:info.yun_form
  138. }
  139. },
  140. mounted() {
  141. },
  142. methods: {
  143. submit() {
  144. let loading = this.$loading({
  145. target: document.querySelector(".content"),
  146. background: 'rgba(0, 0, 0, 0)'
  147. });
  148. this.$http.post('{!! yzWebFullUrl('plugin.forwarding-treasure.admin.setting.register') !!}', {'register': this.form}).then(function (response) {
  149. if (response.data.result) {
  150. this.$message({message: response.data.msg, type: 'success'});
  151. } else {
  152. this.$message({message: response.data.msg, type: 'error'});
  153. }
  154. loading.close();
  155. location.reload();
  156. }, function (response) {
  157. this.$message({message: response.data.msg, type: 'error'});
  158. })
  159. },
  160. openUpload(str) {
  161. this.chooseImgName = str;
  162. this.uploadShow = true;
  163. },
  164. changeProp(val) {
  165. if (val == true) {
  166. this.uploadShow = false;
  167. } else {
  168. this.uploadShow = true;
  169. }
  170. },
  171. sureImg(name, image, image_url) {
  172. this.form[name] = image;
  173. this.form[name + '_url'] = image_url;
  174. },
  175. },
  176. });
  177. </script>
  178. @endsection('content')