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 }) => {
|
||||
const baseConfig = {
|
||||
projectName: 'yidooplanet',
|
||||
embeddedAppIdList: ["wx8a5d6f9fad07544e","wx7bb576902363f4ff","wxe2039b83454e49ed"], //半屏拉起小程序 当当wx7bb576902363f4ff/腾讯云wxe2039b83454e49ed/微信读书 wx8a5d6f9fad07544e
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, '..', 'src')
|
||||
},
|
||||
|
||||
@@ -2,6 +2,8 @@ export default defineAppConfig({
|
||||
pages: [
|
||||
'pages/index/index',
|
||||
'pages/index/componments/KeywordJoin/index',
|
||||
'pages/index/componments/NomadbookPage/index',
|
||||
|
||||
'pages/my/index',
|
||||
'pages/my/componments/Log/index',
|
||||
'pages/my/componments/Quesion/index',
|
||||
|
||||
@@ -13,6 +13,8 @@ import {
|
||||
AtSteps,
|
||||
AtForm,
|
||||
AtInput,
|
||||
AtToast,
|
||||
AtMessage,
|
||||
} from "taro-ui";
|
||||
import "./index.scss";
|
||||
import beijing from "@/images/city/beijing.jpg";
|
||||
@@ -22,14 +24,17 @@ import shenzhen from "@/images/city/shenzhen.jpg";
|
||||
import touxiang from "@/images/index/touxiang.jpg";
|
||||
import TabbarCom from "@/componments/TabbarCom";
|
||||
import { useEffect, useState } from "react";
|
||||
import { set } from "lodash";
|
||||
const KeywordJoin = () => {
|
||||
const [current, setcurrent] = useState(0);
|
||||
const [value, setvalue] = useState(null);
|
||||
|
||||
const [localuserInfo, setlocaluserInfo] = useState(Taro.getStorageSync("userInfo"));
|
||||
|
||||
const [disabled, setdisabled] = useState(false);
|
||||
const [btntext, setbtntext] = useState('立即加入');
|
||||
|
||||
|
||||
const [localuserInfo, setlocaluserInfo] = useState(
|
||||
Taro.getStorageSync("userInfo")
|
||||
);
|
||||
|
||||
// 获取用户标识符
|
||||
useEffect(() => {
|
||||
@@ -51,8 +56,6 @@ const KeywordJoin = () => {
|
||||
}
|
||||
}, []);
|
||||
|
||||
|
||||
|
||||
// useEffect(() => {
|
||||
// // 更新分享-minipro
|
||||
// Taro.updateShareMenu({
|
||||
@@ -68,6 +71,13 @@ const KeywordJoin = () => {
|
||||
|
||||
// }, []);
|
||||
|
||||
const handleClick = (text, type) => {
|
||||
Taro.atMessage({
|
||||
message: text,
|
||||
type: type,
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<View className="KeywordJoin">
|
||||
{/* 步骤栏 */}
|
||||
@@ -128,8 +138,12 @@ const KeywordJoin = () => {
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
<View className="tabbbarDiv"></View>
|
||||
<AtButton type="primary" className="jsonWechatBtn" onClick={()=>{
|
||||
<AtMessage />
|
||||
<AtButton
|
||||
type="primary"
|
||||
className="jsonWechatBtn"
|
||||
disabled={disabled}
|
||||
onClick={() => {
|
||||
// 通过hook加入微信群邀请
|
||||
//发起网络请求
|
||||
Taro.request({
|
||||
@@ -139,11 +153,25 @@ const KeywordJoin = () => {
|
||||
wxid: localuserInfo?.wxid ?? null, //debug eric 的wxid
|
||||
},
|
||||
success: function (resUser) {
|
||||
console.log('加入微信群成功');
|
||||
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>
|
||||
</View>
|
||||
);
|
||||
|
||||
@@ -25,7 +25,14 @@ const Nomadbook = () => {
|
||||
const [open, setopen] = useState(false);
|
||||
|
||||
return (
|
||||
<View className="Nomadbook">
|
||||
<View
|
||||
className="Nomadbook"
|
||||
onClick={() => {
|
||||
Taro.navigateTo({
|
||||
url: "/pages/index/componments/NomadbookPage/index",
|
||||
});
|
||||
}}
|
||||
>
|
||||
<View className="book">
|
||||
{[
|
||||
{ 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
|
||||
pending
|
||||
items={[
|
||||
{
|
||||
title: "2024年4月07日",
|
||||
content: ["1.新增图书列表页", "2.半屏小程序申请"],
|
||||
icon: "clock",
|
||||
},
|
||||
{
|
||||
title: "2024年3月24日",
|
||||
content: ["1.新增欢迎页", "2.默认用户头像显示"],
|
||||
|
||||
@@ -53,11 +53,11 @@ const my = () => {
|
||||
|
||||
{/* 列表 */}
|
||||
<View className="mylist">
|
||||
<AtListItem
|
||||
{/* <AtListItem
|
||||
title="我参加的"
|
||||
arrow="right"
|
||||
thumb="https://img12.360buyimg.com/jdphoto/s72x72_jfs/t6160/14/2008729947/2754/7d512a86/595c3aeeNa89ddf71.png"
|
||||
/>
|
||||
/> */}
|
||||
<AtListItem
|
||||
title="更新日志"
|
||||
// note="描述信息"
|
||||
@@ -83,13 +83,13 @@ const my = () => {
|
||||
});
|
||||
}}
|
||||
/>
|
||||
<AtListItem
|
||||
{/* <AtListItem
|
||||
title="联系客服"
|
||||
// note="描述信息"
|
||||
// extraText="详细信息"
|
||||
arrow="right"
|
||||
thumb="http://img12.360buyimg.com/jdphoto/s72x72_jfs/t10660/330/203667368/1672/801735d7/59c85643N31e68303.png"
|
||||
/>
|
||||
/> */}
|
||||
</View>
|
||||
|
||||
{/* 个人客服 */}
|
||||
|
||||
Reference in New Issue
Block a user