printerLabeldetail.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <view class="container">
  3. <view class="page-block">
  4. <view class="page-title-block">
  5. <view class="title">标签信息</view>
  6. </view>
  7. <view class="content">
  8. <view class="cell flex flex-y-center">
  9. <view class="title-block">
  10. <text>标签名称</text>
  11. </view>
  12. <view class="desc">
  13. <view class="input-box">{{info.tag_name}}</view>
  14. </view>
  15. </view>
  16. <view class="cell flex flex-y-center">
  17. <view class="title-block">
  18. <text>排序</text>
  19. </view>
  20. <view class="desc">
  21. <view class="input-box">{{info.num}}</view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. <view style="height:30rpx;"></view>
  27. <view class="footer-bar" style="height: 100rpx;">
  28. <view class="content flex flex-center" style="height: 100rpx;">
  29. <view class="detail-btn flex flex-center" @click="del" style="border-right: 2rpx solid #F4F5F7;">
  30. <image src="../static/images/icon_16.png" mode="aspectFit" class="btn-icon"></image>
  31. <view style="color:#999999">删除标签</view>
  32. </view>
  33. <view class="detail-btn flex flex-center" @click="enit">
  34. <image src="../static/images/icon_17.png" mode="aspectFit" class="btn-icon"></image>
  35. <view style="color:#3387FF">重新编辑</view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. export default {
  43. data() {
  44. return {
  45. info: {},
  46. type:2,
  47. }
  48. },
  49. onLoad(e) {
  50. console.log(e)
  51. // this.getData(e.id);
  52. this.type=e.type;
  53. this.info = e;
  54. },
  55. methods: {
  56. enit() {
  57. let info = this.info;
  58. uni.navigateTo({
  59. url: `../editprinerlabel/editprinerlabel?id=${info.id}&tag_name=${info.tag_name}&num=${info.num}&type=${this.type}`
  60. })
  61. },
  62. del() {
  63. uni.showModal({
  64. title: '提示',
  65. content: '是否要删除?',
  66. showCancel: true,
  67. cancelText: '取消',
  68. confirmText: '确定',
  69. success: res => {
  70. if (res.confirm) {
  71. this.request({
  72. url: 'Smdcshop/tag_delect',
  73. data: {
  74. id: this.info.id,
  75. },
  76. }).then(res => {
  77. console.log(res, "res")
  78. if (res.code === 200 || res.code === "200") {
  79. uni.showToast({
  80. title: "删除成功",
  81. icon: "none",
  82. })
  83. setTimeout(() => {
  84. uni.navigateBack()
  85. }, 2000)
  86. }
  87. }).catch((res) => {
  88. uni.showToast({
  89. title: res.message,
  90. icon: "none",
  91. })
  92. });
  93. }
  94. },
  95. fail: () => {},
  96. complete: () => {}
  97. });
  98. },
  99. // getData(id) {
  100. // this.request({
  101. // url: 'Smdcshop/table_type_update_info',
  102. // data: {
  103. // id: id
  104. // }
  105. // }).then(res => {
  106. // if (res.code == "200") {
  107. // this.info = res.data
  108. // } else {
  109. // this.is_bottom = true
  110. // }
  111. // })
  112. // }
  113. }
  114. }
  115. </script>
  116. <style>
  117. @import url("../static/css/common.css");
  118. page {
  119. background-color: #F4F5F7;
  120. }
  121. </style>