作者 李芳银

重新整理了组件

// components/popup/popup.js
import {
request
} from "../../request/index.js"
const a = getApp()
Component({
/**
* 组件的属性列表
*/
properties: {
text: {
type: String,
value: ''
}
},
/**
* 组件的初始数据
*/
data: {
showDialog: false,
contentTxt: '暂无评价',
it_true: false,
leftMenuList: [],
// 右侧内容滚动条距离顶部距离
scrollTop: 0,
currentIndex: 0,
rightMenuList: 0,
},
/**
* 组件的方法列表
*/
methods: {
toggleDialog() {
openistrye() {
this.setData({
showDialog: !this.data.showDialog
it_true: true
})
},
async getLeftCates() { // 左分类数据
let that = this;
console.log("我执行了");
const {
data: {
data
}
} = await request({
url: "api/shop/cate",
})
console.log(data, "左分类");
that.setData({
leftMenuList: data
})
},
}
})
\ No newline at end of file
... ...
<view class="zan-dialog {{ !showDialog }}">
<view class="zan-dialog__container">
<view style='padding:100rpx;'>{{contentTxt}}</view>
<view class="skjh" wx:if="{{it_true}}">你大爷的</view>
<view class="cates_container">
<!-- 左侧菜单 -->
<scroll-view class="left_menu" scroll-y>
<view bindtap="handleItemTap" data-index="{{index}}" class="menu_item u-f-ajc {{index===currentIndex?'active':''}}" wx:for="{{leftMenuList}}" wx:key="*this">
{{item.name}}
</view>
</scroll-view>
<!-- 右侧菜单 -->
<scroll-view class="right_menu" scroll-y scroll-top="{{scrollTop}}">
<view class="goods_group" wx:for="{{rightMenuList}}" wx:if="{{rightMenuList!=0}}" wx:for-index="index1" wx:for-item="item1" wx:key="index1">
<!-- 标题 -->
<view class="goods_title u-f-ajc">
<text class="delimiter">/</text>
<text class="title u-f-ajc">{{item1.cat_name}}</text>
<text class="delimiter">/</text>
</view>
<!-- 内容 -->
<view class="goods_list u-f">
<navigator url="/pages/goods_lsit/goods_lsit?cid={{item2.cat_id}}" open-type="navigate" wx:for="{{item1.children}}" wx:for-index="index2" wx:for-item="item2" wx:key="cat_id">
<image src="{{item2.cat_icon}}" mode="widthFix" lazy-load />
<view class="goods_name">{{item2.cat_name}}</view>
</navigator>
</view>
</view>
</scroll-view>
</view>
\ No newline at end of file
... ...
/* 弹窗 */
.zan-dialog__mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 10;
background: rgba(0, 0, 0, 0);
background: rgba(0, 0, 0, 0.4);
display: none;
}
.zan-dialog__container {
margin-left: 7rpx;
position: fixed;
bottom: 400rpx;
width: 90%;
background: #f8f8f8;
transform: translateY(300%);
transition: all 0.4s ease;
z-index: 12;
border-radius: 20rpx;
box-shadow: 0px 3px 3px 2px gainsboro;
}
.zan-dialog--show .zan-dialog__container {
transform: translateY(0);
}
.zan-dialog--show .zan-dialog__mask {
display: block;
}
\ No newline at end of file
{
"usingComponents": {
"tabs": "../../components/tabs/tabs"
"tabs": "../../Components/tabs/tabs"
},
"navigationBarTitleText": "服务订单"
}
\ No newline at end of file
... ...
{
"usingComponents": {
"searchInput": "../../components/searchInput/searchInput"
"searchInput": "../../Components/searchInput/searchInput"
},
"navigationBarTitleText": "4S店",
"navigationBarBackgroundColor": "#e8370f",
... ...
{
"usingComponents": {
"searchInput": "../../components/searchInput/searchInput"
"searchInput": "../../Components/searchInput/searchInput"
},
"navigationBarTitleText": "车唛优选",
"navigationBarBackgroundColor": "#F53526",
... ...
... ... @@ -32,6 +32,7 @@ Page({
// 同 4Sstore 页面相同
onLoad: function (options) {
let that = this
console.log(options);
let s4_id = options.s4_id
console.log(s4_id);
that.setData({
... ... @@ -289,8 +290,11 @@ Page({
}
} = await request({
url: 'api/shop4s2/img3',
data: {
s4_id: that.data.s4_id
}
})
console.log(data);
console.log(data, "三张图");
that.setData({
goodDetal: data
})
... ... @@ -528,6 +532,65 @@ 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)
},
toGoDetailC(e) {
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) { //可以跳转
switch (good_type) {
case 1: // 人气好物
wx.navigateTo({
url: '/pages/detail/detail?id=' + good_id
})
break;
case 2: // 精选推荐
wx.navigateTo({
url: '/pages/productdetailsImg/productdetailsImg?id=' + good_id
})
break;
case 3: // 团购热卖
wx.navigateTo({
url: '/pages/VtuanDetail/VtuanDetail?id' + good_id
})
break;
case 4: //限时抢购
wx.navigateTo({
url: '/pages/VSpikeMallDetail/VSpikeMallDetail?id=' + good_id
})
break;
case 5: //车型商品
wx.navigateTo({
url: '/pages/carDetails/carDetails?id=' + good_id
})
break;
default:
break;
}
} else {
a.popTest('该4s店暂未运营')
}
},
... ...
... ... @@ -117,10 +117,10 @@
<image src="{{goodDetal.img1}}" />
</view>
<view class="rt_box">
<view class="ry_top" bindtap="hotProducts" data-tir="1">
<view class="ry_top" catchtap="hotProducts" data-tir="1">
<image src="{{goodDetal.img2}}" />
</view>
<view class="ry_down" bindtap="hotProducts" data-tir="2">
<view class="ry_down" catchtap="hotProducts" data-tir="2">
<image src="{{goodDetal.img3}}" />
</view>
</view>
... ...
{
"usingComponents": {
"searchInput": "../../components/searchInput/searchInput"
"searchInput": "../../Components/searchInput/searchInput"
},
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
... ...
... ... @@ -74,8 +74,6 @@ Page({
} else {
that.getToken()
}
// 获得popup组件
// this.popup = this.selectComponent("#popup");
},
onShow: function () {
... ...
{
"usingComponents": {
"popup":"../../components/popup/popup"
},
"navigationBarTitleText": "商品详情"
}
\ No newline at end of file
... ...
{
"usingComponents": {
"hunt": "../../components/hunt/hunt"
},
"navigationBarTitleText": "精品配件"
}
\ No newline at end of file
... ...
... ... @@ -25,8 +25,6 @@ Page({
that.setData({
id: options.id,
})
// 获得popup组件
this.popup = this.selectComponent("#popup");
},
onShow: function () {
wx.showToast({
... ...
... ... @@ -47,8 +47,6 @@ Page({
} else {
that.getToken()
}
// 获得popup组件
this.popup = this.selectComponent("#popup");
},
onShow: function () {
... ...
{
"usingComponents": {
"hunt": "../../components/hunt/hunt"
},
"navigationBarTitleText": "促销活动"
}
\ No newline at end of file
... ...
... ... @@ -670,6 +670,7 @@ Page({
async public() {
let that = this
try {
... ...
... ... @@ -14,131 +14,29 @@ Page({
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getNopicture()
this.getZanPerson()
},
onShow: function () {},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that = this
console.log(options);
that.setData({
sku_id: options.id,
goods_id: options.goods_id
})
},
getNopicture() {
let that = this;
request({
url: 'api/shop/infoGoods',
data: {
sku_id: that.data.sku_id,
}
})
.then(res => {
// console.log(that.data.sku_id);
that.setData({
nopicture: res.data.data
})
// console.log(that.data.nopicture);
})
},
getZanPerson() {
let that = this;
console.log('aaaa');
console.log(that.data.goods_id)
request({
url: 'api/shop/listClickGoods',
data: {
goods_id: that.data.goods_id,
}
})
.then(res => {
console.log(that.data.goods_id);
that.setData({
zanPersonList: res.data.data
})
console.log(that.data.zanPersonList);
})
},
onShareAppMessage: function () {
var that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: "转发的标题", // 默认是小程序的名称(可以写slogan等)
path: '/pages/nopicture/nopicture?id=' + that.data.sku_id, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
console.log(res);
if (res.errMsg == 'shareAppMessage:ok') {}
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
// complete: fucntion() {
// // 转发结束之后的回调(转发成不成功都会执行)
// }
};
// 来自页面内的按钮的转发
// if (options.from == 'button') {
// var eData = options.target.dataset;
// console.log(options); // shareBtn
// // 此处可以修改 shareObj 中的内容
// shareObj.path = '/pages/praise/praise?btn_name=' + eData.name;
// }
// 返回shareObj
return shareObj;
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
// 页面初次渲染完成后,使用选择器选择组件实例节点,返回匹配到组件实例对象
this.myComponent = this.selectComponent('#towerId')
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
getNopicture() {
let that = this
console.log(1223333, "我i先走一步");
that.selectComponent("#towerId").getLeftCates()
// let myComponent = this.myComponent
// myComponent.clickitem()
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"usingComponents": {
"popup":"/Components/popup/popup"
},
"navigationBarTitleText": "商品详情"
}
\ No newline at end of file
... ...
<view class="container">
<view class="card">
<view class="card_text">{{nopicture.sku_des_content}}</view>
<view class="card_box">
<view class="card_left">
<view class="del">¥{{nopicture.normal_price}}</view>
<text class="zan_price">点赞价:¥{{nopicture.pay_price}}</text>
<!-- 销量 -->
<view>
<text class="sales ">销量:</text>
<text class="sales ">{{nopicture.weigh}}件</text>
</view>
</view>
<view class="card_right">
<view class="collar">领{{nopicture.score}}唛积分</view>
<text class="all_clear collar">运费:满300包邮</text>
</view>
</view>
</view>
<!-- 10个赞 -->
<view class="praise">
<text class="praise_title">10个赞就能以点赞价购买商品,快去分享吧!</text>
<button>
<image src="{{imagesUrl}}assets/static/img/2_icon@2x.png"></image>
</button>
<button open-type="share">
<image src="{{imagesUrl}}assets/static/img/1_icon@2x.png"></image>
</button>
</view>
<!-- 点赞用户 -->
<view class="praise_person">
<text>点赞用户</text>
</view>
<view class="person_box" wx:for="{{zanPersonList}}" wx:key="*this">
<view class="person_name">
<image src="{{item.avator}}"></image>
<text>{{item.nickname}}</text>
</view>
<!-- <view class="person_name">
<image src="{{imagesUrl}}assets/static/img/Avatar sample 254@2x.png"></image>
<text>用户昵称</text>
</view>
<view class="person_name">
<image src="{{imagesUrl}}assets/static/img/Avatar sample 254@2x.png"></image>
<text>用户昵称</text>
</view> -->
</view>
<!-- 详情 评价 -->
<view class="details">
<view class="details_name">
<text>详情</text>
</view>
<view class="appraise_name">
<text>评价</text>
</view>
</view>
<view class="details_text">
<text>
车内消毒 夏季雨水天气偏多,因此室内会有一股潮湿感,会滋生很多细菌,汽车内也是一样。而且汽车内一天到晚都是封闭的,滋生的病菌更多。所以大家在不用车的时候记得打开汽车窗户、天窗以及通风口通通风。然后…所以大家在不用车的时候记得打开汽车窗户、天窗以及通风口通通风。然后…
</text>
</view>
<!-- 点赞 -->
<view class="praise_box">
<view class="praise_btn">
<image src="{{imagesUrl}}assets/static/img/praise.png"></image>
<text>点赞</text>
</view>
</view>
<view class="bjad" bindtap="getNopicture">点击事件</view>
<popup id="towerId"></popup>
</view>
\ No newline at end of file
... ...
... ... @@ -5,292 +5,14 @@ const a = getApp()
Page({
data: {
imagesUrl: a.globalData.baseUrl,
swiperList: [],
detailsContent: [],
zanPersonList: [],
id: '',
other_id: '', // 分享用户ID
_num: 1,
txtContent: '暂无数据',
content: '',
changeZan: '点赞',
msg: '', // 提示消息
msg: '',
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that = this
console.log("点赞商品详情", options)
that.setData({
id: options.id
})
// 获得popup组件
this.popup = this.selectComponent("#popup");
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
let token = wx.getStorageSync("token")
if (token) {
this.getDetailsContent()
} else {
wx.showModal({
title: '提示',
content: '您尚未登录,请授权登录',
success: function (res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/authorization/authorization'
})
} else {
console.log('点击取消回调')
this.setData({
msg: '请登录后操作'
})
this.popMaskTest()
}
}
})
}
// this.getZanPerson()
},
getDetailsContent() {
let that = this;
request({
url: 'api/shop/zanGoodDetail',
data: {
id: that.data.id,
}
})
.then(res => {
that.setData({
detailsContent: res.data.data,
content: that.text(res.data.data.content)
})
console.log("详情数组2", that.data.detailsContent);
})
},
getZanPerson() {
let that = this;
request({
url: 'api/shop/listClickGoods',
data: {
goods_id: that.data.goods_id,
}
})
.then(res => {
// console.log(that.data.goods_id);
that.setData({
zanPersonList: res.data.data
})
// console.log(that.data.zanPersonList);
})
},
onShareAppMessage(options) {
var that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: "点赞产品", // 默认是小程序的名称(可以写slogan等)
path: '/pages/praise/praise?id=' + that.data.id, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
// console.log(res);
if (res.errMsg == 'shareAppMessage:ok') {
request({
url: 'api/shop/zanGoodDetail',
data: {
id: that.data.id,
other_id: '',
}
})
.then(res => {
that.setData({
other_idList: res.data.data
})
console.log(that.data.zanPersonList);
})
}
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
// complete: fucntion() {
// // 转发结束之后的回调(转发成不成功都会执行)
// }
};
// 返回shareObj
return shareObj;
},
changeTitle(e) {
this.setData({
_num: e.currentTarget.dataset.num
})
// this.popup.toggleDialog()
onLoad: function (options) {
},
// 立即购买
gotopay() {
// this.showModal();
request({
url: 'api/shop/zan',
data: {
id: that.data.id,
other_id: '',
}
})
.then(res => {
that.setData({
other_idList: res.data.data,
changeZan: '已点赞',
msg: res.data.msg
})
this.popSuccessTest()
console.log(that.data.zanPersonList);
})
},
// 加入购物车
addShopCart(e) {
console.log(e, "加入购物车");
id = e.currentTarget.dataset.id
},
// 弹窗
//显示对话框
showModal() {
// 显示遮罩层
var animation = wx.createAnimation({
duration: 200,
timingFunction: "linear",
delay: 0
})
this.animation = animation
animation.translateY(300).step()
this.setData({
animationData: animation.export(),
showModalStatus: true
})
setTimeout(function () {
animation.translateY(0).step()
this.setData({
animationData: animation.export()
})
}.bind(this), 100)
},
//隐藏对话框
hideModal() {
// 隐藏遮罩层
var animation = wx.createAnimation({
duration: 200,
timingFunction: "linear",
delay: 0
})
this.animation = animation
animation.translateY(300).step()
this.setData({
animationData: animation.export(),
})
setTimeout(function () {
animation.translateY(0).step()
this.setData({
animationData: animation.export(),
showModalStatus: false
})
}.bind(this), 100)
},
popConfirm() {
wx.showModal({
title: 'confirm的弹窗',
content: '确认要删除该项吗?',
success: function (res) {
if (res.confirm) {
console.log('点击确认回调')
} else {
console.log('点击取消回调')
}
}
})
},
text(details) {
var texts = ''; //待拼接的内容
while (details.indexOf('<img') != -1) { //寻找img 循环
texts += details.substring('0', details.indexOf('<img') + 4); //截取到<img前面的内容
details = details.substring(details.indexOf('<img') + 4); //<img 后面的内容
if (details.indexOf('style=') != -1 && details.indexOf('style=') < details.indexOf('>')) {
texts += details.substring(0, details.indexOf('style="') + 7) + "width:750rpx;height:auto;margin:0 auto;"; //从 <img 后面的内容 截取到style= 加上自己要加的内容
details = details.substring(details.indexOf('style="') + 7); //style后面的内容拼接
} else {
texts += ' style="width:100%;height:auto;margin:0 auto;" ';
}
}
while (details.indexOf('<td') != -1) { //寻找img 循环
texts += details.substring('0', details.indexOf('<td') + 4); //截取到<img前面的内容
details = details.substring(details.indexOf('<td') + 4); //<img 后面的内容
if (details.indexOf('style=') != -1 && details.indexOf('style=') < details.indexOf('>')) {
texts += details.substring(0, details.indexOf('style="') + 7) + "width:750rpx!important;height:auto;margin:0 auto;"; //从 <img 后面的内容 截取到style= 加上自己要加的内容
details = details.substring(details.indexOf('style="') + 7); //style后面的内容拼接
} else {
texts += ' style="width:750rpx;height:auto;margin:0 auto;" ';
}
}
texts += details; //最后拼接的内容
// console.log(texts)
return texts;
onShow: function () {
},
popSuccessTest() {
wx.showToast({
title: this.data.msg,
icon: '', //默认值是success,就算没有icon这个值,就算有其他值最终也显示success
duration: 2000, //停留时间
})
},
/**
* 用户点击右上角分享
*/
// onShareAppMessage: function () {
// // let url = encodeURIComponent('/packageNews/pages/news_detail/news_detail?news_id=' + this.data.news_id);
// return {
// title: "点赞商品详情",
// path: `api/shop/clickGoods?url=${url}`
// }
// },
})
\ No newline at end of file
... ...
<view class="container">
<view class="top_img">
<swiper class="banner" indicator-dots indicator-color="rgba(255, 255, 255, 0.6)" indicator-active-color="#fff">
<block>
<swiper-item wx:for="{{detailsContent.imgs}}" wx:key="*this" wx:for-item="item">
<image src="{{item}}"></image>
</swiper-item>
</block>
</swiper>
</view>
<!-- 卡片 -->
<view class="cards">
<view class="card">
<view class="card_text">{{detailsContent.name}}</view>
<view class="card_box">
<view class="card_left">
<view class="price_dP">
<view class="zan_price">
<text class="icon_name">点赞价:</text>
<text class="money_icon">¥</text>
<text class="price_big">{{detailsContent.price}}</text>
</view>
<view class="del">
<text class="money_icon">¥</text>
<text class="del_price">{{detailsContent.line_price}}</text>
</view>
</view>
<!-- 销量 -->
<view class="num_buy">
<text class="sales">{{detailsContent.sales_initial}}</text>
<text class="sales_per">位车友推荐</text>
</view>
</view>
<view class="card_right">
<view class="collar">
至少领
<text class="count_num">{{detailsContent.fen}}</text>
唛积分
</view>
<text class="all_clear collar">运费:{{detailsContent.yun_str}}</text>
</view>
</view>
</view>
</view>
<!-- 10个赞 -->
<view class="praise">
<text class="praise_title">10个赞就能以点赞价购买商品,快去分享吧!</text>
<button>
<image src="{{imagesUrl}}assets/static/img/2_icon@2x.png"></image>
</button>
<button open-type="share">
<image src="{{imagesUrl}}assets/static/img/1_icon@2x.png"></image>
</button>
</view>
<!-- 点赞用户 -->
<view class="praise_person">
<text>点赞用户</text>
</view>
<view class="person_box" wx:for="{{zanPersonList}}" wx:key="*this">
<view class="person_name">
<image src="{{item.avator}}"></image>
<text>{{item.nickname}}</text>
</view>
</view>
<!-- 详情 评价 -->
<view class="details">
<view class="details_name {{_num == 1? 'cur':''}}" data-num="1" bindtap="changeTitle">详情</view>
<view class="appraise_name {{_num == 2? 'cur':''}}" data-num="2" bindtap="changeTitle">
评价
<block>
<popup text="{{txtContent}}"></popup>
</block>
</view>
</view>
<view class="details_box">
<!-- 详情 -->
<view class="details_img" wx:if="{{_num == 1}}">
<rich-text nodes="{{content}}"></rich-text>
</view>
<!-- 评价内容 -->
<view class="praise_content" wx:if="{{_num == 2}}">
<view class="person_content">
<view class="left_ziliao">
<view class="imgNum">
<image src="{{imagesUrl}}assets/static/img/mengman.png" />
</view>
<view class="per_item">
<text class="nickname">所罗门的岩石</text>
<view class="dateTime">2019/10/10</view>
</view>
</view>
<view class="praise_star">
<image src="{{imagesUrl}}assets/static/img/haoping_icon@2x.png" />
<text>好评</text>
</view>
</view>
<view class="praise_text"></view>
</view>
</view>
<!-- 点赞 -->
<view class="box_buy">
<view class="buy">
<image src="{{imagesUrl}}assets/static/img/kefu_icon@2x.png"></image>
<button class="btnPay" disabled="true" bindtap="gotopay">{{changeZan}}</button>
</view>
</view>
<!-- 屏幕背景变暗的背景 -->
<view class="commodity_screen" bindtap="hideModal" wx:if="{{showModalStatus}}"></view>
<!-- 弹出框 -->
<view animation="{{animationData}}" class="commodity_attr_box" wx:if="{{showModalStatus}}">
<!-- 关闭 -->
<view class="updown" bindtap="hideModal">
<image src="{{imagesUrl}}assets/static/img/updown.png" />
</view>
<view class="buyStore">
<view class="storeImg">
<image src="{{imagesUrl}}assets/static/img/img27(1).png" />
</view>
<view class="store_cont">
<view class="store_cont_name">
<text>壳牌/Shell 喜力半合成机…</text>
</view>
<view class="storeMoney">
<text>¥88.00</text>
</view>
<view class="yichange" wx:if="{{changed == false}}">
<text class="change__">已选择:</text>
<text class="change__">高端</text>
</view>
</view>
</view>
<!-- 规格 -->
<view class="rules" wx:if="{{changed == false}}">
<view class="left_num">规格</view>
<view class="rules_change">
<view class="up">高端</view>
<view class="down">低端</view>
</view>
</view>
<!-- 数量 -->
<view class="number">
<view class="left_num">数量</view>
<view class="right_num">
<view class="jian_img itemImg_">
<image src="{{imagesUrl}}assets/static/img/jian-.png" />
</view>
<view class="center_num itemImg_">1</view>
<view class="jia_img itemImg_">
<image src="{{imagesUrl}}assets/static/img/jia1.png" />
</view>
</view>
</view>
<view class="btnbuy">
<button class="btnbuy__" size="default"></button>
</view>
</view>
</view>
\ No newline at end of file
.container {
height: 100%;
background-color: #F9F9F9;
/* 十个赞分享 */
/* 点赞用户 */
/* 详情 评价 */
/* 立刻购买 */
/* 弹窗 */
/*使屏幕变暗 */
/*对话框 */
}
.container .top_img {
width: 100%;
height: 422rpx;
}
.container .top_img .banner {
height: 422rpx;
}
.container .top_img .banner image {
width: 100%;
height: 422rpx;
}
.container .cards {
position: relative;
height: 340rpx;
}
.container .cards .card {
width: 686rpx;
padding: 30rpx;
box-sizing: border-box;
background-color: #fff;
border-radius: 20rpx;
position: absolute;
top: 24rpx;
left: 32rpx;
}
.container .cards .card .card_text {
height: 98rpx;
width: 100%;
font-size: 32rpx;
line-height: 60rpx;
color: #06121F;
margin-bottom: 20rpx;
font-weight: bold;
}
.container .cards .card .card_box {
width: 100%;
display: flex;
}
.container .cards .card .card_box .card_left {
flex: 5;
align-items: center;
line-height: 55rpx;
}
.container .cards .card .card_box .card_left .price_dP {
display: flex;
align-items: center;
}
.container .cards .card .card_box .card_left .price_dP .del {
display: flex;
margin-left: 20rpx;
}
.container .cards .card .card_box .card_left .price_dP .del .del_price {
color: #ccc;
font-size: 24rpx;
line-height: 52rpx;
text-decoration: line-through;
}
.container .cards .card .card_box .card_left .price_dP .del .money_icon {
font-size: 24rpx;
line-height: 52rpx;
color: #ccc;
}
.container .cards .card .card_box .card_left .price_dP .zan_price {
display: flex;
align-items: flex-end;
line-height: 55rpx;
}
.container .cards .card .card_box .card_left .price_dP .zan_price .icon_name {
font-size: 28rpx;
color: #FF444B;
}
.container .cards .card .card_box .card_left .price_dP .zan_price .money_icon {
margin-left: 10rpx;
font-size: 20rpx;
line-height: 42rpx;
color: #FF444B;
}
.container .cards .card .card_box .card_left .price_dP .zan_price .price_big {
color: #FF444B;
font-size: 32rpx;
}
.container .cards .card .card_box .card_left .num_buy {
font-size: 24rpx;
display: flex;
align-items: center;
}
.container .cards .card .card_box .card_left .num_buy .sales {
font-size: 28rpx;
}
.container .cards .card .card_box .card_left .num_buy .sales_per {
margin-left: 5rpx;
font-size: 28rpx;
line-height: 70rpx;
}
.container .cards .card .card_box .card_right {
flex: 3;
align-items: center;
line-height: 55rpx;
}
.container .cards .card .card_box .card_right .collar {
font-size: 24rpx;
color: #000;
}
.container .cards .card .card_box .card_right .count_num {
font-size: 26rpx;
}
.container .praise {
width: 100%;
height: 86rpx;
background-color: #fff;
display: flex;
margin-bottom: 16rpx;
}
.container .praise .praise_title {
font-size: 24rpx;
color: #E8370F;
height: 86rpx;
line-height: 86rpx;
margin-left: 32rpx;
}
.container .praise button {
background-color: transparent;
padding: 0;
}
.container .praise button image {
width: 48rpx;
height: 48rpx;
margin: 20rpx 10rpx;
}
.container .praise button:not([size='mini']) {
width: 60rpx !important;
}
.container .praise_person {
width: 100%;
height: 80rpx;
line-height: 80rpx;
background-color: #fff;
margin-bottom: 10rpx;
}
.container .praise_person text {
font-size: 32rpx;
font-weight: 700;
margin-left: 32rpx;
}
.container .person_box {
margin-bottom: 20rpx;
padding-bottom: 30rpx;
box-sizing: border-box;
height: 100%;
background-color: #fff;
}
.container .person_box .person_name {
width: 100%;
display: flex;
height: 90rpx;
line-height: 90rpx;
background-color: #fff;
padding: 20rpx 32rpx;
box-sizing: border-box;
}
.container .person_box .person_name image {
width: 72rpx;
height: 72rpx;
}
.container .person_box .person_name text {
font-size: 24rpx;
margin-left: 20rpx;
font-weight: 500;
}
.container .details {
width: 100%;
height: 130rpx;
background-color: #fff;
padding: 32rpx 32rpx;
box-sizing: border-box;
display: flex;
}
.container .details .details_name {
font-size: 28rpx;
height: 90rpx;
line-height: 90rpx;
}
.container .details .appraise_name {
font-size: 28rpx;
height: 90rpx;
line-height: 90rpx;
margin: 0 70rpx;
}
.container .details .cur {
border-bottom: 4rpx solid #E8370F;
font-weight: 700;
font-size: 36rpx !important;
}
.container .details_img {
padding: 32rpx;
box-sizing: border-box;
background-color: #fff;
padding-bottom: 150rpx;
}
.container .box_buy {
width: 100%;
background-color: #fff;
border-top: solid 1rpx #F9F9F9;
padding: 10rpx 0;
box-sizing: border-box;
position: fixed;
bottom: 0;
left: 0;
}
.container .box_buy .buy {
width: 100%;
height: 90rpx;
display: flex;
padding: 0 20rpx;
box-sizing: border-box;
}
.container .box_buy .buy image {
/* flex: 1; */
width: 44rpx;
height: 44rpx;
position: absolute;
top: 33rpx;
left: 50rpx;
}
.container .box_buy .buy text {
/* width: 588rpx; */
flex: 6;
color: #fff;
background-color: #E8370F;
text-align: center;
line-height: 90rpx;
margin-left: 106rpx;
border-radius: 15rpx;
}
.container .commodity_screen {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: #000;
opacity: 0.2;
overflow: hidden;
z-index: 1000;
color: #fff;
}
.container .commodity_attr_box {
height: 600rpx;
width: 100%;
overflow: hidden;
position: fixed;
bottom: 0;
left: 0;
z-index: 2000;
background: #fff;
padding: 20rpx;
box-sizing: border-box;
}
.container .commodity_attr_box .updown {
width: 100%;
text-align: right;
}
.container .commodity_attr_box .updown image {
width: 40rpx;
height: 40rpx;
}
.container .commodity_attr_box .buyStore {
display: flex;
align-items: center;
}
.container .commodity_attr_box .buyStore .storeImg {
width: 184rpx;
height: 184rpx;
}
.container .commodity_attr_box .buyStore .storeImg image {
width: 100%;
}
.container .commodity_attr_box .buyStore .store_cont {
flex: 1;
padding-left: 20rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
.container .commodity_attr_box .buyStore .store_cont .store_cont_name {
line-height: 50rpx;
}
.container .commodity_attr_box .buyStore .store_cont .store_cont_name text {
font-size: 28rpx;
line-height: 40rpx;
font-weight: 600;
}
.container .commodity_attr_box .buyStore .store_cont .storeMoney {
margin-top: 30rpx;
}
.container .commodity_attr_box .buyStore .store_cont .storeMoney text {
font-size: 28rpx;
color: #E8370F;
line-height: 40rpx;
font-weight: 600;
}
.container .commodity_attr_box .buyStore .store_cont .yichange {
margin-top: 15rpx;
}
.container .commodity_attr_box .buyStore .store_cont .yichange .change__ {
font-size: 28rpx;
line-height: 40rpx;
font-weight: 600;
margin-right: 20rpx;
}
.container .commodity_attr_box .rules {
margin-top: 50rpx;
}
.container .commodity_attr_box .rules .left_num {
font-size: 28rpx;
line-height: 40rpx;
font-weight: 600;
}
.container .commodity_attr_box .rules .rules_change {
display: flex;
align-items: center;
margin: 30rpx 0 30rpx;
}
.container .commodity_attr_box .rules .rules_change .up {
width: 184rpx;
line-height: 56rpx;
background: #f9f9f9;
border: 2rpx solid #e8370f;
opacity: 1;
border-radius: 36rpx;
text-align: center;
color: #e8370f;
}
.container .commodity_attr_box .rules .rules_change .down {
margin-left: 30rpx;
width: 184rpx;
line-height: 56rpx;
background: #eeeeee;
opacity: 1;
border-radius: 36rpx;
text-align: center;
}
.container .commodity_attr_box .rules .rules_change .changed {
color: #e8370f;
border: 2rpx solid #e8370f;
}
.container .commodity_attr_box .number {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 50rpx;
padding: 0 10rpx;
box-sizing: border-box;
}
.container .commodity_attr_box .number .left_num {
font-size: 28rpx;
line-height: 40rpx;
font-weight: 600;
}
.container .commodity_attr_box .number .right_num {
display: flex;
align-items: center;
}
.container .commodity_attr_box .number .right_num .itemImg_ {
width: 40rpx;
height: 40rpx;
}
.container .commodity_attr_box .number .right_num .itemImg_ image {
width: 100%;
}
.container .commodity_attr_box .number .right_num .center_num {
margin: 0 10rpx;
width: 60rpx;
text-align: center;
}
.container .commodity_attr_box .btnbuy {
width: 100%;
position: fixed;
bottom: 0;
padding: 0;
}
.container .commodity_attr_box .btnbuy .btnbuy__ {
height: 100rpx;
width: 92%;
color: #fff;
line-height: 100rpx;
padding: 0;
margin: 0 10rpx 10rpx;
box-sizing: border-box;
font-weight: 400;
background-color: #E8370F;
}
\ No newline at end of file
... ... @@ -21,8 +21,6 @@ Page({
that.setData({
id: options.id,
})
// 获得popup组件
this.popup = this.selectComponent("#popup");
},
onShow: function () {
this.getDetailsContent()
... ...
{
"usingComponents": {
"hunt":"../../components/hunt/hunt"
},
"navigationBarTitleText": "搜索"
}
\ No newline at end of file
... ...
{
"usingComponents": {
"hunt": "../../components/hunt/hunt"
},
"navigationBarTitleText": "商城列表",
"backgroundTextStyle": "dark"
... ...
... ... @@ -67,6 +67,11 @@ Page({
that.getGroom()
},
ashdl() {
wx.navigateTo({
url: '/pages/nopicture/nopicture'
})
},
goSearch() {
wx.navigateTo({
url: '/pages/search/search'
... ...
... ... @@ -59,128 +59,15 @@
"miniprogram": {
"list": [
{
"name": "pages/V4Sstores/V4Sstores",
"pathName": "pages/V4Sstores/V4Sstores",
"query": "",
"scene": null
},
{
"name": "pages/4Sstore/4Sstore",
"pathName": "pages/4Sstore/4Sstore",
"query": "",
"scene": null
},
{
"name": "pages/Vnewhome/Vnewhome",
"pathName": "pages/Vnewhome/Vnewhome",
"query": "",
"scene": null
},
{
"name": "pages/VSpikeMall/VSpikeMall",
"pathName": "pages/VSpikeMall/VSpikeMall",
"query": "",
"scene": null
},
{
"name": "pages/confirmStoreOrder/confirmStoreOrder",
"pathName": "pages/confirmStoreOrder/confirmStoreOrder",
"query": "",
"scene": null
},
{
"name": "pages/home/home",
"pathName": "pages/home/home",
"query": "",
"scene": null
},
{
"name": "pages/appraise/appraise",
"pathName": "pages/appraise/appraise",
"query": "order_no=JB0294121560134115069",
"scene": null
},
{
"name": "pages/addcars/addcars",
"pathName": "pages/addcars/addcars",
"query": "",
"scene": null
},
{
"name": "pages/stores/index",
"pathName": "pages/stores/index",
"query": "",
"scene": null
},
{
"name": "pages/VSpikeMall/VSpikeMall",
"pathName": "pages/VSpikeMall/VSpikeMall",
"query": "id=1",
"scene": null
},
{
"name": "pages/Vnew4Sstore/Vnew4Sstore",
"pathName": "pages/Vnew4Sstore/Vnew4Sstore",
"query": "s4_id=1",
"scene": null
},
{
"name": "pages/nobinding4S/nobinding4S",
"pathName": "pages/nobinding4S/nobinding4S",
"query": "",
"scene": null
},
{
"name": "pages/VSpikeMall/VSpikeMall",
"pathName": "pages/VSpikeMall/VSpikeMall",
"query": "s4_id=1",
"scene": null
},
{
"name": "pages/VSpikeMall/VSpikeMall",
"pathName": "pages/VSpikeMall/VSpikeMall",
"query": "s4_id=1&page=1",
"scene": null
},
{
"name": "pages/VSpikeMallDetail/VSpikeMallDetail",
"pathName": "pages/VSpikeMallDetail/VSpikeMallDetail",
"query": "id=63",
"scene": null
},
{
"name": "pages/productdetailsImg/productdetailsImg",
"pathName": "pages/productdetailsImg/productdetailsImg",
"query": "type=1&id=63",
"scene": null
},
{
"name": "pages/MyGarageNoCar/MyGarageNoCar",
"pathName": "pages/MyGarageNoCar/MyGarageNoCar",
"query": "",
"scene": null
},
{
"name": "pages/center/index",
"pathName": "pages/center/index",
"query": "",
"scene": null
},
{
"name": "pages/V4Sstores/V4Sstores",
"pathName": "pages/V4Sstores/V4Sstores",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/stores/index",
"pathName": "pages/stores/index",
"query": "",
"scene": null
},
{
"name": "pages/searchList/searchList",
"pathName": "pages/searchList/searchList",
"name": "pages/praise/praise",
"pathName": "pages/praise/praise",
"scene": null
}
]
... ...