Răsfoiți Sursa

【第一版开发】

1.新增关于我们、免责声明页面
ChenYL 10 luni în urmă
părinte
comite
74910fcdcf

+ 3 - 1
src/apis/apis.js

@@ -1,9 +1,11 @@
 import * as userApi from './userApi.js';
 import * as subscriptionApi from './subscriptionApi.js'
 import * as orderApi from './orderApi.js'
+import * as dataApi from './dataApi.js'
 
 export {
     userApi,
     subscriptionApi,
-    orderApi
+    orderApi,
+    dataApi
 }

+ 66 - 0
src/apis/dataApi.js

@@ -0,0 +1,66 @@
+import request from "@/utils/request";
+
+/**
+ * 查询新债
+ * @param {Object} data
+ */
+export function queryIpoBond(data) {
+    return request({
+        url: "/data/queryIpoBond",
+        method: "get",
+        data,
+        loading: true
+    });
+}
+
+/**
+ * 查询新股
+ * @param {Object} data
+ */
+export function queryIpoStock(data) {
+    return request({
+        url: "/data/queryIpoStock",
+        method: "get",
+        data,
+        loading: true
+    });
+}
+
+/**
+ * 查询大乐透开奖数据
+ * @param {Object} data
+ */
+export function queryDaLeTou(data) {
+    return request({
+        url: "/data/queryDaLeTou",
+        method: "get",
+        data,
+        loading: true
+    });
+}
+
+/**
+ * 查询双色球数据
+ * @param {Object} data
+ */
+export function queryShuangSeQiu(data) {
+    return request({
+        url: "/data/queryShuangSeQiu",
+        method: "get",
+        data,
+        loading: true
+    });
+}
+
+/**
+ * 查询ProductHunt热榜数据
+ * @param {Object} data
+ */
+export function queryProductHuntPost(data) {
+    return request({
+        url: "/data/queryProductHuntPost",
+        method: "get",
+        data,
+        loading: true
+    });
+}

+ 11 - 1
src/common/router.js

@@ -26,7 +26,17 @@ const router = {
     /**
      * 用户中心
      */
-    USER_CENTER_PAGE: 'pages/userCenter'
+    USER_CENTER_PAGE: '/pages/userCenter',
+
+    /**
+     * 关于我们
+     */
+    ABOUT_US_PAGE: '/pages/aboutUs',
+
+    /**
+     * 免责声明
+     */
+    DISCLAIMER_PAGE: '/pages/disclaimer',
 }
 
 export default router;

+ 52 - 0
src/pages.json

@@ -38,6 +38,58 @@
 			"style": {
 				"navigationBarTitleText": "登录"
 			}
+		},
+		{
+			"path": "pages/aboutUs",
+			"style": {
+				"navigationBarTitleText": "关于我们"
+			}
+		},
+		{
+			"path": "pages/disclaimer",
+			"style": {
+				"navigationBarTitleText": "免责声明"
+			}
+		},
+		{
+			"path": "pages/data/ipoBond",
+			"style": {
+				"navigationBarTitleText": "可转债打新",
+				"backgroundColor": "#E5E5E5",
+				"enablePullDownRefresh": true
+			}
+		},
+		{
+			"path": "pages/data/ipoStock",
+			"style": {
+				"navigationBarTitleText": "新股打新",
+				"enablePullDownRefresh": true,
+				"backgroundColor": "#E5E5E5"
+			}
+		},
+		{
+			"path": "pages/data/productHunt",
+			"style": {
+				"navigationBarTitleText": "ProductHunt热榜TOP30",
+				"enablePullDownRefresh": true,
+				"backgroundColor": "#E5E5E5"
+			}
+		},
+		{
+			"path": "pages/data/shuangSeQiu",
+			"style": {
+				"navigationBarTitleText": "双色球开奖结果",
+				"enablePullDownRefresh": true,
+				"backgroundColor": "#E5E5E5"
+			}
+		},
+		{
+			"path": "pages/data/daLeTou",
+			"style": {
+				"navigationBarTitleText": "大乐透开奖结果",
+				"enablePullDownRefresh": true,
+				"backgroundColor": "#E5E5E5"
+			}
 		}
 	],
 	"tabBar": {

+ 57 - 0
src/pages/aboutUs.vue

@@ -0,0 +1,57 @@
+<template>
+  <view class="box">
+    <view class="main-content">设计:小石</view>
+    <view class="main-content">前端:小石</view>
+    <view class="main-content">后端:小石</view>
+    <view class="second-content">我是后端工程师,出于个人爱好,设计并开发了本小程序,不足之处还望包涵,如有任何建议或意见,欢迎提出。</view>
+    <view class="main-content">联系方式:xxx@163.com</view>
+    <button class="contact-button" open-type="contact">联系我</button>
+  </view>
+</template>
+
+<script setup>
+</script>
+
+<style lang="scss" scoped>
+.box {
+  padding: 16rpx 24rpx;
+
+  .main-content,
+  .second-content {
+    margin-bottom: 16rpx;
+  }
+
+  .main-content {
+    font-size: 30rpx;
+    font-weight: 400;
+    letter-spacing: 0rpx;
+    line-height: 43.44rpx;
+    color: #000000;
+    text-align: left;
+    vertical-align: top;
+  }
+
+  .second-content {
+    font-size: 24rpx;
+    font-weight: 400;
+    letter-spacing: 0rpx;
+    line-height: 34.75rpx;
+    color: #6a6a6a;
+    text-align: left;
+    vertical-align: top;
+  }
+
+  .contact-button {
+    background-color: #4a90e2;
+    color: white;
+    border: none;
+    padding: 10px 20px;
+    font-size: 16px;
+    cursor: pointer;
+    border-radius: 4px;
+    margin-top: 20px;
+    width: 100%;
+    max-width: 300px;
+  }
+}
+</style>

+ 8 - 0
src/pages/data/daLeTou.vue

@@ -0,0 +1,8 @@
+<template>
+  <div class="daLeTou">daLeTou</div>
+</template>
+
+<script setup>
+</script>
+
+<style lang="scss" scoped></style>

+ 146 - 0
src/pages/data/ipoBond.vue

@@ -0,0 +1,146 @@
+<template>
+  <view class="bond-box" v-for="item in dataList" :key="item.bondCode">
+    <view class="bond-info">
+      <text class="bond-title">{{ item.bondShortName }}</text>
+      <text class="bond-code">{{ item.bondCode }}</text>
+    </view>
+    <view class="line"></view>
+    <view class="bond-details">
+      <view class="detail-item">
+        <text class="label">申购日期</text>
+        <text class="value">{{ item.onlineSubscriptionDate }}</text>
+      </view>
+      <view class="detail-item">
+        <text class="label">申购额度</text>
+        <text class="value">{{ item.onlineSubscriptionMax }}手</text>
+      </view>
+      <view class="detail-item">
+        <text class="label">发行价格</text>
+        <text class="value">{{ item.allotmentPrice }}元/手</text>
+      </view>
+      <view class="detail-item">
+        <text class="label">上市地点</text>
+        <text class="value">{{ item.tradingMarket }}</text>
+      </view>
+    </view>
+  </view>
+
+  <uni-load-more status="no-more" v-if="!dataList || dataList.length == 0" />
+</template>
+
+<script setup>
+import { ref } from 'vue';
+import { onPullDownRefresh, onShow, onLoad } from "@dcloudio/uni-app";
+import { dataApi } from '@/apis/apis.js';
+
+// 属性
+/**
+ * 申购日期
+ */
+const subscriptionDate = ref(null);
+
+/**
+ * 数据列表
+ */
+const dataList = ref([]);
+
+
+// 方法
+/**
+ * 加载数据
+ */
+const loadData = async () => {
+  dataList.value = await dataApi.queryIpoBond({
+    "subscriptionDate": subscriptionDate.value,
+  });
+};
+
+// 生命周期
+onLoad((e) => {
+  if (e.subscriptionDate) {
+    subscriptionDate.value = e.subscriptionDate;
+    loadData();
+  }
+});
+
+onShow(() => {
+  loadData();
+});
+
+onPullDownRefresh(() => {
+  loadData();
+  uni.stopPullDownRefresh();
+});
+</script>
+
+<style lang="scss" scoped>
+.bond-box {
+
+  padding: 16rpx 24rpx;
+  background-color: #ffffff;
+
+  .bond-info {
+
+    .bond-title {
+      font-size: 36rpx;
+      font-weight: 400;
+      letter-spacing: 0rpx;
+      line-height: 52.13rpx;
+      color: #000000;
+      text-align: left;
+      vertical-align: top;
+    }
+
+    .bond-code {
+      margin-left: 16rpx;
+
+      font-size: 24rpx;
+      font-weight: 400;
+      letter-spacing: 0rpx;
+      line-height: 34.75rpx;
+      color: #6A6A6A;
+      text-align: left;
+      vertical-align: bottom;
+    }
+  }
+
+  .line {
+    margin-top: 16rpx;
+    margin-bottom: 16rpx;
+    border: 1px solid #F0F0F0;
+  }
+
+  .bond-details {
+
+    display: flex;
+    flex-wrap: wrap;
+
+    .detail-item {
+      width: 50%;
+      margin-bottom: 12rpx;
+
+      .label {
+        font-size: 24rpx;
+        font-weight: 400;
+        letter-spacing: 0rpx;
+        line-height: 34.75rpx;
+        color: #6a6a6a;
+        text-align: left;
+        vertical-align: center;
+      }
+
+      .value {
+        margin-left: 24rpx;
+
+        font-size: 24rpx;
+        font-weight: 400;
+        letter-spacing: 0rpx;
+        line-height: 34.75rpx;
+        color: #000000;
+        text-align: left;
+        vertical-align: center;
+      }
+    }
+  }
+}
+</style>

+ 183 - 0
src/pages/data/ipoStock.vue

@@ -0,0 +1,183 @@
+<template>
+  <view class="stock-box" v-for="item in dataList" :key="item.stockCode">
+
+    <view class="stock-info">
+      <text class="stock-title">{{ item.stockShortName }}</text>
+      <text class="stock-code">{{ item.stockCode }}</text>
+    </view>
+
+    <view class="line"></view>
+
+    <view class="stock-details">
+      <view class="detail-item">
+        <text class="label">申购日期</text>
+        <text class="value">{{ item.subscriptionDate }}</text>
+      </view>
+      <view class="detail-item">
+        <text class="label">发行价格</text>
+        <text class="value">{{ item.issuePrice }}</text>
+      </view>
+    </view>
+
+    <view class="line"></view>
+
+    <view class="stsock-detail-exts">
+      <view class="detail-item">
+        <view class="label">市盈率(倍)</view>
+        <text class="value">{{ item.issuePeRatio }}</text>
+      </view>
+      <view class="detail-item">
+        <view class="label">行业市盈率(倍)</view>
+        <text class="value">{{ item.industryPeRatio }}</text>
+      </view>
+      <view class="detail-item">
+        <view class="label">总发行数量</view>
+        <text class="value">{{ item.totalIssued }}股</text>
+      </view>
+      <view class="detail-item">
+        <view class="label">网上发行数量</view>
+        <text class="value">{{ item.onlineIssued }}股</text>
+      </view>
+      <view class="detail-item">
+        <view class="label">网上申购数量</view>
+        <text class="value">{{ item.subscriptionLimit }}股</text>
+      </view>
+      <view class="detail-item">
+        <view class="label">顶格申购需市值</view>
+        <text class="value">{{ item.maxMarketValueForSubscription }}股</text>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script setup>
+import { ref } from 'vue';
+import { onPullDownRefresh, onShow, onLoad } from "@dcloudio/uni-app";
+import { dataApi } from '@/apis/apis.js';
+
+// 属性
+/**
+ * 申购日期
+ */
+const subscriptionDate = ref(null);
+
+/**
+ * 数据列表
+ */
+const dataList = ref([]);
+
+
+// 方法
+/**
+ * 加载数据
+ */
+const loadData = async () => {
+  dataList.value = await dataApi.queryIpoStock({
+    "subscriptionDate": subscriptionDate.value,
+  });
+};
+
+// 生命周期
+onLoad((e) => {
+  if (e.subscriptionDate) {
+    subscriptionDate.value = e.subscriptionDate;
+    loadData();
+  }
+});
+
+onShow(() => {
+  loadData();
+});
+
+onPullDownRefresh(() => {
+  loadData();
+  uni.stopPullDownRefresh();
+});
+</script>
+
+<style lang="scss" scoped>
+.stock-box {
+
+  padding: 16rpx 24rpx;
+  background-color: #ffffff;
+
+  .stock-info {
+
+    .stock-title {
+      font-size: 36rpx;
+      font-weight: 400;
+      letter-spacing: 0rpx;
+      line-height: 52.13rpx;
+      color: #000000;
+      text-align: left;
+      vertical-align: top;
+    }
+
+    .stock-code {
+      margin-left: 16rpx;
+
+      font-size: 24rpx;
+      font-weight: 400;
+      letter-spacing: 0rpx;
+      line-height: 34.75rpx;
+      color: #6A6A6A;
+      text-align: left;
+      vertical-align: bottom;
+    }
+  }
+
+  .line {
+    margin-top: 16rpx;
+    margin-bottom: 16rpx;
+    border: 1px solid #F0F0F0;
+  }
+
+  .stock-details {
+    display: flex;
+    flex-wrap: wrap;
+
+    .detail-item {
+      width: 50%;
+    }
+  }
+
+  .stsock-detail-exts {
+    .detail-item {
+      .label {
+        width: 200rpx;
+        display: inline-block
+      }
+    }
+  }
+
+  .stock-details,
+  .stsock-detail-exts {
+
+    .detail-item {
+      margin-bottom: 12rpx;
+
+      .label {
+        font-size: 24rpx;
+        font-weight: 400;
+        letter-spacing: 0rpx;
+        line-height: 34.75rpx;
+        color: #6a6a6a;
+        text-align: left;
+        vertical-align: center;
+      }
+
+      .value {
+        margin-left: 24rpx;
+
+        font-size: 24rpx;
+        font-weight: 400;
+        letter-spacing: 0rpx;
+        line-height: 34.75rpx;
+        color: #000000;
+        text-align: left;
+        vertical-align: center;
+      }
+    }
+  }
+}
+</style>

+ 126 - 0
src/pages/data/productHunt.vue

@@ -0,0 +1,126 @@
+<template>
+  <view class="box">
+    <view class="product-hunt-box" v-for="item in dataList" :key="item.postId">
+      <!-- <image :src="item."></image> -->
+      <text class="title">{{ item.rankNum }}.{{ item.name }}</text>
+      <view class="detail">
+        <text class="label">标语:</text>
+        <text class="value">{{ item.tagline }}</text>
+      </view>
+      <view class="detail">
+        <text class="label">介绍:</text>
+        <text class="value">{{ item.description }}</text>
+      </view>
+      <view class="detail">
+        <text class="label">关键词:</text>
+        <text class="value">{{ item.descriptionKey }}</text>
+      </view>
+      <view class="detail">
+        <text class="label">票数:</text>
+        <text class="value">{{ item.votesCount }}</text>
+      </view>
+      <view class="detail">
+        <text class="label">是否精选:</text>
+        <text class="value">{{ item.featuredAt ? '是' : '否' }}</text>
+      </view>
+      <view class="detail">
+        <text class="label">发布时间:</text>
+        <text class="value">{{ item.createdAt }}</text>
+      </view>
+    </view>
+
+    <uni-load-more status="no-more" v-if="!dataList || dataList.length == 0" />
+  </view>
+</template>
+
+<script setup>
+import { ref } from 'vue';
+import { onPullDownRefresh, onShow, onLoad } from "@dcloudio/uni-app";
+import { dataApi } from '@/apis/apis.js';
+
+// 属性
+/**
+ * 申购日期
+ */
+const rankDate = ref(null);
+
+/**
+ * 数据列表
+ */
+const dataList = ref([]);
+
+
+// 方法
+/**
+ * 加载数据
+ */
+const loadData = async () => {
+  dataList.value = await dataApi.queryProductHuntPost({
+    "rankDate": rankDate.value,
+  });
+};
+
+// 生命周期
+onLoad((e) => {
+  if (e.rankDate) {
+    rankDate.value = e.rankDate;
+    loadData();
+  }
+});
+
+onShow(() => {
+  loadData();
+});
+
+onPullDownRefresh(() => {
+  loadData();
+  uni.stopPullDownRefresh();
+});
+</script>
+
+<style lang="scss" scoped>
+.box {
+  width: 100%;
+  height: 100%;
+  padding: 16rpx 24rpx;
+  background-color: #e5e5e5;
+}
+
+.product-hunt-box {
+  margin-bottom: 16rpx;
+  padding: 16rpx 24rpx;
+  border-radius: 24rpx;
+  background-color: #ffffff;
+
+  .title {
+    margin-bottom: 12rpx;
+
+    font-size: 36rpx;
+    font-weight: 400;
+    letter-spacing: 0rpx;
+    line-height: 52.13rpx;
+    color: #000;
+    text-align: left;
+    vertical-align: top;
+  }
+
+  .detail {
+    margin-bottom: 12rpx;
+
+    .label,
+    .value {
+      font-size: 26rpx;
+      font-weight: 400;
+      letter-spacing: 0rpx;
+      line-height: 37.65rpx;
+      color: #6a6a6a;
+      text-align: left;
+      vertical-align: top;
+    }
+
+    .value {
+      margin-left: 8rpx;
+    }
+  }
+}
+</style>

+ 8 - 0
src/pages/data/shuangSeQiu.vue

@@ -0,0 +1,8 @@
+<template>
+  <div class="shuangSeQiu">shuangSeQiu</div>
+</template>
+
+<script setup>
+</script>
+
+<style lang="scss" scoped></style>

+ 51 - 0
src/pages/disclaimer.vue

@@ -0,0 +1,51 @@
+<template>
+  <view class="box">
+    <view class="term">
+      <view class="title">1.信息收集与使用</view>
+      <view class="content">小石知数小程序不要求用户授权任何权限,不会后台收集用户的任何信息,程序使用过程中产生的数据归开发者所有。</view>
+    </view>
+
+    <view class="term">
+      <view class="title">2.使用限制</view>
+      <view class="content">小石知数小程序请勿用于非法活动,由此产生的后果,开发者概不负责。小程序用户默认同意此限制。</view>
+    </view>
+
+    <view class="term">
+      <view class="title">3.联系方式</view>
+      <view class="content">如有问题请联系poker@coder.wang</view>
+    </view>
+  </view>
+</template>
+
+<script setup>
+</script>
+
+<style lang="scss" scoped>
+.box {
+  padding: 16rpx 24rpx;
+}
+
+.term {
+  margin-bottom: 24rpx;
+
+  .title {
+    font-size: 30rpx;
+    font-weight: 400;
+    letter-spacing: 0rpx;
+    line-height: 43.44rpx;
+    color: #000000;
+    text-align: left;
+    vertical-align: top;
+  }
+
+  .content {
+    font-size: 24rpx;
+    font-weight: 400;
+    letter-spacing: 0rpx;
+    line-height: 34.75rpx;
+    color: #6a6a6a;
+    text-align: left;
+    vertical-align: top;
+  }
+}
+</style>

+ 3 - 3
src/pages/userCenter.vue

@@ -33,10 +33,10 @@
     <view class="mt24">
       <uni-list :border="true">
         <uni-list-item title="关于我们" :showArrow="true" :showExtraIcon="true"
-          :extraIcon="{ color: '#000000', size: 22, type: 'info' }">
+          :extraIcon="{ color: '#000000', size: 22, type: 'info' }" link="navigateTo" :to="router.ABOUT_US_PAGE">
         </uni-list-item>
-        <uni-list-item title="免责声明" :showArrow="true" :showExtraIcon="true"
-          :extraIcon="{ color: '#000000', size: 22, type: 'minus' }">
+        <uni-list-item title="免责声明" :showArrow="true" :showExtraIcon="true" clickable
+          :extraIcon="{ color: '#000000', size: 22, type: 'minus' }" link="navigateTo" :to="router.DISCLAIMER_PAGE">
         </uni-list-item>
       </uni-list>
     </view>