index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742
  1. <template>
  2. <view style="padding-bottom: 100upx;">
  3. <view class="bg padding-bottom">
  4. <view class=" u-flex padding ">
  5. <view class="u-m-r-10">
  6. <!-- @click="goNav('/pages/my/userinfo')" -->
  7. <image :src="shopCover" style="width: 100rpx;height: 100rpx;border-radius: 100rpx;"
  8. @click="goNavs(list[0].url)"></image>
  9. </view>
  10. <view class="u-flex-1 u-m-l-10 flex justify-between align-center" v-if="!isLogin">
  11. <view class="u-font-18 text-bold">
  12. <!-- #ifdef MP-WEIXIN -->
  13. <view class="margin-left-sm margin-top-xs" style="width: 180px;">{{shopName}}</view>
  14. <!-- #endif -->
  15. <!-- #ifndef MP-WEIXIN -->
  16. <view class="margin-left-sm margin-top-xs" style="width: 180px;">{{shopName}}</view>
  17. <!-- #endif -->
  18. </view>
  19. <view class="erweima" @click="shopQr()">二维码</view>
  20. </view>
  21. <view v-else class="text-xl u-p-l-20 text-bold" @click="goLogin('/pages/my/loginphone')">
  22. 登录
  23. </view>
  24. </view>
  25. <view class="moneybox" v-if="XCXIsSelect == '是'">
  26. <view class="padding" style="background: #FCD202;border-radius: 20upx 20upx 0upx 0upx;">
  27. <view class="flex justify-between">
  28. <view>
  29. <view>累计收益(元)</view>
  30. <view class="margin-top-xs" style="font-size: 40upx;">
  31. ¥<text style="font-size: 55upx;">{{sumMoney}}</text></view>
  32. </view>
  33. <view class="btn" @click="goQian()">立即提现</view>
  34. </view>
  35. <view class="flex justify-between align-center text-center margin-top">
  36. <view>
  37. <view>今日收益</view>
  38. <view class="margin-top-xs" style="font-size: 38upx;">
  39. ¥<text style="font-size: 48upx;">{{dayMoney?dayMoney:'0'}}</text></view>
  40. </view>
  41. <view>
  42. <view>本月收益</view>
  43. <view class="margin-top-xs" style="font-size: 38upx;">
  44. ¥<text style="font-size: 48upx;">{{monthMoney?monthMoney:'0'}}</text></view>
  45. </view>
  46. <view>
  47. <view>本月提现</view>
  48. <view class="margin-top-xs" style="font-size: 38upx;">
  49. ¥<text style="font-size: 48upx;">{{cashMoney?cashMoney:'0'}}</text></view>
  50. </view>
  51. </view>
  52. </view>
  53. <view class="flex align-center justify-between padding-lr padding-tb-sm"
  54. style="background: #FCB202;border-radius: 0upx 0upx 20upx 20upx;">
  55. <view class="">每次提现平台将扣除相应手续费</view>
  56. <view class="xflist" @click="goNav('/my/other/cashList')">钱包明细</view>
  57. </view>
  58. </view>
  59. </view>
  60. <view class="bg margin-top-sm">
  61. <!-- 店铺管理 -->
  62. <view class="flex padding-lr padding-tb dfs" @click="goNavs(list[0].url)">
  63. <image :src="list[0].image" style="width: 50rpx;height: 50rpx;" mode=""></image>
  64. <view class="flex-sub margin-left text-df" style="line-height: 50upx;">{{list[0].title}}</view>
  65. <image src="../../static/images/my/right.png" class="images" mode=""></image>
  66. </view>
  67. <!-- 商品管理 -->
  68. <view class="flex padding-lr padding-tb dfs" @click="goNavs(list[1].url)">
  69. <image :src="list[1].image" style="width: 50rpx;height: 50rpx;" mode=""></image>
  70. <view class="flex-sub margin-left text-df" style="line-height: 50upx;">{{list[1].title}}</view>
  71. <image src="../../static/images/my/right.png" class="images" mode=""></image>
  72. </view>
  73. <!-- 订单管理 -->
  74. <view class="flex padding-lr padding-tb" @click="goOrder()">
  75. <image :src="list[2].image" style="width: 50rpx;height: 50rpx;" mode=""></image>
  76. <view class="flex-sub margin-left text-df" style="line-height: 50upx;">{{list[2].title}}</view>
  77. <image src="../../static/images/my/right.png" class="images" mode=""></image>
  78. </view>
  79. <!-- 分类管理 -->
  80. <view class="flex padding-lr padding-tb" @click="goNavs(list[3].url)">
  81. <image :src="list[3].image" style="width: 50rpx;height: 50rpx;" mode=""></image>
  82. <view class="flex-sub margin-left text-df" style="line-height: 50upx;">{{list[3].title}}</view>
  83. <image src="../../static/images/my/right.png" class="images" mode=""></image>
  84. </view>
  85. <!-- 规格管理 -->
  86. <view class="flex padding-lr padding-tb" @click="goNavs(list[4].url)">
  87. <image :src="list[4].image" style="width: 50rpx;height: 50rpx;" mode=""></image>
  88. <view class="flex-sub margin-left text-df" style="line-height: 50upx;">{{list[4].title}}</view>
  89. <image src="../../static/images/my/right.png" class="images" mode=""></image>
  90. </view>
  91. <!-- 保证金 -->
  92. <view class="flex padding-lr padding-tb" @click="goNav(list[5].url)" v-if="XCXIsSelect == '是'">
  93. <image :src="list[5].image" style="width: 50rpx;height: 50rpx;" mode=""></image>
  94. <view class="flex-sub margin-left text-df" style="line-height: 50upx;">{{list[5].title}}</view>
  95. <image src="../../static/images/my/right.png" class="images" mode=""></image>
  96. </view>
  97. <!-- 规格管理 -->
  98. <view class="flex padding-lr padding-tb" @click="goNavs(list[13].url)">
  99. <image :src="list[13].image" style="width: 50rpx;height: 50rpx;" mode=""></image>
  100. <view class="flex-sub margin-left text-df" style="line-height: 50upx;">{{list[13].title}}</view>
  101. <image src="../../static/images/my/right.png" class="images" mode=""></image>
  102. </view>
  103. <!-- 精选活动 -->
  104. <view class="flex padding-lr padding-tb" @click="goNavs(list[14].url)">
  105. <image :src="list[14].image" style="width: 50rpx;height: 50rpx;" mode=""></image>
  106. <view class="flex-sub margin-left text-df" style="line-height: 50upx;">{{list[14].title}}</view>
  107. <image src="../../static/images/my/right.png" class="images" mode=""></image>
  108. </view>
  109. <!-- 优惠券管理 -->
  110. <view class="flex padding-lr padding-tb" @click="goNavs(list[15].url)">
  111. <image :src="list[15].image" style="width: 50rpx;height: 50rpx;" mode=""></image>
  112. <view class="flex-sub margin-left text-df" style="line-height: 50upx;">{{list[15].title}}</view>
  113. <image src="../../static/images/my/right.png" class="images" mode=""></image>
  114. </view>
  115. </view>
  116. <view class="bg margin-top-sm">
  117. <!-- 聊天中心 -->
  118. <view class="flex padding-lr padding-tb dfs" @click="goNav(list[12].url)">
  119. <image :src="list[12].image" style="width: 50rpx;height: 50rpx;" mode=""></image>
  120. <view class="flex-sub margin-left text-df" style="line-height: 50upx;">{{list[12].title}}</view>
  121. <view class="flex align-center">
  122. <view v-if="messageCount" class="bott">{{messageCount}}</view>
  123. <image src="../../static/images/my/right.png" class="images" mode=""></image>
  124. </view>
  125. </view>
  126. <!-- 联系客服 -->
  127. <view class="flex padding-lr padding-tb dfs" @click="goNav(list[6].url)">
  128. <image :src="list[6].image" style="width: 50rpx;height: 50rpx;" mode=""></image>
  129. <view class="flex-sub margin-left text-df" style="line-height: 50upx;">{{list[6].title}}</view>
  130. <image src="../../static/images/my/right.png" class="images" mode=""></image>
  131. </view>
  132. <!-- 关于我们 -->
  133. <!-- <view class="flex padding-lr padding-tb dfs" @click="goNav(list[7].url)">
  134. <image :src="list[7].image" style="width: 50rpx;height: 50rpx;" mode=""></image>
  135. <view class="flex-sub margin-left text-df" style="line-height: 50upx;">{{list[7].title}}</view>
  136. <image src="../../static/images/my/right.png" class="images" mode=""></image>
  137. </view> -->
  138. <!-- 意见反馈 -->
  139. <view class="flex padding-lr padding-tb dfs" @click="goNav(list[8].url)" v-if="XCXIsSelect == '是'">
  140. <image :src="list[8].image" style="width: 50rpx;height: 50rpx;" mode=""></image>
  141. <view class="flex-sub margin-left text-df" style="line-height: 50upx;">{{list[8].title}}</view>
  142. <image src="../../static/images/my/right.png" class="images" mode=""></image>
  143. </view>
  144. <!-- 我的投诉 -->
  145. <view class="flex padding-lr padding-tb dfs" @click="goNav(list[9].url)">
  146. <image :src="list[9].image" style="width: 50rpx;height: 50rpx;" mode=""></image>
  147. <view class="flex-sub margin-left text-df" style="line-height: 50upx;">{{list[9].title}}</view>
  148. <image src="../../static/images/my/right.png" class="images" mode=""></image>
  149. </view>
  150. <!-- #ifdef MP-WEIXIN -->
  151. <view class="flex padding-lr padding-tb dfs" @click="gouser()">
  152. <image :src="list[10].image" style="width: 50rpx;height: 50rpx;" mode=""></image>
  153. <view class="flex-sub margin-left text-df" style="line-height: 50upx;">{{list[10].title}}</view>
  154. <image src="../../static/images/my/right.png" class="images" mode=""></image>
  155. </view>
  156. <!-- #endif -->
  157. <!-- 系统设置 -->
  158. <view class="flex padding-lr padding-tb dfs" @click="goset()">
  159. <image :src="list[11].image" style="width: 50rpx;height: 50rpx;" mode=""></image>
  160. <view class="flex-sub margin-left text-df" style="line-height: 50upx;">{{list[11].title}}</view>
  161. <image src="../../static/images/my/right.png" class="images" mode=""></image>
  162. </view>
  163. <!-- 退出登录 -->
  164. <!-- <view class="flex padding-lr padding-tb dfs" @click="TuiLogin()" v-if="!isLogin">
  165. <image :src="list[10].image" style="width: 50rpx;height: 50rpx;" mode=""></image>
  166. <view class="flex-sub margin-left text-df" style="line-height: 50upx;">{{list[10].title}}</view>
  167. <image src="../../static/images/my/right.png" class="images" mode=""></image>
  168. </view> -->
  169. </view>
  170. <u-popup v-model="show" mode="center" border-radius="14" width="500rpx" height="500rpx" :closeable="closeable">
  171. <view style="width: 180px;height: 180px;margin: 40px auto;">
  172. <image :src="shopQrImg" style="width: 100%;height: 100%;" @click="previewImage"></image>
  173. </view>
  174. </u-popup>
  175. </view>
  176. </template>
  177. <script>
  178. import configurl from '../../common/config.js'
  179. export default {
  180. data() {
  181. return {
  182. shopCover: '../../static/logo.png',
  183. isLogin: true,
  184. shopName: '匿名',
  185. sumMoney: 0, //累计余额
  186. dayMoney: 0, //今日收益
  187. monthMoney: 0, //本月预估收益
  188. cashMoney: 0, // 本月预估提现
  189. shopToken: '',
  190. isVip: false,
  191. invitationCode: '', //邀请码
  192. list: [{
  193. image: '../../static/images/my/dianpu.png',
  194. title: '店铺管理',
  195. url: '/my/store/index'
  196. }, {
  197. image: '../../static/images/my/shangpin.png',
  198. title: '商品管理',
  199. url: '/my/store/addgood'
  200. }, {
  201. image: '../../static/images/my/order.png',
  202. title: '订单管理',
  203. url: '/pages/order/index'
  204. }, {
  205. image: '../../static/images/my/fenlei.png',
  206. title: '分类管理',
  207. url: '/my/store/fenlei'
  208. }, {
  209. image: '../../static/images/my/guige.png',
  210. title: '规格管理',
  211. url: '/my/store/guige'
  212. }, {
  213. image: '../../static/images/my/baozhengjin.png',
  214. title: '保证金',
  215. url: '/my/other/money'
  216. }, {
  217. image: '../../static/images/my/kefu.png',
  218. title: '联系客服',
  219. url: '/pages/my/chat'
  220. }, {
  221. image: '../../static/images/my/guanyu.png',
  222. title: '关于我们',
  223. url: '/my/other/about'
  224. }, {
  225. image: '../../static/images/my/yijian.png',
  226. title: '意见反馈',
  227. url: '/my/feedback/index'
  228. }, {
  229. image: '../../static/images/my/00.png',
  230. title: '我的投诉',
  231. url: '/my/other/tousu'
  232. }, {
  233. image: '../../static/images/my/user.png',
  234. title: '前往用户端',
  235. url: ''
  236. }, {
  237. image: '../../static/images/my/set1.png',
  238. title: '系统设置',
  239. url: '/my/other/set'
  240. }, {
  241. image: '../../static/images/my/liaotian.png',
  242. title: '聊天中心',
  243. url: '/pages/my/liaotian'
  244. }, {
  245. image: '../../static/images/order/pinglun.png',
  246. title: '店铺评价',
  247. url: '/my/store/pingjia'
  248. }, {
  249. image: '../../static/images/order/hd.png',
  250. title: '精选活动',
  251. url: '/my/store/huodong'
  252. }, {
  253. image: '../../static/images/order/yhq.png',
  254. title: '优惠券管理',
  255. url: '/my/yhq/yhq'
  256. }],
  257. renzheng: 0,
  258. XCXIsSelect: '否',
  259. isCashDeposit: '',
  260. show: false,
  261. shopQrImg: '',
  262. closeable: true,
  263. open: true,
  264. arr:[],
  265. messageCount: ''
  266. }
  267. },
  268. onLoad() {
  269. // this.messageCount = uni.getStorageSync('messageCount')
  270. this.XCXIsSelect = this.$queue.getData("XCXIsSelect");
  271. this.shopToken = uni.getStorageSync('shopToken') ? uni.getStorageSync('shopToken') : ''
  272. this.userId = uni.getStorageSync('userId')
  273. this.open = uni.getStorageSync('open')
  274. this.$Request.getT('/app/common/type/354').then(res => { //订单取消通知
  275. if (res.code == 0) {
  276. if (res.data && res.data.value) {
  277. this.arr.push(res.data.value)
  278. }
  279. }
  280. })
  281. this.$Request.getT('/app/common/type/353').then(res => { //订单取消通知
  282. if (res.code == 0) {
  283. if (res.data && res.data.value) {
  284. this.arr.push(res.data.value)
  285. }
  286. }
  287. })
  288. this.$Request.getT('/app/common/type/352').then(res => { //新订单通知
  289. if (res.code == 0) {
  290. if (res.data && res.data.value) {
  291. this.arr.push(res.data.value)
  292. }
  293. }
  294. })
  295. // let that= this
  296. // if (this.open = true) {
  297. // uni.showModal({
  298. // title: '提示',
  299. // content: '请先去完善店铺信息,上线店铺后同城外卖用户端首页展示您的店铺。',
  300. // success: function(res) {
  301. // if (res.confirm) {
  302. // console.log('用户点击确定');
  303. // that.open = false
  304. // that.$queue.setData("open", that.open);
  305. // } else if (res.cancel) {
  306. // console.log('用户点击取消');
  307. // that.open = false
  308. // that.$queue.setData("open", that.open);
  309. // }
  310. // }
  311. // })
  312. // }
  313. },
  314. onShow() {
  315. this.shopToken = uni.getStorageSync('shopToken') ? uni.getStorageSync('shopToken') : ''
  316. if (this.shopToken) {
  317. this.messageCount = uni.getStorageSync('messageCount')
  318. this.isLogin = false
  319. this.getUserInfo()
  320. this.getshanghuinfo()
  321. this.getAmount()
  322. } else {
  323. this.isLogin = true
  324. this.shopName = '匿名'
  325. this.shopCover = '../../static/logo.png'
  326. this.sumMoney = 0 //累计余额
  327. this.dayMoney = 0 //今日收益
  328. this.monthMoney = 0 //本月收益
  329. this.cashMoney = 0 //本月提现
  330. }
  331. },
  332. methods: {
  333. previewImage() {
  334. var arr = [];
  335. arr.push(this.shopQrImg);
  336. //uniapp预览轮播图方法
  337. uni.previewImage({
  338. current: 0, //预览图片的下标
  339. urls: arr //预览图片的地址,必须要数组形式
  340. })
  341. },
  342. //跳转设置
  343. goset() {
  344. uni.navigateTo({
  345. url: '/my/other/set'
  346. })
  347. },
  348. //生成二维码
  349. shopQr() {
  350. // uni.showLoading({
  351. // title: '二维码生成中',
  352. // duration: 1000,
  353. // icon: 'none'
  354. // });
  355. this.show = true
  356. this.shopQrImg = configurl.APIHOSTsss + '/sqx_fast/invite/shopQr?shopId=' + uni.getStorageSync(
  357. 'shopId')
  358. },
  359. //跳转用户端
  360. gouser() {
  361. wx.navigateToMiniProgram({
  362. appId: 'wx45ab46867002aa0b',
  363. path: '/pages/index/index',
  364. envVersion: 'release', // 打开正式版
  365. success(res) {
  366. // 打开成功
  367. },
  368. fail: function(err) {
  369. console.log(err);
  370. }
  371. })
  372. },
  373. goQian() {
  374. if (this.shopToken) {
  375. // #ifdef MP-WEIXIN
  376. if (uni.getStorageSync('sendindexMsg')) {
  377. uni.requestSubscribeMessage({
  378. tmplIds: this.arr,
  379. success(re) {
  380. // console.log(re,'**********')
  381. var datas = JSON.stringify(re);
  382. if (datas.indexOf("accept") != -1) {
  383. console.log(re)
  384. }
  385. },
  386. fail: (res) => {
  387. console.log(res)
  388. }
  389. })
  390. }
  391. // #endif
  392. uni.navigateTo({
  393. url: '/my/other/wallet'
  394. })
  395. } else {
  396. uni.showModal({
  397. title: '提示',
  398. content: '您还未登录,请先登录',
  399. success: function(res) {
  400. if (res.confirm) {
  401. console.log('用户点击确定');
  402. uni.navigateTo({
  403. url: '/pages/my/loginphone'
  404. })
  405. } else if (res.cancel) {
  406. console.log('用户点击取消');
  407. }
  408. }
  409. })
  410. }
  411. },
  412. bindFb() {
  413. let renzheng = uni.getStorageSync('renzheng')
  414. console.log(this.userId, renzheng)
  415. if (this.shopToken) {
  416. // #ifdef MP-WEIXIN
  417. if (uni.getStorageSync('sendindexMsg')) {
  418. uni.requestSubscribeMessage({
  419. tmplIds: this.arr,
  420. success(re) {
  421. // console.log(re,'**********')
  422. var datas = JSON.stringify(re);
  423. if (datas.indexOf("accept") != -1) {
  424. console.log(re)
  425. }
  426. },
  427. fail: (res) => {
  428. console.log(res)
  429. }
  430. })
  431. }
  432. // #endif
  433. uni.navigateTo({
  434. url: '/my/publish/editor'
  435. })
  436. } else {
  437. uni.showModal({
  438. title: '提示',
  439. content: '您还未登录,请先登录',
  440. success: function(res) {
  441. if (res.confirm) {
  442. console.log('用户点击确定');
  443. uni.navigateTo({
  444. url: '/pages/my/loginphone'
  445. })
  446. } else if (res.cancel) {
  447. console.log('用户点击取消');
  448. }
  449. }
  450. })
  451. }
  452. },
  453. goOrder() {
  454. uni.switchTab({
  455. url: '/pages/order/index'
  456. })
  457. },
  458. //列表跳转
  459. goNav(e, name) {
  460. console.log(e)
  461. if (this.shopToken) {
  462. // #ifdef MP-WEIXIN
  463. if (uni.getStorageSync('sendindexMsg')) {
  464. uni.requestSubscribeMessage({
  465. tmplIds: this.arr,
  466. success(re) {
  467. // console.log(re,'**********')
  468. var datas = JSON.stringify(re);
  469. if (datas.indexOf("accept") != -1) {
  470. console.log(re)
  471. }
  472. },
  473. fail: (res) => {
  474. console.log(res)
  475. }
  476. })
  477. }
  478. // #endif
  479. uni.navigateTo({
  480. url: e
  481. })
  482. } else {
  483. uni.showModal({
  484. title: '提示',
  485. content: '您还未登录,请先登录',
  486. success: function(res) {
  487. if (res.confirm) {
  488. console.log('用户点击确定');
  489. uni.navigateTo({
  490. url: '/pages/my/loginphone'
  491. })
  492. } else if (res.cancel) {
  493. console.log('用户点击取消');
  494. }
  495. }
  496. })
  497. }
  498. },
  499. //列表跳转
  500. goNavs(e, name) {
  501. console.log(e)
  502. let cashDeposit = uni.getStorageSync("cashDeposit")
  503. if (this.shopToken) {
  504. // #ifdef MP-WEIXIN
  505. if (uni.getStorageSync('sendindexMsg')) {
  506. uni.requestSubscribeMessage({
  507. tmplIds: this.arr,
  508. success(re) {
  509. // console.log(re,'**********')
  510. var datas = JSON.stringify(re);
  511. if (datas.indexOf("accept") != -1) {
  512. console.log(re)
  513. }
  514. },
  515. fail: (res) => {
  516. console.log(res)
  517. }
  518. })
  519. }
  520. // #endif
  521. if (cashDeposit == 0 || cashDeposit == 'null') {
  522. uni.showModal({
  523. title: '提示',
  524. content: '您还未缴纳保证金,请先去缴纳保证金',
  525. success: function(res) {
  526. if (res.confirm) {
  527. console.log('用户点击确定');
  528. uni.navigateTo({
  529. url: '/my/other/money'
  530. })
  531. } else if (res.cancel) {
  532. console.log('用户点击取消');
  533. }
  534. }
  535. })
  536. } else {
  537. uni.navigateTo({
  538. url: e
  539. })
  540. }
  541. } else {
  542. uni.showModal({
  543. title: '提示',
  544. content: '您还未登录,请先登录',
  545. success: function(res) {
  546. if (res.confirm) {
  547. console.log('用户点击确定');
  548. uni.navigateTo({
  549. url: '/pages/my/loginphone'
  550. })
  551. } else if (res.cancel) {
  552. console.log('用户点击取消');
  553. }
  554. }
  555. })
  556. }
  557. },
  558. goLogin(e) {
  559. uni.navigateTo({
  560. url: e
  561. })
  562. },
  563. //我的收益
  564. getAmount() {
  565. let data = {
  566. shopId: uni.getStorageSync('shopId')
  567. }
  568. this.$Request.get("/app/shop/shopEarnings", data).then(res => {
  569. if (res.code == 0) {
  570. this.sumMoney = parseFloat(res.data.shopAllEarnings).toFixed(2) //累计余额
  571. this.dayMoney = parseFloat(res.data.shopEarningsDay).toFixed(2) //今日收益
  572. this.monthMoney = parseFloat(res.data.shopEarningsMonth).toFixed(2) //本月收益
  573. this.cashMoney = parseFloat(res.data.cashMoney).toFixed(2) //本月提现
  574. }
  575. });
  576. },
  577. getshanghuinfo() {
  578. let data = {
  579. shopId: uni.getStorageSync('shopId')
  580. }
  581. this.$Request.get("/app/shop/selectShopMessage", data).then(res => {
  582. if (res.code == 0) {
  583. uni.setStorageSync('cashDeposit', res.data.cashDeposit)
  584. }
  585. });
  586. },
  587. selectShop(e) {
  588. this.shop = e
  589. this.show = false
  590. },
  591. goNav(url) {
  592. if (this.shopToken) {
  593. // #ifdef MP-WEIXIN
  594. if (uni.getStorageSync('sendindexMsg')) {
  595. uni.requestSubscribeMessage({
  596. tmplIds: this.arr,
  597. success(re) {
  598. // console.log(re,'**********')
  599. var datas = JSON.stringify(re);
  600. if (datas.indexOf("accept") != -1) {
  601. console.log(re)
  602. }
  603. },
  604. fail: (res) => {
  605. console.log(res)
  606. }
  607. })
  608. }
  609. // #endif
  610. uni.navigateTo({
  611. url
  612. })
  613. } else {
  614. uni.navigateTo({
  615. url: '/pages/my/loginphone'
  616. })
  617. }
  618. },
  619. getUserInfo() {
  620. this.$Request.getA("/sys/user/info").then(res => {
  621. if (res.code == 0) {
  622. this.shopName = res.user.shopList[0].shopName
  623. this.shopCover = res.user.shopList[0].shopCover ? res.user.shopList[0].shopCover :
  624. '../../static/logo.png'
  625. this.$queue.setData("avatar", res.user.shopList[0].shopCover);
  626. this.$queue.setData("userId", res.user.userId);
  627. this.$queue.setData("shopId", res.user.shopList[0].shopId);
  628. this.$queue.setData("mobile", res.user.mobile);
  629. this.$queue.setData("shopUserName", res.user.shopList[0].shopName);
  630. if (res.user.userEntity) {
  631. this.$queue.setData("zhiFuBao", res.user.userEntity.zhiFuBao);
  632. this.$queue.setData("zhiFuBaoName", res.user.userEntity.zhiFuBaoName);
  633. }
  634. }
  635. });
  636. },
  637. }
  638. }
  639. </script>
  640. <style lang="scss">
  641. page {
  642. background-color: #F2F2F2;
  643. }
  644. .bg {
  645. background: #FFFFFF;
  646. }
  647. .camera {
  648. width: 54px;
  649. height: 44px;
  650. &:active {
  651. background-color: #ededed;
  652. }
  653. }
  654. .btn-bg {
  655. width: 64px;
  656. height: 28px;
  657. background: linear-gradient(90deg, #CDA26E 0%, #DCB78A 100%);
  658. border-radius: 28px;
  659. text-align: center;
  660. line-height: 28px;
  661. margin-top: 4px;
  662. color: '#604320'
  663. }
  664. .images {
  665. width: 18rpx;
  666. height: 30rpx;
  667. }
  668. .dfs {
  669. display: flex;
  670. align-items: center;
  671. }
  672. .moneybox {
  673. width: 690upx;
  674. margin: 0 auto;
  675. // height: 369upx;
  676. // background: #2FB57A;
  677. border-radius: 20upx 20upx 20upx 20upx;
  678. }
  679. .btn {
  680. width: 160upx;
  681. height: 60upx;
  682. background: linear-gradient(90deg, #3D3734 0%, #252323 100%);
  683. border-radius: 50upx;
  684. text-align: center;
  685. line-height: 60upx;
  686. color: #FFFFFF;
  687. }
  688. .xflist {
  689. width: 150upx;
  690. height: 50upx;
  691. background: #211D2C;
  692. color: #FFFFFF;
  693. border-radius: 5upx;
  694. text-align: center;
  695. line-height: 50upx;
  696. }
  697. .erweima {
  698. background: #FCD202;
  699. padding: 5px 10px;
  700. border-radius: 20px;
  701. }
  702. .bott {
  703. background: red;
  704. color: #ffffff;
  705. width: 30upx;
  706. height: 30upx;
  707. text-align: center;
  708. line-height: 26upx;
  709. padding: 5rpx;
  710. border-radius: 60%;
  711. font-size: 23rpx;
  712. margin-right: 15rpx;
  713. }
  714. </style>