noexamine.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template>
  2. <view>
  3. <view v-if="list.length > 0">
  4. <view class="display" v-for="(item,index) in list">
  5. <view class="store-content" @click="handleClick(item)">
  6. <image :src="image(item.shopsPic)" mode="" class="store-image"></image>
  7. <view class="text-content">
  8. <view class="font-thirty-two font-color2">
  9. {{item.shopsName}}
  10. </view>
  11. <view class="font-twenty font-color5" style="margin-top: 20rpx;">
  12. 类别:店铺信息修改
  13. </view>
  14. </view>
  15. </view>
  16. <view class="button-dis">
  17. <button type="default" class="btn" @click="show(item.shopsId, '通过')">通过</button>
  18. <button type="default" class="btn color" @click="show(item.shopsId, '不通过')">不通过</button>
  19. </view>
  20. </view>
  21. </view>
  22. <view v-else style="padding-top: 200rpx;">
  23. <u-empty text="暂无数据" mode="list"></u-empty>
  24. </view>
  25. <ming-pop ref="statement" direction="below" :is_mask="true" :width="100" height="42%" :maskFun="true">
  26. <pop @close="close()" @noPass='handle' ref="pop"></pop>
  27. </ming-pop>
  28. <u-toast ref="uToast" />
  29. </view>
  30. </template>
  31. <script>
  32. import server from "@/api/index";
  33. import http from '@/common/http.js'
  34. export default {
  35. data() {
  36. return {
  37. id: null,
  38. list: [],
  39. userInfo:{},
  40. type: null
  41. }
  42. },
  43. mounted() {
  44. this.userInfo = uni.getStorageSync('userInfo');
  45. this.getList();
  46. },
  47. methods: {
  48. showModel(){
  49. this.userInfo = uni.getStorageSync('userInfo');
  50. this.getList();
  51. },
  52. image(e) {
  53. return http.webUrl + e
  54. },
  55. getList(){
  56. server.getManageShopList({shopsStatus :'1'}).then(res =>{
  57. this.list = [];
  58. if(res){
  59. this.list = res
  60. }
  61. })
  62. },
  63. handleClick(item){
  64. uni.navigateTo({
  65. url: '/pages/manage/modifyInfo/modifyInfo?id=' + item.shopsId
  66. })
  67. },
  68. handle(data){
  69. if(this.type === '不通过'){
  70. this.handleNoPass(data)
  71. }else if(this.type === '通过'){
  72. console.log('this.id', this.id)
  73. this.handlePass(data, this.id)
  74. }
  75. },
  76. handlePass(data, id){
  77. let _this = this;
  78. uni.showModal({
  79. title: '提示',
  80. content: '确定通过审核吗?',
  81. success: function (res) {
  82. if (res.confirm) {
  83. let params ={
  84. shopsId: id,
  85. shopsStatus: '2',
  86. shopsReviewer: _this.userInfo.userId,
  87. reviewerName: _this.userInfo.nickName,
  88. remark: data
  89. }
  90. server.getIndexData(params).then(res =>{
  91. _this.$refs.uToast.show({
  92. title: '通过成功!',
  93. type: 'default',
  94. });
  95. _this.getList();
  96. })
  97. } else if (res.cancel) {
  98. console.log('用户点击取消');
  99. }
  100. }
  101. });
  102. },
  103. handleNoPass(data){
  104. let _this = this;
  105. let params ={
  106. shopsId: this.id,
  107. shopsStatus: '3',
  108. shopsReviewer: _this.userInfo.userId,
  109. reviewerName: _this.userInfo.nickName,
  110. remark: data
  111. }
  112. server.getIndexData(params).then(res =>{
  113. _this.$refs.uToast.show({
  114. title: '操作成功!',
  115. type: 'default',
  116. })
  117. _this.getList();
  118. })
  119. },
  120. show(id, type) {
  121. this.$refs.statement.show(type);
  122. this.$refs.pop.show(type);
  123. this.id = id
  124. this.type = type;
  125. },
  126. close() {
  127. this.$refs.statement.close();
  128. this.id = null
  129. }
  130. }
  131. }
  132. </script>
  133. <style lang="scss" scoped>
  134. .display {
  135. margin: 30rpx 30rpx 0;
  136. padding: 30rpx;
  137. background: #FFFFFF;
  138. opacity: 1;
  139. border-radius: 8rpx;
  140. .store-content {
  141. display: flex;
  142. align-items: center;
  143. padding-bottom: 30rpx;
  144. border-bottom: 2rpx solid #DEDEDE;
  145. .store-image {
  146. width: 220rpx;
  147. height: 150rpx;
  148. }
  149. .text-content {
  150. margin-left: 30rpx;
  151. }
  152. }
  153. .button-dis {
  154. display: flex;
  155. margin-top: 30rpx;
  156. .btn {
  157. width: 300rpx;
  158. background: #2E4F1C;
  159. color: #FFFFFF;
  160. border-radius: 48rpx;
  161. }
  162. .color {
  163. background: #CC1019;
  164. }
  165. }
  166. }
  167. </style>