| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <template>
- <view class="page">
- <manager :height="height" v-if="userInfo.isManager === 1"></manager>
- <attach :height="height" v-if="userInfo.isManager === 0 && userInfo.roleTag == '0'"></attach>
- <view v-if="userInfo.isManager === 0 && userInfo.roleTag == '1'">
- <text>合作伙伴</text>
- </view>
- </view>
- </template>
- <script>
- import manager from "./manager/manager";
- import attach from "./attach/attach"
- export default {
- components:{
- manager,attach
- },
- data() {
- return {
- height:'',
- ruleList:[],
- roleList:[],
- roleBindRuleParam:{},
- userInfo:{}
- }
- },
- onLoad() {
- let sysInfo = uni.getSystemInfoSync()
- this.height = sysInfo.windowHeight - 45 + 'px'
- },
- onShow(){
- this.userInfo = uni.getStorageSync('spreadUserInfo')
- },
- 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>
|