5cd6ecbb by 杨炀

no message

1 parent 32ab1e6f
...@@ -173,7 +173,8 @@ export function payForOrder(form) { ...@@ -173,7 +173,8 @@ export function payForOrder(form) {
173 } 173 }
174 export function submitOrder(form) { 174 export function submitOrder(form) {
175 return request({ 175 return request({
176 url: `/system/order/sumbit`, 176 // url: `/system/order/sumbit`,
177 url: `/system/order/newsumbit `,
177 method: 'post', 178 method: 'post',
178 params: form 179 params: form
179 }) 180 })
...@@ -246,6 +247,12 @@ export function xfList() { ...@@ -246,6 +247,12 @@ export function xfList() {
246 url: `/system/order/mylist?userId=${currUser.userId}`, 247 url: `/system/order/mylist?userId=${currUser.userId}`,
247 method: 'get' 248 method: 'get'
248 }) 249 })
250 }
251 export function getShareList() {
252 return request({
253 url: `/system/userShare/getMyShareList`,
254 method: 'get'
255 })
249 } 256 }
250 257
251 258
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
45 <script setup> 45 <script setup>
46 import { 46 import {
47 onLoad, 47 onLoad,
48 onShow 48 onShow,onShareAppMessage
49 } from '@dcloudio/uni-app'; 49 } from '@dcloudio/uni-app';
50 import config from '@/config.js'; 50 import config from '@/config.js';
51 import { 51 import {
...@@ -53,23 +53,34 @@ ...@@ -53,23 +53,34 @@
53 getCurrentInstance 53 getCurrentInstance
54 } from 'vue'; 54 } from 'vue';
55 import * as api from '@/common/api.js'; 55 import * as api from '@/common/api.js';
56 56 const currUser = uni.getStorageSync('currUser');
57 const form = ref({}) 57 const form = ref({})
58 const isBuy = ref(false) 58 const isBuy = ref(false)
59 let goodsId 59 let shareId = '0'
60 let goodsId
60 onLoad((option) => { 61 onLoad((option) => {
61 uni.showLoading({ 62 uni.showLoading({
62 title: '加载中' 63 title: '加载中'
63 }) 64 })
64 if (option.id) { 65 if (option.id) {
65 goodsId = option.id 66 goodsId = option.id
67 }
68 if (option.shareId) {
69 console.log(option.shareId)
70 shareId = option.shareId
66 } 71 }
67 }) 72 })
68 onShow(() => { 73 onShow(() => {
69 if (goodsId) 74 if (goodsId)
70 getData(goodsId) 75 getData(goodsId)
71 }) 76 })
72 77 onShareAppMessage(() => {
78 return {
79 title: form.value.activityName,
80 path: `/course/activeDetail?id=${goodsId}&shareId=${currUser.userId}`,
81 imageUrl: config.baseUrl_api+form.value.activityPic
82 };
83 });
73 function getData(id) { 84 function getData(id) {
74 api.getActiveById(id).then(res => { 85 api.getActiveById(id).then(res => {
75 form.value = res.data 86 form.value = res.data
...@@ -87,7 +98,7 @@ ...@@ -87,7 +98,7 @@
87 function goBill() { 98 function goBill() {
88 if(form.value.isFree=='1'){ 99 if(form.value.isFree=='1'){
89 const obj = encodeURIComponent(JSON.stringify(form.value)) 100 const obj = encodeURIComponent(JSON.stringify(form.value))
90 let path = `/course/courseBill?form=${obj}` 101 let path = `/course/courseBill?form=${obj}&shareId=${shareId}`
91 uni.navigateTo({ 102 uni.navigateTo({
92 url: path 103 url: path
93 }); 104 });
...@@ -95,7 +106,8 @@ ...@@ -95,7 +106,8 @@
95 } else { 106 } else {
96 api.submitOrder({ 107 api.submitOrder({
97 orderType: 1, 108 orderType: 1,
98 goodsId: form.value.activityId, 109 goodsId: form.value.activityId,
110 shareId:shareId,
99 payType: "0" 111 payType: "0"
100 }).then(res => { 112 }).then(res => {
101 uni.showModal({ 113 uni.showModal({
......
...@@ -142,7 +142,8 @@ ...@@ -142,7 +142,8 @@
142 const orderType = ref(0) 142 const orderType = ref(0)
143 const vipPrice = ref(0) 143 const vipPrice = ref(0)
144 const vippay = ref(null) 144 const vippay = ref(null)
145 const system = uni.getStorageSync('systemType') 145 const system = uni.getStorageSync('systemType')
146 let shareId = '0'
146 onLoad((option) => { 147 onLoad((option) => {
147 if ('form' in option) { 148 if ('form' in option) {
148 form.value = JSON.parse(decodeURIComponent(option.form)) 149 form.value = JSON.parse(decodeURIComponent(option.form))
...@@ -152,6 +153,9 @@ ...@@ -152,6 +153,9 @@
152 orderType.value = 1 153 orderType.value = 1
153 } 154 }
154 } 155 }
156 if (option.shareId) {
157 shareId = option.shareId
158 }
155 getUserExt() 159 getUserExt()
156 }) 160 })
157 onReady(() => { 161 onReady(() => {
...@@ -219,13 +223,15 @@ ...@@ -219,13 +223,15 @@
219 obj = { 223 obj = {
220 orderType: 0, 224 orderType: 0,
221 goodsId: form.value.courseId, 225 goodsId: form.value.courseId,
222 payType: form.value.payType 226 payType: form.value.payType,
227 shareId:shareId
223 } 228 }
224 } else { 229 } else {
225 obj = { 230 obj = {
226 orderType: 1, 231 orderType: 1,
227 goodsId: form.value.activityId, 232 goodsId: form.value.activityId,
228 payType: form.value.payType 233 payType: form.value.payType,
234 shareId:shareId
229 } 235 }
230 } 236 }
231 uni.showModal({ 237 uni.showModal({
...@@ -273,9 +279,10 @@ ...@@ -273,9 +279,10 @@
273 // const openId = 'oRufa4ifoP2I3hnoLAwoAreKkppA' 279 // const openId = 'oRufa4ifoP2I3hnoLAwoAreKkppA'
274 api.payForOrder({ 280 api.payForOrder({
275 payId: res.data.payId, 281 payId: res.data.payId,
276 openId: openId 282 openId: openId,
283 shareId:shareId
277 }).then(Response => { 284 }).then(Response => {
278 // wePay(Response.data.weixinData) 285 wePay(Response.data.weixinData)
279 }) 286 })
280 }) 287 })
281 } 288 }
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
77 <script setup> 77 <script setup>
78 import { 78 import {
79 onLoad, 79 onLoad,
80 onShow,onReady 80 onShow,onReady,onShareAppMessage
81 } from '@dcloudio/uni-app'; 81 } from '@dcloudio/uni-app';
82 import config from '@/config.js'; 82 import config from '@/config.js';
83 import { 83 import {
...@@ -94,17 +94,25 @@ ...@@ -94,17 +94,25 @@
94 const myaudio = ref(null) 94 const myaudio = ref(null)
95 const vUrl = ref('') 95 const vUrl = ref('')
96 const system = uni.getStorageSync('systemType') 96 const system = uni.getStorageSync('systemType')
97 let goodsId = '' 97 let goodsId = ''
98 let shareId = '0'
98 onLoad((option) => { 99 onLoad((option) => {
99 if (option.id) { 100 if (option.id) {
100 goodsId = option.id 101 goodsId = option.id
101 } 102 }
102 uni.showShareMenu({ 103 if (option.shareId) {
103 withShareTicket: true, 104 console.log(option.shareId)
104 menus: ['shareAppMessage', 'shareTimeline'] 105 shareId = option.shareId
105 }); 106 }
106 getData(goodsId) 107 getData(goodsId)
107 }) 108 })
109 onShareAppMessage(() => {
110 return {
111 title: form.value.courseName,
112 path: `/course/courseDetail?id=${goodsId}&shareId=${currUser.userId}`,
113 imageUrl: config.baseUrl_api+form.value.coursePic
114 };
115 });
108 onShow(() => { 116 onShow(() => {
109 api.getUserIsPay({ 117 api.getUserIsPay({
110 orderType: 0, 118 orderType: 0,
...@@ -146,7 +154,8 @@ ...@@ -146,7 +154,8 @@
146 api.submitOrder({ 154 api.submitOrder({
147 orderType: 0, 155 orderType: 0,
148 goodsId: form.value.courseId, 156 goodsId: form.value.courseId,
149 payType: "0" 157 payType: "0",
158 shareId:shareId
150 }).then(res => { 159 }).then(res => {
151 uni.showModal({ 160 uni.showModal({
152 content:'已兑换!', 161 content:'已兑换!',
......
...@@ -192,6 +192,6 @@ font-weight: 600;} ...@@ -192,6 +192,6 @@ font-weight: 600;}
192 .coverbox{height: 240rpx;position: relative; 192 .coverbox{height: 240rpx;position: relative;
193 .cover{width: 100%;height: 240rpx;} 193 .cover{width: 100%;height: 240rpx;}
194 .name{position: absolute;color: #fff; 194 .name{position: absolute;color: #fff;
195 font-size: 36rpx;top:40%;left: 40rpx;width: 8em;} 195 font-size: 36rpx;top:28%;left: 40rpx;width: 8em;}
196 } 196 }
197 </style> 197 </style>
......
...@@ -122,6 +122,13 @@ ...@@ -122,6 +122,13 @@
122 "navigationBarTitleText": "消费记录", 122 "navigationBarTitleText": "消费记录",
123 "enablePullDownRefresh": false 123 "enablePullDownRefresh": false
124 } 124 }
125 },
126 {
127 "path" : "myShare",
128 "style" :
129 {
130 "navigationBarTitleText" : "我的分享"
131 }
125 } 132 }
126 ] 133 ]
127 }, { 134 }, {
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
51 <script setup> 51 <script setup>
52 import { 52 import {
53 onLoad, 53 onLoad,
54 onShow 54 onShow,onShareAppMessage
55 } from '@dcloudio/uni-app'; 55 } from '@dcloudio/uni-app';
56 import config from '@/config.js'; 56 import config from '@/config.js';
57 import { 57 import {
...@@ -68,7 +68,6 @@ ...@@ -68,7 +68,6 @@
68 onShow(() => { 68 onShow(() => {
69 init() 69 init()
70 }) 70 })
71
72 function init() { 71 function init() {
73 uni.showLoading({ 72 uni.showLoading({
74 title: `加载中` 73 title: `加载中`
......
...@@ -3,7 +3,10 @@ ...@@ -3,7 +3,10 @@
3 <view class="topBg"> 3 <view class="topBg">
4 <image src="/usercenter/img/bg.png" class="topbgimg"></image> 4 <image src="/usercenter/img/bg.png" class="topbgimg"></image>
5 <view class="userInfoBox"> 5 <view class="userInfoBox">
6 <view class="headImg"> 6 <view class="headImg" v-if="user.avatar">
7 <image mode="aspectFill" :src="user.avatar"></image>
8 </view>
9 <view class="headImg" v-else>
7 <image v-if="user.sex=='0'" mode="aspectFill" src="/usercenter/img/female.png"></image> 10 <image v-if="user.sex=='0'" mode="aspectFill" src="/usercenter/img/female.png"></image>
8 <image v-else mode="aspectFill" src="/usercenter/img/male.png"></image> 11 <image v-else mode="aspectFill" src="/usercenter/img/male.png"></image>
9 </view> 12 </view>
...@@ -113,6 +116,14 @@ ...@@ -113,6 +116,14 @@
113 </view> 116 </view>
114 </template> 117 </template>
115 </uni-list-item> 118 </uni-list-item>
119 <uni-list-item :border="false" title="充值记录" showArrow clickable
120 @click="goPath('/usercenter/mycard/mycard')">
121 <template v-slot:header>
122 <view class="slot-box">
123 <image class="slot-image" src="/usercenter/img/f3.png" mode="widthFix"></image>
124 </view>
125 </template>
126 </uni-list-item>
116 <uni-list-item :border="false" title="专属客服" showArrow clickable> 127 <uni-list-item :border="false" title="专属客服" showArrow clickable>
117 <template v-slot:header> 128 <template v-slot:header>
118 <view class="slot-box"> 129 <view class="slot-box">
...@@ -124,6 +135,19 @@ ...@@ -124,6 +135,19 @@
124 </button> 135 </button>
125 </template> 136 </template>
126 </uni-list-item> 137 </uni-list-item>
138
139 <uni-list-item :border="false" title="我的分享" showArrow clickable
140 @click="goPath('/usercenter/myShare')">
141 <template v-slot:header>
142 <view class="slot-box">
143 <image class="slot-image" src="/usercenter/img/f1.png" mode="widthFix"></image>
144 </view>
145 </template>
146 <template v-slot:footer>
147 <button size="mini" class="kfbtn" open-type="contact" bindcontact="handleContact" @contact="contactBack" session-from="sessionFrom">
148 </button>
149 </template>
150 </uni-list-item>
127 151
128 <!-- <uni-list-item :border="false" title="意见反馈" showArrow clickable @click="goPath()"> 152 <!-- <uni-list-item :border="false" title="意见反馈" showArrow clickable @click="goPath()">
129 <template v-slot:header> 153 <template v-slot:header>
......
1 <template> 1 <template>
2 <view class="fixedbody"> 2 <view class="fixedbody">
3 <uni-forms ref="baseForm" :modelValue="form" :rules="rules" label-width="80"> 3 <uni-forms ref="baseForm" :modelValue="form" label-width="80">
4 <uni-group mode="card" title="个人信息" top="20"> 4 <uni-group mode="card" title="个人信息" top="20">
5 <view class="wBox"> 5 <view class="wBox">
6 <!-- <uni-forms-item label="照片" required name="picUrl"> 6 <uni-forms-item label="照片" required name="picUrl">
7 <view class="avatarUrl"> 7 <view class="avatarUrl">
8 <button type="balanced" open-type="chooseAvatar" @chooseavatar="onChooseavatar"> 8 <button type="balanced" open-type="chooseAvatar" @chooseavatar="onChooseavatar">
9 <image mode="aspectFill" :src="baseFormData.picUrl" class="refreshIcon"></image> 9 <image mode="aspectFill" :src="form.avatar" class="refreshIcon"></image>
10 </button> 10 </button>
11 </view> 11 </view>
12 </uni-forms-item> --> 12 <!-- {{form.avatar}} -->
13 </uni-forms-item>
13 <uni-forms-item label="姓名" name="realName"> 14 <uni-forms-item label="姓名" name="realName">
14 <uni-easyinput v-model="form.nickName" :clearable="false" placeholder="请输入姓名" /> 15 <uni-easyinput type="nickname" v-model="form.nickName" :clearable="false" placeholder="请输入姓名"
16 @blur="changename"/>
15 </uni-forms-item> 17 </uni-forms-item>
16 18
17 <uni-forms-item label="手机号码" name="phone"> 19 <uni-forms-item label="手机号码" name="phone">
20 <!-- <button type="default" open-type="getPhoneNumber" @getphonenumber="decryptPhoneNumber">获取手机号</button> -->
18 <uni-easyinput v-model="form.phonenumber" :clearable="false" placeholder="请输入联系方式" /> 21 <uni-easyinput v-model="form.phonenumber" :clearable="false" placeholder="请输入联系方式" />
19 </uni-forms-item> 22 </uni-forms-item>
20
21 </view> 23 </view>
22 </uni-group> 24 </uni-group>
23 </uni-forms> 25 </uni-forms>
...@@ -39,6 +41,7 @@ const countryList = ref([]); ...@@ -39,6 +41,7 @@ const countryList = ref([]);
39 const regionsList = ref([]); 41 const regionsList = ref([]);
40 const groupList = ref([]); 42 const groupList = ref([]);
41 const form = ref({}); 43 const form = ref({});
44 const nn = ref({})
42 const current = ref(0); 45 const current = ref(0);
43 onLoad(()=>{ 46 onLoad(()=>{
44 47
...@@ -62,9 +65,29 @@ function save() { ...@@ -62,9 +65,29 @@ function save() {
62 loginServer.getCurrUser() 65 loginServer.getCurrUser()
63 }) 66 })
64 } 67 }
65 68 function onChooseavatar(e){
66 69 form.value.avatar = e.detail.avatarUrl
67 70 }
71 function changename(e){
72 console.log(e)
73 form.value.nickName = e.detail.value
74 }
75 function decryptPhoneNumber(e){
76 if (e.detail.errMsg == "getPhoneNumber:ok") {
77 // 可以使用 e.detail.encryptedData 和 e.detail.iv 获取加密的手机号信息
78 const encryptedData = e.detail.encryptedData;
79 const iv = e.detail.iv;
80 api.jiexi({
81 encryptedData: encryptedData,
82 iv: iv
83 }).then(res=>{
84 console.log(res.data); // 服务器返回的手机号等信息
85 })
86 } else {
87 // 用户拒绝授权
88 console.log("用户拒绝授权获取手机号");
89 }
90 }
68 </script> 91 </script>
69 92
70 <style scope lang="scss"> 93 <style scope lang="scss">
......
1 <template>
2 <view>
3 <view class="item" v-for="(n,index) in list" :key="index">
4 <view>来源:{{n.courseName||n.goodsName||n.activityName}}</view>
5 <view>
6 <!-- <text class="text-warning">{{n.userName}}</text> -->
7 分享给
8 <text class="text-warning">{{n.shareName}}</text>
9 </view>
10 <view class="flex-r">
11 积分:<text class="text-warning">+{{n.shareScore}}</text>
12 金币:<text class="text-warning">+{{n.shareGold}}</text>
13 </view>
14 </view>
15 <view class="nodata" v-if="list.length==0">
16 <image mode="aspectFit" src="/static/nodata.png"/>
17 </view>
18 </view>
19 </template>
20
21 <script setup>
22 import {
23 onLoad,
24 onShow
25 } from '@dcloudio/uni-app';
26 import config from '@/config.js';
27 import {
28 ref,
29 getCurrentInstance
30 } from 'vue';
31 import * as api from '@/common/api.js';
32 const list = ref([])
33 onShow(() => {
34 init()
35 })
36
37 function init() {
38 getList()
39 }
40 function getList(){
41 api.getShareList().then(res=>{
42 list.value = res.rows
43 })
44 }
45
46 </script>
47
48 <style scoped lang="scss">
49 .item{width: 700rpx;margin:30rpx auto 0;float: none;
50 background: #FFFFFF;box-sizing: border-box;
51 border-radius: 20rpx;padding: 30rpx;
52 view{font-size: 25rpx;color: #999;
53 text{color: #333;}
54 }
55 .flex-r{ display: flex;justify-content: flex-end;align-items: baseline;
56 text{margin-right: 20rpx;font-size: 34rpx;}
57 }
58 }
59 </style>
...@@ -66,9 +66,10 @@ ...@@ -66,9 +66,10 @@
66 const content = ref(''); 66 const content = ref('');
67 const currUser = uni.getStorageSync('currUser'); 67 const currUser = uni.getStorageSync('currUser');
68 onLoad(() => { 68 onLoad(() => {
69 69 if(content.value){
70 popNotice.value.open()
71 }
70 }) 72 })
71
72 onShow(() => { 73 onShow(() => {
73 74
74 75
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!