فهرست منبع

feat(view): 优化IOS不能购买提示

xiansin 3 سال پیش
والد
کامیت
ce0a4aea5c
3فایلهای تغییر یافته به همراه21 افزوده شده و 12 حذف شده
  1. 13 5
      pages/index/index.vue
  2. 4 3
      pages/my/index.vue
  3. 4 4
      pages/my/member.vue

+ 13 - 5
pages/index/index.vue

xqd
@@ -50,13 +50,21 @@
 		methods: {
 			handleOpen(index){
 				if(this.setting.review_mode) return
-				this.$u.api.userGet().then(res => {
-					if(res.is_vip == 0){
-						this.modal.show = true
+				if(this.vuex_user_data.is_vip == 0){
+					if(this.$platform === 'ios'){
+						uni.showModal({
+							title: '提示',
+							content: '由于相关规范,iOS功能暂不可用',
+							success: function (res) {
+								// res.confirm res.cancel
+							}
+						});
 					}else{
-						this.$jump({url: mathLists[index].url,type:'to'})
+						this.modal.show = true
 					}
-				})
+				}else{
+					this.$jump({url: mathLists[index].url,type:'to'})
+				}
 			},
 			handleConfirmBuy(){
 				this.$jump({url:'/pages/my/member',type:'to'})

+ 4 - 3
pages/my/index.vue

xqd xqd
@@ -93,7 +93,7 @@
 		},
 		methods: {
 			handleJumpBuy(){
-				/*if(this.$platform === 'ios'){
+				if(this.$platform === 'ios'){
 					uni.showModal({
 						title: '提示',
 						content: '由于相关规范,iOS功能暂不可用',
@@ -102,8 +102,9 @@
 						}
 					});
 					return false
-				}*/
-				this.$jump({url:'/pages/my/member',type:'to'})
+				}else{
+					this.$jump({url:'/pages/my/member',type:'to'})
+				}
 			},
 			getPhoneNumber(phoneNumber){
 				if(phoneNumber.detail.errMsg !== 'getPhoneNumber:ok'){

+ 4 - 4
pages/my/member.vue

xqd xqd xqd xqd
@@ -17,7 +17,7 @@
 						<view class="origin">¥{{setting.origin_member_price}}</view>
 						<view class="desc">永久使用</view>
 					</view>
-					<u-button 
+					<u-button
 							  class="u_button"
 							  shape="circle"
 							  type="success"
@@ -26,7 +26,7 @@
 							  @click="handleBuy"
 							  v-if="vuex_user_data.is_vip == 0"
 					>立即开通</u-button>
-					<u-button 
+					<u-button
 							  class="u_button"
 							  shape="circle"
 							  type="success"
@@ -72,7 +72,7 @@
 			},
 			handleBuy(){
 				let _this = this;
-				/*if(this.$platform === 'ios'){
+				if(this.$platform === 'ios'){
 					uni.showModal({
 						title: '提示',
 						content: '由于相关规范,iOS功能暂不可用',
@@ -81,7 +81,7 @@
 						}
 					});
 					return false
-				}*/
+				}
 				if(!this.vuex_user_data.phone_num){
 					this.modal.show = true;
 					return;