bayi 11 kuukautta sitten
vanhempi
commit
59ee5d7bdf
3 muutettua tiedostoa jossa 33 lisäystä ja 15 poistoa
  1. 2 2
      pages/my/index.wxml
  2. 25 7
      pages/reading/index.js
  3. 6 6
      utils/request.js

+ 2 - 2
pages/my/index.wxml

@@ -39,10 +39,10 @@
         <view class="goodsTips">虚拟产品不支持退货</view>
     </view>
     <!-- ios -->
-    <view class="longpressBox" wx:if="{{isIos}}">
+    <!-- <view class="longpressBox" wx:if="{{isIos}}">
         <image src="https://reader-wx.ai160.com/images/reader/v3/pay1.png" class="iosVip" />
         <image src="{{qrCode}}" class="qrCode" show-menu-by-longpress="{{true}}" />
-    </view>
+    </view> -->
     <view class="menu">
         <view class="activation" bindtap="activationCode" wx:if="{{vipTime!='1'}}">
             <view class="tips">

+ 25 - 7
pages/reading/index.js

@@ -27,6 +27,7 @@ import {
 } from '~/utils/util'
 import share from '~/mixins/share'
 import event from '~/mixins/event'
+const app = getApp()
 let aiengine = require('~/utils/ChivoxAiEngine')
 let sha1 = require('~/utils/sha1');
 // 文章行高
@@ -77,6 +78,7 @@ Page({
         activityId: '',
         // 0免费1收费
         free: 1,
+        isIos: app.globalData.isIOS,
         isVip: false,
         tempFilePath: ""
     },
@@ -87,13 +89,23 @@ Page({
         wx.setNavigationBarTitle({
             title: options.navBarTitle
         })
-        this.setData({
-            readingReset: options.reset || false,
-            readingType: options.readingType || 'public',
-            uploadHide: options.uploadHide,
-            activityId: options.activityId || '',
-            free: options.free ? Number(options.free) : 1
-        })
+        if (this.data.isIos) {
+            this.setData({
+                readingReset: options.reset || false,
+                readingType: options.readingType || 'public',
+                uploadHide: options.uploadHide,
+                activityId: options.activityId || '',
+                free: 0
+            })
+        } else {
+            this.setData({
+                readingReset: options.reset || false,
+                readingType: options.readingType || 'public',
+                uploadHide: options.uploadHide,
+                activityId: options.activityId || '',
+                free: options.free ? Number(options.free) : 1
+            })
+        }
         this.getreadInfo(videoId, options.reset).then(res => {
             wx.nextTick(() => {
                 if (options.voluntarily && this.data.isVip) {
@@ -205,9 +217,15 @@ Page({
     // 获取是否vip
     async getVipInfo() {
         let vipTime = await getVipInfo()
+        // if (this.data.isIos) {
+        //     this.setData({
+        //         isVip: '183760000000'
+        //     })
+        // }else{
         this.setData({
             isVip: vipTime != ''
         })
+        // }
     },
     // 获取阅读内容
     getreadInfo(videoId, reset = false) {

+ 6 - 6
utils/request.js

@@ -6,12 +6,12 @@ const {
         envVersion
     }
 } = wx.getAccountInfoSync();
-/* if (envVersion == 'develop') {
-    baseUrl = 'https://reader-api.efunbox.cn/wx'
-    oldUrl = 'https://reader-api.efunbox.cn'
-} else { */
-baseUrl = 'https://reader-api.ai160.com/wx'
-oldUrl = 'https://reader-api.ai160.com'
+// if (envVersion == 'develop') {
+//     baseUrl = 'https://reader-api.efunbox.cn/wx'
+//     oldUrl = 'https://reader-api.efunbox.cn'
+// } else {
+    baseUrl = 'https://reader-api.ai160.com/wx'
+    oldUrl = 'https://reader-api.ai160.com'
 // }
 
 function request(url, method, data, oldBaseUrl = false, intercept = true) {