| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <template>
- <view class="page" :style="{height:height}">
- <!-- #ifdef H5-->
- <uni-nav-bar v-if="!$isWxBrowser()" :fixed="true" background-color="#FFE05C" :border="false" :statusBar="false" title="首页"/>
- <!-- #endif -->
- <manager v-if="isManager == '1'"></manager>
- <attach v-else-if="isManager == '0' && (roleTag == '0' || roleTag == '2')"></attach>
- <view :style="{height:height}" v-else-if="isManager == '0' && roleTag == '1'" class="flex-col justify-center">
- <view class="flex-row justify-center">
- <text>合作伙伴相关功能正在建设中...</text>
- </view>
- </view>
- </view>
- </template>
- <script>
- import manager from "./manager/manager";
- import attach from "./attach/attach"
- export default {
- components: {
- manager,
- attach
- },
- data() {
- return {
- isManager:'',
- roleTag:'',
- height: '',
- ruleList: [],
- roleList: [],
- roleBindRuleParam: {},
- userInfo: {}
- }
- },
- onLoad() {
- let sysInfo = uni.getSystemInfoSync()
- this.height = sysInfo.windowHeight + 'px'
- this.userInfo = uni.getStorageSync('spreadUserInfo')
- this.isManager = this.userInfo.isManager
- this.roleTag = this.userInfo.roleTag
- },
- onShow() {
- this.userInfo = uni.getStorageSync('spreadUserInfo')
- console.log('时间戳', new Date().getTime())
- },
- methods: {
- // 微信支付
- wechatPay() {
- const that = this;
- // 用户信息
- this.$api.service.wechatPay({
- orderNo: 'CZ20240223125943175'
- }).then((res) => {
- var param = res.data.data;
- uni.requestPayment({
- appId: param.appid,
- timeStamp: param.timestamp + "",
- nonceStr: param.noncestr,
- package: "prepay_id=" + param.prepayid,
- signType: "RSA",
- paySign: param.sign,
- success: res => {
- uni.showToast({
- title: '支付成功!'
- });
- // 刷新用户信息
- that.getUserInfo()
- },
- fail: res => {
- uni.showModal({
- content: '支付失败',
- showCancel: false
- });
- }
- });
- })
- },
- }
- }
- </script>
- <style scoped lang="scss">
- @import './index.rpx.css';
- </style>
|