From 5457b86e0a34fe0962e24c48ab3d63f67b28bcd0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=85=A8=E6=A0=88=E5=B0=8F=E5=AD=A6=E7=94=9F?=
<1518079521@qq.com>
Date: Fri, 22 Nov 2024 15:12:45 +0800
Subject: [PATCH] up
---
uni-app/src/App.vue | 29 +-
.../src/addon/components/diy/group/index.vue | 5 +-
.../addon/components/diy/group/useDiyGroup.ts | 7 +-
uni-app/src/app/api/auth.ts | 10 +-
uni-app/src/app/api/member.ts | 3 +
uni-app/src/app/api/system.ts | 6 +-
.../app/components/diy/active-cube/index.vue | 67 ++-
.../components/diy/carousel-search/index.vue | 264 +++++++---
.../app/components/diy/graphic-nav/index.vue | 271 ++++++----
.../app/components/diy/member-level/index.vue | 68 ++-
.../src/app/components/diy/notice/index.vue | 33 +-
.../app/components/diy/picture-show/index.vue | 135 +++++
uni-app/src/app/pages/auth/index.vue | 2 +-
uni-app/src/app/pages/auth/login.vue | 2 +-
uni-app/src/app/pages/member/address_edit.vue | 1 -
.../src/app/pages/member/apply_cash_out.vue | 3 +-
.../pages/member/location_address_edit.vue | 247 ----------
uni-app/src/app/pages/member/sign_in.vue | 4 +-
uni-app/src/app/pages/pay/browser.vue | 2 +-
.../mescroll/hooks/useMescrollComp.js | 56 ---
.../mescroll/hooks/useMescrollMore.js | 69 ---
.../beibei/components/mescroll-down.css | 47 --
.../beibei/components/mescroll-down.vue | 39 --
.../mescroll-diy/beibei/mescroll-body.vue | 360 --------------
.../beibei/mescroll-uni-option.js | 51 --
.../mescroll-diy/beibei/mescroll-uni.vue | 437 -----------------
.../xinlang/components/mescroll-down.css | 44 --
.../xinlang/components/mescroll-down.vue | 53 --
.../xinlang/components/mescroll-up.css | 32 --
.../xinlang/components/mescroll-up.vue | 40 --
.../mescroll-diy/xinlang/mescroll-body.vue | 380 --------------
.../xinlang/mescroll-uni-option.js | 66 ---
.../mescroll-diy/xinlang/mescroll-uni.vue | 462 ------------------
.../components/select-date/select-date.vue | 6 +-
uni-app/src/components/sms-code/sms-code.vue | 2 +-
.../src/components/top-tabbar/top-tabbar.vue | 184 +++----
uni-app/src/hooks/useLocation.ts | 207 ++++++++
uni-app/src/hooks/useLogin.ts | 15 +-
uni-app/src/locale/zh-Hans.json | 2 +
uni-app/src/manifest.json | 8 +-
uni-app/src/stores/config.ts | 13 +-
uni-app/src/stores/system.ts | 52 +-
uni-app/src/styles/common.scss | 2 +-
uni-app/src/styles/iconfont.css | 26 +-
uni-app/src/styles/official-iconfont.css | 14 +-
uni-app/src/utils/common.ts | 45 +-
uni-app/src/utils/request.ts | 2 +-
uni-app/src/utils/wechat.ts | 24 +-
48 files changed, 1076 insertions(+), 2821 deletions(-)
create mode 100644 uni-app/src/app/components/diy/picture-show/index.vue
delete mode 100644 uni-app/src/app/pages/member/location_address_edit.vue
delete mode 100644 uni-app/src/components/mescroll/hooks/useMescrollComp.js
delete mode 100644 uni-app/src/components/mescroll/hooks/useMescrollMore.js
delete mode 100644 uni-app/src/components/mescroll/mescroll-diy/beibei/components/mescroll-down.css
delete mode 100644 uni-app/src/components/mescroll/mescroll-diy/beibei/components/mescroll-down.vue
delete mode 100644 uni-app/src/components/mescroll/mescroll-diy/beibei/mescroll-body.vue
delete mode 100644 uni-app/src/components/mescroll/mescroll-diy/beibei/mescroll-uni-option.js
delete mode 100644 uni-app/src/components/mescroll/mescroll-diy/beibei/mescroll-uni.vue
delete mode 100644 uni-app/src/components/mescroll/mescroll-diy/xinlang/components/mescroll-down.css
delete mode 100644 uni-app/src/components/mescroll/mescroll-diy/xinlang/components/mescroll-down.vue
delete mode 100644 uni-app/src/components/mescroll/mescroll-diy/xinlang/components/mescroll-up.css
delete mode 100644 uni-app/src/components/mescroll/mescroll-diy/xinlang/components/mescroll-up.vue
delete mode 100644 uni-app/src/components/mescroll/mescroll-diy/xinlang/mescroll-body.vue
delete mode 100644 uni-app/src/components/mescroll/mescroll-diy/xinlang/mescroll-uni-option.js
delete mode 100644 uni-app/src/components/mescroll/mescroll-diy/xinlang/mescroll-uni.vue
create mode 100644 uni-app/src/hooks/useLocation.ts
diff --git a/uni-app/src/App.vue b/uni-app/src/App.vue
index 40acd9300..edac432ef 100644
--- a/uni-app/src/App.vue
+++ b/uni-app/src/App.vue
@@ -118,7 +118,20 @@
if (memberInfo && memberInfo.wx_openid) {
uni.setStorageSync('openid', memberInfo.wx_openid)
} else {
- data.query.code ? login.updateOpenid(data.query.code) : login.getAuthCode({ scopes: 'snsapi_userinfo' })
+ if (data.query.code) {
+ // 检测身份是否合法(当前登录的账号是不是我的),openid有效后才能更新登录
+ login.updateOpenid(data.query.code, () => {
+ login.authLogin({ code: data.query.code })
+ })
+ } else {
+ if (loginConfig.is_force_access_user_info) {
+ // 强制获取用户信息
+ login.getAuthCode({ scopes: 'snsapi_userinfo' })
+ } else {
+ // 静默获取
+ login.getAuthCode({ scopes: 'snsapi_base' })
+ }
+ }
}
}
// #endif
@@ -160,12 +173,22 @@
if (uni.getStorageSync('autoLoginLock') && !uni.getStorageSync('wechat_login_back')) return;
if (loginConfig.is_auth_register || uni.getStorageSync('wechat_login_back')) {
uni.removeStorageSync('wechat_login_back') // 删除微信公众号手动授权登录回调标识
- data.query.code ? login.authLogin({ code: data.query.code }) : login.getAuthCode({ scopes: 'snsapi_userinfo' })
+ if (data.query.code) {
+ login.authLogin({ code: data.query.code })
+ } else {
+ if (loginConfig.is_force_access_user_info) {
+ // 强制获取用户信息
+ login.getAuthCode({ scopes: 'snsapi_userinfo' })
+ } else {
+ // 静默获取
+ login.getAuthCode({ scopes: 'snsapi_base' })
+ }
+ }
}
}
// #endif
}
- });
+ })
})
diff --git a/uni-app/src/addon/components/diy/group/index.vue b/uni-app/src/addon/components/diy/group/index.vue
index dcde152f4..00ce92e25 100644
--- a/uni-app/src/addon/components/diy/group/index.vue
+++ b/uni-app/src/addon/components/diy/group/index.vue
@@ -49,6 +49,9 @@
+
+
+
@@ -91,4 +94,4 @@
\ No newline at end of file
+
diff --git a/uni-app/src/addon/components/diy/group/useDiyGroup.ts b/uni-app/src/addon/components/diy/group/useDiyGroup.ts
index ab06d45a4..efc1fae26 100644
--- a/uni-app/src/addon/components/diy/group/useDiyGroup.ts
+++ b/uni-app/src/addon/components/diy/group/useDiyGroup.ts
@@ -3,7 +3,6 @@ import Sortable from 'sortablejs';
import { range } from 'lodash-es';
import { onPageScroll, onHide, onShow } from '@dcloudio/uni-app';
import useDiyStore from '@/app/stores/diy';
-import { getLocation } from '@/utils/common';
export function useDiyGroup(params: any = {}) {
@@ -89,11 +88,7 @@ export function useDiyGroup(params: any = {}) {
nextTick(() => {
setTimeout(() => {
- if (data.value.global && data.value.global.topStatusBar && data.value.global.topStatusBar.style == 'style-4') {
- // 第一次获取经纬度
- getLocation()
- }
-
+
// 初始化组件滚动值
scrollVal = uni.getStorageSync('componentsScrollValGroup');
if (scrollVal) {
diff --git a/uni-app/src/app/api/auth.ts b/uni-app/src/app/api/auth.ts
index f016ff99e..c599f089c 100644
--- a/uni-app/src/app/api/auth.ts
+++ b/uni-app/src/app/api/auth.ts
@@ -4,6 +4,9 @@ import request from '@/utils/request'
* 用户名登录
*/
export function usernameLogin(data : AnyObject) {
+ if(uni.getStorageSync('pid')){
+ data.pid = uni.getStorageSync('pid');
+ }
return request.get('login', data, { showErrorMessage: true })
}
@@ -11,14 +14,17 @@ export function usernameLogin(data : AnyObject) {
* 手机验证码登录
*/
export function mobileLogin(data : AnyObject) {
+ if(uni.getStorageSync('pid')){
+ data.pid = uni.getStorageSync('pid');
+ }
return request.post('login/mobile', data, { showErrorMessage: true })
}
/**
* 获取登录配置
*/
-export function getConfig() {
- return request.get('login/config')
+export function getConfig(params: Record) {
+ return request.get('login/config', params)
}
/**
diff --git a/uni-app/src/app/api/member.ts b/uni-app/src/app/api/member.ts
index d34b3fb12..26e6169fa 100644
--- a/uni-app/src/app/api/member.ts
+++ b/uni-app/src/app/api/member.ts
@@ -47,6 +47,9 @@ export function modifyMember(data : AnyObject) {
* 登录会员绑定手机号
*/
export function bindMobile(data : AnyObject) {
+ if(uni.getStorageSync('pid')){
+ data.pid = uni.getStorageSync('pid');
+ }
return request.put('member/mobile', data, { showErrorMessage: true })
}
diff --git a/uni-app/src/app/api/system.ts b/uni-app/src/app/api/system.ts
index 9cf548e22..4f76dc6aa 100644
--- a/uni-app/src/app/api/system.ts
+++ b/uni-app/src/app/api/system.ts
@@ -45,7 +45,7 @@ export function sendSms(data: AnyObject) {
/**
* 获取微信jssdk config
*/
-export function getWechatSkdConfig(data: AnyObject) {
+export function getWechatSdkConfig(data: AnyObject) {
return request.get('wechat/jssdkconfig', data, { showErrorMessage: false })
}
@@ -142,6 +142,6 @@ export function getMsgJumpPath(params: Record) {
/**
* 获取初始化数据信息
*/
-export function getInitInfo() {
- return request.get('init')
+export function getInitInfo(params: Record) {
+ return request.get('init', params)
}
\ No newline at end of file
diff --git a/uni-app/src/app/components/diy/active-cube/index.vue b/uni-app/src/app/components/diy/active-cube/index.vue
index 090837d06..9eca35d3f 100644
--- a/uni-app/src/app/components/diy/active-cube/index.vue
+++ b/uni-app/src/app/components/diy/active-cube/index.vue
@@ -3,7 +3,7 @@
-
+
{{ diyComponent.text }}
{{ diyComponent.subTitle.text }}
@@ -27,10 +27,17 @@
+
+
+
+
+
+ {{ diyComponent.subTitle.text }}
+
-
+
{{ item.title.text }}
{{ item.subTitle.text }}
@@ -47,12 +54,13 @@
-
+
+
- {{ item.title.text }}
- {{ item.subTitle.text }}
+ {{ item.title.text }}
+ {{ item.subTitle.text }}
- {{ item.moreTitle.text }}
+ {{ item.moreTitle.text }}
@@ -67,7 +75,7 @@
-
+
@@ -83,7 +91,7 @@
-
+
@@ -188,6 +196,18 @@
itemStyle4.value= 'margin-right:14rpx;'
// #endif
};
+
+ // 公共模块颜色
+ const commonTempCss = (data: any)=>{
+ var style = '';
+ if(data.listFrame.startColor && data.listFrame.endColor){
+ style += `background:linear-gradient(${data.listFrame.startColor},${data.listFrame.endColor});`;
+ }else{
+ style += `background:${data.listFrame.startColor || data.listFrame.endColor};`;
+ }
+ return style;
+ }
+
const btnCss = (item:any) => {
var style = '';
style += `background:linear-gradient(90deg,${item.startColor},${item.endColor});`;
@@ -202,18 +222,25 @@
)
onMounted(() => {
- refresh();
- // 装修模式下刷新
- if (diyStore.mode == 'decorate') {
- watch(
- () => diyComponent.value,
- (newValue, oldValue) => {
- if (newValue && newValue.componentName == 'ActiveCube') {
- refresh();
- }
- }
- )
- }
+ refresh();
+ // 装修模式下刷新
+ if (diyStore.mode == 'decorate') {
+ watch(
+ () => diyComponent.value,
+ (newValue, oldValue) => {
+ if (newValue && newValue.componentName == 'ActiveCube') {
+ refresh();
+ }
+ }
+ )
+ } else {
+ watch(
+ () => diyComponent.value,
+ (newValue, oldValue) => {
+ refresh();
+ }
+ )
+ }
});
const instance = getCurrentInstance();
diff --git a/uni-app/src/app/components/diy/carousel-search/index.vue b/uni-app/src/app/components/diy/carousel-search/index.vue
index ac885e2a7..1237d435e 100644
--- a/uni-app/src/app/components/diy/carousel-search/index.vue
+++ b/uni-app/src/app/components/diy/carousel-search/index.vue
@@ -2,62 +2,89 @@
-
-
+
+
-
+
-
- {{isShowSearchPlaceholder ? diyComponent.search.text : ''}}
-
-
+
+ {{isShowSearchPlaceholder ? diyComponent.search.text : ''}}
+
- {{ item.text }}
+ {{ item.text }}
+
+
+
+
+
+
+ {{diyComponent.search.subTitle.text}}
+
+
+
+
+ {{systemStore.diyAddressInfo.city}}
+
+
+ {{systemStore.diyAddressInfo.community}}
+
+ {{ systemStore.defaultPositionAddress }}
+
+ {{isShowSearchPlaceholder ? diyComponent.search.text : ''}}
+
+
+
+ {{ item.text }}
+
+
+
+
首页
-
+
{{ item.text }}
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -73,6 +100,7 @@
@@ -80,7 +108,7 @@
-
+
全部分类
@@ -113,8 +141,11 @@
import { ref, reactive, computed, watch, onMounted, nextTick, getCurrentInstance } from 'vue';
import { img } from '@/utils/common';
import useDiyStore from '@/app/stores/diy';
- import diyGroup from '@/addon/components/diy/group/index.vue'
+ import diyGroup from '@/addon/components/diy/group/index.vue';
import { getDiyInfo } from '@/app/api/diy';
+ import {useLocation} from '@/hooks/useLocation'
+ import useSystemStore from '@/stores/system';
+ const systemStore = useSystemStore();
const instance = getCurrentInstance();
const props = defineProps(['component', 'index', 'pullDownRefreshCount', 'global', 'scrollBool']);
@@ -126,7 +157,18 @@
return props.component;
}
})
-
+
+ /************** 定位-start ****************/
+ let isOpenLocation = false;
+ if(diyComponent.value && diyComponent.value.search.style == 'style-2' && diyStore.mode != 'decorate') {
+ isOpenLocation = true;
+ }
+
+ const locationVal = useLocation(isOpenLocation);
+ locationVal.onLoad();
+ locationVal.init();
+ /************** 定位-end ****************/
+
const warpCss = computed(() => {
var style = '';
if(diyComponent.value.componentStartBgColor) {
@@ -140,6 +182,7 @@
return style;
})
+
watch(
() => props.pullDownRefreshCount,
(newValue, oldValue) => {
@@ -151,36 +194,44 @@
const setModuleLocation = ()=> {
nextTick(() => {
setTimeout(()=>{
- const query = uni.createSelectorQuery().in(instance);
- query.select('.fixed-wrap').boundingClientRect((data:any) => {
- moduleHeight.value = (data.height || 0) + 'px';
- }).exec();
+ if(diyComponent.value.swiper.swiperStyle != 'style-3'){
+ const query = uni.createSelectorQuery().in(instance);
+ query.select('.fixed-wrap').boundingClientRect((data:any) => {
+ moduleHeight.value = (data.height || 0) + 'px';
+ }).exec();
+ }else{
+ moduleHeight.value = '';
+ }
})
- })
+ })
}
const fixedStyleBg = ref(false);
const fixedStyle = computed(()=>{
- if (diyStore.mode == 'decorate') return '';
- var style = '';
+ var style = '';
+ if(diyComponent.value.swiper.swiperStyle == 'style-3'){
+ style += 'position: absolute;z-index: 10;left: 0;right: 0;';
+ }
+ if (diyStore.mode == 'decorate') return style;
+
// #ifdef H5
if(props.global.topStatusBar.isShow && props.global.topStatusBar.style == 'style-4') {
style += 'top:' + diyStore.topTabarHeight + 'px;';
}
// #endif
-
+
if(diyComponent.value.positionWay == 'fixed') {
if (props.scrollBool != undefined && props.scrollBool != -1) {
style += 'position: fixed;z-index: 10;left: 0;right: 0;';
}
-
+
// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
menuButtonInfo = uni.getMenuButtonBoundingClientRect();
if(props.global.topStatusBar.isShow) {
style += 'top:' + diyStore.topTabarHeight + 'px;';
}
// #endif
-
+
fixedStyleBg.value = false;
if (props.scrollBool == 1) {
let str = diyComponent.value.fixedBgColor || "";
@@ -197,6 +248,17 @@
return style;
})
+ // 轮播样式
+ const carouselSwiperStyle = ()=> {
+ let style = "";
+ if(diyComponent.value.swiper.swiperStyle == 'style-3'){
+ // #ifdef MP
+ style = 'padding-top:' + menuButtonInfo.top + 'px;';
+ // #endif
+ }
+ return style;
+ }
+
const getTabColor = (flag:any)=>{
let color = '';
if(flag){
@@ -242,8 +304,8 @@
});
// 轮播样式二
- const swiperStyle2 = computed(()=>{
- var style = diyComponent.value.swiper.swiperStyle == 'style-2' ? true : false;
+ const swiperStyleBool = computed(()=>{
+ var style = diyComponent.value.swiper.swiperStyle == 'style-2' || diyComponent.value.swiper.swiperStyle == 'style-3' ? true : false;
return style;
})
@@ -266,6 +328,14 @@
return style;
})
+ const searchSubTitleCss = computed(() => {
+ var style = '';
+ if (diyComponent.value.search.subTitle.textColor) style += 'color:' + diyComponent.value.search.subTitle.textColor + ';';
+ if (diyComponent.value.search.subTitle.startColor && diyComponent.value.search.subTitle.endColor) style += `background:linear-gradient(${diyComponent.value.search.subTitle.startColor}, ${diyComponent.value.search.subTitle.endColor});`;
+ else style += 'background-color:' + (diyComponent.value.search.subTitle.startColor || diyComponent.value.search.subTitle.endColor) + ';';
+ return style;
+ })
+
const currTabIndex = ref(-1)
const currentSource = ref('')
@@ -312,6 +382,10 @@
}
)
}
+ // 判断让轮播指示器是否出现
+ // #ifdef H5
+ isShowDots.value = diyComponent.value.swiper.list.length > 1 ? true : false;
+ // #endif
// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
@@ -324,15 +398,16 @@
}else if(props.global.topStatusBar){
navbarInnerStyle.value = ''
}
-
+
}
// #endif
-
});
-
+
const refresh = ()=> {
setModuleLocation();
-
+ // 刷新定位
+ locationVal.refresh();
+
changeData({ source : 'home' },-1)
diyComponent.value.swiper.list.forEach((item : any) => {
if (item.imageUrl == '') {
@@ -345,9 +420,9 @@
const diyPageData = reactive({
pageMode: 'diy',
title: '',
- global: {},
+ global: {},
value: []
- })
+ });
const getDiyInfoFn = (id:any) => {
if(!id){
@@ -393,17 +468,17 @@
}
});
}
-
+
// 轮播指示器
let isShowDots = ref(true)
// #ifdef H5
isShowDots.value = true;
// #endif
-
+
// #ifdef MP-WEIXIN
isShowDots.value = false;
// #endif
-
+
/******************************* 存储滚动值-start ***********************/
// 键名和组件名一致即可
let componentsScrollVal = uni.getStorageSync('componentsScrollValGroup')
@@ -416,8 +491,7 @@
}
uni.setStorageSync('componentsScrollValGroup', obj);
}
- /******************************* 存储滚动值-end ***********************/
-
+ /******************************* 存储滚动值-end ***********************/
\ No newline at end of file
+
+ .swiper-style-3{
+ :deep(.uni-swiper-dots-horizontal){
+ bottom: 46rpx !important;
+ }
+ .swiper-dot-box{
+ bottom: 38rpx !important;
+ }
+ }
+
diff --git a/uni-app/src/app/components/diy/graphic-nav/index.vue b/uni-app/src/app/components/diy/graphic-nav/index.vue
index f159f3055..342f53855 100644
--- a/uni-app/src/app/components/diy/graphic-nav/index.vue
+++ b/uni-app/src/app/components/diy/graphic-nav/index.vue
@@ -33,69 +33,33 @@
-
-
-
+
+
+
-
+
-
+
-
-
-
+
-
- {{ item.label.text }}
-
-
-
-
- {{ item.title }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ :style="{ maxWidth: diyComponent.imageSize * 2 + 'rpx', maxHeight: diyComponent.imageSize * 2 + 'rpx', borderRadius: diyComponent.aroundRadius * 2 + 'rpx' }"/>
+
{{ item.label.text }}
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.label.text }}
+
+
+
+ {{ item.title }}
+
+
+
+
-
-
+
+
@@ -172,7 +178,11 @@
return props.component;
}
})
-
+ const shouldShowIndicator = computed(() => {
+ const totalItems = diyComponent.value.list.length // 总项数
+ const itemsPerPage = diyComponent.value.pageCount * diyComponent.value.rowCount // 每页可显示的项数
+ return totalItems > itemsPerPage // 如果总项数大于每页显示的项数,显示指示器
+ })
const warpCss = computed(() => {
var style = '';
style += 'position:relative;';
@@ -209,46 +219,10 @@
return style;
});
-
- // 多行,单行滑动样式
- const horizontalSingleSlideStyle = computed(()=>{
- let style = {width: ""};
- let widthStr = 100 / diyComponent.value.rowCount; // 表示每项宽度
- let itemLen = (parseInt(diyComponent.value.list.length / (diyComponent.value.rowCount*2))*diyComponent.value.rowCount) + (diyComponent.value.list.length%(diyComponent.value.rowCount*2)); // 表示展示几列
- let marginLen = diyComponent.value.margin.both*4
- style.width = `calc(${widthStr * itemLen}vw - ${marginLen}rpx)`;
- return style;
- })
-
- const horizontalSingleSlideBoxStyle = (index: any)=>{
- let style = {width: ""};
- let widthStr = 100 / diyComponent.value.rowCount; // 表示每项宽度
- let marginLen = diyComponent.value.margin.both * 4 / diyComponent.value.rowCount;
- if(parseInt(diyComponent.value.list.length / (diyComponent.value.rowCount*2)) >= (index+1)){
- style.width = `calc(${widthStr * diyComponent.value.rowCount}vw - ${marginLen*diyComponent.value.rowCount}rpx)`;
- }else{
- let len = diyComponent.value.list.length%(diyComponent.value.rowCount*2);
- if(len > diyComponent.value.rowCount){ // 满足了一行,但没有满足于一页
- style.width = `calc(${widthStr * diyComponent.value.rowCount}vw - ${marginLen*diyComponent.value.rowCount}rpx)`;
- }else{
- style.width = `calc(${widthStr * len}vw - ${marginLen * len}rpx)`; // 未满足了一行
- }
- }
- return style;
- }
const horizontalSingleSlideItemStyle = (index: any)=>{
let style = {width: ""};
- if(parseInt(diyComponent.value.list.length / (diyComponent.value.rowCount*2)) >= (index+1)){
- style.width = `${100 / diyComponent.value.rowCount}%`;
- }else{
- let len = diyComponent.value.list.length%(diyComponent.value.rowCount*2);
- if(len > diyComponent.value.rowCount){ // 满足了一行,但没有满足于一页
- style.width = `${100 / diyComponent.value.rowCount}%`;
- }else{
- style.width = `${100 / len}%`; // 未满足了一行
- }
- }
+ style.width = `${100 / diyComponent.value.rowCount}%`;
return style;
}
@@ -268,27 +242,29 @@
const swiperCondition = (index, numItem) => {
let count = diyComponent.value.pageCount * diyComponent.value.rowCount;
let result = true;
-
+
result = index >= [(numItem - 1) * (count)] && index < [numItem * (count)];
return result;
}
- const swiperHeight = ref('');
+ const storageKey = 'graphic_nav_horizontal_page_slide_swiperheight_' + props.index + '_' + diyComponent.value.list.length;
+ const swiperHeight = ref(uni.getStorageSync(storageKey) || '');
const handleData = () => {
- if(diyComponent.value.layout == 'horizontal' && diyComponent.value.showStyle == 'pageSlide') {
- var height = 0;
- const query = uni.createSelectorQuery().in(instance);
- query.select('.graphic-nav-item').boundingClientRect((data: any) => {
+ if (diyComponent.value.layout == 'horizontal' && diyComponent.value.showStyle == 'pageSlide') {
+ var height = 0;
+ const query = uni.createSelectorQuery().in(instance);
+ query.select('.graphic-nav-item').boundingClientRect((data: any) => {
let len = 1;
- if(diyComponent.value.pageCount == 2){
- len = (diyComponent.value.list.length / diyComponent.value.rowCount) > 1 ? 2 : 1 ;
+ if (diyComponent.value.pageCount == 2) {
+ len = (diyComponent.value.list.length / diyComponent.value.rowCount) > 1 ? 2 : 1;
}
- height = data.height * len;
- swiperHeight.value = (height * 2) + 'rpx';
- }).exec();
- }
+ height = data.height * len;
+ swiperHeight.value = height + 'px';
+ uni.setStorageSync(storageKey, swiperHeight.value);
+ }).exec();
+ }
};
onMounted(() => {
@@ -318,6 +294,35 @@
}).exec();
})
}
+ // 获取滑动行数
+ const getSlideRowNum = ()=>{
+ let num = 1;
+ if(diyComponent.value.pageCount == 2){
+ num = diyComponent.value.list.length > diyComponent.value.rowCount ? 2 : 1;
+ }
+ return num;
+ }
+ const isShowslideTemp = (index, numItem) => {
+ let result = true;
+ let indent = index+1;
+ if(diyComponent.value.pageCount == 2){
+ let num = Math.ceil(diyComponent.value.list.length / diyComponent.value.rowCount)
+ for(let i = 1; i <= num; i++){
+ if(numItem == 1 && (i % 2) != 0){
+ if(indent > ((i-1)*diyComponent.value.rowCount) && indent <= (i*diyComponent.value.rowCount)){
+ return true;
+ }
+ }
+ if(numItem == 2 && (i % 2) == 0){
+ if(indent > ((i-1)*diyComponent.value.rowCount) && indent <= (i*diyComponent.value.rowCount)){
+ return true;
+ }
+ }
+ }
+ }
+
+ return false;
+ }
diff --git a/uni-app/src/app/components/diy/member-level/index.vue b/uni-app/src/app/components/diy/member-level/index.vue
index 84866abe3..67958edfe 100644
--- a/uni-app/src/app/components/diy/member-level/index.vue
+++ b/uni-app/src/app/components/diy/member-level/index.vue
@@ -6,7 +6,7 @@
{{info.member_level_name}}
- {{ info.member_level ? (upgradeGrowth > 0 ? '去升级' : '去查看') : '去解锁' }}
+ {{ info.member_level ? (upgradeGrowth > 0 ? '做任务' : '点击查看') : '去解锁' }}
@@ -19,7 +19,7 @@
{{info.member_level_name}}购物享{{benefits_arr[0].title}}
- {{ info.member_level ? (upgradeGrowth > 0 ? '去升级' : '去查看') : '去解锁' }}
+ {{ info.member_level ? (upgradeGrowth > 0 ? '做任务' : '点击查看') : '去解锁' }}
@@ -58,6 +58,50 @@
+
+
+
+
+ {{info.member_level_name}}
+
+
+ {{info.member_level_name}}购物享
+ {{benefits_arr[0].title}}
+
+
+
+ {{ info.member_level ? (upgradeGrowth > 0 ? '做任务' : '点击查看') : '去解锁' }}
+
+
+
+
+
+
+
+ {{info.member_level_name}}
+
+
+
+ {{info.member_level ? (upgradeGrowth > 0 ? '做任务' : '点击查看') : '去解锁'}}
+
+
+
+
+
+
+ 还差{{upgradeGrowth}}成长值即可升级为{{ list[afterCurrIndex].level_name }}
+ 恭喜您升级为最高等级
+
+
+ 规则
+
+
+
+
+
+
+
+
@@ -162,7 +206,7 @@
}else{
// 当前会员没有会员等级,则展示会员等级中的最后一个等级
info.value.member_level_name = list[0].level_name;
- upgradeGrowth.value = list[0].growth;
+ upgradeGrowth.value = list[0].growth - info.value.growth;
afterCurrIndex.value = 0;
currIndex.value = 1;
}
@@ -215,4 +259,22 @@
right: 0;
}
}
+ .style-4{
+ background-size: cover;
+ background-repeat: no-repeat;
+ .style-btn{
+ background: linear-gradient(#FFF3C1, #FFEFB0);
+ }
+ }
+
+ .style-5{
+ background-size: cover;
+ background-repeat: no-repeat;
+ .content-head{
+ background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.14));
+ }
+ .style-btn{
+ background: linear-gradient(#FFFFFF, #FFF8CC);
+ }
+ }
diff --git a/uni-app/src/app/components/diy/notice/index.vue b/uni-app/src/app/components/diy/notice/index.vue
index 4eebd0d09..4e145de5b 100644
--- a/uni-app/src/app/components/diy/notice/index.vue
+++ b/uni-app/src/app/components/diy/notice/index.vue
@@ -3,13 +3,13 @@
-
+
-
+
-
+
{{ diyComponent.noticeTitle }}
@@ -26,7 +26,7 @@
-
+
{{ item.text }}
@@ -37,18 +37,21 @@
-
-
-
-
- 公告
-
+
+
+
- {{ noticeContent }}
-
-
-
-
+
+
diff --git a/uni-app/src/app/components/diy/picture-show/index.vue b/uni-app/src/app/components/diy/picture-show/index.vue
new file mode 100644
index 000000000..126a5738f
--- /dev/null
+++ b/uni-app/src/app/components/diy/picture-show/index.vue
@@ -0,0 +1,135 @@
+
+
+
+
+
+
+ {{diyComponent.moduleOne.head.subText}}
+
+
+
+
+
+
+
+ {{item.btnTitle.text}}
+
+
+
+
+
+
+
+
+ {{diyComponent.moduleTwo.head.subText}}
+
+
+
+
+
+
+
+ {{item.btnTitle.text}}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uni-app/src/app/pages/auth/index.vue b/uni-app/src/app/pages/auth/index.vue
index 40741aa9f..3a16b1804 100644
--- a/uni-app/src/app/pages/auth/index.vue
+++ b/uni-app/src/app/pages/auth/index.vue
@@ -115,7 +115,7 @@
// #endif
/********* 自定义头部 - start ***********/
const topTabarObj = topTabar()
- let param = topTabarObj.setTopTabbarParam({title:''})
+ let param = topTabarObj.setTopTabbarParam({title:'',topStatusBar:{textColor: '#333'}})
/********* 自定义头部 - end ***********/
const headerHeight = computed(()=>{
return Object.keys(menuButtonInfo).length ? pxToRpx(Number(menuButtonInfo.height)) + pxToRpx(menuButtonInfo.top) + pxToRpx(8)+'rpx':'auto'
diff --git a/uni-app/src/app/pages/auth/login.vue b/uni-app/src/app/pages/auth/login.vue
index 4010db5bb..9711bcab2 100644
--- a/uni-app/src/app/pages/auth/login.vue
+++ b/uni-app/src/app/pages/auth/login.vue
@@ -114,8 +114,8 @@
if (option.type == 'mobile') {
if (configStore.login.is_mobile) {
type.value = option.type
+ uni.getStorageSync('pid') && (Object.assign(formData, { pid: uni.getStorageSync('pid') }))
}
-
} else if (option.type == 'username' && configStore.login.is_username) {
type.value = option.type
}
diff --git a/uni-app/src/app/pages/member/address_edit.vue b/uni-app/src/app/pages/member/address_edit.vue
index aac20e320..5223d0c45 100644
--- a/uni-app/src/app/pages/member/address_edit.vue
+++ b/uni-app/src/app/pages/member/address_edit.vue
@@ -324,7 +324,6 @@
}
.address-edit :deep(.u-form-item__body__right){
display:flex;
- align-items: center;
}
.footer{
height: calc(100rpx + var(--top-m) + var(--top-m) + constant(safe-area-inset-bottom)) !important;
diff --git a/uni-app/src/app/pages/member/apply_cash_out.vue b/uni-app/src/app/pages/member/apply_cash_out.vue
index e2f570764..ec4a4ad15 100644
--- a/uni-app/src/app/pages/member/apply_cash_out.vue
+++ b/uni-app/src/app/pages/member/apply_cash_out.vue
@@ -288,7 +288,8 @@
cashOutApply(applyData).then(res => {
loading.value = false
- redirect({ url: '/app/pages/member/cash_out' })
+ memberStore.getMemberInfo(()=>{redirect({ url: '/app/pages/member/cash_out' })})
+
}).catch(() => {
loading.value = false
})
diff --git a/uni-app/src/app/pages/member/location_address_edit.vue b/uni-app/src/app/pages/member/location_address_edit.vue
deleted file mode 100644
index 82a36605b..000000000
--- a/uni-app/src/app/pages/member/location_address_edit.vue
+++ /dev/null
@@ -1,247 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{formData.area ? formData.address_name : t('selectAddressPlaceholder')}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/uni-app/src/app/pages/member/sign_in.vue b/uni-app/src/app/pages/member/sign_in.vue
index 874cff5eb..981e5c609 100644
--- a/uni-app/src/app/pages/member/sign_in.vue
+++ b/uni-app/src/app/pages/member/sign_in.vue
@@ -4,7 +4,7 @@
-
+
- {{item}}年
+ {{item}}年
{{item}}月
- {{item}}日
+ {{item}}日
diff --git a/uni-app/src/components/sms-code/sms-code.vue b/uni-app/src/components/sms-code/sms-code.vue
index 487b7ac87..7aa913218 100644
--- a/uni-app/src/components/sms-code/sms-code.vue
+++ b/uni-app/src/components/sms-code/sms-code.vue
@@ -4,7 +4,7 @@
-
+
diff --git a/uni-app/src/components/top-tabbar/top-tabbar.vue b/uni-app/src/components/top-tabbar/top-tabbar.vue
index d971c9320..c20b7a48a 100644
--- a/uni-app/src/components/top-tabbar/top-tabbar.vue
+++ b/uni-app/src/components/top-tabbar/top-tabbar.vue
@@ -17,7 +17,7 @@
{{ data.title }}
-
+
@@ -29,29 +29,28 @@
-
+
- {{ currentPosition }}
-
+ {{ systemStore.diyAddressInfo.community }}
+ {{ systemStore.defaultPositionAddress }}
+
-
+
-
+