index.vue 23 KB

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