123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- <template>
- <view>
- <view v-if="list.length > 0">
- <view class="display" v-for="(item,index) in list">
- <view class="store-content" @click="handleClick(item)">
- <image :src="image(item.shopsPic)" mode="" class="store-image"></image>
- <view class="text-content">
- <view class="font-thirty-two font-color2">
- {{item.shopsName}}
- </view>
- <view class="font-twenty font-color5" style="margin-top: 20rpx;">
- 类别:店铺信息修改
- </view>
- </view>
- </view>
- <view class="button-dis">
- <button type="default" class="btn" @click="show(item.shopsId, '通过')">通过</button>
- <button type="default" class="btn color" @click="show(item.shopsId, '不通过')">不通过</button>
- </view>
- </view>
- </view>
- <view v-else style="padding-top: 200rpx;">
- <u-empty text="暂无数据" mode="list"></u-empty>
- </view>
- <ming-pop ref="statement" direction="below" :is_mask="true" :width="100" height="42%" :maskFun="true">
- <pop @close="close()" @noPass='handle' ref="pop"></pop>
- </ming-pop>
- <u-toast ref="uToast" />
- </view>
- </template>
- <script>
- import server from "@/api/index";
- import http from '@/common/http.js'
- export default {
- data() {
- return {
- id: null,
- list: [],
- userInfo:{},
- type: null
- }
- },
- mounted() {
- this.userInfo = uni.getStorageSync('userInfo');
- this.getList();
- },
- methods: {
- showModel(){
- this.userInfo = uni.getStorageSync('userInfo');
- this.getList();
- },
- image(e) {
- return http.webUrl + e
- },
- getList(){
- server.getManageShopList({shopsStatus :'1'}).then(res =>{
- this.list = [];
- if(res){
- this.list = res
- }
- })
- },
- handleClick(item){
- uni.navigateTo({
- url: '/pages/manage/modifyInfo/modifyInfo?id=' + item.shopsId
- })
- },
- handle(data){
- if(this.type === '不通过'){
- this.handleNoPass(data)
- }else if(this.type === '通过'){
- console.log('this.id', this.id)
- this.handlePass(data, this.id)
- }
- },
- handlePass(data, id){
- let _this = this;
- uni.showModal({
- title: '提示',
- content: '确定通过审核吗?',
- success: function (res) {
- if (res.confirm) {
- let params ={
- shopsId: id,
- shopsStatus: '2',
- shopsReviewer: _this.userInfo.userId,
- reviewerName: _this.userInfo.nickName,
- remark: data
- }
- server.getIndexData(params).then(res =>{
- _this.$refs.uToast.show({
- title: '通过成功!',
- type: 'default',
- });
- _this.getList();
- })
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- },
- handleNoPass(data){
- let _this = this;
- let params ={
- shopsId: this.id,
- shopsStatus: '3',
- shopsReviewer: _this.userInfo.userId,
- reviewerName: _this.userInfo.nickName,
- remark: data
- }
- server.getIndexData(params).then(res =>{
- _this.$refs.uToast.show({
- title: '操作成功!',
- type: 'default',
- })
- _this.getList();
- })
- },
- show(id, type) {
- this.$refs.statement.show(type);
- this.$refs.pop.show(type);
- this.id = id
- this.type = type;
- },
- close() {
- this.$refs.statement.close();
- this.id = null
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .display {
- margin: 30rpx 30rpx 0;
- padding: 30rpx;
- background: #FFFFFF;
- opacity: 1;
- border-radius: 8rpx;
- .store-content {
- display: flex;
- align-items: center;
- padding-bottom: 30rpx;
- border-bottom: 2rpx solid #DEDEDE;
- .store-image {
- width: 220rpx;
- height: 150rpx;
- }
- .text-content {
- margin-left: 30rpx;
- }
- }
- .button-dis {
- display: flex;
- margin-top: 30rpx;
- .btn {
- width: 300rpx;
- background: #2E4F1C;
- color: #FFFFFF;
- border-radius: 48rpx;
- }
- .color {
- background: #CC1019;
- }
- }
- }
- </style>
|