index.vue 24 KB

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