帧视界壹通告,付费看视频的微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

262 lines
5.6 KiB

  1. <template>
  2. <view class="promotionDetail">
  3. <!--顶部导航栏-->
  4. <navbar leftClick @leftClick="$utils.navigateBack" title="推广详情" />
  5. <!--主页面-->
  6. <view class="frame">
  7. <!--标题-->
  8. <view class="title">
  9. <span>推广基本信息</span>
  10. </view>
  11. <!--基本信息-->
  12. <view style="" class="basicInfo">
  13. <view class="item">
  14. <view class="label">春天的气息丫丫</view>
  15. <view class="value">???</view>
  16. </view>
  17. <view class="item">
  18. <view class="label">价格</view>
  19. <view class="value">{{item.price}}</view>
  20. </view>
  21. <view class="item">
  22. <view class="label">时长</view>
  23. <view class="value">{{item.price}}</view>
  24. </view>
  25. <view class="item">
  26. <view class="label">联系方式</view>
  27. <view class="value">
  28. <uv-input v-model="form.phone" placeholder="请输入联系方式" border="bottom" type='number'
  29. clearable></uv-input>
  30. </view>
  31. </view>
  32. <view class="item">
  33. <view class="label">剩余推广时长</view>
  34. <view class="value">{{item.price}}</view>
  35. </view>
  36. <view>推广作品</view>
  37. <view style="width: 30%;height: 300rpx;border-radius: 20rpx;overflow: hidden;">
  38. <image :src="item.image" style="width: 100%;height: 100%;"></image>
  39. </view>
  40. </view>
  41. <!--确认发布弹框-->
  42. <uv-popup ref="popup" mode="center" custom-style="height: 400rpx;" :closeOnClickOverlay="false">
  43. <view class="content">
  44. <view class="title">
  45. 推广选项
  46. </view>
  47. <!--付费周期-->
  48. <view style="" class="payCycle">
  49. <view>付费周期</view>
  50. <view style="width: 200rpx;height:50rpx">
  51. <uv-picker ref="picker" :columns="columns" @confirm="confirm"></uv-picker>
  52. <view style="display: flex;justify-content: flex-start" @click="openPicker">
  53. <span style="margin-right: 10rpx;">{{ form.cycle }}</span>
  54. <uv-icon name="arrow-down" color="#2979ff" size="28"></uv-icon>
  55. </view>
  56. </view>
  57. </view>
  58. <!--金额-->
  59. <view style="width:100%;display: flex;justify-content: space-between;align-items: center;">
  60. <view>金额</view>
  61. <view style="width: 200rpx;height:50rpx">
  62. <uv-input type="number" placeholder="请输入内容" border="surround" v-model="form.moneyValue"
  63. @change="moneyValueChange"></uv-input>
  64. </view>
  65. </view>
  66. <!--确认推广按钮-->
  67. <view class="confirmBottom">
  68. <button @click="confirmPromotion" class="confirmBtn">
  69. 确认推广
  70. </button>
  71. </view>
  72. </view>
  73. </uv-popup>
  74. <uv-toast ref="toast"></uv-toast>
  75. </view>
  76. <!--继续推广按钮-->
  77. <button @click="continueToPromotion" class="bottomBtn">
  78. 继续推广
  79. </button>
  80. </view>
  81. </template>
  82. <script>
  83. import '../../../../common.css'; // 引入公共 CSS 文件
  84. export default {
  85. onLoad: function(options) {
  86. const id = options.id;
  87. },
  88. data() {
  89. return {
  90. columns: [
  91. ['一天', '两天', '三天']
  92. ],
  93. form: {
  94. moneyValue: 0,
  95. cycle: '一天',
  96. phone: '',
  97. },
  98. item: {},
  99. param: {
  100. type: 'default',
  101. title: '结束后跳转标签页',
  102. message: "推广成功",
  103. url: '/pages/componentsD/tag/tag'
  104. }
  105. };
  106. },
  107. mounted() {
  108. this.getData()
  109. },
  110. methods: {
  111. // 获取推广详情数据
  112. getData() {
  113. this.$api('infoGetPromotionDetail', {}, res => {
  114. if (res.code == 200) {
  115. this.item = res.result.records
  116. }
  117. })
  118. },
  119. openPicker() {
  120. this.$refs.picker.open();
  121. },
  122. confirm(e) {
  123. console.log('confirm', e);
  124. this.form.cycle = e.value[0]
  125. },
  126. // 继续推广按钮
  127. continueToPromotion() {
  128. this.$refs.popup.open();
  129. },
  130. // 金额发生变化
  131. moneyValueChange(e) {
  132. console.log('moneyValue', e);
  133. this.form.moneyValue = e
  134. },
  135. // 确认推广
  136. confirmPromotion() {
  137. console.log('确认推广', this.form);
  138. this.$refs.toast.show({
  139. ...this.param,
  140. complete() {
  141. this.param.url && uni.navigateTo({
  142. url: this.param.url
  143. })
  144. }
  145. })
  146. // this.$refs.toast.show()
  147. // this.$api('ConfirmPromotion', {}, res => {
  148. // if (res.code == 200) {
  149. // //跳转到支付页面。。。
  150. // }
  151. // })
  152. }
  153. }
  154. }
  155. </script>
  156. <style lang="scss" scoped>
  157. * {
  158. box-sizing: border-box;
  159. margin: 0;
  160. padding: 0;
  161. }
  162. .promotionDetail {
  163. width: 100vw;
  164. height: 100vh;
  165. .frame {
  166. width: 100%;
  167. //height: calc(100vh - 220rpx);
  168. padding: 28rpx 28rpx 0 28rpx;
  169. .title {
  170. font-size: 36rpx;
  171. font-weight: 600;
  172. }
  173. .basicInfo {
  174. display: flex;
  175. flex-direction: column;
  176. gap: 60rpx;
  177. margin-top: 50rpx;
  178. width: 90%;
  179. .item {
  180. display: flex;
  181. justify-content: space-between;
  182. }
  183. }
  184. .bottom {
  185. position: fixed;
  186. bottom: 30rpx;
  187. left: 25%;
  188. width: 50%;
  189. height: 100rpx;
  190. .continueBtn {
  191. color: #ffffff;
  192. background: $uni-linear-gradient-btn-color;
  193. }
  194. }
  195. }
  196. .content {
  197. display: flex;
  198. flex-direction: column;
  199. justify-content: flex-start;
  200. gap: 20rpx;
  201. width: 600rpx;
  202. height: 100%;
  203. padding: 20rpx;
  204. .title {
  205. display: flex;
  206. justify-content: center;
  207. align-items: center;
  208. }
  209. .payCycle {
  210. width: 100%;
  211. display: flex;
  212. justify-content: space-between;
  213. align-items: center;
  214. }
  215. .confirmBtn{
  216. width: 50%;
  217. height: 80rpx;
  218. text-align: center;
  219. color: #ffffff;
  220. background: linear-gradient(to right, #3c69f1, #5f3bf5);
  221. display: flex;
  222. justify-content: center;
  223. align-items: center;
  224. font-size: 30rpx;
  225. margin-top: 50rpx;
  226. }
  227. }
  228. }
  229. /deep/ .uv-popup .uv-popup__content {
  230. border-radius: 20rpx;
  231. }
  232. </style>