JXDS18FUJT 1 年間 前
コミット
b4700abdc3

+ 14 - 0
src/api/birthday/index.ts

@@ -0,0 +1,14 @@
+import request from "../request";
+export default {
+    studentBirthdayLog(data: {
+        birthday: string,
+        name: string,
+        sex: number
+    }) {
+        return request({
+            data,
+            method: 'POST',
+            url: "/student/birthday/log",
+        })
+    }
+}

+ 6 - 2
src/api/index.ts

@@ -1,8 +1,12 @@
 import login from "./login";
 import openApi from "./openApi";
 import user from "./user";
-export default{
+import wx from './wx'
+import birthday from "./birthday";
+export default {
     login,
     openApi,
-    user
+    user, 
+    wx,
+    birthday
 }

+ 16 - 0
src/api/wx/index.ts

@@ -0,0 +1,16 @@
+import { Axios, AxiosPromise } from "axios";
+import request from "../request";
+export default {
+    studentWxXcxPrepareOrder(data:{
+        foreType:number,
+        goodsId:number,
+        goodsType:number,
+        phoneType:number
+    }){
+        return request({
+            data,
+            method: 'POST',
+            url: "/student/wx/xcxPrepareOrder",
+        })
+    }
+}

+ 9 - 0
src/api/wx/type.d.ts

@@ -0,0 +1,9 @@
+interface commonRes {
+    code: number
+    msg: string
+
+}
+export declare namespace wxRes {
+    
+
+}

+ 39 - 2
src/pages.json

@@ -6,6 +6,12 @@
 				"navigationBarTitleText": "首页"
 			}
 		},
+		{
+			"path": "pages/user/index",
+			"style": {
+				"navigationBarTitleText": "我的"
+			}
+		},
 		{
 			"path": "pages/future/index",
 			"style": {
@@ -35,11 +41,42 @@
 			"style": {
 				"navigationBarTitleText": "基础知识"
 			}
+		},{
+			"path": "pages/updateUser/index",
+			"style": {
+				"navigationBarTitleText": "个人信息"
+			}
 		}
 	],
+	"tabBar": {
+		"custom": false,
+		"color": "#3D3D3D",
+		"selectedColor": "#B08A4A",
+		"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": "排盘"
+			},
+			{
+				"pagePath": "pages/user/index",
+				"iconPath": "static/icon/我的空心@2x.png",
+				"selectedIconPath": "static/icon/我的实心@2x.png",
+				"text": "我的"
+			}
+		]
+	},
 	"easycom": {
 		"autoscan": true
-	
 	},
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
@@ -85,7 +122,7 @@
 			"van-nav-bar": "wxcomponents/vant/nav-bar/index",
 			"van-action-sheet": "wxcomponents/vant/action-sheet/index",
 			"van-uploader": "wxcomponents/vant/uploader/index"
-		  }
+		}
 	},
 	"condition": {
 		"current": 0,

+ 64 - 69
src/pages/forecast/index.vue

@@ -1,21 +1,8 @@
 <template>
     <view :data-theme="theme" class="bg">
-        <!-- <view class="categorys">
-            <view style="width:100%">
-                <view class="categorys-item" v-for="item in categorys">
-                    <view :data-theme="theme" @click="() => {
-                        currentPoint = item.point
-                    }" :class="{
-    'categorys-item-text_selected': currentPoint == item.point
-}" class="categorys-item-text">{{ item.text }}</view>
-                    <view :data-theme="theme" :class="{
-                        'categorys-item-mark_selected': currentPoint == item.point
-                    }" class="categorys-item-mark"></view>
-                </view>
-                <view class=""></view>
-            </view>
-
-        </view> -->
+        <view :data-theme="theme"  @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">
             <view id="bzmp" class="user">
                 <view style="width:50%">
@@ -427,58 +414,6 @@
                 <img mode="widthFix" class="imgFooter"
                     :src="'https://ndata.zzxcx.net/xpgx-xcx/forecast/reportBg/bg_' + theme + '_bottom@2x.png'" />
             </view>
-
-
-            <!-- <view class="result">
-                <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'" />
-                <view class="result-content ">
-                    
-                    <view class="result-desc">
-                        {{ userData.reportMap['缺失十神评语'] }}
-
-
-                    </view> -->
-            <!-- <view class="result-disease">
-                        <view v-for="(item,index) in userData.diseasePartList" class="">
-                            <text style="color: #006494;"> {{ item.part }}:</text>
-                            <text>({{ item.degree }}) {{ item.symp }}</text>
-                        </view>
-                    </view> -->
-
-            <!-- <view class="result-pay">开通会员立即查看</view> -->
-            <!-- <view class="result-pay">开通会员立即查看</view> -->
-            <!-- <img  mode="widthFix" src="https://ndata.zzxcx.net/xpgx-xcx/forecast/bg_middle.png" /> -->
-            <!-- <view class="result-content-border1">
-                        <view class="result-content-border2">
-                        </view>
-                    </view> -->
-            <!-- </view>
-                <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">
-                <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'" />
-                <view class="result-content ">
-                    <view class="result-desc">
-                        当我们关注身体健康时,了解各宫位的能量分布可以帮助我们判断可能出现的疾病。请特别留意以下身体部位可能存在的问题,并在早期进行检查,以便及时预防。
-
-
-                    </view>
-                    <view class="result-disease">
-                        <view v-for="(item, index) in userData.diseasePartList" class="">
-                            <text style="color: #006494;"> {{ item.part }}:</text>
-                            <text>({{ item.degree }}) {{ item.symp }}</text>
-                        </view>
-                    </view>
-
-                
-                </view>
-                <img mode="widthFix" class="imgFooter" :src="'https://ndata.zzxcx.net/xpgx-xcx/forecast/reportBg/bg_'+theme+'_bottom@2x.png'" />
-            </view> -->
         </scroll-view>
     </view>
 </template>
@@ -758,6 +693,11 @@ export default Vue.extend({
                 ganZhiKongWangVoList: [{ kongWang: '', zhu: '' }, { kongWang: '', zhu: '' }, { kongWang: '', zhu: '' }, { kongWang: '', zhu: '' }]
 
 
+            },
+            goodsStatus:{
+                id:0,
+                isPay:0
+
             }
         }
     },
@@ -767,7 +707,15 @@ export default Vue.extend({
         this.form.sex = Number(query.sex) || this.form.sex
         this.form.birthday = decodeURIComponent(query.birthday || this.form.birthday)
         uni.showLoading()
+        api.birthday.studentBirthdayLog({
+            birthday:query.birthday,
+            name:query.username,
+            sex:query.sex
+            
+        }).then(res=>{
+            this.goodsStatus.id = res.data.data
 
+        })
         api.openApi.openApiGanZhiGet8ziByDate(this.form).then(res => {
             this.userData = responseDecorator.get8ziByDateDecorator(res.data.data)
             this.theme = this.userData.ganZhiProRowVoList[2][0].enColor
@@ -779,7 +727,14 @@ export default Vue.extend({
 
     },
     methods: {
-
+        pay(){
+            api.wx.studentWxXcxPrepareOrder({
+                foreType:2,
+                goodsId:1,
+                goodsType:1,
+                phoneType:1
+            })
+        }
     }
 });
 </script>
@@ -788,7 +743,47 @@ export default Vue.extend({
 .bg {
     width: 100vw;
     height: 100vh;
+   
+
+}
+.pay {
+    width: 100%;
+    height: auto;
+    position: fixed;
+    bottom: 0rpx;
+    z-index: 999;
+    display: flex;
+    align-items: center;
+    align-content: center;
+
+    padding-bottom: constant(safe-area-inset-bottom); //为底下圆弧的高度 34px
+    padding-bottom: env(safe-area-inset-bottom); //为底下圆弧的高度 34px
+
+    .pay-button {
+        margin: 15rpx auto;
+        border: 4rpx solid #333333;
+        background: #E74D26;
+        width: 400rpx;
+        line-height: 80rpx;
+        border-radius: 10px;
+        color: #F5EC5A;
+        text-align: center;
+
+
+    }
 
+    // 
+    // margin-top: 40rpx;
+    // 
+    // 
+    // 
+    // 
+    // 
+    // 
+    // 
+    // 
+    // left: 50%;
+    // transform: translateX(-50%);
 }
 
 [data-theme=blue].bg {

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

@@ -53,7 +53,7 @@
     </div>
 </template>
 
-<script lang="ts">
+<script>
 import api from '@/api/index'
 export default {
     data() {
@@ -78,7 +78,7 @@ export default {
 
             })
         },
-        changeUserName(e: any) {
+        changeUserName(e) {
             console.log(e);
             this.userInfo.nickName = e.detail.value;
         },
@@ -86,9 +86,7 @@ export default {
     components: {
 
     },
-    onLoad(query: {
-        scene?: string
-    }) {
+    onLoad(query) {
         console.log(query)
         uni.login({
             success: res => {

+ 10 - 0
src/pages/knowledge/index.vue

@@ -14,6 +14,7 @@
             </div>
 
         </div>
+        <button @click="openVideo">视频号</button>
     </div>
 </template>
 
@@ -37,6 +38,15 @@ export default {
             }]
         }
     },
+    methods: {
+        openVideo() {
+            wx.openChannelsActivity({
+                finderUserName:'nRlDS6O4tKp9hIb',
+                feedId:''
+            })
+            
+        }
+    },
 
 }
 </script>

+ 151 - 0
src/pages/updateUser/index.vue

@@ -0,0 +1,151 @@
+<template>
+    <div class="bg">
+        <div class="content">
+            <div @click="() => {
+                userFormShow = true
+            }" class="nickname">
+                <div style="display: flex;align-items: center;height: 100%;">
+                    <image class="headImg" mode="widthFix" src="/static/icon/user_nickname.png"></image>
+                    <div>用户昵称</div>
+                </div>
+                <div style="display: flex;align-items: center;height: 100%;">
+                    <div style="margin-right: 20rpx;">{{ userInfo.nickName }}</div>
+                    <image class="arrow" mode="widthFix" src="/static/icon/user_arrow2@2x.png"></image>
+                </div>
+            </div>
+
+            <div @click="() => {
+                userFormShow = true
+            }" class="nickname">
+                <div style="display: flex;align-items: center;height: 100%;">
+                    <image class="headImg" mode="widthFix" src="/static/icon/user_phone.png"></image>
+                    <div>手机号</div>
+                </div>
+                <div style="display: flex;align-items: center;height: 100%;">
+                    <div style="margin-right: 20rpx;">{{ userInfo.phone }}</div>
+                    <image class="arrow" mode="widthFix" src="/static/icon/user_arrow2@2x.png"></image>
+                </div>
+            </div>
+        </div>
+        <van-popup :z-index="9999" :close-on-click-overlay="true" position="bottom" :show="userFormShow">
+            <view class="userform">
+                <!-- <view></view> -->
+                <view class="userform-close">
+                    <van-icon @click="() => {
+                        userFormShow = false;
+                    }
+                        " color="#a8a8a8" size="18" name="cross" />
+                </view>
+                <view>
+                    <van-field :value="userInfo.nickName" type="nickname" required clearable label="用户名"
+                        @blur="changeUserName" placeholder="请输入用户名" />
+                    <van-field :value="userInfo.phone" clearable label="手机号" placeholder="请绑定手机号" @change="changeUserPhone">
+
+                    </van-field>
+                </view>
+                <view class="userform-bind">
+                    <van-button @click="sendUserInfo" custom-style="width:690rpx;" round type="primary">确定</van-button>
+                </view>
+            </view>
+        </van-popup>
+
+    </div>
+</template>
+
+<script>
+import api from '@/api/index';
+export default {
+    data() {
+        return {
+            userInfo: uni.getStorageSync("userInfo"),
+            userFormShow: false
+        }
+    },
+    methods: {
+        sendUserInfo() {
+
+            if (/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.userInfo.phone)) {
+                api.user.userInfoUserInfo(this.userInfo).then(res => {
+                    this.userFormShow = false
+                    api.user.userInfoGetUserInfo().then(res => {
+                        this.userInfo = res.data.data
+                        uni.setStorageSync('userInfo', this.userInfo)
+                    })
+
+                })
+            }
+            else {
+                uni.showToast({
+                    title: '手机格式错误',
+                    icon: 'error'
+                })
+            }
+
+        },
+        changeUserName(e) {
+            console.log(e);
+            const name =e.detail.value||e.detail
+            this.userInfo.nickName =name;
+        },
+        changeUserPhone(e) {
+            console.log(e);
+            this.userInfo.phone = e.detail;
+
+
+        },
+    },
+
+}
+</script>
+
+<style lang="less" scoped>
+.bg {
+    background-color: #F6ECDB;
+    width: 100vw;
+    min-height: 100vh;
+
+    .content {
+        padding-top: 40rpx;
+        padding-left: 30rpx;
+        padding-right: 30rpx;
+
+        .nickname {
+            padding: 0 30rpx;
+            font-size: 30rpx;
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            height: 140rpx;
+            background-color: #FFFBF5;
+
+            .headImg {
+                width: 80rpx;
+                margin-right: 20rpx;
+            }
+
+            .arrow {
+                width: 16rpx;
+            }
+        }
+    }
+
+    .userform {
+        width: 100%;
+        height: auto;
+        background: #fff;
+
+        .userform-close {
+            text-align: right;
+            padding-right: 15rpx;
+            padding-top: 15rpx;
+        }
+
+        .userform-bind {
+            width: 100%;
+            padding: 30rpx 30rpx;
+            display: flex;
+            justify-content: center;
+        }
+    }
+}
+</style>

ファイルの差分が大きいため隠しています
+ 19 - 0
src/pages/user/index.vue


BIN
src/static/icon/user_arrow1@2x.png


BIN
src/static/icon/user_arrow2@2x.png


BIN
src/static/icon/user_nickname.png


BIN
src/static/icon/user_phone.png


BIN
src/static/icon/主页实心@2x.png


BIN
src/static/icon/主页空心@2x.png


BIN
src/static/icon/我的实心@2x.png


BIN
src/static/icon/我的空心@2x.png


BIN
src/static/icon/排盘实心@2x.png


BIN
src/static/icon/排盘空心@2x.png


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません