Browse Source

增加视频组件的 开通充值功能 完成短信验证码隐藏显示

XSXS 1 month ago
parent
commit
5427325eeb

+ 46 - 34
App.vue

@@ -28,6 +28,7 @@ import {
 import permission from '@/common/permission.js'
 uni.$createTeenagePopUpWindow = createTeenagePopUpWindow;
 import { mapMutations } from "vuex";
+import channel from "@/common/channel.js"; 
 export default {
   globalData: {
     postHeader: null,
@@ -46,17 +47,18 @@ export default {
     needStatusCheck: true,
     statusCheckTimer: null,
   },
-  beforeDestroy() {},
+  beforeDestroy() { },
   onLaunch: function (options) {
     // 添加状态检查定时器
     const checkStatus = () => {
       if (!this.globalData.needStatusCheck) return;
-      
+
       uni.request({
         url: this.$apiHost + "/Index/getStatus",
         data: {
           uuid: this.globalData.uuid,
           skey: this.globalData.skey,
+          channel: channel && channel.getCurrentStore() && channel.getCurrentStore().channel,
         },
         header: {
           "content-type": "application/json",
@@ -65,6 +67,11 @@ export default {
         success: (res) => {
           console.log("状态检查结果", res.data);
           if (res.data && res.data.success) {
+            if (res.data.login_sms == "yes") { 
+              this.setIsSmsLogin(true) 
+            }else{  
+              this.setIsSmsLogin(false)
+            }
             // 请求成功,停止检查
             this.globalData.needStatusCheck = false;
             // 清除定时器
@@ -81,14 +88,15 @@ export default {
     };
 
     // 每10秒执行一次状态检查,并保存定时器引用
+    checkStatus()
     this.globalData.statusCheckTimer = setInterval(checkStatus, 10000);
-    
 
 
 
 
 
-    
+
+
     const intervalTime = 1000 * 30 * 60; // 30分钟的时间戳(毫秒)
     var timeoutId;
     var judgingTimer = async () => {
@@ -108,18 +116,18 @@ export default {
               console.log("检查青少年状态", res.data);
               if (!res.data.has_password || res.data.is_open_young == 1) {
                 setupTeenagePopupTimer();
-				if (res.data.is_open_young == 1) { 
-					this.setTeenageMode(1);
-				} else if (res.data.is_open_young == 0) { 
-					this.setTeenageMode(2);
-				}
+                if (res.data.is_open_young == 1) {
+                  this.setTeenageMode(1);
+                } else if (res.data.is_open_young == 0) {
+                  this.setTeenageMode(2);
+                }
                 resolve(true);
               } else {
                 // setupTeenagePopupTimer()
                 resolve(false);
               }
             },
-            complete: () => {},
+            complete: () => { },
             fail: (e) => {
               console.log("检查青少年状态失败", e);
             },
@@ -281,9 +289,10 @@ export default {
   onExit: function () {
     unregisterRequestPermissionTipsListener(null);
   },
-  onAppBackground() {},
+  onAppBackground() { },
   methods: {
-	 ...mapMutations('rightsManagement',['setTeenageMode']),
+    ...mapMutations('rightsManagement', ['setTeenageMode']),
+    ...mapMutations('hideModule', ['setIsSmsLogin']),
     generateUUID() {
       return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
         /[xy]/g,
@@ -356,6 +365,7 @@ uni-modal {
 .cu-modal {
   z-index: 997 !important;
 }
+
 .money-add {
   display: flex;
   align-items: center;
@@ -369,29 +379,31 @@ uni-modal {
   margin-left: 8rpx;
   background-color: #1f1f1f;
 }
-.blick-btn-animation{
+
+.blick-btn-animation {
   position: relative;
+
   &:active {
-			transform: scale(0.98);
-			background-color: #333333;
-		}
-		
-		&::after {
-			content: '';
-			position: absolute;
-			top: 50%;
-			left: 50%;
-			width: 0;
-			height: 0;
-			background: rgba(255, 255, 255, 0.2);
-			border-radius: 50%;
-			transform: translate(-50%, -50%);
-			transition: width 0.3s ease, height 0.3s ease;
-		}
-		
-		&:active::after {
-			width: 200%;
-			height: 200%;
-		}
+    transform: scale(0.98);
+    background-color: #333333;
+  }
+
+  &::after {
+    content: '';
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    width: 0;
+    height: 0;
+    background: rgba(255, 255, 255, 0.2);
+    border-radius: 50%;
+    transform: translate(-50%, -50%);
+    transition: width 0.3s ease, height 0.3s ease;
+  }
+
+  &:active::after {
+    width: 200%;
+    height: 200%;
+  }
 }
 </style>

+ 7 - 5
common/channel.js

@@ -2,6 +2,7 @@
  * 应用商店渠道检测工具
  */
 
+ 
 // 应用商店渠道配置
 const STORE_CONFIG = {
   vivo: {
@@ -29,6 +30,11 @@ const STORE_CONFIG = {
     name: '应用宝',
     package: 'com.tencent.android.qqdownloader'
   }, 
+  xiaomi: {
+    channel: 'xiaomi',
+    name: '小米应用商店',
+    package: 'com.xiaomi.market'
+  },
   appstore: {
     channel: 'appstore',
     name: 'App Store',
@@ -45,11 +51,6 @@ const STORE_CONFIG = {
     name: 'Google Play(AAB)',
     package: 'com.android.vending'
   },
-  xiaomi: {
-    channel: 'xiaomi',
-    name: '小米应用商店',
-    package: 'com.xiaomi.market'
-  },
   wandoujia: {
     channel: 'wandoujia',
     name: '豌豆荚',
@@ -72,6 +73,7 @@ const STORE_CONFIG = {
   }
 };
 
+
 // 获取当前应用商店信息
 export function getCurrentStore() {
   let store = STORE_CONFIG.default;

+ 0 - 22
common/channelFlag.js

@@ -1,22 +0,0 @@
-// 通过条件编译区分渠道商店
-
-let CHANNEL_FLAG = 'unknown';
-
-// #ifdef APP-PLUS
-const systemInfo = uni.getSystemInfoSync();
-if (systemInfo.platform === 'ios') {
-  CHANNEL_FLAG = 'appstore';
-} else {
-  CHANNEL_FLAG = plus.runtime.channel || 'default';
-}
-// #endif
-
-// #ifdef H5
-CHANNEL_FLAG = 'h5';
-// #endif
-
-// #ifdef MP-WEIXIN
-CHANNEL_FLAG = 'weixin';
-// #endif
-
-export default CHANNEL_FLAG; 

+ 1 - 1
common/teenagePopup.js

@@ -33,7 +33,7 @@ export function createTeenagePopUpWindow(options = {}) {
         render(h) {
             return h(teenagePopUpWindow, {
                 props: {
-                    text: content || '截图至相册,微信扫一扫',
+                    text: content || '截图至相册,QQ扫一扫',
                     confirmText: confirmText || '知道了',
                     imageSrc: imageSrc || '../../static/me/qingshaonianmoshi.png'
                 },

+ 1 - 1
components/CustomerServicePopup/CustomerServicePopup.vue

@@ -2,7 +2,7 @@
   <CustomPopup ref="customPopup">
     <view class="customerService">
       <image src="../../static/dome/er-code.png"></image>
-      <view class="text">截图至相册,微信扫一扫</view>
+      <view class="text">截图至相册,QQ扫一扫</view>
       <view class="btn-box" @click="closeCustomPopup">知道了</view>
     </view>
   </CustomPopup>

+ 207 - 0
components/VideoPlayer/VideoPlayer.vue

@@ -0,0 +1,207 @@
+<template>
+  <view class="video-container">
+    <!-- 使用uniapp的video组件 -->
+    <video
+      :src="src"
+      :controls="controls"
+      :autoplay="autoplay"
+      :loop="loop"
+      :muted="muted"
+      :initial-time="initialTime"
+      :duration="duration"
+      :direction="direction"
+      :show-fullscreen-btn="showFullscreenBtn"
+      :show-play-btn="showPlayBtn"
+      :show-center-play-btn="showCenterPlayBtn"
+      :enable-progress-gesture="enableProgressGesture"
+      :object-fit="objectFit"
+      :poster="poster"
+      :show-mute-btn="showMuteBtn"
+      :title="title"
+      :play-btn-position="playBtnPosition"
+      :enable-play-gesture="enablePlayGesture"
+      :auto-pause-if-navigate="autoPauseIfNavigate"
+      :auto-pause-if-open-native="autoPauseIfOpenNative"
+      :vslide-gesture="vslideGesture"
+      :vslide-gesture-in-fullscreen="vslideGestureInFullscreen"
+      :style="videoStyle"
+      @play="onPlay"
+      @pause="onPause"
+      @ended="onEnded"
+      @timeupdate="onTimeUpdate"
+      @fullscreenchange="onFullscreenChange"
+      @waiting="onWaiting"
+      @error="onError"
+      @progress="onProgress"
+    ></video>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'VideoPlayer',
+  props: {
+    // 视频源地址
+    src: {
+      type: String,
+      required: true
+    },
+    // 是否显示默认播放控件
+    controls: {
+      type: Boolean,
+      default: true
+    },
+    // 是否自动播放
+    autoplay: {
+      type: Boolean,
+      default: false
+    },
+    // 是否循环播放
+    loop: {
+      type: Boolean,
+      default: false
+    },
+    // 是否静音播放
+    muted: {
+      type: Boolean,
+      default: false
+    },
+    // 指定视频初始播放位置
+    initialTime: {
+      type: Number,
+      default: 0
+    },
+    // 指定视频时长
+    duration: {
+      type: Number,
+      default: 0
+    },
+    // 设置全屏时视频的方向
+    direction: {
+      type: Number,
+      default: 0
+    },
+    // 是否显示全屏按钮
+    showFullscreenBtn: {
+      type: Boolean,
+      default: true
+    },
+    // 是否显示播放按钮
+    showPlayBtn: {
+      type: Boolean,
+      default: true
+    },
+    // 是否显示视频中间的播放按钮
+    showCenterPlayBtn: {
+      type: Boolean,
+      default: true
+    },
+    // 是否开启控制进度的手势
+    enableProgressGesture: {
+      type: Boolean,
+      default: true
+    },
+    // 当视频大小与 video 容器大小不一致时,视频的表现形式
+    objectFit: {
+      type: String,
+      default: 'contain'
+    },
+    // 视频封面的图片网络资源地址
+    poster: {
+      type: String,
+      default: ''
+    },
+    // 是否显示静音按钮
+    showMuteBtn: {
+      type: Boolean,
+      default: false
+    },
+    // 视频的标题
+    title: {
+      type: String,
+      default: ''
+    },
+    // 播放按钮的位置
+    playBtnPosition: {
+      type: String,
+      default: 'bottom'
+    },
+    // 是否开启播放手势
+    enablePlayGesture: {
+      type: Boolean,
+      default: false
+    },
+    // 当跳转到其它小程序页面时,是否自动暂停本页面的视频
+    autoPauseIfNavigate: {
+      type: Boolean,
+      default: true
+    },
+    // 当跳转到其它微信原生页面时,是否自动暂停本页面的视频
+    autoPauseIfOpenNative: {
+      type: Boolean,
+      default: true
+    },
+    // 在非全屏模式下,是否开启亮度与音量调节手势
+    vslideGesture: {
+      type: Boolean,
+      default: false
+    },
+    // 在全屏模式下,是否开启亮度与音量调节手势
+    vslideGestureInFullscreen: {
+      type: Boolean,
+      default: true
+    },
+    // 视频容器的样式
+    videoStyle: {
+      type: Object,
+      default: () => ({})
+    }
+  },
+  methods: {
+    // 播放事件
+    onPlay(e) {
+      this.$emit('play', e)
+    },
+    // 暂停事件
+    onPause(e) {
+      this.$emit('pause', e)
+    },
+    // 播放结束事件
+    onEnded(e) {
+      this.$emit('ended', e)
+    },
+    // 播放进度变化事件
+    onTimeUpdate(e) {
+      this.$emit('timeupdate', e)
+    },
+    // 全屏变化事件
+    onFullscreenChange(e) {
+      this.$emit('fullscreenchange', e)
+    },
+    // 视频缓冲事件
+    onWaiting(e) {
+      this.$emit('waiting', e)
+    },
+    // 视频错误事件
+    onError(e) {
+      this.$emit('error', e)
+    },
+    // 加载进度事件
+    onProgress(e) {
+      this.$emit('progress', e)
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.video-container {
+  width: 100%;
+  height: 100%;
+  
+  video {
+    width: 100%;
+    height: 100%;
+  }
+}
+</style> 

+ 1 - 1
pages/index/index.vue

@@ -830,7 +830,7 @@ export default {
 		},
 
 		formatItem(item) {
-			console.log("item:", item);
+			// console.log("item:", item);
 
 
 			let img = "";

+ 67 - 4
pages/index/workDetail.vue

@@ -8,6 +8,11 @@
 
     <!-- 权限申请提示 -->
     <view v-if="showRights" class="permission-tip">
+		
+		
+		
+		
+		
       <text class="permission-title">正在获取相机、存储权限</text>
       <text class="permission-desc">该权限用于获取设备拍摄或获取本地应用相册,进行头像或图片上传。</text>
     </view>
@@ -74,6 +79,42 @@
       </view>
     </template>
 
+    <!-- 视频类型 -->
+    <template v-else-if="articleInfo.task_type == 3">
+      <view class="video-content">
+        <video-player
+          :src="articleInfo.video_url"
+          :controls="true"
+          :autoplay="false"
+          :poster="home_image"
+          :show-center-play-btn="true"
+          :enable-progress-gesture="true"
+          :show-fullscreen-btn="true"
+          :show-play-btn="true"
+          :object-fit="'contain'"
+          @play="handleVideoPlay"
+          @pause="handleVideoPause"
+          @ended="handleVideoEnded"
+          :videoStyle="{ width: '100%', height: '1000rpx' }"
+        /> 
+        <!-- <video-player
+           src="https://media.w3.org/2010/05/sintel/trailer.mp4"
+          :controls="true"
+          :autoplay="false"
+          :poster="home_image"
+          :show-center-play-btn="true"
+          :enable-progress-gesture="true"
+          :show-fullscreen-btn="true"
+          :show-play-btn="true"
+          :object-fit="'contain'"
+          @play="handleVideoPlay"
+          @pause="handleVideoPause"
+          @ended="handleVideoEnded"
+          :videoStyle="{ width: '100%', height: '400rpx' }"
+        />-->
+      </view>
+    </template>
+
     <!-- 作品描述 -->
     <view class="workDescription">
       <view class="workDescription-title">
@@ -146,6 +187,7 @@ import previewImage from "@/components/kxj-previewImage/kxj-previewImage.vue"; /
 import CommentSection from "@/components/CommentSection/CommentSection.vue";
 import ActionSheet from "@/components/ActionSheet/ActionSheet.vue";
 import SharePopup from "@/components/SharePopup/SharePopup.vue";
+import VideoPlayer from "@/components/VideoPlayer/VideoPlayer.vue";
 import permission from '@/common/permission.js';
 function parseImgs(nodes) {
   nodes.forEach((node) => {
@@ -167,6 +209,7 @@ export default {
     CommentSection,
     ActionSheet,
     SharePopup,
+    VideoPlayer
   },
   data() {
     return {
@@ -302,9 +345,11 @@ export default {
             console.log("文章信息:", res.data.data);
         
             // 更新文章信息
-            this.articleInfo = res.data.data;
-           
+            this.articleInfo = res.data.data; 
             
+            if (res.data.data&&res.data.data.video_url) {
+              this.articleInfo.task_type = 3
+            }
             if (res.data.article) {
               this.articleInfo = res.data.article;
             }
@@ -317,8 +362,8 @@ export default {
             this.shareTitle = this.articleInfo.title || '萌创星球';
             this.shareDesc = this.articleInfo.content;
             this.shareImg = this.home_image;
-            this.userId = this.articleInfo.userID;
-            this.isItMe = 	this.userId == getApp().globalData.user_id
+            this.userId =res.data.author.id;
+            this.isItMe = 	res.data.author.id == getApp().globalData.user_id
 								? true
 								: false;
             this.userInfo.user_id = res.data.id; // 用户id
@@ -773,6 +818,18 @@ export default {
         console.log('预期需要上传的数据总长度' + res.totalBytesExpectedToSend);
       });
     },
+
+
+    // 播放视频组件
+    handleVideoPlay(e) {
+      console.log('视频开始播放', e);
+    },
+    handleVideoPause(e) {
+      console.log('视频暂停', e);
+    },
+    handleVideoEnded(e) {
+      console.log('视频播放结束', e);
+    },
   },
 };
 </script>
@@ -809,4 +866,10 @@ export default {
     padding: 10rpx 20rpx;
   }
 }
+
+.video-content {
+  width: 100%;
+  margin: 20rpx 0;
+  background-color: #f5f5f5;
+}
 </style>

+ 9 - 1
pages/login/login.scss

@@ -77,7 +77,15 @@ page {
 		transition: all 0.2s ease;
 		position: relative;
 		overflow: hidden;
-	
+		&:active {
+			transform: scale(0.95);
+			opacity: 0.8;
+		}
+	&.white{
+		background: #fff;
+		color: #1f1f1f;
+		border: solid 4rpx #1f111f;
+	}
 	}
 	.other {
 		margin-top:38rpx;

+ 20 - 7
pages/login/login.vue

@@ -8,8 +8,8 @@
 			<view class="subtitle">手机号登录/注册</view>
 		</view>
 
-		<!-- <view class="tbody"> -->
-		<view class="tbody" style="position: fixed;top: 70%;left: 50%;transform: translate(-50%,-50%);">
+		<view class="tbody">
+		<!-- <view class="tbody" style="position: fixed;top: 70%;left: 50%;transform: translate(-50%,-50%);"> -->
 			<block v-if="type == 'onelogin'">
 				<image class="icon" mode="widthFix" src="../../static/me/avator.png"></image>
 				<text class="mobile">+ 86 1**********</text>
@@ -20,9 +20,9 @@
 					<view class="line"></view>
 					<view class="mob" @click="type = 'mobile'">手机号登录</view>
 				</view>
-			</block>
+			</block> 
 			<block v-if="type == 'pass' || type == 'mobile'">
-				<template v-if="true">
+				<template v-if="isSmsLogin">
 					<view class="name">手机号码:</view>
 					<view class="item">
 						<input type="number" class="input" v-model="mobile" placeholder="请输入手机号码" maxlength="11" />
@@ -53,9 +53,14 @@
 							<text class="right" @click="type = 'pass'" style="color: blue;">密码登录</text>
 						</view>
 					</block>
-					<text class="btn_submit blick-btn-animation" @click="toLogin">登录/注册</text>
+					<text class="btn_submit  white" @click="toLogin">登录/注册</text>
+					<text class="btn_submit blick-btn-animation" @click="oneClickLoginFun">一键登录</text>
+				</template>
+				<template v-else>
+					<view style="width: 100%;height: 500rpx;display: flex;justify-content: center;align-items: flex-end;">
+						<text class="btn_submit blick-btn-animation" @click="oneClickLoginFun">一键登录</text>
+					</view>
 				</template>
-				<text class="btn_submit blick-btn-animation" @click="oneClickLoginFun">一键登录</text>
 			</block>
 
 			<view class="wechat" v-if="false">
@@ -87,8 +92,14 @@
 
 <script>
 import pubc from '@/common/public.js'
+import { mapState } from 'vuex'
+
+
 export default {
 	components: {},
+	computed: {
+		...mapState('hideModule', ['isSmsLogin'])
+	},
 	data() {
 		return {
 			skey: '',
@@ -138,7 +149,7 @@ export default {
 					"highlightColor": "#131313",  // 授权按钮按下状态背景颜色 默认值:#2861c5(仅ios支持)
 					"disabledColor": "#73aaf5",  // 授权按钮不可点击时背景颜色 默认值:#73aaf5(仅ios支持)
 					"textColor": "#ffffff",  // 授权按钮文字颜色 默认值:#ffffff
-					"title": "本机号码一键登录", // 授权按钮文案 默认值:“本机号码一键登录”
+					"title": "本机号码一键登录", // 授权按钮文案 默认值:"本机号码一键登录"
 					"borderRadius": "24px"	// 授权按钮圆角 默认值:"24px" (按钮高度的一半)
 				},
 				"otherLoginButton": {
@@ -189,6 +200,8 @@ export default {
 	},
 	onLoad() {
 		setTimeout(function () {
+			console.log(this.isSmsLogin, 'isSmsLogin');
+			
 			uni.setNavigationBarColor({
 				frontColor: '#ffffff',
 				backgroundColor: '#00000000',

+ 1 - 0
pages/make/index.scss

@@ -27,6 +27,7 @@ page {
     display: flex;
     gap: 20rpx;
 	align-items: center;
+  min-width: 400rpx;
     // width: 260rpx;
     .coin-box,
     .gold-box {

+ 1 - 1
pages/make/index.vue

@@ -75,7 +75,7 @@
 		</view>
 		<tabbar-view :tabbars="tabbars" :currentIndex="1" ref="tabbar"></tabbar-view>
 		<!-- 新手引导组件 -->
-		<novice-guidance :step="step" v-if="isGuiding"></novice-guidance>
+		<novice-guidance :step="step"  ></novice-guidance>
 	</view>
 </template>
 

+ 2 - 2
pages/makedetail/makeDetail.vue

@@ -755,7 +755,7 @@ export default {
 					uni.hideLoading();
 					if (res.data.success === "yes") {
 						uni.showToast({
-							title: '添加说明成功',
+							title:  res.data.str,
 							icon: 'success'
 						});
 						this.noteContent = '';
@@ -764,7 +764,7 @@ export default {
 						this.loadData();
 					} else {
 						uni.showToast({
-							title: '添加说明失败',
+							title: res.data.str,
 							icon: 'none'
 						});
 					}

+ 1 - 0
pages/makedetail/makeImgDetail.scss

@@ -64,6 +64,7 @@
       font-family: "PingFang SC-Bold";
       font-weight: 400;
       // width: 260rpx;
+      min-width: 306rpx;
       image {
         width: 40rpx;
         height: 40rpx;

+ 1 - 1
pages/makedetail/makeImgDetail.vue

@@ -134,7 +134,7 @@
 			</view>
 		</view>
 		<!-- 新手引导组件 -->
-		<novice-guidance :step="step" v-if="isGuiding"></novice-guidance>
+		<novice-guidance :step="step" ></novice-guidance>
 	</view>
 </template>
 

+ 1 - 0
pages/makedetail/makeMusicDetail.scss

@@ -63,6 +63,7 @@
       font-size: 28rpx;
       font-family: "PingFang SC-Bold";
       font-weight: 400; 
+      min-width: 306rpx;
       // width: 260rpx;
       image {
         width: 40rpx;

+ 1 - 1
pages/makedetail/makeMusicDetail.vue

@@ -123,7 +123,7 @@
 		</view>
 
 		<!-- 新手引导组件 -->
-		<novice-guidance :step="step" v-if="isGuiding"></novice-guidance>
+		<novice-guidance :step="step" ></novice-guidance>
 	</view>
 </template>
 

+ 1 - 0
pages/my/editInfo.vue

@@ -214,6 +214,7 @@ export default {
 		confirm(e) {
 			console.log(e);
 			this.birthday = e.fulldate
+			this.xinzuo_sel = this.getConstellation(this.birthday);
 		},
 		openNicknamePopUpWindow() {
 			this.$refs.openNicknamePopUpWindow.open();

+ 1 - 1
pages/my/job.vue

@@ -43,7 +43,7 @@
 					</view>
 					<view class="card-title">初次见面礼</view>
 					<view class="card-desc">完善个人资料领取星源奖励</view>
-					<view class="card-btn card-reward" v-if="newer_bfb != 'finish'">+100星源</view>
+					<view class="card-btn card-reward" v-if="newer_bfb != 'finish'">+20星源</view>
 					<view class="card-btn card-reward" v-else>已领取</view>
 				</view>
 				<view class="card yellow-card">

+ 1 - 1
pages/my/my.scss

@@ -439,7 +439,7 @@ page {
         color: #acf934;
         transition: all 0.3s ease;
         
-        > image {
+        image {
           width: 34rpx;
           height: 34rpx;
           margin-right: 8rpx;

+ 8 - 2
pages/my/my.vue

@@ -79,10 +79,16 @@
 							<image v-if="false" src="@/static/me/icon-vip2.png" mode=""></image>
 							<image v-else-if="0" src="@/static/me/icon-vip1.png" mode=""></image>
 							<image v-else src="@/static/me/icon-vip0.png" mode=""></image>
-							<text v-if="true">开启专属会员权益</text>
-							<text v-else>会员权益生效中</text>
+							<text v-if="myinfo.is_vip == 0">开启专属会员权益</text>
+							<text v-else style="font-size: 24rpx;">会员权益生效中&emsp13;
+							</text>
 						</view>
+						<!-- <view class=""> -->
+						<text style="color: rgba(172 ,249 ,52, .5);">
+						 {{myinfo.vip_date}} 
+						</text>
 						<image v-if="isRecharge" src="@/static/me/wd_icon_jiantou.png" mode=""></image>
+						<!-- </view> -->
 					</view>
 				</view>
 			</view>

+ 2 - 1
pages/my/step.vue

@@ -764,7 +764,8 @@ export default {
       this.$refs.calendar.open();
     },
     confirmBirthday(e) {
-      this.userInfo.birthday = e.fulldate; 
+      this.userInfo.birthday = e.fulldate;
+	   this.userInfo.xinzuo = this.getConstellation(this.userInfo.birthday);
     },
     getConstellation(birthday) {
       if (!birthday) return '';

+ 51 - 10
pages/vip/M_purchase.vue

@@ -16,7 +16,7 @@
         <view class="myGoldCoin-box-content">
           <image src="../../static/icon/coin_m.png" mode="widthFix" />
           <text>{{ myGoldCoin }}</text>
-        </view>
+        </view> 
       </view>
       <view class="myinfo">
         <view class="purchaseList" style="margin-top: 60rpx">
@@ -56,7 +56,7 @@
             <image
               class="icon"
               :src="
-                payType == 'wechat'
+                payType != 'wechat'
                   ? '../../static/icon/wd_icon_gouxuan04.png'
                   : '../../static/icon/wd_icon_gouxuan05.png'
               "
@@ -80,7 +80,7 @@
             <image
               class="icon"
               :src="
-                payType == 'alipay'
+                payType != 'alipay'
                   ? '../../static/icon/wd_icon_gouxuan04.png'
                   : '../../static/icon/wd_icon_gouxuan05.png'
               "
@@ -110,9 +110,10 @@
             <text class="xy" @click="goPage('yszc')"> 充值记录 </text>
           </view>
         </view>
-        <view class="btn_submit" @click="submitData">
-          <text>¥{{ money }}</text
-          >确认充值
+        <view class="btn_submit" :class="{'btn-loading': isSubmitting}" @click="submitData">
+          <text v-if="!isSubmitting">¥{{ money }}</text>
+          <text v-if="!isSubmitting">确认充值</text>
+          <view v-if="isSubmitting" class="loading-spinner"></view>
         </view>
       </view>
 
@@ -132,7 +133,7 @@ export default {
     DropdownMenu
   },
   computed: {
-    ...mapState('switchingModule', ['isWeChatPay'])
+    ...mapState('hideModule', ['isWeChatPay'])
   },
   data() {
     return {
@@ -147,7 +148,9 @@ export default {
       myGoldCoin: 0,
       dropdownOptions: [
         { label: '购买记录', type: 'vipRecord' }
-      ]
+      ],
+      isSubmitting: false,
+      lastClickTime: 0
     };
   },
   onLoad() {
@@ -181,7 +184,7 @@ export default {
       }
     },
     selPay(se) {
-      this.payType = se;
+      this.payType = se; 
     },
     chkSel() {
       if (this.sel == 1) {
@@ -191,6 +194,17 @@ export default {
       }
     },
     submitData() {
+      const now = Date.now();
+      if (now - this.lastClickTime < 3000) {
+        uni.showToast({
+          title: "请勿频繁点击",
+          icon: "none"
+        });
+        return;
+      }
+      this.lastClickTime = now;
+      
+      if (this.isSubmitting) return;
       if (this.is_agree == 0) {
         uni.showToast({
           title: "请确认并选择协议",
@@ -198,6 +212,7 @@ export default {
         });
         return;
       }
+      this.isSubmitting = true;
       let that = this;
       uni.request({
         url: this.$apiHost + "/Order/submit",
@@ -266,7 +281,7 @@ export default {
           } else {
             uni.showToast({
               title: "创建订单失败,请联系客服",
-              icon: "error",
+              icon: "none",
             });
           }
         },
@@ -276,6 +291,9 @@ export default {
             title: "网络错误,请重试",
             icon: "none"
           });
+        },
+        complete: () => {
+          that.isSubmitting = false;
         }
       });
     },
@@ -427,6 +445,23 @@ export default {
   justify-content: center;
   font-size: 32rpx;
   line-height: 0;
+  position: relative;
+  overflow: hidden;
+  transition: all 0.3s ease;
+  
+  &.btn-loading {
+    opacity: 0.7;
+    pointer-events: none;
+  }
+  
+  .loading-spinner {
+    width: 40rpx;
+    height: 40rpx;
+    border: 4rpx solid rgba(255, 255, 255, 0.3);
+    border-radius: 50%;
+    border-top-color: #fff;
+    animation: spin 1s linear infinite;
+  }
 
   text {
     font-size: 44rpx;
@@ -434,4 +469,10 @@ export default {
     margin-right: 10rpx;
   }
 }
+
+@keyframes spin {
+  to {
+    transform: rotate(360deg);
+  }
+}
 </style>

+ 57 - 4
pages/vip/index.vue

@@ -38,7 +38,8 @@
 				<view class="price-option" v-for="(item, index) in priceOptions" :key="index"
 					:class="{ active: selectedPrice === index }" @tap="selectPrice(index)">
 					<view class="price-left-img" v-if="item.limitedTimeGift">
-						限时优惠M币{{ item.limitedTimeGift }}
+						<!-- 限时优惠M币{{ item.limitedTimeGift }} -->
+						限时优惠
 					</view>
 					<view class="price-tag" v-if="item.tag">{{ item.tag }}</view>
 
@@ -82,10 +83,13 @@
 					</text>
 				</view>
 			</view>
-			<view class="bottom-pay-btn-bottom"
+			<view class="bottom-pay-btn-bottom" 
 				v-if="priceOptions && priceOptions[selectedPrice] && priceOptions[selectedPrice].price"
+				:class="{'btn-loading': isSubmitting}" 
 				@tap="showPaymentOptions">
-				<text>¥{{ priceOptions[selectedPrice].price }}</text> 立即购买
+				<text v-if="!isSubmitting">¥{{ priceOptions[selectedPrice].price }}</text>
+				<text v-if="!isSubmitting">立即购买</text>
+				<view v-if="isSubmitting" class="loading-spinner"></view>
 			</view>
 
 		</view>
@@ -213,10 +217,12 @@ export default {
 			showDropdown: false, // 控制下拉菜单显示状态 
 			is_agree: 0,
 			linkid: '',
+			lastClickTime: 0,
+			isSubmitting: false,
 		}
 	},
 	computed: {
-		...mapState('switchingModule', ['isWeChatPay'])
+		...mapState('hideModule', ['isWeChatPay'])
 	},
 	onLoad() {
 		// 获取用户信息,检查是否为VIP
@@ -273,6 +279,7 @@ export default {
 						res.data.list.length > 0
 					) {
 						console.log(res.data.list, "会员列表数据");
+						this.priceOptions=[]
 						res.data.list.reverse()
 						res.data.list.forEach(v => {
 							this.priceOptions.push({
@@ -331,6 +338,18 @@ export default {
 		},
 		// 显示支付方式选择弹窗
 		showPaymentOptions() {
+			const now = Date.now();
+			if (now - this.lastClickTime < 3000) {
+				uni.showToast({
+					title: "请勿频繁点击",
+					icon: "none"
+				});
+				return;
+			}
+			this.lastClickTime = now;
+			
+			if (this.isSubmitting) return;
+			
 			if (this.is_agree == 0) {
 				uni.showToast({
 					title: "请确认并选择协议",
@@ -338,7 +357,9 @@ export default {
 				});
 				return;
 			}
+			this.isSubmitting = true;
 			this.$refs.paymentPopup.open();
+			this.isSubmitting = false;
 		},
 		// 关闭支付方式选择弹窗
 		closePaymentPopup() {
@@ -364,6 +385,7 @@ export default {
 				});
 				return;
 			}
+			this.isSubmitting = true;
 			this.submitPayment();
 		},
 		// 提交支付
@@ -411,6 +433,8 @@ export default {
 								fail: (err) => {
 									console.log("微信支付失败:", err);
 									uni.hideLoading();
+									that.isSubmitting = false;
+									uni.hideLoading()
 									uni.showToast({
 										title: '支付取消',
 										icon: 'none'
@@ -428,6 +452,8 @@ export default {
 								fail: (err) => {
 									console.log("支付宝支付失败:", err);
 									uni.hideLoading();
+									that.isSubmitting = false;
+									uni.hideLoading()
 									uni.showToast({
 										title: '支付取消',
 										icon: 'none'
@@ -437,6 +463,8 @@ export default {
 						}
 					} else {
 						uni.hideLoading();
+						that.isSubmitting = false;
+						uni.hideLoading()
 						uni.showToast({
 							title: res.data.msg || '创建订单失败',
 							icon: "error"
@@ -446,6 +474,8 @@ export default {
 				fail: (err) => {
 					console.log("创建订单失败:", err);
 					uni.hideLoading();
+					that.isSubmitting = false;
+					uni.hideLoading()
 					uni.showToast({
 						title: '网络错误,请稍后重试',
 						icon: "error"
@@ -869,6 +899,23 @@ export default {
 			justify-content: center;
 			font-size: 32rpx;
 			line-height: 0;
+			position: relative;
+			overflow: hidden;
+			transition: all 0.3s ease;
+			
+			&.btn-loading {
+				opacity: 0.7;
+				pointer-events: none;
+			}
+			
+			.loading-spinner {
+				width: 40rpx;
+				height: 40rpx;
+				border: 4rpx solid rgba(255, 255, 255, 0.3);
+				border-radius: 50%;
+				border-top-color: #fff;
+				animation: spin 1s linear infinite;
+			}
 
 			text {
 				font-size: 44rpx;
@@ -1066,6 +1113,12 @@ export default {
 		}
 	}
 
+	@keyframes spin {
+		to {
+			transform: rotate(360deg);
+		}
+	}
+
 }
 
 .agree {

+ 2 - 35
pages/vip/record.vue

@@ -48,9 +48,7 @@
           </view>
         </view>
       </template>
-    </view>
-    <view>{{ dome1() }}</view>
-    <view>{{ dome2() }}</view>
+    </view> 
     <!-- 加载更多提示 -->
     <view class="loading-more" v-if="loading">
       <text>加载中...</text>
@@ -62,9 +60,7 @@
 </template>
 
 <script>
-import PageHeader from "@/components/PageHeader/PageHeader.vue";
-import channelFlag from "@/common/channelFlag.js";
-import channel from "@/common/channel.js";
+import PageHeader from "@/components/PageHeader/PageHeader.vue"; 
 export default {
   components: {
     PageHeader,
@@ -164,36 +160,7 @@ export default {
         },
       });
     },
-    dome1() {
-      // 直接输出当前渠道标识
-      console.log('CHANNEL_FLAG:', channelFlag);
-      return channelFlag;
-    },
-
-    dome2() {
-      // 获取详细渠道信息
-      const storeInfo = channel.getCurrentStore();
 
-      console.log('渠道详细信息:', storeInfo);
-      // 递归遍历对象,拼接成字符串
-      function traverse(obj) {
-        let result = [];
-        for (const key in obj) {
-          if (typeof obj[key] === 'object' && obj[key] !== null) {
-            result.push(traverse(obj[key]));
-          } else {
-            result.push(`${key}:${obj[key]}`);
-          }
-        }
-        return result.join('--j');
-      }
-
-      const str = traverse(storeInfo);
-      console.log('渠道详细信息:', str);
-      return str;
-      // 只获取渠道名称
-      console.log('渠道名称:', channel.getCurrentStoreName());
-    }
   },
 };
 </script>

+ 32 - 0
store/modules/hideModule.js

@@ -0,0 +1,32 @@
+const state = { 
+  isSmsLogin: false, // 隐藏短信登录
+  isWeChatPay: true, // 隐藏微信支付
+}
+
+const mutations = {
+ 
+  setIsSmsLogin( state,value){
+	state.isSmsLogin = value
+  }
+}
+
+const actions = {
+  // // 设置权限
+  // setPermissions({ commit }, permissions) {
+  //   commit('SET_PERMISSIONS', permissions)
+  // }
+}
+
+const getters = {
+
+}
+
+
+
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+  getters
+} 

+ 2 - 4
store/modules/switchingModule.js

@@ -4,10 +4,8 @@ const state = {
   name: '',         //星灵名称
   requestData: {},  //星灵请求数据
   isRecharge: true, // 隐藏充值模块    不在隐藏
-  isGuiding: false, // 隐藏创作模块中的引导部分  需要手动去打开
+  isGuiding: true, // 隐藏创作模块中的引导部分  需要手动去打开
   isTheTask: false, // 首页任务隐藏
-  isSmsLogin: false, // 隐藏短信登录
-  isWeChatPay: true, // 隐藏微信支付
 }
 
 const mutations = {
@@ -36,7 +34,7 @@ const mutations = {
     state.picture = ''
     state.name = ''
     state.requestData = {}
-  }
+  },
 }
 
 const actions = {