Parcourir la source

分享和绑定下级

JXDS18FUJT il y a 1 an
Parent
commit
81be766f67

+ 4 - 1
src/App.vue

@@ -3,6 +3,7 @@ import Vue from 'vue';
 export default Vue.extend({
     mpType: 'app',
     onLaunch() {
+        uni.setStorageSync("NODE_ENV", process.env.NODE_ENV);
         console.log('App Launch')
     },
     onShow() {
@@ -26,7 +27,9 @@ view {
     padding: 0;
     box-sizing: border-box;
 }
-
+.hidden{
+    display: none !important;
+}
 /*每个页面公共css */
 /* .primary-bg-light-blue {
     background-color: #BFE2F4;

+ 8 - 1
src/api/birthday/index.ts

@@ -11,5 +11,12 @@ export default {
             method: 'POST',
             url: "/student/birthday/log",
         })
-    }
+    },
+    studentBirthdayLogList(params:Object){
+		return request({
+			url:"/student/birthday/log/list",
+			method:'GET',
+			params
+		})
+	},
 }

+ 12 - 0
src/api/openApi/index.ts

@@ -30,6 +30,7 @@ export default {
 
         })
     },
+
     openApiBirthdayLog(data: {
         "birthday": string,
         "isPay"?: number,
@@ -41,6 +42,17 @@ export default {
             method: 'post',
             url: "/student/birthday/log",
 
+        })
+    },
+    //获取key
+    openApiSystemDictDataConfigKey(key:string):AxiosPromise<{
+        data:string
+    }>{
+
+        return request({   
+            method: 'GET',
+            url: "/open-api/system/dict/data/configKey/"+key,
+
         })
     }
 }

+ 1 - 0
src/api/request.ts

@@ -4,6 +4,7 @@ import { config } from "vue/types/umd";
 const request = axios.create({
     baseURL: process.env.NODE_ENV === "production" ? "https://xpgx.zzxcx.net/prod-api/" : "https://107j18o08.vicp.fun/",
 
+
 });
 axios.defaults.adapter = axiosAdapterUniapp
 //请求拦截器

+ 112 - 0
src/custom-tab-bar/index.js

@@ -0,0 +1,112 @@
+
+Component({
+	data: {
+		//默认是2
+		active: 1,
+		isBazi:false,
+		
+		list2: [
+			{
+				"pagePath": "/pages/carVideo/index",
+				"iconPath": "/static/imgs/car.png",
+				"selectedIconPath": "/static/imgs/car-active.png",
+				"text": "驾考"
+			},
+			{
+				"pagePath": "/pages/teacherVideo/index",
+				"iconPath": "/static/imgs/video.png",
+				"selectedIconPath": "/static/imgs/video-active.png",
+				"text": "教学视频"
+			},
+
+			{
+				"pagePath": "/pages/user/index",
+				"iconPath": "/static/imgs/user.png",
+				"selectedIconPath": "/static/imgs/user-active.png",
+				"text": "我的"
+			}
+		],
+		list: [
+		{
+			"pagePath": "/pages/future/index",
+			"iconPath": "/static/icon/排盘空心@2x.png",
+			"selectedIconPath": "/static/icon/排盘实心@2x.png",
+			"text": "人生报告"
+		},
+		{
+			"pagePath": "/pages/user/index",
+			"iconPath": "/static/icon/我的空心@2x.png",
+			"selectedIconPath": "/static/icon/我的实心@2x.png",
+			"text": "我的"
+		}]
+	},
+	attached(){
+		let that =this
+		// const baseUrl = wx.getSystemInfoSync().platform === 'devtools' ? 'https://nbjk1.zzxcx.net/nbjk-admin/' : 'https://nbjk.zzxcx.net/nbjk-admin/'
+		const baseUrl =  wx.getStorageSync("NODE_ENV")==='development'? 'https://xpgx1.zzxcx.net/xpgx-admin/' : 'https://xpgx.zzxcx.net/xpgx-admin/'
+		wx.request({
+			url:baseUrl+"open-api/system/dict/data/configKey/IS_BAZI",
+			method:'GET',
+			success(res){
+				
+				if(res.data.data=='1'){
+				
+					that.setData({
+						isBazi:true,
+					
+					})
+				}
+				else{
+					that.setData({
+						isBazi:false,
+					
+					})
+				}
+			
+
+			}
+		})
+	},
+
+	methods: {
+		switchTab(e) {
+			const data = e.currentTarget.dataset
+			const url = data.path
+			
+			if(url=='/pages/future/index'){
+				wx.navigateTo({
+					url:'/pages/future/index'
+				})
+				return
+
+			}
+			wx.switchTab({ url })
+			this.setData({
+				active: data.index
+			})
+
+		},
+		onChange(event) {
+			console.log('触发切换tabbar')
+			this.setData({ active: event.detail });
+			const list = Object.assign([], this.data.list)
+			list[event.detail].icon =
+				this.setData({
+					list
+				})
+			wx.switchTab({
+				url: this.data.list[event.detail].url
+			});
+		},
+
+		init() {
+			const page = getCurrentPages().pop();
+			console.log(this.data.list)
+			const active = this.data.list.findIndex(item => item.pagePath === `/${page.route}`)
+			console.log(active, page.route)
+			this.setData({
+				active: active
+			});
+		}
+	}
+});

+ 6 - 0
src/custom-tab-bar/index.json

@@ -0,0 +1,6 @@
+{
+	"component": true,
+	"usingComponents": {
+
+	}
+}

+ 15 - 0
src/custom-tab-bar/index.wxml

@@ -0,0 +1,15 @@
+<!--miniprogram/custom-tab-bar/index.wxml-->
+<view class="ipone">
+<view class="tab-bar">
+  <view class="tab-bar-border"></view>
+  <view wx:for="{{list}}" wx:key="index" hidden="{{!isBazi&&index==1}}" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab">
+  <view>
+      <image src="{{active === index ? item.selectedIconPath : item.iconPath}}"></image>
+    <view style="color: {{active === index ? selectedColor : color}}">{{item.text}}</view>
+  </view>
+ 
+
+  </view>
+</view>
+</view>
+

+ 47 - 0
src/custom-tab-bar/index.wxss

@@ -0,0 +1,47 @@
+.ipone{
+ padding-bottom: constant(safe-area-inset-bottom);
+padding-bottom: env(safe-area-inset-bottom);
+position: fixed;
+  bottom: 0;
+  left: 0;
+  right: 0;
+   background: white;
+   z-index:999;
+}
+.tab-bar {
+  
+  height: 48px;
+  background: white;
+  display: flex;
+
+
+}
+
+.tab-bar-border {
+  background-color: rgba(0, 0, 0, 0.33);
+  position: absolute;
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 1px;
+  transform: scaleY(0.5);
+}
+
+.tab-bar-item {
+  flex: 1;
+  text-align: center;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  flex-direction: column;
+  height:100%;
+}
+
+.tab-bar-item image {
+  width: 27px;
+  height: 27px;
+}
+
+.tab-bar-item view {
+  font-size: 10px;
+}

+ 1 - 1
src/manifest.json

@@ -51,7 +51,7 @@
         "usingComponents":true,
         "appid": "wxd14b31479ff7bfbc",
         "setting" : {
-        	"urlCheck" : true
+        	"urlCheck" : false
         }
     },
     "mp-alipay" : {

+ 15 - 14
src/pages.json

@@ -1,21 +1,21 @@
 {
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
 		{
-			"path": "pages/home/index",
+			"path": "pages/future/index",
 			"style": {
-				"navigationBarTitleText": "首页"
+				"navigationBarTitleText": "人生报告"
 			}
 		},
 		{
-			"path": "pages/user/index",
+			"path": "pages/home/index",
 			"style": {
-				"navigationBarTitleText": "我的"
+				"navigationBarTitleText": "首页"
 			}
 		},
 		{
-			"path": "pages/future/index",
+			"path": "pages/user/index",
 			"style": {
-				"navigationBarTitleText": "人生报告"
+				"navigationBarTitleText": "我的"
 			}
 		},
 		{
@@ -41,11 +41,18 @@
 			"style": {
 				"navigationBarTitleText": "基础知识"
 			}
-		},{
+		},
+		{
 			"path": "pages/updateUser/index",
 			"style": {
 				"navigationBarTitleText": "个人信息"
 			}
+		},
+		{
+			"path": "pages/createReferCode/index",
+			"style": {
+				"navigationBarTitleText": "推广码"
+			}
 		}
 	],
 	"tabBar": {
@@ -55,17 +62,11 @@
 		"borderStyle": "white",
 		"backgroundColor": "#ffffff",
 		"list": [
-			{
-				"pagePath": "pages/home/index",
-				"iconPath": "static/icon/主页空心@2x.png",
-				"selectedIconPath": "static/icon/主页实心@2x.png",
-				"text": "主页"
-			},
 			{
 				"pagePath": "pages/future/index",
 				"iconPath": "static/icon/排盘空心@2x.png",
 				"selectedIconPath": "static/icon/排盘实心@2x.png",
-				"text": "排盘"
+				"text": "人生报告"
 			},
 			{
 				"pagePath": "pages/user/index",

Fichier diff supprimé car celui-ci est trop grand
+ 17 - 0
src/pages/createReferCode/index.vue


+ 19 - 18
src/pages/forecast/index.vue

@@ -24,7 +24,7 @@
 
         </view>
         <!-- <button @click="pay">支付</button> -->
-        <view class="categorys">
+        <view class="categorys" :class="{'hidden':baZiIsPay!='1'}">
             <view style="width:100%">
                 <view class="categorys-item" :key="index" v-for="(item, index) in categorys">
                     <view :data-theme="theme" @click="() => {
@@ -41,7 +41,7 @@
 
         </view>
 
-        <view :data-theme="theme" v-if="goodsStatus.isPay == 0" @click="pay" class="pay">
+        <view :data-theme="theme"  v-if="goodsStatus.isPay == 0&&baZiIsPay=='1'" @click="pay" class="pay">
             <view class="pay-button"> 开通会员立即查看</view>
         </view>
         <scroll-view :scroll-into-view="currentPoint" :scroll-with-animation="false" :scroll-y="true" class="content">
@@ -165,7 +165,7 @@
                 </view>
             </view>
 
-            <view id="grtd" class="result">
+            <view id="grtd" class="result" :class="{'hidden':baZiIsPay!='1'}">
                 <img mode="widthFix" class="imgCircle" src="https://ndata.zzxcx.net/xpgx-xcx/forecast/circle.png">
                 <view :data-theme="theme" class="imgTitle"><text>个</text><text>人</text><text>特</text><text>点</text></view>
                 <img mode="widthFix" class="imgHeader"
@@ -189,7 +189,7 @@
             </view>
             <view style="width: 100%;height: 35rpx;"></view>
 
-            <view id="cyfx" class="result">
+            <view id="cyfx" class="result" :class="{'hidden':baZiIsPay!='1'}">
                 <img mode="widthFix" class="imgCircle" src="https://ndata.zzxcx.net/xpgx-xcx/forecast/circle.png">
                 <view :data-theme="theme" class="imgTitle"><text>财</text><text>运</text><text>分</text><text>析</text></view>
                 <img mode="widthFix" class="imgHeader"
@@ -213,7 +213,7 @@
                     :src="'https://ndata.zzxcx.net/xpgx-xcx/forecast/reportBg/bg_' + theme + '_bottom@2x.png'" />
             </view>
             <view style="width: 100%;height: 35rpx;"></view>
-            <view id="hyqg" class="result">
+            <view id="hyqg" class="result" :class="{'hidden':baZiIsPay!='1'}">
                 <img mode="widthFix" class="imgCircle" src="https://ndata.zzxcx.net/xpgx-xcx/forecast/circle.png">
                 <view :data-theme="theme" class="imgTitle"><text>婚</text><text>姻</text><text>情</text><text>感</text></view>
                 <img mode="widthFix" class="imgHeader"
@@ -237,7 +237,7 @@
                 <img mode="widthFix" class="imgFooter"
                     :src="'https://ndata.zzxcx.net/xpgx-xcx/forecast/reportBg/bg_' + theme + '_bottom@2x.png'" />
             </view>
-            <view id="zngx" class="result">
+            <view id="zngx" class="result" :class="{'hidden':baZiIsPay!='1'}">
                 <img mode="widthFix" class="imgCircle" src="https://ndata.zzxcx.net/xpgx-xcx/forecast/circle.png">
                 <view :data-theme="theme" class="imgTitle"><text>子</text><text>女</text><text>关</text><text>系</text></view>
                 <img mode="widthFix" class="imgHeader"
@@ -262,7 +262,7 @@
                     :src="'https://ndata.zzxcx.net/xpgx-xcx/forecast/reportBg/bg_' + theme + '_bottom@2x.png'" />
             </view>
             <view style="width: 100%;height: 35rpx;"></view>
-            <view id="wxpy" class="result">
+            <view id="wxpy" class="result" :class="{'hidden':baZiIsPay!='1'}">
                 <img mode="widthFix" class="imgCircle" src="https://ndata.zzxcx.net/xpgx-xcx/forecast/circle.png">
                 <view :data-theme="theme" class="imgTitle"><text>五</text><text>行</text><text>评</text><text>语</text></view>
                 <img mode="widthFix" class="imgHeader"
@@ -284,7 +284,7 @@
             </view>
 
             <view style="width: 100%;height: 35rpx;"></view>
-            <!-- <view id="csph" class="result">
+            <!-- <view id="csph" class="result" :class="{'hidden':baZiIsPay!='1'}">
                 <img mode="widthFix" class="imgCircle" src="https://ndata.zzxcx.net/xpgx-xcx/forecast/circle.png">
                 <view :data-theme="theme" class="imgTitle"><text>潮</text><text>湿</text><text>平</text><text>衡</text></view>
                 <img mode="widthFix" class="imgHeader"
@@ -302,7 +302,7 @@
             </view> -->
 
             <view style="width: 100%;height: 35rpx;"></view>
-            <view id="xysz" class="result">
+            <view id="xysz" class="result" :class="{'hidden':baZiIsPay!='1'}">
                 <img mode="widthFix" class="imgCircle" src="https://ndata.zzxcx.net/xpgx-xcx/forecast/circle.png">
                 <view :data-theme="theme" class="imgTitle"><text>喜</text><text>用</text><text>数</text><text>字</text></view>
                 <img mode="widthFix" class="imgHeader"
@@ -351,7 +351,7 @@
             </view>
 
             <view style="width: 100%;height: 35rpx;"></view>
-            <view id="gjpq" class="result">
+            <view id="gjpq" class="result" :class="{'hidden':baZiIsPay!='1'}">
                 <img mode="widthFix" class="imgCircle" src="https://ndata.zzxcx.net/xpgx-xcx/forecast/circle.png">
                 <view :data-theme="theme" class="imgTitle"><text>格</text><text>局</text><text>脾</text><text>气</text></view>
                 <img mode="widthFix" class="imgHeader"
@@ -376,7 +376,7 @@
             </view>
 
             <view style="width: 100%;height: 35rpx;"></view>
-            <view id="cgpy" class="result">
+            <view id="cgpy" class="result" :class="{'hidden':baZiIsPay!='1'}">
                 <img mode="widthFix" class="imgCircle" src="https://ndata.zzxcx.net/xpgx-xcx/forecast/circle.png">
                 <view :data-theme="theme" class="imgTitle"><text>称</text><text>骨</text><text>评</text><text>语</text></view>
                 <img mode="widthFix" class="imgHeader"
@@ -406,7 +406,7 @@
             </view>
 
             <view style="width: 100%;height: 35rpx;"></view>
-            <view id="jkyf" class="result">
+            <view id="jkyf" class="result" :class="{'hidden':baZiIsPay!='1'}">
                 <img mode="widthFix" class="imgCircle" src="https://ndata.zzxcx.net/xpgx-xcx/forecast/circle.png">
                 <view :data-theme="theme" class="imgTitle"><text>健</text><text>康</text><text>预</text><text>防</text></view>
                 <img mode="widthFix" class="imgHeader"
@@ -433,7 +433,7 @@
             </view>
 
             <view style="width: 100%;height: 35rpx;"></view>
-            <view id="xyfw" class="result">
+            <view id="xyfw" class="result" :class="{'hidden':baZiIsPay!='1'}">
                 <img mode="widthFix" class="imgCircle" src="https://ndata.zzxcx.net/xpgx-xcx/forecast/circle.png">
                 <view :data-theme="theme" class="imgTitle"><text>喜</text><text>用</text><text>方</text><text>位</text></view>
                 <img mode="widthFix" class="imgHeader"
@@ -458,7 +458,7 @@
             </view>
 
             <view style="width: 100%;height: 35rpx;"></view>
-            <view id="mzgr" class="result">
+            <view id="mzgr" class="result" :class="{'hidden':baZiIsPay!='1'}">
                 <img mode="widthFix" class="imgCircle" src="https://ndata.zzxcx.net/xpgx-xcx/forecast/circle.png">
                 <view :data-theme="theme" class="imgTitle"><text>命</text><text>中</text><text>贵</text><text>人</text></view>
                 <img mode="widthFix" class="imgHeader"
@@ -481,7 +481,7 @@
                     :src="'https://ndata.zzxcx.net/xpgx-xcx/forecast/reportBg/bg_' + theme + '_bottom@2x.png'" />
             </view>
             <view style="width: 100%;height: 35rpx;"></view>
-            <view id="tjhy" class="result">
+            <view id="tjhy" class="result" :class="{'hidden':baZiIsPay!='1'}">
                 <img mode="widthFix" class="imgCircle" src="https://ndata.zzxcx.net/xpgx-xcx/forecast/circle.png">
                 <view :data-theme="theme" class="imgTitle"><text>推</text><text>荐</text><text>行</text><text>业</text></view>
                 <img mode="widthFix" class="imgHeader"
@@ -504,7 +504,7 @@
             </view>
 
 
-            <!-- <view class="result">
+            <!-- <view class="result" :class="{'hidden':baZiIsPay!='1'}">
                 <img mode="widthFix" class="imgCircle" src="https://ndata.zzxcx.net/xpgx-xcx/forecast/circle.png">
                 <view :data-theme="theme" class="imgTitle"><text>十</text><text>神</text><text>评</text><text>语</text></view>
                 <img mode="widthFix" class="imgHeader" :src="'https://ndata.zzxcx.net/xpgx-xcx/forecast/reportBg/bg_'+theme+'_top@2x.png'" />
@@ -533,7 +533,7 @@
                 <img mode="widthFix" class="imgFooter" :src="'https://ndata.zzxcx.net/xpgx-xcx/forecast/reportBg/bg_'+theme+'_bottom@2x.png'" />
             </view> -->
             <!-- <view style="width: 100%;height: 35rpx;"></view>
-            <view class="result">
+            <view class="result" :class="{'hidden':baZiIsPay!='1'}">
                 <img mode="widthFix" class="imgCircle" src="https://ndata.zzxcx.net/xpgx-xcx/forecast/circle.png">
                 <view :data-theme="theme" class="imgTitle"><text>五</text><text>行</text><text>评</text><text>语</text></view>
                 <img mode="widthFix" class="imgHeader" :src="'https://ndata.zzxcx.net/xpgx-xcx/forecast/reportBg/bg_'+theme+'_top@2x.png'" />
@@ -569,6 +569,7 @@ import mNumberBlur from '@/components/m-number-blur/m-number-blur.vue'
 export default Vue.extend({
     data() {
         return {
+            baZiIsPay: uni.getStorageSync("IS_BAZI")||'0',
             currentPoint: 'bzmp',
             theme: 'yellow',
             title: '国学',
@@ -901,7 +902,7 @@ export default Vue.extend({
             }).then(res => {
                 wx.requestPayment({
                     ...res.data.data,
-                    success: (res: any) => {
+                    complete: (res: any) => {
                         uni.showToast({
                             title: '查询支付结果',
                             icon: 'loading',

+ 211 - 18
src/pages/forecastHistory/index.vue

@@ -3,18 +3,26 @@
         <view class="bg">
             <view class="list">
                 <view class="content">
-                    <view class="item">
+                    <view v-for="(item, index) in list" :key="index" class="item">
                         <view>
-                            阮琳琳 女 1993年4月21日
-                            <image class="item-vip" mode="widthFix" src="/static/icon/gold_vip@2x.png"></image>
+                            <text @click="goForecast(item)">{{ item.name }} {{ item.sex == '1' ? '男' : '女' }} {{
+                                item.birthday }}</text>
+                            <image v-if="item.isPay == 2" class="item-vip" mode="widthFix"
+                                src="/static/icon/gold_vip@2x.png">
+                            </image>
+                            <image v-if="item.isPay == 1" class="item-vip" mode="widthFix"
+                                src="/static/icon/gray_vip@2x.png">
+                            </image>
 
                         </view>
                         <view>
-                            <image mode="widthFix" class="item-del" src="/static/icon/del@2x.png"></image>
+                            <image @click="delSingleHistory(item.id)" mode="widthFix" class="item-del"
+                                src="/static/icon/del@2x.png"></image>
+
                         </view>
 
                     </view>
-                    <view class="item">
+                    <!-- <view class="item">
                         <view>
                             夏初 女 1993年4月21日
                             <image class="item-vip" mode="widthFix" src="/static/icon/gold_vip@2x.png"></image>
@@ -24,33 +32,174 @@
                             <image mode="widthFix" class="item-del" src="/static/icon/del@2x.png"></image>
                         </view>
 
-                    </view>
+                    </view> -->
                 </view>
             </view>
-            <view class="buttons">
-                <view class="pre">
+            <view class="bottom">
+                <view @click="getPrePage()" class="pre">
                     上一页
                 </view>
                 <view class="mid">
-                    1/1
+                    {{ pageNum }}/ {{ maxPageNum }}
                 </view>
-                <view class="next">
+                <view @click="getNextPage()" class="next">
                     下一页
                 </view>
             </view>
+
         </view>
+        <van-popup round close-on-click-overlay safe-area-tab-bar :show="wxadWatchTip">
+            <view class="wxad">
+                <image style="width: 100%;" src="https://ndata.zzxcx.net/ctjk/mp-wx/future/wxad_bg@2x.png" mode="widthFix">
+                </image>
+                <view class="buttons">
+                    <view @click="watchWxAd()" class="button1">
+                        <van-icon custom-style="margin-right:10rpx;" color="#A21D0F" name="video-o" /><text>看广告免费领取</text>
+                    </view>
+                    <view @click="() => {
+                        wxadWatchTip = false
+                    }" class="button2">
+                        <van-icon custom-style="margin-right:10rpx;" color="#B35B23" name="close" />取消
+                    </view>
+                </view>
+            </view>
+        </van-popup>
     </view>
 </template>
 
-<script lang="ts">
-import Vue from 'vue';
-export default Vue.extend({
+<script>
+import api from '@/api'
+export default {
     data() {
         return {
+            list: [],
+            total: 1,
+            pageNum: 1,
+            wxadWatchTip: false,
+            currentItem:{
+
+            }
+
 
         }
     },
-})
+    computed: {
+        maxPageNum() {
+            return Math.ceil(this.total / 10)
+        }
+    },
+    methods: {
+        watchWxAd() {
+            let that = this
+            let videoAd = null;
+            if (wx.createRewardedVideoAd) {
+                videoAd = wx.createRewardedVideoAd({
+                    adUnitId: "adunit-f0e94618f34d4baf",
+                });
+                videoAd.onLoad(() => {
+
+                });
+                videoAd.onError((err) => {
+                    console.log(err)
+                });
+                videoAd.offClose();
+                videoAd.onClose((res) => {
+
+                    if (!res.isEnded) {
+                        return
+                    }
+                    that.wxadWatchTip = false
+                    uni.navigateTo({
+                        url: `/pages/forecast/index?birthday=${that.currentItem.birthday}&sex=${that.currentItem.sex}&username=${that.currentItem.name}`,
+
+                    })
+                });
+                videoAd.show().catch(() => {
+                    // 失败重试
+                    videoAd
+                        .load()
+                        .then(() => videoAd.show())
+                        .catch((err) => {
+                            console.log("激励视频 广告显示失败");
+                        });
+                });
+            } else if (res.cancel) {
+                console.log('用户点击取消')
+            }
+        },
+        goForecast(item) {
+            let that = this
+            let videoAd = null;
+            that.currentItem = item
+            // if (item.isPay == 0) {
+            //     that.wxadWatchTip = true
+            //     return
+
+            // }
+
+            uni.navigateTo({
+                url: `/pages/forecast/index?birthday=${item.birthday}&sex=${item.sex}&username=${item.name}`,
+
+            })
+
+        },
+        delSingleHistory(id) {
+            let that = this
+            uni.showModal({
+                title: '提示',
+                content: '是否删除该记录',
+                success: function (res) {
+                    if (res.confirm) {
+                        api.order.studentBirthdayLogIds(id).then(res => {
+                            that.getPage()
+
+                        })
+                    } else if (res.cancel) {
+                        console.log('用户点击取消');
+                    }
+                }
+            })
+
+
+        },
+        getNextPage() {
+            if (this.maxPageNum == this.pageNum) {
+                uni.showToast({
+                    title: '到底了',
+                    icon: 'none'
+                })
+                return
+            }
+            this.pageNum++
+            this.getPage()
+        },
+        getPrePage() {
+            if (this.pageNum == 1) {
+                uni.showToast({
+                    title: '到底了',
+                    icon: 'none'
+                })
+                return
+            }
+            this.pageNum--
+            this.getPage()
+
+        },
+        getPage() {
+        
+            api.birthday.studentBirthdayLogList({
+                pageNum: this.pageNum,
+                pageSize: 10,
+            }).then(res => {
+                this.list = res.data.rows
+                this.total = res.data.total
+            })
+        }
+    },
+    onLoad() {
+        this.getPage()
+    }
+}
 </script>
 
 <style lang="less" scoped>
@@ -61,6 +210,47 @@ export default Vue.extend({
     padding-bottom: 90rpx;
 }
 
+.wxad {
+    width: 580rpx;
+    position: relative;
+
+    .buttons {
+        position: absolute;
+        top: 478rpx;
+        display: flex;
+        justify-content: center;
+        height: 202rpx;
+        width: 100%;
+        flex-wrap: wrap;
+
+        .button1 {
+            width: 412rpx;
+            background-image: url('https://ndata.zzxcx.net/ctjk/mp-wx/future/wxad_button1_bg@2x.png');
+            height: 80rpx;
+            background-size: 100% 100%;
+            line-height: 80rpx;
+            font-size: 34rpx;
+            text-align: center;
+            color: #A21D0F;
+            font-weight: bold;
+            border-radius: 20rpx;
+        }
+
+        .button2 {
+            width: 412rpx;
+            height: 80rpx;
+            background-color: #F8D5BA;
+            color: #B35B23;
+            font-size: 34rpx;
+            font-weight: bold;
+            line-height: 80rpx;
+            text-align: center;
+            border-radius: 20rpx;
+
+        }
+    }
+}
+
 .list {
     padding: 0 30rpx;
     padding-top: 50rpx;
@@ -69,7 +259,7 @@ export default Vue.extend({
     .content {
         width: 100%;
         background-color: #fff;
-        height: 160vw;
+        height: 120vw;
         padding: 0 30rpx;
 
         .item {
@@ -83,11 +273,13 @@ export default Vue.extend({
             align-items: center;
             align-content: center;
             justify-content: space-between;
-            view{
+
+            view {
                 display: flex;
                 align-items: center;
                 align-content: center;
             }
+
             .item-vip {
                 width: 40rpx;
                 margin-left: 20rpx;
@@ -102,7 +294,7 @@ export default Vue.extend({
 
 }
 
-.buttons {
+.bottom {
     width: 690rpx;
     margin: 0 auto;
     border: 4rpx solid #FDE575;
@@ -142,4 +334,5 @@ export default Vue.extend({
     }
 
 
-}</style>
+}
+</style>

Fichier diff supprimé car celui-ci est trop grand
+ 18 - 12
src/pages/future/index.vue


+ 9 - 3
src/pages/home/index.vue

@@ -70,10 +70,10 @@ export default {
     methods: {
         sendUserInfo() {
             api.user.userInfoUserInfo(this.userInfo).then(res => {
-                this.userFormShow=false
+                this.userFormShow = false
                 api.user.userInfoGetUserInfo().then(res => {
                     this.userInfo = res.data.data
-                    uni.setStorageSync('userInfo',this.userInfo)
+                    uni.setStorageSync('userInfo', this.userInfo)
                 })
 
             })
@@ -98,7 +98,7 @@ export default {
                     uni.setStorageSync("token", res.data.data.token)
                     api.user.userInfoGetUserInfo().then(res => {
                         this.userInfo = res.data.data
-                        uni.setStorageSync('userInfo',this.userInfo)
+                        uni.setStorageSync('userInfo', this.userInfo)
                     })
                     // api.user.userInfoGetWxacodeunLimit().then(result => {
                     //     this.codeImg = "data:image/png;base64," + result.data.data
@@ -112,6 +112,12 @@ export default {
         })
 
 
+    },
+    onShow() {
+        if (typeof this.$mp.page.getTabBar === 'function' &&
+            this.$mp.page.getTabBar()) {
+            this.$mp.page.getTabBar().init()
+        }
     }
 
 }

+ 1 - 1
src/pages/updateUser/index.vue

@@ -64,7 +64,7 @@ export default {
     methods: {
         sendUserInfo() {
 
-            if (/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.userInfo.phone)) {
+            if (/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/g.test(this.userInfo.phone)) {
                 api.user.userInfoUserInfo(this.userInfo).then(res => {
                     this.userFormShow = false
                     api.user.userInfoGetUserInfo().then(res => {

Fichier diff supprimé car celui-ci est trop grand
+ 9 - 8
src/pages/user/index.vue


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff