mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-10 18:02:49 +00:00
up uni-app
This commit is contained in:
parent
c5d183570a
commit
8afcecff6e
@ -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) => {
|
||||
|
||||
@ -193,6 +193,8 @@ onLaunch((data: any) => {
|
||||
}
|
||||
})
|
||||
|
||||
// 控制弹窗展示
|
||||
uni.setStorageSync('isOnLoad', true); // 存储是页面是否加载完成的状态
|
||||
})
|
||||
|
||||
onShow(() => {
|
||||
|
||||
@ -1,11 +1,17 @@
|
||||
<template>
|
||||
<view class="diy-group" id="componentList">
|
||||
<top-tabbar v-if="data.global && Object.keys(data.global).length && data.global.topStatusBar && data.global.topStatusBar.isShow" :scrollBool="diyGroup.componentsScrollBool.TopTabbar" ref="topTabbarRef" :data="data.global" />
|
||||
<view v-for="(component, index) in data.value" :key="component.id" @click="diyStore.changeCurrentIndex(index, component)" :class="diyGroup.getComponentClass(index,component)" :style="component.pageStyle">
|
||||
<top-tabbar v-if="data.global && Object.keys(data.global).length && data.global.topStatusBar && data.global.topStatusBar.isShow"
|
||||
:scrollBool="diyGroup.componentsScrollBool.TopTabbar" ref="topTabbarRef" :data="data.global" />
|
||||
<pop-ads v-if="data.global && Object.keys(data.global).length && data.global.popWindow && data.global.popWindow.show" ref="popAbsRef" :data="data.global" />
|
||||
<view v-for="(component, index) in data.value" :key="component.id"
|
||||
@click="diyStore.changeCurrentIndex(index, component)"
|
||||
:class="diyGroup.getComponentClass(index,component)" :style="component.pageStyle">
|
||||
<view class="relative" :style="{ marginTop : component.margin.top < 0 ? (component.margin.top * 2) + 'rpx' : '0' }">
|
||||
|
||||
<!-- 装修模式下,设置负上边距后超出的内容,禁止选中设置 -->
|
||||
<view v-if="diyGroup.isShowPlaceHolder(index,component)" class="absolute w-full z-1" :style="{ height : (component.margin.top * 2 * -1) + 'rpx' }" @click.stop="diyGroup.placeholderEvent"></view>
|
||||
<view v-if="diyGroup.isShowPlaceHolder(index,component)" class="absolute w-full z-1"
|
||||
:style="{ height : (component.margin.top * 2 * -1) + 'rpx' }"
|
||||
@click.stop="diyGroup.placeholderEvent"></view>
|
||||
|
||||
<template v-if="component.componentName == 'GraphicNav'">
|
||||
<diy-graphic-nav :component="component" :global="data.global" :index="index" />
|
||||
@ -38,13 +44,13 @@
|
||||
<diy-text :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'RichText'">
|
||||
<diy-rich-text :component="component" :global="data.global" :index="index"/>
|
||||
<diy-rich-text :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'ActiveCube'">
|
||||
<diy-active-cube :component="component" :global="data.global" :index="index"/>
|
||||
<diy-active-cube :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FloatBtn'">
|
||||
<diy-float-btn :component="component" :global="data.global" :index="index"/>
|
||||
<diy-float-btn :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'CarouselSearch'">
|
||||
<diy-carousel-search :scrollBool="diyGroup.componentsScrollBool.CarouselSearch" :component="component" :global="data.global" :index="index" />
|
||||
@ -112,6 +118,7 @@
|
||||
<template v-if="component.componentName == 'FormFile'">
|
||||
<diy-form-file ref="diyFormFileRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="diyStore.mode == '' && data.global && data.global.bottomTabBarSwitch">
|
||||
@ -121,41 +128,41 @@
|
||||
</view>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import topTabbar from '@/components/top-tabbar/top-tabbar.vue'
|
||||
import topTabbar from '@/components/top-tabbar/top-tabbar.vue'
|
||||
import popAds from '@/components/pop-ads/pop-ads.vue'
|
||||
|
||||
import { useDiyGroup } from './useDiyGroup'
|
||||
import useDiyStore from '@/app/stores/diy';
|
||||
import { ref,getCurrentInstance } from 'vue';
|
||||
import { useDiyGroup } from './useDiyGroup'
|
||||
import useDiyStore from '@/app/stores/diy';
|
||||
import { ref, getCurrentInstance } from 'vue';
|
||||
|
||||
const props = defineProps(['data']);
|
||||
|
||||
const instance: any = getCurrentInstance();
|
||||
const getFormRef = () => {
|
||||
return {
|
||||
componentRefs: instance.refs
|
||||
}
|
||||
const props = defineProps(['data']);
|
||||
const instance: any = getCurrentInstance();
|
||||
const getFormRef = () => {
|
||||
return {
|
||||
componentRefs: instance.refs
|
||||
}
|
||||
}
|
||||
|
||||
const diyStore = useDiyStore();
|
||||
const diyStore = useDiyStore();
|
||||
|
||||
const diyGroup = useDiyGroup({
|
||||
...props,
|
||||
getFormRef
|
||||
});
|
||||
const diyGroup = useDiyGroup({
|
||||
...props,
|
||||
getFormRef
|
||||
});
|
||||
|
||||
const data = ref(diyGroup.data)
|
||||
const data = ref(diyGroup.data)
|
||||
|
||||
// 监听页面加载完成
|
||||
diyGroup.onMounted()
|
||||
// 监听页面加载完成
|
||||
diyGroup.onMounted()
|
||||
|
||||
// 监听滚动事件
|
||||
diyGroup.onPageScroll()
|
||||
// 监听滚动事件
|
||||
diyGroup.onPageScroll()
|
||||
|
||||
defineExpose({
|
||||
refresh: diyGroup.refresh,
|
||||
getFormRef
|
||||
})
|
||||
defineExpose({
|
||||
refresh: diyGroup.refresh,
|
||||
getFormRef
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './index.scss';
|
||||
@import './index.scss';
|
||||
</style>
|
||||
|
||||
@ -20,3 +20,10 @@ export function getTabbarList(params: Record<string, any>) {
|
||||
export function getShareInfo(params: Record<string, any>) {
|
||||
return request.get('diy/share', params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取个人资料表单
|
||||
*/
|
||||
export function getMemberFormRecord() {
|
||||
return request.get('diy/form/member_record')
|
||||
}
|
||||
|
||||
@ -14,6 +14,13 @@ export function addFormRecord(params: Record<string, any>) {
|
||||
return request.post('diy/form/record', params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交表单数据 【编辑】
|
||||
*/
|
||||
export function editFormRecord(params: Record<string, any>) {
|
||||
return request.put('diy/form/record', params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取表单填写结果信息
|
||||
*/
|
||||
|
||||
@ -97,14 +97,14 @@ export function getCashoutAccountInfo(data: AnyObject) {
|
||||
/**
|
||||
* 获取首条提现账户信息
|
||||
*/
|
||||
export function getFirstCashoutAccountInfo(data: AnyObject) {
|
||||
export function getFirstCashOutAccountInfo(data: AnyObject) {
|
||||
return request.get('member/cashout_account/firstinfo', data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取提现账户列表
|
||||
*/
|
||||
export function getCashoutAccountList(data: AnyObject) {
|
||||
export function getCashOutAccountList(data: AnyObject) {
|
||||
return request.get(`member/cashout_account`, data)
|
||||
}
|
||||
|
||||
|
||||
@ -150,4 +150,11 @@ export function getMsgJumpPath(params: Record<string, any>) {
|
||||
*/
|
||||
export function getInitInfo(params: Record<string, any>) {
|
||||
return request.get('init', params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否绑定手机号
|
||||
*/
|
||||
export function getMemberMobileExist(params: Record<string, any>) {
|
||||
return request.get('member_mobile_exist', params)
|
||||
}
|
||||
@ -251,7 +251,6 @@ const fixedStyle = computed(() => {
|
||||
// #endif
|
||||
}
|
||||
|
||||
|
||||
fixedStyleBg.value = false;
|
||||
if (props.scrollBool == 1) {
|
||||
let str = diyComponent.value.fixedBgColor || "";
|
||||
|
||||
@ -14,9 +14,12 @@
|
||||
<view class="detail-two-content">
|
||||
<view class="detail-two-content-label">{{ diyComponent.field.name }}</view>
|
||||
<view class="detail-two-content-value flex w-[80%] justify-end">
|
||||
<view v-for="(item,index) in diyComponent.field.value" :key="index">{{ item.text }}
|
||||
<view v-for="(item,index) in diyComponent.field.value" :key="index">
|
||||
<text>{{ item.text }}</text>
|
||||
<text v-if="index !== diyComponent.field.value.length - 1">、</text>
|
||||
</view>
|
||||
<text v-if="!diyComponent.field.value || !diyComponent.field.value.length">{{ t('notHave') }}</text>
|
||||
<text v-if="diyComponent.isShowArrow" class="iconfont iconfanhui1 text-[#888] !text-[20rpx] ml-[10rpx]"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<text>{{ diyComponent.field.value.start.date }}</text>
|
||||
<text v-if="diyComponent.field.value.start.date && diyComponent.field.value.end.date">-</text>
|
||||
<text>{{ diyComponent.field.value.end.date }}</text>
|
||||
<text v-if="diyComponent.isShowArrow" class="iconfont iconfanhui1 text-[#888] !text-[20rpx] ml-[10rpx]"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -9,7 +9,10 @@
|
||||
<view class="base-layout-two" v-if="diyGlobal.completeLayout == 'style-2'">
|
||||
<view class="detail-two-content">
|
||||
<text class="detail-two-content-label">{{ diyComponent.field.name }}</text>
|
||||
<view class="detail-two-content-value w-[80%]">{{ diyComponent.field.value.date }}</view>
|
||||
<view class="detail-two-content-value w-[80%]">
|
||||
<text>{{ diyComponent.field.value.date || t('notHave') }}</text>
|
||||
<text v-if="diyComponent.isShowArrow" class="iconfont iconfanhui1 text-[#888] !text-[20rpx] ml-[10rpx]"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -9,7 +9,10 @@
|
||||
<view class="base-layout-two" v-if="diyGlobal.completeLayout == 'style-2'">
|
||||
<view class="detail-two-content">
|
||||
<view>{{ diyComponent.field.name }}</view>
|
||||
<view class="detail-two-content-value w-[80%]">{{ diyComponent.field.value }}</view>
|
||||
<view class="detail-two-content-value w-[80%]">
|
||||
<text>{{ diyComponent.field.value || t('notHave') }}</text>
|
||||
<text v-if="diyComponent.isShowArrow" class="iconfont iconfanhui1 text-[#888] !text-[20rpx] ml-[10rpx]"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -14,9 +14,10 @@
|
||||
<view class="base-layout-two" v-if="diyGlobal.completeLayout == 'style-2'">
|
||||
<view class="detail-two-content">
|
||||
<text class="detail-two-content-label">{{ diyComponent.field.name }}</text>
|
||||
<view class="detail-one-content-value">
|
||||
<text>{{ formattedIdentity }}</text>
|
||||
<text v-if="diyComponent.field.privacyProtection" class="ml-[20rpx] text-[var(--primary-color)]" @click="viewPrivacy">{{ t('diyForm.view') }}</text>
|
||||
<view class="detail-two-content-value">
|
||||
<text>{{ formattedIdentity || t('notHave') }}</text>
|
||||
<text v-if="diyComponent.field.privacyProtection && formattedIdentity" class="ml-[20rpx] text-[var(--primary-color)]" @click="viewPrivacy">{{ t('diyForm.view') }}</text>
|
||||
<text v-if="diyComponent.isShowArrow" class="iconfont iconfanhui1 text-[#888] !text-[20rpx] ml-[10rpx]"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -13,10 +13,13 @@
|
||||
<view class="base-layout-two" v-if="diyGlobal.completeLayout == 'style-2'">
|
||||
<view class="detail-two-content">
|
||||
<text class="detail-two-content-label">{{ diyComponent.field.name }}</text>
|
||||
<view class="flex flex-wrap w-[80%] justify-end">
|
||||
<view class="relative w-[180rpx] !h-[180rpx] mr-[16rpx] mb-[16rpx] " v-for="(item,index) in diyComponent.field.value" :key="index">
|
||||
<image class="w-[100%] h-[100%]" :src="img(item)" @click="handleImg(item,index)" mode="aspectFill"/>
|
||||
</view>
|
||||
<view class="flex items-center w-[80%] justify-end">
|
||||
<div class="flex flex-wrap justify-end gap-[10rpx]">
|
||||
<view class="relative image-item w-[180rpx] !h-[180rpx] gap-[16rpx]" v-for="(item,index) in diyComponent.field.value" :key="index">
|
||||
<image class="w-[100%] h-[100%]" :src="img(item)" @click.stop="handleImg(item,index)" mode="aspectFill"/>
|
||||
</view>
|
||||
</div>
|
||||
<text v-if="diyComponent.isShowArrow" class="iconfont iconfanhui1 text-[#888] !text-[20rpx] ml-[10rpx]"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -9,7 +9,8 @@
|
||||
<view class="base-layout-two" v-if="diyGlobal.completeLayout == 'style-2'">
|
||||
<view class="detail-two-content">
|
||||
<view>{{ diyComponent.field.name }}</view>
|
||||
<view class="detail-two-content-value w-[80%]">{{ diyComponent.field.value }}</view>
|
||||
<view class="detail-two-content-value w-[80%]">{{ diyComponent.field.value || t('notHave') }}</view>
|
||||
<text v-if="diyComponent.isShowArrow" class="iconfont iconfanhui1 text-[#888] !text-[20rpx] ml-[10rpx]"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -13,8 +13,9 @@
|
||||
<view class="detail-two-content">
|
||||
<text class="detail-two-content-label">{{ diyComponent.field.name }}</text>
|
||||
<view class="detail-two-content-value">
|
||||
<text>{{ formattedPhoneNumber }}</text>
|
||||
<text v-if="diyComponent.field.privacyProtection" class="ml-[20rpx] text-[var(--primary-color)]" @click="viewPrivacy">{{ t('diyForm.view') }}</text>
|
||||
<text>{{ formattedPhoneNumber || t('notHave') }}</text>
|
||||
<text v-if="diyComponent.field.privacyProtection && formattedPhoneNumber" class="ml-[20rpx] text-[var(--primary-color)]" @click="viewPrivacy">{{ t('diyForm.view') }}</text>
|
||||
<text v-if="diyComponent.isShowArrow" class="iconfont iconfanhui1 text-[#888] !text-[20rpx] ml-[10rpx]"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -9,7 +9,10 @@
|
||||
<view class="base-layout-two" v-if="diyGlobal.completeLayout == 'style-2'">
|
||||
<view class="detail-two-content">
|
||||
<text class="detail-two-content-label">{{ diyComponent.field.name }}</text>
|
||||
<view class="detail-two-content-value w-[80%]">{{ diyComponent.field.value }}</view>
|
||||
<view class="detail-two-content-value w-[80%]">
|
||||
<text>{{ diyComponent.field.value || t('notHave') }}</text>
|
||||
<text v-if="diyComponent.isShowArrow" class="iconfont iconfanhui1 text-[#888] !text-[20rpx] ml-[10rpx]"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -9,7 +9,11 @@
|
||||
<view class="base-layout-two" v-if="diyGlobal.completeLayout == 'style-2'">
|
||||
<view class="detail-two-content">
|
||||
<text class="detail-two-content-label">{{ diyComponent.field.name }}</text>
|
||||
<view class="detail-two-content-value w-[80%]" v-for="(item,index) in diyComponent.field.value" :key="index">{{ item.text }}</view>
|
||||
<view class="flex items-center justify-end">
|
||||
<view class="detail-two-content-value w-[80%]" v-for="(item,index) in diyComponent.field.value" :key="index">{{ item.text }}</view>
|
||||
<text v-if="!diyComponent.field.value || !diyComponent.field.value.length">{{ t('notHave') }}</text>
|
||||
<text v-if="diyComponent.isShowArrow" class="iconfont iconfanhui1 text-[#888] !text-[20rpx] ml-[10rpx]"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -21,8 +21,9 @@
|
||||
// 表单提交组件
|
||||
import { ref, computed, watch, onMounted, nextTick, getCurrentInstance } from 'vue';
|
||||
import useDiyStore from '@/app/stores/diy';
|
||||
import { img, redirect, getValidTime, deepClone } from '@/utils/common';
|
||||
import { addFormRecord } from '@/app/api/diy_form';
|
||||
import { img, redirect, getValidTime, deepClone, getToken } from '@/utils/common';
|
||||
import { useLogin } from "@/hooks/useLogin";
|
||||
import { addFormRecord, editFormRecord } from '@/app/api/diy_form';
|
||||
|
||||
const props = defineProps(['component', 'index', 'global']);
|
||||
const diyStore = useDiyStore();
|
||||
@ -205,7 +206,7 @@ const getFormComponent = () => {
|
||||
}
|
||||
|
||||
const repeat = ref(false)
|
||||
|
||||
let currPage: any = getCurrentPages()[getCurrentPages().length - 1];
|
||||
const submit = () => {
|
||||
if (diyStore.mode === 'decorate') return
|
||||
|
||||
@ -240,6 +241,17 @@ const submit = () => {
|
||||
|
||||
}
|
||||
|
||||
// 填写万能表单需要检测登录
|
||||
if (!getToken()) {
|
||||
useLogin().setLoginBack({
|
||||
url: '/app/pages/index/diy_form',
|
||||
param: {
|
||||
form_id: diyStore.id
|
||||
}
|
||||
})
|
||||
return;
|
||||
}
|
||||
|
||||
if (!allPass) return;
|
||||
|
||||
if (repeat.value) return
|
||||
@ -259,14 +271,31 @@ const submit = () => {
|
||||
relate_id: '' // todo 关联业务id,需要考虑如何传入
|
||||
}
|
||||
|
||||
addFormRecord(data).then((res: any) => {
|
||||
let api = addFormRecord;
|
||||
if(uni.getStorageSync('personalFormRecordId')){
|
||||
api = editFormRecord;
|
||||
data.record_id = uni.getStorageSync('personalFormRecordId');
|
||||
}else{
|
||||
data.record_id = '';
|
||||
}
|
||||
|
||||
api(data).then((res: any) => {
|
||||
uni.removeStorageSync('diyFormStorage_' + diyStore.id)
|
||||
// 跳转到 表单提交结果页面
|
||||
redirect({
|
||||
url: '/app/pages/index/diy_form_result',
|
||||
param: { record_id: res.data, form_id: diyStore.id },
|
||||
mode: 'redirectTo'
|
||||
})
|
||||
uni.removeStorageSync('personalFormRecordId')
|
||||
if (currPage.route == 'app/pages/member/personal_form') {
|
||||
// 个人资料
|
||||
redirect({
|
||||
url: '/app/pages/member/personal',
|
||||
mode: 'redirectTo'
|
||||
})
|
||||
}else {
|
||||
// 跳转到 表单提交结果页面
|
||||
redirect({
|
||||
url: '/app/pages/index/diy_form_result',
|
||||
param: { record_id: res.data, form_id: diyStore.id },
|
||||
mode: 'redirectTo'
|
||||
})
|
||||
}
|
||||
repeat.value = false
|
||||
}).catch(() => {
|
||||
repeat.value = false
|
||||
@ -294,7 +323,6 @@ const getFormSComponentsData = (data: any) => {
|
||||
validTime: getValidTime(5), // 缓存数据有效期为5分钟
|
||||
components: []
|
||||
};
|
||||
|
||||
data.forEach((item: any) => {
|
||||
// 只存表单组件 -- 用于直接保存
|
||||
if (item.componentType == 'diy_form' && item.componentName != 'FormSubmit' && item.field.cache) {
|
||||
|
||||
@ -9,7 +9,10 @@
|
||||
<view class="base-layout-two" v-if="diyGlobal.completeLayout == 'style-2'">
|
||||
<view class="detail-two-content">
|
||||
<view>{{ diyComponent.field.name }}</view>
|
||||
<view class="detail-two-content-value w-[80%]">{{ diyComponent.field.value }}</view>
|
||||
<view class="detail-two-content-value w-[80%]">
|
||||
<text>{{ diyComponent.field.value || t('notHave') }}</text>
|
||||
<text v-if="diyComponent.isShowArrow" class="iconfont iconfanhui1 text-[#888] !text-[20rpx] ml-[10rpx]"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<text>{{ diyComponent.field.value.start.date }}</text>
|
||||
<text v-if="diyComponent.field.value.start.date && diyComponent.field.value.end.date"> -</text>
|
||||
<text>{{ diyComponent.field.value.end.date }}</text>
|
||||
<text v-if="diyComponent.isShowArrow" class="iconfont iconfanhui1 text-[#888] !text-[20rpx] ml-[10rpx]"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -9,7 +9,10 @@
|
||||
<view class="base-layout-two" v-if="diyGlobal.completeLayout == 'style-2'">
|
||||
<view class="detail-two-content">
|
||||
<text class="detail-two-content-label">{{ diyComponent.field.name }}</text>
|
||||
<view class="detail-two-content-value w-[80%]">{{ diyComponent.field.value }}</view>
|
||||
<view class="detail-two-content-value w-[80%]">
|
||||
<text>{{ diyComponent.field.value || t('notHave') }}</text>
|
||||
<text v-if="diyComponent.isShowArrow" class="iconfont iconfanhui1 text-[#888] !text-[20rpx] ml-[10rpx]"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -198,6 +198,7 @@ const bindMobileFn = () => {
|
||||
|
||||
onLoad(async() => {
|
||||
await systemStore.getSiteInfoFn()
|
||||
await systemStore.getMemberMobileExistFn()
|
||||
await configStore.getLoginConfig()
|
||||
let normalLogin = !configStore.login.is_username && !configStore.login.is_mobile && !configStore.login.is_bind_mobile; // 未开启普通登录
|
||||
|
||||
@ -229,12 +230,9 @@ onLoad(async() => {
|
||||
}, 100)
|
||||
return;
|
||||
}
|
||||
|
||||
wapMemberMobile.value = uni.getStorageSync('wap_member_mobile');
|
||||
if (!wapMemberMobile.value) {
|
||||
wapMemberMobile.value = uni.getStorageSync('wap_member_not_control_mobile'); // 老用户不控制强制绑定手机号
|
||||
}
|
||||
|
||||
|
||||
wapMemberMobile.value = uni.getStorageSync('member_mobile_exist');
|
||||
|
||||
nextTick(() => {
|
||||
if (wxPrivacyPopupRef.value) wxPrivacyPopupRef.value.proactive();
|
||||
})
|
||||
@ -313,14 +311,15 @@ const wechatLogin = () => {
|
||||
uni.showToast({ title: loginConfig.wechat_error, icon: 'none' })
|
||||
return;
|
||||
}
|
||||
|
||||
wapMemberMobile.value = uni.getStorageSync('wap_member_mobile');
|
||||
if (!wapMemberMobile.value) {
|
||||
wapMemberMobile.value = uni.getStorageSync('wap_member_not_control_mobile'); // 老用户不控制强制绑定手机号
|
||||
}
|
||||
wapMemberMobile.value = uni.getStorageSync('member_mobile_exist');
|
||||
// wapMemberMobile.value = uni.getStorageSync('wap_member_mobile');
|
||||
// if (!wapMemberMobile.value) {
|
||||
// wapMemberMobile.value = uni.getStorageSync('wap_member_not_control_mobile'); // 老用户不控制强制绑定手机号
|
||||
// }
|
||||
let member_exist = uni.getStorageSync('member_exist')
|
||||
if (loginConfig.is_auth_register) {
|
||||
// 开启强制绑定手机号,必须填写才能注册
|
||||
if (!wapMemberMobile.value && loginConfig.is_bind_mobile) {
|
||||
if (!wapMemberMobile.value && loginConfig.is_bind_mobile && !member_exist) {
|
||||
bindMobileFn();
|
||||
} else if (loginConfig.is_force_access_user_info) {
|
||||
// 开启强制获取用户信息
|
||||
@ -330,7 +329,7 @@ const wechatLogin = () => {
|
||||
login.getAuthCode({ scopes: 'snsapi_base' }) // 静默获取
|
||||
}
|
||||
}else{
|
||||
if (!wapMemberMobile.value && loginConfig.is_bind_mobile) {
|
||||
if (!wapMemberMobile.value && loginConfig.is_bind_mobile &&!member_exist) {
|
||||
bindMobileFn();
|
||||
}else {
|
||||
login.getAuthCode({ scopes: 'snsapi_base' }) // 静默获取
|
||||
|
||||
@ -98,7 +98,6 @@ import { topTabar } from '@/utils/topTabbar';
|
||||
import { getFriendspayInfo } from '@/app/api/friendspay'
|
||||
import Message from '@/app/pages/friendspay/components/message.vue'
|
||||
import { useLogin } from '@/hooks/useLogin'
|
||||
import { onPageScroll } from '@dcloudio/uni-app';
|
||||
|
||||
/********* 自定义头部 - start ***********/
|
||||
const topTabarObj = topTabar()
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
<view class="px-[20rpx] box-border">
|
||||
<button class="bg-[#FFB4B1] !text-[#fff] h-[80rpx] leading-[80rpx] rounded-[100rpx] text-[26rpx] font-500" hover-class="none" v-if="friendsInfo.status == 2">{{ t('finish') }}</button>
|
||||
<button class="bg-[#FFB4B1] !text-[#fff] h-[80rpx] leading-[80rpx] rounded-[100rpx] text-[26rpx] font-500" hover-class="none" v-else-if="friendsInfo.status == -1">{{ t('close') }}</button>
|
||||
<button class="botton-color !text-[#fff] h-[80rpx] leading-[80rpx] rounded-[100rpx] text-[26rpx] font-500" hover-class="none" v-else :loading="operateLoading" @click="openShareFn">{{ friendsInfo.config.pay_type_name ? friendsInfo.config.pay_type_name : t('friendPay') }}</button>
|
||||
<button class="button-color !text-[#fff] h-[80rpx] leading-[80rpx] rounded-[100rpx] text-[26rpx] font-500" hover-class="none" v-else :loading="operateLoading" @click="openShareFn">{{ friendsInfo.config.pay_type_name ? friendsInfo.config.pay_type_name : t('friendPay') }}</button>
|
||||
</view>
|
||||
<view class="mt-[20rpx] flex items-baseline justify-center text-[var(--text-color-light9)]" v-if="friendsInfo.status == 2 && JSON.stringify(friendsInfo.trade_info) !== '[]' && friendsInfo.trade_info.detail_url" @click="redirect({url: friendsInfo.trade_info.detail_url })">
|
||||
<text class="text-[24rpx] mr-[6rpx]">查看订单</text>
|
||||
@ -95,7 +95,6 @@ import useMemberStore from '@/stores/member'
|
||||
import { topTabar } from '@/utils/topTabbar';
|
||||
import sharePoster from '@/components/share-poster/share-poster.vue'
|
||||
import Message from '@/app/pages/friendspay/components/message.vue'
|
||||
import { onPageScroll } from '@dcloudio/uni-app';
|
||||
|
||||
/********* 自定义头部 - start ***********/
|
||||
const topTabarObj = topTabar()
|
||||
@ -270,7 +269,7 @@ const openShareFn = ()=>{
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.botton-color{
|
||||
.button-color{
|
||||
background: linear-gradient( 94deg, #FB7939 0%, #FE120E 99%), #EF000C;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -48,7 +48,7 @@ import diyGroup from '@/addon/components/diy/group/index.vue'
|
||||
const { setShare } = useShare()
|
||||
|
||||
const diy = useDiyForm({
|
||||
needLogin: true // 检测登录
|
||||
needLogin: false // 检测登录
|
||||
})
|
||||
|
||||
const diyGroupRef = ref(null)
|
||||
|
||||
@ -27,8 +27,8 @@ import { ref, nextTick } from 'vue';
|
||||
import { useDiy } from '@/hooks/useDiy'
|
||||
import { redirect } from '@/utils/common';
|
||||
import { useShare } from '@/hooks/useShare'
|
||||
|
||||
import diyGroup from '@/addon/components/diy/group/index.vue'
|
||||
|
||||
const { setShare } = useShare()
|
||||
|
||||
uni.hideTabBar() // 隐藏tabbar
|
||||
|
||||
@ -31,11 +31,10 @@
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import useSystemStore from '@/stores/system'
|
||||
import tabbarJson from '@/tabbar.json'
|
||||
import pagesJson from '@/pages.json'
|
||||
import zh from '@/locale/zh-Hans.json'
|
||||
import en from '@/locale/en.json'
|
||||
import {onPageScroll} from "@dcloudio/uni-app";
|
||||
import TopTabbar from "@/components/top-tabbar/top-tabbar.vue";
|
||||
|
||||
import { language } from '@/locale'
|
||||
|
||||
uni.hideTabBar()
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="w-screen h-screen bg-[var(--page-bg-color)]" :style="themeColor()">
|
||||
<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="{ use: false }" @up="getCashoutAccountListFn">
|
||||
<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="{ use: false }" @up="getCashOutAccountListFn">
|
||||
<!-- 多嵌套一层是为了微信小程序兼容 -->
|
||||
<view class="sidebar-margin my-[var(--top-m)] rounded-[var(--rounded-big)] overflow-hidden"
|
||||
v-for="(item, index) in accountList" :key="index">
|
||||
@ -35,7 +35,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { redirect, img } from '@/utils/common'
|
||||
import { getCashoutAccountList, deleteCashoutAccount } from '@/app/api/member'
|
||||
import { getCashOutAccountList, deleteCashoutAccount } from '@/app/api/member'
|
||||
import MescrollBody from '@/components/mescroll/mescroll-body/mescroll-body.vue'
|
||||
import useMescroll from '@/components/mescroll/hooks/useMescroll.js'
|
||||
import { onPageScroll, onReachBottom, onLoad } from '@dcloudio/uni-app'
|
||||
@ -53,7 +53,7 @@ onLoad((data: any) => {
|
||||
data.mode && (mode.value = data.mode)
|
||||
})
|
||||
|
||||
const getCashoutAccountListFn = (mescroll: any) => {
|
||||
const getCashOutAccountListFn = (mescroll: any) => {
|
||||
loading.value = false;
|
||||
let data: object = {
|
||||
page: mescroll.num,
|
||||
@ -61,7 +61,7 @@ const getCashoutAccountListFn = (mescroll: any) => {
|
||||
account_type: accountType.value
|
||||
};
|
||||
|
||||
getCashoutAccountList(data).then((res: any) => {
|
||||
getCashOutAccountList(data).then((res: any) => {
|
||||
const newArr = (res.data.data as Array<Object>);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) {
|
||||
|
||||
@ -40,6 +40,15 @@
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<u-popup ref="popupRef" :show="show" mode="center" @close="show = false" :round="30" zIndex="99999" :safeAreaInsetBottom="false">
|
||||
<view class="bg-[#fff] flex flex-col justify-between w-[610rpx] h-[306rpx] rounded-[30rpx] box-border px-[40rpx] pt-[70rpx] pb-[40rpx] relative overflow-hidden">
|
||||
<view class="flex-center mb-[80rpx] text-[#333]">确定要删除该地址吗?</view>
|
||||
<view class="flex-between-center">
|
||||
<view class="w-[250rpx] h-[66rpx] rounded-full bg-[#eee] flex-center text-[26rpx] font-500 text-[#333]" @click="show = false">取消</view>
|
||||
<view class="w-[250rpx] h-[66rpx] rounded-full primary-btn-bg flex-center text-[26rpx] font-500 text-[#fff]" @click="saveDelete">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -112,14 +121,23 @@ const selectAddress = (data: any) => {
|
||||
})
|
||||
}
|
||||
}
|
||||
const show = ref(false)
|
||||
const deleteIndex = ref(0)
|
||||
|
||||
const deleteAddressFn = (index: any) => {
|
||||
const data: any = addressList.value[index]
|
||||
deleteAddress(data.id).then(() => {
|
||||
addressList.value.splice(index, 1)
|
||||
}).catch()
|
||||
deleteIndex.value = index
|
||||
show.value = true
|
||||
// deleteAddress(data.id).then(() => {
|
||||
// addressList.value.splice(index, 1)
|
||||
// }).catch()
|
||||
}
|
||||
const saveDelete = ()=>{
|
||||
const data: any = addressList.value[deleteIndex.value ]
|
||||
deleteAddress(data.id).then(() => {
|
||||
addressList.value.splice(deleteIndex.value, 1)
|
||||
show.value = false
|
||||
}).catch()
|
||||
}
|
||||
|
||||
const setDefault = (index: any) => {
|
||||
const data: any = addressList.value[index]
|
||||
if (data.is_default) return
|
||||
|
||||
@ -142,7 +142,7 @@ import { ref, reactive, watch, computed } from 'vue'
|
||||
import { t } from '@/locale'
|
||||
import { moneyFormat, redirect, getToken, img, deepClone, getWinxinOpenId } from '@/utils/common'
|
||||
import useMemberStore from '@/stores/member'
|
||||
import { cashOutConfig, cashOutApply, getFirstCashoutAccountInfo, getCashoutAccountInfo } from '@/app/api/member'
|
||||
import { cashOutConfig, cashOutApply, getFirstCashOutAccountInfo, getCashoutAccountInfo } from '@/app/api/member'
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
|
||||
const pageLoading = ref(true)
|
||||
@ -296,7 +296,7 @@ const alipayLoading = ref(false)
|
||||
const alipayAccountInfo: any = ref(null)
|
||||
const getAlipayAccountInfo = () => {
|
||||
const data = { account_type: 'alipay', account_id: 0 }
|
||||
let request = getFirstCashoutAccountInfo
|
||||
let request = getFirstCashOutAccountInfo
|
||||
|
||||
if (query.type && query.type == 'alipay' && query.account_id) {
|
||||
request = getCashoutAccountInfo
|
||||
@ -322,7 +322,7 @@ const bankLoading = ref(false)
|
||||
const bankAccountInfo: any = ref(null)
|
||||
const getBankAccountInfo = () => {
|
||||
const data = { account_type: 'bank', account_id: 0 }
|
||||
let request = getFirstCashoutAccountInfo
|
||||
let request = getFirstCashOutAccountInfo
|
||||
|
||||
if (query.type && query.type == 'bank' && query.account_id) {
|
||||
request = getCashoutAccountInfo
|
||||
@ -349,7 +349,7 @@ const wechatCodeLoading = ref(false)
|
||||
const wechatCodeInfo: any = ref(null)
|
||||
const getWechatCodeInfo = () => {
|
||||
const data = { account_type: 'wechat_code', account_id: 0 }
|
||||
let request = getFirstCashoutAccountInfo
|
||||
let request = getFirstCashOutAccountInfo
|
||||
|
||||
if (query.type && query.type == 'wechat_code' && query.account_id) {
|
||||
request = getCashoutAccountInfo
|
||||
|
||||
@ -16,8 +16,7 @@
|
||||
<text class="text-[#333] w-[200rpx]">{{ t('cashOutNo') }}</text>
|
||||
<text class="text-[#333]">{{ cashOutInfo.cash_out_no }}</text>
|
||||
</view>
|
||||
<view class="flex justify-between text-[28rpx] mt-[34rpx] leading-[32rpx]"
|
||||
v-if="Number(cashOutInfo.service_money)">
|
||||
<view class="flex justify-between text-[28rpx] mt-[34rpx] leading-[32rpx]" v-if="Number(cashOutInfo.service_money)">
|
||||
<text class="text-[#333] w-[200rpx]">{{ t('serviceMoney') }}</text>
|
||||
<text class="text-[#333]">¥{{ cashOutInfo.service_money }}</text>
|
||||
</view>
|
||||
|
||||
@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<view :style="themeColor()" class="my-[var(--top-m)] sidebar-margin overflow-hidden card-template py-[12rpx] px-[26rpx]" >
|
||||
<view v-show="!loading" class="diy-template-wrap">
|
||||
<diy-group ref="diyGroupRef" :data="diyFormData" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import diyGroup from '@/addon/components/diy/group/index.vue'
|
||||
|
||||
const props = defineProps(['data', 'completeLayout']);
|
||||
const loading = ref(true);
|
||||
const diyFormData: any = reactive({
|
||||
global: {},
|
||||
value: []
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
diyFormData.global.completeLayout = props.completeLayout || 'style-1';
|
||||
if (props.data.formField) {
|
||||
|
||||
props.data.formField.forEach((item: any) => {
|
||||
let comp = {
|
||||
id: item.field_key,
|
||||
componentName: item.field_type,
|
||||
pageStyle: '',
|
||||
viewFormDetail: true, // 查看表单详情标识
|
||||
isShowArrow: true, // 是否显示箭头
|
||||
field: {
|
||||
name: item.field_name,
|
||||
value: item.field_value,
|
||||
required: item.field_required,
|
||||
unique: item.field_unique,
|
||||
privacyProtection: item.privacy_protection,
|
||||
},
|
||||
margin: {
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
both: 0
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
comp.field.value = JSON.parse(item.field_value)
|
||||
} catch (error) {
|
||||
comp.field.value = item.field_value
|
||||
}
|
||||
|
||||
diyFormData.value.push(comp);
|
||||
})
|
||||
}
|
||||
loading.value = false;
|
||||
})
|
||||
</script>
|
||||
@ -25,7 +25,6 @@
|
||||
import { ref, computed, nextTick } from 'vue';
|
||||
import { useDiy } from '@/hooks/useDiy'
|
||||
import { useShare } from '@/hooks/useShare'
|
||||
|
||||
import { redirect } from '@/utils/common';
|
||||
import diyGroup from '@/addon/components/diy/group/index.vue'
|
||||
import useMemberStore from '@/stores/member'
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<view class="w-full h-screen bg-page personal-wrap overflow-hidden" v-if="info" :style="themeColor()">
|
||||
|
||||
<view class="w-full min-h-screen bg-page personal-wrap !pb-[20rpx]" v-if="info" :style="themeColor()">
|
||||
<view class="my-[var(--top-m)] sidebar-margin overflow-hidden card-template py-[20rpx]">
|
||||
<u-cell-group :border="false" class="cell-group">
|
||||
<u-cell :title="t('headimg')" :titleStyle="{'font-size': '28rpx'}" :is-link="true">
|
||||
@ -40,6 +39,11 @@
|
||||
</u-cell-group>
|
||||
</view>
|
||||
|
||||
<!-- 商品的万能表单信息 -->
|
||||
<view @click="redirect({ url: '/app/pages/member/personal_form', param: { form_id: info.form_id, form_record_id: info.form_record_id} })" >
|
||||
<personal-form-detail class="personal-form" :data="personalFormData" completeLayout="style-2" v-if="personalFormData && Object.keys(personalFormData).length"/>
|
||||
</view>
|
||||
|
||||
<!-- 修改昵称 -->
|
||||
<u-popup class="popup-type" :safeAreaInsetBottom="false" round="var(--rounded-big)" :show="updateNickname.modal" mode="center" @close="updateNickname.modal = false">
|
||||
<view class="w-[620rpx] popup-common pb-[40rpx]" @touchmove.prevent.stop>
|
||||
@ -77,6 +81,8 @@ import { img, redirect, mobileConceal } from '@/utils/common'
|
||||
import { modifyMember } from '@/app/api/member'
|
||||
import { fetchBase64Image, uploadImage } from '@/app/api/system'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { getMemberFormRecord } from '@/app/api/diy'
|
||||
import personalFormDetail from '@/app/pages/member/components/personal_form_detail.vue'
|
||||
|
||||
const memberStore = useMemberStore()
|
||||
const info = computed(() => memberStore.info)
|
||||
@ -103,6 +109,14 @@ const bindNickname = (e: any) => {
|
||||
updateNickname.value = e.detail.value
|
||||
}
|
||||
|
||||
let personalFormData = ref(null)
|
||||
const getMemberFormRecordFn = () => {
|
||||
getMemberFormRecord().then((res: any) => {
|
||||
personalFormData.value = res.data
|
||||
})
|
||||
}
|
||||
getMemberFormRecordFn()
|
||||
|
||||
const updateNicknameConfirm = () => {
|
||||
if (uni.$u.test.isEmpty(updateNickname.value)) {
|
||||
uni.showToast({ title: t('nicknamePlaceholder'), icon: 'none' });
|
||||
@ -265,4 +279,25 @@ page {
|
||||
.personal-wrap .u-cell--clickable {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.personal-form{
|
||||
::v-deep .draggable-element {
|
||||
&:last-of-type{
|
||||
.detail-two-content{
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
}
|
||||
.detail-two-content{
|
||||
padding-top: 32rpx !important;
|
||||
padding-bottom: 32rpx !important;
|
||||
margin-bottom: 0 !important;
|
||||
& > view{
|
||||
width: 72% !important;
|
||||
.image-item{
|
||||
width: 136rpx !important;
|
||||
height: 136rpx !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
151
uni-app/src/app/pages/member/personal_form.vue
Normal file
151
uni-app/src/app/pages/member/personal_form.vue
Normal file
@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<view :style="themeColor()">
|
||||
|
||||
<loading-page :loading="diy.getLoading()"></loading-page>
|
||||
|
||||
<view v-show="requestData.status == 1 && requestData.error && requestData.error.length === 0 && !diy.getLoading()">
|
||||
|
||||
<!-- 自定义模板渲染 -->
|
||||
<view class="diy-template-wrap bg-index" :style="diy.pageStyle()">
|
||||
|
||||
<diy-group ref="diyGroupRef" :data="diy.data" />
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="w-screen h-screen flex flex-col " v-if="requestData.error && requestData.error.length > 0">
|
||||
<view class="flex-1 flex flex-col items-center pt-[180rpx] px-[60rpx]" v-for="(item, index) in requestData.error.slice(0, 1)" :key="index">
|
||||
<text class="nc-iconfont nc-icon-tanhaoV6mm text-[#ccc] mb-[30rpx] !text-[100rpx]"></text>
|
||||
<view class="text-[38rpx] font-bold mt-3">{{ item.title }}</view>
|
||||
<view class="p-[30rpx] mt-10 w-full ">
|
||||
<view class="flex w-full">
|
||||
<view class="w-[30%] text-[#999] text-left">{{ item.type }}</view>
|
||||
<view class="w-[70%] text-left">{{ item.desc }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pb-[260rpx]">
|
||||
<button class="w-[380rpx] !border-0 h-[80rpx] text-[28rpx] text-[#333] !bg-[#f2f2f2] flex-center font-500 rounded-[20rpx]" :plain="true" @click="finishFn">{{ t('close') }}</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<!-- 小程序隐私协议 -->
|
||||
<wx-privacy-popup ref="wxPrivacyPopupRef"></wx-privacy-popup>
|
||||
<!-- #endif -->
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, nextTick, computed } from 'vue';
|
||||
import { useDiyForm } from '@/hooks/useDiyForm'
|
||||
import { useShare } from '@/hooks/useShare'
|
||||
import { onLoad, onUnload } from '@dcloudio/uni-app'
|
||||
import { img, redirect } from '@/utils/common';
|
||||
import { t } from '@/locale'
|
||||
import diyGroup from '@/addon/components/diy/group/index.vue'
|
||||
import { getFormRecord } from '@/app/api/diy_form'
|
||||
|
||||
const { setShare } = useShare()
|
||||
|
||||
const diy = useDiyForm({
|
||||
needLogin: true // 检测登录
|
||||
})
|
||||
|
||||
onLoad((data: any) => {
|
||||
if(data.form_record_id) {
|
||||
uni.setStorageSync('personalFormRecordId', data.form_record_id)
|
||||
}
|
||||
})
|
||||
onUnload(()=>{
|
||||
uni.removeStorageSync('personalFormRecordId')
|
||||
})
|
||||
|
||||
const diyGroupRef = ref(null)
|
||||
|
||||
const wxPrivacyPopupRef: any = ref(null)
|
||||
|
||||
const requestData = computed(() => {
|
||||
return diy.requestData;
|
||||
})
|
||||
|
||||
const finishFn = () => {
|
||||
redirect({
|
||||
url: '/app/pages/index/index',
|
||||
mode: 'reLaunch'
|
||||
});
|
||||
}
|
||||
|
||||
diy.onLoad((data: any) => {
|
||||
let share = data.share ? data.share : null;
|
||||
setShare(share);
|
||||
diyGroupRef.value?.refresh();
|
||||
|
||||
getFormRecord({
|
||||
record_id: data.form_record_id
|
||||
}).then((res: any) => {
|
||||
let formDetailData = {}
|
||||
if(res.data && res.data.recordsFieldList){
|
||||
res.data.recordsFieldList.forEach((item: any) => {
|
||||
formDetailData[item.field_key] = item.field_value;
|
||||
})
|
||||
}
|
||||
diy.data.value.forEach((item: any) => {
|
||||
if(formDetailData[item.id]){
|
||||
try {
|
||||
item.field.value = JSON.parse(formDetailData[item.id])
|
||||
} catch (e) {
|
||||
item.field.value = formDetailData[item.id]
|
||||
}
|
||||
}
|
||||
});
|
||||
}).catch(() => {
|
||||
})
|
||||
// #ifdef MP
|
||||
nextTick(() => {
|
||||
if (wxPrivacyPopupRef.value) wxPrivacyPopupRef.value.proactive();
|
||||
})
|
||||
// #endif
|
||||
});
|
||||
|
||||
// 监听页面显示
|
||||
diy.onShow((data: any) => {
|
||||
let share = data.share ? data.share : null;
|
||||
if (share) {
|
||||
setShare(share);
|
||||
}
|
||||
diyGroupRef.value?.refresh();
|
||||
// #ifdef MP
|
||||
nextTick(() => {
|
||||
if (wxPrivacyPopupRef.value) wxPrivacyPopupRef.value.proactive();
|
||||
})
|
||||
// #endif
|
||||
});
|
||||
|
||||
// 监听页面隐藏
|
||||
diy.onHide();
|
||||
|
||||
// 监听页面卸载
|
||||
diy.onUnload();
|
||||
|
||||
// 监听滚动事件
|
||||
diy.onPageScroll()
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import '@/styles/diy.scss';
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.diy-template-wrap {
|
||||
/* #ifdef MP */
|
||||
.child-diy-template-wrap {
|
||||
::v-deep .diy-group {
|
||||
> .draggable-element.top-fixed-diy {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
}
|
||||
</style>
|
||||
@ -53,7 +53,7 @@
|
||||
<view class="w-[14.28%] flex flex-col justify-center items-center">
|
||||
<view v-if="filteredDate(item)"
|
||||
class="w-[74rpx] h-[92rpx] bg-[#f4f4f4] text-[var(--text-color-light6)] box-border py-[10rpx] rounded-[8rpx] flex flex-col items-center"
|
||||
:class="{'sigin-bg !text-[#fff]': isVerDate(item),'!bg-[#f9f9f9] border-[1rpx] !text-[var(--text-color-light9)] border-[#f5f5f5] border-solid': !isVerDate(item) && item < state.curDate && (state.curMonth + 1) == (new Date().getMonth() + 1) ,'mb-[20rpx]':isCurrentDate(item),'mb-[30rpx]':!isCurrentDate(item)}"
|
||||
:class="{'sign-bg !text-[#fff]': isVerDate(item),'!bg-[#f9f9f9] border-[1rpx] !text-[var(--text-color-light9)] border-[#f5f5f5] border-solid': !isVerDate(item) && item < state.curDate && (state.curMonth + 1) == (new Date().getMonth() + 1) ,'mb-[20rpx]':isCurrentDate(item),'mb-[30rpx]':!isCurrentDate(item)}"
|
||||
@click="getDayPackFn(item)">
|
||||
<text class="text-[24rpx] leading-[28rpx] mb-[6rpx]">{{ filteredDate(item) }}</text>
|
||||
<view v-if="filteredDate(item)" class="flex items-center justufy-center">
|
||||
@ -76,7 +76,7 @@
|
||||
<view class="w-[14.28%] flex flex-col justify-center items-center mb-[30rpx]">
|
||||
<view v-if="filteredDate(item)"
|
||||
class="w-[74rpx] h-[92rpx] bg-[#F6FAFF] text-[var(--text-color-light6)] box-border py-[10rpx] rounded-[8rpx] flex flex-col items-center"
|
||||
:class="{'sigin-bg !text-[#fff]': isVerDate(item) && active ,'!bg-[#FDFDFD] border-[1rpx] border-[#F0F4FA] border-solid': !isVerDate(item) && item < state.curDate && (state.curMonth + 1) == (new Date().getMonth() + 1) && state.curYear == new Date().getFullYear() ,'mb-[20rpx]':isCurrentDate(item),'mb-[30rpx]':!isCurrentDate(item)}"
|
||||
:class="{'sign-bg !text-[#fff]': isVerDate(item) && active ,'!bg-[#FDFDFD] border-[1rpx] border-[#F0F4FA] border-solid': !isVerDate(item) && item < state.curDate && (state.curMonth + 1) == (new Date().getMonth() + 1) && state.curYear == new Date().getFullYear() ,'mb-[20rpx]':isCurrentDate(item),'mb-[30rpx]':!isCurrentDate(item)}"
|
||||
@click="getDayPackFn(item)">
|
||||
<text class="text-[24rpx] leading-[28rpx] mb-[6rpx]">{{ filteredDate(item) }}</text>
|
||||
<view v-if="filteredDate(item)" class="flex items-center justufy-center">
|
||||
@ -488,7 +488,7 @@ const topStyle = computed(() => {
|
||||
background-color: rgba(102, 102, 102, 0.4);
|
||||
}
|
||||
|
||||
.sigin-bg {
|
||||
.sign-bg {
|
||||
background: linear-gradient(90deg, #FFA359 0%, #FF5426 100%), #F2F2F2;
|
||||
}
|
||||
|
||||
|
||||
@ -68,6 +68,10 @@ 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
|
||||
}
|
||||
})
|
||||
}
|
||||
}, {
|
||||
@ -81,7 +85,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++) {
|
||||
|
||||
@ -38,6 +38,15 @@ import { getPayInfo, pay } from '@/app/api/pay'
|
||||
import { img, redirect, isWeixinBrowser, moneyFormat } from '@/utils/common'
|
||||
import wechat from '@/utils/wechat'
|
||||
|
||||
const prop = defineProps({
|
||||
ignorePay: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// #ifdef H5
|
||||
if (isWeixinBrowser()) wechat.init();
|
||||
// #endif
|
||||
@ -186,7 +195,6 @@ const open = (tradeType: string, tradeId: number, payReturn: string = '', scene:
|
||||
getPayInfo(tradeType, tradeId, obj).then((res: any) => {
|
||||
|
||||
let { data } = res
|
||||
payInfo.value = data
|
||||
|
||||
if (uni.$u.test.isEmpty(data)) {
|
||||
uni.showToast({ title: t('pay.notObtainedInfo'), icon: 'none' })
|
||||
@ -196,6 +204,12 @@ const open = (tradeType: string, tradeId: number, payReturn: string = '', scene:
|
||||
toPayResult()
|
||||
return
|
||||
}
|
||||
payInfo.value = data
|
||||
if(prop.ignorePay) {
|
||||
data.pay_type_list = data.pay_type_list.filter((item: any) => {
|
||||
return !prop.ignorePay.includes(item.key)
|
||||
})
|
||||
}
|
||||
type.value = data.pay_type_list[0] ? data.pay_type_list[0].key : ''
|
||||
show.value = true
|
||||
repeat.value = false
|
||||
|
||||
84
uni-app/src/components/pop-ads/pop-ads.vue
Normal file
84
uni-app/src/components/pop-ads/pop-ads.vue
Normal file
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<view @touchmove.prevent.stop class="share-popup">
|
||||
<u-popup :show="adsPopShow" mode="center" @close="adsPopupClose" overlayOpacity="0.3" bgColor="transparent">
|
||||
<view @touchmove.prevent.stop class="flex flex-col items-center" v-if="data && data.imgUrl">
|
||||
<image :src="img(data.imgUrl)" :style="popWindowStyle()" @click="diyStore.toRedirect(data.link)"/>
|
||||
<text @click="adsPopupClose" class="mt-[50rpx] nc-iconfont nc-icon-cuohaoV6xx1 !text-[50rpx] text-[#fff]"></text>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onMounted, nextTick } from 'vue';
|
||||
import { redirect, img } from '@/utils/common';
|
||||
import useDiyStore from '@/app/stores/diy';
|
||||
const diyStore = useDiyStore();
|
||||
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
})
|
||||
|
||||
const data = computed(() => {
|
||||
return props.data.popWindow;
|
||||
})
|
||||
|
||||
const adsPopShow = ref(false);
|
||||
onMounted(() => {
|
||||
nextTick(() => {
|
||||
if (data.value.count == 'always'){
|
||||
uni.removeStorageSync(data.value.id + '_pop_window_count');
|
||||
}
|
||||
if (uni.getStorageSync('isOnLoad')){
|
||||
adsPopupShow()
|
||||
uni.removeStorageSync('isOnLoad')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
const popWindowStyle =() => {
|
||||
// 做大展示宽高
|
||||
const MAX_WIDTH = 290;
|
||||
const MAX_HEIGHT = 410;
|
||||
// 参照宽高
|
||||
const REFER_WIDTH = 290;
|
||||
const REFER_HEIGHT = 290;
|
||||
|
||||
const scale = data.value.imgHeight / data.value.imgWidth;
|
||||
let width, height;
|
||||
if (scale <= REFER_HEIGHT / REFER_WIDTH) {
|
||||
width = MAX_WIDTH;
|
||||
height = width * scale;
|
||||
} else {
|
||||
height = MAX_HEIGHT;
|
||||
width = height / scale;
|
||||
}
|
||||
|
||||
return `height:${height * 2}rpx;width:${width * 2}rpx;`;
|
||||
}
|
||||
|
||||
const adsPopupShow = () => {
|
||||
// 装修模式下刷新
|
||||
if (diyStore.mode == 'decorate' || !data.value.show) return false
|
||||
const popWindowCount = uni.getStorageSync(data.value.id + '_pop_window_count');
|
||||
if (popWindowCount === 'always' || popWindowCount == '') {
|
||||
adsPopShow.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
const adsPopupClose = () => {
|
||||
adsPopShow.value = false;
|
||||
uni.setStorageSync(data.value.id + '_pop_window_count', data.value.count);
|
||||
}
|
||||
|
||||
// onBeforeUnmount(()=>{
|
||||
// uni.removeStorageSync(data.value.id + '_pop_window_count');
|
||||
// })
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
@ -71,7 +71,7 @@ const props = defineProps({
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
copyUrl: { // 例 "/wap/addon/shop_fenxiao/pages/goods"
|
||||
copyUrl: { // 例 "/wap/addon/shop/pages/goods"
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<template v-if="tabbarShow && tabbar && Object.keys(tabbar).length">
|
||||
<template v-if="tabbar && Object.keys(tabbar).length">
|
||||
<u-tabbar :value="value" zIndex="9999" :fixed="true" :placeholder="true" :safeAreaInsetBottom="true" :inactive-color="tabbar.value.textColor" :active-color="tabbar.value.textHoverColor" :border="props.border" class="custom-tabbar">
|
||||
<template v-for="item in tabbar.value.list">
|
||||
<u-tabbar-item class="py-[5rpx]" :custom-style="{'background-color': tabbar.value.backgroundColor}" :text="item.text" :icon="img(value == item.link.url ? item.iconSelectPath : item.iconPath)" :name="item.link.url" v-if="tabbar.value.type == 1" @click="itemBtn(item.link.url)"></u-tabbar-item>
|
||||
@ -15,7 +15,6 @@
|
||||
import { reactive, computed, watch, nextTick, getCurrentInstance } from 'vue'
|
||||
import { redirect, currRoute, currShareRoute, img } from '@/utils/common'
|
||||
import useConfigStore from '@/stores/config'
|
||||
import useSystemStore from '@/stores/system'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
|
||||
const props = defineProps({
|
||||
@ -48,10 +47,6 @@ if (!addon && configStore.addon) {
|
||||
|
||||
const tabbar: any = reactive({})
|
||||
|
||||
const tabbarShow = computed(() => {
|
||||
return currRoute() != '/app/pages/index/tabbar'
|
||||
})
|
||||
|
||||
const setTabbar = () => {
|
||||
let list = cloneDeep(useConfigStore().tabbarList);
|
||||
if (list.length == 1) {
|
||||
@ -132,6 +127,15 @@ if (!props.addon) {
|
||||
, { deep: true, immediate: true }
|
||||
)
|
||||
}
|
||||
watch(
|
||||
() => useConfigStore().tabbarList,
|
||||
(newValue, oldValue) => {
|
||||
if (newValue && newValue.length) {
|
||||
setTabbar()
|
||||
}
|
||||
},
|
||||
{ deep: true }
|
||||
)
|
||||
|
||||
const value = computed(() => {
|
||||
let query: any = currShareRoute().params;
|
||||
|
||||
@ -192,7 +192,7 @@ defineExpose({
|
||||
}
|
||||
|
||||
.privacy-desc {
|
||||
font-size: 28rpx;
|
||||
font-size: 24rpx;
|
||||
color: #555;
|
||||
line-height: 1.5;
|
||||
text-align: left;
|
||||
@ -210,15 +210,15 @@ defineExpose({
|
||||
|
||||
.privacy-button-btn {
|
||||
color: #FFF;
|
||||
font-size: 30rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
line-height: 80rpx;
|
||||
width: 180rpx;
|
||||
line-height: 66rpx;
|
||||
text-align: center;
|
||||
height: 80rpx;
|
||||
border-radius: 10rpx;
|
||||
height: 66rpx;
|
||||
border-radius: 16rpx;
|
||||
border: none;
|
||||
background: #07c160;
|
||||
flex: 1;
|
||||
margin-right: 30rpx;
|
||||
justify-content: center;
|
||||
}
|
||||
@ -233,7 +233,7 @@ defineExpose({
|
||||
}
|
||||
|
||||
.bg-agree {
|
||||
margin-right: 0rpx;
|
||||
// margin-right: 0rpx;
|
||||
}
|
||||
.privacy-popup-wrap {
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
|
||||
@ -115,6 +115,11 @@ export function useDiy(params: any = {}) {
|
||||
let sources = JSON.parse(requestData.value); // todo diy的结构应该后台处理好,前端就不需要再转换了
|
||||
|
||||
diyData.global = sources.global;
|
||||
// 用于区分微页面之间弹窗的id
|
||||
if (diyData.global.popWindow && diyData.global.popWindow.show) {
|
||||
diyData.global.popWindow.id = requestData.id;
|
||||
}
|
||||
|
||||
diyData.value = sources.value;
|
||||
diyData.value.forEach((item: any, index) => {
|
||||
item.pageStyle = '';
|
||||
|
||||
@ -79,6 +79,9 @@ export function useDiyForm(params: any = {}) {
|
||||
loading.value = false;
|
||||
}
|
||||
// #endif
|
||||
if (option.form_record_id) {
|
||||
requestData.form_record_id = option.form_record_id;
|
||||
}
|
||||
|
||||
form_id.value = option.form_id || '';
|
||||
// if (name.value == '') name.value = option.name || '';
|
||||
@ -117,15 +120,15 @@ export function useDiyForm(params: any = {}) {
|
||||
if (!form_id.value) return; // 空值情况下不调用接口
|
||||
|
||||
// 填写万能表单需要检测登录
|
||||
if (needLogin.value && !getToken()) {
|
||||
useLogin().setLoginBack({
|
||||
url: '/app/pages/index/diy_form',
|
||||
param: {
|
||||
form_id: form_id.value
|
||||
}
|
||||
})
|
||||
return;
|
||||
}
|
||||
// if (needLogin.value && !getToken()) {
|
||||
// useLogin().setLoginBack({
|
||||
// url: '/app/pages/index/diy_form',
|
||||
// param: {
|
||||
// form_id: form_id.value
|
||||
// }
|
||||
// })
|
||||
// return;
|
||||
// }
|
||||
|
||||
getDiyFormInfo({
|
||||
form_id: form_id.value,
|
||||
|
||||
@ -323,8 +323,8 @@ export function useLogin() {
|
||||
scopes: params.scopes
|
||||
}).then((res: any) => {
|
||||
uni.setStorageSync('wechat_login_back', true) // 微信公众号手动授权登录回调标识
|
||||
location.replace(res.data.url);
|
||||
// location.href = res.data.url
|
||||
// location.replace(res.data.url);
|
||||
location.href = res.data.url
|
||||
})
|
||||
|
||||
// #endif
|
||||
|
||||
@ -9,9 +9,6 @@ const t = (message: string) => {
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
route = '/' + (getCurrentInstance()?.root.ctx.$scope.__route__ || useSystemStore().currRoute)
|
||||
if (route == '/app/pages/index/tabbar' && useSystemStore().currTabbar && useSystemStore().currTabbar.path) {
|
||||
route = useSystemStore().currTabbar.path
|
||||
}
|
||||
// #endif
|
||||
const file = language.getFileKey(route)
|
||||
const key = `${ file.fileKey }.${ message }`
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
"pages.member.detailed_account": "流水明细",
|
||||
"pages.member.index": "",
|
||||
"pages.member.personal": "个人资料",
|
||||
"pages.member.personal_form": "个人资料",
|
||||
"pages.member.contact": "客服",
|
||||
"pages.pay.browser": "支付",
|
||||
"pages.pay.result": "",
|
||||
|
||||
@ -142,5 +142,6 @@
|
||||
"o2o.soldOut": "已售",
|
||||
"o2o.orderNo": "订单号",
|
||||
"o2o.actualPayment": "实付款",
|
||||
"o2o.orderDetail": "详情"
|
||||
"o2o.orderDetail": "详情",
|
||||
"notHave": "无"
|
||||
}
|
||||
@ -95,4 +95,4 @@
|
||||
}
|
||||
},
|
||||
"fallbackLocale": "zh-Hans"
|
||||
}
|
||||
}
|
||||
@ -16,12 +16,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "app/pages/index/tabbar",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "app/pages/auth/index",
|
||||
"style": {
|
||||
@ -301,6 +295,16 @@
|
||||
},
|
||||
"needLogin": true
|
||||
},
|
||||
{
|
||||
"path": "personal_form",
|
||||
"style": {
|
||||
// #ifndef H5
|
||||
"navigationStyle": "custom",
|
||||
// #endif
|
||||
"navigationBarTitleText": "%pages.member.personal_form%"
|
||||
},
|
||||
"needLogin": true
|
||||
},
|
||||
{
|
||||
"path": "point",
|
||||
"style": {
|
||||
@ -379,9 +383,6 @@
|
||||
},
|
||||
{
|
||||
"pagePath": "app/pages/index/nosite"
|
||||
},
|
||||
{
|
||||
"pagePath": "app/pages/index/tabbar"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@ -61,24 +61,25 @@ const useMemberStore = defineStore('member', {
|
||||
// if (useConfigStore().login.is_auth_register) {
|
||||
uni.setStorageSync('autoLoginLock', true) // todo 普通账号退出登录,在进行三方账号登录不会自动登录
|
||||
// }
|
||||
let clearStorage = () =>{
|
||||
removeToken()
|
||||
uni.removeStorageSync('wap_member_info');
|
||||
// uni.removeStorageSync('openid');
|
||||
uni.removeStorageSync('unionid');
|
||||
uni.removeStorageSync('isBindMobile');
|
||||
uni.removeStorageSync('nickname');
|
||||
uni.removeStorageSync('avatar');
|
||||
// 可能重复请求微信获取手机号接口
|
||||
uni.removeStorageSync('wap_member_mobile');
|
||||
uni.removeStorageSync('wap_member_id');
|
||||
uni.removeStorageSync('wap_member_not_control_mobile');
|
||||
isRedirect && redirect({ url: '/app/pages/index/index', mode: 'switchTab' })
|
||||
|
||||
}
|
||||
logout().then(() => {
|
||||
removeToken()
|
||||
uni.removeStorageSync('wap_member_info');
|
||||
// uni.removeStorageSync('openid');
|
||||
uni.removeStorageSync('unionid');
|
||||
uni.removeStorageSync('isBindMobile');
|
||||
uni.removeStorageSync('nickname');
|
||||
uni.removeStorageSync('avatar');
|
||||
isRedirect && redirect({ url: '/app/pages/index/index', mode: 'switchTab' })
|
||||
clearStorage()
|
||||
}).catch(() => {
|
||||
removeToken()
|
||||
uni.removeStorageSync('wap_member_info');
|
||||
// uni.removeStorageSync('openid');
|
||||
uni.removeStorageSync('unionid');
|
||||
uni.removeStorageSync('isBindMobile');
|
||||
uni.removeStorageSync('nickname');
|
||||
uni.removeStorageSync('avatar');
|
||||
isRedirect && redirect({ url: '/app/pages/index/index', mode: 'switchTab' })
|
||||
clearStorage()
|
||||
})
|
||||
},
|
||||
// 一键绑定手机号
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { getInitInfo, getSiteInfo } from '@/app/api/system'
|
||||
import { getInitInfo, getSiteInfo,getMemberMobileExist } from '@/app/api/system'
|
||||
import useConfigStore from '@/stores/config'
|
||||
import useMemberStore from '@/stores/member'
|
||||
import { isWeixinBrowser } from '@/utils/common'
|
||||
@ -15,7 +15,7 @@ interface System {
|
||||
menuButtonInfo: any, // 如果是小程序,获取右上角胶囊的尺寸信息
|
||||
shareCallback: any, // 分享回调
|
||||
defaultPositionAddress: any,
|
||||
diyAddressInfo: any // 定位信息
|
||||
diyAddressInfo: any, // 定位信息
|
||||
currTabbar: {
|
||||
path: string,
|
||||
query: object
|
||||
@ -108,6 +108,7 @@ const useSystemStore = defineStore('system', {
|
||||
|
||||
// 如果会员已存在则小程序端快捷登录时不再弹出授权弹框
|
||||
uni.setStorageSync('member_exist', data.member_exist)
|
||||
|
||||
|
||||
this.initStatus = 'finish'; // 初始化完成
|
||||
|
||||
@ -120,6 +121,14 @@ const useSystemStore = defineStore('system', {
|
||||
|
||||
this.getMenuButtonInfoFn();
|
||||
},
|
||||
// 如果已有手机号,就不弹出绑定手机号弹框
|
||||
getMemberMobileExistFn (){
|
||||
getMemberMobileExist({
|
||||
openid: uni.getStorageSync('openid')
|
||||
}).then((res:any)=>{
|
||||
uni.setStorageSync('member_mobile_exist', res.data.member_mobile_exist)
|
||||
})
|
||||
},
|
||||
getMenuButtonInfoFn() {
|
||||
// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
|
||||
// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
|
||||
|
||||
@ -144,11 +144,13 @@
|
||||
}
|
||||
}
|
||||
.detail-two-content{
|
||||
padding: 0rpx 10rpx;
|
||||
// padding: 0rpx 10rpx;
|
||||
line-height: 1;
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 34rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.detail-two-content-label{
|
||||
|
||||
}
|
||||
@ -158,6 +160,7 @@
|
||||
word-break: break-word;
|
||||
white-space: pre-wrap;
|
||||
text-align: right;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
@font-face {
|
||||
font-family: "nc-iconfont"; /* Project id 4567203 */
|
||||
src: url('//at.alicdn.com/t/c/font_4567203_7mppfs5063j.woff2?t=1740450888842') format('woff2'),
|
||||
url('//at.alicdn.com/t/c/font_4567203_7mppfs5063j.woff?t=1740450888842') format('woff'),
|
||||
url('//at.alicdn.com/t/c/font_4567203_7mppfs5063j.ttf?t=1740450888842') format('truetype');
|
||||
src: url('//at.alicdn.com/t/c/font_4567203_90bek9j2oeh.woff2?t=1750242885299') format('woff2'),
|
||||
url('//at.alicdn.com/t/c/font_4567203_90bek9j2oeh.woff?t=1750242885299') format('woff'),
|
||||
url('//at.alicdn.com/t/c/font_4567203_90bek9j2oeh.ttf?t=1750242885299') format('truetype');
|
||||
}
|
||||
|
||||
.nc-iconfont {
|
||||
@ -13,6 +13,386 @@
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.nc-icon-qianV6xx:before {
|
||||
content: "\e784";
|
||||
}
|
||||
|
||||
.nc-icon-mimaV6xx:before {
|
||||
content: "\e8a6";
|
||||
}
|
||||
|
||||
.nc-icon-yanzhengmaV6xx:before {
|
||||
content: "\e8a7";
|
||||
}
|
||||
|
||||
.nc-icon-bianjiV6xx2:before {
|
||||
content: "\e8a4";
|
||||
}
|
||||
|
||||
.nc-icon-fenxiangV6mm-1:before {
|
||||
content: "\e89c";
|
||||
}
|
||||
|
||||
.nc-icon-a-Group1036V6xx:before {
|
||||
content: "\e77b";
|
||||
}
|
||||
|
||||
.nc-icon-shanchu-yuangaiV6xx:before {
|
||||
content: "\e6eb";
|
||||
}
|
||||
|
||||
.nc-icon-hezuogonghuoshangV6xx:before {
|
||||
content: "\e88b";
|
||||
}
|
||||
|
||||
.nc-icon-hezuodianpu:before {
|
||||
content: "\e85b";
|
||||
}
|
||||
|
||||
.nc-icon-gongyingshangxitong:before {
|
||||
content: "\e852";
|
||||
}
|
||||
|
||||
.nc-icon-shangchengxitong:before {
|
||||
content: "\e858";
|
||||
}
|
||||
|
||||
.nc-icon-fenzhangshezhi:before {
|
||||
content: "\e843";
|
||||
}
|
||||
|
||||
.nc-icon-xuanpinpingtai:before {
|
||||
content: "\e845";
|
||||
}
|
||||
|
||||
.nc-icon-a-Maskgroup:before {
|
||||
content: "\e840";
|
||||
}
|
||||
|
||||
.nc-icon-fenzhangguanli:before {
|
||||
content: "\e84b";
|
||||
}
|
||||
|
||||
.nc-icon-gongyingshangdingdan:before {
|
||||
content: "\e84d";
|
||||
}
|
||||
|
||||
.nc-icon-gongyingshangshangpin:before {
|
||||
content: "\e84e";
|
||||
}
|
||||
|
||||
.nc-icon-shuaxinV6mm2:before {
|
||||
content: "\e889";
|
||||
}
|
||||
|
||||
.nc-icon-yitiaohuo:before {
|
||||
content: "\e888";
|
||||
}
|
||||
|
||||
.nc-icon-shangchengdingdan:before {
|
||||
content: "\e837";
|
||||
}
|
||||
|
||||
.nc-icon-shangchengshangpin:before {
|
||||
content: "\e83f";
|
||||
}
|
||||
|
||||
.nc-icon-gouwudaiV6xx1:before {
|
||||
content: "\e886";
|
||||
}
|
||||
|
||||
.nc-icon-dianpuV6xx1:before {
|
||||
content: "\e880";
|
||||
}
|
||||
|
||||
.nc-icon-youhuiquanV6xx2:before {
|
||||
content: "\e87a";
|
||||
}
|
||||
|
||||
.nc-icon-yinhangka2:before {
|
||||
content: "\e83e";
|
||||
}
|
||||
|
||||
.nc-icon-huiyuantixian:before {
|
||||
content: "\e839";
|
||||
}
|
||||
|
||||
.nc-icon-a-Financing-tworongzi2:before {
|
||||
content: "\e825";
|
||||
}
|
||||
|
||||
.nc-icon-a-Weixin-marketweixindianshang:before {
|
||||
content: "\e821";
|
||||
}
|
||||
|
||||
.nc-icon-a-Repairbianji:before {
|
||||
content: "\e818";
|
||||
}
|
||||
|
||||
.nc-icon-a-Diskcipan:before {
|
||||
content: "\e81c";
|
||||
}
|
||||
|
||||
.nc-icon-a-Historylishijilu:before {
|
||||
content: "\e81b";
|
||||
}
|
||||
|
||||
.nc-icon-a-Deliveryjiaohuo:before {
|
||||
content: "\e81a";
|
||||
}
|
||||
|
||||
.nc-icon-dianpuV6xx:before {
|
||||
content: "\e871";
|
||||
}
|
||||
|
||||
.nc-icon-Frame:before {
|
||||
content: "\e816";
|
||||
}
|
||||
|
||||
.nc-icon-zhifujianshu1:before {
|
||||
content: "\e815";
|
||||
}
|
||||
|
||||
.nc-icon-jiagoushuliang:before {
|
||||
content: "\e814";
|
||||
}
|
||||
|
||||
.nc-icon-xiadanshu:before {
|
||||
content: "\e813";
|
||||
}
|
||||
|
||||
.nc-icon-shangpinliulanliang:before {
|
||||
content: "\e812";
|
||||
}
|
||||
|
||||
.nc-icon-fenxiaodengji:before {
|
||||
content: "\e807";
|
||||
}
|
||||
|
||||
.nc-icon-fenxiaoguanli:before {
|
||||
content: "\e809";
|
||||
}
|
||||
|
||||
.nc-icon-dianzimiandan:before {
|
||||
content: "\e806";
|
||||
}
|
||||
|
||||
.nc-icon-fenxiaodingdan:before {
|
||||
content: "\e804";
|
||||
}
|
||||
|
||||
.nc-icon-fenxiaoshang:before {
|
||||
content: "\e808";
|
||||
}
|
||||
|
||||
.nc-icon-hexiaoyuan:before {
|
||||
content: "\e805";
|
||||
}
|
||||
|
||||
.nc-icon-shangpintongji:before {
|
||||
content: "\e80a";
|
||||
}
|
||||
|
||||
.nc-icon-fenxiaogaikuang:before {
|
||||
content: "\e802";
|
||||
}
|
||||
|
||||
.nc-icon-fenxiaoshangpin:before {
|
||||
content: "\e801";
|
||||
}
|
||||
|
||||
.nc-icon-yingyongliebiao:before {
|
||||
content: "\e80b";
|
||||
}
|
||||
|
||||
.nc-icon-huodongliebiao:before {
|
||||
content: "\e80c";
|
||||
}
|
||||
|
||||
.nc-icon-hexiaojilu:before {
|
||||
content: "\e80d";
|
||||
}
|
||||
|
||||
.nc-icon-piliangfahuo:before {
|
||||
content: "\e80e";
|
||||
}
|
||||
|
||||
.nc-icon-fenxiaoshezhi:before {
|
||||
content: "\e80f";
|
||||
}
|
||||
|
||||
.nc-icon-dianpu:before {
|
||||
content: "\e800";
|
||||
}
|
||||
|
||||
.nc-icon-caozuorizhi1:before {
|
||||
content: "\e7ef";
|
||||
}
|
||||
|
||||
.nc-icon-dingdanliebiao:before {
|
||||
content: "\e7f0";
|
||||
}
|
||||
|
||||
.nc-icon-hexiaoguanli:before {
|
||||
content: "\e7ee";
|
||||
}
|
||||
|
||||
.nc-icon-fapiaoguanli:before {
|
||||
content: "\e7ed";
|
||||
}
|
||||
|
||||
.nc-icon-dingdanshezhi:before {
|
||||
content: "\e7ea";
|
||||
}
|
||||
|
||||
.nc-icon-huiyuanbiaoqian:before {
|
||||
content: "\e7eb";
|
||||
}
|
||||
|
||||
.nc-icon-huishouzhan:before {
|
||||
content: "\e7db";
|
||||
}
|
||||
|
||||
.nc-icon-jiesuanzhanghu:before {
|
||||
content: "\e7f1";
|
||||
}
|
||||
|
||||
.nc-icon-guanliyuan1:before {
|
||||
content: "\e7e6";
|
||||
}
|
||||
|
||||
.nc-icon-huiyuanliebiao:before {
|
||||
content: "\e7da";
|
||||
}
|
||||
|
||||
.nc-icon-shangpinfenlei:before {
|
||||
content: "\e7dd";
|
||||
}
|
||||
|
||||
.nc-icon-jiaoseguanli:before {
|
||||
content: "\e7e3";
|
||||
}
|
||||
|
||||
.nc-icon-shangpinliebiao:before {
|
||||
content: "\e7e8";
|
||||
}
|
||||
|
||||
.nc-icon-shangpinpingjia:before {
|
||||
content: "\e7e9";
|
||||
}
|
||||
|
||||
.nc-icon-dianpushezhi:before {
|
||||
content: "\e7e7";
|
||||
}
|
||||
|
||||
.nc-icon-sucaiguanli1:before {
|
||||
content: "\e7f2";
|
||||
}
|
||||
|
||||
.nc-icon-tixianjilu:before {
|
||||
content: "\e7e4";
|
||||
}
|
||||
|
||||
.nc-icon-xiaopiaodayin:before {
|
||||
content: "\e7f3";
|
||||
}
|
||||
|
||||
.nc-icon-shangjiadizhiku:before {
|
||||
content: "\e7e1";
|
||||
}
|
||||
|
||||
.nc-icon-shujudaochu:before {
|
||||
content: "\e7de";
|
||||
}
|
||||
|
||||
.nc-icon-shangpincanshu:before {
|
||||
content: "\e7e0";
|
||||
}
|
||||
|
||||
.nc-icon-tuikuanweiquan:before {
|
||||
content: "\e7f4";
|
||||
}
|
||||
|
||||
.nc-icon-weiyemian:before {
|
||||
content: "\e7f5";
|
||||
}
|
||||
|
||||
.nc-icon-shouyezhuangxiu:before {
|
||||
content: "\e7d9";
|
||||
}
|
||||
|
||||
.nc-icon-xianshizhekou:before {
|
||||
content: "\e7d8";
|
||||
}
|
||||
|
||||
.nc-icon-youhuiquan:before {
|
||||
content: "\e7d7";
|
||||
}
|
||||
|
||||
.nc-icon-zichangaikuang:before {
|
||||
content: "\e7d6";
|
||||
}
|
||||
|
||||
.nc-icon-yunfeimoban:before {
|
||||
content: "\e7f6";
|
||||
}
|
||||
|
||||
.nc-icon-daifukuandingdan:before {
|
||||
content: "\e7fa";
|
||||
}
|
||||
|
||||
.nc-icon-cangkushangpinshuliang:before {
|
||||
content: "\e7f9";
|
||||
}
|
||||
|
||||
.nc-icon-daishouhuodingdan:before {
|
||||
content: "\e7f8";
|
||||
}
|
||||
|
||||
.nc-icon-tuikuan:before {
|
||||
content: "\e7f7";
|
||||
}
|
||||
|
||||
.nc-icon-tuikuandingdan:before {
|
||||
content: "\e7fb";
|
||||
}
|
||||
|
||||
.nc-icon-chushoushangpinshuliang:before {
|
||||
content: "\e7fc";
|
||||
}
|
||||
|
||||
.nc-icon-daifahuodingdan:before {
|
||||
content: "\e7fd";
|
||||
}
|
||||
|
||||
.nc-icon-dingdanliang:before {
|
||||
content: "\e7fe";
|
||||
}
|
||||
|
||||
.nc-icon-xiaoshoue:before {
|
||||
content: "\e7ff";
|
||||
}
|
||||
|
||||
.nc-icon-paihangbangV6xx1:before {
|
||||
content: "\e7e2";
|
||||
}
|
||||
|
||||
.nc-icon-bangdanguanliV6xx:before {
|
||||
content: "\e86d";
|
||||
}
|
||||
|
||||
.nc-icon-bangdanshezhiV6xx:before {
|
||||
content: "\e86e";
|
||||
}
|
||||
|
||||
.nc-icon-zhuanzhangV6xx-1:before {
|
||||
content: "\e86a";
|
||||
}
|
||||
|
||||
.nc-icon-qingliV6xx:before {
|
||||
content: "\e865";
|
||||
}
|
||||
|
||||
.nc-icon-liebiao-xiV6xx1:before {
|
||||
content: "\e863";
|
||||
}
|
||||
|
||||
@ -3,8 +3,6 @@ import { checkNeedLogin } from '@/utils/auth'
|
||||
import { getToken, currRoute, setThemeColor } from '@/utils/common'
|
||||
import { memberLog } from '@/app/api/auth'
|
||||
import { useShare } from '@/hooks/useShare'
|
||||
import tabbarJson from '@/tabbar.json'
|
||||
import useSystemStore from '@/stores/system'
|
||||
|
||||
/**
|
||||
* 页面跳转拦截器
|
||||
@ -31,9 +29,6 @@ export const redirectInterceptor = (route: { path: string, query: object }) => {
|
||||
pre_route: getCurrentPages()[0]?.route
|
||||
})
|
||||
|
||||
// #ifdef MP
|
||||
toTabbar(route)
|
||||
// #endif
|
||||
}
|
||||
|
||||
/**
|
||||
@ -65,10 +60,6 @@ export const launchInterceptor = () => {
|
||||
|
||||
// 添加会员访问日志
|
||||
if (getToken()) memberLog({ route: launch.path, params: JSON.stringify(launch.query || {}), pre_route: '' })
|
||||
|
||||
// #ifdef MP
|
||||
toTabbar(launch)
|
||||
// #endif
|
||||
}
|
||||
|
||||
|
||||
@ -94,17 +85,3 @@ const loadShare = () => {
|
||||
if (!shareWhiteList.includes(currRoute() || '')) setShare()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转到tabbar
|
||||
*/
|
||||
const toTabbar = (route: { path: string, query: object }) => {
|
||||
if (tabbarJson.includes(route.path)) {
|
||||
useSystemStore().$patch((state) => {
|
||||
state.currTabbar = route
|
||||
})
|
||||
uni.switchTab({
|
||||
url: '/app/pages/index/tabbar'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user