diff --git a/common/js/apix.js b/common/js/apix.js
index 80ca79a..1c933a7 100644
--- a/common/js/apix.js
+++ b/common/js/apix.js
@@ -8,4 +8,10 @@ export default {
phoneValidateCode(data) { //验证码
return uni.api.get("/phoneValidateCode", data);
},
+ homehomePageUp(data) { //首页上半部分
+ return uni.api.post("/home/homePageUp", data);
+ },
+ home(data) { //首页上半部分
+ return uni.api.post("/home", data);
+ },
}
\ No newline at end of file
diff --git a/components/nav.vue b/components/nav.vue
new file mode 100644
index 0000000..ca8b9bc
--- /dev/null
+++ b/components/nav.vue
@@ -0,0 +1,176 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/framework/0-conf.js b/framework/0-conf.js
index 3ed7e5b..2625f09 100644
--- a/framework/0-conf.js
+++ b/framework/0-conf.js
@@ -3,7 +3,7 @@ const debug = process.env.NODE_ENV == 'development' ? true : false;
const proxyApi = "/api"
// #endif
// #ifdef MP-WEIXIN || APP
-const proxyApi = 'https://cashier.sxczgkj.cn/cashierService' // 线上
+const proxyApi = 'http://101.37.12.135:9889/cashierService' // 线上
// #endif
// #ifdef H5
diff --git a/framework/11-api.js b/framework/11-api.js
index 8788787..a4d0775 100644
--- a/framework/11-api.js
+++ b/framework/11-api.js
@@ -202,7 +202,8 @@ function get(url, data, toast = true, type = 1) {
return request({
url,
data,
- toast
+ toast,
+ type
})
}
@@ -221,7 +222,8 @@ function post(url, data, toast = true, method = 'POST', type = 1) {
url,
method,
data,
- toast
+ toast,
+ type
})
}
diff --git a/pages.json b/pages.json
index a98c477..d26ccb2 100644
--- a/pages.json
+++ b/pages.json
@@ -15,8 +15,7 @@
{
"path": "pages/login/login",
"style": {
- "navigationBarTitleText": "登录",
- "navigationStyle": "custom"
+ "navigationBarTitleText": "登录"
}
},
{
@@ -155,12 +154,6 @@
"pagePath": "pages/order/order",
"text": "订单"
},
- {
- "iconPath": "static/tabbar/3.png",
- "selectedIconPath": "static/tabbar/3-1.png",
- "pagePath": "pages/make/make",
- "text": "预约"
- },
{
"iconPath": "static/tabbar/4.png",
"selectedIconPath": "static/tabbar/4-1.png",
diff --git a/pages/index/components/advertisement.vue b/pages/index/components/advertisement.vue
index 56f598f..8d32157 100644
--- a/pages/index/components/advertisement.vue
+++ b/pages/index/components/advertisement.vue
@@ -8,7 +8,9 @@
- 购买了10面值优惠券
+
+ text1
+
@@ -18,7 +20,15 @@
diff --git a/pages/index/components/diamond.vue b/pages/index/components/diamond.vue
index 9052788..d6120e3 100644
--- a/pages/index/components/diamond.vue
+++ b/pages/index/components/diamond.vue
@@ -1,8 +1,8 @@
-
-
- 扫码点餐
+
+
+ {{item.name}}
@@ -12,6 +12,22 @@
data() {
return {};
},
+ props: {
+ district: {
+ type: Array,
+ default () {
+ return []
+ }
+ },
+ title: {
+ type: String,
+ default: '每日特价'
+ },
+ img: {
+ type: String,
+ default: ''
+ },
+ },
};
@@ -23,6 +39,8 @@
width: 100%;
background: #F9F9F9;
border-radius: 48rpx 48rpx 0rpx 0rpx;
+ overflow-x: auto;
+ flex-wrap: nowrap;
.towcontent_item {
image {
diff --git a/pages/index/components/productlist.vue b/pages/index/components/productlist.vue
index 40de5ef..8438c3f 100644
--- a/pages/index/components/productlist.vue
+++ b/pages/index/components/productlist.vue
@@ -71,8 +71,58 @@
-
\ No newline at end of file
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 22faa63..f56dace 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -23,15 +23,16 @@
-
+
+ 搜索
-
- 西安
+
+ {{item.name}}
@@ -40,23 +41,145 @@
-
+
-
+
-
+
-
- 西安
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+ {{item.shopName}}
+
+
+ 龙首.{{item.distances}}m
+
+
+
+
+
+ {{item.shopTag}}
+
+
+
+
+
+
+
+
+
+ 全场饮品任选
+ 已抢15789份
+
+
+
+ 人气连锁品牌
+
+
+
+ 马上抢
+
+
+
+ ¥
+ 1444
+
+
+ ¥111
+
+
+
+
+ 共省4元
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 八点八零
+ 西安
+
+
+
+
+ 搜索
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
@@ -78,20 +201,33 @@
return {
isFixedTop: false, //吸顶是否显示
Topdistance: 3000, //吸顶初始距离
+ fourcontentHeighT: 0, //高度
keyword: '',
current: 0,
opacity: false,
- list1: [
- 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
- 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
- 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
- ]
+ showproductlist: false, //弹成
+ hometoplist: { //上面数据
+ carousel: [],
+ district: []
+ },
+ homelist: [], //下面数据
+ form: {
+ address: '', //地址
+ type: '', //品类
+ orderBy: '', //1.理我最近 2.销量优先 3.价格优先
+ distance: '', //附近1KM 1选中 0不选中
+ page: 1, //页数
+ size: 10, //页容量
+ status: 'loadmore'
+
+ }
};
},
onPageScroll(e) {
if (e.scrollTop <= 44) { //搜索导航栏
this.opacity = false
+ this.showproductlist = false
} else {
this.opacity = true
}
@@ -111,8 +247,21 @@
this.GetTop()
}, 1000)
},
- onShow() {},
+ onReachBottom() {
+ this.onLoadhome()
+ },
+ onShow() {
+ this.hometop()
+ this.onLoadhome()
+ },
methods: {
+ closeproductlist() {
+ this.showproductlist = false
+ // console.log('close');
+ },
+ openproductlist() {
+ // console.log('open');
+ },
uindexlist() {
uni.pro.navigateTo('index/uindexlist')
},
@@ -123,11 +272,51 @@
GetTop() {
//获取元素距离顶部的距离
this.$u.getRect('.fourcontent').then(res => {
- this.Topdistance = res.top - this.HeighT.heightBar
+ this.Topdistance = res.top - this.HeighT.heightBar //滚动距离
+ this.fourcontentHeighT = res.height //高度
})
+
},
- viewHistory() {
- //移动高度=滚动高度 + 距离上面的位置 - 导航条 - 状态栏高度
+ // 首页上面数据
+ async hometop() {
+ try {
+ let res = await this.apix.homehomePageUp()
+ this.hometoplist = res.data
+ } catch (e) {
+ //TODO handle the exception
+ }
+ },
+ // 下面初始数据
+ init_fn() {
+ this.homelist = []
+ this.form.page = 1
+ this.form.status = 'loadmore'
+ this.onLoadhome()
+ },
+ async onLoadhome() {
+ try {
+ let res = await this.apix.home(this.form)
+ if (res.data.length == 0) {
+ this.form.status = 'nomore'
+ return false;
+ } else {
+ this.form.status = 'loading';
+ this.form.page = ++this.form.page;
+ setTimeout(() => {
+ this.homelist = [...this.homelist, ...res.data];
+ if (res.data.length == 10) {
+ this.form.status = 'loading';
+ } else {
+ this.form.status = 'nomore';
+ }
+ }, 500)
+ }
+ } catch (e) {
+ //TODO handle the exception
+ }
+ },
+ async viewHistory() {
+ this.showproductlist = true
uni.pageScrollTo({
scrollTop: this.Topdistance + 1,
duration: 300
@@ -163,7 +352,7 @@
// #ifdef APP-PLUS
.statusbarmargin {
- margin-top: calc(var(--status-bar-height) / 2);
+ margin-top: var(--status-bar-height);
}
// #endif
@@ -217,20 +406,46 @@
flex: 1;
margin-left: 10rpx;
+ .navbar_tow_towview {
+ position: absolute;
+ right: 4rpx;
+ top: 50%;
+ transform: translate(0, -50%);
+ text-align: center;
+ background: #FEE06A;
+ font-family: Source Han Sans CN, Source Han Sans CN;
+ font-weight: 500;
+ font-size: 28rpx;
+ color: #333333;
+ width: 116rpx;
+ height: 56rpx;
+ line-height: 56rpx;
+ border-radius: 34rpx 34rpx 34rpx 34rpx;
+ }
+
.navbar_tow_towinput {
padding-left: 32rpx;
+ padding-right: 116rpx;
height: 100%;
- width: auto;
+ flex: auto;
background: #FFFFFF;
border-radius: 34rpx;
+ font-family: Source Han Sans CN, Source Han Sans CN;
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #999999;
+ overflow: hidden; //超出的文本隐藏
+ text-overflow: ellipsis; //溢出用省略号显示
+ white-space: nowrap; //溢出不换行
}
}
}
}
}
+
.fourcontent {
- padding: 32rpx 0 0 28rpx;
+ padding: 32rpx 28rpx 0 28rpx;
overflow-x: auto;
flex-wrap: nowrap;
@@ -251,5 +466,190 @@
}
}
+ .fivecontent {
+ padding: 0 28rpx;
+
+ .fivecontent_item {
+ margin-top: 32rpx;
+ padding: 24rpx 32rpx;
+ width: 100%;
+ background: #FFFFFF;
+ border-radius: 18rpx 18rpx 18rpx 18rpx;
+
+ .fivecontent_item_nav {
+ image {
+ width: 60rpx;
+ height: 60rpx;
+ border-radius: 8rpx;
+ }
+
+ .fivecontent_item_nav_left {
+ flex: auto;
+ margin-left: 12rpx;
+
+ .fivecontent_item_nav_lefttop {
+ font-family: Source Han Sans CN, Source Han Sans CN;
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #666666;
+ }
+
+ .fivecontent_item_nav_leftlang {
+ margin-top: 8rpx;
+ width: max-content;
+ padding: 4rpx 10rpx;
+ background: #FFF9E1;
+ border-radius: 4rpx 4rpx 4rpx 4rpx;
+
+ text {
+ margin-left: 6rpx;
+
+ font-family: Source Han Sans CN, Source Han Sans CN;
+ font-weight: 400;
+ font-size: 16rpx;
+ color: #F9A511;
+ }
+
+ image {
+ width: 10.82rpx;
+ height: 14.06rpx;
+ }
+ }
+
+ .fivecontent_item_nav_leftlang:nth-child(2) {
+ margin-left: 12rpx;
+ background: #FEE9DF;
+ }
+ }
+ }
+
+ .fivecontent_item_box {
+ margin-top: 20rpx;
+ border-top: 2rpx solid #E5E5E5;
+ padding-top: 14rpx;
+
+ .fivecontent_item_boxitem {
+ image {
+ width: 192rpx;
+ height: 192rpx;
+ border-radius: 12rpx;
+ }
+
+ .fivecontent_item_boxitemleft {
+ margin-left: 24rpx;
+ flex: auto;
+
+ .fivecontent_item_boxitemleftone {
+ width: 100%;
+
+ text {
+ font-family: Source Han Sans CN, Source Han Sans CN;
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #999999;
+ }
+
+ view {
+ font-family: Source Han Sans CN, Source Han Sans CN;
+ font-weight: 500;
+ font-size: 28rpx;
+ color: #333333;
+ }
+ }
+
+ .fivecontent_item_boxitemlefttow {
+ margin-top: 8rpx;
+ width: max-content;
+ padding: 4rpx 10rpx;
+ background: #FFF9E1;
+ border-radius: 4rpx 4rpx 4rpx 4rpx;
+
+ text {
+ margin-left: 6rpx;
+
+ font-family: Source Han Sans CN, Source Han Sans CN;
+ font-weight: 400;
+ font-size: 16rpx;
+ color: #F9A511;
+ }
+
+ image {
+ width: 10.82rpx;
+ height: 14.06rpx;
+ }
+ }
+
+ .indexboxitemleftthere {
+ position: relative;
+ margin-top: 30rpx;
+ padding-left: 16rpx;
+ width: 100%;
+ height: 88rpx;
+ background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/qinggou.png) no-repeat;
+ background-size: 100% 100%;
+
+ .indexboxitemleftthereabsolute {
+ position: absolute;
+ top: 14rpx;
+ right: 12rpx;
+ font-family: Source Han Sans CN, Source Han Sans CN;
+ font-weight: bold;
+ font-size: 24rpx;
+ color: #FFFFFF;
+ }
+
+ .indexboxitemlefttheretext {
+ .indexboxitemlefttheretextone {
+ text {
+ font-family: SourceHanSansCN-Bold, SourceHanSansCN-Bold;
+ font-weight: normal;
+ color: #FF5053;
+ }
+
+ text:nth-child(2) {
+ font-weight: bold;
+ font-size: 34rpx;
+ }
+
+ text:nth-child(1) {
+ font-size: 24rpx;
+ }
+ }
+
+ .indexboxitemlefttheretexttow {
+ margin-left: 12rpx;
+ font-size: 20rpx;
+ font-family: SourceHanSansCN-Regular, SourceHanSansCN-Regular;
+ font-weight: normal;
+ color: #999999;
+ text-decoration: line-through;
+ }
+ }
+
+ .indexboxitemleftthere_countdown {
+ width: 100%;
+
+ .indexboxitemleftthere_countdowntext {
+ font-family: Source Han Sans CN, Source Han Sans CN;
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #999999;
+ }
+
+ .indexboxitemleftthere_countdowntexts {
+ font-family: Roboto, Roboto;
+ font-weight: 400;
+ color: #333333;
+ margin-left: 16rpx;
+ font-size: 22rpx;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ }
}
\ No newline at end of file
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 4f999cd..6c51e71 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -1,16 +1,15 @@
-
- 您好,
- 欢迎使用银收客
+
+
+
-
-
+
+
手机号码
-
+
-
+
+
+ 验证码
+
+
+
+ {{ Recapture }}
+
+
+ {{ second }}s重新发送
+
+
-
+
注册账号
忘记密码?
- 登录
+
+
+ 其他手机号登录/注册
+ size="24">
阅读并同意银收客
《用户协议》
及
《隐私政策》
+
{{ baseUrl || '切换' }}
+
@@ -41,7 +60,7 @@
用户须知
- 感谢您使用《银收客》,我们非常重视您的个 人信息和隐私保护,在您使用服务前。请仔 细阅读
+ 感谢您使用《银收客》,我们非常重视您的个 人信息和隐私保护,在您使用服务前。请仔 细阅读
《用户协议》
和
《隐私协议》
@@ -73,6 +92,7 @@
showpicker: false,
showpopup: false,
valueinput: '',
+ showbox: false,
columns: [
['http://admintestapi.sxczgkj.cn/', 'https://ky.sxczgkj.cn', 'http://192.168.2.22:7004',
'http://admintestapi.sxczgkj.cn/', '自定义输入'
@@ -84,10 +104,16 @@
showPassword: false, //是否显示密码
debug: uni.conf.debug,
baseUrl: uni.conf.baseUrl,
+ // 注册定时器 初始值
+ second: 60,
+ showText: true,
+ Recapture: '发送验证码',
form: {
//密码
loginName: '',
- password: ''
+ password: '',
+ code: '',
+ inviteCode: ''
}
};
},
@@ -135,6 +161,39 @@
// 切换图片显示隐藏
this.showPassword = !this.showPassword;
},
+ async CodeRegister() {
+ //发起验证码
+ if (this.form.telephone == null || this.form.telephone == '') {
+ uni.showToast({
+ title: '请输入电话号码',
+ icon: 'none'
+ });
+ return false;
+ }
+ const res = await this.apix.phoneValidateCode({
+ // post 手机验证码
+ phone: this.form.telephone
+ });
+ console.log(res);
+ if (res) {
+ uni.showToast({
+ title: '验证码获取成功',
+ icon: 'none'
+ });
+ // 定时器
+ this.showText = false;
+ this.Recapture = '重新获取';
+ var interval = setInterval(() => {
+ let times = --this.second;
+ this.second = times < 10 ? '0' + times : times; //小于10秒补 0
+ }, 1000);
+ setTimeout(() => {
+ clearInterval(interval);
+ this.second = 60;
+ this.showText = true;
+ }, 60000);
+ }
+ },
async Privacy(e) {
if (e == 1) {
//用户协议
@@ -244,7 +303,32 @@
} else {
this.$api.msg(res.message);
}
- }
+ },
+ async getPhoneNumber(res) { // 获取手机号
+ var resdataa = res
+ console.log(res)
+ // #ifdef MP-WEIXIN
+ uni.login({
+ provider: 'weixin',
+ success: async (data) => {
+ let resdata = await this.api.logingetPhoneNumber({
+ code: data.code,
+ iv: resdataa.detail.iv,
+ encryptedData: resdataa.detail.encryptedData
+ })
+ console.log(resdata)
+ if (resdata.data) {
+ this.phone = resdata.data
+ this.userlogin()
+ }
+ // this.userlogin()
+ }
+ });
+ // #endif
+ // #ifdef MP-WEIXIN
+
+ // #endif
+ },
}
};
@@ -253,7 +337,7 @@
page {
width: 100%;
height: 100%;
- background: linear-gradient(104deg, #4679ff 0%, #2868e8 47%, #2a94fc 100%);
+ background: #FFFFFF;
}
.container {
@@ -269,16 +353,11 @@
}
.box {
- padding-top: 228rpx;
- padding-left: 64rpx;
- padding-bottom: 144rpx;
- box-sizing: border-box;
+ padding-top: 110rpx;
- text {
- font-size: 40rpx;
- font-family: Source Han Sans CN-Medium, Source Han Sans CN;
- font-weight: 500;
- color: #ffffff;
+ image {
+ width: 128rpx;
+ height: 128rpx;
}
}
@@ -363,8 +442,8 @@
.box_conf {
position: fixed;
- top: 10%;
- color: #fff;
+ top: 0;
+ color: #000;
padding: 20rpx;
right: 2%;
}
@@ -385,7 +464,6 @@
box-sizing: border-box;
width: 100%;
position: fixed;
- bottom: 0;
display: flex;
flex-direction: column;
align-items: center;
@@ -417,6 +495,18 @@
width: 25rpx;
height: 17rpx;
}
+
+ .repeats {
+ position: absolute;
+ bottom: 26rpx;
+ right: 0;
+ font-size: 24rpx;
+ z-index: 9;
+ font-family: $uni_family;
+ font-weight: 400;
+ color: #ffffff;
+ border-radius: 12rpx;
+ }
}
.top_box_tow {
@@ -432,27 +522,50 @@
}
.toLogin {
- width: 570rpx;
- margin-top: 112rpx;
- padding: 10rpx 0;
+ margin-top: 212rpx;
+ width: 100%;
+ background: #F1CB66;
+ border-radius: 12rpx 12rpx 12rpx 12rpx;
+ font-family: Source Han Sans CN, Source Han Sans CN;
+ font-weight: 500;
+ font-size: 32rpx;
+ color: #333333;
+ height: 84rpx;
+ line-height: 84rpx;
text-align: center;
- background: #288efb;
- border-radius: 40rpx 40rpx 40rpx 40rpx;
- font-size: 36rpx;
- font-family: $uni_family;
+ border: none;
+ }
+
+ .toLogin::after {
+ background: none;
+ border: none;
+ }
+
+ .toLogins {
+ margin-top: 32rpx;
+ width: 100%;
+ line-height: 84rpx;
+ height: 84rpx;
+ border-radius: 12rpx 12rpx 12rpx 12rpx;
+ border: 2rpx solid #333333;
+ font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
- color: #ffffff;
+ font-size: 32rpx;
+ color: #333333;
+ text-align: center;
}
.agreement {
- margin-top: 14rpx;
- font-size: 20rpx;
- font-family: Source Han Sans CN-Medium, Source Han Sans CN;
+ width: 100%;
+ margin-top: 40rpx;
+ font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
- color: #7c8e97;
+ font-size: 20rpx;
+ color: #999999;
+ text-align: left;
.agreement-Item {
- color: #4ca1fc;
+ color: #333333;
}
}
}
diff --git a/pages/order/orders.vue b/pages/order/orders.vue
new file mode 100644
index 0000000..7793514
--- /dev/null
+++ b/pages/order/orders.vue
@@ -0,0 +1,342 @@
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 需付款
+ ¥
+ {{item.orderAmount}}
+
+
+ 下单日期:{{$u.timeFormat(item.createdAt, 'yyyy-mm-dd hh:MM')}}
+ 共{{item.totalNumber}}件商品 合计:¥{{item.orderAmount}}
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file