pplok #26
@ -4,7 +4,7 @@ Component({
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
shospname: String,
|
||||
shopname: String,
|
||||
shopdesc: String,
|
||||
price: Number,
|
||||
pic: String
|
||||
|
@ -1,7 +1,7 @@
|
||||
<view class="shoppingitem">
|
||||
<view class="select"></view>
|
||||
<view class="pic">
|
||||
<image></image>
|
||||
<image src="{{pic}}"></image>
|
||||
</view>
|
||||
<view class="shopinfo">
|
||||
<view class="shopname">{{shopname}}</view>
|
||||
|
@ -35,13 +35,21 @@
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 18rpx;
|
||||
margin-top: 35rpx;
|
||||
margin-top: 20rpx;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
|
||||
display: -webkit-box;
|
||||
|
||||
-webkit-box-orient: vertical;
|
||||
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
|
||||
.shopdesc {
|
||||
color: #666666;
|
||||
font-size: 22rpx;
|
||||
margin-bottom: 39rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.price {
|
||||
|
@ -6,7 +6,7 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
list:[1,1,1],
|
||||
list:[],
|
||||
userid:0
|
||||
},
|
||||
|
||||
@ -21,6 +21,9 @@ Page({
|
||||
}
|
||||
}).then((res)=>{
|
||||
console.log(res)
|
||||
this.setData({
|
||||
list:res.data.result
|
||||
})
|
||||
})
|
||||
},
|
||||
onLoad: function(options) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<view class="shopping">
|
||||
<view class="item" wx:for="{{list}}" wx:for-index="j" wx:if = "{{item == 1}}" wx:key="{{j}}">
|
||||
<shopping-item shopname="J`adore - Dior" shopdesc="30支 1.30kg" price="61.78"></shopping-item>
|
||||
<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}}"></shopping-item>
|
||||
</view>
|
||||
<!-- <view class="item">
|
||||
<shopping-item shopname="J`adore - Dior" shopdesc="30支 1.30kg" price="61.78"></shopping-item>
|
||||
|
@ -8,9 +8,15 @@ let request = function (obj){
|
||||
dataType,
|
||||
responseType,
|
||||
complete,
|
||||
name
|
||||
name,
|
||||
urldata
|
||||
} = obj
|
||||
url="http://daigou.sdbairui.com/index.php/WXAPI/" + url
|
||||
let text = ""
|
||||
for(let i in urldata){
|
||||
text += `/${i}/${urldata[i]}`
|
||||
}
|
||||
url+=text
|
||||
if(method == "POST" || method == "post"){
|
||||
if(header == undefined){
|
||||
header ={}
|
||||
|
Loading…
Reference in New Issue
Block a user