diff --git a/components/htz-image-upload/htz-image-upload.vue b/components/htz-image-upload/htz-image-upload.vue
index caeba92..4678027 100644
--- a/components/htz-image-upload/htz-image-upload.vue
+++ b/components/htz-image-upload/htz-image-upload.vue
@@ -18,7 +18,7 @@
-
+
×
@@ -267,6 +267,18 @@
if (this.disabled) {
return false;
}
+
+ // 如果已有图片,先清空再选择新图片
+ if (this.uploadLists.length > 0) {
+ this.uploadLists = [];
+ // #ifndef VUE3
+ this.$emit("input", this.uploadLists);
+ // #endif
+ // #ifdef VUE3
+ this.$emit("update:modelValue", this.uploadLists);
+ // #endif
+ }
+
switch (this.mediaTypeData.indexOf(this.mediaType)) {
case 1: //视频
this.videoAdd();
@@ -758,6 +770,12 @@
width: 100%;
height: 100%;
border-radius: 10rpx;
+ cursor: pointer;
+ transition: opacity 0.3s ease;
+ }
+
+ .htz-image-upload-Item image:hover {
+ opacity: 0.8;
}
.htz-image-upload-Item-video {
@@ -833,4 +851,4 @@
width: 100%;
height: 100%;
}
-
+
diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json
index 2c02066..5e88797 100644
--- a/node_modules/.package-lock.json
+++ b/node_modules/.package-lock.json
@@ -1,8 +1,14 @@
{
- "name": "wx-dangyuanjiaoyujidi",
- "lockfileVersion": 2,
+ "name": "szgb-book-wx",
+ "lockfileVersion": 3,
"requires": true,
"packages": {
+ "node_modules/jweixin-module": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmmirror.com/jweixin-module/-/jweixin-module-1.6.0.tgz",
+ "integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w==",
+ "license": "ISC"
+ },
"node_modules/moment": {
"version": "2.29.3",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.3.tgz",
diff --git a/node_modules/jweixin-module/README.md b/node_modules/jweixin-module/README.md
new file mode 100644
index 0000000..7c91d7b
--- /dev/null
+++ b/node_modules/jweixin-module/README.md
@@ -0,0 +1,30 @@
+# jweixin-module
+
+微信JS-SDK
+
+## 安装
+
+### NPM
+
+```shell
+npm install jweixin-module --save
+```
+
+### UMD
+
+```http
+https://unpkg.com/jweixin-module/out/index.js
+```
+
+## 使用
+
+```js
+var jweixin = require('jweixin-module')
+jweixin.ready(function(){
+ // TODO
+});
+```
+
+## 完整API
+
+>[微信JS-SDK说明文档](https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115)
diff --git a/node_modules/jweixin-module/lib/index.js b/node_modules/jweixin-module/lib/index.js
new file mode 100644
index 0000000..1b5014b
--- /dev/null
+++ b/node_modules/jweixin-module/lib/index.js
@@ -0,0 +1 @@
+!function(e,n){"function"==typeof define&&(define.amd||define.cmd)?define(function(){return n(e)}):n(e,!0)}(window,function(o,e){if(!o.jWeixin){var n,c={config:"preVerifyJSAPI",onMenuShareTimeline:"menu:share:timeline",onMenuShareAppMessage:"menu:share:appmessage",onMenuShareQQ:"menu:share:qq",onMenuShareWeibo:"menu:share:weiboApp",onMenuShareQZone:"menu:share:QZone",previewImage:"imagePreview",getLocation:"geoLocation",openProductSpecificView:"openProductViewWithPid",addCard:"batchAddCard",openCard:"batchViewCard",chooseWXPay:"getBrandWCPayRequest",openEnterpriseRedPacket:"getRecevieBizHongBaoRequest",startSearchBeacons:"startMonitoringBeacons",stopSearchBeacons:"stopMonitoringBeacons",onSearchBeacons:"onBeaconsInRange",consumeAndShareCard:"consumedShareCard",openAddress:"editAddress"},a=function(){var e={};for(var n in c)e[c[n]]=n;return e}(),i=o.document,t=i.title,r=navigator.userAgent.toLowerCase(),s=navigator.platform.toLowerCase(),d=!(!s.match("mac")&&!s.match("win")),u=-1!=r.indexOf("wxdebugger"),l=-1!=r.indexOf("micromessenger"),p=-1!=r.indexOf("android"),f=-1!=r.indexOf("iphone")||-1!=r.indexOf("ipad"),m=(n=r.match(/micromessenger\/(\d+\.\d+\.\d+)/)||r.match(/micromessenger\/(\d+\.\d+)/))?n[1]:"",g={initStartTime:L(),initEndTime:0,preVerifyStartTime:0,preVerifyEndTime:0},h={version:1,appId:"",initTime:0,preVerifyTime:0,networkType:"",isPreVerifyOk:1,systemType:f?1:p?2:-1,clientVersion:m,url:encodeURIComponent(location.href)},v={},S={_completes:[]},y={state:0,data:{}};O(function(){g.initEndTime=L()});var I=!1,_=[],w={config:function(e){B("config",v=e);var t=!1!==v.check;O(function(){if(t)M(c.config,{verifyJsApiList:C(v.jsApiList),verifyOpenTagList:C(v.openTagList)},function(){S._complete=function(e){g.preVerifyEndTime=L(),y.state=1,y.data=e},S.success=function(e){h.isPreVerifyOk=0},S.fail=function(e){S._fail?S._fail(e):y.state=-1};var t=S._completes;return t.push(function(){!function(){if(!(d||u||v.debug||m<"6.0.2"||h.systemType<0)){var i=new Image;h.appId=v.appId,h.initTime=g.initEndTime-g.initStartTime,h.preVerifyTime=g.preVerifyEndTime-g.preVerifyStartTime,w.getNetworkType({isInnerInvoke:!0,success:function(e){h.networkType=e.networkType;var n="https://open.weixin.qq.com/sdk/report?v="+h.version+"&o="+h.isPreVerifyOk+"&s="+h.systemType+"&c="+h.clientVersion+"&a="+h.appId+"&n="+h.networkType+"&i="+h.initTime+"&p="+h.preVerifyTime+"&u="+h.url;i.src=n}})}}()}),S.complete=function(e){for(var n=0,i=t.length;n
-
+ /* H5地图iframe容器样式 */
+ .h5-map-container {
+ width: 100%;
+ height: 100vh;
+ position: relative;
+ background: #f5f5f5;
+ }
+
+ .h5-map-iframe {
+ width: 100%;
+ height: 100vh;
+ border: none;
+ display: block;
+ }
+
+ /* H5底部工具栏样式 */
+ .h5-map-toolbar {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ height: 230rpx;
+ background: #fff;
+ box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.1);
+ z-index: 999;
+ }
+
+ .toolbar-content {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 20rpx 30rpx;
+ height: 100%;
+ box-sizing: border-box;
+ }
+
+ .location-info {
+ flex: 1;
+ margin-right: 20rpx;
+ }
+
+ .location-name {
+ font-size: 32rpx;
+ font-weight: bold;
+ color: #333;
+ margin-bottom: 8rpx;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+
+ .location-address {
+ font-size: 26rpx;
+ color: #666;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+
+ .navigation-btn {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 100rpx;
+ height: 80rpx;
+ background: #007AFF;
+ border-radius: 12rpx;
+ box-shadow: 0 4rpx 12rpx rgba(0, 122, 255, 0.3);
+ transition: all 0.3s ease;
+ }
+
+ .navigation-btn:active {
+ transform: scale(0.95);
+ box-shadow: 0 2rpx 8rpx rgba(0, 122, 255, 0.4);
+ }
+
+ .nav-text {
+ font-size: 28rpx;
+ color: #fff;
+ font-weight: bold;
+ }
+
diff --git a/pages.json b/pages.json
index d506e64..5801664 100644
--- a/pages.json
+++ b/pages.json
@@ -16,37 +16,37 @@
{
"path": "pages/exhibit/index",
"style": {
- "navigationStyle": "custom",
+ "navigationStyle": "custom",
"enablePullDownRefresh": false
}
},{
"path": "pages/exhibit/list",
- "style": {
- "navigationBarTitleText": "展览",
- "enablePullDownRefresh": false,
+ "style": {
+ "navigationBarTitleText": "展览",
+ "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#fff"
}
},{
"path": "pages/exhibit/detail",
- "style": {
- "navigationBarTitleText": "展览",
- "enablePullDownRefresh": false,
+ "style": {
+ "navigationBarTitleText": "展览",
+ "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#fff"
}
},{
"path": "pages/exhibit/bookdetail",
- "style": {
- "navigationBarTitleText": "党史书籍",
- "enablePullDownRefresh": false,
+ "style": {
+ "navigationBarTitleText": "党史书籍",
+ "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#fff"
}
- },{
- "path": "pages/vr/index",
- "style": {
- "navigationStyle": "custom",
- "enablePullDownRefresh": false
- }
+ },{
+ "path": "pages/vr/index",
+ "style": {
+ "navigationStyle": "custom",
+ "enablePullDownRefresh": false
+ }
},{
"path": "pages/vr/vrpage",
"style": {
@@ -60,7 +60,7 @@
"style": {
"navigationBarTitleText": "服务",
"enablePullDownRefresh": false,
- "navigationBarBackgroundColor": "#fff",
+ "navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
}
@@ -108,20 +108,21 @@
}
}
- ],
- "subPackages":[{
- "root": "packages",
- "pages":[{
- "path": "dl/index",
- "style": {
- "navigationBarTitleText": "展厅导览",
- "enablePullDownRefresh": false,
- "navigationBarBackgroundColor": "#fff"
- }
+ ],
+ "subPackages":[{
+ "root": "packages",
+ "pages":[{
+ "path": "dl/index",
+ "style": {
+ "navigationBarTitleText": "展厅导览",
+ "enablePullDownRefresh": false,
+ "navigationBarBackgroundColor": "#fff"
+ }
}, {
"path": "map/map",
"style": {
"navigationBarTitleText": "展馆导航",
+ "navigationStyle": "custom",
"enablePullDownRefresh": false
}
@@ -202,8 +203,8 @@
"enablePullDownRefresh": false
}
- }]
- }
+ }]
+ }
],
"globalStyle": {
"navigationBarTextStyle": "black",
diff --git a/pages/mine/index.vue b/pages/mine/index.vue
index 05ee62b..2edd50b 100644
--- a/pages/mine/index.vue
+++ b/pages/mine/index.vue
@@ -5,7 +5,7 @@
-
+
@@ -78,7 +78,7 @@
@@ -104,7 +104,7 @@
@@ -168,6 +168,24 @@
});
},
methods: {
+ // 点击头像编辑个人信息
+ editProfile() {
+ // 填充当前用户信息到表单
+ this.form.name = this.info.nickname || '';
+ this.form.avatar = this.info.headimgurl || '';
+
+ // 设置头像列表
+ this.avatarList = [];
+ if (this.info.headimgurl) {
+ this.avatarList.push({
+ type: 0,
+ url: this.info.headimgurl
+ });
+ }
+
+ // 显示编辑弹窗
+ this.showAuthorization = true;
+ },
closeInfo() {
this.showAuthorization = false;
},
@@ -307,6 +325,11 @@
padding-left: 63rpx;
}
+ .user_avator {
+ cursor: pointer;
+ position: relative;
+ }
+
.user_info {
margin-left: 33rpx;
}
diff --git a/utils/util.js b/utils/util.js
index 370d997..19846f5 100755
--- a/utils/util.js
+++ b/utils/util.js
@@ -87,13 +87,15 @@ const getOpenidInfo = (cb, refresh) => {
// }
let user_info = uni.getStorageSync(user_info_key)
if (!isNull(user_info)) {
+ uni.showToast({ title: '已经有用户信息,故不进行登录', icon: 'success' })
cb(user_info)
return
}
// 判断运行环境:H5还是小程序
const isH5 = typeof window !== 'undefined' && window.location
const isWeixinBrowser = isH5 && /MicroMessenger/i.test(navigator.userAgent)
-
+ // uni.showToast({ title: 'isH5:'+isH5, icon: 'success' })
+ // uni.showToast({ title: 'isWeixinBrowser:'+isWeixinBrowser, icon: 'success' })
if (isH5 && isWeixinBrowser) {
// H5环境下的微信授权登录
wxH5AuthLogin(cb)
@@ -126,14 +128,14 @@ const wxH5AuthLogin = (cb) => {
let temp = decodeURIComponent((new RegExp('[?|&]' + 'code' + '=' + '([^&;]+?)(&|#|;|$)').exec(
link) || [, ''])[1].replace(/\+/g, '%20')) || null;
console.log("code", temp)
-
+ // uni.showToast({ title: '授权码:'+temp, icon: 'success' })
// 上传 code 到服务器获取 token
request({
api: `/api/mobile/user/wx-login?code=${temp}`,
method: 'GET',
utilSuccess: (res) => {
if (res.token && res.token.trim() !== '') {
- console.log('获取 token 成功:', res.token)
+ uni.showToast({ title: '登录成功', icon: 'success' })
// 保持与小程序登录一致的存储方式
const userInfo = {
token: res.token,
@@ -319,6 +321,8 @@ const request = options => {
options.utilFail('TODO: 特殊处理非200错误(' + res.statusCode + ')');
}
}
+ // 清除所有缓存,如果发生错误.
+ uni.clearStorageSync();
} else {
if (res.data.hasOwnProperty("errcode")) {
@@ -327,6 +331,9 @@ const request = options => {
} else {
options.utilFail(res.data.errmsg);
}
+
+ // 清除所有缓存,如果发生错误.
+ uni.clearStorageSync();
} else {
if (options.utilSuccess != undefined) {
options.utilSuccess(res.data);