Commit 7d5f6008 by 匡雅琴

Merge branch 'v1.0.0' of http://192.168.3.233:8090/saas/mini-program/zhwy into v1.0.0

2 parents b62c2797 37dba5ff
......@@ -67,7 +67,8 @@
"root": "packageMall",
"pages": [
"pages/shoppingCart/shoppingCart",
"pages/pay/pay"
"pages/pay/pay",
"pages/detail/detail"
]
},
{
......@@ -104,6 +105,26 @@
]
},
{
"root": "packagePlugin",
"pages": [
"pages/index/index"
],
"plugins": {
"ticketPlugin": {
"version": "2.0.2",
"provider": "wxd5b8312c3a09901a"
},
"express-plugin": {
"version": "1.2.0",
"provider": "wx1b1f66316b427c74"
},
"collectionPlugin": {
"version": "1.2.0",
"provider": "wx5e90fdd843841356"
}
}
},
{
"root": "packageStrategy",
"pages": [
"pages/strategyDetail/index"
......
const navStyle = 'background-color: transparent;'
let navBarHeight = 38
import NP from 'number-precision'
import USERAPI from '~/api/usersApi/index'
Page({
/**
* 页面的初始数据
*/
data: {
navStyle,
bannerIndex: 0,
contactInfo: {},
couponData: [],
only: false,
isLoading: true,
// enter_time:new Date().format('yyyy-MM-dd hh:mm:ss')
},
/**格式化价格 */
formatMyPrice(price) {
if (price != null) {
price = wx.p.format.centsToyuan(price)
if (price >= 10000) {
price = Number(price / 10000).toFixed(2)
}
price = Number(price).toFixed(2)
}
return price
},
/**添加埋点开始 */
/**
* 商品-活动id,
* 物品类型item_type 1 商品 3活动,
* view 动作类型 1浏览 4分享 5离开页面 6心跳
* */
async addTrack(query) {
const {
id,
item_type,
view
} = query
const userInfo = wx.$util.getUserInfo() || {},
{
openId
} = await USERAPI.getWXUserInfo()
let data = {
open_id: openId || null,
create_time: this.firstEnter ? this.data.enter_time : new Date().format('yyyy-MM-dd hh:mm:ss'), // 离开时间
enter_time: this.data.enter_time, // 进入时间
item_type,
customer_phone: userInfo.phone || null,
action_type: view,
staff_uuid: wx.$storage.get('scrm_shopmall_staff_uuid'),
item_id: id,
business_type: 1,
add_way: 104,
merchant_id: wx.$storage.get('srcm_shopmall_merchant_id'),
guest_no: wx.$Track.getGuestNo(), //游客ID,
user_open_id:this.shareOpenId || ''
}
this.firstEnter = false
const jsonList = [JSON.stringify(data)]
const res = await wx.p.api.shopmallApi.trackHttp({
jsonList
})
},
heartbeatFn(query) {
this.trackQuery = query
this.addTrack(query)
this.timer = setInterval(() => {
this.trackQuery.view = 6
this.addTrack(this.trackQuery)
}, 60 * 1e3)
},
appHide() {
wx.offAppHide()
wx.onAppHide(() => {
if (this.timer) clearInterval(this.timer)
this.trackQuery.view = 5
this.addTrack(this.trackQuery)
})
},
/**添加埋点结束 */
save() {
let {
posterUrl
} = this.data
wx.getImageInfo({
src: posterUrl
})
.then(res => {
wx.saveImageToPhotosAlbum({
filePath: res.path,
success() {
wx.$api.showToast('保存成功')
},
fail(err) {
if (err.errMsg === 'saveImageToPhotosAlbum:fail auth deny') {
wx.showModal({
title: '提示',
content: '需要您授权保存相册',
showCancel: false,
success() {
wx.openSetting({
success(settingdata) {
if (settingdata.authSetting['scope.writePhotosAlbum']) {
wx.showModal({
title: '提示',
content: '获取权限成功,再次保存图片即可成功',
showCancel: false
})
} else {
wx.showModal({
title: '提示',
content: '获取权限失败,无法保存到相册',
showCancel: false
})
}
}
})
}
})
}
}
})
})
.catch(() => {
wx.hideLoading()
wx.$api.showToast('图片保存失败,请重试')
})
},
previewImage(e) {
let {
current,
item
} = e.currentTarget.dataset
let urls = []
item.map(i => {
if (i.resType == 1) urls.push(i.content)
})
wx.$api.previewImage({
current,
urls
})
},
previewCommentImage(e) {
let {
current,
item
} = e.currentTarget.dataset
let urls = []
item.map(i => {
urls.push(i)
})
wx.$api.previewImage({
current,
urls
})
},
jump(e) {
let {
url,
isChooseAddress
} = e.currentTarget.dataset
wx.$router.go(url, {
isChooseAddress
})
},
navbarReady(e) {
navBarHeight = e.detail.height
},
onPageScroll(e) {
this.setData({
navStyle: e.scrollTop >= navBarHeight ? '' : navStyle
})
},
goodsActionReady(e) {
this.setData({
padding_bottom: e.detail
})
},
showSkuFun() {
this.setData({
showSku: true
})
},
showCouponFun() {
this.setData({
showCoupon: !this.data.showCoupon
})
},
goodsActionClick(e) {
let type = e.detail
let {
activeSku,
isActivity,
goodsInfo: {
activityStatus,
goodsStock,
buyFlag
}
} = this.data
if (activeSku) {
this.showSkuFun()
return
}
if (isActivity && activityStatus != 2) return
if (goodsStock == 0) return
if (buyFlag == 2) return
if (type == 'pay') {
this.pay()
} else {
this.join()
}
},
pay(e) {
let {
isActivity,
isLive,
contactInfo,
goodsInfo,
activeSku,
isDefault,
upgrade,
isCarOwner
} = this.data
let stock
if (wx.$authStatus) {
const {
hasCouponFlag
} = this.options
if ((upgrade || isCarOwner) && hasCouponFlag) {
wx.$router.go(`/packageShopmall/packageMall/pages/getCoupon/getCoupon?discoverGoodsType=${upgrade? 1: 2}&from=${upgrade? 1: 2}`, {
notIntercept: true
});
} else {
wx.navigateTo({
url: '/pages/Login/Login'
})
}
return
}
let params = {
orderSource: 1
}
let orderGoodsList = {}
let goodsList = {}
if (e && e.detail) {
orderGoodsList = e.detail
goodsList = e.detail
stock = e.detail.stock
} else {
orderGoodsList = {
goodsNumber: 1,
goodsId: goodsInfo.id
}
goodsList = {
goodsNumber: 1
}
}
if (isLive) {
params.orderSource = 2
params.roomId = ''
}
goodsList = {
...goodsList,
merchantName: goodsInfo.merchantName,
goodsImage: goodsInfo.goodsImage,
goodsName: goodsInfo.goodsName,
retailPrice: goodsInfo.retailPrice,
unit: goodsInfo.unit,
retainagePrice: wx.p.format.centsToyuan(goodsInfo.retainagePrice),
depositPrice: goodsInfo.depositPrice,
stock: goodsInfo.goodsStock,
id: goodsInfo.id,
activityPrice: goodsInfo.activityPrice,
paymentType: goodsInfo.paymentType,
merchantId: goodsInfo.merchantId
}
if (activeSku) {
let list = isActivity ? goodsInfo.specificationExtraList : goodsInfo.specificationDetailList
list.map(e => {
if (e.specificationData == activeSku) {
goodsList.retailPrice = wx.p.format.centsToyuan(e.retailPrice)
stock ? (goodsList.stock = stock) : (goodsList.stock = e.stock)
}
})
goodsList.specificationData = activeSku
}
if (isActivity) {
params.orderSource = 3
params.activityId = goodsInfo.id
orderGoodsList.goodsId = goodsInfo.goodsId
orderGoodsList.activityPrice = NP.times(goodsInfo.retailPrice, 100)
// goodsList.goodsImage = goodsInfo.activityImg
// goodsList.goodsName = goodsInfo.activityName
;
(goodsList.goodsId = goodsInfo.goodsId), (goodsList.stock = goodsInfo.goodsStock), (goodsList.id = goodsInfo.id)
}
params.orderGoodsList = [orderGoodsList]
goodsList.expressFee = goodsInfo.expressFee
if (!contactInfo.contactAddress && goodsInfo.deliveryType != 1) {
wx.$api.showToast('请填写收货地址')
return
}
if (upgrade || isCarOwner) {
if (isCarOwner) {
goodsList.goodsId = goodsList.id
}
console.log(this.data.goodsInfo, 'goodsInfo')
wx.$router.go('/packageDiscovery/pages/pay/index', {
goodsList: upgrade ? goodsList : [goodsList] ,
deliveryType: upgrade ? 1 : 0,
showAddr: (isCarOwner && this.data.goodsInfo.deliveryType == 1) ? 0 : 1,
// deliveryType: upgrade || (isCarOwner && this.data.goodsInfo.deliveryType == 1) ? 1 : 0,
buyType: 'pay',
discoverGoodsSource:goodsInfo.discoverGoodsSource
})
return
}
wx.$router.go('/packageShopmall/packageMall/pages/pay/pay', {
isPay: true,
isActivity,
contactInfo,
goodsList,
isDefault,
params,
goodsInfo
})
},
join(e) {
if (this.data.upgrade) return
if (wx.$authStatus) {
wx.navigateTo({
url: '/pages/Login/Login'
})
return
}
let params = e && e.detail
if (!params) {
params = {
goodsId: this.data.goodsInfo.id,
goodsNumber: 1
}
}
if (this.isCarOwner) {
params.cartType = 4
}
wx.p.api.shopmallApi.addShoppingcart(params).then(data => {
wx.$api.showToast('添加成功!在购物车等亲~')
wx.$Track.setTrack({
...data
},
7
)
})
},
back() {
wx.$router.back()
},
changeBanner(e) {
this.setData({
bannerIndex: e.detail.current
})
},
//查看全部评价
openEvaluation() {
wx.$router.go('/packageShopmall/packageMall/pages/comment/comment', {
...this.data
})
},
//获取第一个评论
getCommentList() {
let total = 0
let commentlist
let obj = {
currentPage: 1,
pageSize: 10,
goodsId: this.data.id
}
wx.p.api.shopmallApi.getCommentList(obj).then(res => {
if (res.code == '0') {
total = res.data.total
commentlist = res.data.list
commentlist.forEach(item => {
item.createdDate = wx.p.format.commentTime(item.createdDate)
})
this.setData({
commentlist: commentlist,
total
})
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onRoute: function (options) {
if(options&&options.openId){
this.shareOpenId = options.openId
}
this.data.enter_time = new Date().format('yyyy-MM-dd hh:mm:ss')
this.firstEnter = true
if (this.data.id) {
this.getGoodsDetail(this.data.id)
this.heartbeatFn({
id: this.data.id,
item_type: 1,
view: 1
})
} else if (options && options.scene) {
//获取扫码的id
// sceneId=144
this.getLiveActivityId(decodeURIComponent(options.scene))
} else {
/**扫码、分享、直播间 */
if (options && options.id) {
this.setData({
...options
})
this.getCommentList()
this.getGoodsDetail(options.id)
this.getGoodscouponList(options.id)
this.heartbeatFn({
id: options.id,
item_type: options.isActivity ? 3 : 1,
view: 1
})
} else {
wx.$router.getData(({
id,
isActivity = true
}) => {
this.setData({
isActivity,
id
})
this.getGoodsDetail(id)
this.getCommentList()
console.log(id);
this.heartbeatFn({
id,
item_type: isActivity ? 3 : 1,
view: 1
})
if (!isActivity) this.getGoodscouponList(id)
})
}
}
// 推荐人+推荐人埋点
if (options.shareStaffUuid) {
let shareStaff = {
shareStaffUuid: options.shareStaffUuid,
shareStaffName: options.shareStaffName
}
options.item_type = options.isActivity ? 3 : 1
options.action_type = 1
options.item_id = options.id
wx.$util.reportData(options, false, false, true)
wx.$storage.set('shareStaff', JSON.stringify(shareStaff))
wx.$storage.set('shareStaffTracker', JSON.stringify(options))
}
// 埋点
if (options.activity_id) {
this.data.options = options
wx.$storage.set('miaoshatrack', encodeURIComponent(JSON.stringify(options)))
wx.$util.reportData(options, true, false)
}
// 配置升级
if (options && options.isUpgrade) {
this.isUpgrade = options.isUpgrade
}
// 车主优选
if (options && options.isCarOwner) {
this.isCarOwner = options.isCarOwner
}
this.appHide()
},
getLiveActivityId(str) {
wx.p.api.shopmallApi
.getLiveActivityId({
id: str.split('=')[1]
})
.then(({
code,
data
}) => {
if (code == 0) {
let op = {}
data.scene.split('&').map(item => {
const [key, val] = item.split('=')
op[key] = val
})
if (op.merchantId) wx.$storage.set('srcm_shopmall_merchant_id', op.merchantId)
if (op.isActivity) {
this.setData({
isActivity: true
})
}
this.heartbeatFn({
id: op.id,
item_type: op.isActivity == 'true' ? 3 : 1,
view: 1
})
if (op.isUpgrade == 'true') {
this.isUpgrade = true
}
if (op.isCarOwner == 'true') {
this.isCarOwner = true
}
this.getGoodsDetail(op.id)
}
})
},
//分享海报
sharePoster(e) {
let posterUrl = ''
let {
isActivity,
id
} = this.data
let target = isActivity ? 'getActivitylink' : 'getGoodslink'
wx.$api.showLoading('加载中...')
wx.p.api.shopmallApi[target](id).then(res => {
if (res.code == '0') {
posterUrl = res.data.posterUrl
this.setData({
posterUrl: posterUrl
})
wx.hideLoading()
}
})
},
hidden() {
this.setData({
posterUrl: ''
})
},
getGoodsDetail(id) {
let {
isActivity,
isLive
} = this.data
let target = isActivity ? 'getActivityDetail' : 'getGoodsDetail'
wx.$api.showLoading('加载中...')
if (isLive) {
wx.p.api.shopmallApi
.getLiveActivityDetail({
liveGoodsId: id,
roomId: 1
})
.then(({
code,
data,
message
}) => {})
} else {
wx.p.api.shopmallApi[target](id).then(({
code,
data,
message
}) => {
if (code == '0') {
let trackobj = isActivity ?
{
...data,
activityId: data.id
} :
{
...data,
goodsId: data.id
}
wx.$Track.setTrack(trackobj, 6)
let activeSku = null
if (data.expressFee != null) data.expressFee = wx.p.format.centsToyuan(data.expressFee)
if (isActivity) {
if (data.specificationExtraList && data.specificationExtraList.length) {
activeSku = data.specificationExtraList[0].specificationData
data.skuPrice = wx.p.format.centsToyuan(data.specificationExtraList[0].retailPrice)
}
if (data.priceReduce != null) {
data.priceReduce = wx.p.format.centsToyuan(data.priceReduce)
let minus = data.priceReduce < 0 ? '-' : ''
if (Math.abs(data.priceReduce) >= 10000) {
let [one, two] = `${Math.abs(data.priceReduce) / 10000}`.split('.')
two = two ? two.substring(0, 2) : '00'
data.priceReduce = `${minus}${one}.${two}万`
}
}
if (data.goodsDetailImageList && data.goodsDetailImageList.length > 1) {
let video = {}
data.goodsDetailImageList.map((e, index) => {
console.log(e)
if (e.resType == 3) {
video = e
data.goodsDetailImageList.splice(index, 1)
data.goodsDetailImageList.unshift(video)
}
})
// data.goodsDetailImageList.unshift(video)
}
} else {
if (data.goodsVideo)
data.goodsDetailImageList = [{
resType: 3,
content: data.goodsVideo
},
...data.goodsDetailImageList
]
if (data.originalPrice != null) data.originalPrice = wx.p.format.centsToyuan(data.originalPrice)
// for(let i=0; i<data.specificationList&&data.specificationList.length;i++ ){
// if(data.specificationDetailList[i].stock!=0){
// activeSku = data.specificationDetailList[i].specificationData
// data.skuPrice = wx.p.format.centsToyuan(data.specificationDetailList[i].retailPrice)
// }
// }
if (data.specificationList && data.specificationList.length) {
activeSku = data.specificationDetailList[0].specificationData
data.skuPrice = wx.p.format.centsToyuan(data.specificationDetailList[0].retailPrice)
}
}
if (data.retailPrice != null) {
data.retailPrice = wx.p.format.centsToyuan(data.retailPrice)
if (data.retailPrice >= 10000) {
data.retailPrice = Number(data.retailPrice / 10000).toFixed(2)
data.unit = '万'
}
data.retailPrice = Number(data.retailPrice).toFixed(2)
}
if (data.goodsVideo) {
data.goodsDescList.unshift({
content: data.goodsVideo,
resType: null
})
}
if (data.goodsDescList && data.goodsDescList.length) {
this.setMediaInfo(data.goodsDescList)
}
// 定金+尾款
data.depositPrice = this.formatMyPrice(data.depositPrice)
data.activityPrice = this.formatMyPrice(data.activityPrice)
if ((this.isUpgrade || this.isCarOwner) && !data.goodsDetailImageList.length) {
data.goodsDetailImageList.push(data.goodsImage)
}
this.setData({
goodsInfo: data,
goodsFlag: true,
activeSku,
upgrade: this.isUpgrade,
isCarOwner: this.isCarOwner
})
if (isActivity) this.countDown([data.startTime, data.endTime])
if (!wx.$authStatus) this.getUserAddressDefault()
else
this.setData({
addressFlag: true
})
wx.hideLoading()
} else {
wx.hideLoading()
this.setData({
isLoading: false
})
// wx.showModal({
// title: '温馨提示',
// content: message,
// confirmText: '重试',
// cancelText: '返回',
// confirmColor: '#F13C3D'
// }).then(res => {
// if (res.confirm) {
// this.getGoodsDetail(id)
// } else {
// wx.$router.back()
// }
// })
}
})
}
},
getGoodscouponList(id) {
id = id ? id : this.data.id
wx.p.api.shopmallApi
.getGoodscouponList({
id
})
.then(({
code,
data,
message
}) => {
let list =
data &&
data.map(item => {
if (item.effectiveEndTime || item.effectiveStartTime) {
item.effectiveEndTime = new Date(item.effectiveEndTime).format('yyyy.MM.dd')
item.effectiveStartTime = new Date(item.effectiveStartTime).format('yyyy.MM.dd')
}
return item
})
this.setData({
couponData: list
})
})
},
setMediaInfo(goodsDescList) {
wx.$api.getSystemInfo(({
windowWidth
}) => {
goodsDescList.map((e, index) => {
if (e.resType == 3) {
wx.getVideoInfo({
src: e.content
}).then(res => {
let ratio = (windowWidth - 40) / res.width
this.setData({
[`goodsInfo.goodsDescList[${index}].height`]: res.height * ratio
})
})
}
})
})
},
getUserAddressList() {
wx.p.api.mineApi.getUserAddressList().then(data => {
if (!data.length) {
this.setData({
contactAddress: '',
contactInfo: {
contactAddress: '',
contactName: '',
contactPhone: ''
},
isDefault: false
})
}
})
},
getUserAddressDefault() {
wx.p.api.mineApi.getUserAddressDefault().then(({
code,
data
}) => {
if (code == '0') {
let contactAddress = `${data.province}${data.city}${data.area}${data.address}`
this.setData({
contactAddress,
contactInfo: {
contactAddress,
contactName: data.receiveName,
contactPhone: data.phoneNumber
},
isDefault: data.isDefault == 1
})
}
this.setData({
addressFlag: true
})
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
// let {
// id,
// isActivity
// } = this.data
// if (id) {
// this.getGoodsDetail(id)
// this.getCommentList()
// if (!isActivity) this.getGoodscouponList(id)
// }
this.getUserAddressList()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
if (this.timer) clearInterval(this.timer)
this.trackQuery.view = 5
this.addTrack(this.trackQuery)
wx.$util.customerbehavior(2)
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
const merchantId = wx.$storage.get('srcm_shopmall_merchant_id')
const userInfo = wx.$util.getUserInfo()
let {
isActivity,
isLive,
goodsInfo
} = this.data,open_id = ''
this.trackQuery.view = 4
this.addTrack(this.trackQuery)
if(userInfo)open_id = userInfo.openId
let title = goodsInfo.goodsName
let path = `${this.route}?id=${goodsInfo.id}&openId=${open_id}`
let imageUrl = ''
goodsInfo.goodsDetailImageList.map(e => {
if (e.resType == 1 && !imageUrl) imageUrl = e.content
})
if (isActivity) {
title = goodsInfo.activityName
path = `${path}&isActivity=true`
}
if (isLive) path = `${path}&isLive=true`
if (merchantId) path = `${path}&merchantId=${merchantId}&isUpgrade=${this.isUpgrade || false}&isCarOwner=${this.isCarOwner || false}`
return {
imageUrl,
title,
path
}
},
countDown(params) {
let {
activityStatus
} = this.data.goodsInfo
// activityStatus 1:未开始,2进行中,3已结束
const addZero = i => (i < 10 ? `0${i}` : `${i}`)
let [activityStartTime, activityEndTime] = params
const start = wx.p.format.iosTimeFormat(activityStartTime)
const end = wx.p.format.iosTimeFormat(activityEndTime)
if (new Date().getTime() > new Date(end).getTime() || activityStatus == 3) {
clearTimeout(this.time)
this.setData({
timeFlag: true,
finished: '活动已结束'
})
return
}
if (new Date().getTime() >= new Date(start).getTime() && activityStatus != 2) {
this.setData({
'goodsInfo.activityStatus': 2
})
activityStatus = 2
}
let starTime = new Date()
let endTime = new Date(activityStatus == 2 ? end : start)
let lefttime = parseInt((endTime.getTime() - starTime.getTime()) / 1000)
let d = parseInt(lefttime / (24 * 60 * 60))
let h = parseInt((lefttime / (60 * 60)) % 24)
let m = parseInt((lefttime / 60) % 60)
let s = parseInt(lefttime % 60)
h = addZero(h)
m = addZero(m)
s = addZero(s)
let type = {
1: '距开始',
2: '距结束'
} [activityStatus]
if (this.time) clearTimeout(this.time)
this.time = setTimeout(() => {
let dayList = [h, m, s]
let activityTime = {
dayList,
type
}
if (d > 0) activityTime.day = `${d}天`
this.setData({
activityTime,
timeFlag: true
})
this.countDown(params)
}, 1 * 1000)
}
})
\ No newline at end of file
{
"navigationStyle": "custom"
}
\ No newline at end of file
<view class="navigation-bar">
<navigation-bar custom navStyle="{{navStyle}}" bindnavbarReady="navbarReady" page-title="{{isActivity?goodsInfo.activityName:goodsInfo.goodsName}}">
<view class="navigation">
<view class="back text-center y-center" bindtap="back">
<image webp src="{{IMGURL}}mall/{{showHomeBtn?'home':'back'}}.png" class="icon"></image>
</view>
<!-- <view class="text box-center">
{{isActivity?goodsInfo.activityName:goodsInfo.goodsName}}
</view> -->
</view>
</navigation-bar>
</view>
<view class="empty-page" wx:if="{{!goodsFlag && !isLoading}}">
<image webp class="empty-img" src="{{IMGURL}}mall/active-empty.png?v={{img_version}}" />
活动重新配置中,请稍后重试
</view>
<block wx:if="{{goodsFlag}}">
<view class="{{posterUrl==''?'layout':'layout hidden'}} " style="padding-bottom:{{padding_bottom + 20}}px;">
<view class="banner-box">
<swiper class="banner" bindchange="changeBanner">
<block wx:for="{{goodsInfo.goodsDetailImageList}}" wx:key="index">
<swiper-item>
<block wx:if="{{item.resType == 1}}">
<image mode="aspectFill" webp src="{{item.content}}" bindtap="previewImage" data-current="{{item.content}}" data-item="{{goodsInfo.goodsDetailImageList}}"></image>
</block>
<block wx:elif="{{item.resType == 3}}">
<video src="{{item.content}}"></video>
</block>
</swiper-item>
</block>
</swiper>
<block wx:if="{{goodsInfo.goodsDetailImageList.length > 1}}">
<view class="dot-box x-center">
<block wx:for="{{goodsInfo.goodsDetailImageList}}" wx:key="index">
<view class="dot {{bannerIndex == index ? 'active':''}}">
</view>
</block>
</view>
</block>
</view>
<block wx:if="{{isActivity}}">
<view class="activity-box">
<view class="activity-info">
<view class="price-info">
<view class="price">
<text>秒杀价</text>
<view class="text">
<view class="now">
<text>¥</text>
<view class="num">{{goodsInfo.retailPrice}}</view>
<block wx:if="{{goodsInfo.unit}}">
<view class="activity-unit">{{goodsInfo.unit}}</view>
</block>
</view>
<view class="old text-center">
限时直降{{goodsInfo.priceReduce}}
</view>
</view>
</view>
<view class="count">已售出{{goodsInfo.saleAmount || 0}}件</view>
</view>
<!-- activityStatus:1:未开始,2进行中,3已结束 -->
<block wx:if="{{goodsInfo.activityStatus != 3}}">
<view class="activity-time" wx:if="{{timeFlag}}">
<view class="title">{{activityTime.type}}还剩:</view>
<view class="time">
<view class="day">{{activityTime.day || ''}}</view>
<block wx:for="{{activityTime.dayList}}" wx:key="index">
<view class="time-box text-center">
{{item}}
</view>
<view class="unit" wx:if="{{index < 2}}"> :</view>
</block>
</view>
</view>
</block>
<block wx:else>
<view class="activity-time">
<view class="finished">{{finished}}</view>
</view>
</block>
</view>
<view class="activity-bg">
<image webp src="{{IMGURL}}mall/activity.png?v={{img_version}}"></image>
</view>
</view>
</block>
<view class="goods-info box carOwner_class">
<block wx:if="{{!isActivity}}">
<view class="price">
<view class="now">
<text class="unit">¥</text>
<block wx:if="{{activeSku}}">
{{goodsInfo.skuPrice}}
<text class="unit up">起</text>
</block>
<block wx:else>
{{upgrade || isCarOwner?goodsInfo.activityPrice:goodsInfo.retailPrice}}
<block wx:if="{{goodsInfo.unit}}">
<text class="unit">{{goodsInfo.unit}}</text>
</block>
</block>
</view>
<view class="old">¥{{goodsInfo.originalPrice}}</view>
<view wx:if="{{goodsInfo.paymentType==2}}" class="depositPrice">
<view class="sign">定金</view>
<view class="signPrice">¥{{goodsInfo.depositPrice}}</view>
</view>
</view>
</block>
<view class="flex">
<view class="name"> {{isActivity?goodsInfo.activityName:goodsInfo.goodsName}}
</view>
<view class="share" bindtap="sharePoster">
<text>分享</text>
<view class="sprite-icon icon-goods-share"></view>
</view>
</view>
<block wx:if="{{!isActivity}}">
<view class="count">
<view>剩余: {{goodsInfo.goodsStock || goodsInfo.specificationDetailList[0].stock || 0}}</view>
<view>销售: {{goodsInfo.goodsStatistics.saleAmount || 0}}</view>
</view>
</block>
<block wx:if="{{isCarOwner&&goodsInfo.giveIntegral}}">
<view class="carOwner_jf">赠养车积分:{{goodsInfo.giveIntegral}}</view>
</block>
</view>
<view class="goods-param box">
<block wx:if="{{!isActivity}}">
<block wx:if="{{couponData.length>0}}">
<view class="item" bindtap="showCouponFun">
<view class="label">优惠</view>
<view class="value coupon">优惠券</view>
<view class="sprite-icon icon-mine-arrow"></view>
</view>
</block>
</block>
<block wx:if="{{activeSku}}">
<view class="item" bindtap="showSkuFun">
<view class="label">已选</view>
<view class="value text-hide">{{activeSku}}</view>
<view class="sprite-icon icon-mine-arrow"></view>
</view>
</block>
<view class="item address" bindtap="jump" data-url="/packageShopmall/packageMine/pages/address/index/index" data-is-choose-address wx:if="{{goodsInfo.deliveryType != 1}}">
<view class="label">配送</view>
<view class="value text-hide">
<block wx:if="{{addressFlag}}">
{{contactAddress||'填写地址'}}
</block>
</view>
<view class="tips">支付后,预计48小时内发货</view>
<view class="sprite-icon icon-mine-arrow"></view>
</view>
<view class="item" wx:if="{{goodsInfo.deliveryType != 1}}">
<view class="label">运费</view>
<view class="value text-hide">
<block wx:if="{{goodsInfo.expressFee}}">{{goodsInfo.expressFee}}元</block>
<block wx:else>免运费(请以提交订单时为准)</block>
</view>
</view>
<view class="item" wx:if="{{isActivity && goodsInfo.limitPurchaseFlag == 2}}">
<view class="label">说明</view>
<view class="value text-hide">
<text>此商品活动期间每人限购{{goodsInfo.limitPurchaseNumber}}件</text>
</view>
</view>
<view class="items" wx:if="{{goodsInfo.serviceDesc}}">
<view class="labels">服务说明</view>
<view class="values">
<text>{{goodsInfo.serviceDesc}}</text>
</view>
</view>
</view>
<!-- 到店核销流程图 -->
<view class="shop" wx:if="{{goodsInfo.deliveryType == 1}}">
<view class="processBox">
<image webp src="{{IMGURL}}mall/pay.png?v={{img_version}}" />
<view class="describe">
<view class="describeTop">下单支付</view>
<view class="describeBottom">在线付款</view>
</view>
</view>
<image webp src="{{IMGURL}}mine/rightArrow.png?v={{img_version}}" class="right" />
<view class="processBox">
<image webp src="{{IMGURL}}mall/shop.png?v={{img_version}}" />
<view class="describe">
<view class="describeTop">到店核销</view>
<view class="describeBottom">享受安装服务</view>
</view>
</view>
<image webp src="{{IMGURL}}mine/rightArrow.png?v={{img_version}}" class="right" />
<view class="processBox">
<image webp src="{{IMGURL}}mall/evaluate.png?v={{img_version}}" />
<view class="describe">
<view class="describeTop">评价</view>
<view class="describeBottom">为车主提供参考</view>
</view>
</view>
</view>
<!-- 评论 -->
<block wx:if="{{commentlist.length>0}}">
<view class="goods-comment box">
<view class="comment-head">
<view class="comment-total">商品评价({{total}})</view>
<view class="comment-all arrow" bindtap="openEvaluation">
全部评价
<view class="sprite-icon icon-mine-arrow"></view>
</view>
</view>
<view class="comment-user">
<view class="user-portrait">
<image webp src="{{commentlist[0].customerImg}}"></image>
</view>
<view class="user-info">
<view class="name">{{commentlist[0].customerName}}</view>
<view class="comment-time">{{commentlist[0].createdDate}}</view>
</view>
</view>
<view class="comment-content">{{commentlist[0].commentContent}}</view>
<block wx:if="{{commentlist[0].imgUrls&&commentlist[0].imgUrls.length>0}}">
<view class="comment-images">
<view class="icon" wx:for="{{commentlist[0].imgUrls}}" wx:for-index="idx" wx:for-item="i">
<image webp src="{{i}}" bindtap="previewCommentImage" data-current="{{i}}" data-item="{{commentlist[0].imgUrls}}"></image>
</view>
</view>
</block>
</view>
</block>
<view class="activity-detail">
<block wx:if="{{isActivity}}">
<view class="title">
<view class="sprite-icon icon-goods-time"></view>
活动时间
</view>
<view class="content detail-time">
{{goodsInfo.startTime}} - {{goodsInfo.endTime}}
</view>
<view class="title">
<view class="sprite-icon icon-goods-text"></view>
活动详情
</view>
</block>
<block wx:for="{{goodsInfo.goodsDescList}}" wx:key="index">
<view class="content">
<block wx:if="{{item.resType == 1}}">
<image webp src="{{item.content}}" mode="widthFix" bindtap="previewImage" data-current="{{item.content}}" data-item="{{goodsInfo.goodsDescList}}" lazy-load></image>
</block>
<block wx:elif="{{item.resType == 2}}">
{{item.content}}
</block>
<block wx:else>
<video src="{{item.content}}" style="height:{{item.height}}px;width:100%"></video>
</block>
</view>
</block>
</view>
</view>
</block>
<coupon-goods show="{{showCoupon}}" only="{{only}}" couponData="{{couponData}}" bindclick="showCouponFun"></coupon-goods>
<block wx:if="{{navHeight && goodsFlag}}">
<goods-action bindready="goodsActionReady" pay-disabled="{{goodsInfo.activityStatus != 2 }}" stock="{{goodsInfo.goodsStock === 0}}" buyFlag="{{goodsInfo.buyFlag == 2}}" bindclick="goodsActionClick" hideShop="{{isActivity}}" upgradeSet="{{upgrade==true}}"></goods-action>
<block wx:if="{{activeSku}}">
<sku show="{{showSku}}" showName="showSku" isActivity="{{isActivity}}" skuData="{{goodsInfo}}" bindpay="pay" bindjoin="join"></sku>
</block>
</block>
<view class="model" catchtouchmove="noScroll" bindtap="hidden" wx:if="{{posterUrl}}">
<view class="poster" bindlongpress='save'>
<image webp src="{{posterUrl}}"></image>
</view>
</view>
<login show="{{showLogin}}"></login>
<glsx-privacy appletName="车生活助手"></glsx-privacy>
\ No newline at end of file
/* packageMall/pages/detail/detail.wxss */
@import '/style/sprite.wxss';
.flex {
display: flex;
align-items: center;
position: relative;
}
.navigation-bar {
position: fixed;
top: 0;
left: 0;
z-index: 2;
}
.empty-page {
box-sizing: border-box;
width: 100%;
height: calc(100vh - 128rpx);
padding-top: 128rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-size: 28rpx;
color: #ACACAC;
}
.empty-img {
width: 446rpx;
height: 240rpx;
margin-bottom: 60rpx;
}
.navigation {
width: 100%;
height: 100%;
position: relative;
}
.navigation .back {
width: 64rpx;
height: 64rpx;
background: rgba(255, 255, 255, 0.5);
border-radius: var(--margin);
position: absolute;
left: 20rpx;
}
.navigation .back .icon {
width: 36rpx;
height: 36rpx;
}
.navigation .text {
max-width: 50%;
font-size: 32rpx;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 500;
box-sizing: border-box;
text-align: center;
letter-spacing: 1rpx;
}
.box {
margin-bottom: 16rpx;
background-color: #fff;
}
.banner-box {
height: 750rpx;
position: relative;
}
.banner {
height: 100%;
}
.dot-box {
position: absolute;
bottom: 24rpx;
border-radius: 2rpx;
overflow: hidden;
display: flex;
}
.banner video {
width: 100%;
height: 100%;
}
.dot {
width: 20rpx;
height: var(--borderRadius);
background: rgba(255, 255, 255, 0.3);
transition: all .5s;
}
.dot.active {
background-color: #fff;
}
.activity-box {
height: 100rpx;
position: relative;
}
.activity-box .activity-bg {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
}
.activity-box .activity-info {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 2;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 23rpx 0 15rpx;
color: #fff;
}
.activity-box .activity-info .price,
.activity-box .activity-info .now,
.activity-box .activity-info .text {
display: flex;
font-size: 24rpx;
}
.activity-box .activity-info .price {
align-items: baseline;
}
.activity-box .activity-info .text {
align-items: center;
}
.activity-box .activity-info .now {
font-size: 40rpx;
align-items: baseline;
margin-left: var(--borderRadius);
}
.activity-box .activity-info .now .num {
font-size: 60rpx;
line-height: 60rpx;
letter-spacing: -2rpx;
}
.activity-box .activity-info .activity-unit {
font-size: 40rpx;
margin-left: 6rpx;
transform: translateY(-5rpx);
}
.activity-box .activity-info .count {
opacity: .5;
font-size: 20rpx;
transform: translateY(-5rpx);
}
.activity-box .activity-info .text .old {
padding: 0 12rpx;
height: 28rpx;
background: #FFEAD1;
border-radius: 14rpx;
font-size: 20rpx;
color: var(--themeColor);
flex-direction: column;
margin-left: 6rpx;
}
.depositPrice{
min-width: 156rpx;
height: 40rpx;
border: 2rpx solid #FC5B32;
border-radius: 8rpx;
display: flex;
align-items: center;
padding-right: 12rpx;
margin-left: 12rpx;
}
.depositPrice .sign{
height: 40rpx;
background: #FC5B32;
border-radius: 8rpx 0 18rpx 8rpx;
display: flex;
align-items: center;
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
padding: 0 12rpx;
}
.depositPrice .signPrice{
font-weight: 500;
font-size: 28rpx;
color: #FC5B32;
margin-left: 8rpx;
}
.activity-box .activity-info .activity-time {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 20rpx;
color: var(--themeColor);
animation: show-activity-time .5s forwards;
}
@keyframes show-activity-time {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.activity-box .activity-info .activity-time .time {
font-size: 24rpx;
display: flex;
align-items: center;
justify-content: flex-end;
color: var(--themeColor);
margin-top: 10rpx;
}
.activity-box .activity-info .activity-time .day {
margin-right: var(--borderRadius);
}
.activity-box .activity-info .time-box {
background: var(--themeColor);
border-radius: 4rpx;
width: 36rpx;
height: 36rpx;
color: #fff;
}
.activity-box .activity-info .unit {
text-align: center;
width: 16rpx;
}
.activity-time .finished {
font-size: 32rpx;
}
.goods-info {
padding: 28rpx 40rpx 32rpx;
}
.goods-info .price {
margin-bottom: 2rpx;
}
.goods-info .price,
.goods-info .price .now {
display: flex;
align-items: baseline;
}
.goods-info .price .now {
font-size: 64rpx;
color: var(--btnColor);
margin-right: 8rpx;
line-height: 64rpx;
font-weight: bold;
color: #FC5B32;
}
.goods-info .price .now .unit {
font-size: 40rpx;
}
.goods-info .price .now .up {
transform: translateY(-2rpx);
}
.goods-info .price .old {
color: #B1B1B3;
text-decoration: line-through;
}
.goods-info .name {
font-size: 36rpx;
font-weight: 500;
position: relative;
width: 85%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.goods-info .count {
margin-top: 20rpx;
font-size: 24rpx;
color: #B1B1B3;
display: flex;
position: relative;
}
.goods-info .count view:nth-child(2) {
margin-left: 100rpx;
}
.goods-param {
padding: 0 40rpx;
}
.goods-param .item {
position: relative;
height: 98rpx;
border-bottom: 2rpx solid #EFF0F2;
display: flex;
align-items: center;
font-size: 24rpx;
}
.goods-param .item:last-child {
border-bottom: none;
}
.goods-param .item .label {
width: 136rpx;
color: #656566;
}
.goods-param .item .value {
width: 490rpx;
color: #3B3B3D;
}
.goods-param .item .coupon {
font-size: 24rpx;
padding: 0 20rpx;
font-weight: 500;
color: #FC5B32;
line-height: 40rpx;
height: 40rpx;
width: auto;
background: rgba(252, 91, 50, 0.12);
border-radius: 4rpx;
box-sizing: border-box;
}
.goods-param .address {
height: 134rpx;
align-items: flex-start;
box-sizing: border-box;
padding: var(--margin) 0;
position: relative;
}
.goods-param .address .tips {
position: absolute;
color: #B1B1B3;
left: 136rpx;
bottom: var(--margin);
}
.goods-param .item .icon-mine-arrow {
margin-left: auto;
transform: scale(1.3) translateY(9rpx);
}
.goods-param .address .icon-mine-arrow {
position: absolute;
right: 0;
top: 50%;
transform: scale(1.3) translateY(0);
}
.activity-detail {
background-color: #fff;
}
.activity-detail .title {
display: flex;
align-items: center;
padding: 0 40rpx 20rpx;
}
.activity-detail .title .icon {
width: 32rpx;
height: 32rpx;
margin-right: var(--borderRadius);
}
.detail-time {
margin-bottom: 20rpx;
}
.content {
font-size: 24rpx;
background-color: #fff;
padding: 0 40rpx;
}
.content:first-of-type,
.activity-detail .title:first-of-type {
padding-top: 40rpx;
}
.content:last-of-type {
padding-bottom: 40rpx;
}
.goods-comment {
padding: 40rpx 32rpx;
}
.goods-comment .comment-head {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 12rpx;
}
.goods-comment .comment-content {
font-size: 28rpx;
font-weight: 400;
color: #282829;
line-height: 40rpx;
padding: 0 0 20rpx 0;
white-space:normal;
word-break:break-all;
}
.goods-comment .comment-head .comment-total {
font-size: 32rpx;
font-weight: 500;
color: #282829;
line-height: 44rpx;
}
.comment-all {
font-size: 24rpx;
font-weight: 400;
color: #3B3B3D;
line-height: 34rpx;
display: flex;
align-items: center;
}
.comment-all .icon-mine-arrow {
margin-left: 12rpx;
}
.comment-user {
padding: 16rpx 0 20rpx 0;
display: flex;
align-items: center;
}
.comment-user .user-portrait {
width: 72rpx;
height: 72rpx;
margin-right: 16rpx;
background-color: #333333;
border-radius: 50%;
}
.user-portrait image{
border-radius: 50%;
}
.comment-user .user-info .name {
font-size: 32rpx;
font-weight: 600;
color: #282829;
line-height: 44rpx;
}
.comment-user .user-info .comment-time {
font-size: 20rpx;
font-weight: 400;
color: #B1B1B3;
line-height: 28rpx;
}
.goods-comment .comment-images {
display: flex;
align-items: center;
flex-wrap: wrap;
margin-right: -40rpx;
}
.goods-comment .comment-images .icon {
width: 160rpx;
height: 160rpx;
border-radius: 8rpx;
box-sizing: border-box;
margin-right: 16rpx;
background-color: #e7e7e7;
margin-bottom: 10rpx;
}
.goods-comment .comment-images .icon image {
border-radius: 8rpx;
}
.share {
width: 108rpx;
height: 34rpx;
/* background: rgba(252, 91, 50, 0.1); */
border-radius: 4rpx;
font-size: 24rpx;
color: #FC5B32;
line-height: 34rpx;
display: flex;
align-items: center;
position: absolute;
right: 0;
padding-left: 12rpx;
box-sizing: border-box;
}
.share text {
flex-shrink: 0;
}
.icon-goods-share {
transform: scale(0.54);
}
.model {
position: fixed;
left: 0;
right: 0;
top: 0;
right: 0;
background: rgba(0, 0, 0, 0.5);
width: 100%;
height: 100%;
z-index: 999999;
display: flex;
align-items: center;
justify-content: center;
}
.poster {
width: 540rpx;
height: 860rpx;
border-radius: 8rpx;
}
.hidden{
height:100%;
overflow: hidden;
}
.shop {
height: 62rpx;
background-color: white;
padding: 30rpx;
display: flex;
align-items: center;
border-bottom: 2rpx solid #F7F8FA;
}
.shop .right {
width: 24rpx;
height: 18rpx;
margin: 0 14rpx 0 26rpx;
}
.shop .processBox {
display: flex;
}
.shop .processBox .describe {
margin-left: 8rpx;
}
.shop .processBox .describe .describeTop {
font-size: 24rpx;
color: #333333;
}
.shop .processBox .describe .describeBottom {
font-size: 20rpx;
color: #999999;
}
.shop .processBox image {
width: 60rpx;
height: 60rpx;
}
.goods-param .items {
min-height: 34rpx;
display: flex;
font-size: 24rpx;
padding: 32rpx 0;
}
.goods-param .items .labels {
width: 136rpx;
color: #656566;
}
.goods-param .items .values {
width: 490rpx;
color: #3B3B3D;
}
.tab-widget{
width: 100%;
height: 88rpx;
background: white;
position: fixed;
left: 0;
top: 88rpx;
right: 0;
z-index: 999;
}
.tab-widget .tab-item{
width: 50%;
height: 100%;
position: relative;
}
.tab-widget .tab-item .text{
font-size: 28rpx;
color: #656566;
line-height: 40rpx;
}
.tab-widget .tab-item .text-ative{
font-weight: 500;
font-size: 28rpx;
color: #2C2C2C;
}
.tab-widget .tab-item .line{
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
width: 66rpx;
height: 6rpx;
background: #FC5B32;
border-radius: 2rpx;
}
.carOwner_class{
position: relative;
}
.carOwner_class .carOwner_jf{
padding: 6rpx 12rpx;
background: #FEE7E7;
border: 1.6rpx solid #FFA3A3;
border-radius: 8rpx;
position: absolute;
right: 24rpx;
top: 42rpx;
font-weight: 400;
font-size: 24rpx;
color: #F13C3D;
display: flex;
align-items: center;
justify-content: center;
}
\ No newline at end of file
Page({
data: {
list: [{
id: 1,
}, {
id: 2,
}, {
id: 3,
}, {
id: 4,
}, {
id: 5,
},]
},
onLoad(options) {
},
toJump(e) {
const { id } = e.currentTarget.dataset
let url = ''
const shareCode = '5759S2m7h'
switch (id) {
case 1:
url = `plugin://collectionPlugin/sbkHome?shareCode=${shareCode}&userId=ooPYo45el_GJ55vqhdME5-tqQmaw`
break;
case 2:
url = `plugin://collectionPlugin/sbkHome?shareCode=${shareCode}`
break;
case 3:
url = `plugin://collectionPlugin/naixueHome?shareCode=${shareCode}`
break;
case 4:
url = `plugin://ticketPlugin/home?shareCode=${shareCode}&reLocation=true`
break;
case 5:
url = `plugin://express-plugin/home?shareCode=${shareCode}`
break;
default:
break;
}
wx.navigateTo({
url,
})
}
})
\ No newline at end of file
{
"navigationBarTitleText": "在线下单"
}
\ No newline at end of file
.container {
box-sizing: border-box;
padding: 30rpx;
.cover {
height: 268rpx;
margin-bottom: 30rpx;
}
}
\ No newline at end of file
<view class="container">
<block wx:for="{{list}}" wx:key="index">
<glsx-image bind:tap="toJump" data-id="{{item.id}}" class="cover" webp src="equity/plugin/equity_plugin_{{index}}.png"></glsx-image>
</block>
</view>
\ No newline at end of file
const navStyle = "background-color: transparent;";
import { IMG_URL } from '../../../config'
Page({
data: {
IMG_URL,
navStyle,
noticeContent: true,
noticeContent:
"卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡",
bannerList: [
{
bannerImg:
"https://img02.glsx.com.cn/weapp/resource/miniprogram/wuye/home/banner_test.png",
},
],
codeList: [
{
title: "官方",
desc: "福利群",
tip: "优惠资讯,先人一步",
url: "fuliq",
},
{
title: "专属",
desc: "福利官",
tip: "超多福利,不容错过",
url: "fulig",
},
],
showModal: false,
urlName: "",
strategyList: [],
noticeContent: '卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡',
bannerList: [{
bannerImg: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/wuye/home/banner_test.png'
}],
codeList: [{
title: '官方',
desc: '福利群',
tip: '优惠资讯,先人一步',
url: 'fuliqun'
}, {
title: '专属',
desc: '福利官',
tip: '超多福利,不容错过',
url: 'fuliguan'
}],
showModal:false,
urlName:''
},
navbarReady(e) {
let { height } = e.detail;
......
......@@ -112,12 +112,25 @@ page {
background-color: rgba(0, 0, 0, .6);
}
.max_cover {
.box_cover {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 638rpx;
height: 756rpx;
.max_cover {
width: 638rpx;
height: 756rpx;
}
.close_icon {
position: absolute;
right: 32rpx;
top: 32rpx;
width:32rpx;
height:32rpx;
}
}
}
\ No newline at end of file
......@@ -49,5 +49,8 @@
<!-- 弹框 -->
<view wx:if="{{showModal}}" class="modal_widget">
<view bind:tap="closeModal" class="popup-bg"></view>
<glsx-image wx:if="{{urlName}}" class="max_cover" webp src="home/{{urlName}}.png"></glsx-image>
<view class="box_cover">
<image class="max_cover" src="{{IMG_URL}}home/{{urlName}}.png" show-menu-by-longpress="{{true}}" />
<image bind:tap="closeModal" class="close_icon" src="{{IMG_URL}}home/close_modal.png" />
</view>
</view>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!