Compare commits
5 Commits
feat/nomad
...
dev/1.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f14fcdc0af | ||
|
|
d2c4fb676c | ||
|
|
8d677f376f | ||
|
|
b8e9e97199 | ||
|
|
0efe0d2c3c |
@@ -9,6 +9,7 @@ const path = require('path'); //引入node的path模块
|
|||||||
export default defineConfig(async (merge, { command, mode }) => {
|
export default defineConfig(async (merge, { command, mode }) => {
|
||||||
const baseConfig = {
|
const baseConfig = {
|
||||||
projectName: 'yidooplanet',
|
projectName: 'yidooplanet',
|
||||||
|
embeddedAppIdList: ["wx8a5d6f9fad07544e","wx7bb576902363f4ff","wxe2039b83454e49ed"], //半屏拉起小程序 当当wx7bb576902363f4ff/腾讯云wxe2039b83454e49ed/微信读书 wx8a5d6f9fad07544e
|
||||||
alias: {
|
alias: {
|
||||||
'@': path.resolve(__dirname, '..', 'src')
|
'@': path.resolve(__dirname, '..', 'src')
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ export default defineAppConfig({
|
|||||||
pages: [
|
pages: [
|
||||||
'pages/index/index',
|
'pages/index/index',
|
||||||
'pages/index/componments/KeywordJoin/index',
|
'pages/index/componments/KeywordJoin/index',
|
||||||
|
'pages/index/componments/NomadbookPage/index',
|
||||||
|
|
||||||
'pages/my/index',
|
'pages/my/index',
|
||||||
'pages/my/componments/Log/index',
|
'pages/my/componments/Log/index',
|
||||||
'pages/my/componments/Quesion/index',
|
'pages/my/componments/Quesion/index',
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import {
|
|||||||
AtSteps,
|
AtSteps,
|
||||||
AtForm,
|
AtForm,
|
||||||
AtInput,
|
AtInput,
|
||||||
|
AtToast,
|
||||||
|
AtMessage,
|
||||||
} from "taro-ui";
|
} from "taro-ui";
|
||||||
import "./index.scss";
|
import "./index.scss";
|
||||||
import beijing from "@/images/city/beijing.jpg";
|
import beijing from "@/images/city/beijing.jpg";
|
||||||
@@ -22,36 +24,37 @@ import shenzhen from "@/images/city/shenzhen.jpg";
|
|||||||
import touxiang from "@/images/index/touxiang.jpg";
|
import touxiang from "@/images/index/touxiang.jpg";
|
||||||
import TabbarCom from "@/componments/TabbarCom";
|
import TabbarCom from "@/componments/TabbarCom";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
import { set } from "lodash";
|
||||||
const KeywordJoin = () => {
|
const KeywordJoin = () => {
|
||||||
const [current, setcurrent] = useState(0);
|
const [current, setcurrent] = useState(0);
|
||||||
const [value, setvalue] = useState(null);
|
const [value, setvalue] = useState(null);
|
||||||
|
const [disabled, setdisabled] = useState(false);
|
||||||
const [localuserInfo, setlocaluserInfo] = useState(Taro.getStorageSync("userInfo"));
|
const [btntext, setbtntext] = useState('立即加入');
|
||||||
|
|
||||||
|
|
||||||
|
const [localuserInfo, setlocaluserInfo] = useState(
|
||||||
|
Taro.getStorageSync("userInfo")
|
||||||
|
);
|
||||||
|
|
||||||
|
// 获取用户标识符
|
||||||
|
useEffect(() => {
|
||||||
|
// 获取路由参数
|
||||||
|
const params = Taro.getCurrentInstance().router.params;
|
||||||
|
console.log("params", params);
|
||||||
|
// const [wxid, openId] = params;
|
||||||
|
|
||||||
// 获取用户标识符
|
if (params.wxid) {
|
||||||
useEffect(() => {
|
setuserInfo({
|
||||||
// 获取路由参数
|
wxid: params?.wxid, //个人号wxid
|
||||||
const params = Taro.getCurrentInstance().router.params;
|
// openId: params?.openId, //小程序openid
|
||||||
console.log("params", params);
|
});
|
||||||
// const [wxid, openId] = params;
|
// 本地存储
|
||||||
|
|
||||||
if (params.wxid) {
|
|
||||||
setuserInfo({
|
|
||||||
wxid: params?.wxid, //个人号wxid
|
|
||||||
// openId: params?.openId, //小程序openid
|
|
||||||
});
|
|
||||||
// 本地存储
|
|
||||||
|
|
||||||
try {
|
|
||||||
Taro.setStorageSync("wxid", params?.wxid ?? "");
|
|
||||||
} catch (e) {}
|
|
||||||
}
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
Taro.setStorageSync("wxid", params?.wxid ?? "");
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
}, []);
|
||||||
|
|
||||||
// useEffect(() => {
|
// useEffect(() => {
|
||||||
// // 更新分享-minipro
|
// // 更新分享-minipro
|
||||||
@@ -68,6 +71,13 @@ const KeywordJoin = () => {
|
|||||||
|
|
||||||
// }, []);
|
// }, []);
|
||||||
|
|
||||||
|
const handleClick = (text, type) => {
|
||||||
|
Taro.atMessage({
|
||||||
|
message: text,
|
||||||
|
type: type,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className="KeywordJoin">
|
<View className="KeywordJoin">
|
||||||
{/* 步骤栏 */}
|
{/* 步骤栏 */}
|
||||||
@@ -128,22 +138,40 @@ const KeywordJoin = () => {
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View className="tabbbarDiv"></View>
|
<AtMessage />
|
||||||
<AtButton type="primary" className="jsonWechatBtn" onClick={()=>{
|
<AtButton
|
||||||
// 通过hook加入微信群邀请
|
type="primary"
|
||||||
//发起网络请求
|
className="jsonWechatBtn"
|
||||||
Taro.request({
|
disabled={disabled}
|
||||||
// url: "http://127.0.0.1:28369/joingroup",
|
onClick={() => {
|
||||||
url: "https://kunpeng.hackrobot.cn/joingroup",
|
// 通过hook加入微信群邀请
|
||||||
data: {
|
//发起网络请求
|
||||||
wxid: localuserInfo?.wxid ?? null, //debug eric 的wxid
|
Taro.request({
|
||||||
},
|
// url: "http://127.0.0.1:28369/joingroup",
|
||||||
success: function (resUser) {
|
url: "https://kunpeng.hackrobot.cn/joingroup",
|
||||||
console.log('加入微信群成功');
|
data: {
|
||||||
},
|
wxid: localuserInfo?.wxid ?? null, //debug eric 的wxid
|
||||||
});
|
},
|
||||||
}}>
|
success: function (resUser) {
|
||||||
点击加入
|
console.log("resUser--", resUser);
|
||||||
|
console.log("加入微信群成功");
|
||||||
|
if (resUser?.data?.success == "fail") {
|
||||||
|
//已经在群聊中
|
||||||
|
handleClick("已经在群聊中", "warning");
|
||||||
|
setbtntext("已经在群聊中")
|
||||||
|
|
||||||
|
} else if (resUser?.data?.success == "ok") {
|
||||||
|
// 发送群聊邀请
|
||||||
|
handleClick("已发送群聊邀请", "warning");
|
||||||
|
setbtntext("已发送群聊邀请")
|
||||||
|
}
|
||||||
|
setdisabled(true);
|
||||||
|
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{btntext}
|
||||||
</AtButton>
|
</AtButton>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -25,7 +25,14 @@ const Nomadbook = () => {
|
|||||||
const [open, setopen] = useState(false);
|
const [open, setopen] = useState(false);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className="Nomadbook">
|
<View
|
||||||
|
className="Nomadbook"
|
||||||
|
onClick={() => {
|
||||||
|
Taro.navigateTo({
|
||||||
|
url: "/pages/index/componments/NomadbookPage/index",
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
<View className="book">
|
<View className="book">
|
||||||
{[
|
{[
|
||||||
{ imagePath: rework },
|
{ imagePath: rework },
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export default definePageConfig({
|
||||||
|
navigationBarTitleText: '图书'
|
||||||
|
})
|
||||||
60
src/pages/index/componments/NomadbookPage/index.jsx
Normal file
60
src/pages/index/componments/NomadbookPage/index.jsx
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
import { View, Text, Image, Button, Icon } from "@tarojs/components";
|
||||||
|
import { useLoad } from "@tarojs/taro";
|
||||||
|
import Taro from "@tarojs/taro";
|
||||||
|
import {
|
||||||
|
AtAvatar,
|
||||||
|
AtTag,
|
||||||
|
AtIcon,
|
||||||
|
AtTabBar,
|
||||||
|
AtButton,
|
||||||
|
AtAccordion,
|
||||||
|
AtList,
|
||||||
|
AtListItem,
|
||||||
|
} from "taro-ui";
|
||||||
|
import "./index.scss";
|
||||||
|
import rework from "@/images/book/rework.jpg";
|
||||||
|
import dangan from "@/images/book/dangan.jpg";
|
||||||
|
import fuye from "@/images/book/fuye.jpg";
|
||||||
|
import poquan from "@/images/book/poquan.jpg";
|
||||||
|
import chuangye from "@/images/book/chuangye.jpg";
|
||||||
|
import hours from "@/images/book/hours.jpg";
|
||||||
|
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
|
const NomadbookPage = () => {
|
||||||
|
const [open, setopen] = useState(false);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View className="NomadbookPage">
|
||||||
|
{/* <View>NomadbookPage</View> */}
|
||||||
|
<View className="book">
|
||||||
|
{[
|
||||||
|
{ imagePath: rework },
|
||||||
|
{ imagePath: dangan },
|
||||||
|
{ imagePath: fuye },
|
||||||
|
{ imagePath: poquan },
|
||||||
|
{ imagePath: chuangye },
|
||||||
|
{ imagePath: hours },
|
||||||
|
].map((item, index) => {
|
||||||
|
return (
|
||||||
|
<View className="bookItem">
|
||||||
|
{" "}
|
||||||
|
<Image
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
height: "100%",
|
||||||
|
background: " #fff",
|
||||||
|
borderRadius: "10px",
|
||||||
|
}}
|
||||||
|
mode="scaleToFill"
|
||||||
|
src={item.imagePath}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default NomadbookPage;
|
||||||
35
src/pages/index/componments/NomadbookPage/index.scss
Normal file
35
src/pages/index/componments/NomadbookPage/index.scss
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
.NomadbookPage {
|
||||||
|
padding: 10px;
|
||||||
|
font-size: 25px;
|
||||||
|
// width: 320px;
|
||||||
|
// height: 230px;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
// justify-content: center;
|
||||||
|
// background-color: red;
|
||||||
|
border-radius: 20px;
|
||||||
|
// border: solid 1px #8c8c8c;
|
||||||
|
// background-color: yellow;
|
||||||
|
|
||||||
|
.book {
|
||||||
|
// width: 100%;
|
||||||
|
|
||||||
|
// height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
// background-color: aquamarine;
|
||||||
|
padding: 10px;
|
||||||
|
.bookItem {
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
// background-color: yellow;
|
||||||
|
margin-top: 20px;
|
||||||
|
// margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -28,6 +28,11 @@ const Log = () => {
|
|||||||
<AtTimeline
|
<AtTimeline
|
||||||
pending
|
pending
|
||||||
items={[
|
items={[
|
||||||
|
{
|
||||||
|
title: "2024年4月07日",
|
||||||
|
content: ["1.新增图书列表页", "2.半屏小程序申请"],
|
||||||
|
icon: "clock",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "2024年3月24日",
|
title: "2024年3月24日",
|
||||||
content: ["1.新增欢迎页", "2.默认用户头像显示"],
|
content: ["1.新增欢迎页", "2.默认用户头像显示"],
|
||||||
|
|||||||
@@ -53,11 +53,11 @@ const my = () => {
|
|||||||
|
|
||||||
{/* 列表 */}
|
{/* 列表 */}
|
||||||
<View className="mylist">
|
<View className="mylist">
|
||||||
<AtListItem
|
{/* <AtListItem
|
||||||
title="我参加的"
|
title="我参加的"
|
||||||
arrow="right"
|
arrow="right"
|
||||||
thumb="https://img12.360buyimg.com/jdphoto/s72x72_jfs/t6160/14/2008729947/2754/7d512a86/595c3aeeNa89ddf71.png"
|
thumb="https://img12.360buyimg.com/jdphoto/s72x72_jfs/t6160/14/2008729947/2754/7d512a86/595c3aeeNa89ddf71.png"
|
||||||
/>
|
/> */}
|
||||||
<AtListItem
|
<AtListItem
|
||||||
title="更新日志"
|
title="更新日志"
|
||||||
// note="描述信息"
|
// note="描述信息"
|
||||||
@@ -83,13 +83,13 @@ const my = () => {
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<AtListItem
|
{/* <AtListItem
|
||||||
title="联系客服"
|
title="联系客服"
|
||||||
// note="描述信息"
|
// note="描述信息"
|
||||||
// extraText="详细信息"
|
// extraText="详细信息"
|
||||||
arrow="right"
|
arrow="right"
|
||||||
thumb="http://img12.360buyimg.com/jdphoto/s72x72_jfs/t10660/330/203667368/1672/801735d7/59c85643N31e68303.png"
|
thumb="http://img12.360buyimg.com/jdphoto/s72x72_jfs/t10660/330/203667368/1672/801735d7/59c85643N31e68303.png"
|
||||||
/>
|
/> */}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{/* 个人客服 */}
|
{/* 个人客服 */}
|
||||||
|
|||||||
Reference in New Issue
Block a user