Compare commits

..

3 Commits

Author SHA1 Message Date
xx
d169dca894 1 2025-06-07 21:08:06 +08:00
xx
40fe2f4811 Merge branch 'main' of http://103.44.237.87:3000/commiu/question_uniapp 2025-06-07 21:01:43 +08:00
xx
625df7e8e1 1 2025-06-07 21:01:16 +08:00
9 changed files with 152 additions and 95 deletions

View File

@ -18,7 +18,7 @@
let scene = decodeURIComponent(e.query.scene); let scene = decodeURIComponent(e.query.scene);
scene = scene.split("&"); scene = scene.split("&");
let data = { let data = {
// //
scene: e.scene scene: e.scene
}; };
scene.forEach(item => { scene.forEach(item => {

View File

@ -7,6 +7,7 @@
"buttonUpgrade": "Upgrade", "buttonUpgrade": "Upgrade",
"buttonDetails": "renew", "buttonDetails": "renew",
"nodata": "No data available", "nodata": "No data available",
"loading": "Data Loading...",
"setIndex":{ "setIndex":{
"title": "setting", "title": "setting",
"text1": "PIN code setting", "text1": "PIN code setting",
@ -16,10 +17,77 @@
"text5": "Warm tips", "text5": "Warm tips",
"text6": "Log out" "text6": "Log out"
}, },
"setPasswork":{
"title": "Change login password",
"text1": "Email",
"text2": "Please enter your email address",
"text3": "Verification code",
"text4": "Password",
"text5": "Please enter your Password",
"text6": "Confirm password",
"text7": "Please enter your confirm Password",
"text8": "Get code",
"text9": "Please input your email address",
"text10": "Please input password",
"text11": "Please input confirm password",
"text12": "Please input verification code",
"text13": "Email address error",
"text14": "Successfully sent",
"text15": "Send after {par}s",
"text16": "Please enter a 6-10 digit password",
"text17": "Two passwords are inconsistent"
},
"setPin":{
"title": "PIN code setting",
"text1": "PIN code",
"text2": "Enter your PIN code",
"text3": "New PIN code",
"text4": "Enter new PIN code of at least 6 digits",
"text5": "Confirm PIN code",
"text6": "Repeat pin code of at least 6 digits",
"text7": "Please input trade password",
"text8": "Please enter a 6-digit transaction password",
"text9": "Please input new trade password",
"text10": "Please enter a 6-digit new transaction password",
"text11": "Re enter the new transaction password",
"text12": "The transaction passwords entered twice are different"
},
"Questionnaire":{
"title": "Questionnaire",
"text1": "Data Market",
"text2": "In progress",
"text3": "done",
"text4": "Answered",
"text5": "Period",
"text6": "reward",
"text7": "To answer",
"text8": "Answer time",
"text9": "Details",
"text10": "Done"
},
"Select": {
"title": "Select",
"text1": "Search the questionnaire"
},
"toanswer": {
"title": "To answer",
"text1": "no limit",
"text2": "Each number",
"text3": "Cloud hosting",
"text4": "Amount spent",
"text5": "Total return",
"text6": "Available balance",
"text7": "Billing cycle",
"text8": "Yield rate"
},
"answer":{
"title": "Answer",
"text1": "Answer time"
},
"mine":{ "mine":{
"text1": "Login/Register", "text1": "Login/Register",
"text2": "Upgrade to become agent", "text2": "Upgrade to become agent",
"text3": "benefit accelerated to 5x", "text3": "benefit accelerated to 3x",
"text4": "Permanent agent", "text4": "Permanent agent",
"text5": "My wallet", "text5": "My wallet",
"text6": "Computing power" "text6": "Computing power"

View File

@ -1,13 +1,13 @@
<template> <template>
<view class="page"> <view class="page">
<nav-bar title="Change login password" bgColor="#fff"></nav-bar> <nav-bar :title="$t('setPasswork.title')" bgColor="#fff"></nav-bar>
<view style="width: 92%; margin: 10px auto; padding: 15px 10px;"> <view style="width: 92%; margin: 10px auto; padding: 15px 10px;">
<uni-forms label-position="top" label-width="80px" :model="model" :rules="rules" ref="model"> <uni-forms label-position="top" label-width="80px" :model="model" :rules="rules" ref="model">
<uni-forms-item label="Email" name="email" label-width="400rpx"> <uni-forms-item :label="$t('setPasswork.text1')" name="email" label-width="400rpx">
<uni-easyinput type="text" v-model="model.email" placeholder="Please enter your email address"></uni-easyinput> <uni-easyinput type="text" v-model="model.email" placeholder=""></uni-easyinput>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="Verification code" name="code" label-width="400rpx"> <uni-forms-item :label="$t('setPasswork.text3')" name="code" label-width="400rpx">
<uni-easyinput type="number" v-model="model.code" placeholder="Enter email verification code"> <uni-easyinput type="number" v-model="model.code" :placeholder="$t('setPasswork.text2')">
<template #right> <template #right>
<button type="primary" <button type="primary"
:disabled="isSend" :disabled="isSend"
@ -16,17 +16,17 @@
</template> </template>
</uni-easyinput> </uni-easyinput>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="Password" name="password"> <uni-forms-item :label="$t("setPasswork.text4")" name="password">
<uni-easyinput type="password" :passwordIcon="true" v-model="model.password" placeholder="Please enter your Password" /> <uni-easyinput type="password" :passwordIcon="true" v-model="model.password" :placeholder="$t('setPasswork.text5')" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="Confirm password" name="cpassword" labelWidth="400rpx"> <uni-forms-item :label="$t("setPasswork.text6")" name="cpassword" labelWidth="400rpx">
<uni-easyinput type="password" :passwordIcon="true" v-model="model.cpassword" placeholder="Please enter your confirm Password" /> <uni-easyinput type="password" :passwordIcon="true" v-model="model.cpassword" :placeholder="$t('setPasswork.text7')" />
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
</view> </view>
<view style="bottom: 0px; position: absolute; width:100vw; height: 60px;"> <view style="bottom: 0px; position: absolute; width:100vw; height: 60px;">
<view class="cell_list"> <view class="cell_list">
<button type="primary" round style="width: 100%;" @click="submit">Submit</button> <button type="primary" round style="width: 100%;" @click="submit">{{$t('buttonSubmit')}}</button>
</view> </view>
</view> </view>
@ -42,7 +42,7 @@
export default { export default {
data() { data() {
return { return {
sendText: 'Get code', sendText: this.$t('setPasswork.text8'),
isSend: false, isSend: false,
model: { model: {
email: '', email: '',
@ -51,10 +51,10 @@
code: '' code: ''
}, },
rules: { rules: {
email: {rules:[{required: true,errorMessage: 'Please input your email address'}]}, email: {rules:[{required: true,errorMessage: this.$t('setPasswork.text9')}]},
password: {rules:[{required: true,errorMessage: 'Please input password'}]}, password: {rules:[{required: true,errorMessage: this.$t('setPasswork.text10')}]},
cpassword: {rules:[{required: true,errorMessage: 'Please input confirm password'}]}, cpassword: {rules:[{required: true,errorMessage: this.$t('setPasswork.text11')}]},
code: {rules:[{required: true,errorMessage: 'Please input verification code'}]}, code: {rules:[{required: true,errorMessage: this.$t('setPasswork.text12')}]},
} }
}; };
}, },
@ -76,7 +76,7 @@
sendCode(){ sendCode(){
this.isSend = true; this.isSend = true;
if (!this.$base.mailRegular.test(this.model.email)) { if (!this.$base.mailRegular.test(this.model.email)) {
uni.showToast({title: 'Email address error', icon:'error'}); uni.showToast({title: this.$t('setPasswork.text13'), icon:'error'});
return; return;
} }
let s = 120; let s = 120;
@ -88,17 +88,17 @@
} }
this.$http.post('/api/common/captcha', data).then(res => { this.$http.post('/api/common/captcha', data).then(res => {
if(res.code == 0){ if(res.code == 0){
uni.showToast({title: 'Successfully sent'}); uni.showToast({title: this.$t('setPasswork.text14')});
this.sendText = "Send in " + s + "s"; this.sendText = this.$t('setPasswork.text15', {par: s});
let intervalId = setInterval(() => { let intervalId = setInterval(() => {
s = s-1; s = s-1;
if (s == 0) { if (s == 0) {
clearInterval(intervalId); clearInterval(intervalId);
this.isSend = false; this.isSend = false;
this.sendText = "Get code"; this.sendText = this.$t('setPasswork.text8');
} }
else{ else{
this.sendText = "Send in " + s + "s"; this.sendText = this.$t('setPasswork.text15', {par: s});
} }
}, 1000); }, 1000);
} }
@ -107,15 +107,15 @@
submit(){ submit(){
this.$refs.model.validate().then(res=>{ this.$refs.model.validate().then(res=>{
if (!this.$base.mailRegular.test(this.model.email)) { if (!this.$base.mailRegular.test(this.model.email)) {
uni.showToast({title: 'Email address error', icon:'error'}); uni.showToast({title: this.$t('setPasswork.text13'), icon:'error'});
return; return;
} }
if (!this.$base.passwordRegular.test(this.model.password)) { if (!this.$base.passwordRegular.test(this.model.password)) {
uni.showToast({title: 'Please enter a 6-10 digit password', icon:'error'}); uni.showToast({title: this.$t('setPasswork.text16'), icon:'error'});
return; return;
} }
if (this.model.cpassword !== this.model.password) { if (this.model.cpassword !== this.model.password) {
uni.showToast({title: 'Two passwords are inconsistent', icon:'error'}); uni.showToast({title: this.$t('setPasswork.text17'), icon:'error'});
return; return;
} }
this.$http.post('/api/common/resetpwd', {email: this.model.email, newpassword: this.model.password, code: this.model.code}).then(res => { this.$http.post('/api/common/resetpwd', {email: this.model.email, newpassword: this.model.password, code: this.model.code}).then(res => {

View File

@ -1,22 +1,22 @@
<template> <template>
<view class="page"> <view class="page">
<nav-bar title="PIN code setting" bgColor="#fff"></nav-bar> <nav-bar :title="$t('setPin.title')" bgColor="#fff"></nav-bar>
<view style="width: 92%; margin: 10px auto; padding: 15px 10px;"> <view style="width: 92%; margin: 10px auto; padding: 15px 10px;">
<uni-forms label-position="top" label-width="80px" :model="model" :rules="rules" ref="model"> <uni-forms label-position="top" label-width="80px" :model="model" :rules="rules" ref="model">
<uni-forms-item label="PIN code" name="password"> <uni-forms-item :label="$t('setPin.text1')" name="password">
<uni-easyinput type="password" :passwordIcon="true" v-model="model.password" placeholder="Enter your PIN code" /> <uni-easyinput type="password" :passwordIcon="true" v-model="model.password" :placeholder="$t('setPin.text2')" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="New PIN code" name="newpassword"> <uni-forms-item :label="$t('setPin.text3')" name="newpassword">
<uni-easyinput type="password" :passwordIcon="true" v-model="model.newpassword" placeholder="Enter new PIN code of at least 6 digits" /> <uni-easyinput type="password" :passwordIcon="true" v-model="model.newpassword" :placeholder="$t('setPin.text4')" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="Confirm PIN code" name="renewpassword"> <uni-forms-item :label="$t('setPin.text5')" name="renewpassword">
<uni-easyinput type="password" :passwordIcon="true" v-model="model.renewpassword" placeholder="Repeat pin code of at least 6 digits" /> <uni-easyinput type="password" :passwordIcon="true" v-model="model.renewpassword" :placeholder="$t('setPin.text6')" />
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
</view> </view>
<view style="bottom: 0px; position: absolute; width:100vw; height: 60px;"> <view style="bottom: 0px; position: absolute; width:100vw; height: 60px;">
<view class="cell_list"> <view class="cell_list">
<button type="primary" round style="width: 100%;" @click="submit">Submit</button> <button type="primary" round style="width: 100%;" @click="submit">{{$t("buttonSubmit")}}</button>
</view> </view>
</view> </view>
</view> </view>
@ -37,14 +37,14 @@
}, },
rules: { rules: {
password:{ password:{
rules:[{required: true,errorMessage: 'Please input trade password'}, rules:[{required: true,errorMessage: this.$t('setPin.text7')},
{minLength: 6, maxLength: 6, errorMessage: 'Please enter a 6-digit transaction password', }], {minLength: 6, maxLength: 6, errorMessage: this.$t('setPin.text8'), }],
}, },
newpassword: {rules:[{required: true,errorMessage: 'Please input new trade password'}, newpassword: {rules:[{required: true,errorMessage: this.$t('setPin.text9')},
{minLength: 6, maxLength: 6, errorMessage: 'Please enter a 6-digit new transaction password', }], {minLength: 6, maxLength: 6, errorMessage: this.$t('setPin.text10'), }],
}, },
renewpassword:{rules:[{required: true,errorMessage: 'Re enter the new transaction password'}, renewpassword:{rules:[{required: true,errorMessage: this.$t('setPin.text11')},
{minLength: 6, maxLength: 6, errorMessage: 'Please enter a 6-digit new transaction password', }], {minLength: 6, maxLength: 6, errorMessage: this.$t('setPin.text10'), }],
}, },
} }
}; };
@ -75,7 +75,7 @@
this.$refs.model.validate().then(res=>{ this.$refs.model.validate().then(res=>{
if (this.model.newpassword !== this.model.renewpassword) { if (this.model.newpassword !== this.model.renewpassword) {
uni.showToast({ uni.showToast({
title:'The transaction passwords entered twice are different', title:this.$t('setPin.text12'),
icon:'error' icon:'error'
}) })
return; return;

View File

@ -24,18 +24,7 @@
jyfParser jyfParser
}, },
data() { data() {
return {
html: `<p>微信小程序直播自2月14日开放内侧以来关注度一直居高不下现在商淘软件多个电商系统都已接入小程序直播今天商家云以多商户系统为例讲解<span style="color: #e03e2d;"><a style="color: #e03e2d;" href="https://www.kemean.com/">微信小程序直播</a></span>在设计时应该注意到哪些方面呢?</p>
<p>1.&nbsp; 能让人耳目一新的版面设计</p>
<p>在我们所见到的直播系统当中虽说每个直播间看起来大同小异但是仔细的观察还是略微不同所以我们在直播功能设计的时候一定要充分的考虑到人的视觉观感让人耳目一新</p>
<p>2.&nbsp; 无缝对接商城会员体系</p>
<p>小程序直播的主播在直播带货的过程中直播充分讲解产品的卖点让消费者充分的了解到商城里面的产品这时观众点击商品跳转到小程序商城购物中间需要能无缝对接不要让人有还需要登录之类的操作以免降低转化</p>
<p><img src="http://qn.kemean.cn/xinshidai/202005/09/ee1db57c428243d1a3dd5e9243391ce970ca306109754626bb833df482b4c03a.jpg" alt="" width="500" height="300"></p>
<p>3.&nbsp; 要有回放功能</p>
<p>用户有时间观看直播那他可以准时到直播间进行观看如果他没时间需要考虑到回放的功能这样用户才能有更好的体验</p>
<p>以上就是商家云在小程序直播功能设计上的一点见解商淘软件目前已经开发完成能完美的与商城结合始终以客户体验为第一需求以雄厚的技术团队和专业的设计团队帮助企业快速搭建商城系统平台提供全方位的技术指导和售后服务</p>
<p>&nbsp;</p>`
};
}, },
computed: { computed: {
...mapState(['userInfo']) ...mapState(['userInfo'])

View File

@ -1,11 +1,11 @@
<template> <template>
<view class="page"> <view class="page">
<nav-bar title="Questionnaire" bgColor="#fff"></nav-bar> <nav-bar :title="$t('answer.title')" bgColor="#fff"></nav-bar>
<!-- 内容切换 --> <!-- 内容切换 -->
<view class="content"> <view class="content">
<view class="v2" style="margin-top: 20rpx"> <view class="v2" style="margin-top: 20rpx">
<view class="title">{{detail.questionnaire.title}}</view> <view class="title">{{detail.questionnaire.title}}</view>
<view style="font-weight: 400;font-size: 14px;color: #999999;">Answer time: {{detail.created_at}}</view> <view style="font-weight: 400;font-size: 14px;color: #999999;">{{$t('answer.text1')}}: {{detail.created_at}}</view>
<view v-for="(item, index) in detail.questionnaire.body" :key="index" style="margin-top: 30rpx;" :id="'item'+index"> <view v-for="(item, index) in detail.questionnaire.body" :key="index" style="margin-top: 30rpx;" :id="'item'+index">
<view style="font-size: 28rpx; color: #333; font-weight: 600;"> <view style="font-size: 28rpx; color: #333; font-weight: 600;">
<view style="float: left; width: 8%;" :class="ans==index? 'ans' : ''">{{index+1}})</view> <view style="float: left; width: 8%;" :class="ans==index? 'ans' : ''">{{index+1}})</view>
@ -15,7 +15,7 @@
<view style="margin-top: 20rpx;"> <view style="margin-top: 20rpx;">
<uni-row :gutter="10"> <uni-row :gutter="10">
<radio-group style="width: 100%;"> <radio-group style="width: 100%;">
<uni-col :span="24" v-for="(answer, i) in item.answer"> <uni-col :span="24" v-for="(answer, i) in item.answer" :key="i">
<radio :value="String.fromCharCode(65+i)" :checked="item.Res === (i)" style="width: 100%; padding-left: 7%;" > <radio :value="String.fromCharCode(65+i)" :checked="item.Res === (i)" style="width: 100%; padding-left: 7%;" >
<view > <view >
<view :class="ans==index? 'ans' : ''" style="float: left; width: 6%; font-size: 28rpx;">{{String.fromCharCode(65+i)}} :</view> <view :class="ans==index? 'ans' : ''" style="float: left; width: 6%; font-size: 28rpx;">{{String.fromCharCode(65+i)}} :</view>
@ -66,7 +66,7 @@
// //
onLoad(e) { onLoad(e) {
uni.showLoading({ uni.showLoading({
title:'loading...' title: this.$t('loading')
}); });
if(e.id){ if(e.id){
this.id = e.id; this.id = e.id;

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="page"> <view class="page">
<nav-bar title="To answer" bgColor="#fff"></nav-bar> <nav-bar :title="$t('toanswer.title')" bgColor="#fff"></nav-bar>
<view style="margin: 20rpx 3%; padding: 0rpx 10rpx 160rpx; "> <view style="margin: 20rpx 3%; padding: 0rpx 10rpx 160rpx; ">
<view class="cell_list" style="padding: 0px; margin-bottom: 30rpx;"> <view class="cell_list" style="padding: 0px; margin-bottom: 30rpx;">
<view class="cell_left txt"> <view class="cell_left txt">
@ -11,13 +11,13 @@
<uni-forms :modelValue="answerModel" :rules="rules" ref="form"> <uni-forms :modelValue="answerModel" :rules="rules" ref="form">
<uni-forms-item> <uni-forms-item>
<view class="cell_list"> <view class="cell_list">
<view class="cell_left txt">Each number</view> <view class="cell_left txt">{{$t('toanswer.text2')}}</view>
<view class="cell_right ">{{detail.max_quantity==0?'不限制':detail.max_quantity}}</view> <view class="cell_right ">{{detail.max_quantity==0? $t('toanswer.text1') :detail.max_quantity}}</view>
</view> </view>
</uni-forms-item> </uni-forms-item>
<uni-forms-item> <uni-forms-item>
<view class="cell_list"> <view class="cell_list">
<view class="cell_left txt">Cloud hosting</view> <view class="cell_left txt">>{{$t('toanswer.text3')}}</view>
<view class="cell_right "> <view class="cell_right ">
<uni-number-box :value="answerModel.num" :max="detail.max_quantity==0?Infinity:detail.max_quantity" :min="1" background="#2979FF" color="#fff" @change="changeNum" /> <uni-number-box :value="answerModel.num" :max="detail.max_quantity==0?Infinity:detail.max_quantity" :min="1" background="#2979FF" color="#fff" @change="changeNum" />
</view> </view>
@ -25,44 +25,44 @@
</uni-forms-item> </uni-forms-item>
<uni-forms-item name="amount"> <uni-forms-item name="amount">
<view class="cell_list"> <view class="cell_list">
<view class="cell_left txt" style="width: 50%;">Amount spent</view> <view class="cell_left txt" style="width: 50%;">{{$t('toanswer.text4')}}</view>
<view class="cell_right "> <view class="cell_right ">
{{answerModel.price}}<view style="float: right; margin-left: 20rpx; font-size: 12px; margin-right: 20rpx;">USDT</view> {{answerModel.price}}<view style="float: right; margin-left: 20rpx; font-size: 12px; margin-right: 20rpx;">USDT</view>
</view> </view>
</view> </view>
<view style="font-size: 14px; color: #999; font-weight: 500; line-height: 50upx; text-align: right;"> <view style="font-size: 14px; color: #999; font-weight: 500; line-height: 50upx; text-align: right;">
Available balance: {{parseFloat(user.money).toFixed(2)}} USDT</view> {{$t('toanswer.text6')}}: {{parseFloat(user.money).toFixed(2)}} USDT</view>
</uni-forms-item> </uni-forms-item>
<uni-forms-item> <uni-forms-item>
<view class="cell_list"> <view class="cell_list">
<view class="cell_left txt">Total return</view> <view class="cell_left txt">{{$t('toanswer.text5')}}</view>
<view class="cell_right "> <view class="cell_right ">
<span style="font-weight: 500;font-size: 16px;color: #1D61E7;">{{answerModel.interest_rate}} USDT</span></view> <span style="font-weight: 500;font-size: 16px;color: #1D61E7;">{{answerModel.interest_rate}} USDT</span></view>
</view> </view>
</uni-forms-item> </uni-forms-item>
<uni-forms-item> <uni-forms-item>
<view class="cell_list"> <view class="cell_list">
<view class="cell_left txt">Billing cycle</view> <view class="cell_left txt">{{$t('toanswer.text7')}}</view>
<view class="cell_right ">{{detail.billing_cycle}} DAYS</view> <view class="cell_right ">{{detail.billing_cycle}} DAYS</view>
</view> </view>
</uni-forms-item> </uni-forms-item>
<uni-forms-item> <uni-forms-item>
<view class="cell_list"> <view class="cell_list">
<view class="cell_left txt">Yield rate</view> <view class="cell_left txt">{{$t('toanswer.text8')}}</view>
<view class="cell_right ">{{answerModel.rate}}%</view> <view class="cell_right ">{{answerModel.rate}}%</view>
</view> </view>
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
</view> </view>
<view style="bottom: 0px; position: absolute; width:100vw; height: 160rpx;"> <view style="bottom: 0px; position: absolute; width:100vw; height: 160rpx;">
<button type="primary" round style="width: 90%; margin: auto;" @click="submit">Submit</button> <button type="primary" round style="width: 90%; margin: auto;" @click="submit">{{$t('buttonSubmit')}}</button>
</view> </view>
<uni-popup ref="popup" type="dialog" :is-mask-click="true" background-color="#fff" borderRadius="40rpx"> <uni-popup ref="popup" type="dialog" :is-mask-click="true" background-color="#fff" borderRadius="40rpx">
<view style="width: 80vw; padding: 20rpx 30rpx; border-radius: 40rpx; line-height: 50rpx;"> <view style="width: 80vw; padding: 20rpx 30rpx; border-radius: 40rpx; line-height: 50rpx;">
<view style="font-size: 36rpx; font-weight: bold; text-align: center; margin-bottom: 30rpx;">PIN code</view> <view style="font-size: 36rpx; font-weight: bold; text-align: center; margin-bottom: 30rpx;">{{$t("setPin.text1")}}</view>
<uni-easyinput type="password" :passwordIcon="true" v-model="pingcode" placeholder="Enter the PIN code" /> <uni-easyinput type="password" :passwordIcon="true" v-model="pingcode" :placeholder="{{$t("setPin.text2")}}" />
<button style="background-color: #1D61E7; color: #fff; margin: 40rpx auto;" @click="Confirm">Confirm</button> <button style="background-color: #1D61E7; color: #fff; margin: 40rpx auto;" @click="Confirm">{{$t("buttonConfirm")}}</button>
</view> </view>
</uni-popup> </uni-popup>
</view> </view>
@ -98,7 +98,7 @@ import detailsVue from './details.vue';
// //
onLoad(e) { onLoad(e) {
uni.showLoading({ uni.showLoading({
title:'Data Loading...' title: this.$t('loading')
}) })
if(e.id){ if(e.id){
getUserInfo(this.$i18n.locale).then(res => { getUserInfo(this.$i18n.locale).then(res => {

View File

@ -1,11 +1,11 @@
<template> <template>
<view class="page"> <view class="page">
<nav-bar title="Questionnaire" bgColor="#fff"></nav-bar> <nav-bar :title="$t('Questionnaire.title')" bgColor="#fff"></nav-bar>
<view> <view>
<view class="head-nav"> <view class="head-nav">
<view class="tab" :class="navIndex==0?'activite':''" @click="checkIndex(0)">Data Market</view> <view class="tab" :class="navIndex==0?'activite':''" @click="checkIndex(0)">{{$t('Questionnaire.text1')}}</view>
<view class="tab" :class="navIndex==1?'activite':''" @click="checkIndex(1)">In progress</view> <view class="tab" :class="navIndex==1?'activite':''" @click="checkIndex(1)">{{$t('Questionnaire.text2')}}</view>
<view class="tab" :class="navIndex==2?'activite':''" @click="checkIndex(2)">done</view> <view class="tab" :class="navIndex==2?'activite':''" @click="checkIndex(2)">{{$t('Questionnaire.text3')}}</view>
<view style="clear: both;"></view> <view style="clear: both;"></view>
</view> </view>
<!-- 内容切换 --> <!-- 内容切换 -->
@ -23,16 +23,16 @@
<slider :value="item.used" :disabled="true" style="height: 16rpx;" min="0" :max="item.stock+item.used" step="100" /> <slider :value="item.used" :disabled="true" style="height: 16rpx;" min="0" :max="item.stock+item.used" step="100" />
</view> </view>
<view style="width: 55%; float: left; line-height: 35px; margin-left: 5%;"> <view style="width: 55%; float: left; line-height: 35px; margin-left: 5%;">
Answered: <span style="color: #1D61E7;">{{item.used}}</span>/{{item.stock+item.used}} {{$t('Questionnaire.text4')}}: <span style="color: #1D61E7;">{{item.used}}</span>/{{item.stock+item.used}}
</view> </view>
<view style="text-align: left; clear: both;">Period: {{item.billing_cycle}} {{item.cycle_type}}</view> <view style="text-align: left; clear: both;">{{$t('Questionnaire.text5')}}: {{item.billing_cycle}} {{item.cycle_type}}</view>
</view> </view>
<view style="font-size: 12px; font-weight: 400; color: #999; line-height: 20px; te"> <view style="font-size: 12px; font-weight: 400; color: #999; line-height: 20px; te">
<view style="float: left; color: #333; font-size: 16px; font-weight: 500; line-height: 40px;"> <view style="float: left; color: #333; font-size: 16px; font-weight: 500; line-height: 40px;">
reward: <span style="font-size: 20px;">${{parseFloat(item.price).toFixed(2)}} </span> {{$t('Questionnaire.text6')}}: <span style="font-size: 20px;">${{parseFloat(item.price).toFixed(2)}} </span>
</view> </view>
<view style="float: right;"> <view style="float: right;">
<button type="primary" class="b" @click="onTokenJump('/pages/questionnaire/details?id='+item.id)">To answer</button> <button type="primary" class="b" @click="onTokenJump('/pages/questionnaire/details?id='+item.id)">{{$t('Questionnaire.text7')}}</button>
</view> </view>
</view> </view>
</uni-col> </uni-col>
@ -40,32 +40,32 @@
</view> </view>
<view style="text-align: center; padding-bottom: 80px;" v-if="list.length <= 0"> <view style="text-align: center; padding-bottom: 80px;" v-if="list.length <= 0">
<image style="width: 360rpx; height: 360rpx; margin: 160rpx auto 0rpx auto;" src="/static/images/w5.png" mode="cover"></image> <image style="width: 360rpx; height: 360rpx; margin: 160rpx auto 0rpx auto;" src="/static/images/w5.png" mode="cover"></image>
<view style="color: #999; font-size: 14px; font-weight: 400;">No data available</view> <view style="color: #999; font-size: 14px; font-weight: 400;">{{$t('nodata')}}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="content" v-if="navIndex==1"> <view class="content" v-if="navIndex==1">
<view class="v2" style="margin-top: 20rpx" v-if="list1.length > 0" v-for="(item, index) in list1" :key="index"> <view class="v2" style="margin-top: 20rpx" v-if="list1.length > 0" v-for="(item, index) in list1" :key="index">
<view class="title">{{item.questionnaire.title}}</view> <view class="title">{{item.questionnaire.title}}</view>
<view style="font-weight: 400;font-size: 14px;color: #999999;">Answer time: {{item.created_at.slice(0, 19)}}</view> <view style="font-weight: 400;font-size: 14px;color: #999999;">{{$t('Questionnaire.text8')}}: {{item.created_at.slice(0, 19)}}</view>
<view style="text-align: right;"><button type="primary" class="b" style="float: right;" @click="onTokenJump('/pages/questionnaire/answer?id='+item.id)">Details</button></view> <view style="text-align: right;"><button type="primary" class="b" style="float: right;" @click="onTokenJump('/pages/questionnaire/answer?id='+item.id)">{{$t('Questionnaire.text9')}}</button></view>
<view style="clear: both;"></view> <view style="clear: both;"></view>
</view> </view>
<view style="text-align: center; padding-bottom: 80px;" v-if="list1.length <= 0"> <view style="text-align: center; padding-bottom: 80px;" v-if="list1.length <= 0">
<image style="width: 360rpx; height: 360rpx; margin: 160rpx auto 0rpx auto;" src="/static/images/w5.png" mode="cover"></image> <image style="width: 360rpx; height: 360rpx; margin: 160rpx auto 0rpx auto;" src="/static/images/w5.png" mode="cover"></image>
<view style="color: #999; font-size: 14px; font-weight: 400;">No data available</view> <view style="color: #999; font-size: 14px; font-weight: 400;">{{$t('nodata')}}</view>
</view> </view>
</view> </view>
<view class="content" v-if="navIndex==2"> <view class="content" v-if="navIndex==2">
<view class="v2" style="margin-top: 20rpx" v-if="list2.length > 0" v-for="(item, index) in list2" :key="index"> <view class="v2" style="margin-top: 20rpx" v-if="list2.length > 0" v-for="(item, index) in list2" :key="index">
<view class="title">{{item.questionnaire.title}}</view> <view class="title">{{item.questionnaire.title}}</view>
<view style="font-weight: 400;font-size: 14px;color: #999999;">Answer time: {{item.created_at.slice(0, 19)}}</view> <view style="font-weight: 400;font-size: 14px;color: #999999;">{{$t('Questionnaire.text8')}}: {{item.created_at.slice(0, 19)}}</view>
<view style="text-align: right;"><button type="primary" class="b" style="float: right; background-color: #eee; color: #333">Done</button></view> <view style="text-align: right;"><button type="primary" class="b" style="float: right; background-color: #eee; color: #333">{{$t('Questionnaire.text10')}}</button></view>
<view style="clear: both;"></view> <view style="clear: both;"></view>
</view> </view>
<view style="text-align: center; padding-bottom: 80px;" v-if="list2.length <= 0"> <view style="text-align: center; padding-bottom: 80px;" v-if="list2.length <= 0">
<image style="width: 360rpx; height: 360rpx; margin: 160rpx auto 0rpx auto;" src="/static/images/w5.png" mode="cover"></image> <image style="width: 360rpx; height: 360rpx; margin: 160rpx auto 0rpx auto;" src="/static/images/w5.png" mode="cover"></image>
<view style="color: #999; font-size: 14px; font-weight: 400;">No data available</view> <view style="color: #999; font-size: 14px; font-weight: 400;">{{$t('nodata')}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -106,7 +106,7 @@
// //
onShow() { onShow() {
uni.showLoading({ uni.showLoading({
title:'Data Loading...' title: this.$t("loading")
}) })
let data = { let data = {
page: this.par.page, page: this.par.page,

View File

@ -1,10 +1,10 @@
<template> <template>
<view class="page"> <view class="page">
<nav-bar title="Select" bgColor="#fff"></nav-bar> <nav-bar :title="$t("Select.title")" bgColor="#fff"></nav-bar>
<view> <view>
<view style="background-color: #fff;"> <view style="background-color: #fff;">
<uni-search-bar class="uni-mt-10" radius="10" v-model="kw" @clear="clear" <uni-search-bar class="uni-mt-10" radius="10" v-model="kw" @clear="clear"
placeholder="Search the questionnaire" clearButton="auto" cancelButton="none" @confirm="search" /> :placeholder="$t('Select.text1')" clearButton="auto" cancelButton="none" @confirm="search" />
</view> </view>
<!-- 内容切换 --> <!-- 内容切换 -->
<view class="content"> <view class="content">
@ -21,16 +21,16 @@
<slider :value="item.used" :disabled="true" style="height: 16rpx;" min="0" :max="item.stock+item.used" step="100" /> <slider :value="item.used" :disabled="true" style="height: 16rpx;" min="0" :max="item.stock+item.used" step="100" />
</view> </view>
<view style="width: 55%; float: left; line-height: 35px; margin-left: 5%;"> <view style="width: 55%; float: left; line-height: 35px; margin-left: 5%;">
Answered: <span style="color: #1D61E7;">{{item.used}}</span>/{{item.stock+item.used}} {{$t('Questionnaire.text4')}}: <span style="color: #1D61E7;">{{item.used}}</span>/{{item.stock+item.used}}
</view> </view>
<view style="text-align: left; clear: both;">Period: {{item.billing_cycle}} {{item.cycle_type}}</view> <view style="text-align: left; clear: both;">{{$t('Questionnaire.text5')}}: {{item.billing_cycle}} {{item.cycle_type}}</view>
</view> </view>
<view style="font-size: 12px; font-weight: 400; color: #999; line-height: 20px; te"> <view style="font-size: 12px; font-weight: 400; color: #999; line-height: 20px; te">
<view style="float: left; color: #333; font-size: 16px; font-weight: 500; line-height: 40px;"> <view style="float: left; color: #333; font-size: 16px; font-weight: 500; line-height: 40px;">
reward: <span style="font-size: 20px;">${{parseFloat(item.price).toFixed(2)}} </span> {{$t('Questionnaire.text6')}}: <span style="font-size: 20px;">${{parseFloat(item.price).toFixed(2)}} </span>
</view> </view>
<view style="float: right;"> <view style="float: right;">
<button type="primary" class="b" @click="onTokenJump('/pages/questionnaire/details?id='+item.id)">To answer</button> <button type="primary" class="b" @click="onTokenJump('/pages/questionnaire/details?id='+item.id)">{{$t('Questionnaire.text7')}}</button>
</view> </view>
</view> </view>
</uni-col> </uni-col>
@ -38,7 +38,7 @@
</view> </view>
<view style="text-align: center; padding-bottom: 80px;" v-if="list.length <= 0"> <view style="text-align: center; padding-bottom: 80px;" v-if="list.length <= 0">
<image style="width: 360rpx; height: 360rpx; margin: 160rpx auto 0rpx auto;" src="/static/images/w5.png" mode="cover"></image> <image style="width: 360rpx; height: 360rpx; margin: 160rpx auto 0rpx auto;" src="/static/images/w5.png" mode="cover"></image>
<view style="color: #999; font-size: 14px; font-weight: 400;">No data available</view> <view style="color: #999; font-size: 14px; font-weight: 400;">{{$t('nodata')}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -110,13 +110,13 @@
}, },
search(){ search(){
uni.showLoading({ uni.showLoading({
title:'Data Loading...' title: this.$t('loading')
}) })
this.getlist(); this.getlist();
}, },
clear(){ clear(){
uni.showLoading({ uni.showLoading({
title:'Data Loading...' title: this.$t('loading')
}) })
this.getlist(); this.getlist();
} }