vendor.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <template>
  2. <view class="page">
  3. <view class="grid">
  4. <view class="grid-title">
  5. <text>安装插件</text>
  6. </view>
  7. <view class="grid-title-hr"></view>
  8. <view class="grid-content">
  9. <view class="grid-item" v-for="(item, index) in gridList" :key="index" @click="gridClick(item, index)">
  10. <image :src="item.imgUrl" class="grid-item-img"></image>
  11. <view style="text-align: center">
  12. <view v-text="item.name" class="grid-item-text"></view>
  13. </view>
  14. <view>
  15. <button type="primary" @tap="installApp" class="button-buy" plain="true">安装</button>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="grid">
  21. <view class="grid-title">
  22. <text>我的插件</text>
  23. </view>
  24. <view class="grid-title-hr"></view>
  25. <view class="warp">
  26. <view class="box">
  27. <!--<view class="title">我的插件群聊</view>-->
  28. <t-table border="2" border-color="#95b99e" :is-check="false" @change="change">
  29. <t-tr font-size="center" color="#95b99e" align="left">
  30. <t-th align="center">群昵称</t-th>
  31. <t-th align="center">机器人数</t-th>
  32. <t-th align="center">到期时间</t-th>
  33. <t-th align="center">操作</t-th>
  34. </t-tr>
  35. <t-tr font-size="12" color="#5d6f61" align="right" v-for="item in tableList" :key="item.id">
  36. <t-td align="center">{{ item.group_name }}</t-td>
  37. <t-td align="center">{{ item.robot_count }}<button @click="robotList(item)" class="edit-but-robot">详情</button></t-td>
  38. <t-td align="center">{{ item.expire_time }}</t-td>
  39. <t-td align="left">
  40. <button @click="goPath(item)" class="edit-but">设置</button>
  41. </t-td>
  42. </t-tr>
  43. </t-table>
  44. </view>
  45. </view>
  46. <!--<view class="grid-content" v-if="myGridList.length">-->
  47. <!--<view class="grid-item" v-for="(item, index) in myGridList" :key="index">-->
  48. <!--<image :src="imgUrl" class="grid-item-img"></image>-->
  49. <!--<view style="text-align: center">-->
  50. <!--<view v-text="item.group_name" class="grid-item-text"></view>-->
  51. <!--</view>-->
  52. <!--<view>-->
  53. <!--<button type="primary" class="button-buy" plain="true" @tap="goPath(item)">插件设置</button>-->
  54. <!--</view>-->
  55. <!--</view>-->
  56. <!--</view>-->
  57. </view>
  58. <uni-popup ref="popup" type="confirm">
  59. <uni-popup-confirm title="温馨提示" :content="popuMsg" @confirm = "confirm"> </uni-popup-confirm>
  60. </uni-popup>
  61. </view>
  62. </template>
  63. <script>
  64. import uniPopup from '../../components/uni-popup/uni-popup.vue';
  65. import uniPopupConfirm from '../../components/uni-popup/uni-popup-confirm.vue';
  66. import _get from '../../common/_get';
  67. import tTable from '@/components/t-table/t-table.vue';
  68. import tTh from '@/components/t-table/t-th.vue';
  69. import tTr from '@/components/t-table/t-tr.vue';
  70. import tTd from '@/components/t-table/t-td.vue';
  71. export default {
  72. data() {
  73. return {
  74. col: 3,
  75. showTip: false,
  76. gridList: [
  77. {
  78. name: "多雷红包",
  79. imgUrl: "/static/theme/default//my/hongbao.png",
  80. }
  81. ],
  82. myGridList: [
  83. {
  84. }
  85. ],
  86. popuMsg:'请联系客服,后台开通插件',
  87. imgUrl:'/static/theme/default//my/hongbao.png',
  88. url:"/pages/my/hongbao_setting",
  89. tableList: [
  90. ]
  91. };
  92. },
  93. components:{
  94. uniPopup,
  95. uniPopupConfirm,
  96. tTable,
  97. tTh,
  98. tTr,
  99. tTd
  100. },
  101. onShow(){
  102. let _this = this;
  103. _get.getUserVendor({},function (ret) {
  104. _this.tableList = ret
  105. });
  106. },
  107. methods: {
  108. gridClick(item, index) { //格子菜单点击事件
  109. console.log(item);
  110. console.log(index);
  111. },
  112. goPath(item){
  113. let url = '/pages/my/hongbao_setting';
  114. uni.navigateTo({
  115. url:url+'?id='+item.id
  116. });
  117. },
  118. installApp(){
  119. this.$refs.popup.open();
  120. },
  121. confirm(){
  122. this.$refs.popup.close();
  123. },
  124. robotList(item){
  125. let url = '/pages/vendor/robot_list';
  126. uni.navigateTo({
  127. url:url+'?id='+item.id
  128. });
  129. }
  130. }
  131. }
  132. </script>
  133. <style>
  134. .page{
  135. padding-top: 60rpx;
  136. }
  137. .warp{
  138. margin-top: 20px;
  139. }
  140. .grid-title{
  141. padding-left: 15px;
  142. padding: 15px;
  143. font-size: 16px;
  144. font-weight: 400;
  145. }
  146. .grid-title-hr{
  147. display: flex;
  148. width: 90%;
  149. justify-content: center;
  150. align-items: center;
  151. text-align: center;
  152. border:1upx solid #bfbaba;
  153. margin-left: 15px;
  154. margin-top: 5px;
  155. }
  156. .edit-but-robot{
  157. background: #7c76f1;
  158. border-radius: 5px;
  159. color: white;
  160. font-size: 10px;
  161. line-height: 2 !important;
  162. }
  163. .edit-but{
  164. background: #7c76f1;
  165. border-radius: 5px;
  166. color: white;
  167. font-size: 12px;
  168. }
  169. .grid {
  170. display: flex;
  171. flex-direction: column;
  172. }
  173. .grid-item-img{
  174. width: 150rpx;
  175. height: 150rpx;
  176. }
  177. .grid-item {
  178. display: flex;
  179. flex-direction: column;
  180. align-items: center;
  181. justify-content: center;
  182. width: 30%;
  183. padding: 30rpx 0rpx 20rpx 60rpx;
  184. }
  185. .grid-item-text{
  186. font-size: 16px;
  187. margin-top: 10rpx;
  188. width: 100%;
  189. }
  190. .grid-content{
  191. display: flex;
  192. flex-direction: row;
  193. flex-wrap: wrap;
  194. }
  195. .button-buy{
  196. height: 30px !important;
  197. line-height: unset !important;
  198. line-height: 30px !important;
  199. background-color: #5693ee !important;
  200. color: white !important;
  201. margin-top: 10rpx;
  202. }
  203. </style>