|
@@ -7,13 +7,14 @@
|
|
<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
|
|
<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
|
|
<view class="list-scroll-view">
|
|
<view class="list-scroll-view">
|
|
<view class="list" v-for="(item, index) in list" :key="index" @tap="toInfo(item)">
|
|
<view class="list" v-for="(item, index) in list" :key="index" @tap="toInfo(item)">
|
|
- 1111
|
|
|
|
|
|
+ 111
|
|
</view>
|
|
</view>
|
|
<view class="is_bottom" v-if="is_bottom">
|
|
<view class="is_bottom" v-if="is_bottom">
|
|
<text>{{config.bottom_title||'到底了!'}}</text>
|
|
<text>{{config.bottom_title||'到底了!'}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
|
+ <button class="button" type="primary" size="mini" @tap.stop="toPay()">支付</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
@@ -91,6 +92,63 @@
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 支付
|
|
|
|
+ async toPay() {
|
|
|
|
+ const that = this;
|
|
|
|
+ // 支付信息
|
|
|
|
+ uni.request({
|
|
|
|
+ url: `https://broadcast.waityou24.cn/wechat/api/pay/payOrder`,
|
|
|
|
+ method: 'POST',
|
|
|
|
+ data: {
|
|
|
|
+ config: 'newCourtApp',
|
|
|
|
+ money: 0.01,
|
|
|
|
+ openid: 'wx34436977cd1e02e4',
|
|
|
|
+ order_no: String(Date.now())
|
|
|
|
+ },
|
|
|
|
+ header: {},
|
|
|
|
+ success: (res) => {
|
|
|
|
+ console.log(res);
|
|
|
|
+ // if (pay.errcode == '0' && pay.data.paySign) {
|
|
|
|
+ // // 微信支付
|
|
|
|
+ // uni.showLoading({
|
|
|
|
+ // title: '加载中'
|
|
|
|
+ // })
|
|
|
|
+ // uni.requestPayment({
|
|
|
|
+ // "provider": "wxpay",
|
|
|
|
+ // ...pay.data,
|
|
|
|
+ // success: function(res) {
|
|
|
|
+ // uni.showToast({
|
|
|
|
+ // title: '支付成功',
|
|
|
|
+ // icon: 'none'
|
|
|
|
+ // })
|
|
|
|
+ // },
|
|
|
|
+ // fail: function(err) {
|
|
|
|
+ // uni.showToast({
|
|
|
|
+ // title: `支付失败`,
|
|
|
|
+ // icon: 'none'
|
|
|
|
+ // })
|
|
|
|
+ // },
|
|
|
|
+ // complete: function() {
|
|
|
|
+ // uni.hideLoading();
|
|
|
|
+ // that.clearPage();
|
|
|
|
+ // that.search()
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // } else {
|
|
|
|
+ // uni.showToast({
|
|
|
|
+ // title: pay.errmsg || '错误信息',
|
|
|
|
+ // icon: 'none'
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ },
|
|
|
|
+ fail: (err) => {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请求接口失败',
|
|
|
|
+ icon: 'fail',
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ },
|
|
// 输入框
|
|
// 输入框
|
|
toInput(e) {
|
|
toInput(e) {
|
|
const that = this;
|
|
const that = this;
|
|
@@ -148,13 +206,13 @@
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
width: 100vw;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
height: 100vh;
|
|
-
|
|
|
|
|
|
+
|
|
.one {
|
|
.one {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
align-items: center;
|
|
align-items: center;
|
|
padding: 2vw;
|
|
padding: 2vw;
|
|
-
|
|
|
|
|
|
+
|
|
input {
|
|
input {
|
|
width: 100%;
|
|
width: 100%;
|
|
padding: 2vw;
|
|
padding: 2vw;
|
|
@@ -163,13 +221,13 @@
|
|
border-radius: 5px;
|
|
border-radius: 5px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.two {
|
|
.two {
|
|
position: relative;
|
|
position: relative;
|
|
flex-grow: 1;
|
|
flex-grow: 1;
|
|
background-color: var(--f9Color);
|
|
background-color: var(--f9Color);
|
|
margin: 2vw 0 0 0;
|
|
margin: 2vw 0 0 0;
|
|
-
|
|
|
|
|
|
+
|
|
.list {
|
|
.list {
|
|
display: flex;
|
|
display: flex;
|
|
background-color: var(--mainColor);
|
|
background-color: var(--mainColor);
|
|
@@ -180,24 +238,24 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.scroll-view {
|
|
.scroll-view {
|
|
position: absolute;
|
|
position: absolute;
|
|
top: 0;
|
|
top: 0;
|
|
left: 0;
|
|
left: 0;
|
|
right: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
bottom: 0;
|
|
-
|
|
|
|
|
|
+
|
|
.list-scroll-view {
|
|
.list-scroll-view {
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.is_bottom {
|
|
.is_bottom {
|
|
width: 100%;
|
|
width: 100%;
|
|
text-align: center;
|
|
text-align: center;
|
|
-
|
|
|
|
|
|
+
|
|
text {
|
|
text {
|
|
padding: 2vw 0;
|
|
padding: 2vw 0;
|
|
display: inline-block;
|
|
display: inline-block;
|