Sfoglia il codice sorgente

添加心链计划页面

xiaoxin 1 anno fa
parent
commit
a426693ecb

+ 8 - 0
api/index.js

@@ -262,4 +262,12 @@ export const getApplicationReturn = async (data) => {
 		url: '/alumniReturn/applicationReturn',
 		data
 	})
+}
+
+//  获取心链分页数据
+export const getQueryHeart = async (data) => {
+	return await myRequest({
+		url: '/alumniHeart/queryHeartPage',
+		data
+	})
 }

+ 14 - 0
pages.json

@@ -146,6 +146,20 @@
 				"navigationBarTitleText": "404",
 				"navigationStyle": "custom"
 			}
+		},
+		{
+			"path": "pages/plan/plan",
+			"style": {
+				"navigationBarTitleText": "校友卡权益",
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/planDetail/planDetail",
+			"style": {
+				"navigationBarTitleText": "权益详情",
+				"navigationStyle": "custom"
+			}
 		}
 	],
 	"globalStyle": {

+ 2 - 1
pages/home/home.vue

@@ -8,6 +8,7 @@
 		<button type="primary" @click="go6">新闻聚焦</button>
 		<button type="primary" @click="go7">校友通讯录</button>
 		<button type="primary" @click="go8">审批管理</button>
+		<button type="primary" @click="go9">心链计划</button>
 	</view>
 </template>
 
@@ -62,7 +63,7 @@ const go8 = () => {
 
 const go9 = () => {
 	uni.navigateTo({
-		url: '/pages/404/404'
+		url: '/pages/plan/plan'
 	})
 }
 </script>

+ 5 - 1
pages/index/index.vue

@@ -74,6 +74,10 @@ const loginFilter = () => {
 			uni.reLaunch({
 				url: '/pages/check/check'
 			})
+		} else if (pageValue.value == 9) {
+			uni.reLaunch({
+				url: '/pages/plan/plan'
+			})
 		} else {
 			// uni.reLaunch({
 			// 	url: '/pages/home/home'
@@ -94,4 +98,4 @@ const getCardnumberURL = () => {
 }
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped></style>

+ 15 - 2
pages/news/news.vue

@@ -21,7 +21,7 @@
 </template>
 
 <script setup>
-import { onLoad } from '@dcloudio/uni-app'
+import { onLoad, onReachBottom } from '@dcloudio/uni-app'
 import { ref } from 'vue'
 import { getCategoryNewss, getNewsByCategoryId } from '@/api/index.js'
 import dayjs from 'dayjs'
@@ -44,6 +44,19 @@ onLoad(() => {
 	getCategory()
 })
 
+// 页面触底触发的回调
+onReachBottom(() => {
+	if (total.value > dataList.value.length) {
+		currentPage.value++
+		getData()
+	} else {
+		uni.showToast({
+			title: '没有更多数据了~~',
+			icon: 'none'
+		})
+	}
+})
+
 // 获取新闻分类列表数据
 const getCategory = async () => {
 	const res = await getCategoryNewss()
@@ -132,4 +145,4 @@ const clickItem = (item) => {
 		}
 	}
 }
-</style>
+</style>

+ 79 - 0
pages/plan/plan.vue

@@ -0,0 +1,79 @@
+<template>
+	<view class="plan">
+		<!-- 每一个权益区域 -->
+		<view class="box" v-for="item in dataList" :key="item.id" @click="goDetail(item)">
+			<image class="box_img" :src="item.coverImage" mode="aspectFill"></image>
+		</view>
+	</view>
+</template>
+
+<script setup>
+import { onLoad, onReachBottom } from '@dcloudio/uni-app'
+import { ref } from 'vue'
+import { getQueryHeart } from '@/api/index.js'
+
+// 当前页
+const currentPage = ref(1)
+// 每页多少条
+const pageCount = ref(6)
+// 总条数
+const total = ref(0)
+// 数据数组
+const dataList = ref([])
+
+onLoad(() => {
+	getData()
+})
+
+// 页面触底触发的回调
+onReachBottom(() => {
+	if (total.value > dataList.value.length) {
+		currentPage.value++
+		getData()
+	} else {
+		uni.showToast({
+			title: '没有更多数据了~~',
+			icon: 'none'
+		})
+	}
+})
+
+// 获取校友权益卡数组
+const getData = async () => {
+	let data = {
+		currentPage: currentPage.value,
+		pageCount: pageCount.value
+	}
+	const res = await getQueryHeart(data)
+	// console.log(res)
+	if (res.code == 200) {
+		dataList.value = [...dataList.value, ...res.data.list]
+		total.value = res.data.totalCount
+	}
+}
+
+// 点击每一项权益的回调
+const goDetail = (item) => {
+	let info = encodeURIComponent(JSON.stringify(item))
+	uni.navigateTo({
+		url: `/pages/planDetail/planDetail?info=${info}`
+	})
+}
+</script>
+
+<style lang="scss" scoped>
+.plan {
+	padding: 20rpx;
+
+	.box {
+		margin-bottom: 20rpx;
+		height: 260rpx;
+		box-shadow: 0 0 10rpx #d3d3d3;
+
+		.box_img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+}
+</style>

+ 36 - 0
pages/planDetail/planDetail.vue

@@ -0,0 +1,36 @@
+<template>
+	<view class="detail">
+		<view class="box">
+			<uv-parse :content="info.content"></uv-parse>
+		</view>
+	</view>
+</template>
+
+<script setup>
+import { onLoad } from '@dcloudio/uni-app'
+import { ref } from 'vue'
+
+// 详细信息
+const info = ref()
+
+onLoad((options) => {
+	if (options.info) {
+		info.value = JSON.parse(decodeURIComponent(options.info))
+		// console.log(info.value)
+	}
+})
+</script>
+
+<style lang="scss" scoped>
+.detail {
+	padding: 20rpx;
+	min-height: 100vh;
+	background-color: #d7d6dc;
+
+	.box {
+		padding: 20rpx;
+		border-radius: 20rpx;
+		background-color: #fff;
+	}
+}
+</style>

File diff suppressed because it is too large
+ 0 - 1
unpackage/dist/build/web/assets/debounce.BcF3U1dJ.js


+ 0 - 1
unpackage/dist/build/web/assets/home-BDVDLYMa.css

@@ -1 +0,0 @@
-.container[data-v-4c31dc12]{padding:.625rem}.container uni-button[data-v-4c31dc12]{margin-bottom:.625rem}

+ 1 - 1
unpackage/dist/build/web/index.html

@@ -14,7 +14,7 @@
     <title>H5_schoolFellow</title>
     <!--preload-links-->
     <!--app-context-->
-    <script type="module" crossorigin src="/alumnus/alumniH5/assets/index-wNOaAG3_.js"></script>
+    <script type="module" crossorigin src="/alumnus/alumniH5/assets/index-D6GRiGdv.js"></script>
     <link rel="stylesheet" crossorigin href="/alumnus/alumniH5/assets/index-DKUHF3PI.css">
   </head>
   <body>

+ 5 - 36
unpackage/dist/cache/.vite/deps/_metadata.json

@@ -1,46 +1,15 @@
 {
-  "hash": "09146d7d",
-  "configHash": "b27acba1",
+  "hash": "424e8c71",
+  "configHash": "d2198ba6",
   "lockfileHash": "e9149135",
-  "browserHash": "64a48bfe",
+  "browserHash": "27801f87",
   "optimized": {
     "dayjs": {
       "src": "../../../../../node_modules/dayjs/dayjs.min.js",
       "file": "dayjs.js",
-      "fileHash": "f8d65cae",
-      "needsInterop": true
-    },
-    "quill": {
-      "src": "../../../../../node_modules/quill/dist/quill.js",
-      "file": "quill.js",
-      "fileHash": "98ff153c",
-      "needsInterop": true
-    },
-    "lodash/throttle": {
-      "src": "../../../../../node_modules/lodash/throttle.js",
-      "file": "lodash_throttle.js",
-      "fileHash": "f57c1a3a",
-      "needsInterop": true
-    },
-    "lodash/debounce": {
-      "src": "../../../../../node_modules/lodash/debounce.js",
-      "file": "lodash_debounce.js",
-      "fileHash": "8484c02b",
-      "needsInterop": true
-    },
-    "lodash": {
-      "src": "../../../../../node_modules/lodash/lodash.js",
-      "file": "lodash.js",
-      "fileHash": "39ceec91",
+      "fileHash": "468a49dc",
       "needsInterop": true
     }
   },
-  "chunks": {
-    "chunk-CCODCYDK": {
-      "file": "chunk-CCODCYDK.js"
-    },
-    "chunk-Y2F7D3TJ": {
-      "file": "chunk-Y2F7D3TJ.js"
-    }
-  }
+  "chunks": {}
 }

+ 0 - 294
unpackage/dist/cache/.vite/deps/chunk-CCODCYDK.js

@@ -1,294 +0,0 @@
-import {
-  __commonJS
-} from "./chunk-Y2F7D3TJ.js";
-
-// E:/workSpace/H5_schoolFellow/node_modules/lodash/isObject.js
-var require_isObject = __commonJS({
-  "E:/workSpace/H5_schoolFellow/node_modules/lodash/isObject.js"(exports, module) {
-    function isObject(value) {
-      var type = typeof value;
-      return value != null && (type == "object" || type == "function");
-    }
-    module.exports = isObject;
-  }
-});
-
-// E:/workSpace/H5_schoolFellow/node_modules/lodash/_freeGlobal.js
-var require_freeGlobal = __commonJS({
-  "E:/workSpace/H5_schoolFellow/node_modules/lodash/_freeGlobal.js"(exports, module) {
-    var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
-    module.exports = freeGlobal;
-  }
-});
-
-// E:/workSpace/H5_schoolFellow/node_modules/lodash/_root.js
-var require_root = __commonJS({
-  "E:/workSpace/H5_schoolFellow/node_modules/lodash/_root.js"(exports, module) {
-    var freeGlobal = require_freeGlobal();
-    var freeSelf = typeof self == "object" && self && self.Object === Object && self;
-    var root = freeGlobal || freeSelf || Function("return this")();
-    module.exports = root;
-  }
-});
-
-// E:/workSpace/H5_schoolFellow/node_modules/lodash/now.js
-var require_now = __commonJS({
-  "E:/workSpace/H5_schoolFellow/node_modules/lodash/now.js"(exports, module) {
-    var root = require_root();
-    var now = function() {
-      return root.Date.now();
-    };
-    module.exports = now;
-  }
-});
-
-// E:/workSpace/H5_schoolFellow/node_modules/lodash/_trimmedEndIndex.js
-var require_trimmedEndIndex = __commonJS({
-  "E:/workSpace/H5_schoolFellow/node_modules/lodash/_trimmedEndIndex.js"(exports, module) {
-    var reWhitespace = /\s/;
-    function trimmedEndIndex(string) {
-      var index = string.length;
-      while (index-- && reWhitespace.test(string.charAt(index))) {
-      }
-      return index;
-    }
-    module.exports = trimmedEndIndex;
-  }
-});
-
-// E:/workSpace/H5_schoolFellow/node_modules/lodash/_baseTrim.js
-var require_baseTrim = __commonJS({
-  "E:/workSpace/H5_schoolFellow/node_modules/lodash/_baseTrim.js"(exports, module) {
-    var trimmedEndIndex = require_trimmedEndIndex();
-    var reTrimStart = /^\s+/;
-    function baseTrim(string) {
-      return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
-    }
-    module.exports = baseTrim;
-  }
-});
-
-// E:/workSpace/H5_schoolFellow/node_modules/lodash/_Symbol.js
-var require_Symbol = __commonJS({
-  "E:/workSpace/H5_schoolFellow/node_modules/lodash/_Symbol.js"(exports, module) {
-    var root = require_root();
-    var Symbol = root.Symbol;
-    module.exports = Symbol;
-  }
-});
-
-// E:/workSpace/H5_schoolFellow/node_modules/lodash/_getRawTag.js
-var require_getRawTag = __commonJS({
-  "E:/workSpace/H5_schoolFellow/node_modules/lodash/_getRawTag.js"(exports, module) {
-    var Symbol = require_Symbol();
-    var objectProto = Object.prototype;
-    var hasOwnProperty = objectProto.hasOwnProperty;
-    var nativeObjectToString = objectProto.toString;
-    var symToStringTag = Symbol ? Symbol.toStringTag : void 0;
-    function getRawTag(value) {
-      var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
-      try {
-        value[symToStringTag] = void 0;
-        var unmasked = true;
-      } catch (e) {
-      }
-      var result = nativeObjectToString.call(value);
-      if (unmasked) {
-        if (isOwn) {
-          value[symToStringTag] = tag;
-        } else {
-          delete value[symToStringTag];
-        }
-      }
-      return result;
-    }
-    module.exports = getRawTag;
-  }
-});
-
-// E:/workSpace/H5_schoolFellow/node_modules/lodash/_objectToString.js
-var require_objectToString = __commonJS({
-  "E:/workSpace/H5_schoolFellow/node_modules/lodash/_objectToString.js"(exports, module) {
-    var objectProto = Object.prototype;
-    var nativeObjectToString = objectProto.toString;
-    function objectToString(value) {
-      return nativeObjectToString.call(value);
-    }
-    module.exports = objectToString;
-  }
-});
-
-// E:/workSpace/H5_schoolFellow/node_modules/lodash/_baseGetTag.js
-var require_baseGetTag = __commonJS({
-  "E:/workSpace/H5_schoolFellow/node_modules/lodash/_baseGetTag.js"(exports, module) {
-    var Symbol = require_Symbol();
-    var getRawTag = require_getRawTag();
-    var objectToString = require_objectToString();
-    var nullTag = "[object Null]";
-    var undefinedTag = "[object Undefined]";
-    var symToStringTag = Symbol ? Symbol.toStringTag : void 0;
-    function baseGetTag(value) {
-      if (value == null) {
-        return value === void 0 ? undefinedTag : nullTag;
-      }
-      return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
-    }
-    module.exports = baseGetTag;
-  }
-});
-
-// E:/workSpace/H5_schoolFellow/node_modules/lodash/isObjectLike.js
-var require_isObjectLike = __commonJS({
-  "E:/workSpace/H5_schoolFellow/node_modules/lodash/isObjectLike.js"(exports, module) {
-    function isObjectLike(value) {
-      return value != null && typeof value == "object";
-    }
-    module.exports = isObjectLike;
-  }
-});
-
-// E:/workSpace/H5_schoolFellow/node_modules/lodash/isSymbol.js
-var require_isSymbol = __commonJS({
-  "E:/workSpace/H5_schoolFellow/node_modules/lodash/isSymbol.js"(exports, module) {
-    var baseGetTag = require_baseGetTag();
-    var isObjectLike = require_isObjectLike();
-    var symbolTag = "[object Symbol]";
-    function isSymbol(value) {
-      return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
-    }
-    module.exports = isSymbol;
-  }
-});
-
-// E:/workSpace/H5_schoolFellow/node_modules/lodash/toNumber.js
-var require_toNumber = __commonJS({
-  "E:/workSpace/H5_schoolFellow/node_modules/lodash/toNumber.js"(exports, module) {
-    var baseTrim = require_baseTrim();
-    var isObject = require_isObject();
-    var isSymbol = require_isSymbol();
-    var NAN = 0 / 0;
-    var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
-    var reIsBinary = /^0b[01]+$/i;
-    var reIsOctal = /^0o[0-7]+$/i;
-    var freeParseInt = parseInt;
-    function toNumber(value) {
-      if (typeof value == "number") {
-        return value;
-      }
-      if (isSymbol(value)) {
-        return NAN;
-      }
-      if (isObject(value)) {
-        var other = typeof value.valueOf == "function" ? value.valueOf() : value;
-        value = isObject(other) ? other + "" : other;
-      }
-      if (typeof value != "string") {
-        return value === 0 ? value : +value;
-      }
-      value = baseTrim(value);
-      var isBinary = reIsBinary.test(value);
-      return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
-    }
-    module.exports = toNumber;
-  }
-});
-
-// E:/workSpace/H5_schoolFellow/node_modules/lodash/debounce.js
-var require_debounce = __commonJS({
-  "E:/workSpace/H5_schoolFellow/node_modules/lodash/debounce.js"(exports, module) {
-    var isObject = require_isObject();
-    var now = require_now();
-    var toNumber = require_toNumber();
-    var FUNC_ERROR_TEXT = "Expected a function";
-    var nativeMax = Math.max;
-    var nativeMin = Math.min;
-    function debounce(func, wait, options) {
-      var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
-      if (typeof func != "function") {
-        throw new TypeError(FUNC_ERROR_TEXT);
-      }
-      wait = toNumber(wait) || 0;
-      if (isObject(options)) {
-        leading = !!options.leading;
-        maxing = "maxWait" in options;
-        maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
-        trailing = "trailing" in options ? !!options.trailing : trailing;
-      }
-      function invokeFunc(time) {
-        var args = lastArgs, thisArg = lastThis;
-        lastArgs = lastThis = void 0;
-        lastInvokeTime = time;
-        result = func.apply(thisArg, args);
-        return result;
-      }
-      function leadingEdge(time) {
-        lastInvokeTime = time;
-        timerId = setTimeout(timerExpired, wait);
-        return leading ? invokeFunc(time) : result;
-      }
-      function remainingWait(time) {
-        var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
-        return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
-      }
-      function shouldInvoke(time) {
-        var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
-        return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
-      }
-      function timerExpired() {
-        var time = now();
-        if (shouldInvoke(time)) {
-          return trailingEdge(time);
-        }
-        timerId = setTimeout(timerExpired, remainingWait(time));
-      }
-      function trailingEdge(time) {
-        timerId = void 0;
-        if (trailing && lastArgs) {
-          return invokeFunc(time);
-        }
-        lastArgs = lastThis = void 0;
-        return result;
-      }
-      function cancel() {
-        if (timerId !== void 0) {
-          clearTimeout(timerId);
-        }
-        lastInvokeTime = 0;
-        lastArgs = lastCallTime = lastThis = timerId = void 0;
-      }
-      function flush() {
-        return timerId === void 0 ? result : trailingEdge(now());
-      }
-      function debounced() {
-        var time = now(), isInvoking = shouldInvoke(time);
-        lastArgs = arguments;
-        lastThis = this;
-        lastCallTime = time;
-        if (isInvoking) {
-          if (timerId === void 0) {
-            return leadingEdge(lastCallTime);
-          }
-          if (maxing) {
-            clearTimeout(timerId);
-            timerId = setTimeout(timerExpired, wait);
-            return invokeFunc(lastCallTime);
-          }
-        }
-        if (timerId === void 0) {
-          timerId = setTimeout(timerExpired, wait);
-        }
-        return result;
-      }
-      debounced.cancel = cancel;
-      debounced.flush = flush;
-      return debounced;
-    }
-    module.exports = debounce;
-  }
-});
-
-export {
-  require_isObject,
-  require_debounce
-};
-//# sourceMappingURL=chunk-CCODCYDK.js.map

File diff suppressed because it is too large
+ 0 - 7
unpackage/dist/cache/.vite/deps/chunk-CCODCYDK.js.map


+ 0 - 9
unpackage/dist/cache/.vite/deps/chunk-Y2F7D3TJ.js

@@ -1,9 +0,0 @@
-var __getOwnPropNames = Object.getOwnPropertyNames;
-var __commonJS = (cb, mod) => function __require() {
-  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
-};
-
-export {
-  __commonJS
-};
-//# sourceMappingURL=chunk-Y2F7D3TJ.js.map

+ 0 - 7
unpackage/dist/cache/.vite/deps/chunk-Y2F7D3TJ.js.map

@@ -1,7 +0,0 @@
-{
-  "version": 3,
-  "sources": [],
-  "sourcesContent": [],
-  "mappings": "",
-  "names": []
-}

+ 4 - 3
unpackage/dist/cache/.vite/deps/dayjs.js

@@ -1,6 +1,7 @@
-import {
-  __commonJS
-} from "./chunk-Y2F7D3TJ.js";
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __commonJS = (cb, mod) => function __require() {
+  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
+};
 
 // E:/workSpace/H5_schoolFellow/node_modules/dayjs/dayjs.min.js
 var require_dayjs_min = __commonJS({

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/cache/.vite/deps/dayjs.js.map


+ 0 - 6
unpackage/dist/cache/.vite/deps/lodash_debounce.js

@@ -1,6 +0,0 @@
-import {
-  require_debounce
-} from "./chunk-CCODCYDK.js";
-import "./chunk-Y2F7D3TJ.js";
-export default require_debounce();
-//# sourceMappingURL=lodash_debounce.js.map

+ 0 - 7
unpackage/dist/cache/.vite/deps/lodash_debounce.js.map

@@ -1,7 +0,0 @@
-{
-  "version": 3,
-  "sources": [],
-  "sourcesContent": [],
-  "mappings": "",
-  "names": []
-}

+ 0 - 34
unpackage/dist/cache/.vite/deps/lodash_throttle.js

@@ -1,34 +0,0 @@
-import {
-  require_debounce,
-  require_isObject
-} from "./chunk-CCODCYDK.js";
-import {
-  __commonJS
-} from "./chunk-Y2F7D3TJ.js";
-
-// E:/workSpace/H5_schoolFellow/node_modules/lodash/throttle.js
-var require_throttle = __commonJS({
-  "E:/workSpace/H5_schoolFellow/node_modules/lodash/throttle.js"(exports, module) {
-    var debounce = require_debounce();
-    var isObject = require_isObject();
-    var FUNC_ERROR_TEXT = "Expected a function";
-    function throttle(func, wait, options) {
-      var leading = true, trailing = true;
-      if (typeof func != "function") {
-        throw new TypeError(FUNC_ERROR_TEXT);
-      }
-      if (isObject(options)) {
-        leading = "leading" in options ? !!options.leading : leading;
-        trailing = "trailing" in options ? !!options.trailing : trailing;
-      }
-      return debounce(func, wait, {
-        "leading": leading,
-        "maxWait": wait,
-        "trailing": trailing
-      });
-    }
-    module.exports = throttle;
-  }
-});
-export default require_throttle();
-//# sourceMappingURL=lodash_throttle.js.map

File diff suppressed because it is too large
+ 0 - 7
unpackage/dist/cache/.vite/deps/lodash_throttle.js.map


File diff suppressed because it is too large
+ 0 - 11733
unpackage/dist/cache/.vite/deps/quill.js


File diff suppressed because it is too large
+ 0 - 7
unpackage/dist/cache/.vite/deps/quill.js.map