风格统一,砍价样式修改

pull/34/head
落日晚风 2024-01-02 17:27:50 +08:00
parent 1a07dc4a40
commit 9d7b9c6f44
8 changed files with 782 additions and 503 deletions

View File

@ -1,225 +1,240 @@
{ {
"name" : "星品", "name": "星品",
"appid" : "__UNI__082C0BA", "appid": "__UNI__082C0BA",
"description" : "Shopro是由SheepJS团队开发使用Uniapp+Vue3技术驱动的在线商城系统内含诸多功能与丰富的活动期待您的使用和反馈。", "description": "Shopro是由SheepJS团队开发使用Uniapp+Vue3技术驱动的在线商城系统内含诸多功能与丰富的活动期待您的使用和反馈。",
"versionName" : "1.8.3", "versionName": "1.8.3",
"versionCode" : 183, "versionCode": 183,
"transformPx" : false, "transformPx": false,
"app-plus" : { "app-plus": {
"usingComponents" : true, "usingComponents": true,
"nvueCompiler" : "uni-app", "nvueCompiler": "uni-app",
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler": "uni-app",
"compilerVersion" : 3, "compilerVersion": 3,
"nvueLaunchMode" : "fast", "nvueLaunchMode": "fast",
"splashscreen" : { "splashscreen": {
"alwaysShowBeforeRender" : true, "alwaysShowBeforeRender": true,
"waiting" : true, "waiting": true,
"autoclose" : true, "autoclose": true,
"delay" : 0 "delay": 0
},
"safearea": {
"bottom": {
"offset": "none"
}
},
"modules": {
"Payment": {},
"Share": {},
"VideoPlayer": {},
"OAuth": {}
},
"distribute": {
"android": {
"permissions": [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_MOCK_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.GET_TASKS\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.READ_SMS\"/>",
"<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.SEND_SMS\"/>",
"<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SMS\"/>",
"<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\"/>"
],
"minSdkVersion": 21,
"schemes": "shopro"
},
"ios": {
"urlschemewhitelist": [
"baidumap",
"iosamap"
],
"dSYMs": false,
"privacyDescription": {
"NSPhotoLibraryUsageDescription": "需要同意访问您的相册选取图片才能完善该条目",
"NSPhotoLibraryAddUsageDescription": "需要同意访问您的相册才能保存该图片",
"NSCameraUsageDescription": "需要同意访问您的摄像头拍摄照片才能完善该条目",
"NSUserTrackingUsageDescription": "开启追踪并不会获取您在其它站点的隐私信息,该行为仅用于标识设备,保障服务安全和提升浏览体验"
}, },
"safearea" : { "urltypes": "shopro",
"bottom" : { "capabilities": {
"offset" : "none" "entitlements": {
} "com.apple.developer.associated-domains": [
"applinks:shopro.sheepjs.com"
]
}
}, },
"modules" : { "idfa": true
"Payment" : {}, },
"Share" : {}, "sdkConfigs": {
"VideoPlayer" : {}, "speech": {
"OAuth" : {} "ifly": {}
}, },
"distribute" : { "ad": {},
"android" : { "oauth": {
"permissions" : [ "apple": {},
"<uses-feature android:name=\"android.hardware.camera\"/>", "weixin": {
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "appid": "wxae7a0c156da9383b",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>", "UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", }
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>", },
"<uses-permission android:name=\"android.permission.ACCESS_MOCK_LOCATION\"/>", "payment": {
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "weixin": {
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", "__platform__": [
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>", "ios",
"<uses-permission android:name=\"android.permission.CAMERA\"/>", "android"
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", ],
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", "appid": "wxae7a0c156da9383b",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", },
"<uses-permission android:name=\"android.permission.GET_TASKS\"/>", "alipay": {
"<uses-permission android:name=\"android.permission.INTERNET\"/>", "__platform__": [
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>", "ios",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "android"
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>", ]
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", }
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", },
"<uses-permission android:name=\"android.permission.READ_SMS\"/>", "share": {
"<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>", "weixin": {
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>", "appid": "wxae7a0c156da9383b",
"<uses-permission android:name=\"android.permission.SEND_SMS\"/>", "UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
"<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>", }
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SMS\"/>",
"<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\"/>"
],
"minSdkVersion" : 21,
"schemes" : "shopro"
},
"ios" : {
"urlschemewhitelist" : [ "baidumap", "iosamap" ],
"dSYMs" : false,
"privacyDescription" : {
"NSPhotoLibraryUsageDescription" : "需要同意访问您的相册选取图片才能完善该条目",
"NSPhotoLibraryAddUsageDescription" : "需要同意访问您的相册才能保存该图片",
"NSCameraUsageDescription" : "需要同意访问您的摄像头拍摄照片才能完善该条目",
"NSUserTrackingUsageDescription" : "开启追踪并不会获取您在其它站点的隐私信息,该行为仅用于标识设备,保障服务安全和提升浏览体验"
},
"urltypes" : "shopro",
"capabilities" : {
"entitlements" : {
"com.apple.developer.associated-domains" : [ "applinks:shopro.sheepjs.com" ]
}
},
"idfa" : true
},
"sdkConfigs" : {
"speech" : {
"ifly" : {}
},
"ad" : {},
"oauth" : {
"apple" : {},
"weixin" : {
"appid" : "wxae7a0c156da9383b",
"UniversalLinks" : "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
}
},
"payment" : {
"weixin" : {
"__platform__" : [ "ios", "android" ],
"appid" : "wxae7a0c156da9383b",
"UniversalLinks" : "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
},
"alipay" : {
"__platform__" : [ "ios", "android" ]
}
},
"share" : {
"weixin" : {
"appid" : "wxae7a0c156da9383b",
"UniversalLinks" : "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
}
}
},
"orientation" : [ "portrait-primary" ],
"splashscreen" : {
"androidStyle" : "common",
"iosStyle" : "common",
"useOriginalMsgbox" : true
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
}
} }
}, },
"quickapp" : {}, "orientation": [
"quickapp-native" : { "portrait-primary"
"icon" : "/static/logo.png", ],
"package" : "com.example.demo", "splashscreen": {
"features" : [ "androidStyle": "common",
{ "iosStyle": "common",
"name" : "system.clipboard" "useOriginalMsgbox": true
} },
] "icons": {
}, "android": {
"quickapp-webview" : { "hdpi": "unpackage/res/icons/72x72.png",
"icon" : "/static/logo.png", "xhdpi": "unpackage/res/icons/96x96.png",
"package" : "com.example.demo", "xxhdpi": "unpackage/res/icons/144x144.png",
"minPlatformVersion" : 1070, "xxxhdpi": "unpackage/res/icons/192x192.png"
"versionName" : "1.0.0",
"versionCode" : 100
},
"mp-weixin" : {
"appid" : "wx63c280fe3248a3e7",
"setting" : {
"urlCheck" : false,
"minified" : true,
"postcss" : true
}, },
"optimization" : { "ios": {
"subPackages" : true "appstore": "unpackage/res/icons/1024x1024.png",
}, "ipad": {
"plugins" : {}, "app": "unpackage/res/icons/76x76.png",
"lazyCodeLoading" : "requiredComponents", "app@2x": "unpackage/res/icons/152x152.png",
"usingComponents" : {}, "notification": "unpackage/res/icons/20x20.png",
"permission" : {}, "notification@2x": "unpackage/res/icons/40x40.png",
"requiredPrivateInfos" : [ "chooseAddress" ] "proapp@2x": "unpackage/res/icons/167x167.png",
}, "settings": "unpackage/res/icons/29x29.png",
"mp-alipay" : { "settings@2x": "unpackage/res/icons/58x58.png",
"usingComponents" : true "spotlight": "unpackage/res/icons/40x40.png",
}, "spotlight@2x": "unpackage/res/icons/80x80.png"
"mp-baidu" : { },
"usingComponents" : true "iphone": {
}, "app@2x": "unpackage/res/icons/120x120.png",
"mp-toutiao" : { "app@3x": "unpackage/res/icons/180x180.png",
"usingComponents" : true "notification@2x": "unpackage/res/icons/40x40.png",
}, "notification@3x": "unpackage/res/icons/60x60.png",
"mp-jd" : { "settings@2x": "unpackage/res/icons/58x58.png",
"usingComponents" : true "settings@3x": "unpackage/res/icons/87x87.png",
}, "spotlight@2x": "unpackage/res/icons/80x80.png",
"h5" : { "spotlight@3x": "unpackage/res/icons/120x120.png"
"template" : "index.html", }
"router" : {
"mode" : "hash",
"base" : "./"
},
"sdkConfigs" : {
"maps" : {}
},
"async" : {
"timeout" : 20000
},
"title" : "星品购",
"optimization" : {
"treeShaking" : {
"enable" : true
}
} }
}
}
},
"quickapp": {},
"quickapp-native": {
"icon": "/static/logo.png",
"package": "com.example.demo",
"features": [
{
"name": "system.clipboard"
}
]
},
"quickapp-webview": {
"icon": "/static/logo.png",
"package": "com.example.demo",
"minPlatformVersion": 1070,
"versionName": "1.0.0",
"versionCode": 100
},
"mp-weixin": {
"appid": "wx63c280fe3248a3e7",
"setting": {
"urlCheck": false,
"minified": true,
"postcss": true
}, },
"vueVersion" : "3", "optimization": {
"_spaceID" : "192b4892-5452-4e1d-9f09-eee1ece40639", "subPackages": true
"locale" : "zh-Hans", },
"fallbackLocale" : "zh-Hans" "plugins": {},
} "lazyCodeLoading": "requiredComponents",
"usingComponents": {},
"permission": {},
"requiredPrivateInfos": [
"chooseAddress"
]
},
"mp-alipay": {
"usingComponents": true
},
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao": {
"usingComponents": true
},
"mp-jd": {
"usingComponents": true
},
"h5": {
"template": "index.html",
"router": {
"mode": "hash",
"base": "./"
},
"sdkConfigs": {
"maps": {}
},
"async": {
"timeout": 20000
},
"title": "星品购",
"optimization": {
"treeShaking": {
"enable": true
}
}
},
"vueVersion": "3",
"_spaceID": "192b4892-5452-4e1d-9f09-eee1ece40639",
"locale": "zh-Hans",
"fallbackLocale": "zh-Hans"
}

View File

@ -337,18 +337,18 @@
"group": "分销商城" "group": "分销商城"
} }
}, },
{ {
"path": "wallet", "path": "wallet",
"style": { "style": {
"navigationBarTitleText": "我的佣金" "navigationBarTitleText": "我的佣金"
}, },
"meta": { "meta": {
"auth": true, "auth": true,
"sync": true, "sync": true,
"title": "用户佣金", "title": "用户佣金",
"group": "分销中心" "group": "分销中心"
} }
}, },
{ {
"path": "goods", "path": "goods",
"style": { "style": {
@ -622,7 +622,7 @@
} }
}, },
{ {
"path": "bargainingList", "path": "bargain/list",
"style": { "style": {
"navigationBarTitleText": "砍价列表" "navigationBarTitleText": "砍价列表"
}, },
@ -633,7 +633,7 @@
} }
}, },
{ {
"path": "bargainingDetail", "path": "bargain/detail",
"style": { "style": {
"navigationBarTitleText": "砍价详情" "navigationBarTitleText": "砍价详情"
}, },

View File

@ -1,6 +1,5 @@
<!-- 砍价列表 TODO @科举新建一个 bargain 然后这个页面挪进去改成 list.vue写的时候要思考怎么更好的融入到当前项目 -->
<template> <template>
<!-- TODO @科举参考 groupon/list.vue seckill/list.vue 界面调整下头部就是从 5 11 行的 --> <!-- TODO @科举参考 groupon/list.vue seckill/list.vue 界面调整下头部就是从 5 11 行的 -->
<s-layout navbar="inner" title='砍价列表'> <s-layout navbar="inner" title='砍价列表'>
<view style='background-color: red;height:100vh;'> <view style='background-color: red;height:100vh;'>
<view class='bargain-list'> <view class='bargain-list'>
@ -14,8 +13,8 @@
<view class='header'> <view class='header'>
<view class="pic"> <view class="pic">
<view class='swipers'> <view class='swipers'>
<swiper indicator-dots="true" autoplay="true" interval="2500" <swiper indicator-dots="true" autoplay="true" interval="2500" duration="500" vertical="true"
duration="500" vertical="true" circular="true"> circular="true">
<block v-for="(item,index) in state.bargainSuccessList" :key='index'> <block v-for="(item,index) in state.bargainSuccessList" :key='index'>
<swiper-item> <swiper-item>
<view class="acea-row row-middle" style='display:flex'> <view class="acea-row row-middle" style='display:flex'>
@ -36,7 +35,7 @@
<view class='list'> <view class='list'>
<block v-for="(item,index) in state.bargainList" :key="index"> <block v-for="(item,index) in state.bargainList" :key="index">
<view style='display:flex' class='item acea-row row-between-wrapper' <view style='display:flex' class='item acea-row row-between-wrapper'
@tap="openSubscribe('/pages/activity/bargainingDetail?id='+ item.id)"> @tap="openSubscribe('/pages/activity/bargain/detail?id='+ item.id)">
<view class='pictrue'> <view class='pictrue'>
<image :src='item.picUrl'></image> <image :src='item.picUrl'></image>
</view> </view>
@ -71,12 +70,19 @@
</template> </template>
<script setup> <script setup>
import { reactive } from 'vue'; import {
reactive
} from 'vue';
import sheep from '@/sheep'; import sheep from '@/sheep';
import _ from 'lodash'; import _ from 'lodash';
import { onLoad, onReachBottom } from '@dcloudio/uni-app'; import {
import { fen2yuan } from '@/sheep/hooks/useGoods'; onLoad,
onReachBottom
} from '@dcloudio/uni-app';
import {
fen2yuan
} from '@/sheep/hooks/useGoods';
import BargainApi from '@/sheep/api/activity'
const state = reactive({ const state = reactive({
navH: '', navH: '',
returnShow: true, returnShow: true,
@ -101,53 +107,58 @@
loadTitle: '加载更多', loadTitle: '加载更多',
}); });
function getBargainHeader() { async function getBargainHeader() {
// TODO @ BargainApi.getBargainRecordSummary使 await let {
sheep.$api.activity.getBargainRecordSummary().then(res => { code,
state.bargainTotal = res.data.successUserCount; data
state.bargainSuccessList = res.data.successList; } = await BargainApi.getBargainRecordSummary()
}).catch(err => { if (code == 0) {
return state.$util.Tips({ state.bargainTotal = data.successUserCount;
title: err state.bargainSuccessList = data.successList;
} else {
state.$util.Tips({
title: data
}); });
}) }
} }
function getBargainList() { async function getBargainList() {
// TODO @loading loadTitle 使 uni-load-more // TODO @loading loadTitle 使 uni-load-more
if (state.loadend || state.loading) { if (state.loadend || state.loading) {
return; return;
} }
state.loading = true; state.loading = true;
state.loadTitle = ''; state.loadTitle = '';
// TODO @ BargainApi.getBargainRecordSummary使 await let {
sheep.$api.activity.getBargainActivityPage({ data,
code
} = await BargainApi.getBargainActivityPage({
pageNo: state.page, pageNo: state.page,
pageSize: state.limit pageSize: state.limit
}).then(res => { })
const list = res.data.list; if (code == 0) {
const list = data.list;
const bargainList = _.concat(state.bargainList, list); const bargainList = _.concat(state.bargainList, list);
const loadend = list.length < state.limit; const loadend = list.length < state.limit;
state.loadend = loadend; state.loadend = loadend;
state.loading = false; state.loading = false;
state.loadTitle = loadend ? '已全部加载' : '加载更多'; state.loadTitle = loadend ? '已全部加载' : '加载更多';
// this.$set(this, 'bargainList', bargainList); // this.$set(this, 'bargainList', bargainList);
state.bargainList = res.data.list state.bargainList = data.list
// this.$set(this, 'page', this.page + 1); // this.$set(this, 'page', this.page + 1);
state.page = state.page + 1; state.page = state.page + 1;
}).catch(res => {
} else {
state.loading = false; state.loading = false;
state.loadTitle = '加载更多'; state.loadTitle = '加载更多';
}); }
} }
function openSubscribe(e) { function openSubscribe(e) {
console.log('跳转')
console.log(e) console.log(e)
// TODO @ pages/pay/result.vue subscribeMessage // TODO @ pages/pay/result.vue subscribeMessage
// TODO @navigateTo sheep.$router.go sheep.$router.go(e)
uni.navigateTo({
url: page,
});
return; return;
let page = e; let page = e;
// #ifndef MP // #ifndef MP

File diff suppressed because one or more lines are too long

View File

@ -1,13 +1,106 @@
<!-- 页面 TODO 芋艿检查未开发 --> <!-- 页面 TODO 芋艿检查未开发 -->
<template> <template>
<s-layout title="我的团队" :class="state.scrollTop ? 'team-wrap' : ''" navbar="inner"> <s-layout title="我的团队" :class="state.scrollTop ? 'team-wrap' : ''" navbar="inner">
<view class="header-box" :style="[ <view class="promoter-list">
<view class='promoterHeader bg-color' style='backgroundColor:#e93323!important;height:218rpx;color:#fff'>
<view class='headerCon acea-row row-between' style='padding: 28px 29px 0 29px;'>
<view>
<view class='name' style="color:#fff">推广人数</view>
<view><text class='num'
style="color:#fff">{{(state.getSummary.firstBrokerageUserCount+ state.getSummary.secondBrokerageUserCount)|| 0 }}</text>
</view>
</view>
<view class='iconfont icon-tuandui'></view>
</view>
</view>
<view style='padding: 0 30rpx;'>
<view class='nav acea-row row-around l1'>
<view :class="state.level === 1 ? 'item on' : 'item'" @click='setType(1)'>
一级({{state.getSummary.firstBrokerageUserCount || 0 }})</view>
<view :class="state.level === 2 ? 'item on' : 'item'" @click='setType(2)'>
二级({{state.getSummary.secondBrokerageUserCount || 0 }})
</view>
</view>
<view class='search acea-row row-between-wrapper'
style="display: flex;height: 100rpx;align-items: center;">
<view class='input'>
<!-- placeholder-class='placeholder' -->
<input placeholder='点击搜索会员名称' v-model="state.nickname" confirm-type='search' name="search" />
<!-- @confirm="submitForm" -->
</view>
<button class='iconfont icon-sousuo2'></button>
<!-- @click="submitForm" -->
</view>
<view class='list'>
<view class="sortNav acea-row row-middle" style="display: flex;align-items: center;">
<view class="sortItem" @click='setSort("userCount","asc")' v-if="sort === 'userCountDESC'">
团队排序
<image src='/static/images/sort1.png'></image>
</view>
<view class="sortItem" @click='setSort("userCount", "desc")'
v-else-if="sort === 'userCountASC'">团队排序
<image src='/static/images/sort3.png'></image>
</view>
<view class="sortItem" @click='setSort("userCount","desc")' v-else>
<image src='/static/images/sort2.png'></image>
</view>
<view class="sortItem" @click='setSort("price","asc")' v-if="sort === 'priceDESC'">
金额排序
<image src='/static/images/sort1.png'></image>
</view>
<view class="sortItem" @click='setSort("price", "desc")' v-else-if="sort === 'priceASC'">
金额排序
<image src='/static/images/sort3.png'></image>
</view>
<view class="sortItem" @click='setSort("price","desc")' v-else>
<image src='/static/images/sort2.png'></image>
</view>
<view class="sortItem" @click='setSort("orderCount","asc")' v-if="sort === 'orderCountDESC'">
订单排序
<image src='/static/images/sort1.png'></image>
</view>
<view class="sortItem" @click='setSort("orderCount", "desc")'
v-else-if="sort === 'orderCountASC'">订单排序
<image src='/static/images/sort3.png'></image>
</view>
<view class="sortItem" @click='setSort("orderCount","desc")' v-else>
<image src='/static/images/sort2.png'></image>
</view>
</view>
<!-- <block v-for="(item,index) in recordList" :key="index">
<view class='item acea-row row-between-wrapper'>
<view class="picTxt acea-row row-between-wrapper">
<view class='pictrue'>
<image :src='item.avatar'></image>
</view>
<view class='text'>
<view class='name line1'>{{item.nickname}}</view>
<view>加入时间: {{ formatDate(item.brokerageTime) }}</view>
</view>
</view>
<view class="right">
<view><text class='num font-color'>{{ item.brokerageUserCount || 0}}</text>
</view>
<view><text class="num">{{ item.orderCount|| 0}}</text></view>
<view><text class="num">{{ fen2yuan(item.brokeragePrice || 0) }}</text></view>
</view>
</view>
</block>
<Loading :loaded="status" :loading="loadingList"></Loading>
<block v-if="recordList.length === 0 && isShow">
<emptyPage title="暂无推广人数~"></emptyPage>
</block> -->
</view>
</view>
</view>
<!-- <home></home> -->
<!-- <view class="header-box" :style="[
{ {
marginTop: '-' + Number(statusBarHeight + 88) + 'rpx', marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
paddingTop: Number(statusBarHeight + 108) + 'rpx', paddingTop: Number(statusBarHeight + 108) + 'rpx',
}, },
]"> ]">
<!-- 推荐人 -->
<view v-if="userInfo.parent_user" class="referrer-box ss-flex ss-col-center"> <view v-if="userInfo.parent_user" class="referrer-box ss-flex ss-col-center">
推荐人 推荐人
<image class="referrer-avatar ss-m-r-10" :src="sheep.$url.cdn(userInfo.parent_user.avatar)" <image class="referrer-avatar ss-m-r-10" :src="sheep.$url.cdn(userInfo.parent_user.avatar)"
@ -15,7 +108,6 @@
</image> </image>
{{ userInfo.parent_user.nickname }} {{ userInfo.parent_user.nickname }}
</view> </view>
<!-- 团队数据总览 -->
<view class="team-data-box ss-flex ss-col-center ss-row-between"> <view class="team-data-box ss-flex ss-col-center ss-row-between">
<view class="data-card"> <view class="data-card">
<view class="total-item"> <view class="total-item">
@ -38,16 +130,16 @@
<view class="data-card"> <view class="data-card">
<view class="total-item"> <view class="total-item">
<view class="item-title">团队分销商人数</view> <view class="item-title">团队分销商人数</view>
<view class="total-num">{{ agentInfo.child_agent_count_all || 0 }}</view> <view class="total-num">{{ agentInfo?.child_agent_count_all || 0 }}</view>
</view> </view>
<view class="category-item ss-flex"> <view class="category-item ss-flex">
<view class="ss-flex-1"> <view class="ss-flex-1">
<view class="item-title">一级分销商</view> <view class="item-title">一级分销商</view>
<view class="category-num">{{ agentInfo.child_agent_count_1 || 0 }}</view> <view class="category-num">{{ agentInfo?.child_agent_count_1 || 0 }}</view>
</view> </view>
<view class="ss-flex-1"> <view class="ss-flex-1">
<view class="item-title">二级分销商</view> <view class="item-title">二级分销商</view>
<view class="category-num">{{ agentInfo.child_agent_count_2 || 0 }}</view> <view class="category-num">{{ agentInfo?.child_agent_count_2 || 0 }}</view>
</view> </view>
</view> </view>
</view> </view>
@ -71,7 +163,7 @@
</uni-list> </uni-list>
</view> </view>
<s-empty v-if="state.pagination.total === 0" icon="/static/data-empty.png" text="暂无团队信息"> <s-empty v-if="state.pagination.total === 0" icon="/static/data-empty.png" text="暂无团队信息">
</s-empty> </s-empty> -->
</s-layout> </s-layout>
</template> </template>
@ -83,13 +175,18 @@
} from '@dcloudio/uni-app'; } from '@dcloudio/uni-app';
import { import {
computed, computed,
reactive reactive,
ref
} from 'vue'; } from 'vue';
import _ from 'lodash'; import _ from 'lodash';
import { import {
onPageScroll onPageScroll
} from '@dcloudio/uni-app'; } from '@dcloudio/uni-app';
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2; const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
const agentInfo = computed(() => sheep.$store('user').agentInfo); const agentInfo = computed(() => sheep.$store('user').agentInfo);
const userInfo = computed(() => sheep.$store('user').userInfo); const userInfo = computed(() => sheep.$store('user').userInfo);
@ -111,8 +208,12 @@
last_page: 1, last_page: 1,
}, },
loadStatus: '', loadStatus: '',
// ui
level: 1,
nickname: ref('')
}); });
function filterUserNum(num) { function filterUserNum(num) {
if (_.isNil(num)) { if (_.isNil(num)) {
return ''; return '';
@ -168,6 +269,19 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.l1 {
background-color: #fff;
height: 86rpx;
line-height: 86rpx;
font-size: 28rpx;
color: #282828;
border-bottom: 1rpx solid #eee;
border-top-left-radius: 14rpx;
border-top-right-radius: 14rpx;
display: flex;
justify-content: space-around;
}
.header-box { .header-box {
box-sizing: border-box; box-sizing: border-box;
padding: 0 20rpx 20rpx 20rpx; padding: 0 20rpx 20rpx 20rpx;
@ -263,4 +377,142 @@
border-radius: 50%; border-radius: 50%;
} }
} }
.promoter-list .nav {
background-color: #fff;
height: 86rpx;
line-height: 86rpx;
font-size: 28rpx;
color: #282828;
border-bottom: 1rpx solid #eee;
border-top-left-radius: 14rpx;
border-top-right-radius: 14rpx;
margin-top: -30rpx;
}
.promoter-list .nav .item.on {
border-bottom: 5rpx solid;
// $theme-color
color: red;
// $theme-color
}
.promoter-list .search {
width: 100%;
background-color: #fff;
height: 100rpx;
padding: 0 24rpx;
box-sizing: border-box;
border-bottom-left-radius: 14rpx;
border-bottom-right-radius: 14rpx;
}
.promoter-list .search .input {
width: 592rpx;
height: 60rpx;
border-radius: 50rpx;
background-color: #f5f5f5;
text-align: center;
position: relative;
}
.promoter-list .search .input input {
height: 100%;
font-size: 26rpx;
width: 610rpx;
text-align: center;
}
.promoter-list .search .input .placeholder {
color: #bbb;
}
.promoter-list .search .input .iconfont {
position: absolute;
right: 28rpx;
color: #999;
font-size: 28rpx;
top: 50%;
transform: translateY(-50%);
}
.promoter-list .search .iconfont {
font-size: 32rpx;
color: #515151;
height: 60rpx;
line-height: 60rpx;
}
.promoter-list .list {
margin-top: 20rpx;
}
.promoter-list .list .sortNav {
background-color: #fff;
height: 76rpx;
border-bottom: 1rpx solid #eee;
color: #333;
font-size: 28rpx;
border-top-left-radius: 14rpx;
border-top-right-radius: 14rpx;
}
.promoter-list .list .sortNav .sortItem {
text-align: center;
flex: 1;
}
.promoter-list .list .sortNav .sortItem image {
width: 24rpx;
height: 24rpx;
margin-left: 6rpx;
vertical-align: -3rpx;
}
.promoter-list .list .item {
background-color: #fff;
border-bottom: 1rpx solid #eee;
height: 152rpx;
padding: 0 24rpx;
font-size: 24rpx;
color: #666;
}
.promoter-list .list .item .picTxt .pictrue {
width: 106rpx;
height: 106rpx;
border-radius: 50%;
}
.promoter-list .list .item .picTxt .pictrue image {
width: 100%;
height: 100%;
border-radius: 50%;
border: 3rpx solid #fff;
box-shadow: 0 0 10rpx #aaa;
box-sizing: border-box;
}
.promoter-list .list .item .picTxt .text {
// width: 304rpx;
font-size: 24rpx;
color: #666;
margin-left: 14rpx;
}
.promoter-list .list .item .picTxt .text .name {
font-size: 28rpx;
color: #333;
margin-bottom: 13rpx;
}
.promoter-list .list .item .right {
text-align: right;
font-size: 22rpx;
color: #333;
}
.promoter-list .list .item .right .num {
margin-right: 7rpx;
}
</style> </style>

View File

@ -1,12 +1,12 @@
import request from '@/sheep/request'; import request from '@/sheep/request';
const DiyTemplateApi = { const DiyTemplateApi = {
getUsedDiyTemplate: () => { // getUsedDiyTemplate: () => {
return request({ // return request({
url: '/app-api/promotion/diy-template/used', // url: '/app-api/promotion/diy-template/used',
method: 'GET', // method: 'GET',
}); // });
}, // },
getDiyTemplate: (id) => { getDiyTemplate: (id) => {
return request({ return request({
url: '/app-api/promotion/diy-template/get', url: '/app-api/promotion/diy-template/get',

View File

@ -94,7 +94,7 @@ http.interceptors.request.use(
if (config.url.indexOf('/app-api/') !== -1) { if (config.url.indexOf('/app-api/') !== -1) {
config.header['Accept'] = '*/*' config.header['Accept'] = '*/*'
config.header['tenant-id'] = '1'; config.header['tenant-id'] = '1';
config.header['terminal'] = '20'; config.header['terminal'] = '20';
config.header['Authorization'] = 'Bearer test247'; config.header['Authorization'] = 'Bearer test247';
} }
return config; return config;
@ -113,10 +113,10 @@ http.interceptors.response.use(
if (response.header.authorization || response.header.Authorization) { if (response.header.authorization || response.header.Authorization) {
$store('user').setToken(response.header.authorization || response.header.Authorization); $store('user').setToken(response.header.authorization || response.header.Authorization);
} }
// TODO 芋艿:如果是登录的 API则自动设置 token // TODO 芋艿:如果是登录的 API则自动设置 token
if (response.data?.data?.accessToken) { if (response.data?.data?.accessToken) {
$store('user').setToken(response.data.data.accessToken); $store('user').setToken(response.data.data.accessToken);
} }
response.config.custom.showLoading && closeLoading(); response.config.custom.showLoading && closeLoading();
if (response.data.error !== 0 && response.data.code !== 0) { if (response.data.error !== 0 && response.data.code !== 0) {
@ -128,10 +128,10 @@ http.interceptors.response.use(
}); });
return Promise.resolve(response.data); return Promise.resolve(response.data);
} }
// 成功时的提示 // 成功时的提示
if ( if (
(response.data.error === 0 || response.data.code === 0) && (response.data.error === 0 || response.data.code === 0) &&
( response.data.msg !== '' || response.config.custom.successMsg !== '' ) && (response.data.msg !== '' || response.config.custom.successMsg !== '') &&
response.config.custom.showSuccess response.config.custom.showSuccess
) { ) {
uni.showToast({ uni.showToast({
@ -218,8 +218,8 @@ const request = (config) => {
} }
// TODO 芋艿:额外拼接 // TODO 芋艿:额外拼接
if (config.url.indexOf('/app-api/') >= 0) { if (config.url.indexOf('/app-api/') >= 0) {
// config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】 config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】 // config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
// config.url = 'http://yunai.natapp1.cc' + config.url; // 调用【natapp】 // config.url = 'http://yunai.natapp1.cc' + config.url; // 调用【natapp】
} }
return http.middleware(config); return http.middleware(config);