|
@@ -22,7 +22,7 @@
|
|
<text class="num">{{swiperLength}}</text>
|
|
<text class="num">{{swiperLength}}</text>
|
|
</view> -->
|
|
</view> -->
|
|
</view>
|
|
</view>
|
|
- <swiper-up :list="portInfo"></swiper-up>
|
|
|
|
|
|
+ <swiper-up :list="infoList" ></swiper-up>
|
|
<scroll-view style='margin-top:12px;padding:0 20px;' scroll-x class="nav">
|
|
<scroll-view style='margin-top:12px;padding:0 20px;' scroll-x class="nav">
|
|
<view class="flex text-center">
|
|
<view class="flex text-center">
|
|
<view style='position:relative;' class="cu-item flex-sub" :class="item.value==TabCur?'text-white':''" v-for="item in categoryList"@tap="tabSelect" :data-id="item.value">
|
|
<view style='position:relative;' class="cu-item flex-sub" :class="item.value==TabCur?'text-white':''" v-for="item in categoryList"@tap="tabSelect" :data-id="item.value">
|
|
@@ -130,7 +130,6 @@
|
|
<view v-show="isLoadMore">
|
|
<view v-show="isLoadMore">
|
|
<uni-load-more :status="loadStatus" ></uni-load-more>
|
|
<uni-load-more :status="loadStatus" ></uni-load-more>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
@@ -178,7 +177,8 @@
|
|
loadStatus:'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
|
|
loadStatus:'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
|
|
TabCur: 0,
|
|
TabCur: 0,
|
|
category:0,
|
|
category:0,
|
|
- current: 0
|
|
|
|
|
|
+ current: 0,
|
|
|
|
+ infoList1:[]
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onReady() {
|
|
onReady() {
|
|
@@ -188,11 +188,45 @@
|
|
this.pages = 1
|
|
this.pages = 1
|
|
this.isLoadMore = false
|
|
this.isLoadMore = false
|
|
this.loadStatus = 'more'
|
|
this.loadStatus = 'more'
|
|
- const that = this
|
|
|
|
this.loadData()
|
|
this.loadData()
|
|
},
|
|
},
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
-
|
|
|
|
|
|
+ var that = this
|
|
|
|
+ var infoList = [];
|
|
|
|
+ uni.request({
|
|
|
|
+ url: "https://hq.sinajs.cn/list=C0,C2109,C2111,C2201,C2203,C2205,C2207,A0,A2109,A2111,A2201,A2203,A2205,A2207",
|
|
|
|
+ // url: "https://hq.sinajs.cn/list=C2109",
|
|
|
|
+ header: {
|
|
|
|
+ 'content-type': 'application/x-www-form-urlencoded'
|
|
|
|
+ },
|
|
|
|
+ success: function(result) {
|
|
|
|
+ // resolve调用后,即可传递到调用方使用then或者async+await同步方式进行处理逻辑
|
|
|
|
+ var tmp = result.data.split('"')
|
|
|
|
+ for(var i = 1; i<tmp.length;i=i+2){
|
|
|
|
+ var list = tmp[i].split(",")
|
|
|
|
+ var data = {
|
|
|
|
+ goodsName:list[0],
|
|
|
|
+ newPrice:list[6],
|
|
|
|
+ openPrice:list[2]
|
|
|
|
+ }
|
|
|
|
+ if(data.goodsName){
|
|
|
|
+ infoList.push(data)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ let name = 'infoList';
|
|
|
|
+ let value = infoList;
|
|
|
|
+ that.$store.commit('$uStore', {
|
|
|
|
+ name,
|
|
|
|
+ value
|
|
|
|
+ });
|
|
|
|
+ // console.log("infoList",infoList)
|
|
|
|
+ },
|
|
|
|
+ fail: function(e) {
|
|
|
|
+ console.log('error in...')
|
|
|
|
+ // reject调用后,即可传递到调用方使用catch或者async+await同步方式进行处理逻辑
|
|
|
|
+ reject(e)
|
|
|
|
+ },
|
|
|
|
+ })
|
|
},
|
|
},
|
|
onPageScroll(e) {
|
|
onPageScroll(e) {
|
|
this.scrollTop = e.scrollTop;
|
|
this.scrollTop = e.scrollTop;
|
|
@@ -214,6 +248,7 @@
|
|
...mapState(['hasLogin', 'userInfo'])
|
|
...mapState(['hasLogin', 'userInfo'])
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+
|
|
DotStyle(e) {
|
|
DotStyle(e) {
|
|
this.dotStyle = e.detail.value
|
|
this.dotStyle = e.detail.value
|
|
},
|
|
},
|
|
@@ -343,7 +378,7 @@
|
|
//价格简报
|
|
//价格简报
|
|
if (data.portInfo) {
|
|
if (data.portInfo) {
|
|
that.portInfo = data.portInfo
|
|
that.portInfo = data.portInfo
|
|
- console.log(that.portInfo)
|
|
|
|
|
|
+ console.log("portInfo",that.portInfo)
|
|
}
|
|
}
|
|
//分类5Buttom
|
|
//分类5Buttom
|
|
if (data.advertisement.t4) {
|
|
if (data.advertisement.t4) {
|