From 3b85017f91fbf07bd7c539327b8cf568f3003e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E5=95=BE?= <1144797966@qq.com> Date: Tue, 30 Apr 2024 18:27:43 +0800 Subject: [PATCH] 1 --- common/js/api.js | 19 +- components/blackmonth-swiper/index.vue | 18 +- components/listitem.vue | 174 ++++ components/navseat.vue | 6 +- .../tony-scroll-self/tony-scroll-self.vue | 86 ++ manifest.json | 3 +- pages.json | 39 +- pages/index/components/advertisement.vue | 122 ++- pages/index/components/diamond.vue | 15 +- pages/index/drinks.vue | 555 +++++++++++ pages/index/freedaily.vue | 333 +++++++ pages/index/hotlist.vue | 12 +- pages/index/index.vue | 41 +- pages/index/jtoday.vue | 15 +- pages/index/tothestore.vue | 300 ++++++ pages/make/make.vue | 9 +- pages/order/order.vue | 45 +- pages/order/orders.vue | 12 +- pages/order/successful.vue | 2 +- pages/product/index.vue | 910 ++++++++++++++++++ pages/user/coupon.vue | 6 + pages/user/information.vue | 129 +++ pages/user/user.vue | 87 +- pages/webview/webview.vue | 16 + 24 files changed, 2846 insertions(+), 108 deletions(-) create mode 100644 components/listitem.vue create mode 100644 components/tony-scroll-self/tony-scroll-self.vue create mode 100644 pages/index/drinks.vue create mode 100644 pages/index/freedaily.vue create mode 100644 pages/index/tothestore.vue create mode 100644 pages/product/index.vue create mode 100644 pages/user/information.vue create mode 100644 pages/webview/webview.vue diff --git a/common/js/api.js b/common/js/api.js index 9080b41..fcc8d04 100644 --- a/common/js/api.js +++ b/common/js/api.js @@ -35,8 +35,8 @@ export default { orderorderInfo(data) { //订单回显 return uni.api.get("/order/orderInfo", data); }, - loginwxuserInfo(data) { //微信用户详情 - return uni.api.get("/login/wx/userInfo", data); + loginwxuserInfo(data) { //用户详情 + return uni.api.get("/login/userInfo", data); }, paymemeberIn(data) { //充值 return uni.api.post("/pay/memeberIn", data); @@ -77,4 +77,19 @@ export default { orderfindCoupons(data) { //系统优惠券 return uni.api.get("/order/findCoupons", data); }, + loginuserInfo(data) { //获取用户信息 + return uni.api.get("/login/userInfo", data); + }, + tbPlatformDict(data) { //获取菜单 + return uni.api.get("/tbPlatformDict", data); + }, + distirictsubShopList(data) { //预约到店(店铺列表) + return uni.api.get("/distirict/subShopList", data); + }, + distiricttopCommon(data) { //获取top部分(店铺列表) + return uni.api.get("/distirict/topCommon", data); + }, + orderfindWiningUser(data) { //获取免单订单 + return uni.api.get("/order/findWiningUser", data); + }, } \ No newline at end of file diff --git a/components/blackmonth-swiper/index.vue b/components/blackmonth-swiper/index.vue index 06a9fc6..628a43e 100644 --- a/components/blackmonth-swiper/index.vue +++ b/components/blackmonth-swiper/index.vue @@ -39,7 +39,11 @@ y: 0 }, screenWidth: 0, - itemStyle: [] + itemStyle: [ + { + transform:'' + } + ] }; }, watch: { @@ -50,16 +54,16 @@ } } }, - created() { + mounted() { var macInfo = uni.getSystemInfoSync(); this.screenWidth = macInfo.screenWidth; // 计算swiper样式 this.swiperList.forEach((item, index) => { this.itemStyle.push(this.getStyle(index)) }) - this.timersetInterval = setInterval(() => { - this.endMove() - }, 2000); + // this.timersetInterval = setInterval(() => { + // this.endMove() + // }, 2000); }, methods: { getStyle(e) { @@ -97,7 +101,6 @@ this.slideNote.y = e.changedTouches[0] ? e.changedTouches[0].pageY : 0; }, endMove(e) { - console.log(e, 86) var newList = JSON.parse(JSON.stringify(this.itemStyle)) // if ((e.changedTouches[0].pageX - this.slideNote.x) < 0) { // 向左滑动 @@ -116,8 +119,7 @@ \ No newline at end of file diff --git a/components/navseat.vue b/components/navseat.vue index 180973e..cd0a55d 100644 --- a/components/navseat.vue +++ b/components/navseat.vue @@ -19,7 +19,7 @@ - + {{title}} @@ -42,6 +42,10 @@ type: Boolean, default: false }, + titleshow: { + type: Boolean, + default: false + }, }, computed: { HeighT() { //手机类型的尺寸 diff --git a/components/tony-scroll-self/tony-scroll-self.vue b/components/tony-scroll-self/tony-scroll-self.vue new file mode 100644 index 0000000..4f5413a --- /dev/null +++ b/components/tony-scroll-self/tony-scroll-self.vue @@ -0,0 +1,86 @@ + + + + diff --git a/manifest.json b/manifest.json index e0aa37d..a66610a 100644 --- a/manifest.json +++ b/manifest.json @@ -64,7 +64,8 @@ "postcss" : true }, "usingComponents" : true, - "libVersion" : "latest" + "libVersion" : "latest", + "requiredPrivateInfos" : [ "getLocation", "onLocationChange", "chooseLocation", "chooseAddress" ] }, "h5" : { "devServer" : { diff --git a/pages.json b/pages.json index b2e4716..034c8d0 100644 --- a/pages.json +++ b/pages.json @@ -13,12 +13,33 @@ "navigationStyle": "custom" } }, + { + "path": "pages/index/freedaily", + "style": { + "navigationBarTitleText": "每日免单", + "navigationStyle": "custom" + } + }, + { + "path": "pages/index/tothestore", + "style": { + "navigationBarTitleText": "预约到店", + "navigationStyle": "custom" + } + }, { "path": "pages/index/coupons/index", "style": { "navigationBarTitleText": "红包中心" } }, + { + "path": "pages/index/drinks", + "style": { + "navigationBarTitleText": "咖啡饮品", + "navigationStyle": "custom" + } + }, { "path": "pages/index/hotlist", "style": { @@ -32,6 +53,13 @@ "navigationBarTitleText": "选择城市" } }, + { + "path": "pages/product/index", + "style": { + "navigationBarTitleText": "商品详情", + "navigationStyle": "custom" + } + }, { "path": "pages/login/login", "style": { @@ -47,7 +75,9 @@ { "path": "pages/order/order", "style": { - "navigationBarTitleText": "订单列表" + "navigationBarTitleText": "订单列表", + "navigationBarBackgroundColor": "#FFD158", + "navigationBarTextStyle": "white" } }, { @@ -114,6 +144,13 @@ "navigationBarTitleText": "优惠券" } }, + { + "path": "pages/user/information", + "style": { + "navigationBarTitleText": "完善信息", + "navigationStyle": "custom" + } + }, { "path": "pages/user/shop/index", "style": { diff --git a/pages/index/components/advertisement.vue b/pages/index/components/advertisement.vue index 5aba305..62b9bcd 100644 --- a/pages/index/components/advertisement.vue +++ b/pages/index/components/advertisement.vue @@ -6,15 +6,14 @@ - - + + + + + + - - @@ -30,12 +29,22 @@ @@ -94,6 +151,42 @@ position: relative; overflow: hidden; height: 28rpx; + margin-right: 10rpx; + + .swiperPanel { + height: 28rpx; + width: 100%; + overflow: hidden; + position: relative; + + .swiperItem { + height: 100%; + width: 100%; + position: absolute; + top: 0; + left: 0; + transition: all .5s; + + /* 定义一个动画关键帧 */ + + + .children { + height: 100%; + width: 25%; + // margin: 2rpx auto; + + + /* 应用动画,设置动画时长、循环次数和速度曲线 */ + .pic { + height: 100%; + width: 100%; + border-radius: 50%; + // box-shadow: 0 0 10px #333; + } + } + + } + } .onecontentrightimageabsolute { width: 100%; @@ -101,6 +194,7 @@ top: 0; position: absolute; z-index: 9; + height: 28rpx; } diff --git a/pages/index/components/diamond.vue b/pages/index/components/diamond.vue index fb991be..c49de6b 100644 --- a/pages/index/components/diamond.vue +++ b/pages/index/components/diamond.vue @@ -31,7 +31,6 @@ }, methods: { clickdistrict(item) { - uni.pro.navigateTo('index/coupons/index'); switch (item.jumpType) { case 'absolute': uni.pro.navigateTo('webview/webview', { @@ -39,7 +38,7 @@ }); break; case 'relative': - uni.pro.navigateTo(item.absUrl); + uni.pro.navigateTo(item.absUrl,item); break; case 'scan': if (!uni.utils.pluschooseImage()) { @@ -52,7 +51,7 @@ scanType: ['qrCode', 'barCode'], // 可以指定扫二维码还是一维码,默认二者都有 success: res => { // 当needResult 为 1 时,扫码返回的结果 - console.log(res.resultStr,res) + console.log(res.resultStr, res) } }); } else { @@ -68,7 +67,7 @@ // #ifdef APP || MP-WEIXIN uni.scanCode({ success: res => { - console.log(res.result,res) + console.log(res.result, res) } }); // #endif @@ -91,6 +90,9 @@ flex-wrap: nowrap; .towcontent_item { + width: 25%; + margin-left: 34rpx; + image { width: 92rpx; height: 92rpx; @@ -102,7 +104,12 @@ font-weight: 400; font-size: 28rpx; color: #333333; + white-space: nowrap; } } + + .towcontent_item:nth-child(1) { + margin-left: 0rpx; + } } \ No newline at end of file diff --git a/pages/index/drinks.vue b/pages/index/drinks.vue new file mode 100644 index 0000000..8a5894b --- /dev/null +++ b/pages/index/drinks.vue @@ -0,0 +1,555 @@ + + + + + \ No newline at end of file diff --git a/pages/index/freedaily.vue b/pages/index/freedaily.vue new file mode 100644 index 0000000..8364f8e --- /dev/null +++ b/pages/index/freedaily.vue @@ -0,0 +1,333 @@ + + + + + \ No newline at end of file diff --git a/pages/index/hotlist.vue b/pages/index/hotlist.vue index 41f36e3..98fbcf6 100644 --- a/pages/index/hotlist.vue +++ b/pages/index/hotlist.vue @@ -1,8 +1,9 @@