Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
一个会的不多的人
uni-starter
提交
48ade9e8
U
uni-starter
项目概览
一个会的不多的人
/
uni-starter
与 Fork 源项目一致
Fork自
DCloud / uni-starter
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-starter
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
48ade9e8
编写于
10月 14, 2021
作者:
DCloud_JSON
提交者:
study夏羽
11月 10, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
使用2.0版。当显示分享窗口时,监听返回操作(如:物理返回,全面屏手机侧滑)关闭分享窗口,而不是关闭当前页面。
上级
e2792f07
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
565 addition
and
544 deletion
+565
-544
README.md
README.md
+2
-1
changelog.md
changelog.md
+2
-0
manifest.json
manifest.json
+222
-270
package.json
package.json
+1
-1
pages/list/detail.vue
pages/list/detail.vue
+14
-6
pages/ucenter/about/about.vue
pages/ucenter/about/about.vue
+15
-6
pages/ucenter/ucenter.vue
pages/ucenter/ucenter.vue
+20
-12
uni_modules/uni-id-cf/uniCloud/cloudfunctions/uni-id-cf/index.js
...ules/uni-id-cf/uniCloud/cloudfunctions/uni-id-cf/index.js
+1
-1
uni_modules/uni-share/changelog.md
uni_modules/uni-share/changelog.md
+2
-0
uni_modules/uni-share/js_sdk/uni-image-menu.js
uni_modules/uni-share/js_sdk/uni-image-menu.js
+202
-168
uni_modules/uni-share/js_sdk/uni-share.js
uni_modules/uni-share/js_sdk/uni-share.js
+79
-77
uni_modules/uni-share/package.json
uni_modules/uni-share/package.json
+1
-1
uni_modules/uni-share/readme.md
uni_modules/uni-share/readme.md
+1
-1
uni_modules_tools/copy/manifest.json
uni_modules_tools/copy/manifest.json
+3
-0
未找到文件。
README.md
浏览文件 @
48ade9e8
...
...
@@ -142,6 +142,7 @@ uni-starter服务端使用[uni-config-center](https://ext.dcloud.net.cn/plugin?i
列举不需要强制登陆即可访问的页面完整路径(支持正则)
#### 配置示例
配置文件:
`项目根目录/uni-starter.config.js`
```
js
"
router
"
:
{
"
needLogin
"
:
[
...
...
@@ -303,7 +304,7 @@ uni-starter集成了这个功能,你只需直接在`项目根目录/uni-starte
-
而路由跳转方法不仅有
`uni.navigateTo`
还有
`uni.redirectTo`
,
`uni.reLaunch`
,
`uni.switchTab`
;
-
另外我们还希望控制直接跳转至哪种登陆类型
所以在uni-starter框架中我们这样定义:
>
uni-starter/common/appInit.js 的第228-280行
uni-starter/common/appInit.js 的第228-280行
```
js
const
{
"
router
"
:
{
needLogin
,
login
}
}
=
uniStarterConfig
//需要登录的页面
let
list
=
[
"
navigateTo
"
,
"
redirectTo
"
,
"
reLaunch
"
,
"
switchTab
"
];
...
...
changelog.md
浏览文件 @
48ade9e8
## 1.1.18(2021-10-14)
使用2.0版
`uni-share`
。当显示分享窗口时,监听返回操作(如:物理返回,全面屏手机侧滑)关闭分享窗口,而不是关闭当前页面。
## 1.1.17(2021-10-12)
-
更新文档
-
修复list页面where条件中缺少&符,导致的错误
...
...
manifest.json
浏览文件 @
48ade9e8
{
"name"
:
"统一应用基本项目"
,
"appid"
:
"__UNI__D53040B"
,
"description"
:
"云端一体应用快速开发模版"
,
"versionName"
:
"1.0.0"
,
"versionCode"
:
"100"
,
"transformPx"
:
false
,
"app-plus"
:
{
"locales"
:
{
"en"
:
{
//
英文
"name"
:
"uni-starter"
,
//
应用名称
"android"
:
{
"strings"
:
{
//Android平台自定义字符串
"CustomKey"
:
"CustomValue"
}
},
"ios"
:
{
"privacyDescription"
:
{
//iOS平台隐私访问描述信息
"NSPhotoLibraryUsageDescription"
:
"access to the user’s photo library(read)"
},
"infoPlist"
:
{
//iOS平台自定义InfoPlist.strings
"CustomKey"
:
"CustomValue"
}
}
},
"zh"
:
{
//
中文(简体)
"name"
:
"统一应用基本项目"
//
应用名称
}
},
"privacy"
:
{
"prompt"
:
"template"
,
"template"
:
{
"title"
:
"服务协议和隐私政策"
,
"message"
:
" 请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=
\"
https://ask.dcloud.net.cn/protocol.html
\"
>《服务协议》</a>和<a href=
\"
https://ask.dcloud.net.cn/protocol.html
\"
>《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。"
,
"buttonAccept"
:
"同意"
,
"buttonRefuse"
:
"暂不同意"
}
},
"compatible"
:
{
"ignoreVersion"
:
true
},
"usingComponents"
:
true
,
"nvueStyleCompiler"
:
"uni-app"
,
"compilerVersion"
:
3
,
"splashscreen"
:
{
"alwaysShowBeforeRender"
:
false
,
"waiting"
:
true
,
"autoclose"
:
true
,
"delay"
:
0
},
"modules"
:
{
"Fingerprint"
:
{},
"Share"
:
{},
"OAuth"
:
{},
"FaceID"
:
{},
"Geolocation"
:
{},
"Push"
:
{}
},
"distribute"
:
{
"android"
:
{
"permissions"
:
[
"<uses-feature android:name=
\"
android.hardware.camera
\"
/>"
,
"<uses-feature android:name=
\"
android.hardware.camera.autofocus
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CAMERA
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.FLASHLIGHT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MODIFY_AUDIO_SETTINGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MOUNT_UNMOUNT_FILESYSTEMS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_LOGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_PHONE_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.USE_FINGERPRINT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.VIBRATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WAKE_LOCK
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_SETTINGS
\"
/>"
],
"abiFilters"
:
[
"armeabi-v7a"
,
"arm64-v8a"
,
"x86"
]
},
"ios"
:
{
"capabilities"
:
{
"entitlements"
:
{
"com.apple.developer.associated-domains"
:
[
"applinks:static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com"
]
}
}
},
"sdkConfigs"
:
{
"oauth"
:
{
"apple"
:
{},
"weixin"
:
{
"appid"
:
""
,
"appsecret"
:
""
,
"UniversalLinks"
:
""
},
"univerify"
:
{}
},
"privacy"
:
{
"prompt"
:
"template"
,
"template"
:
{
"title"
:
"服务协议和隐私政策"
,
"message"
:
" 请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=
\"
https://ask.dcloud.net.cn/protocol.html
\"
>《服务协议》</a>和<a href=
\"
https://ask.dcloud.net.cn/protocol.html
\"
>《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。"
,
"buttonAccept"
:
"同意"
,
"buttonRefuse"
:
"暂不同意"
}
},
"compatible"
:
{
"ignoreVersion"
:
true
},
"usingComponents"
:
true
,
"nvueStyleCompiler"
:
"uni-app"
,
"compilerVersion"
:
3
,
"splashscreen"
:
{
"alwaysShowBeforeRender"
:
false
,
"waiting"
:
true
,
"autoclose"
:
true
,
"delay"
:
0
},
"modules"
:
{
"Fingerprint"
:
{},
"OAuth"
:
{},
"FaceID"
:
{},
"Push"
:
{},
"Geolocation"
:
{}
},
"distribute"
:
{
"android"
:
{
"permissions"
:
[
"<uses-feature android:name=
\"
android.hardware.camera
\"
/>"
,
"<uses-feature android:name=
\"
android.hardware.camera.autofocus
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CAMERA
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.FLASHLIGHT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MODIFY_AUDIO_SETTINGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MOUNT_UNMOUNT_FILESYSTEMS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_LOGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_PHONE_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.USE_FINGERPRINT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.VIBRATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WAKE_LOCK
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_SETTINGS
\"
/>"
],
"abiFilters"
:
[
"armeabi-v7a"
,
"arm64-v8a"
,
"x86"
]
},
"ios"
:
{
"capabilities"
:
{
"entitlements"
:
{
"com.apple.developer.associated-domains"
:
[
"applinks:static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com"
]
}
}
},
"sdkConfigs"
:
{
"oauth"
:
{
"apple"
:
{},
"univerify"
:
{}
},
"ad"
:
{},
"share"
:
{
"weixin"
:
{
"appid"
:
""
,
"UniversalLinks"
:
""
}
},
"geolocation"
:
{
"baidu"
:
{
"__platform__"
:
[
"ios"
,
"android"
],
"appkey_ios"
:
"请填写地图的key"
,
"appkey_android"
:
"请填写地图的key"
}
},
"push"
:
{
"unipush"
:
{}
},
"payment"
:
{}
},
"icons"
:
{
"android"
:
{
"hdpi"
:
""
,
"xhdpi"
:
""
,
"xxhdpi"
:
""
,
"xxxhdpi"
:
""
},
"ios"
:
{
"appstore"
:
""
,
"ipad"
:
{
"app"
:
""
,
"app@2x"
:
""
,
"notification"
:
""
,
"notification@2x"
:
""
,
"proapp@2x"
:
""
,
"settings"
:
""
,
"settings@2x"
:
""
,
"spotlight"
:
""
,
"spotlight@2x"
:
""
},
"iphone"
:
{
"app@2x"
:
""
,
"app@3x"
:
""
,
"notification@2x"
:
""
,
"notification@3x"
:
""
,
"settings@2x"
:
""
,
"settings@3x"
:
""
,
"spotlight@2x"
:
""
,
"spotlight@3x"
:
""
}
}
},
"splashscreen"
:
{
"iosStyle"
:
"common"
,
"androidStyle"
:
"common"
}
},
"nvueLaunchMode"
:
""
},
"quickapp"
:
{},
"mp-weixin"
:
{
"appid"
:
""
,
"setting"
:
{
"urlCheck"
:
false
,
"es6"
:
false
},
"usingComponents"
:
true
,
"betterScopedSlots"
:
true
,
"permission"
:
{
"scope.userLocation"
:
{
"desc"
:
"演示在onShow生命周期获取地理位置"
}
}
},
"mp-alipay"
:
{
"usingComponents"
:
true
},
"mp-baidu"
:
{
"usingComponents"
:
true
},
"mp-toutiao"
:
{
"usingComponents"
:
true
},
"uniStatistics"
:
{
"enable"
:
false
},
"h5"
:
{
"template"
:
""
,
"sdkConfigs"
:
{
"maps"
:
{
"qqmap"
:
{
"key"
:
""
}
}
}
},
"_spaceID"
:
""
,
"vueVersion"
:
"2"
}
}
"name"
:
"统一应用基本项目"
,
"appid"
:
"请点击重新获取"
,
"description"
:
"云端一体应用快速开发模版"
,
"versionName"
:
"1.0.0"
,
"versionCode"
:
"100"
,
"transformPx"
:
false
,
"app-plus"
:
{
"locales"
:
{
"en"
:
{
//
英文
"name"
:
"uni-starter"
,
//
应用名称
"android"
:
{
"strings"
:
{
//Android平台自定义字符串
"CustomKey"
:
"CustomValue"
}
},
"ios"
:
{
"privacyDescription"
:
{
//iOS平台隐私访问描述信息
"NSPhotoLibraryUsageDescription"
:
"access to the user’s photo library(read)"
},
"infoPlist"
:
{
//iOS平台自定义InfoPlist.strings
"CustomKey"
:
"CustomValue"
}
}
},
"zh"
:
{
//
中文(简体)
"name"
:
"统一应用基本项目"
//
应用名称
}
},
"privacy"
:
{
"prompt"
:
"template"
,
"template"
:
{
"title"
:
"服务协议和隐私政策"
,
"message"
:
" 请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=
\"
https://ask.dcloud.net.cn/protocol.html
\"
>《服务协议》</a>和<a href=
\"
https://ask.dcloud.net.cn/protocol.html
\"
>《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。"
,
"buttonAccept"
:
"同意"
,
"buttonRefuse"
:
"暂不同意"
}
},
"compatible"
:
{
"ignoreVersion"
:
true
},
"usingComponents"
:
true
,
"nvueStyleCompiler"
:
"uni-app"
,
"compilerVersion"
:
3
,
"splashscreen"
:
{
"alwaysShowBeforeRender"
:
false
,
"waiting"
:
true
,
"autoclose"
:
true
,
"delay"
:
0
},
"modules"
:
{
"Fingerprint"
:
{
},
"Share"
:
{
},
"OAuth"
:
{
},
"FaceID"
:
{
},
"Geolocation"
:
{
},
"Push"
:
{
}
},
"distribute"
:
{
"android"
:
{
"permissions"
:
[
"<uses-feature android:name=
\"
android.hardware.camera
\"
/>"
,
"<uses-feature android:name=
\"
android.hardware.camera.autofocus
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CAMERA
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.FLASHLIGHT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MODIFY_AUDIO_SETTINGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MOUNT_UNMOUNT_FILESYSTEMS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_LOGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_PHONE_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.USE_FINGERPRINT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.VIBRATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WAKE_LOCK
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_SETTINGS
\"
/>"
],
"abiFilters"
:
[
"armeabi-v7a"
,
"arm64-v8a"
,
"x86"
]
},
"ios"
:
{
"capabilities"
:
{
"entitlements"
:
{
"com.apple.developer.associated-domains"
:
[
"applinks:static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com"
]
}
}
},
"sdkConfigs"
:
{
"oauth"
:
{
"apple"
:
{
},
"weixin"
:
{
"appid"
:
""
,
"appsecret"
:
""
,
"UniversalLinks"
:
""
},
"univerify"
:
{
}
},
"ad"
:
{
},
"share"
:
{
"weixin"
:
{
"appid"
:
""
,
"UniversalLinks"
:
""
}
},
"geolocation"
:
{
"baidu"
:
{
"__platform__"
:
[
"ios"
,
"android"
],
"appkey_ios"
:
"请填写地图的key"
,
"appkey_android"
:
"请填写地图的key"
}
},
"push"
:
{
"unipush"
:
{
}
},
"payment"
:
{
}
},
"icons"
:
{
"android"
:
{
"hdpi"
:
""
,
"xhdpi"
:
""
,
"xxhdpi"
:
""
,
"xxxhdpi"
:
""
},
"ios"
:
{
"appstore"
:
""
,
"ipad"
:
{
"app"
:
""
,
"app@2x"
:
""
,
"notification"
:
""
,
"notification@2x"
:
""
,
"proapp@2x"
:
""
,
"settings"
:
""
,
"settings@2x"
:
""
,
"spotlight"
:
""
,
"spotlight@2x"
:
""
},
"iphone"
:
{
"app@2x"
:
""
,
"app@3x"
:
""
,
"notification@2x"
:
""
,
"notification@3x"
:
""
,
"settings@2x"
:
""
,
"settings@3x"
:
""
,
"spotlight@2x"
:
""
,
"spotlight@3x"
:
""
}
}
},
"splashscreen"
:
{
"iosStyle"
:
"common"
,
"androidStyle"
:
"common"
}
},
"nvueLaunchMode"
:
""
},
"quickapp"
:
{
},
"mp-weixin"
:
{
"appid"
:
""
,
"setting"
:
{
"urlCheck"
:
false
,
"es6"
:
false
},
"usingComponents"
:
true
,
"betterScopedSlots"
:
true
,
"permission"
:
{
"scope.userLocation"
:
{
"desc"
:
"演示在onShow生命周期获取地理位置"
}
}
},
"mp-alipay"
:
{
"usingComponents"
:
true
},
"mp-baidu"
:
{
"usingComponents"
:
true
},
"mp-toutiao"
:
{
"usingComponents"
:
true
},
"uniStatistics"
:
{
"enable"
:
false
},
"h5"
:
{
"template"
:
""
,
"sdkConfigs"
:
{
"maps"
:
{
"qqmap"
:
{
"key"
:
""
}
}
},
"router"
:
{
"base"
:
""
}
},
"_spaceID"
:
""
,
"vueVersion"
:
"2"
}
package.json
浏览文件 @
48ade9e8
{
"id"
:
"uni-starter"
,
"displayName"
:
"uni-starter"
,
"version"
:
"1.1.1
7
"
,
"version"
:
"1.1.1
8
"
,
"description"
:
"云端一体应用快速开发基本项目模版"
,
"keywords"
:
[
"login"
,
...
...
pages/list/detail.vue
浏览文件 @
48ade9e8
...
...
@@ -50,14 +50,22 @@
</template>
<
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
'
;
const
uniShare
=
new
UniShare
()
const
db
=
uniCloud
.
database
();
const
readNewsLog
=
db
.
collection
(
'
read-news-log
'
)
import
{
mapGetters
}
from
'
vuex
'
;
export
default
{
export
default
{
onBackPress
({
from
})
{
if
(
from
==
'
backbutton
'
){
this
.
$nextTick
(
function
(){
uniShare
.
hide
()
})
return
uniShare
.
isShow
;
}
},
data
()
{
return
{
// 当前显示 _id
...
...
@@ -196,8 +204,8 @@
title
,
excerpt
,
avatar
})
);
uniShare
({
})
);
uniShare
.
show
({
content
:
{
//公共的分享类型(type)、链接(herf)、标题(title)、summary(描述)、imageUrl(缩略图)
type
:
0
,
href
:
this
.
uniStarterConfig
.
h5
.
url
+
`/#/pages/list/detail?id=
${
_id
}
&title=
${
title
}
`
,
...
...
@@ -264,7 +272,7 @@
],
cancelText
:
this
.
$t
(
'
common
'
).
cancelShare
,
},
e
=>
{
//callback
// console.log(e);
console
.
log
(
e
);
})
},
}
...
...
pages/ucenter/about/about.vue
浏览文件 @
48ade9e8
...
...
@@ -19,8 +19,17 @@
</view>
</
template
>
<
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
'
;
const
uniShare
=
new
UniShare
()
export
default
{
onBackPress
({
from
})
{
if
(
from
==
'
backbutton
'
){
this
.
$nextTick
(
function
(){
uniShare
.
hide
()
})
return
uniShare
.
isShow
;
}
},
onLoad
()
{
// #ifdef APP-PLUS
this
.
version
=
plus
.
runtime
.
version
...
...
@@ -30,7 +39,7 @@
uniStarterConfig
()
{
console
.
log
(
getApp
());
return
getApp
().
globalData
.
config
}
}
},
data
()
{
return
{
...
...
@@ -53,7 +62,7 @@
slogan
,
logo
}
=
this
.
about
uniShare
({
uniShare
.
show
({
content
:
{
//公共的分享类型(type)、链接(herf)、标题(title)、summary(描述)、imageUrl(缩略图)
type
:
0
,
href
:
download
,
...
...
@@ -149,10 +158,10 @@
border-radius
:
15px
;
}
.tip
{
.tip
{
text-align
:
center
;
font-size
:
24rpx
;
margin-top
:
10px
;
margin-top
:
10px
;
padding
:
10rpx
;
}
...
...
@@ -191,4 +200,4 @@
color
:
#999999
;
font-size
:
26rpx
;
}
</
style
>
</
style
>
pages/ucenter/ucenter.vue
浏览文件 @
48ade9e8
...
...
@@ -37,10 +37,18 @@
}
from
'
vuex
'
;
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
u
niShare
from
'
@/uni_modules/uni-share/js_sdk/uni-share.js
'
;
// import pwdLogin from '../../common/toLogin.js';
import
U
niShare
from
'
@/uni_modules/uni-share/js_sdk/uni-share.js
'
;
const
uniShare
=
new
UniShare
()
const
db
=
uniCloud
.
database
();
export
default
{
onBackPress
({
from
})
{
if
(
from
==
'
backbutton
'
){
this
.
$nextTick
(
function
(){
uniShare
.
hide
()
})
return
uniShare
.
isShow
;
}
},
data
()
{
return
{
gridList
:
[{
...
...
@@ -120,13 +128,13 @@
"
style
"
:
"
solid
"
,
// 边框样式
"
radius
"
:
"
100%
"
// 边框圆角,支持百分比
}
},
},
uniToken
:
""
}
},
async
onLoad
()
{
// const loginRes = await pwdLogin()
// console.log(loginRes,'-------------');
async
onLoad
()
{
// const loginRes = await pwdLogin()
// console.log(loginRes,'-------------');
// this.uniToken = loginRes.token
// console.log(313,this.userInfo,this.hasLogin);
//#ifdef APP-PLUS
...
...
@@ -137,8 +145,8 @@
icon
:
'
loop
'
,
showBadge
:
this
.
appVersion
.
hasNew
})
//#endif
this
.
uniToken
=
uni
.
getStorageSync
(
'
uni_id_token
'
)
//#endif
this
.
uniToken
=
uni
.
getStorageSync
(
'
uni_id_token
'
)
console
.
log
(
"
uniToken:
"
,
this
.
uniToken
);
},
computed
:
{
...
...
@@ -224,7 +232,7 @@
/**
* 获取积分信息
*/
async
getScore
()
{
async
getScore
()
{
console
.
log
(
"
this.userInfo:-------------
"
,
this
.
userInfo
);
if
(
!
this
.
userInfo
)
return
uni
.
showToast
({
title
:
this
.
$t
(
'
mine.checkScore
'
),
...
...
@@ -247,10 +255,10 @@
uni
.
showToast
({
title
:
msg
,
icon
:
'
none
'
});
});
return
data
}).
finally
((
e
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
return
e
})
},
...
...
@@ -273,7 +281,7 @@
slogan
}
=
this
.
appConfig
.
about
// #ifdef APP-PLUS
uniShare
({
uniShare
.
show
({
content
:
{
//公共的分享类型(type)、链接(herf)、标题(title)、summary(描述)、imageUrl(缩略图)
type
:
0
,
href
:
this
.
appConfig
.
h5
.
url
+
...
...
uni_modules/uni-id-cf/uniCloud/cloudfunctions/uni-id-cf/index.js
浏览文件 @
48ade9e8
...
...
@@ -13,7 +13,7 @@ exports.main = async (event, context) => {
uniID
=
uniID
.
createInstance
({
context
})
console
.
log
(
'
event :
'
+
JSON
.
stringify
(
event
))
console
.
log
(
'
event :
'
+
JSON
.
stringify
(
event
))
/*
1.event为客户端 uniCloud.callFunction填写的data的值,这里介绍一下其中的属性
action:表示要执行的任务名称、比如:登陆login、退出登陆 logout等
...
...
uni_modules/uni-share/changelog.md
浏览文件 @
48ade9e8
## 2.0.0(2021-10-14)
支持监听返回操作(如:物理返回,全面屏手机侧滑)关闭分享弹窗
## 1.0.6(2021-08-25)
兼容vue3
## 1.0.5(2021-08-05)
...
...
uni_modules/uni-share/js_sdk/uni-image-menu.js
浏览文件 @
48ade9e8
var
nvMask
,
nvImageMenu
;
export
default
{
show
({
list
,
cancelText
},
callback
){
console
.
log
(
789789879
);
if
(
!
list
){
list
=
[{
"
img
"
:
"
/static/sharemenu/wechatfriend.png
"
,
"
text
"
:
"
图标文字
"
}]
}
//以下为计算菜单的nview绘制布局,为固定算法,使用者无关关心
var
screenWidth
=
plus
.
screen
.
resolutionWidth
//以360px宽度屏幕为例,上下左右边距及2排按钮边距留25像素,图标宽度55像素,同行图标间的间距在360宽的屏幕是30px,但需要动态计算,以此原则计算4列图标分别的left位置
//图标下的按钮文字距离图标5像素,文字大小12像素
//底部取消按钮高度固定为44px
//TODO 未处理横屏和pad,这些情况6个图标应该一排即可
var
margin
=
20
,
iconWidth
=
60
,
icontextSpace
=
5
,
textHeight
=
12
var
left1
=
margin
/
360
*
screenWidth
var
iconSpace
=
(
screenWidth
-
(
left1
*
2
)
-
(
iconWidth
*
4
))
/
3
//屏幕宽度减去左右留白间距,再减去4个图标的宽度,就是3个同行图标的间距
if
(
iconSpace
<=
5
)
{
//屏幕过窄时,缩小边距和图标大小,再算一次
margin
=
15
iconWidth
=
40
left1
=
margin
/
360
*
screenWidth
iconSpace
=
(
screenWidth
-
(
left1
*
2
)
-
(
iconWidth
*
4
))
/
3
//屏幕宽度减去左右留白间距,再减去4个图标的宽度,就是3个同行图标的间距
}
var
left2
=
left1
+
iconWidth
+
iconSpace
var
left3
=
left1
+
(
iconWidth
+
iconSpace
)
*
2
var
left4
=
left1
+
(
iconWidth
+
iconSpace
)
*
3
var
top1
=
left1
var
top2
=
top1
+
iconWidth
+
icontextSpace
+
textHeight
+
left1
const
TOP
=
{
top1
,
top2
},
LEFT
=
{
left1
,
left2
,
left3
,
left4
};
nvMask
=
new
plus
.
nativeObj
.
View
(
"
nvMask
"
,
{
//先创建遮罩层
top
:
'
0px
'
,
left
:
'
0px
'
,
height
:
'
100%
'
,
width
:
'
100%
'
,
backgroundColor
:
'
rgba(0,0,0,0.2)
'
});
nvMask
.
addEventListener
(
"
click
"
,
function
()
{
//处理遮罩层点击
nvMask
.
hide
();
nvImageMenu
.
hide
();
})
nvImageMenu
=
new
plus
.
nativeObj
.
View
(
"
nvImageMenu
"
,
{
//创建底部图标菜单
bottom
:
'
0px
'
,
left
:
'
0px
'
,
height
:
(
iconWidth
+
textHeight
+
2
*
margin
)
*
Math
.
ceil
(
list
.
length
/
4
)
+
44
+
'
px
'
,
//'264px',
width
:
'
100%
'
,
backgroundColor
:
'
rgb(255,255,255)
'
});
let
myList
=
[]
list
.
forEach
((
item
,
i
)
=>
{
myList
.
push
({
tag
:
'
img
'
,
src
:
item
.
img
,
position
:
{
top
:
TOP
[
'
top
'
+
(
parseInt
(
i
/
4
)
+
1
)],
left
:
LEFT
[
'
left
'
+
(
1
+
i
%
4
)],
width
:
iconWidth
,
height
:
iconWidth
}
})
myList
.
push
({
tag
:
'
font
'
,
text
:
item
.
text
,
textStyles
:
{
size
:
textHeight
},
position
:
{
top
:
TOP
[
'
top
'
+
(
parseInt
(
i
/
4
)
+
1
)]
+
iconWidth
+
icontextSpace
,
left
:
LEFT
[
'
left
'
+
(
1
+
i
%
4
)],
width
:
iconWidth
,
height
:
textHeight
}
})
})
//绘制底部图标菜单的内容
nvImageMenu
.
draw
([
{
tag
:
'
rect
'
,
//菜单顶部的分割灰线
color
:
'
#e7e7e7
'
,
position
:
{
top
:
'
0px
'
,
height
:
'
1px
'
}
},
{
tag
:
'
font
'
,
text
:
cancelText
,
//底部取消按钮的文字
textStyles
:
{
size
:
'
14px
'
},
position
:
{
bottom
:
'
0px
'
,
height
:
'
44px
'
}
},
{
tag
:
'
rect
'
,
//底部取消按钮的顶部边线
color
:
'
#e7e7e7
'
,
position
:
{
bottom
:
'
45px
'
,
height
:
'
1px
'
}
},
...
myList
])
var
nvMask
,
nvImageMenu
;
class
NvImageMenu
{
constructor
(
arg
)
{
this
.
isShow
=
false
}
show
({
list
,
cancelText
},
callback
)
{
if
(
!
list
)
{
list
=
[{
"
img
"
:
"
/static/sharemenu/wechatfriend.png
"
,
"
text
"
:
"
图标文字
"
}]
}
//以下为计算菜单的nview绘制布局,为固定算法,使用者无关关心
var
screenWidth
=
plus
.
screen
.
resolutionWidth
//以360px宽度屏幕为例,上下左右边距及2排按钮边距留25像素,图标宽度55像素,同行图标间的间距在360宽的屏幕是30px,但需要动态计算,以此原则计算4列图标分别的left位置
//图标下的按钮文字距离图标5像素,文字大小12像素
//底部取消按钮高度固定为44px
//TODO 未处理横屏和pad,这些情况6个图标应该一排即可
var
margin
=
20
,
iconWidth
=
60
,
icontextSpace
=
5
,
textHeight
=
12
var
left1
=
margin
/
360
*
screenWidth
var
iconSpace
=
(
screenWidth
-
(
left1
*
2
)
-
(
iconWidth
*
4
))
/
3
//屏幕宽度减去左右留白间距,再减去4个图标的宽度,就是3个同行图标的间距
if
(
iconSpace
<=
5
)
{
//屏幕过窄时,缩小边距和图标大小,再算一次
margin
=
15
iconWidth
=
40
left1
=
margin
/
360
*
screenWidth
iconSpace
=
(
screenWidth
-
(
left1
*
2
)
-
(
iconWidth
*
4
))
/
3
//屏幕宽度减去左右留白间距,再减去4个图标的宽度,就是3个同行图标的间距
}
var
left2
=
left1
+
iconWidth
+
iconSpace
var
left3
=
left1
+
(
iconWidth
+
iconSpace
)
*
2
var
left4
=
left1
+
(
iconWidth
+
iconSpace
)
*
3
var
top1
=
left1
var
top2
=
top1
+
iconWidth
+
icontextSpace
+
textHeight
+
left1
const
TOP
=
{
top1
,
top2
},
LEFT
=
{
left1
,
left2
,
left3
,
left4
};
nvMask
=
new
plus
.
nativeObj
.
View
(
"
nvMask
"
,
{
//先创建遮罩层
top
:
'
0px
'
,
left
:
'
0px
'
,
height
:
'
100%
'
,
width
:
'
100%
'
,
backgroundColor
:
'
rgba(0,0,0,0.2)
'
});
nvImageMenu
=
new
plus
.
nativeObj
.
View
(
"
nvImageMenu
"
,
{
//创建底部图标菜单
bottom
:
'
0px
'
,
left
:
'
0px
'
,
height
:
(
iconWidth
+
textHeight
+
2
*
margin
)
*
Math
.
ceil
(
list
.
length
/
4
)
+
44
+
'
px
'
,
//'264px',
width
:
'
100%
'
,
backgroundColor
:
'
rgb(255,255,255)
'
});
nvMask
.
addEventListener
(
"
click
"
,
()
=>
{
//处理遮罩层点击
// console.log('处理遮罩层点击');
this
.
hide
()
callback
({
event
:
"
clickMask
"
})
})
let
myList
=
[]
list
.
forEach
((
item
,
i
)
=>
{
myList
.
push
({
tag
:
'
img
'
,
src
:
item
.
img
,
position
:
{
top
:
TOP
[
'
top
'
+
(
parseInt
(
i
/
4
)
+
1
)],
left
:
LEFT
[
'
left
'
+
(
1
+
i
%
4
)],
width
:
iconWidth
,
height
:
iconWidth
}
})
myList
.
push
({
tag
:
'
font
'
,
text
:
item
.
text
,
textStyles
:
{
size
:
textHeight
},
position
:
{
top
:
TOP
[
'
top
'
+
(
parseInt
(
i
/
4
)
+
1
)]
+
iconWidth
+
icontextSpace
,
left
:
LEFT
[
'
left
'
+
(
1
+
i
%
4
)],
width
:
iconWidth
,
height
:
textHeight
}
})
})
//绘制底部图标菜单的内容
nvImageMenu
.
draw
([{
tag
:
'
rect
'
,
//菜单顶部的分割灰线
color
:
'
#e7e7e7
'
,
position
:
{
top
:
'
0px
'
,
height
:
'
1px
'
}
},
{
tag
:
'
font
'
,
text
:
cancelText
,
//底部取消按钮的文字
textStyles
:
{
size
:
'
14px
'
},
position
:
{
bottom
:
'
0px
'
,
height
:
'
44px
'
}
},
{
tag
:
'
rect
'
,
//底部取消按钮的顶部边线
color
:
'
#e7e7e7
'
,
position
:
{
bottom
:
'
45px
'
,
height
:
'
1px
'
}
},
...
myList
])
nvMask
.
show
()
nvImageMenu
.
show
()
//5+应支持从底部向上弹出的动画
nvImageMenu
.
addEventListener
(
"
click
"
,
e
=>
{
//处理底部图标菜单的点击事件,根据点击位置触发不同的逻辑
// console.log("click menu"+JSON.stringify(e));
if
(
e
.
screenY
>
plus
.
screen
.
resolutionHeight
-
44
)
{
//点击了底部取消按钮
nvMask
.
hide
();
nvImageMenu
.
hide
();
}
else
if
(
e
.
clientX
<
5
||
e
.
clientX
>
screenWidth
-
5
||
e
.
clientY
<
5
)
{
//屏幕左右边缘5像素及菜单顶部5像素不处理点击
}
else
{
//点击了图标按钮
var
iClickIndex
=
-
1
//点击的图标按钮序号,第一个图标按钮的index为0
var
iRow
=
e
.
clientY
<
(
top2
-
(
left1
/
2
))
?
0
:
1
var
iCol
=
-
1
if
(
e
.
clientX
<
(
left2
-
(
iconSpace
/
2
)))
{
iCol
=
0
}
else
if
(
e
.
clientX
<
(
left3
-
(
iconSpace
/
2
)))
{
iCol
=
1
}
else
if
(
e
.
clientX
<
(
left4
-
(
iconSpace
/
2
)))
{
iCol
=
2
}
else
{
iCol
=
3
}
if
(
iRow
==
0
)
{
iClickIndex
=
iCol
}
else
{
iClickIndex
=
iCol
+
4
}
// console.log("点击按钮的序号: " + iClickIndex);
// if (iClickIndex >= 0 && iClickIndex <= 5) { //处理具体的点击逻辑,此处也可以自行定义逻辑。如果增减了按钮,此处也需要跟着修改
// }
callback
(
iClickIndex
)
this
.
hide
()
}
})
/* nvImageMenu.addEventListener("touchstart", function(e) {
if (e.screenY > (plus.screen.resolutionHeight - 44)) {
//TODO 这里可以处理按下背景变灰的效果
}
})
nvImageMenu.addEventListener("touchmove", function(e) {
//TODO 这里可以处理按下背景变灰的效果
if (e.screenY > plus.screen.resolutionHeight - 44) {}
})
nvImageMenu.addEventListener("touchend", function(e) {
//TODO 这里可以处理释放背景恢复的效果
})
*/
},
hide
(){
nvMask
.
hide
()
nvImageMenu
.
hide
()
}
}
\ No newline at end of file
nvImageMenu
.
show
()
// 开始动画
/*
plus.nativeObj.View.startAnimation({
type: 'slide-in-bottom',
duration: 300
}, nvImageMenu, {}, function() {
console.log('plus.nativeObj.View.startAnimation动画结束');
// 关闭原生动画
plus.nativeObj.View.clearAnimation();
nvImageMenu.show()
});
*/
this
.
isShow
=
true
nvImageMenu
.
addEventListener
(
"
click
"
,
e
=>
{
//处理底部图标菜单的点击事件,根据点击位置触发不同的逻辑
// console.log("click menu"+JSON.stringify(e));
if
(
e
.
screenY
>
plus
.
screen
.
resolutionHeight
-
44
)
{
//点击了底部取消按钮
// callback({event:"clickCancelButton"})
this
.
hide
()
}
else
if
(
e
.
clientX
<
5
||
e
.
clientX
>
screenWidth
-
5
||
e
.
clientY
<
5
)
{
//屏幕左右边缘5像素及菜单顶部5像素不处理点击
}
else
{
//点击了图标按钮
var
iClickIndex
=
-
1
//点击的图标按钮序号,第一个图标按钮的index为0
var
iRow
=
e
.
clientY
<
(
top2
-
(
left1
/
2
))
?
0
:
1
var
iCol
=
-
1
if
(
e
.
clientX
<
(
left2
-
(
iconSpace
/
2
)))
{
iCol
=
0
}
else
if
(
e
.
clientX
<
(
left3
-
(
iconSpace
/
2
)))
{
iCol
=
1
}
else
if
(
e
.
clientX
<
(
left4
-
(
iconSpace
/
2
)))
{
iCol
=
2
}
else
{
iCol
=
3
}
if
(
iRow
==
0
)
{
iClickIndex
=
iCol
}
else
{
iClickIndex
=
iCol
+
4
}
// console.log("点击按钮的序号: " + iClickIndex);
// if (iClickIndex >= 0 && iClickIndex <= 5) { //处理具体的点击逻辑,此处也可以自行定义逻辑。如果增减了按钮,此处也需要跟着修改
// }
callback
({
event
:
"
clickMenu
"
,
index
:
iClickIndex
})
}
})
/* nvImageMenu.addEventListener("touchstart", function(e) {
if (e.screenY > (plus.screen.resolutionHeight - 44)) {
//TODO 这里可以处理按下背景变灰的效果
}
})
nvImageMenu.addEventListener("touchmove", function(e) {
//TODO 这里可以处理按下背景变灰的效果
if (e.screenY > plus.screen.resolutionHeight - 44) {}
})
nvImageMenu.addEventListener("touchend", function(e) {
//TODO 这里可以处理释放背景恢复的效果
})
*/
}
hide
()
{
nvMask
.
hide
()
nvImageMenu
.
hide
()
this
.
isShow
=
false
}
}
export
default
NvImageMenu
uni_modules/uni-share/js_sdk/uni-share.js
浏览文件 @
48ade9e8
import
uniImageMenu
from
'
./uni-image-menu.js
'
;
export
default
async
(
param
,
callback
)
=>
{
var
menus
=
[]
plus
.
share
.
getServices
(
services
=>
{
//只显示有服务的项目
services
=
services
.
filter
(
item
=>
item
.
nativeClient
)
// console.log("servicesList",services);
let
servicesList
=
services
.
map
(
e
=>
e
.
id
)
param
.
menus
.
forEach
(
item
=>
{
if
(
servicesList
.
includes
(
item
.
share
.
provider
)
||
typeof
(
item
.
share
)
==
'
string
'
)
{
menus
.
push
(
item
)
}
})
// console.log(menus);
uniImageMenu
.
show
({
list
:
menus
,
cancelText
:
param
.
cancelText
},
e
=>
{
if
(
typeof
(
menus
[
e
][
'
share
'
])
==
'
string
'
)
{
switch
(
menus
[
e
][
'
share
'
]){
case
"
copyurl
"
:
copyurl
()
break
;
case
"
shareSystem
"
:
shareSystem
()
break
;
default
:
console
.
error
(
'
未知事件名称:
'
+
menus
[
e
][
'
share
'
]);
break
;
import
UniImageMenu
from
'
./uni-image-menu.js
'
;
class
UniShare
extends
UniImageMenu
{
constructor
(
arg
)
{
super
()
this
.
isShow
=
super
.
isShow
}
async
show
(
param
,
callback
){
var
menus
=
[]
plus
.
share
.
getServices
(
services
=>
{
//只显示有服务的项目
services
=
services
.
filter
(
item
=>
item
.
nativeClient
)
let
servicesList
=
services
.
map
(
e
=>
e
.
id
)
param
.
menus
.
forEach
(
item
=>
{
if
(
servicesList
.
includes
(
item
.
share
.
provider
)
||
typeof
(
item
.
share
)
==
'
string
'
)
{
menus
.
push
(
item
)
}
}
else
{
console
.
log
(
123456
,{
...
param
.
content
,
...
menus
[
e
].
share
,
});
uni
.
share
({
...
param
.
content
,
...
menus
[
e
].
share
,
success
:
function
(
res
)
{
console
.
log
(
"
success:
"
+
JSON
.
stringify
(
res
));
},
fail
:
function
(
err
)
{
console
.
log
(
"
fail:
"
+
JSON
.
stringify
(
err
));
uni
.
showModal
({
content
:
JSON
.
stringify
(
err
),
showCancel
:
false
,
confirmText
:
"
知道了
"
});
},
complete
(
e
)
{
uniImageMenu
.
hide
()
callback
(
e
)
})
super
.
show
({
list
:
menus
,
cancelText
:
param
.
cancelText
},
e
=>
{
callback
(
e
)
if
(
e
.
event
==
'
clickMenu
'
){
if
(
typeof
(
menus
[
e
.
index
][
'
share
'
])
==
'
string
'
)
{
this
[
menus
[
e
.
index
][
'
share
'
]](
param
)
}
else
{
uni
.
share
({
...
param
.
content
,
...
menus
[
e
.
index
].
share
,
success
:
res
=>
{
console
.
log
(
"
success:
"
+
JSON
.
stringify
(
res
));
super
.
hide
()
},
fail
:
function
(
err
)
{
console
.
log
(
"
fail:
"
+
JSON
.
stringify
(
err
));
uni
.
showModal
({
content
:
JSON
.
stringify
(
err
),
showCancel
:
false
,
confirmText
:
"
知道了
"
});
}
})
}
})
}
}
})
},
err
=>
{
uni
.
showModal
({
title
:
'
获取服务供应商失败:
'
+
JSON
.
stringify
(
err
),
showCancel
:
false
,
confirmText
:
'
知道了
'
});
console
.
error
(
'
获取服务供应商失败:
'
+
JSON
.
stringify
(
err
));
})
},
err
=>
{
uni
.
showModal
({
title
:
'
获取服务供应商失败:
'
+
JSON
.
stringify
(
err
),
showCancel
:
false
,
confirmText
:
'
知道了
'
});
console
.
error
(
'
获取服务供应商失败:
'
+
JSON
.
stringify
(
err
));
})
function
copyurl
()
{
}
hide
(){
super
.
hide
()
}
copyurl
(
param
)
{
console
.
log
(
'
copyurl
'
,
param
);
uni
.
setClipboardData
({
data
:
param
.
content
.
href
,
success
:
function
()
{
success
:
()
=>
{
console
.
log
(
'
success
'
);
uni
.
hideToast
()
//关闭自带的toast
uni
.
hideToast
()
//关闭自带的toast
uni
.
showToast
({
title
:
'
复制成功
'
,
icon
:
'
none
'
});
super
.
hide
();
},
fail
:
(
err
)
=>
{
uni
.
showModal
({
...
...
@@ -77,20 +73,26 @@ export default async (param,callback) => {
showCancel
:
false
});
}
});
}
// 使用系统分享发送分享消息
function
shareSystem
()
{
plus
.
share
.
sendWithSystem
({
type
:
'
text
'
,
});
}
// 使用系统分享发送分享消息
shareSystem
(
param
)
{
console
.
log
(
'
shareSystem
'
,
param
);
plus
.
share
.
sendWithSystem
({
type
:
'
text
'
,
content
:
param
.
content
.
title
+
param
.
content
.
summary
||
''
,
href
:
param
.
content
.
href
,
},
function
(
e
)
{
href
:
param
.
content
.
href
,
},
(
e
)
=>
{
console
.
log
(
'
分享成功
'
);
callback
(
e
)
},
function
(
e
)
{
console
.
log
(
'
分享失败:
'
+
JSON
.
stringify
(
e
));
callback
(
e
)
});
}
}
\ No newline at end of file
super
.
hide
()
},
(
err
)
=>
{
console
.
log
(
'
分享失败:
'
+
JSON
.
stringify
(
err
));
uni
.
showModal
({
title
:
'
获取服务供应商失败:
'
+
JSON
.
stringify
(
err
),
showCancel
:
false
,
confirmText
:
'
知道了
'
});
});
}
}
export
default
UniShare
\ No newline at end of file
uni_modules/uni-share/package.json
浏览文件 @
48ade9e8
{
"id"
:
"uni-share"
,
"displayName"
:
"uni-share"
,
"version"
:
"
1.0.6
"
,
"version"
:
"
2.0.0
"
,
"description"
:
"底部弹出宫格图标式的分享菜单,可覆盖原生组件。"
,
"keywords"
:
[
"分享菜单"
...
...
uni_modules/uni-share/readme.md
浏览文件 @
48ade9e8
...
...
@@ -9,7 +9,7 @@
export default {
methods: {
uniShare() {
uniShare({
uniShare
.show
({
content: { //公共的分享参数配置 类型(type)、链接(herf)、标题(title)、summary(描述)、imageUrl(缩略图)
type: 0,
href: 'https://uniapp.dcloud.io/',
...
...
uni_modules_tools/copy/manifest.json
浏览文件 @
48ade9e8
...
...
@@ -193,6 +193,9 @@
"key"
:
""
}
}
},
"router"
:
{
"base"
:
""
}
},
"_spaceID"
:
"76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录