mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-11-02 16:00:40 +00:00
【模版目录】更新移动端源码
This commit is contained in:
parent
e67979ad7a
commit
a410e38c1a
@ -540,8 +540,8 @@ export function memberOverdueTime(data) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 新版分享海报信息获取
|
||||
*
|
||||
* 新版分享海报信息获取
|
||||
*
|
||||
*/
|
||||
export function spreadMsg() {
|
||||
return request.get('user/spread_info');
|
||||
@ -549,23 +549,23 @@ export function spreadMsg() {
|
||||
|
||||
|
||||
/**
|
||||
* 图片链接转base64
|
||||
*
|
||||
* 图片链接转base64
|
||||
*
|
||||
*/
|
||||
export function imgToBase(data) {
|
||||
return request.post('image_base64', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取小程序二维码
|
||||
*
|
||||
* 获取小程序二维码
|
||||
*
|
||||
*/
|
||||
export function routineCode(data) {
|
||||
return request.get('user/routine_code', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息中心
|
||||
* 消息中心
|
||||
*/
|
||||
export function serviceRecord(data) {
|
||||
return request.get('user/record', data);
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
@click.stop="evaluateTap(item.unique,orderId)">
|
||||
{{$t(`评价`)}}</view>
|
||||
<view class='logistics'
|
||||
v-if="paid === 1 && refund_status === 0 && item.refund_num !=item.cart_num && !is_confirm && isShow"
|
||||
v-if="paid === 1 && refund_status === 0 && item.refund_num !=item.cart_num && !is_confirm && isShow && virtualType == 0"
|
||||
@click.stop="openSubcribe(item)">
|
||||
{{$t(`申请退款`)}}</view>
|
||||
<view class="rig-btn" v-if="status_type === 2 && index === cartInfo.length - 1 || !split">
|
||||
@ -80,6 +80,10 @@
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
virtualType: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
evaluate: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
|
||||
@ -63,7 +63,7 @@
|
||||
"ios" : {
|
||||
"capabilities" : {
|
||||
"entitlements" : {
|
||||
"com.apple.developer.associated-domains" : [ "applinks:", "applinks:demo26.crmeb.net", "applinks:bzapp.crmeb.net" ]
|
||||
"com.apple.developer.associated-domains" : [ "applinks:", "applinks:", "applinks:" ]
|
||||
}
|
||||
},
|
||||
"privacyDescription" : {
|
||||
@ -85,13 +85,13 @@
|
||||
"weixin" : {
|
||||
"__platform__" : [ "ios", "android" ],
|
||||
"appid" : "",
|
||||
"UniversalLinks" : "https://bzapp.crmeb.net/uni-universallinks/__UNI__A3F1ED4/"
|
||||
"UniversalLinks" : ""
|
||||
}
|
||||
},
|
||||
"share" : {
|
||||
"weixin" : {
|
||||
"appid" : "",
|
||||
"UniversalLinks" : "https://bzapp.crmeb.net/uni-universallinks/__UNI__A3F1ED4/"
|
||||
"UniversalLinks" : ""
|
||||
}
|
||||
},
|
||||
"push" : {},
|
||||
@ -106,7 +106,7 @@
|
||||
"weixin" : {
|
||||
"appid" : "",
|
||||
"appsecret" : "",
|
||||
"UniversalLinks" : "https://bzapp.crmeb.net/uni-universallinks/__UNI__A3F1ED4/"
|
||||
"UniversalLinks" : ""
|
||||
}
|
||||
},
|
||||
"ad" : {},
|
||||
@ -167,7 +167,7 @@
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx1234567890",
|
||||
"appid" : "wx3b82801238ca1b57",
|
||||
"setting" : {
|
||||
"urlCheck" : false,
|
||||
"minified" : true,
|
||||
|
||||
@ -1,220 +1,269 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import {
|
||||
imageBase64
|
||||
} from "@/api/public";
|
||||
import {
|
||||
getProductCode
|
||||
} from "@/api/store.js";
|
||||
import i18n from '../utils/lang.js';
|
||||
let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
|
||||
export const sharePoster = {
|
||||
data() {
|
||||
return {
|
||||
//二维码参数
|
||||
codeShow: false,
|
||||
cid: '1',
|
||||
codeVal: "", // 要生成的二维码值
|
||||
size: 200, // 二维码大小
|
||||
unit: 'upx', // 单位
|
||||
background: '#FFF', // 背景色
|
||||
foreground: '#000', // 前景色
|
||||
pdground: '#000', // 角标色
|
||||
codeIcon: '', // 二维码图标
|
||||
iconsize: 40, // 二维码图标大小
|
||||
lv: 3, // 二维码容错级别 , 一般不用设置,默认就行
|
||||
onval: true, // val值变化时自动重新生成二维码
|
||||
loadMake: true, // 组件加载完成后自动生成二维码
|
||||
base64Show: 0,
|
||||
shareQrcode: 0,
|
||||
followCode: '',
|
||||
selectSku: {},
|
||||
currentPage: false,
|
||||
sysHeight: sysHeight,
|
||||
isShow: 0,
|
||||
storeImageBase64: ''
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
qrR(res) {
|
||||
// #ifdef H5
|
||||
if (!this.$wechat.isWeixin() || this.shareQrcode != '1') {
|
||||
this.PromotionCode = res;
|
||||
this.followCode = ''
|
||||
}
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
this.PromotionCode = res;
|
||||
// #endif
|
||||
},
|
||||
getImageBase64() {
|
||||
let that = this;
|
||||
imageBase64(that.storeImage, '')
|
||||
.then((res) => {
|
||||
that.storeImageBase64 = res.data.image;
|
||||
// that.PromotionCode = res.data.code;
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/**
|
||||
* 生成海报
|
||||
*/
|
||||
goPoster() {
|
||||
let that = this;
|
||||
that.posters = false;
|
||||
that.$set(that, "canvasStatus", true);
|
||||
let arr2
|
||||
// #ifdef MP
|
||||
arr2 = [that.posterbackgd, that.storeImage, that.PromotionCode];
|
||||
if (that.isDown)
|
||||
return that.$util.Tips({
|
||||
title: i18n.t(`正在下载海报,请稍后再试`),
|
||||
});
|
||||
// #endif
|
||||
// #ifdef H5 || APP-PLUS
|
||||
arr2 = [that.posterbackgd, that.storeImageBase64, that.PromotionCode];
|
||||
if (!that.storeImageBase64)
|
||||
return that.$util.Tips({
|
||||
title: i18n.t(`正在下载海报,请稍后再试`),
|
||||
});
|
||||
// #endif
|
||||
uni.getImageInfo({
|
||||
src: that.PromotionCode,
|
||||
fail: function(res) {
|
||||
// #ifdef H5
|
||||
return that.$util.Tips({
|
||||
title: res,
|
||||
});
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
return that.$util.Tips({
|
||||
title: i18n.t(`正在下载海报,请稍后再试`),
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
success() {
|
||||
if (arr2[2] == "") {
|
||||
//海报二维码不存在则从新下载
|
||||
that.downloadFilePromotionCode(function(msgPromotionCode) {
|
||||
arr2[2] = msgPromotionCode;
|
||||
if (arr2[2] == "")
|
||||
return that.$util.Tips({
|
||||
title: i18n.t(`海报二维码生成失败`),
|
||||
});
|
||||
that.$util.PosterCanvas(
|
||||
arr2,
|
||||
that.storeInfo.store_name,
|
||||
that.storeInfo.price,
|
||||
that.storeInfo.ot_price,
|
||||
function(tempFilePath) {
|
||||
that.$set(that, "posterImage", tempFilePath);
|
||||
that.$set(that, "posterImageStatus", true);
|
||||
that.$set(that, "canvasStatus", false);
|
||||
that.$set(that, "actionSheetHidden", !that
|
||||
.actionSheetHidden);
|
||||
}
|
||||
);
|
||||
});
|
||||
} else {
|
||||
//生成推广海报
|
||||
that.$nextTick(e => {
|
||||
that.$util.PosterCanvas(
|
||||
arr2,
|
||||
that.storeInfo.store_name,
|
||||
that.storeInfo.price,
|
||||
that.storeInfo.ot_price,
|
||||
function(tempFilePath) {
|
||||
that.$set(that, "posterImage", tempFilePath);
|
||||
that.$set(that, "posterImageStatus", true);
|
||||
that.$set(that, "canvasStatus", false);
|
||||
that.$set(that, "actionSheetHidden", !that
|
||||
.actionSheetHidden);
|
||||
}
|
||||
);
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
//替换安全域名
|
||||
setDomain(url) {
|
||||
url = url ? url.toString() : "";
|
||||
//本地调试打开,生产请注销
|
||||
if (url.indexOf("https://") > -1) return url;
|
||||
else return url.replace("http://", "https://");
|
||||
},
|
||||
//获取海报产品图
|
||||
downloadFilestoreImage() {
|
||||
let that = this;
|
||||
uni.downloadFile({
|
||||
url: that.setDomain(that.storeInfo.image),
|
||||
success: function(res) {
|
||||
that.storeImage = res.tempFilePath;
|
||||
that.storeImageBase64 = res.tempFilePath;
|
||||
},
|
||||
fail: function() {
|
||||
return that.$util.Tips({
|
||||
title: "",
|
||||
});
|
||||
that.storeImage = "";
|
||||
},
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取产品分销二维码
|
||||
* @param function successFn 下载完成回调
|
||||
*
|
||||
*/
|
||||
downloadFilePromotionCode(successFn) {
|
||||
let that = this;
|
||||
// #ifdef MP
|
||||
getProductCode(that.id)
|
||||
.then((res) => {
|
||||
uni.downloadFile({
|
||||
url: that.setDomain(res.data.code),
|
||||
success: function(res) {
|
||||
that.$set(that, "isDown", false);
|
||||
that.$set(that, "PromotionCode", res.tempFilePath)
|
||||
if (typeof successFn == "function")
|
||||
successFn && successFn(res.tempFilePath);
|
||||
},
|
||||
fail: function() {
|
||||
that.$set(that, "isDown", false);
|
||||
that.$set(that, "PromotionCode", "");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
that.$set(that, "isDown", false);
|
||||
that.$set(that, "PromotionCode", "");
|
||||
return that.$util.Tips({
|
||||
title: err,
|
||||
});
|
||||
});
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
uni.downloadFile({
|
||||
url: that.setDomain(that.PromotionCode),
|
||||
success: function(res) {
|
||||
that.$set(that, "isDown", false);
|
||||
if (typeof successFn == "function")
|
||||
successFn && successFn(res.tempFilePath);
|
||||
else that.$set(that, "PromotionCode", res.tempFilePath);
|
||||
},
|
||||
fail: function() {
|
||||
that.$set(that, "isDown", false);
|
||||
that.$set(that, "PromotionCode", "");
|
||||
},
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
}
|
||||
};
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import {
|
||||
imageBase64
|
||||
} from "@/api/public";ß
|
||||
import {
|
||||
getProductCode
|
||||
} from "@/api/store.js";
|
||||
import i18n from '../utils/lang.js';
|
||||
let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
|
||||
export const sharePoster = {
|
||||
data() {
|
||||
return {
|
||||
//二维码参数
|
||||
codeShow: false,
|
||||
cid: '1',
|
||||
codeVal: "", // 要生成的二维码值
|
||||
size: 200, // 二维码大小
|
||||
unit: 'upx', // 单位
|
||||
background: '#FFF', // 背景色
|
||||
foreground: '#000', // 前景色
|
||||
pdground: '#000', // 角标色
|
||||
codeIcon: '', // 二维码图标
|
||||
iconsize: 40, // 二维码图标大小
|
||||
lv: 3, // 二维码容错级别 , 一般不用设置,默认就行
|
||||
onval: true, // val值变化时自动重新生成二维码
|
||||
loadMake: true, // 组件加载完成后自动生成二维码
|
||||
base64Show: 0,
|
||||
shareQrcode: 0,
|
||||
followCode: '',
|
||||
selectSku: {},
|
||||
currentPage: false,
|
||||
sysHeight: sysHeight,
|
||||
isShow: 0,
|
||||
storeImageBase64: ''
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
qrR(res) {
|
||||
// #ifdef H5
|
||||
if (!this.$wechat.isWeixin() || this.shareQrcode != '1') {
|
||||
this.PromotionCode = res;
|
||||
this.followCode = ''
|
||||
}
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
this.PromotionCode = res;
|
||||
// #endif
|
||||
},
|
||||
getImageBase64() {
|
||||
let that = this;
|
||||
imageBase64(that.storeImage, '')
|
||||
.then((res) => {
|
||||
that.storeImageBase64 = res.data.image;
|
||||
// that.PromotionCode = res.data.code;
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
initPoster(arr2) {
|
||||
let that = this;
|
||||
uni.getImageInfo({
|
||||
src: that.PromotionCode,
|
||||
success() {
|
||||
if (arr2[2] == "") {
|
||||
//海报二维码不存在则从新下载
|
||||
that.downloadFilePromotionCode(function(
|
||||
msgPromotionCode) {
|
||||
arr2[2] = msgPromotionCode;
|
||||
if (arr2[2] == "")
|
||||
return that.$util.Tips({
|
||||
title: i18n.t(
|
||||
`海报二维码生成失败`
|
||||
),
|
||||
});
|
||||
that.$util.PosterCanvas(
|
||||
arr2,
|
||||
that.storeInfo.store_name,
|
||||
that.storeInfo.price,
|
||||
that.storeInfo.ot_price,
|
||||
function(tempFilePath) {
|
||||
that.$set(that,
|
||||
"posterImage",
|
||||
tempFilePath);
|
||||
that.$set(that,
|
||||
"posterImageStatus",
|
||||
true);
|
||||
that.$set(that,
|
||||
"canvasStatus",
|
||||
false);
|
||||
that.$set(that,
|
||||
"actionSheetHidden",
|
||||
!that
|
||||
.actionSheetHidden
|
||||
);
|
||||
}
|
||||
);
|
||||
});
|
||||
} else {
|
||||
//生成推广海报
|
||||
that.$nextTick(e => {
|
||||
that.$util.PosterCanvas(
|
||||
arr2,
|
||||
that.storeInfo.store_name,
|
||||
that.storeInfo.price,
|
||||
that.storeInfo.ot_price,
|
||||
function(tempFilePath) {
|
||||
that.$set(that,
|
||||
"posterImage",
|
||||
tempFilePath);
|
||||
that.$set(that,
|
||||
"posterImageStatus",
|
||||
true);
|
||||
that.$set(that,
|
||||
"canvasStatus",
|
||||
false);
|
||||
that.$set(that,
|
||||
"actionSheetHidden",
|
||||
!that
|
||||
.actionSheetHidden
|
||||
);
|
||||
}
|
||||
);
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
fail: function(res) {
|
||||
// #ifdef H5
|
||||
return that.$util.Tips({
|
||||
title: res,
|
||||
});
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
return that.$util.Tips({
|
||||
title: i18n.t(`正在下载海报,请稍后再试`),
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 生成海报
|
||||
*/
|
||||
async goPoster() {
|
||||
let that = this;
|
||||
that.posters = false;
|
||||
that.$set(that, "canvasStatus", true);
|
||||
let arr2
|
||||
// #ifdef MP
|
||||
getProductCode(that.id)
|
||||
.then((res) => {
|
||||
uni.downloadFile({
|
||||
url: that.setDomain(res.data.code),
|
||||
success: function(res) {
|
||||
that.$set(that, "isDown", false);
|
||||
that.$set(that, "PromotionCode", res.tempFilePath)
|
||||
if (typeof successFn == "function")
|
||||
successFn && successFn(res.tempFilePath);
|
||||
arr2 = [that.posterbackgd, that.storeImage, that.PromotionCode];
|
||||
that.initPoster(arr2)
|
||||
},
|
||||
fail: function() {
|
||||
that.$set(that, "isDown", false);
|
||||
that.$set(that, "PromotionCode", "");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
that.$set(that, "isDown", false);
|
||||
that.$set(that, "PromotionCode", "");
|
||||
return that.$util.Tips({
|
||||
title: err,
|
||||
});
|
||||
});
|
||||
// #endif
|
||||
// #ifdef H5 || APP-PLUS
|
||||
arr2 = [that.posterbackgd, that.storeImageBase64, that.PromotionCode];
|
||||
console.log(arr2)
|
||||
if (!that.storeImageBase64)
|
||||
return that.$util.Tips({
|
||||
title: i18n.t(`正在下载海报,请稍后再试`),
|
||||
});
|
||||
that.initPoster(arr2)
|
||||
// #endif
|
||||
console.log(arr2, 'arr2s')
|
||||
|
||||
|
||||
},
|
||||
//替换安全域名
|
||||
setDomain(url) {
|
||||
url = url ? url.toString() : "";
|
||||
//本地调试打开,生产请注销
|
||||
if (url.indexOf("https://") > -1) return url;
|
||||
else return url.replace("http://", "https://");
|
||||
},
|
||||
//获取海报产品图
|
||||
downloadFilestoreImage() {
|
||||
let that = this;
|
||||
uni.downloadFile({
|
||||
url: that.setDomain(that.storeInfo.image),
|
||||
success: function(res) {
|
||||
that.storeImage = res.tempFilePath;
|
||||
that.storeImageBase64 = res.tempFilePath;
|
||||
},
|
||||
fail: function() {
|
||||
return that.$util.Tips({
|
||||
title: "",
|
||||
});
|
||||
that.storeImage = "";
|
||||
},
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取产品分销二维码
|
||||
* @param function successFn 下载完成回调
|
||||
*
|
||||
*/
|
||||
downloadFilePromotionCode(successFn) {
|
||||
let that = this;
|
||||
// #ifdef MP
|
||||
getProductCode(that.id)
|
||||
.then((res) => {
|
||||
uni.downloadFile({
|
||||
url: that.setDomain(res.data.code),
|
||||
success: function(res) {
|
||||
that.$set(that, "isDown", false);
|
||||
that.$set(that, "PromotionCode", res.tempFilePath)
|
||||
if (typeof successFn == "function")
|
||||
successFn && successFn(res.tempFilePath);
|
||||
},
|
||||
fail: function() {
|
||||
that.$set(that, "isDown", false);
|
||||
that.$set(that, "PromotionCode", "");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
that.$set(that, "isDown", false);
|
||||
that.$set(that, "PromotionCode", "");
|
||||
return that.$util.Tips({
|
||||
title: err,
|
||||
});
|
||||
});
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
uni.downloadFile({
|
||||
url: that.setDomain(that.PromotionCode),
|
||||
success: function(res) {
|
||||
that.$set(that, "isDown", false);
|
||||
if (typeof successFn == "function")
|
||||
successFn && successFn(res.tempFilePath);
|
||||
else that.$set(that, "PromotionCode", res.tempFilePath);
|
||||
},
|
||||
fail: function() {
|
||||
that.$set(that, "isDown", false);
|
||||
that.$set(that, "PromotionCode", "");
|
||||
},
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
@ -152,7 +152,7 @@
|
||||
</orderGoods>
|
||||
<orderGoods :evaluate='evaluate' :deliveryType="orderInfo.shipping_type" :statusType="status.type"
|
||||
:sendType="orderInfo.delivery_type" :orderId="order_id" :oid="orderInfo.id" :cartInfo="cartInfo"
|
||||
:pid="pid" :jump="true" :refund_status="orderInfo.refund_status" :paid="orderInfo.paid"
|
||||
:pid="pid" :jump="true" :refund_status="orderInfo.refund_status" :paid="orderInfo.paid" :virtualType="orderInfo.virtual_type"
|
||||
@openSubcribe="openSubcribe">
|
||||
</orderGoods>
|
||||
<!-- #ifdef H5 || APP-PLUS -->
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -20,7 +20,7 @@
|
||||
hover-class='none'>
|
||||
<view class="img-box">
|
||||
<image :src="item.image" mode="aspectFill"></image>
|
||||
<view v-if="discountShow" class="msg flex-aj-center" :style="'color:'+ themeColor +';border-color:'+ themeColor +';'">{{item.discountNum}}{{$t(`off`)}}</view>
|
||||
<view v-if="discountShow" class="msg flex-aj-center" :style="'color:'+ themeColor +';border-color:'+ themeColor +';'">{{item.discountNum}}{{$t(`折`)}}</view>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view v-if="titleShow" class="name line1">{{item.title}}</view>
|
||||
|
||||
@ -1,235 +1,247 @@
|
||||
<template>
|
||||
<view class="swiperBg skeleton-rect" :style="'margin-top:' + marginTop*2 +'rpx;'" v-show="!isSortType">
|
||||
<block v-if="imgUrls.length">
|
||||
<view class="colorBg" :style="'background: linear-gradient(90deg, '+ bgColor[0].item +' 50%, '+ bgColor[1].item +' 100%);'"
|
||||
v-if="isColor"></view>
|
||||
<view class="swiper" :class="[imgConfig?'':'fillet']" :style="'padding: 0 '+ paddinglr +'rpx;'">
|
||||
<swiper :style="'height:'+ imageH +'rpx;'" :autoplay="true" :circular="circular"
|
||||
:interval="interval" :duration="duration" indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff"
|
||||
@change='bannerfun'>
|
||||
<block v-for="(item,index) in imgUrls" :key="index">
|
||||
<swiper-item>
|
||||
<view @click="goDetail(item)" class='slide-navigator acea-row row-between-wrapper'>
|
||||
<image :src="item.img" mode="aspectFill" class="slide-image aa" :style="'height:'+ imageH +'rpx;'">
|
||||
</image>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
<view v-if="docConfig==0" class="dot acea-row" :style="{paddingLeft: paddinglr+20 + 'rpx',paddingRight: paddinglr+20 + 'rpx',justifyContent: (txtStyle==1?'center':txtStyle==2?'flex-end':'flex-start')}">
|
||||
<view class="dot-item" :style="active==index?'background:'+ dotColor:''" v-for="(item,index) in imgUrls"></view>
|
||||
</view>
|
||||
<view v-if="docConfig==1" class="dot acea-row" :style="{paddingLeft: paddinglr+20 + 'rpx',paddingRight: paddinglr+20 + 'rpx',justifyContent: (txtStyle==1?'center':txtStyle==2?'flex-end':'flex-start')}">
|
||||
<view class="dot-item line_dot-item" :style="active==index?'background:'+ dotColor:''" v-for="(item,index) in imgUrls"></view>
|
||||
</view>
|
||||
<view v-if="docConfig==2" class="dot acea-row" :style="{paddingLeft: paddinglr+20 + 'rpx',paddingRight: paddinglr+20 + 'rpx',justifyContent: (txtStyle==1?'center':txtStyle==2?'flex-end':'flex-start')}">
|
||||
<view class="instruct">{{current}}/{{imgUrls.length}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'swiperBg',
|
||||
props: {
|
||||
dataConfig: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
isSortType: {
|
||||
type: String | Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
circular: true,
|
||||
autoplay: true,
|
||||
interval: 3000,
|
||||
duration: 500,
|
||||
imgUrls: [], //图片轮播数据
|
||||
bgColor: this.dataConfig.bgColor.color, //轮播背景颜色
|
||||
marginTop: this.dataConfig.mbConfig.val, //组件上边距
|
||||
paddinglr: (this.dataConfig.lrConfig.val)*2, //轮播左右边距
|
||||
docConfig: this.dataConfig.docConfig.type, //指示点样式
|
||||
imgConfig: this.dataConfig.imgConfig.type, //是否为圆角
|
||||
imageH: 280,
|
||||
isColor: this.dataConfig.isShow.val,
|
||||
txtStyle: this.dataConfig.txtStyle.type,
|
||||
dotColor: this.dataConfig.dotColor.color[0].item,
|
||||
current: 1,//数字指示器当前
|
||||
active:0//一般指示器当前
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
imageH(nVal, oVal) {
|
||||
let self = this
|
||||
this.imageH = nVal
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.imgUrls = this.dataConfig.swiperConfig.list
|
||||
},
|
||||
mounted() {
|
||||
if(this.imgUrls.length){
|
||||
let that = this;
|
||||
this.$nextTick((e) => {
|
||||
uni.getImageInfo({
|
||||
src: that.setDomain(that.imgUrls[0].img),
|
||||
success: (res) => {
|
||||
if (res && res.height > 0) {
|
||||
// that.$set(that, 'imageH',
|
||||
// res.height / res
|
||||
// .width * 750)
|
||||
let height = res.height * ((750-this.paddinglr*2) / res.width)
|
||||
that.$set(that, 'imageH', height);
|
||||
} else {
|
||||
that.$set(that, 'imageH', 375);
|
||||
}
|
||||
},
|
||||
fail: function(error) {
|
||||
that.$set(that, 'imageH', 375);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
bannerfun(e) {
|
||||
this.active = e.detail.current;
|
||||
this.current = e.detail.current + 1;
|
||||
},
|
||||
//替换安全域名
|
||||
setDomain: function(url) {
|
||||
url = url ? url.toString() : '';
|
||||
//本地调试打开,生产请注销
|
||||
if (url.indexOf("https://") > -1) return url;
|
||||
else return url.replace('http://', 'https://');
|
||||
},
|
||||
goDetail(url) {
|
||||
let urls = url.info[1].value
|
||||
if (urls.indexOf("http") != -1) {
|
||||
// #ifdef H5
|
||||
location.href = urls
|
||||
// #endif
|
||||
// #ifdef MP || APP-PLUS
|
||||
uni.navigateTo({
|
||||
url: `/pages/annex/web_view/index?url=${urls}`
|
||||
});
|
||||
// #endif
|
||||
} else {
|
||||
if (['/pages/goods_cate/goods_cate', '/pages/order_addcart/order_addcart', '/pages/user/index']
|
||||
.indexOf(urls) == -1) {
|
||||
uni.navigateTo({
|
||||
url: urls
|
||||
})
|
||||
} else {
|
||||
uni.reLaunch({
|
||||
url: urls
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.swiperBg {
|
||||
position: relative;
|
||||
// #ifdef APP-PLUS
|
||||
// padding-top: 100rpx;
|
||||
|
||||
// #endif
|
||||
.colorBg {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 130rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.swiper {
|
||||
z-index: 20;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
.dot{
|
||||
position: absolute;
|
||||
left:0;
|
||||
bottom: 20rpx;
|
||||
width: 100%;
|
||||
.instruct {
|
||||
width: 50rpx;
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
background-color: rgba(0,0,0,0.8);
|
||||
color: #fff;
|
||||
border-radius: 16rpx;
|
||||
font-size: 24rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.dot-item{
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
background: rgba(0, 0, 0, .4);
|
||||
border-radius: 50%;
|
||||
margin: 0 4px;
|
||||
&.line_dot-item{
|
||||
width: 20rpx;
|
||||
height: 5rpx;
|
||||
border-radius: 3rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* 设置圆角 */
|
||||
&.fillet {
|
||||
border-radius: 10rpx;
|
||||
|
||||
image {
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
swiper,
|
||||
.swiper-item,
|
||||
image {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
// 圆形指示点
|
||||
&.circular {
|
||||
/deep/.uni-swiper-dot {
|
||||
width: 10rpx !important;
|
||||
height: 10rpx !important;
|
||||
background: rgba(0, 0, 0, .4) !important
|
||||
}
|
||||
|
||||
/deep/.uni-swiper-dot-active {
|
||||
background: #fff !important
|
||||
}
|
||||
}
|
||||
|
||||
// 方形指示点
|
||||
&.square {
|
||||
/deep/.uni-swiper-dot {
|
||||
width: 20rpx !important;
|
||||
height: 5rpx !important;
|
||||
border-radius: 3rpx;
|
||||
background: rgba(0, 0, 0, .4) !important
|
||||
}
|
||||
|
||||
/deep/.uni-swiper-dot-active {
|
||||
background: #fff !important
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-img image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
<template>
|
||||
<view class="swiperBg skeleton-rect" :style="'margin-top:' + marginTop*2 +'rpx;'" v-show="!isSortType">
|
||||
<block v-if="imgUrls.length">
|
||||
<view class="colorBg"
|
||||
:style="'background: linear-gradient(90deg, '+ bgColor[0].item +' 50%, '+ bgColor[1].item +' 100%);'"
|
||||
v-if="isColor"></view>
|
||||
<view class="swiper" :class="[imgConfig?'':'fillet']" :style="'padding: 0 '+ paddinglr +'rpx;'">
|
||||
<swiper :style="'height:'+ imageH +'rpx;'" :autoplay="true" :circular="circular" :interval="interval"
|
||||
:duration="duration" indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff"
|
||||
@change='bannerfun'>
|
||||
<block v-for="(item,index) in imgUrls" :key="index">
|
||||
<swiper-item>
|
||||
<view @click="goDetail(item)" class='slide-navigator acea-row row-between-wrapper'>
|
||||
<image :src="item.img" mode="aspectFill" class="slide-image aa"
|
||||
:style="'height:'+ imageH +'rpx;'">
|
||||
</image>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
<view v-if="docConfig==0" class="dot acea-row"
|
||||
:style="{paddingLeft: paddinglr+20 + 'rpx',paddingRight: paddinglr+20 + 'rpx',justifyContent: (txtStyle==1?'center':txtStyle==2?'flex-end':'flex-start')}">
|
||||
<view class="dot-item" :style="active==index?'background:'+ dotColor:''"
|
||||
v-for="(item,index) in imgUrls"></view>
|
||||
</view>
|
||||
<view v-if="docConfig==1" class="dot acea-row"
|
||||
:style="{paddingLeft: paddinglr+20 + 'rpx',paddingRight: paddinglr+20 + 'rpx',justifyContent: (txtStyle==1?'center':txtStyle==2?'flex-end':'flex-start')}">
|
||||
<view class="dot-item line_dot-item" :style="active==index?'background:'+ dotColor:''"
|
||||
v-for="(item,index) in imgUrls"></view>
|
||||
</view>
|
||||
<view v-if="docConfig==2" class="dot acea-row"
|
||||
:style="{paddingLeft: paddinglr+20 + 'rpx',paddingRight: paddinglr+20 + 'rpx',justifyContent: (txtStyle==1?'center':txtStyle==2?'flex-end':'flex-start')}">
|
||||
<view class="instruct">{{current}}/{{imgUrls.length}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'swiperBg',
|
||||
props: {
|
||||
dataConfig: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
isSortType: {
|
||||
type: String | Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
circular: true,
|
||||
autoplay: true,
|
||||
interval: 3000,
|
||||
duration: 500,
|
||||
imgUrls: [], //图片轮播数据
|
||||
bgColor: this.dataConfig.bgColor.color, //轮播背景颜色
|
||||
marginTop: this.dataConfig.mbConfig.val, //组件上边距
|
||||
paddinglr: (this.dataConfig.lrConfig.val) * 2, //轮播左右边距
|
||||
docConfig: this.dataConfig.docConfig.type, //指示点样式
|
||||
imgConfig: this.dataConfig.imgConfig.type, //是否为圆角
|
||||
imageH: 280,
|
||||
isColor: this.dataConfig.isShow.val,
|
||||
txtStyle: this.dataConfig.txtStyle.type,
|
||||
dotColor: this.dataConfig.dotColor.color[0].item,
|
||||
current: 1, //数字指示器当前
|
||||
active: 0 //一般指示器当前
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
imageH(nVal, oVal) {
|
||||
let self = this
|
||||
this.imageH = nVal
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.imgUrls = this.dataConfig.swiperConfig.list
|
||||
},
|
||||
mounted() {
|
||||
if (this.imgUrls.length) {
|
||||
let that = this;
|
||||
this.$nextTick((e) => {
|
||||
uni.getImageInfo({
|
||||
src: that.setDomain(that.imgUrls[0].img),
|
||||
success: (res) => {
|
||||
if (res && res.height > 0) {
|
||||
// that.$set(that, 'imageH',
|
||||
// res.height / res
|
||||
// .width * 750)
|
||||
let height = res.height * ((750 - this.paddinglr * 2) / res.width)
|
||||
that.$set(that, 'imageH', height);
|
||||
} else {
|
||||
that.$set(that, 'imageH', 375);
|
||||
}
|
||||
},
|
||||
fail: function(error) {
|
||||
that.$set(that, 'imageH', 375);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
bannerfun(e) {
|
||||
this.active = e.detail.current;
|
||||
this.current = e.detail.current + 1;
|
||||
},
|
||||
//替换安全域名
|
||||
setDomain: function(url) {
|
||||
url = url ? url.toString() : '';
|
||||
//本地调试打开,生产请注销
|
||||
if (url.indexOf("https://") > -1) return url;
|
||||
else return url.replace('http://', 'https://');
|
||||
},
|
||||
goDetail(url) {
|
||||
let urls = url.info[1].value
|
||||
if (urls.indexOf("http") != -1) {
|
||||
// #ifdef H5
|
||||
location.href = urls
|
||||
// #endif
|
||||
// #ifdef MP || APP-PLUS
|
||||
uni.navigateTo({
|
||||
url: `/pages/annex/web_view/index?url=${urls}`
|
||||
});
|
||||
// #endif
|
||||
} else {
|
||||
if (['/pages/goods_cate/goods_cate', '/pages/order_addcart/order_addcart', '/pages/user/index']
|
||||
.indexOf(urls) == -1) {
|
||||
uni.navigateTo({
|
||||
url: urls
|
||||
})
|
||||
} else {
|
||||
uni.reLaunch({
|
||||
url: urls
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.swiperBg {
|
||||
position: relative;
|
||||
// #ifdef APP-PLUS
|
||||
// padding-top: 100rpx;
|
||||
|
||||
// #endif
|
||||
.colorBg {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 130rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.swiper {
|
||||
z-index: 20;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.dot {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 20rpx;
|
||||
width: 100%;
|
||||
|
||||
.instruct {
|
||||
width: 50rpx;
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
background-color: #bfc1c4;
|
||||
color: #fff;
|
||||
border-radius: 16rpx;
|
||||
font-size: 24rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dot-item {
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
background: rgba(0, 0, 0, .4);
|
||||
border-radius: 50%;
|
||||
margin: 0 4px;
|
||||
|
||||
&.line_dot-item {
|
||||
width: 20rpx;
|
||||
height: 5rpx;
|
||||
border-radius: 3rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 设置圆角 */
|
||||
&.fillet {
|
||||
border-radius: 10rpx;
|
||||
|
||||
image {
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
swiper,
|
||||
.swiper-item,
|
||||
image {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
// 圆形指示点
|
||||
&.circular {
|
||||
/deep/.uni-swiper-dot {
|
||||
width: 10rpx !important;
|
||||
height: 10rpx !important;
|
||||
background: rgba(0, 0, 0, .4) !important
|
||||
}
|
||||
|
||||
/deep/.uni-swiper-dot-active {
|
||||
background: #fff !important
|
||||
}
|
||||
}
|
||||
|
||||
// 方形指示点
|
||||
&.square {
|
||||
/deep/.uni-swiper-dot {
|
||||
width: 20rpx !important;
|
||||
height: 5rpx !important;
|
||||
border-radius: 3rpx;
|
||||
background: rgba(0, 0, 0, .4) !important
|
||||
}
|
||||
|
||||
/deep/.uni-swiper-dot-active {
|
||||
background: #fff !important
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-img image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -142,7 +142,9 @@
|
||||
<couponWindow :window="isCouponShow" @onColse="couponClose" :couponImage="couponObj.image"
|
||||
:couponList="couponObj.list"></couponWindow>
|
||||
<view class="uni-p-b-98" v-if="footerStatus"></view>
|
||||
<!-- #ifndef MP -->
|
||||
<view v-if="site_config" class="site-config" @click="goICP">{{ site_config }}</view>
|
||||
<!-- #endif -->
|
||||
<!-- <pageFooter v-if="footerStatus"></pageFooter> -->
|
||||
<view class="foot" v-if="newData.status && newData.status.status">
|
||||
<view class="page-footer" id="target" :style="{'background-color':newData.bgColor.color[0].item}">
|
||||
|
||||
@ -611,7 +611,7 @@
|
||||
res.data.routine_my_menus.forEach((el, index, arr) => {
|
||||
if (el.url == '/pages/admin/order/index' || el.url ==
|
||||
'/pages/admin/order_cancellation/index' || el.name ==
|
||||
this.$t(`客服接待`)) {
|
||||
'客服接待') {
|
||||
storeMenu.push(el)
|
||||
} else {
|
||||
myMenu.push(el)
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
<view class="conter">{{orderInfo.invoice.remark}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<orderGoods :evaluate='evaluate' :orderId="order_id" :cartInfo="cartInfo" :jump="true" :paid="orderInfo.paid" :oid="orderInfo.id" :isShow="false"></orderGoods>
|
||||
<orderGoods :evaluate='evaluate' :orderId="order_id" :cartInfo="cartInfo" :jump="true" :paid="orderInfo.paid" :oid="orderInfo.id" :isShow="false" :statusType="status.type"></orderGoods>
|
||||
<view class='wrapper'>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>{{$t(`订单编号`)}}:</view>
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
<view class="right-section">
|
||||
<view class="section-hd acea-row row-between-wrapper">
|
||||
<view>{{$t(`我的成长特权`)}}</view>
|
||||
<navigator v-if="is_open_member" class="svip" url="/pages/annex/vip_paid/index">{{$t(`upgrading_svip`)}}</navigator>
|
||||
<navigator v-if="is_open_member" class="svip" url="/pages/annex/vip_paid/index">{{$t(`立即升级`)}}</navigator>
|
||||
</view>
|
||||
<view class="section-bd acea-row">
|
||||
<view class="item">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user