1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519 |
- <template>
- <view class="container">
- <!-- <view class="navbar"> -->
- <navbar ref="navbar" :config="config" backColor="#666">
- </navbar>
- <!-- </view> -->
- <!-- <顶部> -->
- <view class="top">
- <!-- <背景图>$mConfig.staticUrl http://192.168.0.119/ycimg -->
- <!-- <image :src="imgUrl + '/my-top-bgImg.png'"></image> -->
- <!-- <image src="http://192.168.0.119/ycimg/my-top-bgImg.png"></image> -->
- <view class="bgImg">
- <!-- <image :src="imgUrl+'/my-list-bgImg.png'"></image> -->
- <view class="position-ab">
- <!-- <view class="top-data-box2">
- <view class="item" @click="tabPage('/pages/signCenter/index',true)">
- <view>
- <view class="title">每日签到</view>
- <view class="tip">签到得爱心</view>
- </view>
- <view class="icon" :class="isSign?'active':''">
- <text class="iconfont2"></text>
- </view>
- </view>
- <view class="line"></view>
- <view class="item" @click="tabPage('/pages/operationCenter/index',true)">
- <view>
- <view class="title">推广明细</view>
- <view class="tip">推广赚零钱</view>
- </view>
- <view class="icon">
- <text class="iconfont2" style="font-size: 32rpx;"></text>
- </view>
- </view>
- <view class="line"></view>
- <view class="item" @click="tabPage('/pages/couponCenter/index')">
- <view>
- <view class="title">领券中心</view>
- <view class="tip">领取得福利</view>
- </view>
- <view class="icon">
- <text class="iconfont2" style="font-size: 34rpx;"></text>
- </view>
- </view>
- </view> -->
- <view class="middle">
- <view class="middle-top">
- <view style="display: flex;justify-content: space-between;width: 300rpx;">
- <view class="order" v-for="(item,index) in orderTypeList" :key="index"
- :class="orderTypeIndex==index?'active':''" @click="orderTypeIndex=index;getGeneralOrderCount()">
- {{item.text}}
- </view>
- </view>
- <view class="whole" @click="linkOrderList(-1)">
- <view class="whole-top">
- 查看全部
- </view>
- <view class="iconfont wholeright"></view>
- </view>
- </view>
- <view class="middle-content">
- <view class="list" @click="linkOrderList(0)">
- <view class="anglenum" v-if="generalOrder.waitPayNum=='0'?false:generalOrder.waitPayNum">
- {{generalOrder.waitPayNum}}
- </view>
- <text class="iconfont one"></text>
- <view class="name-one">
- 待付款
- </view>
- </view>
- <view class="list" @click="linkOrderList(1)">
- <view class="anglenum" v-if="generalOrder.waitShipNum=='0'?false:generalOrder.waitShipNum">
- {{generalOrder.waitShipNum}}
- </view>
- <!-- <text class=" iconfont two"></text> -->
- <image class="my-icon" src="/static/order/seed-goods.png"></image>
- <view class="name-one">待发货 </view>
- </view>
- <view class="list" @click="linkOrderList(3)">
- <view class="anglenum" v-if="generalOrder.waitReceivingNum=='0'?false:generalOrder.waitReceivingNum">
- {{generalOrder.waitReceivingNum}}
- </view>
- <text class="iconfont three"></text>
- <view class="name-one">待收货 </view>
- </view>
- <view class="list" @click="linkOrderList(5)">
- <view class="anglenum" v-if="generalOrder.waitCommentNum=='0'?false:generalOrder.waitCommentNum">
- {{generalOrder.waitCommentNum}}
- </view>
- <!-- <text class="iconfont four"></text> -->
- <!-- <image class="my-icon" :src="imgUrl+'/login/noevaluate.png'"></image> -->
- <image class="my-icon" src="/static/order/estimate.png"></image>
- <view class="name-one">待评价 </view>
- </view>
- <view class="list" @click="linkOrderList(6)">
- <!-- <view class="anglenum">1</view> -->
- <text class="iconfont five"></text>
- <view class="name-one">退换/售后 </view>
- </view>
- </view>
- </view>
- <view class="other" v-if="false">
- <view class="other-top" @click="linkServiceOrderList(-1)">
- <view class="left">
- 服务订单
- </view>
- <view class="right">
- 查看全部<text class="iconfont"
- style="color: #999999; margin-left: 16rpx; font-size: 35rpx;margin-top: 0;"></text>
- </view>
- </view>
- <view class="option">
- <view class="list" @click="linkServiceOrderList(0)">
- <view class="othernum" v-if="serviceOrder.waitPayNum=='0'?false:serviceOrder.waitPayNum">
- {{serviceOrder.waitPayNum}}
- </view>
- <text class="iconfont one"></text>
- <view class="name-one">待付款</view>
- </view>
- <view class="list" @click="linkServiceOrderList(3)">
- <view class="othernum" v-if="serviceOrder.waitUseNum=='0'?false:serviceOrder.waitUseNum">
- {{serviceOrder.waitUseNum}}
- </view>
- <!-- <text class=" iconfont two"></text> -->
- <image class="my-icon" :src="imgUrl+'/login/nouse.png'"></image>
- <view class="name-one">待使用 </view>
- </view>
- <view class="list" @click="linkServiceOrderList(5)">
- <view class="othernum" v-if="serviceOrder.waitCommentNum=='0'?false:serviceOrder.waitCommentNum">
- {{serviceOrder.waitCommentNum}}
- </view>
- <!-- <text class="iconfont four"></text> -->
- <image class="my-icon" :src="imgUrl+'/login/noevaluate.png'"></image>
- <view class="name-one">待评价 </view>
- </view>
- <view class="list" @click="linkServiceOrderList(6)">
- <!-- <view class="othernum">1</view> -->
- <text class="iconfont five"></text>
- <view class="name-one">轻松退 </view>
- </view>
- </view>
- </view>
- </view>
- <view class="position-ab">
- <view class="other">
- <view class="other-top" @click="affiliateMerchantOrderList">
- <view class="left">联盟商家订单</view>
- <view class="right">
- 查看全部<text class="iconfont"
- style="color: #999999; margin-left: 16rpx; font-size: 35rpx;margin-top: 0;"></text>
- </view>
- </view>
- <view class="order-info">
- <view class="item">
- <view class="num">{{affiliateMerchantOrderInfo.order_num || 0}}</view>
- <view class="">订单数</view>
- </view>
- <view class="item">
- <view class="num">{{affiliateMerchantOrderInfo.sale_money_total || 0}}</view>
- <view class="">消费金额(¥)</view>
- </view>
- <view class="item">
- <view class="num">{{affiliateMerchantOrderInfo.discount_money_total || 0}}</view>
- <view class="">打赏金额(¥)</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- 猜你喜欢 -->
- <view class="guess">
- <view class="guess-top">
- <view class="guess-left">猜你喜欢</view>
- <view class="guess-line"></view>
- <view class="guess-right">智能推荐你感兴趣的优品</view>
- </view>
- <view class="guess-item" v-if="goodsList && goodsList.length > 0">
- <view class="item" @click="goProductDetails('/pages/product/goods/goods?id=' + item.id)"
- v-for="(item, index) in goodsList" :key="index">
- <image v-if="item && item.cover" :src="item.cover" mode="aspectFill"></image>
- <view style=" padding-bottom: 40rpx;">
- <view class="name" style="flex: 1;">{{ item.title }}</view>
- <view class="number">
- <view class="number-red">
- <rich-text :nodes="$mUtil.priceBigSmall(item.min_sale_price)"></rich-text>
- </view>
- <view class="number-grey">¥{{ item.max_market_price }}</view>
- </view>
- </view>
- </view>
- </view>
- <nodata v-else :config="{ top: 1, content: '暂无商品~' }"></nodata>
- <loadMore v-if="goodsList.length > 0" :status="status"></loadMore>
- </view>
- <!-- 猜你喜欢 -->
- </view>
- </view>
- </template>
- <script>
- import {
- myInfo,
- getAccountInfo
- } from "@/api/login.js"
- import {
- myStatistics,
- unreadNum
- } from "@/api/userInfo.js"
- let app = getApp()
- export default {
- data() {
- return {
- config: {
- back: false, //false是tolbar页面 是则不写
- title: '订单',
- color: '#1a1a1a',
- //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
- // backgroundColor: [0, '#2cba28'],
- rightSlot: true,
- },
- imgUrl: this.$mConfig.staticUrl,
- //微信小程序用户信息
- userInfo: {
- head_photo: "",
- nickname: "登录/注册"
- },
- hiddenLink: true,
- loginNo: false, //判断显示邀请码
- storage: true,
- isLogin: false, //判断是否登录
- userInformation: {}, //用户信息
- myCommunity: {}, //我的社区
- myMsg: null,
- //服务订单数量
- serviceOrder: {
- waitPayNum: "0", //待支付数量
- waitCommentNum: "0", //待评论数量
- waitUseNum: "0" //待使用数量
- },
- //服务订单数量
- generalOrder: {
- waitPayNum: "0", //待支付数量
- waitCommentNum: "0", //待评论数量
- waitUseNum: "0", //待使用数量
- waitShipNum: "0", //待发货数量
- waitReceivingNum: "0" //待收货数量
- },
- ispay: app.globalData.openPay,
- topData: [{
- title: '我的爱心',
- value: '0'
- }, {
- title: '今日爱心',
- value: '0'
- }, {
- title: '公益积分',
- value: '0'
- }, {
- title: '优惠券',
- value: '0'
- }],
- numObj: {},
- //value对应订单列表接口的area_feature参数。传0或不传是排除了申购的订单列表(商品订单),传3是申购订单列表
- orderTypeList: [{
- text: '商品订单',
- value: 0
- },
- // {
- // text: '申领订单',
- // value: 3
- // },
- ],
- orderTypeIndex: 0,
- isSign: false, // 是否签到
- goodsList: [],
- page: 1,
- status: 'more',
- affiliateMerchantOrderInfo: {}
- }
- },
- created() {
- let userInfo = uni.getStorageSync("apiToken")
- let shop = uni.getStorageSync("shop")
- },
- onReachBottom() {
- if (this.status == 'more') {
- this.page++;
- this.guessLike();
- if (this.isLogin) {
- this.getGeneralOrderCount()
- }
- }
- // this.status = "loading";
- },
- onPageScroll(e) {
- let maxHeight = uni.upx2px(300);
- if (e.scrollTop > maxHeight) {
- // this.$set(this.config, 'backgroundColor', [1, '#2cba28']);
- } else {
- // this.$set(this.config, 'backgroundColor', [e.scrollTop / maxHeight.toFixed(1), '#2cba28']);
- }
- // this.$refs.navbar.init();
- },
- //清空数据
- //显示弹出框
- async onShow() {
- var that = this
- let token = uni.getStorageSync("apiToken")
- let shop = uni.getStorageSync("shop")
- this.guessLike();
- // let personal = uni.getStorageSync("personal")
- await this.judgeLogin()
- .catch(err => {
- /**
- * @description 重置数据
- */
- this.isLogin = false;
- this.userInformation = {}; //用户信息
- //服务订单数量
- this.serviceOrder = {
- waitPayNum: "0", //待支付数量
- waitCommentNum: "0", //待评论数量
- waitUseNum: "0" //待使用数量
- },
- //服务订单数量
- this.generalOrder = {
- waitPayNum: "0", //待支付数量
- waitCommentNum: "0", //待评论数量
- waitUseNum: "0", //待使用数量
- waitShipNum: "0", //待发货数量
- waitReceivingNum: "0" //待收货数量
- }
- for (let i in this.topData) {
- this.topData[i].value = 0;
- }
- this.isSign = false;
- })
- // let getWxUserInfo = uni.getStorageSync("wxUserInfo")
- // if(getWxUserInfo !=''){
- // that.userInfo = JSON.parse(getWxUserInfo)
- // }
- if (this.isLogin) {
- if (token) {
- this.hiddenLink = false
- this.loginNo = true
- this.getuserInfo()
- }
- await this.getMyStatistics()
- // await this.getUnreadNum()
- await this.getServiceOrderCount()
- await this.getGeneralOrderCount()
- await this.getAffiliateMerchantOrder()
- this.$forceUpdate();
- }
- },
- onPullDownRefresh() {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.stopPullDownRefresh();
- } else {
- this.page = 1;
- this.getGeneralOrderCount()
- this.guessLike();
- this.getAll()
- }
- },
- methods: {
- /**猜你喜欢 */
- guessLike() {
- this.keyWord = uni.getStorageSync("history") ? uni.getStorageSync("history").join(",") : ''
- this.$http
- .get(
- `/goods/smart`, {
- page: this.page,
- limit: 6,
- keywords: this.keyWord,
- },
- false
- )
- .then((res) => {
- if (res && res.code == 200) {
- this.goodsList = this.page == 1 ? res.page.list : this.goodsList.concat(res.page.list);
- if (res.page.totalPage <= res.page.currPage) {
- this.status = "noMore";
- } else {
- this.status = "more";
- }
- }
- });
- },
- // 商品跳转
- goProductDetails(url) {
- uni.navigateTo({
- url: url,
- });
- },
- // 上部切换
- topDataChange(e) {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- return;
- }
- if (e.title == '我的爱心' || e.title == '今日爱心') {
- // 跳转 我的爱心
- uni.navigateTo({
- url: "/pages/research/myLove/index"
- })
- } else if (e.title == '公益积分') {
- // 跳转 我的公益积分
- uni.navigateTo({
- url: "/pages/research/myPublicWelfare/index"
- })
- } else if (e.title == '优惠券') {
- uni.navigateTo({
- url: "/pages/couponCenter/index?isMyCoupon=true"
- })
- }
- },
- toolClick(funName) {
- if (!funName) {
- uni.showToast({
- icon: 'none',
- title: '暂无功能'
- })
- return false;
- }
- this[funName]();
- },
- rest() {
- this.userInformation = {}
- this.myCommunity = {}
- },
- async getAll() {
- this.rest() //清空消息
- await this.judgeLogin() //判断是否登录
- if (this.isLogin) {
- // await this.getUnreadNum() //未读消息
- await this.getMyStatistics() //登录消息
- await this.getuserInfo() //用户消息
- this.$forceUpdate();
- }
- },
- //获取未读消息
- // getUnreadNum(){
- // this.$http.get(unreadNum).then(res=>{
- // uni.stopPullDownRefresh();
- // if(res&&res.code==200){
- // this.myMsg = res.data
- // }
- // })
- // },
- //前往我的二维码
- jumpcode() {
- uni.navigateTo({
- url: "../user/invitationCode/invitationCode"
- })
- },
- //前往我的钱包
- goToMyWallet() {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- } else {
- uni.navigateTo({
- url: "../user/wallet/myWallet"
- })
- }
- },
- //前往我的积分
- goToMyPoints() {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- } else {
- uni.navigateTo({
- url: "../research/community/mypoints"
- })
- }
- },
- getMyStatistics() {
- //获取主页数据
- this.$http.get(myStatistics)
- .then(res => {
- uni.stopPullDownRefresh();
- if (res && res.code == 200) {
- this.myCommunity = res.data
- }
- })
- },
- //判断是否登录
- async judgeLogin() {
- let shop = uni.getStorageSync("shop")
- if (shop) {
- await this.$http.get(getAccountInfo).then(res => {
- uni.stopPullDownRefresh();
- if (res && res.code == 200) {
- this.isLogin = true
- this.userInformation = res.data;
- this.topData[0].value = res.data.love_value;
- this.topData[1].value = res.data.today_love_value;
- this.topData[2].value = '¥' + res.data.integral_able;
- this.topData[3].value = res.data.coupon_num + '张';
- this.isSign = res.data.sign_in;
- this.topData[0].value = res.data.love_value || 0;
- this.topData[1].value = res.data.today_love_value || 0;
- this.topData[2].value = res.data.integral_able || 0;
- this.topData[3].value = (res.data.coupon_num || 0) + '张';
- } else {
- this.isLogin = false
- }
- })
- } else {
- this.isLogin = false
- }
- },
- //跳转成为商家
- goToRegisterAndAudit() {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- } else {
- this.$http.get("/yxt/shopapply/shopApplyInfo").then(res => {
- if (res && res.code == 200) {
- if (res.data == null) {
- uni.navigateTo({
- url: "../user/merchant/registerAndAudit"
- })
- } else {
- uni.navigateTo({
- url: "../user/merchant/audit"
- })
- }
- }
- })
- // let personal = uni.getStorageSync("personal")
- // let isShop = personal.is_shop
- // if(isShop==true){
- // uni.navigateTo({
- // url:"../research/setup/toBusiness"
- // })}else{
- // uni.navigateTo({
- // url:"../user/merchant/registerAndAudit"
- // })
- // }
- }
- },
- //成为网红
- goTobecomeANerStar() {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- } else {
- //获取申请信息
- this.$http.get("/celebrity/info").then(res => {
- if (res && res.code == 200) {
- if (res.data !== null) {
- uni.navigateTo({
- // url:"./toExamine"
- url: "../research/setup/toExamine"
- })
- } else {
- uni.navigateTo({
- url: "../research/setup/becomeANetStar"
- })
- }
- }
- })
- }
- },
- //跳转我的银行卡
- goToBankCardList() {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- } else {
- uni.navigateTo({
- url: "../user/bankCard/bankCardList"
- })
- }
- },
- //跳转分销中心
- goToDistributionCentre() {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- } else {
- uni.navigateTo({
- url: "../user/distribution/distributionCentre"
- })
- }
- },
- //跳转我的评论
- goToMyComment() {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- } else {
- uni.navigateTo({
- url: "../research/community/mycomment?user_id=" + this.userInfo.id
- })
- }
- },
- //跳转我的点赞
- goToMyFabulous() {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- } else {
- uni.navigateTo({
- url: "../research/community/myfabulous?user_id=" + this.userInfo.id
- })
- }
- },
- //跳转我的关注
- goToMyFollow() {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- } else {
- uni.navigateTo({
- url: "../research/community/myfollow?user_id=" + this.userInfo.id
- })
- }
- },
- //跳转我的发布
- goToMyRelease() {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- } else {
- uni.navigateTo({
- url: "../research/community/myrelease?user_id=" + this.userInfo.id
- })
- }
- },
- //跳转我的主页
- goToHomepage() {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- } else {
- let id = this.userInfo.id
- uni.navigateTo({
- url: "../research/community/homepage?user_id=" + id
- })
- }
- },
- //跳转我的粉丝
- gotoFans() {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.navigateTo({
- url: "/pages/login/index"
- })
- } else {
- uni.navigateTo({
- url: "../research/community/myfans?user_id=" + this.userInfo.id
- })
- }
- },
- //跳转注册
- goToRegister() {
- uni.navigateTo({
- url: "/pages/login/index"
- })
- },
- //跳转登录
- goToLogin() {
- uni.navigateTo({
- url: "../research/register/login"
- })
- },
- getuserInfo() {
- let shop = uni.getStorageSync('shop')
- this.$http.get('/account/getAccountInfo/' + shop.id).then(async res => {
- uni.stopPullDownRefresh();
- if (res && res.code == 200) {
- this.userInfo = res.data
- }
- })
- },
- //跳到登录页面
- // goLogin(url){
- // let token = uni.getStorageSync("apiToken")
- // //判断是否微信授权登录(没有授权登录进wx-login,授权了但没有注册进login)
- // if(!token){
- // uni.navigateTo({
- // url:"./wx-login"
- // })
- // }else if(token){
- // this.hiddenLink =false
- // uni.navigateTo({
- // url:url
- // })
- // }
- // },
- //跳到商家页
- goMerchant() {
- let token = uni.getStorageSync("apiToken")
- //判断是否微信授权登录(没有授权登录进wx-login,授权了但没有注册进login)
- if (!token) {
- uni.navigateTo({
- url: "./wx-login"
- })
- } else if (token) {
- this.hiddenLink = false
- this.$http.get('/yxt/shopapply/shopApplyInfo', {}).then(async res => {
- if (res && res.code == 200) {
- if (!res.data) {
- uni.navigateTo({
- url: "../user/merchant/registerAndAudit"
- })
- } else {
- uni.navigateTo({
- url: '../user/merchant/audit'
- })
- }
- }
- })
- }
- },
- //跳到订单列表
- linkOrderList(k) {
- let token = uni.getStorageSync("apiToken")
- //判断是否微信授权登录(没有授权登录进wx-login,授权了但没有注册进login)
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- } else if (token) {
- this.hiddenLink = false
- uni.navigateTo({
- url: `../order/orderList/orderList?keys=${k}&orderType=${this.orderTypeList[this.orderTypeIndex].value}`
- })
- }
- },
- //跳服务订单列表
- linkServiceOrderList(v) {
- let token = uni.getStorageSync("apiToken")
- //判断是否微信授权登录(没有授权登录进wx-login,授权了但没有注册进login)
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- } else if (token) {
- this.hiddenLink = false
- uni.navigateTo({
- url: "../order/orderList/serviceOrder?keys=" + v
- })
- }
- },
- //跳到拼团订单
- goGbOrder() {
- uni.navigateTo({
- url: "../order/gbOrder/gbOrderList"
- })
- },
- //常见问题
- goFaq() {
- uni.navigateTo({
- url: "../user/faq"
- })
- },
- //获取服务订单统计
- getServiceOrderCount() {
- this.$http.get('/order/service-order-count', {}).then(async res => {
- if (res && res.code == 200) {
- if (res.data) {
- this.serviceOrder.waitPayNum = res.data.wait_pay_num //待支付
- this.serviceOrder.waitCommentNum = res.data.wait_comment_num //待评论
- this.serviceOrder.waitUseNum = res.data.wait_use_num //待使用
- }
- }
- })
- },
- //获取普通订单统计
- getGeneralOrderCount() {
- this.$http.get(this.orderTypeIndex == 0 ? '/order/general-order-count' : '/order/apply-order-count', {})
- .then(async res => {
- if (res && res.code == 200) {
- if (res.data) {
- this.generalOrder.waitPayNum = res.data.wait_pay_num //待支付
- this.generalOrder.waitCommentNum = res.data.wait_comment_num //待评论
- this.generalOrder.waitUseNum = res.data.wait_use_num //待使用
- this.generalOrder.waitReceivingNum = res.data.wait_receiving_num //待收货
- this.generalOrder.waitShipNum = res.data.wait_ship_num //待发货
- }
- }
- })
- },
- tabPage(url, needLogin = false) {
- let token = uni.getStorageSync("apiToken")
- if (needLogin && !token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- return;
- }
- uni.navigateTo({
- url
- })
- },
- // 获取联盟商家订单统计信息
- getAffiliateMerchantOrder() {
- this.$http.get('/offlineorder/mycount').then(res => {
- if (res.code == 200) {
- this.affiliateMerchantOrderInfo = res.data
- }
- })
- },
- // 跳转联盟商家列表
- affiliateMerchantOrderList() {
- uni.navigateTo({
- url: '/pages/workbench/order/coalitionList'
- })
- }
- }
- }
- </script>
- <style>
- page {
- background-color: #FFFFFF;
- }
- </style>
- <style lang="scss" scoped>
- .goodBug {
- font-size: 40rpx;
- color: #FFFFFF;
- font-weight: 400;
- width: 400rpx;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- margin-top: 30rpx;
- }
- // 我的钱包
- .money-and-integral {
- margin-left: 30rpx;
- margin-right: 30rpx;
- margin-top: 24rpx;
- display: flex;
- justify-content: space-around;
- align-items: center;
- color: #ffffff;
- .money {
- text-align: center;
- .num {
- font-size: 48rpx;
- color: #ffffff;
- font-weight: Bold;
- text {
- font-size: 28rpx;
- font-weight: Medium;
- flood-color: #ffffff;
- }
- }
- }
- .middle-line {
- background-color: #FFFFFF;
- height: 70rpx;
- width: 1rpx;
- opacity: 0.53;
- }
- .integral {
- text-align: center;
- .num {
- font-size: 48rpx;
- font-weight: Bold;
- color: #ffffff;
- text {
- font-size: 28rpx;
- font-weight: Medium;
- }
- }
- .my-integral {
- margin-top: 4rpx;
- .iconfont {
- width: 46rpx;
- height: 46rpx;
- background-color: #ffffff;
- color: #29A549;
- border-radius: 999rpx;
- text-align: center;
- line-height: 46rpx;
- }
- .my-iconfont-item {
- font-size: 28rpx;
- font-weight: Medium;
- color: #ffffff;
- margin-left: 8rpx;
- height: 46rpx;
- line-height: 46rpx;
- }
- }
- }
- .my-integral {
- display: flex;
- }
- .my-money {
- margin-top: 4rpx;
- display: flex;
- .iconfont {
- background-color: #ffffff;
- color: #29A549;
- width: 46rpx;
- height: 46rpx;
- border-radius: 999rpx;
- text-align: center;
- line-height: 46rpx;
- }
- .my-money-item {
- margin-left: 8rpx;
- font-size: 28rpx;
- font-weight: Medium;
- height: 46rpx;
- line-height: 46rpx;
- }
- }
- }
- .navbar {
- position: absolute;
- top: 0;
- left: 0;
- }
- .top {
- position: relative;
- min-height: 100vh;
- background-color: #ffffff;
- }
- .bgImg {
- // position: absolute;
- // top: 480rpx;
- width: 100%;
- padding: 30rpx;
- // margin: 60rpx 0 30rpx;
- }
- .bgImg image {
- width: 100%;
- // height: 103vh;
- position: relative;
- }
- .position-ab {
- // position: relative;
- // top: -45rpx;
- width: 100%;
- // padding-bottom: 175rpx;
- border-radius: 20rpx;
- box-shadow: 0 0 40rpx rgba(0, 0, 0, .1);
- .middle {
- margin: 0 30rpx;
- background: #ffffff;
- // margin-top: 32rpx;
- border-radius: 20rpx;
- padding-bottom: 40rpx;
- .middle-content {
- display: flex;
- justify-content: space-around;
- .list {
- flex: 1;
- text-align: center;
- .my-icon {
- width: 52rpx;
- height: 50rpx;
- }
- .name-one {
- font-size: 26rpx;
- color: #1a1a1a;
- font-weight: 400;
- margin-top: 18rpx;
- }
- .anglenum {
- position: absolute;
- margin-left: 95rpx;
- margin-top: -20rpx;
- background-color: #ff0000;
- padding: 0px 11rpx;
- border-radius: 100rpx;
- font-weight: 400;
- font-size: 23rpx;
- color: #ffffff
- }
- .one {
- font-size: 52rpx;
- // background: linear-gradient(180deg, #78df6a, #11d688);
- background: #f35427;
- -webkit-background-clip: text;
- color: transparent;
- }
- .two {
- font-size: 50rpx;
- // background: linear-gradient(180deg, #dc9c56, #ff7303);
- background: #ff9301;
- -webkit-background-clip: text;
- color: transparent;
- }
- .three {
- font-size: 52rpx;
- // background: linear-gradient(180deg, #05d3a9, #06b806);
- background: #ea632a;
- -webkit-background-clip: text;
- color: transparent;
- }
- .four {
- font-size: 52rpx;
- // background: linear-gradient(180deg, #ff5475, #fd4303);
- background: #f2ad41;
- -webkit-background-clip: text;
- color: transparent;
- }
- .five {
- font-size: 52rpx;
- // background: linear-gradient(180deg, #b175f0, #3db3fd);
- background: #2e6cf6;
- -webkit-background-clip: text;
- color: transparent;
- }
- }
- }
- .middle-top {
- margin: 0 0 30rpx;
- margin-bottom: 32rpx;
- border-bottom: 1rpx solid #e6e6e6;
- display: flex;
- padding: 30rpx 0;
- justify-content: space-between;
- align-items: center;
- .order {
- font-size: 30rpx;
- color: #808080;
- display: block;
- &.active {
- color: #1A1A1A;
- font-weight: Bold;
- }
- }
- .whole {
- display: flex;
- align-items: center;
- color: #999999;
- font-size: 24rpx;
- font-weight: 400;
- .whole-top {
- color: #999999;
- font-size: 28rpx;
- font-weight: 400;
- }
- .wholeright {
- color: #999999;
- font-size: 35rpx;
- // margin-top: 4rpx;
- margin-left: 16rpx;
- }
- }
- }
- }
- .other {
- margin: 30rpx;
- background-color: #ffffff;
- padding: 50rpx 0;
- border-radius: 20rpx;
- .option {
- display: flex;
- justify-content: space-between;
- .list {
- text-align: center;
- .my-icon {
- width: 52rpx;
- height: 50rpx;
- }
- .name-one {
- font-size: 26rpx;
- color: #1a1a1a;
- font-weight: 400;
- margin-top: 18rpx;
- }
- .othernum {
- position: absolute;
- margin-left: 65rpx;
- margin-top: -10rpx;
- background-color: #ff0000;
- padding: 0px 11rpx;
- border-radius: 100rpx;
- font-weight: 400;
- color: #ffffff;
- font-size: 23rpx;
- }
- .one {
- font-size: 52rpx;
- background: linear-gradient(180deg, #78df6a, #11d688);
- -webkit-background-clip: text;
- color: transparent;
- }
- .two {
- font-size: 50rpx;
- background: linear-gradient(180deg, #dc9c56, #ff7303);
- -webkit-background-clip: text;
- color: transparent;
- }
- .four {
- font-size: 52rpx;
- background: linear-gradient(180deg, #ff5475, #fd4303);
- -webkit-background-clip: text;
- color: transparent;
- }
- .five {
- font-size: 52rpx;
- background: linear-gradient(180deg, #b175f0, #3db3fd);
- -webkit-background-clip: text;
- color: transparent;
- }
- }
- }
- .other-top {
- display: flex;
- padding-bottom: 18rpx;
- align-items: center;
- margin-bottom: 32rpx;
- border-bottom: 1rpx solid #e6e6e6;
- .left {
- flex: 1;
- font-size: 30rpx;
- font-weight: 700;
- color: #1A1A1A;
- line-height: 30rpx;
- }
- .right {
- color: #999999;
- font-size: 28rpx;
- line-height: 30rpx;
- font-weight: 400;
- display: flex;
- align-items: center;
- .other-icon {
- color: #999999;
- margin-left: 16rpx;
- font-size: 15rpx;
- }
- }
- }
- .order-info {
- display: flex;
- justify-content: space-around;
- align-items: center;
- font-size: 26rpx;
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- color: #1a1a1a;
- .item {
- max-width: 30%;
- text-align: center;
- .num {
- font-size: 36rpx;
- color: #ff6600;
- margin-bottom: 18rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- }
- }
- }
- .tool {
- margin: 0rpx 30rpx 30rpx 30rpx;
- padding: 18rpx 30rpx;
- background-color: #ffffff;
- border-radius: 20rpx;
- .image-text {
- .list-top {
- display: flex;
- justify-content: space-around;
- }
- .list-bottom {
- display: flex;
- justify-content: space-around;
- }
- .item-one {
- text-align: center;
- width: 25%;
- image {
- text-align: center;
- width: 80rpx;
- height: 80rpx;
- padding: 34rpx 10rpx 14rpx 10rpx;
- }
- .item-name {
- text-align: center;
- font-size: 26rpx;
- font-weight: 400;
- padding-bottom: 44rpx;
- color: #1A1A1A;
- }
- }
- }
- .tool-top {
- padding: 18rpx 0rpx 18rpx 0rpx;
- border-bottom: 1rpx solid #e6e6e6;
- font-size: 30rpx;
- font-weight: 700;
- font-family: 700;
- color: #1a1a1a;
- line-height: 30rpx;
- }
- }
- .wallet-bg {
- position: relative;
- height: 138rpx;
- }
- .wallet-bg .bigBg {
- position: absolute;
- z-index: 0;
- padding: 0 15rpx;
- box-sizing: border-box;
- width: 100%;
- height: 138rpx;
- }
- .wallet image {
- width: 32rpx;
- height: 34rpx;
- }
- .my-wallet {
- position: relative;
- z-index: 1;
- height: 138rpx;
- }
- }
- .guess {
- margin: 0 30rpx;
- .guess-item {
- display: flex;
- // justify-content: space-around;
- flex-wrap: wrap;
- .item {
- margin-bottom: 36rpx;
- background-color: #ffffff;
- overflow: hidden;
- display: flex;
- flex-direction: column;
- border-radius: 20rpx 20rpx 0 0;
- box-shadow: 0 0 40rpx rgba(0, 0, 0, .1);
- image {
- width: 336rpx;
- height: 336rpx;
- border-radius: 18rpx;
- }
- .name {
- margin: 6rpx 20rpx;
- width: 296rpx;
- height: 70rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- word-wrap: break-word;
- word-break: break-all;
- white-space: normal !important;
- }
- .tag-box {
- margin: 10rpx 20rpx 0 20rpx;
- .tag1 {
- width: 69rpx;
- height: 30rpx;
- }
- .tag2 {
- width: 116rpx;
- height: 30rpx;
- margin-left: 10rpx;
- }
- }
- .number {
- display: flex;
- align-items: flex-end;
- // padding-bottom: 40rpx;
- margin: 0 20rpx 0 20rpx;
- .number-red {
- color: #FF6600;
- font-size: 36rpx;
- font-weight: 700;
- text {
- font-size: 36rpx;
- font-weight: Bold;
- }
- }
- .number-grey {
- color: #999999;
- font-size: 22rpx;
- font-weight: 400;
- text-decoration: line-through;
- margin-left: 16rpx;
- padding-bottom: 4rpx;
- }
- }
- }
- .item:nth-child(2n) {
- margin-left: 18rpx;
- }
- }
- .guess-top {
- display: flex;
- align-items: center;
- margin-bottom: 24rpx;
- .guess-left {
- font-size: 36rpx;
- color: #1a1a1a;
- font-weight: Bold;
- line-height: 30rpx;
- }
- .guess-line {
- width: 1rpx;
- height: 32rpx;
- background-color: #707070;
- margin: 0 16rpx;
- }
- .guess-right {
- font-size: 24rpx;
- color: #666666;
- font-weight: Regular;
- line-height: 24rpx;
- }
- }
- }
- .top-data-box2 {
- width: 690rpx;
- margin: 0 auto;
- height: 133rpx;
- background: #ffffff;
- border-radius: 20rpx;
- padding: 30rpx 30rpx;
- box-sizing: border-box;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .item {
- text-align: center;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .icon {
- width: 50rpx;
- height: 50rpx;
- border-radius: 50%;
- background: #138e46;
- margin: 0 auto 0 6rpx;
- &.active {
- background: #FF4141;
- }
- .iconfont2 {
- font-size: 28rpx;
- line-height: 50rpx;
- color: white;
- }
- }
- .title {
- font-size: 28rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- color: #1a1a1a;
- margin-bottom: 3rpx;
- }
- .tip {
- font-size: 24rpx;
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- color: #808080;
- }
- }
- }
- </style>
|