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 @@