From 05aec1e9986fbe3e907259bb1a1396f129bd0fa1 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 06 二月 2026 14:14:48 +0800
Subject: [PATCH] 优化
---
admin/src/components/business/OperaCasesImportWindow.vue | 2
admin/src/components/business/OperaMemberImportWindow.vue | 2
admin/src/views/business/categoryBusType.vue | 10
admin/.env.production | 2
mini-program/components/kxj-previewImage/kxj-previewImage.vue | 372 +++++++++++++++++++++++++++++++++
mini-program/pages/index/index.vue | 18 +
admin/src/views/business/categoryLevel.vue | 18 +
mini-program/App.vue | 8
admin/.env.development | 4
mini-program/main.js | 7
admin/src/views/login.vue | 7
mini-program/utils/http.interceptor.js | 8
mini-program/pages/details/details.vue | 65 +++--
admin/public/dianjiang_template/cases.xlsx | 0
mini-program/manifest.json | 7
mini-program/pages.json | 2
admin/src/components/business/OperaCategoryWindow.vue | 11
admin/src/views/business/category.vue | 7
admin/src/views/business/member.vue | 26 +-
admin/src/views/index.vue | 12 +
/dev/null | 0
admin/public/dianjiang_template/member.xlsx | 0
admin/src/components/business/OperaMemberWindow.vue | 3
mini-program/package.json | 18 +
admin/src/views/business/categoryField.vue | 16 +
25 files changed, 543 insertions(+), 82 deletions(-)
diff --git a/admin/.env.development b/admin/.env.development
index b9e47a1..3ee41f2 100644
--- a/admin/.env.development
+++ b/admin/.env.development
@@ -1,6 +1,6 @@
# 寮�鍙戠幆澧冮厤缃�
NODE_ENV = 'development'
-VUE_APP_API_URL = 'https://test.doumee.cn/dianjiang_admin_api/'
-# VUE_APP_API_URL = 'http://192.168.1.37:11010/'
+# VUE_APP_API_URL = 'https://test.doumee.cn/dianjiang_admin_api/'
+VUE_APP_API_URL = 'http://192.168.0.7/dianjiang_admin_api/'
VUE_APP_CONTEXT_PATH = '/'
diff --git a/admin/.env.production b/admin/.env.production
index bcce5b9..2dd0dac 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://test.doumee.cn/'
+VUE_APP_API_URL = 'https://zbyj.zbom.com/'
diff --git a/admin/public/template/cases.xlsx b/admin/public/dianjiang_template/cases.xlsx
similarity index 100%
rename from admin/public/template/cases.xlsx
rename to admin/public/dianjiang_template/cases.xlsx
Binary files differ
diff --git a/admin/public/template/member.xlsx b/admin/public/dianjiang_template/member.xlsx
similarity index 100%
rename from admin/public/template/member.xlsx
rename to admin/public/dianjiang_template/member.xlsx
Binary files differ
diff --git a/admin/src/components/business/OperaCasesImportWindow.vue b/admin/src/components/business/OperaCasesImportWindow.vue
index f8b6ab8..c218ccb 100644
--- a/admin/src/components/business/OperaCasesImportWindow.vue
+++ b/admin/src/components/business/OperaCasesImportWindow.vue
@@ -53,7 +53,7 @@
// 瀵煎嚭妯℃澘
exportTemplate () {
// 鎶曚繚鐢宠
- window.open('/template/cases.xlsx')
+ window.open('/dianjiang_template/cases.xlsx')
},
clickRef () {
this.$refs.fileExcel.click()
diff --git a/admin/src/components/business/OperaCategoryWindow.vue b/admin/src/components/business/OperaCategoryWindow.vue
index 1a30e6b..ee05c59 100644
--- a/admin/src/components/business/OperaCategoryWindow.vue
+++ b/admin/src/components/business/OperaCategoryWindow.vue
@@ -6,7 +6,16 @@
@confirm="confirm"
>
<el-form :model="form" ref="form" :rules="rules">
- <el-form-item label="鍚嶇О" prop="name">
+ <el-form-item label="鍟嗕笟鍖栫被鍨�" prop="name" v-if="form.type == 1">
+ <el-input v-model="form.name" placeholder="璇疯緭鍏ュ悕绉�" v-trim/>
+ </el-form-item>
+ <el-form-item label="鎿呴暱棰嗗煙" prop="name" v-else-if="form.type == 2">
+ <el-input v-model="form.name" placeholder="璇疯緭鍏ユ搮闀块鍩�" v-trim/>
+ </el-form-item>
+ <el-form-item label="鑰佸笀绛夌骇" prop="name" v-else-if="form.type == 3">
+ <el-input v-model="form.name" placeholder="璇疯緭鍏ユ搮闀块鍩�" v-trim/>
+ </el-form-item>
+ <el-form-item label="鍚嶇О" prop="name" v-else>
<el-input v-model="form.name" placeholder="璇疯緭鍏ュ悕绉�" v-trim/>
</el-form-item>
<el-form-item label="鎴樺尯缂栫爜" prop="detail" v-if="form.type ==0" >
diff --git a/admin/src/components/business/OperaMemberImportWindow.vue b/admin/src/components/business/OperaMemberImportWindow.vue
index 8737cae..c3c5b32 100644
--- a/admin/src/components/business/OperaMemberImportWindow.vue
+++ b/admin/src/components/business/OperaMemberImportWindow.vue
@@ -53,7 +53,7 @@
// 瀵煎嚭妯℃澘
exportTemplate () {
// 鎶曚繚鐢宠
- window.open('/template/member.xlsx')
+ window.open('/dianjiang_template/member.xlsx')
},
clickRef () {
this.$refs.fileExcel.click()
diff --git a/admin/src/components/business/OperaMemberWindow.vue b/admin/src/components/business/OperaMemberWindow.vue
index c55424f..94700a0 100644
--- a/admin/src/components/business/OperaMemberWindow.vue
+++ b/admin/src/components/business/OperaMemberWindow.vue
@@ -28,7 +28,7 @@
@uploadSuccess="uploadAvatarSuccess" @uploadEnd="isUploading = false" @uploadBegin="isUploading = true" />
<div class="content">
<div>1銆佸缓璁昂瀵革細750px X 750px 銆�</div>
- <div>2銆佹敮鎸乸ng銆乯pg銆乯peg鏍煎紡锛屽ぇ灏忎笉瓒呰繃2M锛屼笂浼犲浘鐗囦笉鍏佽娑夊強鏀挎不鏁忔劅涓庤壊鎯呫��</div>
+ <div>2銆佹敮鎸乸ng銆乯pg銆乯peg鏍煎紡锛屽ぇ灏忎笉瓒呰繃5M锛屼笂浼犲浘鐗囦笉鍏佽娑夊強鏀挎不鏁忔劅涓庤壊鎯呫��</div>
</div>
</div>
</el-form-item>
@@ -163,6 +163,7 @@
methods: {
loadCateList () {
cateList({
+ status: 0
}).then(res => {
this.cateList = res
})
diff --git a/admin/src/views/business/category.vue b/admin/src/views/business/category.vue
index 58bf7fb..9c48bea 100644
--- a/admin/src/views/business/category.vue
+++ b/admin/src/views/business/category.vue
@@ -5,6 +5,9 @@
<el-form-item label="鍚嶇О" prop="name">
<el-input v-model="searchForm.name" placeholder="璇疯緭鍏ュ悕绉�" @keypress.enter.native="search"></el-input>
</el-form-item>
+ <el-form-item label="鎴樺尯缂栫爜" prop="detail">
+ <el-input v-model="searchForm.detail" placeholder="璇疯緭鍏ユ垬鍖虹紪鐮�" @keypress.enter.native="search"></el-input>
+ </el-form-item>
<section>
<el-button type="primary" @click="search">鎼滅储</el-button>
<el-button @click="reset">閲嶇疆</el-button>
@@ -76,6 +79,7 @@
// 鎼滅储
searchForm: {
name: '',
+ detail: '',
type: 0
}
}
@@ -91,11 +95,12 @@
},
methods: {
synchronization() {
- this.$dialog.deleteConfirm('纭鍚屾鎴樺尯淇℃伅鍚楋紵')
+ this.$dialog.actionConfirmButton('纭鍚屾鎴樺尯淇℃伅鍚楋紵')
.then(() => {
syncZhanQu()
.then(res=>{
if (res.code === 200) {
+ this.search()
this.$message.success('鍚屾鎴愬姛锛�')
}
})
diff --git a/admin/src/views/business/categoryBusType.vue b/admin/src/views/business/categoryBusType.vue
index b5ce566..7e51bd8 100644
--- a/admin/src/views/business/categoryBusType.vue
+++ b/admin/src/views/business/categoryBusType.vue
@@ -5,6 +5,13 @@
<el-form-item label="鍟嗕笟鍖栫被鍨�" prop="name">
<el-input v-model="searchForm.name" placeholder="璇疯緭鍏ュ晢涓氬寲绫诲瀷" @keypress.enter.native="search"></el-input>
</el-form-item>
+ <el-form-item label="鐘舵��" prop="status">
+ <el-select v-model="searchForm.status" placeholder="璇烽�夋嫨鐘舵��" @change="search">
+ <el-option label="鍏ㄩ儴" value=""></el-option>
+ <el-option label="鍚敤" value="0"></el-option>
+ <el-option label="绂佺敤" value="1"></el-option>
+ </el-select>
+ </el-form-item>
<section>
<el-button type="primary" @click="search">鎼滅储</el-button>
<el-button @click="reset">閲嶇疆</el-button>
@@ -24,7 +31,7 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" :selectable="isChangeSelected" width="55"></el-table-column>
- <el-table-column prop="name" label="鍚嶇О" min-width="100px"></el-table-column>
+ <el-table-column prop="name" label="鍟嗕笟鍖栫被鍨�" min-width="100px"></el-table-column>
<el-table-column prop="icon" label="鎺掕姒滃浘闆�" min-width="220px">
<template slot-scope="{row}">
<div style="display: flex; flex-wrap: wrap;width: 200px;" v-if="row.fileList && row.fileList.length">
@@ -86,6 +93,7 @@
// 鎼滅储
searchForm: {
name: '',
+ status: '',
type: 1
}
}
diff --git a/admin/src/views/business/categoryField.vue b/admin/src/views/business/categoryField.vue
index 0b0b6bd..545234c 100644
--- a/admin/src/views/business/categoryField.vue
+++ b/admin/src/views/business/categoryField.vue
@@ -2,8 +2,15 @@
<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>
+ <el-form-item label="鐘舵��" prop="status">
+ <el-select v-model="searchForm.status" placeholder="璇烽�夋嫨鐘舵��" @change="search">
+ <el-option label="鍏ㄩ儴" value=""></el-option>
+ <el-option label="鍚敤" value="0"></el-option>
+ <el-option label="绂佺敤" value="1"></el-option>
+ </el-select>
</el-form-item>
<section>
<el-button type="primary" @click="search">鎼滅储</el-button>
@@ -24,7 +31,7 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" :selectable="isChangeSelected" width="55"></el-table-column>
- <el-table-column prop="name" label="鍚嶇О" min-width="100px"></el-table-column>
+ <el-table-column prop="name" label="鎿呴暱棰嗗煙" min-width="100px"></el-table-column>
<el-table-column label="鐘舵��">
<template slot-scope="{row}">
<el-switch :disabled="row.isFixed ==1" @change="changeStatus($event, row)" v-model="row.status" active-color="#13ce66"
@@ -44,7 +51,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>
@@ -74,6 +81,7 @@
// 鎼滅储
searchForm: {
name: '',
+ status: '',
type: 2
}
}
diff --git a/admin/src/views/business/categoryLevel.vue b/admin/src/views/business/categoryLevel.vue
index 5293c83..33b49d7 100644
--- a/admin/src/views/business/categoryLevel.vue
+++ b/admin/src/views/business/categoryLevel.vue
@@ -2,8 +2,15 @@
<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>
+ <el-form-item label="鐘舵��" prop="status">
+ <el-select v-model="searchForm.status" placeholder="璇烽�夋嫨鐘舵��" @change="search">
+ <el-option label="鍏ㄩ儴" value=""></el-option>
+ <el-option label="鍚敤" value="0"></el-option>
+ <el-option label="绂佺敤" value="1"></el-option>
+ </el-select>
</el-form-item>
<section>
<el-button type="primary" @click="search">鎼滅储</el-button>
@@ -24,7 +31,7 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" :selectable="isChangeSelected" width="55"></el-table-column>
- <el-table-column prop="name" label="鍚嶇О" min-width="100px"></el-table-column>
+ <el-table-column prop="name" label="鑰佸笀绛夌骇" min-width="100px"></el-table-column>
<el-table-column prop="icon" label="鍥炬爣" min-width="100px">
<template slot-scope="{row}">
<el-image v-if="row.iconFull" style="width: 50px; height: 50px; margin-right: 10px" :src="row.iconFull"
@@ -41,7 +48,7 @@
</template>
</el-table-column>
<el-table-column prop="remark" label="鎻忚堪" min-width="100px"></el-table-column>
- <el-table-column prop="sortnum" label="鎺掑簭鐮�" min-width="100px"></el-table-column>
+ <el-table-column prop="sortnum" label="绛夌骇椤哄簭" min-width="100px"></el-table-column>
<el-table-column prop="updateUserName" label="鎿嶄綔浜�" min-width="100px"></el-table-column>
<el-table-column prop="updateTime" label="鏈�杩戞搷浣滄椂闂�" min-width="150px"></el-table-column>
<el-table-column
@@ -52,7 +59,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>
@@ -82,6 +89,7 @@
// 鎼滅储
searchForm: {
name: '',
+ status: '',
type: 3
}
}
diff --git a/admin/src/views/business/member.vue b/admin/src/views/business/member.vue
index 25aca5a..87d15a3 100644
--- a/admin/src/views/business/member.vue
+++ b/admin/src/views/business/member.vue
@@ -3,15 +3,15 @@
<!-- 鎼滅储琛ㄥ崟 -->
<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-input v-model="searchForm.name" style="width: 180px" 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>
+ <el-input v-model="searchForm.code" style="width: 180px" placeholder="璇疯緭鍏ュ伐鍙�" @keypress.enter.native="search"></el-input>
</el-form-item>
<el-form-item label="鎴樺尯" prop="zhanquIds">
<el-select
v-model="searchForm.zhanquIds"
- style="width: 150px"
+ style="width: 180px"
placeholder="鎴樺尯"
clearable
@change="search"
@@ -27,10 +27,11 @@
<el-form-item label="鍟嗕笟鍖栫被鍨�" prop="bustypeIdList">
<el-select
v-model="searchForm.bustypeIdList"
- style="width: 150px"
+ style="width: 180px"
placeholder="鍟嗕笟鍖栫被鍨�"
clearable
multiple
+ collapse-tags
@change="search"
>
<el-option
@@ -44,9 +45,10 @@
<el-form-item label="鎿呴暱棰嗗煙" prop="fieldIdList">
<el-select
v-model="searchForm.fieldIdList"
- style="width: 150px"
+ style="width: 300px"
placeholder="鎿呴暱棰嗗煙"
clearable
+ collapse-tags
multiple
@change="search"
>
@@ -61,7 +63,7 @@
<el-form-item label="鑰佸笀绛夌骇" prop="levelId">
<el-select
v-model="searchForm.levelId"
- style="width: 150px"
+ style="width: 180px"
placeholder="鑰佸笀绛夌骇"
clearable
@change="search"
@@ -79,7 +81,7 @@
v-model="searchForm.status"
placeholder="鐘舵��"
clearable
- style="width: 150px"
+ style="width: 180px"
@change="search"
>
<el-option :key="0" :value="0" label="鍚敤"></el-option>
@@ -108,8 +110,8 @@
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column prop="imgurl" label="鍥剧墖" min-width="100px">
<template slot-scope="{row}">
- <el-image v-if="row.fullImgurl" style="width: 50px; height: 50px; margin-right: 10px" :src="row.fullImgurl"
- :preview-src-list="[row.fullImgurl]">
+ <el-image v-if="row.fullImgurl" style="width: 50px; margin-right: 10px" :src="row.fullImgurl"
+ :preview-src-list="[row.fullImgurl]">
</el-image>
</template>
</el-table-column>
@@ -155,7 +157,9 @@
<el-table-column prop="fieldNames" label="鎿呴暱棰嗗煙" min-width="200px">
<template slot-scope="{row}">
<div v-if="row.fieldList && row.fieldList.length">
- <div style="display:inline-block;" v-for="(item,index) in row.fieldList">{{item.name||''}} <span v-if="index < row.fieldList.length-1" style="display:inline-block;padding: 0px 3px;">/</span></div>
+ <div style="width: 190px; display: -webkit-box; -webkit-box-orient: vertical; line-clamp: 2; overflow: hidden;">
+ <template v-for="(item,index) in row.fieldList">{{item.name||''}} <template v-if="index < row.fieldList.length-1">/</template></template>
+ </div>
</div>
</template>
</el-table-column>
@@ -177,7 +181,7 @@
>
<template slot-scope="{row}">
<el-button type="text" @click="$refs.operaMemberWindow.open('缂栬緫鑰佸笀', row,searchForm.type)" icon="el-icon-edit" v-permissions="['business:member:update']">缂栬緫</el-button>
- <el-button type="text" @click="$refs.OperaCasesListWindow.open('鏌ョ湅鑰佸笀妗堜緥銆�'+row.name+'銆�', row.id)" icon="el-icon-open">妗堜緥</el-button>
+ <el-button type="text" @click="$refs.OperaCasesListWindow.open('鏌ョ湅鑰佸笀妗堜緥銆�'+row.name+'銆�', row.id)" icon="el-icon-picture-outline">妗堜緥</el-button>
<el-button type="text" style="color: red" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:member:delete']">鍒犻櫎</el-button>
</template>
</el-table-column>
diff --git a/admin/src/views/index.vue b/admin/src/views/index.vue
index 1a09910..5af7f66 100644
--- a/admin/src/views/index.vue
+++ b/admin/src/views/index.vue
@@ -1,7 +1,7 @@
<template>
<div class="main_home">
<div class="home_header">
- <div class="mb10 fs17">涓嬪崍濂斤紝{{ userInfo.realname }}</div>
+ <div class="mb10 fs17">{{getTimePeriod()}}锛寋{ userInfo.realname }}</div>
<div class="fs13">
浠婂ぉ鏄� {{ nowDate }} {{ nowWeek }}锛屾杩庤闂織閭︾偣灏嗗悗鍙扮鐞嗙郴缁�
</div>
@@ -49,6 +49,16 @@
// this.initData()
},
methods: {
+ getTimePeriod() {
+ const now = new Date()
+ const hours = now.getHours()
+
+ if (hours >= 0 && hours < 12) {
+ return '涓婂崍濂�'
+ } else {
+ return '涓嬪崍濂�'
+ }
+ },
updateDate () {
this.nowDate = dayjs().format('YYYY骞碝鏈圖鏃�')
this.nowWeek = weeks[new Date().getDay()]
diff --git a/admin/src/views/login.vue b/admin/src/views/login.vue
index 7503e88..989d283 100644
--- a/admin/src/views/login.vue
+++ b/admin/src/views/login.vue
@@ -121,17 +121,18 @@
if (dd.env.platform !== 'notInDingTalk') {
// 鍏堝垽鏂湴鍧�涓婃湁娌℃湁corpId
if (href.indexOf('?corpid=') !== -1) {
- alert('浠庡湴鍧�鎷縞orpid')
+ // 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')
+ // alert('浠庣紦瀛樻嬁corpid')
}
+ // dingulzemj5bynjciapg
dd.requestAuthCode({
corpId: corpId,
- clientId: 'dingulzemj5bynjciapg',
+ clientId: 'dingy7xdyzffnegiaszo',
onSuccess: function(result) {
loginByDingTalk({
code: result.code,
diff --git a/mini-program/App.vue b/mini-program/App.vue
index 4ca0850..751f532 100644
--- a/mini-program/App.vue
+++ b/mini-program/App.vue
@@ -4,12 +4,13 @@
var that = this
let href = window.location.href;
if (this.$dd.env.platform !== 'notInDingTalk') {
- console.log(href)
+ console.log('閽夐拤鎺堟潈鐧诲綍')
let corpId = href.substring(href.lastIndexOf('?corpid=') + 8, href.lastIndexOf('#'))
- console.log(corpId)
+ // dingy7xdyzffnegiaszo 姝e紡
+ // dingulzemj5bynjciapg 娴嬭瘯
this.$dd.requestAuthCode({
corpId: corpId,
- clientId: 'dingulzemj5bynjciapg',
+ clientId: 'dingy7xdyzffnegiaszo',
onSuccess: function(result) {
that.$u.api.ddLogin({
code: result.code,
@@ -23,6 +24,7 @@
}
});
} else if (href.indexOf('?token') !== -1) {
+ console.log('token鍏嶇櫥')
let token = href.substring(href.lastIndexOf('?token=') + 7, href.lastIndexOf('#'))
that.$store.commit('setToken', token)
that.$isResolve()
diff --git a/mini-program/components/kxj-previewImage/kxj-previewImage.vue b/mini-program/components/kxj-previewImage/kxj-previewImage.vue
new file mode 100644
index 0000000..23366a3
--- /dev/null
+++ b/mini-program/components/kxj-previewImage/kxj-previewImage.vue
@@ -0,0 +1,372 @@
+<template>
+ <view class="previewImage" :style="{ 'background-color': 'rgba(0,0,0,' + opacity + ')' }" v-if="show" @tap="close" @touchmove.stop.prevent>
+ <swiper class="swiper" :current="index" @change="swiperChange" :disable-touch="swiper" :circular="circular">
+ <swiper-item v-for="(img, i) in imgs" :key="'swiper-item-'+i" :id="'swiper-item-'+i">
+ <movable-area class="marea" scale-area>
+ <movable-view
+ :id="'movable-view-'+i"
+ :key="'movable-view-'+i"
+ class="mview"
+ direction="all"
+ :out-of-bounds="false"
+ :inertia="true"
+ damping="90"
+ friction="2"
+ scale="true"
+ scale-min="1"
+ scale-max="4"
+ :scale-value="scale"
+ @scale="onScale"
+ @change="movableChange"
+ >
+ <image
+ :id="'image-'+i"
+ :key="'movable-view'+i"
+ class="image"
+ :src="img"
+ :style="{ transform: 'rotateZ(' + deg + 'deg)' }"
+ :data-index="i"
+ :data-src="img"
+ mode="widthFix"
+ @touchmove="handletouchmove"
+ @touchstart="handletouchstart"
+ @touchend="handletouchend"
+ />
+ </movable-view>
+ </movable-area>
+ </swiper-item>
+ </swiper>
+ <view class="page" v-if="imgs.length > 0">
+ <text class="text">{{ index + 1 }} / {{ imgs.length }}</text>
+ </view>
+ <!-- <view class="save" v-if="saveBtn" @click.stop.prevent="save"><text class="text">淇濆瓨</text></view> -->
+ <!-- <view class="rotate" v-if="rotateBtn" @click.stop.prevent="rotate"><text class="text">鏃嬭浆</text></view> -->
+ <!-- <view class="desc" v-if="descs.length > 0 && descs.length == imgs.length && descs[index].length > 0">{{ descs[index] }}</view> -->
+ </view>
+</template>
+
+<script>
+export default {
+ name: 'ksj-previewImage', //鎻掍欢鍚嶇О
+ props: {
+ imgs: {
+ //鍥剧墖鍒楄〃
+ type: Array,
+ required: true,
+ default: () => {
+ return [];
+ }
+ },
+ descs: {
+ //鎻忚堪鍒楄〃
+ type: Array,
+ required: false,
+ default: () => {
+ return [];
+ }
+ },
+ //閫忔槑搴�,0鍒�1涔嬮棿銆�
+ opacity: {
+ type: Number,
+ default: 0.8
+ },
+ //淇濆瓨鎸夐敭
+ saveBtn: {
+ type: Boolean,
+ default: true
+ },
+ //鏃嬭浆鎸夐敭
+ rotateBtn: {
+ type: Boolean,
+ default: true
+ },
+ //寰幆棰勮
+ circular:{
+ type: Boolean,
+ default: false
+ }
+ },
+ data() {
+ return {
+ swiper:false,//鏄惁绂佺敤
+ show: false, //鏄剧ず鐘舵��
+ index: 0, //褰撳墠椤�
+ deg: 0, //鏃嬭浆瑙掑害
+ time: 0, //瀹氭椂鍣�
+ interval: 1000, //闀挎寜浜嬩欢
+ scale: 1 //缂╂斁姣斾緥
+ };
+ },
+ methods: {
+ //姣斾緥鍙樺寲
+ onScale(e) {
+
+ },
+
+ //闀挎寜浜嬩欢鐩稿叧鍐呭---------寮�濮�-------------------
+ //鎺ヨЕ寮�濮�
+ handletouchstart(e) {
+ var tchs = e.touches.length;
+ if (tchs != 1) {
+ return false;
+ }
+ this.time = setTimeout(() => {
+ this.onLongPress(e);
+ }, this.interval);
+ return false;
+ },
+ //娓呴櫎瀹氭椂鍣�
+ handletouchend() {
+ clearTimeout(this.time);
+ if (this.time != 0) {
+ //澶勭悊鐐瑰嚮鏃堕棿
+ }
+ return false;
+ },
+ //娓呴櫎瀹氭椂鍣�
+ handletouchmove() {
+ clearTimeout(this.time);
+ this.time = 0;
+ },
+ // 澶勭悊闀挎寜浜嬩欢
+ onLongPress(e) {
+ var src = e.currentTarget.dataset.src;
+ var index = e.currentTarget.dataset.index;
+ var data = { src: src, index: index };
+ this.$emit('longPress', data);
+ },
+ //闀挎寜浜嬩欢鐩稿叧鍐呭---------缁撴潫-------------------
+
+ //鍥剧墖鏀瑰彉
+ swiperChange(e) {
+ this.index = e.target.current; //鏇存柊褰撳墠鍥剧墖index
+
+ this.$nextTick(function() {
+ this.scale = 1;
+ })
+
+ //this.deg = 0; //鏃嬭浆瑙掑害
+ //this.swiper=true;
+ },
+
+ //绉诲姩鍙樺寲
+ movableChange(e) {
+ //console.log(e);
+ /* if(this.old.scale <= 1){
+ this.swiper=false;
+ }else if(e.detail.x===0){
+ this.swiper=false;
+ } */
+ },
+
+
+ //淇濆瓨
+ save(e) {
+ var _this = this;
+ var src = this.imgs[this.index];
+ //#ifdef MP-WEIXIN
+ //鎻愬墠鍚戠敤鎴峰彂璧锋巿鏉冭姹�
+ uni.authorize({
+ scope: 'scope.writePhotosAlbum',
+ success() {
+ console.log('kxj-previewImage:鍏佽鍌ㄥ瓨');
+ _this.downloadImg(src);
+ }
+ });
+ //#endif
+
+ //#ifdef APP-PLUS
+ this.downloadImg(src);
+ //#endif
+
+ //#ifdef H5
+ //闈炲悓婧愬浘鐗囧皢鐩存帴鎵撳紑
+ var abtn = document.createElement('a');
+ abtn.href = src;
+ abtn.download = '';
+ abtn.target = '_blank';
+ abtn.click();
+ //#endif
+ },
+
+ //涓嬭浇骞朵繚瀛樻枃浠�
+ downloadImg(src) {
+ //涓嬭浇鍥剧墖鏂囦欢
+ uni.showLoading({
+ title: '澶у浘鎻愬彇涓�'
+ });
+ uni.downloadFile({
+ url: src,
+ success: function(res) {
+ console.log('kxj-previewImage:涓嬭浇鎴愬姛');
+ uni.hideLoading();
+ uni.saveImageToPhotosAlbum({
+ filePath: res.tempFilePath,
+ success: () => {
+ uni.showToast({
+ title: '宸蹭繚瀛樿嚦鐩稿唽',
+ duration: 1000
+ });
+ }
+ });
+ },
+ fail: function() {
+ uni.hideLoading();
+ uni.showToast({
+ title: '鍥剧墖涓嬭浇澶辫触',
+ icon: 'none',
+ duration: 1000
+ });
+ }
+ });
+ },
+
+ //鏃嬭浆
+ rotate(e) {
+ this.deg = this.deg == 270 ? 0 : this.deg + 90;
+ },
+ //鎵撳紑
+ open(e) {
+ if (e === null || e === '') {
+ console.log('kxj-previewImage:鎵撳紑鍙傛暟鏃犳晥');
+ return;
+ }
+
+ if (!isNaN(e)) {
+ if(e>=this.imgs.length){
+ console.log('kxj-previewImage:鎵撳紑鍙傛暟鏃犳晥');
+ }else{
+ this.index = e;
+ }
+ } else {
+ var index = this.imgs.indexOf(e);
+ if(index===-1){
+ this.imgs = [e];
+ this.index = 0;
+ console.log('kxj-previewImage:鏈湪鍥剧墖鍦板潃鏁扮粍涓壘鍒颁紶鍏ョ殑鍥剧墖锛屽凡涓轰綘鑷姩鎵撳紑鍗曞紶棰勮妯″紡')
+ }else{
+ this.index = this.imgs.indexOf(e);
+ }
+ }
+ console.log('kxj-previewImage:褰撳墠棰勮鍥剧墖搴忓彿'+this.index);
+ this.show = true;
+ },
+ //鍏抽棴
+ close(e) {
+ this.show = false;
+ this.index = 0; //褰撳墠椤�
+ this.deg = 0; //鏃嬭浆瑙掑害
+ this.time = 0; //瀹氭椂鍣�
+ this.interval = 1000; //闀挎寜浜嬩欢
+ this.scale = 1; //缂╂斁姣斾緥
+ }
+ }
+};
+</script>
+
+<!--浣跨敤scss,鍙湪鏈粍浠剁敓鏁�-->
+<style lang="scss" scoped>
+.previewImage {
+ z-index: 999;
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: #000000;
+ user-select: none;
+ .swiper {
+ width: 100%;
+ height: 100%;
+ .marea {
+ height: 100%;
+ width: 100%;
+ position: fixed;
+ overflow: hidden;
+ .mview {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+ height: auto;
+ min-height: 100%;
+ .image {
+ width: 100%;
+ }
+ }
+ }
+ }
+
+ .page {
+ position: absolute;
+ width: 100%;
+ top: 20rpx;
+ text-align: center;
+ .text {
+ color: #fff;
+ font-size: 26rpx;
+ background-color: rgba(0, 0, 0, 0.5);
+ padding: 3rpx 16rpx;
+ border-radius: 20rpx;
+ user-select: none;
+ }
+ }
+ .save {
+ position: absolute;
+ left: 10rpx;
+ width: 120rpx;
+ height: 56rpx;
+ bottom: 10rpx;
+ text-align: center;
+ padding: 10rpx;
+ .text {
+ background-color: rgba(0, 0, 0, 0.5);
+ color: #fff;
+ font-size: 30rpx;
+ border-radius: 20rpx;
+ border: 1rpx solid #f1f1f1;
+ padding: 6rpx 22rpx;
+ user-select: none;
+ }
+ .text:active {
+ background-color: rgba(100, 100, 100, 0.5);
+ }
+ }
+ .rotate {
+ position: absolute;
+ right: 10rpx;
+ width: 120rpx;
+ height: 56rpx;
+ bottom: 10rpx;
+ text-align: center;
+ padding: 10rpx;
+ .text {
+ background-color: rgba(0, 0, 0, 0.5);
+ color: #fff;
+ font-size: 30rpx;
+ border-radius: 20rpx;
+ border: 1rpx solid #f1f1f1;
+ padding: 6rpx 22rpx;
+ user-select: none;
+ }
+ .text:active {
+ background-color: rgba(100, 100, 100, 0.5);
+ }
+ }
+ .desc {
+ position: absolute;
+ top: 0;
+ width: 100%;
+ padding: 5rpx 10rpx;
+ text-align: center;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ background-color: rgba(0, 0, 0, 0.5);
+ color: #fff;
+ font-size: 28rpx;
+ letter-spacing: 3rpx;
+ user-select: none;
+ }
+}
+</style>
diff --git a/mini-program/main.js b/mini-program/main.js
index 248d065..128f57d 100644
--- a/mini-program/main.js
+++ b/mini-program/main.js
@@ -5,7 +5,7 @@
import store from './store/index.js'
import * as dd from 'dingtalk-jsapi';
import { initDingH5RemoteDebug } from "dingtalk-h5-remote-debug";
-import vconsole from "vconsole";
+// import vconsole from "vconsole";
Vue.config.productionTip = false
App.mpType = 'app'
@@ -13,9 +13,10 @@
Vue.prototype.$isResolve = resolve
})
Vue.prototype.$dd = dd
-Vue.prototype.$baseUrl = 'https://test.doumee.cn/dianjiang_web_api/'
+// 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();
+Vue.prototype.$baseUrl = 'https://zbyj.zbom.com/dianjiang_web_api/'
+// Vue.prototype.vconsole = new vconsole();
initDingH5RemoteDebug();
diff --git a/mini-program/manifest.json b/mini-program/manifest.json
index 4f2bec6..8946893 100644
--- a/mini-program/manifest.json
+++ b/mini-program/manifest.json
@@ -1,5 +1,5 @@
{
- "name" : "mini-program",
+ "name" : "鐐瑰皢",
"appid" : "__UNI__438238C",
"description" : "",
"versionName" : "1.0.0",
@@ -72,7 +72,8 @@
"h5" : {
"router" : {
"mode" : "hash",
- "base" : "/h5/"
- }
+ "base" : "/dianjiang_h5/"
+ },
+ "title" : "鐐瑰皢"
}
}
diff --git a/mini-program/package.json b/mini-program/package.json
new file mode 100644
index 0000000..61b044e
--- /dev/null
+++ b/mini-program/package.json
@@ -0,0 +1,18 @@
+{
+ "id": "Easy-preview",
+ "name": "Easy-preview",
+ "displayName": "Easy-preview",
+ "version": "1.0",
+ "description": "鍥剧墖棰勮锛堟敮鎸佷笅杞藉埌鐩稿唽锛屾í灞忚嚜鍔ㄦ挱鏀撅紝缂╂斁 锛� ",
+ "keywords": [
+ "鍥剧墖棰勮",
+ "涓嬭浇鍒扮浉鍐�",
+ "缂╂斁"
+ ],
+ "dcloudext": {
+ "category": [
+ "鍓嶇缁勪欢",
+ "閫氱敤缁勪欢"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/mini-program/pages.json b/mini-program/pages.json
index 0f59744..dcd0bde 100644
--- a/mini-program/pages.json
+++ b/mini-program/pages.json
@@ -13,7 +13,7 @@
{
"path": "pages/details/details",
"style": {
- "navigationBarTitleText": "鐐硅禐鑰佸笀璇︽儏",
+ "navigationBarTitleText": "鐐瑰皢鑰佸笀璇︽儏",
"navigationStyle": "custom"
}
},
diff --git a/mini-program/pages/details/details.vue b/mini-program/pages/details/details.vue
index fd6c4b0..9e45ca8 100644
--- a/mini-program/pages/details/details.vue
+++ b/mini-program/pages/details/details.vue
@@ -47,10 +47,9 @@
<view class="card-title-xian"></view>
<text>鎿呴暱棰嗗煙</text>
</view>
- <view class="card-list" v-if="item.fieldList && item.fieldList.length > 0">
- <view class="card-list-item" v-for="(child, index) in item.fieldList" :key="index">
- <view class="card-list-item-title">{{child.name}}锛�</view>
- <view class="card-list-item-text">{{child.remark}}</view>
+ <view class="card-list">
+ <view class="card-list-item">
+ <text v-for="(child, index) in item.fieldList" :key="index">{{child.name}} <template v-if="item.fieldList.length- 1 !== index">銆�</template></text>
</view>
</view>
</view>
@@ -69,22 +68,27 @@
</view>
<view class="left-info">{{child.detail}}</view>
</view>
- <view class="right" v-if="child.fileList && child.fileList.length > 0" @click="yulan(index, child.fileList[0].url)">
+ <view class="right" v-if="child.fileList && child.fileList.length > 0" @click="yulan(child.fileList)">
<image :src="child.fileList[0].url" mode="widthFix"></image>
<view class="right-num">鍏眥{child.fileList.length}}寮�</view>
</view>
</view>
</view>
</view>
+ <previewImage ref="previewImage" :opacity="1" :circular="true" :imgs="imgs" />
</view>
</template>
<script>
+ import previewImage from '@/components/kxj-previewImage/kxj-previewImage.vue';
export default {
+ components: { previewImage}, //娉ㄥ唽鎻掍欢
data() {
return {
id: null,
item: null,
+
+ imgs: []
};
},
onLoad(option) {
@@ -92,11 +96,14 @@
this.getDetails()
},
methods: {
- yulan(index, url) {
- uni.previewImage({
- current: url,
- urls: this.item.casesList[index].fileList.map(item => item.url)
- })
+ yulan(arr) {
+ this.imgs = arr.map(item => item.url)
+ this.$refs.previewImage.open(this.imgs[0]);
+ // uni.previewImage({
+ // current: url,
+ // urls: this.item.casesList[index].fileList.map(item => item.url),
+ // indicator: 'number'
+ // })
},
zhankai() {
this.item.zhankai = !this.item.zhankai
@@ -112,13 +119,16 @@
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;
+ // let arr = []
+ // res.data.fieldList.forEach(item => {
+ // if (item.remark) {
+ // arr.push(item)
+ // }
+ // })
+ // res.data.fieldList = arr;
+ if (res.data.casesList) {
+ this.imageUrls = res.data.casesList.map(item => item.url)
+ }
this.item = res.data
}
})
@@ -243,12 +253,12 @@
align-items: center;
.item-info-c-item-label {
font-weight: 400;
- font-size: 24rpx;
+ font-size: 26rpx;
color: #777777;
}
.item-info-c-item-val {
font-weight: 400;
- font-size: 24rpx;
+ font-size: 26rpx;
color: #333333;
}
}
@@ -257,7 +267,7 @@
width: 100%;
line-height: 40rpx;
font-weight: 400;
- font-size: 24rpx;
+ font-size: 26rpx;
color: #333333;
margin-top: 20rpx;
text {
@@ -284,6 +294,7 @@
margin-right: 12rpx;
}
text {
+ line-height: 40rpx;
font-weight: 600;
font-size: 32rpx;
color: #222222;
@@ -362,21 +373,17 @@
width: 100%;
.card-list-item {
display: flex;
- flex-direction: column;
+ align-items: center;
+ flex-wrap: wrap;
margin-bottom: 30rpx;
+ line-height: 40rpx;
&:last-child {
margin: 0 !important;
}
- .card-list-item-title {
- font-weight: 500;
+ text {
+ font-weight: 400;
font-size: 28rpx;
color: #333333;
- margin-bottom: 15rpx;
- }
- .card-list-item-text {
- 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 fe99bf9..6e87813 100644
--- a/mini-program/pages/index/index.vue
+++ b/mini-program/pages/index/index.vue
@@ -14,9 +14,9 @@
</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>
+ <text :style="{ fontWeight: (view === 1 || form.bustypeIdList.length > 0) ? 'bold' : '', color: (view === 1 || form.bustypeIdList.length > 0) ? '#222222' : '' }">{{form.bustypeIdList.length > 0 ? 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_open_sel@2x.png" mode="widthFix" v-else-if="view !== 1 && form.bustypeIdList.length > 0"></image>
<image src="/static/ar_open7@2x.png" mode="widthFix" v-else></image>
</view>
<view class="cate-item" @click="clickRow(2)">
@@ -85,7 +85,8 @@
</view>
</view>
<view class="item-info-d" v-if="item.isShow">
- {{item.zhankai ? item.content : item.contentCopy}}<text @click.stop="zhankai(item)">{{item.zhankai ? '鏀惰捣' : '鏇村'}}</text>
+ <!-- @click.stop="zhankai(item)" -->
+ {{item.zhankai ? item.content : item.contentCopy}}<text>{{item.zhankai ? '鏀惰捣' : '鏇村'}}</text>
</view>
<view class="item-info-d" v-else>
{{item.content}}
@@ -108,7 +109,7 @@
orderByType: '',
orderByName: '',
fieldIdList: [],
- bustypeIds: '',
+ bustypeIdList: [],
bustypeName: '',
name: ''
},
@@ -146,7 +147,7 @@
orderByType: this.form.orderByType ? this.form.orderByType : 3,
orderByName: this.form.orderByName,
fieldIdList: this.form.fieldIdList,
- bustypeIds: this.form.bustypeIds,
+ bustypeIdList: this.form.bustypeIdList,
bustypeName: this.form.bustypeName,
name: this.form.name
}
@@ -176,7 +177,11 @@
},
clickSearch(i, type) {
if (type === 1) {
- this.form.bustypeIds = this.list1[i].id
+ if (this.list1[i].id) {
+ this.form.bustypeIdList = [this.list1[i].id]
+ } else {
+ this.form.bustypeIdList = []
+ }
this.form.bustypeName = this.list1[i].name
this.list1.forEach((item, index) => {
item.active = index === i
@@ -325,6 +330,7 @@
}
}
.item-info-b {
+ width: 80%;
display: flex;
flex-wrap: wrap;
align-items: center;
diff --git a/mini-program/static/logo.png b/mini-program/static/logo.png
deleted file mode 100644
index b5771e2..0000000
--- a/mini-program/static/logo.png
+++ /dev/null
Binary files differ
diff --git a/mini-program/utils/http.interceptor.js b/mini-program/utils/http.interceptor.js
index fbf20cc..2465db0 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'] = 'eyJhbGciOiJIUzUxMiJ9.eyJpZCI6IjE4MDU1MTU5NDUzIiwiZXhwIjoxNzcwMTg3MDgxfQ.xoNzXq98cZQEAlCO3UeJU6zn5obIdoCWxWLRJumlj4AAzVeBNQosrVfxZMBfYOAZKB7qBcM_4JiWlDCEyL8hrg';
- // }
+ const Headtoken = vm.$store.state.token
+ if (Headtoken) {
+ config.header['token'] = Headtoken;
+ }
return config
}, config => {
return Promise.reject(config)
--
Gitblit v1.9.3