Merge branch 'dev1.0.0' into develop

msb_beta
ch 3 years ago
commit bcc8ae98f0

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-17 16:36:59 * @Date: 2022-03-17 16:36:59
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-20 11:57:58 * @LastEditTime: 2022-04-20 16:07:24
* @Description: 针对uniapp request请求做了一次封装使用思维参考axios * @Description: 针对uniapp request请求做了一次封装使用思维参考axios
* *
* *
@ -70,7 +70,6 @@ class MsbUniRequest {
return option return option
} }
return new Promise((resolve, reject)=>{ return new Promise((resolve, reject)=>{
console.log(option);
uni.request({ uni.request({
...option, ...option,
success: res => { success: res => {

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-17 17:42:32 * @Date: 2022-03-17 17:42:32
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-20 15:34:09 * @LastEditTime: 2022-04-20 19:49:51
* @Description: 项目接口请求统一处理器返回一个需要token和不需要token的请求封装方法 * @Description: 项目接口请求统一处理器返回一个需要token和不需要token的请求封装方法
*/ */
@ -53,10 +53,15 @@ let repeatFlag = [];
* @param {*} option * @param {*} option
*/ */
const repeatVerify = (option)=>{ const repeatVerify = (option)=>{
if(repeatFlag.includes(JSON.stringify(option))){ let flag = {
url : option.url,
method : option.method,
data : option.data
}
if(repeatFlag.includes(JSON.stringify(flag))){
return Promise.reject({message:'请勿频繁操作'}); return Promise.reject({message:'请勿频繁操作'});
} }
repeatFlag.push(JSON.stringify(option)); repeatFlag.push(JSON.stringify(flag));
return false; return false;
}; };
/** /**
@ -64,9 +69,16 @@ const repeatVerify = (option)=>{
* @param {*} option * @param {*} option
*/ */
const clearRepeat = (option) =>{ const clearRepeat = (option) =>{
console.log(repeatFlag)
repeatFlag = repeatFlag.filter( i => { repeatFlag = repeatFlag.filter( i => {
return i !== JSON.stringify(option) return i !== JSON.stringify({
url : option.url,
method : option.method,
data : option.data
})
}); });
console.log(repeatFlag)
} }
// 不需要token的接口封装 // 不需要token的接口封装
@ -74,7 +86,6 @@ const MsbRequest = new MsbUniRequest();
MsbRequest.baseUrl = BASE_URL[ENV]; MsbRequest.baseUrl = BASE_URL[ENV];
MsbRequest.use('request', (option) => { MsbRequest.use('request', (option) => {
console.log('option',option);
if(option.header.repeat){ if(option.header.repeat){
// 如果当前请求不允许重复调用,则检查重复请求,当前接口有正在请求则不发起请求 // 如果当前请求不允许重复调用,则检查重复请求,当前接口有正在请求则不发起请求
const isRepeatVerify = repeatVerify(option); const isRepeatVerify = repeatVerify(option);

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>马士兵严选</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)')) <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>马士兵严选</title><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><link rel=stylesheet href=/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.b5602bf5.js></script><script src=/static/js/index.5a23b417.js></script></body></html> 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><link rel=stylesheet href=/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.b5602bf5.js></script><script src=/static/js/index.fe63b50a.js></script></body></html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 946 B

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 696 B

After

Width:  |  Height:  |  Size: 826 B

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -6,6 +6,7 @@
"aliasPath" : "/", "aliasPath" : "/",
"style": { "style": {
"navigationStyle" : "custom", "navigationStyle" : "custom",
"navigationBarTitleText": "马士兵严选",
"backgroundColor" : "#69ADE5" "backgroundColor" : "#69ADE5"
} }
}, },

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-22 14:12:18 * @Date: 2022-03-22 14:12:18
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-20 14:45:43 * @LastEditTime: 2022-04-20 19:23:18
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -10,7 +10,7 @@
<view class="form"> <view class="form">
<UiCell class="form--item" title="收货人" :rightIcon="false"> <UiCell class="form--item" title="收货人" :rightIcon="false">
<template slot="value"> <template slot="value">
<input class="form--itemInput" v-model="address.name" placeholder="请输入收货人姓名"/> <input class="form--itemInput" v-model="address.name" :maxlength="10" placeholder="请输入收货人姓名"/>
</template> </template>
</UiCell> </UiCell>
<UiCell class="form--item" title="手机号码" :rightIcon="false"> <UiCell class="form--item" title="手机号码" :rightIcon="false">

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-22 14:12:18 * @Date: 2022-03-22 14:12:18
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-20 14:45:36 * @LastEditTime: 2022-04-20 19:23:30
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -10,7 +10,7 @@
<view class="form"> <view class="form">
<UiCell class="form--item" title="收货人" :rightIcon="false"> <UiCell class="form--item" title="收货人" :rightIcon="false">
<template slot="value"> <template slot="value">
<input class="form--itemInput" v-model="address.name" placeholder="请输入收货人姓名"/> <input class="form--itemInput" v-model="address.name" :maxlength="10" placeholder="请输入收货人姓名"/>
</template> </template>
</UiCell> </UiCell>
<UiCell class="form--item" title="手机号码" :rightIcon="false"> <UiCell class="form--item" title="手机号码" :rightIcon="false">

@ -23,7 +23,7 @@
<!-- 购物车商品列表 --> <!-- 购物车商品列表 -->
<view v-else class="cart-list"> <view v-else class="cart-list">
<view class="cart-item" v-for="(item, index) in list" :key="index" <view class="cart-item" v-for="(item, index) in list" :key="index"
@click="$Router.push(`goodsDetail?id=${item.id}`)"> @click="$Router.push(`/goodsDetail?id=${item.id}`)">
<label class="cart-item--radio" @click.stop="handleCheckItem(item.id)"> <label class="cart-item--radio" @click.stop="handleCheckItem(item.id)">
<radio class="radio" color="#FF875B" <radio class="radio" color="#FF875B"
:checked="checkedIds.length ? checkedIds.includes(item.id) : false" /> :checked="checkedIds.length ? checkedIds.includes(item.id) : false" />

@ -2,14 +2,12 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-23 10:31:12 * @Date: 2022-03-23 10:31:12
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-12 10:09:44 * @LastEditTime: 2022-04-20 18:29:40
* @Description: file content * @Description: file content
--> -->
<template> <template>
<view class="banner"> <view class="banner">
<u-swiper keyName="img" :list="data" height="240rpx" indicator indicatorMode="dot"> <u-swiper bgColor="none" radius="18rpx" keyName="img" :list="data" height="240rpx" indicator indicatorMode="dot"></u-swiper>
</u-swiper>
<view class="desc"> <view class="desc">
<view class="desc--item"> <view class="desc--item">
<image class="desc--icon" src='@/static/index/bz.png'></image> <image class="desc--icon" src='@/static/index/bz.png'></image>
@ -50,53 +48,42 @@ export default {
.banner{ .banner{
height: 388rpx; height: 388rpx;
position: relative; position: relative;
padding: 40rpx 30rpx 0; padding: 50rpx 30rpx 0;
// margin-bottom: 50rpx;
overflow: hidden; overflow: hidden;
&::before{ &::before{
display: block; display: block;
content: ''; content: '';
position: absolute; position: absolute;
left: -5vw; left: -5vw;
top:0; top:-2rpx;
height: 231rpx; height: 231rpx;
width: 110vw; width: 110vw;
background: $color-blue5; background: $color-blue5;
border-bottom-left-radius: 100%; border-bottom-left-radius: 100%;
border-bottom-right-radius: 100%; border-bottom-right-radius: 100%;
} }
.swiper{
background-color: none !important;
}
} }
.desc{ .desc{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 24rpx; margin-top: 14rpx;
padding-right: 10rpx;
&--item{ &--item{
display: flex; display: flex;
align-items: center;
} }
&--icon{ &--icon{
width: 22rpx; width: 42rpx;
height: 24rpx; height: 44rpx;
position: relative; position: relative;
margin-right: 11rpx;
overflow: initial;
// box-shadow: 0 0 5rpx #f00;
&::before{
display: block;
content: '';
position: absolute;
width: 10rpx;
height: 10rpx;
border-radius: 50%;
top: 10rpx;
left: 7rpx;
box-shadow: 0 0 20rpx #FA7204;
background: #FA7204;
z-index: -1;
}
} }
&--txt{ &--txt{
font-size: 22rpx; font-size: 22rpx;
color: $color-grey5; color: $color-grey5;
margin-top: 4rpx;
} }
} }
</style> </style>

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-23 10:29:07 * @Date: 2022-03-23 10:29:07
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-12 18:54:58 * @LastEditTime: 2022-04-20 19:05:54
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -85,6 +85,7 @@ export default {
} }
.title{ .title{
margin-top: 20rpx; margin-top: 20rpx;
font-weight: bold;
} }
.desc{ .desc{
color: $color-grey4; color: $color-grey4;
@ -116,6 +117,7 @@ export default {
height: 215rpx; height: 215rpx;
background: $color-grey0; background: $color-grey0;
border-radius: 8rpx; border-radius: 8rpx;
margin-left: 20rpx;
&--info-box{ &--info-box{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-23 10:07:48 * @Date: 2022-03-23 10:07:48
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-13 09:45:18 * @LastEditTime: 2022-04-20 18:21:52
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -18,7 +18,7 @@
</view> </view>
<view class="seckill-title--more"> <view class="seckill-title--more">
<text>查看更多</text> <text>查看更多</text>
<image class="seckill-title--more-icon" src="@/static/common/arrow.png"></image> <image class="seckill-title--more-icon" src="@/static/index/arrow.png"></image>
</view> </view>
</view> </view>
<view class="seckill--group"> <view class="seckill--group">
@ -114,6 +114,7 @@ export default {
align-items: center; align-items: center;
&--text{ &--text{
font-size: 36rpx; font-size: 36rpx;
font-weight: bold;
} }
&--left{ &--left{
display: flex; display: flex;
@ -173,10 +174,11 @@ export default {
margin-right: 8rpx; margin-right: 8rpx;
} }
&--more{ &--more{
display: inline-block; display: flex;
align-items: center;
text{ text{
font-size: $font-size-sm; font-size: $font-size-sm;
color: $color-grey5; color: $color-grey4;
} }
} }

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2019-08-22 19:41:20 * @Date: 2019-08-22 19:41:20
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-14 17:37:40 * @LastEditTime: 2022-04-20 19:02:05
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -13,6 +13,7 @@
<text class="search--input">请输入您想搜索的商品名称</text> <text class="search--input">请输入您想搜索的商品名称</text>
</view> </view>
<view class="msg"> <view class="msg">
<u-badge class="msg--badge" max="99" :value="0"></u-badge>
<image class="msg--icon" src="@/static/index/msg.png"></image> <image class="msg--icon" src="@/static/index/msg.png"></image>
</view> </view>
</view> </view>
@ -53,9 +54,8 @@ export default {
return { return {
scrollTop : 0, scrollTop : 0,
bannerList: [ bannerList: [
'https://cdn.uviewui.com/uview/swiper/swiper1.png', 'https://msb-edu-dev.oss-cn-beijing.aliyuncs.com/uc/account-avatar/banner.png',
'https://cdn.uviewui.com/uview/swiper/swiper2.png', 'https://msb-edu-dev.oss-cn-beijing.aliyuncs.com/uc/account-avatar/banner.png'
'https://cdn.uviewui.com/uview/swiper/swiper3.png',
], ],
categoryList : [ categoryList : [
], ],
@ -133,23 +133,33 @@ page{
.logo{ .logo{
width: 265rpx; width: 265rpx;
height: 50rpx; height: 50rpx;
background: url("@/static/index/logo.png"); background: url("@/static/index/logo.png") no-repeat;
background-size: 265rpx; background-size: 244rpx;
&__min{ &__min{
width: 50rpx; width: 50rpx;
} }
} }
.msg{ .msg{
padding-right: 10rpx;
position: relative;
&--badge{
position: absolute;
right: 0;
top: -14rpx;
z-index: 999;
border:1px solid $color-grey0
}
&--icon{ &--icon{
width: 32rpx; width: 33rpx;
height: 38rpx; height: 42rpx;
} }
} }
.search{ .search{
padding: 0 30rpx; padding: 5rpx 30rpx 0;
background: $color-blue5; background: $color-blue5;
&__min{ &__min{
width: 548rpx; width: 548rpx;
padding: 0;
} }
&--input{ &--input{
display: flex; display: flex;
@ -160,13 +170,13 @@ page{
color: $color-grey0; color: $color-grey0;
border-radius: 8rpx; border-radius: 8rpx;
padding: 0 30rpx; padding: 0 30rpx;
font-size: $font-size-sm; font-size: $font-size-base;
&::after{ &::after{
display: block; display: block;
content: ""; content: "";
width: 34rpx; width: 34rpx;
height: 36rpx; height: 38rpx;
background: url("@/static/index/search.png"); background: url("@/static/index/search.png") no-repeat;
background-size: 100%; background-size: 100%;
} }
} }
@ -179,15 +189,17 @@ page{
.category{ .category{
display: flex; display: flex;
padding: 0 20rpx; padding: 0 35rpx;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between;
&--item{ &--item{
padding: 0 10rpx; width: 130rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
} }
&--image-box{ &--image-box{
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
margin: 0 auto;
} }
&--image{ &--image{
width: 120rpx; width: 120rpx;
@ -202,6 +214,7 @@ page{
} }
.title{ .title{
font-size: 36rpx; font-size: 36rpx;
font-weight: bold;
margin: 60rpx 30rpx 30rpx; margin: 60rpx 30rpx 30rpx;
} }

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-22 15:36:46 * @Date: 2022-03-22 15:36:46
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-15 18:45:28 * @LastEditTime: 2022-04-20 19:36:46
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -13,7 +13,7 @@
<view class="logo">马士兵严选</view> <view class="logo">马士兵严选</view>
<u--form class="login"> <u--form class="login">
<u-form-item> <u-form-item>
<input placeholder="请输入手机号" v-model="phone" class="login--input" border="bottom" /> <input placeholder="请输入手机号" type="number" v-model="phone" class="login--input" border="bottom" />
</u-form-item> </u-form-item>
<u-form-item class="login--code"> <u-form-item class="login--code">
<input placeholder="验证码" type="number" maxlength="6" class="login--input" v-model="code" border="bottom" /> <input placeholder="验证码" type="number" maxlength="6" class="login--input" v-model="code" border="bottom" />
@ -26,7 +26,7 @@
<UiButton class="login--btn" type="gradual" @click="login"></UiButton> <UiButton class="login--btn" type="gradual" @click="login"></UiButton>
<label class="login--agreement"> <label class="login--agreement">
<radio class="radio" :checked="checked" @click="checked = !checked" color="#FF875B"/> <radio class="radio" :checked="checked" @click="checked = !checked" color="#FF875B"/>
同意<text class="link">用户协议</text><text class="link">隐私协议</text>,首次登陆将自动注册 同意<text class="link">用户协议</text><text class="link">隐私协议</text>首次登录自动注册
</label> </label>
</view> </view>
</template> </template>
@ -42,7 +42,8 @@ export default {
sendStatus : false, sendStatus : false,
checked: false, checked: false,
phone : '', phone : '',
code : '' code : '',
loginStatus : false
} }
}, },
mounted(){ mounted(){
@ -74,6 +75,10 @@ export default {
}, },
async login(){ async login(){
if(this.loginStatus){
return false;
}
this.loginStatus = true;
if(!IsPhone(this.phone)){ if(!IsPhone(this.phone)){
uni.$u.toast('请输入正确手机号'); uni.$u.toast('请输入正确手机号');
return false; return false;
@ -108,7 +113,8 @@ export default {
const len = pages.length; const len = pages.length;
const prevPage = pages[len - 2]; const prevPage = pages[len - 2];
const tabBar = ['pages/index/index','pages/goods/category']; const tabBar = ['pages/index/index','pages/goods/category'];
console.log(prevPage);
this.loginStatus = false;
if(len > 1){ if(len > 1){
// tabBartabBar // tabBartabBar
if(tabBar.includes(prevPage.route)){ if(tabBar.includes(prevPage.route)){

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 946 B

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 696 B

After

Width:  |  Height:  |  Size: 826 B

Loading…
Cancel
Save