作者 李芳银

更改团购

... ... @@ -13,7 +13,7 @@ Page({
timeData: {},
storeList: 4,
groomList: [],
decorations: [], // 精品
decorations: '', // 精品
stores_id: '',
kefu: [],
hotActivity: [],
... ... @@ -55,7 +55,7 @@ Page({
that.setData({
s4_id,
products: [],
decorations: [],
// decorations: [],
kefu: [],
hotActivity: [],
groomList: [],
... ... @@ -98,11 +98,6 @@ Page({
msg: data.msg
})
that.getDecorations()
} else {
that.setData({
msg: data.msg
})
that.popTest()
}
} catch (err) {
console.log(err, "出错了");
... ... @@ -130,10 +125,6 @@ Page({
it_cloose: false,
s4_id: data.id
})
} else {
that.setData({
it_cloose: true,
})
}
that.setData({
decorations: data,
... ... @@ -142,6 +133,9 @@ Page({
} catch (err) {
console.log(err, "出错了");
a.popTest(err.msg)
that.setData({
it_cloose: true,
})
}
},
... ... @@ -252,9 +246,12 @@ Page({
data
}
} = await request({
url: 'api/shop4s2/img3',
url: 'api/shop4s2/newImg3',
data: {
s4_id: that.data.s4_id
}
})
console.log(data);
console.log(data, "新接口");
that.setData({
goodDetal: data
})
... ... @@ -285,8 +282,11 @@ Page({
},
goSearch() {
wx.navigateTo({
url: '/pages/search/search?S4_num=1'
url: '/pages/Vmore4SList/Vmore4SList?home=1'
})
// wx.navigateTo({
// url: '/pages/search/search?S4_num=1'
// })
},
goVnewslist() {
let decorations = this.data.decorations
... ... @@ -309,21 +309,6 @@ Page({
a.popTest('请登录后操作')
}
},
hotProducts() { //热销车型
let that = this
let token = wx.getStorageSync("token")
let decorations = that.data.decorations
let s4_id = decorations.id
console.log(s4_id);
if (token) {
wx.navigateTo({
url: '/pages/VSpikeMall/VSpikeMall?id=' + s4_id
})
} else {
a.popTest('请登录后操作')
}
},
goReservation() {
let that = this
let token = wx.getStorageSync("token")
... ... @@ -361,7 +346,6 @@ Page({
})
} else {
a.popTest('请登录后操作')
}
},
... ... @@ -474,12 +458,79 @@ Page({
title: that.data.decorations.name || "车唛分享", // 默认是小程序的名称(可以写slogan等)
path: '/pages/4Sstore/4Sstore', // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
};
// 返回shareObj
return shareObj;
},
toGoDetailA(e) {
let that = this
let good_type = Number(e.currentTarget.dataset.good_type)
let type = e.currentTarget.dataset.type
that.publicDetails(type, good_type)
},
// toGoDetailB(e) {
// let that = this
// let good_type = e.currentTarget.dataset.good_type
// let type = e.currentTarget.dataset.type
// that.publicDetails(type, good_type)
// console.log(type, good_type);
// },
// toGoDetailC(e) {
// let that = this
// let good_type = e.currentTarget.dataset.good_type
// let type = e.currentTarget.dataset.type
// that.publicDetails(type, good_type)
// },
publicDetails(type, good_type) {
let that = this
console.log(type, good_type, "珊瑚");
let decorations = that.data.decorations
let s4_id = decorations.id
if (type == 1) { //可以跳转
switch (good_type) {
case 1: // 人气好物
wx.navigateTo({
url: '/pages/VSpikeMall/VSpikeMall?id_name=' + '人气好物' + '&id=' + s4_id
})
break;
case 2: // 精选推荐
wx.navigateTo({
url: '/pages/VSpikeMall/VSpikeMall?id_name=' + '精选推荐' + '&id=' + s4_id
})
break;
case 3: // 团购热卖
wx.navigateTo({
url: '/pages/VSpikeMall/VSpikeMall?id_name=' + '团购热卖' + '&id=' + s4_id
})
break;
case 4: //限时抢购
wx.navigateTo({
url: '/pages/VSpikeMall/VSpikeMall?id_name=' + '限时抢购' + '&id=' + s4_id
})
break;
case 5: //车型商品
wx.navigateTo({
url: '/pages/VSpikeMall/VSpikeMall?id_name=' + '车型商品' + '&id=' + s4_id
})
break;
case -1: //活动列表
wx.navigateTo({
url: '/pages/goPromotion/goPromotion?id=' + s4_id
})
break;
case -2: //活动列表
wx.navigateTo({
url: '/pages/goPromotion/goPromotion?id=' + s4_id
})
break;
default:
break;
}
} else {
a.popTest('该4s店暂未运营')
}
},
... ...
... ... @@ -75,7 +75,6 @@
</view>
<view class="cate">
<view class="scroll_1 catePublic" bindtap="allche">
<!-- <view class="scroll_1 catePublic" bindtap="hotProducts"> -->
<image src="{{imagesUrl}}assets/static/img/ress_d.png" class="publicImg" />
<view class="cate_1 cate_public">全部车型</view>
</view>
... ... @@ -113,14 +112,14 @@
<view class="week_hot" wx:if="{{goodDetal.length !=0}}">
<view class="star_name">本周特卖</view>
<view class="week_box">
<view class="left_big" bindtap="hotProducts" data-tir="0">
<view class="left_big" bindtap="toGoDetailA" data-type="{{goodDetal.type}}" data-good_type="{{goodDetal.good_type1}}" data-tir="0">
<image src="{{goodDetal.img1}}" />
</view>
<view class="rt_box">
<view class="ry_top" bindtap="hotProducts" data-tir="1">
<view class="ry_top" bindtap="toGoDetailA" data-type="{{goodDetal.type}}" data-good_type="{{goodDetal.good_type2}}" data-tir="1">
<image src="{{goodDetal.img2}}" />
</view>
<view class="ry_down" bindtap="hotProducts" data-tir="2">
<view class="ry_down" bindtap="toGoDetailA" data-type="{{goodDetal.type}}" data-good_type="{{goodDetal.good_type3}}" data-tir="2">
<image src="{{goodDetal.img3}}" />
</view>
</view>
... ...
... ... @@ -16,7 +16,7 @@ Page({
page: 1,
last_page: '',
products: [],
titlename: '人气好物',
titlename: '',
percent: 50, // 进度条
typeId: '',
},
... ... @@ -24,7 +24,8 @@ Page({
let that = this
console.log(options);
that.setData({
s4_id: options.id,
s4_id: options.id || '',
titlename: options.id_name || that.data.titlename,
products: [],
})
... ... @@ -83,22 +84,30 @@ Page({
url: 'api/good4s/cate',
})
console.log(data);
data.forEach((item, index) => {
if (item.name == that.data.titlename) {
that.setData({
esl: index,
typeId: item.id,
})
}
});
// console.log();
that.setData({
nav_list: data
})
if (data.length != 0) {
that.setData({
typeId: data[0].id
})
}
// if (data.length != 0) {
// that.setData({
// typeId: data[0].id,
// titlename: data[0].name
// })
// }
that.getMyorder()
console.log(that.data.typeId);
} catch (err) {
console.log(err);
that.setData({
msg: err.msg
})
that.popTest()
a.popTest(err.msg)
}
},
async getMyorder() { // 获取列表
... ...
... ... @@ -431,7 +431,7 @@ Page({
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: "车唛分享", // 默认是小程序的名称(可以写slogan等)
path: '/pages/stores/stores', // 默认是当前页面,必须是以‘/’开头的完整路径
path: '/pages/Vintegral/Vintegral', // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
... ...
... ... @@ -23,10 +23,7 @@ Page({
onLoad: function (options) {
let that = this
console.log(options);
that.setData({
// kw: options.kw || '',
// searchValue: options.kw || '',
home_form: options.home || '',
})
},
... ... @@ -36,12 +33,10 @@ Page({
that.setData({
city_id: a.globalData.city_glob_id
})
console.log(that.data.city_id, 'uiasfhk,city');
}
console.log(this.data.city_id);
let home_form = that.data.home_form
if (home_form == '') {
that.getmoreList()
}
that.getmoreList()
},
goback() {
wx.navigateBack()
... ...
... ... @@ -289,7 +289,7 @@ Page({
data
}
} = await request({
url: 'api/shop4s2/img3',
url: 'api/shop4s2/newImg3',
data: {
s4_id: that.data.s4_id
}
... ... @@ -322,7 +322,7 @@ Page({
},
goSearch() {
wx.navigateTo({
url: '/pages/search/search?S4_num=1'
url: '/pages/Vmore4SList/Vmore4SList?home=1'
})
},
goVnewslist() {
... ... @@ -349,24 +349,7 @@ Page({
this.popTest()
}
},
hotProducts() { //热销车型
let that = this
let token = wx.getStorageSync("token")
let decorations = that.data.decorations
let s4_id = decorations.id
console.log(s4_id);
if (token) {
wx.navigateTo({
url: '/pages/VSpikeMall/VSpikeMall?id=' + s4_id
})
} else {
this.setData({
msg: '请登录后操作'
})
this.popTest()
}
},
goReservation() {
let that = this
let token = wx.getStorageSync("token")
... ... @@ -525,7 +508,6 @@ Page({
title: that.data.decorations.name || "车唛分享", // 默认是小程序的名称(可以写slogan等)
path: '/pages/Vnew4Sstore/Vnew4Sstore', // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
};
// 返回shareObj
return shareObj;
... ... @@ -534,54 +516,50 @@ Page({
toGoDetailA(e) {
let that = this
let idata = e.currentTarget.dataset.idata
let jump = idata.jump_type
let good_type = Number(idata.good_type1)
let good_id = idata.good1_id
that.publicDetails(jump, good_type, good_id)
},
toGoDetailB(e) {
let that = this
let idata = e.currentTarget.dataset.idata
let jump = idata.jump_type
let good_type = Number(idata.good_type2)
let good_id = idata.good2_id
that.publicDetails(jump, good_type, good_id)
let good_type = Number(e.currentTarget.dataset.good_type)
let type = e.currentTarget.dataset.type
that.publicDetails(type, good_type)
},
toGoDetailC(e) {
publicDetails(type, good_type) {
let that = this
let idata = e.currentTarget.dataset.idata
let jump = idata.jump_type
let good_type = Number(idata.good_type3)
let good_id = idata.good3_id
that.publicDetails(jump, good_type, good_id)
},
publicDetails(jump, good_type, good_id) {
if (jump == 1) { //可以跳转
console.log(type, good_type, "珊瑚");
let decorations = that.data.decorations
let s4_id = decorations.id
if (type == 1) { //可以跳转
switch (good_type) {
case 1: // 人气好物
wx.navigateTo({
url: '/pages/detail/detail?id=' + good_id
url: '/pages/VSpikeMall/VSpikeMall?id_name=' + '人气好物' + '&id=' + s4_id
})
break;
case 2: // 精选推荐
wx.navigateTo({
url: '/pages/productdetailsImg/productdetailsImg?id=' + good_id
url: '/pages/VSpikeMall/VSpikeMall?id_name=' + '精选推荐' + '&id=' + s4_id
})
break;
case 3: // 团购热卖
wx.navigateTo({
url: '/pages/VtuanDetail/VtuanDetail?id' + good_id
url: '/pages/VSpikeMall/VSpikeMall?id_name=' + '团购热卖' + '&id=' + s4_id
})
break;
case 4: //限时抢购
wx.navigateTo({
url: '/pages/VSpikeMallDetail/VSpikeMallDetail?id=' + good_id
url: '/pages/VSpikeMall/VSpikeMall?id_name=' + '限时抢购' + '&id=' + s4_id
})
break;
case 5: //车型商品
wx.navigateTo({
url: '/pages/carDetails/carDetails?id=' + good_id
url: '/pages/VSpikeMall/VSpikeMall?id_name=' + '车型商品' + '&id=' + s4_id
})
break;
case -1: //活动列表
wx.navigateTo({
url: '/pages/goPromotion/goPromotion?id=' + s4_id
})
break;
case -2: //活动列表
wx.navigateTo({
url: '/pages/goPromotion/goPromotion?id=' + s4_id
})
break;
default:
... ...
... ... @@ -113,14 +113,14 @@
<view class="week_hot" wx:if="{{goodDetal.length !=0}}">
<view class="star_name">本周特卖</view>
<view class="week_box">
<view class="left_big" bindtap="hotProducts" data-tir="0">
<view class="left_big" bindtap="toGoDetailA" data-type="{{goodDetal.type}}" data-good_type="{{goodDetal.good_type1}}" data-tir="0">
<image src="{{goodDetal.img1}}" />
</view>
<view class="rt_box">
<view class="ry_top" catchtap="hotProducts" data-tir="1">
<view class="ry_top" catchtap="toGoDetailA" data-type="{{goodDetal.type}}" data-good_type="{{goodDetal.good_type2}}" data-tir="1">
<image src="{{goodDetal.img2}}" />
</view>
<view class="ry_down" catchtap="hotProducts" data-tir="2">
<view class="ry_down" catchtap="toGoDetailA" data-type="{{goodDetal.type}}" data-good_type="{{goodDetal.good_type3}}" data-tir="2">
<image src="{{goodDetal.img3}}" />
</view>
</view>
... ...
... ... @@ -42,13 +42,17 @@ Page({
id: options.id,
num: options.num,
gui_arr: options.gui_arr,
tuan_id: options.tuan_id || ''
tuan_id: options.tuan_id || '',
})
console.log("我走了换作了");
} else {
that.setData({
id: options.id,
num: options.num,
tuan_id: options.tuan_id
})
console.log("我i的");
}
that.getConfirmAnOrder()
},
... ...
... ... @@ -30,14 +30,23 @@ Page({
tuan_id: '',
shop_id: '',
onclick: 1,
is_share: 0,
},
onLoad: function (options) {
let that = this
console.log(options);
that.setData({
id: options.id,
})
if (options.is_share == 1) {
console.log('是分享进入');
this.setData({
is_share: options.is_share,
id: options.id,
})
} else {
that.setData({
id: options.id,
})
}
this.getTuanDetail()
},
onShow: function () {
... ... @@ -48,7 +57,13 @@ Page({
},
goback() {
wx.navigateBack()
if (this.data.is_share == 1) {
wx.reLaunch({
url: '/pages/home/home'
})
} else {
wx.navigateBack()
}
},
onChange(e) {
this.setData({
... ... @@ -138,17 +153,36 @@ Page({
})
}
},
onclickitem(e) {
async onclickitem(e) {
let that = this
console.log(e);
let tuan_id = e.currentTarget.dataset.tuan_id
let shop_id = e.currentTarget.dataset.id
let onclick = e.currentTarget.dataset.onclick
this.setData({
that.setData({
tuan_id,
shop_id,
onclick
})
this.clickme()
try {
const {
data
} = await request({
url: 'api/shop2/checkPin',
data: {
tuan_id: tuan_id,
}
})
console.log(data);
if (data.code == 1) {
that.clickme()
}
} catch (err) {
console.log(err);
a.popTest(err.msg)
}
console.log(tuan_id, "我是团id");
},
pingdanOn(e) {
... ... @@ -405,7 +439,7 @@ Page({
var that = this;
var shareObj = {
title: that.data.tuanDetail.goods_name, // 默认是小程序的名称(可以写slogan等)
path: '/pages/VtuanDetail/VtuanDetail?id=' + that.data.id, // 默认是当前页面,必须是以‘/’开头的完整路径
path: '/pages/VtuanDetail/VtuanDetail?id=' + that.data.id + '&is_share=1', // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
};
// 返回shareObj
... ...
... ... @@ -241,18 +241,20 @@ page {
display: flex;
align-items: center;
image {
.img_item1 {
width: 72rpx;
height: 72rpx;
border-radius: 50%;
margin-left: -30%;
flex-shrink: 0;
margin-left: -36rpx;
&:first-child {
margin: 0
margin: 0;
}
image {
width: 100%;
border-radius: 50%;
flex-shrink: 0;
}
}
}
... ... @@ -262,7 +264,7 @@ page {
align-items: center;
.pin_na_a {
max-width: 100rpx;
max-width: 60rpx;
font-size: 28rpx;
font-family: PingFang SC,
PingFang SC-Regular;
... ... @@ -883,18 +885,20 @@ page {
display: flex;
align-items: center;
image {
.img_item1 {
width: 72rpx;
height: 72rpx;
border-radius: 50%;
margin-left: -30%;
flex-shrink: 0;
margin-left: -36rpx;
&:first-child {
margin: 0
margin: 0;
}
image {
width: 100%;
border-radius: 50%;
flex-shrink: 0;
}
}
}
... ... @@ -904,7 +908,7 @@ page {
align-items: center;
.pin_na {
max-width: 100rpx;
max-width: 60rpx;
font-size: 28rpx;
font-family: PingFang SC,
PingFang SC-Regular;
... ...
... ... @@ -47,12 +47,14 @@
<view class="pin_box_a" wx:if="{{item.sheng_time*1000 != 0}}">
<view class="lef_pin_a">
<view class="image_list_a">
<block wx:for="{{item.img_arr}}" wx:for-index="index1" wx:key="index1" wx:for-item="item1">
<image src="{{item1}}" />
<block wx:for="{{item.img_arr}}" wx:for-index="index1" wx:if="{{index1<5}}" wx:key="index1" wx:for-item="item1">
<view class="img_item1">
<image src="{{item1}}" />
</view>
</block>
</view>
<view class="nickname_list_a">
<block wx:for="{{item.nickname_arr}}" wx:for-index="index1" wx:key="index1" wx:for-item="item1">
<block wx:for="{{item.nickname_arr}}" wx:for-index="index1" wx:if="{{index1 <2}}" wx:key="index1" wx:for-item="item1">
<view class="pin_na_a">{{item1}}{{item.nickname_arr.length >1?'、' :''}}</view>
</block>
</view>
... ... @@ -211,12 +213,14 @@
<view class="pin_box">
<view class="lef_pin">
<view class="image_list">
<block wx:for="{{item.img_arr}}" wx:for-index="index1" wx:key="index1" wx:for-item="item1">
<image src="{{item1}}" />
<block wx:for="{{item.img_arr}}" wx:for-index="index1" wx:if="{{index1 < 5}}" wx:key="index1" wx:for-item="item1">
<view class="img_item1">
<image src="{{item1}}" />
</view>
</block>
</view>
<view class="nickname_list" wx:if="{{item.nickname_arr.length !=0}}">
<block wx:for="{{item.nickname_arr}}" wx:for-index="index1" wx:key="index1" wx:for-item="item1">
<block wx:for="{{item.nickname_arr}}" wx:for-index="index1" wx:if="{{index1 <2}}" wx:key="index1" wx:for-item="item1">
<view class="pin_na">{{item1}}{{item.nickname_arr.length >1?'、' :''}}</view>
</block>
</view>
... ...
... ... @@ -455,23 +455,26 @@ page {
display: flex;
align-items: center;
}
.container .health .pindannet .pin_list .pin_box_a .lef_pin_a .image_list_a image {
.container .health .pindannet .pin_list .pin_box_a .lef_pin_a .image_list_a .img_item1 {
width: 72rpx;
height: 72rpx;
border-radius: 50%;
margin-left: -30%;
flex-shrink: 0;
margin-left: -36rpx;
}
.container .health .pindannet .pin_list .pin_box_a .lef_pin_a .image_list_a image:first-child {
.container .health .pindannet .pin_list .pin_box_a .lef_pin_a .image_list_a .img_item1:first-child {
margin: 0;
}
.container .health .pindannet .pin_list .pin_box_a .lef_pin_a .image_list_a .img_item1 image {
width: 100%;
border-radius: 50%;
flex-shrink: 0;
}
.container .health .pindannet .pin_list .pin_box_a .lef_pin_a .nickname_list_a {
margin-left: 20rpx;
display: flex;
align-items: center;
}
.container .health .pindannet .pin_list .pin_box_a .lef_pin_a .nickname_list_a .pin_na_a {
max-width: 100rpx;
max-width: 60rpx;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: 400;
... ... @@ -957,23 +960,26 @@ page {
display: flex;
align-items: center;
}
.container .zan_dialog__container .d_popup .pup .ping_list .pin_box .lef_pin .image_list image {
.container .zan_dialog__container .d_popup .pup .ping_list .pin_box .lef_pin .image_list .img_item1 {
width: 72rpx;
height: 72rpx;
border-radius: 50%;
margin-left: -30%;
flex-shrink: 0;
margin-left: -36rpx;
}
.container .zan_dialog__container .d_popup .pup .ping_list .pin_box .lef_pin .image_list image:first-child {
.container .zan_dialog__container .d_popup .pup .ping_list .pin_box .lef_pin .image_list .img_item1:first-child {
margin: 0;
}
.container .zan_dialog__container .d_popup .pup .ping_list .pin_box .lef_pin .image_list .img_item1 image {
width: 100%;
border-radius: 50%;
flex-shrink: 0;
}
.container .zan_dialog__container .d_popup .pup .ping_list .pin_box .lef_pin .nickname_list {
margin-left: 20rpx;
display: flex;
align-items: center;
}
.container .zan_dialog__container .d_popup .pup .ping_list .pin_box .lef_pin .nickname_list .pin_na {
max-width: 100rpx;
max-width: 60rpx;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: 400;
... ...
... ... @@ -93,8 +93,6 @@ Page({
recommendList: list
})
},
getContent(e) {
let t = this,
i = e.currentTarget.dataset.i,
... ... @@ -105,7 +103,6 @@ Page({
})
},
onReady: function () {
},
... ...
... ... @@ -21,6 +21,7 @@ Page({
red_num: 0,
newcount: 0,
vewPrice: 0,
all_money: 0,
},
onLoad: function (options) {
... ... @@ -82,6 +83,7 @@ Page({
ping_fen: data.ping_fen,
s4_fen: data.s4_fen,
red_num: data.red_num,
all_money: data.all_money,
})
} catch (err) {
... ...
... ... @@ -25,21 +25,6 @@
</view>
</view>
<view class="car_ziliao">
<!-- <view class="car_name">常用车辆</view>
<view class="noLogin">
<view class="addcar" bindtap="goBindCar">
<view class="plate" wx:if="{{center.pai_name1}}">
<view class="d">{{center.pai_name1}}</view>
<view class="dot"></view>
<view class="d">{{center.pai_name2}}</view>
</view>
<view class="nunbers" wx:else>{{che_name1}}</view>
</view>
<view class="add4S" bindtap="go4Sstore">
<text class="bind4S">{{s4_name == '' ?s4_name1 : s4_name}}</text>
<image class="bingImg" src="{{imagesUrl}}assets/static/img/right_arrow.png" />
</view>
</view> -->
<view class="con_count" bindtap="goIntegration" data-typed="1">
<view class="text_con">{{ping_fen}}</view>
<view class="text_name">唛积分</view>
... ... @@ -52,6 +37,10 @@
<view class="text_con">{{red_num}}</view>
<view class="text_name">红包</view>
</view>
<view class="con_count" bindtap="goVbalanceRecharge">
<view class="text_con">{{all_money}}</view>
<view class="text_name">余额</view>
</view>
</view>
<view class="cate">
<view class="scroll_1 catePublic">
... ... @@ -127,7 +116,7 @@
<image src="{{imagesUrl}}assets/static/img/arrow-you.png" />
</view>
</view>
<view class="change_Public" bindtap="goVbalanceRecharge">
<!-- <view class="change_Public" bindtap="goVbalanceRecharge">
<view class="left_public">
<image src="{{imagesUrl}}assets/static/img/w_ga.png" />
<view class="public_name">余额充值</view>
... ... @@ -143,7 +132,7 @@
<image src="{{imagesUrl}}assets/static/img/arrow-you.png" />
</view>
</view>
</view>
</view> -->
<view class="change_Public arrow">
<button open-type="contact" class="transparent"></button>
<view class="left_public ">
... ...
... ... @@ -11,6 +11,7 @@ Page({
imagesUrl: a.globalData.baseUrl,
time: 30 * 60 * 60 * 1000,
timeData: {},
four: 10,
content: '',
showDialog: false,
messageAlert: '',
... ... @@ -93,12 +94,8 @@ Page({
wx.navigateTo({
url: '/pages/distributionChanged/distributionChanged?id=' + id
})
// this.setData({
// showDialog: !this.data.showDialog
// })
},
formSubmit(e) {
// console.log('form发生了submit事件,携带数据为:', e.detail.value)
let phone = e.detail.value.phone
let that = this
if (!(/^1[34578]\d{9}$/.test(phone))) {
... ...
.container {
page {
// background: #f9f9f9;
}
.container {
.details {
width: 100%;
// height: 422rpx;
... ... @@ -84,6 +85,53 @@
}
}
.fen_share {
width: 100%;
padding: 20rpx 0;
box-sizing: border-box;
background: #f9f9f9;
.share_box {
width: 100%;
background-color: #fff;
padding: 10rpx 32rpx;
box-sizing: border-box;
display: flex;
align-items: center;
.share_imgs {
flex: 1;
display: flex;
align-items: center;
.imgs {
width: 88rpx;
height: 88rpx;
border-radius: 50%;
margin-left: -34rpx;
flex-shrink: 0;
&:first-child {
margin: 0
}
// image {
// border-radius: 50%;
// width: 100%;
// }
}
}
.share_name {
max-width: 270rpx;
flex-shrink: 0;
color: #8C9198;
font-size: 28rpx;
}
}
}
.details3 {
width: 100%;
... ...
... ... @@ -30,6 +30,17 @@
</view>
</view>
</view>
<!-- <view class="fen_share">
<view class="share_box">
<view class="share_imgs">
<block wx:for="{{four}}" wx:if="{{index< 6}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<image class="imgs" src="../../static/icon/10_icon@3x.png" />
</block>
<image src="../../static/img/more_img.png" wx:if="{{}}"/>
</view>
<view class="share_name">已有501400人参加</view>
</view>
</view> -->
<view class="details3">
<view class="smalltitle">
<view class="title">活动详情</view>
... ...
... ... @@ -70,6 +70,41 @@
.container .details2 .botto .text .conter_item .scroll_x {
height: 132rpx;
}
.container .fen_share {
width: 100%;
padding: 20rpx 0;
box-sizing: border-box;
background: #f9f9f9;
}
.container .fen_share .share_box {
width: 100%;
background-color: #fff;
padding: 10rpx 32rpx;
box-sizing: border-box;
display: flex;
align-items: center;
}
.container .fen_share .share_box .share_imgs {
flex: 1;
display: flex;
align-items: center;
}
.container .fen_share .share_box .share_imgs .imgs {
width: 88rpx;
height: 88rpx;
border-radius: 50%;
margin-left: -34rpx;
flex-shrink: 0;
}
.container .fen_share .share_box .share_imgs .imgs:first-child {
margin: 0;
}
.container .fen_share .share_box .share_name {
max-width: 270rpx;
flex-shrink: 0;
color: #8C9198;
font-size: 28rpx;
}
.container .details3 {
width: 100%;
padding-bottom: 30rpx;
... ...
... ... @@ -5,11 +5,22 @@ const a = getApp()
Page({
data: {
imagesUrl: a.globalData.baseUrl,
id: '',
s4_id: '',
Promotion: [],
noCar: ''
},
onLoad: function (options) {},
onLoad: function (options) {
let that = this
let token = wx.getStorageSync("token")
that.setData({
s4_id: options.id
})
if (token) {
that.getPromotion()
} else {
that.popConfirm()
}
},
ToActivityDetails(e) {
let id = e.currentTarget.dataset.id
let type = e.currentTarget.dataset.types
... ... @@ -29,24 +40,8 @@ Page({
},
onReady: function () {},
onShow: function () {
let that = this
let token = wx.getStorageSync("token")
if (token) {
wx.showToast({
title: '加载中',
icon: "loading",
duration: 1300
})
setTimeout(() => {
this.getPromotion()
}, 1000);
} else {
that.popConfirm()
}
},
popConfirm: function () {
onShow: function () {},
popConfirm() {
wx.showModal({
title: '提示',
content: '您尚未登录,请登录后操作',
... ... @@ -74,8 +69,11 @@ Page({
} = await
request({
url: 'api/active/index4s',
data: {
s4_id: that.data.s4_id
}
})
if (data.length > 0) {
if (data.length != 0) {
that.setData({
noCar: 0,
Promotion: data
... ... @@ -87,33 +85,21 @@ Page({
})
}
console.log(data);
} catch (err) {
console.log(err);
a.popTest(err.msg)
that.setData({
noCar: 1,
})
}
},
onShareAppMessage(options) {
var that = this;
console.log(that.data.user_id)
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: "车唛分享", // 默认是小程序的名称(可以写slogan等)
path: '/pages/goPromotion/goPromotion', // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
console.log(res);
that.setData({
msg: '易分享'
})
that.popMaskTest()
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {}
},
};
// 返回shareObj
return shareObj;
... ...
... ... @@ -14,5 +14,5 @@
</view>
</view>
</view>
<view class="noCar " wx:else>该4S店尚未发布更多内容</view>
<view class="noCar" wx:else>该4S店尚未发布更多内容</view>
</view>
\ No newline at end of file
... ...
... ... @@ -632,7 +632,7 @@ Page({
break;
case 3: // 团购热卖
wx.navigateTo({
url: '/pages/VtuanDetail/VtuanDetail?id' + good_id
url: '/pages/VtuanDetail/VtuanDetail?id=' + good_id
})
break;
case 4: //限时抢购
... ...
... ... @@ -179,8 +179,8 @@ Page({
let prevPage = pages[pages.length - 2]; //prevPage 是获取上一个页面的js里面的pages的所有信息。-2 是上一个页面,-3是上上个页面以此类推。
prevPage.setData({ // 将我们想要传递的参数在这里直接setData。上个页面就会执行这里的操作。
city_id: val,
}) //上一个页面内执行setData操作,将我们想要的信息保存住。当我们返回去的时候,页面已经处理完毕。
//最后就是返回上一个页面。
})
wx.navigateBack({
delta: 1, // 返回上一级页面。
success: function () {
... ...
... ... @@ -152,21 +152,11 @@ Page({
that.getSearch()
}
},
storeDetail(e) {
console.log(e, "普通商品详情");
let id = e.currentTarget.dataset.id
let img = e.currentTarget.dataset.img
if (img == 1) {
wx.navigateTo({
url: '/pages/productdetailsImg/productdetailsImg?id=' + id
})
} else {
// 无图详情
wx.navigateTo({
url: '/pages/productdetailsImg/productdetailsImg?id=' + id
})
}
goDeailItem(e) { // 普通商品详情
let goods_id = e.currentTarget.dataset.goods_id
wx.navigateTo({
url: '/pages/productdetailsImg/productdetailsImg?id=' + goods_id
})
},
toggleDialog() {
this.setData({
... ...
... ... @@ -32,9 +32,11 @@
"useIsolateContext": true,
"useCompilerModule": false,
"userConfirmedUseCompilerModuleSwitch": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true
"minifyWXSS": true,
"bundle": false
},
"compileType": "miniprogram",
"libVersion": "2.11.0",
... ... @@ -68,6 +70,19 @@
{
"name": "pages/praise/praise",
"pathName": "pages/praise/praise",
"query": "",
"scene": null
},
{
"name": "pages/goPromotion/goPromotion",
"pathName": "pages/goPromotion/goPromotion",
"query": "",
"scene": null
},
{
"name": "pages/VtuanDetail/VtuanDetail",
"pathName": "pages/VtuanDetail/VtuanDetail",
"query": "type=4&id=4073",
"scene": null
}
]
... ...