12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565 |
- <template>
- <view class="container-mine">
- <view class="navbar">
- <navbar ref="navbar" :config="config" backColor="#666"></navbar>
- </view>
- <view class="mine-top">
- <view class="mine-left">
- <image class="mine-left-img" v-if="user.headPhoto" :src="$getImgPath(user.headPhoto)">
- </image>
- <image class="mine-left-img" v-else src="/static/default-avatar.png" mode=""></image>
- <view class="name-info">
- <text class="name-text">{{user.certification?user.realName:user.nickname}}</text>
- <text class="name-tag">{{user.mobile}}</text>
- </view>
- </view>
- <view class="mine-right">
- <u-icon name="arrow-right"></u-icon>
- </view>
- </view>
- <view class="maxBox">
- <!-- <view class="pointsBox" @click="goMypoints()">
- <view class="pointsBox_l">
- <image src="/static/czd/myPoint.png" mode=""></image>
- 我的积分
- </view>
- <view class="pointsBox_r">
- {{userInformation.integral_able}}积分
- <text class="iconfont_yige"></text>
- </view>
- </view> -->
- <view class="shopOrderList">
- <view class="shopOrderList_title">
- <view class="shopOrderList_title_l">商城订单</view>
- <view class="shopOrderList_title_r" @click="toShopOrderList({value:-1})">查看更多<text class="iconfont_yige"></text></view>
- </view>
- <view class="shopOrderList_b">
- <view class="shopOrderList_item" v-for="(item, index) in orderTab" :key="index" @click="toShopOrderList(item)">
- <view class="anglenum" v-if="item.count=='0'?false:item.count">
- {{item.count}}
- </view>
- <view class="shopOrderList_item_img">
- <image :src="item.icon" mode=""></image>
- </view>
- <view class="shopOrderList_item_lab">{{item.label}} </view>
- </view>
- </view>
- </view>
- <view class="list">
- <view class="list_item" v-for="(item, index) in toolsList" :key="index" @click="goSublevelPage(item.url)">
- <view class="list_item_l">
- <image :src="item.icon" mode=""></image>
- {{item.label}}
- </view>
- <view class="list_item_r">
- <image src="/static/czd/tiaozhuan.png" mode=""></image>
- </view>
- </view>
- </view>
-
- <view class="list" v-if="shopInfo.union_business" >
- <view class="list_title">商城订单</view>
- <view class="list_item" @click.stop="goWorkTablePage('/pages/workbench/shop/index')">
- <view class="list_item_l">
- <image src="/static/czd/personal_4.png" mode=""></image>
- 店铺管理
- </view>
- <view class="list_item_r">
- <image src="/static/czd/tiaozhuan.png" mode=""></image>
- </view>
- </view>
- <view class="list_item" @click="goWorkTablePage('/pages/workbench/goods/index')">
- <view class="list_item_l">
- <image src="/static/czd/personal_4.png" mode=""></image>
- 商品管理
- </view>
- <view class="list_item_r">
- <image src="/static/czd/tiaozhuan.png" mode=""></image>
- </view>
- </view>
- </view>
- </view>
- <!-- <view class="bgImg">
- <view class="position-ab">
- <view class="other">
- <view class="other-top">
- <view class="left">
- 其他工具
- </view>
- </view>
- <view class="option">
- <view class="list" @click.stop="goSublevelPage('/pages/order/gbOrder/gbOrderList')">
- <image class="my-icon" src="./../../static/personal/tool1.png" mode="aspectFit"></image>
- <view class="name-one">我的拼团</view>
- </view>
- <view class="list" @click="goSublevelPage('/pages/user/address/addressList')">
- <image class="my-icon" src="./../../static/personal/tool2.png" mode="aspectFit"></image>
- <view class="name-one">收货地址</view>
- </view>
- <view class="list" @click="goSublevelPage('/pages/research/setup/edit')">
- <image class="my-icon" src="./../../static/personal/tool3.png" mode="aspectFit"></image>
- <view class="name-one">个人信息</view>
- </view>
- <view class="list" @click="goSublevelPage('/pages/research/community/collection')">
- <image class="my-icon" src="./../../static/personal/tool4.png" mode="aspectFit"></image>
- <view class="name-one">我的收藏</view>
- </view>
- </view>
- <view class="option">
- <view class="list" v-if="platform == 'android' || (platform == 'ios' && openProxy == true)"
- @click="goSublevelPage('/pages/user/regional-agency/index')">
- <image class="my-icon" src="./../../static/personal/tool5.png" mode="aspectFit"></image>
- <view class="name-one">区域代理</view>
- </view>
- <view class="list" @click="goToRegisterAndAudit()">
- <image class="my-icon" src="./../../static/personal/tool6.png" mode="aspectFit"></image>
- <view class="name-one">商家入驻</view>
- </view>
- <view class="list" @click="goPhone()">
- <image class="my-icon" src="./../../static/personal/tool7.png" mode="aspectFit"></image>
- <view class="name-one">官方客服</view>
- </view>
- <view class="list" @click="goTocommonproblem()">
- <image class="my-icon" src="./../../static/personal/tool8.png" mode="aspectFit"></image>
- <view class="name-one">常见问题</view>
- </view>
- </view>
- <view class="option">
- <view class="list" @click="tabPage('/pages/couponCenter/index')">
- <image class="my-icon" src="./../../static/personal/tool8.png" mode="aspectFit"></image>
- <view class="name-one">领券中心</view>
- </view>
- </view>
- </view>
- <view class="other tools" v-if="shopInfo.union_business">
- <view class="other-top">
- <view class="left">
- 工作台
- </view>
- </view>
- <view class="option">
- <view class="list" @click.stop="goWorkTablePage('/pages/workbench/shop/index')">
- <image class="my-icon" src="./../../static/personal/shop-icon.png" mode="aspectFit"></image>
- <view class="name-one">店铺管理</view>
- </view>
- <view class="list" @click="goWorkTablePage('/pages/workbench/goods/index')">
- <image class="my-icon" src="./../../static/personal/goods-icon.png" mode="aspectFit">
- </image>
- <view class="name-one">商品管理</view>
- </view>
- <view class="list" @click="goWorkTablePage('/pages/workbench/order/index')">
- <image class="my-icon" src="./../../static/personal/order-icon.png" mode="aspectFit">
- </image>
- <view class="name-one">订单上报</view>
- </view>
- </view>
- </view>
- </view>
- </view> -->
- <!-- <div @click="goToMyWallet">aaa</div> -->
- <entrepreneurship-zone-tabbar :current="3"></entrepreneurship-zone-tabbar>
- </view>
- </view>
- </template>
- <!-- grade: 0 普通会员 , 1:店长 -->
- <!-- activating: 是否激活 -->
- <!-- auth_success: 是否认证 -->
- <!-- balance:余额 -->
- <!-- commission_able: 贡献值 -->
- <!-- integral_able: 积分值 -->
- <script>
- import {
- getAccountInfo
- } from "@/api/login.js"
- import {
- myStatistics,
- unreadNum
- } from "@/api/userInfo.js"
- import {
- myUserInfo
- } from "@/api/government.js"
- let app = getApp()
- export default {
- data() {
- return {
- config: {
- back: true, //false是tolbar页面 是则不写
- title: '个人中心',
- color: '#1A1A1A',
- //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
- backgroundColor: [1, '#fff'],
- rightSlot: true,
- },
- imgUrl: this.$mConfig.staticUrl,
- //微信小程序用户信息
- userInfo: {
- head_photo: "",
- nickname: "登录/注册"
- },
- hiddenLink: true,
- loginNo: false, //判断显示邀请码
- storage: true,
- isLogin: false, //判断是否登录
- userInformation: {}, //用户信息
- myCommunity: {}, //我的社区
- myMsg: null,
- ispay: app.globalData.openPay,
- numObj: {},
- //value对应订单列表接口的area_feature参数。传0或不传是排除了申购的订单列表(商品订单),传3是申购订单列表
- isSign: false, // 是否签到
- shopInfo: {},
- openProxy: false, // 是否开启区域代理
- platform: 'android',
- careerInfo: {},
- user: {},
- orderTab: [
- {
- label: '待付款',
- icon: '/static/order/order-icon1.png',
- value: 0,
- count: 0,
- },
- {
- label: '待发货',
- icon: '/static/order/order-icon2.png',
- value: 1,
- count: 0,
- },
- {
- label: '待收货',
- icon: '/static/order/order-icon3.png',
- value: 3,
- count: 0,
- },
- {
- label: '待评价',
- icon: '/static/order/order-icon4.png',
- value: 5,
- count: 0,
- },
- {
- label: '退换/售后',
- icon: '/static/order/order-icon5.png',
- value: 6,
- count: 0,
- }
- ],
- // 订单数量
- generalOrder: {
- waitPayNum: "0", //待支付数量
- waitCommentNum: "0", //待评论数量
- waitUseNum: "0", //待使用数量
- waitShipNum: "0", //待发货数量
- waitReceivingNum: "0" //待收货数量
- },
- toolsList: [
- {
- label: '我的拼团',
- icon: '/static/czd/personal_1.png',
- url: '/pages/order/gbOrder/gbOrderList',
- },
- {
- label: '收货地址',
- icon: '/static/czd/personal_2.png',
- url: '/pages/user/address/addressList',
- },
- {
- label: '商家入驻',
- icon: '/static/czd/personal_3.png',
- url: '/pages/user/merchant/settleIn?type=tenants_agreement',
- },
- {
- label: '个人信息',
- icon: '/static/czd/personal_4.png',
- url: '/pages/government/personalData',
- },
- {
- label: '我的收藏',
- icon: '/static/czd/personal_5.png',
- url: '/pages/research/community/collection',
- },
- // {
- // label: '推送设置',
- // icon: '/static/czd/personal_6.png',
- // url: '/pages/index/push',
- // }
- ]
- }
- },
- created() {
- let userInfo = uni.getStorageSync("apiToken")
- let shop = uni.getStorageSync("shop")
- },
- 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.isOpenProxy()
- this.platform = uni.getSystemInfoSync().platform;
- // let personal = uni.getStorageSync("personal")
- await this.judgeLogin().then(res => {
- // console.log('this.judgeLogin = res', res)
- })
- .catch(err => {
- /**
- * @description 重置数据
- */
- this.isLogin = false;
- this.userInformation = {}; //用户信息
- 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.getGeneralOrderCount()
- await this.getUnreadNum()
- await this.getcareerInfo()
- // this.$forceUpdate();
- // }
- this.getUserData()
- },
- onPullDownRefresh() {
- let token = uni.getStorageSync("apiToken")
- this.isOpenProxy()
- if (!token) {
- uni.stopPullDownRefresh();
- } else {
- this.getAll()
- }
- },
- methods: {
- getUserData() {
- myUserInfo().then(res => {
- this.user = res.data;
- uni.stopPullDownRefresh();
- }).catch(() => {
- uni.stopPullDownRefresh();
- })
- },
- // 获取店铺信息
- getShopInfo() {
- this.$http.get('/yxt/shop/my-shop', {
- union_business: true
- }).then(res => {
- if (res.code == 200 && res.data) {
- this.shopInfo = res.data
- } else {
- this.shopInfo.union_business = false
- }
- })
- },
- // 跳转我的积分
- goMypoints(){
- uni.navigateTo({
- url:"/pages/research/community/mypoints"
- })
- },
- isOpenProxy() {
- this.$http.get('/saleconfig/openPayment').then(res => {
- if (res && res.code == 200) {
- this.openProxy = res.openPayment;
- }
- });
- }, // 上部切换
- 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() //用户消息
- await this.getGeneralOrderCount()
- this.$forceUpdate();
- }
- },
- goaAdress() {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- return;
- }
- uni.navigateTo({
- url: '/pages/user/address/addressList'
- })
- },
- goUnserInfo() {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- return;
- }
- uni.navigateTo({
- url: '/pages/research/setup/edit'
- })
- },
- //获取未读消息
- getUnreadNum() {
- this.$http.get(unreadNum).then(res => {
- uni.stopPullDownRefresh();
- if (res && res.code == 200) {
- this.myMsg = res.data
- } else {
- this.myMsg = 0
- }
- }).catch(err => {
- this.myMsg = 0
- })
- },
- //跳转我的消息
- goToMsg() {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- return;
- }
- uni.navigateTo({
- url: "../research/setup/myMsg"
- })
- },
- //前往我的二维码
- 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.isSign = res.data.sign_in;
- uni.setStorageSync("personal", res.data)
- this.getShopInfo()
- } else {
- this.isLogin = false
- }
- })
- // } else {
- // this.isLogin = false
- // }
- },
- //跳转成为商家
- goToRegisterAndAudit() {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- } else {
- uni.navigateTo({
- url: "/pages/user/merchant/settleIn"
- })
- // this.$http.get("/yxt/shopapply/shopApplyInfo").then(res => {
- // if (res && res.code == 200) {
- // if (res.data == null) {
- // uni.navigateTo({
- // url: "/pages/user/merchant/settleIn"
- // // url: "../user/merchant/registerAndAudit"
- // })
- // } else {
- // if (res.data.audit_status == 2) {
- // uni.navigateTo({
- // url: "/pages/user/merchant/settleIn"
- // })
- // } 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"
- })
- }
- }
- })
- }
- },
- //常见问题
- goTocommonproblem() {
- uni.navigateTo({
- url: "../research/community/commonproblem"
- })
- },
- //跳转我的收藏
- goToCollection() {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- } else {
- uni.navigateTo({
- url: "/pages/research/community/collection"
- })
- }
- },
- // 区域代理
- goAreaAgency() {
- uni.navigateTo({
- url: '/pages/user/regional-agency/index'
- })
- },
- goMerchantCheck() {
- uni.showToast({
- title: "商家入住",
- icon: 'none'
- })
- },
- //跳转我的银行卡
- 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"
- })
- }
- },
- // 跳转子级页面
- goSublevelPage(page) {
- if (this.isLogin) {
- uni.navigateTo({
- url: page
- })
- } else {
- this.$mUtil.toast("请先登录")
- }
- },
- //跳转我的拼团
- goToGbOrderList() {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- } else {
- uni.navigateTo({
- url: "../order/gbOrder/gbOrderList"
- })
- }
- },
- //跳转我的评论
- 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
- })
- }
- },
- //跳转订单列表
- goToEdit() {
- let token = uni.getStorageSync("apiToken")
- if (!token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- } else if (token) {
- uni.navigateTo({
- url: "../research/setup/management"
- })
- }
- },
- //跳转我的粉丝
- 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"
- })
- },
- // 实名认证
- goAuthentication() {
- uni.navigateTo({
- url: "/pages/user/authentication"
- })
- },
- 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'
- })
- }
- }
- })
- }
- },
- //跳到拼团订单
- goGbOrder() {
- uni.navigateTo({
- url: "../order/gbOrder/gbOrderList"
- })
- },
- //常见问题
- goFaq() {
- uni.navigateTo({
- url: "../user/faq"
- })
- },
- //联系客服
- goPhone() {
- this.$http.get('/system/info/info', {}).then(res => {
- if (res && res.code == 200) {
- if (res.data.hotline) {
- uni.makePhoneCall({
- phoneNumber: res.data.hotline
- });
- }
- }
- })
- },
- tabPage(url, needLogin = false) {
- let token = uni.getStorageSync("apiToken")
- if (needLogin && !token) {
- uni.navigateTo({
- url: "../research/register/login"
- })
- return;
- }
- uni.navigateTo({
- url
- })
- },
- // 跳转工作台页面
- goWorkTablePage(page) {
- if (this.isLogin) {
- uni.navigateTo({
- url: page
- })
- } else {
- this.$mUtil.toast("请先登录")
- }
- },
- getcareerInfo() {
- this.$http.get('/account/operating/center/info').then(res => {
- if (res && res.code == 200) {
- this.careerInfo = res.data;
- }
- })
- },
-
- //获取普通订单统计
- getGeneralOrderCount() {
- this.$http.get('/order/general-order-count', {})
- .then(async res => {
- if (res && res.code == 200) {
- if (res.data) {
- this.orderTab[0].count = res.data.wait_pay_num //待支付
- this.orderTab[1].count = res.data.wait_ship_num //待发货
- this.orderTab[2].count = res.data.wait_receiving_num //待收货
- this.orderTab[3].count = res.data.wait_comment_num //待评论
- // 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 //待发货
- }
- }
- })
- },
-
- // 跳转商城订单列表页
- toShopOrderList(item) {
- if (this.isLogin) {
- uni.navigateTo({
- url: `/pages/order/orderList/orderList?keys=${item.value}&orderType=0`
- })
- } else {
- this.$mUtil.toast("请先登录")
- }
- }
- }
- }
- </script>
- <style>
- page {
- background-color: #F5F5F5;
- }
- </style>
- <style lang="scss" scoped>
- .top {
- // position: relative;
- width: 100%;
- height: 296rpx;
- display: flex;
- align-items: center;
- padding-bottom: 86rpx;
- background-color: #fff;
- border-radius: 0 0 70rpx 70rpx;
- // overflow: hidden;
- .head-login {
- width: 100%;
- .login {
- display: flex;
- background-color: #ffffff;
- // align-items: center;
- .message {
- color: #ffffff;
- width: 176rpx;
- height: 70rpx;
- // background: linear-gradient(90deg, #20a635 7%, #108a49);
- background-color: #FA6138;
- border-radius: 35rpx 0 0 35rpx;
- display: flex;
- align-items: center;
- padding-left: 36rpx;
- box-sizing: border-box;
- margin-top: 53rpx;
- transform: translateY(-50%);
- .setup {
- margin-right: 30rpx;
- font-size: 50rpx;
- }
- .setup-one {
- margin-right: 22rpx;
- font-size: 50rpx;
- }
- .iconfont2 {
- font-size: 33rpx;
- }
- .tip {
- font-size: 28rpx;
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- color: #ffffff;
- margin-left: 8rpx;
- }
- }
- }
- .name {
- // color: rgba(255, 255, 255, 1);
- color: #1A1A1A;
- font-size: 36rpx;
- margin-left: 22rpx;
- line-height: 100rpx;
- flex: 1;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- text {
- line-height: 30rpx;
- }
- .right {
- margin-left: 16rpx;
- }
- }
- image {
- width: 115rpx;
- height: 115rpx;
- border-radius: 999rpx;
- margin-left: 30rpx;
- }
- .top-title {
- height: 88rpx;
- line-height: 88rpx;
- }
- .head image {
- width: 106rpx;
- height: 106rpx;
- }
- .login {
- line-height: 106rpx;
- }
- }
- }
- .bgImg {
- position: relative;
- width: 100%;
- }
- .position-ab {
- .other {
- margin: 30rpx;
- background-color: #ffffff;
- padding: 45rpx 28rpx 40rpx 28rpx;
- border-radius: 20rpx;
- &:first-child {
- margin-top: 0;
- }
- .option {
- display: flex;
- // justify-content: space-between;
- &:nth-child(n + 1) {
- margin-top: 54rpx;
- }
- // flex-wrap: wrap;
- .list {
- margin-right: 72rpx;
- text-align: center;
- // width: 25%;
- // flex-shrink: 0;
- // &:nth-child(n + 5){
- //
- // }
- .my-icon {
- width: 48rpx;
- height: 46rpx;
- }
- .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;
- }
- &:last-child {
- margin-right: 0;
- }
- }
- }
- .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;
- }
- }
- }
- }
- .tools {
- .option {
- justify-content: flex-start;
- .list {
- margin-right: 72rpx;
- &:last-child {
- margin-right: 0;
- }
- }
- }
- }
- .community {
- margin-bottom: 100rpx;
- .community-item {
- display: flex;
- .num-and-item {
- width: 25%;
- text-align: center;
- .num {
- font-size: 36rpx;
- font-weight: 700;
- line-height: 30rpx;
- color: #FF0000;
- padding: 32rpx 0 16rpx 0;
- }
- .and-item {
- font-size: 26rpx;
- font-weight: 400;
- color: #1A1A1A;
- line-height: 30rpx;
- padding-bottom: 40rpx;
- }
- }
- }
- padding: 18rpx 30rpx;
- margin: 30rpx 30rpx;
- background-color: #ffffff;
- border-radius: 20rpx;
- .community-top {
- display: flex;
- padding-bottom: 18rpx;
- background-color: #ffffff;
- border-bottom: 1rpx solid #e6e6e6;
- .my-community {
- flex: 1;
- font-size: 30rpx;
- font-weight: 700;
- color: #1a1a1a;
- }
- .community-right {
- font-size: 28rpx;
- font-weight: 400;
- display: flex;
- align-items: center;
- color: #999999;
- .community-right-top {
- color: #999999;
- }
- .community-top {
- font-size: 24rpx;
- font-weight: 400;
- }
- .community-icon {
- // margin-top: 4rpx;
- margin-left: 16rpx;
- font-size: 35rpx;
- }
- }
- }
- }
- .wallet image {
- width: 32rpx;
- height: 34rpx;
- }
- }
- .career {
- display: flex;
- justify-content: space-between;
- align-items: center;
- width: 690rpx;
- // height: 200rpx;
- margin: 0 auto 30rpx;
- padding: 30rpx;
- padding-left: 35rpx;
- background: #FA6138;
- border-radius: 20rpx;
- font-size: 24rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 400;
- color: #ffffff;
- .label {
- display: flex;
- align-items: center;
- margin-bottom: 6rpx;
- font-size: 30rpx;
- font-weight: 700;
- color: #f5f5f5;
- margin-left: -8rpx;
- }
- .career-icon {
- font-size: 36rpx;
- }
- .status {
- margin-bottom: 10rpx;
- }
- .look-career {
- width: 195rpx;
- height: 80rpx;
- background: #FA6138;
- border: 2rpx solid #ffffff;
- font-size: 28rpx;
- border-radius: 41rpx;
- text-align: center;
- line-height: 80rpx;
- }
- }
- // czd
- .mine-top {
- display: flex;
- justify-content: space-between;
- align-items: stretch;
- padding: 20rpx 20rpx 70rpx 20rpx;
- background: #fff;
- .mine-left {
- display: flex;
- align-items: center;
- .mine-left-img {
- width: 120rpx;
- height: 120rpx;
- border-radius: 50%;
- border: 4rpx solid #fff;
- }
- .name-info {
- padding: 0 20rpx;
- .name-text {
- display: block;
- font-size: 32rpx;
- color: #fff;
- font-weight: 700;
- color: #1A1A1A;
- }
- .name-tag {
- display: block;
- font-size: 28rpx;
- margin-top: 6rpx;
- color: #fff;
- color: #808080;
- }
- }
- }
- .mine-right {
- display: flex;
- align-items: center;
- font-size: 32rpx;
- color: #fff;
- margin-right: 40rpx;
- }
- }
- .maxBox {
- width: 100%;
- background: #fff url("@/static/czd/person_bg.png");
- background-size: 100%;
- .pointsBox{
- width: 690rpx;
- height: 100rpx;
- // background: linear-gradient(127deg,#3cb7d2 6%, #46c8d5 93%);
- background: #FA6138;
- border-radius: 20rpx;
- margin: auto;
- position: relative;
- top: -30rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- font-size: 28rpx;
- color: #FFFFFF;
- padding: 0 30rpx;
- .pointsBox_l{
- font-weight: 700;
- image{
- width: 37rpx;
- height: 37rpx;
- vertical-align: middle;
- margin-right: 10rpx;
- }
- }
- .pointsBox_r{
-
- }
- }
- .shopOrderList {
- margin: 0 30rpx 30rpx;
- background: #fff;
- padding: 30rpx 30rpx 0 30rpx;
- border-radius: 20rpx;
-
- box-shadow: 0 2rpx 12rpx 0 rgba(0, 0, 0, 0.1);
- .shopOrderList_title {
- display: flex;
- justify-content: space-between;
- border-bottom: 2rpx solid #DEDEDE;
- padding-bottom: 30rpx;
- .shopOrderList_title_l {
- font-size: 30rpx;
- color: #1A1A1A;
- font-weight: 700;
- }
- .shopOrderList_title_r {
- font-size: 24rpx;
- color: #999999;
- .iconfont_yige {
- font-weight: 700;
- }
- }
- }
- .shopOrderList_b {
- display: flex;
- justify-content: space-between;
- padding: 30rpx 10rpx;
- .shopOrderList_item {
- position: relative;
- text-align: center;
-
- .anglenum {
- position: absolute;
- // margin-left: 75rpx;
- // margin-top: -20rpx;
- background-color: #ff0000;
- padding: 0px 11rpx;
- border-radius: 100rpx;
- font-weight: 400;
- font-size: 23rpx;
- color: #ffffff;
- right: -12rpx;
- top: -20rpx;
- }
- .shopOrderList_item_img {
- image {
- width: 44rpx;
- height: 44rpx;
- }
- }
- .shopOrderList_item_lab {
- font-size: 26rpx;
- color: #1A1A1A;
- }
- }
- }
- }
- }
- .list {
- margin: 0 30rpx;
- padding: 30rpx;
- background: #fff;
- border-radius: 20rpx;
- margin-bottom: 30rpx;
- .list_title{
- font-size: 15px;
- color: #1A1A1A;
- font-weight: 700;
- border-bottom: 1px solid #DEDEDE;
- padding-bottom: 15px;
- }
- .list_item {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 30rpx 0;
- border-bottom: 2rpx solid #DEDEDE;
-
- &:last-child {
- border-bottom: none;
- }
- .list_item_l {
- font-size: 28rpx;
- color: #1A1A1A;
- display: flex;
- align-items: center;
- image {
- width: 37rpx;
- height: 37rpx;
- margin-right: 16rpx;
- }
- }
- .list_item_r {
- image {
- width: 14rpx;
- height: 22rpx;
- }
- }
- }
- }
- </style>
|