feat: 关于我们
This commit is contained in:
2
dist/app.json
vendored
2
dist/app.json
vendored
@@ -1 +1 @@
|
|||||||
{"pages":["pages/home/index","pages/home/components/CheckIn/index","pages/home/components/Certified/index","pages/activityList/index","pages/formSubmit/index","pages/activityList/components/details/index","pages/mountainPeak/index","pages/my/index","pages/my/components/Version/index"],"permission":{"scope.userLocation":{"desc":"你的位置信息将用于小程序位置接口的效果展示"}},"requiredPrivateInfos":["getLocation","chooseLocation"],"window":{"backgroundTextStyle":"light","navigationBarBackgroundColor":"#fff","navigationBarTitleText":"WeChat","navigationBarTextStyle":"black"}}
|
{"pages":["pages/home/index","pages/home/components/CheckIn/index","pages/home/components/Certified/index","pages/activityList/index","pages/formSubmit/index","pages/activityList/components/details/index","pages/mountainPeak/index","pages/my/index","pages/my/components/Version/index","pages/my/components/AbountUs/index"],"permission":{"scope.userLocation":{"desc":"你的位置信息将用于小程序位置接口的效果展示"}},"requiredPrivateInfos":["getLocation","chooseLocation"],"window":{"backgroundTextStyle":"light","navigationBarBackgroundColor":"#fff","navigationBarTitleText":"WeChat","navigationBarTextStyle":"black"}}
|
||||||
2
dist/common.js
vendored
2
dist/common.js
vendored
File diff suppressed because one or more lines are too long
2
dist/pages/my/index.js
vendored
2
dist/pages/my/index.js
vendored
@@ -1,2 +1,2 @@
|
|||||||
/*! For license information please see index.js.LICENSE.txt */
|
/*! For license information please see index.js.LICENSE.txt */
|
||||||
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/my/index"],{"./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/my/index.tsx":function(e,n,t){var o=t("./node_modules/@antmjs/vantui/es/cell/index.js"),a=t("./node_modules/@antmjs/vantui/es/button/index.js"),s=t("./node_modules/@antmjs/vantui/es/image/index.js"),l=t("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),u=t("./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),i=t("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),d=t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),r=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),c=t("webpack/container/remote/react"),m=t("./src/pages/components/TabbarCom/index.tsx"),f=t("webpack/container/remote/@tarojs/taro"),p=t.n(f),x=(t("./src/pages/components/ActiveCard/index.tsx"),t("./src/utils/index.ts")),g=t("webpack/container/remote/react/jsx-runtime");n.default=function my(e){var n=(0,c.useState)({}),t=(0,d.default)(n,2),f=(t[0],t[1],(0,c.useState)([])),v=(0,d.default)(f,2),b=(v[0],v[1],(0,c.useState)(0)),j=(0,d.default)(b,2),h=(j[0],j[1],(0,c.useState)(!0)),k=(0,d.default)(h,2),w=k[0],_=k[1];(0,c.useEffect)((function(){y()}),[]);var y=function(){var e=(0,i.default)((0,u.default)().mark((function _callee(){var e;return(0,u.default)().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,x.phoneLogin)();case 2:e=n.sent,console.log("isok",e),_(e);case 5:case"end":return n.stop()}}),_callee)})));return function getok(){return e.apply(this,arguments)}}();(0,c.useEffect)((function(){}),[]);var N=function getPhoneNumber(e){console.log("点击获取手机事件",e.detail.cloudID),function getLogin(e){p().cloud.callFunction({name:"getPhoneNum",data:{weRunData:p().cloud.CloudID(e.detail.cloudID)}}).then((function(e){var n,t,o,a,s,u,i,d,r;console.log("res222",e);var c=null==e||null===(n=e.result)||void 0===n||null===(t=n.event)||void 0===t||null===(o=t.weRunData)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.phoneNumber,m=null==e||null===(s=e.result)||void 0===s||null===(u=s.context)||void 0===u?void 0:u.tencentcloud_uin,f={tableName:"userInfo",keyValue:{openId:null==e||null===(i=e.result)||void 0===i||null===(d=i.event)||void 0===d||null===(r=d.userInfo)||void 0===r?void 0:r.openId},okFun:function okFun(e){var n,t;console.log("q",e),(0,x.updateTableid)({id:null==e||null===(n=e.data)||void 0===n||null===(t=n[0])||void 0===t?void 0:t._id,tableName:"userInfo",objData:{tencentcloud_uin:m,authInfo:{authPhonenum:c}},okFun:function okFun(e){y()}})}};(0,x.getTable)((0,l.default)({},f))}))}(e)};return(0,g.jsxs)(r.View,{className:"myContent",children:[(0,g.jsxs)(r.View,{className:"myImage",children:[(0,g.jsx)(s.default,{round:!0,width:"100px",height:"100px",src:"cloud://cloud1-5g5xrgza12a0dd6d.636c-cloud1-5g5xrgza12a0dd6d-1253665791/images/images-2.jpg"}),!w&&(0,g.jsx)(r.View,{className:"loginBtn",children:(0,g.jsx)(a.default,{type:"primary",size:"mini","open-type":"getPhoneNumber",lang:"zh_CN",onGetPhoneNumber:function onGetPhoneNumber(e){console.log("info",e),N(e)},children:"登录"})})]}),(0,g.jsxs)(r.View,{className:"cellArr",children:[(0,g.jsx)(o.default,{icon:"manager",title:"打卡记录",isLink:!0}),(0,g.jsx)(o.default,{title:"微信客服",icon:"wechat",isLink:!0,value:"",onClick:function onClick(){p().openCustomerServiceChat({corpId:"wwb04af9a97514271c",extInfo:{url:"https://work.weixin.qq.com/kfid/kfc70f3f112c97a54c5"},success:function success(e){}})}}),(0,g.jsx)(o.default,{icon:"friends",title:"关于我们",isLink:!0}),(0,g.jsx)(o.default,{icon:"setting",title:"版本日志",isLink:!0,onClick:function onClick(){p().navigateTo({url:"/pages/my/components/Version/index"})}})]}),(0,g.jsx)(m.default,{active:2})]})}},"./src/pages/my/index.tsx":function(e,n,t){var o=t("webpack/container/remote/@tarojs/runtime"),a=t("./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/my/index.tsx");Page((0,o.createPageConfig)(a.default,"pages/my/index",{root:{cn:[]}},{navigationBarTitleText:"我的"}||{}))}},function(e){e.O(0,["taro","vendors","common"],(function(){return n="./src/pages/my/index.tsx",e(e.s=n);var n}));e.O()}]);
|
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/my/index"],{"./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/my/index.tsx":function(e,n,t){var o=t("./node_modules/@antmjs/vantui/es/cell/index.js"),a=t("./node_modules/@antmjs/vantui/es/button/index.js"),s=t("./node_modules/@antmjs/vantui/es/image/index.js"),l=t("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),u=t("./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),i=t("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),d=t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),r=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),c=t("webpack/container/remote/react"),m=t("./src/pages/components/TabbarCom/index.tsx"),f=t("webpack/container/remote/@tarojs/taro"),p=t.n(f),x=(t("./src/pages/components/ActiveCard/index.tsx"),t("./src/utils/index.ts")),g=t("webpack/container/remote/react/jsx-runtime");n.default=function my(e){var n=(0,c.useState)({}),t=(0,d.default)(n,2),f=(t[0],t[1],(0,c.useState)([])),v=(0,d.default)(f,2),b=(v[0],v[1],(0,c.useState)(0)),j=(0,d.default)(b,2),h=(j[0],j[1],(0,c.useState)(!0)),k=(0,d.default)(h,2),w=k[0],_=k[1];(0,c.useEffect)((function(){y()}),[]);var y=function(){var e=(0,i.default)((0,u.default)().mark((function _callee(){var e;return(0,u.default)().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,x.phoneLogin)();case 2:e=n.sent,console.log("isok",e),_(e);case 5:case"end":return n.stop()}}),_callee)})));return function getok(){return e.apply(this,arguments)}}();(0,c.useEffect)((function(){}),[]);var N=function getPhoneNumber(e){console.log("点击获取手机事件",e.detail.cloudID),function getLogin(e){p().cloud.callFunction({name:"getPhoneNum",data:{weRunData:p().cloud.CloudID(e.detail.cloudID)}}).then((function(e){var n,t,o,a,s,u,i,d,r;console.log("res222",e);var c=null==e||null===(n=e.result)||void 0===n||null===(t=n.event)||void 0===t||null===(o=t.weRunData)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.phoneNumber,m=null==e||null===(s=e.result)||void 0===s||null===(u=s.context)||void 0===u?void 0:u.tencentcloud_uin,f={tableName:"userInfo",keyValue:{openId:null==e||null===(i=e.result)||void 0===i||null===(d=i.event)||void 0===d||null===(r=d.userInfo)||void 0===r?void 0:r.openId},okFun:function okFun(e){var n,t;console.log("q",e),(0,x.updateTableid)({id:null==e||null===(n=e.data)||void 0===n||null===(t=n[0])||void 0===t?void 0:t._id,tableName:"userInfo",objData:{tencentcloud_uin:m,authInfo:{authPhonenum:c}},okFun:function okFun(e){y()}})}};(0,x.getTable)((0,l.default)({},f))}))}(e)};return(0,g.jsxs)(r.View,{className:"myContent",children:[(0,g.jsxs)(r.View,{className:"myImage",children:[(0,g.jsx)(s.default,{round:!0,width:"100px",height:"100px",src:"cloud://cloud1-5g5xrgza12a0dd6d.636c-cloud1-5g5xrgza12a0dd6d-1253665791/images/images-2.jpg"}),!w&&(0,g.jsx)(r.View,{className:"loginBtn",children:(0,g.jsx)(a.default,{type:"primary",size:"mini","open-type":"getPhoneNumber",lang:"zh_CN",onGetPhoneNumber:function onGetPhoneNumber(e){console.log("info",e),N(e)},children:"登录"})})]}),(0,g.jsxs)(r.View,{className:"cellArr",children:[(0,g.jsx)(o.default,{icon:"manager",title:"打卡记录",isLink:!0}),(0,g.jsx)(o.default,{title:"微信客服",icon:"wechat",isLink:!0,value:"",onClick:function onClick(){p().openCustomerServiceChat({corpId:"wwb04af9a97514271c",extInfo:{url:"https://work.weixin.qq.com/kfid/kfc70f3f112c97a54c5"},success:function success(e){}})}}),(0,g.jsx)(o.default,{icon:"friends",title:"关于我们",isLink:!0,onClick:function onClick(){p().navigateTo({url:"/pages/my/components/AbountUs/index"})}})]}),(0,g.jsx)(m.default,{active:2})]})}},"./src/pages/my/index.tsx":function(e,n,t){var o=t("webpack/container/remote/@tarojs/runtime"),a=t("./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/my/index.tsx");Page((0,o.createPageConfig)(a.default,"pages/my/index",{root:{cn:[]}},{navigationBarTitleText:"我的"}||{}))}},function(e){e.O(0,["taro","vendors","common"],(function(){return n="./src/pages/my/index.tsx",e(e.s=n);var n}));e.O()}]);
|
||||||
@@ -10,6 +10,8 @@ export default {
|
|||||||
"pages/mountainPeak/index",
|
"pages/mountainPeak/index",
|
||||||
"pages/my/index",
|
"pages/my/index",
|
||||||
"pages/my/components/Version/index",
|
"pages/my/components/Version/index",
|
||||||
|
"pages/my/components/AbountUs/index",
|
||||||
|
|
||||||
],
|
],
|
||||||
permission: {
|
permission: {
|
||||||
"scope.userLocation": {
|
"scope.userLocation": {
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ const ActiveCard = (props: any) => {
|
|||||||
<View className="btn">
|
<View className="btn">
|
||||||
{/* 活动状态 0 待开放 1开放中 2已取消 3进行中 4已结束 5已关闭 */}
|
{/* 活动状态 0 待开放 1开放中 2已取消 3进行中 4已结束 5已关闭 */}
|
||||||
<Button plain hairline type="primary">
|
<Button plain hairline type="primary">
|
||||||
{`立即报名`}
|
{`立即查看`}
|
||||||
</Button>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
0
src/pages/my/components/AbountUs/index.scss
Normal file
0
src/pages/my/components/AbountUs/index.scss
Normal file
17
src/pages/my/components/AbountUs/index.tsx
Normal file
17
src/pages/my/components/AbountUs/index.tsx
Normal 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;
|
||||||
@@ -16,7 +16,15 @@ import "./index.module.scss";
|
|||||||
import { Tab, Tabs } from "@antmjs/vantui";
|
import { Tab, Tabs } from "@antmjs/vantui";
|
||||||
import Taro from "@tarojs/taro";
|
import Taro from "@tarojs/taro";
|
||||||
import ActiveCard from "../components/ActiveCard";
|
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 my = (props: any) => {
|
||||||
// const [active, setActive] = react.useState(props?.active ?? 0);
|
// const [active, setActive] = react.useState(props?.active ?? 0);
|
||||||
@@ -24,7 +32,7 @@ const my = (props: any) => {
|
|||||||
const [userInfo, setuserInfo] = useState({}); //用户信息
|
const [userInfo, setuserInfo] = useState({}); //用户信息
|
||||||
const [detailsData, setdetailsData] = useState<any>([]); //活动详情
|
const [detailsData, setdetailsData] = useState<any>([]); //活动详情
|
||||||
const [currentIndex, setcurrentIndex] = useState(0);
|
const [currentIndex, setcurrentIndex] = useState(0);
|
||||||
const [isin, setisin] = useState(true); //0初始 1未登录 2有手机号
|
const [isin, setisin] = useState(true); //0初始 1未登录 2有手机号
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getok();
|
getok();
|
||||||
@@ -37,7 +45,7 @@ const my = (props: any) => {
|
|||||||
const getok = async () => {
|
const getok = async () => {
|
||||||
let isOk: any = await phoneLogin();
|
let isOk: any = await phoneLogin();
|
||||||
console.log("isok", isOk);
|
console.log("isok", isOk);
|
||||||
setisin(isOk)
|
setisin(isOk);
|
||||||
// setisin(isOk?'2':'1');
|
// setisin(isOk?'2':'1');
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -53,29 +61,29 @@ const my = (props: any) => {
|
|||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
console.log("res222", res);
|
console.log("res222", res);
|
||||||
let phoneNumber = res?.result?.event?.weRunData?.data?.phoneNumber;
|
let phoneNumber = res?.result?.event?.weRunData?.data?.phoneNumber;
|
||||||
let tencentcloud_uin=res?.result?.context?.tencentcloud_uin
|
let tencentcloud_uin = res?.result?.context?.tencentcloud_uin;
|
||||||
let openId:any=res?.result?.event?.userInfo?.openId
|
let openId: any = res?.result?.event?.userInfo?.openId;
|
||||||
let postData={
|
let postData = {
|
||||||
tableName:'userInfo',
|
tableName: "userInfo",
|
||||||
keyValue: { openId: openId },
|
keyValue: { openId: openId },
|
||||||
okFun:((res:any)=>{
|
okFun: (res: any) => {
|
||||||
console.log('q',res)
|
console.log("q", res);
|
||||||
updateTableid({
|
updateTableid({
|
||||||
id:res?.data?.[0]?._id,
|
id: res?.data?.[0]?._id,
|
||||||
tableName:"userInfo",
|
tableName: "userInfo",
|
||||||
objData:{
|
objData: {
|
||||||
tencentcloud_uin:tencentcloud_uin, //微信号
|
tencentcloud_uin: tencentcloud_uin, //微信号
|
||||||
authInfo:{
|
authInfo: {
|
||||||
authPhonenum:phoneNumber //手机号
|
authPhonenum: phoneNumber, //手机号
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
okFun:(res:any)=>{
|
okFun: (res: any) => {
|
||||||
getok()
|
getok();
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
})
|
},
|
||||||
}
|
};
|
||||||
getTable({...postData})
|
getTable({ ...postData });
|
||||||
|
|
||||||
// setisin(true);
|
// setisin(true);
|
||||||
});
|
});
|
||||||
@@ -211,8 +219,18 @@ const my = (props: any) => {
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Cell icon="friends" title="关于我们" isLink />
|
|
||||||
<Cell
|
<Cell
|
||||||
|
icon="friends"
|
||||||
|
title="关于我们"
|
||||||
|
isLink
|
||||||
|
onClick={() => {
|
||||||
|
// 跳转到目的页面,打开新页面
|
||||||
|
Taro.navigateTo({
|
||||||
|
url: "/pages/my/components/AbountUs/index",
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{/* <Cell
|
||||||
icon="setting"
|
icon="setting"
|
||||||
title="版本日志"
|
title="版本日志"
|
||||||
isLink
|
isLink
|
||||||
@@ -222,7 +240,7 @@ const my = (props: any) => {
|
|||||||
url: "/pages/my/components/Version/index",
|
url: "/pages/my/components/Version/index",
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/> */}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{/* tabbar */}
|
{/* tabbar */}
|
||||||
|
|||||||
Reference in New Issue
Block a user