预约按钮

dev
rosehan 2 years ago
parent 0112f76ddb
commit da82722604
  1. 2
      static/ancss/an.css
  2. 251
      sunPackIndex/feiyi/feiyidetail/feiyidetail.vue

@ -424,7 +424,7 @@ s首页菜单
.yue_c_bun{ font-size: 30rpx; color: #fff; background: #1677ff; padding: 8rpx 0;}
.yue_f_bun{ font-size: 30rpx; color: #fff; background: #ae3523; padding: 8rpx 0;}
.yue_e_bun .ac_size_1{ margin-right: 10rpx; position: relative; top:6rpx}
.yue_icn{ position: absolute; right: 5rpx; top:5rpx; z-index: 0;}

@ -1,6 +1,7 @@
<template>
<view class="">
<swiper :autoplay="autoplay" class="lh-swiper" :duration="duration" :indicator-dots="indicatorDots" :interval="interval">
<view class="v-page">
<swiper :autoplay="autoplay" class="lh-swiper" :duration="duration" :indicator-dots="indicatorDots"
:interval="interval">
<swiper-item v-for="(item, index) in pic_list" :key="index">
<image class="slide-image" mode="scaleToFill" :src="item" width="375"></image>
</swiper-item>
@ -9,7 +10,7 @@
<view class="an_box_3">
<view class="an_t_3">{{ info.title }}</view>
<view class="an_t_1">¥{{ info.jointime }}</view>
<!-- 内容部分 -->
<view class="an_t_3">商品详情</view>
<view class="amt_60 wc_cont">
@ -20,32 +21,44 @@
</view>
</view>
</view>
<view class="buy-btn" @click="buyit(info)">立即购买</view>
</view>
<view class="yuyue-btn">
<view class="an_box_2">
<button form-type="submit" class="yue_fm_btn yue_f_bun" @click="buyit(info)">立即购买</button>
</view>
</view></view>
</template>
<script>
import uniRate from '@/components/uni-rate/uni-rate.vue';
export default {
components: {
uniRate
},
data() {
return {
info: {},
netType: true,
autoplay: true,
interval: 3000,
duration: 500,
pic_url: this.$config.ROOTPATH,
pic_list: []
};
},
onLoad(options) {
var that = this;
this.$util.getNetworkType(
function (res) {
if (res.networkType === 'none') {
import uniRate from '@/components/uni-rate/uni-rate.vue';
export default {
components: {
uniRate
},
data() {
return {
info: {},
netType: true,
autoplay: true,
interval: 3000,
duration: 500,
pic_url: this.$config.ROOTPATH,
pic_list: []
};
},
onLoad(options) {
var that = this;
this.$util.getNetworkType(
function(res) {
if (res.networkType === 'none') {
uni.showToast({
title: that.$param.netMsg,
icon: 'none',
duration: 2000
});
that.netType = false;
}
},
function() {
uni.showToast({
title: that.$param.netMsg,
icon: 'none',
@ -53,105 +66,103 @@ export default {
});
that.netType = false;
}
},
function () {
uni.showToast({
title: that.$param.netMsg,
icon: 'none',
duration: 2000
});
that.netType = false;
);
if (!that.netType) {
return;
}
);
if (!that.netType) {
return;
}
this.$util.hideLoadingByTime();
var guid = options.guid;
this.detailInfo(guid);
this.jilu(guid);
},
methods: {
detailInfo: function (guid) {
var that = this;
var data = {
userkey: that.$param.userkey,
type: that.$param.shopItem,
guid: guid
};
that.$Request.post(that.$config.getMessgeInfoDetailFormId, data).then((res) => {
console.log(res, '非遗详情');
if (!that.$util.isSuccess(res)) {
return;
}
that.info = res.data;
var pic_list = res.data.imagelist;
if (pic_list != null) {
for (var i = 0; i < pic_list.length; i++) {
pic_list[i] = '' + this.pic_url + pic_list[i];
}
}
this.pic_list = pic_list;
});
this.$util.hideLoadingByTime();
var guid = options.guid;
this.detailInfo(guid);
this.jilu(guid);
},
jilu: function (id) {
var that = this;
var data = {
guid: id,
browsenum: '1'
};
this.$Request.post(this.$config.updateMessageInfoUBFeildFormId, data).then((res) => {
if (that.$util.isSuccess(res)) {
console.log('已阅读');
}
});
},
buyit(val) {
let this_ = this
uni.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74',
path: val.address,
envVersion: 'release',
success(res) {
uni.request({
url:this_.$config.ROOTPATH+'mobile/commodityOpenUrlStatistics/add?commodityId='+val.guid,
method:'get',
success(res) {
console.log(res)
methods: {
detailInfo: function(guid) {
var that = this;
var data = {
userkey: that.$param.userkey,
type: that.$param.shopItem,
guid: guid
};
that.$Request.post(that.$config.getMessgeInfoDetailFormId, data).then((res) => {
console.log(res, '非遗详情');
if (!that.$util.isSuccess(res)) {
return;
}
that.info = res.data;
var pic_list = res.data.imagelist;
if (pic_list != null) {
for (var i = 0; i < pic_list.length; i++) {
pic_list[i] = '' + this.pic_url + pic_list[i];
}
})
}
});
}
this.pic_list = pic_list;
});
},
jilu: function(id) {
var that = this;
var data = {
guid: id,
browsenum: '1'
};
this.$Request.post(this.$config.updateMessageInfoUBFeildFormId, data).then((res) => {
if (that.$util.isSuccess(res)) {
console.log('已阅读');
}
});
},
buyit(val) {
let this_ = this
uni.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74',
path: val.address,
envVersion: 'release',
success(res) {
uni.request({
url: this_.$config.ROOTPATH +
'mobile/commodityOpenUrlStatistics/add?commodityId=' + val.guid,
method: 'get',
success(res) {
console.log(res)
}
})
}
});
}
}
}
};
};
</script>
<style scoped lang="scss">
.lh-swiper {
width: 100%;
height: 825rpx;
position: relative;
}
.lh-swiper .slide-image {
width: 100%;
height: 100%;
}
.buy-btn {
position: fixed;
bottom: 50rpx;
right: 50rpx;
padding: 20rpx 70rpx;
background-color: #03a2ff;
color: #eee;
border-radius: 10rpx;
}
.an_t_1{
margin-top: 30rpx ;
margin-bottom: 30rpx ;
}
.box_dg{
padding-top: 20rpx;
}
.v-page {
padding-bottom: 120rpx;
}
.lh-swiper {
width: 100%;
height: 825rpx;
position: relative;
}
.lh-swiper .slide-image {
width: 100%;
height: 100%;
}
</style>
.buy-btn {
position: fixed;
bottom: 50rpx;
right: 50rpx;
padding: 20rpx 70rpx;
background-color: #03a2ff;
color: #eee;
border-radius: 10rpx;
}
.an_t_1 {
margin-top: 30rpx;
margin-bottom: 30rpx;
}
.box_dg {
padding-top: 20rpx;
}
</style>
Loading…
Cancel
Save