From dffbff73e6d9ef6863effc1c9fa37b375e12be65 Mon Sep 17 00:00:00 2001
From: 叶富雄 <yefuxiong@yeah.net>
Date: Sat, 14 Mar 2026 02:24:08 +0800
Subject: [PATCH] UI
---
uni.promisify.adaptor.js | 13
androidPrivacy.json | 38 +
util.js | 356 ++++++++++++++++
package-lock.json | 24 +
manifest.json | 199 +++++++++
index.html | 20
pages.json | 281 +++++++++++++
package.json | 5
main.js | 78 +++
App.vue | 115 +++++
uni.scss | 76 +++
11 files changed, 1,205 insertions(+), 0 deletions(-)
diff --git a/App.vue b/App.vue
new file mode 100644
index 0000000..df3e9ab
--- /dev/null
+++ b/App.vue
@@ -0,0 +1,115 @@
+<script>
+ export default {
+ onShow: function() {
+ // #ifdef APP-PLUS
+ var args= plus.runtime.arguments;
+ if(args){
+ // 处理args参数,如直达到某新页面等
+ console.log('args', args)
+ if(args.indexOf('lzzzsc-app') >= 0) {
+ args = args.replace("lzzzsc-app://", "/")
+ return uni.redirectTo({
+ url: args
+ })
+ }
+ }
+ // #endif
+ },
+ onLaunch: function(options) {
+ let t = this
+ t.$util.post('Index/getConfig').then(res => {
+ console.log('getConfig', res.data)
+ if(res.code == 1){
+ try {
+ const token = uni.getStorageSync('lzsc-token');
+ if (!token) {
+ /*
+ uni.redirectTo({
+ url: '/pages/login/login'
+ })
+ return false
+ */
+ }
+ } catch (e) {
+ uni.redirectTo({
+ url: '/pages/login/login'
+ })
+ return false
+
+ }
+ uni.setStorageSync('Config', JSON.stringify(res.data))
+
+ // #ifdef APP-PLUS
+ //机型
+ let platform = uni.getSystemInfoSync().platform.toLocaleLowerCase()
+ //console.log('platform', uni.getSystemInfoSync())
+ plus.runtime.getProperty(plus.runtime.appid, widgetInfo => {
+ //下载地址
+ let downUrl = res.data.downUrl
+ //更新标志
+ let updateFlag = false
+ //更新内容
+ let updesc = ''
+ if(platform == 'ios' && parseInt(widgetInfo.versionCode) != parseInt(res.data.ios.code)){
+ updateFlag = !updateFlag
+ updesc = res.data.ios.desc
+ }
+ if(platform == 'android' && parseInt(widgetInfo.versionCode) != parseInt(res.data.android.code)){
+ updateFlag = !updateFlag
+ updesc = res.data.android.desc
+ }
+ if (downUrl && updateFlag) {
+ uni.showModal({
+ showCancel: false,
+ confirmText: '立即更新',
+ title: '温馨提示!',
+ content: updesc || '有最新版本,请更新APP!',
+ success: res => {
+ if (res.confirm) {
+ plus.runtime.openURL(downUrl)
+ }
+ }
+ })
+ }
+ })
+ // #endif
+ }
+ })
+ },
+ onHide: function() {
+ }
+ }
+</script>
+
+<style>
+ /*每个页面公共css */
+ .startBar {
+ width: 100%;
+ height: var(--status-bar-height);
+ }
+ .noData{
+ width: 100%;
+ font-size: 28upx;
+ }
+ .noData image{
+ width: 120upx;
+ height: 100upx;
+ display: block;
+ margin: 100upx auto 30upx;
+ }
+ .noData view{
+ width: 100%;
+ text-align: center;
+ color: #666666;
+ }
+ .noDataBtn{
+ width: 240upx !important;
+ margin: 50upx auto;
+ background-color: #ff7945;
+ color: #ffffff !important;
+ letter-spacing: 10upx;
+ height: 70upx;
+ line-height: 70upx;
+ border-radius: 50upx;
+ }
+</style>
diff --git a/androidPrivacy.json b/androidPrivacy.json
new file mode 100644
index 0000000..218c21f
--- /dev/null
+++ b/androidPrivacy.json
@@ -0,0 +1,38 @@
+{
+ "version" : "1",
+ "prompt" : "template",
+ "title" : "荔枝商城注册协议和隐私政策",
+ "message" : " 请你务必审慎阅读、充分理解“注册协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=\"https://www.ncmiruo.com/index/?gp=1 \">《注册协议》</a>和<a href=\"https://www.ncmiruo.com/?gp=2 \">《隐私政策》</a>了解详细信息。并且我们会申请读取您的设备信息,以向您提供安全风控服务。同时您应特别注意前述协议中免除或者限制我们责任的条款、对您权利进行限制的条款。如您已详细阅读并同意金喜易购服务协议和隐私政策,请点击【同意并继续】开始使用我们的服务。",
+ "buttonAccept" : "同意并继续",
+ "buttonRefuse" : "暂不同意",
+ "hrefLoader" : "system",
+ "backToExit" : "false",
+ "second" : {
+ "title" : "确认提示",
+ "message" : " 进入应用前,你需先同意<a href=\"https://www.ncmiruo.com/?gp=1\">《注册协议》</a>和<a href=\"https://www.ncmiruo.com/?gp=2\">《隐私政策》</a>,否则将退出应用。",
+ "buttonAccept" : "同意并继续",
+ "buttonRefuse" : "退出应用"
+ },
+ "disagreeMode" : {
+ "support" : false,
+ "loadNativePlugins" : false,
+ "visitorEntry" : false,
+ "showAlways" : false
+ },
+ "styles" : {
+ "backgroundColor" : "#FFFFFF",
+ "borderRadius" : "5px",
+ "title" : {
+ "color" : "#000000"
+ },
+ "buttonAccept" : {
+ "color" : "#000000"
+ },
+ "buttonRefuse" : {
+ "color" : "#666666"
+ },
+ "buttonVisitor" : {
+ "color" : "#00ffff"
+ }
+ }
+}
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..c3ff205
--- /dev/null
+++ b/index.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8" />
+ <script>
+ var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
+ CSS.supports('top: constant(a)'))
+ document.write(
+ '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
+ (coverSupport ? ', viewport-fit=cover' : '') + '" />')
+ </script>
+ <title></title>
+ <!--preload-links-->
+ <!--app-context-->
+ </head>
+ <body>
+ <div id="app"><!--app-html--></div>
+ <script type="module" src="/main.js"></script>
+ </body>
+</html>
diff --git a/main.js b/main.js
new file mode 100644
index 0000000..404f9a3
--- /dev/null
+++ b/main.js
@@ -0,0 +1,78 @@
+import App from './App'
+
+// #ifndef VUE3
+import Vue from 'vue'
+import './uni.promisify.adaptor'
+import util from './util.js'
+Vue.config.productionTip = false
+App.mpType = 'app'
+Vue.prototype.$webHost = 'https://rbb98765.zrgy-bbg.com'
+Vue.prototype.$util = util
+Vue.prototype.$baseUrl = 'https://tmy.xjzbh.com'
+Vue.prototype.$bank = [
+ '中国工商银行',
+ '中国建设银行',
+ '中国银行',
+ '中国农业银行',
+ '中国邮政储蓄银行',
+ '中国交通银行',
+ '浦东发展银行',
+ '中信银行',
+ '华夏银行',
+ '中国民生银行',
+ '广发银行',
+ '兴业银行',
+ '平安银行',
+ '浙商银行',
+ '恒丰银行',
+ '渤海银行',
+ '上海银行',
+ '北京银行',
+]
+Vue.prototype.$job = [
+ '个体工商户',
+ '公司企业',
+ '政府机关',
+ '事业单位',
+ '社会组织',
+ '灵活就业',
+]
+Vue.prototype.$relation = [
+ '父母',
+ '配偶',
+ '同事',
+ '好友',
+ '同学',
+ '其他',
+]
+Vue.prototype.$income = [
+ '1000-5000',
+ '5000-10000',
+ '10000-20000',
+ '20000-30000',
+ '30000以上',
+]
+// 全局跳转方法
+Vue.prototype.$goWebUrl = function(url) {
+ // #ifdef APP-PLUS
+ plus.runtime.openURL(url)
+ // #endif
+ // #ifdef H5 || WEB
+ this.$refs.popup_agree.open()
+ // #endif
+}
+const app = new Vue({
+ ...App
+})
+app.$mount()
+// #endif
+
+// #ifdef VUE3
+import { createSSRApp } from 'vue'
+export function createApp() {
+ const app = createSSRApp(App)
+ return {
+ app
+ }
+}
+// #endif
diff --git a/manifest.json b/manifest.json
new file mode 100644
index 0000000..62f0e3c
--- /dev/null
+++ b/manifest.json
@@ -0,0 +1,199 @@
+{
+ "name" : "齐享购",
+ "appid" : "__UNI__AEFE893",
+ "description" : "",
+ "versionName" : "1.3.6",
+ "versionCode" : 136,
+ "transformPx" : false,
+ /* 5+App特有相关 */
+ "app-plus" : {
+ "statusbar" : {
+ "immersed" : false
+ },
+ "compatible" : {
+ "ignoreVersion" : true
+ },
+ "usingComponents" : true,
+ "nvueStyleCompiler" : "uni-app",
+ "compilerVersion" : 3,
+ "splashscreen" : {
+ "alwaysShowBeforeRender" : true,
+ "waiting" : true,
+ "autoclose" : true,
+ "delay" : 0
+ },
+ /* 模块配置 */
+ "modules" : {
+ "Contacts" : {},
+ "Camera" : {},
+ "Barcode" : {},
+ "Share" : {},
+ "Payment" : {},
+ "Geolocation" : {}
+ },
+ /* 应用发布信息 */
+ "distribute" : {
+ /* android打包配置 */
+ "android" : {
+ "permissions" : [
+ "<uses-feature android:name=\"android.hardware.camera\"/>",
+ "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+ "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+ "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+ "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
+ "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+ "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+ "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+ "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+ "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+ "<uses-permission android:name=\"android.permission.INTERNET\"/>",
+ "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+ "<uses-permission android:name=\"android.permission.READ_CALL_LOG\"/>",
+ "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
+ "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+ "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+ "<uses-permission android:name=\"android.permission.READ_SMS\"/>",
+ "<uses-permission android:name=\"android.permission.SEND_RESPOND_VIA_MESSAGE\"/>",
+ "<uses-permission android:name=\"android.permission.SEND_SMS\"/>",
+ "<uses-permission android:name=\"android.permission.USE_FINGERPRINT\"/>",
+ "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+ "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+ "<uses-permission android:name=\"android.permission.WRITE_CALL_LOG\"/>",
+ "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
+ "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
+ "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
+ "<uses-permission android:name=\"android.permission.WRITE_SMS\"/>"
+ ],
+ "minSdkVersion" : 29,
+ "schemes" : "miruo-app",
+ "targetSdkVersion" : 30,
+ "abiFilters" : [ "arm64-v8a" ]
+ },
+ /* ios打包配置 */
+ "ios" : {
+ "privacyDescription" : {
+ "NSPhotoLibraryUsageDescription" : "访问您的照片修改头像、扫描和用于拍照、发送图片,需要获取读写手机(系统提示为访问设备的照片、媒体内容和文件)权限,请允许!",
+ "NSPhotoLibraryAddUsageDescription" : "访问您的照片修改头像、扫描和用于拍照、发送图片,需要获取读写手机(系统提示为访问设备的照片、媒体内容和文件)权限,请允许!",
+ "NSCameraUsageDescription" : "访问您的摄像头 方便用户拍摄上传修改头像 反馈问题"
+ },
+ "dSYMs" : false,
+ "capabilities" : {
+ "entitlements" : {
+ "com.apple.developer.associated-domains" : [ "applinks:www.ncmiruo.com" ]
+ }
+ },
+ "urltypes" : "miruo-app"
+ },
+ /* SDK配置 */
+ "sdkConfigs" : {
+ "share" : {
+ "weixin" : {
+ "appid" : "wxf640033dc64c32e3",
+ "UniversalLinks" : "https://www.ncmiruo.com/uni-universallinks/__UNI__1C9E60B/"
+ }
+ },
+ "payment" : {
+ "weixin" : {
+ "__platform__" : [ "ios", "android" ],
+ "appid" : "wxf640033dc64c32e3",
+ "UniversalLinks" : "https://www.ncmiruo.com/uni-universallinks/__UNI__1C9E60B/"
+ }
+ },
+ "geolocation" : {
+ "system" : {
+ "__platform__" : [ "ios", "android" ]
+ }
+ }
+ },
+ "splashscreen" : {
+ "useOriginalMsgbox" : true
+ },
+ "icons" : {
+ "android" : {
+ "hdpi" : "unpackage/res/icons/72x72.png",
+ "xhdpi" : "unpackage/res/icons/96x96.png",
+ "xxhdpi" : "unpackage/res/icons/144x144.png",
+ "xxxhdpi" : "unpackage/res/icons/192x192.png"
+ },
+ "ios" : {
+ "appstore" : "unpackage/res/icons/1024x1024.png",
+ "ipad" : {
+ "app" : "unpackage/res/icons/76x76.png",
+ "app@2x" : "unpackage/res/icons/152x152.png",
+ "notification" : "unpackage/res/icons/20x20.png",
+ "notification@2x" : "unpackage/res/icons/40x40.png",
+ "proapp@2x" : "unpackage/res/icons/167x167.png",
+ "settings" : "unpackage/res/icons/29x29.png",
+ "settings@2x" : "unpackage/res/icons/58x58.png",
+ "spotlight" : "unpackage/res/icons/40x40.png",
+ "spotlight@2x" : "unpackage/res/icons/80x80.png"
+ },
+ "iphone" : {
+ "app@2x" : "unpackage/res/icons/120x120.png",
+ "app@3x" : "unpackage/res/icons/180x180.png",
+ "notification@2x" : "unpackage/res/icons/40x40.png",
+ "notification@3x" : "unpackage/res/icons/60x60.png",
+ "settings@2x" : "unpackage/res/icons/58x58.png",
+ "settings@3x" : "unpackage/res/icons/87x87.png",
+ "spotlight@2x" : "unpackage/res/icons/80x80.png",
+ "spotlight@3x" : "unpackage/res/icons/120x120.png"
+ }
+ }
+ }
+ },
+ "nativePlugins" : {
+ "DC-WBFaceServiceV2" : {
+ "__plugin_info__" : {
+ "name" : "DC-WBFaceServiceV2",
+ "description" : "核身服务",
+ "platforms" : "Android,iOS",
+ "url" : "https://ext.dcloud.net.cn/plugin?id=10378",
+ "android_package_name" : "com.zhibaohui.qxg",
+ "ios_bundle_id" : "",
+ "isCloud" : true,
+ "bought" : 1,
+ "pid" : "10378",
+ "parameters" : {}
+ }
+ },
+ "DC-WBNormal" : {
+ "__plugin_info__" : {
+ "name" : "DC-WBNormal",
+ "description" : "WB Normal SDK uni-app 插件",
+ "platforms" : "Android",
+ "url" : "https://ext.dcloud.net.cn/plugin?id=1491",
+ "android_package_name" : "com.zhibaohui.qxg",
+ "ios_bundle_id" : "",
+ "isCloud" : true,
+ "bought" : 1,
+ "pid" : "1491",
+ "parameters" : {}
+ }
+ }
+ }
+ },
+ /* 快应用特有相关 */
+ "quickapp" : {},
+ /* 小程序特有相关 */
+ "mp-weixin" : {
+ "appid" : "",
+ "setting" : {
+ "urlCheck" : false
+ },
+ "usingComponents" : true
+ },
+ "mp-alipay" : {
+ "usingComponents" : true
+ },
+ "mp-baidu" : {
+ "usingComponents" : true
+ },
+ "mp-toutiao" : {
+ "usingComponents" : true
+ },
+ "uniStatistics" : {
+ "enable" : false
+ },
+ "vueVersion" : "2",
+ "_spaceID" : "mp-85f4a702-1f48-4988-b9b0-b9d8b333fccd"
+}
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..4241be9
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,24 @@
+{
+ "name": "gold",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {
+ "": {
+ "dependencies": {
+ "crypto-js": "^4.2.0"
+ }
+ },
+ "node_modules/crypto-js": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
+ "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
+ }
+ },
+ "dependencies": {
+ "crypto-js": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
+ "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
+ }
+ }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..9bd309c
--- /dev/null
+++ b/package.json
@@ -0,0 +1,5 @@
+{
+ "dependencies": {
+ "crypto-js": "^4.2.0"
+ }
+}
diff --git a/pages.json b/pages.json
new file mode 100644
index 0000000..7214a72
--- /dev/null
+++ b/pages.json
@@ -0,0 +1,281 @@
+{
+ "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+ {
+ "path": "pages/index/index",
+ "style": {
+ "navigationStyle":"custom",
+ "navigationBarTitleText": "齐享购"
+ }
+ },
+ {
+ "path" : "pages/cates/cates",
+ "style" :
+ {
+ "navigationBarTitleText": "分类"
+ }
+ },
+ {
+ "path" : "pages/my/my",
+ "style" :
+ {
+ "navigationStyle":"custom",
+ "navigationBarTitleText": "我的",
+ "navigationBarBackgroundColor": "#e3b400",
+ "app-plus": {
+ "titleNView": false
+ }
+ }
+ },
+ {
+ "path" : "pages/carts/carts",
+ "style" :
+ {
+ "navigationBarTitleText" : "购物车"
+ }
+ },
+ {
+ "path" : "pages/idcard/idcard",
+ "style" :
+ {
+ "navigationBarTitleText" : "实名认证"
+ }
+ },
+ {
+ "path" : "pages/login/login",
+ "style" :
+ {
+ "navigationBarTitleText" : "账号登录"
+ }
+ },
+ {
+ "path" : "pages/ginfo/ginfo",
+ "style" :
+ {
+ "navigationStyle":"custom",
+ "navigationBarTitleText": "商品详情"
+ }
+ },
+ {
+ "path" : "pages/collect/collect",
+ "style" :
+ {
+ "navigationBarTitleText" : "我的收藏"
+ }
+ },
+ {
+ "path" : "pages/address/address",
+ "style" :
+ {
+ "navigationBarTitleText" : "我的地址"
+ }
+ },
+ {
+ "path" : "pages/addAddr/addAddr",
+ "style" :
+ {
+ "navigationBarTitleText" : "编辑地址"
+ }
+ },
+ {
+ "path" : "pages/pays/pays",
+ "style" :
+ {
+ "navigationBarTitleText" : "确认订单"
+ }
+ },
+ {
+ "path" : "pages/bank/bank",
+ "style" :
+ {
+ "navigationBarTitleText" : "银行卡"
+ }
+ },
+ {
+ "path" : "pages/addBank/addBank",
+ "style" :
+ {
+ "navigationBarTitleText" : "编辑银行卡"
+ }
+ },
+ {
+ "path" : "pages/face/face",
+ "style" :
+ {
+ "navigationBarTitleText" : "人脸认证"
+ }
+ },
+ {
+ "path" : "pages/order/order",
+ "style" :
+ {
+ "navigationBarTitleText" : "我的订单"
+ }
+ },
+ {
+ "path" : "pages/edu/edu",
+ "style" :
+ {
+ "navigationBarTitleText" : "授信额度"
+ }
+ },
+ {
+ "path" : "pages/logs/logs",
+ "style" :
+ {
+ "navigationBarTitleText" : "账单信息"
+ }
+ },
+ {
+ "path" : "pages/profile/profile",
+ "style" :
+ {
+ "navigationBarTitleText" : "个人资料"
+ }
+ },
+ {
+ "path" : "pages/search/search",
+ "style" :
+ {
+ "navigationStyle":"custom",
+ "navigationBarTitleText": "商品搜索"
+ }
+ },
+ {
+ "path" : "pages/catesList/catesList",
+ "style" :
+ {
+ "navigationBarTitleText" : ""
+ }
+ },
+ {
+ "path" : "pages/regist/regist",
+ "style" :
+ {
+ "navigationBarTitleText" : "账号注册"
+ }
+ },
+ {
+ "path" : "pages/findpass/findpass",
+ "style" :
+ {
+ "navigationBarTitleText" : "忘记密码"
+ }
+ },
+ {
+ "path" : "pages/entrust/entrust",
+ "style" :
+ {
+ "navigationBarTitleText" : "会员服务协议"
+ }
+ },
+ {
+ "path" : "pages/agree/agree",
+ "style" :
+ {
+ "navigationBarTitleText" : "委托扣款确认书"
+ }
+ },
+ {
+ "path" : "pages/job/job",
+ "style" :
+ {
+ "navigationBarTitleText" : "工作资料"
+ }
+ },
+ {
+ "path" : "pages/esign/esign",
+ "style" :
+ {
+ "navigationBarTitleText" : ""
+ }
+ },
+ {
+ "path" : "pages/orderinfo/orderinfo",
+ "style" :
+ {
+ "navigationBarTitleText" : "订单详情"
+ }
+ },
+ {
+ "path" : "pages/wallet/wallet",
+ "style" :
+ {
+ "navigationStyle":"custom",
+ "navigationBarTitleText": "钱包"
+ }
+ },
+ {
+ "path": "pages/customer/customer",
+ "style": {
+ "navigationBarTitleText": "联系客服"
+ }
+ },
+ {
+ "path": "pages/quanyi/index",
+ "style": {
+ "navigationBarTitleText": "权益",
+ "navigationStyle":"custom"
+ }
+ },
+ {
+ "path": "pages/quanyi/add",
+ "style": {
+ "navigationBarTitleText": "绑卡",
+ "navigationStyle":"custom"
+ }
+ },
+ {
+ "path": "pages/quanshou/index",
+ "style": {
+ "navigationBarTitleText": "绑卡",
+ "navigationStyle":"custom"
+ }
+ },
+ {
+ "path": "pages/web/index",
+ "style": {
+ "navigationBarTitleText": "绑卡",
+ "navigationStyle":"custom"
+ }
+ }
+ ],
+ "tabBar": {
+ "color": "#252938",
+ "selectedColor": "#FF1472",
+ "borderStyle": "black",
+ "backgroundColor": "#FFFFFF",
+ "list": [
+ {
+ "pagePath": "pages/index/index",
+ "iconPath": "static/imgs/tab-1.png",
+ "selectedIconPath": "static/imgs/tab-s-1.png",
+ "text": "首页"
+ },
+ {
+ "pagePath": "pages/cates/cates",
+ "iconPath": "static/imgs/tab-2.png",
+ "selectedIconPath": "static/imgs/tab-s-2.png",
+ "text": "分类"
+ },
+ {
+ "pagePath": "pages/carts/carts",
+ "iconPath": "static/imgs/tab-3.png",
+ "selectedIconPath": "static/imgs/tab-s-3.png",
+ "text": "购物车"
+ },
+ {
+ "pagePath": "pages/my/my",
+ "iconPath": "static/imgs/tab-4.png",
+ "selectedIconPath": "static/imgs/tab-s-4.png",
+ "text": "我的"
+ }
+ ]
+ },
+ "globalStyle": {
+ "navigationBarTextStyle": "black",
+ "navigationBarTitleText": "齐享购",
+ "navigationBarBackgroundColor": "#F8F8F8",
+ "backgroundColor": "#F8F8F8"
+ },
+ "uniIdRouter": {}
+}
diff --git a/uni.promisify.adaptor.js b/uni.promisify.adaptor.js
new file mode 100644
index 0000000..5fec4f3
--- /dev/null
+++ b/uni.promisify.adaptor.js
@@ -0,0 +1,13 @@
+uni.addInterceptor({
+ returnValue (res) {
+ if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) {
+ return res;
+ }
+ return new Promise((resolve, reject) => {
+ res.then((res) => {
+ if (!res) return resolve(res)
+ return res[0] ? reject(res[0]) : resolve(res[1])
+ });
+ });
+ },
+});
\ No newline at end of file
diff --git a/uni.scss b/uni.scss
new file mode 100644
index 0000000..b9249e9
--- /dev/null
+++ b/uni.scss
@@ -0,0 +1,76 @@
+/**
+ * 这里是uni-app内置的常用样式变量
+ *
+ * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
+ * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
+ *
+ */
+
+/**
+ * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
+ *
+ * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
+ */
+
+/* 颜色变量 */
+
+/* 行为相关颜色 */
+$uni-color-primary: #007aff;
+$uni-color-success: #4cd964;
+$uni-color-warning: #f0ad4e;
+$uni-color-error: #dd524d;
+
+/* 文字基本颜色 */
+$uni-text-color:#333;//基本色
+$uni-text-color-inverse:#fff;//反色
+$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
+$uni-text-color-placeholder: #808080;
+$uni-text-color-disable:#c0c0c0;
+
+/* 背景颜色 */
+$uni-bg-color:#ffffff;
+$uni-bg-color-grey:#f8f8f8;
+$uni-bg-color-hover:#f1f1f1;//点击状态颜色
+$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
+
+/* 边框颜色 */
+$uni-border-color:#c8c7cc;
+
+/* 尺寸变量 */
+
+/* 文字尺寸 */
+$uni-font-size-sm:12px;
+$uni-font-size-base:14px;
+$uni-font-size-lg:16px;
+
+/* 图片尺寸 */
+$uni-img-size-sm:20px;
+$uni-img-size-base:26px;
+$uni-img-size-lg:40px;
+
+/* Border Radius */
+$uni-border-radius-sm: 2px;
+$uni-border-radius-base: 3px;
+$uni-border-radius-lg: 6px;
+$uni-border-radius-circle: 50%;
+
+/* 水平间距 */
+$uni-spacing-row-sm: 5px;
+$uni-spacing-row-base: 10px;
+$uni-spacing-row-lg: 15px;
+
+/* 垂直间距 */
+$uni-spacing-col-sm: 4px;
+$uni-spacing-col-base: 8px;
+$uni-spacing-col-lg: 12px;
+
+/* 透明度 */
+$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
+
+/* 文章场景相关 */
+$uni-color-title: #2C405A; // 文章标题颜色
+$uni-font-size-title:20px;
+$uni-color-subtitle: #555555; // 二级标题颜色
+$uni-font-size-subtitle:26px;
+$uni-color-paragraph: #3F536E; // 文章段落颜色
+$uni-font-size-paragraph:15px;
diff --git a/util.js b/util.js
new file mode 100644
index 0000000..e28c766
--- /dev/null
+++ b/util.js
@@ -0,0 +1,356 @@
+import CryptoJS from './node_modules/crypto-js/crypto-js.js'
+const baseUrl = 'https://tmy.xjzbh.com/api/'
+const cryptKey = '2025Shop2025Shop'
+const cryptIv = '2025Shop2025Shop'
+
+// 加密
+const encryptDes = (data) => {
+ // 将key解析为字节
+ let aes_key = CryptoJS.enc.Utf8.parse(cryptKey);
+ // 将iv解析为字节
+ let new_iv = CryptoJS.enc.Utf8.parse(cryptIv);
+ // AES加密 CBC模式 ZeroPadding
+ let encrypted = CryptoJS.AES.encrypt(data, aes_key, {
+ iv: new_iv,
+ mode: CryptoJS.mode.CBC,
+ padding: CryptoJS.pad.Pkcs7
+ });
+ // 返回字符串
+ return encrypted.toString();
+}
+
+//解密
+const decryptDes = (data) => {
+ let aes_key = CryptoJS.enc.Utf8.parse(cryptKey);
+ let aes_iv = CryptoJS.enc.Utf8.parse(cryptIv);
+ // 将数据编码成Base64格式
+ let baseResult = CryptoJS.enc.Base64.parse(data);
+ let ciphertext = CryptoJS.enc.Base64.stringify(baseResult);
+ // AES解密 CBC模式 ZeroPadding
+ let decryptResult = CryptoJS.AES.decrypt(ciphertext, aes_key, {
+ iv: aes_iv,
+ mode: CryptoJS.mode.CBC,
+ padding: CryptoJS.pad.Pkcs7
+ });
+ // 返回字符串
+ let resData = decryptResult.toString(CryptoJS.enc.Utf8).toString();
+ return resData;
+}
+
+const getHeader = () => {
+ let token = uni.getStorageSync('lzsc-token')
+ let header = {
+ 'Accept': 'application/json',
+ 'Content-type': 'application/json',
+ 'authorization': token,
+ }
+ let platform = null
+ // #ifdef H5
+ platform = 'h5'
+ // #endif
+ // #ifdef APP-PLUS
+ platform = uni.getSystemInfoSync().platform
+ // #endif
+ header.platform = platform
+ return header
+}
+
+const post = (url = '', params = null) => {
+ let header = getHeader()
+ let data = encryptDes(JSON.stringify(params))
+ //console.log('postUrl', baseUrl + url)
+ return new Promise((resolve, reject) => {
+ uni.showLoading({
+ title: '加载中'
+ })
+ uni.request({
+ method: 'POST',
+ url: baseUrl + url,
+ data: {data: data},
+ header: header,
+ dataType: 'json',
+ }).then((response) => {
+ //console.log('response', response)
+ uni.hideLoading()
+ let respon = {
+ code: response.data.code,
+ data: response.data.data.length > 0 ? JSON.parse(decryptDes(response.data.data)) : [],
+ msg: response.data.msg
+ }
+ resolve(respon)
+ }).catch(error => {
+ uni.hideLoading()
+ //let [err, res] = error
+ //console.log('error', error)
+ })
+ })
+}
+
+const sendMsg = (url = '', params = null) => {
+ let header = getHeader()
+ let data = encryptDes(JSON.stringify(params))
+ return new Promise((resolve, reject) => {
+ uni.request({
+ method: 'POST',
+ url: baseUrl + url,
+ data: {data: data},
+ header: header,
+ dataType: 'json',
+ }).then((response) => {
+ let respon = {
+ code: response.data.code,
+ data: response.data.data.length > 0 ? JSON.parse(decryptDes(response.data.data)) : [],
+ msg: response.data.msg
+ }
+ resolve(respon)
+ }).catch(error => {
+ uni.hideLoading()
+ //let [err, res] = error
+ //console.log('error', error)
+ })
+ })
+}
+
+const goPages = (url) => {
+ uni.navigateTo({
+ url: url
+ })
+}
+
+const goBack = () => {
+ uni.navigateBack()
+}
+
+//身份证号严格校验
+const identityIDCard = (code) => {
+ //身份证号前两位代表区域
+ var city = {
+ 11: "北京",
+ 12: "天津",
+ 13: "河北",
+ 14: "山西",
+ 15: "内蒙古",
+ 21: "辽宁",
+ 22: "吉林",
+ 23: "黑龙江 ",
+ 31: "上海",
+ 32: "江苏",
+ 33: "浙江",
+ 34: "安徽",
+ 35: "福建",
+ 36: "江西",
+ 37: "山东",
+ 41: "河南",
+ 42: "湖北 ",
+ 43: "湖南",
+ 44: "广东",
+ 45: "广西",
+ 46: "海南",
+ 50: "重庆",
+ 51: "四川",
+ 52: "贵州",
+ 53: "云南",
+ 54: "西藏 ",
+ 61: "陕西",
+ 62: "甘肃",
+ 63: "青海",
+ 64: "宁夏",
+ 65: "新疆",
+ 71: "台湾",
+ 81: "香港",
+ 82: "澳门",
+ 91: "国外 "
+ };
+ //身份证格式正则表达式
+ var idCardReg = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
+ var errorMsg = ""; //错误提示信息
+ var isPass = true; //身份证验证是否通过(true通过、false未通过)
+
+ //如果身份证不满足格式正则表达式
+ if (!idCardReg.test(code)) {
+ errorMsg = "身份证格式有误!";
+ isPass = false;
+ }
+
+ //区域数组中不包含需验证的身份证前两位
+ else if (!city[code.substr(0, 2)]) {
+ errorMsg = "身份证地址编码有误!";
+ isPass = false;
+ } else {
+ //18位身份证需要验证最后一位校验位
+ if (code.length == 18) {
+ code = code.split('');
+ //∑(ai×Wi)(mod 11)
+ //加权因子
+ var factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
+ //校验位
+ var parity = [1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2];
+ var sum = 0;
+ var ai = 0;
+ var wi = 0;
+ for (var i = 0; i < 17; i++) {
+ ai = code[i];
+ wi = factor[i];
+ sum += ai * wi;
+ }
+ var last = parity[sum % 11];
+ if (parity[sum % 11] != code[17]) {
+ errorMsg = "身份证号不存在!";
+ isPass = false;
+ }
+ }
+ }
+ var returnParam = {
+ 'errorMsg': errorMsg,
+ 'isPass': isPass
+ }
+ return returnParam;
+}
+
+const checkLogin = (url = '', burl = '') => {
+ let token = uni.getStorageSync('lzsc-token') ? uni.getStorageSync('lzsc-token') : null
+ if(token == null){
+ uni.showModal({
+ title: '温馨提示',
+ content: '请您先登录账号!',
+ success: function (res) {
+ if (res.confirm) {
+ let goUrl = ''
+ if(burl != ''){
+ goUrl = '/pages/login/login?backUrl=' + burl
+ } else{
+ goUrl = '/pages/login/login'
+ }
+ uni.navigateTo({
+ url: goUrl
+ })
+ }
+ }
+ })
+ return false
+ }else if(url != ''){
+ uni.navigateTo({
+ url: url
+ })
+ }
+ return true
+}
+
+const checkGoPages = (url = '', burl = '', isgo = 1) => {
+ let token = uni.getStorageSync('lzsc-token') ? uni.getStorageSync('lzsc-token') : null
+ console.log('token', token)
+ if(token == null){
+ uni.showModal({
+ title: '温馨提示',
+ content: '请您先登录账号!',
+ success: function (res) {
+ if (res.confirm) {
+ let goUrl = ''
+
+ if(burl != ''){
+ goUrl = '/pages/login/login?backUrl=' + burl
+ } else{
+ goUrl = '/pages/login/login'
+ }
+ uni.navigateTo({
+ url: goUrl
+ })
+ }
+ }
+ })
+ return false
+ } else {
+ let userInfo = getUserInfo()
+ let goUrl = ''
+ if(userInfo.idcard_auth == 0){
+ goUrl = '/pages/idcard/idcard'
+ } else if(userInfo.face_auth == 0){
+ goUrl = '/pages/face/face'
+ } else if(userInfo.job_auth == 0){
+ goUrl = '/pages/job/job'
+ } else if(userInfo.bank_auth == 0){
+ goUrl = '/pages/addBank/addBank?backUrl=/pages/face/face'
+ }
+ console.log('goUrl', goUrl)
+ if(goUrl != ''){
+ uni.showModal({
+ title: '温馨提示',
+ content: '根据国家法律法规规定,使用本服务需要完成实名认证,是否前往认证?',
+ success: function (res) {
+ if (res.confirm) {
+ uni.navigateTo({
+ url: goUrl
+ })
+ }
+ }
+ })
+ return false
+ }
+ if(url != '' && isgo == 1){
+ uni.navigateTo({
+ url: url
+ })
+ } else {
+ return true
+ }
+ }
+}
+
+const goSwitch = (url) => {
+ uni.switchTab({
+ url: url
+ })
+}
+
+const getUserInfo = () => {
+ let userStr = uni.getStorageSync('user-info') ? uni.getStorageSync('user-info') : null
+ if(userStr != null) {
+ userStr = JSON.parse(userStr)
+ }
+ return userStr
+}
+
+const goSetting = () => {
+ var Intent = plus.android.importClass("android.content.Intent")
+ var Uri = plus.android.importClass("android.net.Uri")
+ var Settings = plus.android.importClass("android.provider.Settings")
+ var activity = plus.android.runtimeMainActivity()
+ var intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
+ var uri = Uri.fromParts("package", activity.getPackageName(), null)
+ intent.setData(uri)
+ activity.startActivity(intent)
+}
+
+const goAgree = (t) => {
+ let userInfo = null
+ let userStr = uni.getStorageSync('user-info') ? uni.getStorageSync('user-info') : null
+ if(userStr != null) {
+ userInfo = JSON.parse(userStr)
+ }
+ console.log(userInfo)
+ // #ifdef APP-PLUS
+ let url = ''
+ if(userInfo != null && userInfo.realname != null && userInfo.idcard != null && userInfo.phone != null){
+ let url = this.$baseUrl + '/?gp=' + t + '&name=' + userInfo.realname + '&idcard=' + userInfo.idcard + '&phone=' + userInfo.phone
+ } else {
+ let url = this.$baseUrl + '/?gp=' + t
+ }
+ console.log(url)
+ plus.runtime.openURL(url)
+ // #endif
+}
+
+export default {
+ goBack: goBack,
+ post: post,
+ goPages: goPages,
+ decryptDes: decryptDes,
+ identityIDCard: identityIDCard,
+ checkGoPages: checkGoPages,
+ goSwitch: goSwitch,
+ getUserInfo: getUserInfo,
+ goSetting: goSetting,
+ goAgree: goAgree,
+ checkLogin: checkLogin,
+ sendMsg: sendMsg,
+}
\ No newline at end of file
--
Gitblit v1.9.3