mirror of
https://gitee.com/niucloud-team/niucloud.git
synced 2025-12-11 17:42:47 +00:00
update uni-app
This commit is contained in:
parent
d01a343c56
commit
ede5f226e0
@ -1,14 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
|
||||
import { launchInterceptor } from '@/utils/interceptor'
|
||||
import { getToken, isWeixinBrowser, getSiteId, currRoute } from '@/utils/common'
|
||||
import { getToken, isWeixinBrowser, getSiteId, currRoute, deepClone } from '@/utils/common'
|
||||
import useMemberStore from '@/stores/member'
|
||||
import useConfigStore from '@/stores/config'
|
||||
import useSystemStore from '@/stores/system'
|
||||
import { useLogin } from '@/hooks/useLogin'
|
||||
import { useShare } from '@/hooks/useShare'
|
||||
|
||||
onLaunch(async(data: any) => {
|
||||
onLaunch((data: any) => {
|
||||
|
||||
// 添加初始化拦截器
|
||||
launchInterceptor()
|
||||
@ -75,96 +75,100 @@
|
||||
});
|
||||
// #endif
|
||||
|
||||
const configStore = useConfigStore()
|
||||
await configStore.getTabbarConfig()
|
||||
await configStore.getLoginConfig()
|
||||
// 获取初始化数据信息
|
||||
useSystemStore().getInitFn(async() => {
|
||||
|
||||
useSystemStore().getMapFn()
|
||||
useSystemStore().getSiteInfoFn()
|
||||
useMemberStore().getMemberLevel()
|
||||
const configStore = useConfigStore()
|
||||
|
||||
try {
|
||||
uni.hideTabBar() // 隐藏tabbar
|
||||
} catch (e) {
|
||||
try {
|
||||
uni.hideTabBar() // 隐藏tabbar
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 判断在登录注册页面账号锁定后不进行请求三方登录注册
|
||||
let url: any = currRoute()
|
||||
if ((['app/pages/auth/index', 'app/pages/auth/login', 'app/pages/auth/register', 'app/pages/auth/resetpwd'].indexOf(url) != -1) && (configStore.login.is_username || configStore.login.is_mobile || configStore.login.is_bind_mobile)) {
|
||||
return false
|
||||
}
|
||||
let loginConfig = uni.getStorageSync('login_config')
|
||||
if (!loginConfig) {
|
||||
loginConfig = deepClone(configStore.login)
|
||||
}
|
||||
|
||||
// 判断是否已登录
|
||||
if (getToken()) {
|
||||
const memberStore: any = useMemberStore()
|
||||
// 判断在登录注册页面账号锁定后不进行请求三方登录注册
|
||||
let url: any = currRoute()
|
||||
if ((['app/pages/auth/index', 'app/pages/auth/login', 'app/pages/auth/register', 'app/pages/auth/resetpwd'].indexOf(url) != -1) &&
|
||||
(loginConfig.is_username || loginConfig.is_mobile || loginConfig.is_bind_mobile)) {
|
||||
return false
|
||||
}
|
||||
|
||||
await memberStore.setToken(getToken(), () => {
|
||||
if (!uni.getStorageSync('openid')) {
|
||||
const memberInfo = useMemberStore().info
|
||||
const login = useLogin()
|
||||
// 判断是否已登录
|
||||
if (getToken()) {
|
||||
const memberStore: any = useMemberStore()
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
if (memberInfo.mobile) uni.setStorageSync('wap_member_mobile', memberInfo.mobile) // 存储会员手机号,防止重复请求微信获取手机号接口
|
||||
if (memberInfo && memberInfo.weapp_openid) {
|
||||
uni.setStorageSync('openid', memberInfo.weapp_openid)
|
||||
} else {
|
||||
login.getAuthCode({ updateFlag: true }) // 更新oppenid
|
||||
}
|
||||
// #endif
|
||||
await memberStore.setToken(getToken(), () => {
|
||||
if (!uni.getStorageSync('openid')) {
|
||||
const memberInfo = useMemberStore().info
|
||||
const login = useLogin()
|
||||
|
||||
// #ifdef H5
|
||||
if (isWeixinBrowser()) {
|
||||
if (memberInfo && memberInfo.wx_openid) {
|
||||
uni.setStorageSync('openid', memberInfo.wx_openid)
|
||||
// #ifdef MP-WEIXIN
|
||||
if (memberInfo.mobile) uni.setStorageSync('wap_member_mobile', memberInfo.mobile) // 存储会员手机号,防止重复请求微信获取手机号接口
|
||||
if (memberInfo && memberInfo.weapp_openid) {
|
||||
uni.setStorageSync('openid', memberInfo.weapp_openid)
|
||||
} else {
|
||||
data.query.code ? login.updateOpenid(data.query.code) : login.getAuthCode({ scopes: 'snsapi_userinfo' })
|
||||
login.getAuthCode({ updateFlag: true }) // 更新oppenid
|
||||
}
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
if (isWeixinBrowser()) {
|
||||
if (memberInfo && memberInfo.wx_openid) {
|
||||
uni.setStorageSync('openid', memberInfo.wx_openid)
|
||||
} else {
|
||||
data.query.code ? login.updateOpenid(data.query.code) : login.getAuthCode({ scopes: 'snsapi_base' })
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
|
||||
}
|
||||
// #endif
|
||||
|
||||
}
|
||||
// 开启强制绑定手机号
|
||||
if (uni.getStorageSync('isbindmobile')) {
|
||||
uni.removeStorageSync('isbindmobile');
|
||||
}
|
||||
|
||||
// 开启强制绑定手机号
|
||||
if (uni.getStorageSync('isbindmobile')) {
|
||||
uni.removeStorageSync('isbindmobile');
|
||||
}
|
||||
if (loginConfig.is_bind_mobile && !memberStore.info.mobile) {
|
||||
// 强制绑定手机号
|
||||
uni.setStorageSync('isbindmobile', true)
|
||||
}
|
||||
})
|
||||
|
||||
if (configStore.login.is_bind_mobile && !memberStore.info.mobile) {
|
||||
// 强制绑定手机号
|
||||
uni.setStorageSync('isbindmobile', true)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
if (!getToken()) {
|
||||
|
||||
// #ifdef MP
|
||||
// 小程序 会员退出后不会自动登录
|
||||
if (uni.getStorageSync('autoLoginLock')) return;
|
||||
// #endif
|
||||
|
||||
const login = useLogin()
|
||||
|
||||
// #ifdef MP
|
||||
// 判断是否开启第三方自动注册登录
|
||||
if (configStore.login.is_auth_register) {
|
||||
// 第三方平台自动登录
|
||||
login.getAuthCode()
|
||||
}
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
if (isWeixinBrowser()) {
|
||||
if (uni.getStorageSync('autoLoginLock') && !uni.getStorageSync('wechat_login_back')) return;
|
||||
if (configStore.login.is_auth_register || uni.getStorageSync('wechat_login_back')) {
|
||||
uni.removeStorageSync('wechat_login_back') // 删除微信公众号手动授权登录回调标识
|
||||
data.query.code ? login.authLogin({ code: data.query.code }) : login.getAuthCode({ scopes: 'snsapi_userinfo' })
|
||||
if (!getToken()) {
|
||||
|
||||
// #ifdef MP
|
||||
// 小程序 会员退出后不会自动登录
|
||||
if (uni.getStorageSync('autoLoginLock')) return;
|
||||
// #endif
|
||||
|
||||
const login = useLogin()
|
||||
|
||||
// #ifdef MP
|
||||
// 判断是否开启第三方自动注册登录
|
||||
if (loginConfig.is_auth_register) {
|
||||
// 第三方平台自动登录
|
||||
login.getAuthCode()
|
||||
}
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
if (isWeixinBrowser()) {
|
||||
if (uni.getStorageSync('autoLoginLock') && !uni.getStorageSync('wechat_login_back')) return;
|
||||
if (loginConfig.is_auth_register || uni.getStorageSync('wechat_login_back')) {
|
||||
uni.removeStorageSync('wechat_login_back') // 删除微信公众号手动授权登录回调标识
|
||||
data.query.code ? login.authLogin({ code: data.query.code }) : login.getAuthCode({ scopes: 'snsapi_base' })
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
.draggable-element {
|
||||
.ignore-draggable-element, .draggable-element {
|
||||
&.decorate {
|
||||
&:hover:before {
|
||||
content: '';
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
<link rel="stylesheet" href="../../../../../../admin/src/styles/icon/addon-iconfont.css">
|
||||
<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" />
|
||||
@ -50,6 +49,9 @@
|
||||
<template v-if="component.componentName == 'CarouselSearch'">
|
||||
<diy-carousel-search :scrollBool="diyGroup.componentsScrollBool.CarouselSearch" :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'PictureShow'">
|
||||
<diy-picture-show :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" />
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="diyStore.mode == '' && data.global.bottomTabBarSwitch">
|
||||
@ -92,4 +94,4 @@
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './index.scss';
|
||||
</style>
|
||||
</style>
|
||||
@ -1,4 +1,4 @@
|
||||
import { ref, reactive, onMounted, nextTick, computed } from 'vue';
|
||||
import { ref, onMounted, nextTick, computed } from 'vue';
|
||||
import Sortable from 'sortablejs';
|
||||
import { range } from 'lodash-es';
|
||||
import { onPageScroll, onHide, onShow } from '@dcloudio/uni-app';
|
||||
@ -60,13 +60,12 @@ export function useDiyGroup(params: any = {}) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// 监听页面加载完成
|
||||
const onMountedLifeCycle = () => {
|
||||
onMounted(() => {
|
||||
// #ifdef H5
|
||||
if (diyStore.mode == 'decorate') {
|
||||
var el = document.getElementById('componentList');
|
||||
var el: any = document.getElementById('componentList');
|
||||
const sortable = Sortable.create(el, {
|
||||
draggable: '.draggable-element',
|
||||
animation: 200,
|
||||
|
||||
@ -17,8 +17,8 @@ export function mobileLogin(data : AnyObject) {
|
||||
/**
|
||||
* 获取登录配置
|
||||
*/
|
||||
export function getConfig() {
|
||||
return request.get('login/config')
|
||||
export function getConfig(params: Record<string, any>) {
|
||||
return request.get('login/config', params)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -4,56 +4,56 @@ import request from '@/utils/request'
|
||||
* 获取验证码
|
||||
*/
|
||||
export function getCaptcha() {
|
||||
return request.get('captcha', {}, {showErrorMessage: true})
|
||||
return request.get('captcha', {}, { showErrorMessage: true })
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取微信公众号授权码
|
||||
*/
|
||||
export function getWechatAuthCode(data: AnyObject) {
|
||||
return request.get('wechat/codeurl', data, {showErrorMessage: false })
|
||||
return request.get('wechat/codeurl', data, { showErrorMessage: false })
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步微信信息
|
||||
*/
|
||||
export function wechatSync(data: AnyObject) {
|
||||
return request.post('wechat/sync', data, {showErrorMessage: false})
|
||||
return request.post('wechat/sync', data, { showErrorMessage: false })
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取协议信息
|
||||
*/
|
||||
export function getAgreementInfo(key: string) {
|
||||
return request.get(`agreement/${key}`)
|
||||
return request.get(`agreement/${ key }`)
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置密码
|
||||
*/
|
||||
export function resetPassword(data: AnyObject) {
|
||||
return request.post(`password/reset`, data, {showErrorMessage: true})
|
||||
return request.post(`password/reset`, data, { showErrorMessage: true })
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送短信验证码
|
||||
*/
|
||||
export function sendSms(data: AnyObject) {
|
||||
return request.post(`send/mobile/${data.type}`, data, {showErrorMessage: true})
|
||||
return request.post(`send/mobile/${ data.type }`, data, { showErrorMessage: true })
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取微信jssdk config
|
||||
*/
|
||||
export function getWechatSkdConfig(data: AnyObject) {
|
||||
return request.get('wechat/jssdkconfig', data, {showErrorMessage: false})
|
||||
export function getWechatSdkConfig(data: AnyObject) {
|
||||
return request.get('wechat/jssdkconfig', data, { showErrorMessage: false })
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传图片
|
||||
*/
|
||||
export function uploadImage(data: AnyObject) {
|
||||
return request.upload('file/image', data, {showErrorMessage: true})
|
||||
return request.upload('file/image', data, { showErrorMessage: true })
|
||||
}
|
||||
|
||||
/**
|
||||
@ -81,7 +81,7 @@ export function getSiteInfo() {
|
||||
* 获取微信小程序订阅消息模板id
|
||||
*/
|
||||
export function getWeappTemplateId(keys: string) {
|
||||
return request.get('weapp/subscribemsg', {keys})
|
||||
return request.get('weapp/subscribemsg', { keys })
|
||||
}
|
||||
|
||||
/**
|
||||
@ -89,7 +89,7 @@ export function getWeappTemplateId(keys: string) {
|
||||
* @param pid
|
||||
*/
|
||||
export function getAreaListByPid(pid: number = 0) {
|
||||
return request.get(`area/list_by_pid/${pid}`)
|
||||
return request.get(`area/list_by_pid/${ pid }`)
|
||||
}
|
||||
|
||||
/**
|
||||
@ -97,7 +97,7 @@ export function getAreaListByPid(pid: number = 0) {
|
||||
* @param level
|
||||
*/
|
||||
export function getAreatree(level: number = 1) {
|
||||
return request.get(`area/tree/${level}`)
|
||||
return request.get(`area/tree/${ level }`)
|
||||
}
|
||||
|
||||
/**
|
||||
@ -105,7 +105,7 @@ export function getAreatree(level: number = 1) {
|
||||
* @param code
|
||||
*/
|
||||
export function getAreaByCode(code: number | string) {
|
||||
return request.get(`area/code/${code}`)
|
||||
return request.get(`area/code/${ code }`)
|
||||
}
|
||||
|
||||
/**
|
||||
@ -113,7 +113,7 @@ export function getAreaByCode(code: number | string) {
|
||||
* @param params
|
||||
*/
|
||||
export function getAddressByLatlng(params: Record<string, any>) {
|
||||
return request.get(`area/address_by_latlng`, params, {showErrorMessage: true})
|
||||
return request.get(`area/address_by_latlng`, params, { showErrorMessage: true })
|
||||
}
|
||||
|
||||
/**
|
||||
@ -145,3 +145,10 @@ export function getMap() {
|
||||
export function getMsgJumpPath(params: Record<string, any>) {
|
||||
return request.get('weapp/getMsgJumpPath', params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取初始化数据信息
|
||||
*/
|
||||
export function getInitInfo(params: Record<string, any>) {
|
||||
return request.get('init', params)
|
||||
}
|
||||
@ -3,7 +3,7 @@
|
||||
<view :style="maskLayer"></view>
|
||||
|
||||
<view class="diy-active-cube relative">
|
||||
<view class="active-cube-wrap p-[20rpx] pb-[24rpx]">
|
||||
<view class="active-cube-wrap pt-[28rpx] px-[20rpx] pb-[24rpx]">
|
||||
<view class="flex items-center" v-if="diyComponent.titleStyle.value == 'style-1'">
|
||||
<view class="mr-[10rpx] font-500 text-[30rpx]" :style="{color: diyComponent.titleColor }" @click="diyStore.toRedirect(diyComponent.textLink)">{{ diyComponent.text }}</view>
|
||||
<view v-if="diyComponent.subTitle.text" @click="diyStore.toRedirect(diyComponent.subTitle.link)" class="text-center text-[22rpx] rounded-[40rpx] rounded-tl-[10rpx] py-[6rpx] px-[14rpx]" :style="{'color': diyComponent.subTitle.textColor, background: 'linear-gradient(90deg, '+ diyComponent.subTitle.startColor + ', '+ diyComponent.subTitle.endColor + ')'}">{{ diyComponent.subTitle.text }}</view>
|
||||
@ -27,10 +27,17 @@
|
||||
<text class="nc-iconfont nc-icon-youV6xx !text-[26rpx]"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex items-center" v-if="diyComponent.titleStyle.value == 'style-5'">
|
||||
<view class="h-[32rpx] flex items-center" v-if="diyComponent.textImg" @click="diyStore.toRedirect(diyComponent.textLink)">
|
||||
<image class="h-[100%] w-[auto]" :src="img(diyComponent.textImg)" mode="heightFix" />
|
||||
</view>
|
||||
<view v-if="diyComponent.subTitle.text && diyComponent.textImg" class="mx-[16rpx] w-[2rpx] h-[24rpx]" :style="{'background': diyComponent.subTitle.textColor}"></view>
|
||||
<view v-if="diyComponent.subTitle.text" @click="diyStore.toRedirect(diyComponent.subTitle.link)" class="text-center text-[22rpx] py-[6rpx]" :style="{'color': diyComponent.subTitle.textColor, background: 'linear-gradient(90deg, '+ diyComponent.subTitle.startColor + ', '+ diyComponent.subTitle.endColor + ')'}">{{ diyComponent.subTitle.text }}</view>
|
||||
</view>
|
||||
|
||||
<view class="bd flex flex-wrap justify-between">
|
||||
<template v-for="item in diyComponent.list" :key="item.id">
|
||||
<view v-if="diyComponent.blockStyle.value == 'style-1'" @click="diyStore.toRedirect(item.link)" class="item flex justify-between px-[20rpx] py-[30rpx] bg-white mt-[20rpx] rounded-[var(--rounded-mid)]" :style="{ backgroundColor : diyComponent.elementBgColor }">
|
||||
<view v-if="diyComponent.blockStyle.value == 'style-1'" @click="diyStore.toRedirect(item.link)" class="item flex justify-between px-[20rpx] py-[30rpx] bg-white mt-[20rpx] rounded-[var(--rounded-mid)]" :style="commonTempCss(item)">
|
||||
<view class="flex-1 flex items-baseline flex-col">
|
||||
<view class="text-[28rpx] pb-[10rpx] text-[#333]" :style="{ fontWeight : diyComponent.blockStyle.fontWeight }">{{ item.title.text }}</view>
|
||||
<view class="text-[22rpx] text-[#999] pb-[30rpx]">{{ item.subTitle.text }}</view>
|
||||
@ -47,12 +54,13 @@
|
||||
<u-icon name="photo" color="#999" size="50"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="diyComponent.blockStyle.value == 'style-2'" @click="diyStore.toRedirect(item.link)" class="item flex justify-between p-[20rpx] bg-white mt-[20rpx] rounded-[var(--rounded-mid)]" :style="{ backgroundColor : diyComponent.elementBgColor }">
|
||||
|
||||
<view v-if="diyComponent.blockStyle.value == 'style-2'" @click="diyStore.toRedirect(item.link)" class="item h-[150rpx] flex justify-between p-[20rpx] bg-white mt-[20rpx] rounded-[var(--rounded-mid)]" :style="commonTempCss(item)">
|
||||
<view class="flex-1 flex items-baseline flex-col">
|
||||
<view class="text-[26rpx] pb-[20rpx]" :style="{ fontWeight : diyComponent.blockStyle.fontWeight }">{{ item.title.text }}</view>
|
||||
<view class="text-[22rpx] text-gray-500 pb-[20rpx]">{{ item.subTitle.text }}</view>
|
||||
<view class="text-[26rpx] mt-[10rpx] pb-[16rpx]" :style="{ fontWeight : diyComponent.blockStyle.fontWeight }">{{ item.title.text }}</view>
|
||||
<view class="text-[22rpx] text-gray-500 pb-[26rpx]">{{ item.subTitle.text }}</view>
|
||||
<view class="link relative text-[22rpx] leading-[40rpx] flex items-center text-white rounded-[20rpx] h-[40rpx] pl-[20rpx] pr-[10rpx]" :style="btnCss(item.moreTitle)" v-if="item.moreTitle.text">
|
||||
<text class="mr-[8rpx]">{{ item.moreTitle.text }}</text>
|
||||
<text class="mr-[8rpx]" :class="{'italic': diyComponent.blockStyle.btnText == 'italics'}">{{ item.moreTitle.text }}</text>
|
||||
<text class="iconfont iconjiantou-you-cuxiantiao-fill !text-[20rpx] text-[#fff]"></text>
|
||||
</view>
|
||||
</view>
|
||||
@ -67,7 +75,7 @@
|
||||
</view>
|
||||
<scroll-view :scroll-x="true" class="whitespace-nowrap" :id="'warpStyle3-'+diyComponent.id" v-if="diyComponent.blockStyle.value == 'style-3'">
|
||||
<view v-for="(item,index) in diyComponent.list" :key="item.id" class="inline-flex">
|
||||
<view :id="'item'+index+diyComponent.id" @click="diyStore.toRedirect(item.link)" class="flex flex-col items-center justify-between p-[10rpx] bg-white mt-[20rpx] w-[157rpx] h-[200rpx] rounded-[var(--rounded-mid)] box-border" :style="itemStyle3" :class="{'!mr-[0rpx]': index+1 === diyComponent.list.length}">
|
||||
<view :id="'item'+index+diyComponent.id" @click="diyStore.toRedirect(item.link)" class="flex flex-col items-center justify-between p-[10rpx] bg-white mt-[20rpx] w-[157rpx] h-[200rpx] rounded-[var(--rounded-mid)] box-border" :style="itemStyle3 + commonTempCss(item)" :class="{'!mr-[0rpx]': index+1 === diyComponent.list.length}">
|
||||
<view class="w-[141rpx] h-[141rpx] rounded-[var(--rounded-small)] overflow-hidden" v-if="item.imageUrl">
|
||||
<image class="w-[141rpx] h-[141rpx]" :src="img(item.imageUrl)" mode="aspectFit" />
|
||||
</view>
|
||||
@ -83,7 +91,7 @@
|
||||
|
||||
<scroll-view scroll-x="true" class="whitespace-nowrap" :id="'warpStyle4-'+diyComponent.id" v-if="diyComponent.blockStyle.value == 'style-4'">
|
||||
<view v-for="(item,index) in diyComponent.list" :key="item.id" class="inline-flex">
|
||||
<view :id="'item'+index+diyComponent.id" @click="diyStore.toRedirect(item.link)" class="flex flex-col items-center justify-between p-[4rpx] bg-[#F93D02] mt-[20rpx] rounded-[var(--rounded-mid)] box-border" :class="{'!mr-[0rpx]': index+1 === diyComponent.list.length}" :style="'background :linear-gradient('+ item.listFrame.startColor +','+ item.listFrame.endColor + ');'+itemStyle4">
|
||||
<view :id="'item'+index+diyComponent.id" @click="diyStore.toRedirect(item.link)" class="flex flex-col items-center justify-between p-[4rpx] bg-[#F93D02] mt-[20rpx] rounded-[var(--rounded-mid)] box-border" :class="{'!mr-[0rpx]': index+1 === diyComponent.list.length}" :style="commonTempCss(item) + itemStyle4">
|
||||
<view class="w-[149rpx] h-[149rpx] box-border px-[18rpx] pt-[16rpx] pb-[6rpx] bg-[#fff] flex flex-col items-center rounded-[var(--rounded-small)]">
|
||||
<view class="w-[112rpx] h-[102rpx]" v-if="item.imageUrl">
|
||||
<image class="w-[112rpx] h-[102rpx]" :src="img(item.imageUrl)" mode="aspectFit" />
|
||||
@ -181,7 +189,6 @@
|
||||
uni.createSelectorQuery().in(instance).select('#warpStyle4-'+diyComponent.value.id).boundingClientRect((res:any) => {
|
||||
uni.createSelectorQuery().in(instance).select('#item0'+diyComponent.value.id).boundingClientRect((data:any) => {
|
||||
itemStyle4.value = `margin-right:${(res.width - data.width*4)/3}px;`
|
||||
|
||||
}).exec()
|
||||
}).exec()
|
||||
// #endif
|
||||
@ -189,6 +196,18 @@
|
||||
itemStyle4.value= 'margin-right:14rpx;'
|
||||
// #endif
|
||||
};
|
||||
|
||||
// 公共模块颜色
|
||||
const commonTempCss = (data: any)=>{
|
||||
var style = '';
|
||||
if(data.listFrame.startColor && data.listFrame.endColor){
|
||||
style += `background:linear-gradient(${data.listFrame.startColor},${data.listFrame.endColor});`;
|
||||
}else{
|
||||
style += `background:${data.listFrame.startColor || data.listFrame.endColor};`;
|
||||
}
|
||||
return style;
|
||||
}
|
||||
|
||||
const btnCss = (item:any) => {
|
||||
var style = '';
|
||||
style += `background:linear-gradient(90deg,${item.startColor},${item.endColor});`;
|
||||
@ -203,18 +222,25 @@
|
||||
)
|
||||
|
||||
onMounted(() => {
|
||||
refresh();
|
||||
// 装修模式下刷新
|
||||
if (diyStore.mode == 'decorate') {
|
||||
watch(
|
||||
() => diyComponent.value,
|
||||
(newValue, oldValue) => {
|
||||
if (newValue && newValue.componentName == 'ActiveCube') {
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
refresh();
|
||||
// 装修模式下刷新
|
||||
if (diyStore.mode == 'decorate') {
|
||||
watch(
|
||||
() => diyComponent.value,
|
||||
(newValue, oldValue) => {
|
||||
if (newValue && newValue.componentName == 'ActiveCube') {
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
)
|
||||
} else {
|
||||
watch(
|
||||
() => diyComponent.value,
|
||||
(newValue, oldValue) => {
|
||||
refresh();
|
||||
}
|
||||
)
|
||||
}
|
||||
});
|
||||
|
||||
const instance = getCurrentInstance();
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
<view :style="warpCss" class="goods-carousel-search-wrap">
|
||||
<view class="relative pb-[20rpx]">
|
||||
<view class="bg-img" :class="{'!-bottom-[200rpx]': diyComponent.bgGradient == true}">
|
||||
<image v-if="diyComponent.swiper.list && diyComponent.swiper.list[swiperIndex].imageUrl" :src="img(diyComponent.swiper.list[swiperIndex].imageUrl)" mode="scaleToFill" class="w-full h-full" :show-menu-by-longpress="true"/>
|
||||
<view v-else class="w-full h-full bg-[#ccc]"></view>
|
||||
<image v-if="diyComponent.swiper.control && diyComponent.swiper.list && diyComponent.swiper.list[swiperIndex].imageUrl" :src="img(diyComponent.swiper.list[swiperIndex].imageUrl)" mode="scaleToFill" class="w-full h-full" :show-menu-by-longpress="true"/>
|
||||
<view v-else class="w-full h-full bg-[#fff]"></view>
|
||||
<view class="bg-img-box" :style="bgImgBoxStyle"></view>
|
||||
</view>
|
||||
<view class="fixed-wrap" :style="fixedStyle">
|
||||
@ -11,53 +11,52 @@
|
||||
<view class="img-wrap" v-if="diyComponent.search.logo">
|
||||
<image :src="img(diyComponent.search.logo)" mode="aspectFit"/>
|
||||
</view>
|
||||
<view class="search-content" @click.stop="diyStore.toRedirect(diyComponent.search.link)">
|
||||
<text class="input-content text-[#fff] text-[24rpx] leading-[68rpx]">{{isShowSearchPlaceholder ? diyComponent.search.text : ''}}</text>
|
||||
<text class="nc-iconfont nc-icon-sousuo-duanV6xx1 text-[28rpx] text-[#fff]"></text>
|
||||
|
||||
<view class="search-content" :style="{backgroundColor: diyComponent.search.bgColor }" @click.stop="diyStore.toRedirect(diyComponent.search.link)">
|
||||
<text class="input-content text-[#fff] text-[24rpx] leading-[68rpx]" :style="{color: diyComponent.search.color }">{{isShowSearchPlaceholder ? diyComponent.search.text : ''}}</text>
|
||||
<text class="nc-iconfont nc-icon-sousuo-duanV6xx1 w-[80rpx] h-[52rpx] flex items-center justify-center rounded-[50rpx] text-[28rpx] text-[#fff]" :style="{backgroundColor: diyComponent.search.btnBgColor, color: diyComponent.search.btnColor }"></text>
|
||||
<swiper class="swiper-wrap" :interval="diyComponent.search.hotWord.interval * 1000" autoplay="true" vertical="true" circular="true" v-if="!isShowSearchPlaceholder">
|
||||
<swiper-item class="swiper-item" v-for="(item) in diyComponent.search.hotWord.list" :key="item.id">
|
||||
<view class=" leading-[64rpx] text-[24rpx]">{{ item.text }}</view>
|
||||
<view class="leading-[64rpx] text-[24rpx]" :style="{color: diyComponent.search.color }">{{ item.text }}</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
<view class="tab-list-wrap relative z-10" v-if="diyComponent.tab.control">
|
||||
<scroll-view scroll-x="true" class="scroll-wrap" :scroll-into-view="'a' + currTabIndex">
|
||||
<view @click="changeData({ source : 'home' },-1)" class="scroll-item" :class="[{ active: currTabIndex == -1 }]">
|
||||
<view class="name" :style="{'color': getTabColor(currTabIndex == -1)}">首页</view>
|
||||
<view class="line" :style="{'background-color': getTabColor(currTabIndex == -1)}" v-if="currTabIndex == -1"></view>
|
||||
<!-- <view class="line" :style="{'background-color': getTabColor(currTabIndex == -1)}" v-if="currTabIndex == -1"></view> -->
|
||||
</view>
|
||||
<view v-for="(item, index) in diyComponent.tab.list" class="scroll-item" :class="[{ active: index == currTabIndex }]" @click="changeData(item,index)" :id="'a' + index" :key="index">
|
||||
<view class="name" :style="{'color': getTabColor(index == currTabIndex)}">{{ item.text }}</view>
|
||||
<view class="line" :style="{'background-color': getTabColor(index == currTabIndex)}" v-if="index == currTabIndex"></view>
|
||||
<!-- <view class="line" :style="{'background-color': getTabColor(index == currTabIndex)}" v-if="index == currTabIndex"></view> -->
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view v-if="diyComponent.tab.list.length" class="absolute tab-btn iconfont icona-yingyongliebiaoV6xx-32" @click="tabAllPopup = true"></view>
|
||||
</view>
|
||||
|
||||
<view class="bg-img" v-if="fixedStyleBg">
|
||||
<image v-if="diyComponent.swiper.list && diyComponent.swiper.list[swiperIndex].imageUrl" :src="img(diyComponent.swiper.list[swiperIndex].imageUrl)" mode="scaleToFill" class="w-full h-full" :show-menu-by-longpress="true"/>
|
||||
<view v-else class="w-full h-full bg-[#ccc]"></view>
|
||||
<image v-if="diyComponent.swiper.control && diyComponent.swiper.list && diyComponent.swiper.list[swiperIndex].imageUrl" :src="img(diyComponent.swiper.list[swiperIndex].imageUrl)" mode="widthFix" class="w-full h-full" :show-menu-by-longpress="true"/>
|
||||
<view v-else class="w-full h-full bg-[#fff]"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 解决fixed定位后导航栏塌陷的问题 -->
|
||||
<template v-if="diyStore.mode != 'decorate'">
|
||||
<view v-if="diyComponent.positionWay == 'fixed' && props.scrollBool != -1" class="u-navbar-placeholder" :style="{ width: '100%', paddingTop: moduleHeight }"></view>
|
||||
<view v-if="diyComponent.positionWay == 'fixed' && props.scrollBool != undefined && props.scrollBool != -1" class="u-navbar-placeholder" :style="{ width: '100%', paddingTop: moduleHeight }"></view>
|
||||
</template>
|
||||
|
||||
<!-- 轮播图 -->
|
||||
<view class="relative" :class="{'mx-[20rpx]': swiperStyle2}">
|
||||
<view class="relative" :class="{'mx-[20rpx]': swiperStyleBool && diyComponent.swiper.swiperStyle != 'style-3', 'swiper-style-3': diyComponent.swiper.swiperStyle == 'style-3'}" :style="carouselSwiperStyle()">
|
||||
<swiper v-if="diyComponent.swiper.control" class="swiper" :style="{ height: imgHeight }" autoplay="true" circular="true" @change="swiperChange"
|
||||
:class="{
|
||||
'swiper-left': diyComponent.swiper.indicatorAlign == 'left',
|
||||
'swiper-right': diyComponent.swiper.indicatorAlign == 'right',
|
||||
'ns-indicator-dots': diyComponent.swiper.indicatorStyle == 'style-2'
|
||||
'ns-indicator-dots': diyComponent.swiper.indicatorStyle == 'style-2',
|
||||
'ns-indicator-dots-three': diyComponent.swiper.indicatorStyle == 'style-3'
|
||||
}"
|
||||
:previous-margin="swiperStyle2 ? 0 : '26rpx'" :next-margin="swiperStyle2 ? 0 : '26rpx'"
|
||||
:previous-margin="swiperStyleBool ? 0 : '26rpx'" :next-margin="swiperStyleBool ? 0 : '26rpx'"
|
||||
:interval="diyComponent.swiper.interval * 1000" :indicator-dots="isShowDots"
|
||||
:indicator-color="diyComponent.swiper.indicatorColor" :indicator-active-color="diyComponent.swiper.indicatorActiveColor">
|
||||
<swiper-item class="swiper-item" v-for="(item,index) in diyComponent.swiper.list" :key="item.id" :style="swiperWarpCss">
|
||||
@ -73,6 +72,7 @@
|
||||
<view v-if="diyComponent.swiper.list.length > 1" :class="[
|
||||
'swiper-dot-box',
|
||||
{ 'straightLine': diyComponent.swiper.indicatorStyle == 'style-2' },
|
||||
{ 'straightLineStyle2': diyComponent.swiper.indicatorStyle == 'style-3' },
|
||||
{ 'swiper-left': diyComponent.swiper.indicatorAlign == 'left' },
|
||||
{ 'swiper-right': diyComponent.swiper.indicatorAlign == 'right' }
|
||||
]">
|
||||
@ -119,7 +119,6 @@
|
||||
const instance = getCurrentInstance();
|
||||
const props = defineProps(['component', 'index', 'pullDownRefreshCount', 'global', 'scrollBool']);
|
||||
const diyStore = useDiyStore();
|
||||
|
||||
const diyComponent = computed(() => {
|
||||
if (diyStore.mode == 'decorate') {
|
||||
return diyStore.value[props.index];
|
||||
@ -149,22 +148,29 @@
|
||||
)
|
||||
|
||||
const moduleHeight:any = ref('')
|
||||
|
||||
const setModuleLocation = ()=> {
|
||||
nextTick(() => {
|
||||
setTimeout(()=>{
|
||||
const query = uni.createSelectorQuery().in(instance);
|
||||
query.select('.fixed-wrap').boundingClientRect((data:any) => {
|
||||
moduleHeight.value = (data.height || 0) + 'px';
|
||||
}).exec();
|
||||
if(diyComponent.value.swiper.swiperStyle != 'style-3'){
|
||||
const query = uni.createSelectorQuery().in(instance);
|
||||
query.select('.fixed-wrap').boundingClientRect((data:any) => {
|
||||
moduleHeight.value = (data.height || 0) + 'px';
|
||||
}).exec();
|
||||
}else{
|
||||
moduleHeight.value = '';
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const fixedStyleBg = ref(false);
|
||||
const fixedStyle = computed(()=>{
|
||||
if (diyStore.mode == 'decorate') return '';
|
||||
var style = '';
|
||||
var style = '';
|
||||
if(diyComponent.value.swiper.swiperStyle == 'style-3'){
|
||||
style += 'position: absolute;z-index: 10;left: 0;right: 0;';
|
||||
}
|
||||
if (diyStore.mode == 'decorate') return style;
|
||||
|
||||
// #ifdef H5
|
||||
if(props.global.topStatusBar.isShow && props.global.topStatusBar.style == 'style-4') {
|
||||
style += 'top:' + diyStore.topTabarHeight + 'px;';
|
||||
@ -172,7 +178,7 @@
|
||||
// #endif
|
||||
|
||||
if(diyComponent.value.positionWay == 'fixed') {
|
||||
if (props.scrollBool != -1) {
|
||||
if (props.scrollBool != undefined && props.scrollBool != -1) {
|
||||
style += 'position: fixed;z-index: 10;left: 0;right: 0;';
|
||||
}
|
||||
|
||||
@ -198,6 +204,17 @@
|
||||
}
|
||||
return style;
|
||||
})
|
||||
|
||||
// 轮播样式
|
||||
const carouselSwiperStyle = ()=> {
|
||||
let style = "";
|
||||
if(diyComponent.value.swiper.swiperStyle == 'style-3'){
|
||||
// #ifdef MP
|
||||
style = 'padding-top:' + menuButtonInfo.top + 'px;';
|
||||
// #endif
|
||||
}
|
||||
return style;
|
||||
}
|
||||
|
||||
const getTabColor = (flag:any)=>{
|
||||
let color = '';
|
||||
@ -244,8 +261,8 @@
|
||||
});
|
||||
|
||||
// 轮播样式二
|
||||
const swiperStyle2 = computed(()=>{
|
||||
var style = diyComponent.value.swiper.swiperStyle == 'style-2' ? true : false;
|
||||
const swiperStyleBool = computed(()=>{
|
||||
var style = diyComponent.value.swiper.swiperStyle == 'style-2' || diyComponent.value.swiper.swiperStyle == 'style-3' ? true : false;
|
||||
return style;
|
||||
})
|
||||
|
||||
@ -293,7 +310,14 @@
|
||||
const tabAllPopup = ref(false);
|
||||
let menuButtonInfo: any = {};
|
||||
const navbarInnerStyle = ref('')
|
||||
|
||||
// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
|
||||
// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
|
||||
menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||
// 导航栏内部盒子的样式
|
||||
// 导航栏宽度,如果在小程序下,导航栏宽度为胶囊的左边到屏幕左边的距离
|
||||
// 如果是各家小程序,导航栏内部的宽度需要减少右边胶囊的宽度
|
||||
navbarInnerStyle.value += 'padding-top:' + menuButtonInfo.top + 'px;';
|
||||
// #endif
|
||||
onMounted(() => {
|
||||
refresh();
|
||||
// 装修模式下刷新
|
||||
@ -307,18 +331,21 @@
|
||||
}
|
||||
)
|
||||
}
|
||||
// 判断让轮播指示器是否出现
|
||||
// #ifdef H5
|
||||
isShowDots.value = diyComponent.value.swiper.list.length > 1 ? true : false;
|
||||
// #endif
|
||||
|
||||
// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
|
||||
// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
|
||||
if(diyComponent.value.positionWay == 'fixed') {
|
||||
menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||
// 导航栏内部盒子的样式
|
||||
// 导航栏宽度,如果在小程序下,导航栏宽度为胶囊的左边到屏幕左边的距离
|
||||
// 如果是各家小程序,导航栏内部的宽度需要减少右边胶囊的宽度
|
||||
if(props.global.topStatusBar.isShow == false) {
|
||||
navbarInnerStyle.value = ''
|
||||
let rightButtonWidth = menuButtonInfo.width ? menuButtonInfo.width * 2 + 'rpx' : '70rpx';
|
||||
navbarInnerStyle.value += 'padding-right:calc(' + rightButtonWidth + ' + 30rpx);';
|
||||
navbarInnerStyle.value += 'padding-top:' + menuButtonInfo.top + 'px;';
|
||||
}else if(props.global.topStatusBar){
|
||||
navbarInnerStyle.value = ''
|
||||
}
|
||||
|
||||
}
|
||||
@ -327,7 +354,8 @@
|
||||
});
|
||||
|
||||
const refresh = ()=> {
|
||||
setModuleLocation();
|
||||
setModuleLocation();
|
||||
|
||||
changeData({ source : 'home' },-1)
|
||||
diyComponent.value.swiper.list.forEach((item : any) => {
|
||||
if (item.imageUrl == '') {
|
||||
@ -429,8 +457,8 @@
|
||||
uni-image, image{
|
||||
-webkit-filter: blur(15px);
|
||||
filter: blur(15px);
|
||||
-webkit-transform: scale(1.5);
|
||||
transform: scale(1.5);
|
||||
-webkit-transform: scale(2) translateY(15%);
|
||||
transform: scale(2) translateY(15%);
|
||||
}
|
||||
.bg-img-box{
|
||||
position: absolute;
|
||||
@ -457,14 +485,14 @@
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
padding:20rpx;
|
||||
padding:16rpx;
|
||||
.img-wrap{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 140rpx;
|
||||
height: 60rpx;
|
||||
margin-right: 30rpx;
|
||||
margin-right: 20rpx;
|
||||
image{
|
||||
width: 100%;
|
||||
height:100%;
|
||||
@ -474,7 +502,8 @@
|
||||
.search-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 32rpx;
|
||||
padding-left: 32rpx;
|
||||
padding-right: 6rpx;
|
||||
border-radius: 50rpx;
|
||||
background-color: rgba(255,255,255,.2);
|
||||
flex: 1;
|
||||
@ -488,6 +517,7 @@
|
||||
padding-right: 20rpx;
|
||||
color: #fff;
|
||||
background: none;
|
||||
flex: 1;
|
||||
}
|
||||
.iconfont {
|
||||
font-size: 30rpx;
|
||||
@ -513,7 +543,8 @@
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx 80rpx 20rpx 20rpx;
|
||||
padding: 24rpx 80rpx 26rpx 20rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
.scroll-item {
|
||||
display: inline-block;
|
||||
@ -522,29 +553,17 @@
|
||||
width: auto;
|
||||
position: relative;
|
||||
padding: 0 20rpx;
|
||||
height:54rpx;
|
||||
.name {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
line-height: 38rpx;
|
||||
margin-bottom: 15rpx;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
|
||||
&.active {
|
||||
position: relative;
|
||||
.name {
|
||||
font-size: 28rpx;
|
||||
line-height: 38rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.line{
|
||||
position: absolute;
|
||||
bottom: 0rpx;
|
||||
width: 34rpx;
|
||||
height: 4rpx;
|
||||
border-radius: 2rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -602,10 +621,13 @@
|
||||
left: 80rpx;
|
||||
transform: translate(0);
|
||||
}
|
||||
// 指示器样式一
|
||||
.swiper :deep(.uni-swiper-dot) {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
}
|
||||
|
||||
// 指示器样式二
|
||||
.swiper.ns-indicator-dots :deep(.uni-swiper-dot) {
|
||||
width: 18rpx;
|
||||
height: 6rpx;
|
||||
@ -614,6 +636,21 @@
|
||||
.swiper.ns-indicator-dots :deep(.uni-swiper-dot-active) {
|
||||
width: 36rpx;
|
||||
}
|
||||
|
||||
// 指示器样式三
|
||||
.swiper.ns-indicator-dots-three :deep(.uni-swiper-dot) {
|
||||
width: 8rpx;
|
||||
height: 8rpx !important;
|
||||
border-radius: 6rpx;
|
||||
margin-right: 14rpx;
|
||||
}
|
||||
.swiper.ns-indicator-dots-three :deep(.uni-swiper-dot):last-of-type {
|
||||
margin-right: 0;
|
||||
}
|
||||
.swiper.ns-indicator-dots-three :deep(.uni-swiper-dot-active) {
|
||||
width: 30rpx;
|
||||
}
|
||||
|
||||
.swiper-dot-box {
|
||||
position: absolute;
|
||||
bottom: 20rpx;
|
||||
@ -644,12 +681,36 @@
|
||||
.swiper-dot {
|
||||
width: 18rpx;
|
||||
height: 6rpx;
|
||||
border-radius: 4rpx;
|
||||
border-radius: 6rpx;
|
||||
|
||||
&.active {
|
||||
width: 36rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.straightLineStyle2{
|
||||
.swiper-dot {
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
border-radius: 6rpx;
|
||||
margin: 0;
|
||||
margin-right: 14rpx;
|
||||
&.last-of-type {
|
||||
margin-right: 0;
|
||||
}
|
||||
&.active {
|
||||
width: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.swiper-style-3{
|
||||
:deep(.uni-swiper-dots-horizontal){
|
||||
bottom: 46rpx !important;
|
||||
}
|
||||
.swiper-dot-box{
|
||||
bottom: 38rpx !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -6,7 +6,7 @@
|
||||
<text class="text-[30rpx] text-[#FFDAA8] ml-[10rpx] font-500 max-w-[440rpx] truncate">{{info.member_level_name}}</text>
|
||||
</view>
|
||||
<view class="flex items-center justify-center rounded-[30rpx] box-border style-btn w-[140rpx] h-[56rpx]" @click="toLink('/app/pages/member/level')">
|
||||
<text class="text-[24rpx] text-[#333]">{{ info.member_level ? (upgradeGrowth > 0 ? '去升级' : '去查看') : '去解锁' }}</text>
|
||||
<text class="text-[24rpx] text-[#333]">{{ info.member_level ? (upgradeGrowth > 0 ? '做任务' : '点击查看') : '去解锁' }}</text>
|
||||
<text class="iconfont iconxiayibu1 ml-[4rpx] -mb-[2rpx] !text-[14rpx] text-[#333]"></text>
|
||||
</view>
|
||||
</view>
|
||||
@ -19,7 +19,7 @@
|
||||
<text class="text-[#FFE3B1] opacity-80 text-[24rpx] mt-[10rpx] leading-[32rpx]" v-if="benefits_arr && benefits_arr.length">{{info.member_level_name}}购物享{{benefits_arr[0].title}}</text>
|
||||
</view>
|
||||
<view class="flex items-center justify-center rounded-[30rpx] box-border style-btn w-[140rpx] h-[56rpx]" @click="toLink('/app/pages/member/level')">
|
||||
<text class="text-[24rpx] text-[#333]">{{ info.member_level ? (upgradeGrowth > 0 ? '去升级' : '去查看') : '去解锁' }}</text>
|
||||
<text class="text-[24rpx] text-[#333]">{{ info.member_level ? (upgradeGrowth > 0 ? '做任务' : '点击查看') : '去解锁' }}</text>
|
||||
<text class="iconfont iconxiayibu1 ml-[4rpx] -mb-[2rpx] !text-[14rpx] text-[#333]"></text>
|
||||
</view>
|
||||
</view>
|
||||
@ -58,6 +58,50 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="diyComponent.style == 'style-4'" class="flex items-center justify-between style-4 px-[24rpx] py-[20rpx]" :style="{'backgroundImage': 'url('+img('static/resource/images/diy/member/style4_bg.jpg')+')'}">
|
||||
<view class="flex flex-col">
|
||||
<view class="flex items-center">
|
||||
<image :src="img('static/resource/images/diy/member/style4_vip.png')" mode="aspectFit" class="w-[70rpx] h-[32rpx] pt-[1rpx]" />
|
||||
<text class="text-[30rpx] text-[#FFEFB0] leading-[normal] ml-[8rpx] font-500 max-w-[420rpx] truncate">{{info.member_level_name}}</text>
|
||||
</view>
|
||||
<view class="text-[#B0B0B0] text-[24rpx] mt-[10rpx] leading-[32rpx]" v-if="benefits_arr && benefits_arr.length">
|
||||
<text>{{info.member_level_name}}购物享</text>
|
||||
<text class="text-[#FFEFB0]">{{benefits_arr[0].title}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex items-center justify-center rounded-[30rpx] box-border style-btn w-[150rpx] h-[50rpx]" @click="toLink('/app/pages/member/level')">
|
||||
<text class="text-[22rpx] text-[#333] mr-[8rpx]">{{ info.member_level ? (upgradeGrowth > 0 ? '做任务' : '点击查看') : '去解锁' }}</text>
|
||||
<image :src="img('static/resource/images/diy/member/style4_arrow.png')" mode="aspectFit" class="w-[26rpx] h-[26rpx] pt-[2rpx]" />
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="diyComponent.style == 'style-5'" class="rounded-[var(--rounded-big)] style-5" :style="{'backgroundImage': 'url('+img('static/resource/images/diy/member/style5_bg.jpg')+')'}">
|
||||
<view class="content-head pt-[16rpx] pb-[10rpx] px-[24rpx] flex items-center justify-between">
|
||||
<view class="flex items-center">
|
||||
<image :src="img('static/resource/images/diy/member/style5_vip.png')" mode="aspectFit" class="w-[40rpx] h-[40rpx]" />
|
||||
<text class="text-[#FFFBE2] ml-[10rpx] text-[30rpx] font-500 max-w-[470rpx] truncate">{{info.member_level_name}}</text>
|
||||
</view>
|
||||
<view class="flex items-center rounded-[30rpx] pl-[16rpx] pr-[12rpx] h-[44rpx] leading-normal style-btn" @click="toLink('/app/pages/member/level')">
|
||||
<text class="text-[22rpx] text-[#333] font-500 pb-[2rpx]">
|
||||
{{info.member_level ? (upgradeGrowth > 0 ? '做任务' : '点击查看') : '去解锁'}}
|
||||
</text>
|
||||
<image :src="img('static/resource/images/diy/member/style5_arrow_01.png')" mode="aspectFit" class="w-[22rpx] h-[22rpx] pb-[1rpx]" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex flex-col pt-[28rpx] pb-[30rpx] px-[24rpx]">
|
||||
<view class="flex items-center justify-between pb-[16rpx]">
|
||||
<text class="text-[22rpx] ml-[2rpx] leading-[1.4] text-[#FFFBE2]" v-if="upgradeGrowth > 0">还差{{upgradeGrowth}}成长值即可升级为{{ list[afterCurrIndex].level_name }}</text>
|
||||
<text class="text-[22rpx] ml-[2rpx] text-[#FFFBE2]" v-else>恭喜您升级为最高等级</text>
|
||||
<view class="flex items-center" @click="toLink('/app/pages/member/level')">
|
||||
<text class="nc-iconfont nc-icon-a-bangzhuV6xx-36 !text-[22rpx] text-[#FFFBE2]"></text>
|
||||
<text class="text-[22rpx] text-[#FFFBE2] ml-[6rpx] leading-[24rpx]">规则</text>
|
||||
<view class="ml-[2rpx] -mb-[4rpx] text-[#FFFBE2] !text-[24rpx] nc-iconfont nc-icon-youV6xx"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="overflow-hidden rounded-[20rpx]">
|
||||
<progress :percent="progress()" activeColor="#fff" backgroundColor="rgba(255,255,255,0.4)" stroke-width="4" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -66,7 +110,6 @@
|
||||
import { img, redirect } from '@/utils/common'
|
||||
import useMemberStore from '@/stores/member'
|
||||
import { t } from '@/locale'
|
||||
import { getMemberLevel } from '@/app/api/member';
|
||||
import useDiyStore from '@/app/stores/diy'
|
||||
|
||||
const props = defineProps(['component', 'index', 'pullDownRefreshCount']);
|
||||
@ -216,4 +259,22 @@
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
.style-4{
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
.style-btn{
|
||||
background: linear-gradient(#FFF3C1, #FFEFB0);
|
||||
}
|
||||
}
|
||||
|
||||
.style-5{
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
.content-head{
|
||||
background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.14));
|
||||
}
|
||||
.style-btn{
|
||||
background: linear-gradient(#FFFFFF, #FFF8CC);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
<template v-if="diyComponent.scrollWay == 'upDown'">
|
||||
<swiper :vertical="true" :duration="500" autoplay="true" circular="true" class="flex-1">
|
||||
<swiper-item v-for="(item, index) in diyComponent.list" :key="index" @touchmove.prevent.stop>
|
||||
<text @click="toRedirect(item)" class="beyond-hiding using-hidden" :style="{ color: diyComponent.textColor, fontSize: diyComponent.fontSize * 2 + 'rpx', fontWeight: diyComponent.fontWeight }">
|
||||
<text @click="toRedirect(item)" class="beyond-hiding truncate" :style="{ color: diyComponent.textColor, fontSize: diyComponent.fontSize * 2 + 'rpx', fontWeight: diyComponent.fontWeight }">
|
||||
{{ item.text }}
|
||||
</text>
|
||||
</swiper-item>
|
||||
@ -37,18 +37,21 @@
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<u-popup :show="noticeShow" @close="noticeShow = false" mode="center" round="var(--rounded-big)" :safeAreaInsetBottom="false">
|
||||
<view @touchmove.prevent.stop>
|
||||
<view class="pt-[30rpx] pb-[24rpx] text-sm leading-none border-0 border-solid border-b-[2rpx] border-[#eee] flex items-center justify-between">
|
||||
<text class="ml-[30rpx] text-[#333] text-[30rpx] font-500">公告</text>
|
||||
<text class="mr-[20rpx] nc-iconfont nc-icon-guanbiV6xx text-[35rpx]" @click="noticeShow = false"></text>
|
||||
<view @touchmove.prevent.stop>
|
||||
<u-popup :show="noticeShow" @close="noticeShow = false" mode="center" round="var(--rounded-big)" :safeAreaInsetBottom="false">
|
||||
<view class="w-[570rpx] px-[32rpx] popup-common center">
|
||||
<view class="title">公告</view>
|
||||
<scroll-view :scroll-y="true" class="px-[30rpx] box-border h-[260rpx]">
|
||||
<block v-for="(item) in noticeContent.split('\n')">
|
||||
<view class="text-[28rpx] leading-[40rpx] mb-[20rpx]">{{ item }}</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
<view class="btn-wrap !pt-[40rpx]">
|
||||
<button class="primary-btn-bg w-[480rpx] h-[70rpx] text-[26rpx] leading-[70rpx] rounded-[35rpx] !text-[#fff] font-500" @click="noticeShow = false">我知道了</button>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" class="px-[30rpx] py-[30rpx] w-[580rpx] box-border h-[480rpx] text-[26rpx] text-[#333]">{{ noticeContent }}</scroll-view>
|
||||
<button @click="noticeShow = false" class="!mx-[80rpx] !mb-[60rpx] !w-auto !h-[70rpx] text-[26rpx] leading-[70rpx] rounded-full text-white !bg-[#ff4500] !text-[#fff]">我知道了</button>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
</u-popup>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
135
uni-app/src/app/components/diy/picture-show/index.vue
Normal file
135
uni-app/src/app/components/diy/picture-show/index.vue
Normal file
@ -0,0 +1,135 @@
|
||||
<template>
|
||||
<view :style="warpCss" class="flex justify-between">
|
||||
<view class="p-[20rpx] box-border overflow-hidden" :style="moduleOneCss">
|
||||
<view class="flex items-center pb-[30rpx] pt-[6rpx]" v-if="diyComponent.moduleOne.head.textImg || diyComponent.moduleOne.head.subText">
|
||||
<image class="h-[28rpx]" v-if="diyComponent.moduleOne.head.textImg" :src="img(diyComponent.moduleOne.head.textImg)" mode="heightFix"></image>
|
||||
<text class="w-[2rpx] mx-[10rpx] h-[22rpx]" v-if="diyComponent.moduleOne.head.textImg && diyComponent.moduleOne.head.subText" :style="{'backgroundColor': diyComponent.moduleOne.head.subTextColor}"></text>
|
||||
<text class="text-[22rpx] truncate max-w-[164rpx]" v-if="diyComponent.moduleOne.head.subText" :style="{color: diyComponent.moduleOne.head.subTextColor}">{{diyComponent.moduleOne.head.subText}}</text>
|
||||
</view>
|
||||
<view class="flex items-center">
|
||||
<view v-for="(item,index) in diyComponent.moduleOne.list" :key="index" class="flex flex-col items-center" :class="{'mr-[10rpx]': index == 0}" @click="diyStore.toRedirect(item.link)">
|
||||
<view class="bg-[#fff] flex items-center justify-center w-[148rpx] h-[148rpx] rounded-[12rpx] mb-[16rpx]">
|
||||
<image v-if="item.imageUrl" class="w-[102rpx] h-[102rpx]" :src="img(item.imageUrl)" mode="aspectFill"></image>
|
||||
<u-icon v-else name="photo" color="#999" size="50"></u-icon>
|
||||
</view>
|
||||
<view class="w-[132rpx] h-[44rpx] rounded-[30rpx] flex items-center justify-center text-[22rpx]" :style="moduleBtnCss(item)">{{item.btnTitle.text}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="p-[20rpx] box-border overflow-hidden" :style="moduleTwoCss">
|
||||
<view class="flex items-center pb-[30rpx] pt-[6rpx]" v-if="diyComponent.moduleTwo.head.textImg || diyComponent.moduleTwo.head.subText">
|
||||
<image class="h-[28rpx] w-[auto]" v-if="diyComponent.moduleTwo.head.textImg" :src="img(diyComponent.moduleTwo.head.textImg)" mode="heightFix"></image>
|
||||
<text class="w-[2rpx] mx-[10rpx] h-[22rpx]" v-if="diyComponent.moduleTwo.head.textImg && diyComponent.moduleTwo.head.subText" :style="{'backgroundColor': diyComponent.moduleTwo.head.subTextColor}"></text>
|
||||
<text class="text-[22rpx] truncate max-w-[164rpx]" v-if="diyComponent.moduleTwo.head.subText" :style="{color: diyComponent.moduleTwo.head.subTextColor}">{{diyComponent.moduleTwo.head.subText}}</text>
|
||||
</view>
|
||||
<view class="flex items-center">
|
||||
<view v-for="(item,index) in diyComponent.moduleTwo.list" :key="index" class="flex flex-col items-center" :class="{'mr-[10rpx]': index == 0}" @click="diyStore.toRedirect(item.link)">
|
||||
<view class="bg-[#fff] flex items-center justify-center w-[148rpx] h-[148rpx] rounded-[12rpx] mb-[16rpx]">
|
||||
<image v-if="item.imageUrl" class="w-[102rpx] h-[102rpx]" :src="img(item.imageUrl)" mode="aspectFill"></image>
|
||||
<u-icon v-else name="photo" color="#999" size="50"></u-icon>
|
||||
</view>
|
||||
<view class="w-[132rpx] h-[44rpx] rounded-[30rpx] flex items-center justify-center text-[22rpx]" :style="moduleBtnCss(item)">{{item.btnTitle.text}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
// 图片展播
|
||||
import { ref, reactive, computed, watch, onMounted, nextTick, getCurrentInstance } from 'vue';
|
||||
import { img } from '@/utils/common';
|
||||
import useDiyStore from '@/app/stores/diy';
|
||||
|
||||
const props = defineProps(['component', 'index', 'pullDownRefreshCount', 'global', 'scrollBool']);
|
||||
const diyStore = useDiyStore();
|
||||
const diyComponent = computed(() => {
|
||||
if (diyStore.mode == 'decorate') {
|
||||
return diyStore.value[props.index];
|
||||
} else {
|
||||
return props.component;
|
||||
}
|
||||
})
|
||||
|
||||
const warpCss = computed(() => {
|
||||
var 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 + ';';
|
||||
}
|
||||
if (diyComponent.value.topRounded) style += 'border-top-left-radius:' + diyComponent.value.topRounded * 2 + 'rpx;';
|
||||
if (diyComponent.value.topRounded) style += 'border-top-right-radius:' + diyComponent.value.topRounded * 2 + 'rpx;';
|
||||
if (diyComponent.value.bottomRounded) style += 'border-bottom-left-radius:' + diyComponent.value.bottomRounded * 2 + 'rpx;';
|
||||
if (diyComponent.value.bottomRounded) style += 'border-bottom-right-radius:' + diyComponent.value.bottomRounded * 2 + 'rpx;';
|
||||
return style;
|
||||
})
|
||||
|
||||
const moduleOneCss = computed(() => {
|
||||
var style = '';
|
||||
if(diyComponent.value.moduleOne.listFrame) {
|
||||
if (diyComponent.value.moduleOne.listFrame.startColor && diyComponent.value.moduleOne.listFrame.endColor) style += `background:linear-gradient(${diyComponent.value.moduleOne.listFrame.startColor},${diyComponent.value.moduleOne.listFrame.endColor});`;
|
||||
}
|
||||
|
||||
if (diyComponent.value.moduleRounded.topRounded) style += 'border-top-left-radius:' + diyComponent.value.moduleRounded.topRounded * 2 + 'rpx;';
|
||||
if (diyComponent.value.moduleRounded.topRounded) style += 'border-top-right-radius:' + diyComponent.value.moduleRounded.topRounded * 2 + 'rpx;';
|
||||
if (diyComponent.value.moduleRounded.bottomRounded) style += 'border-bottom-left-radius:' + diyComponent.value.moduleRounded.bottomRounded * 2 + 'rpx;';
|
||||
if (diyComponent.value.moduleRounded.bottomRounded) style += 'border-bottom-right-radius:' + diyComponent.value.moduleRounded.bottomRounded * 2 + 'rpx;';
|
||||
|
||||
if(diyComponent.value.margin && diyComponent.value.margin.both) style += 'width: calc((100vw - ' + (diyComponent.value.margin.both*4) + 'rpx - 20rpx) / 2);'
|
||||
else style += 'width: calc((100vw - 20rpx) / 2 );'
|
||||
return style;
|
||||
})
|
||||
|
||||
const moduleTwoCss = computed(() => {
|
||||
var style = '';
|
||||
if(diyComponent.value.moduleTwo.listFrame) {
|
||||
if (diyComponent.value.moduleTwo.listFrame.startColor && diyComponent.value.moduleTwo.listFrame.endColor) style += `background:linear-gradient(${diyComponent.value.moduleTwo.listFrame.startColor},${diyComponent.value.moduleTwo.listFrame.endColor});`;
|
||||
}
|
||||
if (diyComponent.value.moduleRounded.topRounded) style += 'border-top-left-radius:' + diyComponent.value.moduleRounded.topRounded * 2 + 'rpx;';
|
||||
if (diyComponent.value.moduleRounded.topRounded) style += 'border-top-right-radius:' + diyComponent.value.moduleRounded.topRounded * 2 + 'rpx;';
|
||||
if (diyComponent.value.moduleRounded.bottomRounded) style += 'border-bottom-left-radius:' + diyComponent.value.moduleRounded.bottomRounded * 2 + 'rpx;';
|
||||
if (diyComponent.value.moduleRounded.bottomRounded) style += 'border-bottom-right-radius:' + diyComponent.value.moduleRounded.bottomRounded * 2 + 'rpx;';
|
||||
|
||||
if(diyComponent.value.margin && diyComponent.value.margin.both) style += 'width: calc((100vw - ' + (diyComponent.value.margin.both*4) + 'rpx - 20rpx) / 2);'
|
||||
else style += 'width: calc((100vw - 20rpx) / 2 );'
|
||||
return style;
|
||||
})
|
||||
|
||||
const moduleBtnCss = (data: any)=>{
|
||||
var style = '';
|
||||
if(data.btnTitle.color) {
|
||||
style += 'color:' + data.btnTitle.color + ';';
|
||||
}
|
||||
if (diyComponent.value.moduleTwo.listFrame.startColor && diyComponent.value.moduleTwo.listFrame.endColor) style += `background:linear-gradient(${data.btnTitle.startColor},${data.btnTitle.endColor});`;
|
||||
return style;
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.pullDownRefreshCount,
|
||||
(newValue, oldValue) => {
|
||||
// 处理下拉刷新业务
|
||||
}
|
||||
)
|
||||
|
||||
onMounted(() => {
|
||||
refresh();
|
||||
// 装修模式下刷新
|
||||
if (diyStore.mode == 'decorate') {
|
||||
watch(
|
||||
() => diyComponent.value,
|
||||
(newValue, oldValue) => {
|
||||
if (newValue && newValue.componentName == 'PictureShow') {
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
});
|
||||
|
||||
const refresh = ()=> {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@ -12,25 +12,33 @@
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { getAgreementInfo } from '@/app/api/system'
|
||||
import { img} from '@/utils/common'
|
||||
import { img, goback } from '@/utils/common'
|
||||
|
||||
const agreement = ref(null)
|
||||
const loading = ref(true)
|
||||
onLoad((option: any)=> {
|
||||
getAgreementInfo(option.key).then((res: any) => {
|
||||
agreement.value = res.data
|
||||
loading.value = false
|
||||
uni.setNavigationBarTitle({
|
||||
title: res.data.agreement_key_name
|
||||
if(option.key){
|
||||
getAgreementInfo(option.key).then((res: any) => {
|
||||
agreement.value = res.data
|
||||
loading.value = false
|
||||
uni.setNavigationBarTitle({
|
||||
title: res.data.agreement_key_name
|
||||
})
|
||||
}).catch(()=>{
|
||||
loading.value = false
|
||||
})
|
||||
}).catch(()=>{
|
||||
loading.value = false
|
||||
})
|
||||
}else{
|
||||
let parameter = {
|
||||
url: '/app/pages/index/index',
|
||||
title: '协议类型不存在',
|
||||
mode: 'reLaunch'
|
||||
};
|
||||
goback(parameter)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<view class="w-screen h-screen bg-[var(--page-bg-color)]" :style="themeColor()">
|
||||
<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">
|
||||
<view class="sidebar-margin my-[var(--top-m)] rounded-[var(--rounded-big)] overflow-hidden" v-for="(item, index) in accountList" :key="index">
|
||||
<u-swipe-action-item :options="accountOptions" @click="swipeClick(index)">
|
||||
<view class="card-template flex justify-between" >
|
||||
<view class="flex items-center">
|
||||
|
||||
@ -11,14 +11,14 @@
|
||||
</view>
|
||||
<view class="mt-[16rpx] text-[26rpx] line-feed text-[var(--text-color-light9)] leading-[1.4]">{{ item.full_address }}</view>
|
||||
</view>
|
||||
<view class="flex justify-between pt-[var(--top-m)]">
|
||||
<view class="flex items-center leading-none" @click.stop="setDefault(index)">
|
||||
<text class="iconfont mr-[10rpx]" :class="{ 'iconduigou text-primary': item.is_default, 'iconcheckbox_nol': !item.is_default }"></text>
|
||||
<view class="flex justify-between pt-[26rpx]">
|
||||
<view class="flex items-center text-[28rpx] leading-none" @click.stop="setDefault(index)">
|
||||
<text class="iconfont !text-[28rpx] mr-[10rpx]" :class="{ 'iconduigou text-primary': item.is_default, 'iconcheckbox_nol': !item.is_default }"></text>
|
||||
设为默认
|
||||
</view>
|
||||
<view class="flex">
|
||||
<view @click.stop="editAddressFn(item.id)"><text class="nc-iconfont nc-icon-xiugaiV6xx shrink-0 text-[32rpx] mr-[4rpx]"></text>编辑</view>
|
||||
<view @click.stop="deleteAddressFn(index)" class="ml-[40rpx]"><text class="nc-iconfont nc-icon-shanchu-yuangaizhiV6xx shrink-0 text-[32rpx] mr-[4rpx]"></text>删除</view>
|
||||
<view class="text-[28rpx]" @click.stop="editAddressFn(item.id)"><text class="nc-iconfont nc-icon-xiugaiV6xx shrink-0 text-[28rpx] mr-[4rpx]"></text>编辑</view>
|
||||
<view @click.stop="deleteAddressFn(index)" class="ml-[40rpx] text-[28rpx]"><text class="nc-iconfont nc-icon-shanchu-yuangaizhiV6xx shrink-0 text-[28rpx] mr-[4rpx]"></text>删除</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { onLoad,onShow } from '@dcloudio/uni-app'
|
||||
import { redirect, img, mobileHide } from '@/utils/common'
|
||||
import { getAddressList, deleteAddress, editAddress } from '@/app/api/member'
|
||||
import { t } from '@/locale'
|
||||
@ -73,7 +73,10 @@
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
getAddressListFn()
|
||||
|
||||
onShow(()=>{
|
||||
getAddressListFn()
|
||||
})
|
||||
|
||||
const addAddress = ()=> {
|
||||
const url = `/app/pages/member/address_edit`
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
</view>
|
||||
<view class="mt-[16rpx]">
|
||||
<u-form-item :label="t('mobile')" prop="mobile" labelWidth="200rpx">
|
||||
<u-input fontSize="28rpx" v-model.trim="formData.mobile" type="number" maxlength="11" border="none" clearable :placeholder="t('mobilePlaceholder')" placeholderStyle="color: #888"/>
|
||||
<u-input fontSize="28rpx" v-model.trim="formData.mobile" maxlength="11" border="none" clearable :placeholder="t('mobilePlaceholder')" placeholderStyle="color: #888"/>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="mt-[16rpx]">
|
||||
@ -46,7 +46,7 @@
|
||||
</u-form>
|
||||
<view class="w-full footer">
|
||||
<view class="py-[var(--top-m)] px-[var(--sidebar-m)] footer w-full fixed bottom-0 left-0 right-0 box-border">
|
||||
<button hover-class="none" class="primary-btn-bg text-[#fff] h-[80rpx] leading-[80rpx] rounded-[100rpx] text-[26rpx] font-500"
|
||||
<button hover-class="none" class="primary-btn-bg !text-[#fff] h-[80rpx] leading-[80rpx] rounded-[100rpx] text-[26rpx] font-500"
|
||||
@click="save" :disabled="btnDisabled" :loading="operateLoading" :class="{'opacity-50': btnDisabled}">{{t('save')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
@ -245,16 +245,16 @@
|
||||
// #ifdef MP
|
||||
uni.chooseLocation({
|
||||
success: (res) => {
|
||||
res.latitude && (formData.value.lat = res.latitude)
|
||||
res.longitude && (formData.value.lng = res.longitude)
|
||||
res.address && (formData.value.area = res.address)
|
||||
res.name && (formData.value.address_name = res.address)
|
||||
res.name && (formData.value.address = res.name)
|
||||
if(res.latitude && res.longitude){
|
||||
let latng = res.latitude+','+res.longitude;
|
||||
getAddress(latng);
|
||||
}
|
||||
},
|
||||
res.latitude && (formData.value.lat = res.latitude)
|
||||
res.longitude && (formData.value.lng = res.longitude)
|
||||
res.address && (formData.value.area = res.address)
|
||||
res.name && (formData.value.address_name = res.address)
|
||||
res.name && (formData.value.address = res.name)
|
||||
if (res.latitude && res.longitude) {
|
||||
let latng = res.latitude + ',' + res.longitude;
|
||||
getAddress(latng);
|
||||
}
|
||||
},
|
||||
fail: (res)=>{
|
||||
// 在隐私协议中没有声明chooseLocation:fail api作用域
|
||||
if(res.errMsg && res.errno) {
|
||||
|
||||
@ -288,7 +288,8 @@
|
||||
|
||||
cashOutApply(applyData).then(res => {
|
||||
loading.value = false
|
||||
redirect({ url: '/app/pages/member/cash_out' })
|
||||
memberStore.getMemberInfo(()=>{redirect({ url: '/app/pages/member/cash_out' })})
|
||||
|
||||
}).catch(() => {
|
||||
loading.value = false
|
||||
})
|
||||
|
||||
@ -126,9 +126,9 @@
|
||||
}
|
||||
}else {
|
||||
if(Object.keys(menuButtonInfo).length){
|
||||
return (pxToRpx(Number(menuButtonInfo.height)) + pxToRpx(menuButtonInfo.top) +pxToRpx(8)+538)+'rpx'
|
||||
return (pxToRpx(Number(menuButtonInfo.height)) + pxToRpx(menuButtonInfo.top) +pxToRpx(8)+590.39)+'rpx'
|
||||
}else{
|
||||
return '538rpx'
|
||||
return '590.39rpx'
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -174,7 +174,6 @@
|
||||
limit: mescroll.size,
|
||||
trade_type:fromType.value,
|
||||
create_time: create_time.value
|
||||
|
||||
};
|
||||
interface acceptingDataStructure {
|
||||
data : acceptingDataItemStructure,
|
||||
|
||||
@ -26,7 +26,6 @@ import useMescroll from '@/components/mescroll/hooks/useMescroll.js';
|
||||
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app';
|
||||
|
||||
const { mescrollInit, downCallback, getMescroll } = useMescroll(onPageScroll, onReachBottom);
|
||||
|
||||
const cashOutList = ref<Array<any>>([]);
|
||||
const mescrollRef = ref(null);
|
||||
const loading = ref<boolean>(false);
|
||||
|
||||
@ -55,14 +55,23 @@
|
||||
import { reactive, ref } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { t } from '@/locale'
|
||||
import { redirect, img } from '@/utils/common';
|
||||
import { redirect, img, goback } from '@/utils/common';
|
||||
import { getCashOutDetail } from '@/app/api/member';
|
||||
|
||||
const cashOutInfo = ref({});
|
||||
const loading = ref<boolean>(true);
|
||||
onLoad((option: any) => {
|
||||
let id = option.id || "";
|
||||
getCashoutAccountListFn(id)
|
||||
let id = option.id || "";
|
||||
if(id){
|
||||
getCashoutAccountListFn(id)
|
||||
}else{
|
||||
let parameter = {
|
||||
url:'/app/pages/member/cash_out',
|
||||
title: '提现详情不存在',
|
||||
mode: 'reLaunch'
|
||||
};
|
||||
goback(parameter);
|
||||
}
|
||||
})
|
||||
|
||||
const getCashoutAccountListFn = (id: any) => {
|
||||
|
||||
@ -2,9 +2,7 @@
|
||||
<view class="min-h-[100vh]" :style="themeColor()">
|
||||
<view class="contact-wrap pt-[22%]">
|
||||
<image :src="img('static/resource/images/member/contact_service.png')" mode="widthFix" />
|
||||
<view class="mt-[40rpx] text-[28rpx]">
|
||||
欢迎您联系我们,提供您宝贵的意见!
|
||||
</view>
|
||||
<view class="mt-[40rpx] text-[28rpx]">欢迎您联系我们,提供您宝贵的意见!</view>
|
||||
<nc-contact
|
||||
:send-message-title="sendMessageTitle"
|
||||
:send-message-path="sendMessagePath"
|
||||
|
||||
@ -109,7 +109,7 @@
|
||||
[propName : string] : number | string | object
|
||||
}
|
||||
|
||||
let fnList = (params : any) => { };
|
||||
let fnList:any = (params : any) => { };
|
||||
if (type.value == 'balance') fnList = getBalanceList;
|
||||
else if (type.value == 'money') fnList = getMoneyList;
|
||||
else if (type.value == 'commission') fnList = getCommissionList;
|
||||
|
||||
@ -158,8 +158,4 @@ const confirmFn = (data:any) =>{
|
||||
:deep(.type-class .u-popup .u-transition){
|
||||
top: 86rpx !important;
|
||||
}
|
||||
.noData{
|
||||
height: calc(100vh - 206rpx - constant(safe-area-inset-bottom));
|
||||
height: calc(100vh - 206rpx - env(safe-area-inset-bottom));
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<view :style="themeColor()">
|
||||
<view class="bg-[#F6F6F6] min-h-screen overflow-hidden" v-if="Object.values(info).length">
|
||||
<view class="min-h-screen overflow-hidden" v-if="Object.values(info).length" :class="{ 'bg-[#F6F6F6]' : info && info.is_use }">
|
||||
<view v-if="info.is_use">
|
||||
<view class="sigin-header">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="side-tab" :style="{top: topStyle}" @click="signPopup = true">
|
||||
<view v-if="info.rule_explain" class="side-tab" :style="{top: topStyle}" @click="signPopup = true">
|
||||
<text class="nc-iconfont nc-icon-a-meiriqiandaoV6xx-36 icon"></text>
|
||||
<text class="desc">签到规则</text>
|
||||
</view>
|
||||
@ -68,7 +68,7 @@
|
||||
</block>
|
||||
</view>
|
||||
<view class="flex flex-wrap items-center justify-start" v-else>
|
||||
<block v-for="(item,index) in state.dataCount" >
|
||||
<block v-for="(item,index) in state.dataCount">
|
||||
<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)}" @click="getDayPackFn(item)">
|
||||
<text class="text-[24rpx] leading-[28rpx] mb-[6rpx]">{{ filteredDate(item) }}</text>
|
||||
@ -307,7 +307,7 @@ const getSignInfoFn = (data:any) =>{
|
||||
}
|
||||
|
||||
//获取当月总天数
|
||||
const getDayCounts= () => {
|
||||
const getDayCounts = () => {
|
||||
let counts = new Date(state.curYear,state.curMonth+1,0).getDate()
|
||||
//获取当前第一天是星期几
|
||||
let firstWeekDay = new Date(state.curYear,state.curMonth,1).getDay()
|
||||
@ -319,7 +319,7 @@ const getDayCounts= () => {
|
||||
}
|
||||
// 获取7天的日期签到
|
||||
const getWeekCounts = () =>{
|
||||
let now = `${state.curYear}-${state.curMonth+1 > 10 ? state.curMonth+1 : '0'+(state.curMonth+1)}-${state.curDate > 10 ? state.curDate : '0'+state.curDate }`
|
||||
let now = `${state.curYear}-${state.curMonth+1 > 9 ? state.curMonth+1 : '0'+(state.curMonth+1)}-${state.curDate > 9 ? state.curDate : '0'+state.curDate }`
|
||||
for (let i = state.curWeek - 1; i >= 0; i --) {
|
||||
const day = new Date(now).getDate() - i
|
||||
state.weekCount.push(day)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="w-screen h-screen bg-[#424040] text-right" :style="themeColor()">
|
||||
<image :src="img('static/resource/images/pay/invite_friends_share.png')" mode="heightFix" class="pt-[30rpx] pr-[30rpx] h-[200rpx]"/>
|
||||
<image :src="img('static/resource/images/pay/invite_friends_share.png')" mode="heightFix" class="pt-[30rpx] pr-[30rpx] h-[200rpx] w-[auto]"/>
|
||||
<view class="text-white font-bold pt-[30rpx] pr-[30rpx]">点击右上角跳转到浏览器打开</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<view :style="themeColor()">
|
||||
<view class="w-screen h-screen flex flex-col items-center" v-if="payInfo">
|
||||
<view class="flex-1 flex flex-col items-center w-full pt-[200rpx]">
|
||||
<view class="flex items-center">
|
||||
<text class="nc-iconfont -mb-[4rpx] !text-[44rpx]" :class="payInfo.status==2 ? 'text-primary nc-icon-duihaoV6mm' : 'nc-icon-tanhaoV6mm text-red'"></text>
|
||||
<text class="text-[36rpx] ml-[16rpx] font-500">{{ payInfo.status == 2 ? t('pay.paySuccess') : t('pay.payFail') }}</text>
|
||||
<top-tabbar ref="topTabbarRef" :data="topTabbarParam" />
|
||||
<view class="flex-1 flex flex-col items-center w-full pt-[180rpx]">
|
||||
<view class="flex items-baseline" :class="{'text-[#06c05d]': payInfo.status==2, 'text-red': payInfo.status!=2}">
|
||||
<text class="nc-iconfont -mb-[4rpx] !text-[32rpx]" :class="{'nc-icon-duihaoV6mm': payInfo.status==2, 'nc-icon-tanhaoV6mm': payInfo.status!=2}"></text>
|
||||
<text class="text-[36rpx] ml-[16rpx] font-500">{{ payInfo.status == 2 ? '支付成功' : '支付失败' }}</text>
|
||||
</view>
|
||||
|
||||
<view class="text-[56rpx] font-500 mt-[60rpx] price-font">
|
||||
@ -33,12 +34,18 @@
|
||||
import { t } from '@/locale'
|
||||
import { redirect, moneyFormat } from '@/utils/common'
|
||||
import { getFirstPage } from '@/utils/pages'
|
||||
import { topTabar } from '@/utils/topTabbar'
|
||||
|
||||
const payInfo = ref<AnyObject | null>(null)
|
||||
const loading = ref(false)
|
||||
let tradeType = ''
|
||||
let tradeId = 0
|
||||
let requestNum = 0
|
||||
|
||||
/********* 自定义头部 - start ***********/
|
||||
const topTabarObj = topTabar()
|
||||
let topTabbarParam = topTabarObj.setTopTabbarParam({title:'',isBack:false})
|
||||
/********* 自定义头部 - end ***********/
|
||||
|
||||
onLoad((data : any) => {
|
||||
tradeType = data.trade_type
|
||||
@ -62,9 +69,9 @@
|
||||
}
|
||||
payInfo.value = res.data
|
||||
loading.value = false
|
||||
uni.setNavigationBarTitle({
|
||||
title: payInfo.value.status == 2 ? t('pay.paySuccess') : t('pay.payFail')
|
||||
})
|
||||
// uni.setNavigationBarTitle({
|
||||
// title: payInfo.value.status == 2 ? t('pay.paySuccess') : t('pay.payFail')
|
||||
// })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -140,9 +140,5 @@ const confirmFn = (data: any) =>{
|
||||
:deep(.uni-picker-view-indicator::after){
|
||||
border: none !important;
|
||||
}
|
||||
.noData{
|
||||
height: calc(100vh - 132rpx - constant(safe-area-inset-bottom));
|
||||
height: calc(100vh - 132rpx - env(safe-area-inset-bottom));
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
});
|
||||
}else{
|
||||
redirect({
|
||||
url: '/app/pages/index/index',
|
||||
url: '/app/pages/index/index',
|
||||
mode: 'reLaunch'
|
||||
});
|
||||
}
|
||||
|
||||
@ -24,8 +24,7 @@
|
||||
<view @click="callPhone" class="text-primary truncate">{{ siteInfo.phone }}</view>
|
||||
</view>
|
||||
<view class="px-6 py-3 w-[480rpx] h-[100rpx] leading-[100rpx] text-sm" v-else>抱歉,商家暂无客服,请线下联系</view>
|
||||
<button @click="popupShow = false"
|
||||
class="!mx-[30rpx] !mb-[40rpx] !w-auto !h-[70rpx] text-[24rpx] leading-[70rpx] rounded-full text-white !bg-[#ff4500] !text-[#fff]">
|
||||
<button @click="popupShow = false" class="!mx-[30rpx] !mb-[40rpx] !w-auto !h-[70rpx] text-[24rpx] leading-[70rpx] rounded-full text-white !bg-[#ff4500] !text-[#fff]">
|
||||
我知道了
|
||||
</button>
|
||||
</view>
|
||||
|
||||
@ -12,16 +12,16 @@
|
||||
<view class="w-[316rpx] h-[66rpx] box-border leading-[62rpx] rounded-[33rpx] bg-[var(--temp-bg)] text-center text-[26rpx] text-[var(--text-color-light6)] border-[2rpx] border-solid border-[var(--temp-bg)]" :class="{'text-primary !border-[var(--primary-color)] !bg-[var(--primary-color-light)]': currentValue.type == 'second'}" @click="currentValue.type = 'second'">{{dateList.nowDate[1].substr(0,10)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<picker-view indicator-class="!h-[80rpx] !bg-[var(--temp-bg)]" :value="dateList.curIndex" @change="bindChange" class="w-[750rpx] px-[60rpx] h-[396rpx] box-border">
|
||||
<view class="gradation-picker">
|
||||
<picker-view indicator-class="!h-[80rpx] !bg-[var(--temp-bg)]" :value="dateList.curIndex" @change="bindChange" class="w-[750rpx] px-[60rpx] h-[396rpx] box-border">
|
||||
<picker-view-column>
|
||||
<view class="text-center leading-[80rpx] text-[28rpx]" v-for="(item,index) in dateList.years" :key="index">{{item}}年</view>
|
||||
<view class="text-center leading-[80rpx] text-[28rpx]" v-for="(item,index) in dateList.years" :key="index">{{item}}年</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="text-center leading-[80rpx] text-[28rpx]" v-for="(item,index) in dateList.months" :key="index">{{item}}月</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="text-center leading-[80rpx] text-[28rpx]" v-for="(item,index) in dateList.days" :key="index">{{item}}日</view>
|
||||
<view class="text-center leading-[80rpx] text-[28rpx]" v-for="(item,index) in dateList.days" :key="index">{{item}}日</view>
|
||||
</picker-view-column>
|
||||
</picker-view>
|
||||
</view>
|
||||
@ -193,4 +193,29 @@ defineExpose({
|
||||
:deep(.uni-picker-view-indicator::after){
|
||||
border: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.gradation-picker{
|
||||
position: relative;
|
||||
&::after{
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 70rpx;
|
||||
background: linear-gradient(#fff, rgba(255,255,255,.5));
|
||||
z-index: 10;
|
||||
}
|
||||
&::before{
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 70rpx;
|
||||
background: linear-gradient(#fff, rgba(255,255,255,.5));
|
||||
z-index: 12;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -5,7 +5,7 @@
|
||||
<view @touchmove.prevent.stop>
|
||||
<view class="poster-img-wrap" :style="{'top': shareTop}">
|
||||
<image v-if="isPosterAnimation" class="poster-animation" :src="img('addon/shop/poster_animation.gif')" mode="aspectFit"></image>
|
||||
<image v-if="isPosterImg" class="poster-img" :src="img(poster)" mode="aspectFit"></image>
|
||||
<image v-if="isPosterImg" class="poster-img" :src="img(poster)" mode="aspectFit" :show-menu-by-longpress="true"></image>
|
||||
</view>
|
||||
<view class="share-content">
|
||||
<!-- #ifdef MP || APP-PLUS -->
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<u-modal :show="show" :title="t('captchaTitle')" :confirm-text="t('confirm')" :cancel-text="t('cancel')" :show-cancel-button="true" @cancel="show = false" @confirm="handleConfirm" confirmColor="var(--primary-color)">
|
||||
<view class="flex mt-[20rpx]">
|
||||
<u-input :placeholder="t('captchaPlaceholder')" border="surround" v-model="formData.captcha_code"></u-input>
|
||||
<image :src="captcha.image.value" class="h-[76rpx] ml-[20rpx]" mode="heightFix" @click="captcha.refresh()"></image>
|
||||
<image :src="captcha.image.value" class="h-[76rpx] w-[auto] ml-[20rpx]" mode="heightFix" @click="captcha.refresh()"></image>
|
||||
</view>
|
||||
</u-modal>
|
||||
</template>
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
<template>
|
||||
<template v-if="tabbar && Object.keys(tabbar).length">
|
||||
<u-tabbar :value="value" @change="tabbarChange" zIndex="9999" :fixed="true" :placeholder="true" :safeAreaInsetBottom="true"
|
||||
<u-tabbar :value="value" zIndex="9999" :fixed="true" :placeholder="true" :safeAreaInsetBottom="true"
|
||||
:inactive-color="tabbar.value.textColor" :active-color="tabbar.value.textHoverColor">
|
||||
<block v-for="item in tabbar.value.list">
|
||||
<u-tabbar-item class="py-[5rpx]" :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"></u-tabbar-item>
|
||||
v-if="tabbar.value.type == 1" @click="itemBtn(item.link.url)"></u-tabbar-item>
|
||||
<u-tabbar-item class="py-[5rpx]" :style="{'background-color': tabbar.value.backgroundColor}"
|
||||
:icon="img(value == item.link.url ? item.iconSelectPath : item.iconPath)" :name="item.link.url"
|
||||
v-if="tabbar.value.type == 2"></u-tabbar-item>
|
||||
v-if="tabbar.value.type == 2" @click="itemBtn(item.link.url)"></u-tabbar-item>
|
||||
<u-tabbar-item class="py-[5rpx]" :style="{'background-color': tabbar.value.backgroundColor}" :text="item.text" :name="item.link.url"
|
||||
v-if="tabbar.value.type == 3"></u-tabbar-item>
|
||||
v-if="tabbar.value.type == 3" @click="itemBtn(item.link.url)"></u-tabbar-item>
|
||||
</block>
|
||||
</u-tabbar>
|
||||
<view class="tab-bar-placeholder"></view>
|
||||
@ -113,25 +113,33 @@
|
||||
return '/' + currRoute() + (str.length > 0 ? '?' + str.join('&') : '')
|
||||
})
|
||||
|
||||
const tabbarChange = (url : string) => {
|
||||
// const tabbarChange = (url : string) => {
|
||||
// 外部链接
|
||||
if (url.indexOf('http') != -1 || url.indexOf('http') != -1) {
|
||||
|
||||
// #ifdef H5
|
||||
window.location.href = url;
|
||||
// #endif
|
||||
|
||||
// #ifdef MP
|
||||
redirect({
|
||||
url: '/app/pages/webview/index',
|
||||
param: { src: encodeURIComponent(url) }
|
||||
});
|
||||
// #endif
|
||||
} else {
|
||||
redirect({ url,mode: 'reLaunch' })
|
||||
}
|
||||
// }
|
||||
|
||||
const itemBtn = (url)=>{
|
||||
if (url.indexOf('http') != -1 || url.indexOf('http') != -1) {
|
||||
|
||||
// #ifdef H5
|
||||
window.location.href = url;
|
||||
// #endif
|
||||
|
||||
// #ifdef MP
|
||||
redirect({
|
||||
url: '/app/pages/webview/index',
|
||||
param: { src: encodeURIComponent(url) }
|
||||
});
|
||||
// #endif
|
||||
} else {
|
||||
let query:any = currShareRoute().params;
|
||||
let str = [];
|
||||
for (let key in query) {
|
||||
str.push(key + '=' + query[key]);
|
||||
}
|
||||
if(url == ('/' + currRoute()) && !str.length) return
|
||||
redirect({ url,mode: 'reLaunch' })
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
<view class="title-wrap" @click="diyStore.toRedirect(topStatusBarData.link)">
|
||||
<image :src="img(topStatusBarData.imgUrl)" mode="heightFix"></image>
|
||||
</view>
|
||||
<view class="search" @click="diyStore.toRedirect(topStatusBarData.link)" :style="{ height: menuButtonInfo.height - 2 + 'px', lineHeight: menuButtonInfo.height - 2 + 'px' }">
|
||||
<view class="search" @click="diyStore.toRedirect(topStatusBarData.link)" :style="{ height: systemStore.menuButtonInfo.height - 2 + 'px', lineHeight: systemStore.menuButtonInfo.height - 2 + 'px' }">
|
||||
<text class="nc-iconfont nc-icon-sousuo-duanV6xx1 text-[24rpx] absolute left-[20rpx]"></text>
|
||||
<text class="text-[24rpx]">{{topStatusBarData.inputPlaceholder}}</text>
|
||||
</view>
|
||||
@ -40,7 +40,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 解决fixed定位后导航栏塌陷的问题 -->
|
||||
<view class="u-navbar-placeholder" :style="{ width: '100%', paddingTop: placeholderHeight + 'px' }"></view>
|
||||
<view v-if="props.isFill" class="u-navbar-placeholder" :style="{ width: '100%', paddingTop: placeholderHeight + 'px' }"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -56,11 +56,7 @@ import { cloneDeep } from 'lodash-es'
|
||||
// 获取系统状态栏的高度
|
||||
let systemInfo = uni.getSystemInfoSync();
|
||||
let platform = systemInfo.platform;
|
||||
let menuButtonInfo: any = {};
|
||||
// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
|
||||
// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
|
||||
menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||
// #endif
|
||||
const systemStore = useSystemStore();
|
||||
|
||||
const diyStore = useDiyStore();
|
||||
|
||||
@ -87,9 +83,12 @@ const props = defineProps({
|
||||
isBack: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
isFill: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
})
|
||||
|
||||
const data = computed(() => {
|
||||
return props.data;
|
||||
});
|
||||
@ -113,8 +112,8 @@ const navbarInnerStyle = computed(() => {
|
||||
}
|
||||
// #ifdef MP
|
||||
// 导航栏宽度,如果在小程序下,导航栏宽度为胶囊的左边到屏幕左边的距离
|
||||
style += 'height:' + menuButtonInfo.height + 'px;';
|
||||
style += 'padding-top:' + menuButtonInfo.top + 'px;';
|
||||
style += 'height:' + systemStore.menuButtonInfo.height + 'px;';
|
||||
style += 'padding-top:' + systemStore.menuButtonInfo.top + 'px;';
|
||||
style += 'padding-bottom: 8px;';
|
||||
// #endif
|
||||
return style;
|
||||
@ -196,26 +195,29 @@ const goBack = () => {
|
||||
|
||||
// 微信胶囊宽度+right
|
||||
const capsuleWidth = computed(() => {
|
||||
let width = `calc(100vw - ${menuButtonInfo.right}px + ${menuButtonInfo.width}px + 10px)`;
|
||||
let width = `calc(100vw - ${systemStore.menuButtonInfo.right}px + ${systemStore.menuButtonInfo.width}px + 10px)`;
|
||||
return width;
|
||||
})
|
||||
|
||||
// 导航栏塌陷的高度
|
||||
const placeholderHeight = ref(0);
|
||||
const instance = getCurrentInstance();
|
||||
// #ifdef MP
|
||||
let statusBarHeight = systemStore.menuButtonInfo.height + systemStore.menuButtonInfo.top + 8;
|
||||
placeholderHeight.value = statusBarHeight || 0;
|
||||
// #endif
|
||||
const navbarPlaceholderHeight = () => {
|
||||
nextTick(() => {
|
||||
const query = uni.createSelectorQuery().in(instance);
|
||||
query.select('.ns-navbar-wrap .u-navbar .content-wrap').boundingClientRect(data => {
|
||||
placeholderHeight.value = data ? data.height : 0;
|
||||
diyStore.topTabarHeight = placeholderHeight.value;
|
||||
}).exec();
|
||||
})
|
||||
const query = uni.createSelectorQuery().in(instance);
|
||||
query.select('.ns-navbar-wrap .u-navbar .content-wrap').boundingClientRect(data => {
|
||||
placeholderHeight.value = data ? data.height : 0;
|
||||
diyStore.topTabarHeight = placeholderHeight.value;
|
||||
}).exec();
|
||||
})
|
||||
}
|
||||
|
||||
/******************************* 定位-start ***********************/
|
||||
// 获取地图配置
|
||||
const systemStore = useSystemStore();
|
||||
const currentPosition = ref('定位中...')
|
||||
let mapConfig = uni.getStorageSync('mapConfig');
|
||||
|
||||
@ -313,7 +315,6 @@ const getQueryVariable = (variable:any)=> {
|
||||
return false;
|
||||
}
|
||||
/******************************* 定位-end ***********************/
|
||||
|
||||
onMounted(() => {
|
||||
navbarPlaceholderHeight();
|
||||
if (pages.length > 1) {
|
||||
|
||||
@ -95,12 +95,12 @@
|
||||
// 骨架的背景色
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: '#EAEDF5'
|
||||
default: '' // #EAEDF5
|
||||
},
|
||||
// 骨架的动画高亮背景色
|
||||
highlightBgColor: {
|
||||
type: String,
|
||||
default: '#F9FAFF'
|
||||
default: '' // #F9FAFF
|
||||
},
|
||||
// 自定义配置
|
||||
config: {
|
||||
|
||||
50
uni-app/src/hooks/useGoods.ts
Normal file
50
uni-app/src/hooks/useGoods.ts
Normal file
@ -0,0 +1,50 @@
|
||||
import { redirect, img, getToken } from '@/utils/common';
|
||||
export function useGoods(params: any = {}) {
|
||||
|
||||
const baseTagStyle = (data:any)=>{
|
||||
let style = "";
|
||||
if(data.color_json.text_color){
|
||||
style += `color:${data.color_json.text_color};`;
|
||||
}
|
||||
if(data.color_json.border_color){
|
||||
style += `border-color: ${data.color_json.border_color};`;
|
||||
}
|
||||
if(data.color_json.bg_color){
|
||||
style += `background-color: ${data.color_json.bg_color};`;
|
||||
}
|
||||
return style;
|
||||
}
|
||||
|
||||
// 价格类型
|
||||
const priceType = (data:any) =>{
|
||||
let type = "";
|
||||
if(data.member_discount && getToken() && data.goodsSku.member_price != data.goodsSku.price) {
|
||||
type = 'member_price' // 会员价
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
// 商品价格
|
||||
const goodsPrice = (data:any) => {
|
||||
let price = "0.00";
|
||||
if (data.member_discount && getToken() && data.goodsSku.member_price != data.goodsSku.price) {
|
||||
price = data.goodsSku.member_price ? data.goodsSku.member_price : data.goodsSku.price // 会员价
|
||||
} else {
|
||||
price = data.goodsSku ? data.goodsSku.price : data.price; //兼容商品推荐组件
|
||||
}
|
||||
return parseFloat(price);
|
||||
}
|
||||
|
||||
|
||||
// 错误图片展示
|
||||
const errorImgFn = (data: any, type: any) =>{
|
||||
data[type] = '';
|
||||
}
|
||||
|
||||
return {
|
||||
baseTagStyle: baseTagStyle,
|
||||
goodsPrice: goodsPrice,
|
||||
priceType: priceType,
|
||||
error: errorImgFn
|
||||
}
|
||||
}
|
||||
@ -10,6 +10,7 @@ import {
|
||||
import { getWechatAuthCode } from '@/app/api/system'
|
||||
import useMemberStore from '@/stores/member'
|
||||
import useConfigStore from '@/stores/config'
|
||||
import useSystemStore from '@/stores/system'
|
||||
|
||||
export function useLogin() {
|
||||
/**
|
||||
@ -19,6 +20,7 @@ export function useLogin() {
|
||||
uni.setStorage({ key: 'loginBack', data })
|
||||
setTimeout(() => {
|
||||
const config = useConfigStore()
|
||||
const systemStore = useSystemStore()
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
if (!uni.getStorageSync('autoLoginLock') && uni.getStorageSync('openid') && config.login.is_bind_mobile) {
|
||||
@ -39,7 +41,7 @@ export function useLogin() {
|
||||
// #ifdef MP-WEIXIN
|
||||
if (config.login.is_username && !config.login.is_mobile && !config.login.is_auth_register) {
|
||||
redirect({ url: '/app/pages/auth/login', param: { type: 'username' }, mode: 'redirectTo' })
|
||||
} else if (!config.login.is_username && !config.login.is_mobile && !config.login.is_auth_register) {
|
||||
} else if (systemStore.initStatus == 'finish' && !config.login.is_username && !config.login.is_mobile && !config.login.is_auth_register) {
|
||||
uni.showToast({ title: '商家未开启登录注册', icon: 'none' })
|
||||
} else {
|
||||
redirect({ url: '/app/pages/auth/index', mode: 'redirectTo' })
|
||||
@ -51,7 +53,7 @@ export function useLogin() {
|
||||
// 微信浏览器
|
||||
if (config.login.is_username && !config.login.is_mobile && !config.login.is_auth_register) {
|
||||
redirect({ url: '/app/pages/auth/login', param: { type: 'username' }, mode: 'redirectTo' })
|
||||
} else if (!config.login.is_username && !config.login.is_mobile && !config.login.is_auth_register) {
|
||||
} else if (systemStore.initStatus == 'finish' && !config.login.is_username && !config.login.is_mobile && !config.login.is_auth_register) {
|
||||
uni.showToast({ title: '商家未开启登录注册', icon: 'none' })
|
||||
} else {
|
||||
redirect({ url: '/app/pages/auth/index', mode: 'redirectTo' })
|
||||
@ -60,7 +62,7 @@ export function useLogin() {
|
||||
// 普通浏览器
|
||||
if (config.login.is_username && !config.login.is_mobile) {
|
||||
redirect({ url: '/app/pages/auth/login', param: { type: 'username' }, mode: 'redirectTo' })
|
||||
} else if (!config.login.is_username && !config.login.is_mobile) {
|
||||
} else if (systemStore.initStatus == 'finish' && !config.login.is_username && !config.login.is_mobile) {
|
||||
uni.showToast({ title: '商家未开启登录注册', icon: 'none' })
|
||||
} else {
|
||||
redirect({ url: '/app/pages/auth/index', mode: 'redirectTo' })
|
||||
@ -131,6 +133,7 @@ export function useLogin() {
|
||||
}
|
||||
}).catch((err) => {
|
||||
uni.showToast({ title: err.msg, icon: 'none' })
|
||||
if (params.successCallback) params.successCallback()
|
||||
})
|
||||
// #endif
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { img, isWeixinBrowser, currRoute, currShareRoute } from '@/utils/common'
|
||||
import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
||||
import { getShareInfo } from '@/app/api/diy';
|
||||
import useSystemStore from '@/stores/system';
|
||||
|
||||
// #ifdef H5
|
||||
import wechat from '@/utils/wechat'
|
||||
@ -67,13 +68,16 @@ export const useShare = () => {
|
||||
wechatOptions.link = options.wechat.link || h5Link
|
||||
wechatOptions.desc = options.wechat.desc || ''
|
||||
wechatOptions.imgUrl = options.wechat.url ? img(options.wechat.url) : ''
|
||||
// wechatOptions.success = options.wechat.callback || null;
|
||||
// useSystemStore().shareCallback = options.wechat.callback || null;
|
||||
wechatShare()
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
weappOptions.title = options.weapp.title || ''
|
||||
weappOptions.query = options.weapp.path || queryStr.join('&')
|
||||
if (options.weapp.path) weappOptions.path = options.weapp.path
|
||||
weappOptions.imageUrl = options.weapp.url ? img(options.weapp.url) : ''
|
||||
useSystemStore().shareCallback = options.weapp.callback || null;
|
||||
// #endif
|
||||
|
||||
uni.setStorageSync('weappOptions', weappOptions)
|
||||
@ -112,9 +116,10 @@ export const useShare = () => {
|
||||
|
||||
// 小程序分享,分享给好友
|
||||
const shareApp = (options = {}) => {
|
||||
onShareAppMessage(() => {
|
||||
return onShareAppMessage(() => {
|
||||
let config: any = uni.getStorageSync('weappOptions')
|
||||
if (!config) config = {}
|
||||
if (useSystemStore().shareCallback) useSystemStore().shareCallback();
|
||||
return {
|
||||
...config,
|
||||
...options
|
||||
@ -125,9 +130,10 @@ export const useShare = () => {
|
||||
|
||||
// 小程序分享,分享到朋友圈
|
||||
const shareTime = (options = {}) => {
|
||||
onShareTimeline(() => {
|
||||
return onShareTimeline(() => {
|
||||
let config: any = uni.getStorageSync('weappOptions')
|
||||
if (!config) config = {}
|
||||
if (useSystemStore().shareCallback) useSystemStore().shareCallback();
|
||||
return {
|
||||
...config,
|
||||
...options
|
||||
|
||||
@ -30,11 +30,105 @@
|
||||
"pages.member.personal": "个人资料",
|
||||
"pages.member.contact": "客服",
|
||||
"pages.pay.browser": "支付",
|
||||
"pages.pay.result": "支付结果",
|
||||
"pages.pay.result": "",
|
||||
"pages.setting.index": "设置",
|
||||
"pages.verify.index": "核销台",
|
||||
"pages.verify.verify": "核销",
|
||||
"pages.verify.detail": "核销详情",
|
||||
"pages.verify.record": "核销记录",
|
||||
"pages.webview.index": ""
|
||||
"pages.webview.index": "",
|
||||
"tourism.pages.way.list": "线路列表",
|
||||
"tourism.pages.way.detail": "线路详情",
|
||||
"tourism.pages.way.order": "线路订单",
|
||||
"tourism.pages.hotel.list": "酒店列表",
|
||||
"tourism.pages.hotel.detail": "酒店详情",
|
||||
"tourism.pages.hotel.order": "酒店订单",
|
||||
"tourism.pages.scenic.list": "景点列表",
|
||||
"tourism.pages.scenic.detail": "景点详情",
|
||||
"tourism.pages.scenic.order": "景点订单",
|
||||
"tourism.pages.order.list": "旅游订单",
|
||||
"tourism.pages.order.detail": "订单详情",
|
||||
"tourism.pages.verify.index": "核销",
|
||||
"tourism.pages.verify.record": "核销记录",
|
||||
"tourism.pages.verify.detail": "核销详情",
|
||||
"vipcard.pages.verify.index": "核销",
|
||||
"vipcard.pages.verify.record": "核销记录",
|
||||
"vipcard.pages.verify.detail": "核销详情",
|
||||
"vipcard.pages.order.payment": "订单结算",
|
||||
"vipcard.pages.order.list": "订单列表",
|
||||
"vipcard.pages.order.my_reserved": "我的预约",
|
||||
"vipcard.pages.order.my_reserved_detail": "我的预约详情",
|
||||
"vipcard.pages.order.my_card": "我的卡项",
|
||||
"vipcard.pages.order.detail": "订单详情",
|
||||
"vipcard.pages.service.list": "项目列表",
|
||||
"vipcard.pages.card.list": "卡项列表",
|
||||
"vipcard.pages.card.detail": "卡项详情",
|
||||
"recharge.pages.recharge": "充值",
|
||||
"recharge.pages.recharge_record": "充值记录",
|
||||
"recharge.pages.recharge_record_detail": "充值记录详情",
|
||||
"shop.pages.goods.search": "搜索",
|
||||
"shop.pages.goods.cart": "购物车",
|
||||
"shop.pages.goods.category": "商品分类",
|
||||
"shop.pages.goods.detail": "商品详情",
|
||||
"shop.pages.goods.list": "商品列表",
|
||||
"shop.pages.member.index": "个人中心",
|
||||
"shop.pages.member.my_coupon": "我的优惠券",
|
||||
"shop.pages.order.list": "订单列表",
|
||||
"shop.pages.order.detail": "订单详情",
|
||||
"shop.pages.order.payment": "待付款订单",
|
||||
"shop.pages.evaluate.order_evaluate": "商品评价",
|
||||
"shop.pages.evaluate.order_evaluate_view": "商品评价",
|
||||
"shop.pages.evaluate.list": "评价列表",
|
||||
"shop.pages.coupon.list": "优惠券列表",
|
||||
"shop.pages.coupon.detail": "优惠券详情",
|
||||
"shop.pages.discount.list": "限时折扣",
|
||||
"shop.pages.refund.list": "退款列表",
|
||||
"shop.pages.refund.detail": "退款详情",
|
||||
"shop.pages.refund.apply": "申请退款",
|
||||
"shop.pages.refund.edit_apply": "编辑退款信息",
|
||||
"shop.pages.refund.log": "协商记录",
|
||||
"shop.pages.point.index":"积分商城",
|
||||
"shop.pages.point.list":"积分商品列表",
|
||||
"shop.pages.point.detail":"积分商品详情",
|
||||
"shop.pages.point.payment":"待付款订单",
|
||||
"shop.pages.point.order_list":"积分兑换记录",
|
||||
"shop.pages.newcomer.list":"新人专享列表",
|
||||
"cms.pages.list": "资讯中心",
|
||||
"cms.pages.detail": "文章详情",
|
||||
"shop_fenxiao.pages.index": "分销中心",
|
||||
"shop_fenxiao.pages.zone": "分销专区",
|
||||
"shop_fenxiao.pages.level": "分销商等级",
|
||||
"shop_fenxiao.pages.child_fenxiao": "分销商",
|
||||
"shop_fenxiao.pages.goods": "分销商品",
|
||||
"shop_fenxiao.pages.team": "团队",
|
||||
"shop_fenxiao.pages.ranking_list": "排行榜",
|
||||
"shop_fenxiao.pages.agent_list": "渠道代理",
|
||||
"shop_fenxiao.pages.bill": "账单",
|
||||
"shop_fenxiao.pages.order": "分销订单",
|
||||
"shop_fenxiao.pages.order_detail": "订单详情",
|
||||
"shop_fenxiao.pages.apply": "分销商申请",
|
||||
"shop_fenxiao.pages.task_rewards": "任务奖励",
|
||||
"shop_fenxiao.pages.task_detail": "任务奖励详情",
|
||||
"shop_fenxiao.pages.task_rewards_detail": "任务奖励明细",
|
||||
"shop_fenxiao.pages.sale": "销售奖励",
|
||||
"shop_fenxiao.pages.sale_detail": "销售奖励详情",
|
||||
"shop_fenxiao.pages.sale_ranking": "销售排行榜",
|
||||
"shop_fenxiao.pages.promote_code": "分销推广",
|
||||
"shop_giftcard.pages.index": "礼品卡首页",
|
||||
"shop_giftcard.pages.list": "礼品卡列表",
|
||||
"shop_giftcard.pages.detail": "加载中",
|
||||
"shop_giftcard.pages.order_list": "礼品卡订单列表",
|
||||
"shop_giftcard.pages.order_detail": "礼品卡订单详情",
|
||||
"shop_giftcard.pages.member": "我的",
|
||||
"shop_giftcard.pages.my_card_list": "我的卡包",
|
||||
"shop_giftcard.pages.card_bag": "我的卡包",
|
||||
"shop_giftcard.pages.activate": "卡密激活",
|
||||
"shop_giftcard.pages.receive_list": "收到的礼品卡",
|
||||
"shop_giftcard.pages.give_list": "送出的礼品卡",
|
||||
"shop_giftcard.pages.give_detail": "送出礼品卡详情",
|
||||
"shop_giftcard.pages.give": "礼品卡赠送",
|
||||
"shop_giftcard.pages.receive_info": "领取礼品卡",
|
||||
"shop_giftcard.pages.use_card": "礼品卡使用",
|
||||
"shop_giftcard.pages.use_goods_select": "选择兑换商品",
|
||||
"shop_giftcard.pages.payment": "待付款订单"
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
"codePlaceholder": "请输入手机验证码",
|
||||
"memberCenter": "个人中心",
|
||||
"userAgreement": "用户协议",
|
||||
"and":"和",
|
||||
"and": "和",
|
||||
"privacyAgreement": "隐私协议",
|
||||
"isAgreeTips": "请先阅读并同意协议",
|
||||
"nickname": "昵称",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "加载中",
|
||||
"appid" : "__UNI__9B03DBD",
|
||||
"name" : "",
|
||||
"appid" : "__UNI__713550E",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
@ -50,7 +50,7 @@
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wxc106e776c693c9a7",
|
||||
"appid" : "",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
@ -87,16 +87,16 @@
|
||||
"sdkConfigs" : {
|
||||
"maps" : {
|
||||
"qqmap" : {
|
||||
"key" : "6ZDBZ-CLSLX-66747-7MVM4-HLK47-XMBXU"
|
||||
"key" : ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"async" : {
|
||||
"loading" : "",
|
||||
"error" : "",
|
||||
"delay" : 0,
|
||||
"timeout" : 3000
|
||||
}
|
||||
"async" : {
|
||||
"loading" : "",
|
||||
"error" : "",
|
||||
"delay" : 0,
|
||||
"timeout" : 3000
|
||||
}
|
||||
},
|
||||
"fallbackLocale" : "zh-Hans"
|
||||
}
|
||||
|
||||
@ -246,6 +246,9 @@
|
||||
{
|
||||
"path": "app/pages/pay/result",
|
||||
"style": {
|
||||
// #ifndef H5
|
||||
"navigationStyle": "custom",
|
||||
// #endif
|
||||
"navigationBarTitleText": "%pages.pay.result%"
|
||||
}
|
||||
},
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { getConfig } from '@/app/api/auth'
|
||||
import { getTabbarList } from '@/app/api/diy'
|
||||
import { isWeixinBrowser } from "@/utils/common";
|
||||
|
||||
interface loginConfig {
|
||||
is_username: number | boolean,
|
||||
@ -49,7 +49,14 @@ const useConfigStore = defineStore('config', {
|
||||
},
|
||||
actions: {
|
||||
async getLoginConfig() {
|
||||
await getConfig().then((res: any) => {
|
||||
|
||||
let url = '';
|
||||
// #ifdef H5
|
||||
if (isWeixinBrowser()) {
|
||||
url = uni.getSystemInfoSync().platform == 'ios' ? uni.getStorageSync('initUrl') : location.href
|
||||
}
|
||||
// #endif
|
||||
await getConfig({ url }).then((res: any) => {
|
||||
this.login.is_username = res.data.is_username
|
||||
this.login.is_mobile = res.data.is_mobile
|
||||
this.login.is_auth_register = parseInt(res.data.is_auth_register)
|
||||
@ -60,11 +67,6 @@ const useConfigStore = defineStore('config', {
|
||||
this.login.desc = res.data.desc // 描述
|
||||
})
|
||||
},
|
||||
async getTabbarConfig() {
|
||||
await getTabbarList({}).then((res: any) => {
|
||||
this.tabbarList = res.data;
|
||||
})
|
||||
},
|
||||
// 获取主色调
|
||||
getThemeColor() {
|
||||
let themeColorStorage = uni.getStorageSync('current_theme_color');
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { setToken, removeToken, redirect } from '@/utils/common'
|
||||
import { getMemberInfo as getMemberInfoApi, getMemberLevel, bindMobile as bindMobileApi } from '@/app/api/member'
|
||||
import { getMemberInfo as getMemberInfoApi, bindMobile as bindMobileApi } from '@/app/api/member'
|
||||
import { logout } from '@/app/api/auth'
|
||||
import useConfigStore from '@/stores/config'
|
||||
import { useLogin } from '@/hooks/useLogin'
|
||||
@ -73,11 +73,6 @@ const useMemberStore = defineStore('member', {
|
||||
isRedirect && redirect({ url: '/app/pages/index/index', mode: 'switchTab' })
|
||||
})
|
||||
},
|
||||
getMemberLevel() {
|
||||
getMemberLevel().then((res: any) => {
|
||||
this.levelList = res.data
|
||||
})
|
||||
},
|
||||
// 一键绑定手机号
|
||||
bindMobile(e: any) {
|
||||
if (e.detail.errMsg == 'getPhoneNumber:ok') {
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { getSiteInfo, getMap } from '@/app/api/system'
|
||||
import { getInitInfo, getSiteInfo } from '@/app/api/system'
|
||||
import useConfigStore from '@/stores/config'
|
||||
import useMemberStore from '@/stores/member'
|
||||
import { isWeixinBrowser } from '@/utils/common'
|
||||
|
||||
interface System {
|
||||
site: AnyObject | null,
|
||||
@ -7,7 +10,10 @@ interface System {
|
||||
siteAddons: string[],
|
||||
currRoute: string,
|
||||
location: Object | null, // 定位信息
|
||||
mapConfig: any
|
||||
mapConfig: any,
|
||||
initStatus: any, // 初始化状态
|
||||
menuButtonInfo: any, // 如果是小程序,获取右上角胶囊的尺寸信息
|
||||
shareCallback: any // 分享回调
|
||||
}
|
||||
|
||||
const useSystemStore = defineStore('system', {
|
||||
@ -21,10 +27,78 @@ const useSystemStore = defineStore('system', {
|
||||
mapConfig: {
|
||||
is_open: 1,
|
||||
valid_time: 0
|
||||
}
|
||||
},
|
||||
initStatus: 'wait',
|
||||
menuButtonInfo: {
|
||||
height: '',
|
||||
top: '',
|
||||
right: '',
|
||||
width: ''
|
||||
},
|
||||
shareCallback: null
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
// 获取初始化数据信息
|
||||
getInitFn(callback: any) {
|
||||
|
||||
let url = '';
|
||||
// #ifdef H5
|
||||
if (isWeixinBrowser()) {
|
||||
url = uni.getSystemInfoSync().platform == 'ios' ? uni.getStorageSync('initUrl') : location.href
|
||||
}
|
||||
// #endif
|
||||
|
||||
getInitInfo({
|
||||
url
|
||||
}).then((res: any) => {
|
||||
if (res.data) {
|
||||
let data = res.data;
|
||||
|
||||
// 底部导航
|
||||
const configStore = useConfigStore()
|
||||
configStore.tabbarList = data.tabbar_list;
|
||||
|
||||
// 地图配置
|
||||
this.mapConfig.is_open = data.map_config.is_open;
|
||||
this.mapConfig.valid_time = data.map_config.valid_time;
|
||||
uni.setStorageSync('mapConfig', this.mapConfig);
|
||||
|
||||
// 站点信息
|
||||
this.site = data.site_info
|
||||
this.siteApps = data.site_info.app
|
||||
this.siteAddons = data.site_info.site_addons.map((item: AnyObject) => {
|
||||
return item.key
|
||||
})
|
||||
|
||||
// 会员等级
|
||||
const memberStore = useMemberStore();
|
||||
memberStore.levelList = data.member_level;
|
||||
|
||||
// 登录注册配置
|
||||
configStore.login.is_username = data.login_config.is_username
|
||||
configStore.login.is_mobile = data.login_config.is_mobile
|
||||
configStore.login.is_auth_register = parseInt(data.login_config.is_auth_register)
|
||||
configStore.login.is_bind_mobile = parseInt(data.login_config.is_bind_mobile)
|
||||
configStore.login.agreement_show = parseInt(data.login_config.agreement_show)
|
||||
configStore.login.bg_url = data.login_config.bg_url // 背景图
|
||||
configStore.login.logo = data.login_config.logo //logo
|
||||
configStore.login.desc = data.login_config.desc // 描述
|
||||
uni.setStorageSync('login_config', configStore.login)
|
||||
|
||||
this.initStatus = 'finish'; // 初始化完成
|
||||
if (callback) callback()
|
||||
}
|
||||
})
|
||||
|
||||
this.getMenuButtonInfoFn();
|
||||
},
|
||||
getMenuButtonInfoFn() {
|
||||
// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
|
||||
// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
|
||||
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||
// #endif
|
||||
},
|
||||
async getSiteInfoFn() {
|
||||
await getSiteInfo().then((res: any) => {
|
||||
this.site = res.data
|
||||
@ -35,14 +109,6 @@ const useSystemStore = defineStore('system', {
|
||||
}).catch((err) => {
|
||||
})
|
||||
},
|
||||
async getMapFn() {
|
||||
// 获取地图配置
|
||||
await getMap().then((res: any) => {
|
||||
this.mapConfig.is_open = res.data.is_open;
|
||||
this.mapConfig.valid_time = res.data.valid_time;
|
||||
uni.setStorageSync('mapConfig', this.mapConfig);
|
||||
})
|
||||
},
|
||||
setLocation(value: any) {
|
||||
var date = new Date();
|
||||
date.setSeconds(60 * this.mapConfig.valid_time);
|
||||
|
||||
@ -474,4 +474,64 @@ button[type='primary'],uni-button[type='primary']{
|
||||
.mescroll-upwarp{
|
||||
opacity: 0;
|
||||
}
|
||||
/******************** mescroll state **********************/
|
||||
/******************** mescroll state **********************/
|
||||
|
||||
/******************** 商品列表 state **********************/
|
||||
.brand-tag{
|
||||
position: relative;
|
||||
top: -2rpx;
|
||||
display: inline;
|
||||
line-height: 38rpx;
|
||||
padding: 4rpx 8rpx;
|
||||
border-radius: 4rpx;
|
||||
margin-right: 8rpx;
|
||||
background: red;
|
||||
vertical-align: middle;
|
||||
font-size: 18rpx;
|
||||
color: #fff;
|
||||
&.middle{
|
||||
padding: 4rpx 8rpx;
|
||||
border-radius: 8rpx;
|
||||
font-size: 20rpx;
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.base-tag {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 34rpx;
|
||||
font-size: 18rpx;
|
||||
padding: 0 8rpx;
|
||||
color: #333;
|
||||
border-radius: 4rpx;
|
||||
background-color: #fff;
|
||||
margin-right: 8rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 8rpx;
|
||||
border: 2rpx solid transparent;
|
||||
&.middle{
|
||||
height: 40rpx;
|
||||
padding: 0 12rpx;
|
||||
border-radius: 8rpx;
|
||||
font-size: 20rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.img-tag {
|
||||
display: block;
|
||||
height: 34rpx;
|
||||
width: auto;
|
||||
border-radius: 4rpx;
|
||||
margin-right: 14rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 8rpx;
|
||||
&.middle{
|
||||
height: 38rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
}
|
||||
/******************** 商品列表 end **********************/
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 3952239 */
|
||||
src: url('//at.alicdn.com/t/c/font_3952239_urcc1eq7dmn.woff2?t=1726020629322') format('woff2'),
|
||||
url('//at.alicdn.com/t/c/font_3952239_urcc1eq7dmn.woff?t=1726020629322') format('woff'),
|
||||
url('//at.alicdn.com/t/c/font_3952239_urcc1eq7dmn.ttf?t=1726020629322') format('truetype');
|
||||
src: url('//at.alicdn.com/t/c/font_3952239_cci6ogjyld.woff2?t=1729334583603') format('woff2'),
|
||||
url('//at.alicdn.com/t/c/font_3952239_cci6ogjyld.woff?t=1729334583603') format('woff'),
|
||||
url('//at.alicdn.com/t/c/font_3952239_cci6ogjyld.ttf?t=1729334583603') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
@ -13,6 +13,22 @@
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.iconbiaoqianV6xx2:before {
|
||||
content: "\e824";
|
||||
}
|
||||
|
||||
.iconxinrenV6xx:before {
|
||||
content: "\e821";
|
||||
}
|
||||
|
||||
.iconhuodongV6xx:before {
|
||||
content: "\e820";
|
||||
}
|
||||
|
||||
.iconxuanzhongde-miaobian:before {
|
||||
content: "\e81e";
|
||||
}
|
||||
|
||||
.iconshengyinpc:before {
|
||||
content: "\e7d1";
|
||||
}
|
||||
|
||||
@ -1,84 +0,0 @@
|
||||
## 1.9.1(2024-04-02)
|
||||
- 修复 uni-popup-dialog vue3下使用value无法进行绑定的bug(双向绑定兼容旧写法)
|
||||
## 1.9.0(2024-03-28)
|
||||
- 修复 uni-popup-dialog 双向绑定时初始化逻辑修正
|
||||
## 1.8.9(2024-03-20)
|
||||
- 修复 uni-popup-dialog 数据输入时修正为双向绑定
|
||||
## 1.8.8(2024-02-20)
|
||||
- 修复 uni-popup 在微信小程序下出现文字向上闪动的bug
|
||||
## 1.8.7(2024-02-02)
|
||||
- 新增 uni-popup-dialog 新增属性focus:input模式下,是否自动自动聚焦
|
||||
## 1.8.6(2024-01-30)
|
||||
- 新增 uni-popup-dialog 新增属性maxLength:限制输入框字数
|
||||
## 1.8.5(2024-01-26)
|
||||
- 新增 uni-popup-dialog 新增属性showClose:控制关闭按钮的显示
|
||||
## 1.8.4(2023-11-15)
|
||||
- 新增 uni-popup 支持uni-app-x 注意暂时仅支持 `maskClick` `@open` `@close`
|
||||
## 1.8.3(2023-04-17)
|
||||
- 修复 uni-popup 重复打开时的 bug
|
||||
## 1.8.2(2023-02-02)
|
||||
- uni-popup-dialog 组件新增 inputType 属性
|
||||
## 1.8.1(2022-12-01)
|
||||
- 修复 nvue 下 v-show 报错
|
||||
## 1.8.0(2022-11-29)
|
||||
- 优化 主题样式
|
||||
## 1.7.9(2022-04-02)
|
||||
- 修复 弹出层内部无法滚动的bug
|
||||
## 1.7.8(2022-03-28)
|
||||
- 修复 小程序中高度错误的bug
|
||||
## 1.7.7(2022-03-17)
|
||||
- 修复 快速调用open出现问题的Bug
|
||||
## 1.7.6(2022-02-14)
|
||||
- 修复 safeArea 属性不能设置为false的bug
|
||||
## 1.7.5(2022-01-19)
|
||||
- 修复 isMaskClick 失效的bug
|
||||
## 1.7.4(2022-01-19)
|
||||
- 新增 cancelText \ confirmText 属性 ,可自定义文本
|
||||
- 新增 maskBackgroundColor 属性 ,可以修改蒙版颜色
|
||||
- 优化 maskClick属性 更新为 isMaskClick ,解决微信小程序警告的问题
|
||||
## 1.7.3(2022-01-13)
|
||||
- 修复 设置 safeArea 属性不生效的bug
|
||||
## 1.7.2(2021-11-26)
|
||||
- 优化 组件示例
|
||||
## 1.7.1(2021-11-26)
|
||||
- 修复 vuedoc 文字错误
|
||||
## 1.7.0(2021-11-19)
|
||||
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
|
||||
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-popup](https://uniapp.dcloud.io/component/uniui/uni-popup)
|
||||
## 1.6.2(2021-08-24)
|
||||
- 新增 支持国际化
|
||||
## 1.6.1(2021-07-30)
|
||||
- 优化 vue3下事件警告的问题
|
||||
## 1.6.0(2021-07-13)
|
||||
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
|
||||
## 1.5.0(2021-06-23)
|
||||
- 新增 mask-click 遮罩层点击事件
|
||||
## 1.4.5(2021-06-22)
|
||||
- 修复 nvue 平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug
|
||||
## 1.4.4(2021-06-18)
|
||||
- 修复 H5平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug
|
||||
## 1.4.3(2021-06-08)
|
||||
- 修复 错误的 watch 字段
|
||||
- 修复 safeArea 属性不生效的问题
|
||||
- 修复 点击内容,再点击遮罩无法关闭的Bug
|
||||
## 1.4.2(2021-05-12)
|
||||
- 新增 组件示例地址
|
||||
## 1.4.1(2021-04-29)
|
||||
- 修复 组件内放置 input 、textarea 组件,无法聚焦的问题
|
||||
## 1.4.0 (2021-04-29)
|
||||
- 新增 type 属性的 left\right 值,支持左右弹出
|
||||
- 新增 open(String:type) 方法参数 ,可以省略 type 属性 ,直接传入类型打开指定弹窗
|
||||
- 新增 backgroundColor 属性,可定义主窗口背景色,默认不显示背景色
|
||||
- 新增 safeArea 属性,是否适配底部安全区
|
||||
- 修复 App\h5\微信小程序底部安全区占位不对的Bug
|
||||
- 修复 App 端弹出等待的Bug
|
||||
- 优化 提升低配设备性能,优化动画卡顿问题
|
||||
- 优化 更简单的组件自定义方式
|
||||
## 1.2.9(2021-02-05)
|
||||
- 优化 组件引用关系,通过uni_modules引用组件
|
||||
## 1.2.8(2021-02-05)
|
||||
- 调整为uni_modules目录规范
|
||||
## 1.2.7(2021-02-05)
|
||||
- 调整为uni_modules目录规范
|
||||
- 新增 支持 PC 端
|
||||
- 新增 uni-popup-message 、uni-popup-dialog扩展组件支持 PC 端
|
||||
@ -1,45 +0,0 @@
|
||||
// #ifdef H5
|
||||
export default {
|
||||
name: 'Keypress',
|
||||
props: {
|
||||
disable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
const keyNames = {
|
||||
esc: ['Esc', 'Escape'],
|
||||
tab: 'Tab',
|
||||
enter: 'Enter',
|
||||
space: [' ', 'Spacebar'],
|
||||
up: ['Up', 'ArrowUp'],
|
||||
left: ['Left', 'ArrowLeft'],
|
||||
right: ['Right', 'ArrowRight'],
|
||||
down: ['Down', 'ArrowDown'],
|
||||
delete: ['Backspace', 'Delete', 'Del']
|
||||
}
|
||||
const listener = ($event) => {
|
||||
if (this.disable) {
|
||||
return
|
||||
}
|
||||
const keyName = Object.keys(keyNames).find(key => {
|
||||
const keyName = $event.key
|
||||
const value = keyNames[key]
|
||||
return value === keyName || (Array.isArray(value) && value.includes(keyName))
|
||||
})
|
||||
if (keyName) {
|
||||
// 避免和其他按键事件冲突
|
||||
setTimeout(() => {
|
||||
this.$emit(keyName, {})
|
||||
}, 0)
|
||||
}
|
||||
}
|
||||
document.addEventListener('keyup', listener)
|
||||
this.$once('hook:beforeDestroy', () => {
|
||||
document.removeEventListener('keyup', listener)
|
||||
})
|
||||
},
|
||||
render: () => {}
|
||||
}
|
||||
// #endif
|
||||
@ -1,316 +0,0 @@
|
||||
<template>
|
||||
<view class="uni-popup-dialog">
|
||||
<view class="uni-dialog-title">
|
||||
<text class="uni-dialog-title-text" :class="['uni-popup__'+dialogType]">{{titleText}}</text>
|
||||
</view>
|
||||
<view v-if="mode === 'base'" class="uni-dialog-content">
|
||||
<slot>
|
||||
<text class="uni-dialog-content-text">{{content}}</text>
|
||||
</slot>
|
||||
</view>
|
||||
<view v-else class="uni-dialog-content">
|
||||
<slot>
|
||||
<input class="uni-dialog-input" :maxlength="maxlength" v-model="val" :type="inputType"
|
||||
:placeholder="placeholderText" :focus="focus">
|
||||
</slot>
|
||||
</view>
|
||||
<view class="uni-dialog-button-group">
|
||||
<view class="uni-dialog-button" v-if="showClose" @click="closeDialog">
|
||||
<text class="uni-dialog-button-text">{{closeText}}</text>
|
||||
</view>
|
||||
<view class="uni-dialog-button" :class="showClose?'uni-border-left':''" @click="onOk">
|
||||
<text class="uni-dialog-button-text uni-button-color">{{okText}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import popup from '../uni-popup/popup.js'
|
||||
import {
|
||||
initVueI18n
|
||||
} from '@dcloudio/uni-i18n'
|
||||
import messages from '../uni-popup/i18n/index.js'
|
||||
const {
|
||||
t
|
||||
} = initVueI18n(messages)
|
||||
/**
|
||||
* PopUp 弹出层-对话框样式
|
||||
* @description 弹出层-对话框样式
|
||||
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
|
||||
* @property {String} value input 模式下的默认值
|
||||
* @property {String} placeholder input 模式下输入提示
|
||||
* @property {Boolean} focus input模式下是否自动聚焦,默认为true
|
||||
* @property {String} type = [success|warning|info|error] 主题样式
|
||||
* @value success 成功
|
||||
* @value warning 提示
|
||||
* @value info 消息
|
||||
* @value error 错误
|
||||
* @property {String} mode = [base|input] 模式、
|
||||
* @value base 基础对话框
|
||||
* @value input 可输入对话框
|
||||
* @showClose {Boolean} 是否显示关闭按钮
|
||||
* @property {String} content 对话框内容
|
||||
* @property {Boolean} beforeClose 是否拦截取消事件
|
||||
* @property {Number} maxlength 输入
|
||||
* @event {Function} confirm 点击确认按钮触发
|
||||
* @event {Function} close 点击取消按钮触发
|
||||
*/
|
||||
|
||||
export default {
|
||||
name: "uniPopupDialog",
|
||||
mixins: [popup],
|
||||
emits: ['confirm', 'close', 'update:modelValue', 'input'],
|
||||
props: {
|
||||
inputType: {
|
||||
type: String,
|
||||
default: 'text'
|
||||
},
|
||||
showClose: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// #ifdef VUE2
|
||||
value: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
},
|
||||
// #endif
|
||||
// #ifdef VUE3
|
||||
modelValue: {
|
||||
type: [Number, String],
|
||||
default: ''
|
||||
},
|
||||
// #endif
|
||||
|
||||
|
||||
placeholder: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: 'error'
|
||||
},
|
||||
mode: {
|
||||
type: String,
|
||||
default: 'base'
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
content: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
beforeClose: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
cancelText: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
confirmText: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
maxlength: {
|
||||
type: Number,
|
||||
default: -1,
|
||||
},
|
||||
focus: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogType: 'error',
|
||||
val: ""
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
okText() {
|
||||
return this.confirmText || t("uni-popup.ok")
|
||||
},
|
||||
closeText() {
|
||||
return this.cancelText || t("uni-popup.cancel")
|
||||
},
|
||||
placeholderText() {
|
||||
return this.placeholder || t("uni-popup.placeholder")
|
||||
},
|
||||
titleText() {
|
||||
return this.title || t("uni-popup.title")
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
type(val) {
|
||||
this.dialogType = val
|
||||
},
|
||||
mode(val) {
|
||||
if (val === 'input') {
|
||||
this.dialogType = 'info'
|
||||
}
|
||||
},
|
||||
value(val) {
|
||||
if (this.maxlength != -1 && this.mode === 'input') {
|
||||
this.val = val.slice(0, this.maxlength);
|
||||
} else {
|
||||
this.val = val
|
||||
}
|
||||
},
|
||||
val(val) {
|
||||
// #ifdef VUE2
|
||||
// TODO 兼容 vue2
|
||||
this.$emit('input', val);
|
||||
// #endif
|
||||
// #ifdef VUE3
|
||||
// TODO 兼容 vue3
|
||||
this.$emit('update:modelValue', val);
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 对话框遮罩不可点击
|
||||
this.popup.disableMask()
|
||||
// this.popup.closeMask()
|
||||
if (this.mode === 'input') {
|
||||
this.dialogType = 'info'
|
||||
this.val = this.value;
|
||||
// #ifdef VUE3
|
||||
this.val = this.modelValue;
|
||||
// #endif
|
||||
} else {
|
||||
this.dialogType = this.type
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 点击确认按钮
|
||||
*/
|
||||
onOk() {
|
||||
if (this.mode === 'input') {
|
||||
this.$emit('confirm', this.val)
|
||||
} else {
|
||||
this.$emit('confirm')
|
||||
}
|
||||
if (this.beforeClose) return
|
||||
this.popup.close()
|
||||
},
|
||||
/**
|
||||
* 点击取消按钮
|
||||
*/
|
||||
closeDialog() {
|
||||
this.$emit('close')
|
||||
if (this.beforeClose) return
|
||||
this.popup.close()
|
||||
},
|
||||
close() {
|
||||
this.popup.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.uni-popup-dialog {
|
||||
width: 300px;
|
||||
border-radius: 11px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.uni-dialog-title {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
padding-top: 25px;
|
||||
}
|
||||
|
||||
.uni-dialog-title-text {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.uni-dialog-content {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.uni-dialog-content-text {
|
||||
font-size: 14px;
|
||||
color: #6C6C6C;
|
||||
}
|
||||
|
||||
.uni-dialog-button-group {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
border-top-color: #f5f5f5;
|
||||
border-top-style: solid;
|
||||
border-top-width: 1px;
|
||||
}
|
||||
|
||||
.uni-dialog-button {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
|
||||
flex: 1;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 45px;
|
||||
}
|
||||
|
||||
.uni-border-left {
|
||||
border-left-color: #f0f0f0;
|
||||
border-left-style: solid;
|
||||
border-left-width: 1px;
|
||||
}
|
||||
|
||||
.uni-dialog-button-text {
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.uni-button-color {
|
||||
color: #007aff;
|
||||
}
|
||||
|
||||
.uni-dialog-input {
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
border: 1px #eee solid;
|
||||
height: 40px;
|
||||
padding: 0 10px;
|
||||
border-radius: 5px;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.uni-popup__success {
|
||||
color: #4cd964;
|
||||
}
|
||||
|
||||
.uni-popup__warn {
|
||||
color: #f0ad4e;
|
||||
}
|
||||
|
||||
.uni-popup__error {
|
||||
color: #dd524d;
|
||||
}
|
||||
|
||||
.uni-popup__info {
|
||||
color: #909399;
|
||||
}
|
||||
</style>
|
||||
@ -1,143 +0,0 @@
|
||||
<template>
|
||||
<view class="uni-popup-message">
|
||||
<view class="uni-popup-message__box fixforpc-width" :class="'uni-popup__'+type">
|
||||
<slot>
|
||||
<text class="uni-popup-message-text" :class="'uni-popup__'+type+'-text'">{{message}}</text>
|
||||
</slot>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import popup from '../uni-popup/popup.js'
|
||||
/**
|
||||
* PopUp 弹出层-消息提示
|
||||
* @description 弹出层-消息提示
|
||||
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
|
||||
* @property {String} type = [success|warning|info|error] 主题样式
|
||||
* @value success 成功
|
||||
* @value warning 提示
|
||||
* @value info 消息
|
||||
* @value error 错误
|
||||
* @property {String} message 消息提示文字
|
||||
* @property {String} duration 显示时间,设置为 0 则不会自动关闭
|
||||
*/
|
||||
|
||||
export default {
|
||||
name: 'uniPopupMessage',
|
||||
mixins:[popup],
|
||||
props: {
|
||||
/**
|
||||
* 主题 success/warning/info/error 默认 success
|
||||
*/
|
||||
type: {
|
||||
type: String,
|
||||
default: 'success'
|
||||
},
|
||||
/**
|
||||
* 消息文字
|
||||
*/
|
||||
message: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
/**
|
||||
* 显示时间,设置为 0 则不会自动关闭
|
||||
*/
|
||||
duration: {
|
||||
type: Number,
|
||||
default: 3000
|
||||
},
|
||||
maskShow:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
created() {
|
||||
this.popup.maskShow = this.maskShow
|
||||
this.popup.messageChild = this
|
||||
},
|
||||
methods: {
|
||||
timerClose(){
|
||||
if(this.duration === 0) return
|
||||
clearTimeout(this.timer)
|
||||
this.timer = setTimeout(()=>{
|
||||
this.popup.close()
|
||||
},this.duration)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" >
|
||||
.uni-popup-message {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.uni-popup-message__box {
|
||||
background-color: #e1f3d8;
|
||||
padding: 10px 15px;
|
||||
border-color: #eee;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 500px) {
|
||||
.fixforpc-width {
|
||||
margin-top: 20px;
|
||||
border-radius: 4px;
|
||||
flex: none;
|
||||
min-width: 380px;
|
||||
/* #ifndef APP-NVUE */
|
||||
max-width: 50%;
|
||||
/* #endif */
|
||||
/* #ifdef APP-NVUE */
|
||||
max-width: 500px;
|
||||
/* #endif */
|
||||
}
|
||||
}
|
||||
|
||||
.uni-popup-message-text {
|
||||
font-size: 14px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.uni-popup__success {
|
||||
background-color: #e1f3d8;
|
||||
}
|
||||
|
||||
.uni-popup__success-text {
|
||||
color: #67C23A;
|
||||
}
|
||||
|
||||
.uni-popup__warn {
|
||||
background-color: #faecd8;
|
||||
}
|
||||
|
||||
.uni-popup__warn-text {
|
||||
color: #E6A23C;
|
||||
}
|
||||
|
||||
.uni-popup__error {
|
||||
background-color: #fde2e2;
|
||||
}
|
||||
|
||||
.uni-popup__error-text {
|
||||
color: #F56C6C;
|
||||
}
|
||||
|
||||
.uni-popup__info {
|
||||
background-color: #F2F6FC;
|
||||
}
|
||||
|
||||
.uni-popup__info-text {
|
||||
color: #909399;
|
||||
}
|
||||
</style>
|
||||
@ -1,187 +0,0 @@
|
||||
<template>
|
||||
<view class="uni-popup-share">
|
||||
<view class="uni-share-title"><text class="uni-share-title-text">{{shareTitleText}}</text></view>
|
||||
<view class="uni-share-content">
|
||||
<view class="uni-share-content-box">
|
||||
<view class="uni-share-content-item" v-for="(item,index) in bottomData" :key="index" @click.stop="select(item,index)">
|
||||
<image class="uni-share-image" :src="item.icon" mode="aspectFill"></image>
|
||||
<text class="uni-share-text">{{item.text}}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="uni-share-button-box">
|
||||
<button class="uni-share-button" @click="close">{{cancelText}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import popup from '../uni-popup/popup.js'
|
||||
import {
|
||||
initVueI18n
|
||||
} from '@dcloudio/uni-i18n'
|
||||
import messages from '../uni-popup/i18n/index.js'
|
||||
const { t } = initVueI18n(messages)
|
||||
export default {
|
||||
name: 'UniPopupShare',
|
||||
mixins:[popup],
|
||||
emits:['select'],
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
beforeClose: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
bottomData: [{
|
||||
text: '微信',
|
||||
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/c2b17470-50be-11eb-b680-7980c8a877b8.png',
|
||||
name: 'wx'
|
||||
},
|
||||
{
|
||||
text: '支付宝',
|
||||
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/d684ae40-50be-11eb-8ff1-d5dcf8779628.png',
|
||||
name: 'ali'
|
||||
},
|
||||
{
|
||||
text: 'QQ',
|
||||
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/e7a79520-50be-11eb-b997-9918a5dda011.png',
|
||||
name: 'qq'
|
||||
},
|
||||
{
|
||||
text: '新浪',
|
||||
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/0dacdbe0-50bf-11eb-8ff1-d5dcf8779628.png',
|
||||
name: 'sina'
|
||||
},
|
||||
// {
|
||||
// text: '百度',
|
||||
// icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/1ec6e920-50bf-11eb-8a36-ebb87efcf8c0.png',
|
||||
// name: 'copy'
|
||||
// },
|
||||
// {
|
||||
// text: '其他',
|
||||
// icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/2e0fdfe0-50bf-11eb-b997-9918a5dda011.png',
|
||||
// name: 'more'
|
||||
// }
|
||||
]
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
computed: {
|
||||
cancelText() {
|
||||
return t("uni-popup.cancel")
|
||||
},
|
||||
shareTitleText() {
|
||||
return this.title || t("uni-popup.shareTitle")
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 选择内容
|
||||
*/
|
||||
select(item, index) {
|
||||
this.$emit('select', {
|
||||
item,
|
||||
index
|
||||
})
|
||||
this.close()
|
||||
|
||||
},
|
||||
/**
|
||||
* 关闭窗口
|
||||
*/
|
||||
close() {
|
||||
if(this.beforeClose) return
|
||||
this.popup.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" >
|
||||
.uni-popup-share {
|
||||
background-color: #fff;
|
||||
border-top-left-radius: 11px;
|
||||
border-top-right-radius: 11px;
|
||||
}
|
||||
.uni-share-title {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 40px;
|
||||
}
|
||||
.uni-share-title-text {
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
}
|
||||
.uni-share-content {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.uni-share-content-box {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
width: 360px;
|
||||
}
|
||||
|
||||
.uni-share-content-item {
|
||||
width: 90px;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
padding: 10px 0;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.uni-share-content-item:active {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.uni-share-image {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.uni-share-text {
|
||||
margin-top: 10px;
|
||||
font-size: 14px;
|
||||
color: #3B4144;
|
||||
}
|
||||
|
||||
.uni-share-button-box {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
|
||||
.uni-share-button {
|
||||
flex: 1;
|
||||
border-radius: 50px;
|
||||
color: #666;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.uni-share-button::after {
|
||||
border-radius: 50px;
|
||||
}
|
||||
</style>
|
||||
@ -1,7 +0,0 @@
|
||||
{
|
||||
"uni-popup.cancel": "cancel",
|
||||
"uni-popup.ok": "ok",
|
||||
"uni-popup.placeholder": "pleace enter",
|
||||
"uni-popup.title": "Hint",
|
||||
"uni-popup.shareTitle": "Share to"
|
||||
}
|
||||
@ -1,8 +0,0 @@
|
||||
import en from './en.json'
|
||||
import zhHans from './zh-Hans.json'
|
||||
import zhHant from './zh-Hant.json'
|
||||
export default {
|
||||
en,
|
||||
'zh-Hans': zhHans,
|
||||
'zh-Hant': zhHant
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
{
|
||||
"uni-popup.cancel": "取消",
|
||||
"uni-popup.ok": "确定",
|
||||
"uni-popup.placeholder": "请输入",
|
||||
"uni-popup.title": "提示",
|
||||
"uni-popup.shareTitle": "分享到"
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
{
|
||||
"uni-popup.cancel": "取消",
|
||||
"uni-popup.ok": "確定",
|
||||
"uni-popup.placeholder": "請輸入",
|
||||
"uni-popup.title": "提示",
|
||||
"uni-popup.shareTitle": "分享到"
|
||||
}
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
<template>
|
||||
<view v-if="showPopup" class="uni-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']">
|
||||
<view @touchstart="touchstart">
|
||||
<uni-transition key="1" v-if="maskShow" name="mask" mode-class="fade" :styles="maskClass"
|
||||
:duration="duration" :show="showTrans" @click="onTap" />
|
||||
<uni-transition key="2" :mode-class="ani" name="content" :styles="transClass" :duration="duration"
|
||||
:show="showTrans" @click="onTap">
|
||||
<uni-transition key="1" v-if="maskShow" name="mask" mode-class="fade" :styles="maskClass" :duration="duration" :show="showTrans" @click="onTap" />
|
||||
<uni-transition key="2" :mode-class="ani" name="content" :styles="transClass" :duration="duration" :show="showTrans" @click="onTap">
|
||||
<view class="uni-popup__wrapper" :style="getStyles" :class="[popupstyle]" @click="clear">
|
||||
<slot />
|
||||
</view>
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
|
||||
|
||||
## Popup 弹出层
|
||||
> **组件名:uni-popup**
|
||||
> 代码块: `uPopup`
|
||||
> 关联组件:`uni-transition`
|
||||
|
||||
|
||||
弹出层组件,在应用中弹出一个消息提示窗口、提示框等
|
||||
|
||||
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-popup)
|
||||
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -18,13 +18,14 @@ export const redirect = (redirect: any) => {
|
||||
if (!getToken() && getNeedLoginPages().indexOf(url) != -1) {
|
||||
|
||||
const config = useConfigStore()
|
||||
const systemStore = useSystemStore()
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
if (config.login.is_username && !config.login.is_mobile && !config.login.is_auth_register) {
|
||||
url = '/app/pages/auth/login'
|
||||
param = { type: 'username' }
|
||||
mode = 'redirectTo'
|
||||
} else if (!config.login.is_username && !config.login.is_mobile && !config.login.is_auth_register) {
|
||||
} else if (systemStore.initStatus == 'finish' && !config.login.is_username && !config.login.is_mobile && !config.login.is_auth_register) {
|
||||
uni.showToast({ title: '商家未开启登录注册', icon: 'none' })
|
||||
return;
|
||||
} else {
|
||||
@ -40,7 +41,7 @@ export const redirect = (redirect: any) => {
|
||||
url = '/app/pages/auth/login'
|
||||
param = { type: 'username' }
|
||||
mode = 'redirectTo'
|
||||
} else if (!config.login.is_username && !config.login.is_mobile && !config.login.is_auth_register) {
|
||||
} else if (systemStore.initStatus == 'finish' && !config.login.is_username && !config.login.is_mobile && !config.login.is_auth_register) {
|
||||
uni.showToast({ title: '商家未开启登录注册', icon: 'none' })
|
||||
return;
|
||||
} else {
|
||||
@ -53,7 +54,7 @@ export const redirect = (redirect: any) => {
|
||||
url = '/app/pages/auth/login'
|
||||
param = { type: 'username' }
|
||||
mode = 'redirectTo'
|
||||
} else if (!config.login.is_username && !config.login.is_mobile) {
|
||||
} else if (systemStore.initStatus == 'finish' && !config.login.is_username && !config.login.is_mobile) {
|
||||
uni.showToast({ title: '商家未开启登录注册', icon: 'none' })
|
||||
return;
|
||||
} else {
|
||||
@ -384,6 +385,24 @@ export function timeStampTurnTime(timeStamp: any, type = "") {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 日期格式转时间戳
|
||||
* @param {Object} date
|
||||
*/
|
||||
export function timeTurnTimeStamp(date: string) {
|
||||
var f = date.split(' ', 2);
|
||||
var d = (f[0] ? f[0] : '').split('-', 3);
|
||||
var t = (f[1] ? f[1] : '').split(':', 3);
|
||||
return (new Date(
|
||||
parseInt(d[0], 10) || null,
|
||||
(parseInt(d[1], 10) || 1) - 1,
|
||||
parseInt(d[2], 10) || null,
|
||||
parseInt(t[0], 10) || null,
|
||||
parseInt(t[1], 10) || null,
|
||||
parseInt(t[2], 10) || null
|
||||
)).getTime() / 1000;
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制
|
||||
* @param {Object} value
|
||||
@ -546,3 +565,25 @@ export function pxToRpx(px: any) {
|
||||
const screenWidth = uni.getSystemInfoSync().screenWidth;
|
||||
return (750 * Number.parseInt(px)) / screenWidth;
|
||||
}
|
||||
|
||||
// 返回上一页
|
||||
export function goback(data: any) {
|
||||
let { url, mode, param, title } = data
|
||||
uni.showToast({
|
||||
title: title,
|
||||
icon: 'none'
|
||||
});
|
||||
setTimeout(() => {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
} else {
|
||||
redirect({
|
||||
url: url,
|
||||
param: param || {},
|
||||
mode: mode || 'redirectTo'
|
||||
});
|
||||
}
|
||||
}, 600);
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
import { language } from '@/locale'
|
||||
import { checkNeedLogin } from '@/utils/auth'
|
||||
import { redirect, getToken, getSiteId } from '@/utils/common'
|
||||
import { redirect, getToken, getSiteId,currRoute } from '@/utils/common'
|
||||
import { memberLog } from '@/app/api/auth'
|
||||
import useConfigStore from "@/stores/config";
|
||||
import { useShare } from '@/hooks/useShare'
|
||||
@ -123,5 +123,15 @@ const setAddonName = async(path: string) => {
|
||||
// 加载分享
|
||||
const loadShare = () => {
|
||||
const { setShare } = useShare()
|
||||
setShare()
|
||||
// 分享其它页面时,需要设置当前页面为白名单
|
||||
const shareWhiteList = [
|
||||
'addon/cms/pages/detail',
|
||||
'addon/shop/pages/goods/detail',
|
||||
'addon/shop/pages/point/detail',
|
||||
'addon/shop_fenxiao/pages/promote_code',
|
||||
'addon/shop_giftcard/pages/detail',
|
||||
'addon/shop_giftcard/pages/give',
|
||||
'app/pages/index/diy',
|
||||
]
|
||||
if(!shareWhiteList.includes(currRoute()||'')) setShare()
|
||||
}
|
||||
@ -34,10 +34,10 @@ export default {
|
||||
})
|
||||
},
|
||||
onShareAppMessage() {
|
||||
useShare().onShareAppMessage()
|
||||
return useShare().onShareAppMessage()
|
||||
},
|
||||
onShareTimeline() {
|
||||
useShare().onShareTimeline()
|
||||
return useShare().onShareTimeline()
|
||||
},
|
||||
methods: {
|
||||
themeColor() {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// #ifdef H5
|
||||
import wx from 'weixin-js-sdk'
|
||||
// #endif
|
||||
import { getWechatSkdConfig } from '@/app/api/system'
|
||||
import { getWechatSdkConfig } from '@/app/api/system'
|
||||
import { isWeixinBrowser } from '@/utils/common'
|
||||
|
||||
class Wechat {
|
||||
@ -12,7 +12,7 @@ class Wechat {
|
||||
}
|
||||
|
||||
public init() {
|
||||
getWechatSkdConfig({
|
||||
getWechatSdkConfig({
|
||||
url: uni.getSystemInfoSync().platform == 'ios' ? uni.getStorageSync('initUrl') : location.href
|
||||
}).then((res: any) => {
|
||||
const { data } = res
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user