26 files modified
38 files added
| | |
| | | if(args){ |
| | | // 处理args参数,如直达到某新页面等 |
| | | console.log('args', args) |
| | | if(args.indexOf('lzzzsc-app') >= 0) { |
| | | args = args.replace("lzzzsc-app://", "/") |
| | | if(args.indexOf('gyq-app') >= 0) { |
| | | args = args.replace("gyq-app://", "/") |
| | | return uni.redirectTo({ |
| | | url: args |
| | | }) |
| | |
| | | console.log('getConfig', res.data) |
| | | if(res.code == 1){ |
| | | try { |
| | | const token = uni.getStorageSync('lzsc-token'); |
| | | const token = uni.getStorageSync('pig-token'); |
| | | if (!token) { |
| | | /* |
| | | uni.redirectTo({ |
| | |
| | | .noDataBtn{ |
| | | width: 240upx !important; |
| | | margin: 50upx auto; |
| | | background-color: #ff7945; |
| | | background-color: #4766FE; |
| | | color: #ffffff !important; |
| | | letter-spacing: 10upx; |
| | | height: 70upx; |
| | |
| | | { |
| | | "version" : "1", |
| | | "prompt" : "template", |
| | | "title" : "齐享购商城注册协议和隐私政策", |
| | | "message" : " 请你务必审慎阅读、充分理解“注册协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=\"https://www.ncmiruo.com/index/?gp=1 \">《注册协议》</a>和<a href=\"https://www.ncmiruo.com/?gp=2 \">《隐私政策》</a>了解详细信息。并且我们会申请读取您的设备信息,以向您提供安全风控服务。同时您应特别注意前述协议中免除或者限制我们责任的条款、对您权利进行限制的条款。如您已详细阅读并同意金喜易购服务协议和隐私政策,请点击【同意并继续】开始使用我们的服务。", |
| | | "title" : "购有趣商城注册协议和隐私政策", |
| | | "message" : " 请你务必审慎阅读、充分理解“注册协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=\"https://gyq1983.jggyq.com/?gp=1 \">《注册协议》</a>和<a href=\"https://gyq1983.jggyq.com/?gp=2 \">《隐私政策》</a>了解详细信息。并且我们会申请读取您的设备信息,以向您提供安全风控服务。同时您应特别注意前述协议中免除或者限制我们责任的条款、对您权利进行限制的条款。如您已详细阅读并同意购有趣服务协议和隐私政策,请点击【同意并继续】开始使用我们的服务。", |
| | | "buttonAccept" : "同意并继续", |
| | | "buttonRefuse" : "暂不同意", |
| | | "hrefLoader" : "system", |
| | | "backToExit" : "false", |
| | | "second" : { |
| | | "title" : "确认提示", |
| | | "message" : " 进入应用前,你需先同意<a href=\"https://www.ncmiruo.com/?gp=1\">《注册协议》</a>和<a href=\"https://www.ncmiruo.com/?gp=2\">《隐私政策》</a>,否则将退出应用。", |
| | | "message" : " 进入应用前,你需先同意<a href=\"https://gyq1983.jggyq.com/?gp=1\">《注册协议》</a>和<a href=\"https://gyq1983.jggyq.com/?gp=2\">《隐私政策》</a>,否则将退出应用。", |
| | | "buttonAccept" : "同意并继续", |
| | | "buttonRefuse" : "退出应用" |
| | | }, |
| | |
| | | import Vue from 'vue' |
| | | import './uni.promisify.adaptor' |
| | | import util from './util.js' |
| | | |
| | | Vue.config.productionTip = false |
| | | App.mpType = 'app' |
| | | Vue.prototype.$webHost = 'https://rbb98765.zrgy-bbg.com' |
| | | |
| | | Vue.prototype.$util = util |
| | | Vue.prototype.$baseUrl = 'https://tmy.xjzbh.com' |
| | | Vue.prototype.$baseUrl = 'https://gyq1983.jggyq.com' |
| | | Vue.prototype.$bank = [ |
| | | '中国工商银行', |
| | | '中国建设银行', |
| | |
| | | { |
| | | "name" : "齐享购", |
| | | "appid" : "__UNI__3333B1D", |
| | | "name" : "购有趣", |
| | | "appid" : "__UNI__E97BFD9", |
| | | "description" : "", |
| | | "versionName" : "1.4.0", |
| | | "versionCode" : 140, |
| | | "versionName" : "1.3.8", |
| | | "versionCode" : 138, |
| | | "transformPx" : false, |
| | | /* 5+App特有相关 */ |
| | | "app-plus" : { |
| | | "statusbar" : { |
| | | "immersed" : false |
| | | "immersed" : true |
| | | }, |
| | | "compatible" : { |
| | | "ignoreVersion" : true |
| | |
| | | "<uses-permission android:name=\"android.permission.WRITE_SMS\"/>" |
| | | ], |
| | | "minSdkVersion" : 29, |
| | | "schemes" : "miruo-app", |
| | | "schemes" : "gyq-app", |
| | | "targetSdkVersion" : 30, |
| | | "abiFilters" : [ "arm64-v8a" ] |
| | | }, |
| | |
| | | "com.apple.developer.associated-domains" : [ "applinks:www.ncmiruo.com" ] |
| | | } |
| | | }, |
| | | "urltypes" : "miruo-app" |
| | | "urltypes" : "gyq-app" |
| | | }, |
| | | /* SDK配置 */ |
| | | "sdkConfigs" : { |
| | |
| | | "description" : "核身服务", |
| | | "platforms" : "Android,iOS", |
| | | "url" : "https://ext.dcloud.net.cn/plugin?id=10378", |
| | | "android_package_name" : "", |
| | | "ios_bundle_id" : "com.qxg.app", |
| | | "android_package_name" : "com.jingu.gyq", |
| | | "ios_bundle_id" : "com.jingu.gyq", |
| | | "isCloud" : true, |
| | | "bought" : 1, |
| | | "pid" : "10378", |
| | | "parameters" : {} |
| | | } |
| | | }, |
| | | "DC-WBNormal" : { |
| | | "__plugin_info__" : { |
| | | "name" : "DC-WBNormal", |
| | | "description" : "WB Normal SDK uni-app 插件", |
| | | "platforms" : "Android", |
| | | "url" : "https://ext.dcloud.net.cn/plugin?id=1491", |
| | | "android_package_name" : "com.jingu.gyq", |
| | | "ios_bundle_id" : "com.jingu.gyq", |
| | | "isCloud" : true, |
| | | "bought" : 1, |
| | | "pid" : "1491", |
| | | "parameters" : {} |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | "path": "pages/index/index", |
| | | "style": { |
| | | "navigationStyle":"custom", |
| | | "navigationBarTitleText": "齐享购" |
| | | "navigationBarTitleText": "购有趣" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/cates/cates", |
| | | "style" : |
| | | { |
| | | "navigationStyle":"custom", |
| | | "navigationBarTitleText": "分类" |
| | | } |
| | | }, |
| | |
| | | "style": { |
| | | "navigationBarTitleText": "联系客服" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/quanyi/index", |
| | | "style": { |
| | | "navigationBarTitleText": "会员权益" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/quanyi/add", |
| | | "style": { |
| | | "navigationBarTitleText": "绑卡" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/quanshou/index", |
| | | "style": { |
| | | "navigationBarTitleText": "会员权收" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/web/index", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/web/xieyi", |
| | | "style": { |
| | | "navigationBarTitleText": "协议" |
| | | } |
| | | } |
| | | ], |
| | | "tabBar": { |
| | | "color": "#252938", |
| | | "selectedColor": "#FF1472", |
| | | "selectedColor": "#4766FE", |
| | | "borderStyle": "black", |
| | | "backgroundColor": "#FFFFFF", |
| | | "list": [ |
| | | { |
| | | "pagePath": "pages/index/index", |
| | | "iconPath": "static/imgs/tab-1.png", |
| | | "selectedIconPath": "static/imgs/tab-s-1.png", |
| | | "iconPath": "static/imgs/tb1.png", |
| | | "selectedIconPath": "static/imgs/tb11.png", |
| | | "text": "首页" |
| | | }, |
| | | { |
| | | "pagePath": "pages/cates/cates", |
| | | "iconPath": "static/imgs/tab-2.png", |
| | | "selectedIconPath": "static/imgs/tab-s-2.png", |
| | | "text": "分类" |
| | | }, |
| | | // { |
| | | // "pagePath": "pages/cates/cates", |
| | | // "iconPath": "/static/imgs/tb2.png", |
| | | // "selectedIconPath": "/static/imgs/tb2.png", |
| | | // "text": "分类" |
| | | // }, |
| | | { |
| | | "pagePath": "pages/carts/carts", |
| | | "iconPath": "static/imgs/tab-3.png", |
| | | "selectedIconPath": "static/imgs/tab-s-3.png", |
| | | "iconPath": "static/imgs/tb3.png", |
| | | "selectedIconPath": "static/imgs/tb33.png", |
| | | "text": "购物车" |
| | | }, |
| | | { |
| | | "pagePath": "pages/my/my", |
| | | "iconPath": "static/imgs/tab-4.png", |
| | | "selectedIconPath": "static/imgs/tab-s-4.png", |
| | | "iconPath": "static/imgs/tb4.png", |
| | | "selectedIconPath": "static/imgs/tb44.png", |
| | | "text": "我的" |
| | | } |
| | | ] |
| | | }, |
| | | "globalStyle": { |
| | | "navigationBarTextStyle": "black", |
| | | "navigationBarTitleText": "齐享购", |
| | | "navigationBarTitleText": "购有趣", |
| | | "navigationBarBackgroundColor": "#F8F8F8", |
| | | "backgroundColor": "#F8F8F8" |
| | | }, |
| | |
| | | <view class="noData" v-else> |
| | | <image src="/static/imgs/noData.png" mode="" style="margin-top: 200upx;"></image> |
| | | <view class="">没有购物车信息</view> |
| | | <view class="noDataBtn" @tap="$util.goSwitch('/pages/cates/cates')">去看看</view> |
| | | <view class="noDataBtn" @tap="$util.goSwitch('/pages/index/index')">去看看</view> |
| | | </view> |
| | | </view> |
| | | <view class="cartsControll" v-if="cartsData.length > 0"> |
| | |
| | | getCatesData() { |
| | | this.$util.post('Cates/getCates', {catesId: this.catesId, pageIndex: this.pageIndex, pageSize: this.pageSize}).then(res => { |
| | | if(res.code == 1) { |
| | | console.log('catesData',res) |
| | | this.catesData = res.data.list |
| | | this.getCatesGoods() |
| | | } |
| | |
| | | <template> |
| | | <view class="index"> |
| | | <view class="status_bar"></view> |
| | | <view class="index-top"> |
| | | <view class="index-title"> |
| | | <view class="index-title-view index-title-view1"> |
| | | <view class="index-title-view-lf"> |
| | | <image src="@/static/imgs/index-logo.png" mode=""></image> |
| | | </view> |
| | | <view class="index-title-view-lf2">趋势好货放心购</view> |
| | | </view> |
| | | <view class="index-title-view index-title-view2"> |
| | | <view class="index-title-view-rf"> |
| | | <view class=""> |
| | | <image src="@/static/imgs/qiandao.png" mode=""></image> |
| | | <text>签到打卡</text> |
| | | </view> |
| | | </view> |
| | | <view class="index-title-view-rf"> |
| | | <view class=""> |
| | | <image src="@/static/imgs/kefu.png" mode=""></image> |
| | | <text>联系客服</text> |
| | | <view class="page-container index"> |
| | | <image class="page-bg" src="@/static/imgs/index-top.png" mode="scaleToFill"></image> |
| | | <view class="content" style="padding-bottom: 200rpx;"> |
| | | <!-- #ifdef APP-PLUS --> |
| | | <view class="uni-popup" :style="{top:isNativeHead?'':StatusBar}" v-if="contactsFlag"> |
| | | <view class="ani uni-custom uni-popup__wrapper"> |
| | | <view class="uni-popup__wrapper-box"> |
| | | <view class="title">通讯权限</view> |
| | | <view class="content">便于实现好友推荐、联系人同步等功能</view> |
| | | <view class="btn-group"> |
| | | <button class="cancel-btn" @click="handleReject">拒绝</button> |
| | | <button class="allow-btn" @click="handleAuthorize">允许</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="search"> |
| | | <view class="search-1"> |
| | | <image src="@/static/imgs/s2.png" mode=""></image> |
| | | <input type="text" placeholder="请输入关键词" /> |
| | | <!-- #endif --> |
| | | <view class="hLogo"> |
| | | <view class="hLogoView"> |
| | | <view class="hLogo-1"> |
| | | <image class="h-logo" src="/static/imgs/index-logo.png" mode=""></image> |
| | | </view> |
| | | <view class="search-2"> |
| | | <view class="">搜索</view> |
| | | </view> |
| | | </view> |
| | | <view class="cates"> |
| | | <view class="cates-v" v-for="(item, index) in catesNavData" @tap="$util.goPages('/pages/catesList/catesList?catesId=' + item.id + '&title=' + item.title)"> |
| | | <image class="cates-v-icon" :src="item.icon" mode=""></image> |
| | | <view class="">{{item.title}}</view> |
| | | <view class="hLogo-2" @tap="$util.goPages('../search/search')"> |
| | | <image class="s-icon" src="/static/imgs/search.png" mode=""></image> |
| | | <input type="text" placeholder="请搜索您想要的商品" /> |
| | | <view class="s-btn">搜索</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="banner"> |
| | | <swiper class="swiper" circular :indicator-dots="indicatorDots" :indicator-color="indicatorColor" :autoplay="autoplay" :indicator-active-color="indicatorActiveColor" :interval="interval" :duration="duration"> |
| | | <swiper-item v-for="(item, index) in bannerData" @tap="$util.goPages('/pages/ginfo/ginfo?id=' + item.goodsid)"> |
| | | <image lazy-load :src="item.icon" mode=""></image> |
| | | </swiper-item> |
| | | </swiper> |
| | | <view class="cates" v-if="catesNavData"> |
| | | <view class="cates-v" v-for="(item, index) in catesNavData" @tap="$util.goPages('/pages/catesList/catesList?catesId=' + item.id + '&title=' + item.title)"> |
| | | <image class="cates-v-icon" :src="item.icon" mode=""></image> |
| | | <view class="">{{item.title}}</view> |
| | | </view> |
| | | <view class="comm"> |
| | | <view class="comm-1"> |
| | | <view class="comm-title"> |
| | | <image src="/static/imgs/ptyx.png" mode=""></image> |
| | | <!-- <view class="cates-v" @tap="$util.goSwitch('/pages/cates/cates')"> |
| | | <image class="cates-v-icon" src="/static/imgs/more.png" mode=""></image> |
| | | <view class="">更多</view> |
| | | </view> --> |
| | | </view> |
| | | <view class="comm-goods"> |
| | | <view class="comm-goods-v" v-for="(item, index) in prefGoods" @click="$util.goPages('/pages/ginfo/ginfo?id=' + item.id)"> |
| | | <view class=""> |
| | | <image :src="item.icon" mode=""></image> |
| | | <text>¥{{item.price}}</text> |
| | | |
| | | <!-- <view class="ad1" @tap="$util.goPages('/pages/catesList/catesList?catesId=11' + '&title=' + '服装鞋包')"> |
| | | <image src="/static/imgs/ad1.png" mode=""></image> |
| | | </view> --> |
| | | |
| | | <view class="ad2" @tap="$util.goPages('/pages/catesList/catesList?catesId=3' + '&title=' + '手机数码')"> |
| | | <image src="/static/imgs/ad2.png" mode=""></image> |
| | | </view> |
| | | |
| | | <view class="d3-wrap"> |
| | | <view class="ad3" @tap="$util.goPages('/pages/catesList/catesList?catesId=2' + '&title=' + '家用电器')"> |
| | | <image src="/static/imgs/ad3.png" mode=""></image> |
| | | </view> |
| | | <view class="ad4" @tap="$util.goPages('/pages/catesList/catesList?catesId=4' + '&title=' + '美妆个护')"> |
| | | <image src="/static/imgs/ad4.png" mode=""></image> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- <view class="c-goods" v-if="hotCates" v-for="(item, index) in hotCates"> |
| | | <view class="ca-ad" v-if="index % 2 == 0"> |
| | | <image src="/static/imgs/c1.png" mode=""></image> |
| | | </view> |
| | | <view class="ca-ad" v-else> |
| | | <image src="/static/imgs/c2.png" mode=""></image> |
| | | </view> |
| | | <view class="cGoods"> |
| | | <scroll-view class="scroll-view_H" scroll-x="true"> |
| | | <view class="scroll-view-item_H" v-for="(itm, index) in item.goods" @tap="$util.goPages('/pages/ginfo/ginfo?id=' + itm.id)"> |
| | | <image lazy-load class="goods-icon" :src="itm.icon" mode=""></image> |
| | | <view class="goods-title">{{itm.title}}</view> |
| | | <view class="goods-price"> |
| | | <view>¥</view> |
| | | <view class="red">{{itm.price}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="comm-2"></view> |
| | | <view class="comm-3"> |
| | | <view class="comm-title"> |
| | | <image src="@/static/imgs/jfdh.png" mode=""></image> |
| | | </scroll-view> |
| | | </view> |
| | | <view class="comm-goods"> |
| | | <view class="comm-goods-v" v-for="(item, index) in pointGoods" @click="$util.goPages('/pages/ginfo/ginfo?id=' + item.id)"> |
| | | <view class=""> |
| | | <image :src="item.icon" mode=""></image> |
| | | <text>∮{{item.points}}</text> |
| | | </view> --> |
| | | <!-- <view class="c-goods" v-if="hotGoods"> |
| | | <view class="cGoods"> |
| | | <scroll-view class="scroll-view_H" scroll-x="true"> |
| | | <view class="scroll-view-item_H" v-for="(itm, index) in hotGoods" @tap="$util.goPages('/pages/ginfo/ginfo?id=' + itm.id)"> |
| | | <image lazy-load class="goods-icon" :src="itm.icon" mode=""></image> |
| | | <view class="goods-title">{{itm.title}}</view> |
| | | <view class="goods-price"> |
| | | <view>¥</view> |
| | | <view class="red">{{itm.price}}</view> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="hots"> |
| | | <view class="hots-title" @tap="$util.goPages('/pages/catesList/catesList?is_hot=1&title=热门推荐')"> |
| | | <image class="hots-icon" src="@/static/imgs/rmtj.png" mode=""></image> |
| | | <view class="hots-rgt"> |
| | | <text>大家都在买</text> |
| | | <image src="@/static/imgs/right.png" mode=""></image> |
| | | </view> |
| | | </view> |
| | | <view class="hots-goods"> |
| | | <view class="hots-goods-v" v-for="(item, index) in hotGoods" @click="$util.goPages('/pages/ginfo/ginfo?id=' + item.id)"> |
| | | <view class=""> |
| | | <image :src="item.icon" mode=""></image> |
| | | <text>¥{{item.price}}</text> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | |
| | | <view class="cateNav"> |
| | | <view class="cateNav-item" :class="{active:actIndex===index}" v-for="(item, index) in cateNavList" :key="index" @click="navClick(item,index)"> |
| | | <view class="cateNav-title">{{item.title}}</view> |
| | | <view class="cateNav-desc">{{item.desc}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="goods-main"> |
| | |
| | | <view class="goods-price"> |
| | | <view>¥</view> |
| | | <view class="red">{{itm.price}}</view> |
| | | <view class="hyj"> |
| | | <!-- <view class="hyj"> |
| | | <image src="@/static/imgs/hyj.png" mode=""></image> |
| | | </view> |
| | | </view> --> |
| | | <view>¥</view> |
| | | <view class="red">{{itm.price}}</view> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="login-desc" v-if="!userInfo" @tap="$util.goPages('../login/login')"> |
| | | <image class="login-icon" src="/static/imgs/logo-icon.png" mode=""></image> |
| | | <view class="login-font">登录购有趣,打开美好生活</view> |
| | | <view class="login-btn">立即登录</view> |
| | | </view> |
| | | </view> |
| | | |
| | | <uni-popup ref="popup2" type="center" :is-mask-click="false"> |
| | | <view class="popup-content"> |
| | | <view class="edu-view edu-view2"> |
| | | <image src="/static/imgs/close.png" class="close-edu" mode="" @tap="$refs.popup2.close()"></image> |
| | | <view class="edu-view-desc2">认证领取额度</view> |
| | | <image class="edu-icon-succ" src="/static/imgs/auths.png" mode=""></image> |
| | | <view class="edu-view-desc3"> |
| | | 请您先认证个人信息,然后立即领取额度 |
| | | </view> |
| | | <view class="edu-btns" @tap="goLingqu">立即领取</view> |
| | | <view class="edu-btns" @tap="go_auth">立即领取</view> |
| | | <!-- <view class="edu-btns" @tap="$util.goPages('/pages/idcard/idcard')">立即领取</view> --> |
| | | </view> |
| | | </view> |
| | | </uni-popup> |
| | |
| | | <script> |
| | | import permision from "@/js_sdk/wa-permission/permission.js" |
| | | export default { |
| | | props: { |
| | | // 开启动画 |
| | | animation: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | type: { |
| | | type: String, |
| | | default: 'top' |
| | | }, |
| | | //是否是原生头部 |
| | | isNativeHead:{ |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | scrollIndex: 0, |
| | | scrollCurrent: '', |
| | | contactsFlag: false, |
| | | staHeight: 0, |
| | | paddingHeight: 0, |
| | | indicatorDots: true, |
| | |
| | | duration: 500, |
| | | bannerData: [], |
| | | catesNavData: [], |
| | | goodsData: [], |
| | | prefGoods: [], |
| | | hotGoods: [], |
| | | pointGoods: [], |
| | | catesHotData: [], |
| | | userInfo: null, |
| | | config: null, |
| | | statusBarHeight: 30, |
| | | StatusBar: 0, |
| | | hotGoods: null, |
| | | newGoods: null, |
| | | hotCates: null, |
| | | catesId: 0, |
| | | is_hot: '', |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | goodsData: [], |
| | | cateNavList: [ |
| | | { |
| | | title: '精选', |
| | | desc: '猜你喜欢', |
| | | skey: '手机数码', |
| | | catesId: 3, |
| | | },{ |
| | | title: '人气', |
| | | desc: '好物精选', |
| | | skey: '家用电器', |
| | | catesId: 2, |
| | | },{ |
| | | title: '休闲', |
| | | desc: '天天低价', |
| | | skey: '美妆个护', |
| | | catesId: 4, |
| | | },{ |
| | | title: '母婴', |
| | | desc: '热门榜单', |
| | | skey: '母婴童玩', |
| | | catesId: 5, |
| | | }, |
| | | ], |
| | | actIndex: 0, |
| | | } |
| | | }, |
| | | onShow() { |
| | | this.getData() |
| | | this.getConfig() |
| | | this.getUserInfo() |
| | | // #ifdef APP-PLUS |
| | | plus.navigator.setStatusBarBackground('transparent'); |
| | | // #endif |
| | | }, |
| | | created() { |
| | | this.catesGoods() |
| | | }, |
| | | onLoad() { |
| | | const systemInfo = uni.getSystemInfoSync(); |
| | | this.statusBarHeight = systemInfo.statusBarHeight || 30; |
| | | }, |
| | | onReady() { |
| | | // #ifdef APP-PLUS |
| | | plus.navigator.setStatusBarBackground('#FFD2D8') |
| | | this.getSystemInfo(); |
| | | // #endif |
| | | }, |
| | | mounted() { |
| | | }, |
| | | methods: { |
| | | getData () { |
| | | this.$util.post('Goods/getIndexData').then(res => { |
| | | this.bannerData = res.data.bannerData |
| | | this.catesNavData = res.data.catesNavData |
| | | this.pointGoods = res.data.pointGoods |
| | | this.hotGoods = res.data.hotGoods |
| | | this.prefGoods = res.data.prefGoods |
| | | this.goodsData = res.data.catesNavData[1].goods |
| | | navClick(data,index) { |
| | | this.actIndex = index; |
| | | this.catesId = data.catesId |
| | | this.catesGoods() |
| | | }, |
| | | //获取分类商品 |
| | | catesGoods(){ |
| | | this.$util.post('Goods/getCatesGoods', {catesId: this.catesId, is_hot: this.is_hot, pageIndex: this.pageIndex, pageSize: this.pageSize}).then(res => { |
| | | if(res.code == 1) { |
| | | this.goodsData = res.data.list |
| | | } |
| | | }) |
| | | }, |
| | | scrollClick (index) { |
| | | this.scrollIndex = index |
| | | this.scrollCurrent = 'scrollItem' + index |
| | | this.goodsData = [] |
| | | this.goodsData = this.catesNavData[index].goods |
| | | setTimeout(() => { |
| | | this.scrollCurrent = ''; // 重置以便下次可以滚动到相同位置 |
| | | }, 500); |
| | | //获取状态栏高度 |
| | | getSystemInfo() { |
| | | let _this = this; |
| | | uni.getSystemInfo({ |
| | | success: function(e) { |
| | | _this.StatusBar = e.statusBarHeight + 'px'; //用于自定义头部时,给手机状态栏留出位置,可通过isNativeHead这个参数控制 |
| | | } |
| | | }) |
| | | }, |
| | | getConfig() { |
| | | let t = this |
| | | t.$util.post('Index/getConfig').then(res => { |
| | | if(res.code == 1) { |
| | | console.log('config', res.data) |
| | | t.config = res.data |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | getUserInfo () { |
| | | let t = this |
| | | t.$util.post('User/getUser').then(res => { |
| | | console.log(res); |
| | | if(res.code == 1){ |
| | | this.userInfo = res.data |
| | | if(res.data.over_auth == 0 && t.config.put_open == 2){ |
| | | setTimeout(() => { |
| | | t.$refs.popup2.open() |
| | | }, 100) |
| | | } else { |
| | | setTimeout(() => { |
| | | t.$refs.popup2.close() |
| | | //t.$refs.popup2.open() |
| | | }, 100) |
| | | } |
| | | if(res.data.contacts == 0 && uni.getSystemInfoSync().platform == 'android' && this.config.put_open == 2){ |
| | | t.requestAndroidPermission('android.permission.READ_CONTACTS') |
| | | } |
| | | // if(res.data.contacts == 0 && uni.getSystemInfoSync().platform == 'android'){ |
| | | // // t.contactsFlag = !t.contactsFlag |
| | | // t.requestAndroidPermission('android.permission.READ_CONTACTS') |
| | | // } |
| | | } |
| | | }) |
| | | }, |
| | | handleAuthorize() { |
| | | this.contactsFlag = false; |
| | | this.requestAndroidPermission('android.permission.READ_CONTACTS') |
| | | }, |
| | | // 4. 手动点击“拒绝”按钮 |
| | | handleReject() { |
| | | this.contactsFlag = false; |
| | | uni.showToast({ title: '已拒绝通讯录权限', icon: 'none' }); |
| | | // 可根据业务需求处理拒绝后的逻辑(如限制功能使用) |
| | | }, |
| | | go_auth () { |
| | | let goUrl = '' |
| | | if(this.userInfo.idcard_auth == 0){ |
| | | goUrl = '/pages/idcard/idcard' |
| | | } else if(this.userInfo.face_auth == 0){ |
| | | goUrl = '/pages/face/face' |
| | | } else if(this.userInfo.job_auth == 0){ |
| | | goUrl = '/pages/job/job' |
| | | } else if(this.userInfo.bank_auth == 0){ |
| | | goUrl = '/pages/addBank/addBank?backUrl=/pages/edu/edu' |
| | | } |
| | | console.log(goUrl); |
| | | if(goUrl != '') { |
| | | uni.navigateTo({ |
| | | url: goUrl |
| | | }) |
| | | }else{ |
| | | this.$refs.popup2.close() |
| | | uni.showToast({ |
| | | title: '无法认证!', |
| | | icon: 'error' |
| | | }) |
| | | } |
| | | }, |
| | | goLingqu () { |
| | | if(!this.$util.checkLogin('/pages/index/index')){ |
| | | return |
| | | if(!this.userInfo){ |
| | | return uni.showToast({ |
| | | title: '请先登录!', |
| | | icon: 'error' |
| | | }) |
| | | } |
| | | if(this.userInfo && this.userInfo.over_auth == 1) { |
| | | return uni.showToast({ |
| | |
| | | this.$util.goSetting() |
| | | } |
| | | }, |
| | | |
| | | getData () { |
| | | this.$util.post('Goods/getIndexData').then(res => { |
| | | console.log('getIndexData',res) |
| | | this.bannerData = res.data.bannerData |
| | | this.catesNavData = res.data.catesNavData |
| | | this.catesHotData = res.data.catesHotData |
| | | this.hotGoods = res.data.hotGoods |
| | | this.newGoods = res.data.newGoods |
| | | this.hotCates = res.data.hotCates |
| | | }) |
| | | }, |
| | | setContacts () { |
| | | uni.showLoading({ |
| | | title: '授权中...' |
| | |
| | | <style> |
| | | @import url(@/static/css/index.css); |
| | | </style> |
| | | <style lang="scss"> |
| | | .cateNav { |
| | | display: flex; |
| | | justify-content: center; |
| | | gap: 30rpx; |
| | | margin-top: 40rpx; |
| | | margin-bottom: 30rpx; |
| | | .cateNav-item { |
| | | width: 20%; |
| | | text-align: center; |
| | | .cateNav-title { |
| | | color: #333333; |
| | | font-weight: bold; |
| | | font-size: 32rpx; |
| | | } |
| | | .cateNav-desc { |
| | | color: #666666; |
| | | font-size: 24rpx; |
| | | } |
| | | } |
| | | .cateNav-item.active { |
| | | .cateNav-title { |
| | | color: #4766FE; |
| | | } |
| | | .cateNav-desc { |
| | | color: #ffffff; |
| | | background-color: #4766FE; |
| | | border-radius: 50rpx; |
| | | padding: 12rpx 0; |
| | | } |
| | | } |
| | | } |
| | | .uni-popup { |
| | | position: fixed; |
| | | top: 0; |
| | | bottom: 0; |
| | | left: 0; |
| | | right: 0; |
| | | z-index: 99999; |
| | | overflow: hidden; |
| | | &__wrapper { |
| | | position: absolute; |
| | | z-index: 9999999; |
| | | /* #ifndef APP-NVUE */ |
| | | box-sizing: border-box; |
| | | /* #endif */ |
| | | &.ani { |
| | | /* #ifndef APP-NVUE */ |
| | | transition: all 0.3s; |
| | | /* #endif */ |
| | | } |
| | | &.top { |
| | | top: 0; |
| | | width:705rpx; |
| | | /* #ifdef APP-NVUE */ |
| | | left:22.5rpx; |
| | | /* #endif */ |
| | | /* #ifndef APP-NVUE */ |
| | | left:0; |
| | | transform: translateY(-705rpx); |
| | | /* #endif */ |
| | | } |
| | | &-box { |
| | | position: relative; |
| | | /* #ifndef APP-NVUE */ |
| | | box-sizing: border-box; |
| | | /* #endif */ |
| | | } |
| | | &.uni-custom { |
| | | & .uni-popup__wrapper-box { |
| | | width: 705rpx; |
| | | /* #ifndef APP-NVUE */ |
| | | margin: 0 22.5rpx; |
| | | /* #endif */ |
| | | padding: 30upx; |
| | | background: #fff; |
| | | z-index:9999; |
| | | border: solid 2rpx #ddd; |
| | | /* #ifndef APP-NVUE */ |
| | | box-sizing: border-box; |
| | | /* #endif */ |
| | | border-radius: 16rpx; |
| | | .title{ |
| | | font-size: 32rpx; |
| | | font-weight: bold; |
| | | } |
| | | .content{ |
| | | margin-top: 16rpx; |
| | | line-height: 1.6; |
| | | } |
| | | } |
| | | &.top{ |
| | | & .uni-popup__wrapper-box { |
| | | width: 705rpx; |
| | | } |
| | | } |
| | | } |
| | | &.uni-top{ |
| | | transform: translateY(0); |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | </view> |
| | | <view class="loginBtn"> |
| | | <view class="loginBtn-desc"> |
| | | <image @click="agreeClick" class="loginBtn-icon" :src="!loginAct ? '/static/imgs/check.png' : '/static/imgs/checked.png'" ></image> |
| | | <image @click="agreeClick" class="loginBtn-icon" :src="!loginAct ? '/static/imgs/check.png' : '/static/imgs/checked.png'" mode=""></image> |
| | | <text>我已阅读并同意</text> |
| | | <text class="blue" @tap="agreeDialog1">《注册协议》</text> |
| | | <text class="blue" @tap="agreeDialog2">《隐私政策》</text> |
| | |
| | | agreeClick () { |
| | | this.loginAct = !this.loginAct |
| | | }, |
| | | async loginUser() { |
| | | loginUser () { |
| | | let t = this |
| | | |
| | | if (!t.loginAct) { |
| | | return uni.showToast({ |
| | | title: '请阅读并同意协议政策', |
| | | icon: 'error' |
| | | }) |
| | | } |
| | | |
| | | if (t.formData.phone == '' || !t.phoneReg.test(t.formData.phone)) { |
| | | return uni.showToast({ |
| | | title: '手机号错误!', |
| | | icon: 'error' |
| | | icon: 'error', |
| | | }) |
| | | } |
| | | |
| | | if (t.formData.pass == '' && t.formData.loginType == 1) { |
| | | return uni.showToast({ |
| | | title: '请输入密码!', |
| | | icon: 'error' |
| | | icon: 'error', |
| | | }) |
| | | } |
| | | |
| | | if (t.formData.code == '' && t.formData.loginType == 2) { |
| | | return uni.showToast({ |
| | | title: '请输入验证码!', |
| | | icon: 'error' |
| | | icon: 'error', |
| | | }) |
| | | } |
| | | |
| | | try { |
| | | |
| | | // 登录接口 |
| | | const res = await t.$util.post('User/Login', this.formData) |
| | | |
| | | t.$util.post('User/Login', this.formData).then(res => { |
| | | if (res.code == 1) { |
| | | |
| | | uni.setStorageSync('lzsc-token', res.data.userToken) |
| | | uni.setStorageSync('pig-token', res.data.userToken) |
| | | uni.setStorageSync('user-info', JSON.stringify(res.data)) |
| | | |
| | | let isSwitch = 0 |
| | | let goUrl = '' |
| | | |
| | | // qxgLogin接口 |
| | | const ygxRes = await new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: t.$webHost + '/api/v2/auth/qxgIosUnionLogin?phone=' + t.$util.getUserInfo().phone, |
| | | success: resolve, |
| | | fail: reject |
| | | }) |
| | | }) |
| | | console.log(ygxRes); |
| | | if(!ygxRes.data.data.boughtEquity){ |
| | | goUrl = '/pages/quanyi/index' |
| | | t.$util.goPages(goUrl) |
| | | return |
| | | } |
| | | |
| | | t.qxgLogin = ygxRes.data.data |
| | | uni.setStorageSync('qxgLogin', t.qxgLogin) |
| | | |
| | | if (this.backUrl == '') { |
| | | isSwitch = 1 |
| | | goUrl = '/pages/index/index' |
| | | } else { |
| | | goUrl = this.backUrl |
| | | } |
| | | |
| | | uni.showToast({ |
| | | title: res.msg || '登录成功' |
| | | }) |
| | | |
| | | setTimeout(() => { |
| | | if (isSwitch == 1) { |
| | | t.$util.goSwitch(goUrl) |
| | |
| | | t.$util.goPages(goUrl) |
| | | } |
| | | }, 1500) |
| | | |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.msg || '登录失败', |
| | | icon: 'error' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | console.error(err) |
| | | |
| | | uni.showToast({ |
| | | title: '请求失败', |
| | | icon: 'error' |
| | | }) |
| | | } |
| | | }, |
| | | sendCode () { |
| | | let t = this |
| | |
| | | <template> |
| | | <view class="my"> |
| | | <view class="myView"> |
| | | <image class="myView-bg" src="@/static/imgs/my-bg.png" mode="scaleToFill"></image> |
| | | <yk-authpup ref="authpup" type="top" @changeAuth="changeAuth" noticeTitle="便于您使用该功能上传您的照片用于核实身份场景中读取相册内容" permissionID="WRITE_EXTERNAL_STORAGE"></yk-authpup> |
| | | <yk-authpup ref="camears" type="top" @changeAuth="changeAuth2" noticeTitle="便于您使用该功能便于您拍摄上传用于核实身份场景" permissionID="CAMERA"></yk-authpup> |
| | | <view class="startBar" style="background-color: #e3b400;"></view> |
| | | <view class="myTop"> |
| | | <view class="headimg"> |
| | | <image :src="userInfo != null ? userInfo.avatar : '/static/imgs/headimg.png'" class="" mode="widthFix" @tap="setImg"></image> |
| | | <view class=""> |
| | | <view class="startBar"></view> |
| | | <view class="myContent"> |
| | | <view class="myHeader"> |
| | | <image :src="userInfo != null ? userInfo.avatar : '/static/imgs/headimg.png'" class="avatar" mode="" @tap="setImg"></image> |
| | | <view class="myNick"> |
| | | <template> |
| | | <view v-if="userInfo == null" @tap="$util.goPages('/pages/login/login')">未登录</view> |
| | | <view v-else>{{userInfo.phone}}</view> |
| | |
| | | </template> |
| | | </template> |
| | | <template v-if="userInfo != null && userInfo.face_auth == 0"> |
| | | <view class="edu" @tap="$util.checkGoPages('/pages/my/my')">未认证(去认证)</view> |
| | | <view class="edu" @tap="$util.checkGoPages('/pages/my/my')">未认证</view> |
| | | </template> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="auth" v-if="userInfo && userInfo.over_auth != 1" @tap="$util.checkGoPages('/pages/my/my')"> |
| | | <image src="@/static/imgs/notice.png" mode=""></image> |
| | | <text>您还未进行实名认证,点击前往实名认证</text> |
| | | <view class="">去认证</view> |
| | | </view> |
| | | |
| | | <view class="myNavs"> |
| | | <view class="myNavs-tips" @tap="$util.checkLogin('/pages/order/order')"> |
| | | <text class="myNavs-tips-text">我的订单</text> |
| | | <view class="myNavs-tips-rgt"> |
| | | <view class="num-wrapper tui-skeleton-rect"> |
| | | <view class="num-item" style="display: flex;background: white;border-radius: 24rpx;padding: 22rpx;width: 48%;" @tap="$util.checkLogin('/pages/collect/collect')"> |
| | | <view style="padding-right: 32rpx;"> |
| | | <image style="width: 48rpx;height: 48rpx;margin-top: 30rpx;" src="/static/imgs/Star.png"></image> |
| | | </view> |
| | | <view style="flex: 1"> |
| | | <view class="txt" style="color: #666;text-align:left">我的收藏</view> |
| | | <view class="num" style="color: #333;text-align:left;margin-top: 8rpx;">0</view> |
| | | |
| | | </view> |
| | | </view> |
| | | <view style="display: flex;background: white;border-radius: 24rpx;padding: 22rpx;width: 48%;" class="num-item" @tap="$util.checkLogin('/pages/address/address')"> |
| | | <view style="padding-right: 32rpx;"> |
| | | <image style="width: 48rpx;height: 48rpx;margin-top: 30rpx;" src="/static/imgs/History.png"></image> |
| | | </view> |
| | | <view style="flex: 1"> |
| | | <view class="txt" style="color: #666;text-align:left">我的地址</view> |
| | | <view class="num" style="color: #333;text-align:left;margin-top: 5rpx;">0</view> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="navs"> |
| | | <view class="title" @tap="$util.checkLogin('/pages/order/order')"> |
| | | <text>我的订单</text> |
| | | <view class="navs-rgt"> |
| | | <text>查看全部</text> |
| | | <image src="/static/imgs/right.png" mode=""></image> |
| | | </view> |
| | | </view> |
| | | <view class="myNavs-view"> |
| | | <view class="myNavs-item" @tap="$util.checkLogin('/pages/order/order?status=1')"> |
| | | <image class="myNavs-item-icon" src="/static/imgs/my-n-1.png" mode="widthFix"></image> |
| | | <text class="myNavs-item-text">待支付</text> |
| | | </view> |
| | | <view class="myNavs-item" @tap="$util.checkLogin('/pages/order/order?status=3')"> |
| | | <image class="myNavs-item-icon" src="/static/imgs/my-n-5.png" mode="widthFix"></image> |
| | | <text class="myNavs-item-text">待签约</text> |
| | | </view> |
| | | <view class="myNavs-item" @tap="$util.checkLogin('/pages/order/order?status=4')"> |
| | | <image class="myNavs-item-icon" src="/static/imgs/my-n-2.png" mode="widthFix"></image> |
| | | <text class="myNavs-item-text">待发货</text> |
| | | </view> |
| | | <view class="myNavs-item" @tap="$util.checkLogin('/pages/order/order?status=5')"> |
| | | <image class="myNavs-item-icon" src="/static/imgs/my-n-3.png" mode="widthFix"></image> |
| | | <text class="myNavs-item-text">待收货</text> |
| | | </view> |
| | | <view class="myNavs-item" @tap="$util.checkLogin('/pages/order/order?status=8')"> |
| | | <image class="myNavs-item-icon" src="/static/imgs/my-n-4.png" mode="widthFix"></image> |
| | | <text class="myNavs-item-text">已完成</text> |
| | | <view class="navCon"> |
| | | <view class="navCon-v" v-for="(item, index) in navData" @tap="$util.checkLogin(item.url)"> |
| | | <image :src="'../../static/imgs/nv' + item.index + '.png'" mode=""></image> |
| | | <view>{{item.text}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="myServe"> |
| | | <view class="myNavs-tips"> |
| | | <text class="myNavs-tips-text">我的服务</text> |
| | | <view class="mySer"> |
| | | <view class="title">我的服务</view> |
| | | <view class="mySerCon"> |
| | | <template v-for="(item, index) in mySerData"> |
| | | <view class="mySerCon-v" @tap="$util.checkLogin(item.url)" v-if="item.index != 6"> |
| | | <image :src="'../../static/imgs/mf' + item.index + '.png'" mode=""></image> |
| | | <view>{{item.text}}</view> |
| | | </view> |
| | | <view class="myServe-view"> |
| | | <view class="myServe-item" @tap="$util.checkLogin('/pages/profile/profile')"> |
| | | <image src="/static/imgs/my-s-1.png" mode="widthFix"></image> |
| | | <text>个人信息</text> |
| | | <!-- <view class="mySerCon-v" @tap="goKefu" v-else> |
| | | <image :src="'../../static/imgs/mf' + item.index + '.png'" mode=""></image> |
| | | <view>{{item.text}}</view> |
| | | </view> --> |
| | | </template> |
| | | </view> |
| | | <view class="myServe-item" @tap="$util.checkLogin('/pages/logs/logs')" v-if="Config && Config.put_open == 2"> |
| | | <image src="/static/imgs/my-s-2.png" mode="widthFix"></image> |
| | | <text>账单信息</text> |
| | | </view> |
| | | <view class="myServe-item" @tap="$util.checkLogin('/pages/bank/bank')"> |
| | | <image src="/static/imgs/my-s-3.png" mode="widthFix"></image> |
| | | <text>银行卡</text> |
| | | </view> |
| | | <view class="myServe-item" @tap="$util.checkLogin('/pages/address/address')"> |
| | | <image src="/static/imgs/my-s-4.png" mode="widthFix"></image> |
| | | <text>我的地址</text> |
| | | </view> |
| | | <view class="myServe-item" @tap="$util.checkLogin('/pages/collect/collect')"> |
| | | <image src="/static/imgs/my-s-5.png" mode="widthFix"></image> |
| | | <text>我的收藏</text> |
| | | </view> |
| | | <view class="myServe-item" @tap="goKefu"> |
| | | <image src="/static/imgs/my-s-6.png" mode="widthFix"></image> |
| | | <text>联系客服</text> |
| | | </view> |
| | | <view class="myServe-item" @tap="toHuishou" > |
| | | <template v-if="isShop"> |
| | | <image src="/static/imgs/quanshou.png" mode="widthFix"></image> |
| | | <text>会员权收</text></template> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | <view style="text-align: center;font-size: 24rpx;color: #666666;margin: 80rpx 0;"> |
| | | 客服电话:400-6052-330(8:00-20:00) |
| | | </view> |
| | | <view class="myBeiAn"> |
| | | <view class=""> |
| | |
| | | <text @tap="agreeDialog2">《隐私政策》</text> |
| | | </view> |
| | | <view @tap="goWebUrl('http://beian.miit.gov.cn')">APP备案号: {{Config.icp}}</view> |
| | | <view @tap="goWebUrl('http://beian.miit.gov.cn')">Copyright © 2025 {{Config.url}} All Rights Reserved.</view> |
| | | <view @tap="goWebUrl('http://beian.miit.gov.cn')">Copyright © 2025 阳江金谷科技 All Rights Reserved.</view> |
| | | <!-- <view @tap="goWebUrl('http://beian.miit.gov.cn')">Copyright © 2025 {{Config.url}} All Rights Reserved.</view> --> |
| | | |
| | | </view> |
| | | <agreePup ref="agreePup1" :gp="1" title="注册协议"></agreePup> |
| | | <agreePup ref="agreePup2" :gp="2" title="隐私政策"></agreePup> |
| | | |
| | | <uni-popup type="center" ref="comment" > |
| | | <view style="background-image: url('/static/imgs/BOXSDF.png');background-repeat: no-repeat;background-size: 100% 100%"> |
| | | <view style="border-radius: 48rpx;padding: 28rpx 20rpx"> |
| | | <view style="text-align: center;padding-top: 30rpx;" > |
| | | <image src="/static/imgs/wuImg.png" style="width: 372rpx;height: 240rpx;"></image> |
| | | </view> |
| | | <view style="font-size: 32rpx;font-weight: 600;color: #333333;text-align: center;margin-top: 34rpx;margin-bottom: 80rpx;padding: 0 28rpx;">{{errState}}</view> |
| | | <view @click="$refs.comment.close()" style="font-weight: 500;font-size: 32rpx;color: #fff;text-align: center;padding: 24rpx 28rpx;border-top: 2rpx solid #EEEEEE;background: #FF1472;;border-radius: 40rpx ;">好的</view> |
| | | </view> |
| | | </view> |
| | | |
| | | </uni-popup> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | return { |
| | | userInfo: this.$util.getUserInfo(), |
| | | Config: {put_open: 1}, |
| | | isShop:false, |
| | | errState:'' |
| | | navData: [ |
| | | {index: 1, text: '待支付', url: '/pages/order/order?status=1'}, |
| | | {index: 3, text: '待发货', url: '/pages/order/order?status=4'}, |
| | | {index: 4, text: '待收货', url: '/pages/order/order?status=5'}, |
| | | {index: 2, text: '待签约', url: '/pages/order/order?status=3'}, |
| | | {index: 5, text: '退款/售后', url: '/pages/order/order?status=-3'} |
| | | ], |
| | | mySerData: [ |
| | | {index: 1, text: '个人信息', url: '/pages/profile/profile'}, |
| | | {index: 2, text: '账单信息', url: '/pages/logs/logs'}, |
| | | // {index: 3, text: '银行卡', url: '/pages/bank/bank'}, |
| | | // {index: 4, text: '我的地址', url: '/pages/address/address'}, |
| | | // {index: 5, text: '我的收藏', url: '/pages/collect/collect'}, |
| | | // {index: 6, text: '联系客服'}, |
| | | ] |
| | | } |
| | | }, |
| | | onLoad() { |
| | | }, |
| | | async onShow() { |
| | | onShow() { |
| | | this.getConfig() |
| | | this.getUserInfo() |
| | | const _this = this; |
| | | if(_this.$util.getUserInfo()?.phone){ |
| | | await uni.request({ |
| | | url: _this.$webHost+'/api/v2/auth/qxgIosUnionLogin?phone='+_this.$util.getUserInfo().phone, |
| | | data:{ |
| | | customerId: uni.getStorageSync('qxgLogin').customerId, |
| | | appId: uni.getStorageSync('qxgLogin').appId |
| | | }, |
| | | success: function (res) { |
| | | _this.isShop = res?.data?.data?.isShop; |
| | | uni.setStorageSync('qxgLogin', res.data.data) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | methods: { |
| | | toHuishou(){ |
| | | const _this = this; |
| | | if(!_this.isShop){ |
| | | return |
| | | } |
| | | uni.request({ |
| | | url: _this.$webHost+'/api/v2/customer/ryxIsBuyEquity?phone='+_this.$util.getUserInfo().phone, |
| | | data:{ |
| | | customerId: uni.getStorageSync('qxgLogin').customerId, |
| | | appId: uni.getStorageSync('qxgLogin').appId |
| | | }, |
| | | success: function (res) { |
| | | if(res.data.code==200){ |
| | | // 收藏+浏览记录 |
| | | goMenuPage(url) { |
| | | if (this.userInfo) { |
| | | uni.navigateTo( { |
| | | url: '/pages/quanshou/index' |
| | | animationType: 'zoom-fade-out', |
| | | animationDuration: 200, |
| | | url |
| | | }) |
| | | |
| | | } else { |
| | | _this.errState = res.data.data; |
| | | _this.$refs.comment.open() |
| | | |
| | | } |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | |
| | | goKefu() { |
| | | if(this.Config && this.Config.kefu_open == 1) { |
| | | this.wechatWork() |
| | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | @import url(/static/css/my.css); |
| | | @import url(/static/css/my2.css); |
| | | |
| | | .num-wrapper { |
| | | width: 650rpx; |
| | | margin: 30rpx auto; |
| | | z-index: 30; |
| | | position: relative; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | color: #fff; |
| | | gap: 20rpx; |
| | | |
| | | } |
| | | .num-wrapper .num-item { |
| | | width: 33.33%; |
| | | text-align: center; |
| | | |
| | | |
| | | } |
| | | .num-wrapper .num { |
| | | font-size: 42rpx; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .num-wrapper .txt { |
| | | margin-top: 10rpx; |
| | | font-size: 26rpx; |
| | | color: rgba(255, 255, 255, 0.6); |
| | | } |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <view class="my"> |
| | | <yk-authpup ref="authpup" type="top" @changeAuth="changeAuth" noticeTitle="便于您使用该功能上传您的照片用于核实身份场景中读取相册内容" permissionID="WRITE_EXTERNAL_STORAGE"></yk-authpup> |
| | | <yk-authpup ref="camears" type="top" @changeAuth="changeAuth2" noticeTitle="便于您使用该功能便于您拍摄上传用于核实身份场景" permissionID="CAMERA"></yk-authpup> |
| | | <view class="startBar"></view> |
| | | <view class="myTop"> |
| | | <view class="headimg"> |
| | | <image :src="userInfo != null ? userInfo.avatar : '/static/imgs/headimg.png'" class="" mode="" @tap="setImg"></image> |
| | | <view class=""> |
| | | <template> |
| | | <view v-if="userInfo == null" @tap="$util.goPages('/pages/login/login')">未登录</view> |
| | | <view v-else>{{userInfo.phone}}</view> |
| | | </template> |
| | | <template v-if="userInfo != null && Config"> |
| | | <template v-if="userInfo.status == 1"> |
| | | <view class="edu" v-if="userInfo != null && userInfo.edu_auth == 0 && Config.put_open == 2 && userInfo.over_auth == 0">额度:未认证</view> |
| | | <view class="edu" v-else-if="userInfo != null && userInfo.edu_auth == 0 && Config.put_open == 2 && userInfo.over_auth == 1">额度:授信中</view> |
| | | <view class="edu" v-else-if="userInfo != null && userInfo.edu_auth == 1 && Config.put_open == 2">额度:{{userInfo.const}}</view> |
| | | </template> |
| | | <template v-else> |
| | | <view class="edu">额度:授信失败</view> |
| | | </template> |
| | | </template> |
| | | <template v-if="userInfo != null && userInfo.face_auth == 0"> |
| | | <view class="edu" @tap="$util.checkGoPages('/pages/my/my')">未认证(去认证)</view> |
| | | </template> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="myNavs"> |
| | | <view class="myNavs-tips" @tap="$util.checkLogin('/pages/order/order')"> |
| | | <text class="myNavs-tips-text">我的订单</text> |
| | | <view class="myNavs-tips-rgt"> |
| | | <text>查看全部</text> |
| | | <image src="/static/imgs/right.png" mode=""></image> |
| | | </view> |
| | | </view> |
| | | <view class="myNavs-view"> |
| | | <view class="myNavs-item" @tap="$util.checkLogin('/pages/order/order?status=1')"> |
| | | <image class="myNavs-item-icon" src="/static/imgs/my-n-1.png" mode=""></image> |
| | | <text class="myNavs-item-text">待支付</text> |
| | | </view> |
| | | <view class="myNavs-item" @tap="$util.checkLogin('/pages/order/order?status=3')"> |
| | | <image class="myNavs-item-icon" src="/static/imgs/my-n-5.png" mode=""></image> |
| | | <text class="myNavs-item-text">待签约</text> |
| | | </view> |
| | | <view class="myNavs-item" @tap="$util.checkLogin('/pages/order/order?status=4')"> |
| | | <image class="myNavs-item-icon" src="/static/imgs/my-n-2.png" mode=""></image> |
| | | <text class="myNavs-item-text">待发货</text> |
| | | </view> |
| | | <view class="myNavs-item" @tap="$util.checkLogin('/pages/order/order?status=5')"> |
| | | <image class="myNavs-item-icon" src="/static/imgs/my-n-3.png" mode=""></image> |
| | | <text class="myNavs-item-text">待收货</text> |
| | | </view> |
| | | <view class="myNavs-item" @tap="$util.checkLogin('/pages/order/order?status=8')"> |
| | | <image class="myNavs-item-icon" src="/static/imgs/my-n-4.png" mode=""></image> |
| | | <text class="myNavs-item-text">已完成</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="myServe"> |
| | | <view class="myNavs-tips"> |
| | | <text class="myNavs-tips-text">我的服务</text> |
| | | </view> |
| | | <view class="myServe-view"> |
| | | <view class="myServe-item" @tap="$util.checkLogin('/pages/profile/profile')"> |
| | | <image src="/static/imgs/my-s-1.png" mode=""></image> |
| | | <text>个人信息</text> |
| | | </view> |
| | | <view class="myServe-item" @tap="$util.checkLogin('/pages/logs/logs')" v-if="Config && Config.put_open == 2"> |
| | | <image src="/static/imgs/my-s-2.png" mode=""></image> |
| | | <text>账单信息</text> |
| | | </view> |
| | | <view class="myServe-item" @tap="$util.checkLogin('/pages/bank/bank')"> |
| | | <image src="/static/imgs/my-s-3.png" mode=""></image> |
| | | <text>银行卡</text> |
| | | </view> |
| | | <view class="myServe-item" @tap="$util.checkLogin('/pages/address/address')"> |
| | | <image src="/static/imgs/my-s-4.png" mode=""></image> |
| | | <text>我的地址</text> |
| | | </view> |
| | | <view class="myServe-item" @tap="$util.checkLogin('/pages/collect/collect')"> |
| | | <image src="/static/imgs/my-s-5.png" mode=""></image> |
| | | <text>我的收藏</text> |
| | | </view> |
| | | <view class="myServe-item" @tap="goKefu"> |
| | | <image src="/static/imgs/my-s-6.png" mode=""></image> |
| | | <text>联系客服</text> |
| | | </view> |
| | | <view class="myServe-item" v-if="Config.put_open == 1"> |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="myBeiAn"> |
| | | <view class=""> |
| | | <text @tap="agreeDialog1">《用户协议》</text> |
| | | <text>|</text> |
| | | <text @tap="agreeDialog2">《隐私政策》</text> |
| | | </view> |
| | | <view @tap="goWebUrl('http://beian.miit.gov.cn')">APP备案号: {{Config.icp}}</view> |
| | | <view @tap="goWebUrl('http://beian.miit.gov.cn')">Copyright © 2025 {{Config.url}} All Rights Reserved.</view> |
| | | |
| | | </view> |
| | | <agreePup ref="agreePup1" :gp="1" title="注册协议"></agreePup> |
| | | <agreePup ref="agreePup2" :gp="2" title="隐私政策"></agreePup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import ykAuthpup from "@/components/yk-authpup/yk-authpup"; |
| | | import agreePup from "@/components/agreePup/agreePup"; |
| | | export default { |
| | | components: { |
| | | agreePup |
| | | }, |
| | | data() { |
| | | return { |
| | | userInfo: this.$util.getUserInfo(), |
| | | Config: {put_open: 1}, |
| | | } |
| | | }, |
| | | onLoad() { |
| | | }, |
| | | onShow() { |
| | | this.getConfig() |
| | | this.getUserInfo() |
| | | }, |
| | | methods: { |
| | | goKefu() { |
| | | if(this.Config && this.Config.kefu_open == 1) { |
| | | this.wechatWork() |
| | | } else { |
| | | this.$util.checkLogin('/pages/customer/customer') |
| | | } |
| | | }, |
| | | setImg(){ |
| | | if(uni.getSystemInfoSync().platform != 'ios'){ |
| | | this.$refs['authpup'].open() |
| | | }else{ |
| | | this.chooseImg() |
| | | }//调起自定义权限目的弹框,具体可看示例里面很详细 |
| | | }, |
| | | changeAuth () { |
| | | //这里是权限通过后执行自己的代码逻辑 |
| | | if(uni.getSystemInfoSync().platform !='ios'){ |
| | | this.$refs['camears'].open() |
| | | } |
| | | this.chooseImg() |
| | | }, |
| | | changeAuth2(){ |
| | | this.chooseImg() |
| | | }, |
| | | chooseImg () { |
| | | let t = this |
| | | uni.chooseImage({ |
| | | count: 1, // 默认9 |
| | | sizeType: ['original', 'compressed'], |
| | | success: (chooseImageRes) => { |
| | | let tempFilePaths = chooseImageRes.tempFilePaths |
| | | let token = uni.getStorageSync('lzsc-token') |
| | | let header = { |
| | | 'Accept': 'application/json', |
| | | 'authorization': token, |
| | | } |
| | | uni.showLoading({ |
| | | title: '上传中..', |
| | | }) |
| | | uni.uploadFile({ |
| | | url: t.$baseUrl + '/api/user/setAvatar', |
| | | filePath: tempFilePaths[0], |
| | | header: header, |
| | | name: 'file', |
| | | success: (uploadFileRes) => { |
| | | uni.hideLoading() |
| | | let res = JSON.parse(uploadFileRes.data) |
| | | res = JSON.parse(t.$util.decryptDes(res.data)) |
| | | t.userInfo.avatar = res.avatar |
| | | uni.setStorageSync('user-info', JSON.stringify(res)) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | getUserInfo () { |
| | | let t = this |
| | | t.$util.post('User/getUser').then(res => { |
| | | t.userInfo = res.data |
| | | }) |
| | | }, |
| | | agreeDialog1 (e) { |
| | | this.$refs.agreePup1.dialog = !this.$refs.agreePup1.dialog |
| | | }, |
| | | agreeDialog2 (e) { |
| | | this.$refs.agreePup2.dialog = !this.$refs.agreePup2.dialog |
| | | }, |
| | | goWebUrl (url) { |
| | | // #ifdef APP-PLUS |
| | | plus.runtime.openURL(url) |
| | | // #endif |
| | | }, |
| | | getConfig () { |
| | | let t = this |
| | | t.$util.post('Index/getConfig').then(res => { |
| | | t.Config = res.data |
| | | }) |
| | | }, |
| | | wechatWork () { |
| | | let t = this |
| | | if(t.Config){ |
| | | if(t.Config.put_open == 1){ |
| | | uni.showModal({ |
| | | title: '联系客服', |
| | | content: '请联系客服电话:' + t.Config.kefu_phone, |
| | | showCancel: false, |
| | | success: function (res) { |
| | | if (res.confirm) { |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | console.log(t.Config) |
| | | uni.share({ |
| | | provider: "weixin", |
| | | openCustomerServiceChat: true, |
| | | customerUrl: t.Config.work_url, //企业微信地址 |
| | | corpid: t.Config.work_id, //企业id |
| | | success: (res) => { |
| | | console.log("success:" + JSON.stringify(res)) |
| | | }, |
| | | fail: (err) => { |
| | | console.log("fail:" + JSON.stringify(err)) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | @import url(/static/css/my.css); |
| | | </style> |
| | |
| | | <view> |
| | | <view class="order-tab"> |
| | | <view :class="statusIndex == 0 ? 'active' : ''" @tap="tabClick(0)">全部</view> |
| | | <view :class="statusIndex == 2 ? 'active' : ''" @tap="tabClick(2)">待审核</view> |
| | | <view :class="statusIndex == 3 ? 'active' : ''" @tap="tabClick(3)">待签约</view> |
| | | <!-- <view :class="statusIndex == 2 ? 'active' : ''" @tap="tabClick(2)">待审核</view> --> |
| | | <!-- <view :class="statusIndex == 3 ? 'active' : ''" @tap="tabClick(3)">待签约</view> --> |
| | | <view :class="statusIndex == 5 ? 'active' : ''" @tap="tabClick(5)">待收货</view> |
| | | <view :class="statusIndex == 6 ? 'active' : ''" @tap="tabClick(6)">已逾期</view> |
| | | <!-- <view :class="statusIndex == 6 ? 'active' : ''" @tap="tabClick(6)">已逾期</view> --> |
| | | <view :class="statusIndex == 8 ? 'active' : ''" @tap="tabClick(8)">已完成</view> |
| | | <view :class="statusIndex == -3 ? 'active' : ''" @tap="tabClick(-3)">已退款</view> |
| | | </view> |
| | |
| | | </view> |
| | | <view class="cons"> |
| | | <template v-if="item.payment == 1"> |
| | | <text class="payOrder" v-if="item.status == 1" @tap="$util.goPages('/pages/pays/pays?cartsIds=' + item.cartsids)">支付</text> |
| | | <!-- <text class="payOrder" v-if="item.status == 1" @tap="$util.goPages('/pages/pays/pays?cartsIds=' + item.cartsids)">支付</text> --> |
| | | <text class="payback" v-if="item.status == 2" @tap="refundOrder(item)">退款</text> |
| | | <text class="payOrder" v-if="item.status == 3 && item.payment == 1 && item.zid != 0 && item.zstatus == 0" @tap="zsign(item)">签约</text> |
| | | <!-- <text class="payOrder" v-if="item.status == 3 && item.payment == 1 && item.zid != 0 && item.zstatus == 0" @tap="zsign(item)">签约</text> --> |
| | | <text class="exOrder" v-if="item.status == 4 || item.status == 5 || item.status == 6" @tap="getExpress(item)">物流</text> |
| | | <text class="payOrder" v-if="item.status == 4" @tap="receiveOrder(item)">收货</text> |
| | | <text class="payback" v-if="item.status == 3 || item.status == 4 || item.status == 5 || item.status == 6" @tap="getPlan(item)">还款</text> |
| | | <!-- <text class="payback" v-if="item.status == 3 || item.status == 4 || item.status == 5 || item.status == 6" @tap="getPlan(item)">还款</text> --> |
| | | <text class="delOrder" v-if="item.status == -1 || item.status == 1 || item.status == 7 || item.status == 8" @tap="delOrder(item, index)">删除</text> |
| | | </template> |
| | | <template v-if="item.payment != 1"> |
| | | <text class="payOrder" v-if="item.status == 1" @tap="$util.goPages('/pages/pays/pays?cartsIds=' + item.cartsids)">支付</text> |
| | | <!-- <text class="payOrder" v-if="item.status == 1" @tap="$util.goPages('/pages/pays/pays?cartsIds=' + item.cartsids)">支付</text> --> |
| | | <text class="payback" v-if="item.status == 3" @tap="refundOrder(item)">退款</text> |
| | | <text class="payOrder" v-if="item.status == 4" @tap="receiveOrder(item)">收货</text> |
| | | <text class="delOrder" v-if="item.status == -1 || item.status == 1 || item.status == 7 || item.status == 8" @tap="delOrder(item, index)">删除</text> |
| | |
| | | <input type="text" disabled v-model="userInfo.idcard" placeholder="请输入身份证" /> |
| | | </view> |
| | | </view> |
| | | <view class="profile-item"> |
| | | <!-- <view class="profile-item"> |
| | | <text class="label">总余额</text> |
| | | <view class=""> |
| | | <input type="text" disabled v-model="userInfo.edu" placeholder="请输入可用额度" /> |
| | |
| | | <switch @change="equityOpen" v-if="userInfo.equity_open == 1" checked color="#e3b400" style="transform:scale(0.7)"/> |
| | | <switch @change="equityOpen" v-else color="#e3b400" style="transform:scale(0.7)"/> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | <view class="logout" @tap="logOut">退出登录</view> |
| | | <view class="logout red" @tap="logOff">注销账号</view> |
| | |
| | | }) |
| | | }, |
| | | logOut () { |
| | | uni.setStorageSync('lzsc-token', null) |
| | | uni.setStorageSync('pig-token', null) |
| | | uni.setStorageSync('user-info', null) |
| | | uni.setStorageSync('choose-address',null) |
| | | uni.setStorageSync('choose-bank',null) |
| | |
| | | .collect-title{ |
| | | position: fixed; |
| | | left: 0; |
| | | top: var(--status-bar-height); |
| | | top: 0; |
| | | z-index: 99; |
| | | width: 100%; |
| | | background-color: #ebebeb; |
| | |
| | | width: 88%; |
| | | height: 78upx; |
| | | border-radius: 50upx; |
| | | background-color: #e3b400; |
| | | background-color: #4766FE; |
| | | color: #ffffff; |
| | | display: flex; |
| | | justify-content: center; |
| | |
| | | page{ |
| | | background-color: #EEEBEC; |
| | | background-color: #ffffff; |
| | | font-size: 24upx; |
| | | } |
| | | .status_bar { |
| | | height: var(--status-bar-height); |
| | | .content{ |
| | | position: absolute; |
| | | width: 100%; |
| | | padding-bottom: calc(var(--window-bottom)); |
| | | } |
| | | .page-container { |
| | | display: flex; |
| | | flex-direction: column; |
| | | min-height: 100vh; |
| | | position: relative; |
| | | padding-top: 50upx; |
| | | } |
| | | |
| | | .page-bg { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | height: 620rpx; |
| | | z-index: 0; |
| | | } |
| | | .content { |
| | | |
| | | } |
| | | .status-bar { |
| | | width: 100%; |
| | | } |
| | | .index-top{ |
| | | background: url(@/static/imgs/index-bg.png) no-repeat; |
| | | background-size: 100% 100%; |
| | | width: 100%; |
| | | } |
| | | .index-title{ |
| | | padding: 30rpx 0; |
| | | |
| | | .btn-group { |
| | | display: flex; |
| | | margin-top: 30rpx; |
| | | } |
| | | .index-title-view{ |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .index-title-view-lf{ |
| | | margin: 0 32rpx; |
| | | } |
| | | .index-title-view-lf image{ |
| | | width: 144rpx; |
| | | height: 56rpx; |
| | | } |
| | | .index-title-view-lf2{ |
| | | width: 200rpx; |
| | | height: 40rpx; |
| | | background: #FF1472; |
| | | border-radius: 8rpx 8rpx 8rpx 8rpx; |
| | | text-align: center; |
| | | color: #ffffff; |
| | | line-height: 40rpx; |
| | | } |
| | | .index-title-view1{ |
| | | width: 62%; |
| | | } |
| | | .index-title-view2{ |
| | | width: 38%; |
| | | } |
| | | .index-title-view-rf { |
| | | display: flex; |
| | | .cancel-btn { |
| | | flex: 1; |
| | | justify-content: center; |
| | | align-items: center; |
| | | margin-right: 20rpx; |
| | | background-color: #f5f5f5; |
| | | } |
| | | .index-title-view-rf image{ |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | display: block; |
| | | margin: 0 auto; |
| | | .allow-btn { |
| | | flex: 1; |
| | | background-color: #007aff; |
| | | color: white; |
| | | } |
| | | .search{ |
| | | position: fixed; |
| | | left: 0; |
| | | width: 100%; |
| | | top: var(--status-bar-height); |
| | | z-index: 9999; |
| | | background: #fbf8f8; |
| | | height: 110upx; |
| | | } |
| | | .search-v{ |
| | | width: 94%; |
| | | margin-left: 3%; |
| | | display: flex; |
| | | height: 70upx; |
| | | margin-top: 20upx; |
| | | margin-bottom: 30upx; |
| | | } |
| | | .search-1{ |
| | | width: 76%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | .search-1 input{ |
| | | width: 76%; |
| | | height: 72rpx; |
| | | background: #FFFFFF; |
| | | border-radius: 50rpx; |
| | | padding-left: 14%; |
| | | font-size: 26upx; |
| | | } |
| | | .search-1 image{ |
| | | position: absolute; |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | left: 8%; |
| | | } |
| | | .search-2{ |
| | | width: 20%; |
| | | display: flex; |
| | | font-size: 24upx; |
| | | justify-content: center; |
| | | align-items: center; |
| | | color: #9e9d9d; |
| | | background-color: #ffffff; |
| | | border-radius: 30upx; |
| | | } |
| | | .search-2 view{ |
| | | width: 112rpx; |
| | | height: 72rpx; |
| | | text-align: center; |
| | | line-height: 72rpx; |
| | | color: #ffffff; |
| | | background: #FF1472; |
| | | border-radius: 200rpx; |
| | | .search-icon{ |
| | | width: 40upx; |
| | | height: 40upx; |
| | | margin-right: 20upx; |
| | | } |
| | | |
| | | .tabs{ |
| | | display: flex; |
| | | margin-bottom: 20upx; |
| | | } |
| | | .tabs view{ |
| | | padding: 0 35rpx; |
| | | margin-left: 35rpx; |
| | | text-align: center; |
| | | line-height: 56rpx; |
| | | height: 56rpx; |
| | | background: #F3F4F6; |
| | | border-radius: 200rpx; |
| | | color: #364153; |
| | | } |
| | | .tabs .active { |
| | | color: #ffffff; |
| | | background: #FF1472; |
| | | } |
| | | |
| | | .banner{ |
| | | width: 94%; |
| | | margin: 40upx auto 30upx; |
| | | } |
| | | uni-swiper-item{ |
| | | border-radius: 32rpx; |
| | | margin: 20upx auto 20upx; |
| | | } |
| | | .swiper, .swiper image{ |
| | | width: 100%; |
| | | height: 278rpx; |
| | | border-radius: 32rpx; |
| | | height: 400upx; |
| | | border-radius: 16upx; |
| | | } |
| | | .comm{ |
| | | width: 94%; |
| | | margin: 20upx 3% 40upx; |
| | | display: flex; |
| | | } |
| | | .comm .comm-1{ |
| | | width: 48%; |
| | | height: 278rpx; |
| | | border-radius: 32rpx; |
| | | background-color: #ffffff; |
| | | } |
| | | .comm .comm-2{ |
| | | width: 4%; |
| | | height: 278rpx; |
| | | } |
| | | .comm .comm-3{ |
| | | width: 48%; |
| | | height: 278rpx; |
| | | border-radius: 32rpx; |
| | | background-color: #ffffff; |
| | | } |
| | | .comm-title image{ |
| | | width: 128rpx; |
| | | height: 40rpx; |
| | | margin: 24rpx 26rpx; |
| | | } |
| | | .comm-goods{ |
| | | display: flex; |
| | | } |
| | | .comm-goods .comm-goods-v{ |
| | | flex: 1; |
| | | display: flex; |
| | | text-align: center; |
| | | justify-content: center; |
| | | } |
| | | .comm-goods-v text{ |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 600; |
| | | font-size: 24rpx; |
| | | color: #FB2C36; |
| | | text-align: left; |
| | | font-style: normal; |
| | | text-transform: none; |
| | | } |
| | | .comm-goods image{ |
| | | width: 128rpx; |
| | | height: 128rpx; |
| | | border-radius: 20rpx; |
| | | } |
| | | .hots{ |
| | | width: 94%; |
| | | margin: 20upx auto 40rpx; |
| | | height: 280rpx; |
| | | background: #FFFFFF; |
| | | border-radius: 32rpx 32rpx 32rpx 32rpx; |
| | | } |
| | | .hots-title{ |
| | | padding: 24rpx 26rpx; |
| | | } |
| | | .hots-title .hots-icon{ |
| | | width: 192rpx; |
| | | height: 40rpx; |
| | | border-radius: 0rpx 0rpx 0rpx 0rpx; |
| | | } |
| | | .hots-rgt{ |
| | | float: right; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .hots-rgt text{ |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 400; |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | text-align: left; |
| | | font-style: normal; |
| | | text-transform: none; |
| | | margin-right: 10rpx; |
| | | } |
| | | .hots-rgt image{ |
| | | width: 32rpx; |
| | | height: 32rpx; |
| | | } |
| | | .hots-goods{ |
| | | display: flex; |
| | | } |
| | | .hots-goods .hots-goods-v{ |
| | | flex: 1; |
| | | display: flex; |
| | | text-align: center; |
| | | justify-content: center; |
| | | } |
| | | .hots-goods-v text{ |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 600; |
| | | font-size: 24rpx; |
| | | color: #FB2C36; |
| | | text-align: left; |
| | | font-style: normal; |
| | | text-transform: none; |
| | | } |
| | | .hots-goods image{ |
| | | width: 136rpx; |
| | | height: 136rpx; |
| | | border-radius: 20rpx; |
| | | } |
| | | |
| | | .cates{ |
| | | width: 94%; |
| | | margin: 0upx 3%; |
| | | display: inline-block; |
| | | border-top-left-radius: 10upx; |
| | | border-top-right-radius: 10upx; |
| | | padding: 0upx 0 0upx 0; |
| | | width: 100%; |
| | | margin: 0; |
| | | margin-top: 190rpx; |
| | | border-top-right-radius: 30rpx; |
| | | border-top-left-radius: 30rpx; |
| | | background-color: #ffffff; |
| | | padding: 0; |
| | | display: flex; |
| | | flex-wrap: wrap; /* 确保子元素换行 */ |
| | | } |
| | | .cates-v{ |
| | | float: left; |
| | | width: 20%; |
| | | border-radius: 50%; |
| | | width: 25%; |
| | | margin-bottom: 0upx; |
| | | } |
| | | .cates-v-icon{ |
| | | width: 80upx; |
| | | height: 80upx; |
| | | width: 90rpx; |
| | | height: 90rpx; |
| | | display: block; |
| | | margin: 40upx auto 20upx; |
| | | border-radius: 50%; |
| | | border-radius: 10upx; |
| | | } |
| | | .cates-v view{ |
| | | text-align: center; |
| | |
| | | } |
| | | .goods-main{ |
| | | width: 94%; |
| | | margin: 0upx auto 0upx; |
| | | border-bottom-left-radius: 10upx; |
| | | border-bottom-right-radius: 10upx; |
| | | border-top: 1px solid #eeeeee; |
| | | margin: 10upx auto 30upx; |
| | | background-color: #ffffff; |
| | | border-radius: 10upx; |
| | | } |
| | | .goods-main-title{ |
| | | padding: 20upx; |
| | |
| | | height: 340upx; |
| | | } |
| | | .goods-list{ |
| | | width: 100%; |
| | | width: 96%; |
| | | display: flex; |
| | | margin-left: 2%; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | } |
| | | .hyj{ |
| | | display: flex; |
| | | justify-content: center; |
| | | margin-left: 10rpx; |
| | | margin-right: 10rpx; |
| | | } |
| | | .hyj image{ |
| | | width: 74rpx; |
| | | height: 32rpx; |
| | | } |
| | | .goods-item{ |
| | | width: 48%; |
| | |
| | | margin-bottom: 20upx; |
| | | } |
| | | .goods-price{ |
| | | margin-top: 16upx; |
| | | margin-top: 0upx; |
| | | display: flex; |
| | | align-items: center; |
| | | color: #F75451; |
| | |
| | | padding-bottom: 20upx; |
| | | } |
| | | .goods-price .red{ |
| | | font-size: 26upx !important; |
| | | margin-left: 10upx; |
| | | font-size: 24rpx !important; |
| | | font-weight: 600; |
| | | } |
| | | .goods-title{ |
| | |
| | | |
| | | .auth{ |
| | | width: 94%; |
| | | margin: 30upx auto; |
| | | margin: 110upx auto 0; |
| | | height: 240upx; |
| | | } |
| | | .auth image{ |
| | |
| | | font-weight: 700; |
| | | font-size: 28upx; |
| | | } |
| | | |
| | | .auth{ |
| | | .hLogo{ |
| | | width: 96%; |
| | | padding: 40upx 0; |
| | | margin: 0 auto; |
| | | } |
| | | .hLogoView{ |
| | | /* display: flex; |
| | | align-items: center; */ |
| | | } |
| | | .h-logo{ |
| | | width: 154rpx; |
| | | height: 52rpx; |
| | | } |
| | | .hLogo-1{ |
| | | margin: 0 30upx; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | .hLogo-2{ |
| | | position: relative; |
| | | } |
| | | .auth-over{ |
| | | background: linear-gradient(#e58585, #d19323); |
| | | width: 100%; |
| | | height: 100%; |
| | | border-radius: 20upx; |
| | | height: 72rpx; |
| | | background-color: #ffffff; |
| | | border-radius: 50rpx; |
| | | /* background: url(@/static/imgs/input-bg.png) no-repeat; |
| | | background-size: 100% 100%; */ |
| | | } |
| | | .auth-over-edu{ |
| | | padding: 30upx 50upx; |
| | | .hLogo-2 .s-btn { |
| | | position: absolute; |
| | | right: 30rpx; |
| | | top: 13rpx; |
| | | text-align: center; |
| | | width: 96rpx; |
| | | height: 50rpx; |
| | | line-height: 50rpx; |
| | | border-radius: 25rpx; |
| | | background-color: #4766FE; |
| | | color: #ffffff; |
| | | } |
| | | .auth-over-edu text{ |
| | | display: block; |
| | | .hLogo-2 .s-icon{ |
| | | position: absolute; |
| | | left: 30rpx; |
| | | top: 20rpx; |
| | | width: 30rpx; |
| | | height: 30rpx; |
| | | } |
| | | .auth-over-edu-til{ |
| | | font-weight: 500; |
| | | font-size: 30upx; |
| | | letter-spacing: 4upx; |
| | | margin-bottom: 14upx; |
| | | .hLogo-2 input{ |
| | | width: 83%; |
| | | height: 70rpx; |
| | | line-height: 70rpx; |
| | | font-size: 28rpx; |
| | | background: transparent; |
| | | padding-left: 70rpx; |
| | | } |
| | | .auth-over-edu-price{ |
| | | .xxhh-v{ |
| | | width: 96%; |
| | | margin: 0 auto; |
| | | padding: 10upx 0; |
| | | height: 195rpx; |
| | | position: relative; |
| | | } |
| | | .xxhh-v-icon{ |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .xxhh-title{ |
| | | display: flex; |
| | | padding: 20upx; |
| | | align-items: center; |
| | | } |
| | | .xxk-icon{ |
| | | width: 201rpx; |
| | | height: 47rpx; |
| | | margin-right: 23rpx; |
| | | } |
| | | .xxhh-title text{ |
| | | z-index: 99; |
| | | font-size: 22rpx; |
| | | color: #261B18; |
| | | } |
| | | .xxhh-edu{ |
| | | padding-top: 16upx; |
| | | padding-bottom: 16upx; |
| | | z-index: 99; |
| | | } |
| | | .xxhh-edu text{ |
| | | margin-left: 20upx; |
| | | color: #AEA3A2; |
| | | font-size: 24rpx; |
| | | } |
| | | .xxhh-money{ |
| | | padding-top: 0; |
| | | margin-left: 10upx; |
| | | } |
| | | .xxhh-money text{ |
| | | font-size: 48rpx; |
| | | color: #A18685; |
| | | font-weight: 700; |
| | | font-size: 80upx; |
| | | letter-spacing: 5upx; |
| | | margin-bottom: 14upx; |
| | | } |
| | | .auth-over-btn{ |
| | | |
| | | .xxhf{ |
| | | width: 96%; |
| | | margin: 0 auto 30upx; |
| | | height: 325rpx; |
| | | background: url(@/static/imgs/xxhf.png) no-repeat; |
| | | background-size: 100%; |
| | | border-radius: 20upx; |
| | | } |
| | | .xxhf-title{ |
| | | padding: 24upx 80upx; |
| | | color: #5B2D2C; |
| | | font-size: 32rpx; |
| | | font-weight: 700; |
| | | } |
| | | .xxhf-v{ |
| | | width: 96%; |
| | | height: 220rpx; |
| | | margin: 0 auto 5%; |
| | | display: flex; |
| | | background-color: #ffffff; |
| | | border-radius: 20upx; |
| | | } |
| | | .xxhv-v{ |
| | | flex: 1; |
| | | height: 100%; |
| | | } |
| | | .deb-icon{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .xxhv-vv-1{ |
| | | width: 180rpx; |
| | | height: 180rpx; |
| | | margin: 20rpx 0 20rpx 12%; |
| | | background: #EFEFEF; |
| | | border-radius: 14rpx; |
| | | border: 3px solid #FFABB5; |
| | | } |
| | | .xxhv-vv-2{ |
| | | width: 180rpx; |
| | | height: 180rpx; |
| | | margin: 20rpx 0 20rpx 4%; |
| | | background: #EFEFEF; |
| | | border-radius: 14rpx; |
| | | border: 3px solid #FFABB5; |
| | | } |
| | | .xxhv-vv-t{ |
| | | width: 90%; |
| | | height: 46rpx; |
| | | margin: -3rpx auto; |
| | | font-family: Source Han Sans CN; |
| | | font-weight: 400; |
| | | font-size: 26rpx; |
| | | color: #F8F9FD; |
| | | line-height: 52rpx; |
| | | background-size: 100%; |
| | | text-align: center; |
| | | } |
| | | .xxhv-icon{ |
| | | width: 100%; |
| | | height: 134rpx; |
| | | } |
| | | .xx-icon{ |
| | | width: 80upx; |
| | | height: 80upx; |
| | | display: block; |
| | | margin: 27rpx auto; |
| | | border-radius: 10rpx; |
| | | } |
| | | .notice{ |
| | | width: 96%; |
| | | margin: 0 2% 20upx; |
| | | background: #ffffff; |
| | | height: 80upx; |
| | | display: flex; |
| | | border-radius: 20upx; |
| | | } |
| | | .n-icon{ |
| | | width: 50upx; |
| | | height: 50upx; |
| | | margin: 15upx 20upx; |
| | | } |
| | | .marquee-container { |
| | | width: 100%; |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | box-sizing: border-box; |
| | | } |
| | | .marquee-content { |
| | | height: 100%; |
| | | line-height: 80upx; |
| | | font-size: 28upx; |
| | | color: #e36900; |
| | | font-weight: 700; |
| | | display: inline-block; |
| | | padding-left: 100%; /* 初始偏移 */ |
| | | animation: marquee 10s linear infinite; /* 动画名称、持续时间、速度曲线、重复次数 */ |
| | | } |
| | | @keyframes marquee { |
| | | 0% { transform: translateX(0); } |
| | | 100% { transform: translateX(-100%); } |
| | | } |
| | | .kttv{ |
| | | width: 156rpx; |
| | | height: 62rpx; |
| | | background-size: 100%; |
| | | position: absolute; |
| | | right: 30upx; |
| | | top: 38%; |
| | | padding: 20upx 50upx; |
| | | border-radius: 30upx; |
| | | background: #ffffff; |
| | | color: #333333; |
| | | font-weight: 700; |
| | | font-size: 28upx; |
| | | box-shadow: 2px 2px 2px #d1233c; |
| | | bottom: 10upx; |
| | | } |
| | | .auth-over-edu-tip{ |
| | | font-weight: 700; |
| | | font-size: 32upx; |
| | | letter-spacing: 5upx; |
| | | margin-bottom: 14upx; |
| | | } |
| | | .auth-2{ |
| | | height: auto; |
| | | .kttv text{ |
| | | color: #ffffff; |
| | | margin-left: 30upx; |
| | | line-height: 62rpx; |
| | | } |
| | | |
| | | .close-edu{ |
| | | position: absolute; |
| | | width: 60upx; |
| | | height: 60upx; |
| | | right: 20upx; |
| | | top: 20upx; |
| | | .ad1{ |
| | | width: 96%; |
| | | margin: 0 auto; |
| | | margin-top: 30rpx; |
| | | height: 214rpx; |
| | | } |
| | | .ad1 image{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .ad2{ |
| | | width: 96%; |
| | | margin: 0upx auto 20upx; |
| | | height: 500rpx; |
| | | } |
| | | .ad2 image{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .d3-wrap { |
| | | width: 96%; |
| | | margin: 10upx auto 20upx; |
| | | height: 278rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | .ad3{ |
| | | width: 50%; |
| | | height: 278rpx; |
| | | } |
| | | .ad3 image{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .ad4 image{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .ad4 { |
| | | width: 50%; |
| | | height: 278rpx; |
| | | } |
| | | |
| | | .ca-ad{ |
| | | width: 96%; |
| | | margin: 10upx auto 20upx; |
| | | height: 200rpx; |
| | | } |
| | | .ca-ad image{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .cGoods{ |
| | | width: 96%; |
| | | margin: 0 auto 20upx; |
| | | padding: 20rpx 0; |
| | | } |
| | | .scroll-view_H { |
| | | white-space: nowrap; |
| | | width: 100%; |
| | | background-color: #eeeeee; |
| | | } |
| | | |
| | | .scroll-view-item_H { |
| | | display: inline-block; |
| | | width: 25%; |
| | | width: 200rpx; |
| | | padding-top: 20rpx; |
| | | text-align: center; |
| | | font-size: 26rpx; |
| | | padding: 20upx 0; |
| | | font-size: 36rpx; |
| | | background-color: #ffffff; |
| | | margin-right: 20rpx; |
| | | border-radius: 20rpx; |
| | | } |
| | | .scroll-view-v{ |
| | | .scroll-view-item_H image{ |
| | | width: 118rpx; |
| | | height: 128rpx; |
| | | } |
| | | |
| | | .login-desc{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | width: 96%; |
| | | position: fixed; |
| | | left: 2%; |
| | | bottom: calc(var(--window-bottom) + 20rpx); |
| | | height: 100rpx; |
| | | background: rgba(0,0,0,0.7); |
| | | border-radius: 106rpx 106rpx 106rpx 106rpx; |
| | | } |
| | | .scroll-icon{ |
| | | width: 40upx; |
| | | height: 40upx; |
| | | border-radius: 30upx; |
| | | margin-right: 10upx; |
| | | .login-icon{ |
| | | margin-left: 20rpx; |
| | | width: 90rpx; |
| | | height: 90rpx; |
| | | margin-right: 30rpx; |
| | | } |
| | | ::-webkit-scrollbar { |
| | | width: 0px !important; /* 滚动条宽度 */ |
| | | } |
| | | /* 设置滚动条宽度 */ |
| | | .uni-scroll-view::-webkit-scrollbar { |
| | | width: 0px !important; /* 滚动条宽度 */ |
| | | } |
| | | .scroll-active{ |
| | | background-color: #ffb16e; |
| | | .login-font{ |
| | | width: 55%; |
| | | font-size: 26rpx; |
| | | color: #ffffff; |
| | | } |
| | | .login-btn{ |
| | | width: 156rpx; |
| | | height: 54rpx; |
| | | text-align: center; |
| | | color: #ffffff; |
| | | line-height: 54rpx; |
| | | background: #4766FE; |
| | | border-radius: 62rpx 62rpx 62rpx 62rpx; |
| | | } |
| | | .c-goods{ |
| | | background-color: #f5f5f5; |
| | | } |
| New file |
| | |
| | | .myView-bg { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | height: 620rpx; |
| | | z-index: 0; |
| | | } |
| | | .avatar{ |
| | | width: 112rpx; |
| | | height: 112rpx; |
| | | margin: 50rpx 30rpx 50rpx 50rpx; |
| | | border-radius: 50%; |
| | | } |
| | | .myContent{ |
| | | width: 100%; |
| | | position: absolute; |
| | | } |
| | | .myHeader{ |
| | | color: #ffffff; |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 28rpx; |
| | | } |
| | | .myNick{ |
| | | margin-top: 10rpx; |
| | | } |
| | | .edu { |
| | | margin-top: 10rpx; |
| | | width: 108rpx; |
| | | height: 44rpx; |
| | | background: rgba(255,255,255,0.1); |
| | | border-radius: 66rpx 66rpx 66rpx 66rpx; |
| | | border: 2rpx solid #FFFFFF; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: 20rpx; |
| | | } |
| | | .auth{ |
| | | display: flex; |
| | | align-items: center; |
| | | width: 650rpx; |
| | | height: 86rpx; |
| | | margin: 0 auto; |
| | | background: #FFFFFF; |
| | | border-radius: 68rpx 68rpx 68rpx 68rpx; |
| | | font-size: 24rpx; |
| | | color: #333333; |
| | | } |
| | | .auth image{ |
| | | width: 48rpx; |
| | | height: 48rpx; |
| | | margin: 0 10rpx; |
| | | } |
| | | .auth text{ |
| | | margin-right: 30rpx; |
| | | } |
| | | .auth view{ |
| | | width: 100rpx; |
| | | height: 44rpx; |
| | | background: #4766FE; |
| | | border-radius: 50rpx 50rpx 50rpx 50rpx; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | color: #ffffff; |
| | | } |
| | | |
| | | .navs{ |
| | | width: 650rpx; |
| | | margin: 30rpx auto; |
| | | background-color: #ffffff; |
| | | height: 236rpx; |
| | | border-radius: 20rpx; |
| | | box-shadow: 0px 0px 0px 1px #f5f5f5; |
| | | } |
| | | .navs .title{ |
| | | padding: 30rpx 20rpx; |
| | | font-size: 24rpx; |
| | | } |
| | | .navs .title text{ |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | font-weight: 700; |
| | | } |
| | | .navs-rgt{ |
| | | display: flex; |
| | | align-items: center; |
| | | float: right; |
| | | } |
| | | .navs-rgt text{ |
| | | font-size: 24rpx !important; |
| | | font-weight: 500 !important; |
| | | } |
| | | .navs .title image{ |
| | | margin-left: 5rpx; |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | } |
| | | .navCon { |
| | | margin-top: 15rpx; |
| | | display: flex; |
| | | } |
| | | .navCon .navCon-v{ |
| | | flex: 1; |
| | | text-align: center; |
| | | font-size: 24rpx; |
| | | } |
| | | .navCon image{ |
| | | display: block; |
| | | width: 64rpx; |
| | | height: 64rpx; |
| | | margin: 0 auto 10rpx; |
| | | } |
| | | .mySer{ |
| | | width: 650rpx; |
| | | margin: 30rpx auto; |
| | | background-color: #ffffff; |
| | | height: 402rpx; |
| | | border-radius: 20rpx; |
| | | box-shadow: 0px 0px 0px 1px #f5f5f5; |
| | | } |
| | | .mySer .title{ |
| | | padding: 30rpx 20rpx; |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | font-weight: 700; |
| | | } |
| | | .mySerCon{ |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | } |
| | | .mySerCon .mySerCon-v{ |
| | | width: 33.33%; |
| | | margin-bottom: 50rpx; |
| | | font-size: 24rpx; |
| | | text-align: center; |
| | | } |
| | | .mySerCon image{ |
| | | width: 72rpx; |
| | | height: 72rpx; |
| | | display: block; |
| | | margin: 0 auto 10rpx; |
| | | } |
| | | .myBeiAn{ |
| | | margin-top: 50rpx; |
| | | text-align: center; |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | .myBeiAn view{ |
| | | margin-bottom: 10rpx; |
| | | } |
| | |
| | | ## 1.9.10(2025-07-18) |
| | | - 修复 nvue 下弹窗样式错乱的问题 ,更新依赖 uni-transition 组件 |
| | | - 更新 示例取消 borderRadius 属性 ,如需内容圆角,用户应该直接在内容插槽中实现 |
| | | ## 1.9.9(2025-06-11) |
| | | - 修复 uni-popup-dialog 中 setVal 方法报错的问题 |
| | | - 修复 uni-popup-dialog 数据双向绑定问题。 |
| | | ## 1.9.8(2025-04-16) |
| | | - 修复 更新组件示例 ,解决更新数据或保存项目导致弹窗消失的问题 |
| | | ## 1.9.7(2025-04-14) |
| | | - 修复 uni-popup-dialog 弹出框在vue3中双向绑定问题 |
| | | ## 1.9.6(2025-01-08) |
| | | - 修复 示例中过期图片地址 |
| | | ## 1.9.5(2024-10-15) |
| | | - 修复 微信小程序中的getSystemInfo警告 |
| | | ## 1.9.2(2024-09-21) |
| | | - 修复 uni-popup在android上的重复点击弹出位置不正确的bug |
| | | ## 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) |
| | |
| | | </view> |
| | | <view v-else class="uni-dialog-content"> |
| | | <slot> |
| | | <input class="uni-dialog-input" v-model="val" :type="inputType" :placeholder="placeholderText" :focus="focus" > |
| | | <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" @click="closeDialog"> |
| | | <view class="uni-dialog-button" v-if="showClose" @click="closeDialog"> |
| | | <text class="uni-dialog-button-text">{{closeText}}</text> |
| | | </view> |
| | | <view class="uni-dialog-button uni-border-left" @click="onOk"> |
| | | <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> |
| | |
| | | initVueI18n |
| | | } from '@dcloudio/uni-i18n' |
| | | import messages from '../uni-popup/i18n/index.js' |
| | | const { t } = initVueI18n(messages) |
| | | 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 提示 |
| | |
| | | * @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'], |
| | | 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: '' |
| | |
| | | confirmText:{ |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | maxlength: { |
| | | type: Number, |
| | | default: -1, |
| | | }, |
| | | focus: { |
| | | type: Boolean, |
| | | default: true, |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogType: 'error', |
| | | focus: false, |
| | | val: "" |
| | | } |
| | | }, |
| | |
| | | } |
| | | }, |
| | | value(val) { |
| | | this.val = val |
| | | this.setVal(val) |
| | | }, |
| | | // #ifdef VUE3 |
| | | modelValue(val) { |
| | | this.setVal(val) |
| | | }, |
| | | // #endif |
| | | val(val) { |
| | | // #ifdef VUE2 |
| | | // TODO 兼容 vue2 |
| | | this.$emit('input', val); |
| | | // #endif |
| | | // #ifdef VUE3 |
| | | // TODO 兼容 vue3 |
| | | this.$emit('update:modelValue', val); |
| | | // #endif |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | // this.popup.closeMask() |
| | | if (this.mode === 'input') { |
| | | this.dialogType = 'info' |
| | | this.val = this.value |
| | | this.val = this.value; |
| | | // #ifdef VUE3 |
| | | this.val = this.modelValue; |
| | | // #endif |
| | | } else { |
| | | this.dialogType = this.type |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.focus = true |
| | | }, |
| | | methods: { |
| | | /** |
| | | * 给val属性赋值 |
| | | */ |
| | | setVal(val) { |
| | | if (this.maxlength != -1 && this.mode === 'input') { |
| | | this.val = val.slice(0, this.maxlength); |
| | | } else { |
| | | this.val = val |
| | | } |
| | | }, |
| | | /** |
| | | * 点击确认按钮 |
| | | */ |
| | | onOk() { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | // TODO 替换为自己的图标 |
| | | bottomData: [{ |
| | | text: '微信', |
| | | icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/c2b17470-50be-11eb-b680-7980c8a877b8.png', |
| | | icon: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png', |
| | | name: 'wx' |
| | | }, |
| | | { |
| | | text: '支付宝', |
| | | icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/d684ae40-50be-11eb-8ff1-d5dcf8779628.png', |
| | | name: 'wx' |
| | | icon: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png', |
| | | name: 'ali' |
| | | }, |
| | | { |
| | | text: 'QQ', |
| | | icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/e7a79520-50be-11eb-b997-9918a5dda011.png', |
| | | icon: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png', |
| | | name: 'qq' |
| | | }, |
| | | { |
| | | text: '新浪', |
| | | icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/0dacdbe0-50bf-11eb-8ff1-d5dcf8779628.png', |
| | | icon: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png', |
| | | name: 'sina' |
| | | }, |
| | | // { |
| New file |
| | |
| | | <template> |
| | | <view class="popup-root" v-if="isOpen" v-show="isShow" @click="clickMask"> |
| | | <view @click.stop> |
| | | <slot></slot> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | type CloseCallBack = ()=> void; |
| | | let closeCallBack:CloseCallBack = () :void => {}; |
| | | export default { |
| | | emits:["close","clickMask"], |
| | | data() { |
| | | return { |
| | | isShow:false, |
| | | isOpen:false |
| | | } |
| | | }, |
| | | props: { |
| | | maskClick: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | }, |
| | | watch: { |
| | | // 设置show = true 时,如果没有 open 需要设置为 open |
| | | isShow:{ |
| | | handler(isShow) { |
| | | // console.log("isShow",isShow) |
| | | if(isShow && this.isOpen == false){ |
| | | this.isOpen = true |
| | | } |
| | | }, |
| | | immediate:true |
| | | }, |
| | | // 设置isOpen = true 时,如果没有 isShow 需要设置为 isShow |
| | | isOpen:{ |
| | | handler(isOpen) { |
| | | // console.log("isOpen",isOpen) |
| | | if(isOpen && this.isShow == false){ |
| | | this.isShow = true |
| | | } |
| | | }, |
| | | immediate:true |
| | | } |
| | | }, |
| | | methods:{ |
| | | open(){ |
| | | // ...funs : CloseCallBack[] |
| | | // if(funs.length > 0){ |
| | | // closeCallBack = funs[0] |
| | | // } |
| | | this.isOpen = true; |
| | | }, |
| | | clickMask(){ |
| | | if(this.maskClick == true){ |
| | | this.$emit('clickMask') |
| | | this.close() |
| | | } |
| | | }, |
| | | close(): void{ |
| | | this.isOpen = false; |
| | | this.$emit('close') |
| | | closeCallBack() |
| | | }, |
| | | hiden(){ |
| | | this.isShow = false |
| | | }, |
| | | show(){ |
| | | this.isShow = true |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .popup-root { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | width: 750rpx; |
| | | height: 100%; |
| | | flex: 1; |
| | | background-color: rgba(0, 0, 0, 0.3); |
| | | justify-content: center; |
| | | align-items: center; |
| | | z-index: 99; |
| | | } |
| | | </style> |
| | |
| | | :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="{ backgroundColor: bg }" :class="[popupstyle]" @click="clear"> |
| | | <view class="uni-popup__wrapper" :style="getStyles" :class="[popupstyle]" @click="clear"> |
| | | <slot /> |
| | | </view> |
| | | </uni-transition> |
| | |
| | | * @property {Boolean} isMaskClick = [true|false] 蒙版点击是否关闭弹窗 |
| | | * @property {String} backgroundColor 主窗口背景色 |
| | | * @property {String} maskBackgroundColor 蒙版颜色 |
| | | * @property {String} borderRadius 设置圆角(左上、右上、右下和左下) 示例:"10px 10px 10px 10px" |
| | | * @property {Boolean} safeArea 是否适配底部安全区 |
| | | * @event {Function} change 打开关闭弹窗触发,e={show: false} |
| | | * @event {Function} maskClick 点击遮罩触发 |
| | |
| | | type: String, |
| | | default: 'rgba(0, 0, 0, 0.4)' |
| | | }, |
| | | borderRadius:{ |
| | | type: String, |
| | | } |
| | | }, |
| | | |
| | | watch: { |
| | |
| | | backgroundColor: 'rgba(0, 0, 0, 0.4)' |
| | | }, |
| | | transClass: { |
| | | backgroundColor: 'transparent', |
| | | borderRadius: this.borderRadius || "0", |
| | | position: 'fixed', |
| | | left: 0, |
| | | right: 0 |
| | | }, |
| | | maskShow: true, |
| | | mkclick: true, |
| | | popupstyle: this.isDesktop ? 'fixforpc-top' : 'top' |
| | | popupstyle: 'top' |
| | | } |
| | | }, |
| | | computed: { |
| | | getStyles() { |
| | | let res = { backgroundColor: this.bg }; |
| | | if (this.borderRadius || "0") { |
| | | res = Object.assign(res, { borderRadius: this.borderRadius }) |
| | | } |
| | | return res; |
| | | }, |
| | | isDesktop() { |
| | | return this.popupWidth >= 500 && this.popupHeight >= 500 |
| | | }, |
| | |
| | | }, |
| | | mounted() { |
| | | const fixSize = () => { |
| | | // #ifdef MP-WEIXIN |
| | | const { |
| | | windowWidth, |
| | | windowHeight, |
| | | windowTop, |
| | | safeArea, |
| | | screenHeight, |
| | | safeAreaInsets |
| | | } = uni.getWindowInfo() |
| | | // #endif |
| | | // #ifndef MP-WEIXIN |
| | | const { |
| | | windowWidth, |
| | | windowHeight, |
| | |
| | | screenHeight, |
| | | safeAreaInsets |
| | | } = uni.getSystemInfoSync() |
| | | // #endif |
| | | this.popupWidth = windowWidth |
| | | this.popupHeight = windowHeight + (windowTop || 0) |
| | | // TODO fix by mehaotian 是否适配底部安全区 ,目前微信ios 、和 app ios 计算有差异,需要框架修复 |
| | |
| | | this.setH5Visible() |
| | | }, |
| | | // #endif |
| | | activated() { |
| | | this.setH5Visible(!this.showPopup); |
| | | }, |
| | | deactivated() { |
| | | this.setH5Visible(true); |
| | | }, |
| | | created() { |
| | | // this.mkclick = this.isMaskClick || this.maskClick |
| | | if (this.isMaskClick === null && this.maskClick === null) { |
| | |
| | | this.maskClass.backgroundColor = this.maskBackgroundColor |
| | | }, |
| | | methods: { |
| | | setH5Visible() { |
| | | setH5Visible(visible = true) { |
| | | // #ifdef H5 |
| | | // fix by mehaotian 处理 h5 滚动穿透的问题 |
| | | document.getElementsByTagName('body')[0].style.overflow = 'visible' |
| | | document.getElementsByTagName('body')[0].style.overflow = visible ? "visible" : "hidden"; |
| | | // #endif |
| | | }, |
| | | /** |
| | |
| | | position: 'fixed', |
| | | left: 0, |
| | | right: 0, |
| | | backgroundColor: this.bg |
| | | backgroundColor: this.bg, |
| | | borderRadius:this.borderRadius || "0" |
| | | } |
| | | // TODO 兼容 type 属性 ,后续会废弃 |
| | | if (type) return |
| | | this.showPopup = true |
| | | this.showTrans = true |
| | | this.$nextTick(() => { |
| | | this.showPoptrans() |
| | | if (this.messageChild && this.type === 'message') { |
| | | this.messageChild.timerClose() |
| | | } |
| | |
| | | left: 0, |
| | | right: 0, |
| | | bottom: 0, |
| | | //paddingBottom: 'constant(safe-area-inset-bottom)', ///兼容 IOS<11.2/ |
| | | //paddingBottom: 'env(safe-area-inset-bottom)', ///兼容 IOS>11.2/ |
| | | //paddingBottom: this.safeAreaInsets + 'px', |
| | | backgroundColor: this.bg |
| | | paddingBottom: this.safeAreaInsets + 'px', |
| | | backgroundColor: this.bg, |
| | | borderRadius:this.borderRadius || "0", |
| | | } |
| | | // TODO 兼容 type 属性 ,后续会废弃 |
| | | if (type) return |
| | | this.showPopup = true |
| | | this.showTrans = true |
| | | this.showPoptrans() |
| | | }, |
| | | /** |
| | | * 中间弹出样式处理 |
| | | */ |
| | | center(type) { |
| | | this.popupstyle = 'center' |
| | | //微信小程序下,组合动画会出现文字向上闪动问题,再此做特殊处理 |
| | | // #ifdef MP-WEIXIN |
| | | this.ani = ['fade'] |
| | | // #endif |
| | | // #ifndef MP-WEIXIN |
| | | this.ani = ['zoom-out', 'fade'] |
| | | // #endif |
| | | this.transClass = { |
| | | position: 'fixed', |
| | | /* #ifndef APP-NVUE */ |
| | |
| | | right: 0, |
| | | top: 0, |
| | | justifyContent: 'center', |
| | | alignItems: 'center' |
| | | alignItems: 'center', |
| | | borderRadius:this.borderRadius || "0" |
| | | } |
| | | // TODO 兼容 type 属性 ,后续会废弃 |
| | | if (type) return |
| | | this.showPopup = true |
| | | this.showTrans = true |
| | | this.showPoptrans() |
| | | }, |
| | | left(type) { |
| | | this.popupstyle = 'left' |
| | |
| | | bottom: 0, |
| | | top: 0, |
| | | backgroundColor: this.bg, |
| | | borderRadius:this.borderRadius || "0", |
| | | /* #ifndef APP-NVUE */ |
| | | display: 'flex', |
| | | flexDirection: 'column' |
| | |
| | | } |
| | | // TODO 兼容 type 属性 ,后续会废弃 |
| | | if (type) return |
| | | this.showPopup = true |
| | | this.showTrans = true |
| | | this.showPoptrans() |
| | | }, |
| | | right(type) { |
| | | this.popupstyle = 'right' |
| | |
| | | right: 0, |
| | | top: 0, |
| | | backgroundColor: this.bg, |
| | | borderRadius:this.borderRadius || "0", |
| | | /* #ifndef APP-NVUE */ |
| | | display: 'flex', |
| | | flexDirection: 'column' |
| | |
| | | } |
| | | // TODO 兼容 type 属性 ,后续会废弃 |
| | | if (type) return |
| | | this.showPoptrans() |
| | | }, |
| | | showPoptrans(){ |
| | | this.$nextTick(()=>{ |
| | | this.showPopup = true |
| | | this.showTrans = true |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | "id": "uni-popup", |
| | | "displayName": "uni-popup 弹出层", |
| | | "version": "1.8.3", |
| | | "version": "1.9.10", |
| | | "description": " Popup 组件,提供常用的弹层", |
| | | "keywords": [ |
| | | "uni-ui", |
| | |
| | | ], |
| | | "repository": "https://github.com/dcloudio/uni-ui", |
| | | "engines": { |
| | | "HBuilderX": "" |
| | | "HBuilderX": "", |
| | | "uni-app": "^4.06", |
| | | "uni-app-x": "" |
| | | }, |
| | | "directories": { |
| | | "example": "../../temps/example_temps" |
| | |
| | | "permissions": "无" |
| | | }, |
| | | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", |
| | | "type": "component-vue" |
| | | "type": "component-vue", |
| | | "darkmode": "x", |
| | | "i18n": "x", |
| | | "widescreen": "x" |
| | | }, |
| | | "uni_modules": { |
| | | "dependencies": [ |
| | |
| | | "encrypt": [], |
| | | "platforms": { |
| | | "cloud": { |
| | | "tcb": "y", |
| | | "aliyun": "y" |
| | | "tcb": "x", |
| | | "aliyun": "x", |
| | | "alipay": "x" |
| | | }, |
| | | "client": { |
| | | "App": { |
| | | "app-vue": "y", |
| | | "app-nvue": "y" |
| | | "uni-app": { |
| | | "vue": { |
| | | "vue2": "√", |
| | | "vue3": "√" |
| | | }, |
| | | "H5-mobile": { |
| | | "Safari": "y", |
| | | "Android Browser": "y", |
| | | "微信浏览器(Android)": "y", |
| | | "QQ浏览器(Android)": "y" |
| | | "web": { |
| | | "safari": "√", |
| | | "chrome": "√" |
| | | }, |
| | | "H5-pc": { |
| | | "Chrome": "y", |
| | | "IE": "y", |
| | | "Edge": "y", |
| | | "Firefox": "y", |
| | | "Safari": "y" |
| | | "app": { |
| | | "vue": "√", |
| | | "nvue": "√", |
| | | "android": "√", |
| | | "ios": "√", |
| | | "harmony": "√" |
| | | }, |
| | | "小程序": { |
| | | "微信": "y", |
| | | "阿里": "y", |
| | | "百度": "y", |
| | | "字节跳动": "y", |
| | | "QQ": "y" |
| | | "mp": { |
| | | "weixin": "√", |
| | | "alipay": "√", |
| | | "toutiao": "√", |
| | | "baidu": "√", |
| | | "kuaishou": "-", |
| | | "jd": "-", |
| | | "harmony": "-", |
| | | "qq": "√", |
| | | "lark": "-" |
| | | }, |
| | | "快应用": { |
| | | "华为": "u", |
| | | "联盟": "u" |
| | | "quickapp": { |
| | | "huawei": "-", |
| | | "union": "-" |
| | | } |
| | | }, |
| | | "Vue": { |
| | | "vue2": "y", |
| | | "vue3": "y" |
| | | "uni-app-x": { |
| | | "web": { |
| | | "safari": "√", |
| | | "chrome": "√" |
| | | }, |
| | | "app": { |
| | | "android": "√", |
| | | "ios": "√", |
| | | "harmony": "√" |
| | | }, |
| | | "mp": { |
| | | "weixin": "√" |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | ## 1.3.6(2025-07-18) |
| | | - 修复 nvue 页面,样式错误问题 |
| | | ## 1.3.5(2025-06-11) |
| | | - 修复 第一次执行不显示动画的问题 |
| | | ## 1.3.4(2025-04-16) |
| | | - 修复 页面数据更新到底动画复原的问题 |
| | | - 修复 示例页面打开报错的问题 |
| | | ## 1.3.3(2024-04-23) |
| | | - 修复 当元素会受变量影响自动隐藏的bug |
| | | ## 1.3.2(2023-05-04) |
| | | - 修复 NVUE 平台报错的问题 |
| | | ## 1.3.1(2021-11-23) |
| | | - 修复 init 方法初始化问题 |
| | | ## 1.3.0(2021-11-19) |
| | |
| | | class MPAnimation { |
| | | constructor(options, _this) { |
| | | this.options = options |
| | | this.animation = uni.createAnimation(options) |
| | | // 在iOS10+QQ小程序平台下,传给原生的对象一定是个普通对象而不是Proxy对象,否则会报parameter should be Object instead of ProxyObject的错误 |
| | | this.animation = uni.createAnimation({ |
| | | ...options |
| | | }) |
| | | this.currentStepAnimates = {} |
| | | this.next = 0 |
| | | this.$ = _this |
| | |
| | | <template> |
| | | <view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view> |
| | | <!-- #ifndef APP-NVUE --> |
| | | <view v-show="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"> |
| | | <slot></slot> |
| | | </view> |
| | | <!-- #endif --> |
| | | <!-- #ifdef APP-NVUE --> |
| | | <view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"> |
| | | <slot></slot> |
| | | </view> |
| | | <!-- #endif --> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | customClass:{ |
| | | type: String, |
| | | default: '' |
| | | } |
| | | }, |
| | | onceRender: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | isShow: false, |
| | | transform: '', |
| | | opacity: 1, |
| | | opacity: 0, |
| | | animationData: {}, |
| | | durationTime: 300, |
| | | config: {} |
| | |
| | | * @param {Object} obj |
| | | */ |
| | | step(obj, config = {}) { |
| | | if (!this.animation) return |
| | | for (let i in obj) { |
| | | try { |
| | | if(typeof obj[i] === 'object'){ |
| | | this.animation[i](...obj[i]) |
| | | }else{ |
| | | this.animation[i](obj[i]) |
| | | if (!this.animation) return this |
| | | Object.keys(obj).forEach(key => { |
| | | const value = obj[key] |
| | | if (typeof this.animation[key] === 'function') { |
| | | Array.isArray(value) ? |
| | | this.animation[key](...value) : |
| | | this.animation[key](value) |
| | | } |
| | | } catch (e) { |
| | | console.error(`方法 ${i} 不存在`) |
| | | } |
| | | } |
| | | }) |
| | | this.animation.step(config) |
| | | return this |
| | | }, |
| | |
| | | // 开始过度动画 |
| | | open() { |
| | | clearTimeout(this.timer) |
| | | this.transform = '' |
| | | this.isShow = true |
| | | let { opacity, transform } = this.styleInit(false) |
| | | if (typeof opacity !== 'undefined') { |
| | | this.opacity = opacity |
| | | } |
| | | this.transform = transform |
| | | // 新增初始状态重置逻辑(关键) |
| | | this.transform = this.styleInit(false).transform || '' |
| | | this.opacity = this.styleInit(false).opacity || 0 |
| | | |
| | | // 确保动态样式已经生效后,执行动画,如果不加 nextTick ,会导致 wx 动画执行异常 |
| | | this.$nextTick(() => { |
| | | // TODO 定时器保证动画完全执行,目前有些问题,后面会取消定时器 |
| | | this.timer = setTimeout(() => { |
| | | this.animation = createAnimation(this.config, this) |
| | | this.tranfromInit(false).step() |
| | | this.animation.run() |
| | | this.animation.run(() => { |
| | | // #ifdef APP-NVUE |
| | | this.transform = this.styleInit(false).transform || '' |
| | | this.opacity = this.styleInit(false).opacity || 1 |
| | | // #endif |
| | | // #ifndef APP-NVUE |
| | | this.transform = '' |
| | | this.opacity = this.styleInit(false).opacity || 1 |
| | | // #endif |
| | | this.$emit('change', { |
| | | detail: this.isShow |
| | | }) |
| | | }, 20) |
| | | }) |
| | | }, 80) |
| | | }) |
| | | }, |
| | | // 关闭过度动画 |
| | |
| | | }, |
| | | // 处理动画开始前的默认样式 |
| | | styleInit(type) { |
| | | let styles = { |
| | | transform: '' |
| | | } |
| | | let buildStyle = (type, mode) => { |
| | | if (mode === 'fade') { |
| | | styles.opacity = this.animationType(type)[mode] |
| | | let styles = { transform: '', opacity: 1 } |
| | | const buildStyle = (type, mode) => { |
| | | const value = this.animationType(type)[mode] // 直接使用 type 控制状态 |
| | | if (mode.startsWith('fade')) { |
| | | styles.opacity = value |
| | | } else { |
| | | styles.transform += this.animationType(type)[mode] + ' ' |
| | | styles.transform += value + ' ' |
| | | } |
| | | } |
| | | |
| | | if (typeof this.modeClass === 'string') { |
| | | buildStyle(type, this.modeClass) |
| | | } else { |
| | | this.modeClass.forEach(mode => { |
| | | buildStyle(type, mode) |
| | | }) |
| | | this.modeClass.forEach(mode => buildStyle(type, mode)) |
| | | } |
| | | return styles |
| | | }, |
| | |
| | | { |
| | | "id": "uni-transition", |
| | | "displayName": "uni-transition 过渡动画", |
| | | "version": "1.3.1", |
| | | "version": "1.3.6", |
| | | "description": "元素的简单过渡动画", |
| | | "keywords": [ |
| | | "uni-ui", |
| | |
| | | ], |
| | | "repository": "https://github.com/dcloudio/uni-ui", |
| | | "engines": { |
| | | "HBuilderX": "" |
| | | "HBuilderX": "", |
| | | "uni-app": "^4.12", |
| | | "uni-app-x": "" |
| | | }, |
| | | "directories": { |
| | | "example": "../../temps/example_temps" |
| | | }, |
| | | "dcloudext": { |
| | | "category": [ |
| | | "前端组件", |
| | | "通用组件" |
| | | ], |
| | | "sale": { |
| | | "regular": { |
| | | "price": "0.00" |
| | |
| | | "data": "无", |
| | | "permissions": "无" |
| | | }, |
| | | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" |
| | | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", |
| | | "type": "component-vue", |
| | | "darkmode": "x", |
| | | "i18n": "x", |
| | | "widescreen": "x" |
| | | }, |
| | | "uni_modules": { |
| | | "dependencies": ["uni-scss"], |
| | | "dependencies": [ |
| | | "uni-scss" |
| | | ], |
| | | "encrypt": [], |
| | | "platforms": { |
| | | "cloud": { |
| | | "tcb": "y", |
| | | "aliyun": "y" |
| | | "tcb": "x", |
| | | "aliyun": "x", |
| | | "alipay": "x" |
| | | }, |
| | | "client": { |
| | | "App": { |
| | | "app-vue": "y", |
| | | "app-nvue": "y" |
| | | "uni-app": { |
| | | "vue": { |
| | | "vue2": "√", |
| | | "vue3": "√" |
| | | }, |
| | | "H5-mobile": { |
| | | "Safari": "y", |
| | | "Android Browser": "y", |
| | | "微信浏览器(Android)": "y", |
| | | "QQ浏览器(Android)": "y" |
| | | "web": { |
| | | "safari": "√", |
| | | "chrome": "√" |
| | | }, |
| | | "H5-pc": { |
| | | "Chrome": "y", |
| | | "IE": "y", |
| | | "Edge": "y", |
| | | "Firefox": "y", |
| | | "Safari": "y" |
| | | "app": { |
| | | "vue": "√", |
| | | "nvue": "√", |
| | | "android": "√", |
| | | "ios": "√", |
| | | "harmony": "√" |
| | | }, |
| | | "小程序": { |
| | | "微信": "y", |
| | | "阿里": "y", |
| | | "百度": "y", |
| | | "字节跳动": "y", |
| | | "QQ": "y" |
| | | "mp": { |
| | | "weixin": { |
| | | }, |
| | | "快应用": { |
| | | "华为": "u", |
| | | "联盟": "u" |
| | | "alipay": { |
| | | }, |
| | | "Vue": { |
| | | "vue2": "y", |
| | | "vue3": "y" |
| | | "toutiao": { |
| | | }, |
| | | "baidu": { |
| | | }, |
| | | "kuaishou": { |
| | | }, |
| | | "jd": { |
| | | }, |
| | | "harmony": "-", |
| | | "qq": "√", |
| | | "lark": "-" |
| | | }, |
| | | "quickapp": { |
| | | "huawei": "√", |
| | | "union": "√" |
| | | } |
| | | }, |
| | | "uni-app-x": { |
| | | "web": { |
| | | "safari": "-", |
| | | "chrome": "-" |
| | | }, |
| | | "app": { |
| | | "android": "-", |
| | | "ios": "-", |
| | | "harmony": "-" |
| | | }, |
| | | "mp": { |
| | | "weixin": "-" |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | import CryptoJS from './node_modules/crypto-js/crypto-js.js' |
| | | const baseUrl = 'https://tmy.xjzbh.com/api/' |
| | | const baseUrl = 'https://gyq1983.jggyq.com/api/' |
| | | const cryptKey = '2025Shop2025Shop' |
| | | const cryptIv = '2025Shop2025Shop' |
| | | |
| | |
| | | } |
| | | |
| | | const getHeader = () => { |
| | | let token = uni.getStorageSync('lzsc-token') |
| | | let token = uni.getStorageSync('pig-token') |
| | | let header = { |
| | | 'Accept': 'application/json', |
| | | 'Content-type': 'application/json', |
| | |
| | | } |
| | | |
| | | const checkLogin = (url = '', burl = '') => { |
| | | let token = uni.getStorageSync('lzsc-token') ? uni.getStorageSync('lzsc-token') : null |
| | | console.log('url', url) |
| | | let token = uni.getStorageSync('pig-token') ? uni.getStorageSync('pig-token') : null |
| | | if(token == null){ |
| | | uni.showModal({ |
| | | title: '温馨提示', |
| | |
| | | } |
| | | |
| | | const checkGoPages = (url = '', burl = '', isgo = 1) => { |
| | | let token = uni.getStorageSync('lzsc-token') ? uni.getStorageSync('lzsc-token') : null |
| | | let token = uni.getStorageSync('pig-token') ? uni.getStorageSync('pig-token') : null |
| | | console.log('token', token) |
| | | if(token == null){ |
| | | uni.showModal({ |