提交 5878f23a authored 作者: 刘旭's avatar 刘旭

优化页面

上级 bf7cd660
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<!-- <link rel="icon" href="./src/static/favicon.ico" type="png/x-icon" /> -->
<link rel="icon" href="./src/static/favicon.ico" type="png/x-icon" />
<script>
var coverSupport =
'CSS' in window &&
......
......@@ -10,7 +10,7 @@
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "合口味"
"navigationBarTitleText": "深圳市永信达科技有限公司"
}
}, {
"path": "pages/category/index",
......
......@@ -158,7 +158,7 @@ const initGoodsList = (data: any) => {
height: 100%;
background-color: #fff;
padding: 0 24rpx;
margin-right: 10rpx;
margin-right: 6rpx;
.item-container {
box-sizing: border-box;
......
......@@ -82,8 +82,7 @@
</u-popup>
</view>
<goodsSku ref="goodsSkuRef" :cartId="cartId" @selected="selected">
</goodsSku>
<goodsSku ref="goodsSkuRef" :cartId="cartId" @selected="selected" />
</template>
<script lang="ts" setup>
......@@ -358,6 +357,8 @@ const initParts = (goodsId: number, productId: number) => {
<style lang="scss" scoped>
.goods-detail {
margin: 0 6rpx;
.goods-img {
:deep(.swiper) {
margin-top: 200px;
......@@ -568,10 +569,10 @@ const initParts = (goodsId: number, productId: number) => {
}
.goods-intro {
//height: 160rpx;
background-color: #ffffff;
margin-top: 20rpx;
border-radius: 30rpx;
border-radius: 20rpx;
padding: 0 20rpx;
.content {
width: 100%;
......
<template>
<view class="login-container">
<image src="../../static/hkw.png" mode="widthFix" class="title-iamge"></image>
<text class="login-text">欢迎登陆</text>
<view style="box-sizing: border-box;">
<view class="login-container">
<image src="../../static/logo.png" mode="widthFix" class="title-iamge"></image>
<text class="login-text">欢迎登陆</text>
<view class="login-form">
<input-login :inputData="inputData" @hangleInput="hangleInput" />
<input-login :inputData="inputData1" @hangleInput="hangleInput" />
</view>
<view class="login-form">
<input-login :inputData="inputData" @hangleInput="hangleInput" />
<input-login :inputData="inputData1" @hangleInput="hangleInput" />
</view>
<button @tap="clickNextStep" class="getCaptcha">登录</button>
<!-- <image src="https://bytelibs-dev.oss-cn-beijing.aliyuncs.com/image/logo/logo.png" mode="" class="next-step" @click="clickNextStep"></image> -->
<button @tap="clickNextStep" class="getCaptcha">登录</button>
<!-- <image src="https://bytelibs-dev.oss-cn-beijing.aliyuncs.com/image/logo/logo.png" mode="" class="next-step" @click="clickNextStep"></image> -->
</view>
</view>
</template>
......@@ -105,16 +107,23 @@ let initLogin = async (mobile: number, password: string) => {
</script>
<style lang="scss" scoped>
page {
:deep(uni-page-wrapper) {
background-color: #fff;
}
:deep(uni-page) {
padding: 0 6rpx;
box-sizing: border-box;
}
.login-container {
padding-top: 40%;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
background-color: #fff;
.getCaptcha {
width: 400rpx;
background-color: rgb(253, 243, 208);
......@@ -122,27 +131,33 @@ page {
border: none;
font-size: 30rpx;
margin-top: 20rpx;
&::after {
border: none;
}
}
.title-iamge {
width: 400rpx;
}
.login-text {
margin-top: 10%;
font-weight: 700;
font-size: 40rpx;
color: #1d2b5f;
}
.login-form {
margin-top: 15%;
}
.next-step {
margin-top: 20rpx;
width: 245rpx;
height: 90rpx;
}
.footer-text {
margin-top: 40%;
display: block;
......
......@@ -51,11 +51,9 @@
<!-- 提交订单 -->
<view class="footer">
<view>
<u-button type="error" size="medium" shape="circle" @tap="onsubmit">
提交订单
</u-button>
</view>
<u-button type="error" size="medium" shape="circle" @tap="onsubmit">
提交订单
</u-button>
</view>
</view>
</template>
......@@ -215,8 +213,9 @@ onShow(() => {
<style lang="scss" scoped>
.container {
margin: 0 6rpx;
.address {
width: 100%;
padding: 20rpx 32rpx;
border-top: 2rpx solid #e8e8e8;
background-color: #fff;
......@@ -311,13 +310,17 @@ onShow(() => {
.footer {
position: fixed;
bottom: 0;
width: 100%;
left: var(--window-left);
right: var(--window-right);
// width: 100%;
height: 100rpx;
background-color: #fff;
display: flex;
justify-content: flex-end;
align-items: center;
padding: 0 32rpx;
max-width: 420px;
margin: 0 auto;
}
}
</style>
......@@ -134,7 +134,7 @@ onBackPress((options: any) => {
<style lang="scss" scoped>
.container {
box-sizing: border-box;
margin: 16rpx 32rpx;
margin: 16rpx;
background-color: #fff;
.details {
......
<template>
<view>
<view style="border-top: 1rpx solid #f6f6f6;">
<view class="wrap">
<view class="u-tabs-box">
<u-tabs-swiper activeColor="#f29100" ref="swiperTabs" :list="list" :current="current" @change="change"
......
<template>
<view style="padding: 30rpx;">
<view style="padding: 20rpx;">
<!-- 订单信息 -->
<view class="container">
<block v-for="(item, index) in detailData">
......@@ -593,13 +593,17 @@ let initQuotationPayment = () => {
}
.footer {
width: 100%;
position: fixed;
bottom: 0;
left: var(--window-left);
right: var(--window-right);
// width: 100%;
padding: 20rpx;
z-index: 99;
background-color: #fff;
border-top: 2rpx solid #f7f7f7;
max-width: 420px;
margin: 0 auto;
.price {
display: flex;
......
......@@ -677,6 +677,15 @@ let uploadLine = () => {
success(uploadFileRes: any) {
uni.hideLoading()
let fileRes = JSON.parse(uploadFileRes.data)
if (fileRes.code === 501 || fileRes.code === 911) return uni.reLaunch({
url: '/pages/login/login',
success() {
uni.showToast({
title: '请登录',
icon: 'none',
});
},
});
if (!fileRes.data.isError) {
if (fileRes.data.cartList.length <= 20) {
// 判断是否为导入产品线
......@@ -775,7 +784,7 @@ $nav-heigth: var(--window-bottom);
// align-items: center;
background-color: #fff;
min-height: 100vh;
margin-right: 10rpx;
margin-right: 6rpx;
.right-cates-list {
width: 80px;
......
......@@ -193,7 +193,7 @@ onBackPress((options: any) => {
<style lang="scss" scoped>
.container {
box-sizing: border-box;
margin: 16rpx 32rpx;
margin: 16rpx;
// background-color: #fff;
.details {
......
......@@ -109,13 +109,9 @@ uni.$on('initAddress', () => {
</script>
<style lang="scss" scoped>
page {
// padding: 0 20rpx;
}
.address {
padding: 40rpx;
margin: 0 10rpx 10rpx;
margin: 0 6rpx 6rpx;
background-color: #fff;
border-top: 1px solid #f6f6f6;
border-radius: 8rpx;
......
<template>
<u-subsection :list="list" v-model="current" active-color="#ff9900" @change="change" />
<view v-if="collectList.length !== 0">
<view v-if="current === 0" style="margin-top: 6rpx;">
<view v-if="current === 0" style="margin: 6rpx 6rpx 0 6rpx;">
<goodsItem v-for="item in collectList" :key="item.id" :src="item?.picUrl" :name="item.name"
:brief="item.brief" :retailPrice="item.retailPrice" :isCollection="true"
@tapDelCollection="delCollection(item)" @tap="toGoods(item)" />
......@@ -145,14 +145,13 @@ init();
<style lang="scss" scoped>
.product-collection {
width: 100%;
height: 80rpx;
line-height: 80rpx;
background-color: #fff;
padding: 0 30rpx;
margin-bottom: 4rpx;
display: flex;
justify-content: space-between;
align-items: center;
margin: 0 6rpx 4rpx 6rpx;
}
</style>
......@@ -2,7 +2,7 @@
<view class="profile-container">
<view class="profile-info">
<view class="profile-avatar">
<image style="width: 220rpx;" src="../../static/hkw.png" mode="scaleToFill" />
<image style="width: 220rpx;" src="../../static/logo.png" mode="scaleToFill" />
</view>
<view class="profile-nickname">
<text>{{ nickName }}</text>
......@@ -154,6 +154,8 @@ let toAbout = () => {
<style lang="scss" scoped>
.profile-container {
margin: 0 6rpx;
.profile-info {
height: 200rpx;
margin-top: 20rpx;
......
<template>
<u-cell-group>
<u-cell-item icon="" title="头像" @click="toSetting" :arrow="false">
<template #right-icon>
<u-upload
ref="uploadRef"
:action="action"
:file-list="fileList"
:header="headers"
:custom-btn="true"
@on-success="success"
width="155"
height="155"
>
<template #addBtn>
<view v-if="!userData.avatar" class="avatar">
<u-icon name="camera" color="#e6e6e6" size="40" class="icon"></u-icon>
</view>
<u-image
v-else
:src="config.baseUrl + userData.avatar"
width="120rpx"
height="120rpx"
mode="scaleToFill"
></u-image>
</template>
</u-upload>
</template>
</u-cell-item>
<u-cell-item icon="" title="姓名" :value="userData.nickName" @click="setName"></u-cell-item>
<u-cell-item icon="" title="密码设置" :value="userData.pwd" @click="setPwd"></u-cell-item>
<u-cell-item icon="" title="手机号" :value="userData.mobile" @click="setTel"></u-cell-item>
<u-cell-item icon="" title="编码" :value="userData.username"></u-cell-item>
<u-cell-item icon="" title="邮箱" :value="userData.email" @click="setEmail"></u-cell-item>
<u-cell-item
icon=""
title="发货地址"
:value="userData.workAddr"
:value-style="{ marginLeft: '17%' }"
@tap="setAddr"
></u-cell-item>
</u-cell-group>
<view style="margin: 0 6rpx;">
<u-cell-group>
<u-cell-item icon="" title="头像" :arrow="false">
<template #right-icon>
<u-upload ref="uploadRef" :action="action" :file-list="fileList" :header="headers"
:custom-btn="true" @on-success="success" width="155" height="155">
<template #addBtn>
<view v-if="!userData.avatar" class="avatar">
<u-icon name="camera" color="#e6e6e6" size="40" class="icon"></u-icon>
</view>
<u-image v-else :src="config.baseUrl + userData.avatar" width="120rpx" height="120rpx"
mode="scaleToFill"></u-image>
</template>
</u-upload>
</template>
</u-cell-item>
<u-cell-item icon="" title="姓名" :value="userData.nickName" @click="setName"></u-cell-item>
<u-cell-item icon="" title="密码设置" :value="userData.pwd" @click="setPwd"></u-cell-item>
<u-cell-item icon="" title="手机号" :value="userData.mobile" @click="setTel"></u-cell-item>
<u-cell-item icon="" title="编码" :value="userData.username"></u-cell-item>
<u-cell-item icon="" title="邮箱" :value="userData.email" @click="setEmail"></u-cell-item>
<u-cell-item icon="" title="发货地址" :value="userData.workAddr" :value-style="{ marginLeft: '17%' }"
@tap="setAddr"></u-cell-item>
</u-cell-group>
<u-button style="margin-top: 100rpx;" @tap="openModel">退出当前用户</u-button>
<u-modal
v-model="options.show"
:content="options.content"
@confirm="toLogin"
show-cancel-button
></u-modal>
<u-button style="margin-top: 100rpx;" @tap="openModel">退出当前用户</u-button>
</view>
<u-modal v-model="options.show" :content="options.content" @confirm="toLogin" show-cancel-button></u-modal>
<!-- 修改姓名 -->
<u-popup v-model="options.showPopup" mode="center" width="80%">
......@@ -74,24 +53,12 @@
</view>
<u-form label-width="130">
<u-form-item label="新密码:">
<u-input
v-model="oldPwd"
type="password"
:border="true"
:password-icon="true"
clearable
placeholder="请输入新密码"
/>
<u-input v-model="oldPwd" type="password" :border="true" :password-icon="true" clearable
placeholder="请输入新密码" />
</u-form-item>
<u-form-item label="确认密码:">
<u-input
v-model="newPwd"
type="password"
:border="true"
:password-icon="true"
clearable
placeholder="请再次输入密码"
/>
<u-input v-model="newPwd" type="password" :border="true" :password-icon="true" clearable
placeholder="请再次输入密码" />
</u-form-item>
</u-form>
<u-button :maxlength="11" type="error" style="margin-top: 8%;" @tap="pwdSave">
......@@ -108,23 +75,11 @@
</view>
<u-form label-width="155">
<u-form-item label="选择地址">
<u-input
v-model="temporaryAddr"
:disabled="true"
:border="true"
clearable
placeholder="请选择地址"
@tap="options.showSelectAddr = true"
/>
<u-input v-model="temporaryAddr" :disabled="true" :border="true" clearable placeholder="请选择地址"
@tap="options.showSelectAddr = true" />
</u-form-item>
<u-form-item label="详细信息">
<u-input
v-model="detailAddr"
type="textarea"
:border="true"
clearable
placeholder="请输入详细信息"
/>
<u-input v-model="detailAddr" type="textarea" :border="true" clearable placeholder="请输入详细信息" />
</u-form-item>
</u-form>
<u-button :maxlength="11" type="error" style="margin-top: 8%;" @tap="addrSave">
......@@ -201,14 +156,14 @@ let setAddr = () => {
};
let success = (res: any) => {
if(res.code === 200) {
if (res.code === 200) {
init();
}
uploadRef.value?.clear()
};
let nameSave = () => {
switch(label.value) {
switch (label.value) {
case '邮箱:':
save(() => {
resetEmail({ email: nameValue.value }).then((res: any) => {
......@@ -232,15 +187,15 @@ let nameSave = () => {
})
break;
case '手机号:':
save(() => {
resetMobile({ mobile: nameValue.value }).then((res: any) => {
if (res.data.code === 200) {
nameValue.value = '';
options.showPopup = false;
init();
}
});
})
save(() => {
resetMobile({ mobile: nameValue.value }).then((res: any) => {
if (res.data.code === 200) {
nameValue.value = '';
options.showPopup = false;
init();
}
});
})
break;
}
......@@ -273,13 +228,13 @@ let addrSave = () => {
title: '请输入收货地址',
icon: 'none',
});
let workAddr = temporaryAddr.value + detailAddr.value
resetWorkAddr({ workAddr }).then((res: any) => {
if(res.data.code) {
options.showPopupAddr = false
init()
}
})
let workAddr = temporaryAddr.value + detailAddr.value
resetWorkAddr({ workAddr }).then((res: any) => {
if (res.data.code) {
options.showPopupAddr = false
init()
}
})
}
let pwdSave = () => {
......@@ -331,7 +286,7 @@ let init = () => {
let addr = userData.value.workAddr.match(reg)
temporaryAddr.value = addr[0] + addr[1] + addr[2]
addr.map((item: any, i: number) => {
if(i > 2) {
if (i > 2) {
detailAddr.value += item
}
})
......
src/static/favicon.ico

15.0 KB | W: | H:

src/static/favicon.ico

15.0 KB | W: | H:

src/static/favicon.ico
src/static/favicon.ico
src/static/favicon.ico
src/static/favicon.ico
  • 2-up
  • Swipe
  • Onion skin
......@@ -36,6 +36,8 @@ function request(url: string, method: 'GET' | 'POST' | 'PUT' | 'DELETE', data?:
header: header,
responseType,
success(res: any) {
console.log(res);
uni.hideLoading();
if (res.data.code == 200) {
resolve(res);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论