huiyuan.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. <template>
  2. <view>
  3. <customNav :shownav="true" :title="$t('index.huiyuanzhx')" titledetl=""></customNav>
  4. <view class="">
  5. <image class="imagV" src="/static/defimages/huiyuanxc.png" mode="widthFix"></image>
  6. </view>
  7. <view class="actBTct">
  8. <view class="actBTV" >
  9. <view class="blockView" v-for="(item,index) in vipList" @click="xuangou(item.id)">
  10. <view class="notecontent">
  11. <text class="titleact">{{item.name}}</text>
  12. <text class="noteact">${{item.price}}</text>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. <view class="huiyuanqyct">
  18. <text class="notev">{{$t('huiy.goumjswty')}}</text>
  19. <image class="huiyuanqy" src="/static/defimages/huiyuanqy.png" mode="heightFix"></image>
  20. </view>
  21. <view class="keywordLct">
  22. <view class="hyqyct">
  23. <text class="titlefl">2张平台券</text>
  24. <view class="qyblockView">
  25. <text class="yhqje">$5</text>
  26. <view class="shuline"></view>
  27. <view class="notecontent">
  28. <text class="titlev">VIP会员权益 $5优惠券</text>
  29. <text class="notev">满$20可用</text>
  30. </view>
  31. <text class="zhangshu">X 2 张</text>
  32. </view>
  33. </view>
  34. </view>
  35. <view class="keywordLct">
  36. <view class="hyqyct">
  37. <text class="titlefl">10张运费券</text>
  38. <view class="qyblockView">
  39. <text class="yhqje">$10</text>
  40. <view class="shuline"></view>
  41. <view class="notecontent">
  42. <text class="titlev">VIP会员权益 $10运费抵扣券</text>
  43. <text class="notev">满$50可用</text>
  44. </view>
  45. <text class="zhangshu">X 5 张</text>
  46. </view>
  47. <view class="qyblockView">
  48. <text class="yhqje">$5</text>
  49. <view class="shuline"></view>
  50. <view class="notecontent">
  51. <text class="titlev">VIP会员权益 $5运费抵扣券</text>
  52. <text class="notev">满$30可用</text>
  53. </view>
  54. <text class="zhangshu">X 5 张</text>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="keywordLct">
  59. <view class="hyqyct">
  60. <text class="titlefl">5张商家联盟券</text>
  61. <view class="qyblockView">
  62. <text class="yhqje">$20</text>
  63. <view class="shuline"></view>
  64. <view class="notecontent">
  65. <text class="titlev">VIP会员权益 $20优惠券</text>
  66. <text class="notev">满$100可用</text>
  67. </view>
  68. <text class="zhangshu">X 5 张</text>
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. </template>
  74. <script>
  75. import api from "@/pages/api/api.js"
  76. export default {
  77. data() {
  78. return {
  79. vipList:[],
  80. userInfo:[]
  81. }
  82. },
  83. onShow() {
  84. this.getviplist();
  85. // var temp = uni.getStorageSync('userInfo');
  86. // this.userInfo = JSON.parse(temp);
  87. },
  88. methods: {
  89. xuangou(id){
  90. var token = uni.getStorageSync("token");
  91. console.log('2222',token)
  92. if(token == '' || token == undefined || token == null){
  93. uni.navigateTo({
  94. url:'/pages/UserCenter/LoginView'
  95. })
  96. return;
  97. }
  98. uni.showModal({
  99. title: '提示',
  100. content: '选择支付方式并支付,待完善?',
  101. success: function (res) {
  102. }
  103. })
  104. return;
  105. this.adduservip(id);
  106. },
  107. getviplist(){
  108. api('getviplist',{
  109. },r=>{
  110. this.vipList = r.data.data;
  111. },failc=>{
  112. //console.log('getadvertis----',failc)
  113. })
  114. },
  115. async adduservip(id){
  116. api('adduservip',{
  117. id:id
  118. },r=>{
  119. console.log(r)
  120. },failc=>{
  121. //console.log('getadvertis----',failc)
  122. })
  123. },
  124. },
  125. }
  126. </script>
  127. <style lang="scss">
  128. .imagV{
  129. width: 100%;
  130. }
  131. .imageIcon{
  132. width: 60rpx;
  133. }
  134. .actBTct{
  135. display: flex;
  136. flex-direction: row;
  137. justify-content:center;
  138. align-items: center;
  139. background-color: aliceblue;
  140. }
  141. .actBTV{
  142. width: 92%;
  143. display: flex;
  144. flex-direction: row;
  145. justify-content:space-between;
  146. align-items: center;
  147. }
  148. .blockView{
  149. width: 30%;
  150. height: 140rpx;
  151. margin-top: 10rpx;
  152. align-items:center;
  153. justify-content:center;
  154. background-color: white;
  155. border: 2rpx dotted sandybrown;
  156. }
  157. .notecontent{
  158. margin-left: 12rpx;
  159. display: flex;
  160. flex-direction:column;
  161. justify-content: flex-start;
  162. }
  163. .titleact{
  164. font-size: 36rpx;
  165. text-align: left;
  166. color: saddlebrown;
  167. }
  168. .noteact{
  169. font-size: 40rpx;
  170. font-weight: bold;
  171. color: crimson;
  172. text-align: right;
  173. margin-top: 26rpx;
  174. margin-right: 10rpx;
  175. }
  176. .keywordLct{
  177. display: flex;
  178. flex-direction: colum;
  179. justify-content:flex-start;
  180. background-color: aliceblue;
  181. }
  182. .titlefl{
  183. font-size: 30rpx;
  184. padding-left: 16rpx;
  185. text-align: left;
  186. }
  187. .titlev{
  188. font-size: 30rpx;
  189. text-align: left;
  190. }
  191. .notev{
  192. font-size: 28rpx;
  193. color: darkgray;
  194. text-align: left;
  195. }
  196. .xuangou{
  197. font-size: 28rpx;
  198. margin-left: auto;
  199. margin-right: 20rpx;
  200. padding: 8rpx;
  201. border: 2rpx solid brown;
  202. border-radius: 8rpx;
  203. }
  204. .huiyuanqyct{
  205. display: flex;
  206. flex-direction: column;
  207. justify-content:center;
  208. align-items: center;
  209. background-color: aliceblue;
  210. }
  211. .huiyuanqy{
  212. width: 100%;
  213. margin-top: 20rpx;
  214. height: 40rpx;
  215. }
  216. .hyqyct{
  217. width: 86%;
  218. margin: 16rpx;
  219. padding-bottom: 18rpx;
  220. display: flex;
  221. flex-direction: column;
  222. justify-content:flex-start;
  223. border-bottom-width: 2rpx;
  224. border-bottom-color: lightgray;
  225. border-bottom-style: solid;
  226. }
  227. .qyblockView{
  228. width: 100%;
  229. margin-top: 6rpx;
  230. margin-left: 16rpx;
  231. margin-right: 16rpx;
  232. padding: 20rpx;
  233. display: flex;
  234. flex-direction:row;
  235. justify-content: flex-start;
  236. align-items:center;
  237. background-color: wheat;
  238. }
  239. .zhangshu{
  240. font-size: 28rpx;
  241. margin-left: auto;
  242. margin-right: 20rpx;
  243. padding: 8rpx;
  244. }
  245. .yhqje{
  246. width: 100rpx;
  247. font-size: 46rpx;
  248. text-align: right;
  249. padding-left: 10rpx;
  250. }
  251. .shuline{
  252. margin-left: 10rpx;
  253. margin-right: 6rpx;
  254. background-color: darkgray;
  255. width: 4rpx;
  256. height: 80rpx;
  257. }
  258. </style>