index.vue 23 KB

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