index.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. <style>
  2. .table-body {
  3. padding: 20px;
  4. background-color: #fff;
  5. }
  6. .input-item {
  7. display: inline-block;
  8. width: 250px;
  9. margin: 0 0 20px;
  10. }
  11. .input-item .el-input__inner {
  12. border-right: 0;
  13. }
  14. .input-item .el-input__inner:hover {
  15. border: 1px solid #dcdfe6;
  16. border-right: 0;
  17. outline: 0;
  18. }
  19. .input-item .el-input__inner:focus {
  20. border: 1px solid #dcdfe6;
  21. border-right: 0;
  22. outline: 0;
  23. }
  24. .input-item .el-input-group__append {
  25. background-color: #fff;
  26. border-left: 0;
  27. width: 10%;
  28. padding: 0;
  29. }
  30. .input-item .el-input-group__append .el-button {
  31. padding: 0;
  32. }
  33. .input-item .el-input-group__append .el-button {
  34. margin: 0;
  35. }
  36. .table-body .el-button {
  37. padding: 0 !important;
  38. border: 0;
  39. margin: 0 5px;
  40. }
  41. .el-table th > .cell {
  42. color: #333;
  43. font-weight: bold;
  44. font-size: 14px;
  45. }
  46. .el-table__footer-wrapper, .el-table__header-wrapper {
  47. border-bottom: 1.4px solid #D6D6D6;
  48. }
  49. .label {
  50. margin-right: 10px;
  51. }
  52. .default-goods{
  53. max-width: 50px;
  54. max-height: 50px;
  55. }
  56. .flex-x-between {
  57. display: -webkit-box;
  58. display: -webkit-flex;
  59. display: flex;
  60. -webkit-box-pack: space-between;
  61. -webkit-justify-content: space-between;
  62. -ms-flex-pack: space-between;
  63. justify-content: space-between;
  64. }
  65. .cont-title {
  66. font-size: 15px;
  67. padding-top: 20px;
  68. padding-bottom: 10px;
  69. font-weight: 700;
  70. }
  71. .cont-num {
  72. font-size: 14px;
  73. font-weight: 700;
  74. padding-bottom: 10px;
  75. }
  76. .center {
  77. text-align: center;
  78. }
  79. .el-dialog__header .el-dialog__title{
  80. font-size: 18px;
  81. }
  82. .el-dialog__wrapper .el-dialog__body{
  83. padding: 3px 20px;
  84. }
  85. /*头像样式 start*/
  86. .default-avatar{
  87. width: 50px;
  88. height: 50px;
  89. border-radius: 50%;
  90. }
  91. .user_img{
  92. position: relative;
  93. margin-right: 8px;
  94. height: 50px;
  95. width: 50px;
  96. }
  97. .el-table_1_column_2 .cell { /*-2 表示在第二行*/
  98. display: flex;
  99. }
  100. /*头像样式 end*/
  101. .num-info {
  102. display: flex;
  103. width: 100%;
  104. height: 60px;
  105. font-size: 28px;
  106. color: #303133;
  107. }
  108. .num-info .num-info-item {
  109. text-align: center;
  110. width: 25%;
  111. border-left: 1px dashed #EFF1F7;
  112. }
  113. .num-info .num-info-item:first-of-type {
  114. border-left: 0;
  115. }
  116. .info-item-name {
  117. font-size: 16px;
  118. color: #92959B;
  119. }
  120. .tab-pay {
  121. position: absolute;
  122. bottom: 0;
  123. right: 50px;
  124. }
  125. .tab-pay .el-tabs__item {
  126. height: 56px;
  127. line-height: 56px;
  128. }
  129. .pay-info {
  130. padding: 40px 0;
  131. display: flex;
  132. background-color: #fff;
  133. }
  134. .pay-info .pay-info-item {
  135. padding-top: 20px;
  136. width: 22%;
  137. margin: 0 0.5%;
  138. text-align: center;
  139. font-size: 26px;
  140. border: 1px solid #c8cacf;
  141. border-radius: 10px;
  142. height: 113px;
  143. position: relative;
  144. cursor: pointer;
  145. }
  146. .pay-info .pay-info-item.active {
  147. border: 1px solid #3399FF;
  148. }
  149. .pay-info .pay-info-item img {
  150. display: none;
  151. }
  152. .pay-info .pay-info-item.active img {
  153. position: absolute;
  154. top: 0;
  155. left: 0;
  156. display: block;
  157. }
  158. .line{
  159. width: 100%;
  160. height: 5px;
  161. clear: both;
  162. background-color: #f3f3f3;
  163. }
  164. .flexbetween{
  165. display: flex;
  166. justify-content: space-between;
  167. }
  168. </style>
  169. <div id="app" v-cloak>
  170. <el-card shadow="never" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  171. <div slot="header">
  172. <div class="flexbetween">
  173. <div>
  174. <span>更新记录</span>
  175. <span style=" margin-left:10px">[系统更新估计耗时3-10分钟,更新时间过长请联系技术处理!]</span>
  176. </div>
  177. <div>
  178. <el-button type="danger" size="mini" @click="forceDowngradeH5">强制降低H5版本</el-button>
  179. <el-button type="primary" size="mini" @click="updateeEditon">检测更新</el-button>
  180. </div>
  181. </div>
  182. </template>
  183. </div>
  184. <!-- 选择框 -->
  185. <div class="line"></div>
  186. <div class="table-body el-input--small">
  187. <el-alert v-if="alert" show-icon :title="alert" type="warning"></el-alert>
  188. <el-table v-loading="listLoading" :data="list" stripe style="width: 100%">
  189. <el-table-column label="系统版本" min-width="80" align="center">
  190. <template slot-scope="scope">
  191. <div style="font-size: 13px;" >{{scope.row.mian_version}}</div>
  192. </template>
  193. </el-table-column>
  194. <el-table-column label="插件版本" min-width="80" align="center">
  195. <template slot-scope="scope">
  196. {{scope.row.addons_version}}
  197. </template>
  198. </el-table-column>
  199. <el-table-column label="系统更新版本" min-width="80" align="center">
  200. <template slot-scope="scope">
  201. {{scope.row.upgrade_mian_version}}
  202. </template>
  203. </el-table-column>
  204. <el-table-column label="插件更新版本" min-width="80" align="center">
  205. <template slot-scope="scope">
  206. {{scope.row.upgrade_addons_version}}
  207. </template>
  208. </el-table-column>
  209. <el-table-column label="状态" min-width="80" align="center">
  210. <template slot-scope="scope">
  211. {{scope.row.status_msg}}
  212. </template>
  213. </el-table-column>
  214. <el-table-column prop="scope" width="160" label="创建时间">
  215. <template slot-scope="scope">
  216. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  217. </template>
  218. </el-table-column>
  219. </el-table>
  220. <div style="text-align: right;margin: 20px 0;">
  221. <el-pagination v-if="pagination" :page-size="pagination.pageSize"
  222. style="display: inline-block;float: right;" background @current-change="pageChange"
  223. layout="prev, pager, next" :total="pagination.total_count">
  224. </el-pagination>
  225. </div>
  226. </div>
  227. </el-card>
  228. </div>
  229. <script>
  230. const app = new Vue({
  231. el: '#app',
  232. data() {
  233. return {
  234. listLoading: false,
  235. page: 1,
  236. order: true,
  237. pageCount: 0,
  238. statistics:{'add_money':0,'sub_money':0},
  239. //基础数据
  240. editBasisData: {
  241. materialTypeList: [],
  242. },
  243. //本地存时间,请求时不发送
  244. time: [],
  245. search: {
  246. out_trade_no: '',
  247. date_start: null,
  248. date_end: null,
  249. },
  250. list: [],
  251. alert: '',
  252. change_type:[0,1],
  253. from_type:[],
  254. payment_type:[],
  255. pagination:null,
  256. };
  257. },
  258. methods: {
  259. forceDowngradeH5() {
  260. this.$confirm('是否强制降低H5版本', '提示', {
  261. confirmButtonText: '确定',
  262. cancelButtonText: '取消',
  263. type: 'warning'
  264. }).then(() => {
  265. this.listLoading = true
  266. request({
  267. params: {
  268. r: 'admin/upgrade/force-downgrade-h5',
  269. },
  270. }).then(ress => {
  271. this.listLoading = false
  272. this.$message.success(ress.data.msg);
  273. })
  274. })
  275. },
  276. updateeEditon(){
  277. this.listLoading = true
  278. request({
  279. method: 'post',
  280. params: {
  281. r: 'admin/upgrade/check',
  282. },
  283. data: {
  284. },
  285. }).then(res => {
  286. console.log(res,'listLoading')
  287. if(res.data.code == 0){
  288. this.$confirm(res.data.msg+',是否更新', '更新提示', {
  289. confirmButtonText: '确定',
  290. cancelButtonText: '取消',
  291. type: 'warning'
  292. }).then(() => {
  293. request({
  294. method: 'post',
  295. params: {
  296. r: 'admin/upgrade/upgrade',
  297. },
  298. data: { },
  299. }).then(ress => {
  300. this.listLoading = false
  301. this.$message.success(ress.data.msg);
  302. }).catch(e => {
  303. console.log(e);
  304. });
  305. }).catch(() => {
  306. this.$message({
  307. type: 'info',
  308. message: '已取消'
  309. });
  310. });
  311. }else{
  312. this.listLoading = false
  313. this.$message.error(res.data.msg);
  314. }
  315. }).catch(e => {
  316. console.log(e);
  317. });
  318. },
  319. searchs() {
  320. this.page = 1;
  321. this.getList();
  322. },
  323. pageChange(currentPage) {
  324. let self = this;
  325. self.page = currentPage;
  326. self.getList();
  327. },
  328. getList() {
  329. let self = this;
  330. self.listLoading = true;
  331. // 检查是否选择了搜索时间
  332. if (!self.time) {
  333. self.search.date_start = '';
  334. self.search.date_end = '';
  335. } else {
  336. self.search.date_start = self.time[0];
  337. self.search.date_end = self.time[1];
  338. }
  339. request({
  340. method: 'post',
  341. params: {
  342. r: 'admin/upgrade/index',
  343. },
  344. data: {
  345. page: self.page,
  346. out_trade_no: self.search.out_trade_no,
  347. date_start: self.search.date_start,
  348. date_end: self.search.date_end,
  349. },
  350. }).then(e => {
  351. this.listLoading = false;
  352. this.list = e.data.data.list;
  353. this.change_type = e.data.data.change_type;
  354. this.alert = e.data.data.alert;
  355. this.from_type = e.data.data.from_type;
  356. this.statistics = e.data.data.statistics;
  357. this.payment_type = e.data.data.payment_type;
  358. console.log(this.change_type,66);
  359. this.pagination = e.data.data.pagination;
  360. this.pagination.pageSize = e.data.data.page_size;
  361. this.pagination.total_count = e.data.data.count;
  362. }).catch(e => {
  363. console.log(e);
  364. });
  365. },
  366. },
  367. mounted: function () {
  368. this.getList();
  369. }
  370. });
  371. </script>