| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317 |
- <template>
- <view class="order-content-wrap">
- <!-- <!– 当前订单–>-->
- <!-- <view class="service-order">-->
- <!-- <view @click="noUseCoupon()" class="h-no-use-coupons">-->
- <!-- <u-icon name="share-square" color="#333" size="25"></u-icon>-->
- <!-- <view class="">-->
- <!-- <text>不使用优惠券</text>-->
- <!-- </view>-->
- <!-- </view>-->
- <!-- <view v-for="(item,index) in countsList" :class="computedStyle(item)" class="store-wrap bg-img">-->
- <!-- <view class="row-list" >-->
- <!-- <view @click="useCoupon(item)" class="store-content">-->
- <!-- <view class="h-left-content">-->
- <!-- <view class="h-text">-->
- <!-- <view class="money">¥{{item.discountsPrice}}</view>-->
- <!-- <view class="desc">{{item.name}}</view>-->
- <!-- </view>-->
- <!-- </view>-->
- <!-- <view class="h-center-content">-->
- <!-- <view class="title">-->
- <!-- <text class="h-value">门店通用</text>-->
- <!-- </view>-->
- <!-- <view class="title">-->
- <!-- 使用平台:全平台-->
- <!-- </view>-->
- <!-- <view class="title">-->
- <!-- 有效时间:{{this.dateFormat(item.startTime)}}~{{this.dateFormat(item.endTime)}}-->
- <!-- </view>-->
- <!-- </view>-->
- <!-- <view class="h-right-content">-->
- <!-- <u-icon v-if="item.id == couponIds" name="checkmark-circle" color="#333" size="25"></u-icon>-->
- <!-- <view v-else class="no-checked"></view>-->
- <!-- <view class="h-btn">-->
- <!-- <!– <view @click="useCoupon(item)" class="h-btn-value-receive">选择使用</view> –>-->
- <!-- </view>-->
- <!-- </view>-->
- <!-- </view>-->
- <!-- </view>-->
- <!-- </view>-->
- <!-- <view v-if="countsList.length == 0" class="footer">-->
- <!-- <view class="">---暂无数据---</view>-->
- <!-- </view>-->
- <!-- <view v-if="countsList.length > 0" class="footer">-->
- <!-- <view class="">---到底了---</view>-->
- <!-- </view>-->
- <!-- </view>-->
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- checkboxList1:[
- {
- name: '苹果',
- disabled: false,
- },
- {
- name: '香蕉',
- disabled: false,
- },
- {
- name: '橙子',
- disabled: false,
- },
- ],
- checkboxValue1: '',
- isChecked: false,
- couponIds: null ,
- currentServiceTab: 'orderTab1', // 当前选中的 Tab
- list: [1, 2, 3, 4],
- reqParm: {
- auth: true,
- type: 0
- },
- countsList: []
- };
- },
- onLoad(option) {
- // 选择的优惠券
- this.couponIds = option.couponIds;
- console.log(option.couponIds)
- // 查询可领取的优惠劵
- this.getUserDiscountsList();
- },
- computed: {
- },
- methods: {
- // 日期格式化
- dateFormat(date){
- let time = Date.parse(date);
- return uni.$u.date(time, 'yyyy-mm-dd');
- },
- // 查询可领取的优惠劵
- getUserDiscountsList(){
- let that = this;
- // 用户绑定门店
- getMyCouponList({data:this.reqParm}).then((res)=>{
- console.log(res)
- this.countsList = res.rows;
- }).catch(() =>{
- uni.showToast({
- title: "操作失败"
- })
- })
- },
- computedStyle(item) {
- return 'bg-img';
- },
- // 切换菜单
- changeServiceTab(tab){
- this.currentServiceTab = tab;
- },
- // 领取优惠劵
- gotoReceiveCoupon(){
- uni.showToast({
- title: "领取成功"
- })
- },
- // 去使用优惠劵
- useCoupon(item){
- // 选择完成后返回上一页
- uni.navigateBack({
- delta: 1,
- success: function(res) {
- console.log('返回成功');
- // 在这里可以处理选择结果
- // 可以将选择的内容保存到本地或通过事件传递给上一个页面
- uni.$emit('selectedDataCouponChild', item);
- }
- });
- },
- // 不使用优惠券
- noUseCoupon(){
- let data = {
- id: null,
- discountsPrice: 0
- }
- // 选择完成后返回上一页
- uni.navigateBack({
- delta: 1,
- success: function(res) {
- console.log('返回成功');
- // 在这里可以处理选择结果
- // 可以将选择的内容保存到本地或通过事件传递给上一个页面
- uni.$emit('selectedDataCouponChild', data);
- }
- });
- }
- },
- };
- </script>
- <style lang="scss" scoped>
- .h-no-use-coupons{
- display: flex;
- padding-top: 12px;
- padding-left: 12px;
- padding-right: 12px;
- }
- /* 服务订单内容*/
- .service-order-tab-bar{
- background: #fff;
- display: flex;
- justify-content: space-around;
- height: 50px;
- background-color: #f5f5f5;
- .service-order-tab-item{
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 16px;
- color: #333;
- line-height: 26px;
- }
- .service-order-tab-item.active {
- // color: #ff0000;
- }
- .underline {
- border-bottom: 2px solid #FFE05C ;
- }
- }
- .bg-img{
- background-image: url('/static/coupon/u210.png');
- background-repeat: repeat;
- height: 94px;
- margin: 12px;
- }
- .bg-img1{
- background-image: url('/static/coupon/u211.png');
- background-repeat: repeat;
- height: 94px;
- margin: 12px;
- }
- .service-order{
- // background: #fff;
- }
- /* 门店列表 */
- .store-wrap{
- border-radius: 2px;
- padding-bottom: 12px;
- padding-left: 12px;
- padding-right: 12px;
- .row-list{
- .store-content{
- display: flex;
- align-items: center;
- height: 94px;
- color: #333333;
- .h-left-content{
- width: 26%;
- text-align: center;
- .h-text{
- width: 100%;
- font-weight: 400;
- line-height: 18px;
- font-size: 12px;
- .money{
- font-size: 18px;
- font-weight: bold;
- line-height: 26px;
- }
- }
- }
- .h-center-content{
- width: 60%;
- padding-left: 12px;
- .title{
- width: 100%;
- color: #999999;
- font-size: 12px;
- .h-value{
- font-size: 14px;
- line-height: 42px;
- color: #333333;
- }
- }
- }
- .h-right-content{
- width: 14%;
- display: flex;
- justify-content: flex-end;;
- align-items: center;
- background-image: url('/static/coupon/u2102.png');
- height: 94px;
- font-size: 12px;
- padding-right: 12px;
- .no-checked{
- height: 22px;width: 22px;
- border-radius: 11px;
- border: 2px solid #999;
- }
- .h-btn-value-use{
- background: #FFE05C;
- color: #333333;
- height: 30px;
- width: 80px;
- text-align: center;
- line-height: 30px;
- border-radius: 15px;
- }
- .h-btn-value-receive{
- background: #FFE05C;
- color: #333;
- height: 30px;
- width: 80px;
- text-align: center;
- line-height: 30px;
- border-radius: 15px;
- font-size: 14px;
- }
- .h-btn-img{
- display: flex;
- align-items: center;
- image{
- height: 68px;
- width: 68px;
- }
- }
- }
- }
- }
- }
- /* 产品订单 */
- .product-order{
- margin-top: 12px;
- }
- /* 底部 */
- .footer{
- margin-top: 30px;
- height: 120px;
- font-size: 12px;
- text-align: center;
- color: #666;
- }
- </style>
|