部分
This commit is contained in:
parent
68a7aea72c
commit
f9ef1a34bd
2
app.wxss
2
app.wxss
@ -364,5 +364,5 @@ template {
|
||||
}
|
||||
image {
|
||||
background-size: cover;
|
||||
background-image: url("http://luyuan.tk/static/images/TIM%E5%9B%BE%E7%89%8720191214113605.jpg");
|
||||
/* background-image: url("http://luyuan.tk/static/images/TIM%E5%9B%BE%E7%89%8720191214113605.jpg"); */
|
||||
}
|
||||
|
@ -1,16 +1,17 @@
|
||||
Component({
|
||||
properties: {
|
||||
types: Array
|
||||
types: Array,
|
||||
ids: Number
|
||||
|
||||
},
|
||||
data: {
|
||||
id: 0
|
||||
},
|
||||
methods: {
|
||||
select(a) {
|
||||
// console.log(this.data.a.target.dataset.id)
|
||||
// console.log(a.target.dataset.id)
|
||||
this.setData({
|
||||
id: a.target.dataset.id
|
||||
ids: a.target.dataset.id
|
||||
})
|
||||
this.triggerEvent("select",{id:a.target.dataset.id})
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
<scroll-view class="navigation" scroll-y="{{true}}" bind:tap="select" >
|
||||
<view wx:for="{{types}}" data-id="{{index}}" class="{{id == index?'on' : ''}}">{{item.name}}</view>
|
||||
<!-- {{ids}} -->
|
||||
<view wx:for="{{types}}" data-id="{{item.id}}" class="{{ids == item.id?'on' : ''}}">{{item.name}}</view>
|
||||
<!-- <view data-id="0" class="{{id == 0?'on' : ''}}">热门商品</view>
|
||||
<view data-id="1" class="{{id == 1?'on' : ''}}">美容健身</view>
|
||||
<view data-id="2" class="{{id == 2?'on' : ''}}">美容健身</view>
|
||||
|
@ -9,7 +9,7 @@
|
||||
>image{
|
||||
width: 42rpx;
|
||||
height: 42rpx;
|
||||
background-color: #000;
|
||||
// background-color: #000;
|
||||
margin-left: 40rpx;
|
||||
margin-top: 17rpx;
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
.search{width:613rpx;height:76rpx;margin-top:30rpx;box-sizing:border-box;border-radius:15rpx;display:flex;border:1rpx solid #c6c6c6}.search>image{width:42rpx;height:42rpx;background-color:#000;margin-left:40rpx;margin-top:17rpx}.search>input{height:30rpx;width:480rpx;margin-top:20rpx;margin-left:17rpx;font-size:30rpx}
|
||||
.search{width:613rpx;height:76rpx;margin-top:30rpx;box-sizing:border-box;border-radius:15rpx;display:flex;border:1rpx solid #c6c6c6}.search>image{width:42rpx;height:42rpx;margin-left:40rpx;margin-top:17rpx}.search>input{height:30rpx;width:480rpx;margin-top:20rpx;margin-left:17rpx;font-size:30rpx}
|
||||
|
@ -9,7 +9,7 @@
|
||||
.image {
|
||||
width: 141rpx;
|
||||
height: 150rpx;
|
||||
background-color: #000;
|
||||
// background-color: #000;
|
||||
margin-left: 34rpx;
|
||||
}
|
||||
.introduce {
|
||||
|
@ -1 +1 @@
|
||||
.commodity{margin-top:20rpx;background-color:#fff}.commodity .message{padding:35rpx;display:flex;align-items:center;border-bottom:1rpx solid #F2F2F2}.commodity .message .image{width:141rpx;height:150rpx;background-color:#000;margin-left:34rpx}.commodity .message .introduce{margin-left:32rpx;height:120rpx;display:flex;flex-direction:column;justify-content:space-between;width:362rpx}.commodity .message .introduce .title{font-size:28rpx;color:#333}.commodity .message .introduce .count{font-size:24rpx;color:#999;display:flex}.commodity .message .introduce .count>view{margin-right:27rpx}.commodity .message .parameter{width:150rpx;height:120rpx;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end}.commodity .aggregate{display:flex;box-sizing:border-box;padding:30rpx;justify-content:flex-end;font-size:22rpx;color:#999;height:78rpx;border-bottom:1rpx solid #F2F2F2}.commodity .aggregate>text{color:#333;margin:0 5rpx}.commodity .operation{height:84rpx;display:flex;justify-content:flex-end;padding:0 30rpx;align-items:center}.commodity .operation .button{width:133rpx;height:51rpx;border:2rpx solid #999999;border-radius:26rpx;text-align:center;font-size:22rpx;color:#999999;line-height:51rpx;margin-right:8rpx}.commodity .operation .hlight{border:2rpx solid #47c877;color:#47C877}
|
||||
.commodity{margin-top:20rpx;background-color:#fff}.commodity .message{padding:35rpx;display:flex;align-items:center;border-bottom:1rpx solid #F2F2F2}.commodity .message .image{width:141rpx;height:150rpx;margin-left:34rpx}.commodity .message .introduce{margin-left:32rpx;height:120rpx;display:flex;flex-direction:column;justify-content:space-between;width:362rpx}.commodity .message .introduce .title{font-size:28rpx;color:#333}.commodity .message .introduce .count{font-size:24rpx;color:#999;display:flex}.commodity .message .introduce .count>view{margin-right:27rpx}.commodity .message .parameter{width:150rpx;height:120rpx;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end}.commodity .aggregate{display:flex;box-sizing:border-box;padding:30rpx;justify-content:flex-end;font-size:22rpx;color:#999;height:78rpx;border-bottom:1rpx solid #F2F2F2}.commodity .aggregate>text{color:#333;margin:0 5rpx}.commodity .operation{height:84rpx;display:flex;justify-content:flex-end;padding:0 30rpx;align-items:center}.commodity .operation .button{width:133rpx;height:51rpx;border:2rpx solid #999999;border-radius:26rpx;text-align:center;font-size:22rpx;color:#999999;line-height:51rpx;margin-right:8rpx}.commodity .operation .hlight{border:2rpx solid #47c877;color:#47C877}
|
||||
|
@ -17,7 +17,7 @@ border-bottom: 1rpx solid #F2F2F2;
|
||||
.image {
|
||||
width: 141rpx;
|
||||
height: 150rpx;
|
||||
background-color: #000;
|
||||
// background-color: #000;
|
||||
margin-left: 34rpx;
|
||||
}
|
||||
.introduce {
|
||||
|
@ -1 +1 @@
|
||||
.towline{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.message{padding:35rpx;display:flex;align-items:center;border-bottom:1rpx solid #F2F2F2}.message .image{width:141rpx;height:150rpx;background-color:#000;margin-left:34rpx}.message .introduce{margin-left:32rpx;height:120rpx;display:flex;flex-direction:column;justify-content:space-between;width:362rpx}.message .introduce .title{font-size:28rpx;color:#333}.message .introduce .count{font-size:24rpx;color:#999;display:flex}.message .introduce .count>view{margin-right:27rpx}.message .parameter{width:150rpx;height:120rpx;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end}
|
||||
.towline{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.message{padding:35rpx;display:flex;align-items:center;border-bottom:1rpx solid #F2F2F2}.message .image{width:141rpx;height:150rpx;margin-left:34rpx}.message .introduce{margin-left:32rpx;height:120rpx;display:flex;flex-direction:column;justify-content:space-between;width:362rpx}.message .introduce .title{font-size:28rpx;color:#333}.message .introduce .count{font-size:24rpx;color:#999;display:flex}.message .introduce .count>view{margin-right:27rpx}.message .parameter{width:150rpx;height:120rpx;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end}
|
||||
|
@ -4,7 +4,10 @@ Component({
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
|
||||
name:String,
|
||||
number:String,
|
||||
phone:String,
|
||||
addr:String
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -1,12 +1,12 @@
|
||||
<view class="orderchooseaddr" bindtap="choose">
|
||||
<view class="left">
|
||||
<view class="userinfo">
|
||||
<text class="username">于于宇 15698857895</text>
|
||||
<text>邮政编码:677467</text>
|
||||
<text class="username">{{name == "" ? "请选择地址" :name}} {{phone}}</text>
|
||||
<text>邮政编码:{{number}}</text>
|
||||
</view>
|
||||
<view class="addr">
|
||||
中国大陆 山东省 青岛市 即墨区 纯阳路 某某某小区
|
||||
</view>
|
||||
{{addr}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="right"></view>
|
||||
</view>
|
@ -11,13 +11,23 @@ Component({
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
id:0
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
|
||||
a(a){
|
||||
// console.log(a)
|
||||
this.setData({
|
||||
id:0
|
||||
})
|
||||
},
|
||||
b(){
|
||||
this.setData({
|
||||
id:1
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -1,10 +1,10 @@
|
||||
<view class="chooseway">
|
||||
<view class="item item1">
|
||||
<view class="select selected"></view>
|
||||
<view class="chooseway" >
|
||||
<view class="item item1" bind:tap="a">
|
||||
<view class="select {{id == 0 ? 'selected' : ''}}"></view>
|
||||
<text class="way">快递配送</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="select"></view>
|
||||
<view class="item" bind:tap="b">
|
||||
<view class="select {{id == 1 ? 'selected' : ''}}"></view>
|
||||
<text class="way">到店自取</text>
|
||||
</view>
|
||||
</view>
|
@ -5,7 +5,7 @@
|
||||
.image {
|
||||
width: 171rpx;
|
||||
height: 168rpx;
|
||||
background-color: #000;
|
||||
// background-color: #000;
|
||||
}
|
||||
.message {
|
||||
margin-left: 24rpx;
|
||||
|
@ -1 +1 @@
|
||||
.merchandise{padding:46rpx 32rpx;display:flex;border-bottom:20rpx solid #fbfbfb}.merchandise .image{width:171rpx;height:168rpx;background-color:#000}.merchandise .message{margin-left:24rpx}.merchandise .message .title{font-size:26rpx;color:#333;width:491rpx;margin-bottom:9rpx}.merchandise .message .brief{font-size:22rpx;color:#999;margin-bottom:26rpx}.merchandise .message .price{font-size:28rpx;color:#ff4e6c}
|
||||
.merchandise{padding:46rpx 32rpx;display:flex;border-bottom:20rpx solid #fbfbfb}.merchandise .image{width:171rpx;height:168rpx}.merchandise .message{margin-left:24rpx}.merchandise .message .title{font-size:26rpx;color:#333;width:491rpx;margin-bottom:9rpx}.merchandise .message .brief{font-size:22rpx;color:#999;margin-bottom:26rpx}.merchandise .message .price{font-size:28rpx;color:#ff4e6c}
|
||||
|
@ -42,6 +42,7 @@ Component({
|
||||
num:this.data.num
|
||||
}
|
||||
}).then((res)=>{
|
||||
this.triggerEvent('gai', {id:this.data.gid,num:this.data.num})
|
||||
|
||||
})
|
||||
|
||||
@ -58,7 +59,7 @@ Component({
|
||||
num:this.data.num
|
||||
}
|
||||
}).then((res)=>{
|
||||
|
||||
this.triggerEvent('gai', {id:this.data.gid,num:this.data.num})
|
||||
})
|
||||
},
|
||||
sel(){
|
||||
|
@ -226,6 +226,10 @@ Page({
|
||||
}
|
||||
}).then((res)=>{
|
||||
console.log(res)
|
||||
wx.showToast({
|
||||
title:res.data.msg,
|
||||
icon:"none"
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<!-- <picker bindchange="bindPickerChange" value="{{item.item_id?item.item_id:0}}" range="{{info.goods.goods_spec_list?info.goods.goods_spec_list:['默认规格']}}">
|
||||
<shuru left="城市信息" right="北京市 北京市 东城区" ifarrow="{{true}}" data-no="3"></shuru>
|
||||
</picker> -->
|
||||
<view bindtap="showPopup">
|
||||
<view bindtap="showPopup" wx:if="{{nowcountry == '中国'}}">
|
||||
<shuru left="城市信息" right="{{addressCity}}" ifarrow="{{true}}" data-no="3"></shuru>
|
||||
</view>
|
||||
<van-popup show="{{ show }}" position="bottom" bind:close="onClose" >
|
||||
|
@ -1,5 +1,5 @@
|
||||
// pages/chooseaddr/chooseaddr.js
|
||||
import { request } from "../../utils/bin"
|
||||
import { request,getuserid } from "../../utils/bin"
|
||||
Page({
|
||||
|
||||
/**
|
||||
@ -36,9 +36,20 @@ Page({
|
||||
|
||||
},
|
||||
add() {
|
||||
wx.navigateTo({
|
||||
url: "/pages/addaddress/addaddress"
|
||||
getuserid().then((id)=>{
|
||||
if(id == 0){
|
||||
wx.showToast({
|
||||
title: '请先登陆',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}else{
|
||||
wx.navigateTo({
|
||||
url: "/pages/addaddress/addaddress"
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
// user_id/8/id/215
|
||||
delete(e){
|
||||
|
@ -35,7 +35,7 @@ Page({
|
||||
request({
|
||||
url:'Goods/goodsList',
|
||||
urldata:{
|
||||
id:a.detail.id,
|
||||
cat_id:a.detail.id,
|
||||
sort:'shop_price',
|
||||
sort_asc:'desc',
|
||||
p:0
|
||||
|
@ -1,4 +1,4 @@
|
||||
<view class="box">
|
||||
<navigation bindselect="select" types="{{type}}"></navigation>
|
||||
<navigation bindselect="select" types="{{type}}" ids="{{type[0].id}}"></navigation>
|
||||
<list list="{{list}}"></list>
|
||||
</view>
|
@ -35,7 +35,7 @@
|
||||
>image{
|
||||
width: 50rpx;
|
||||
height: 41rpx;
|
||||
background-color: #000;
|
||||
// background-color: #000;
|
||||
margin: 77rpx 73rpx;
|
||||
}
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
.box{display:flex;flex-direction:column;align-items:center}.box .list{width:650rpx}.box .list .information{margin-top:43rpx;display:flex;flex-direction:column;font-size:28rpx;color:#333;border-bottom:1rpx solid #eaeaea;justify-content:space-between}.box .list .information>input{height:28rpx;font-size:28rpx;color:#333}.box .upload{width:650rpx;margin-top:42rpx}.box .upload .title{font-size:26rpx;color:#999}.box .upload .files{margin-top:42rpx;width:195rpx;height:195rpx;box-shadow:2rpx 3rpx 16rpx 1rpx rgba(51,51,51,0.1)}.box .upload .files>image{width:50rpx;height:41rpx;background-color:#000;margin:77rpx 73rpx}.box .submit{margin-top:295rpx;width:650rpx;height:98rpx;background-color:#47C877;border-radius:49rpx;font-size:36rpx;line-height:98rpx;text-align:center;color:#fff}
|
||||
.box{display:flex;flex-direction:column;align-items:center}.box .list{width:650rpx}.box .list .information{margin-top:43rpx;display:flex;flex-direction:column;font-size:28rpx;color:#333;border-bottom:1rpx solid #eaeaea;justify-content:space-between}.box .list .information>input{height:28rpx;font-size:28rpx;color:#333}.box .upload{width:650rpx;margin-top:42rpx}.box .upload .title{font-size:26rpx;color:#999}.box .upload .files{margin-top:42rpx;width:195rpx;height:195rpx;box-shadow:2rpx 3rpx 16rpx 1rpx rgba(51,51,51,0.1)}.box .upload .files>image{width:50rpx;height:41rpx;margin:77rpx 73rpx}.box .submit{margin-top:295rpx;width:650rpx;height:98rpx;background-color:#47C877;border-radius:49rpx;font-size:36rpx;line-height:98rpx;text-align:center;color:#fff}
|
||||
|
@ -39,7 +39,7 @@ Page({
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
this.onLoad()
|
||||
},
|
||||
|
||||
/**
|
||||
@ -77,6 +77,14 @@ Page({
|
||||
|
||||
},
|
||||
sub() {
|
||||
if(this.data.list.addressList == null){
|
||||
wx.showToast({
|
||||
title:"请先添加地址",
|
||||
icon:"none"
|
||||
})
|
||||
console.log(123)
|
||||
return ;
|
||||
}
|
||||
bin.getuserid().then((res) => {
|
||||
bin.request({
|
||||
url: "Cart/cart3",
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"navigationBarTitleText": "支付",
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"shopinfo": "/components/orderconfirm/ordershopinfo/ordershopinfo",
|
||||
"chooseway": "/components/orderconfirm/orderchooseway/orderchooseway",
|
||||
|
@ -2,7 +2,7 @@
|
||||
<shopinfo wx:for="{{list.cartList}}" title="{{item.goods_name}}" price="{{item.goods_price}}" spec="{{item.spec_key_name?item.spec_key_name:'默认规格'}}" img="{{item.image}}"></shopinfo>
|
||||
<!-- <shopinfo></shopinfo> -->
|
||||
<chooseway></chooseway>
|
||||
<chooseaddr></chooseaddr>
|
||||
<chooseaddr name="{{list.addressList.consignee}}" addr="{{list.addressList.province? list.addressList.province + list.addressList.city + list.addressList.address:''}}" number="{{list.addressList.zipcode}}" phone="{{list.addressList.mobile}}"></chooseaddr>
|
||||
<orderyf price="{{list.express_price}}"></orderyf>
|
||||
<agree></agree>
|
||||
<view class="bottom">
|
||||
|
@ -7,14 +7,20 @@ Page({
|
||||
*/
|
||||
data: {
|
||||
openid:"",
|
||||
username:"啦啦啦"
|
||||
username:"",
|
||||
img:"",
|
||||
frozen_money:""
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function(options) {
|
||||
// request({
|
||||
// url:"User/validateOpenid"
|
||||
// }).then((res)=>{
|
||||
|
||||
// })
|
||||
},
|
||||
toorder() {
|
||||
wx.navigateTo({
|
||||
@ -58,7 +64,11 @@ Page({
|
||||
*/
|
||||
login(){
|
||||
if(this.data.openid == ""){
|
||||
wx.navigateTo({
|
||||
wx.navigateTo({ // request({
|
||||
// url:"User/validateOpenid"
|
||||
// }).then((res)=>{
|
||||
|
||||
// })
|
||||
url:"/pages/login/login"
|
||||
})
|
||||
}
|
||||
@ -71,13 +81,22 @@ Page({
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function() {
|
||||
this.setData({
|
||||
openid:wx.getStorageSync("openid")
|
||||
})
|
||||
// this.setData({
|
||||
// openid:wx.getStorageSync("openid")
|
||||
// })
|
||||
request({
|
||||
url:"User/validateOpenid"
|
||||
}).then((res)=>{
|
||||
// console.log(res)
|
||||
console.log(res)
|
||||
if(res.data.code != 400){
|
||||
this.setData({
|
||||
username:res.data.data.nick_name,
|
||||
img:res.data.data.head_pic,
|
||||
frozen_money:res.data.data.frozen_money
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
<view class="box">
|
||||
<view class="card">
|
||||
<view class="user">
|
||||
<image class="head"></image>
|
||||
<text bind:tap="login">{{openid == ""?'点击登录':username}}</text>
|
||||
<image class="head" src="{{img}}"></image>
|
||||
<text bind:tap="login">{{username == ""?'点击登录':username}}</text>
|
||||
</view>
|
||||
<view class="balance">
|
||||
<text>账户余额</text>
|
||||
<text>480.00</text>
|
||||
<text>{{frozen_money}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
|
@ -11,7 +11,7 @@
|
||||
.image{
|
||||
width: 389rpx;
|
||||
height: 549rpx;
|
||||
background-color: #000;
|
||||
// background-color: #000;
|
||||
}
|
||||
}
|
||||
.title{
|
||||
|
@ -1 +1 @@
|
||||
.wxParse{margin:0 5px;font-family:Helvetica,sans-serif;font-size:28rpx;color:#666;line-height:1.8}view{word-break:break-all;overflow:auto}.wxParse-inline{display:inline;margin:0;padding:0}.wxParse-div{margin:0;padding:0}.wxParse-h1{font-size:2em;margin:.67em 0}.wxParse-h2{font-size:1.5em;margin:.75em 0}.wxParse-h3{font-size:1.17em;margin:.83em 0}.wxParse-h4{margin:1.12em 0}.wxParse-h5{font-size:.83em;margin:1.5em 0}.wxParse-h6{font-size:.75em;margin:1.67em 0}.wxParse-h1{font-size:18px;font-weight:400;margin-bottom:.9em}.wxParse-h2{font-size:16px;font-weight:400;margin-bottom:.34em}.wxParse-h3{font-weight:400;font-size:15px;margin-bottom:.34em}.wxParse-h4{font-weight:400;font-size:14px;margin-bottom:.24em}.wxParse-h5{font-weight:400;font-size:13px;margin-bottom:.14em}.wxParse-h6{font-weight:400;font-size:12px;margin-bottom:.04em}.wxParse-h1,.wxParse-h2,.wxParse-h3,.wxParse-h4,.wxParse-h5,.wxParse-h6,.wxParse-b,.wxParse-strong{font-weight:bolder}.wxParse-i,.wxParse-cite,.wxParse-em,.wxParse-var,.wxParse-address{font-style:italic}.wxParse-pre,.wxParse-tt,.wxParse-code,.wxParse-kbd,.wxParse-samp{font-family:monospace}.wxParse-pre{white-space:pre}.wxParse-big{font-size:1.17em}.wxParse-small,.wxParse-sub,.wxParse-sup{font-size:.83em}.wxParse-sub{vertical-align:sub}.wxParse-sup{vertical-align:super}.wxParse-s,.wxParse-strike,.wxParse-del{text-decoration:line-through}.wxParse-strong,.wxParse-s{display:inline}.wxParse-a{color:deepskyblue;word-break:break-all;overflow:auto}.wxParse-video{text-align:center;margin:10px 0}.wxParse-video-video{width:100%}.wxParse-img{overflow:hidden}.wxParse-blockquote{margin:0;padding:10px 0 10px 5px;font-family:Courier, Calibri,"宋体";background:#f5f5f5;border-left:3px solid #dbdbdb}.wxParse-code,.wxParse-wxxxcode-style{display:inline;background:#f5f5f5}.wxParse-ul{margin:20rpx 10rpx}.wxParse-li,.wxParse-li-inner{display:flex;align-items:baseline;margin:10rpx 0}.wxParse-li-text{align-items:center;line-height:20px}.wxParse-li-circle{display:inline-flex;width:5px;height:5px;background-color:#333;margin-right:5px}.wxParse-li-square{display:inline-flex;width:10rpx;height:10rpx;background-color:#333;margin-right:5px}.wxParse-li-ring{display:inline-flex;width:10rpx;height:10rpx;border:2rpx solid #333;border-radius:50%;background-color:#fff;margin-right:5px}.wxParse-u{text-decoration:underline}.wxParse-hide{display:none}.WxEmojiView{align-items:center}.wxEmoji{width:16px;height:16px}.wxParse-tr{display:flex;border-right:1px solid #e0e0e0;border-bottom:1px solid #e0e0e0;border-top:1px solid #e0e0e0}.wxParse-th,.wxParse-td{flex:1;padding:5px;font-size:28rpx;border-left:1px solid #e0e0e0;word-break:break-all}.wxParse-td:last{border-top:1px solid #e0e0e0}.wxParse-th{background:#f0f0f0;border-top:1px solid #e0e0e0}.wxParse-del{display:inline}.wxParse-figure{overflow:hidden}.box{border-top:1rpx solid #eaeaea;display:flex;flex-direction:column;align-items:center}.box .swiper{margin-top:109rpx;width:389rpx;height:657rpx}.box .swiper .image{width:389rpx;height:549rpx;background-color:#000}.box .title{font-size:32rpx;color:#333;margin-bottom:34rpx;width:540rpx}.box .menery{font-size:34rpx;color:#666;margin-bottom:70rpx}.box .add{width:308rpx;height:98rpx;background-color:#50CA80;border-radius:49rpx;line-height:98rpx;font-size:34rpx;color:#fff;text-align:center;position:fixed;bottom:50rpx;left:221rpx}
|
||||
.wxParse{margin:0 5px;font-family:Helvetica,sans-serif;font-size:28rpx;color:#666;line-height:1.8}view{word-break:break-all;overflow:auto}.wxParse-inline{display:inline;margin:0;padding:0}.wxParse-div{margin:0;padding:0}.wxParse-h1{font-size:2em;margin:.67em 0}.wxParse-h2{font-size:1.5em;margin:.75em 0}.wxParse-h3{font-size:1.17em;margin:.83em 0}.wxParse-h4{margin:1.12em 0}.wxParse-h5{font-size:.83em;margin:1.5em 0}.wxParse-h6{font-size:.75em;margin:1.67em 0}.wxParse-h1{font-size:18px;font-weight:400;margin-bottom:.9em}.wxParse-h2{font-size:16px;font-weight:400;margin-bottom:.34em}.wxParse-h3{font-weight:400;font-size:15px;margin-bottom:.34em}.wxParse-h4{font-weight:400;font-size:14px;margin-bottom:.24em}.wxParse-h5{font-weight:400;font-size:13px;margin-bottom:.14em}.wxParse-h6{font-weight:400;font-size:12px;margin-bottom:.04em}.wxParse-h1,.wxParse-h2,.wxParse-h3,.wxParse-h4,.wxParse-h5,.wxParse-h6,.wxParse-b,.wxParse-strong{font-weight:bolder}.wxParse-i,.wxParse-cite,.wxParse-em,.wxParse-var,.wxParse-address{font-style:italic}.wxParse-pre,.wxParse-tt,.wxParse-code,.wxParse-kbd,.wxParse-samp{font-family:monospace}.wxParse-pre{white-space:pre}.wxParse-big{font-size:1.17em}.wxParse-small,.wxParse-sub,.wxParse-sup{font-size:.83em}.wxParse-sub{vertical-align:sub}.wxParse-sup{vertical-align:super}.wxParse-s,.wxParse-strike,.wxParse-del{text-decoration:line-through}.wxParse-strong,.wxParse-s{display:inline}.wxParse-a{color:deepskyblue;word-break:break-all;overflow:auto}.wxParse-video{text-align:center;margin:10px 0}.wxParse-video-video{width:100%}.wxParse-img{overflow:hidden}.wxParse-blockquote{margin:0;padding:10px 0 10px 5px;font-family:Courier, Calibri,"宋体";background:#f5f5f5;border-left:3px solid #dbdbdb}.wxParse-code,.wxParse-wxxxcode-style{display:inline;background:#f5f5f5}.wxParse-ul{margin:20rpx 10rpx}.wxParse-li,.wxParse-li-inner{display:flex;align-items:baseline;margin:10rpx 0}.wxParse-li-text{align-items:center;line-height:20px}.wxParse-li-circle{display:inline-flex;width:5px;height:5px;background-color:#333;margin-right:5px}.wxParse-li-square{display:inline-flex;width:10rpx;height:10rpx;background-color:#333;margin-right:5px}.wxParse-li-ring{display:inline-flex;width:10rpx;height:10rpx;border:2rpx solid #333;border-radius:50%;background-color:#fff;margin-right:5px}.wxParse-u{text-decoration:underline}.wxParse-hide{display:none}.WxEmojiView{align-items:center}.wxEmoji{width:16px;height:16px}.wxParse-tr{display:flex;border-right:1px solid #e0e0e0;border-bottom:1px solid #e0e0e0;border-top:1px solid #e0e0e0}.wxParse-th,.wxParse-td{flex:1;padding:5px;font-size:28rpx;border-left:1px solid #e0e0e0;word-break:break-all}.wxParse-td:last{border-top:1px solid #e0e0e0}.wxParse-th{background:#f0f0f0;border-top:1px solid #e0e0e0}.wxParse-del{display:inline}.wxParse-figure{overflow:hidden}.box{border-top:1rpx solid #eaeaea;display:flex;flex-direction:column;align-items:center}.box .swiper{margin-top:109rpx;width:389rpx;height:657rpx}.box .swiper .image{width:389rpx;height:549rpx}.box .title{font-size:32rpx;color:#333;margin-bottom:34rpx;width:540rpx}.box .menery{font-size:34rpx;color:#666;margin-bottom:70rpx}.box .add{width:308rpx;height:98rpx;background-color:#50CA80;border-radius:49rpx;line-height:98rpx;font-size:34rpx;color:#fff;text-align:center;position:fixed;bottom:50rpx;left:221rpx}
|
||||
|
@ -116,7 +116,20 @@ Page({
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
gai(a){
|
||||
console.log(a)
|
||||
for(let i in this.data.list){
|
||||
if(this.data.list[i].id == a.detail.id){
|
||||
let text = `list[${i}].goods_num`
|
||||
this.setData({
|
||||
[text]:a.detail.num
|
||||
})
|
||||
console.log(123)
|
||||
|
||||
}
|
||||
}
|
||||
this.num()
|
||||
},
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
@ -129,7 +142,7 @@ Page({
|
||||
for (let i in this.data.select) {
|
||||
console.log(i)
|
||||
if (this.data.select[i]) {
|
||||
num += parseFloat(this.data.list[i].goods_price) * 100
|
||||
num += parseFloat(this.data.list[i].goods_price) * 100 * this.data.list[i].goods_num
|
||||
sel++
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<view class="shopping">
|
||||
<view class="item" wx:for="{{list}}" wx:for-index="j" wx:key="{{j}}">
|
||||
<shopping-item shopname="{{item.goods_name}}" shopdesc="{{item.spec_key_name||'默认规格'}}" price="{{item.goods_price}}" pic="{{item.image}}" num="{{item.goods_num}}" gid="{{item.id}}" index="{{j}}" select="{{select[j]}}" bindsel="sel"></shopping-item>
|
||||
<shopping-item bindgai="gai" shopname="{{item.goods_name}}" shopdesc="{{item.spec_key_name||'默认规格'}}" price="{{item.goods_price}}" pic="{{item.image}}" num="{{item.goods_num}}" gid="{{item.id}}" index="{{j}}" select="{{select[j]}}" bindsel="sel"></shopping-item>
|
||||
</view>
|
||||
<!-- <view class="item">
|
||||
<shopping-item shopname="J`adore - Dior" shopdesc="30支 1.30kg" price="61.78"></shopping-item>
|
||||
|
@ -1,8 +1,5 @@
|
||||
// pages/undetermined/undetermined.js
|
||||
<<<<<<< HEAD
|
||||
import bin from "../../utils/bin"
|
||||
=======
|
||||
>>>>>>> 260785c6fe0a4997462040f4f8890f1da9a0deb6
|
||||
Page({
|
||||
|
||||
/**
|
||||
|
16
utils/bin.js
16
utils/bin.js
@ -1,5 +1,9 @@
|
||||
//请求接口
|
||||
let request = function (obj){
|
||||
wx.showLoading({
|
||||
title: '加载中',
|
||||
mask:true
|
||||
})
|
||||
let {
|
||||
url,
|
||||
data,
|
||||
@ -43,11 +47,14 @@ let request = function (obj){
|
||||
responseType,
|
||||
success(data){
|
||||
res(data)
|
||||
|
||||
},
|
||||
fail(data){
|
||||
rej(data)
|
||||
},
|
||||
complete
|
||||
complete(){
|
||||
wx.hideLoading()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
@ -57,7 +64,12 @@ let getuserid = function(){
|
||||
url:"User/validateOpenid"
|
||||
|
||||
}).then((r)=>{
|
||||
res(r.data.data.user_id)
|
||||
if(r.data.code == 400){
|
||||
res(0)
|
||||
}else{
|
||||
res(r.data.data.user_id)
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user