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 @@
+
+
+
+
+
+
+ {{item.nickName}}
+
+ 抽到
+ {{item.value}}
+
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+ 2小时销量飙升榜
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.shopName}}
+
+
+ 龙首.{{item.distances}}m
+
+
+
+
+
+ {{s}}
+
+
+
+
+
+
+
+
+
+ {{item.productName}}
+ 已抢{{item.realSalesNumber}}份
+
+
+
+ {{c}}
+
+
+
+ 马上抢
+
+
+
+ ¥
+ {{item.salePrice}}
+
+
+ ¥{{item.discount}}
+
+
+
+
+ 共省{{item.save}}元
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.userName}}* 免单{{item.orderAmount}}元订单号:{{item.orderNo}}
+
+
+
+
+
+
+
+
+
+ 订单数:82
+
+
+
+
+
+ 金额
+
+
+ 订单号
+
+
+ 免单状态
+
+
+
+
+
+
+ {{item.orderAmount}}元
+
+
+ {{item.orderNo}}
+
+
+ {{item.isRefund == true ? '已免单':'待免单'}}
+
+
+
+
+
+
+
+
+
+ 注:每笔订单完成后30天内均有机会获得免单
+
+
+
+
+
+
+
+
\ 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 @@
-
+
+
@@ -215,8 +216,12 @@
width: 100%;
height: 492rpx;
position: relative;
- background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/today/bsb.png) no-repeat;
- background-size: cover;
+ .onecontentimage {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ }
.onecontentabsolute {
position: absolute;
@@ -262,6 +267,7 @@
.towcontent {
position: relative;
margin-top: -32rpx;
+
.towcontentlistxitemboxfixed {
position: fixed;
top: 0;
diff --git a/pages/index/index.vue b/pages/index/index.vue
index d804ef4..2ebebb8 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -43,10 +43,8 @@
-
-
-
-
+
@@ -244,6 +242,8 @@
district: [],
},
+ itemStyle: [ //样式
+ ],
homelist: [], //下面数据
clickhometoplistmenulist: {}, //下拉点击的数据
form: {
@@ -291,16 +291,14 @@
setTimeout(() => {
this.GetTop()
}, 1000)
-
-
},
onReachBottom() {
this.onLoadhome()
},
-
onShow() {
this.hometop()
this.init_fn()
+ this.timersetInterval = '0'
},
methods: {
closeproductlist() {
@@ -332,11 +330,40 @@
}
})
},
+ changeParentValue(newValue) {
+ console.log(newValue)
+ this.itemStyle = newValue
+ },
+ getStyle(e) {
+ if (e > this.hometoplist.bannerVO.counponsInfo.length / 2) {
+ var right = this.hometoplist.bannerVO.counponsInfo.length - e
+ return {
+ transform: 'scale(' + (1) + ') translate(-' + (right * 20) + '%,0px)',
+ zIndex: 9999 - right,
+ opacity: 1
+ }
+ } else {
+ return {
+ transform: 'scale(' + (1) + ') translate(' + (e * 20) + '%,0px)',
+ zIndex: 9999 - e,
+ opacity: 1
+ }
+ }
+ },
// 首页上面数据
async hometop() {
try {
let res = await this.api.homehomePageUp()
this.hometoplist = res.data
+ if (this.hometoplist.bannerVO.counponsInfo) {
+ this.itemStyle = []
+ this.hometoplist.bannerVO.counponsInfo.forEach((item,
+ index) => {
+ this.itemStyle.push(this.getStyle(index))
+ })
+ }
+ // 计算swiper样式
+
} catch (e) {}
},
// 下面初始数据
diff --git a/pages/index/jtoday.vue b/pages/index/jtoday.vue
index 8766378..59a67ef 100644
--- a/pages/index/jtoday.vue
+++ b/pages/index/jtoday.vue
@@ -1,8 +1,9 @@
-
+
+
@@ -130,9 +131,15 @@
width: 100%;
height: 492rpx;
position: relative;
- background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/today/nav.png) no-repeat;
- background-size: cover;
-
+
+ .onecontentimage{
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/today/nav.png) no-repeat;
+ background-size: cover;
+ }
.onecontentabsolute {
position: absolute;
width: 100%;
diff --git a/pages/index/tothestore.vue b/pages/index/tothestore.vue
new file mode 100644
index 0000000..871215b
--- /dev/null
+++ b/pages/index/tothestore.vue
@@ -0,0 +1,300 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 热销TOP{{index}}
+
+
+ {{item.shopName}}
+
+
+
+
+
+ {{item.address}}
+
+
+ {{item.distances}}km
+
+
+
+
+
+ 马上预约
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/make/make.vue b/pages/make/make.vue
index 89972ce..ff46d9b 100644
--- a/pages/make/make.vue
+++ b/pages/make/make.vue
@@ -62,16 +62,11 @@
},
async loginwxuserInfo() {
let res = await this.api.loginwxuserInfo({
- userId: uni.cache.get('userInfo').id,
- shopId: uni.cache.get('shopUser').shopId
+ userId: uni.cache.get('userInfo').id
})
if (res.code == 0) {
- uni.cache.set('userInfo', res.data.userInfo);
- uni.cache.set('shopUser', res.data.shopUser);
- uni.cache.set('shopInfo', res.data.shopInfo);
- this.shopUser = uni.cache.get('shopUser')
+ uni.cache.set('userInfo', res.data);
this.userInfo = uni.cache.get('userInfo')
- this.shopInfo = uni.cache.get('shopInfo')
}
},
makePhoneCall(e) {
diff --git a/pages/order/order.vue b/pages/order/order.vue
index 7793514..cf476d3 100644
--- a/pages/order/order.vue
+++ b/pages/order/order.vue
@@ -7,7 +7,11 @@
-
+
+
+
+
@@ -46,8 +50,7 @@
-
+
@@ -74,6 +77,8 @@
+
@@ -137,16 +142,11 @@
methods: {
async loginwxuserInfo() {
let res = await this.api.loginwxuserInfo({
- userId: uni.cache.get('userInfo').id,
- shopId: uni.cache.get('shopUser').shopId
+ userId: uni.cache.get('userInfo').id
})
if (res.code == 0) {
- uni.cache.set('userInfo', res.data.userInfo);
- uni.cache.set('shopUser', res.data.shopUser);
- uni.cache.set('shopInfo', res.data.shopInfo);
- this.shopUser = uni.cache.get('shopUser')
+ uni.cache.set('userInfo', res.data);
this.userInfo = uni.cache.get('userInfo')
- this.shopInfo = uni.cache.get('shopInfo')
}
},
orderinfo(e) {
@@ -203,10 +203,15 @@
$tabH: 80upx;
$color: #ff411d;
+ page {
+ background: #f6f6f6;
+ }
+
.tab-wrap {
display: flex;
- height: $tabH;
position: relative;
+ background: #ffd158;
+ padding: 48rpx 0 72rpx 0;
.item {
flex: 1;
@@ -215,11 +220,15 @@
justify-content: center;
position: relative;
z-index: 2;
+
+ text {
+ color: #fff;
+ }
}
.line-wrap {
position: absolute;
- bottom: 0;
+ bottom: 48rpx;
display: flex;
justify-content: center;
padding-bottom: 8upx;
@@ -227,16 +236,22 @@
.line {
$h: 6upx;
- width: 30%;
- height: $h;
+ margin-top: 6rpx;
+ // width: 30%;
+ // height: $h;
border-radius: $h;
- background-color: $color;
+ // background-color: $color;
}
}
}
.list-wrap {
padding: $paddingSize;
+ position: relative;
+ margin-top: -24rpx;
+ z-index: 99999;
+ background: #f6f6f6;
+ border-radius: 24rpx 24rpx 0rpx 0rpx;
.item {
border-radius: 20upx;
diff --git a/pages/order/orders.vue b/pages/order/orders.vue
index 7793514..fa51848 100644
--- a/pages/order/orders.vue
+++ b/pages/order/orders.vue
@@ -46,8 +46,7 @@
-
+
@@ -137,16 +136,11 @@
methods: {
async loginwxuserInfo() {
let res = await this.api.loginwxuserInfo({
- userId: uni.cache.get('userInfo').id,
- shopId: uni.cache.get('shopUser').shopId
+ userId: uni.cache.get('userInfo').id
})
if (res.code == 0) {
- uni.cache.set('userInfo', res.data.userInfo);
- uni.cache.set('shopUser', res.data.shopUser);
- uni.cache.set('shopInfo', res.data.shopInfo);
- this.shopUser = uni.cache.get('shopUser')
+ uni.cache.set('userInfo', res.data);
this.userInfo = uni.cache.get('userInfo')
- this.shopInfo = uni.cache.get('shopInfo')
}
},
orderinfo(e) {
diff --git a/pages/order/successful.vue b/pages/order/successful.vue
index ad614a5..9f4d171 100644
--- a/pages/order/successful.vue
+++ b/pages/order/successful.vue
@@ -1,7 +1,7 @@
-
+
diff --git a/pages/product/index.vue b/pages/product/index.vue
new file mode 100644
index 0000000..4162ad5
--- /dev/null
+++ b/pages/product/index.vue
@@ -0,0 +1,910 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 到手¥
+
+
+ 12.00
+
+
+ 8折
+
+
+ ¥15.00
+
+
+
+
+
+ 已售620份
+
+
+
+
+
+ 书亦烧仙草|青提烧仙草
+
+
+
+
+ 随时退
+
+
+
+
+
+
+ 通用门店
+
+
+
+ 15家店可用
+
+
+
+
+
+
+ 书亦烧仙草(西安龙首门店)
+
+
+
+
+ 营业时间:周一至周日 10:00-21:00
+
+
+
+
+ 30.0km
+
+
+ 龙首印象城向西20米
+
+
+
+
+
+ 套餐详情
+
+
+ 饮品
+
+
+
+
+ 青提烧仙草
+
+
+ 网友推荐TOP5
+
+
+
+
+ (1份)
+
+
+ ¥12.00
+
+
+
+
+
+
+ 购买须知
+
+
+
+ 使用日期
+
+
+ 购买15天内有效
+
+
+
+
+ 可用时间
+
+
+ 全天可用
+
+
+
+
+ 预约方式
+
+
+ 无需预约,高峰期需等位
+
+
+
+
+ 退款说明
+
+
+ 此为限时限量特惠产品,请在规定期限内使用,使用期限
+ 内可申请全额退款,逾期未使用自动全额退款。
+
+
+
+
+ 使用规则
+
+
+ 不可使用包间
+ 本单发票由商家提供,详情请咨询商家
+ 堂食外带均可
+ 1.购买:本券购买后,无需复制券码,进入书亦烧仙草小APP/
+ 程序【我的-兑换卡券】点击【获取美团券】即可。
+ 2.使用:请登录书亦烧仙草APP/小程序,选择对应商品,结算时
+ 券会自动抵扣。
+ 3.限1件商品使用,不可抵扣配送费、奶油等附加费用,如遇门
+ 店原料不足无法供应时,或售罄,您可视情况更换核销门店或
+ 退款处理。
+ 4.适用范围:部分门店不可用,最终已下单时系统结算为准。
+ 5.售后服务:如有疑问请致电400-888-1717。
+ 团购用户可享受店内其他所有优惠
+ 使用优惠券购买团单,有效期以优惠券规则为准
+ 每人每天最多购买2张美团券
+ 无需预约,消费高峰期可能需要等位
+
+
+
+
+
+ 价格说明
+
+
+
+
+
+
+ 附近推荐
+
+
+ 去首页
+
+
+
+
+
+
+
+
+
+
+ {{item.shopName}}
+
+
+ 龙首.{{item.distances}}m
+
+
+
+
+
+ {{s.name}}
+
+
+
+
+
+
+
+
+
+ {{item.productName}}
+ 已抢{{item.realSalesNumber}}份
+
+
+
+
+ {{c.name}}
+
+
+
+
+ 马上抢
+
+
+
+ ¥
+ {{item.salePrice}}
+
+
+ ¥{{item.discount}}
+
+
+
+
+ 共省{{item.save}}元
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/coupon.vue b/pages/user/coupon.vue
index 325995e..5c9b308 100644
--- a/pages/user/coupon.vue
+++ b/pages/user/coupon.vue
@@ -43,6 +43,8 @@
+
@@ -68,6 +70,7 @@
],
towcontentclickindex: 0,
list: [],
+ is_end:false,
form: {
page: 1, //页数
size: 10, //页容量
@@ -110,6 +113,9 @@
})
if (res.data.pages < this.form.page) {
this.form.status = 'nomore'
+ if (res.data.pageNum == 1) {
+ this.is_end = true
+ }
return false;
} else {
this.form.status = 'loading';
diff --git a/pages/user/information.vue b/pages/user/information.vue
new file mode 100644
index 0000000..0230f61
--- /dev/null
+++ b/pages/user/information.vue
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+
+ 昵称
+
+
+
+
+
+ 手机号
+
+
+
+
+
+ 保存
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/user.vue b/pages/user/user.vue
index cdd13cc..1a3afec 100644
--- a/pages/user/user.vue
+++ b/pages/user/user.vue
@@ -2,14 +2,11 @@
-
{{userInfo.telephone || '无'}}
@@ -17,52 +14,73 @@
-
+
-
- 优惠券
+
+ {{item.name}}
-
+