Commit 9da28b0e authored by 潘永坪's avatar 潘永坪

扫码支付页面开发

parent 62ed1468
......@@ -6,7 +6,12 @@
//4.setStorageSync与setStorage的区别:如果后续的操作需要使用更新storage后保存的data,则使用setStorageSync使用异步性能更好,使用同步数据更安全
export default {
onLaunch: function() {//初始化完成时触发(全局只触发一次
let openid=uni.getStorageSync("openid")
if(!openid){
uni.navigateTo({
url: "/pages/login/login"
})
}
},
onShow: function() {
......
......@@ -36,7 +36,7 @@
</radio-group>
</view>
<view style="padding:100rpx 0;text-align: center;" v-if="!couponList.usableCouponList||couponList.usableCouponList.length==0">
<view class="empty" v-if="!couponList.usableCouponList||couponList.usableCouponList.length==0">
空空如也...
</view>
</view>
......@@ -60,7 +60,7 @@
</view>
</view>
</view>
<view style="padding:100rpx 0;text-align: center;" v-if="!couponList.unusableCouponList||couponList.unusableCouponList.length==0">
<view class="empty" v-if="!couponList.unusableCouponList||couponList.unusableCouponList.length==0">
空空如也...
</view>
</view>
......@@ -143,4 +143,5 @@
.middle view view:last-child{color: #666666;font-size:24rpx;}
.middle view text{color:#f9690e;font-size:30rpx;font-weight: bolder;}
.middle view text text{font-size:24rpx;font-weight: 400;}
.empty{padding:100rpx 0;text-align: center;background: #f5f5f5;}
</style>
......@@ -67,18 +67,12 @@
export default {
data() {
return {
title: '胖丁首页',
showBottom:false,//控制底部显示隐藏
}
},
onLoad() {
let _this=this
if(uni.getStorageSync("openid")){
_this.showBottom=true
}else{
uni.navigateTo({
url:"../login/login"
})
this.showBottom=true
}
},
onReady(){
......
......@@ -208,7 +208,7 @@
merchantId:this.merchantId, //商户Id
companyId:this.companyId,//公司Id
orderSource:this.orderSource,//订单来源 8扫码支付
openid:"oroHZ5D2kemXkyFtTb_KnJMH1fqc"
openid:uni.getStorageSync("openid")
}
this.$request("wechatUser/myPage/usableCouponList",data).then((res) => {
if (res.code == "00") {
......
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/orderCoupon"],{"0560":function(o,n,t){"use strict";t.r(n);var e=t("6e15"),u=t.n(e);for(var i in e)"default"!==i&&function(o){t.d(n,o,(function(){return e[o]}))}(i);n["default"]=u.a},"35b5":function(o,n,t){},5503:function(o,n,t){"use strict";t.r(n);var e=t("a373"),u=t("0560");for(var i in u)"default"!==i&&function(o){t.d(n,o,(function(){return u[o]}))}(i);t("5cca");var s,c=t("f0c5"),a=Object(c["a"])(u["default"],e["b"],e["c"],!1,null,"026a3a02",null,!1,e["a"],s);n["default"]=a.exports},"5cca":function(o,n,t){"use strict";var e=t("35b5"),u=t.n(e);u.a},"6e15":function(o,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e={props:["couponData","chooseCouponObj"],watch:{couponData:{handler:function(o,n){o&&(this.couponList=this.couponData)},deep:!1,immediate:!1},chooseCouponObj:{handler:function(o,n){o&&(this.chooseCoupon=this.chooseCouponObj)},deep:!1,immediate:!1}},data:function(){return{show:!1,active:0,couponList:"",chooseCoupon:""}},methods:{showCoupon:function(){this.show=!0},hideCoupon:function(){this.show=!1,this.$emit("couponChoose",this.chooseCoupon)},cancelCoupon:function(){this.chooseCoupon="",this.show=!1,this.$emit("couponChoose",this.chooseCoupon)}}};n.default=e},a373:function(o,n,t){"use strict";t.d(n,"b",(function(){return u})),t.d(n,"c",(function(){return i})),t.d(n,"a",(function(){return e}));var e={uActionSheet:function(){return t.e("uview-ui/components/u-action-sheet/u-action-sheet").then(t.bind(null,"42bd"))}},u=function(){var o=this,n=o.$createElement,t=(o._self._c,o.couponList.usableCouponList&&o.couponList.usableCouponList.length>0?o.__map(o.couponList.usableCouponList,(function(n,t){var e=o.__get_orig(n),u=n.savedMoney.toFixed(2);return{$orig:e,g0:u}})):null),e=o.couponList.unusableCouponList&&o.couponList.unusableCouponList.length>0?o.__map(o.couponList.unusableCouponList,(function(n,t){var e=o.__get_orig(n),u=n.savedMoney.toFixed(2);return{$orig:e,g1:u}})):null;o._isMounted||(o.e0=function(n,t){var e=arguments[arguments.length-1].currentTarget.dataset,u=e.eventParams||e["event-params"];t=u.item;o.chooseCoupon=t}),o.$mp.data=Object.assign({},{$root:{l0:t,l1:e}})},i=[]}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/orderCoupon-create-component',
{
'components/orderCoupon-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("5503"))
})
},
[['components/orderCoupon-create-component']]
]);
{
"usingComponents": {
"u-action-sheet": "/uview-ui/components/u-action-sheet/u-action-sheet"
},
"component": true
}
\ No newline at end of file
<u-action-sheet bind:input="__e" vue-id="91856606-1" value="{{show}}" data-event-opts="{{[['^input',[['__set_model',['','show','$event',[]]]]]]}}" class="data-v-026a3a02" bind:__l="__l" vue-slots="{{['default']}}"><view class="_div data-v-026a3a02"><block wx:if="{{couponList.usableCouponList&&couponList.usableCouponList.length>0}}"><view class="middle _div data-v-026a3a02"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="_div data-v-026a3a02"><label class="data-v-026a3a02"><view class="_p data-v-026a3a02">{{''+item.$orig.couponName+''}}<input type="radio" name="coupon" data-event-opts="{{[['change',[['e0',['$event']],['hideCoupon']]]]}}" data-event-params="{{({item})}}" value="{{item.$orig}}" checked="{{_q(chooseCoupon,item.$orig)}}" bindchange="__e" class="data-v-026a3a02"/></view><view class="_p data-v-026a3a02">{{''+item.$orig.couponRule+''}}</view><view class="_p data-v-026a3a02">{{''+item.$orig.useStartDate+"-"+item.$orig.useEndDate+''}}<label class="_span data-v-026a3a02"><view class="_i data-v-026a3a02">¥</view>{{item.g0+''}}</label></view></label></view></block></view></block><block wx:if="{{couponList.usableCouponList&&couponList.usableCouponList.length==0}}"><view style="padding-top:1.5rem;text-align:center;" class="_div data-v-026a3a02">空空如也...</view></block></view><view class="_div data-v-026a3a02"><block wx:if="{{couponList.unusableCouponList&&couponList.unusableCouponList.length>0}}"><view class="middle _div data-v-026a3a02"><block wx:for="{{$root.l1}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="_div data-v-026a3a02"><view class="_p data-v-026a3a02">{{''+item.$orig.couponName+''}}</view><view class="_p data-v-026a3a02">{{''+item.$orig.couponRule+''}}<label class="_span data-v-026a3a02"><view class="_i data-v-026a3a02">¥</view>{{item.g1+''}}</label></view><view class="_p data-v-026a3a02">{{''+item.$orig.useStartDate+"-"+item.$orig.useEndDate+''}}</view></view></block></view></block><block wx:if="{{couponList.unusableCouponList&&couponList.unusableCouponList.length==0}}"><view style="padding-top:1.5rem;text-align:center;" class="_div data-v-026a3a02">空空如也...</view></block></view></u-action-sheet>
\ No newline at end of file
.middle.data-v-026a3a02{padding:.24rem}.middle ._div.data-v-026a3a02{background:#fff;padding:.24rem;border-radius:.1rem}.middle ._div.data-v-026a3a02:not(:first-child){margin-top:.2rem}.middle ._div ._p.data-v-026a3a02:not(:first-child){margin-top:.2rem}.middle ._div ._p.data-v-026a3a02{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.middle ._div ._p.data-v-026a3a02:first-child{font-weight:700}.middle ._div ._p.data-v-026a3a02:nth-child(2){font-size:.24rem}.middle ._div ._p.data-v-026a3a02:last-child{color:#666;font-size:.24rem}.middle ._p ._span.data-v-026a3a02{color:#f9690e;font-size:.3rem;font-weight:bolder}.middle ._p ._span ._i.data-v-026a3a02{font-size:.24rem;font-weight:400}
\ No newline at end of file
{
"setting": {},
"condition": {
"plugin": {
"list": []
},
"game": {
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": {
"list": [
{
"name": "pages/ourPayment/ourPayment",
"pathName": "pages/ourPayment/ourPayment",
"query": "",
"scene": null
}
]
}
}
}
\ No newline at end of file
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uview-ui/components/u-action-sheet/u-action-sheet"],{"029a":function(t,e,n){"use strict";var i=n("84f9"),o=n.n(i);o.a},"0de8":function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return i}));var i={uPopup:function(){return n.e("uview-ui/components/u-popup/u-popup").then(n.bind(null,"97e8"))}},o=function(){var t=this,e=t.$createElement,n=(t._self._c,t.tips.text?t.__get_style([t.tipsStyle]):null),i=t.__map(t.list,(function(e,n){var i=t.__get_orig(e),o=t.__get_style([t.itemStyle(n)]);return{$orig:i,s1:o}}));t.$mp.data=Object.assign({},{$root:{s0:n,l0:i}})},u=[]},"0efa":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"u-action-sheet",props:{maskCloseAble:{type:Boolean,default:!0},list:{type:Array,default:function(){return[]}},tips:{type:Object,default:function(){return{text:"",color:"",fontSize:"26"}}},cancelBtn:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!1},value:{type:Boolean,default:!1},borderRadius:{type:[String,Number],default:0},zIndex:{type:[String,Number],default:0},cancelText:{type:String,default:"取消"}},computed:{tipsStyle:function(){var t={};return this.tips.color&&(t.color=this.tips.color),this.tips.fontSize&&(t.fontSize=this.tips.fontSize+"rpx"),t},itemStyle:function(){var t=this;return function(e){var n={};return t.list[e].color&&(n.color=t.list[e].color),t.list[e].fontSize&&(n.fontSize=t.list[e].fontSize+"rpx"),t.list[e].disabled&&(n.color="#c0c4cc"),n}},uZIndex:function(){return this.zIndex?this.zIndex:this.$u.zIndex.popup}},methods:{close:function(){this.popupClose(),this.$emit("close")},popupClose:function(){this.$emit("input",!1)},itemClick:function(t){this.list[t].disabled||(this.$emit("click",t),this.$emit("input",!1))}}};e.default=i},"42bd":function(t,e,n){"use strict";n.r(e);var i=n("0de8"),o=n("fc3d");for(var u in o)"default"!==u&&function(t){n.d(e,t,(function(){return o[t]}))}(u);n("029a");var r,l=n("f0c5"),s=Object(l["a"])(o["default"],i["b"],i["c"],!1,null,"4606ab42",null,!1,i["a"],r);e["default"]=s.exports},"84f9":function(t,e,n){},fc3d:function(t,e,n){"use strict";n.r(e);var i=n("0efa"),o=n.n(i);for(var u in i)"default"!==u&&function(t){n.d(e,t,(function(){return i[t]}))}(u);e["default"]=o.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'uview-ui/components/u-action-sheet/u-action-sheet-create-component',
{
'uview-ui/components/u-action-sheet/u-action-sheet-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("42bd"))
})
},
[['uview-ui/components/u-action-sheet/u-action-sheet-create-component']]
]);
{
"usingComponents": {
"u-popup": "/uview-ui/components/u-popup/u-popup"
},
"component": true
}
\ No newline at end of file
<u-popup vue-id="430f7e86-1" mode="bottom" border-radius="{{borderRadius}}" popup="{{false}}" maskCloseAble="{{maskCloseAble}}" length="auto" safeAreaInsetBottom="{{safeAreaInsetBottom}}" z-index="{{uZIndex}}" value="{{value}}" data-event-opts="{{[['^close',[['popupClose']]],['^input',[['__set_model',['','value','$event',[]]]]]]}}" bind:close="__e" bind:input="__e" class="data-v-4606ab42" bind:__l="__l" vue-slots="{{['default']}}"><block wx:if="{{tips.text}}"><view class="u-tips u-border-bottom data-v-4606ab42" style="{{$root.s0}}">{{''+tips.text+''}}</view></block><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><block class="data-v-4606ab42"><view class="{{['u-action-sheet-item u-line-1 data-v-4606ab42',index<list.length-1?'u-border-bottom':'']}}" style="{{item.s1}}" hover-stay-time="{{150}}" data-event-opts="{{[['touchmove',[['',['$event']]]],['tap',[['itemClick',[index]]]]]}}" catchtouchmove="__e" bindtap="__e"><text class="data-v-4606ab42">{{item.$orig.text}}</text><block wx:if="{{item.$orig.subText}}"><text class="u-action-sheet-item__subtext u-line-1 data-v-4606ab42">{{item.$orig.subText}}</text></block></view></block></block><block wx:if="{{cancelBtn}}"><view class="u-gab data-v-4606ab42"></view></block><block wx:if="{{cancelBtn}}"><view class="u-actionsheet-cancel u-action-sheet-item data-v-4606ab42" hover-class="u-hover-class" hover-stay-time="{{150}}" data-event-opts="{{[['touchmove',[['',['$event']]]],['tap',[['close',['$event']]]]]}}" catchtouchmove="__e" bindtap="__e">{{cancelText}}</view></block></u-popup>
\ No newline at end of file
.u-tips.data-v-4606ab42{font-size:26rpx;text-align:center;padding:34rpx 0;line-height:1;color:#909399}.u-action-sheet-item.data-v-4606ab42{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;line-height:1;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center;font-size:32rpx;padding:34rpx 0;-webkit-flex-direction:column;flex-direction:column}.u-action-sheet-item__subtext.data-v-4606ab42{font-size:24rpx;color:#909399;margin-top:20rpx}.u-gab.data-v-4606ab42{height:12rpx;background-color:#eaeaec}.u-actionsheet-cancel.data-v-4606ab42{color:#303133}
\ No newline at end of file
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uview-ui/components/u-icon/u-icon"],{"0a4c":function(t,i,e){"use strict";e.r(i);var n=e("e0ea"),o=e.n(n);for(var u in n)"default"!==u&&function(t){e.d(i,t,(function(){return n[t]}))}(u);i["default"]=o.a},"12f2":function(t,i,e){"use strict";var n;e.d(i,"b",(function(){return o})),e.d(i,"c",(function(){return u})),e.d(i,"a",(function(){return n}));var o=function(){var t=this,i=t.$createElement,e=(t._self._c,t.__get_style([t.customStyle])),n=t.isImg?t.__get_style([t.imgStyle]):null,o=t.isImg?null:t.__get_style([t.iconStyle]),u=!t.isImg&&t.showDecimalIcon?t.__get_style([t.decimalIconStyle]):null,l=""!==t.label?t.$u.addUnit(t.labelSize):null,s=""!==t.label&&"right"==t.labelPos?t.$u.addUnit(t.marginLeft):null,r=""!==t.label&&"bottom"==t.labelPos?t.$u.addUnit(t.marginTop):null,a=""!==t.label&&"left"==t.labelPos?t.$u.addUnit(t.marginRight):null,c=""!==t.label&&"top"==t.labelPos?t.$u.addUnit(t.marginBottom):null;t.$mp.data=Object.assign({},{$root:{s0:e,s1:n,s2:o,s3:u,g0:l,g1:s,g2:r,g3:a,g4:c}})},u=[]},"4d8a":function(t,i,e){"use strict";var n=e("583a"),o=e.n(n);o.a},"583a":function(t,i,e){},a217:function(t,i,e){"use strict";e.r(i);var n=e("12f2"),o=e("0a4c");for(var u in o)"default"!==u&&function(t){e.d(i,t,(function(){return o[t]}))}(u);e("4d8a");var l,s=e("f0c5"),r=Object(s["a"])(o["default"],n["b"],n["c"],!1,null,"a8f50df6",null,!1,n["a"],l);i["default"]=r.exports},e0ea:function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var n={name:"u-icon",props:{name:{type:String,default:""},color:{type:String,default:""},size:{type:[Number,String],default:"inherit"},bold:{type:Boolean,default:!1},index:{type:[Number,String],default:""},hoverClass:{type:String,default:""},customPrefix:{type:String,default:"uicon"},label:{type:[String,Number],default:""},labelPos:{type:String,default:"right"},labelSize:{type:[String,Number],default:"28"},labelColor:{type:String,default:"#606266"},marginLeft:{type:[String,Number],default:"6"},marginTop:{type:[String,Number],default:"6"},marginRight:{type:[String,Number],default:"6"},marginBottom:{type:[String,Number],default:"6"},imgMode:{type:String,default:"widthFix"},customStyle:{type:Object,default:function(){return{}}},width:{type:[String,Number],default:""},height:{type:[String,Number],default:""},top:{type:[String,Number],default:0},showDecimalIcon:{type:Boolean,default:!1},inactiveColor:{type:String,default:"#ececec"},percent:{type:[Number,String],default:"50"}},computed:{customClass:function(){var t=[];return t.push(this.customPrefix+"-"+this.name),"uicon"==this.customPrefix?t.push("u-iconfont"):t.push(this.customPrefix),this.showDecimalIcon&&this.inactiveColor&&this.$u.config.type.includes(this.inactiveColor)?t.push("u-icon__icon--"+this.inactiveColor):this.color&&this.$u.config.type.includes(this.color)&&t.push("u-icon__icon--"+this.color),t},iconStyle:function(){var t={};return t={fontSize:"inherit"==this.size?"inherit":this.$u.addUnit(this.size),fontWeight:this.bold?"bold":"normal",top:this.$u.addUnit(this.top)},this.showDecimalIcon&&this.inactiveColor&&!this.$u.config.type.includes(this.inactiveColor)?t.color=this.inactiveColor:this.color&&!this.$u.config.type.includes(this.color)&&(t.color=this.color),t},isImg:function(){return-1!==this.name.indexOf("/")},imgStyle:function(){var t={};return t.width=this.width?this.$u.addUnit(this.width):this.$u.addUnit(this.size),t.height=this.height?this.$u.addUnit(this.height):this.$u.addUnit(this.size),t},decimalIconStyle:function(){var t={};return t={fontSize:"inherit"==this.size?"inherit":this.$u.addUnit(this.size),fontWeight:this.bold?"bold":"normal",top:this.$u.addUnit(this.top),width:this.percent+"%"},this.color&&!this.$u.config.type.includes(this.color)&&(t.color=this.color),t},decimalIconClass:function(){var t=[];return t.push(this.customPrefix+"-"+this.name),"uicon"==this.customPrefix?t.push("u-iconfont"):t.push(this.customPrefix),this.color&&this.$u.config.type.includes(this.color)?t.push("u-icon__icon--"+this.color):t.push("u-icon__icon--primary"),t}},methods:{click:function(){this.$emit("click",this.index)},touchstart:function(){this.$emit("touchstart",this.index)}}};i.default=n}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'uview-ui/components/u-icon/u-icon-create-component',
{
'uview-ui/components/u-icon/u-icon-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("a217"))
})
},
[['uview-ui/components/u-icon/u-icon-create-component']]
]);
{
"usingComponents": {},
"component": true
}
\ No newline at end of file
<view data-event-opts="{{[['tap',[['click',['$event']]]]]}}" class="{{['u-icon data-v-a8f50df6','u-icon--'+labelPos]}}" style="{{$root.s0}}" bindtap="__e"><block wx:if="{{isImg}}"><image class="u-icon__img data-v-a8f50df6" style="{{$root.s1}}" src="{{name}}" mode="{{imgMode}}"></image></block><block wx:else><text class="{{['u-icon__icon data-v-a8f50df6',customClass]}}" style="{{$root.s2}}" hover-class="{{hoverClass}}" data-event-opts="{{[['touchstart',[['touchstart',['$event']]]]]}}" bindtouchstart="__e"><block wx:if="{{showDecimalIcon}}"><text class="{{['u-icon__decimal data-v-a8f50df6',decimalIconClass]}}" style="{{$root.s3}}" hover-class="{{hoverClass}}"></text></block></text></block><block wx:if="{{label!==''}}"><text class="u-icon__label data-v-a8f50df6" style="{{'color:'+(labelColor)+';'+('font-size:'+($root.g0)+';')+('margin-left:'+(labelPos=='right'?$root.g1:0)+';')+('margin-top:'+(labelPos=='bottom'?$root.g2:0)+';')+('margin-right:'+(labelPos=='left'?$root.g3:0)+';')+('margin-bottom:'+(labelPos=='top'?$root.g4:0)+';')}}">{{label+''}}</text></block></view>
\ No newline at end of file
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uview-ui/components/u-mask/u-mask"],{"2c32":function(t,e,n){"use strict";n.r(e);var r=n("e2b7"),o=n("7dc7");for(var a in o)"default"!==a&&function(t){n.d(e,t,(function(){return o[t]}))}(a);n("b415");var c,u=n("f0c5"),i=Object(u["a"])(o["default"],r["b"],r["c"],!1,null,"0d4c8696",null,!1,r["a"],c);e["default"]=i.exports},"7dc7":function(t,e,n){"use strict";n.r(e);var r=n("f65a"),o=n.n(r);for(var a in r)"default"!==a&&function(t){n.d(e,t,(function(){return r[t]}))}(a);e["default"]=o.a},"7e85":function(t,e,n){},b415:function(t,e,n){"use strict";var r=n("7e85"),o=n.n(r);o.a},e2b7:function(t,e,n){"use strict";var r;n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return r}));var o=function(){var t=this,e=t.$createElement,n=(t._self._c,t.__get_style([t.maskStyle,t.zoomStyle]));t._isMounted||(t.e0=function(t){t.stopPropagation(),t.preventDefault()}),t.$mp.data=Object.assign({},{$root:{s0:n}})},a=[]},f65a:function(t,e,n){"use strict";function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var c={name:"u-mask",props:{show:{type:Boolean,default:!1},zIndex:{type:[Number,String],default:""},customStyle:{type:Object,default:function(){return{}}},zoom:{type:Boolean,default:!0},duration:{type:[Number,String],default:300},maskClickAble:{type:Boolean,default:!0}},data:function(){return{zoomStyle:{transform:""},scale:"scale(1.2, 1.2)"}},watch:{show:function(t){t&&this.zoom?this.zoomStyle.transform="scale(1, 1)":!t&&this.zoom&&(this.zoomStyle.transform=this.scale)}},computed:{maskStyle:function(){var t={backgroundColor:"rgba(0, 0, 0, 0.6)"};return this.show?t.zIndex=this.zIndex?this.zIndex:this.$u.zIndex.mask:t.zIndex=-1,t.transition="all ".concat(this.duration/1e3,"s ease-in-out"),Object.keys(this.customStyle).length&&(t=o(o({},t),this.customStyle)),t}},methods:{click:function(){this.maskClickAble&&this.$emit("click")}}};e.default=c}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'uview-ui/components/u-mask/u-mask-create-component',
{
'uview-ui/components/u-mask/u-mask-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("2c32"))
})
},
[['uview-ui/components/u-mask/u-mask-create-component']]
]);
{
"usingComponents": {},
"component": true
}
\ No newline at end of file
<view class="{{['u-mask data-v-0d4c8696',(zoom)?'u-mask-zoom':'',(show)?'u-mask-show':'']}}" style="{{$root.s0}}" hover-stop-propagation="{{true}}" data-event-opts="{{[['tap',[['click',['$event']]]],['touchmove',[['e0',['$event']]]]]}}" bindtap="__e" catchtouchmove="__e"><slot></slot></view>
\ No newline at end of file
.u-mask.data-v-0d4c8696{position:fixed;top:0;left:0;right:0;bottom:0;opacity:0;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.u-mask-show.data-v-0d4c8696{opacity:1}.u-mask-zoom.data-v-0d4c8696{-webkit-transform:scale(1.2);transform:scale(1.2)}
\ No newline at end of file
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uview-ui/components/u-popup/u-popup"],{"1f18":function(t,e,n){},"97e8":function(t,e,n){"use strict";n.r(e);var i=n("98bb"),o=n("9831");for(var s in o)"default"!==s&&function(t){n.d(e,t,(function(){return o[t]}))}(s);n("f47f");var u,r=n("f0c5"),a=Object(r["a"])(o["default"],i["b"],i["c"],!1,null,"4b631af3",null,!1,i["a"],u);e["default"]=a.exports},9831:function(t,e,n){"use strict";n.r(e);var i=n("9eba"),o=n.n(i);for(var s in i)"default"!==s&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=o.a},"98bb":function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return i}));var i={uMask:function(){return n.e("uview-ui/components/u-mask/u-mask").then(n.bind(null,"2c32"))},uIcon:function(){return n.e("uview-ui/components/u-icon/u-icon").then(n.bind(null,"a217"))}},o=function(){var t=this,e=t.$createElement,n=(t._self._c,t.visibleSync?t.__get_style([t.customStyle,{zIndex:t.uZindex-1}]):null),i=t.visibleSync?t.__get_style([t.style]):null,o=t.visibleSync&&"center"==t.mode?t.__get_style([t.centerStyle]):null;t.$mp.data=Object.assign({},{$root:{s0:n,s1:i,s2:o}})},s=[]},"9eba":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"u-popup",props:{show:{type:Boolean,default:!1},mode:{type:String,default:"left"},mask:{type:Boolean,default:!0},length:{type:[Number,String],default:"auto"},zoom:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!1},maskCloseAble:{type:Boolean,default:!0},customStyle:{type:Object,default:function(){return{}}},value:{type:Boolean,default:!1},popup:{type:Boolean,default:!0},borderRadius:{type:[Number,String],default:0},zIndex:{type:[Number,String],default:""},closeable:{type:Boolean,default:!1},closeIcon:{type:String,default:"close"},closeIconPos:{type:String,default:"top-right"},closeIconColor:{type:String,default:"#909399"},closeIconSize:{type:[String,Number],default:"30"},width:{type:String,default:""},height:{type:String,default:""},negativeTop:{type:[String,Number],default:0},maskCustomStyle:{type:Object,default:function(){return{}}},duration:{type:[String,Number],default:250}},data:function(){return{visibleSync:!1,showDrawer:!1,timer:null,closeFromInner:!1}},computed:{style:function(){var t={};if("left"==this.mode||"right"==this.mode?t={width:this.width?this.getUnitValue(this.width):this.getUnitValue(this.length),height:"100%",transform:"translate3D(".concat("left"==this.mode?"-100%":"100%",",0px,0px)")}:"top"!=this.mode&&"bottom"!=this.mode||(t={width:"100%",height:this.height?this.getUnitValue(this.height):this.getUnitValue(this.length),transform:"translate3D(0px,".concat("top"==this.mode?"-100%":"100%",",0px)")}),t.zIndex=this.uZindex,this.borderRadius){switch(this.mode){case"left":t.borderRadius="0 ".concat(this.borderRadius,"rpx ").concat(this.borderRadius,"rpx 0");break;case"top":t.borderRadius="0 0 ".concat(this.borderRadius,"rpx ").concat(this.borderRadius,"rpx");break;case"right":t.borderRadius="".concat(this.borderRadius,"rpx 0 0 ").concat(this.borderRadius,"rpx");break;case"bottom":t.borderRadius="".concat(this.borderRadius,"rpx ").concat(this.borderRadius,"rpx 0 0");break;default:}t.overflow="hidden"}return this.duration&&(t.transition="all ".concat(this.duration/1e3,"s linear")),t},centerStyle:function(){var t={};return t.width=this.width?this.getUnitValue(this.width):this.getUnitValue(this.length),t.height=this.height?this.getUnitValue(this.height):"auto",t.zIndex=this.uZindex,t.marginTop="-".concat(this.$u.addUnit(this.negativeTop)),this.borderRadius&&(t.borderRadius="".concat(this.borderRadius,"rpx"),t.overflow="hidden"),t},uZindex:function(){return this.zIndex?this.zIndex:this.$u.zIndex.popup}},watch:{value:function(t){t?this.open():this.closeFromInner||this.close(),this.closeFromInner=!1}},mounted:function(){this.value&&this.open()},methods:{getUnitValue:function(t){return/(%|px|rpx|auto)$/.test(t)?t:t+"rpx"},maskClick:function(){this.close()},close:function(){this.closeFromInner=!0,this.change("showDrawer","visibleSync",!1)},modeCenterClose:function(t){"center"==t&&this.maskCloseAble&&this.close()},open:function(){this.change("visibleSync","showDrawer",!0)},change:function(t,e,n){var i=this;1==this.popup&&this.$emit("input",n),this[t]=n,this.timer=n?setTimeout((function(){i[e]=n,i.$emit(n?"open":"close")}),50):setTimeout((function(){i[e]=n,i.$emit(n?"open":"close")}),this.duration)}}};e.default=i},f47f:function(t,e,n){"use strict";var i=n("1f18"),o=n.n(i);o.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'uview-ui/components/u-popup/u-popup-create-component',
{
'uview-ui/components/u-popup/u-popup-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("97e8"))
})
},
[['uview-ui/components/u-popup/u-popup-create-component']]
]);
{
"usingComponents": {
"u-mask": "/uview-ui/components/u-mask/u-mask",
"u-icon": "/uview-ui/components/u-icon/u-icon"
},
"component": true
}
\ No newline at end of file
<block wx:if="{{visibleSync}}"><view class="u-drawer data-v-4b631af3" style="{{$root.s0}}" hover-stop-propagation="{{true}}"><u-mask vue-id="3fc9d948-1" duration="{{duration}}" custom-style="{{maskCustomStyle}}" maskClickAble="{{maskCloseAble}}" z-index="{{uZindex-2}}" show="{{showDrawer&&mask}}" data-event-opts="{{[['^click',[['maskClick']]]]}}" bind:click="__e" class="data-v-4b631af3" bind:__l="__l"></u-mask><view data-event-opts="{{[['tap',[['modeCenterClose',['$0'],['mode']],['',['$event']]]],['touchmove',[['',['$event']]]]]}}" class="{{['u-drawer-content data-v-4b631af3',safeAreaInsetBottom?'safe-area-inset-bottom':'','u-drawer-'+mode,showDrawer?'u-drawer-content-visible':'',zoom&&mode=='center'?'u-animation-zoom':'']}}" style="{{$root.s1}}" catchtap="__e" catchtouchmove="__e"><block wx:if="{{mode=='center'}}"><view data-event-opts="{{[['tap',[['',['$event']]]],['touchmove',[['',['$event']]]]]}}" class="u-mode-center-box data-v-4b631af3" style="{{$root.s2}}" catchtap="__e" catchtouchmove="__e"><block wx:if="{{closeable}}"><u-icon class="{{['u-close data-v-4b631af3','u-close--'+closeIconPos]}}" vue-id="3fc9d948-2" name="{{closeIcon}}" color="{{closeIconColor}}" size="{{closeIconSize}}" data-event-opts="{{[['^click',[['close']]]]}}" bind:click="__e" bind:__l="__l"></u-icon></block><scroll-view class="u-drawer__scroll-view data-v-4b631af3" scroll-y="true"><slot></slot></scroll-view></view></block><block wx:else><scroll-view class="u-drawer__scroll-view data-v-4b631af3" scroll-y="true"><slot></slot></scroll-view></block><view data-event-opts="{{[['tap',[['close',['$event']]]]]}}" class="{{['u-close data-v-4b631af3','u-close--'+closeIconPos]}}" bindtap="__e"><block wx:if="{{mode!='center'&&closeable}}"><u-icon vue-id="3fc9d948-3" name="{{closeIcon}}" color="{{closeIconColor}}" size="{{closeIconSize}}" class="data-v-4b631af3" bind:__l="__l"></u-icon></block></view></view></view></block>
\ No newline at end of file
.u-drawer.data-v-4b631af3{display:block;position:fixed;top:0;left:0;right:0;bottom:0;overflow:hidden}.u-drawer-content.data-v-4b631af3{display:block;position:absolute;z-index:1003;-webkit-transition:all .25s linear;transition:all .25s linear}.u-drawer__scroll-view.data-v-4b631af3{width:100%;height:100%}.u-drawer-left.data-v-4b631af3{top:0;bottom:0;left:0;background-color:#fff}.u-drawer-right.data-v-4b631af3{right:0;top:0;bottom:0;background-color:#fff}.u-drawer-top.data-v-4b631af3{top:0;left:0;right:0;background-color:#fff}.u-drawer-bottom.data-v-4b631af3{bottom:0;left:0;right:0;background-color:#fff}.u-drawer-center.data-v-4b631af3{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;flex-direction:column;bottom:0;left:0;right:0;top:0;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center;opacity:0;z-index:99999}.u-mode-center-box.data-v-4b631af3{min-width:100rpx;min-height:100rpx;display:block;position:relative;background-color:#fff}.u-drawer-content-visible.u-drawer-center.data-v-4b631af3{-webkit-transform:scale(1);transform:scale(1);opacity:1}.u-animation-zoom.data-v-4b631af3{-webkit-transform:scale(1.15);transform:scale(1.15)}.u-drawer-content-visible.data-v-4b631af3{-webkit-transform:translateZ(0)!important;transform:translateZ(0)!important}.u-close.data-v-4b631af3{position:absolute;z-index:3}.u-close--top-left.data-v-4b631af3{top:30rpx;left:30rpx}.u-close--top-right.data-v-4b631af3{top:30rpx;right:30rpx}.u-close--bottom-left.data-v-4b631af3{bottom:30rpx;left:30rpx}.u-close--bottom-right.data-v-4b631af3{right:30rpx;bottom:30rpx}
\ No newline at end of file
......@@ -96,7 +96,7 @@ __webpack_require__.r(__webpack_exports__);
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
/* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
// 1、uni-app的页面生命周期仅在page页面有效,而单独封装的组件中【页面周期无效】,
//但是Vue的生命周期依然有效 【Vue的生命周期在任何地方都是有效的,即你仍然可以在uni-app项目中使用Vue生命周期,但是不建议这么做】
// 2、推荐使用uni-app里面的onLoad 代替 vue 里面的 created
......@@ -104,7 +104,12 @@ Object.defineProperty(exports, "__esModule", { value: true });exports.default =
//4.setStorageSync与setStorage的区别:如果后续的操作需要使用更新storage后保存的data,则使用setStorageSync使用异步性能更好,使用同步数据更安全
var _default = {
onLaunch: function onLaunch() {//初始化完成时触发(全局只触发一次
var openid = uni.getStorageSync("openid");
if (!openid) {
uni.navigateTo({
url: "/pages/login/login" });
}
},
onShow: function onShow() {
......@@ -112,6 +117,7 @@ var _default = {
onHide: function onHide() {
} };exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
/***/ }),
/* 12 */
......
<u-popup bind:input="__e" vue-id="91856606-1" mode="bottom" value="{{show}}" data-event-opts="{{[['^input',[['__set_model',['','show','$event',[]]]]]]}}" class="data-v-cae34dae" bind:__l="__l" vue-slots="{{['default']}}"><view class="title data-v-cae34dae"><block wx:for="{{navTitle}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['navClick',[index]]]]]}}" class="{{['titleContent data-v-cae34dae',(active==index)?'on':'']}}" bindtap="__e"><view style="position:relative;top:15rpx;" class="data-v-cae34dae">{{item}}</view><view hidden="{{!(active==index)}}" class="data-v-cae34dae"><text class="data-v-cae34dae"></text></view></view></block></view><view hidden="{{!(active==0)}}" class="data-v-cae34dae"><block wx:if="{{couponList.usableCouponList&&couponList.usableCouponList.length>0}}"><view class="middle data-v-cae34dae"><radio-group data-event-opts="{{[['change',[['radioChange',['$event']]]]]}}" bindchange="__e" class="data-v-cae34dae"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="listBox data-v-cae34dae"><label class="data-v-cae34dae"><view class="data-v-cae34dae">{{''+item.$orig.couponName+''}}<radio value="{{item.$orig.couponId}}" checked="{{item.$orig.couponId==chooseCoupon.couponId}}" class="data-v-cae34dae"></radio></view><view class="data-v-cae34dae">{{''+item.$orig.couponRule+''}}</view><view class="data-v-cae34dae">{{''+item.$orig.useStartDate+"-"+item.$orig.useEndDate+''}}<text class="data-v-cae34dae"><text class="data-v-cae34dae">¥</text>{{item.g0+''}}</text></view></label></view></block></radio-group></view></block><block wx:if="{{!couponList.usableCouponList||couponList.usableCouponList.length==0}}"><view style="padding:100rpx 0;text-align:center;" class="data-v-cae34dae">空空如也...</view></block></view><view hidden="{{!(active==1)}}" class="data-v-cae34dae"><block wx:if="{{couponList.unusableCouponList&&couponList.unusableCouponList.length>0}}"><view class="middle data-v-cae34dae"><block wx:for="{{$root.l1}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="listBox data-v-cae34dae"><view class="data-v-cae34dae">{{''+item.$orig.couponName+''}}</view><view class="data-v-cae34dae">{{''+item.$orig.couponRule+''}}<text class="data-v-cae34dae"><text class="data-v-cae34dae">¥</text>{{item.g1+''}}</text></view><view class="data-v-cae34dae">{{''+item.$orig.useStartDate+"-"+item.$orig.useEndDate+''}}</view></view></block></view></block><block wx:if="{{!couponList.unusableCouponList||couponList.unusableCouponList.length==0}}"><view style="padding:100rpx 0;text-align:center;" class="data-v-cae34dae">空空如也...</view></block></view></u-popup>
\ No newline at end of file
<u-popup bind:input="__e" vue-id="91856606-1" mode="bottom" value="{{show}}" data-event-opts="{{[['^input',[['__set_model',['','show','$event',[]]]]]]}}" class="data-v-cae34dae" bind:__l="__l" vue-slots="{{['default']}}"><view class="title data-v-cae34dae"><block wx:for="{{navTitle}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['navClick',[index]]]]]}}" class="{{['titleContent data-v-cae34dae',(active==index)?'on':'']}}" bindtap="__e"><view style="position:relative;top:15rpx;" class="data-v-cae34dae">{{item}}</view><view hidden="{{!(active==index)}}" class="data-v-cae34dae"><text class="data-v-cae34dae"></text></view></view></block></view><view hidden="{{!(active==0)}}" class="data-v-cae34dae"><block wx:if="{{couponList.usableCouponList&&couponList.usableCouponList.length>0}}"><view class="middle data-v-cae34dae"><radio-group data-event-opts="{{[['change',[['radioChange',['$event']]]]]}}" bindchange="__e" class="data-v-cae34dae"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="listBox data-v-cae34dae"><label class="data-v-cae34dae"><view class="data-v-cae34dae">{{''+item.$orig.couponName+''}}<radio value="{{item.$orig.couponId}}" checked="{{item.$orig.couponId==chooseCoupon.couponId}}" class="data-v-cae34dae"></radio></view><view class="data-v-cae34dae">{{''+item.$orig.couponRule+''}}</view><view class="data-v-cae34dae">{{''+item.$orig.useStartDate+"-"+item.$orig.useEndDate+''}}<text class="data-v-cae34dae"><text class="data-v-cae34dae">¥</text>{{item.g0+''}}</text></view></label></view></block></radio-group></view></block><block wx:if="{{!couponList.usableCouponList||couponList.usableCouponList.length==0}}"><view class="empty data-v-cae34dae">空空如也...</view></block></view><view hidden="{{!(active==1)}}" class="data-v-cae34dae"><block wx:if="{{couponList.unusableCouponList&&couponList.unusableCouponList.length>0}}"><view class="middle data-v-cae34dae"><block wx:for="{{$root.l1}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="listBox data-v-cae34dae"><view class="data-v-cae34dae">{{''+item.$orig.couponName+''}}</view><view class="data-v-cae34dae">{{''+item.$orig.couponRule+''}}<text class="data-v-cae34dae"><text class="data-v-cae34dae">¥</text>{{item.g1+''}}</text></view><view class="data-v-cae34dae">{{''+item.$orig.useStartDate+"-"+item.$orig.useEndDate+''}}</view></view></block></view></block><block wx:if="{{!couponList.unusableCouponList||couponList.unusableCouponList.length==0}}"><view class="empty data-v-cae34dae">空空如也...</view></block></view></u-popup>
\ No newline at end of file
......@@ -94,4 +94,9 @@
font-size: 24rpx;
font-weight: 400;
}
.empty.data-v-cae34dae {
padding: 100rpx 0;
text-align: center;
background: #f5f5f5;
}
......@@ -199,18 +199,12 @@ var _default =
{
data: function data() {
return {
title: '胖丁首页',
showBottom: false //控制底部显示隐藏
};
},
onLoad: function onLoad() {
var _this = this;
if (uni.getStorageSync("openid")) {
_this.showBottom = true;
} else {
uni.navigateTo({
url: "../login/login" });
this.showBottom = true;
}
},
onReady: function onReady() {
......
......@@ -350,7 +350,7 @@ __webpack_require__.r(__webpack_exports__);
merchantId: this.merchantId, //商户Id
companyId: this.companyId, //公司Id
orderSource: this.orderSource, //订单来源 8扫码支付
openid: "oroHZ5D2kemXkyFtTb_KnJMH1fqc" };
openid: uni.getStorageSync("openid") };
this.$request("wechatUser/myPage/usableCouponList", data).then(function (res) {
if (res.code == "00") {
......
{
"usingComponents": {
"u-popup": "/uview-ui/components/u-popup/u-popup"
},
"component": true
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment