feat: 关于我们

This commit is contained in:
huxiaoshuang
2022-11-22 18:03:39 +08:00
parent 277bf91838
commit fda468d7a9
8 changed files with 67 additions and 30 deletions

View File

@@ -10,6 +10,8 @@ export default {
"pages/mountainPeak/index",
"pages/my/index",
"pages/my/components/Version/index",
"pages/my/components/AbountUs/index",
],
permission: {
"scope.userLocation": {

View File

@@ -54,7 +54,7 @@ const ActiveCard = (props: any) => {
<View className="btn">
{/* 活动状态 0 待开放 1开放中 2已取消 3进行中 4已结束 5已关闭 */}
<Button plain hairline type="primary">
{`立即报名`}
{`立即查看`}
</Button>
</View>
</View>

View File

@@ -0,0 +1,17 @@
import { View } from "@tarojs/components";
import react, { useEffect } from "react";
import { Collapse, CollapseItem, Toast } from "@antmjs/vantui";
import "./index.scss";
const AbountUs = () => {
useEffect(() => {
// 设置标题
definePageConfig({
navigationBarTitleText: "关于我们",
});
}, []);
return <View>AbountUs</View>;
};
export default AbountUs;

View File

@@ -16,7 +16,15 @@ import "./index.module.scss";
import { Tab, Tabs } from "@antmjs/vantui";
import Taro from "@tarojs/taro";
import ActiveCard from "../components/ActiveCard";
import { addTable, getOpenid, getTable, getTableid, isLogin, phoneLogin, updateTableid } from "../../utils/index";
import {
addTable,
getOpenid,
getTable,
getTableid,
isLogin,
phoneLogin,
updateTableid,
} from "../../utils/index";
const my = (props: any) => {
// const [active, setActive] = react.useState(props?.active ?? 0);
@@ -24,7 +32,7 @@ const my = (props: any) => {
const [userInfo, setuserInfo] = useState({}); //用户信息
const [detailsData, setdetailsData] = useState<any>([]); //活动详情
const [currentIndex, setcurrentIndex] = useState(0);
const [isin, setisin] = useState(true); //0初始 1未登录 2有手机号
const [isin, setisin] = useState(true); //0初始 1未登录 2有手机号
useEffect(() => {
getok();
@@ -37,7 +45,7 @@ const my = (props: any) => {
const getok = async () => {
let isOk: any = await phoneLogin();
console.log("isok", isOk);
setisin(isOk)
setisin(isOk);
// setisin(isOk?'2':'1');
};
@@ -53,30 +61,30 @@ const my = (props: any) => {
.then((res: any) => {
console.log("res222", res);
let phoneNumber = res?.result?.event?.weRunData?.data?.phoneNumber;
let tencentcloud_uin=res?.result?.context?.tencentcloud_uin
let openId:any=res?.result?.event?.userInfo?.openId
let postData={
tableName:'userInfo',
let tencentcloud_uin = res?.result?.context?.tencentcloud_uin;
let openId: any = res?.result?.event?.userInfo?.openId;
let postData = {
tableName: "userInfo",
keyValue: { openId: openId },
okFun:((res:any)=>{
console.log('q',res)
okFun: (res: any) => {
console.log("q", res);
updateTableid({
id:res?.data?.[0]?._id,
tableName:"userInfo",
objData:{
tencentcloud_uin:tencentcloud_uin, //微信号
authInfo:{
authPhonenum:phoneNumber //手机号
}
id: res?.data?.[0]?._id,
tableName: "userInfo",
objData: {
tencentcloud_uin: tencentcloud_uin, //微信号
authInfo: {
authPhonenum: phoneNumber, //手机号
},
},
okFun:(res:any)=>{
getok()
}
})
})
}
getTable({...postData})
okFun: (res: any) => {
getok();
},
});
},
};
getTable({ ...postData });
// setisin(true);
});
};
@@ -211,8 +219,18 @@ const my = (props: any) => {
});
}}
/>
<Cell icon="friends" title="关于我们" isLink />
<Cell
icon="friends"
title="关于我们"
isLink
onClick={() => {
// 跳转到目的页面,打开新页面
Taro.navigateTo({
url: "/pages/my/components/AbountUs/index",
});
}}
/>
{/* <Cell
icon="setting"
title="版本日志"
isLink
@@ -222,7 +240,7 @@ const my = (props: any) => {
url: "/pages/my/components/Version/index",
});
}}
/>
/> */}
</View>
{/* tabbar */}