更新大理市民卡app
diff --git a/uview-ui/libs/function/trim.js b/uview-ui/libs/function/trim.js
new file mode 100644
index 0000000..72adc37
--- /dev/null
+++ b/uview-ui/libs/function/trim.js
@@ -0,0 +1,15 @@
+function trim(str, pos = 'both') {
+	if (pos == 'both') {
+		return str.replace(/^\s+|\s+$/g, "");
+	} else if (pos == "left") {
+		return str.replace(/^\s*/, '');
+	} else if (pos == 'right') {
+		return str.replace(/(\s*$)/g, "");
+	} else if (pos == 'all') {
+		return str.replace(/\s+/g, "");
+	} else {
+		return str;
+	}
+}
+
+export default trim