From 454b2803c208a1209132fea30b9ed0ba358ac401 Mon Sep 17 00:00:00 2001
From: "@fawn-nine" <1271023382@qq.com>
Date: Thu, 2 Nov 2023 13:12:04 +0800
Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=A1=E6=B7=BB=E5=8A=A0=E5=88=86?=
=?UTF-8?q?=E4=BA=AB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
main.js | 4 ++-
pages/clock/clock.vue | 72 ++++++++++++++++++++++++++++++++++++++++--
pages/peanut/mine.vue | 4 +--
static/b (1).png | Bin 0 -> 3538 bytes
static/share.png | Bin 0 -> 5060 bytes
static/z (1).png | Bin 0 -> 3262 bytes
6 files changed, 75 insertions(+), 5 deletions(-)
create mode 100644 static/b (1).png
create mode 100644 static/share.png
create mode 100644 static/z (1).png
diff --git a/main.js b/main.js
index 48b3651..4365c7d 100644
--- a/main.js
+++ b/main.js
@@ -10,7 +10,9 @@ Vue.prototype.$bgm = bgm
// Vue.prototype.$baseUrl = "http://192.168.110.100:9100/pb/"
// Vue.prototype.$baseUrl = "http://59.110.212.44:9100/pb/"
Vue.prototype.$baseUrl = "https://api.nuttyreading.com/"
-
+ // 安卓安卓包下载地址
+// Vue.prototype.$apkUrl = "https://www.nuttyreading.com/nuttyreading.apk"
+Vue.prototype.$apkUrl = "https://www.nuttyreading.com/nuttyreading.apk"
// uView组件库
diff --git a/pages/clock/clock.vue b/pages/clock/clock.vue
index 3f7f6f8..e71e4b7 100644
--- a/pages/clock/clock.vue
+++ b/pages/clock/clock.vue
@@ -66,6 +66,10 @@
mode="aspectFit">
+
+ 分享
+
+
@@ -176,6 +180,10 @@
+
+
+
+
@@ -273,6 +281,7 @@
export default {
data() {
return {
+ isAndorid:true,
opPinglun: {}, // 针对的评论对象
pinglunShow: false,
placeholder: '开始输入...',
@@ -343,6 +352,7 @@
onLoad(e) {
this.bookid = e.bookid
this.windowWidth = uni.getSystemInfoSync().windowWidth;
+ this.getOS()
},
onPullDownRefresh() {
console.log('下拉刷新了')
@@ -365,11 +375,66 @@
...mapState(['userInfo'])
},
methods: {
+ // 获得操作系统
+ getOS(){
+ let oprateOs = ''
+ oprateOs = uni.getSystemInfoSync().platform
+ // console.log(oprateOs)
+ if(oprateOs == 'android'){
+ this.isAndorid = true
+ }else{
+ this.isAndorid = false
+ }
+ },
+ haveSelected(data){
+ let image = ''
+ this.taskInfo.image && this.taskInfo.image != '' ? image = this.taskInfo.image : image = 'static/fengziIcon.jpg'
+ console.log(data,' 选择的是')
+ if(data.index == 0){
+ // 分享到好友
+ uni.share({
+ provider: "weixin",
+ scene: "WXSceneSession",
+ type: 0,
+ href: this.$apkUrl,
+ title: `我正在参与疯子读书读书打卡:${this.taskInfo.title}`,
+ summary: `${this.taskInfo.content}`,
+ imageUrl: image,
+ 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: this.$apkUrl,
+ title: `我正在参与疯子读书读书打卡:${this.taskInfo.title}`,
+ summary: `${this.taskInfo.content}`,
+ imageUrl: image,
+ success: function (res) {
+ console.log("success:" + JSON.stringify(res));
+ },
+ fail: function (err) {
+ console.log("fail:" + JSON.stringify(err));
+ }
+ });
+ }
+ },
+ // 新写分享
+ newOnShare(){
+ this.$refs.share.open()
+ },
showPingLun(item) {
// 回复评论
this.opPinglun = item
this.pinglunShow = true
- console.log('item45456', this.opPinglun)
+ // console.log('item45456', this.opPinglun)
},
onEditorReady() {
// #ifdef MP-BAIDU
@@ -918,6 +983,9 @@