|
|
|
@ -1,14 +1,16 @@ |
|
|
|
|
<template> |
|
|
|
|
<view> |
|
|
|
|
|
|
|
|
|
<!-- #ifdef H5 --> |
|
|
|
|
<view class="header"> |
|
|
|
|
<!-- 头部-默认显示 --> |
|
|
|
|
<view class="before" :style="{ opacity: 1 - afterHeaderOpacity, zIndex: beforeHeaderzIndex }"> |
|
|
|
|
<view class="back"><view class="icon xiangqian" @tap="back" v-if="showBack"></view></view> |
|
|
|
|
<view class="back"> |
|
|
|
|
<view class="icon xiangqian" @tap="back" v-if="showBack"></view> |
|
|
|
|
</view> |
|
|
|
|
<view class="middle"></view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<!-- #endif --> |
|
|
|
|
<!-- 底部菜单 --> |
|
|
|
|
<view class="footer"> |
|
|
|
|
<button v-if="user == '' " class="width100 fotct btnfot" @click="getuserinfo"> |
|
|
|
@ -95,11 +97,14 @@ |
|
|
|
|
<view class="description"> |
|
|
|
|
<view class="title">———— 商品详情 ————</view> |
|
|
|
|
<view class="content marb65"> |
|
|
|
|
<image mode="widthFix" class="width100" v-for="codes in couponDesc" :key="codes" :src="imageUrl+codes" @click="perImage(codes)"> |
|
|
|
|
<image mode="widthFix" class="width100" v-for="codes in couponDesc" :key="codes" :src="imageUrl+codes" |
|
|
|
|
@click="perImage(codes)"> |
|
|
|
|
</image> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- <authorize></authorize> --> |
|
|
|
|
<!-- #ifdef H5 --> |
|
|
|
|
<authorize></authorize> |
|
|
|
|
<!-- #endif --> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -109,12 +114,12 @@ |
|
|
|
|
GetPhoneNumber, |
|
|
|
|
getUserInfo |
|
|
|
|
} from "../../Utils/Api.js"; |
|
|
|
|
// import authorize from '../../components/Authorize.vue' |
|
|
|
|
import authorize from '../../components/Authorize.vue' |
|
|
|
|
let app = getApp() |
|
|
|
|
export default { |
|
|
|
|
// components: { |
|
|
|
|
// authorize |
|
|
|
|
// }, |
|
|
|
|
components: { |
|
|
|
|
authorize |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
//控制渐变标题栏的参数 |
|
|
|
@ -202,20 +207,10 @@ |
|
|
|
|
perImage(item) { |
|
|
|
|
uni.previewImage({ |
|
|
|
|
current: 0, //预览图片的下标 |
|
|
|
|
urls: [this.imageUrl+item] //预览图片的地址,必须要数组形式,如果不是数组形式就转换成数组形式就可以 |
|
|
|
|
urls: [this.imageUrl + item] //预览图片的地址,必须要数组形式,如果不是数组形式就转换成数组形式就可以 |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//商品跳转 |
|
|
|
|
// toGoods(e) { |
|
|
|
|
// console.log('=========='+e); |
|
|
|
|
// // uni.showToast({ |
|
|
|
|
// // title: '商品' + e.goods_id, |
|
|
|
|
// // icon: 'none' |
|
|
|
|
// // }); |
|
|
|
|
// uni.navigateTo({ |
|
|
|
|
// url: 'goods' |
|
|
|
|
// }); |
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 跳转门店详情 |
|
|
|
|
*/ |
|
|
|
@ -234,12 +229,7 @@ |
|
|
|
|
url: '../msg/msg' |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 客服 |
|
|
|
|
toChat() { |
|
|
|
|
// uni.navigateTo({ |
|
|
|
|
// url:"../msg/chat/chat?name=客服008" |
|
|
|
|
// }) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 分享 |
|
|
|
|
share() { |
|
|
|
|
this.shareClass = 'show'; |
|
|
|
@ -267,46 +257,6 @@ |
|
|
|
|
title: "已加入购物车" |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
//立即购买 |
|
|
|
|
// getPhoneNumber(PhoneNumber) { |
|
|
|
|
// let params = { |
|
|
|
|
// openId: app.globalData.openId, |
|
|
|
|
// iv: PhoneNumber.detail.iv, |
|
|
|
|
// encryptedData: PhoneNumber.detail.encryptedData |
|
|
|
|
// } |
|
|
|
|
// GetPhoneNumber(params).then(res => { |
|
|
|
|
// if (res.return_code == '000000') { |
|
|
|
|
// app.globalData.userInfo = res.return_data |
|
|
|
|
// .object |
|
|
|
|
// .highUser; |
|
|
|
|
// uni.setStorage({ |
|
|
|
|
// key: "user", |
|
|
|
|
// data: res.return_data |
|
|
|
|
// .object |
|
|
|
|
// .highUser |
|
|
|
|
// }) |
|
|
|
|
// let that = this; |
|
|
|
|
// if (that.goodsData[0].stockCount) { |
|
|
|
|
// uni.showToast({ |
|
|
|
|
// title: '提交订单...', |
|
|
|
|
// icon: 'none', |
|
|
|
|
// duration: 2000, |
|
|
|
|
// success() { |
|
|
|
|
// uni.navigateTo({ |
|
|
|
|
// url: '../order/confirmation?id=' + that.goodsData[0].id |
|
|
|
|
// }) |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
// } else { |
|
|
|
|
// uni.showToast({ |
|
|
|
|
// title: '卡券数量不足', |
|
|
|
|
// icon: 'none', |
|
|
|
|
// duration: 2000 |
|
|
|
|
// }) |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// }, |
|
|
|
|
//获取登陆信息 |
|
|
|
|
getuserinfo() { |
|
|
|
|
// uni.showLoading({ |
|
|
|
@ -317,7 +267,7 @@ |
|
|
|
|
// success(res) { |
|
|
|
|
// if (res.code) { |
|
|
|
|
//发起网络请求 |
|
|
|
|
// var code = res.code |
|
|
|
|
// var code = res.code; |
|
|
|
|
// 获取微信用户信息 |
|
|
|
|
uni.getUserProfile({ |
|
|
|
|
desc: '登录中...', |
|
|
|
@ -330,6 +280,7 @@ |
|
|
|
|
getUserInfo(params).then(res => { |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
that.user = res.return_data.object.highUser; |
|
|
|
|
app.globalData.userInfo = res |
|
|
|
|
.return_data |
|
|
|
|
.object |
|
|
|
@ -366,19 +317,13 @@ |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
// } else { |
|
|
|
|
// fail: res => { |
|
|
|
|
// uni.showToast({ |
|
|
|
|
// title: "微信登录授权失败", |
|
|
|
|
// icon: "none" |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
// }, |
|
|
|
|
// fail(res) { |
|
|
|
|
// uni.hideLoading(); |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
@ -785,9 +730,11 @@ |
|
|
|
|
position: relative; |
|
|
|
|
width: 100%; |
|
|
|
|
height: 100vw; |
|
|
|
|
|
|
|
|
|
swiper { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 100vw; |
|
|
|
|
|
|
|
|
|
swiper-item { |
|
|
|
|
image { |
|
|
|
|
width: 100%; |
|
|
|
@ -795,7 +742,8 @@ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.indicator{ |
|
|
|
|
|
|
|
|
|
.indicator { |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: center; |
|
|
|
|
align-items: center; |
|
|
|
|