Browse Source

Merge branch 'twodate' of http://8.134.10.79:3000/Leadfyy.co/uniapp-shikongwang into twodate

twodate
Enzo 4 years ago
parent
commit
0ab03d0ea1
  1. 3
      pages.json
  2. 7
      pages/center/fans.vue
  3. 65
      pages/center/wallet.vue
  4. 6
      pages/goodsDetail/index.vue
  5. 22
      pages/route/index.vue

3
pages.json

@ -118,7 +118,8 @@
{ {
"path": "pages/center/wallet", "path": "pages/center/wallet",
"style": { "style": {
"navigationBarTitleText": "我的钱包"
"navigationBarTitleText": "我的钱包",
"disableScroll": true
} }
}, },
{ {

7
pages/center/fans.vue

@ -23,8 +23,11 @@
<view class="lf-font-32 text-black1">时空网的内部网友 <text class="bg-red lf-font-24 lf-m-l-10" style="border-radius: 30rpx;padding: 5rpx 16rpx;">达人</text></view> <view class="lf-font-32 text-black1">时空网的内部网友 <text class="bg-red lf-font-24 lf-m-l-10" style="border-radius: 30rpx;padding: 5rpx 16rpx;">达人</text></view>
<view class="lf-font-24 lf-color-gray">2021-7-6 21:32:53</view> <view class="lf-font-24 lf-color-gray">2021-7-6 21:32:53</view>
</view> </view>
<!-- 回到顶部 -->
<u-back-top :scroll-top="pageScrollTop" :custom-style="{background: 'rgba(51, 51 51, 0.3)'}"></u-back-top>
<!-- 空数据的情况 -->
<view class="loading-more">
<text v-if="tabItem.list.length" :class="{'loading-more-text': tabItem.loadingClass}">{{ tabItem.loadingText }}</text>
<my-nocontent v-else></my-nocontent>
</view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>

65
pages/center/wallet.vue

@ -1,5 +1,6 @@
<template> <template>
<view> <view>
<!-- 钱包余额信息 -->
<view class="wallet-top"> <view class="wallet-top">
<view class="bg-white wallet-wraptop flex-direction flex justify-around align-center text-center"> <view class="bg-white wallet-wraptop flex-direction flex justify-around align-center text-center">
<view class="text-black1 text-price1" style="font-size: 72rpx;">2000.48</view> <view class="text-black1 text-price1" style="font-size: 72rpx;">2000.48</view>
@ -9,13 +10,21 @@
</view> </view>
</view> </view>
</view> </view>
<!-- tabs -->
<view class="bg-white lf-p-t-40 lf-p-b-40 flex justify-around align-center text-center solid-bottom"> <view class="bg-white lf-p-t-40 lf-p-b-40 flex justify-around align-center text-center solid-bottom">
<view class="lf-font-32" style="width: 50%;border-right: 1px solid rgba(0, 0, 0, 0.1);box-sizing: border-box;" :class="tabIndex ==0?'text-orange':'text-black1'" @click="tabIndex = 0">佣金记录</view>
<view class="lf-font-32" style="width: 50%;" :class="tabIndex ==1?'text-orange':'text-black1'" @click="tabIndex = 1">提取记录</view>
<view class="tab-item" :class="current==index?'text-orange':'text-black1'"
v-for="(item, index) in tab_list" :key="index"
@click="current = index">{{ item.name }}
</view> </view>
<block v-if="tabIndex == 0">
<scroll-view class="com" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="isRefresher" @scrolltolower="onScrolltolower" @refresherrefresh="onRefresherrefresh">
<view class="flex flex-direction justify-between lf-p-t-20 lf-p-b-20 lf-p-l-32 lf-p-r-32 solid-bottom">
</view>
<!-- scroll page -->
<block v-if="current == 0">
<scroll-view :style="{height: 'calc('+ windowHeight +'px - 524rpx)'}"
:scroll-y="true" :refresher-enabled="true"
:refresher-triggered="isRefresher"
@scrolltolower="onScrolltolower"
@refresherrefresh="onRefresherrefresh">
<view class="flex flex-direction justify-between lf-p-t-20 lf-p-b-20 lf-p-l-32 lf-p-r-32 solid-bottom" v-for="item in 12" :key="item">
<view class="flex align-center text-center justify-between"> <view class="flex align-center text-center justify-between">
<view class="lf-font-36 lf-color-price">-¥10.00</view> <view class="lf-font-36 lf-color-price">-¥10.00</view>
<view class="lf-font-32 text-black1">结余 ¥34.43</view> <view class="lf-font-32 text-black1">结余 ¥34.43</view>
@ -27,16 +36,18 @@
</view> </view>
<!-- 空数据的情况 --> <!-- 空数据的情况 -->
<view class="loading-more"> <view class="loading-more">
<text v-if="!tab.list.length" :class="{'loading-more-text': tab.loadingClass}">{{ tab.loadingText }}</text>
<text v-if="tab_list[0].list.length" :class="{'loading-more-text': tab_list[0].loadingClass}">{{ tab_list[0].loadingText }}</text>
<my-nocontent v-else></my-nocontent> <my-nocontent v-else></my-nocontent>
</view> </view>
<!-- 回到顶部 -->
<u-back-top :scroll-top="pageScrollTop" :custom-style="{background: 'rgba(51, 51 51, 0.3)'}"></u-back-top>
</scroll-view> </scroll-view>
</block> </block>
<block v-else> <block v-else>
<scroll-view class="com" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="isRefresher" @scrolltolower="onScrolltolower" @refresherrefresh="onRefresherrefresh">
<scroll-view :style="{height: 'calc('+ windowHeight +'px - 524rpx)'}"
:scroll-y="true" :refresher-enabled="true"
:refresher-triggered="isRefresher"
@scrolltolower="onScrolltolower"
@refresherrefresh="onRefresherrefresh">
<view class="flex flex-direction justify-between lf-p-t-20 lf-p-b-20 lf-p-l-32 lf-p-r-32 solid-bottom"> <view class="flex flex-direction justify-between lf-p-t-20 lf-p-b-20 lf-p-l-32 lf-p-r-32 solid-bottom">
<view class="flex align-center text-center justify-between"> <view class="flex align-center text-center justify-between">
<view class="lf-font-36 lf-color-price">-¥11.00</view> <view class="lf-font-36 lf-color-price">-¥11.00</view>
@ -49,11 +60,9 @@
</view> </view>
<!-- 空数据的情况 --> <!-- 空数据的情况 -->
<view class="loading-more"> <view class="loading-more">
<text v-if="!tab.list.length" :class="{'loading-more-text': tab.loadingClass}">{{ tab.loadingText }}</text>
<text v-if="tab_list[1].list.length" :class="{'loading-more-text': tab_list[1].loadingClass}">{{ tab_list[1].loadingText }}</text>
<my-nocontent v-else></my-nocontent> <my-nocontent v-else></my-nocontent>
</view> </view>
<!-- 回到顶部 -->
<u-back-top :scroll-top="pageScrollTop" :custom-style="{background: 'rgba(51, 51 51, 0.3)'}"></u-back-top>
</scroll-view> </scroll-view>
</block> </block>
</view> </view>
@ -63,13 +72,30 @@
export default { export default {
data() { data() {
return { return {
tabIndex: 0,
current: 0,
pageSize: 10, pageSize: 10,
isRefresher: false, // scroll-view isRefresher: false, // scroll-view
tab_list: [{
name: '佣金记录',
list: [1,2,3,4,5,6,7,8,9],
page: 1, page: 1,
isPage: false
isPage: false,
loadingClass: false,
loadingText: '已加载全部数据'
},{
name: '提取记录',
list: [1],
page: 1,
isPage: false,
loadingClass: true,
loadingText: '正在加载中'
}],
windowHeight: 0
} }
}, },
onLoad(){
this.windowHeight = uni.getSystemInfoSync().windowHeight;
},
methods: { methods: {
// //
onScrolltolower(){ onScrolltolower(){
@ -86,7 +112,16 @@
} }
} }
</script> </script>
<style scoped>
<style scoped lang="scss">
.tab-item{
font-size: 32rpx;
width: 50%;
box-sizing: border-box;
&:first-child{
border-right: 2rpx solid rgba(0, 0, 0, 0.1);
}
}
.com { .com {
height: 900rpx; height: 900rpx;
} }

6
pages/goodsDetail/index.vue

@ -135,7 +135,8 @@
imagePath: '', imagePath: '',
userToken: '', userToken: '',
wxCode: '', wxCode: '',
onceCode: ''
onceCode: '',
pt: 1
} }
}, },
computed: { computed: {
@ -147,6 +148,7 @@
}, },
onLoad(options) { onLoad(options) {
this.goods_id = options.id; this.goods_id = options.id;
this.pt = options.pt || 1;
this.getGoodsDetail(); this.getGoodsDetail();
this.getWxCode() this.getWxCode()
}, },
@ -306,7 +308,7 @@
toAddOrder() { toAddOrder() {
let goods_id = this.goods_detail.id; let goods_id = this.goods_detail.id;
let goods_specs_id = this.goods_detail.specs[0].id let goods_specs_id = this.goods_detail.specs[0].id
this.$url('/pages/order/confirm-order?goods_id=' + goods_id + '&goods_specs_id=' + goods_specs_id);
this.$url('/pages/order/confirm-order?goods_id=' + goods_id + '&goods_specs_id=' + goods_specs_id +'&pt='+ this.pt);
}, },
// //
lookImg(index) { lookImg(index) {

22
pages/route/index.vue

@ -6,12 +6,18 @@
/* 路由分发页面仅供跳转页面 */ /* 路由分发页面仅供跳转页面 */
export default { export default {
onLoad(options){ onLoad(options){
this.routeToPage(options);
if(this.$shared.isValueType(options.scene) != 'undefined'){
const scene = decodeURIComponent(options.scene); //
const par = this.strToObj(scene);
this.routeToPage(par);
}else{
this.routeToPage(options); //
}
}, },
methods: { methods: {
// //
routeToPage(options){ routeToPage(options){
if(options.route == 'goods_detail'){
if(options.route == 'goods_detail' || options.route == 'goods'){
options.page_url = '/pages/goodsDetail/index'; options.page_url = '/pages/goodsDetail/index';
this.joinPagePath(options); this.joinPagePath(options);
}else if(options.route == 'home'){ }else if(options.route == 'home'){
@ -45,6 +51,18 @@
}else{ }else{
this.$url(path, {type: 'redirect'}); this.$url(path, {type: 'redirect'});
} }
},
// key=value&key=value
strToObj(str){
let obj = {};
if(!str) return obj;
let arr = str.split('&');
arr.map(item => {
let a = item.split('=');
obj[a[0]] = a[1];
});
return obj;
} }
} }
} }

Loading…
Cancel
Save