Browse Source

1.1修改垂直下拉表 登录打不开

hfll
hflllll 2 days ago
parent
commit
cba7b91907
17 changed files with 681 additions and 374 deletions
  1. +6
    -0
      App.vue
  2. +3
    -1
      api/api.js
  3. +3
    -1
      api/http.js
  4. +7
    -9
      api/model/login.js
  5. +1
    -7
      components/base/tabbar.vue
  6. +31
    -31
      components/config/configPopup.vue
  7. +2
    -2
      manifest.json
  8. +5
    -11
      pages.json
  9. +218
    -69
      pages/index/category.vue
  10. +134
    -0
      pages/index/test-vtabs.vue
  11. +207
    -207
      pages_order/auth/loginAndRegisterAndForgetPassword.vue
  12. +47
    -29
      pages_order/auth/wxLogin.vue
  13. BIN
      static/image/中森明菜.webp
  14. +4
    -1
      store/store.js
  15. +4
    -1
      uni.scss
  16. +8
    -4
      uni_modules/uv-ui-tools/libs/util/route.js
  17. +1
    -1
      utils/utils.js

+ 6
- 0
App.vue View File

@ -3,9 +3,15 @@
onLaunch: function() { onLaunch: function() {
this.$store.commit('initConfig') this.$store.commit('initConfig')
this.$store.commit('getCategoryList') this.$store.commit('getCategoryList')
// token访
/*
if(uni.getStorageSync('token')){ if(uni.getStorageSync('token')){
this.$store.commit('getQrCode') this.$store.commit('getQrCode')
} }
*/
// token
this.$store.commit('getQrCode')
}, },
onShow: function() { onShow: function() {
}, },


+ 3
- 1
api/api.js View File

@ -45,7 +45,8 @@ export function api(key, data, callback, loadingTitle) {
limit[storageKey] = new Date().getTime() limit[storageKey] = new Date().getTime()
} }
//必须登录
//必须登录 - 注释掉登录检查
/*
if (req.auth) { if (req.auth) {
if (!uni.getStorageSync('token')) { if (!uni.getStorageSync('token')) {
utils.toLogin() utils.toLogin()
@ -53,6 +54,7 @@ export function api(key, data, callback, loadingTitle) {
return Promise.reject() return Promise.reject()
} }
} }
*/
// 接口防抖 // 接口防抖
if(req.debounce){ if(req.debounce){


+ 3
- 1
api/http.js View File

@ -1,4 +1,3 @@
import Vue from 'vue' import Vue from 'vue'
import utils from '../utils/utils.js' import utils from '../utils/utils.js'
import store from '../store/store.js' import store from '../store/store.js'
@ -32,6 +31,8 @@ function http(uri, data, callback, method = 'GET', showLoading, title) {
uni.hideLoading(); uni.hideLoading();
} }
// 注释掉登录状态检查
/*
if(res.statusCode == 401 || if(res.statusCode == 401 ||
res.data.message == '操作失败,token非法无效!' || res.data.message == '操作失败,token非法无效!' ||
res.data.message == '操作失败,用户不存在!'){ res.data.message == '操作失败,用户不存在!'){
@ -39,6 +40,7 @@ function http(uri, data, callback, method = 'GET', showLoading, title) {
console.error('登录过期'); console.error('登录过期');
utils.toLogin() utils.toLogin()
} }
*/
if(res.statusCode == 200 && res.data.code != 200 if(res.statusCode == 200 && res.data.code != 200
&& res.data.code != 902){ && res.data.code != 902){


+ 7
- 9
api/model/login.js View File

@ -1,33 +1,31 @@
// 登录相关接口 // 登录相关接口
const api = { const api = {
// 微信登录接口 // 微信登录接口
wxLogin: { wxLogin: {
url: '/login_common/appletLogin', url: '/login_common/appletLogin',
method: 'GET',
limit : 500,
method: 'GET',
limit: 500,
}, },
// 获取绑定手机号码 // 获取绑定手机号码
bindPhone: { bindPhone: {
url: '/login_common/bindPhone', url: '/login_common/bindPhone',
method: 'GET', method: 'GET',
auth: true,
// auth: true,
}, },
// 修改个人信息接口 // 修改个人信息接口
updateInfo: { updateInfo: {
url: '/info_common/updateInfo', url: '/info_common/updateInfo',
method: 'POST', method: 'POST',
auth: true,
limit : 500,
showLoading : true,
limit: 500,
showLoading: true,
// auth: true,
}, },
// 获取个人信息 // 获取个人信息
getInfo: { getInfo: {
url: '/info_common/getInfo', url: '/info_common/getInfo',
method: 'GET', method: 'GET',
auth: true,
// auth: true,
}, },
} }

+ 1
- 7
components/base/tabbar.vue View File

@ -28,13 +28,7 @@
}, },
data() { data() {
return { return {
list: [{
"selectedIconPath": "/static/image/tabbar/home-active.png",
"iconPath": "/static/image/tabbar/home.png",
"pagePath": "/pages/index/index",
"title": "首页",
key: 'home',
},
list: [
{ {
"selectedIconPath": "/static/image/tabbar/product-list-active.png", "selectedIconPath": "/static/image/tabbar/product-list-active.png",
"iconPath": "/static/image/tabbar/product-list.png", "iconPath": "/static/image/tabbar/product-list.png",


+ 31
- 31
components/config/configPopup.vue View File

@ -1,6 +1,6 @@
<template> <template>
<view class="configPopup"> <view class="configPopup">
<uv-popup ref="popup" :round="30" :customStyle="{height: '50vh'}">
<uv-popup ref="popup" :round="30" :customStyle="{ height: '50vh' }">
<view class="content"> <view class="content">
<uv-parse :content="content"></uv-parse> <uv-parse :content="content"></uv-parse>
</view> </view>
@ -9,41 +9,41 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex'
export default {
name: 'configPoup',
data() {
return {
content : ''
}
},
onShow(){
import { mapState } from 'vuex'
export default {
name: 'configPoup',
data() {
return {
content: ''
}
},
onShow() {
},
methods: {
//
open(key) {
this.content = this.configList[key]
this.$refs.popup.open('bottom');
}, },
methods: {
//
open(key){
this.content = this.configList[key]
this.$refs.popup.open('bottom');
},
openText(content){
this.content = content
this.$refs.popup.open('bottom');
},
openText(content) {
this.content = content
this.$refs.popup.open('bottom');
}, },
computed : {
...mapState(['configList'])
}
},
computed: {
...mapState(['configList'])
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.configPopup {
.content{
padding: 30rpx 20rpx;
overflow: scroll;
height: 100%;
box-sizing: border-box;
}
.configPopup {
.content {
padding: 30rpx 20rpx;
overflow: scroll;
height: 100%;
box-sizing: border-box;
} }
}
</style> </style>

+ 2
- 2
manifest.json View File

@ -52,7 +52,7 @@
"quickapp" : {}, "quickapp" : {},
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wx28679cb649907e7e",
"appid" : "wxe7ae8cbe1673834c",
"setting" : { "setting" : {
"urlCheck" : false "urlCheck" : false
}, },
@ -99,5 +99,5 @@
} }
}, },
// i a // i a
"sassImplementationName": "node-sass"
"sassImplementationName" : "node-sass"
} }

+ 5
- 11
pages.json View File

@ -1,20 +1,14 @@
{ {
"pages": [{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
},
"pages": [
{ {
"path": "pages/index/order",
"path": "pages/index/category",
"style": { "style": {
"navigationBarTitleText": "",
"navigationBarTitleText": "首页",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },
{ {
"path": "pages/index/category",
"path": "pages/index/order",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": true "enablePullDownRefresh": true
@ -41,7 +35,7 @@
} }
], ],
"preloadRule": { "preloadRule": {
"pages/index/index": {
"pages/index/order": {
"network": "all", "network": "all",
"packages": ["pages_order"] "packages": ["pages_order"]
} }


+ 218
- 69
pages/index/category.vue View File

@ -1,75 +1,83 @@
<template> <template>
<view class="page"> <view class="page">
<!-- 导航栏 --> <!-- 导航栏 -->
<navbar title="商品列表"
leftClick
@leftClick="$utils.navigateBack"
bgColor="#E3441A"
color="#fff" />
<!-- <navbar bgColor="#019245" color="#fff" /> -->
<!-- 搜索栏 --> <!-- 搜索栏 -->
<view class="search"> <view class="search">
<uv-search placeholder="搜你喜欢的产品" bgColor="#fff"
@search="search"
@change="search"
@custom="search"
v-model="queryParams.title"></uv-search>
<image src="/static/image/中森明菜.webp" mode="aspectFill" class="search-img"></image>
<view style="position: relative;">
<uv-search placeholder="陕西苹果" bgColor="#fff" @search="search" @change="search" @custom="search"
v-model="queryParams.title" height="70rpx" :showAction="false" actionText=" "></uv-search>
<text class="search-text" @click="search">搜索</text>
</view>
</view> </view>
<!-- 商品列表 --> <!-- 商品列表 -->
<view style="position: 20rpx;"
v-if="queryParams.title">
<view style="position: 20rpx;" v-if="queryParams.title">
<productList :list="list" /> <productList :list="list" />
</view> </view>
<!-- 分类商品列表 --> <!-- 分类商品列表 -->
<view class="category"
v-else>
<view class="tabs">
<uv-tabs
:list="category"
:activeStyle="{color : '#f00', fontWeight : 600}"
lineColor="#f00"
:inactiveStyle="{color: 'rgba(0,0,0,.8)'}"
lineHeight="8rpx"
lineWidth="50rpx"
:current="current"
@click="clickTabs"></uv-tabs>
</view>
<uv-vtabs
:list="category[current].children"
:current="currentChildren"
keyName="name"
:chain="false"
@change="change">
<!-- <view class="list"> -->
<!-- <template v-for="(item, index) in category[current].children">
<uv-vtabs-item :index="index" :key="index">
<view class="category-item">
<view class="category-title">
{{ item.name }}
</view>
<productItem :item="pro"
v-for="(pro, i) in item.shopList" :key="i"
@click="$utils.navigateTo(`/pages_order/product/productDetail?id=${pro.id}`)" />
<view class="category" v-else>
<!-- <view class="tabs">
<uv-tabs :list="category" :activeStyle="{color : '#f00', fontWeight : 600}" lineColor="#f00"
:inactiveStyle="{color: 'rgba(0,0,0,.8)'}" lineHeight="8rpx" lineWidth="50rpx" :current="current"
@click="clickTabs"></uv-tabs>
</view> -->
<!-- 原来的选择框 -->
<!-- <uv-vtabs :list="category[current].children" :current="currentChildren" keyName="name" :chain="false"
@change="change"> -->
<!-- 可有可无 -->
<!-- <view class="list">
<template v-for="(item, index) in category[current].children">
<uv-vtabs-item :index="index" :key="index">
<view class="category-item">
<view class="category-title">
{{ item.name }}
</view> </view>
<productItem :item="pro"
v-for="(pro, i) in item.shopList" :key="i"
@click="$utils.navigateTo(`/pages_order/product/productDetail?id=${pro.id}`)" />
</view>
</uv-vtabs-item> </uv-vtabs-item>
</template> -->
<!-- </view> -->
<uv-vtabs-item>
</template>
</view> -->
<!-- <uv-vtabs-item>
<view class="category-item"> <view class="category-item">
<productItem :item="pro"
v-for="(pro, i) in categoryList.shopList" :key="i"
@click="$utils.navigateTo(`/pages_order/product/productDetail?id=${pro.id}`)" />
<uv-empty v-if="categoryList.shopList.length == 0" text="还没有呢"/>
<productItem :item="pro" v-for="(pro, i) in categoryList.shopList" :key="i"
@click="$utils.navigateTo(`/pages_order/product/productDetail?id=${pro.id}`)" />
<uv-empty v-if="categoryList.shopList.length == 0" text="还没有呢" />
</view> </view>
</uv-vtabs-item> </uv-vtabs-item>
</uv-vtabs>
</uv-vtabs> -->
<view class="content">
<uv-vtabs :chain="chain" :list="list" :barItemBadgeStyle="{ right: '20rpx', top: '12rpx' }"
barStyle="box-shadow: 0 0 6rpx 6rpx rgba(0, 0, 0, 0.1);" @change="tabChange" height="1100rpx">
<uv-vtabs-item>
<view class="item" v-for="(item2, index2) in list2" :key="index2">
<view class="item-title">
<text class="text">{{ item2.name }}</text>
</view>
<view class="item-content">
<text class="text">{{ item2.desc }}</text>
</view>
</view>
</uv-vtabs-item>
<!-- try -->
<view class="category-item">
<productItem :item="item2" v-for="(item2, i) in list2" :key="i"
@click="$utils.navigateTo(`/pages_order/product/productDetail?id=${item2.id}`)" />
<uv-empty v-if="list2.length == 0" text="还没有呢" />
</view>
</uv-vtabs>
</view>
</view> </view>
<!-- tabbar --> <!-- tabbar -->
@ -78,6 +86,46 @@
</template> </template>
<script> <script>
const getList = [{
name: 'uv-ui简介',
childrens: [{
// name: 'uv-ui',
desc: '1. uv-ui最初是在uview2.x的基础上进行改进优化,支持vue3等优化,最重要的是支持单独导入直接使用,无需在main.js中进行配置。\n\n2. uv-ui来源于社区,也回归到社区,正是有一群热爱uni-app生态的同学推着它前行,而我们也一如既往的承诺,uv-ui永久开源,永远免费。但是会在下载处进行广告配置,作为开发团队的研发费用的部分来源,所以希望大家理解。'
}]
}, {
name: 'uv-ui特点',
childrens: [{
name: '全端兼容',
desc: 'uv-ui支持App(vue)、App(nvue)、H5、小程序、VUE2、VUE3,支持nvue原生渲染。uv-ui的组件都是多端自适应的,底层会抹平很多小程序平台的差异或bug。'
}, {
name: '集成工具',
desc: 'uv-ui中的uv-ui-tools组件集成了强大的网络请求 HTTP 及常用的工具函数,无需自己再去寻找,并且直接挂载在uni上面,方便使用,只需要在mian.js中引入即可,更多工具请参考:https://www.uvui.cn/js/http.html。使用方式请参考:https://www.uvui.cn/components/setting.html。'
}, {
name: '主题扩展',
desc: 'uv-ui中的uv-ui-tools组件下面的theme.scss为主题文件,直接在uni.scss中引入主题即可,可以根据自己的需求进行扩展。下面也有说明具体使用方式。使用方法请参考:https://www.uvui.cn/components/setting.html'
}]
}, {
name: '更新日志',
badge: {
isDot: true
},
childrens: [{
name: '更新日志',
desc: 'uv-ui的重大更新在更新日志中都有所说明,如果在开发的过程中遇到文档不完善,可以提供给我们,我们会持续完善,非常感谢大家的支持。更新日志:https://www.uvui.cn/components/changelog.html'
}]
}, {
name: '设计规范',
childrens: [{
name: '设计规范',
desc: '为了约束合成更多优秀的组件和模板,打造优质的体验,我们拟定了一些UI界面设计和建议。同时部分之间会有依赖,这是为了减少代码冗余的同时提高开发效率,模块化是我们的基础。如果大家有好的建议,可以提出进行改进。'
}]
}, {
name: '交流反馈',
childrens: [{
name: '交流反馈',
desc: 'uv-ui为采用MIT许可证的开源项目,使用完全免费。欢迎加QQ群交流反馈,一起学习,共同进步。QQ群: 549833913'
}]
}]
import productItem from '@/components/product/productItem.vue'; import productItem from '@/components/product/productItem.vue';
import mixinsList from '@/mixins/list.js' import mixinsList from '@/mixins/list.js'
import { import {
@ -97,6 +145,9 @@
mixinsListApi: 'getClassShopPageList', mixinsListApi: 'getClassShopPageList',
current : 0, current : 0,
currentChildren : 0, currentChildren : 0,
list: [],
chain: false,
value: 0
} }
}, },
computed: { computed: {
@ -104,16 +155,35 @@
categoryList(){ categoryList(){
return this.category[this.current].children[this.currentChildren] return this.category[this.current].children[this.currentChildren]
}, },
list2() {
const _list = this.list[this.value]?.childrens;
return _list ? _list : [];
}
},
onReady(){
//
uni.showLoading({
title: '加载中'
})
setTimeout(() => {
this.list = getList;
uni.hideLoading();
}, 200)
}, },
onLoad({ onLoad({
search, search,
cid cid
}) { }) {
console.log('我是cid', cid);
console.log('我是category', this.category);
if (search) { if (search) {
this.queryParams.title = search this.queryParams.title = search
} }
// this.$store.commit('getCategoryList') // this.$store.commit('getCategoryList')
if(this.category.length > 0 && cid){ if(this.category.length > 0 && cid){
this.category.forEach((n, i) => { this.category.forEach((n, i) => {
if(n.id == cid){ if(n.id == cid){
this.current = i this.current = i
@ -128,6 +198,11 @@
change(e) { change(e) {
// this.queryParams.classId = this.category[e].id // this.queryParams.classId = this.category[e].id
this.currentChildren = e this.currentChildren = e
},
tabChange(index){
console.log('选项改变:', index);
this.value = index
}, },
clickTabs({index}){ clickTabs({index}){
this.current = index this.current = index
@ -147,26 +222,34 @@
<style scoped lang="scss"> <style scoped lang="scss">
.page { .page {
/deep/ .uv-vtabs { /deep/ .uv-vtabs {
height: calc(100vh - 600rpx) !important;
height: calc(100vh - 470rpx) !important;
} }
/deep/ .uv-vtabs__bar {
height: calc(100vh - 600rpx) !important;
}
// /deep/ .uv-vtabs__bar {
// height: calc(100vh - 600rpx) !important;
// }
/deep/ .uv-vtabs__content { /deep/ .uv-vtabs__content {
height: calc(100vh - 600rpx) !important;
height: calc(100vh - 500rpx) !important;
} }
.search { .search {
position: relative;
background: #FFFFFF;
margin: 20rpx;
border-radius: 41rpx;
padding: 10rpx 20rpx;
display: flex;
align-items: center;
background: $uni-color;
height: 280rpx;
padding-left: 20rpx;
.search-img{
width: 120rpx;
height: 120rpx;
margin: 40rpx 0 0 10rpx;
border-radius: 50%;
}
.search-text{
position: absolute;
right: 80rpx;
top: 50%;
transform: translateY(-50%);
color: $uni-color;
}
/deep/ .uv-search__action { /deep/ .uv-search__action {
background-color: $uni-color; background-color: $uni-color;
color: #FFFFFF; color: #FFFFFF;
@ -181,7 +264,38 @@
} }
} }
.header {
padding: 30rpx;
font-size: 30rpx;
color: #333;
}
.item {
padding: 10rpx 20rpx;
&-title {
.text {
font-weight: 700;
font-size: 32rpx;
color: #111;
}
}
&-content {
padding: 20rpx 0;
.text {
line-height: 48rpx;
font-size: 30rpx;
color: #111;
/* #ifndef APP-NVUE */
word-break: break-all;
/* #endif */
}
}
}
.gap {
padding: 0 30rpx;
}
.category { .category {
/* background-color: green; */
font-size: 30rpx; font-size: 30rpx;
color: #333; color: #333;
.category-title{ .category-title{
@ -219,6 +333,41 @@
padding: 0rpx 20rpx; padding: 0rpx 20rpx;
box-sizing: border-box; box-sizing: border-box;
} }
} }
.header {
padding: 30rpx;
font-size: 30rpx;
color: #333;
}
.item {
padding: 10rpx 20rpx;
&-title {
.text {
font-weight: 700;
font-size: 32rpx;
color: #111;
}
}
&-content {
padding: 20rpx 0;
.text {
line-height: 48rpx;
font-size: 30rpx;
color: #111;
/* #ifndef APP-NVUE */
word-break: break-all;
/* #endif */
}
}
}
.gap {
padding: 0 30rpx;
}
</style> </style>

+ 134
- 0
pages/index/test-vtabs.vue View File

@ -0,0 +1,134 @@
<template>
<view class="content">
<view
style="height: 100rpx;background: #ecf5ff;color: #909193;display: flex;justify-content: center;text-align: center;">
<text style="font-size: 28rpx;">欢迎使用多功能组件uv-vtabs这是头部内容有头部内容必须传hdHeight参数</text>
</view>
<uv-vtabs :chain="chain" :list="list" :height="height" hdHeight="100rpx" @change="change">
<template v-for="(item, index) in list">
<uv-vtabs-item :index="index" :key="index">
<view class="item" v-for="(item2, index2) in item.childrens" :key="index2">
<view class="item-title">
<text class="text">{{ item2.name }}</text>
</view>
<view class="item-content">
<text class="text">{{ item2.desc }}</text>
</view>
</view>
<view class="gap" v-if="index < list.length - 1">
<uv-gap bg-color="#f1f1f1" height="4"></uv-gap>
</view>
</uv-vtabs-item>
</template>
<uv-gap bg-color="#fff" height="600"></uv-gap>
</uv-vtabs>
</view>
</template>
<script>
const getList = [{
name: 'uv-ui简介',
childrens: [{
name: 'uv-ui简介',
desc: '1. uv-ui最初是在uview2.x的基础上进行改进优化,支持vue3等优化,最重要的是支持单独导入直接使用,无需在main.js中进行配置。\n\n2. uv-ui来源于社区,也回归到社区,正是有一群热爱uni-app生态的同学推着它前行,而我们也一如既往的承诺,uv-ui永久开源,永远免费。但是会在下载处进行广告配置,作为开发团队的研发费用的部分来源,所以希望大家理解。'
}]
}, {
name: 'uv-ui特点',
childrens: [{
name: '全端兼容',
desc: 'uv-ui支持App(vue)、App(nvue)、H5、小程序、VUE2、VUE3,支持nvue原生渲染。uv-ui的组件都是多端自适应的,底层会抹平很多小程序平台的差异或bug。'
}, {
name: '集成工具',
desc: 'uv-ui中的uv-ui-tools组件集成了强大的网络请求 HTTP 及常用的工具函数,无需自己再去寻找,并且直接挂载在uni上面,方便使用,只需要在mian.js中引入即可,更多工具请参考:https://www.uvui.cn/js/http.html。使用方式请参考:https://www.uvui.cn/components/setting.html。'
}, {
name: '主题扩展',
desc: 'uv-ui中的uv-ui-tools组件下面的theme.scss为主题文件,直接在uni.scss中引入主题即可,可以根据自己的需求进行扩展。下面也有说明具体使用方式。使用方法请参考:https://www.uvui.cn/components/setting.html'
}]
}, {
name: '更新日志',
badge: {
show: true,
value: 5
},
childrens: [{
name: '更新日志',
desc: 'uv-ui的重大更新在更新日志中都有所说明,如果在开发的过程中遇到文档不完善,可以提供给我们,我们会持续完善,非常感谢大家的支持。更新日志:https://www.uvui.cn/components/changelog.html'
}]
}, {
name: '设计规范',
childrens: [{
name: '设计规范',
desc: '为了约束合成更多优秀的组件和模板,打造优质的体验,我们拟定了一些UI界面设计和建议。同时部分之间会有依赖,这是为了减少代码冗余的同时提高开发效率,模块化是我们的基础。如果大家有好的建议,可以提出进行改进。'
}]
}, {
name: '交流反馈',
childrens: [{
name: '交流反馈',
desc: 'uv-ui为采用MIT许可证的开源项目,使用完全免费。欢迎加QQ群交流反馈,一起学习,共同进步。QQ群: 549833913'
}]
}]
export default {
data() {
return {
list: [],
chain: true
}
},
computed: {
height() {
return uni.getSystemInfoSync().windowHeight - uni.upx2px(100);
}
},
onReady() {
//
uni.showLoading({
title: '加载中'
})
setTimeout(() => {
this.list = getList;
uni.hideLoading();
}, 500)
},
methods: {
change(index) {
console.log('选项改变:', index)
}
}
}
</script>
<style scoped lang="scss">
.header {
padding: 30rpx;
font-size: 30rpx;
color: #333;
}
.item {
padding: 10rpx 20rpx;
&-title {
.text {
font-weight: 700;
font-size: 32rpx;
color: #111;
}
}
&-content {
padding: 20rpx 0;
.text {
line-height: 48rpx;
font-size: 30rpx;
color: #111;
/* #ifndef APP-NVUE */
word-break: break-all;
/* #endif */
}
}
}
.gap {
padding: 0 30rpx;
}
</style>

+ 207
- 207
pages_order/auth/loginAndRegisterAndForgetPassword.vue View File

@ -4,9 +4,9 @@
<view class="frame"> <view class="frame">
<!-- 登录和注册 --> <!-- 登录和注册 -->
<view class="loginRegister" v-if='titleIndex!=2'>
<view class="loginRegister" v-if='titleIndex != 2'>
<!-- 标题 --> <!-- 标题 -->
<view class="title">{{titleList[titleIndex]}}</view>
<view class="title">{{ titleList[titleIndex] }}</view>
<!-- 头像 --> <!-- 头像 -->
<view class="userIamge"> <view class="userIamge">
@ -18,12 +18,12 @@
<!-- 用户名&密码&隐私条款 --> <!-- 用户名&密码&隐私条款 -->
<view class="form"> <view class="form">
<view> <view>
<uv-input v-model="form.account" placeholder="请输入账号" border="surround" shape='circle'
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
<uv-input v-model="form.account" placeholder="请输入账号" border="surround" shape='circle' clearable
:customStyle="{ backgroundColor: '#f6f6f6' }"></uv-input>
</view> </view>
<view> <view>
<uv-input v-model="form.password" password placeholder="请输入密码" border="surround" shape='circle' <uv-input v-model="form.password" password placeholder="请输入密码" border="surround" shape='circle'
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
clearable :customStyle="{ backgroundColor: '#f6f6f6' }"></uv-input>
</view> </view>
<view> <view>
<uv-checkbox-group v-model="checkboxValue" shape="circle"> <uv-checkbox-group v-model="checkboxValue" shape="circle">
@ -31,7 +31,7 @@
<view style="display: flex;flex-wrap: wrap;"> <view style="display: flex;flex-wrap: wrap;">
<uv-checkbox size="30rpx" :name="1"></uv-checkbox> <uv-checkbox size="30rpx" :name="1"></uv-checkbox>
请你阅读并同意我们的<span style="color: #fd5100" 请你阅读并同意我们的<span style="color: #fd5100"
@click="$refs.popup.open('getPrivacyPolicy')">隐私条款</span><span
@click="$refs.popup.open('getPrivacyPolicy')">隐私条款</span><span
style="color: #fd5100" style="color: #fd5100"
@click="$refs.popup.open('getUserAgreement')">服务协议</span> @click="$refs.popup.open('getUserAgreement')">服务协议</span>
</view> </view>
@ -44,20 +44,20 @@
</view> </view>
<!-- 忘记密码 --> <!-- 忘记密码 -->
<view class='forgetPassword' v-if='titleIndex==2'>
<view class='forgetPassword' v-if='titleIndex == 2'>
<!-- 标题 --> <!-- 标题 -->
<view class="title">{{titleList[titleIndex]}}</view>
<view class="title">{{ titleList[titleIndex] }}</view>
<!-- 表单 --> <!-- 表单 -->
<view class="form1"> <view class="form1">
<view class="userName"> <view class="userName">
<uv-input v-model="form1.userName" placeholder="请输入手机号/用户/邮箱" border="surround" shape='circle' <uv-input v-model="form1.userName" placeholder="请输入手机号/用户/邮箱" border="surround" shape='circle'
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
clearable :customStyle="{ backgroundColor: '#f6f6f6' }"></uv-input>
</view> </view>
<view class="code"> <view class="code">
<view class="left"> <view class="left">
<uv-input v-model="form1.code" placeholder="请输入验证码" border="surround" shape='circle' <uv-input v-model="form1.code" placeholder="请输入验证码" border="surround" shape='circle'
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
clearable :customStyle="{ backgroundColor: '#f6f6f6' }"></uv-input>
</view> </view>
<view class="right"> <view class="right">
<view> <view>
@ -65,29 +65,28 @@
<uv-code :seconds="seconds" @end="end" @start="start" ref="code" <uv-code :seconds="seconds" @end="end" @start="start" ref="code"
@change="codeChange"></uv-code> @change="codeChange"></uv-code>
<uv-button @tap="getCode" iconSize='10rpx' color='#fd5100' <uv-button @tap="getCode" iconSize='10rpx' color='#fd5100'
shape='circle'>{{tips}}</uv-button>
shape='circle'>{{ tips }}</uv-button>
</view> </view>
</view> </view>
</view> </view>
<view class="password1"> <view class="password1">
<uv-input v-model="form1.password1" placeholder="设置您的新密码(6到50个字符)" password clearable <uv-input v-model="form1.password1" placeholder="设置您的新密码(6到50个字符)" password clearable
border="surround" shape='circle' :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
border="surround" shape='circle' :customStyle="{ backgroundColor: '#f6f6f6' }"></uv-input>
</view> </view>
<view class="password2"> <view class="password2">
<uv-input v-model="form1.password2" placeholder="重新确认密码" password clearable border="surround" <uv-input v-model="form1.password2" placeholder="重新确认密码" password clearable border="surround"
shape='circle' :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
shape='circle' :customStyle="{ backgroundColor: '#f6f6f6' }"></uv-input>
</view> </view>
</view> </view>
</view> </view>
<!-- 按钮 --> <!-- 按钮 -->
<view class="btn"
@click="submit">
<button class='a'>{{titleList[titleIndex]}}</button>
<view class="btn" @click="submit">
<button class='a'>{{ titleList[titleIndex] }}</button>
</view> </view>
<!-- tab --> <!-- tab -->
<!-- <view class="bottomTab"> <!-- <view class="bottomTab">
<span :class="titleIndex==0 ? 'tabbarItemActive' : 'tabbarItemNoActive'" <span :class="titleIndex==0 ? 'tabbarItemActive' : 'tabbarItemNoActive'"
@ -99,7 +98,7 @@
<span :class="titleIndex==2 ? 'tabbarItemActive' : 'tabbarItemNoActive'" <span :class="titleIndex==2 ? 'tabbarItemActive' : 'tabbarItemNoActive'"
@click='changePage(2)'>忘记密码</span> @click='changePage(2)'>忘记密码</span>
</view> --> </view> -->
</view> </view>
@ -109,239 +108,240 @@
</template> </template>
<script> <script>
import configPopup from '@/components/config/configPopup.vue';
export default {
components: {
configPopup
},
onLoad(option) {
this.titleIndex = option.index || 1
},
data() {
return {
titleIndex: 0,
titleList: ['注册', '登录', '重置密码'],
checkboxValue: [],
form: {
account: '13135294009',
password: 'lzx123456',
},
form1: {
userName: '',
code: '',
password1: '',
password2: '',
},
tips: '获取验证码',
seconds: 60,
}
},
methods: {
submit(){
if(!this.checkboxValue.length){
return uni.showToast({
title: '请先同意隐私协议',
icon:'none'
})
}
if(this.$utils.verificationAll(this.form, {
account: '请输入账号',
password: '请输入密码',
})){
return
}
this.$store.commit('accountLogin', this.form)
import configPopup from '@/components/config/configPopup.vue';
export default {
components: {
configPopup
},
onLoad(option) {
this.titleIndex = option.index || 1
},
data() {
return {
titleIndex: 0,
titleList: ['注册', '登录', '重置密码'],
checkboxValue: [],
form: {
account: '13135294009',
password: 'lzx123456',
}, },
//
changePage(index) {
this.titleIndex = index
form1: {
userName: '',
code: '',
password1: '',
password2: '',
}, },
tips: '获取验证码',
seconds: 60,
}
},
methods: {
submit() {
if (!this.checkboxValue.length) {
return uni.showToast({
title: '请先同意隐私协议',
icon: 'none'
})
}
confirm() {
if (this.$utils.verificationAll(this.form, {
account: '请输入账号',
password: '请输入密码',
})) {
return
}
},
codeChange(text) {
this.tips = text;
},
getCode() {
if (this.$refs.code.canGetCode) {
//
uni.showLoading({
title: '正在获取验证码'
})
setTimeout(() => {
uni.hideLoading();
// this.start()
uni.$uv.toast('验证码已发送');
//
this.$refs.code.start();
}, 2000);
} else {
uni.$uv.toast('请勿重复发送');
}
},
end() {
// uni.$uv.toast('');
},
start() {
// uni.$uv.toast('');
this.$store.commit('accountLogin', this.form)
},
//
changePage(index) {
this.titleIndex = index
},
confirm() {
},
codeChange(text) {
this.tips = text;
},
getCode() {
if (this.$refs.code.canGetCode) {
//
uni.showLoading({
title: '正在获取验证码'
})
setTimeout(() => {
uni.hideLoading();
// this.start()
uni.$uv.toast('验证码已发送');
//
this.$refs.code.start();
}, 2000);
} else {
uni.$uv.toast('请勿重复发送');
} }
},
end() {
// uni.$uv.toast('');
},
start() {
// uni.$uv.toast('');
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
* {
box-sizing: border-box;
}
* {
box-sizing: border-box;
}
.refundsOrExchange {
background-color: #FFF;
height: 100vh;
.refundsOrExchange {
.frame {
background-color: #FFF; background-color: #FFF;
height: 100vh;
.frame {
background-color: #FFF;
.loginRegister {
.loginRegister {
display: flex;
flex-direction: column;
gap: 40rpx;
.title {
display: flex; display: flex;
flex-direction: column;
gap: 40rpx;
justify-content: center;
align-items: flex-end;
height: 10vh;
color: #000;
font-size: 40rpx;
font-weight: 700;
}
.title {
display: flex;
justify-content: center;
align-items: flex-end;
height: 10vh;
color: #000;
font-size: 40rpx;
font-weight: 700;
.userIamge {
display: flex;
justify-content: center;
height: 10vh;
>view:nth-of-type(1) {
width: 25%;
height: 100%;
border-radius: 50%;
overflow: hidden;
} }
}
.userIamge {
display: flex;
justify-content: center;
height: 10vh;
.form {
line-height: 50rpx;
>view:nth-of-type(1) {
width: 25%;
height: 100%;
border-radius: 50%;
overflow: hidden;
}
>view:nth-of-type(1) {
padding: 20rpx 100rpx;
} }
.form {
line-height: 50rpx;
>view:nth-of-type(1) {
padding: 20rpx 100rpx;
}
>view:nth-of-type(2) {
padding: 0 100rpx;
}
>view:nth-of-type(2) {
padding: 0 100rpx;
}
>view:nth-of-type(3) {
display: flex;
padding: 30rpx 100rpx 0 100rpx;
font-size: 22rpx
}
>view:nth-of-type(3) {
display: flex;
padding: 30rpx 100rpx 0 100rpx;
font-size: 22rpx
} }
} }
.btn {
// height: 5vh;
}
.btn {
// height: 5vh;
display: flex;
justify-content: center;
margin: 90rpx 0 0 0;
.a {
display: flex; display: flex;
justify-content: center; justify-content: center;
margin: 90rpx 0 0 0;
.a {
display: flex;
justify-content: center;
align-items: center;
width: 70%;
height: 80rpx;
color: #FFF;
background-color: $uni-color;
border: 1px solid red;
border-radius: 100rpx;
font-size: 30rpx;
}
align-items: center;
width: 70%;
height: 80rpx;
color: #FFF;
background-color: $uni-color;
border: 1px solid red;
border-radius: 100rpx;
font-size: 30rpx;
}
}
.bottomTab {
display: flex;
justify-content: space-between;
height: 10vh;
padding: 0 80rpx;
margin-top: 30rpx;
.tabbarItemActive {
color: $uni-color;
}
.tabbarItemNoActive {
color: #9c9fa4;
} }
.bottomTab {
}
.forgetPassword {
padding: 100rpx 40rpx 0 40rpx;
.title {
display: flex; display: flex;
justify-content: space-between;
justify-content: center;
align-items: flex-end;
height: 10vh; height: 10vh;
padding: 0 80rpx;
margin-top: 30rpx;
.tabbarItemActive {
color: $uni-color;
}
.tabbarItemNoActive {
color: #9c9fa4;
}
color: #000;
font-size: 40rpx;
font-weight: 700;
} }
.forgetPassword {
padding: 100rpx 40rpx 0 40rpx;
.form1 {
display: flex;
flex-direction: column;
gap: 30rpx;
margin-top: 20rpx;
padding: 20rpx 80rpx;
.title {
display: flex;
justify-content: center;
align-items: flex-end;
height: 10vh;
color: #000;
font-size: 40rpx;
font-weight: 700;
.userName {
// padding: 20rpx 100 rpx;
} }
.form1 {
.code {
display: flex; display: flex;
flex-direction: column;
gap: 30rpx;
margin-top: 20rpx;
padding: 20rpx 80rpx;
width: 100%;
.userName {
// padding: 20rpx 100 rpx;
.left {
width: 55%;
} }
.code {
display: flex;
width: 100%;
.left {
width: 55%;
}
.right {
width: 45%;
height: 100%;
.right {
width: 45%;
height: 100%;
>view:nth-of-type(1) {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
}
>view:nth-of-type(1) {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
} }
} }
}
.password1 {}
.password1 {}
.password2 {}
}
.password2 {}
} }
} }
}
}
}
</style> </style>

+ 47
- 29
pages_order/auth/wxLogin.vue View File

@ -4,10 +4,17 @@
<image :src="configList.logo_image" mode=""></image> <image :src="configList.logo_image" mode=""></image>
</view> </view>
<view class="title">
<!-- <view class="title">
欢迎使用{{ configList.logo_name }} 欢迎使用{{ configList.logo_name }}
</view> -->
<view class="title">
<!-- 欢迎使用{{ configList.logo_name }} -->
敢为人鲜
</view> </view>
<view class="btn mt" <view class="btn mt"
@click="wxLogin"> @click="wxLogin">
<!-- <view class="icon"> <!-- <view class="icon">
@ -21,7 +28,7 @@
<view class="btn b2" <view class="btn b2"
@click="qux"> @click="qux">
取消登录 取消登录
</view>
<view class="config"> <view class="config">
<uv-checkbox-group <uv-checkbox-group
@ -29,21 +36,24 @@
shape="circle"> shape="circle">
<view class="content"> <view class="content">
<view <view
style="display: flex;">
<uv-checkbox
size="40rpx"
icon-size="30rpx"
activeColor="#E3441A"
:name="1"
></uv-checkbox>
阅读并同意我们的<text @click="$refs.popup.open('user_xy')">用户协议</text>
style="display: flex; align-items: start;">
<uv-checkbox
size="34rpx"
icon-size="26rpx"
activeColor="#019245"
:name="1"
style="margin-top: 6rpx;"
></uv-checkbox>
<text class="text-privacy">阅读并同意我们的<text @click="$refs.popup.open('user_xy')">服务协议与隐私条款</text>以及<text @click="$refs.popup.open('user_ys')">个人信息保护指引</text></text>
</view> </view>
<view class="">
<!-- <view class="">
以及<text @click="$refs.popup.open('user_ys')">隐私政策</text> 以及<text @click="$refs.popup.open('user_ys')">隐私政策</text>
</view>
</view> -->
</view> </view>
</uv-checkbox-group> </uv-checkbox-group>
</view> </view>
</view>
<configPopup ref="popup"></configPopup> <configPopup ref="popup"></configPopup>
@ -61,10 +71,10 @@
}, },
onLoad(query) { onLoad(query) {
if (query.shareId) { if (query.shareId) {
uni.setStorageSync('shareId', query.shareId)
uni.setStorageSync('shareId', query.shareId) // Id
} }
if(query.path){ if(query.path){
this.config = query
this.config = query //
} }
}, },
methods: { methods: {
@ -132,13 +142,11 @@
all: unset; all: unset;
width: 80%; width: 80%;
height: 100rpx; height: 100rpx;
background-color: $uni-color;
color: #fff;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin: 20rpx 0; margin: 20rpx 0;
border-radius: 20rpx;
border-radius: 50rpx;
border: none; border: none;
&::after{ &::after{
@ -152,22 +160,32 @@
} }
} }
.b2{ .b2{
background-color: rgba($uni-color, 0.2);
color: $uni-color;
// background-color: rgba($uni-color, 0.2);
color: #999;
border: 2rpx solid;
position: relative;
.config{
position: absolute;
bottom: -110%;
font-size: 24rpx;
text-align: center;
line-height: 40rpx;
width: 100%;
.text-privacy{
color: inherit;
text-align: left;
}
text{
color: $uni-color;
}
}
} }
.mt{ .mt{
color: #fff;
background-color: $uni-color;
margin-top: 200rpx; margin-top: 200rpx;
} }
.config{
position: absolute;
bottom: 0;
font-size: 24rpx;
text-align: center;
line-height: 40rpx;
text{
color: $uni-color;
}
}
} }
</style> </style>

BIN
static/image/中森明菜.webp View File

Before After

+ 4
- 1
store/store.js View File

@ -153,16 +153,19 @@ const store = new Vuex.Store({
if(reLaunch){ if(reLaunch){
uni.reLaunch({ uni.reLaunch({
url: '/pages/index/index'
url: '/pages/index/category'
}) })
} }
}, },
getQrCode(state) { getQrCode(state) {
let that = this; let that = this;
// 注释掉登录检查
/*
if(!uni.getStorageSync('token')){ if(!uni.getStorageSync('token')){
return return
} }
*/
uni.getImageInfo({ uni.getImageInfo({
src: `${Vue.prototype.$config.baseUrl}/info_common/getInviteCode?token=${uni.getStorageSync('token')}`, src: `${Vue.prototype.$config.baseUrl}/info_common/getInviteCode?token=${uni.getStorageSync('token')}`,
success : res => { success : res => {


+ 4
- 1
uni.scss View File

@ -12,7 +12,7 @@
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量同时无需 import 这个文件 * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量同时无需 import 这个文件
*/ */
/* 颜色变量 */ /* 颜色变量 */
$uni-color: #eb3300;
$uni-color: #019245;
/* 行为相关颜色 */ /* 行为相关颜色 */
$uni-color-primary: #007aff; $uni-color-primary: #007aff;
@ -75,6 +75,9 @@ $uni-font-size-subtitle:26px;
$uni-color-paragraph: #3F536E; // 文章段落颜色 $uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:15px; $uni-font-size-paragraph:15px;
// 更改uv插件的主要颜色位主题颜色
$uv-primary: $uni-color;
.uni-color-btn{ .uni-color-btn{
border-radius: 40rpx; border-radius: 40rpx;


+ 8
- 4
uni_modules/uv-ui-tools/libs/util/route.js View File

@ -30,7 +30,7 @@ class Router {
mixinParam(url, params) { mixinParam(url, params) {
url = url && this.addRootPath(url) url = url && this.addRootPath(url)
// 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
// 使用正则匹配,主要依据是判断是否有"/","?","="等,如"page/index/index?name=mary"
// 如果有url中有get参数,转换后无需带上"?" // 如果有url中有get参数,转换后无需带上"?"
let query = '' let query = ''
if (/.*\/.*\?.*=.*/.test(url)) { if (/.*\/.*\?.*=.*/.test(url)) {
@ -61,13 +61,13 @@ class Router {
// 如果本次跳转的路径和本页面路径一致,不执行跳转,防止用户快速点击跳转按钮,造成多次跳转同一个页面的问题 // 如果本次跳转的路径和本页面路径一致,不执行跳转,防止用户快速点击跳转按钮,造成多次跳转同一个页面的问题
if (mergeConfig.url === page()) return if (mergeConfig.url === page()) return
if (params.intercept) {
mergeConfig.intercept = params.intercept
}
// params参数也带给拦截器 // params参数也带给拦截器
mergeConfig.params = params mergeConfig.params = params
// 合并内外部参数 // 合并内外部参数
mergeConfig = deepMerge(this.config, mergeConfig) mergeConfig = deepMerge(this.config, mergeConfig)
// 注释掉拦截器逻辑,直接执行跳转
/*
// 判断用户是否定义了拦截器 // 判断用户是否定义了拦截器
if (typeof mergeConfig.intercept === 'function') { if (typeof mergeConfig.intercept === 'function') {
// 定一个promise,根据用户执行resolve(true)或者resolve(false)来决定是否进行路由跳转 // 定一个promise,根据用户执行resolve(true)或者resolve(false)来决定是否进行路由跳转
@ -79,6 +79,10 @@ class Router {
} else { } else {
this.openPage(mergeConfig) this.openPage(mergeConfig)
} }
*/
// 直接执行页面跳转,不进行拦截
this.openPage(mergeConfig)
} }
// 执行路由跳转 // 执行路由跳转


+ 1
- 1
utils/utils.js View File

@ -200,7 +200,7 @@ export function navigateTo(...args){
export function navigateBack(num = -1){ export function navigateBack(num = -1){
if(getCurrentPages().length == 1){ if(getCurrentPages().length == 1){
uni.reLaunch({ uni.reLaunch({
url: '/pages/index/index'
url: '/pages/index/category'
}) })
return return
} }


Loading…
Cancel
Save