前端-胡立永 4 weeks ago
parent
commit
c8329b2e28
5 changed files with 29 additions and 10 deletions
  1. +1
    -1
      config.js
  2. +1
    -1
      pages/component/my.vue
  3. +3
    -3
      pages/manager/user-detail.vue
  4. +12
    -4
      pages/manager/user.vue
  5. +12
    -1
      pages/subcomponent/inspection-report.vue

+ 1
- 1
config.js View File

@ -1,5 +1,5 @@
// config.js // config.js
const type = 'prod'
const type = 'local'
const config = { const config = {
local: { local: {


+ 1
- 1
pages/component/my.vue View File

@ -367,7 +367,7 @@ export default {
userTypeText() { userTypeText() {
if (this.userInfo.isUser == 'Y') return this.userInfo.isTuiTypeTitle if (this.userInfo.isUser == 'Y') return this.userInfo.isTuiTypeTitle
return '普通用户' return '普通用户'
}
},
}, },
onLoad() { onLoad() {
// App // App


+ 3
- 3
pages/manager/user-detail.vue View File

@ -61,7 +61,7 @@
</view> </view>
<!-- 底部操作栏 --> <!-- 底部操作栏 -->
<view class="bottom-bar"> <view class="bottom-bar">
<button v-if="user.blocked" class="action-btn danger" @tap="unblockUser">解除拉黑</button>
<button v-if="user.blocked" class="action-btn danger" @tap="blockUser">解除拉黑</button>
<template v-else> <template v-else>
<button class="action-btn danger" @tap="blockUser">拉黑</button> <button class="action-btn danger" @tap="blockUser">拉黑</button>
<button v-if="user.role!=='推广官'" class="action-btn primary" @tap="upgradeUser">升级推广官</button> <button v-if="user.role!=='推广官'" class="action-btn primary" @tap="upgradeUser">升级推广官</button>
@ -135,8 +135,8 @@ export default {
if (!this.user.id) return; if (!this.user.id) return;
this.$api('blackUser', { userId: this.user.id }, res => { this.$api('blackUser', { userId: this.user.id }, res => {
if (res && res.code === 200) { if (res && res.code === 200) {
uni.showToast({ title: '已拉黑', icon: 'success' });
this.user.blocked = true;
this.user.blocked = !this.user.blocked;
uni.showToast({ title: this.user.blocked ? '已拉黑' : '已解除', icon: 'success' });
} else { } else {
uni.showToast({ title: res.msg || '拉黑失败', icon: 'none' }); uni.showToast({ title: res.msg || '拉黑失败', icon: 'none' });
} }


+ 12
- 4
pages/manager/user.vue View File

@ -41,7 +41,9 @@
<view class="user-info-row"> <view class="user-info-row">
<text class="user-label">角色</text> <text class="user-label">角色</text>
<template v-if="user.role"> <template v-if="user.role">
<text class="role-tag" v-if="user.role === '推广官'">推广官</text>
<text class="role-tag" v-if="user.role == '推广官'">
{{ userTypeText(user) || '推广官' }}
</text>
<text v-else class="user-value">{{ user.role }}</text> <text v-else class="user-value">{{ user.role }}</text>
</template> </template>
<template v-else> <template v-else>
@ -100,8 +102,9 @@ export default {
} }
}).exec(); }).exec();
}); });
//
this.refreshData();
},
onShow() {
this.refreshData();
}, },
methods: { methods: {
goBack() { goBack() {
@ -120,6 +123,10 @@ export default {
this.showSuggestList = false; this.showSuggestList = false;
} }
}, },
userTypeText(userInfo) {
if (userInfo.isUser == 'Y') return userInfo.isTuiTypeTitle
return '普通用户'
},
clearInput() { clearInput() {
this.searchText = ''; this.searchText = '';
this.showSuggestList = false; this.showSuggestList = false;
@ -159,12 +166,13 @@ export default {
}); });
if (res && res.code === 200 && res.result && Array.isArray(res.result.records)) { if (res && res.code === 200 && res.result && Array.isArray(res.result.records)) {
this.users = res.result.records.map(user => ({ this.users = res.result.records.map(user => ({
...user,
id: user.id, id: user.id,
name: user.name || user.nickName || '-', name: user.name || user.nickName || '-',
phone: user.phone || '-', phone: user.phone || '-',
role: user.isUser === 'Y' ? '推广官' : '', role: user.isUser === 'Y' ? '推广官' : '',
blocked: user.isBlack === 'Y', blocked: user.isBlack === 'Y',
avatar: user.headImage || user.avatar || user.avatarUrl || ''
avatar: user.headImage || user.avatar || user.avatarUrl || '',
})); }));
} }
} catch (error) { } catch (error) {


+ 12
- 1
pages/subcomponent/inspection-report.vue View File

@ -14,7 +14,7 @@
</view> </view>
<!-- 打钩标签区及说明 --> <!-- 打钩标签区及说明 -->
<view class="feature-area" :style="{marginTop: navBarTotalHeight+statusBarHeight + 'px'}"> <view class="feature-area" :style="{marginTop: navBarTotalHeight+statusBarHeight + 'px'}">
<view class="feature-desc">该报告由瀚海回收质检查验出具</view>
<view class="feature-desc">该报告由{{ applet_title }}质检查验出具</view>
<view class="feature-tags"> <view class="feature-tags">
<view class="tag" v-for="(t, i) in featureTags" :key="i"> <view class="tag" v-for="(t, i) in featureTags" :key="i">
<text class="check"></text> <text class="check"></text>
@ -22,6 +22,13 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="">
<image src="https://oss.budingxiaoshuo.com/upload/质检报告_1748937704910.png"
style="width: 100%;"
mode="widthFix"></image>
</view> -->
<!-- 主内容区卡片悬浮覆盖打钩区 --> <!-- 主内容区卡片悬浮覆盖打钩区 -->
<view class="main-content"> <view class="main-content">
<view v-if="showQualified && goodsList.length" class="inspection-card"> <view v-if="showQualified && goodsList.length" class="inspection-card">
@ -103,6 +110,10 @@ export default {
} }
}, },
computed: { computed: {
applet_title() {
const item = getApp().globalData.configData.find(i => i.keyName === 'applet_title')
return item ? item.keyContent : ''
},
totalCount() { totalCount() {
return this.goodsList.reduce((sum, item) => sum + item.count, 0) return this.goodsList.reduce((sum, item) => sum + item.count, 0)
}, },


Loading…
Cancel
Save