merchant.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <template>
  2. <view class="body">
  3. <view class="background"></view>
  4. <view class="content">
  5. <view class="userInfo">
  6. <view class="userInfo-box">
  7. <view class="userInfo-img"><image class="portrait" src="../../static/error/missing-face.png"></image></view>
  8. <view class="userInfo-xinxi">
  9. <view class="title"><text>满园春泰州店</text></view>
  10. <view class="phone"><text>19999999999</text></view>
  11. </view>
  12. <view class="balance">可用余额¥20000</view>
  13. </view>
  14. </view>
  15. <view class="userInfoList">
  16. <view class="userInfoList-top" @click="sao()">
  17. <view class="top"><image src="../../static/merchant/saoma.png" mode=""></image></view>
  18. 扫码核销
  19. </view>
  20. <view class="userInfoList-top" @click="navTo('/pages/merchant/storeQr')">
  21. <view class="top"><image src="../../static/merchant/erweima.png" mode=""></image></view>
  22. 店铺二维码
  23. </view>
  24. <view class="userInfoList-bottom" @click="navTo('/pages/merchant/finance')">
  25. <view class="bottom"><image src="../../static/merchant/money.png" mode=""></image></view>
  26. 店铺财务
  27. </view>
  28. <view class="userInfoList-bottom" @click="navTo('/pages/merchant/order')">
  29. <view class="bottom"><image src="../../static/merchant/order.png" mode=""></image></view>
  30. 订单管理
  31. </view>
  32. <view class="userInfoList-bottom" @click="navTo('/pages/merchant/commodity')">
  33. <view class="bottom"><image src="../../static/merchant/shop.png" mode=""></image></view>
  34. 商品管理
  35. </view>
  36. <view class="userInfoList-bottom" @click="navTo('/pages/merchant/onlineOrder')">
  37. <view class="bottom">
  38. <image src="../../static/merchant/xiadan.png" mode=""></image>
  39. </view>
  40. 在线下单
  41. </view>
  42. <view class="userInfoList-bottom" @click="navTo('/pages/merchant/vipDetail')">
  43. <view class="bottom"><image src="../../static/merchant/vip.png" mode=""></image></view>
  44. 店铺会员
  45. </view>
  46. <view class="userInfoList-bottom" @click="navTo('/pages/merchant/storeData')">
  47. <view class="bottom"><image src="../../static/merchant/dianpu.png" mode=""></image></view>
  48. 店铺数据
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. export default {
  56. data() {
  57. return {};
  58. },
  59. methods: {
  60. //跳转
  61. navTo(url) {
  62. uni.navigateTo({
  63. url
  64. });
  65. },
  66. //调取扫描二维码
  67. sao() {
  68. let obj = this;
  69. // #ifndef H5
  70. uni.scanCode({
  71. success(e) {
  72. obj.orderVerific(e.result);
  73. }
  74. });
  75. // #endif
  76. // #ifdef H5
  77. this.weichatObj.scanQRCode({
  78. needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
  79. scanType: ['qrCode', 'barCode'], // 可以指定扫二维码还是一维码,默认二者都有
  80. success: function(res) {
  81. obj.orderVerific(res.resultStr); // 当needResult 为 1 时,扫码返回的结果
  82. }
  83. });
  84. // #endif
  85. }
  86. }
  87. };
  88. </script>
  89. <style lang="scss">
  90. page {
  91. height: 100%;
  92. background-color: #eeeded;
  93. padding: 0;
  94. margin: 0;
  95. }
  96. .content {
  97. background-color: #eeeded;
  98. margin: 0 30rpx;
  99. display: flex;
  100. flex-direction: column;
  101. }
  102. .background {
  103. width: 100%;
  104. height: 220rpx;
  105. background-color: #75e5b6;
  106. }
  107. .userInfo {
  108. margin-top: -110rpx;
  109. display: flex;
  110. flex-direction: column;
  111. justify-content: center;
  112. background-color: #f9f9f9;
  113. border-radius: 19rpx;
  114. width: 100%;
  115. height: 300rpx;
  116. .userInfo-box {
  117. display: flex;
  118. flex-direction: column;
  119. align-items: center;
  120. .userInfo-img {
  121. margin: -65rpx 0 0 0;
  122. width: 130rpx;
  123. height: 130rpx;
  124. border: 5rpx solid #fff;
  125. border-radius: 50%;
  126. image {
  127. width: 100%;
  128. height: 100%;
  129. }
  130. }
  131. .userInfo-xinxi {
  132. .title {
  133. margin: 20rpx 0;
  134. font-size: 32rpx;
  135. font-family: PingFang SC;
  136. font-weight: bold;
  137. color: #333333;
  138. line-height: 21rpx;
  139. }
  140. .phone {
  141. font-size: 28rpx;
  142. font-family: PingFang SC;
  143. font-weight: 500;
  144. color: #666666;
  145. line-height: 21rpx;
  146. margin-bottom: 40rpx;
  147. }
  148. }
  149. .balance {
  150. text-align: center;
  151. width: 500rpx;
  152. height: 60rpx;
  153. background: #52c696;
  154. border-radius: 30rpx;
  155. font-size: 28rpx;
  156. font-family: PingFang SC;
  157. font-weight: 500;
  158. color: #ffffff;
  159. line-height: 60rpx;
  160. }
  161. }
  162. }
  163. .userInfoList {
  164. display: flex;
  165. flex-wrap: wrap;
  166. justify-content: space-between;
  167. .userInfoList-top {
  168. position: relative;
  169. margin: 15rpx 0;
  170. display: flex;
  171. justify-content: center;
  172. align-items: center;
  173. width: 340rpx;
  174. height: 100rpx;
  175. background: #ffffff;
  176. border-radius: 20rpx;
  177. font-size: 30rpx;
  178. font-family: PingFang SC;
  179. font-weight: 500;
  180. color: #4d4d4d;
  181. line-height: 21rpx;
  182. .top {
  183. position: absolute;
  184. margin-left: -230rpx;
  185. width: 50rpx;
  186. height: 50rpx;
  187. image {
  188. width: 100%;
  189. height: 100%;
  190. }
  191. }
  192. }
  193. .userInfoList-bottom {
  194. margin-bottom: 15rpx;
  195. width: 340rpx;
  196. height: 250rpx;
  197. background: #f9f9f9;
  198. border-radius: 20rpx;
  199. display: flex;
  200. flex-direction: column;
  201. justify-content: center;
  202. align-items: center;
  203. .bottom {
  204. margin-bottom: 20rpx;
  205. width: 68rpx;
  206. height: 68rpx;
  207. image {
  208. width: 100%;
  209. height: 100%;
  210. }
  211. }
  212. }
  213. }
  214. </style>