| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642 |
- <template>
- <view style="background-color: whitesmoke;" @touchstart="rightF" @touchend="leftF">
- <customNav :shownav="true" :title="posName" titledetl=""></customNav>
- <view style="width: 100%;height: 80rpx;background-color: #00A6FF;"></view>
- <view class="nodetail">
- <view class="contentInRowS" style="width: 100%;">
- <netImage style="margin-left: 12rpx;margin-top: -20rpx;" width="160" height="160" bradius="80"
- :mysrc="mendianMs.logo" mymode="scaleToFill"></netImage>
- <view class="contentColumn" style="width: 500rpx;margin-right: 20rpx;">
- <text class="dianpuming">{{mendianMs.posName}}</text>
- <text class="peisongsuoming">{{$t('index.manX')}} {{$formPr(mendianMs.posPrice)}}
- {{$t('locale.huobidw')}}</text>
- <view class="contentInRowS">
- <view class="contentColumnC" style="width: 24%; visibility: hidden;">
- <image class="actimge" :src="shouchangIcon" mode="aspectFit" @click="shouchang"></image>
- <text class="textfontS3">{{$t('index.shouchang')}}</text>
- </view>
- <view class="contentColumnC" style="width: 24%;">
- <image class="actimge" src="/static/images/daipinglun@3x.png" mode="aspectFit"
- @click="pinglunList"></image>
- <text class="textfontS3">{{$t('index.pinglun')}}</text>
- </view>
- <view class="contentColumnC" style="width: 24%;">
- <image class="actimge" src="/static/images/gengduozx.png" mode="aspectFit"
- @click="gengduozx"></image>
- <text class="textfontS3">{{$t('index.mendian')}}</text>
- </view>
- <view class="contentColumnC" style="width: 24%;">
- <image class="actimge" src="/static/images/lianxikf.png" mode="aspectFit"
- @click="callPhone"></image>
- <text class="textfontS3">{{$t('mend.kefudianhua')}}</text>
- </view>
- </view>
- </view>
- </view>
- <view v-if="mendianMs.state==1" class="contentInRowR">
- <text
- style="margin-top: 10rpx;color: darkgreen;font-size: 28rpx;padding-right: 40rpx;">{{$t('mend.statedy')}}</text>
- </view>
- <view style="height: 20rpx;"></view>
- </view>
- <view v-if="cuxiaoImge.length==0">
- <netImage style="margin-top:20rpx;margin-left: 25rpx;" width="700" height="400" bradius="6"
- :mysrc="mendianMs.image" mymode="scaleToFill"></netImage>
- </view>
- <view v-if="cuxiaoImge.length>0"><!-- 促销活动 -->
- <swiperImgs style="margin-top: 20rpx;" width="750" height="400" :imageList="cuxiaoImge"></swiperImgs>
- </view>
- <view style="margin-top: 40rpx;">
- <view :class="[(isFixedTop[0]) ?cssName:'']" id="box" class="box">
- <view class="contentInRowL"
- style="width: 90%;margin-left: 5%;margin-bottom: 20rpx;align-items: center;">
- <view>
- <text class="fenleiTitle" @click="popfenlei">{{$t('index.goodsfenlei')}}</text>
- </view>
- <image class="actimgezy" style="margin-left: 10rpx;" src="/static/images/zuoyouhd.png"
- mode="aspectFit"></image>
- <view class="">
- <swiper style="height: 60rpx;width: 450rpx;align-items: center;" display-multiple-items="2"
- :indicator-dots="false" :autoplay="false" :current="current" :duration="500"
- @animationfinish="fenleiSel">
- <swiper-item v-for="(item,index) in shangpinfenlei">
- <view class="swiper-item text1row">{{item.name}}</view>
- </swiper-item>
- </swiper>
- </view>
- </view>
- </view>
- <view v-if="shangpinfenlei.length>0" class="page-view contentColumnC">
- <view class="contentInRowC">
- <text class="textdop2"></text>
- <text class="textdop1"></text>
- <text class="text2row"
- style="margin-left: 10rpx;font-size: 30rpx;font-weight: bold;max-width: 600rpx;">{{shangpinfenlei[current].name}}</text>
- <text class="textdop1"></text>
- <text class="textdop2"></text>
- </view>
- </view>
- <view class="page-view contentColumn">
- <view class="item_list">
- <view class="item_content" v-for="(item1, index1) in shangpinlist" :key="index1">
- <view v-if="item1.stackingUp==0" class="thumb-boxR contentColumnC">
- <netImage class="goodimage" width="334" height="334" :mysrc="item1.image"
- mymode="scaleToFill" v-on:Emyimageclick="shangpinsl(item1.id)"></netImage>
- <view class="msText">
- <text class="dianpuming" @click="shangpinsl(item1.id)">{{item1.name}}</text>
- <view class="buyBT">
- <text class="peisongsuoming detailtextV">{{item1.introduce}}</text>
- </view>
- <view v-if="shangpingoumaiS[current][index1]" class="buyBTSB">
- <text class="peisongsuoming">{{$formPr(item1.price)}}{{$t('locale.huobidw')}}</text>
- <view v-if="item1.stackingUp==0" class="rconten">
- <image v-if="shangpingoumaiS[current][index1].shuliang>0" class="imageRJ"
- src="/static/images/jian@3x.png" mode="aspectFit"
- @click="jiangouwuche(index1)"></image>
- <text v-if="shangpingoumaiS[current][index1].shuliang>0"
- class="textR">{{shangpingoumaiS[current][index1].shuliang}}</text>
- <image class="imageR" src="/static/images/plus-circle-fill@3x.png"
- mode="aspectFit" @click="editSKU(index1)"></image>
- </view>
- <view v-if="item1.stackingUp==1" class="rconten">
- <text class="textR">{{$t('mend.yixiajia')}}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view style="height: 260rpx;"></view>
- </view>
- </view>
- <!-- <view v-if="dailinghb.length>0" class="hongbaoFV">
- <view class="hongbaoImage" @click="openhbkq">
- <image src="/static/images/hongbkq.png" style="width: 100%;height: 100%;" mode="aspectFit"></image>
- </view>
- </view> -->
- <view class="bottomfloatV">
- <view class="buyBT">
- <image class="gouwuche" :src="gouwcheimg" mode="aspectFit" @click="gotoGouwuche"></image>
- <text class="peisongsuoming">{{notext}}</text>
- <text class="qjs" :style="{backgroundColor:gwbcolor,color:gwbTcolor}"
- @click="gotojiesuan">{{$t('comp.qujiesuan')}}</text>
- </view>
- </view>
- <popViewGG :show="showpop" :showbotom="false" :maskClosable="true" :isCancel="true"
- @chooseCancel="chooseCancel">
- <foodxuangou style="width:100%;max-height: 70vh" :food="spindexSP" v-on:Ejiagouwuche="jiagouwuche">
- </foodxuangou>
- </popViewGG>
- <uni-popup style="z-index: 999;" ref="popfl" type="center" :isMaskClick="true" :safeArea="true">
- <view class="contentColumnC" style="width:660upx;background-color:white;border-radius: 8rpx;">
- <text class="fenleiTitle"
- style="margin-top: 16rpx;margin-bottom: 16rpx;">{{$t('index.goodsfenlei')}}</text>
- <scroll-view scroll-y="true" style="max-height: 400rpx;">
- <view>
- <view class="" v-for="(item,index) in shangpinfenlei">
- <view class="fenleiitem" @click="ppfenleisel(index)">{{item.name}}</view>
- </view>
- </view>
- </scroll-view>
- <view style="height: 20rpx;"></view>
- </view>
- </uni-popup>
- <popViewGG :show="hongbkqs" :acttips="$t('order.queding')" :maskClosable="true" :isCancel="false"
- @chooseCancel="chooseCancel">
- <view class="contentColumnC" style="width: 100%;background-color: whitesmoke;">
- <view class="contentColumnC" style="height: 80rpx;width: 100%;background-color: lightgray;">
- <view class="contentInRowS" style="height: 80rpx;width: 90%;">
- <text style="font-size: 30rpx;color: crimson;"></text>
- <text style="font-size: 28rpx;">{{$t('index.hongbaokq')}}</text>
- <text style="font-size: 30rpx;color: #00A6FF;"
- @click="querenyhhd">{{$t('order.queding')}}</text>
- </view>
- </view>
- <view v-if="dailinghb.length>0" style="width: 90%;">
- <view class="contentColumn" style="margin-top: 16rpx;" v-for="(item, index) in dailinghb"
- :key="index">
- <view class="contentInRowS">
- <view class="contentColumn withpophbkq"
- :style="item.type==0?'color: #00A6FF;':'color:green;'">
- <text style="font-size: 28rpx;">{{item.name}}</text>
- <text style="font-size: 28rpx;">{{getNote(item,1)}}</text>
- </view>
- <view class="contentInRowC"
- style="width: 150rpx;height:50rpx;background-color:chocolate;border-radius: 6rpx;"
- @click="lingququan(item.id)">
- <text style="font-size: 26rpx;color: white;">{{$t("hongbaokq.lingqu")}}</text>
- </view>
- </view>
- </view>
- </view>
- <view style="height: 80rpx;"></view>
- </view>
- </popViewGG>
- <!-- 下载app弹窗 -->
- <uni-popup ref="downloadPopup" type="center" :mask-click="true">
- <view class="download-popup-content">
- <!-- 标题栏 -->
- <view class="download-popup-header">
- <text class="download-popup-title">{{$t('api.message')}}</text>
- <view class="download-popup-close" @click="closeDownloadPopup">
- <text class="close-icon">×</text>
- </view>
- </view>
- <!-- 内容 -->
- <view class="download-popup-body">
- <text class="download-popup-text">{{$t('jiesuan.xiazapp')}}</text>
- </view>
- <!-- 按钮 -->
- <view class="download-popup-buttons">
- <view class="download-popup-btn download-popup-btn-ios" @click="downloadIOS">
- <text class="download-popup-btn-text">{{$t('jiesuan.xzios')}}</text>
- </view>
- <view class="download-popup-btn download-popup-btn-android" @click="downloadAndroid">
- <text class="download-popup-btn-text">{{$t('jiesuan.xiazandriod')}}</text>
- </view>
- </view>
- </view>
- </uni-popup>
- </view>
- </template>
- <script>
- import api from "@/pages/api/api.js";
- export default {
- data() {
- return {
- isFixedTop: [],
- Topdistance: [],
- cssName: '',
- //------------------------------
- cuxiaoImge: [],
- id: 1,
- userid: 0,
- mendianMs: [],
- posName: '',
- isfirstShow: 0,
- isShouchang: 0,
- shouchangIcon: '/static/images/faver@3x.png',
- option: {},
- login: false,
- showpop: false,
- gouwuche: '',
- scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度
- shangpinfenlei: [],
- shangpinlist: [],
- shangpingoumaiS: [],
- current: 0, // 当前分类值
- spindex: 0, //当前分类商品操作INDEX
- spindexSP: '', //当前分类商品操作INDEX对应商品
- itemId: 0, // 栏目右边scroll-view用于滚动的id
- gouwcheimg: '/static/images/gouwuh@3x.png',
- notext: this.$t('comp.weixgsp'),
- goumaijine: 0,
- gwbcolor: 'darkgray',
- gwbTcolor: 'black',
- startX: 0,
- startY: 0,
- lang: '0',
- dailinghb: [],
- hongbkqs: false,
- downloadUrls: {},
- isShangjia: 0,
- id: 0,
- }
- },
- onShow() {
- if (0 == this.isfirstShow) {
- this.getmendianDetail(this.id);
- this.isfirstShow = 1;
- } else {
- this.refleashdata();
- }
- // this.getHbkaq();
- var that = this;
- try { //读取
- that.token = uni.getStorageSync("token");
- //console.log('2222',that.token)
- if (that.token == '' || that.token == undefined || that.token == null) {
- that.login = false;
- return;
- } else {
- that.login = true;
- return;
- }
- } catch (e) { //错误
- return;
- }
- },
- onLoad(option) {
- console.log(option)
- if (!('id' in option) || !('isShangjia' in option) || !('language' in option)) {
- this.$nextTick(() => {
- uni.showToast({
- title: this.$t('mend.wuxiaofw'),
- icon: 'error',
- duration: 2000
- });
- });
- return
- }
- this.isShangjia = option.isShangjia
- this.id = option.id
- var code = option.language
- console.log(code)
- uni.setStorageSync('language', code);
- uni.setLocale(code);
- this.$i18n.locale = code;
- var language = uni.getStorageSync('language');
- if (language == 'yuenan') {
- this.lang = '0';
- }
- if (language == 'zh-Hans') {
- this.lang = '2';
- }
- if (language == 'zh-Hant') {
- this.lang = '3';
- }
- this.id = option.id;
- this.refleashdata();
- uni.pageScrollTo({
- scrollTop: 0,
- duration: 0
- })
- var info = uni.getSystemInfoSync();
- var isAndroid = info.platform.toLowerCase() === 'android';
- if (isAndroid) {
- this.cssName = 'fixedTop';
- } else {
- this.cssName = 'fixedTopios';
- }
- },
- mounted() {
- this.GetTop()
- },
- onPageScroll(e) {
- const that = this
- // console.log(e.scrollTop,JSON.stringify(this.Topdistance),JSON.stringify(this.isFixedTop))
- for (let i = 0; i < this.Topdistance.length; i++) {
- if (e.scrollTop > this.Topdistance[i] - 70) {
- // console.log('***************')
- this.isFixedTop[i] = true
- this.$set(this.isFixedTop, i, true)
- this.isFixedTop[i] = true
- } else {
- // console.log('++++++++++')
- this.isFixedTop[i] = false
- this.$set(this.isFixedTop, i, false)
- this.isFixedTop[i] = false
- }
- }
- },
- methods: {
- // 检测是否为安卓设备
- isAndroidDevice() {
- // 在H5环境中检测
- // #ifdef H5
- const ua = navigator.userAgent.toLowerCase();
- return ua.indexOf('android') > -1;
- // #endif
- // 在App环境中检测
- // #ifdef APP-PLUS
- return plus.os.name === 'Android';
- // #endif
- // 其他环境默认返回false
- return false;
- },
- // 检测是否为iOS设备
- isIOSDevice() {
- // #ifdef H5
- const ua = navigator.userAgent.toLowerCase();
- return /iphone|ipad|ipod/.test(ua);
- // #endif
- // #ifdef APP-PLUS
- return plus.os.name === 'iOS';
- // #endif
- return false;
- },
- // 显示下载app提示
- showDownloadAppModal() {
- api('getAppDownload', {}, r => {
- console.log(r)
- this.downloadUrls = r.data.data;
- this.$refs.downloadPopup.open();
- });
- },
- // 关闭下载app弹窗
- closeDownloadPopup() {
- this.$refs.downloadPopup.close();
- },
- // 下载iOS版本
- downloadIOS() {
- // 先尝试打开已安装的应用
- this.tryOpenInstalledApp();
- this.closeDownloadPopup();
- },
- // 下载Android版本
- downloadAndroid() {
- // 先尝试打开已安装的应用
- this.tryOpenInstalledApp();
- this.closeDownloadPopup();
- },
- // 尝试打开已安装的应用
- tryOpenInstalledApp() {
- const that = this;
- const appSchema = 'cityexpressuser://pages/shanpinxungou/shangjia/shangjiaView?id=' + this.id +
- '&isShangjia=' + this.isShangjia;
- // 在App环境中使用plus.runtime.openURL
- // #ifdef APP-PLUS
- plus.runtime.openURL(appSchema, function() {
- console.log(that.$t('download.app_opened_success'));
- }, function(e) {
- console.log(that.$t('download.app_not_installed'));
- // 应用未安装,继续下载流程
- that.startDownloadProcess();
- });
- // #endif
- // 在H5环境中尝试打开应用
- // #ifdef H5
- this.tryOpenAppInH5(appSchema);
- // #endif
- },
- // 在H5环境中尝试打开应用
- tryOpenAppInH5(appSchema) {
- const that = this;
- // 检测是否为iOS设备
- const isIOS = this.isIOSDevice();
- if (isIOS) {
- // iOS设备使用特殊处理
- this.tryOpenIOSApp(appSchema);
- } else {
- // 安卓设备使用iframe方式
- this.tryOpenAndroidApp(appSchema);
- }
- },
- // 尝试打开iOS应用
- tryOpenIOSApp(appSchema) {
- const that = this;
- // 记录开始时间
- const startTime = Date.now();
- let hasApp = false;
- // 监听页面可见性变化
- const handleVisibilityChange = () => {
- if (document.hidden) {
- hasApp = true;
- clearTimeout(timeout);
- document.removeEventListener('visibilitychange', handleVisibilityChange);
- document.removeEventListener('pagehide', handlePageHide);
- document.removeEventListener('blur', handleBlur);
- }
- };
- // 监听页面隐藏事件
- const handlePageHide = () => {
- hasApp = true;
- clearTimeout(timeout);
- document.removeEventListener('visibilitychange', handleVisibilityChange);
- document.removeEventListener('pagehide', handlePageHide);
- document.removeEventListener('blur', handleBlur);
- };
- // 监听窗口失焦事件
- const handleBlur = () => {
- hasApp = true;
- clearTimeout(timeout);
- document.removeEventListener('visibilitychange', handleVisibilityChange);
- document.removeEventListener('pagehide', handlePageHide);
- document.removeEventListener('blur', handleBlur);
- };
- // 设置超时检测
- const timeout = setTimeout(() => {
- if (!hasApp) {
- // 应用未安装,继续下载流程
- that.startDownloadProcess();
- }
- document.removeEventListener('visibilitychange', handleVisibilityChange);
- document.removeEventListener('pagehide', handlePageHide);
- document.removeEventListener('blur', handleBlur);
- }, 1500); // 缩短超时时间
- // 添加事件监听器
- document.addEventListener('visibilitychange', handleVisibilityChange);
- document.addEventListener('pagehide', handlePageHide);
- window.addEventListener('blur', handleBlur);
- // 尝试打开应用
- try {
- // 方法1: 直接使用window.location
- window.location.href = appSchema;
- } catch (e) {
- // 方法2: 使用iframe
- const iframe = document.createElement('iframe');
- iframe.style.display = 'none';
- iframe.style.width = '1px';
- iframe.style.height = '1px';
- iframe.src = appSchema;
- document.body.appendChild(iframe);
- // 清理iframe
- setTimeout(() => {
- if (document.body.contains(iframe)) {
- document.body.removeChild(iframe);
- }
- }, 1000);
- }
- },
- // 尝试打开安卓应用
- tryOpenAndroidApp(appSchema) {
- const that = this;
- let hasApp = false;
- // 监听页面可见性变化
- const handleVisibilityChange = () => {
- if (document.hidden) {
- hasApp = true;
- clearTimeout(timeout);
- document.removeEventListener('visibilitychange', handleVisibilityChange);
- document.removeEventListener('pagehide', handlePageHide);
- document.removeEventListener('blur', handleBlur);
- }
- };
- // 监听页面隐藏事件
- const handlePageHide = () => {
- hasApp = true;
- clearTimeout(timeout);
- document.removeEventListener('visibilitychange', handleVisibilityChange);
- document.removeEventListener('pagehide', handlePageHide);
- document.removeEventListener('blur', handleBlur);
- };
- // 监听窗口失焦事件
- const handleBlur = () => {
- hasApp = true;
- clearTimeout(timeout);
- document.removeEventListener('visibilitychange', handleVisibilityChange);
- document.removeEventListener('pagehide', handlePageHide);
- document.removeEventListener('blur', handleBlur);
- };
- // 设置超时检测
- const timeout = setTimeout(() => {
- if (!hasApp) {
- // 应用未安装,继续下载流程
- that.startDownloadProcess();
- }
- document.removeEventListener('visibilitychange', handleVisibilityChange);
- document.removeEventListener('pagehide', handlePageHide);
- document.removeEventListener('blur', handleBlur);
- }, 1500); // 缩短超时时间
- // 添加事件监听器
- document.addEventListener('visibilitychange', handleVisibilityChange);
- document.addEventListener('pagehide', handlePageHide);
- window.addEventListener('blur', handleBlur);
- // 尝试打开应用
- try {
- // 方法1: 直接使用window.location
- window.location.href = appSchema;
- } catch (e) {
- // 方法2: 使用iframe
- const iframe = document.createElement('iframe');
- iframe.style.display = 'none';
- iframe.style.width = '1px';
- iframe.style.height = '1px';
- iframe.src = appSchema;
- document.body.appendChild(iframe);
- // 清理iframe
- setTimeout(() => {
- if (document.body.contains(iframe)) {
- document.body.removeChild(iframe);
- }
- }, 1000);
- }
- },
- // 开始下载流程
- startDownloadProcess() {
- const that = this;
- // 显示下载提示
- uni.showLoading({
- title: this.$t('download.downloading'),
- mask: true
- });
- // 获取下载链接
- api('getAppDownload', {}, r => {
- console.log(r);
- // 检测是否为安卓设备
- const isAndroid = this.isAndroidDevice();
- if (isAndroid) {
- // 安卓设备下载APK
- that.downloadAndroidAPK(r.data.data.androidUrl);
- } else {
- // iOS设备打开App Store
- that.openAppStore(r.data.data.iosUrl);
- }
- });
- },
- // 下载安卓APK
- downloadAndroidAPK(androidUrl) {
- const that = this;
- // 在App环境中使用plus.downloader
- // #ifdef APP-PLUS
- const appDownloadTask = plus.downloader.createDownload(androidUrl, {
- filename: '_downloads/CTE.apk'
- }, function(download, status) {
- uni.hideLoading();
- if (status === 200) {
- // 下载成功,尝试安装
- that.installAndroidApp(download.filename);
- } else {
- uni.showToast({
- title: that.$t('download.download_failed'),
- icon: 'none',
- duration: 2000
- });
- }
- });
- // 监听下载进度
- appDownloadTask.addEventListener('statechanged', function(download, status) {
- if (status === 200) {
- const progress = Math.round((download.downloadedSize / download.totalSize) * 100);
- uni.showLoading({
- title: that.$t('download.downloading_progress', {
- progress: progress
- }),
- mask: true
- });
- }
- });
- appDownloadTask.start();
- // #endif
- // 在H5环境中使用uni.downloadFile
- // #ifdef H5
- const h5DownloadTask = uni.downloadFile({
- url: androidUrl,
- success: function(res) {
- uni.hideLoading();
- if (res.statusCode === 200) {
- // 下载成功,尝试安装
- that.installAndroidApp(res.tempFilePath);
- } else {
- uni.showToast({
- title: that.$t('download.download_failed'),
- icon: 'none',
- duration: 2000
- });
- }
- },
- fail: function(err) {
- uni.hideLoading();
- console.log('下载失败:', err);
- // 下载失败时,提供手动下载选项
- uni.showModal({
- title: that.$t('download.download_failed'),
- content: that.$t('download.download_failed_manual'),
- showCancel: true,
- cancelText: that.$t('comp.quxiao'),
- confirmText: that.$t('comp.queren'),
- success: function(res) {
- if (res.confirm) {
- // 使用浏览器打开下载链接
- window.open(androidUrl, '_blank');
- }
- }
- });
- }
- });
- // 监听下载进度
- h5DownloadTask.onProgressUpdate(function(res) {
- const progress = Math.round(res.progress);
- uni.showLoading({
- title: that.$t('download.downloading_progress', {
- progress: progress
- }),
- mask: true
- });
- });
- // #endif
- },
- // 打开App Store
- openAppStore(iosUrl) {
- const that = this;
- // 在App环境中使用plus.runtime.openURL
- // #ifdef APP-PLUS
- plus.runtime.openURL(
- 'itms-apps://itunes.apple.com/cn/app/cte/id6468907188',
- (res) => {
- console.log(that.$t('download.app_store_success'))
- },
- (err) => {
- console.log(that.$t('download.app_store_failed'))
- // 如果 itms-apps:// 失败,回退到浏览器打开
- plus.runtime.openURL('https://apps.apple.com/cn/app/cte/id6468907188')
- }
- );
- // #endif
- // 在H5环境中,针对iOS设备优化
- // #ifdef H5
- // 先尝试直接打开App Store链接
- const appStoreUrl = 'https://apps.apple.com/cn/app/cte/id6468907188';
- // 尝试多种方式打开App Store
- that.tryOpenAppStore(appStoreUrl);
- // #endif
- },
- // 安装安卓应用
- installAndroidApp(filePath) {
- const that = this;
- // 在App环境中,直接尝试安装APK
- // #ifdef APP-PLUS
- uni.showModal({
- title: that.$t('download.download_complete'),
- content: that.$t('download.install_confirm'),
- showCancel: true,
- cancelText: that.$t('comp.quxiao'),
- confirmText: that.$t('comp.queren'),
- success: function(res) {
- if (res.confirm) {
- // 使用plus.runtime.install安装APK
- plus.runtime.install(filePath, {
- force: false
- }, function() {
- uni.showToast({
- title: that.$t('download.install_success'),
- icon: 'success',
- duration: 2000
- });
- }, function(e) {
- console.log('安装失败:', e);
- uni.showModal({
- title: that.$t('download.install_failed'),
- content: that.$t('download.install_failed_manual'),
- showCancel: true,
- cancelText: that.$t('comp.quxiao'),
- confirmText: that.$t('comp.queren'),
- success: function(res) {
- if (res.confirm) {
- // 打开文件管理器
- plus.runtime.openFile(filePath);
- }
- }
- });
- });
- }
- }
- });
- // #endif
- // 在H5环境中,提示用户手动安装
- // #ifdef H5
- uni.showModal({
- title: that.$t('download.download_complete'),
- content: that.$t('download.manual_install_hint'),
- showCancel: false,
- confirmText: that.$t('comp.queren'),
- success: function(res) {
- if (res.confirm) {
- // 尝试打开下载链接,让用户手动下载
- window.open(filePath, '_blank');
- }
- }
- });
- // #endif
- },
- // 尝试打开App Store的多种方式
- tryOpenAppStore(appStoreUrl) {
- // 方法1: 直接使用window.open
- const newWindow = window.open(appStoreUrl, '_blank');
- // 如果新窗口被阻止,尝试其他方法
- if (!newWindow || newWindow.closed || typeof newWindow.closed == 'undefined') {
- // 方法2: 尝试使用itms-apps协议
- this.tryItmsProtocol();
- }
- },
- // 尝试使用itms-apps协议
- tryItmsProtocol() {
- const itmsUrl = 'itms-apps://itunes.apple.com/cn/app/cte/id6468907188';
- // 创建一个隐藏的iframe来尝试打开itms-apps协议
- const iframe = document.createElement('iframe');
- iframe.style.display = 'none';
- iframe.style.width = '1px';
- iframe.style.height = '1px';
- iframe.src = itmsUrl;
- document.body.appendChild(iframe);
- // 设置超时,如果App Store没有打开,则回退到浏览器
- setTimeout(() => {
- if (document.body.contains(iframe)) {
- document.body.removeChild(iframe);
- }
- // 最后回退到浏览器打开
- window.location.href = 'https://apps.apple.com/cn/app/cte/id6468907188';
- }, 1500);
- },
- //选择和领取红包卡券
- getHbkaq() {
- console.log('1212------------------')
- api('userUnclaimedList', {
- pageNum: '1',
- pageSize: '30',
- mdId: this.id
- }, res => {
- console.log('-----------', res)
- if (res.data.code == 200) {
- this.dailinghb = res.data.rows;
- }
- }, failc => {
- console.log('getadvertis----', failc)
- })
- },
- openhbkq() {
- this.hongbkqs = true;
- },
- querenyhhd() {
- this.hongbkqs = false;
- },
- getNote(obj, index) {
- var str = '';
- if (index == 1) {
- if (obj.yhfangs == 1 && obj.yhnum > 1) { //优惠方式:1 运费,2 订单 ,3 商品
- str = this.$t('hongbaokq.yunfeiyh');
- }
- if (obj.yhfangs == 1 && obj.yhnum < 1 && obj.yhnum > 0) { //优惠方式:1 运费,2 订单 ,3 商品
- str = this.$t('hongbaokq.yunfeizk');
- }
- if (obj.yhfangs == 1 && obj.yhnum == 0) { //优惠方式:1 运费,2 订单 ,3 商品
- str = this.$t('hongbaokq.yunfeiquanm');
- }
- if (obj.yhfangs == 2 && obj.yhnum > 1) {
- str = this.$t('hongbaokq.dingdanyh');
- }
- if (obj.yhfangs == 2 && obj.yhnum < 1) {
- str = this.$t('hongbaokq.dingdanzk');
- }
- if (obj.yhfangs == 3 && obj.yhnum > 1) {
- str = this.$t('hongbaokq.shangpinyh');
- }
- if (obj.yhfangs == 3 && obj.yhnum < 1) {
- str = this.$t('hongbaokq.shangpinzk');
- }
- if (obj.yhnum != 0) {
- str = str + ' ' + obj.yhnum;
- }
- }
- return str;
- },
- lingququan(id) {
- api('userQuanyireceive', {
- quanyiId: id,
- num: 1
- }, r => {
- console.log('-----------', r)
- if (r.data.code == 200) {
- this.getHbkaq();
- uni.showToast({
- title: this.$t('hongbaokq.lingqucg'),
- icon: 'none',
- duration: 2500
- })
- } else {
- uni.showToast({
- title: this.$t('hongbaokq.lingqushib'),
- icon: 'none',
- duration: 2500
- })
- }
- }, failc => {
- uni.showToast({
- title: this.$t('hongbaokq.lingqushib'),
- icon: 'none',
- duration: 2500
- })
- //console.log('getadvertis----',failc)
- })
- },
- //----------------------------------------------------
- GetTop() {
- var _this = this
- uni.getSystemInfo({
- success: (resu) => {
- //console.log('resu',JSON.stringify(resu))
- const query = uni.createSelectorQuery().in(this)
- query.selectAll('.box').boundingClientRect()
- query.selectViewport().scrollOffset()
- query.exec(function(res) {
- //console.log('res',JSON.stringify(res))
- _this.arr(res[0])
- })
- },
- fail: (res) => {}
- })
- },
- arr(res) {
- for (let i = 0; i < res.length; i++) {
- this.Topdistance[i] = res[i].top
- this.isFixedTop[i] = false
- }
- //console.log('----',JSON.stringify(this.Topdistance))
- },
- //------------------------------------------------------------------------------
- rightF(e) {
- //console.log('rightF',e)
- this.startX = e.changedTouches[0].pageX;
- this.startY = e.changedTouches[0].pageY;
- },
- leftF(e) {
- //console.log('leftF',e)
- var s, n;
- s = e.changedTouches[0].pageX;
- n = e.changedTouches[0].pageY;
- var dx, dy;
- dx = this.startX - s;
- dy = Math.abs(this.startY - n);
- if (Math.abs(dx) > 100 && Math.abs(dx) > dy) {
- if (dx > 0) {
- if (this.current < this.shangpinfenlei.length - 1) {
- this.current = this.current + 1;
- }
- } else {
- if (this.current > 0) {
- this.current = this.current - 1;
- }
- }
- }
- },
- fanhui() {
- uni.navigateBack();
- },
- shareToggle() {
- this.$refs.share.open()
- },
- chooseCancel() {
- this.showpop = false;
- this.hongbkqs = false;
- },
- fenxiang(item, index) {
- this.option = {
- //绘制海报内容
- //codeUrl: 'https://pic1.zhimg.com/80/v2-2714df42147132464a71af391ed04be4_720w.jpg', //小程序太阳码
- codeUrl: '/static/defimages/erweim.png', //小程序太阳码
- coverUrl: '/static/defimages/ddd.png', //题库图片
- headUrl: '/static/logo.png', //头像
- //bgUrl: 'https://pic3.zhimg.com/v2-8fbde0f9ac6a19a23aa839e73394618a_b.jpg', //图片背景填充,和 fillStyle 只能传一个,bgUrl 优先级高于 fillStyle
- fillStyle: '#00A6FF', //纯色背景填充颜色
- nickName: '跑腿王', //授权登录的用户名
- miniName: '不出门吃遍全世界', //小程序名称
- tkName: this.posName, //题库名称
- tkAuthor: '门店介绍', //题库作者
- tkType: '外送', //题库类型
- cost: '自取', //是否需要收费 免费/付费
- isPub: '堂食' //公开 还是 私有
- };
- this.$refs.draw.share_qrcode(this.option);
- },
- shouchang() {
- this.showDownloadAppModal();
- },
- callPhone() {
- this.showDownloadAppModal();
- },
- gengduozx() {
- this.showDownloadAppModal();
- },
- pinglunList() {
- this.showDownloadAppModal();
- },
- fenleiSel(e) {
- console.log(e);
- this.current = e.detail.current;
- this.getmendianshangpinList(this.shangpinfenlei[this.current].id);
- this.itemId = 0;
- },
- shangpinsl(id) {
- //选择商品
- this.showDownloadAppModal();
- },
- gotoGouwuche() {
- this.showDownloadAppModal();
- },
- gotojiesuan() {
- this.showDownloadAppModal();
- },
- //pop------------------------------------------
- popfenlei() {
- if (this.shangpinfenlei.length > 0) {
- this.$refs.popfl.open('center');
- }
- },
- ppfenleisel(index) {
- this.current = index;
- this.$refs.popfl.close();
- this.getmendianshangpinList(this.shangpinfenlei[this.current].id);
- this.itemId = 0;
- },
- //------------------------------------
- addcollect() {
- if (!this.login) {
- uni.navigateTo({
- url: '/pages/UserCenter/LoginView'
- })
- }
- console.log('addcollect:id', this.id);
- api('addcollect', {
- mdid: this.id
- }, res => {
- console.log(res)
- if (this.isShouchang == 0) {
- this.isShouchang = 1;
- this.shouchangIcon = '/static/images/faverr@3x.png'
- } else {
- this.isShouchang = 0;
- this.shouchangIcon = '/static/images/faver@3x.png'
- }
- }, failc => {
- //console.log('getadvertis----',failc)
- })
- },
- getmendianDetail(id) {
- //console.log('getmendianDetail:id',id);
- uni.showLoading({
- mask: true
- })
- api('getmendianDetail', {
- id: id
- }, r => {
- console.log(r.data.data);
- uni.hideLoading();
- this.mendianMs = r.data.data;
- this.userid = this.mendianMs.userId;
- this.posName = this.mendianMs.posName;
- this.isShouchang = this.mendianMs.Collect;
- if (this.isShouchang == 1) {
- this.shouchangIcon = '/static/images/faverr@3x.png'
- } else {
- this.shouchangIcon = '/static/images/faver@3x.png'
- }
- this.getmendianshangpinFL(id);
- // this.cuxiaoList();
- }, failc => {
- uni.hideLoading();
- //console.log('getadvertis----',failc)
- })
- },
- getmendianshangpinFL(id) {
- uni.showLoading({
- mask: true
- })
- api('getmendianshangpinFL', {
- id: id,
- language: this.lang
- }, res => {
- uni.hideLoading();
- this.shangpinfenlei = res.data.data;
- if (this.shangpinfenlei.length > 0) {
- this.getmendianshangpinList(this.shangpinfenlei[0].id);
- }
- }, failc => {
- uni.hideLoading();
- //console.log('getadvertis----',failc)
- })
- },
- getmendianshangpinList(id) {
- uni.showLoading({
- mask: true
- })
- console.log(this.lang)
- api('getmendianshangpinList', {
- id: id,
- language: this.lang
- }, r => {
- console.log(r);
- uni.hideLoading();
- this.dowithshangpinList(r.data.data);
- this.shangpinlist = r.data.data;
- }, failc => {
- uni.hideLoading();
- //console.log('getadvertis----',failc)
- })
- },
- dowithshangpinList(shangpinlist) {
- if (this.shangpingoumaiS.length == 0) {
- for (var i = 0; i < this.shangpinfenlei.length; i++) {
- this.shangpingoumaiS.push([]);
- }
- }
- this.shangpingoumaiS[this.current] = [];
- if (shangpinlist) {
- for (var j = 0; j < shangpinlist.length; j++) {
- var shuliang = this.tongbugouwuchexinxi(shangpinlist[j]);
- var otherPrice = this.getotherPrice(shangpinlist[j].foodSku);
- var tempSKU = this.gettempSKU(shangpinlist[j].foodSku);
- var tempsp = {
- "shangpin": shangpinlist[j],
- "sku": tempSKU,
- "otherPrice": otherPrice,
- "shuliang": shuliang
- }
- this.shangpingoumaiS[this.current].push(tempsp);
- }
- }
- },
- cuxiaoList() {
- api('cuxiaoList', {
- mdId: this.id,
- price: ''
- }, r => {
- //console.log('-----------',r)
- if (r.data.code == 200) {
- this.cuxiaoImge = [];
- var objs = r.data.data;
- for (var i = 0; i < objs.length; i++) {
- var obj = objs[i];
- if (obj.poster && obj.poster.length > 0) {
- this.cuxiaoImge.push(obj.poster);
- }
- }
- }
- }, failc => {
- //console.log('getadvertis----',failc)
- })
- },
- //--------------------------------------
- tongjigouwuche() {
- this.goumaijine = 0;
- if (this.gouwuche.mendid == this.id) {
- for (var j = 0; j < this.gouwuche.foodlist.length; j++) {
- var sp = this.gouwuche.foodlist[j];
- this.goumaijine = this.goumaijine + sp.number * (sp.price + sp.otherPrice);
- }
- }
- this.jinger();
- },
- tongbugouwuchexinxi(sp) {
- var tempshuliang = 0;
- for (var i = 0; i < this.gouwuche.foodlist.length; i++) {
- if (this.gouwuche.foodlist[i].id == sp.id) {
- tempshuliang = tempshuliang + this.gouwuche.foodlist[i].number;
- }
- }
- return tempshuliang;
- },
- refleashdata() {
- var gwc = uni.getStorageSync('gouwuche');
- if ('' == gwc || null == gwc || undefined == gwc) {
- this.gouwuche = {
- foodlist: [],
- mendid: '',
- userid: '',
- mendname: ''
- };
- this.tongjigouwuche();
- } else {
- this.gouwuche = JSON.parse(gwc);
- this.tongjigouwuche();
- }
- if (this.shangpinlist.length > 0) {
- this.dowithshangpinList(this.shangpinlist);
- }
- },
- jiangouwuche(e) {
- //跳转购物车
- this.showDownloadAppModal();
- },
- jiagouwuche(e) {
- var gwc = uni.getStorageSync('gouwuche');
- if ('' == gwc || null == gwc || undefined == gwc) {
- this.gouwuche = {
- foodlist: [],
- mendid: '',
- userid: '',
- mendname: ''
- };
- } else {
- this.gouwuche = JSON.parse(gwc);
- }
- this.dowithshangpinList(this.shangpinlist);
- this.tongjigouwuche();
- var temp = [];
- for (var i = 0; i < this.shangpinlist.length; i++) {
- temp.push(this.shangpinlist[i]);
- }
- this.shangpinlist = temp;
- this.showpop = false;
- },
- jinger() {
- if (this.goumaijine > 0) {
- this.notext = this.$formPr(this.goumaijine) + this.$t('locale.huobidw');
- console.log(this.notext);
- this.gwbcolor = 'green';
- this.gwbTcolor = 'white';
- this.gouwcheimg = '/static/images/gouwu@3x.png';
- this.showbt = true;
- }
- if (this.goumaijine == 0) {
- this.gwbcolor = 'darkgray';
- this.gwbTcolor = 'black';
- this.notext = this.$t('comp.weixgsp');
- this.gouwcheimg = '/static/images/gouwuh@3x.png';
- this.showbt = false;
- }
- },
- editSKU(index) {
- this.showDownloadAppModal();
- },
- gettempSKU(foodSku) {
- var selectsku = [];
- for (var i = 0; i < foodSku.length; i++) {
- if (foodSku[i].objects.length > 0) {
- for (var j = 0; j < foodSku[i].objects.length; j++) {
- if (foodSku[i].objects[j].state == 1) {
- selectsku.push(foodSku[i].objects[j].name);
- }
- }
- }
- }
- return selectsku;
- },
- getotherPrice(foodSku) {
- var jiner = 0;
- for (var i = 0; i < foodSku.length; i++) {
- if (foodSku[i].objects.length > 0) {
- for (var j = 0; j < foodSku[i].objects.length; j++) {
- if (foodSku[i].objects[j].state == 1) {
- jiner = jiner + parseFloat(foodSku[i].objects[j].price);
- }
- }
- }
- }
- return parseFloat(jiner);
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- page {
- background-color: #F2F3F7;
- }
- .box {
- height: 100upx;
- line-height: 100upx;
- text-align: center;
- background-color: white;
- }
- .fixedTop {
- position: fixed;
- top: 140rpx;
- left: 0;
- right: 0;
- z-index: 9999999;
- }
- .fixedTopios {
- position: fixed;
- top: 180rpx;
- left: 0;
- right: 0;
- z-index: 9999999;
- }
- //-----------------------------
- .nodetail {
- width: 94%;
- margin-left: 3%;
- margin-top: -40rpx;
- background-color: white;
- border-radius: 10rpx;
- }
- .fenleiTitle {
- padding-left: 16rpx;
- padding-right: 16rpx;
- line-height: 36rpx;
- font-size: 28rpx;
- border-radius: 20rpx;
- color: darkgray;
- background-color: white;
- border: 1rpx solid darkgray;
- }
- .swiper-item {
- flex: 1;
- flex-direction: row;
- padding-left: 30rpx;
- font-size: 28rpx;
- line-height: 60rpx;
- text-align: left;
- font-weight: bold;
- text-decoration: underline;
- }
- .textdop1 {
- width: 12rpx;
- height: 12rpx;
- background-color: #00A6FF;
- border-radius: 6rpx;
- margin-left: 10rpx;
- }
- .textdop2 {
- width: 8rpx;
- height: 8rpx;
- background-color: #00A6FF;
- border-radius: 4rpx;
- margin-left: 10rpx;
- }
- .page-view {
- background-color: #F2F3F7;
- }
- .item_list {
- padding: 0 15rpx;
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-start;
- .item_content {
- width: 50%;
- margin: 10rpx 0;
- padding: 14rpx;
- box-sizing: border-box;
- }
- }
- .thumb-boxR {
- width: 334rpx;
- background-color: white;
- }
- .goodimage {
- margin-top: 0rpx;
- }
- .detailtextV {
- width: 90%;
- height: 80rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- }
- .rconten {
- display: flex;
- flex-direction: row;
- align-items: center;
- margin-left: auto;
- justify-content: flex-end;
- }
- .actimgeCT {
- position: fixed;
- width: 94%;
- left: 3%;
- top: 100rpx;
- z-index: 9;
- }
- .actimge {
- width: 60rpx;
- height: 60rpx;
- }
- .actimgezy {
- width: 40rpx;
- height: 40rpx;
- }
- .imageRJ {
- width: 56rpx;
- height: 56rpx;
- margin-right: 8rpx;
- }
- .imageR {
- width: 56rpx;
- height: 56rpx;
- margin-right: 30rpx;
- }
- .textR {
- margin-left: 6rpx;
- margin-right: 6rpx;
- }
- .msText {
- width: 90%;
- margin-top: 20rpx;
- padding-left: 30rpx;
- text-align: left;
- font-size: 22rpx;
- line-height: 32rpx;
- }
- .buyBT {
- display: flex;
- flex-direction: row;
- justify-content: left;
- align-items: center;
- width: 100%;
- }
- .gouwuche {
- width: 120rpx;
- height: 120rpx;
- }
- .dianpuming {
- font-size: 30rpx;
- line-height: 32rpx;
- height: 32rpx;
- font-weight: bold;
- overflow: hidden;
- text-overflow: ellipsis;
- /* #ifndef APP-PLUS-NVUE */
- display: -webkit-box;
- -webkit-line-clamp: 1;
- -webkit-box-orient: vertical;
- /* #endif */
- }
- .peisongsuoming {
- font-size: 26rpx;
- line-height: 38rpx;
- height: 38rpx;
- color: dimgray;
- }
- .bottomfloatV {
- position: fixed;
- flex-direction: row;
- align-items: center;
- left: 0;
- right: 0;
- bottom: 0;
- z-index: 999;
- background-color: whitesmoke;
- height: 140rpx;
- }
- .qjs {
- border-radius: 8rpx;
- padding: 6rpx;
- margin-left: auto;
- margin-right: 30rpx;
- font-size: 32rpx;
- height: 40rpx;
- line-height: 40rpx;
- }
- .fenleiitem {
- text-align: center;
- margin-top: 12rpx;
- margin-bottom: 12rpx;
- width: 660upx;
- border-radius: 10rpx;
- color: darkblue;
- line-height: 54rpx;
- font-size: 28rpx;
- border: solid lavender;
- border-width: 0px 0px 1rpx 0px;
- }
- .hongbaoFV {
- position: fixed;
- flex-direction: row;
- align-items: center;
- left: 50rpx;
- top: 400rpx;
- z-index: 9999;
- height: 120rpx;
- width: 120rpx;
- }
- .hongbaoImage {
- height: 120rpx;
- width: 120rpx;
- }
- .withpophbkq {
- width: 80%;
- }
- /* 下载app弹窗样式 */
- .download-popup-content {
- width: 600rpx;
- background-color: white;
- border-radius: 16rpx;
- overflow: hidden;
- }
- .download-popup-header {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- padding: 40rpx 40rpx 20rpx 40rpx;
- position: relative;
- }
- .download-popup-title {
- font-size: 36rpx;
- font-weight: bold;
- color: #333;
- text-align: center;
- flex: 1;
- }
- .download-popup-close {
- position: absolute;
- right: 0;
- top: 0;
- width: 60rpx;
- height: 60rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 0 16rpx 0 8rpx;
- background-color: #ff4444;
- }
- .close-icon {
- font-size: 40rpx;
- color: white;
- line-height: 1;
- }
- .download-popup-body {
- padding: 20rpx 40rpx 40rpx 40rpx;
- text-align: center;
- }
- .download-popup-text {
- font-size: 30rpx;
- color: #666;
- line-height: 1.5;
- }
- .download-popup-buttons {
- display: flex;
- flex-direction: row;
- border-top: 1rpx solid #f0f0f0;
- }
- .download-popup-btn {
- flex: 1;
- height: 100rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- position: relative;
- }
- .download-popup-btn:not(:last-child)::after {
- content: '';
- position: absolute;
- right: 0;
- top: 0;
- bottom: 0;
- width: 1rpx;
- background-color: #f0f0f0;
- }
- .download-popup-btn-ios {
- background-color: white;
- }
- .download-popup-btn-android {
- background-color: white;
- }
- .download-popup-btn-text {
- font-size: 32rpx;
- }
- .download-popup-btn-ios .download-popup-btn-text {
- color: #666;
- }
- .download-popup-btn-android .download-popup-btn-text {
- color: #007AFF;
- font-weight: 500;
- }
- </style>
|