提交 96ee1e99 编写于 作者: Anne_LXM's avatar Anne_LXM

static下的app-plus改为app

上级 25fedfb9
......@@ -4,15 +4,15 @@
<image class="logoImg" :src="about.logo"></image>
<text class="tip appName">{{about.appName}}</text>
<text class="tip">Version {{version}}</text>
<view class="qrcode">
<!--uqrcode 组件来源,插件Sansnn-uQRCode 链接地址:https://ext.dcloud.net.cn/plugin?id=1287-->
<uqrcode :size="100" canvas-id="qrcode" :value="about.download"></uqrcode>
</view>
<view class="qrcode">
<!--uqrcode 组件来源,插件Sansnn-uQRCode 链接地址:https://ext.dcloud.net.cn/plugin?id=1287-->
<uqrcode :size="100" canvas-id="qrcode" :value="about.download"></uqrcode>
</view>
<text class="tip">{{$t('about.sacnQR')}} {{about.appName}} {{$t('about.client')}}</text>
</view>
<view class="copyright">
<view class="agreement-box" v-for="(agreement,index) in agreements" :key="index">
<view class="copyright">
<view class="agreement-box" v-for="(agreement,index) in agreements" :key="index">
<text class="agreement" @click="navigateTo(agreement)">{{agreement.title}}</text>
<text class="hint" v-if="agreements.length-1>index">{{$t('about.and')}}</text>
</view>
......@@ -22,25 +22,25 @@
</view>
</template>
<script>
// #ifdef APP
import UniShare from '@/uni_modules/uni-share/js_sdk/uni-share.js';
const uniShare = new UniShare()
// #endif
import uniIdPagesConfig from '@/uni_modules/uni-id-pages/config.js';
import uqrcode from "@/uni_modules/Sansnn-uQRCode/components/uqrcode/uqrcode"
export default {
components:{
uqrcode
},
// #ifdef APP
onBackPress({from}) {
if(from=='backbutton'){
this.$nextTick(function(){
uniShare.hide()
})
return uniShare.isShow;
}
},
// #ifdef APP
import UniShare from '@/uni_modules/uni-share/js_sdk/uni-share.js';
const uniShare = new UniShare()
// #endif
import uniIdPagesConfig from '@/uni_modules/uni-id-pages/config.js';
import uqrcode from "@/uni_modules/Sansnn-uQRCode/components/uqrcode/uqrcode"
export default {
components:{
uqrcode
},
// #ifdef APP
onBackPress({from}) {
if(from=='backbutton'){
this.$nextTick(function(){
uniShare.hide()
})
return uniShare.isShow;
}
},
// #endif
onLoad() {
// #ifdef APP-PLUS
......@@ -50,22 +50,22 @@
computed: {
uniStarterConfig() {
return getApp().globalData.config
},
agreements() {
if(!uniIdPagesConfig.agreements){
return []
}
let {serviceUrl,privacyUrl} = uniIdPagesConfig.agreements
return [
{
url:serviceUrl,
title:"用户服务协议"
},
{
url:privacyUrl,
title:"隐私政策条款"
}
]
},
agreements() {
if(!uniIdPagesConfig.agreements){
return []
}
let {serviceUrl,privacyUrl} = uniIdPagesConfig.agreements
return [
{
url:serviceUrl,
title:"用户服务协议"
},
{
url:privacyUrl,
title:"隐私政策条款"
}
]
}
},
data() {
......@@ -80,7 +80,7 @@
uni.setNavigationBarTitle({
title: this.$t('about.about')+ " " + this.about.appName
})
this.year = (new Date).getFullYear()
this.year = (new Date).getFullYear()
},
onNavigationBarButtonTap() {
let {
......@@ -98,7 +98,7 @@
imageUrl: logo + '?x-oss-process=image/resize,m_fill,h_100,w_100' //压缩图片解决,在ios端分享图过大导致的图片失效问题
},
menus: [{
"img": "/static/app-plus/sharemenu/wechatfriend.png",
"img": "/static/app/sharemenu/wechatfriend.png",
"text": this.$t('common.wechatFriends'),
"share": {
"provider": "weixin",
......@@ -106,7 +106,7 @@
}
},
{
"img": "/static/app-plus/sharemenu/wechatmoments.png",
"img": "/static/app/sharemenu/wechatmoments.png",
"text": this.$t('common.wechatBbs'),
"share": {
"provider": "weixin",
......@@ -114,26 +114,26 @@
}
},
{
"img": "/static/app-plus/sharemenu/weibo.png",
"img": "/static/app/sharemenu/weibo.png",
"text": this.$t('common.weibo'),
"share": {
"provider": "sinaweibo"
}
},
{
"img": "/static/app-plus/sharemenu/qq.png",
"img": "/static/app/sharemenu/qq.png",
"text": "QQ",
"share": {
"provider": "qq"
}
},
{
"img": "/static/app-plus/sharemenu/copyurl.png",
"img": "/static/app/sharemenu/copyurl.png",
"text": this.$t('common.copy'),
"share": "copyurl"
},
{
"img": "/static/app-plus/sharemenu/more.png",
"img": "/static/app/sharemenu/more.png",
"text": this.$t('common.more'),
"share": "shareSystem"
}
......@@ -149,7 +149,7 @@
title
}) {
uni.navigateTo({
url: '/uni_modules/uni-id-pages/pages/common/webview/webview?url=' + url + '&title=' + title,
url: '/uni_modules/uni-id-pages/pages/common/webview/webview?url=' + url + '&title=' + title,
success: res => {},
fail: () => {},
complete: () => {}
......@@ -167,8 +167,8 @@
}
/* #endif */
.about {
flex-direction: column;
justify-content: center;
flex-direction: column;
justify-content: center;
align-items: center;
}
......@@ -199,14 +199,14 @@
font-weight: 500;
}
.qrcode ,.qrcode .uqrcode{
margin: 10px 0;
width: 100px;
.qrcode ,.qrcode .uqrcode{
margin: 10px 0;
width: 100px;
height: 100px;
/* #ifndef APP-NVUE */
display: block;
/* #endif */
}
/* #ifndef APP-NVUE */
display: block;
/* #endif */
}
.copyright {
font-size: 32rpx;
......
......@@ -299,7 +299,7 @@
'?x-oss-process=image/resize,m_fill,h_100,w_100' //压缩图片解决,在ios端分享图过大导致的图片失效问题
},
menus: [{
"img": "/static/app-plus/sharemenu/wechatfriend.png",
"img": "/static/app/sharemenu/wechatfriend.png",
"text": this.$t('common.wechatFriends'),
"share": {
"provider": "weixin",
......@@ -307,7 +307,7 @@
}
},
{
"img": "/static/app-plus/sharemenu/wechatmoments.png",
"img": "/static/app/sharemenu/wechatmoments.png",
"text": this.$t('common.wechatBbs'),
"share": {
"provider": "weixin",
......@@ -315,26 +315,26 @@
}
},
{
"img": "/static/app-plus/sharemenu/weibo.png",
"img": "/static/app/sharemenu/weibo.png",
"text": this.$t('common.weibo'),
"share": {
"provider": "sinaweibo"
}
},
{
"img": "/static/app-plus/sharemenu/qq.png",
"img": "/static/app/sharemenu/qq.png",
"text": "QQ",
"share": {
"provider": "qq"
}
},
{
"img": "/static/app-plus/sharemenu/copyurl.png",
"img": "/static/app/sharemenu/copyurl.png",
"text": this.$t('common.copy'),
"share": "copyurl"
},
{
"img": "/static/app-plus/sharemenu/more.png",
"img": "/static/app/sharemenu/more.png",
"text": this.$t('common.more'),
"share": "shareSystem"
}
......
......@@ -66,47 +66,47 @@
{
"id": "apple",
"text": "苹果登录",
"logo": "/uni_modules/uni-id-pages/static/app-plus/uni-fab-login/apple.png",
"logo": "/uni_modules/uni-id-pages/static/app/uni-fab-login/apple.png",
},
{
"id": "univerify",
"text": "一键登录",
"logo": "/uni_modules/uni-id-pages/static/app-plus/uni-fab-login/univerify.png",
"logo": "/uni_modules/uni-id-pages/static/app/uni-fab-login/univerify.png",
},
{
"id": "taobao",
"text": "淘宝登录", //暂未提供该登录方式的接口示例
"logo": "/uni_modules/uni-id-pages/static/app-plus/uni-fab-login/taobao.png",
"logo": "/uni_modules/uni-id-pages/static/app/uni-fab-login/taobao.png",
},
{
"id": "facebook",
"text": "脸书登录", //暂未提供该登录方式的接口示例
"logo": "/uni_modules/uni-id-pages/static/app-plus/uni-fab-login/facebook.png",
"logo": "/uni_modules/uni-id-pages/static/app/uni-fab-login/facebook.png",
},
{
"id": "alipay",
"text": "支付宝登录", //暂未提供该登录方式的接口示例
"logo": "/uni_modules/uni-id-pages/static/app-plus/uni-fab-login/alipay.png",
"logo": "/uni_modules/uni-id-pages/static/app/uni-fab-login/alipay.png",
},
{
"id": "qq",
"text": "QQ登录", //暂未提供该登录方式的接口示例
"logo": "/uni_modules/uni-id-pages/static/app-plus/uni-fab-login/qq.png",
"logo": "/uni_modules/uni-id-pages/static/app/uni-fab-login/qq.png",
},
{
"id": "google",
"text": "谷歌登录", //暂未提供该登录方式的接口示例
"logo": "/uni_modules/uni-id-pages/static/app-plus/uni-fab-login/google.png",
"logo": "/uni_modules/uni-id-pages/static/app/uni-fab-login/google.png",
},
{
"id": "douyin",
"text": "抖音登录", //暂未提供该登录方式的接口示例
"logo": "/uni_modules/uni-id-pages/static/app-plus/uni-fab-login/douyin.png",
"logo": "/uni_modules/uni-id-pages/static/app/uni-fab-login/douyin.png",
},
{
"id": "sinaweibo",
"text": "新浪微博", //暂未提供该登录方式的接口示例
"logo": "/uni_modules/uni-id-pages/static/app-plus/uni-fab-login/sinaweibo.png",
"logo": "/uni_modules/uni-id-pages/static/app/uni-fab-login/sinaweibo.png",
}
// #endif
],
......@@ -211,22 +211,22 @@
} else if (this.getRoute(2) == path) { // 如果上一个页面就是,马上要打开的页面,直接返回。防止重复开启
uni.navigateBack();
} else if (this.getRoute(1) != path) {
if(index === 0){
uni.navigateTo({
url: path,
animationType: 'slide-in-left',
complete(e) {
// console.log(e);
}
})
}else{
uni.redirectTo({
url: path,
animationType: 'slide-in-left',
complete(e) {
// console.log(e);
}
})
if(index === 0){
uni.navigateTo({
url: path,
animationType: 'slide-in-left',
complete(e) {
// console.log(e);
}
})
}else{
uni.redirectTo({
url: path,
animationType: 'slide-in-left',
complete(e) {
// console.log(e);
}
})
}
} else {
console.log('出乎意料的情况,path:' + path);
......
#### 本功能基于[底部图标菜单](https://ext.dcloud.net.cn/plugin?id=4858)封装而成。
### 示例代码
```
#### 本功能基于[底部图标菜单](https://ext.dcloud.net.cn/plugin?id=4858)封装而成。
### 示例代码
```
<template>
<button type="default" @click="uniShare">显示</button>
</template>
<script>
import uniShare from '@/uni_modules/uni-share/js_sdk/uni-share.js';
export default {
onBackPress({from}) {
console.log(from);
if(from=='backbutton'){
this.$nextTick(function(){
uniShare.hide()
})
return uniShare.isShow;
}
},
<script>
import uniShare from '@/uni_modules/uni-share/js_sdk/uni-share.js';
export default {
onBackPress({from}) {
console.log(from);
if(from=='backbutton'){
this.$nextTick(function(){
uniShare.hide()
})
return uniShare.isShow;
}
},
methods: {
uniShare() {
uniShare() {
uniShare.show({
content: { //公共的分享参数配置 类型(type)、链接(herf)、标题(title)、summary(描述)、imageUrl(缩略图)
type: 0,
......@@ -27,7 +27,7 @@
imageUrl: 'https://img-cdn-aliyun.dcloud.net.cn/stream/icon/__UNI__HelloUniApp.png'
},
menus: [{
"img": "/static/app-plus/sharemenu/wechatfriend.png",
"img": "/static/app/sharemenu/wechatfriend.png",
"text": "微信好友",
"share": { //当前项的分享参数配置。可覆盖公共的配置如下:分享到微信小程序,配置了type=5
"provider": "weixin",
......@@ -35,7 +35,7 @@
}
},
{
"img": "/static/app-plus/sharemenu/wechatmoments.png",
"img": "/static/app/sharemenu/wechatmoments.png",
"text": "微信朋友圈",
"share": {
"provider": "weixin",
......@@ -43,7 +43,7 @@
}
},
{
"img": "/static/app-plus/sharemenu/mp_weixin.png",
"img": "/static/app/sharemenu/mp_weixin.png",
"text": "微信小程序",
"share": {
provider: "weixin",
......@@ -58,38 +58,38 @@
}
},
{
"img": "/static/app-plus/sharemenu/weibo.png",
"img": "/static/app/sharemenu/weibo.png",
"text": "微博",
"share": {
"provider": "sinaweibo"
}
},
{
"img": "/static/app-plus/sharemenu/qq.png",
"img": "/static/app/sharemenu/qq.png",
"text": "QQ",
"share": {
"provider": "qq"
}
},
{
"img": "/static/app-plus/sharemenu/copyurl.png",
"img": "/static/app/sharemenu/copyurl.png",
"text": "复制",
"share": "copyurl"
},
{
"img": "/static/app-plus/sharemenu/more.png",
"img": "/static/app/sharemenu/more.png",
"text": "更多",
"share": "shareSystem"
}
],
cancelText: "取消分享",
}, e => { //callback
}, e => { //callback
console.log(uniShare.isShow);
console.log(e);
})
}
}
}
</script>
</script>
```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册