From 3845c70bd7ce578b65522ad020a8dc524316b4d4 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期一, 02 二月 2026 15:52:18 +0800
Subject: [PATCH] 优化
---
mini-program/pages/index/index.vue | 2 +-
mini-program/unpackage/dist/build/.automator/h5/.automator.json | 0
mini-program/App.vue | 24 +++++++++++++++---------
mini-program/utils/http.interceptor.js | 8 ++++----
mini-program/pages/details/details.vue | 2 +-
admin/public/template/cases.xlsx | 0
admin/package-lock.json | 2 +-
mini-program/manifest.json | 8 +++++++-
admin/.env.development | 2 +-
mini-program/main.js | 2 +-
10 files changed, 31 insertions(+), 19 deletions(-)
diff --git a/admin/.env.development b/admin/.env.development
index 0c1e283..36a6f04 100644
--- a/admin/.env.development
+++ b/admin/.env.development
@@ -1,3 +1,3 @@
# 寮�鍙戠幆澧冮厤缃�
NODE_ENV = 'development'
-VUE_APP_API_URL = 'http://localhost:11010'
+VUE_APP_API_URL = 'http://192.168.0.7/dianjiang_admin_api/'
diff --git a/admin/package-lock.json b/admin/package-lock.json
index 819bb36..3c49af0 100644
--- a/admin/package-lock.json
+++ b/admin/package-lock.json
@@ -1,5 +1,5 @@
{
- "name": "jinkuai",
+ "name": "zbom_dianjiang",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
diff --git a/admin/public/template/casees.xlsx b/admin/public/template/cases.xlsx
similarity index 100%
rename from admin/public/template/casees.xlsx
rename to admin/public/template/cases.xlsx
Binary files differ
diff --git a/mini-program/App.vue b/mini-program/App.vue
index ab5c777..a425727 100644
--- a/mini-program/App.vue
+++ b/mini-program/App.vue
@@ -2,24 +2,30 @@
export default {
onLaunch: function() {
var that = this
- console.log('App Launch')
- console.log(this.$dd)
- console.log(this.$dd.env.platform)
+ let href = window.location.href;
if (this.$dd.env.platform !== 'notInDingTalk') {
- let href = window.location.href;
+ let corpId = href.substring(href.lastIndexOf('?corpid=') + 8, href.length)
this.$dd.requestAuthCode({
corpId: 'dingulzemj5bynjciapg',
clientId: 'dingulzemj5bynjciapg',
onSuccess: function(result) {
that.$u.api.ddLogin({
- code: '',
- corpId: ''
+ code: result.code,
+ corpId: corpId
+ }).then(res => {
+ if (res.code === 200) {
+ that.$store.commit('setToken', res.data.token)
+ this.$isResolve()
+ }
})
- },
- onFail: function(err) {
- console.log(err)
}
});
+ } else if (href.indexOf('?token') !== -1) {
+ let token = href.substring(href.lastIndexOf('?token=') + 7, href.length)
+ that.$store.commit('setToken', token)
+ this.$isResolve()
+ } else {
+ this.$isResolve()
}
},
onShow: function() {
diff --git a/mini-program/main.js b/mini-program/main.js
index 5be14e2..594681c 100644
--- a/mini-program/main.js
+++ b/mini-program/main.js
@@ -12,7 +12,7 @@
Vue.prototype.$isResolve = resolve
})
Vue.prototype.$dd = dd
-Vue.prototype.$baseUrl = 'http://192.168.1.40:10011/'
+Vue.prototype.$baseUrl = 'http://192.168.0.7/dianjiang_web_api/'
initDingH5RemoteDebug();
diff --git a/mini-program/manifest.json b/mini-program/manifest.json
index c0a0b87..4f2bec6 100644
--- a/mini-program/manifest.json
+++ b/mini-program/manifest.json
@@ -68,5 +68,11 @@
"uniStatistics" : {
"enable" : false
},
- "vueVersion" : "2"
+ "vueVersion" : "2",
+ "h5" : {
+ "router" : {
+ "mode" : "hash",
+ "base" : "/h5/"
+ }
+ }
}
diff --git a/mini-program/pages/details/details.vue b/mini-program/pages/details/details.vue
index b5ce598..b7ec49c 100644
--- a/mini-program/pages/details/details.vue
+++ b/mini-program/pages/details/details.vue
@@ -36,7 +36,7 @@
<view class="item-info-d" v-else>
{{item.content}}
</view>
- <view class="item-info-price">
+ <view class="item-info-price" v-if="item.fee">
<text>鏍囧噯鏀惰垂</text>
<text>{{item.fee}}</text>
</view>
diff --git a/mini-program/pages/index/index.vue b/mini-program/pages/index/index.vue
index fac27dc..fbbd5da 100644
--- a/mini-program/pages/index/index.vue
+++ b/mini-program/pages/index/index.vue
@@ -92,7 +92,7 @@
<view class="item-info-d" v-else>
{{item.content}}
</view>
- <view class="item-info-price">
+ <view class="item-info-price" v-if="item.fee">
<text>鏍囧噯鏀惰垂</text>
<text>{{item.fee}}</text>
</view>
diff --git a/mini-program/unpackage/dist/build/.automator/h5/.automator.json b/mini-program/unpackage/dist/build/.automator/h5/.automator.json
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/mini-program/unpackage/dist/build/.automator/h5/.automator.json
diff --git a/mini-program/utils/http.interceptor.js b/mini-program/utils/http.interceptor.js
index b4ff8d6..2235243 100644
--- a/mini-program/utils/http.interceptor.js
+++ b/mini-program/utils/http.interceptor.js
@@ -8,10 +8,10 @@
// 璇锋眰鎷︽埅鍣�
uni.$u.http.interceptors.request.use((config) => {
- // const Headtoken = vm.$store.state.token
- // if (Headtoken) {
- config.header['token'] = 'eyJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEyMyIsImV4cCI6MTc2OTczODQwNn0.WcGv4N47h6X87vVKtiXW4bSsfDIqRNAqZFdpDkbY1vJDjrn6H6ioQVhjNJDF3OAGO16tkvX4MTgXkbiyW40v1Q';
- // }
+ const Headtoken = vm.$store.state.token
+ if (Headtoken) {
+ config.header['token'] = Headtoken;
+ }
return config
}, config => {
return Promise.reject(config)
--
Gitblit v1.9.3