From 091552233c67254dcfed2fb19691311edce73554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E5=95=BE?= <1144797966@qq.com> Date: Mon, 15 Apr 2024 16:15:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A0=81=E7=B5=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .hbuilderx/launch.json | 4 + App.vue | 130 ++--- components/blackmonth-swiper/index.vue | 153 +++++ components/navseat.vue | 145 +++++ components/qiyue-category/qiyue-category.vue | 209 +++++++ framework/0-conf.js | 6 +- framework/11-api.js | 9 +- manifest.json | 7 +- pages.json | 18 +- pages/index/components/advertisement.vue | 101 +++- pages/index/components/todaylist.vue | 72 ++- pages/index/hotlist.vue | 548 ++++++++++++++++++ pages/index/index.vue | 371 +++++++----- pages/index/jtoday.vue | 389 +++++++++++++ pages/user/coupon.vue | 43 +- pages/user/user.vue | 29 +- store/index.js | 7 +- uni_modules/d-swiper-type/changelog.md | 25 + .../d-swiper-type/d-swiper-type.vue | 478 +++++++++++++++ .../d-swiper-type/pages/home/hometype.vue | 478 +++++++++++++++ .../d-swiper-type/pages/home/readme.md | 10 + .../pages/static/icon_img/bing.png | Bin 0 -> 373442 bytes .../pages/static/icon_img/del.png | Bin 0 -> 1269 bytes .../pages/static/icon_img/del2.png | Bin 0 -> 765 bytes .../pages/static/icon_img/mangguo.png | Bin 0 -> 407525 bytes .../pages/static/icon_img/search.png | Bin 0 -> 4067 bytes .../pages/static/icon_img/xigua.png | Bin 0 -> 641219 bytes .../pages/static/icon_img/yan_close.png | Bin 0 -> 1039 bytes .../pages/static/icon_img/yan_open.png | Bin 0 -> 1300 bytes uni_modules/d-swiper-type/package.json | 89 +++ uni_modules/d-swiper-type/readme.md | 30 + uni_modules/liu-super-slide/changelog.md | 20 + .../liu-super-slide/liu-super-slide.vue | 207 +++++++ uni_modules/liu-super-slide/license.md | 6 + uni_modules/liu-super-slide/package.json | 85 +++ uni_modules/liu-super-slide/readme.md | 78 +++ 36 files changed, 3452 insertions(+), 295 deletions(-) create mode 100644 components/blackmonth-swiper/index.vue create mode 100644 components/navseat.vue create mode 100644 components/qiyue-category/qiyue-category.vue create mode 100644 pages/index/hotlist.vue create mode 100644 pages/index/jtoday.vue create mode 100644 uni_modules/d-swiper-type/changelog.md create mode 100644 uni_modules/d-swiper-type/components/d-swiper-type/d-swiper-type.vue create mode 100644 uni_modules/d-swiper-type/components/d-swiper-type/pages/home/hometype.vue create mode 100644 uni_modules/d-swiper-type/components/d-swiper-type/pages/home/readme.md create mode 100644 uni_modules/d-swiper-type/components/d-swiper-type/pages/static/icon_img/bing.png create mode 100644 uni_modules/d-swiper-type/components/d-swiper-type/pages/static/icon_img/del.png create mode 100644 uni_modules/d-swiper-type/components/d-swiper-type/pages/static/icon_img/del2.png create mode 100644 uni_modules/d-swiper-type/components/d-swiper-type/pages/static/icon_img/mangguo.png create mode 100644 uni_modules/d-swiper-type/components/d-swiper-type/pages/static/icon_img/search.png create mode 100644 uni_modules/d-swiper-type/components/d-swiper-type/pages/static/icon_img/xigua.png create mode 100644 uni_modules/d-swiper-type/components/d-swiper-type/pages/static/icon_img/yan_close.png create mode 100644 uni_modules/d-swiper-type/components/d-swiper-type/pages/static/icon_img/yan_open.png create mode 100644 uni_modules/d-swiper-type/package.json create mode 100644 uni_modules/d-swiper-type/readme.md create mode 100644 uni_modules/liu-super-slide/changelog.md create mode 100644 uni_modules/liu-super-slide/components/liu-super-slide/liu-super-slide.vue create mode 100644 uni_modules/liu-super-slide/license.md create mode 100644 uni_modules/liu-super-slide/package.json create mode 100644 uni_modules/liu-super-slide/readme.md diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 179fe2d..e932ebe 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -18,6 +18,10 @@ { "playground" : "custom", "type" : "uni-app:app-android" + }, + { + "playground" : "standard", + "type" : "uni-app:app-ios" } ] } diff --git a/App.vue b/App.vue index 8f1c7f4..6a0ba6f 100644 --- a/App.vue +++ b/App.vue @@ -10,70 +10,70 @@ // console.log('App Show'); try { // #ifdef APP-PLUS - uni.getSystemInfo({ - success: (res) => { - let system = res; - if (system.platform == 'ios') { - console.log('ios', 64); - uni.request({ - url: uni.conf.baseUrl + '/api/systemConfig/updateSystemVersion?platformCode=' + 1, - method: 'POST', - // header: { - // userId: uni.getStorageSync('userId'), - // token: uni.getStorageSync('token'), - // myLoginName: uni.getStorageSync('myLoginName') - // }, - success: (res) => { - let datares = res.data; - // uni.showToast({ - // title: res.message || res.msg, - // icon: "none", - // }) - // console.log(datares, '11111111') - if (datares.code == 200) { - uni.is_update = datares.data.versionCode; //是版本号,判断是否升级 - uni.is_force = datares.data.forceUpdate; //是否强制更新 1:强制 0:未强制 - uni.versionName = datares.data.versionName; //是版本号 显示版本号 - uni.is_wgt = 0; //是热更新 目前好像没有该功能 - uni.updateUrlApp = datares.data.url; //是下载地址 - uni.update_content = datares.data.updateInfo; //版本说明 - // uni.pro.switchTab('index/index'); - } - }, - fail: (res) => { - // uni.showToast({ - // title: res.message || res.msg, - // icon: "none", - // }) - } - }); - } else { - console.log(res, 66); - uni.request({ - url: uni.conf.baseUrl + '/api/systemConfig/updateSystemVersion?platformCode=' + 0, - method: 'POST', - // header: { - // userId: uni.getStorageSync('userId'), - // token: uni.getStorageSync('token'), - // myLoginName: uni.getStorageSync('myLoginName') - // }, - success: (res) => { - let datares = res.data; - console.log(res); - if (datares.code == 200) { - uni.is_update = datares.data.versionCode; //是版本号,判断是否升级 - uni.is_force = datares.data.forceUpdate; //是否强制更新 1:强制 0:未强制 - uni.versionName = datares.data.versionName; //是版本号 显示版本号 - uni.is_wgt = 0; //是热更新 目前好像没有该功能 - uni.updateUrlApp = datares.data.url; //是下载地址 - uni.update_content = datares.data.updateInfo; //版本说明 - // uni.pro.switchTab('index/index'); - } - } - }); - } - } - }); + // uni.getSystemInfo({ + // success: (res) => { + // let system = res; + // if (system.platform == 'ios') { + // console.log('ios', 64); + // uni.request({ + // url: uni.conf.baseUrl + '/api/systemConfig/updateSystemVersion?platformCode=' + 1, + // method: 'POST', + // // header: { + // // userId: uni.getStorageSync('userId'), + // // token: uni.getStorageSync('token'), + // // myLoginName: uni.getStorageSync('myLoginName') + // // }, + // success: (res) => { + // let datares = res.data; + // // uni.showToast({ + // // title: res.message || res.msg, + // // icon: "none", + // // }) + // // console.log(datares, '11111111') + // if (datares.code == 200) { + // uni.is_update = datares.data.versionCode; //是版本号,判断是否升级 + // uni.is_force = datares.data.forceUpdate; //是否强制更新 1:强制 0:未强制 + // uni.versionName = datares.data.versionName; //是版本号 显示版本号 + // uni.is_wgt = 0; //是热更新 目前好像没有该功能 + // uni.updateUrlApp = datares.data.url; //是下载地址 + // uni.update_content = datares.data.updateInfo; //版本说明 + // // uni.pro.switchTab('index/index'); + // } + // }, + // fail: (res) => { + // // uni.showToast({ + // // title: res.message || res.msg, + // // icon: "none", + // // }) + // } + // }); + // } else { + // console.log(res, 66); + // uni.request({ + // url: uni.conf.baseUrl + '/api/systemConfig/updateSystemVersion?platformCode=' + 0, + // method: 'POST', + // // header: { + // // userId: uni.getStorageSync('userId'), + // // token: uni.getStorageSync('token'), + // // myLoginName: uni.getStorageSync('myLoginName') + // // }, + // success: (res) => { + // let datares = res.data; + // console.log(res); + // if (datares.code == 200) { + // uni.is_update = datares.data.versionCode; //是版本号,判断是否升级 + // uni.is_force = datares.data.forceUpdate; //是否强制更新 1:强制 0:未强制 + // uni.versionName = datares.data.versionName; //是版本号 显示版本号 + // uni.is_wgt = 0; //是热更新 目前好像没有该功能 + // uni.updateUrlApp = datares.data.url; //是下载地址 + // uni.update_content = datares.data.updateInfo; //版本说明 + // // uni.pro.switchTab('index/index'); + // } + // } + // }); + // } + // } + // }); // #endif } catch (e) {} }, @@ -139,7 +139,7 @@ } page { - background-color: #f2f2f2; + background-color: #F9F9F9; } text { diff --git a/components/blackmonth-swiper/index.vue b/components/blackmonth-swiper/index.vue new file mode 100644 index 0000000..06a9fc6 --- /dev/null +++ b/components/blackmonth-swiper/index.vue @@ -0,0 +1,153 @@ + + + + + \ No newline at end of file diff --git a/components/navseat.vue b/components/navseat.vue new file mode 100644 index 0000000..180973e --- /dev/null +++ b/components/navseat.vue @@ -0,0 +1,145 @@ + + + + + \ No newline at end of file diff --git a/components/qiyue-category/qiyue-category.vue b/components/qiyue-category/qiyue-category.vue new file mode 100644 index 0000000..e0e8bb3 --- /dev/null +++ b/components/qiyue-category/qiyue-category.vue @@ -0,0 +1,209 @@ + + + + + \ No newline at end of file diff --git a/framework/0-conf.js b/framework/0-conf.js index 9de837b..22a4322 100644 --- a/framework/0-conf.js +++ b/framework/0-conf.js @@ -9,12 +9,12 @@ const proxyApi = 'https://wxcashiertest.sxczgkj.cn/cashierService' // #endif // #ifdef H5 -const baseUrl = debug ? proxyApi : "https://cashier.sxczgkj.cn/cashierService" +const baseUrl = debug ? proxyApi : "https://wxcashiertest.sxczgkj.cn/cashierService" const baseUrlwws = 'wss://cashier.sxczgkj.cn/cashierService' // 线上 // #endif // #ifdef APP || MP-WEIXIN -const baseUrl = debug ? proxyApi : 'https://cashier.sxczgkj.cn/cashierService' -const baseUrlwws = 'wss://cashier.sxczgkj.cn/cashierService' // 线上 +const baseUrl = debug ? proxyApi : 'https://wxcashiertest.sxczgkj.cn/cashierService' +const baseUrlwws = 'wss://wxcashiertest.sxczgkj.cn/cashierService' // 线上 // #endif // import VConsole from "./vConsole.js" diff --git a/framework/11-api.js b/framework/11-api.js index a4d0775..e7b6c31 100644 --- a/framework/11-api.js +++ b/framework/11-api.js @@ -46,7 +46,7 @@ function requestrequest(options) { async function request(options) { try { if (options.toast) { - // #ifdef MP-WEIXIN || MP-ALIPAY + // #ifdef MP-WEIXIN || APP-PLUS uni.showLoading({ title: '加载中', mask: true @@ -66,6 +66,9 @@ async function request(options) { // #ifdef APP-PLUS environment: 'app', // #endif + // #ifdef H5 + environment: 'app', + // #endif // #ifdef MP-WEIXIN environment: 'wx', // #endif @@ -76,7 +79,7 @@ async function request(options) { } else { } - // #ifdef MP-WEIXIN || MP-ALIPAY + // #ifdef MP-WEIXIN || APP-PLUS options.url = uni.conf.baseUrl + options.url let res = await requestrequest(options); // #endif @@ -84,7 +87,7 @@ async function request(options) { let res = await uni.pro.request(options); // #endif if (res.code != 0) { - if (res.code == 401) { + if (res.code == -4) { uni.showToast({ title: res.message || res.msg, icon: "none", diff --git a/manifest.json b/manifest.json index 6beb65d..e0aa37d 100644 --- a/manifest.json +++ b/manifest.json @@ -58,7 +58,10 @@ "mp-weixin" : { "appid" : "wxd88fffa983758a30", "setting" : { - "urlCheck" : false + "urlCheck" : false, + "minified" : true, + "es6" : true, + "postcss" : true }, "usingComponents" : true, "libVersion" : "latest" @@ -69,7 +72,7 @@ "disableHostCheck" : false, "proxy" : { "/api" : { - "target" : "https://cashier.sxczgkj.cn/cashierService", + "target" : "https://wxcashiertest.sxczgkj.cn/cashierService", // "target" : "https://ky.sxczgkj.cn", "ws" : false, "changeOrigin" : true, //是否跨域 diff --git a/pages.json b/pages.json index d26ccb2..aec0da7 100644 --- a/pages.json +++ b/pages.json @@ -6,6 +6,20 @@ "navigationStyle": "custom" } }, + { + "path": "pages/index/jtoday", + "style": { + "navigationBarTitleText": "每日上新", + "navigationStyle": "custom" + } + }, + { + "path": "pages/index/hotlist", + "style": { + "navigationBarTitleText": "热榜推荐", + "navigationStyle": "custom" + } + }, { "path": "pages/index/uindexlist", "style": { @@ -51,7 +65,9 @@ { "path": "pages/user/user", "style": { - "navigationBarTitleText": "个人中心" + "navigationBarTitleText": "个人中心", + "navigationBarBackgroundColor": "#FFD158", + "navigationBarTextStyle": "white" } }, { diff --git a/pages/index/components/advertisement.vue b/pages/index/components/advertisement.vue index 8d32157..5aba305 100644 --- a/pages/index/components/advertisement.vue +++ b/pages/index/components/advertisement.vue @@ -1,15 +1,27 @@