提交 3ac79d95 编写于 作者: study夏羽's avatar study夏羽

update uni-share

上级 ee26a2ef
...@@ -7,5 +7,4 @@ package-lock.json ...@@ -7,5 +7,4 @@ package-lock.json
/uni_modules\uni-config-center\uniCloud\cloudfunctions\common\uni-config-center\uni-id\config.json /uni_modules\uni-config-center\uniCloud\cloudfunctions\common\uni-config-center\uni-id\config.json
/manifest.json /manifest.json
/env.js /env.js
/jest.config.js
/vue.config.js /vue.config.js
...@@ -8,11 +8,7 @@ module.exports = { ...@@ -8,11 +8,7 @@ module.exports = {
moduleFileExtensions: ['js', 'json'], moduleFileExtensions: ['js', 'json'],
rootDir: __dirname, rootDir: __dirname,
testMatch: ["<rootDir>/pages/**/*test.[jt]s?(x)"], testMatch: ["<rootDir>/pages/**/*test.[jt]s?(x)"],
// testMatch: ["<rootDir>/pages/ucenter/about/about.test.js"], // testMatch: ["<rootDir>/pages/ucenter/settings/settings.test.js"],
testPathIgnorePatterns: ['/node_modules/'], testPathIgnorePatterns: ['/node_modules/'],
testSequencer:path.join(__dirname, "testSequencer.js") testSequencer:path.join(__dirname, "testSequencer.js")
//pages/ucenter/userinfo/userinfo.test.js
//pages/ucenter/login-page/pwd-login/pwd-login.test.js
} }
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
</view> </view>
</template> </template>
<script> <script>
// #ifdef APP-PLUS // #ifdef APP
import UniShare from '@/uni_modules/uni-share/js_sdk/uni-share.js'; import UniShare from '@/uni_modules/uni-share/js_sdk/uni-share.js';
const uniShare = new UniShare() const uniShare = new UniShare()
// #endif // #endif
export default { export default {
// #ifdef APP-PLUS // #ifdef APP
onBackPress({from}) { onBackPress({from}) {
if(from=='backbutton'){ if(from=='backbutton'){
this.$nextTick(function(){ this.$nextTick(function(){
...@@ -41,7 +41,8 @@ ...@@ -41,7 +41,8 @@
}, },
computed: { computed: {
uniStarterConfig() { uniStarterConfig() {
return getApp({allowDefault: true}).globalData.config console.log(getApp());
return getApp().globalData.config
} }
}, },
data() { data() {
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
} from 'vuex'; } from 'vuex';
import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update'; import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update';
import callCheckVersion from '@/uni_modules/uni-upgrade-center-app/utils/call-check-version'; import callCheckVersion from '@/uni_modules/uni-upgrade-center-app/utils/call-check-version';
// #ifdef APP // #ifdef APP-PLUS
import UniShare from '@/uni_modules/uni-share/js_sdk/uni-share.js'; import UniShare from '@/uni_modules/uni-share/js_sdk/uni-share.js';
const uniShare = new UniShare() const uniShare = new UniShare()
// #endif // #endif
...@@ -149,7 +149,9 @@ ...@@ -149,7 +149,9 @@
// console.log(loginRes,'-------------'); // console.log(loginRes,'-------------');
// this.uniToken = loginRes.token // this.uniToken = loginRes.token
// console.log(313,this.userInfo,this.hasLogin); // console.log(313,this.userInfo,this.hasLogin);
//#ifdef APP-PLUS //#ifdef APP-PLUS
console.log(this.appVersion,"this.appVersion--------");
this.ucenterList[this.ucenterList.length - 2].unshift({ this.ucenterList[this.ucenterList.length - 2].unshift({
title:this.$t('mine.checkUpdate'),// this.this.$t('mine.checkUpdate')"检查更新" title:this.$t('mine.checkUpdate'),// this.this.$t('mine.checkUpdate')"检查更新"
rightText: this.appVersion.version + '-' + this.appVersion.versionCode, rightText: this.appVersion.version + '-' + this.appVersion.versionCode,
...@@ -324,7 +326,7 @@ ...@@ -324,7 +326,7 @@
"text": this.$t('common').wechatBbs, "text": this.$t('common').wechatBbs,
"share": { "share": {
"provider": "weixin", "provider": "weixin",
"scene": "WXSenceTimeline" "scene": "WXSceneTimeline"
} }
}, },
{ {
......
## 2.0.2(2021-12-16)
修复在某些情况下报:`Cannot read property 'hide' of undefined`的问题
## 2.0.1(2021-11-29)
修改错误的scene值WXSenceTimeline(分享到朋友圈)更正为WXSceneTimeline
## 2.0.0(2021-10-14) ## 2.0.0(2021-10-14)
支持监听返回操作(如:物理返回,全面屏手机侧滑)关闭分享弹窗 支持监听返回操作(如:物理返回,全面屏手机侧滑)关闭分享弹窗
## 1.0.6(2021-08-25) ## 1.0.6(2021-08-25)
......
...@@ -194,10 +194,11 @@ class NvImageMenu { ...@@ -194,10 +194,11 @@ class NvImageMenu {
} }
hide() { hide() {
if (this.isShow) {
nvMask.hide() nvMask.hide()
nvImageMenu.hide() nvImageMenu.hide()
this.isShow = false this.isShow = false
} }
}
} }
export default NvImageMenu export default NvImageMenu
\ No newline at end of file
{ {
"id": "uni-share", "id": "uni-share",
"displayName": "uni-share", "displayName": "uni-share",
"version": "2.0.0", "version": "2.0.2",
"description": "底部弹出宫格图标式的分享菜单,可覆盖原生组件。", "description": "底部弹出宫格图标式的分享菜单,可覆盖原生组件。",
"keywords": [ "keywords": [
"分享菜单" "分享菜单"
......
...@@ -7,6 +7,15 @@ ...@@ -7,6 +7,15 @@
<script> <script>
import uniShare from '@/uni_modules/uni-share/js_sdk/uni-share.js'; import uniShare from '@/uni_modules/uni-share/js_sdk/uni-share.js';
export default { export default {
onBackPress({from}) {
console.log(from);
if(from=='backbutton'){
this.$nextTick(function(){
uniShare.hide()
})
return uniShare.isShow;
}
},
methods: { methods: {
uniShare() { uniShare() {
uniShare.show({ uniShare.show({
...@@ -30,7 +39,7 @@ ...@@ -30,7 +39,7 @@
"text": "微信朋友圈", "text": "微信朋友圈",
"share": { "share": {
"provider": "weixin", "provider": "weixin",
"scene": "WXSenceTimeline" "scene": "WXSceneTimeline"
} }
}, },
{ {
...@@ -75,6 +84,7 @@ ...@@ -75,6 +84,7 @@
], ],
cancelText: "取消分享", cancelText: "取消分享",
}, e => { //callback }, e => { //callback
console.log(uniShare.isShow);
console.log(e); console.log(e);
}) })
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册