Browse Source

加token

zhaowenkang/feature-20251028181547-行情页面
maziyang 4 weeks ago
parent
commit
1a54ca33dd
  1. 9
      pages/customerServicePlatform/csPlatformIndex.vue
  2. 8
      pages/customerServicePlatform/historyRecord.vue
  3. 8
      pages/customerServicePlatform/questionDetail.vue

9
pages/customerServicePlatform/csPlatformIndex.vue

@ -90,6 +90,7 @@
</template> </template>
<script> <script>
import { useUserStore } from "../../stores/modules/userInfo.js"
import { import {
getQuestionApi, getQuestionApi,
addFeedbackRecordApi, addFeedbackRecordApi,
@ -117,15 +118,15 @@
showQuestions: [], showQuestions: [],
feedbackText: '', feedbackText: '',
images: [], images: [],
token:''
} }
}, },
mounted() { mounted() {
// //
this.iSMT = uni.getSystemInfoSync().statusBarHeight; this.iSMT = uni.getSystemInfoSync().statusBarHeight;
this.getQuestionList() this.getQuestionList()
},
created() {
const memberStore = useUserStore()
this.token = memberStore.userInfo?.token
}, },
methods: { methods: {
onSuccess() { onSuccess() {
@ -266,7 +267,7 @@
} }
const [image1 = '', image2 = '', image3 = ''] = uploadedImages; const [image1 = '', image2 = '', image3 = ''] = uploadedImages;
const res = await addFeedbackRecordApi({ const res = await addFeedbackRecordApi({
token: "a1bef735d336831ccb0cc3f532093b60",
token: this.token,
content: this.feedbackText, content: this.feedbackText,
image1, image1,
image2, image2,

8
pages/customerServicePlatform/historyRecord.vue

@ -57,6 +57,7 @@
</template> </template>
<script> <script>
import { useUserStore } from "../../stores/modules/userInfo.js"
import { import {
getFeedbackRecordsApi, getFeedbackRecordsApi,
} from "../../api/customerServicePlatform/customerServicePlatform"; } from "../../api/customerServicePlatform/customerServicePlatform";
@ -65,12 +66,15 @@
return { return {
iSMT: 0, iSMT: 0,
statusText: '反馈成功', statusText: '反馈成功',
historyList: []
historyList: [],
token:''
}; };
}, },
mounted() { mounted() {
this.iSMT = uni.getSystemInfoSync().statusBarHeight; this.iSMT = uni.getSystemInfoSync().statusBarHeight;
this.loadHistoryList() this.loadHistoryList()
const memberStore = useUserStore()
this.token = memberStore.userInfo?.token
}, },
methods: { methods: {
formatTime(str) { formatTime(str) {
@ -92,7 +96,7 @@
}, },
async loadHistoryList() { async loadHistoryList() {
const res = await getFeedbackRecordsApi({ const res = await getFeedbackRecordsApi({
token: 'a1bef735d336831ccb0cc3f532093b60'
token: this.token
}) })
console.log(res) console.log(res)
if (res.code == 200) { if (res.code == 200) {

8
pages/customerServicePlatform/questionDetail.vue

@ -62,6 +62,7 @@
</template> </template>
<script> <script>
import { useUserStore } from "../../stores/modules/userInfo.js"
import { import {
getAnswerApi getAnswerApi
} from "../../api/customerServicePlatform/customerServicePlatform"; } from "../../api/customerServicePlatform/customerServicePlatform";
@ -72,12 +73,15 @@
iSMT: 0, iSMT: 0,
questionTitle: '', questionTitle: '',
answerContent: '正在思考...', answerContent: '正在思考...',
showLoginRegister:false
showLoginRegister:false,
token:''
}; };
}, },
mounted() { mounted() {
this.iSMT = uni.getSystemInfoSync().statusBarHeight || 0; this.iSMT = uni.getSystemInfoSync().statusBarHeight || 0;
this.getAnswerContent() this.getAnswerContent()
const memberStore = useUserStore()
this.token = memberStore.userInfo?.token
}, },
onLoad(options) { onLoad(options) {
if (options.question) { if (options.question) {
@ -102,7 +106,7 @@
const res = await getAnswerApi({ const res = await getAnswerApi({
question: this.questionTitle, question: this.questionTitle,
conversationId: conversationId, conversationId: conversationId,
token:"f4383aec3be3c853ff5a71dfae2d061f"
token:this.token
}) })
console.log(res) console.log(res)

Loading…
Cancel
Save