wangxy 2 дней назад
Родитель
Сommit
ef5fa1c83a
2 измененных файлов с 16 добавлено и 4 удалено
  1. 12 0
      api/my.js
  2. 4 4
      pages/chanpinMy/duihuanma.vue

+ 12 - 0
api/my.js

@@ -121,4 +121,16 @@ export function xuexiJiluDelete(data = {}) {
     data,
     timeout: 20000
   })
+}
+
+export function duihuanmaCodeNew(data = {}) {
+  return request({
+    'url': '/app/code/use',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
 }

+ 4 - 4
pages/chanpinMy/duihuanma.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="icon-title-navBar-box">
+	<view class="icon-title-navBar-box1">
 		<view @click="handleBack" class="nav-bar-icon"></view>
 		<text class="nav-bar-title">使用兑换码</text>
 	</view>
@@ -10,7 +10,7 @@
 			<view>{{ myInfoData.userName }}</view>
 			<input class="duihuan-input" type="text" focus v-model="duihuamaValue" placeholder="请输入兑换码" />
 			<view class="tip-btn-box">
-				<view class="confirm-btn" @click="confirmBtn"></view>
+				<view class="confirm-btn" @click="confirmBtn">兑换码</view>
 			</view>
 		</view>
 	</view>
@@ -28,7 +28,7 @@
 	import duihuanError from "./components/duihuanma/duihuanError";
 	import duihuanSuccess from "./components/duihuanma/duihuanSuccess";
 	import {
-		duihuanmaCode,
+		duihuanmaCodeNew,
 	} from '@/api/my.js'
 	import cacheManager from '@/utils/cacheManager';
   import {toast} from "@/utils/common";
@@ -100,7 +100,7 @@
 		let req = {
 			code: duihuamaValue.value
 		}
-		duihuanmaCode(req).then(res => {
+		duihuanmaCodeNew(req).then(res => {
 			if (res.code == 0) {
 				toast('兑换成功')
 				// 清空缓存