diff --git a/.env.production b/.env.production
index a82490e..6133334 100644
--- a/.env.production
+++ b/.env.production
@@ -1,3 +1,3 @@
ENV = 'production'
-VUE_APP_BASE_API = 'hhttp://local.medical-record.host'
\ No newline at end of file
+VUE_APP_BASE_API = 'http://local.medical-record.host'
\ No newline at end of file
diff --git a/README.md b/README.md
index bfcab0b..a3f7ab8 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,3 @@
-# 宝芝堂-Uniapp
+# 宝芝堂-uniapp
-## dependencies
-
-- [uni-ajax](https://uniajax.ponjs.com)
-- [uview-ui](https://v1.uviewui.com)
+- `pnpm install`
diff --git a/package.json b/package.json
index ce1929c..96a3f3c 100644
--- a/package.json
+++ b/package.json
@@ -70,7 +70,6 @@
"@vue/shared": "^3.0.0",
"core-js": "^3.8.3",
"flyio": "^0.6.2",
- "uni-ajax": "^2.5.1",
"uview-ui": "^2.0.36",
"vue": ">= 2.6.14 < 2.7",
"vuex": "^3.2.0"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 8efebc5..a84e9d1 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -71,9 +71,6 @@ dependencies:
flyio:
specifier: ^0.6.2
version: 0.6.2
- uni-ajax:
- specifier: ^2.5.1
- version: 2.5.1
uview-ui:
specifier: ^2.0.36
version: 2.0.36
@@ -11177,10 +11174,6 @@ packages:
through: 2.3.8
dev: true
- /uni-ajax@2.5.1:
- resolution: {integrity: sha512-xmJY/yl5eRAb0b2qujTS1XNYhkSRWGL4PwkYqQrLpH2BMa2v/2zCJtqcTVUmqn4qQtdP3vLoFL86vaH3ABYAZA==}
- dev: false
-
/unicode-canonical-property-names-ecmascript@2.0.0:
resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==}
engines: {node: '>=4'}
diff --git a/public/.htaccess b/public/.htaccess
new file mode 100644
index 0000000..06c7d29
--- /dev/null
+++ b/public/.htaccess
@@ -0,0 +1,8 @@
+
+ RewriteEngine On
+ RewriteBase /h5/
+ RewriteRule ^index\.html$ - [L]
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteRule . /h5/index.html [L]
+
\ No newline at end of file
diff --git a/public/nginx.conf b/public/nginx.conf
new file mode 100644
index 0000000..fe21bdd
--- /dev/null
+++ b/public/nginx.conf
@@ -0,0 +1,4 @@
+location ^~ /h5/ {
+ root h5
+ try_files $uri $uri/ /index.html
+}
\ No newline at end of file
diff --git a/src/components/cu-editor.vue b/src/components/cu-editor.vue
index f2d49e4..c0ed94f 100644
--- a/src/components/cu-editor.vue
+++ b/src/components/cu-editor.vue
@@ -1,12 +1,82 @@
-
-
-
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+ {{ btn.name }}
+
+ {{ item.name }}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/select-admin-user.vue b/src/components/select-admin-user.vue
index 9c484a2..4cb213a 100644
--- a/src/components/select-admin-user.vue
+++ b/src/components/select-admin-user.vue
@@ -65,7 +65,8 @@ export default {
this.loading = true
this.status = 'loading'
// uni.showLoading()
- this.$ajax.get('/admin-api/system/admin_users', {_action: 'getData', page: this.page, perPage: this.perPage, keyword: this.search}).then(res => {
+ const params = {_action: 'getData', page: this.page, perPage: this.perPage, keyword: this.search}
+ this.$ajax.get('/admin-api/system/admin_users', { params }).then(res => {
this.loading = false
if (res.status == 0) {
this.list = this.list.concat(res.data.items)
diff --git a/src/main.js b/src/main.js
index 4d2c3e7..ee672f0 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,14 +1,11 @@
import Vue from 'vue'
import App from './App'
import './uni.promisify.adaptor'
-import ajax from '@/utils/ajax'
import uView from "uview-ui"
import { formatDate } from './utils/index'
Vue.config.productionTip = false
-Vue.prototype.$ajax = ajax
-
Vue.use(uView);
Vue.filter('date', function (value, format) {
if (!format) {
@@ -17,9 +14,15 @@ Vue.filter('date', function (value, format) {
return formatDate(value, format)
})
+Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
+
+require('@/utils/request.js')()
+
+Vue.prototype.$ajax = uni.$u.http
+
app.$mount()
diff --git a/src/manifest.json b/src/manifest.json
index 972bd1e..a0f8c92 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -1,66 +1,67 @@
{
- "name": "",
- "appid": "",
- "description": "",
- "versionName": "1.0.0",
- "versionCode": "100",
- "transformPx": false,
- "app-plus": { /* 5+App特有相关 */
- "usingComponents": true,
- "splashscreen": {
- "alwaysShowBeforeRender": true,
- "waiting": true,
- "autoclose": true,
- "delay": 0
- },
- "modules": { /* 模块配置 */
-
- },
- "distribute": { /* 应用发布信息 */
- "android": { /* android打包配置 */
- "permissions": ["",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- ""
- ]
- },
- "ios": { /* ios打包配置 */
-
- },
- "sdkConfigs": { /* SDK配置 */
-
- }
- }
- },
- "quickapp": { /* 快应用特有相关 */
-
- },
- "mp-weixin": { /* 微信小程序特有相关 */
- "appid": "",
- "setting": {
- "urlCheck": false
- },
- "usingComponents": true
- },
- "mp-alipay" : {
+ "name" : "宝芝堂",
+ "appid" : "__UNI__828F200",
+ "description" : "",
+ "versionName" : "1.0.0",
+ "versionCode" : "100",
+ "transformPx" : false,
+ "app-plus" : {
+ /* 5+App特有相关 */
+ "usingComponents" : true,
+ "splashscreen" : {
+ "alwaysShowBeforeRender" : true,
+ "waiting" : true,
+ "autoclose" : true,
+ "delay" : 0
+ },
+ "modules" : {},
+ /* 模块配置 */
+ "distribute" : {
+ /* 应用发布信息 */
+ "android" : {
+ /* android打包配置 */
+ "permissions" : [
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ]
+ },
+ "ios" : {},
+ /* ios打包配置 */
+ "sdkConfigs" : {}
+ }
+ },
+ /* SDK配置 */
+ "quickapp" : {},
+ /* 快应用特有相关 */
+ "mp-weixin" : {
+ /* 微信小程序特有相关 */
+ "appid" : "",
+ "setting" : {
+ "urlCheck" : false
+ },
+ "usingComponents" : true
+ },
+ "mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
@@ -71,5 +72,15 @@
},
"mp-qq" : {
"usingComponents" : true
+ },
+ "h5" : {
+ "title" : "宝芝堂",
+ "router" : {
+ "mode" : "history",
+ "base" : "/h5/"
+ },
+ "devServer" : {
+ "https" : false
+ }
}
}
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index ad3313e..61eca39 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -16,8 +16,9 @@
list: []
}
},
- onReady() {
- this.$ajax.get('/admin-api/category', {_action: 'getData'}).then(res => {
+ onLoad() {
+ const params = {_action: 'getData'}
+ this.$ajax.get('/admin-api/category', { params }).then(res => {
if (res.status == 0) {
this.list = res.data.items
}
diff --git a/src/pages/login/login.vue b/src/pages/login/login.vue
index 395a612..c98c330 100644
--- a/src/pages/login/login.vue
+++ b/src/pages/login/login.vue
@@ -30,7 +30,7 @@
-
+
@@ -117,22 +117,23 @@ export default {