From 97158794d69fd2beee1bf27577aa7cadea8d847d Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 04 二月 2026 16:08:45 +0800
Subject: [PATCH] 优化
---
admin/src/views/business/categoryBusType.vue | 70 +++++
admin/.env.production | 2
admin/package-lock.json | 18 +
mini-program/pages/ranking-list/ranking-list.vue | 2
admin/src/api/business/category.js | 5
mini-program/pages/index/index.vue | 107 ++++----
admin/src/api/system/common.js | 6
admin/src/views/business/categoryLevel.vue | 64 +++++
mini-program/App.vue | 2
mini-program/static/ar_open_sel@2x.png | 0
admin/.env.development | 10
admin/src/main.js | 3
mini-program/main.js | 1
admin/src/views/login.vue | 39 +++
admin/src/views/business/cases.vue | 62 +++++
mini-program/utils/http.interceptor.js | 8
mini-program/pages/details/details.vue | 35 ++
admin/public/template/cases.xlsx | 0
admin/public/template/member.xlsx | 0
admin/package.json | 2
admin/src/components/business/OperaCategoryWindow.vue | 11
admin/src/components/common/UploadFaceImg.vue | 13 +
admin/src/views/business/category.vue | 77 ++++++
admin/src/views/business/member.vue | 79 ++++++
admin/src/components/common/UploadImage.vue | 8
admin/src/components/business/OperaMemberWindow.vue | 4
admin/src/components/business/OperaCasesListWindow.vue | 4
admin/src/router/index.js | 3
admin/src/views/business/categoryField.vue | 64 +++++
admin/src/components/business/OperaCasesWindow.vue | 8
30 files changed, 606 insertions(+), 101 deletions(-)
diff --git a/admin/.env.development b/admin/.env.development
index 867c3b0..b9e47a1 100644
--- a/admin/.env.development
+++ b/admin/.env.development
@@ -1,10 +1,6 @@
# 寮�鍙戠幆澧冮厤缃�
NODE_ENV = 'development'
-<<<<<<< HEAD
-VUE_APP_API_URL = 'http://192.168.0.7/dianjiang_admin_api/'
-=======
-
-# 椤圭洰涓婁笅鏂囪矾寰�
+VUE_APP_API_URL = 'https://test.doumee.cn/dianjiang_admin_api/'
+# VUE_APP_API_URL = 'http://192.168.1.37:11010/'
VUE_APP_CONTEXT_PATH = '/'
-VUE_APP_API_URL = 'http://localhost:11010'
->>>>>>> d5810177a4e77ea273971e51dd150bd84906de6f
+
diff --git a/admin/.env.production b/admin/.env.production
index 3b94b60..bcce5b9 100644
--- a/admin/.env.production
+++ b/admin/.env.production
@@ -4,4 +4,4 @@
# 鍏抽棴DEBUG
VUE_APP_DEBUG = 'off'
VUE_APP_CONTEXT_PATH = '/dianjiang_admin'
-VUE_APP_API_URL = 'https://jinkuai.832smartfarm.com/jinkuai_admin'
+VUE_APP_API_URL = 'https://test.doumee.cn/'
diff --git a/admin/package-lock.json b/admin/package-lock.json
index 3c49af0..974c7d3 100644
--- a/admin/package-lock.json
+++ b/admin/package-lock.json
@@ -4940,6 +4940,19 @@
}
}
},
+ "dingtalk-h5-remote-debug": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmmirror.com/dingtalk-h5-remote-debug/-/dingtalk-h5-remote-debug-0.1.3.tgz",
+ "integrity": "sha512-ZEcPflCs5lFFY9vXeCz+M8tbn9kPSCkybYSIbvuSfvGkTb1tMqivr0Vo32CpxcT59nahuRXTfR0tHUIDuxVKfQ=="
+ },
+ "dingtalk-jsapi": {
+ "version": "3.2.5",
+ "resolved": "https://registry.npmmirror.com/dingtalk-jsapi/-/dingtalk-jsapi-3.2.5.tgz",
+ "integrity": "sha512-GHtDTmilJQhr07GNarjlzhvgUkPWc0+52zbN2ToW+JzkydaOwmhiJCTO42+BI+onAlhdfLUbtUnGsjQNDTrM1w==",
+ "requires": {
+ "promise-polyfill": "^7.1.0"
+ }
+ },
"dir-glob": {
"version": "2.2.2",
"resolved": "https://registry.npm.taobao.org/dir-glob/download/dir-glob-2.2.2.tgz",
@@ -11021,6 +11034,11 @@
"integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=",
"dev": true
},
+ "promise-polyfill": {
+ "version": "7.1.2",
+ "resolved": "https://registry.npmmirror.com/promise-polyfill/-/promise-polyfill-7.1.2.tgz",
+ "integrity": "sha512-FuEc12/eKqqoRYIGBrUptCBRhobL19PS2U31vMNTfyck1FxPyMfgsXyW4Mav85y/ZN1hop3hOwRlUDok23oYfQ=="
+ },
"proxy-addr": {
"version": "2.0.6",
"resolved": "https://registry.npm.taobao.org/proxy-addr/download/proxy-addr-2.0.6.tgz",
diff --git a/admin/package.json b/admin/package.json
index 4965988..3b86b64 100644
--- a/admin/package.json
+++ b/admin/package.json
@@ -18,6 +18,8 @@
"core-js": "^3.6.5",
"crypto-js": "^4.1.1",
"dayjs": "^1.11.0",
+ "dingtalk-h5-remote-debug": "^0.1.3",
+ "dingtalk-jsapi": "^3.2.5",
"echarts": "^5.6.0",
"element-ui": "^2.3.6",
"js-cookie": "^2.2.1",
diff --git a/admin/public/template/cases.xlsx b/admin/public/template/cases.xlsx
index fdee30d..1e9b541 100644
--- a/admin/public/template/cases.xlsx
+++ b/admin/public/template/cases.xlsx
Binary files differ
diff --git a/admin/public/template/member.xlsx b/admin/public/template/member.xlsx
index b872ea2..9bb71e8 100644
--- a/admin/public/template/member.xlsx
+++ b/admin/public/template/member.xlsx
Binary files differ
diff --git a/admin/src/api/business/category.js b/admin/src/api/business/category.js
index 12abda9..9bd3a3b 100644
--- a/admin/src/api/business/category.js
+++ b/admin/src/api/business/category.js
@@ -30,6 +30,11 @@
return request.get(`/business/category/delete/${id}`)
}
+// 鎴樺尯淇℃伅鍚屾
+export function syncZhanQu () {
+ return request.get(`/business/category/syncZhanQu`)
+}
+
// 鎵归噺鍒犻櫎
export function deleteByIdInBatch (ids) {
return request.get('/business/category/delete/batch', {
diff --git a/admin/src/api/system/common.js b/admin/src/api/system/common.js
index 7a3c083..cf042cd 100644
--- a/admin/src/api/system/common.js
+++ b/admin/src/api/system/common.js
@@ -38,3 +38,9 @@
export function upload (data) {
return request.post('/public/upload', data)
}
+
+// 閽夐拤鎺堟潈鐧诲綍
+export function loginByDingTalk (data) {
+ return request.post('/system/loginByDingTalk', data)
+}
+
diff --git a/admin/src/components/business/OperaCasesListWindow.vue b/admin/src/components/business/OperaCasesListWindow.vue
index 0d8225b..bc0560c 100644
--- a/admin/src/components/business/OperaCasesListWindow.vue
+++ b/admin/src/components/business/OperaCasesListWindow.vue
@@ -110,7 +110,8 @@
containDeleted: 1,
name: '',
importId: '',
- status: null
+ status: null,
+ memberId: null
},
memberList: []
}
@@ -147,6 +148,7 @@
this.title = title
this.visible = true
this.getTableHeight()
+ this.searchForm.memberId = memberId
this.tableData = {
// 宸查�変腑鐨勬暟鎹�
selectedRows: [],
diff --git a/admin/src/components/business/OperaCasesWindow.vue b/admin/src/components/business/OperaCasesWindow.vue
index a2d5568..396e8be 100644
--- a/admin/src/components/business/OperaCasesWindow.vue
+++ b/admin/src/components/business/OperaCasesWindow.vue
@@ -6,7 +6,7 @@
@confirm="confirm"
>
<el-form :model="form" ref="form" :rules="rules">
- <el-form-item label="鍚嶇О" prop="name">
+ <el-form-item label="鏍囬" prop="name">
<el-input v-model="form.name" placeholder="璇疯緭鍏ュ悕绉�" v-trim/>
</el-form-item>
<el-form-item label="鑰佸笀" prop="memberId" >
@@ -24,11 +24,12 @@
<UploadImage
:fileList="tempfileList"
:uploadData="uploadData"
+ :size="5"
@beginUpload="isUploading=true"
@endUpload="isUploading=false"/>
<p class="tip-warn">
寤鸿灏哄锛�750px X 750px
- 鏀寔png銆乯pg銆乯peg鏍煎紡锛屽ぇ灏忎笉瓒呰繃2M锛屼笂浼犲浘鐗囦笉鍏佽娑夊強鏀挎不鏁忔劅涓庤壊鎯�,
+ 鏀寔png銆乯pg銆乯peg鏍煎紡锛屽ぇ灏忎笉瓒呰繃5M锛屼笂浼犲浘鐗囦笉鍏佽娑夊強鏀挎不鏁忔劅涓庤壊鎯�,
</p>
</el-form-item>
<el-form-item label="寮�濮嬫椂闂�" prop="startDate" >
@@ -41,7 +42,7 @@
placeholder="寮�濮嬫椂闂�"
></el-date-picker>
</el-form-item>
- <el-form-item label="瀵煎叆鏃堕棿" prop="endDate" >
+ <el-form-item label="缁撴潫鏃堕棿" prop="endDate" >
<el-date-picker
clearable
v-model="form.endDate"
@@ -114,7 +115,6 @@
this.memberList = res
})
},
-
confirm () {
this.form.fileList = this.tempfileList
if (this.form[this.configData['field.id']] == null || this.form[this.configData['field.id']] === '') {
diff --git a/admin/src/components/business/OperaCategoryWindow.vue b/admin/src/components/business/OperaCategoryWindow.vue
index c897b92..1a30e6b 100644
--- a/admin/src/components/business/OperaCategoryWindow.vue
+++ b/admin/src/components/business/OperaCategoryWindow.vue
@@ -23,14 +23,18 @@
<UploadImage
:fileList="tempfileList"
:uploadData="uploadData"
+ :size="5"
@beginUpload="isUploading=true"
@endUpload="isUploading=false"/>
<p class="tip-warn">
寤鸿灏哄锛�750px X 750px锛屼笂闄�6寮�
- 鏀寔png銆乯pg銆乯peg鏍煎紡锛屽ぇ灏忎笉瓒呰繃2M锛屼笂浼犲浘鐗囦笉鍏佽娑夊強鏀挎不鏁忔劅涓庤壊鎯�,
+ 鏀寔png銆乯pg銆乯peg鏍煎紡锛屽ぇ灏忎笉瓒呰繃5M锛屼笂浼犲浘鐗囦笉鍏佽娑夊強鏀挎不鏁忔劅涓庤壊鎯�,
</p>
</el-form-item>
- <el-form-item label="鎺掑簭鐮�" prop="sortnum">
+ <el-form-item label="绛夌骇椤哄簭" prop="sortnum" v-if="form.type == 3">
+ <el-input v-model="form.sortnum" type="" placeholder="璇疯緭鍏ユ帓搴忕爜" v-trim/>
+ </el-form-item>
+ <el-form-item label="鎺掑簭鐮�" prop="sortnum" v-else>
<el-input v-model="form.sortnum" type="" placeholder="璇疯緭鍏ユ帓搴忕爜" v-trim/>
</el-form-item>
<el-form-item label="鎻忚堪" prop="remark">
@@ -72,7 +76,8 @@
tempfileList: [],
// 楠岃瘉瑙勫垯
rules: {
- name: [{ required: true, message: '璇疯緭鍏ュ悕绉�' }]
+ name: [{ required: true, message: '璇疯緭鍏ュ悕绉�' }],
+ detail: [{ required: true, message: '璇疯緭鍏ユ垬鍖虹紪鐮�' }]
}
}
},
diff --git a/admin/src/components/business/OperaMemberWindow.vue b/admin/src/components/business/OperaMemberWindow.vue
index f8ff2fb..c55424f 100644
--- a/admin/src/components/business/OperaMemberWindow.vue
+++ b/admin/src/components/business/OperaMemberWindow.vue
@@ -144,13 +144,13 @@
name: [{ required: true, message: '璇疯緭鍏ュ鍚�' }],
code: [{ required: true, message: '璇疯緭鍏ュ伐鍙�' }],
imgurl: [{ required: true, message: '璇蜂笂浼犺亴涓氱収' }],
- sex: [{ required: true, message: '璇烽�夋嫨鎬у埆' }],
jobYear: [{ required: true, message: '璇烽�夋嫨浠庝笟骞翠唤' }],
zhanquIdList: [{ required: true, message: '璇烽�夋嫨鏈嶅姟鎴樺尯' }],
bustypeIdList: [{ required: true, message: '璇烽�夋嫨鍟嗕笟鍖栫被鍨�' }],
levelId: [{ required: true, message: '璇烽�夋嫨鑰佸笀绛夌骇' }],
fieldIdList: [{ required: true, message: '璇烽�夋嫨鎿呴暱棰嗗煙' }],
- content: [{ required: true, message: '璇疯緭鍏ヨ�佸笀绠�浠�' }]
+ content: [{ required: true, message: '璇疯緭鍏ヨ�佸笀绠�浠�' }],
+ fee: [{ required: true, message: '璇疯緭鍏ヨ垂鐢ㄦ爣鍑�' }]
}
}
},
diff --git a/admin/src/components/common/UploadFaceImg.vue b/admin/src/components/common/UploadFaceImg.vue
index 2deb394..a5ce534 100644
--- a/admin/src/components/common/UploadFaceImg.vue
+++ b/admin/src/components/common/UploadFaceImg.vue
@@ -6,6 +6,7 @@
:style="customStyle"
action=""
:auto-upload="false"
+ :before-upload="beforeUpload"
:show-file-list="false"
:on-change='openUpdateIcon'>
<img v-if=" file.imgurlfull" style="width: 100%;" :src="file.imgurlfull" :style="customStyle" class="avatar">
@@ -57,6 +58,10 @@
type: String,
default: 'width: 90px; height: 90px;'
},
+ size: {
+ type: Number,
+ default: () => 5
+ },
uploadData: Object
},
data () {
@@ -71,6 +76,14 @@
},
methods: {
+ beforeUpload (file) {
+ const isLt2M = file.size / 1024 / 1024 < this.size;
+ if (!isLt2M) {
+ this.$message.error(`涓婁紶鍥剧墖澶у皬涓嶈兘瓒呰繃${this.size}mb!`);
+ return false
+ }
+ return true
+ },
uploadIcon () {
// 鑾峰彇瑁佸壀鍚庣殑鍥剧墖
this.$refs.iconShot.getImagecropper().getCropBlob((fileData) => { // 鑾峰彇褰撳墠瑁佸壀濂界殑鏁版嵁
diff --git a/admin/src/components/common/UploadImage.vue b/admin/src/components/common/UploadImage.vue
index d9237a4..b14bb6f 100644
--- a/admin/src/components/common/UploadImage.vue
+++ b/admin/src/components/common/UploadImage.vue
@@ -40,6 +40,10 @@
type: Number,
default: () => null
},
+ size: {
+ type: Number,
+ default: () => 1
+ },
uploadData: Object
},
data () {
@@ -67,13 +71,13 @@
beforeUpload (file) {
this.$emit('beginUpload')
const isJPGOrPNG = file.type === 'image/jpeg' || file.type === 'image/png'
- const isLt2M = file.size / 1024 / 1024 < 1; // 500kb
+ const isLt2M = file.size / 1024 / 1024 < this.size;
if (!isJPGOrPNG) {
this.$message.error('涓婁紶澶村儚鍥剧墖鍙兘鏄� JPG/PNG 鏍煎紡!');
return false
}
if (!isLt2M) {
- this.$message.error('涓婁紶澶村儚鍥剧墖澶у皬涓嶈兘瓒呰繃 500KB!');
+ this.$message.error(`涓婁紶鍥剧墖澶у皬涓嶈兘瓒呰繃${this.size}mb!`);
return false
}
return true
diff --git a/admin/src/main.js b/admin/src/main.js
index 415b1cc..85e26c7 100644
--- a/admin/src/main.js
+++ b/admin/src/main.js
@@ -12,8 +12,10 @@
import { fetchMenuTree } from './api/system/menu'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+import { initDingH5RemoteDebug } from "dingtalk-h5-remote-debug";
Vue.component('treeselect', Treeselect)
Vue.config.productionTip = false
+initDingH5RemoteDebug();
Vue.use(ElementUI, {
size: 'small'
})
@@ -21,7 +23,6 @@
Vue.use(directives)
Vue.use(filters)
Vue.use(plugins)
-
new Vue({
data: {
loading: false
diff --git a/admin/src/router/index.js b/admin/src/router/index.js
index 0ab59e8..56b1128 100644
--- a/admin/src/router/index.js
+++ b/admin/src/router/index.js
@@ -16,6 +16,9 @@
{
name: 'login',
path: '/login',
+ meta: {
+ refresh: true
+ },
component: Login
},
// 鏃犳潈闄�
diff --git a/admin/src/views/business/cases.vue b/admin/src/views/business/cases.vue
index ec782ec..469de42 100644
--- a/admin/src/views/business/cases.vue
+++ b/admin/src/views/business/cases.vue
@@ -144,6 +144,68 @@
})
},
methods: {
+ deleteById (row, childConfirm = true, call) {
+ this.__checkApi()
+ let message = `纭鍒犻櫎妗堜緥鏁版嵁鍚�?`
+ if (childConfirm && row.children != null && row.children.length > 0) {
+ message = `纭鍒犻櫎妗堜緥鏁版嵁鍚�?`
+ }
+ this.$dialog.deleteConfirm(message)
+ .then(() => {
+ this.isWorking.delete = true
+ this.api.deleteById(row[this.configData['field.id']])
+ .then(() => {
+ this.__afterDelete()
+ if (call) {
+ call()
+ }
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking.delete = false
+ })
+ })
+ .catch(() => {})
+ },
+ deleteByIdInBatch (childConfirm = true, call) {
+ this.__checkApi()
+ if (this.tableData.selectedRows.length === 0) {
+ this.$tip.warning('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�')
+ return
+ }
+ let message = `纭鍒犻櫎妗堜緥鏁版嵁鍚�?`
+ if (childConfirm) {
+ const containChildrenRows = []
+ for (const row of this.tableData.selectedRows) {
+ if (row.children != null && row.children.length > 0) {
+ containChildrenRows.push(row[this.configData['field.main']])
+ }
+ }
+ if (containChildrenRows.length > 0) {
+ message = `纭鍒犻櫎妗堜緥鏁版嵁鍚�?`
+ }
+ }
+ this.$dialog.deleteConfirm(message)
+ .then(() => {
+ this.isWorking.delete = true
+ this.api.deleteByIdInBatch(this.tableData.selectedRows.map(row => row[this.configData['field.id']]).join(','))
+ .then(() => {
+ this.__afterDelete(this.tableData.selectedRows.length)
+ if (call) {
+ call()
+ }
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking.delete = false
+ })
+ })
+ .catch(() => {})
+ },
changeStatus (e, row) {
this.working = true
this.api.updateStatus({ id: row.id, status: e })
diff --git a/admin/src/views/business/category.vue b/admin/src/views/business/category.vue
index c202c48..58bf7fb 100644
--- a/admin/src/views/business/category.vue
+++ b/admin/src/views/business/category.vue
@@ -14,7 +14,7 @@
<template v-slot:table-wrap>
<ul class="toolbar" v-permissions="['business:category:create', 'business:category:delete']">
<li><el-button type="primary" @click="$refs.operaCategoryWindow.open('鏂板缓鎴樺尯',null,searchForm.type)" icon="el-icon-plus" v-permissions="['business:category:create']">鏂板缓</el-button></li>
- <li><el-button type="primary" icon="el-icon-refresh" v-permissions="['business:category:create']">鍚屾</el-button></li>
+ <li><el-button type="primary" icon="el-icon-refresh" v-permissions="['business:category:create']" @click="synchronization">鍚屾</el-button></li>
<li><el-button type="danger" @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:category:delete']">鍒犻櫎</el-button></li>
</ul>
<el-table
@@ -66,6 +66,7 @@
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaCategoryWindow from '@/components/business/OperaCategoryWindow'
+import { syncZhanQu } from '@/api/business/category'
export default {
name: 'Category',
extends: BaseTable,
@@ -89,6 +90,80 @@
this.search()
},
methods: {
+ synchronization() {
+ this.$dialog.deleteConfirm('纭鍚屾鎴樺尯淇℃伅鍚楋紵')
+ .then(() => {
+ syncZhanQu()
+ .then(res=>{
+ if (res.code === 200) {
+ this.$message.success('鍚屾鎴愬姛锛�')
+ }
+ })
+ })
+ .catch(() => {})
+ },
+ deleteById (row, childConfirm = true, call) {
+ this.__checkApi()
+ let message = `纭鍒犻櫎鎴樺尯鏁版嵁鍚�?`
+ if (childConfirm && row.children != null && row.children.length > 0) {
+ message = `纭鍒犻櫎鎴樺尯鏁版嵁鍚�?`
+ }
+ this.$dialog.deleteConfirm(message)
+ .then(() => {
+ this.isWorking.delete = true
+ this.api.deleteById(row[this.configData['field.id']])
+ .then(() => {
+ this.__afterDelete()
+ if (call) {
+ call()
+ }
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking.delete = false
+ })
+ })
+ .catch(() => {})
+ },
+ deleteByIdInBatch (childConfirm = true, call) {
+ this.__checkApi()
+ if (this.tableData.selectedRows.length === 0) {
+ this.$tip.warning('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�')
+ return
+ }
+ let message = `纭鍒犻櫎鎴樺尯鏁版嵁鍚�?`
+ if (childConfirm) {
+ const containChildrenRows = []
+ for (const row of this.tableData.selectedRows) {
+ if (row.children != null && row.children.length > 0) {
+ containChildrenRows.push(row[this.configData['field.main']])
+ }
+ }
+ if (containChildrenRows.length > 0) {
+ message = `纭鍒犻櫎鎴樺尯鏁版嵁鍚�?`
+ }
+ }
+ this.$dialog.deleteConfirm(message)
+ .then(() => {
+ this.isWorking.delete = true
+ this.api.deleteByIdInBatch(this.tableData.selectedRows.map(row => row[this.configData['field.id']]).join(','))
+ .then(() => {
+ this.__afterDelete(this.tableData.selectedRows.length)
+ if (call) {
+ call()
+ }
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking.delete = false
+ })
+ })
+ .catch(() => {})
+ },
changeStatus (e, row) {
this.working = true
this.api.updateStatus({ id: row.id, status: e })
diff --git a/admin/src/views/business/categoryBusType.vue b/admin/src/views/business/categoryBusType.vue
index e952fe4..b5ce566 100644
--- a/admin/src/views/business/categoryBusType.vue
+++ b/admin/src/views/business/categoryBusType.vue
@@ -2,8 +2,8 @@
<TableLayout :permissions="['business:category:query']">
<!-- 鎼滅储琛ㄥ崟 -->
<el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
- <el-form-item label="鍚嶇О" prop="name">
- <el-input v-model="searchForm.name" placeholder="璇疯緭鍏ュ悕绉�" @keypress.enter.native="search"></el-input>
+ <el-form-item label="鍟嗕笟鍖栫被鍨�" prop="name">
+ <el-input v-model="searchForm.name" placeholder="璇疯緭鍏ュ晢涓氬寲绫诲瀷" @keypress.enter.native="search"></el-input>
</el-form-item>
<section>
<el-button type="primary" @click="search">鎼滅储</el-button>
@@ -14,7 +14,7 @@
<template v-slot:table-wrap>
<ul class="toolbar" v-permissions="['business:category:create', 'business:category:delete']">
<li><el-button type="primary" @click="$refs.operaCategoryWindow.open('鏂板缓鍟嗕笟鍖栫被鍨�',null,searchForm.type)" icon="el-icon-plus" v-permissions="['business:category:create']">鏂板缓</el-button></li>
- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:category:delete']">鍒犻櫎</el-button></li>
+ <li><el-button type="danger" @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:category:delete']">鍒犻櫎</el-button></li>
</ul>
<el-table
:height="tableHeightNew"
@@ -56,7 +56,7 @@
>
<template slot-scope="{row}">
<el-button type="text" @click="$refs.operaCategoryWindow.open('缂栬緫鍟嗕笟鍖栫被鍨�', row,searchForm.type)" icon="el-icon-edit" v-permissions="['business:category:update']">缂栬緫</el-button>
- <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:category:delete']">鍒犻櫎</el-button>
+ <el-button type="text" style="color: red" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:category:delete']">鍒犻櫎</el-button>
</template>
</el-table-column>
</el-table>
@@ -100,6 +100,68 @@
this.search()
},
methods: {
+ deleteById (row, childConfirm = true, call) {
+ this.__checkApi()
+ let message = `纭鍒犻櫎鍟嗕笟鍖栫被鍨嬫暟鎹悧?`
+ if (childConfirm && row.children != null && row.children.length > 0) {
+ message = `纭鍒犻櫎鍟嗕笟鍖栫被鍨嬫暟鎹悧?`
+ }
+ this.$dialog.deleteConfirm(message)
+ .then(() => {
+ this.isWorking.delete = true
+ this.api.deleteById(row[this.configData['field.id']])
+ .then(() => {
+ this.__afterDelete()
+ if (call) {
+ call()
+ }
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking.delete = false
+ })
+ })
+ .catch(() => {})
+ },
+ deleteByIdInBatch (childConfirm = true, call) {
+ this.__checkApi()
+ if (this.tableData.selectedRows.length === 0) {
+ this.$tip.warning('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�')
+ return
+ }
+ let message = `纭鍒犻櫎鍟嗕笟鍖栫被鍨嬫暟鎹悧?`
+ if (childConfirm) {
+ const containChildrenRows = []
+ for (const row of this.tableData.selectedRows) {
+ if (row.children != null && row.children.length > 0) {
+ containChildrenRows.push(row[this.configData['field.main']])
+ }
+ }
+ if (containChildrenRows.length > 0) {
+ message = `纭鍒犻櫎鍟嗕笟鍖栫被鍨嬫暟鎹悧?`
+ }
+ }
+ this.$dialog.deleteConfirm(message)
+ .then(() => {
+ this.isWorking.delete = true
+ this.api.deleteByIdInBatch(this.tableData.selectedRows.map(row => row[this.configData['field.id']]).join(','))
+ .then(() => {
+ this.__afterDelete(this.tableData.selectedRows.length)
+ if (call) {
+ call()
+ }
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking.delete = false
+ })
+ })
+ .catch(() => {})
+ },
isChangeSelected(row,index){
// if(row.isFixed ==1) {
// return false
diff --git a/admin/src/views/business/categoryField.vue b/admin/src/views/business/categoryField.vue
index 3b6135c..0b0b6bd 100644
--- a/admin/src/views/business/categoryField.vue
+++ b/admin/src/views/business/categoryField.vue
@@ -14,7 +14,7 @@
<template v-slot:table-wrap>
<ul class="toolbar" v-permissions="['business:category:create', 'business:category:delete']">
<li><el-button type="primary" @click="$refs.operaCategoryWindow.open('鏂板缓鎿呴暱棰嗗煙',null,searchForm.type)" icon="el-icon-plus" v-permissions="['business:category:create']">鏂板缓</el-button></li>
- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:category:delete']">鍒犻櫎</el-button></li>
+ <li><el-button type="danger" @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:category:delete']">鍒犻櫎</el-button></li>
</ul>
<el-table
:height="tableHeightNew"
@@ -88,6 +88,68 @@
this.search()
},
methods: {
+ deleteById (row, childConfirm = true, call) {
+ this.__checkApi()
+ let message = `纭鍒犻櫎鎿呴暱棰嗗煙鏁版嵁鍚�?`
+ if (childConfirm && row.children != null && row.children.length > 0) {
+ message = `纭鍒犻櫎鎿呴暱棰嗗煙鏁版嵁鍚�?`
+ }
+ this.$dialog.deleteConfirm(message)
+ .then(() => {
+ this.isWorking.delete = true
+ this.api.deleteById(row[this.configData['field.id']])
+ .then(() => {
+ this.__afterDelete()
+ if (call) {
+ call()
+ }
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking.delete = false
+ })
+ })
+ .catch(() => {})
+ },
+ deleteByIdInBatch (childConfirm = true, call) {
+ this.__checkApi()
+ if (this.tableData.selectedRows.length === 0) {
+ this.$tip.warning('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�')
+ return
+ }
+ let message = `纭鍒犻櫎鎿呴暱棰嗗煙鏁版嵁鍚�?`
+ if (childConfirm) {
+ const containChildrenRows = []
+ for (const row of this.tableData.selectedRows) {
+ if (row.children != null && row.children.length > 0) {
+ containChildrenRows.push(row[this.configData['field.main']])
+ }
+ }
+ if (containChildrenRows.length > 0) {
+ message = `纭鍒犻櫎鎿呴暱棰嗗煙鏁版嵁鍚�?`
+ }
+ }
+ this.$dialog.deleteConfirm(message)
+ .then(() => {
+ this.isWorking.delete = true
+ this.api.deleteByIdInBatch(this.tableData.selectedRows.map(row => row[this.configData['field.id']]).join(','))
+ .then(() => {
+ this.__afterDelete(this.tableData.selectedRows.length)
+ if (call) {
+ call()
+ }
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking.delete = false
+ })
+ })
+ .catch(() => {})
+ },
isChangeSelected(row,index){
// if(row.isFixed ==1) {
// return false
diff --git a/admin/src/views/business/categoryLevel.vue b/admin/src/views/business/categoryLevel.vue
index e080855..5293c83 100644
--- a/admin/src/views/business/categoryLevel.vue
+++ b/admin/src/views/business/categoryLevel.vue
@@ -14,7 +14,7 @@
<template v-slot:table-wrap>
<ul class="toolbar" v-permissions="['business:category:create', 'business:category:delete']">
<li><el-button type="primary" @click="$refs.operaCategoryWindow.open('鏂板缓鑰佸笀绛夌骇',null,searchForm.type)" icon="el-icon-plus" v-permissions="['business:category:create']">鏂板缓</el-button></li>
- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:category:delete']">鍒犻櫎</el-button></li>
+ <li><el-button type="danger" @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:category:delete']">鍒犻櫎</el-button></li>
</ul>
<el-table
:height="tableHeightNew"
@@ -96,6 +96,68 @@
this.search()
},
methods: {
+ deleteById (row, childConfirm = true, call) {
+ this.__checkApi()
+ let message = `纭鍒犻櫎鑰佸笀绛夌骇鏁版嵁鍚�?`
+ if (childConfirm && row.children != null && row.children.length > 0) {
+ message = `纭鍒犻櫎鑰佸笀绛夌骇鏁版嵁鍚�?`
+ }
+ this.$dialog.deleteConfirm(message)
+ .then(() => {
+ this.isWorking.delete = true
+ this.api.deleteById(row[this.configData['field.id']])
+ .then(() => {
+ this.__afterDelete()
+ if (call) {
+ call()
+ }
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking.delete = false
+ })
+ })
+ .catch(() => {})
+ },
+ deleteByIdInBatch (childConfirm = true, call) {
+ this.__checkApi()
+ if (this.tableData.selectedRows.length === 0) {
+ this.$tip.warning('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�')
+ return
+ }
+ let message = `纭鍒犻櫎鑰佸笀绛夌骇鏁版嵁鍚�?`
+ if (childConfirm) {
+ const containChildrenRows = []
+ for (const row of this.tableData.selectedRows) {
+ if (row.children != null && row.children.length > 0) {
+ containChildrenRows.push(row[this.configData['field.main']])
+ }
+ }
+ if (containChildrenRows.length > 0) {
+ message = `纭鍒犻櫎鑰佸笀绛夌骇鏁版嵁鍚�?`
+ }
+ }
+ this.$dialog.deleteConfirm(message)
+ .then(() => {
+ this.isWorking.delete = true
+ this.api.deleteByIdInBatch(this.tableData.selectedRows.map(row => row[this.configData['field.id']]).join(','))
+ .then(() => {
+ this.__afterDelete(this.tableData.selectedRows.length)
+ if (call) {
+ call()
+ }
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking.delete = false
+ })
+ })
+ .catch(() => {})
+ },
isChangeSelected(row,index){
// if(row.isFixed ==1) {
// return false
diff --git a/admin/src/views/business/member.vue b/admin/src/views/business/member.vue
index df448f1..25aca5a 100644
--- a/admin/src/views/business/member.vue
+++ b/admin/src/views/business/member.vue
@@ -2,8 +2,8 @@
<TableLayout :permissions="['business:member:query']">
<!-- 鎼滅储琛ㄥ崟 -->
<el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
- <el-form-item label="鍚嶇О" prop="name">
- <el-input v-model="searchForm.name" style="width: 150px" placeholder="璇疯緭鍏ュ悕绉�" @keypress.enter.native="search"></el-input>
+ <el-form-item label="濮撳悕" prop="name">
+ <el-input v-model="searchForm.name" style="width: 150px" placeholder="璇疯緭鍏ュ鍚�" @keypress.enter.native="search"></el-input>
</el-form-item>
<el-form-item label="宸ュ彿" prop="code">
<el-input v-model="searchForm.code" style="width: 150px" placeholder="璇疯緭鍏ュ伐鍙�" @keypress.enter.native="search"></el-input>
@@ -24,12 +24,13 @@
></el-option>
</el-select>
</el-form-item>
- <el-form-item label="鍟嗕笟鍖栫被鍨�" prop="bustypeIds">
+ <el-form-item label="鍟嗕笟鍖栫被鍨�" prop="bustypeIdList">
<el-select
- v-model="searchForm.bustypeIds"
+ v-model="searchForm.bustypeIdList"
style="width: 150px"
placeholder="鍟嗕笟鍖栫被鍨�"
clearable
+ multiple
@change="search"
>
<el-option
@@ -122,7 +123,11 @@
</el-table-column>
<el-table-column prop="positon" label="宀椾綅" min-width="120px"></el-table-column>
<el-table-column prop="levelName" label="绛夌骇" min-width="100px"></el-table-column>
- <el-table-column prop="jobYear" label="浠庝笟骞翠唤" min-width="100px"></el-table-column>
+ <el-table-column prop="workYears" label="浠庝笟骞翠唤" min-width="100px">
+ <template slot-scope="{row}">
+ {{row.workYears}}骞�
+ </template>
+ </el-table-column>
<el-table-column prop="serveNum" label="鏈嶅姟鍟嗗満" min-width="100px">
<template slot-scope="{row}">
<span v-if="row.serveNum">{{row.serveNum}}涓�</span>
@@ -214,7 +219,7 @@
levelId:null,
fieldIdList: [],
zhanquIds:null,
- bustypeIds:null,
+ bustypeIdList:[],
type: 0
},
cateList:[]
@@ -235,6 +240,68 @@
},
methods: {
+ deleteById (row, childConfirm = true, call) {
+ this.__checkApi()
+ let message = `纭鍒犻櫎鑰佸笀鏁版嵁鍚�?`
+ if (childConfirm && row.children != null && row.children.length > 0) {
+ message = `纭鍒犻櫎鑰佸笀鏁版嵁鍚�?`
+ }
+ this.$dialog.deleteConfirm(message)
+ .then(() => {
+ this.isWorking.delete = true
+ this.api.deleteById(row[this.configData['field.id']])
+ .then(() => {
+ this.__afterDelete()
+ if (call) {
+ call()
+ }
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking.delete = false
+ })
+ })
+ .catch(() => {})
+ },
+ deleteByIdInBatch (childConfirm = true, call) {
+ this.__checkApi()
+ if (this.tableData.selectedRows.length === 0) {
+ this.$tip.warning('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�')
+ return
+ }
+ let message = `纭鍒犻櫎鑰佸笀鏁版嵁鍚�?`
+ if (childConfirm) {
+ const containChildrenRows = []
+ for (const row of this.tableData.selectedRows) {
+ if (row.children != null && row.children.length > 0) {
+ containChildrenRows.push(row[this.configData['field.main']])
+ }
+ }
+ if (containChildrenRows.length > 0) {
+ message = `纭鍒犻櫎鑰佸笀鏁版嵁鍚�?`
+ }
+ }
+ this.$dialog.deleteConfirm(message)
+ .then(() => {
+ this.isWorking.delete = true
+ this.api.deleteByIdInBatch(this.tableData.selectedRows.map(row => row[this.configData['field.id']]).join(','))
+ .then(() => {
+ this.__afterDelete(this.tableData.selectedRows.length)
+ if (call) {
+ call()
+ }
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking.delete = false
+ })
+ })
+ .catch(() => {})
+ },
changeStatus (e, row) {
this.working = true
this.api.updateStatus({ id: row.id, status: e })
diff --git a/admin/src/views/login.vue b/admin/src/views/login.vue
index 4003310..7503e88 100644
--- a/admin/src/views/login.vue
+++ b/admin/src/views/login.vue
@@ -22,8 +22,8 @@
<script>
import { mapMutations } from 'vuex'
-import { getCaptcha, loginByPassword } from '@/api/system/common'
-
+import { getCaptcha, loginByPassword, loginByDingTalk } from '@/api/system/common'
+import * as dd from 'dingtalk-jsapi';
export default {
name: 'Login',
data () {
@@ -31,6 +31,7 @@
loading: false,
username: '',
password: '',
+ unionId: '',
// 楠岃瘉鐮�
captcha: {
loading: false,
@@ -57,7 +58,8 @@
username: this.username.trim(),
password: this.password,
code: this.captcha.value.trim(),
- uuid: this.captcha.uuid
+ uuid: this.captcha.uuid,
+ unionId: this.unionId
},true)
.then(() => {
window.location.href = process.env.VUE_APP_CONTEXT_PATH
@@ -113,6 +115,37 @@
},
created () {
this.refreshCaptcha()
+ var that = this
+ let href = window.location.href;
+ let corpId = ''
+ if (dd.env.platform !== 'notInDingTalk') {
+ // 鍏堝垽鏂湴鍧�涓婃湁娌℃湁corpId
+ if (href.indexOf('?corpid=') !== -1) {
+ alert('浠庡湴鍧�鎷縞orpid')
+ corpId = href.substring(href.lastIndexOf('?corpid=') + 8, href.lastIndexOf('#'))
+ window.localStorage.setItem('corpId', corpId)
+ // 鍒ゆ柇娴忚鍣ㄧ紦瀛樻槸鍚︽湁corpId
+ } else if (window.localStorage.getItem('corpId')) {
+ corpId = window.localStorage.getItem('corpId')
+ alert('浠庣紦瀛樻嬁corpid')
+ }
+ dd.requestAuthCode({
+ corpId: corpId,
+ clientId: 'dingulzemj5bynjciapg',
+ onSuccess: function(result) {
+ loginByDingTalk({
+ code: result.code,
+ corpId: corpId
+ }).then(res => {
+ if (res.loginStatus) {
+ window.location.href = process.env.VUE_APP_CONTEXT_PATH
+ return
+ }
+ that.unionId = res.unionId
+ })
+ }
+ });
+ }
}
}
</script>
diff --git a/mini-program/App.vue b/mini-program/App.vue
index 3f42d00..4ca0850 100644
--- a/mini-program/App.vue
+++ b/mini-program/App.vue
@@ -23,7 +23,7 @@
}
});
} else if (href.indexOf('?token') !== -1) {
- let token = href.substring(href.lastIndexOf('?token=') + 7, href.length)
+ let token = href.substring(href.lastIndexOf('?token=') + 7, href.lastIndexOf('#'))
that.$store.commit('setToken', token)
that.$isResolve()
} else {
diff --git a/mini-program/main.js b/mini-program/main.js
index 857bff9..248d065 100644
--- a/mini-program/main.js
+++ b/mini-program/main.js
@@ -14,6 +14,7 @@
})
Vue.prototype.$dd = dd
Vue.prototype.$baseUrl = 'https://test.doumee.cn/dianjiang_web_api/'
+// Vue.prototype.$baseUrl = 'http://192.168.0.7/dianjiang_web_api/'
Vue.prototype.vconsole = new vconsole();
initDingH5RemoteDebug();
diff --git a/mini-program/pages/details/details.vue b/mini-program/pages/details/details.vue
index b7ec49c..fd6c4b0 100644
--- a/mini-program/pages/details/details.vue
+++ b/mini-program/pages/details/details.vue
@@ -54,10 +54,10 @@
</view>
</view>
</view>
- <view class="card">
+ <view class="card" v-if="item.casesList">
<view class="card-title">
<view class="card-title-xian"></view>
- <text>浼樼椤圭洰妗堜緥 (40)</text>
+ <text>浼樼椤圭洰妗堜緥 ({{item.casesList.length}})</text>
</view>
<view class="work">
<view class="work-item" v-for="(child, index) in item.casesList" :key="index">
@@ -69,7 +69,7 @@
</view>
<view class="left-info">{{child.detail}}</view>
</view>
- <view class="right" v-if="child.fileList && child.fileList.length > 0" @click="yulan">
+ <view class="right" v-if="child.fileList && child.fileList.length > 0" @click="yulan(index, child.fileList[0].url)">
<image :src="child.fileList[0].url" mode="widthFix"></image>
<view class="right-num">鍏眥{child.fileList.length}}寮�</view>
</view>
@@ -92,6 +92,12 @@
this.getDetails()
},
methods: {
+ yulan(index, url) {
+ uni.previewImage({
+ current: url,
+ urls: this.item.casesList[index].fileList.map(item => item.url)
+ })
+ },
zhankai() {
this.item.zhankai = !this.item.zhankai
},
@@ -106,6 +112,13 @@
res.data.zhankai = false
res.data.contentCopy = res.data.content.substring(0, 30) + '...'
}
+ let arr = []
+ res.data.fieldList.forEach(item => {
+ if (item.remark) {
+ arr.push(item)
+ }
+ })
+ res.data.fieldList = arr;
this.item = res.data
}
})
@@ -179,18 +192,21 @@
}
.item-info-a {
display: flex;
- align-items: center;
+ align-items: flex-start;
text {
&:nth-child(1) {
+ flex-shrink: 0;
font-weight: 600;
font-size: 30rpx;
color: #222222;
}
&:nth-child(2) {
+ width: 300rpx;
font-weight: 400;
font-size: 24rpx;
color: #777777;
margin-left: 10rpx;
+ margin-top: 7rpx;
}
}
}
@@ -198,7 +214,7 @@
display: flex;
flex-wrap: wrap;
align-items: center;
- margin-top: 8rpx;
+ margin-top: 16rpx;
.item-info-b-row {
padding: 0 8rpx;
box-sizing: border-box;
@@ -210,8 +226,9 @@
font-size: 22rpx;
color: #2E68C4;
margin-right: 8rpx;
+ margin-bottom: 8rpx;
&:last-child {
- margin: 0;
+ margin-right: 0;
}
}
}
@@ -238,6 +255,7 @@
}
.item-info-d {
width: 100%;
+ line-height: 40rpx;
font-weight: 400;
font-size: 24rpx;
color: #333333;
@@ -345,7 +363,7 @@
.card-list-item {
display: flex;
flex-direction: column;
- margin-bottom: 20rpx;
+ margin-bottom: 30rpx;
&:last-child {
margin: 0 !important;
}
@@ -353,9 +371,10 @@
font-weight: 500;
font-size: 28rpx;
color: #333333;
+ margin-bottom: 15rpx;
}
.card-list-item-text {
- font-weight: 500;
+ font-weight: 400;
font-size: 26rpx;
color: #666666;
}
diff --git a/mini-program/pages/index/index.vue b/mini-program/pages/index/index.vue
index fbbd5da..fe99bf9 100644
--- a/mini-program/pages/index/index.vue
+++ b/mini-program/pages/index/index.vue
@@ -2,35 +2,33 @@
<view class="index">
<view class="zhezhao" v-show="view" @click="view = null"></view>
<view class="head">
- <view class="head-title">
- <view class="head-title-left" @click="jumpList">
- <image src="/static/ic_paihang@2x.png" mode="widthFix"></image>
- <text>鎺掕姒�</text>
- </view>
- <view class="head-title-name">閫夋嫨鐐瑰皢鑰佸笀</view>
- <view class="head-title-left" style="opacity: 0;">
- <image src="/static/ic_paihang@2x.png" mode="widthFix"></image>
- <text>鎺掕姒�</text>
- </view>
- </view>
<view class="head-search">
<view class="head-search-input">
- <u-search placeholder="璇疯緭鍏ヨ�佸笀濮撳悕" height="36" v-model="form.name" :showAction="false" @search="search"></u-search>
+ <view class="head-title-left" @click="jumpList">
+ <image src="/static/ic_paihang@2x.png" mode="widthFix"></image>
+ <text>鎺掕姒�</text>
+ </view>
+ <view class="head-search-input-right">
+ <u-search placeholder="璇疯緭鍏ヨ�佸笀濮撳悕" height="36" v-model="form.name" :showAction="false" @search="search" @clear="search"></u-search>
+ </view>
</view>
<view class="cate">
<view class="cate-item" @click="clickRow(1)">
<text :style="{ fontWeight: (view === 1 || form.bustypeIds) ? 'bold' : '', color: (view === 1 || form.bustypeIds) ? '#222222' : '' }">{{form.bustypeIds ? form.bustypeName : '鍟嗕笟鍖栫被鍨�'}}</text>
<image src="/static/ar_open_sel8@2x.png" mode="widthFix" v-if="view === 1"></image>
+ <image src="/static/ar_open_sel@2x.png" mode="widthFix" v-else-if="view !== 1 && form.bustypeIds"></image>
<image src="/static/ar_open7@2x.png" mode="widthFix" v-else></image>
</view>
<view class="cate-item" @click="clickRow(2)">
- <text :style="{ fontWeight: (view === 2 || form.fieldIds) ? 'bold' : '', color: (view === 2 || form.fieldIds) ? '#222222' : '' }">鎿呴暱棰嗗煙</text>
+ <text :style="{ fontWeight: (view === 2 || form.fieldIdList.length > 0) ? 'bold' : '', color: (view === 2 || form.fieldIdList.length > 0) ? '#222222' : '' }">鎿呴暱棰嗗煙</text>
<image src="/static/ar_open_sel8@2x.png" mode="widthFix" v-if="view === 2"></image>
+ <image src="/static/ar_open_sel@2x.png" mode="widthFix" v-else-if="view !== 2 && form.fieldIdList.length > 0"></image>
<image src="/static/ar_open7@2x.png" mode="widthFix" v-else></image>
</view>
<view class="cate-item" @click="clickRow(3)">
<text :style="{ fontWeight: (view === 3 || form.orderByType) ? 'bold' : '', color: (view === 3 || form.orderByType) ? '#222222' : '' }">{{form.orderByType ? form.orderByName : '榛樿鎺掑簭'}}</text>
<image src="/static/ar_open_sel8@2x.png" mode="widthFix" v-if="view === 3"></image>
+ <image src="/static/ar_open_sel@2x.png" mode="widthFix" v-else-if="view !== 3 && form.orderByType"></image>
<image src="/static/ar_open7@2x.png" mode="widthFix" v-else></image>
</view>
</view>
@@ -109,7 +107,7 @@
form: {
orderByType: '',
orderByName: '',
- fieldIds: '',
+ fieldIdList: [],
bustypeIds: '',
bustypeName: '',
name: ''
@@ -117,6 +115,7 @@
list1: [],
list2: [],
list3: [
+ { name: '榛樿鎺掑簭', id: '', active: true },
{ name: '鏀惰垂浠庨珮鍒颁綆', id: '0', active: false },
{ name: '鏀惰垂浠庝綆鍒伴珮', id: '1', active: false },
{ name: '绛夌骇浠庨珮鍒颁綆', id: '2', active: false },
@@ -143,7 +142,14 @@
this.$u.api.memberPage({
capacity: 10,
page: this.page,
- model: this.form
+ model: {
+ orderByType: this.form.orderByType ? this.form.orderByType : 3,
+ orderByName: this.form.orderByName,
+ fieldIdList: this.form.fieldIdList,
+ bustypeIds: this.form.bustypeIds,
+ bustypeName: this.form.bustypeName,
+ name: this.form.name
+ }
}).then(res => {
if (res.code === 200) {
res.data.records.forEach(item => {
@@ -178,7 +184,7 @@
this.view = null
} else if (type === 2) {
this.list2[i].active = !this.list2[i].active
- this.form.fieldIds = this.list2.filter(item => item.active).map(item => item.id).join(',')
+ this.form.fieldIdList = this.list2.filter(item => item.active).map(item => item.id)
this.$forceUpdate()
} else {
this.form.orderByType = this.list3[i].id
@@ -203,6 +209,7 @@
if (res.code === 200) {
res.data.active = false
this.list1 = res.data
+ this.list1.unshift({ name: '鍏ㄩ儴', id: null, active: true })
}
})
this.$u.api.categoryList({ type: 2 })
@@ -246,7 +253,7 @@
width: 100%;
background: #FFFFFF;
border-radius: 8rpx;
- padding: 24rpx;
+ padding: 30rpx;
box-sizing: border-box;
display: flex;
align-items: flex-start;
@@ -299,18 +306,21 @@
}
.item-info-a {
display: flex;
- align-items: center;
+ align-items: flex-start;
text {
&:nth-child(1) {
+ flex-shrink: 0;
font-weight: 600;
font-size: 30rpx;
color: #222222;
}
&:nth-child(2) {
+ width: 280rpx;
font-weight: 400;
font-size: 24rpx;
color: #777777;
margin-left: 10rpx;
+ margin-top: 7rpx;
}
}
}
@@ -318,7 +328,7 @@
display: flex;
flex-wrap: wrap;
align-items: center;
- margin-top: 8rpx;
+ margin-top: 16rpx;
.item-info-b-row {
padding: 0 8rpx;
box-sizing: border-box;
@@ -330,8 +340,9 @@
font-size: 22rpx;
color: #2E68C4;
margin-right: 8rpx;
+ margin-bottom: 8rpx;
&:last-child {
- margin: 0;
+ margin-right: 0;
}
}
}
@@ -358,6 +369,7 @@
}
.item-info-d {
width: 100%;
+ line-height: 40rpx;
font-weight: 400;
font-size: 24rpx;
color: #333333;
@@ -381,49 +393,44 @@
}
.head {
width: 100%;
- height: 260rpx;
+ height: 172rpx;
+ padding-top: 12rpx;
+ box-sizing: border-box;
position: sticky;
top: 0;
left: 0;
z-index: 9;
background-color: #ffffff;
- .head-title {
- width: 100%;
- height: 88rpx;
- padding: 0 30rpx;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .head-title-left {
- display: flex;
- align-items: center;
- image {
- width: 40rpx;
- height: 40rpx;
- }
- text {
- font-weight: 400;
- font-size: 26rpx;
- color: #2E68C4;
- margin-left: 8rpx;
- }
- }
- .head-title-name {
- font-weight: 500;
- font-size: 32rpx;
- color: #111111;
- }
- }
.head-search {
width: 100%;
height: 172rpx;
.head-search-input {
width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
padding: 0 30rpx;
box-sizing: border-box;
height: 72rpx;
- margin-top: 12rpx;
+ .head-title-left {
+ flex-shrink: 0;
+ display: flex;
+ align-items: center;
+ margin-right: 30rpx;
+ image {
+ width: 40rpx;
+ height: 40rpx;
+ }
+ text {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #2E68C4;
+ margin-left: 8rpx;
+ }
+ }
+ .head-search-input-right {
+ flex: 1;
+ }
}
.sou {
width: 100%;
diff --git a/mini-program/pages/ranking-list/ranking-list.vue b/mini-program/pages/ranking-list/ranking-list.vue
index 11be735..4df5e43 100644
--- a/mini-program/pages/ranking-list/ranking-list.vue
+++ b/mini-program/pages/ranking-list/ranking-list.vue
@@ -25,7 +25,7 @@
},
methods: {
getAll() {
- this.$u.api.categoryList({ type: 1 })
+ this.$u.api.categoryList({ type: 1, rank: 1 })
.then(res => {
if (res.code === 200) {
res.data.active = false
diff --git a/mini-program/static/ar_open_sel@2x.png b/mini-program/static/ar_open_sel@2x.png
new file mode 100644
index 0000000..03d5ac5
--- /dev/null
+++ b/mini-program/static/ar_open_sel@2x.png
Binary files differ
diff --git a/mini-program/utils/http.interceptor.js b/mini-program/utils/http.interceptor.js
index 2465db0..fbf20cc 100644
--- a/mini-program/utils/http.interceptor.js
+++ b/mini-program/utils/http.interceptor.js
@@ -1,10 +1,10 @@
const install = (Vue, vm) => {
// 璇锋眰鎷︽埅鍣�
uni.$u.http.interceptors.request.use((config) => {
- const Headtoken = vm.$store.state.token
- if (Headtoken) {
- config.header['token'] = Headtoken;
- }
+ // const Headtoken = vm.$store.state.token
+ // if (Headtoken) {
+ config.header['token'] = 'eyJhbGciOiJIUzUxMiJ9.eyJpZCI6IjE4MDU1MTU5NDUzIiwiZXhwIjoxNzcwMTg3MDgxfQ.xoNzXq98cZQEAlCO3UeJU6zn5obIdoCWxWLRJumlj4AAzVeBNQosrVfxZMBfYOAZKB7qBcM_4JiWlDCEyL8hrg';
+ // }
return config
}, config => {
return Promise.reject(config)
--
Gitblit v1.9.3