app 分享功能重写
This commit is contained in:
@@ -238,7 +238,7 @@ export const getLatLon = function(tip) {
|
|||||||
// 单独微信支付
|
// 单独微信支付
|
||||||
export const setWXPay = function(payInfo, callback) {
|
export const setWXPay = function(payInfo, callback) {
|
||||||
$http.request({
|
$http.request({
|
||||||
url: "/pay/placeAnOrder/shoppingpay",
|
url: "/pay/placeAnOrder/shoppingPay",
|
||||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
data:payInfo,
|
data:payInfo,
|
||||||
header: { //默认 无 说明:请求头1
|
header: { //默认 无 说明:请求头1
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
<!-- <view class="nav_list" @click="onGoing()">
|
<!-- <view class="nav_list" @click="onGoing()">
|
||||||
<text>帮助与反馈11111</text>
|
<text>帮助与反馈11111</text>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="nav_list" @click="onShare">
|
<view class="nav_list" @click="newOnShare">
|
||||||
<text>分享App</text>
|
<text>分享App</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="nav_list" @click="onPageJump('../peanut/aboutUs')">
|
<view class="nav_list" @click="onPageJump('../peanut/aboutUs')">
|
||||||
@@ -107,6 +107,11 @@
|
|||||||
<u-modal :show="signShow" :content="signContent" :showCancelButton="true" @cancel="signShow=false"
|
<u-modal :show="signShow" :content="signContent" :showCancelButton="true" @cancel="signShow=false"
|
||||||
@confirm="signOut">
|
@confirm="signOut">
|
||||||
</u-modal>
|
</u-modal>
|
||||||
|
<!-- 分享弹窗 -->
|
||||||
|
<uni-popup ref="share" type="share" safeArea backgroundColor="#fff">
|
||||||
|
<uni-popup-share @select="haveSelected"></uni-popup-share>
|
||||||
|
</uni-popup>
|
||||||
|
|
||||||
<music-play :playData="playData"></music-play>
|
<music-play :playData="playData"></music-play>
|
||||||
<z-navigation></z-navigation>
|
<z-navigation></z-navigation>
|
||||||
</view>
|
</view>
|
||||||
@@ -115,7 +120,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import musicPlay from '@/components/music.vue'
|
import musicPlay from '@/components/music.vue'
|
||||||
import $http from '@/config/requestConfig.js';
|
import $http from '@/config/requestConfig.js';
|
||||||
import appShare, { closeShare } from '@/uni_modules/zhouWei-APPshare/js_sdk/appShare';
|
// import appShare, { closeShare } from '@/uni_modules/zhouWei-APPshare/js_sdk/appShare';
|
||||||
import {
|
import {
|
||||||
mapState
|
mapState
|
||||||
} from 'vuex';
|
} from 'vuex';
|
||||||
@@ -148,6 +153,44 @@
|
|||||||
},
|
},
|
||||||
//方法
|
//方法
|
||||||
methods: {
|
methods: {
|
||||||
|
haveSelected(data){
|
||||||
|
console.log(data,' 选择的是')
|
||||||
|
if(data.index == 0){
|
||||||
|
// 分享到好友
|
||||||
|
uni.share({
|
||||||
|
provider: "weixin",
|
||||||
|
scene: "WXSceneSession",
|
||||||
|
type: 0,
|
||||||
|
href: "https://www.nuttyreading.com/nuttyreading.apk",
|
||||||
|
title: "疯子读书",
|
||||||
|
summary: "我正在使用疯子读书提升自己,赶紧跟我一起来体验吧!",
|
||||||
|
imageUrl: "static/fengziIcon.jpg",
|
||||||
|
success: function (res) {
|
||||||
|
console.log("success:" + JSON.stringify(res));
|
||||||
|
},
|
||||||
|
fail: function (err) {
|
||||||
|
console.log("fail:" + JSON.stringify(err));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else if(data.index == 1){
|
||||||
|
// 分享到朋友圈
|
||||||
|
uni.share({
|
||||||
|
provider: "weixin",
|
||||||
|
scene: "WXSceneTimeline",
|
||||||
|
type: 0,
|
||||||
|
href: "https://www.nuttyreading.com/nuttyreading.apk",
|
||||||
|
title: "疯子读书",
|
||||||
|
summary: "我正在使用疯子读书提升自己,赶紧跟我一起来体验吧!",
|
||||||
|
imageUrl: "static/fengziIcon.jpg",
|
||||||
|
success: function (res) {
|
||||||
|
console.log("success:" + JSON.stringify(res));
|
||||||
|
},
|
||||||
|
fail: function (err) {
|
||||||
|
console.log("fail:" + JSON.stringify(err));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
switchTab(url){
|
switchTab(url){
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: url
|
url: url
|
||||||
@@ -170,32 +213,35 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 新写分享
|
||||||
//分享app
|
newOnShare(){
|
||||||
onShare(){
|
this.$refs.share.open()
|
||||||
let shareData = {
|
|
||||||
shareUrl:"https://www.nuttyreading.com/nuttyreading.apk",
|
|
||||||
shareTitle:"疯子读书",
|
|
||||||
type:'0',
|
|
||||||
summary:'疯子读书,请使用浏览器打开本链接,自动下载安装包', // 分享内容的摘要
|
|
||||||
shareContent:"疯子读书,请使用浏览器打开本链接,自动下载安装包",
|
|
||||||
shareImg:"static/fengziIcon.jpg",
|
|
||||||
appId : "wx47134a8f15083734", // 默认不传type的时候,必须传appId和appPath才会显示小程序图标
|
|
||||||
appPath : "https://www.nuttyreading.com/nuttyreading.apk",
|
|
||||||
appWebUrl : "https://www.nuttyreading.com/nuttyreading.apk",
|
|
||||||
};
|
|
||||||
// 调用
|
|
||||||
let shareObj = appShare(shareData,res => {
|
|
||||||
console.log("疯子读书",res);
|
|
||||||
// 分享成功后关闭弹窗
|
|
||||||
// 第一种关闭弹窗的方式
|
|
||||||
closeShare();
|
|
||||||
});
|
|
||||||
setTimeout(() => {
|
|
||||||
// 第二种关闭弹窗的方式
|
|
||||||
shareObj.close();
|
|
||||||
},5000);
|
|
||||||
},
|
},
|
||||||
|
//分享app
|
||||||
|
// onShare(){
|
||||||
|
// let shareData = {
|
||||||
|
// shareUrl:"https://www.nuttyreading.com/nuttyreading.apk",
|
||||||
|
// shareTitle:"疯子读书",
|
||||||
|
// type:'0',
|
||||||
|
// summary:'疯子读书,请使用浏览器打开本链接,自动下载安装包', // 分享内容的摘要
|
||||||
|
// shareContent:"疯子读书,请使用浏览器打开本链接,自动下载安装包",
|
||||||
|
// shareImg:"static/fengziIcon.jpg",
|
||||||
|
// appId : "wx47134a8f15083734", // 默认不传type的时候,必须传appId和appPath才会显示小程序图标
|
||||||
|
// appPath : "https://www.nuttyreading.com/nuttyreading.apk",
|
||||||
|
// appWebUrl : "https://www.nuttyreading.com/nuttyreading.apk",
|
||||||
|
// };
|
||||||
|
// // 调用
|
||||||
|
// let shareObj = appShare(shareData,res => {
|
||||||
|
// console.log("疯子读书",res);
|
||||||
|
// // 分享成功后关闭弹窗
|
||||||
|
// // 第一种关闭弹窗的方式
|
||||||
|
// closeShare();
|
||||||
|
// });
|
||||||
|
// setTimeout(() => {
|
||||||
|
// // 第二种关闭弹窗的方式
|
||||||
|
// shareObj.close();
|
||||||
|
// },5000);
|
||||||
|
// },
|
||||||
|
|
||||||
// 注销账户
|
// 注销账户
|
||||||
logout(){
|
logout(){
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
## 1.3.2(2023-05-04)
|
||||||
|
- 修复 NVUE 平台报错的问题
|
||||||
## 1.3.1(2021-11-23)
|
## 1.3.1(2021-11-23)
|
||||||
- 修复 init 方法初始化问题
|
- 修复 init 方法初始化问题
|
||||||
## 1.3.0(2021-11-19)
|
## 1.3.0(2021-11-19)
|
||||||
|
|||||||
@@ -10,7 +10,10 @@ const nvueAnimation = uni.requireNativePlugin('animation')
|
|||||||
class MPAnimation {
|
class MPAnimation {
|
||||||
constructor(options, _this) {
|
constructor(options, _this) {
|
||||||
this.options = options
|
this.options = options
|
||||||
this.animation = uni.createAnimation(options)
|
// 在iOS10+QQ小程序平台下,传给原生的对象一定是个普通对象而不是Proxy对象,否则会报parameter should be Object instead of ProxyObject的错误
|
||||||
|
this.animation = uni.createAnimation({
|
||||||
|
...options
|
||||||
|
})
|
||||||
this.currentStepAnimates = {}
|
this.currentStepAnimates = {}
|
||||||
this.next = 0
|
this.next = 0
|
||||||
this.$ = _this
|
this.$ = _this
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
|
<!-- #ifndef APP-NVUE -->
|
||||||
|
<view v-show="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef APP-NVUE -->
|
||||||
|
<view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
|
||||||
|
<!-- #endif -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -48,7 +53,11 @@ export default {
|
|||||||
customClass:{
|
customClass:{
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
}
|
},
|
||||||
|
onceRender:{
|
||||||
|
type:Boolean,
|
||||||
|
default:false
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "uni-transition",
|
"id": "uni-transition",
|
||||||
"displayName": "uni-transition 过渡动画",
|
"displayName": "uni-transition 过渡动画",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"description": "元素的简单过渡动画",
|
"description": "元素的简单过渡动画",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"uni-ui",
|
"uni-ui",
|
||||||
@@ -17,11 +17,7 @@
|
|||||||
"directories": {
|
"directories": {
|
||||||
"example": "../../temps/example_temps"
|
"example": "../../temps/example_temps"
|
||||||
},
|
},
|
||||||
"dcloudext": {
|
"dcloudext": {
|
||||||
"category": [
|
|
||||||
"前端组件",
|
|
||||||
"通用组件"
|
|
||||||
],
|
|
||||||
"sale": {
|
"sale": {
|
||||||
"regular": {
|
"regular": {
|
||||||
"price": "0.00"
|
"price": "0.00"
|
||||||
@@ -38,7 +34,8 @@
|
|||||||
"data": "无",
|
"data": "无",
|
||||||
"permissions": "无"
|
"permissions": "无"
|
||||||
},
|
},
|
||||||
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
|
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
|
||||||
|
"type": "component-vue"
|
||||||
},
|
},
|
||||||
"uni_modules": {
|
"uni_modules": {
|
||||||
"dependencies": ["uni-scss"],
|
"dependencies": ["uni-scss"],
|
||||||
|
|||||||
Reference in New Issue
Block a user