diff --git a/uni-app/publish.cjs b/uni-app/publish.cjs
index 1d918b678..7a1fb8e5b 100644
--- a/uni-app/publish.cjs
+++ b/uni-app/publish.cjs
@@ -71,23 +71,17 @@ const solve = () => {
}
const handleWeappAddonComponents = (mode) => {
- const files = [
- `./dist/${mode}/mp-weixin/addon/components/diy/group/index.json`,
- `./dist/${mode}/mp-weixin/app/pages/index/tabbar.json`
- ]
+ const src = `./dist/${mode}/mp-weixin/addon/components/diy/group/index.json`
+ try {
+ const data = JSON.parse(fs.readFileSync(src, 'utf8'));
+ data.componentPlaceholder = {};
- files.forEach(src => {
- try {
- const data = JSON.parse(fs.readFileSync(src, 'utf8'));
- data.componentPlaceholder = {};
-
- Object.keys(data.usingComponents).map(key => {
- data.componentPlaceholder[key] = "view";
- })
- fs.writeFileSync(src, JSON.stringify(data))
- } catch (err) {
- }
- })
+ Object.keys(data.usingComponents).map(key => {
+ data.componentPlaceholder[key] = "view";
+ })
+ fs.writeFileSync(src, JSON.stringify(data))
+ } catch (err) {
+ }
}
const handleWeappLanguage = (mode) => {
diff --git a/uni-app/src/App.vue b/uni-app/src/App.vue
index 91e435c7d..3e70c07b3 100644
--- a/uni-app/src/App.vue
+++ b/uni-app/src/App.vue
@@ -12,9 +12,18 @@ onLaunch((data: any) => {
// 添加初始化拦截器
launchInterceptor()
+ const systemStore = useSystemStore()
+
+ // 初始化全局数据
+ const initGlobalData = () => {
+ systemStore.systemInfo = uni.getSystemInfoSync();
+ systemStore.getMenuButtonInfoFn()
+ }
+
+ initGlobalData()
// #ifdef H5
- uni.getSystemInfoSync().platform == 'ios' && (uni.setStorageSync('initUrl', location.href))
+ systemStore.systemInfo.platform == 'ios' && (uni.setStorageSync('initUrl', location.href))
// 传输给后台数据
window.parent.postMessage(JSON.stringify({
@@ -38,6 +47,8 @@ onLaunch((data: any) => {
type: 'appOnReady',
message: '加载完成'
}), '*');
+ // 更新全局数据
+ initGlobalData()
}
} catch (e) {
console.log('uni-app App.vue 接受数据错误', e)
@@ -82,7 +93,7 @@ onLaunch((data: any) => {
// #endif
// 获取初始化数据信息
- useSystemStore().getInitFn(async() => {
+ useSystemStore().getInitFn(async () => {
const configStore = useConfigStore()
diff --git a/uni-app/src/addon/components/diy-form-detail/index.vue b/uni-app/src/addon/components/diy-form-detail/index.vue
index e0e902ea6..ffdd6df3d 100644
--- a/uni-app/src/addon/components/diy-form-detail/index.vue
+++ b/uni-app/src/addon/components/diy-form-detail/index.vue
@@ -9,6 +9,7 @@
import { ref, reactive, onMounted } from 'vue';
import diyGroup from '@/addon/components/diy/group/index.vue'
import { getFormRecord } from '@/app/api/diy_form';
+import { deepClone } from '@/utils/common'
const props = defineProps(['record_id', 'completeLayout']);
const emits = defineEmits(['callback'])
@@ -17,20 +18,21 @@ const diyFormData: any = reactive({
global: {},
value: []
})
-
onMounted(() => {
getFormRecord({
record_id: props.record_id
}).then((res: any) => {
diyFormData.global.completeLayout = props.completeLayout || 'style-1';
- if (res.data.recordsFieldList) {
+ let recordsFieldList = deepClone(res.data.recordsFieldList)
+ if (recordsFieldList) {
- res.data.recordsFieldList.forEach((item: any) => {
+ recordsFieldList.forEach((item: any) => {
let comp = {
id: item.field_key,
componentName: item.field_type,
pageStyle: '',
viewFormDetail: true, // 查看表单详情标识
+ componentIsShow: true,
field: {
name: item.field_name,
value: item.handle_field_value,
@@ -47,7 +49,7 @@ onMounted(() => {
diyFormData.value.push(comp);
})
}
- emits('callback', res.data.recordsFieldList)
+ emits('callback', recordsFieldList)
loading.value = false;
}).catch(() => {
loading.value = false;
diff --git a/uni-app/src/addon/components/diy-form/index.vue b/uni-app/src/addon/components/diy-form/index.vue
index a32becf60..c7717262a 100644
--- a/uni-app/src/addon/components/diy-form/index.vue
+++ b/uni-app/src/addon/components/diy-form/index.vue
@@ -1,8 +1,20 @@
-
-
+
+
+
+
+
+
+ {{ item.title }}
+
+
+ {{ item.type }}
+ {{ item.desc }}
+
+
+
@@ -30,12 +42,12 @@ const diyFormData: any = reactive({})
onMounted(() => {
diy.getData(() => {
diyFormData.status = diy.data.status;
- if (diyFormData.status) {
+ if (diyFormData.status && requestData.value.error.length == 0) {
diyFormData.title = diy.data.title;
diyFormData.global = diy.data.global;
if (diyFormData.global) {
diyFormData.global.topStatusBar.isShow = false; // 顶部导航栏强制隐藏
- diyFormData.global.bottomTabBarSwitch = false; // 底部导航强制隐藏
+ diyFormData.global.bottomTabBar.isShow = false; // 底部导航强制隐藏
}
let value: any = [];
if (props.form_border == 'none') {
@@ -47,7 +59,7 @@ onMounted(() => {
value.push(item);
}
})
- diyFormData.value = value;
+ diyFormData.value = deepClone(value);
diyFormData.componentRefs = null;
diyGroupRef.value?.refresh();
watchFormData();
@@ -95,6 +107,7 @@ const watchFormData = () => {
const verify = () => {
if (!diyFormData.status) return true;
if (!diyFormData.value) return true;
+ if (!requestData.value || requestData.value.error?.length > 0) return true;
let allPass = true; // 是否全部通过验证
let componentRefs = diyGroupRef.value.getFormRef().componentRefs;
diff --git a/uni-app/src/addon/components/diy/group/index.vue b/uni-app/src/addon/components/diy/group/index.vue
index b3e393a80..b1504ea81 100644
--- a/uni-app/src/addon/components/diy/group/index.vue
+++ b/uni-app/src/addon/components/diy/group/index.vue
@@ -3,125 +3,129 @@
-
-
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -130,7 +134,6 @@
diff --git a/uni-app/src/app/components/diy/member-info/index.vue b/uni-app/src/app/components/diy/member-info/index.vue
index 028fcc97d..5fc394530 100644
--- a/uni-app/src/app/components/diy/member-info/index.vue
+++ b/uni-app/src/app/components/diy/member-info/index.vue
@@ -79,7 +79,7 @@ const diyComponent = computed(() => {
}
})
const warpCss = computed(() => {
- var style = '';
+ let style = '';
if (diyComponent.value.componentStartBgColor) {
if (diyComponent.value.componentStartBgColor && diyComponent.value.componentEndBgColor) style += `background:linear-gradient(${ diyComponent.value.componentGradientAngle },${ diyComponent.value.componentStartBgColor },${ diyComponent.value.componentEndBgColor });`;
else style += 'background-color:' + diyComponent.value.componentStartBgColor + ';';
@@ -194,11 +194,6 @@ const clickAvatar = () => {
}
// #endif
}
-let menuButtonInfo: any = {};
-// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
-// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
-menuButtonInfo = uni.getMenuButtonBoundingClientRect();
-// #endif
diff --git a/uni-app/src/app/pages/auth/resetpwd.vue b/uni-app/src/app/pages/auth/resetpwd.vue
index 2bb530b53..2b232cebf 100644
--- a/uni-app/src/app/pages/auth/resetpwd.vue
+++ b/uni-app/src/app/pages/auth/resetpwd.vue
@@ -7,9 +7,9 @@
{{ t('findPassword') }}
- {{ t('findPasswordTip') }}
+ {{ t('findPasswordTip') }}
-
+
-
+
-
+
-
+
{
- return Object.keys(menuButtonInfo).length ? pxToRpx(Number(menuButtonInfo.height)) + pxToRpx(menuButtonInfo.top) + pxToRpx(8) + 'rpx' : 'auto'
+ return Object.keys(systemStore.menuButtonInfo).length ? pxToRpx(Number(systemStore.menuButtonInfo.height)) + pxToRpx(systemStore.menuButtonInfo.top) + pxToRpx(8) + 'rpx' : 'auto'
})
const formData = reactive({
mobile: '',
diff --git a/uni-app/src/app/pages/index/develop.vue b/uni-app/src/app/pages/index/develop.vue
index f18e4b091..9fee5ed09 100644
--- a/uni-app/src/app/pages/index/develop.vue
+++ b/uni-app/src/app/pages/index/develop.vue
@@ -34,7 +34,7 @@ const save = () => {
return;
}
- var reg = /^[0-9]+$/;
+ const reg = /^[0-9]+$/;
if (!reg.test(formData.siteId)) {
uni.showToast({ title: t('pleaseEnterNumber'), icon: 'none' });
return;
diff --git a/uni-app/src/app/pages/index/index.vue b/uni-app/src/app/pages/index/index.vue
index c55cad877..27e869ef0 100644
--- a/uni-app/src/app/pages/index/index.vue
+++ b/uni-app/src/app/pages/index/index.vue
@@ -15,6 +15,7 @@
+
@@ -40,7 +41,7 @@ const diy = useDiy({
const diyGroupRef = ref(null)
const wxPrivacyPopupRef: any = ref(null)
-
+const collectTipRef: any = ref(null)
// 监听页面加载
diy.onLoad();
@@ -57,9 +58,11 @@ diy.onShow((data: any) => {
let share = data.share ? JSON.parse(data.share) : null;
setShare(share);
diyGroupRef.value?.refresh();
+
// #ifdef MP
nextTick(() => {
if (wxPrivacyPopupRef.value) wxPrivacyPopupRef.value.proactive();
+ if (collectTipRef.value) collectTipRef.value.show();
})
// #endif
});
diff --git a/uni-app/src/app/pages/member/address_edit.vue b/uni-app/src/app/pages/member/address_edit.vue
index 47bfaca42..cc024ba83 100644
--- a/uni-app/src/app/pages/member/address_edit.vue
+++ b/uni-app/src/app/pages/member/address_edit.vue
@@ -44,15 +44,25 @@
+
@@ -115,7 +125,7 @@ onLoad((data: any) => {
}
formData.value.address = data.name;
getAddress(data.latng);
- var tempArr = getQueryVariable('latng').split(',');
+ const tempArr = getQueryVariable('latng').split(',');
formData.value.lat = tempArr[0];
formData.value.lng = tempArr[1];
}
@@ -277,7 +287,7 @@ const chooseLocation = () => {
// #endif
// #ifdef H5
- var urlencode = formData.value;
+ const urlencode = formData.value;
uni.setStorageSync('addressInfo', urlencode);
let backurl = location.origin + location.pathname + '?source=' + source.value;
if (isSelectMap.value) {
@@ -310,16 +320,36 @@ const getAddress = (latlng: any) => {
}
const getQueryVariable = (variable: any) => {
- var query = window.location.search.substring(1);
- var vars = query.split('&');
- for (var i = 0; i < vars.length; i++) {
- var pair = vars[i].split('=');
+ const query = window.location.search.substring(1);
+ const vars = query.split('&');
+ for (let i = 0; i < vars.length; i++) {
+ const pair = vars[i].split('=');
if (pair[0] == variable) {
return pair[1];
}
}
return false;
}
+const loadingchoosegAddress = ref(false)
+const choosegAddress = () =>{
+ loadingchoosegAddress.value = true
+ uni.chooseAddress({
+ success(res) {
+ console.log(7744)
+ loadingchoosegAddress.value = false
+ // 将地址信息格式化为“名字-手机号-地址(详细地址)”
+ // const formattedAddress = `${res.userName}-${res.telNumber}-${res.provinceName}${res.cityName}${res.countyName}${res.detailInfoNew || res.detailInfo}`;
+ console.log(res)
+ formData.value.name = res.userName
+ formData.value.mobile = res.telNumber
+ formData.value.area = res.provinceName + res.cityName + res.countyName
+ formData.value.address = res.detailInfo
+ },
+ fail(err) {
+ loadingchoosegAddress.value = false
+ }
+ });
+}
diff --git a/uni-app/src/app/pages/member/balance.vue b/uni-app/src/app/pages/member/balance.vue
index ab9c3a66e..84a74c89e 100644
--- a/uni-app/src/app/pages/member/balance.vue
+++ b/uni-app/src/app/pages/member/balance.vue
@@ -136,13 +136,6 @@ onShow(() => {
}
})
-
-// 获取系统状态栏的高度
-let menuButtonInfo: any = {};
-// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
-// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
-menuButtonInfo = uni.getMenuButtonBoundingClientRect();
-// #endif
const headerStyle = computed(() => {
return {
backgroundImage: 'url(' + img('static/resource/images/member/balance_bg.png') + ') ',
@@ -154,14 +147,14 @@ const headerStyle = computed(() => {
const mescrollTop = computed(() => {
if ((cashOutConfigObj.is_open == 1 || rechargeConfigObj.is_use == 1)) {
- if (Object.keys(menuButtonInfo).length) {
- return (pxToRpx(Number(menuButtonInfo.height)) + pxToRpx(menuButtonInfo.top) + pxToRpx(8) + 700) + 'rpx'
+ if (Object.keys(systemStore.menuButtonInfo).length) {
+ return (pxToRpx(Number(systemStore.menuButtonInfo.height)) + pxToRpx(systemStore.menuButtonInfo.top) + pxToRpx(8) + 700) + 'rpx'
} else {
return '718rpx'
}
} else {
- if (Object.keys(menuButtonInfo).length) {
- return (pxToRpx(Number(menuButtonInfo.height)) + pxToRpx(menuButtonInfo.top) + pxToRpx(8) + 632) + 'rpx'
+ if (Object.keys(systemStore.menuButtonInfo).length) {
+ return (pxToRpx(Number(systemStore.menuButtonInfo.height)) + pxToRpx(systemStore.menuButtonInfo.top) + pxToRpx(8) + 632) + 'rpx'
} else {
return '650rpx'
}
diff --git a/uni-app/src/app/pages/member/commission.vue b/uni-app/src/app/pages/member/commission.vue
index fae2afdfa..ee9e8d4e9 100644
--- a/uni-app/src/app/pages/member/commission.vue
+++ b/uni-app/src/app/pages/member/commission.vue
@@ -77,9 +77,11 @@ import useMescroll from '@/components/mescroll/hooks/useMescroll.js';
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app';
import { topTabar } from '@/utils/topTabbar'
import selectDate from '@/components/select-date/select-date.vue';
+import useSystemStore from "@/stores/system";
const { downCallback, mescrollInit, getMescroll } = useMescroll(onPageScroll, onReachBottom);
const memberStore = useMemberStore();
+const systemStore = useSystemStore()
const info = computed(() => memberStore.info)
// 提现
const applyCashOut = () => {
@@ -92,12 +94,6 @@ const topTabarObj = topTabar()
let param = topTabarObj.setTopTabbarParam({ title: '我的佣金', topStatusBar: { bgColor: '#fff', textColor: '#333' } })
/********* 自定义头部 - end ***********/
- // 获取系统状态栏的高度
-let menuButtonInfo: any = {};
-// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
-// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
-menuButtonInfo = uni.getMenuButtonBoundingClientRect();
-// #endif
const headerStyle = computed(() => {
return {
backgroundImage: 'url(' + img('static/resource/images/member/commission/commission_bg.png') + ') ',
@@ -108,7 +104,7 @@ const headerStyle = computed(() => {
})
// 16为自定头部的padding-bottom
const mescrollTop = computed(() => {
- return Object.keys(menuButtonInfo).length ? (Number(menuButtonInfo.height) * 2 + menuButtonInfo.top * 2 + 470 + 16) + 'rpx' : '470rpx'
+ return Object.keys(systemStore.menuButtonInfo).length ? (Number(systemStore.menuButtonInfo.height) * 2 + systemStore.menuButtonInfo.top * 2 + 470 + 16) + 'rpx' : '470rpx'
})
//来源类型
@@ -173,7 +169,7 @@ const confirmFn = (data: any) => {
+
diff --git a/uni-app/src/app/pages/member/point.vue b/uni-app/src/app/pages/member/point.vue
index 5b3521d29..25fad58c4 100644
--- a/uni-app/src/app/pages/member/point.vue
+++ b/uni-app/src/app/pages/member/point.vue
@@ -106,29 +106,25 @@ import { t } from '@/locale'
import { redirect, img, pxToRpx } from '@/utils/common';
import { getMemberAccountPointcount, getTaskPoint } from '@/app/api/member';
import { topTabar } from '@/utils/topTabbar'
+import useSystemStore from "@/stores/system";
/********* 自定义头部 - start ***********/
const topTabarObj = topTabar()
let param = topTabarObj.setTopTabbarParam({ title: '我的积分' })
/********* 自定义头部 - end ***********/
-// 获取系统状态栏的高度
-let menuButtonInfo: any = {};
-// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
-// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
-menuButtonInfo = uni.getMenuButtonBoundingClientRect();
-// #endif
+const systemStore = useSystemStore()
const headerStyle = computed(() => {
return {
backgroundImage: 'url(' + img('static/resource/images/member/point/point_bg.png') + ') ',
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'bottom',
- // paddingTop:Object.keys(menuButtonInfo).length?(Number(menuButtonInfo.height) * 2 + menuButtonInfo.top * 2 + 77)+'rpx':'77rpx',
+ // paddingTop:Object.keys(systemStore.menuButtonInfo).length?(Number(systemStore.menuButtonInfo.height) * 2 + systemStore.menuButtonInfo.top * 2 + 77)+'rpx':'77rpx',
}
})
const topStyle = computed(() => {
- let style = Object.keys(menuButtonInfo).length ? (pxToRpx(Number(menuButtonInfo.height)) + pxToRpx(menuButtonInfo.top) + 50) + 'rpx;' : '50rpx'
+ let style = Object.keys(systemStore.menuButtonInfo).length ? (pxToRpx(Number(systemStore.menuButtonInfo.height)) + pxToRpx(systemStore.menuButtonInfo.top) + 50) + 'rpx;' : '50rpx'
return style
})
diff --git a/uni-app/src/app/pages/member/sign_in.vue b/uni-app/src/app/pages/member/sign_in.vue
index 82c3c0ce1..f6c5080ae 100644
--- a/uni-app/src/app/pages/member/sign_in.vue
+++ b/uni-app/src/app/pages/member/sign_in.vue
@@ -247,6 +247,7 @@ import { onLoad } from '@dcloudio/uni-app'
import { getSignInfo, getSignConfig, setSign, getDayPack } from '@/app/api/member'
import useMemberStore from '@/stores/member'
import { topTabar } from '@/utils/topTabbar'
+import useSystemStore from "@/stores/system";
const state = reactive({
dataCount: [], //当月所有天数
@@ -462,23 +463,18 @@ const filteredDate = (date: any) => {
return date > 0 ? date : ''
}
-// 获取系统状态栏的高度
-let menuButtonInfo: any = {};
-// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
-// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
-menuButtonInfo = uni.getMenuButtonBoundingClientRect();
-// #endif
+const systemStore = useSystemStore()
/********* 自定义头部 - start ***********/
const topTabarObj = topTabar()
let topTabbarData = topTabarObj.setTopTabbarParam({ title: '我的签到' })
/********* 自定义头部 - end ***********/
const headStyle = computed(() => {
- let style = pxToRpx(Number(menuButtonInfo.height) + menuButtonInfo.top + 8) + 382 + 'rpx;'
+ let style = pxToRpx(Number(systemStore.menuButtonInfo.height) + systemStore.menuButtonInfo.top + 8) + 382 + 'rpx;'
return style
})
const topStyle = computed(() => {
- let style = pxToRpx(Number(menuButtonInfo.height) + menuButtonInfo.top + 8) + 50 + 'rpx;'
+ let style = pxToRpx(Number(systemStore.menuButtonInfo.height) + systemStore.menuButtonInfo.top + 8) + 50 + 'rpx;'
return style
})
diff --git a/uni-app/src/app/pages/setting/index.vue b/uni-app/src/app/pages/setting/index.vue
index 056b37579..ec6db49c2 100644
--- a/uni-app/src/app/pages/setting/index.vue
+++ b/uni-app/src/app/pages/setting/index.vue
@@ -14,7 +14,7 @@
-
+
diff --git a/uni-app/src/app/pages/verify/index.vue b/uni-app/src/app/pages/verify/index.vue
index 7b73b4c23..eb7f36098 100644
--- a/uni-app/src/app/pages/verify/index.vue
+++ b/uni-app/src/app/pages/verify/index.vue
@@ -156,7 +156,7 @@ const scanCode = () => {
let isLoading = false;
const confirm = () => {
- var reg = /[\S]+/;
+ const reg = /[\S]+/;
if (!reg.test(verify_code.value)) {
uni.showToast({
title: '请输入核销码',
diff --git a/uni-app/src/app/stores/diy.ts b/uni-app/src/app/stores/diy.ts
index 19401a76d..ded888b41 100644
--- a/uni-app/src/app/stores/diy.ts
+++ b/uni-app/src/app/stores/diy.ts
@@ -12,7 +12,7 @@ interface Diy {
title: string,
pageStartBgColor: string, // 页面背景颜色(开始)
pageEndBgColor: string, // 页面背景颜色(结束)
- bottomTabBarSwitch: boolean, // 底部导航开关
+ bottomTabBar: any, // 底部导航
bgUrl: string
},
// 组件集合
@@ -20,7 +20,8 @@ interface Diy {
topFixedStatus: string, // 置顶组件的状态
scrollTop: number,
topTabarHeight: number,
- componentRefs: any
+ componentRefs: any,
+ imageAdsSameScreen: any // 图片广告, 是否设置沉浸式
}
const useDiyStore = defineStore('diy', {
@@ -34,14 +35,18 @@ const useDiyStore = defineStore('diy', {
title: "",
pageStartBgColor: '', // 页面背景颜色(开始)
pageEndBgColor: '', // 页面背景颜色(结束)
- bottomTabBarSwitch: true,
+ bottomTabBar: {
+ control: true, // 是否允许展示编辑
+ isShow: true, // 是否显示
+ },
bgUrl: ''
},
value: [], // 组件集合
topFixedStatus: 'home', // 顶部 置顶组件状态,home:展示首页数据、diy:展示置顶组件定义的子页面
scrollTop: 0, // 滚动位置
topTabarHeight: 0,
- componentRefs: null
+ componentRefs: null,
+ imageAdsSameScreen: false
}
},
getters: {},
@@ -49,7 +54,7 @@ const useDiyStore = defineStore('diy', {
// 初始化
init() {
// #ifdef H5
- var data = JSON.stringify({
+ const data = JSON.stringify({
type: 'init',
load: true
});
@@ -68,6 +73,7 @@ const useDiyStore = defineStore('diy', {
if (this.value) {
this.value.forEach((item, index) => {
item.pageStyle = '';
+ item.componentIsShow = true // 是否显示
if (item.pageStartBgColor) {
if (item.pageStartBgColor && item.pageEndBgColor) item.pageStyle += `background:linear-gradient(${ item.pageGradientAngle },${ item.pageStartBgColor },${ item.pageEndBgColor });`;
else item.pageStyle += 'background-color:' + item.pageStartBgColor + ';';
@@ -118,7 +124,7 @@ const useDiyStore = defineStore('diy', {
// 减少重复请求
if (this.currentIndex == index) return;
this.currentIndex = index;
- var data = JSON.stringify({
+ const data = JSON.stringify({
type: 'change',
index,
component: toRaw(component)
diff --git a/uni-app/src/components/area-select/area-select copy.vue b/uni-app/src/components/area-select/area-select copy.vue
new file mode 100644
index 000000000..92907e7ad
--- /dev/null
+++ b/uni-app/src/components/area-select/area-select copy.vue
@@ -0,0 +1,242 @@
+
+
+
+
+
+ {{ selectedText }}
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni-app/src/components/area-select/area-select.vue b/uni-app/src/components/area-select/area-select.vue
index 91e4279c9..375b024e7 100644
--- a/uni-app/src/components/area-select/area-select.vue
+++ b/uni-app/src/components/area-select/area-select.vue
@@ -15,18 +15,20 @@
{{ selected.district.name }}
请选择
+
-
-
+
+
{{ item.name }}
-
+
{{ item.name }}
-
+
{{ item.name }}
+
@@ -68,10 +70,6 @@ watch(() => prop.areaId, (nval, oval) => {
data.province && (selected.province = data.province)
data.city && (selected.city = data.city)
data.district && (selected.district = data.district)
- if (data.city == undefined && data.province && data.district) {
- selected.city = data.district
- selected.district=null
- }
})
}
}, {
@@ -85,7 +83,7 @@ watch(() => selected.province, () => {
getAreaListByPid(selected.province.id).then(({ data }) => {
areaList.city = data
currSelect.value = 'city'
-
+
if (selected.city) {
let isExist = false
for (let i = 0; i < data.length; i++) {
@@ -150,6 +148,9 @@ watch(() => selected.district, (nval) => {
const open = () => {
show.value = true
+ if(prop.areaId){
+ currSelect.value = 'district'
+ }
}
defineExpose({
diff --git a/uni-app/src/components/bind-mobile/bind-mobile.vue b/uni-app/src/components/bind-mobile/bind-mobile.vue
index cebb776b9..8ed26d9b4 100644
--- a/uni-app/src/components/bind-mobile/bind-mobile.vue
+++ b/uni-app/src/components/bind-mobile/bind-mobile.vue
@@ -128,7 +128,12 @@ const handleBind = () => {
loading.value = true
const request = info.value ? bindMobile : mobileLogin;
-
+ if(uni.getStorageSync('avatar') && uni.getStorageSync('nickname') && uni.getStorageSync('openid') && uni.getStorageSync('unionid')){
+ formData.avatar = uni.getStorageSync('avatar')
+ formData.nickname = uni.getStorageSync('nickname')
+ formData.openid = uni.getStorageSync('openid')
+ formData.unionid = uni.getStorageSync('unionid')
+ }
request(formData).then((res: any) => {
if (info.value) {
memberStore.getMemberInfo()
diff --git a/uni-app/src/components/collect-tip/collect-tip.vue b/uni-app/src/components/collect-tip/collect-tip.vue
new file mode 100644
index 000000000..1f403335d
--- /dev/null
+++ b/uni-app/src/components/collect-tip/collect-tip.vue
@@ -0,0 +1,83 @@
+
+
+
+
+ 点击 添加到我的小程序
微信首页下拉即可快速访问店铺
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uni-app/src/components/easy-image/easy-image.vue b/uni-app/src/components/easy-image/easy-image.vue
new file mode 100644
index 000000000..5760925d7
--- /dev/null
+++ b/uni-app/src/components/easy-image/easy-image.vue
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uni-app/src/components/easy-image/fail.png b/uni-app/src/components/easy-image/fail.png
new file mode 100644
index 000000000..f8e221ba6
Binary files /dev/null and b/uni-app/src/components/easy-image/fail.png differ
diff --git a/uni-app/src/components/easy-image/loading.png b/uni-app/src/components/easy-image/loading.png
new file mode 100644
index 000000000..a51e53502
Binary files /dev/null and b/uni-app/src/components/easy-image/loading.png differ
diff --git a/uni-app/src/components/mescroll/mescroll-uni/wxs/renderjs.js b/uni-app/src/components/mescroll/mescroll-uni/wxs/renderjs.js
index 207f38857..9eeff4cce 100644
--- a/uni-app/src/components/mescroll/mescroll-uni/wxs/renderjs.js
+++ b/uni-app/src/components/mescroll/mescroll-uni/wxs/renderjs.js
@@ -3,7 +3,7 @@
// https://uniapp.dcloud.io/frame?id=renderjs
// 与wxs的me实例一致
-var me = {}
+const me = {};
// 初始化window对象的touch事件 (仅初始化一次)
if(window && !window.$mescrollRenderInit){
@@ -19,20 +19,20 @@ if(window && !window.$mescrollRenderInit){
window.addEventListener('touchmove', function(e){
if (me.disabled()) return;
if (me.getScrollTop() > 0) return; // 需在顶部下拉,才禁止bounce
-
- var curPoint = me.getPoint(e); // 当前点
- var moveY = curPoint.y - me.startPoint.y; // 和起点比,移动的距离,大于0向下拉,小于0向上拉
+
+ const curPoint = me.getPoint(e); // 当前点
+ const moveY = curPoint.y - me.startPoint.y; // 和起点比,移动的距离,大于0向下拉,小于0向上拉
// 向下拉
if (moveY > 0) {
// 可下拉的条件
if (!me.isDownScrolling && !me.optDown.isLock && (!me.isUpScrolling || (me.isUpScrolling && me.isUpBoth))) {
// 只有touch在mescroll的view上面,才禁止bounce
- var el = e.target;
- var isMescrollTouch = false;
- while (el && el.tagName && el.tagName !== 'UNI-PAGE-BODY' && el.tagName != "BODY") {
- var cls = el.classList;
- if (cls && cls.contains('mescroll-render-touch')) {
+ let el = e.target;
+ let isMescrollTouch = false;
+ while (el && el.tagName && el.tagName !== 'UNI-PAGE-BODY' && el.tagName != "BODY") {
+ const cls = el.classList;
+ if (cls && cls.contains('mescroll-render-touch')) {
isMescrollTouch = true
break;
}
diff --git a/uni-app/src/components/pay/pay.vue b/uni-app/src/components/pay/pay.vue
index bad269c34..15f4c6986 100644
--- a/uni-app/src/components/pay/pay.vue
+++ b/uni-app/src/components/pay/pay.vue
@@ -44,6 +44,10 @@ const prop = defineProps({
default () {
return []
}
+ },
+ reformat: {
+ type: String,
+ default: ''
}
})
@@ -165,6 +169,7 @@ const confirmPay = () => {
uni.$on('checkIsReturnAfterPayment', () => {
const data = uni.getStorageSync('paymenting')
if (uni.getStorageSync('paymenting')) {
+
redirect({
url: '/app/pages/pay/result',
param: {
@@ -220,8 +225,18 @@ const open = (tradeType: string, tradeId: number, payReturn: string = '', scene:
}
const emits = defineEmits(['close', 'confirm'])
+
const toPayResult = () => {
emits('confirm')
+ // console.log(prop.reformat)
+ if(prop.reformat){
+ redirect({
+ url: prop.reformat,
+ mode: 'redirectTo'
+ })
+ return
+ }
+
redirect({
url: '/app/pages/pay/result',
param: { trade_type: payInfo.value?.trade_type, trade_id: payInfo.value?.trade_id },
@@ -237,7 +252,8 @@ const handleClose = () => {
}
defineExpose({
- open
+ open,
+ payInfo
})
diff --git a/uni-app/src/components/share-popup/share-popup.vue b/uni-app/src/components/share-popup/share-popup.vue
index 7f7149bcf..dd04b5c87 100644
--- a/uni-app/src/components/share-popup/share-popup.vue
+++ b/uni-app/src/components/share-popup/share-popup.vue
@@ -23,7 +23,7 @@
@@ -45,6 +45,7 @@