diff --git a/jiuyi2/App.vue b/jiuyi2/App.vue
index e95bd8ef..f3d30422 100644
--- a/jiuyi2/App.vue
+++ b/jiuyi2/App.vue
@@ -44,7 +44,13 @@
// 获取系统配置
getConfig() {
api.getConfig().then(rs => {
-
+ if(rs.code == 200) {
+ store.commit('setState', {
+ key: 'config',
+ value: rs.data
+ })
+ return
+ }
})
}
}
diff --git a/jiuyi2/api/durian.js b/jiuyi2/api/durian.js
index 30e3dfa9..03011083 100644
--- a/jiuyi2/api/durian.js
+++ b/jiuyi2/api/durian.js
@@ -3,6 +3,28 @@ import util from '@/common/js/util.js'
// 卷轴积分
export const durian = {
+ /**
+ * 果树列表
+ * @param {Object} param
+ */
+ durianList(param) {
+ return util.request({
+ url: `/coreplay/duriantreeinfo/tree-list`,
+ method: 'GET',
+ query: param.query,
+ })
+ },
+ /**
+ * 榴莲果释放明细
+ * @param {Object} param
+ */
+ getLog(param) {
+ return util.request({
+ url: `/coreplay/durianfruitdetail/getDetailInfoByTreeId`,
+ method: 'GET',
+ query: param.query,
+ })
+ },
/**
* 果树列表
* @param {Object} param
diff --git a/jiuyi2/api/index.js b/jiuyi2/api/index.js
index 9f8eb52f..8365bcc8 100644
--- a/jiuyi2/api/index.js
+++ b/jiuyi2/api/index.js
@@ -46,9 +46,9 @@ const api = {
*/
getArticle(param) {
return util.request({
- url: '/home/getArticle',
- query: param.query,
- method: 'POST',
+ url: '/user/protocol/inquire',
+ path: param.path,
+ method: 'GET',
})
},
diff --git a/jiuyi2/common/js/util.js b/jiuyi2/common/js/util.js
index a093f6e5..bacce249 100644
--- a/jiuyi2/common/js/util.js
+++ b/jiuyi2/common/js/util.js
@@ -1728,9 +1728,7 @@ const util = {
uni.setClipboardData({
data: text,
success: () => {
- util.alert({
- title: '文本已复制到剪贴板',
- })
+ util.alert('文本已复制到剪贴板')
}
});
},
diff --git a/jiuyi2/components/index/task.vue b/jiuyi2/components/index/task.vue
index da96d48c..bef20ecb 100644
--- a/jiuyi2/components/index/task.vue
+++ b/jiuyi2/components/index/task.vue
@@ -19,10 +19,21 @@
const task = computed(() => {
return store.state.task
})
+ // 系统配置
+ const config = computed(() => {
+ return store.state.config
+ })
// 进度条
const progress = computed(() => {
let result = task.value.viewingDuration
- result = (Number(result) % 300) / 3
+ // 选项
+ const option = {
+ // 优先任务转换
+ 0: config.value.TASK_READING_SECOND,
+ // 有效读秒转换
+ 1: config.value.EFFECTIVE_SECONDS,
+ }
+ result = (Number(result) % Number(option[task.value.taskType])) / 3
return result
})
diff --git a/jiuyi2/components/login/notice.vue b/jiuyi2/components/login/notice.vue
index 79b36a83..12f998d6 100644
--- a/jiuyi2/components/login/notice.vue
+++ b/jiuyi2/components/login/notice.vue
@@ -37,7 +37,7 @@
已阅读并同意
- 服务协议
+ 用户协议
和
隐私政策
diff --git a/jiuyi2/pages/index/article.vue b/jiuyi2/pages/index/article.vue
index 59d1dd7d..3ff9662c 100644
--- a/jiuyi2/pages/index/article.vue
+++ b/jiuyi2/pages/index/article.vue
@@ -15,7 +15,9 @@
import api from '@/api';
// 内容
- const wrap = reactive({})
+ const wrap = reactive({
+ content: ``
+ })
// 对应内容id
const wrapId = ref('')
@@ -28,9 +30,7 @@
// 获取详情
function getDetail() {
api.getArticle({
- query: {
- id: wrapId.value
- }
+ path: [wrapId.value]
}).then(rs => {
if (rs.code == 200) {
Object.assign(wrap, rs.data)
@@ -50,7 +50,7 @@
{{wrap.name}}
-
+
diff --git a/jiuyi2/pages/index/durainActivation.vue b/jiuyi2/pages/index/durainActivation.vue
index 5ed9e0aa..3d72bc78 100644
--- a/jiuyi2/pages/index/durainActivation.vue
+++ b/jiuyi2/pages/index/durainActivation.vue
@@ -14,7 +14,10 @@
import {
onLoad
} from '@dcloudio/uni-app'
- import durianlApi from '@/api/durian.js';
+ // 工具库
+ import util from '@/common/js/util';
+ //
+ import api from '@/api/index.js';
const treeData = ref([])
const store = useStore()
const userinfo = computed(() => {
@@ -29,30 +32,69 @@
// 我的榴莲果树
function buyDurianList() {
- durianlApi.buyDurianList({}).then(rs => {
+ api.durian.buyDurianList({}).then(rs => {
if (rs.code == 200) {
- treeData.value = rs.data.dataList
+ treeData.value = rs.data.dataList.map(item => {
+ item.formatHash = formatStr(item.treeHash)
+ return item
+ })
return
}
-
util.alert({
content: rs.msg,
showCancel: false
})
})
}
+
+ /**
+ * 处理字符串
+ * @param {Object} str
+ */
+ function formatStr(str) {
+ // 如果字符串长度小于等于6,直接返回原字符串
+ if (str.length <= 6) return str
+ return str.slice(0, 3) + '***' + str.slice(-3); // 拼接结果
+ }
+
+
+ /**
+ * 跳转详情
+ * @param {Object} item
+ */
+ function handleDetail(item) {
+ uni.navigateTo({
+ url: util.setUrl('/pages/index/durianLog', {
+ id: item.durianTreeId,
+ })
+ })
+ }
+
+ /**
+ * 复制
+ * @param {Object} ev 需要复制的码
+ */
+ function handleCopy(ev) {
+ util.copyText(ev)
+ }
-
-
-
- 每日可释放:{{item.release}}
-
- 当前级别:{{item.treeName}}
+
+
+
+
+ 每日可释放:{{item.release}}
+ 剩余可释放:{{item.remainFruitCount}}
+ 当前级别:{{item.treeName}}
+
+ 哈希值: {{item.formatHash}}
+
+
diff --git a/jiuyi2/pages/index/durian.vue b/jiuyi2/pages/index/durian.vue
index 6403ef3b..a0adf211 100644
--- a/jiuyi2/pages/index/durian.vue
+++ b/jiuyi2/pages/index/durian.vue
@@ -163,20 +163,23 @@
return
}
+ // 榴莲果交易
api.durian.consume({
data: {
- // 交易对方的用户id
- targetUserId: form.targetUserId,
- // 交易类型
- transactionType: 10,
- // 榴莲果交易数量
- fruitAmount: form.fruitAmount,
- // 对方姓名
- name: `${form.first}${form.name}`,
- // 对方账号
- account: form.account,
- // 二级密码
- secondPassword: ev
+ // 更新用户信息
+ userId: userinfo.value.id,
+ // 交易对方的用户id
+ targetUserId: form.targetUserId,
+ // 交易类型
+ transactionType: 10,
+ // 榴莲果交易数量
+ fruitAmount: form.fruitAmount,
+ // 对方姓名
+ name: `${form.first}${form.name}`,
+ // 对方账号
+ account: form.account,
+ // 二级密码
+ secondPassword: ev
}
}).then(rs => {
if (rs.code === 200) {
diff --git a/jiuyi2/pages/index/durianLog.vue b/jiuyi2/pages/index/durianLog.vue
index 8cff9851..24cb3631 100644
--- a/jiuyi2/pages/index/durianLog.vue
+++ b/jiuyi2/pages/index/durianLog.vue
@@ -18,16 +18,15 @@
} from 'vuex'
// 顶部
import apex from '/components/header/apex'
- import durian from '@/api/durian.js';
+ import api from '@/api/index.js';
// 工具库
import util from '@/common/js/util.js'
const store = useStore()
-
//积分变动记录
const scrollLog = reactive({
data: [],
pageNum: 1,
- pageSize: 30,
+ pageSize: 20,
total: 0,
})
// 榴莲树id
@@ -69,11 +68,11 @@
// 积分变动明细
function getList() {
- durian.getMyFruitLog({
+ api.durian.getLog({
query: {
+ durianTreeInfoId: id.value,
pageNum: scrollLog.pageNum,
pageSize: scrollLog.pageSize,
- userId: userinfo.value.userId,
}
}).then(rs => {
if (rs.code == 200) {
@@ -102,16 +101,19 @@
- {{item.context}}
+ 榴莲果树产出
{{item.createTime}}
+
- {{item.scroll}}
+ {{item.releaseCount}}
+
+
+
diff --git a/jiuyi2/pages/index/index.nvue b/jiuyi2/pages/index/index.nvue
index 5f7cac6a..3e829907 100644
--- a/jiuyi2/pages/index/index.nvue
+++ b/jiuyi2/pages/index/index.nvue
@@ -54,10 +54,6 @@
const oclockWindow = ref(false)
// 有效读秒
const readSecond = reactive({
- // 单个视频最大
- max: 20,
- // 总数最大
- totalMax: 300,
// 定时器
timer: null,
})
@@ -144,6 +140,10 @@
const currentVideoRef = computed(() => {
return proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]]
})
+ // 系统配置
+ const config = computed(() => {
+ return uni.$store.state.config
+ })
// 加载完成之后
onLoad(() => {
@@ -411,7 +411,7 @@
// 开启计时器
readSecond.timer = setInterval(() => {
// 当前视频有效读秒 小于等于 最大有效读秒限制(视频最大时长-2s,设置的有效读秒上限)
- if (item.readSecond < Math.min(Math.floor(item.videoDuration) - 2, 20)) {
+ if (item.readSecond < Math.min(Math.floor(item.videoDuration) - 2, config.value.EFFECTIVE_VIDEO_TIME)) {
// 增加这条视频的有效读秒
item.readSecond++
} else {
diff --git a/jiuyi2/pages/mine/setting/secondPwd.vue b/jiuyi2/pages/mine/setting/secondPwd.vue
index da5e3095..a7af100b 100644
--- a/jiuyi2/pages/mine/setting/secondPwd.vue
+++ b/jiuyi2/pages/mine/setting/secondPwd.vue
@@ -9,27 +9,31 @@
import {
useStore
} from 'vuex'
+ import {
+ onReady,
+ } from '@dcloudio/uni-app'
// api
import api from '@/api/index.js'
// util
import util from '@/common/js/util.js'
// 加密
import CryptoJS from 'crypto-js';
+ //
+ import codeInput from '@/components/mine/codeInput.vue'
const {
proxy
} = getCurrentInstance()
//
const store = useStore()
- // 模式 set设置密码 check验证密码
+ // 模式 set设置密码 rePwd确认密码 check验证密码
const mode = ref('set')
// 表单
const form = reactive({
pwd: '',
rePwd: '',
})
- //
- const passwordArr = reactive([])
- const AffirmStatus = ref(1)
+ // 当前输入表单键
+ const formKey = reactive('pwd')
// 用户信息
const userinfo = computed(() => {
let result = store.state.userinfo
@@ -37,18 +41,42 @@
return result
})
+ onReady(() => {
+ proxy.$refs.CodeKeyboard.show();
+ })
+
+ // 下一步
+ function handleNext() {
+ const data = {
+ ...form
+ }
+ // 验证必填项
+ if (!form.pwd) {
+ util.alert('二级密码不能为空')
+ }
+ mode.value = 'rePwd'
+ }
+
// 确认输入密码
function handleSubmit() {
const data = {
...form
}
+ console.log('data', data)
+ return
// 验证必填项
if (!data.pwd) {
util.alert('二级密码不能为空')
+ return
}
if (data.pwd !== data.rePwd) {
- util.alert('两次输入密码不一致')
+ util.alert({
+ content: '两次输入密码不一致',
+ showCancel: false
+ })
+ mode.value = 'set'
+ return
}
//
data.pwd = CryptoJS.MD5(data.pwd).toString()
@@ -68,7 +96,7 @@
}
util.alert({
content: rs.msg,
- showCanecl: false,
+ showCancel: false,
})
})
}
@@ -100,44 +128,29 @@
}
util.alert({
content: rs.msg,
- showCanecl: false,
+ showCancel: false,
})
})
}
- /**
- * 唤起键盘
- */
- function onPayUp() {
- proxy.$refs.CodeKeyboard.show();
- }
-
/**
* 支付键盘回调
* @param {Object} val
*/
function KeyInfo(val) {
- console.log('val', val)
- if (val.index >= 6) {
- return
- }
-
+ if (form[formKey.value].length >= 6) return
// 判断是否输入的是删除键
if (val.keyCode === 8) {
// 删除最后一位
- passwordArr.splice(val.index + 1, 1)
+ form[formKey.value] = form[formKey.value].slice(0, -1)
+ // passwordArr.splice(val.index + 1, 1)
}
// 判断是否输入的是.
else if (val.keyCode == 190) {
// 输入.无效
} else {
- passwordArr.push(val.key);
- }
-
- // 判断是否等于6
- if (passwordArr.length === 6) {
- passwordArr = [];
- AffirmStatus.value = AffirmStatus.value + 1;
+ form[formKey.value] += val.key
+ // passwordArr.push(val.key);
}
}
@@ -147,18 +160,21 @@
设置二级密码
请设置六位数字的二级密码
-
-
-
-
-
+
+
+
-
+ 下一步
+
+
+
+ 确认二级密码
+ 请再次输入刚才设置的二级密码
+
+
+
+
确认
@@ -178,14 +194,4 @@
\ No newline at end of file
diff --git a/jiuyi2/pages/mine/setting/setting.vue b/jiuyi2/pages/mine/setting/setting.vue
index b06ae3a3..65f15d05 100644
--- a/jiuyi2/pages/mine/setting/setting.vue
+++ b/jiuyi2/pages/mine/setting/setting.vue
@@ -208,17 +208,17 @@
-
+
意见反馈
-
+
关于我们
-
+
用户协议
@@ -238,12 +238,7 @@
-
- 切换账号
-
-
- 退出登录
-
+ 退出登录
diff --git a/jiuyi2/readme.md b/jiuyi2/readme.md
index d2ed3e2a..56dd8a11 100644
--- a/jiuyi2/readme.md
+++ b/jiuyi2/readme.md
@@ -161,6 +161,17 @@ reset_password
//注册
register
+榴莲果交易类型id
+1 兑换榴莲果树
+2 商城评论
+3 查看他人评论
+4 查看视频分析
+5 兑换视频展播量
+6 推广他人视频
+7 申请完播量
+8 挂卖榴莲果
+9 挂买榴莲果
+10 用户互转
区分商家认证
isShop
@@ -355,15 +366,3 @@ call_type 通话类型 2为视频,1是音频
选择视频截帧
-榴莲果交易类型id
-1 兑换榴莲果树
-2 商城评论
-3 查看他人评论
-4 查看视频分析
-5 兑换视频展播量
-6 推广他人视频
-7 申请完播量
-8 挂卖榴莲果
-9 挂买榴莲果
-10 用户互转
-
diff --git a/jiuyi2/store/index.js b/jiuyi2/store/index.js
index 18270135..9a9011ee 100644
--- a/jiuyi2/store/index.js
+++ b/jiuyi2/store/index.js
@@ -24,6 +24,13 @@ export default createStore({
//有效时长
viewingDuration: 0,
},
+ // 各种变量配置
+ config: {
+ "DAY_POINTS_RELEASE": 0.3, //每日积分释放
+ "TASK_READING_SECOND": 300, //任务读秒
+ "EFFECTIVE_SECONDS": 300, //有效读秒
+ "EFFECTIVE_VIDEO_TIME": 20 //有效视频时间
+ },
},
mutations: {
diff --git a/jiuyi2/uni_modules/cc-defineKeyboard/components/cc-defineKeyboard/cc-defineKeyboard.vue b/jiuyi2/uni_modules/cc-defineKeyboard/components/cc-defineKeyboard/cc-defineKeyboard.vue
index ac190f6b..4fc41489 100644
--- a/jiuyi2/uni_modules/cc-defineKeyboard/components/cc-defineKeyboard/cc-defineKeyboard.vue
+++ b/jiuyi2/uni_modules/cc-defineKeyboard/components/cc-defineKeyboard/cc-defineKeyboard.vue
@@ -1,10 +1,8 @@
-
+
{{item.key}}
@@ -16,71 +14,69 @@
data() {
return {
isShow: false,
- keyList: [
- {
- key: 1,
- en: '',
- keyCode: 49,
- },{
- key: 2,
- en: 'ABC',
- keyCode: 50,
- },{
- key: 3,
- en: 'ABC',
- keyCode: 51,
- },{
- key: 4,
- en: 'ABC',
- keyCode: 52,
- },{
- key: 5,
- en: 'ABC',
- keyCode: 53,
- },{
- key: 6,
- en: 'ABC',
- keyCode: 54,
- },{
- key: 7,
- en: 'ABC',
- keyCode: 55,
- },{
- key: 8,
- en: 'ABC',
- keyCode: 56,
- },{
- key: 9,
- en: 'ABC',
- keyCode: 57,
- },{
- key: '',
- en: 'ABC',
- keyCode: 190,
- },{
- key: 0,
- en: 'ABC',
- keyCode: 48,
- },{
- key: 'del',
- en: 'DEL',
- keyCode: 8,
- },
- ],
+ keyList: [{
+ key: 1,
+ en: '',
+ keyCode: 49,
+ }, {
+ key: 2,
+ en: 'ABC',
+ keyCode: 50,
+ }, {
+ key: 3,
+ en: 'ABC',
+ keyCode: 51,
+ }, {
+ key: 4,
+ en: 'ABC',
+ keyCode: 52,
+ }, {
+ key: 5,
+ en: 'ABC',
+ keyCode: 53,
+ }, {
+ key: 6,
+ en: 'ABC',
+ keyCode: 54,
+ }, {
+ key: 7,
+ en: 'ABC',
+ keyCode: 55,
+ }, {
+ key: 8,
+ en: 'ABC',
+ keyCode: 56,
+ }, {
+ key: 9,
+ en: 'ABC',
+ keyCode: 57,
+ }, {
+ key: '',
+ en: 'ABC',
+ keyCode: 190,
+ }, {
+ key: 0,
+ en: 'ABC',
+ keyCode: 48,
+ }, {
+ key: 'del',
+ en: 'DEL',
+ keyCode: 8,
+ }, ],
keyIndex: -1,
};
},
- props:{
+ props: {
passwrdType: {
type: String,
default: 'pay'
}
},
- methods:{
- show(){
+ methods: {
+ show() {
this.isShow = true;
},
- hide(){
+ hide() {
this.isShow = false;
},
/**
@@ -88,23 +84,8 @@
* @param {Object} item
* @param {Number} index
*/
- onKeyList(item,index){
- let KeyInfo = item;
- // 删除键
- if(KeyInfo.keyCode === 8 && this.keyIndex > -1){
- this.keyIndex--;
- }
- // 不是删除键
- if(KeyInfo.keyCode != 8){
- if(this.passwrdType == 'pay' && this.keyIndex >= 5){
- console.log('支付键盘');
- this.keyIndex = -1;
- return;
- }
- this.keyIndex++;
- }
- KeyInfo.index = this.keyIndex;
- this.$emit('KeyInfo',KeyInfo);
+ onKeyList(item, index) {
+ this.$emit('KeyInfo', item);
}
}
}
@@ -112,4 +93,4 @@
+
\ No newline at end of file
diff --git a/jiuyi2/vite.config.js b/jiuyi2/vite.config.js
index 020c6f75..45f36258 100644
--- a/jiuyi2/vite.config.js
+++ b/jiuyi2/vite.config.js
@@ -15,11 +15,11 @@ export default defineConfig({
changeOrigin: true,
},
"/user": {
- target: "http://192.168.1.241:8080",
+ target: "http://192.168.1.235:8080",
changeOrigin: true,
},
"/coreplay": {
- target: "http://192.168.1.241:8080",
+ target: "http://192.168.1.235:8080",
changeOrigin: true,
},
"/file": {
@@ -27,7 +27,7 @@ export default defineConfig({
changeOrigin: true,
},
"/video": {
- target: "http://192.168.1.241:8080",
+ target: "http://192.168.1.235:8080",
changeOrigin: true,
},
}